//initialize variables
var flashPrompt = false;
var flashPlayerVer;
var menu_style;
var active_dir;
var this_page;
var swffile;
var advanced_hosting;
var advanced_hosting_mode;
var isTemplate;
//initialize shadowbox before DOM is loaded//
Shadowbox.init({players:['img', 'html', 'flv', 'swf', 'qt', 'iframe']});

if (parent.$('iframe ').length) {
	advanced_hosting_mode = true;
}else{
	advanced_hosting_mode = false;
}
$(document).ready(function(){
		if(!flashPrompt) {
			//add the 'noflash' ID to the <html> tag
			$("html").attr("id","noflash");
			//add the superfish class name to the client_header menu
			if(menu_style == "vertical"){
				$("#nav").attr("class","sf-menu sf-vertical");
			}else{
				$("#nav").attr("class","sf-menu");
			}
			//load the remote javascript for the non-flash menu system
			$.getScript("http://common.pbhs.com/Scripts/superfish.js", function(){
				// initialize the superfish menus
				$('ul.sf-menu').superfish();
			});
		}
		if ($('#accordion_menu').length) {
			initAccordionMenu();
		}
		

});

////functions
function getPage(){

		var this_page=unescape(location.href);
		var this_page_split = this_page.split("/");
		//alert(this_page_split.length);
		if(this_page.indexOf('?')!==-1)
			this_page=this_page.substring(20,this_page.indexOf('?'))
			this_page=this_page.substr(this_page.lastIndexOf('/')+1)
		
		if (this_page == ""){
			this_page = "index.html";
		}
		return this_page;
	
}

function getDir(){
	if($("body").attr("id") == "home"){
		var active_dir = "";
		
	}else{
	   var active_dir = "../"; 
	   
	}
	return active_dir;
}


