// sIFR

if(typeof sIFR == "function"){

	sIFR.replaceElement(named({sSelector:"div.maincon h2", sFlashSrc:"global/swf/trebuchet.swf", sColor:"#e8ead7",sLinkColor:"#e8ead7",sWmode:"transparent", sHoverColor:"#CCCCCC", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0&fontsize=30"}));
	sIFR.replaceElement(named({sSelector:"div.sidebar h2", sFlashSrc:"global/swf/trebuchet.swf", sColor:"#dfe1c9",sLinkColor:"#dfe1c9",sWmode:"transparent", sHoverColor:"#CCCCCC", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0&fontsize=30"}));
};


// popup

$(document).ready(function(){
	$(".pop span").hide();
	
	$("#overPanel a").each(function(i,e){
		$(e).mouseover(function(){
			$(".pop span").hide();
			$("#pop" + i).show();
		});
		
		$(e).mouseout(function(){
			$(".pop span").hide();					   
		 });
	});
	
	//close
	/*
	$(".pop .close").each(function(i,e){
		$(e).css("cursor","pointer");
		$(e).click(function(){
			$("#pop" + i).hide();
		});				
	});
	*/
});

// shadowbox

$(document).ready(function(){

	//shadowbox
	Shadowbox.init({
		loadingImage: 		'global/img/shadowbox/loading.gif',
		overlayBgImage:     ''
	});
	links = [];
	$(".shadowbox").each(
		function(i)
		{
			/*swap the href and rel attributes*/
			/*swap the href and rel attributes*/
			href = $(this).attr("href");
			rel = $(this).attr("rel");
			$(this).attr("href", rel);
			$(this).attr("rel", href);
			links[i] = this;
		}
	);
	if(links.length > 0)
	{
		Shadowbox.setup(links, {showTitle: true, titleHeight: "20px"});
	}
	
	$("div.buttons input.button").hover(
	    function()
	    {
	        $(this).addClass("button-hover");
	    },
	    function()
	    {
	        $(this).removeClass("button-hover");
	    }
	);
	
});
function enableJSClass()
{
	document.body.className = "jsEnabled";
}