/*window.onload = function(){
	$("#slider").easySlider({
		auto: true, 
		pause: 5000,
		continuous: true,
		controlsShow: false,
		numeric: true,
	});
}*/

$(document).ready(function(){
	$("#slider").easySlider({
		auto: true, 
		pause: 5000,
		continuous: true,
		controlsShow: false,
		numeric: true
	});
	document.getElementById('overflowhider').style.overflow="hidden";
	document.getElementById('overflowhider').style.height="259px";

	var t; 
	
	width = $(window).width();
	height = $(window).height();
	$("body")
		.append( $("<div id='bgpopup-home'>")
		.css({
			backgroundColor:'blue',
			position: 'fixed',
			top:0,
			left:0,
			zIndex:100,
			opacity: 0.5,
			width:width,
			height:height,
			display: 'none'
		})
	);
	$("#bgpopup-home").click(function() {
		$("#floatMenu-home").fadeOut("slow");
		$("#popupbox-home").fadeOut("slow");
		$("#bgpopup-home").fadeOut("slow");
		document.getElementById('insert').innerHTML = '<iframe frameborder="0" height="555" width="664"></iframe>';
	});
	$("#optin_close").click(function() {
		$("#floatMenu-home").fadeOut("slow");
		$("#bgpopup-home").fadeOut("slow");
		document.getElementById('insert').innerHTML = '<iframe frameborder="0" height="555" width="664"></iframe>';
	});
});

function openvid(url,morinf){
	document.getElementById('insert').innerHTML = '<iframe frameborder="0" height="555" width="664" src="'+url+'"></iframe>';
	document.getElementById('moreinfolink').href = morinf;
	$("#bgpopup-home").fadeIn("slow");
	$("#floatMenu-home").fadeIn("slow");
	$("#popupbox-home").fadeIn("slow");
}
