//sIFR implementation
function pageScripts(){
var ShelleyAllegroScript = {  src: DNN_skinPath + '/berling.swf' };
sIFR.activate(ShelleyAllegroScript);
sIFR.replace(ShelleyAllegroScript, {
  selector: 'h1', 
  wmode: 'transparent', 
  src:  DNN_skinPath +  '/berling.swf', 
  css: [ '.sIFR-root {color:#0b3b83; font-size:17px;}'  ]
});
}



jQuery(document).ready(function(){			
jQuery("#topmenu a.topper:not(a.topper:first)").before("<span class='divider'></span>");
jQuery("#topmenu div.sub").hide();
jQuery("#topmenu a.active").mouseover(function(){menuShow(this); return(false);});
								
jQuery("#dnn_ContentPane,a.empty").mouseover(function(){
jQuery("#topmenu div.active").stop().slideUp("fast").parent().removeClass("topsub");						
 	});

jQuery("#dnn_ContentPane,a.empty").mouseout(function(){
jQuery("#topmenu div.active").stop().slideUp("fast").parent().removeClass("topsub");						
 	});

/*flashing
jQuery("div.active a").mouseover( function(){
jQuery(this).stop().fadeTo("fast", 1, function(){
jQuery(this).fadeTo("fast", 1);
});
});*/

// 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-dental"); so.addParam("wmode", "transparent"); so.addParam("quality", "high"); so.write("featureoral");
	}
		
		
	if (jQuery("#featureimplants").length){
var so = new SWFObject("http://tools.televoxsites.com/features/implant.swf", "featureimplants", "200", "195", "6", "ffffff");
so.addParam("wmode", "transparent");
so.write("featureimplants");
	}

	
	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("#featurewisdom").length){
	var sshow = new SWFObject("http://tools.televoxsites.com/features/wisdom.swf", "slideshow", "190", "205", "6", "#000000");
	sshow.addVariable("colorslocation", location.host+DNN_skinPath+"colors.txt");
	sshow.addParam("wmode", "transparent");
	sshow.write("featurewisdom");
	}
	
	if (jQuery("#featurecrowns").length){
	var sshow = new SWFObject("http://tools.televoxsites.com/features/crown.swf", "slideshow", "287", "300", "6", "#000000");
	sshow.addVariable("colorslocation", location.host+DNN_skinPath+"colors.txt");
	sshow.addParam("wmode", "transparent");
	sshow.write("featurecrowns");
	}	

	if (jQuery("#featuregums").length){
	var sshow = new SWFObject("http://tools.televoxsites.com/features/gums.swf", "slideshow", "320", "200", "6", "#000000");
	sshow.addVariable("colorslocation", location.host+DNN_skinPath+"colors.txt");
	sshow.addParam("wmode", "transparent");
	sshow.write("featuregums");
}

});

function menuShow(menuitem){
jQuery("#topmenu div.active:not(div.active:eq("+ jQuery("#topmenu a.active").index(menuitem) + "))").stop().slideUp(900).parent().removeClass("topsub");

jQuery("#topmenu div.active:eq("+ jQuery("#topmenu a.active").index(menuitem) + ")").stop().css("height", "auto").slideDown(900).parent().addClass("topsub");
}

function runSiteScripts(path) {
//here's the sIfr
var berling = {  src: path + 'berling.swf' };
sIFR.activate(berling);
sIFR.replace(berling, {
  selector: 'h1', 
  wmode: 'transparent', 
  src:  path +  'berling.swf', 
  css: [ '.sIFR-root {color:#0365C1; font-size:14px; font-weight:normal; }'  ]
});

// gets rid of focus box on click
if(document.getElementsByTagName) {
var a = document.getElementsByTagName("a");
//collect all anchors A
for(var i = 0; i < a.length; i++){
// mouse onfocus, blur anchors
a[i].onfocus = function(){this.blur();};
}
}

}
