//sIFR implementation
function pageScripts() {
var CACFuturaCasual = {  src: DNN_skinPath + 'CACFuturaCasual.swf' };
sIFR.activate(CACFuturaCasual);
sIFR.replace(CACFuturaCasual, {
  selector: 'h1', 
  wmode: 'transparent', 
  src:  DNN_skinPath +  'CACFuturaCasual.swf',  
  css: [ '.sIFR-root {color:#341700;font-size:30px;}'  ] 
});

sIFR.replace(CACFuturaCasual, {
  selector: '.h1', 
  wmode: 'transparent', 
  src:  DNN_skinPath +  'CACFuturaCasual.swf',  
  css: [ '.sIFR-root {color:#341700;font-size:30px;}'  ] 
});

}

//Menu implementation
jQuery(document).ready(function(){
	
	
	jQuery('.SelectedTab a').next('ul').show();
	jQuery('.SelectedTab a img.LinkIcon').attr('src', function(){
		var source = this.src.replace('.gif', '_selected.gif');
		return source
	});
	jQuery('li:not(.SelectedTab) > a > img.LinkIcon').rollover();
	jQuery('ul.Level1').hover(
		function() { jQuery(this).find('li.SelectedTab').addClass('hold').removeClass('SelectedTab'); },
		function() { jQuery(this).find('li.hold').addClass('SelectedTab').removeClass('hold'); }
	);
	
	/*	jQuery('#MainMenu').accordion({ 
		active: true,
		header: '.menuTitle',
		animation:{height:"show"},
		event: 'click',
		autoheight:false,
		navigation:true,
		showSpeed: 1200,
		hideSpeed: 1400
	});
	// THIS REMOVE THE LINE FROM THE EMPTY <UL> ELEMENTS (NOTE: be sure there is NO space between the <ul></ul> elements) 
	jQuery("#MainMenu li ul:empty").remove();
		
	// remove box from links 
	jQuery("a").focus(function(){
		this.blur();
	}); 
		
	jQuery("#MainMenu > 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("#MainMenu > ul >li:has(ul)")).bgIframe({opacity:true});
	});*/
	
 
/*Preload the menu backgrounds*/
	menuImage = new Image(); 
	menuImage.src = DNN_skinPath + "images/Aboutus_hover.jpg";
	menuImage1 = new Image(); 
	menuImage1.src = DNN_skinPath + "images/Braces101_hover.jpg";
	menuImage2 = new Image(); 
	menuImage2.src = DNN_skinPath + "images/ContactUs_hover.jpg";
	menuImage3 = new Image(); 
	menuImage3.src = DNN_skinPath + "images/EmergencyCare_hover.jpg";
	menuImage4 = new Image(); 
	menuImage4.src = DNN_skinPath + "images/FunStuff_hover.jpg";
	menuImage5 = new Image(); 
	menuImage5.src = DNN_skinPath + "images/Home_hover.jpg";	
	menuImage6 = new Image(); 
	menuImage6.src = DNN_skinPath + "images/MakeAReferral_hover.jpg";	
	menuImage7 = new Image(); 
	menuImage7.src = DNN_skinPath + "images/NewPatients_hover.jpg";	
	menuImage8 = new Image(); 
	menuImage8.src = DNN_skinPath + "images/PhotoGallery_hover.jpg";	
	menuImage9 = new Image(); 
	menuImage9.src = DNN_skinPath + "images/Testimonials_hover.jpg";	
	menuImage10 = new Image(); 
	menuImage10.src = DNN_skinPath + "images/TreatmentOptions_hover.jpg";	
	menuImage11 = new Image(); 
	menuImage11.src = DNN_skinPath + "images/doctorlogin_hover.jpg";	
	menuImage12 = new Image(); 
	menuImage12.src = DNN_skinPath + "images/Login_hover.jpg";	
	
	jQuery('#sitemapnavigation162').append("<br>");
	jQuery('#sitemapnavigation173').append("<br>");	
	jQuery('#sitemapnavigation183').append("<br>");
	
	// rapid palatal expander
	jQuery("#rpeFF").click(function() {
		var sshow = new SWFObject("http://tools.televoxsites.com/features/rpa2.swf", "slideshow", "450", "350", "6", "#000000");
		sshow.addVariable("colorslocation", location.host+DNN_skinPath+"colors.txt");
		sshow.addParam("wmode", "transparent");
		sshow.write("rpeFF");				  
	});
		
});
