//sIFR implementation
function pageScripts(){
var perpetua = {  src: DNN_skinPath + 'flash/kozuka.swf'};
sIFR.activate(perpetua);
sIFR.replace(perpetua, {
  selector: 'h1', 
  wmode: 'transparent', 
  src:  DNN_skinPath +  'flash/kozuka.swf', 
  css: [ '.sIFR-root {color:#6dc1ec;font-size:36px;}']
});
}

//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 PathHome = DNN_skinPath + "images/home.png";
jQuery("#Navigation40").append("<a href='#' title=''></a>");
	
	jQuery("#Navigation40").find("img").mouseover(function () {
				var PathHomeON = DNN_skinPath + "images/home_hover.png";
				jQuery(this).attr({ src:PathHomeON });
	});
	jQuery("#Navigation40").find("img").mouseout(function () {
				var PathHomeON = DNN_skinPath + "images/home.png";
				jQuery(this).attr({ src:PathHomeON });
	});
	//End
	
	
	
	//officeinfo
	var PathHomeo = DNN_skinPath + "images/officeinfo.png";
	jQuery("#Navigation63").append("<a href='#' title=''></a>");
	
	jQuery("#Navigation63").find("img").mouseover(function () {
				var PathHomeON = DNN_skinPath + "images/officeinfo_hover.png";
				jQuery(this).attr({ src:PathHomeON });
	});
	jQuery("#Navigation63").find("img").mouseout(function () {
				var PathHomeON = DNN_skinPath + "images/officeinfo.png";
				jQuery(this).attr({ src:PathHomeON });
	});
	//End
	
	//patientinfo
	var PathHomeo = DNN_skinPath + "images/patientinfo.png";
	jQuery("#Navigation64").append("<a href='#' title=''></a>");
	
	jQuery("#Navigation64").find("img").mouseover(function () {
				var PathHomeON = DNN_skinPath + "images/patientinfo_hover.png";
				jQuery(this).attr({ src:PathHomeON });
	});
	jQuery("#Navigation64").find("img").mouseout(function () {
				var PathHomeON = DNN_skinPath + "images/patientinfo.png";
				jQuery(this).attr({ src:PathHomeON });
	});
	//End
	
	//treatment
	var PathHomeo = DNN_skinPath + "images/treatment.png";
	jQuery("#Navigation65").append("<a href='#' title=''></a>");
	
	jQuery("#Navigation65").find("img").mouseover(function () {
				var PathHomeON = DNN_skinPath + "images/treatment_hover.png";
				jQuery(this).attr({ src:PathHomeON });
	});
	jQuery("#Navigation65").find("img").mouseout(function () {
				var PathHomeON = DNN_skinPath + "images/treatment.png";
				jQuery(this).attr({ src:PathHomeON });
	});
	//End
	
	
	//patientlogin
	var PathHomeo = DNN_skinPath + "images/patientlogin.png";
	jQuery("#Navigation67").append("<a href='#' title=''></a>");
	
	jQuery("#Navigation67").find("img").mouseover(function () {
				var PathHomeON = DNN_skinPath + "images/patientlogin_hover.png";
				jQuery(this).attr({ src:PathHomeON });
	});
	jQuery("#Navigation67").find("img").mouseout(function () {
				var PathHomeON = DNN_skinPath + "images/patientlogin.png";
				jQuery(this).attr({ src:PathHomeON });
	});
	//End

	//funstuff
	var PathHomeo = DNN_skinPath + "images/funstuff.png";
	jQuery("#Navigation66").append("<a href='#' title=''></a>");
	
	jQuery("#Navigation66").find("img").mouseover(function () {
				var PathHomeON = DNN_skinPath + "images/funstuff_hover.png";
				jQuery(this).attr({ src:PathHomeON });
	});
	jQuery("#Navigation66").find("img").mouseout(function () {
				var PathHomeON = DNN_skinPath + "images/funstuff.png";
				jQuery(this).attr({ src:PathHomeON });
	});
	//End

	//Invisalign
	var PathHomeo = DNN_skinPath + "images/Invisalign.png";
	jQuery("#Navigation97").append("<a href='#' title=''></a>");
	
	jQuery("#Navigation97").find("img").mouseover(function () {
				var PathHomeON = DNN_skinPath + "images/Invisalign_hover.png";
				jQuery(this).attr({ src:PathHomeON });
	});
	jQuery("#Navigation97").find("img").mouseout(function () {
				var PathHomeON = DNN_skinPath + "images/Invisalign.png";
				jQuery(this).attr({ src:PathHomeON });
	});
	//End
	
	
	
