var setHashLocation = function(loc)
{
	location.hash = '#' + loc;
}

var getHashLocation = function(loc)
{
	return location.hash.replace('#/','');
}

var enter = function()
{
	$('#flash').flash(
	{
		src:'/swf/base.swf',
		scale:'noscale',
		allowScriptAccess:"always",
		align:'middle',
		salign:'lt',
		wmode:'window',
		width: "100%",  
  		height: "100%",
  		flashvars:{ pathToLoad: currentLoc }
	},{ version: 9 });
	
	$(window).resize(function()
	{
		$('#flash').css('height',$(window).height());
	});
}



$(document).ready(function()
{
	
	currentLoc = getHashLocation();
	if(currentLoc != '') enter();
	
	$('#enter a').hover(function()
	{
		$('#enter-link img').attr('src','/images/splash-page-on.png');
	},function()
	{
		$('#enter-link img').attr('src','/images/splash-page-off.png');
	});
	
	$('#enter-link').click(function()
	{
		enter();
	});
	
});
