$(document).ready(function() {  

	if ( ! videoPage )
	{
		$('.videoclick').click(function (e) {
			//e.preventDefault(); 
			$('#videomodal').modal();
		});
	
	} 
	

	
});

var videoPage = false;

	function startHome( )
	{
			
		var flashvars = {};
		var params = {};
		params.wmode = "transparent";
		var attributes = {
			id:"video"	
		};
		swfobject.embedSWF("/_cust/flash/player.swf", "video", "402", "260", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
		//alert('here2');
	}
	
	function startVideo( )
	{
		videoPage = true;
		var flashvars = {};
		var params = {};
		params.wmode = "transparent";
		var attributes = {
			id:"video"	
		};
		swfobject.embedSWF("/_cust/flash/player.swf", "video", "402", "260", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
		//alert('here2');
		
		//setTimeout("playVideoOne();",500);
	}	
	
	function playVideoOne() { 
	setTimeout( 'thisMovie("video").playOne()', 1400 ); //.playOne();
	}
	
	function playVideoTwo() {
    setTimeout( 'thisMovie("video").playTwo()', 1400 );
	}
	
	function playVideoThree() {
    setTimeout( 'thisMovie("video").playThree()', 1400 );
	}
	
	function playVideoFour() {
    setTimeout( 'thisMovie("video").playFour()', 1400 );
	}	

	function thisMovie(movieName) {
		if (navigator.appName.indexOf("Microsoft") != -1) {
			return window[movieName];
		}
		else {
			return document[movieName];
		}
	}

