// Shiverpool splash screen

function finished()
{
	//alert("finished");
	setTimeout(function ()
	{
		//alert("finished fired");
			$("#header").show();
			$(".holderContent").show();
			swfobject.removeSWF("splashFlashM");
			PlayHeaderFlash();
	},50);
}



function PlayHeaderFlash()
{
	var splash = swfobject.createSWF(
	{ data:"/templates/default/images/shivnav.swf", width:"750", height:"170", id:"headFlash", name:"headFlash" },
	{ wmode:"transparent" },
	"headerFlash");
	
}

function IsCookiesEnabled()
{
	str = "SD4eFlfidaJeBd9NS";
	document.cookie = str+"=ok";
	if(document.cookie.indexOf(str)>-1)
	{
		document.cookie = str + '=; expires=Thu, 01-Jan-70 00:00:01 GMT;';
		return true;
	}
	else
	{
		return false;
	}
}

jQuery(function(){
	if (location.pathname.toLowerCase() == "/default.aspx" ||location.pathname.toLowerCase() == "/home.aspx" ||location.pathname == "/")
	{
		if (swfobject.hasFlashPlayerVersion("9.0.48"))
		{
			if($.cookie('playedSplash')!='true' && IsCookiesEnabled())
			{
				//$("#header").hide();
				//$(".holderContent").hide();
				$("#header").css('display','none');
				$(".holderContent").css('display','none');
				// stupid safari bug
				
				
				swfobject.createSWF(
				{ data:"/templates/default/shiverpool.swf", width:"650", height:"622", id:"splashFlashM", name:"splashFlashM" },
				{ },
				"splashContent");
				
				
				//swfobject.embedSWF("/templates/default/shiverpool.swf", "splashContent", "650", "622", "8.0.0", "", {},  {wmode:"transparent"}, {})
				
				$.cookie('playedSplash', 'true');
			}
			else
			{
				PlayHeaderFlash();
			}

		}

	}
});
