//activates the sIFR3
var pageHeader = {src:'fabulous50s.swf'};
sIFR.activate(pageHeader);

sIFR.replace(pageHeader, {
  selector:'h1', 
  wmode:'transparent', 
  src:'fabulous50s.swf', 
  css:['.sIFR-root {color:#ffe35e;}' ]
});




//start jQuery functions
$(document).ready(function(){
//	$(document).pngFix();
	
	$("#nav")
	.superfish({
		hoverClass	: "sfHover",
		pathClass	: "overideThisToUse",
		delay		: 0,
		animation	: {opacity:"show",height:"show"},
		speed		: "fast",
		oldJquery	: false, // set to true if using jQuery version below 1.2
		disableHI	: false, // set to true to disable hoverIntent detection
		onInit		: function(){},
		onBeforeShow	: function(){},
		onShow		: function(){},
		onHide		: function(){}
	})
	
	.find("#nav>li:has(ul)") //fixes ie6 bug
		.mouseover(function(){$("ul", this).bgIframe({opacity:true});})
		.find("a").focus(function(){$("ul", $("#nav>li:has(ul)")).bgIframe({opacity:true});});
	
	// remove last navDivider img
	$("#nav li:last").css("background","none");
	
	$("ul.menuSubs").prepend('<li><img src="images/layout/nav/subTop.gif" width="175" height="15" /></li>');
	$("ul.menuSubs").append('<li><img src="images/layout/nav/subBottom.gif" width="175" height="15" /></li>');
	

	// Image preload
	jQuery.preloadImages = function() {
		for(var i = 0; i<arguments.length; i++) {
			$("<img>").attr("src", arguments[i]);
		}
	}
	$.preloadImages(
		'/images/layout/nav/homeOver.png',
		'/images/layout/nav/officeOver.png',
		'/images/layout/nav/patientOver.png',
		'/images/layout/nav/treatmentOver.png',
		'/images/layout/nav/funOver.png',
		'/images/layout/nav/loginOver.png'
	);


	// remove box from links
	//$("a").focus(function(){this.blur();});
	
	// multicolor subs
	var colorArray = new Array("049A52","1A2F98","D86D1F","049A52","1A2F98","D86D1F","049A52","1A2F98","D86D1F","049A52","1A2F98","D86D1F","049A52","1A2F98","D86D1F","049A52","1A2F98","D86D1F","049A52","1A2F98","D86D1F","049A52","1A2F98","D86D1F","049A52","1A2F98","D86D1F");
	var i=0;
	if(i < colorArray.length){
		$("ul.menuSubs li a").each(function(i){$(this).css("color","#"+colorArray[i]);})
		i++;
	}
	
});