// preload nav images
/*
nav1 = new Image();
nav1.src = "images/layout/nav/officeOver.png";
nav2 = new Image();
nav2.src = "images/layout/nav/patientOver.png";
*/


//activates the sIFR
//code for the h1 tags
var pageHeader = {  src: 'papyrus.swf' };
sIFR.activate(pageHeader);

sIFR.replace(pageHeader, {
  selector: 'h1', 
  wmode: 'transparent', 
  src: 'papyrus.swf', 
  css: [ '.sIFR-root {color:#3E4800; }'  ]
});

//code for the navTop
var navTop = {  src: 'futuraLtCond.swf' };
sIFR.activate(navTop);

sIFR.replace(navTop, {
  selector: '#navTop li', 
  wmode: 'transparent', 
  src: 'futuraLtCond.swf', 
  css: [ '.sIFR-root a {color:#ffffff; text-decoration:none; text-align:right;} .sIFR-root a:hover {color:#D7FF9F;}'  ]
});

//code for the navSide
var navSide = {  src: 'futuraLtCond.swf' };
sIFR.activate(navSide);

sIFR.replace(navSide, {
  selector: '#navSide li', 
  wmode: 'transparent', 
  src: 'futuraLtCond.swf', 
  css: [ '.sIFR-root a {color:#543A1B; text-decoration:none; text-align:right; padding-right:20px;} .sIFR-root a:hover {color:#22688A;}'  ]
});




//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(">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");
	
	// replace all media files
	$("a.media").media();
	
	// remove box from links
	$("a").focus(function(){
		this.blur();
	});
	
});