

 jQuery(document).ready(function(){
 jQuery("#menu div.abscontainer:last").addClass("last");	

	
	jQuery("span.level2active").hide();
		jQuery("p.active").hide();		
	jQuery("a.active").mouseover(function(){
					jQuery("p.active:not(p.active:eq("+ jQuery("a.active").index(this) + "))").hide();
					jQuery("p.active:eq("+ jQuery("a.active").index(this) + ")").show();
				
								
 	});
	jQuery("a.active").click(function(){return(false);});
	jQuery('a[href="http://chicagoperioimplants.com/Treatment/PeriodontalDisease/tabid/67/Default.aspx"],a[href="http://chicagoperioimplants.com/Treatment/AugmentationProcedures/tabid/129/Default.aspx"],a[href="http://chicagoperioimplants.com/Treatment/GumRecession/tabid/70/Default.aspx"],a[href="http://chicagoperioimplants.com/Treatment/CrownLengthening/tabid/184/Default.aspx"]').click(function(){return(false);});	
	
	jQuery("a.level1active").mouseover(function(){
					jQuery("span.level2active:not(p.active:eq("+ jQuery("a.level1active").index(this) + "))").hide();
					jQuery("span.level2active:eq("+ jQuery("a.level1active").index(this) + ")").show();
				
								
 	});
	jQuery("#dnn_ContentPane,a.empty").mouseover(function(){
					jQuery("p.active, span.level2active").hide();
								
 	});
	jQuery(".level1empty").mouseover(function(){
					jQuery("span.level2active").hide();
								
 	});
	
 });
 
 
 this.imagePreview = function(){	
	/* CONFIG */
		
		xOffset = 150;
		yOffset = 30;
		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result
		
	/* END CONFIG */
	jQuery("a.preview").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		jQuery("body").append("<p id='preview'><img src='"+ this.href +"' alt='Image preview' />"+ c +"</p>");								 
		jQuery("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");						
    },
	function(){
		this.title = this.t;	
		jQuery("#preview").remove();
    });	
	jQuery("a.preview").mousemove(function(e){
		jQuery("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};


function runSiteScripts(path) {


//here's the sIfr
//code for the h1 tags
var ErasLightITC = {  src: path + 'ErasLightITC.swf' };
sIFR.activate(ErasLightITC);
sIFR.replace(ErasLightITC, {
  selector: 'h1', 
  wmode: 'transparent', 
  src:  path +  'ErasLightITC.swf', 
  css: [ '.sIFR-root {color:#ffffff; text-align:right; }'  ]
});



// 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();};
}
}


}

function openMeter(meterPage) {
window.open(meterPage, "meter",
"location=0,menubar=0,resizable=0,status=0,scrollbars=0,titlebar=0,toolbar=0,width=300,height=150")
}
