//sIFR implementation
function pageScripts(){
var whiskeytown = {  src: DNN_skinPath + 'whiskeytown.swf'};
sIFR.activate(whiskeytown);
sIFR.replace(whiskeytown, {
  selector: 'h1', 
  wmode: 'transparent', 
  src:  DNN_skinPath +  'whiskeytown.swf',  
  css: [ '.sIFR-root {color:#000000;font-size:30px;}'] 
});
} 

jQuery(document).ready(function($){	
							
	$("#Navigation > ul").superfish({
		hoverClass:"hover",
		pathClass:"overideThisToUse",
		delay:1200,
		animation:{height:"show"},
		speed:"normal"
	});
	
	$("#Navigation ul li ul li a").each(function(){
		var txt = "&bull; &nbsp;" + $(this).text();
		$(this).html(txt);
	});
	
/* remove box from links */
	$("a").focus(function(){
		this.blur();
	});

/* accordion click function */	
	$('.acc h3').click(function() {
		$(this).toggleClass('active').next().toggle("fast");
		return false;
	}); 
	
	if ($('#smile_gallery_vid').length) {
		flowplayer("smile_gallery_vid", { src: DNN_skinPath+"videos/flowplayer-3.2.6.swf", wmode: "transparent" }, { plugins: { controls: { url: 'flowplayer.controls-tube-3.2.4.swf' } }, clip: { autoPlay: true, autoBuffering: true, url: DNN_skinPath+'videos/smilegallery.flv' } });
	}
	
	if ($('#office_tour_vid').length) {
		flowplayer("office_tour_vid", { src:  DNN_skinPath+"videos/flowplayer-3.2.6.swf", wmode: "transparent" }, { plugins: { controls: { url: 'flowplayer.controls-tube-3.2.4.swf' } }, clip: { autoPlay: true, autoBuffering: true, url:  DNN_skinPath+'videos/tour.flv' } });
	}

/*Preload the menu backgrounds*/
	menuImage = new Image(); 
	menuImage.src = DNN_skinPath + "images/home_hover.jpg";
	menuImage1 = new Image(); 
	menuImage1.src = DNN_skinPath + "images/office_hover.jpg";
	menuImage2 = new Image(); 
	menuImage2.src = DNN_skinPath + "images/pinfo_hover.jpg";
	menuImage3 = new Image(); 
	menuImage3.src = DNN_skinPath + "images/treatment_hover.jpg";
	menuImage4 = new Image(); 
	menuImage4.src = DNN_skinPath + "images/misc_hover.jpg";
	menuImage5 = new Image(); 
	menuImage5.src = DNN_skinPath + "images/onews_hover.jpg";
	menuImage6 = new Image(); 
	menuImage6.src = DNN_skinPath + "images/plogin_hover.jpg";
	menuImage7 = new Image(); 
	menuImage7.src = DNN_skinPath + "images/patient_sub.png";	
	menuImage8 = new Image(); 
	menuImage8.src = DNN_skinPath + "images/treatment_sub.png";
	menuImage9 = new Image(); 
	menuImage9.src = DNN_skinPath + "images/office_sub.png";	
	menuImage10 = new Image(); 
	menuImage10.src = DNN_skinPath + "images/misc_sub.png";

	
// flash features
	if ($("#featurebefore").length){
		var so = new SWFObject("/features/loader.swf", "features", "500", "295", "9", "#FF6600");
		so.addVariable("config", "/features/config.xml");
		so.addVariable("feature", "beforeafter");
		so.addParam("wmode", "transparent");
		so.addParam("quality", "high");
		so.write("featurebefore"); 
	}	

	if ($("#featureemer").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("featureemer");
	}

	if ($("#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 ($("#featuretypes").length){
		var so = new SWFObject("/features/loader.swf", "features", "500", "273", "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 ($("#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"); 
	}

});
