// JavaScript Document
sIFR.activate(hel);
	
	
	sIFR.replace(hel, {
	  selector: 'h3',
	  wmode : 'transparent',
	  css: ['.sIFR-root { background-color: #FFFFFF; color: #969BB1; font-size:40px; }',
		'a{text-decoration:none; color:#969BB1;}',
		'a:hover{color:#3B3E4A;}']

	});

var javapath = "http://www.graphicfilth.com/applets/";
var $j = jQuery.noConflict();
var bg1pos;
var frame = 0;
var $bg1 = $j('#bg1');

$j(document).ready(function(){
	
	bg1pos = $bg1.position();
	setInterval(animBg,15);
	
	$j(".p5Wnd").click(function(){
		var theDiv = $j(this);
		var theId = theDiv.attr("id");
		var url = "/applets/" + theId  + "/index.html";
		javapath += theId + "/";
		
		var html = '<applet width="460" height="500" boxcolor="#FFFFFF" boxmessage="Loading Processing software..." image="'+ javapath + 'loading.gif" scriptable="true" mayscript="true" code="' + theId + '" codebase="'+ javapath + '" standby="Loading Processing software..." archive="'+ javapath + theId + '.jar" name="' + theId + '"><img width="1" height="1" src="'+ javapath + 'loading.gif"/></applet>'; 
			theDiv.html(html);
			theDiv.addClass("p5WndOpen");
			theDiv.removeClass("p5Wnd");
			

	});

});

function animBg(){
	$bg1.css("left",bg1pos.left + Math.sin(frame)*200)
	$bg1.css("top",bg1pos.top + Math.cos(frame)*75);
	frame+=0.005;
	if(frame>360) frame=0;
}


