//sIFR implementation
function pageScripts(){
var ShelleyAllegroScript = {  src: DNN_skinPath + '/flash/avenir.swf' };
sIFR.activate(ShelleyAllegroScript);
sIFR.replace(ShelleyAllegroScript, {
  selector: 'h1', 
  wmode: 'transparent', 
  src:  DNN_skinPath +  '/flash/avenir.swf', 
  css: [ '.sIFR-root {color:#e0ee5d; font-size:36px;text-transform:uppercase;}'  ]
});
}




//Menu implementation	   
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 () {}
	}).find(">li:has(ul)").mouseover(function () {
		jQuery("ul", this).bgIframe({opacity:true});
		}).find("a").focus(function () {
		jQuery("ul", jQuery("#Navigation > ul >li:has(ul)")).bgIframe({opacity:true});
	
	});



//home

var PathHomeo = DNN_skinPath + "images/home.jpg";

jQuery(
"#Navigation36").append("<a href='#' title=''></a>");

jQuery(
"#Navigation36").find("img").mouseover(function () {

var PathHomeON = DNN_skinPath + "images/home_hover.jpg";

jQuery(
this).attr({ src:PathHomeON });

});

jQuery(
"#Navigation36").find("img").mouseout(function () {

var PathHomeON = DNN_skinPath + "images/home.jpg";

jQuery(
this).attr({ src:PathHomeON });

});

//End
//officeinfo

var PathHomeo = DNN_skinPath + "images/officeinfo.jpg";

jQuery(
"#Navigation57").append("<a href='#' title=''></a>");

jQuery(
"#Navigation57").find("img").mouseover(function () {

var PathHomeON = DNN_skinPath + "images/officeinfo_hover.jpg";

jQuery(
this).attr({ src:PathHomeON });

});

jQuery(
"#Navigation57").find("img").mouseout(function () {

var PathHomeON = DNN_skinPath + "images/officeinfo.jpg";

jQuery(
this).attr({ src:PathHomeON });

});

//End
//patientinfo
	var PathHome = DNN_skinPath + "images/patientinfo.jpg";
	jQuery("#Navigation58").append("<a href='#' title=''></a>");

	jQuery("#Navigation58").find("img").mouseover(function () {
				var PathHomeON = DNN_skinPath + "images/patientinfo_hover.jpg";
				jQuery(this).attr({ src:PathHomeON });

	});
	jQuery("#Navigation58").find("img").mouseout(function () {
				var PathHomeON = DNN_skinPath + "images/patientinfo.jpg";
				jQuery(this).attr({ src:PathHomeON });
	});
	//End

	//treatment
	var PathHome = DNN_skinPath + "images/treatmentinfo.jpg";
	jQuery("#Navigation59").append("<a href='#' title=''></a>");

	jQuery("#Navigation59").find("img").mouseover(function () {
				var PathHomeON = DNN_skinPath + "images/treatmentinfo_hover.jpg";
				jQuery(this).attr({ src:PathHomeON });

	});
	jQuery("#Navigation59").find("img").mouseout(function () {
				var PathHomeON = DNN_skinPath + "images/treatmentinfo.jpg";
				jQuery(this).attr({ src:PathHomeON });
	});
	//End



	//funstuff
	var PathHome = DNN_skinPath + "images/patientlogin.jpg";
	jQuery("#Navigation87").append("<a href='#' title=''></a>");

	jQuery("#Navigation87").find("img").mouseover(function () {
				var PathHomeON = DNN_skinPath + "images/patientlogin_hover.jpg";
				jQuery(this).attr({ src:PathHomeON });

	});
	jQuery("#Navigation87").find("img").mouseout(function () {
				var PathHomeON = DNN_skinPath + "images/patientlogin.jpg";
				jQuery(this).attr({ src:PathHomeON });
	});



	
	//Contactus
	var PathHome = DNN_skinPath + "images/contactus.jpg";
	jQuery("#Navigation86").append("<a href='#' title=''></a>");

	jQuery("#Navigation86").find("img").mouseover(function () {
				var PathHomeON = DNN_skinPath + "images/contactus_hover.jpg";
				jQuery(this).attr({ src:PathHomeON });

	});
	jQuery("#Navigation86").find("img").mouseout(function () {
				var PathHomeON = DNN_skinPath + "images/contactus.jpg";
				jQuery(this).attr({ src:PathHomeON });


});


	jQuery("#flashBanner").cycle({
		fx: 'fade',
		speed: 3000,
		timeout: 8000
	});

});



jQuery(document).ready(function(){
	jQuery('.accordion h2').click(function() {
	jQuery(this).toggleClass('active').next().slideToggle('slow');
		return false;
	}).next().hide();
});

jQuery(function() {
	if (jQuery('#flash-video').length) {
		if (jQuery('#flash-video').position().top > jQuery('body').height()) {
			flowplayer("flash-video", "flash/flowplayer-3.1.5.swf", {
				plugins: { controls: { url: 'flash/flowplayer.controls-tube-3.1.5.swf' } }
			});
		}
	}
});

jQuery(document).ready(function(){
  jQuery("#sitemap img").attr('style','display:none');
	jQuery("#sitemap36>a").text('Home');
	jQuery("#sitemap57>a").text('Office Info');
	jQuery("#sitemap58>a").text('Patient Info');
	jQuery("#sitemap59>a").text('Treatment Info');
	jQuery("#sitemap86>a").text('Contact Us');
	jQuery("#sitemap87>a").text('Patient Login');
});
