$(document).ready(function () {
    var flashvars = false;
	var params = {};
	var attributes = {};

	bodyID =  $("body").attr("id");
	li_on = bodyID.replace("Body", "");
	
	if (bodyID == "homeBody") {
			params.menu = "false";
			params.wmode = "transparent";
			swfobject.embedSWF("strainer.swf", "flash", "852", "327", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
	}
	
	
	if(bodyID == "whatBody"){

       if ( $.browser.msie ){
			$('#whatTop, #whatBottom, #triangle').ifixpng();
	   }
		
		$("#whatMenu li a").bind("click",function(e){
			$("#whatMenu li").children().removeClass("on");
			this.className += " on";
			
			var topArray = new Array('35px', '85px', '140px', '185px', '240px', '290px'); 
			var myIndex = $("#whatMenu li a.on").attr("href");
			
			//$("#whatContent .whats").addClass("invisible").eq( myIndex ).removeClass("invisible"); 
			$("#whatContent .showing").slideToggle("slow", function(){
				$("#whatContent .showing").removeClass("showing");
				$("#triangle").animate({ top: topArray[myIndex] }, 600);
				$("#whatContent .whats").eq( myIndex ).slideToggle("slow", function(){
					$("#whatContent .whats").eq( myIndex ).addClass("showing");															
				});
			});
			
			return e.preventDefault();
		});
	}
	
	$("#nav li").bind("mouseenter",function(){
				this.className += " over";
	}).bind("mouseleave",function(){
				this.className = this.className.replace("over", "");
	});
	
	if(li_on == "about" || li_on == "diff" || li_on == "people" || li_on == "news" || li_on == "what" || li_on == "contact"){
		li_name = li_on + "LI";
		document.getElementById(li_name).className += " on";	
	}
});

