﻿$(".IE .video").mouseover
(
	function()
	{
		$(".video").height(355);
	}
)
$(".IE .video").mouseout
(
	function()
	{
		$(".video").height(375);
	}
)
function splashRun()
{
	setTimeout("splashInit()", 5000);
//	splashInit();
}

var splashPlayer;

function splashInit()
{
			$("body").append("<div id='splash' class='splash' style='display: none;'><div id='video'><a id='splash-video' href='http://npc.spicore.com/video/splash.flv'></a></div></div><div id='splashRun' class='splashRun'></div>");
			$("#splash").append("<input id='close' type='submit' value='Request Free Help Now' class='close' />");	
			
			$("#close").click(killSplash)
			
			//$("#splashRun").mouseover(splash);
			$("#splashRun").mouseout(splash);
			//$("h1").mouseover(splash);
			//$("h1").mouseout(splash);
}

function splash() 
{		
	if ( $("#splash-video").html() == '' )
	{
		$('#splash').show();	
		createPlayer();
	}
}
function createPlayer()
{
		splashPlayer = new SWFObject("Player/player.swf","splashPly","450","270","8","#FFFFFF");
		splashPlayer.addParam("allowfullscreen","true");
		splashPlayer.addParam("allowscriptaccess","always");
		splashPlayer.addParam("wmode","transparent");
		//splashPlayer.addParam("flashvars","file=http://npc.spicore.com/video/splash.flv&autostart=true&controlbar=none&image=Images/splash.jpg&icons=false");
		splashPlayer.addParam("flashvars","file=http://npc.spicore.com/video/splash.flv&autostart=true&image=Images/splash.jpg&icons=false");
		splashPlayer.write("splash-video");
}
function killSplash()
{	
	$("#splash-video").html('');
	$("#splash").hide();	
	if (location.href.indexOf("ContactMe") >= 0)
	{
		location.href = "#no-risk";	
	}
}
function refreshOpener(url)
{
	window.opener.location = url;
}