// flash features
	if (jQuery("#featureoral").length){
var so = new SWFObject("/features/loader.swf", "features", "500", "325", "9", "#FF6600"); so.addVariable("config", "/features/config.xml"); so.addVariable("feature", "hygiene"); so.addParam("wmode", "transparent"); so.addParam("quality", "high"); so.write("featureoral");
}	

if (jQuery("#featuretypes").length){
var so = new SWFObject("/features/loader.swf", "features", "500", "310", "9", "#FF6600"); so.addVariable("config", "/features/config.xml"); so.addVariable("xmlfile", "/features/types.xml"); so.addParam("wmode", "transparent"); so.addParam("quality", "high"); so.write("featuretypes");
}


if (jQuery("#featurecommon").length){
var so = new SWFObject("/features/loader.swf", "features", "500", "273", "9", "#FF6600"); so.addVariable("config", "/features/config.xml"); so.addVariable("feature", "problems"); so.addParam("wmode", "transparent"); so.addParam("quality", "high"); so.write("featurecommon");
}


if (jQuery("#featureemergency").length){
var so = new SWFObject("/features/loader.swf", "features", "500", "273", "9", "#FF6600"); so.addVariable("config", "/features/config.xml"); so.addVariable("feature", "emergencies"); so.addParam("wmode", "transparent"); so.addParam("quality", "high"); so.write("featureemergency");
}

if (jQuery("#featureba").length){
var so = new SWFObject("/features/loader.swf", "features", "500", "273", "9", "#FF6600"); so.addVariable("config", "/features/config.xml"); so.addVariable("feature", "beforeafter"); so.addParam("wmode", "transparent"); so.addParam("quality", "high"); so.write("featureba");
}
	
if (jQuery("#featureband").length){
var so = new SWFObject("/features/loader.swf", "features", "500", "325", "9", "#FF6600"); so.addVariable("config", "/features/config.xml"); so.addVariable("feature", "planner"); so.addParam("wmode", "transparent"); so.addParam("quality", "high"); so.write("featureband");
}

	
if (jQuery("#featuresurgery").length){
      var sshow = new SWFObject("http://tools.televoxsites.com/features/orthognathic.swf", "slideshow", "190", "205", "6", "#000000");
       sshow.addVariable("colorslocation", location.host+DNN_skinPath+"colors.txt");
       sshow.addParam("wmode", "transparent");
       sshow.write("featuresurgery");
}

if (jQuery("#featureroot").length){
	var sshow = new SWFObject("http://tools.televoxsites.com/features/rootcanal.swf", "slideshow", "350", "260", "6", "#000000");
	sshow.addVariable("colorslocation", location.host+DNN_skinPath+"colors.txt");
	sshow.addParam("wmode", "transparent");
	sshow.write("featureroot");
}


if (jQuery("#featureortho").length){
var sshow = new SWFObject("http://tools.televoxsites.com/features/beOrtho.swf", "slideshow", "450", "380", "6", "#000000");
	sshow.addVariable("colorslocation", location.host+DNN_skinPath+"colors.txt");
	sshow.addParam("wmode", "transparent");
	sshow.write("featureortho");
}

if (jQuery("#featurereatiner").length){
	var sshow = new SWFObject("http://tools.televoxsites.com/features/retainer.swf", "slideshow", "450", "265", "6", "#000000");
	sshow.addVariable("colorslocation", location.host+DNN_skinPath+"colors.txt");
	sshow.addParam("wmode", "transparent");
	sshow.write("featurereatiner");
}


if (jQuery("#invisalign-video").length){
	flowplayer("invisalign-video", {
			src: "http://tools.televoxsites.com/vendor/flash/flowplayer-3.2.6.swf",
			wmode: "transparent"
		}, {
		plugins: { controls: { url: 'flowplayer.controls-tube-3.2.4.swf' } },
		clip: { autoPlay: false, autoBuffering: true, url: 'http://tools.televoxsites.com/vendor/flash/invisalign.flv' }
	});
}

	$('.accordion-faq h3').click(function() {
		$(this).toggleClass('active').next().toggle('normal');
		return false;
	});
	
});
	



