//Image preload
jQuery.preloadImages = function() {
	for(var i = 0; i<arguments.length; i++) {
		jQuery("<img>").attr("src", arguments[i]);
	}
}
$.preloadImages(
	'/images/nav/homeOver.jpg',
	'/images/nav/officeOver.jpg',
	'/images/nav/patientOver.jpg',
	'/images/nav/treatmentOver.jpg',
	'/images/nav/funOver.jpg',
	'/images/nav/contactOver.jpg',
	'/images/layout/tlink_on.jpg'
);




//activates the sIFR3
var pageHeader = {src:'futura.swf'};
sIFR.activate(pageHeader);

sIFR.replace(pageHeader, {
  selector:'none', 
  wmode:'transparent', 
  src:'futura.swf', 
  css:['.sIFR-root {color:#000000;}' ]
});




//start jQuery functions
$(document).ready(function(){
	
	$("#nav")
	.superfish({
		hoverClass	: "sfHover",
		pathClass	: "overideThisToUse",
		delay		: 500,
		animation	: {opacity:"show",height:"show"},
		speed		: "normal",
		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");
	
// *** add hover effect to anything ***
//	$('*').hover(
//		function() {$(this).addClass('hover');},
//		function() {$(this).removeClass('hover');}
//	);
	
	// remove box from links
	$("a").focus(function(){this.blur();});
	
});