	Shadowbox.init({
		// let's skip the automatic setup because we don't have any
		// properly configured link elements on the page
		onFinish : function(elem){
			setTimeout(closepop,77000);
		},
		flashVars:{autoplay:1,enablejsapi:1,playerapiid:'sb-player',version:3,controls:0,bgcolor:'#FFFFFF'},
		skipSetup: true
	});

	function loadvideo() {
		// open a welcome video as soon as the window loads
		var agent=navigator.userAgent.toLowerCase();
		var is_iphone = ((agent.indexOf('blackberry')!=-1)+(agent.indexOf('iphone')!=-1)+(agent.indexOf('ipad')!=-1)+(agent.indexOf('playstation')!=-1)+(agent.indexOf('android')!=-1)+(agent.indexOf('ipod')!=-1));
		//test if the user is on an iPhone
		if (!is_iphone) { 
			Shadowbox.open({
				content:    'http://www.youtube.com/e/PmCq5AtXO-c?enablejsapi=1&version=3&playerapiid=sb-player',
				player:     "swf",
				height:     365,
				width:      648
			});
		 }
		 else {
			 alert ("This video cannot be displayed on your device.");
		 }
	};

	function closepop(){
		Shadowbox.close();	
	}

