jQuery(document).ready(function(){
	jQuery("#menu div.abscontainer:last").addClass("last");	
	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("#dnn_ContentPane,a.empty").mouseover(function(){
					jQuery("p.active").hide();
	});
	
	jQuery(".picshow").cycle();
});

function menuShow(menuitem){
	jQuery("#topmenu div.active:not(div.active:eq("+ jQuery("#topmenu a.active").index(menuitem) + "))").stop().slideUp(500).parent().removeClass("topsub");
	jQuery("#topmenu div.active:eq("+ jQuery("#topmenu a.active").index(menuitem) + ")").stop().css("height", "auto").slideDown(800).parent().addClass("topsub");
		jQuery(".open").removeClass("open");
		jQuery(menuitem).addClass("open");
}

function runSiteScripts(path) {
//here's the sIfr
var Charme = {  src: path + 'Charme.swf' };
sIFR.activate(Charme);
sIFR.replace(Charme, {
  selector: 'h1.pagetitle', 
  wmode: 'transparent', 
  src:  path +  'Charme.swf', 
  css: [ '.sIFR-root {color:#ffffff; font-size:42px; 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();};
}
}


}
