var pic1 = new Image();
pic1.src="images/layout/nav/homeOver.png";
var pic2 = new Image();
pic2.src="images/layout/nav/doctorsOver.png";
var pic3 = new Image();
pic3.src="images/layout/nav/practiceOver.png";
var pic4 = new Image();
pic4.src="images/layout/nav/orthoOver.png";
var pic5 = new Image();
pic5.src="images/layout/nav/dentistryOver.png";
var pic6 = new Image();
pic6.src="images/layout/nav/oralsurgeryOver.png";
var pic7 = new Image();
pic7.src="images/layout/nav/funstuffOver.png";
var pic8 = new Image();
pic8.src="images/layout/nav/contactOver.png";


//start jQuery functions
$(document).ready(function(){
	
	$("#nav")
	.superfish({
		hoverClass	: "sfHover",
		pathClass	: "overideThisToUse",
		delay		: 0,
		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");
		
	// remove box from links
	//$("a").focus(function(){this.blur();});
	
	
	// *** add hover effect to menuSubs ***
	$('#nav>li:has(ul.menuSubs)').hover(
		function() {$(this).removeClass('subMenu').addClass('subHover'); return false;},
		function() {$(this).removeClass('subHover').addClass('subMenu'); return false;}
	);
	
	$('ul.menuSubs li a').each(function(){
		var newLink = $(this).attr('href');
		//$(this).parent().click(function() {document.location = newLink});
		$(this).onclick(function() {window.location = newLink});
	});
													

});