//sIFR implementation
function pageScripts(){
var zapfino = {  src: DNN_skinPath + 'zapfino.swf' };
sIFR.activate(zapfino);
sIFR.replace(zapfino, {
  selector: 'h1', 
  wmode: 'transparent', 
  src:  DNN_skinPath +  'zapfino.swf', 
  css: [ '.sIFR-root {color:#ffffff; font-size:24px; font-weight:normal; }'  ]
});
}

jQuery(document).ready(function(){
	jQuery("#Navigation > ul").superfish({
		hoverClass:"hover",
		pathClass:"overideThisToUse",
		delay:800,
		animation:{height:"show"},
		speed:"normal",
		oldJquery:false,
		disableHI:false,
		onInit:function () {},
		onBeforeShow:function () {},
		onShow:function () {},
		onHide:function () {}
	});
	
jQuery("#Navigation ul.Level1").append("<li><img src='/Portals/_default/Skins/springdentists.com/images/bottom.jpg' align='bottom' class='subbottom' /></li>");

	/* remove box from links */
	jQuery("a").focus(function(){
		this.blur();		
		});	
	
	menuImage1 = new Image(); 
	menuImage1.src = DNN_skinPath + "images/plogin_on.jpg";
	menuImage2 = new Image(); 
	menuImage2.src = DNN_skinPath + "images/home_on.jpg";
	menuImage3 = new Image(); 
	menuImage3.src = DNN_skinPath + "images/drg_on.jpg";
	menuImage4 = new Image(); 
	menuImage4.src = DNN_skinPath + "images/aboutus_on.jpg";
	menuImage5 = new Image(); 
	menuImage5.src = DNN_skinPath + "images/patient_on.jpg";
	menuImage6 = new Image(); 
	menuImage6.src = DNN_skinPath + "images/services_on.jpg";
	menuImage7 = new Image(); 
	menuImage7.src = DNN_skinPath + "images/npatient_on.jpg";
	menuImage8 = new Image(); 
	menuImage8.src = DNN_skinPath + "images/cus_on.jpg";
	menuImage9 = new Image(); 
	menuImage9.src = DNN_skinPath + "images/wv_hover.jpg";
	menuImage10 = new Image(); 
	menuImage10.src = DNN_skinPath + "images/ndn_hover.jpg";
	menuImage11 = new Image(); 
	menuImage11.src = DNN_skinPath + "images/hh_hover.jpg";
	menuImage12 = new Image(); 
	menuImage12.src = DNN_skinPath + "images/np_hover.jpg";
	
if (jQuery("#featuredental").length){
		var so = new SWFObject("/features/loader.swf", "features", "475", "325", "9", "#FF6600");
		so.addVariable("config", "/features/config.xml");
		so.addVariable("feature", "hygiene-dental"); 
		so.addParam("wmode", "transparent");
		so.addParam("quality", "high");
		so.write("featuredental");  
	}



//staff layout
	jQuery("#Mappy").children().each(function() {
		var _thisMap = jQuery(this);
		var _id = _thisMap.attr('id');
		//alert(_id);
		_thisMap.click(function() {
			//alert(_id || 'nothing');
			checkStaff(_id);
		});
	});
	
	jQuery("#Mappy").click(function() {
		var _h = jQuery("#left").height();
		
		if (_h < 800) {
			jQuery("#left").animate({height: 950}, 700, "easeOutExpo");
		/*if(jQuery("#staffMembers").find('.currentStaff')) {
			jQuery('#left').height();
			th = jQuery('.currentSlide').height();*/
		} else {
			return null;
		}
	});
	
	function checkStaff(id){
		var _div = jQuery("#staffMembers").find('.'+id);
		jQuery("#staffMembers").find('.currentStaff').fadeOut(450, "easeOutExpo").removeClass('currentStaff');
		_div.fadeIn(650, "easeOutExpo").addClass('currentStaff');
		
		//rewrote the function slightly to not be as bulky. left it commented out below this comment for you to use if you'd like. lots of quick clicks (or just using a slower computer) causes the current script to get really trippy and laggy because each time you click it's looking through every single div and computing the IF statement. you're a bad dude, good work!
		/*jQuery("#staffMembers div").each(function() {
				var _thisDiv = jQuery(this);
				var _class = _thisDiv.attr("class");
				//alert(_class || 'nothing');
				//alert(id);
				if(id === _class) {
					//alert(id + "===" + _class);
					_thisDiv.fadeIn('slow');
				} else {
					_thisDiv.fadeOut('slow');
				}
				
			});*/
	}





});
  
  


