var slideShow = new Array();function opCl() {if ($("#slideshow").is(":hidden")) {	$(".img_slide").show();	$(".opCl").css({		"background-image": "url(http://www.centrovacanzepoker.it/web_img/chiudilo.png)"	});	$("#slideshow").slideDown("slow");}else {	$(".opCl").css({		"background-image": "url(http://www.centrovacanzepoker.it/web_img/aprila.png)"	});	$("#slideshow").slideUp("slow");	$(".img_slide").hide();}}function processSlideshow(elem, imageList, imageDuration, fadeSpeed, current) {var listSize = imageList.length;if (!current || current >= listSize) current = 0;if (!imageDuration) imageDuration = 2000;if (!fadeSpeed) fadeSpeed = 1000;$(elem + " img").css({	width: "970px",	height: "340px",	marginLeft: "0"});$(elem + " img").attr("src", imageList[current]);$(elem + " img").show();$(elem + " img").animate({	opacity: "1",	marginLeft: "-=50",	width: "+=100",	height: "+=60"}, imageDuration, "linear", function() {	$(this).animate({		opacity: "0"	}, 300, "linear", function() {		processSlideshow(elem, imageList, imageDuration, fadeSpeed, current + 1)	});});}function startSlideshow() {processSlideshow("#slideshow", slideShow, 4000, 1000);}function popPrivacyUp() {window.open('privacy.html', '', 'top=10, left=10, width=320, height=400, status=no, menubar=no, toolbar=no scrollbar=no');}function slide() {var offset = $(this).offset();$('#nav_move').stop().animate({	width: $(this).width() + 10,	height: $(this).height() + 10,	left: (offset.left) - 5  }, {	duration: 350,	easing: 'easeInOutCirc'});$('.cur').removeClass('cur');$(this).addClass('cur');return false;}function isValidEmailAddress(emailAddress) {var pattern = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i);return pattern.test(emailAddress);}function sendMail() {$(".attenzione").html("");var n = $("input[name='nome_c']").val();var c = $("input[name='mail_c']").val();var m = $("#richiesta").val();if (isValidEmailAddress(c)) {	if (c == "" || n == "" || m == "") {		$(".attenzione").html("Sono richiesti tutti i campi obbligatori.");	}	else {		$.get("Jnews.php", {			email: c,			nome: n,			richiesta: m,			invia_mail: 1		}, function(data) {			var r = data.split("|");			if (r[0] == "0") {				$(".attenzione").html(r[1]);			}			else {				$("#cont_invio_mail").fadeTo("slow", 0);				$(".attenzione").css({					"color": "green"				});				$(".attenzione").html(r[1]);				_gaq.push(['_trackEvent', 'Contatti', 'Contattato']);			}		});	}}else { $(".attenzione").html("Indirizzo mail non formalmente corretto.");}}function sendIt() {$("#warn").html("");$("#iscriviti").hide();$("#loader,#main_nl").show();var n = $("input[name='nome']").val();var c = $("input[name='cognome']").val();var m = $("input[name='mail']").val();if (isValidEmailAddress(m)) {	if ($("#privacy:checked").val() != undefined) {		if (c == "" || n == "" || c == "Cognome" || n == "Nome") {			$("#warn").html("Sono richiesti tutti i campi obbligatori.");			$("#loader").hide();			$("#iscriviti").show();		}		else {			$.get("Jnews.php", {				email: m,				nome: n,				cognome: c,				invia_iscrizione: 1			}, function(data) {				var r = data.split("|");				if (r[0] == "0") {					$("#warn").html(r[1]);					$("#loader").hide();					$("#iscriviti").show();				}				else {					$("#warn").css({						"color": "green"					});					$("#warn").html(r[1]);					$("#loader").hide();					_gaq.push(['_trackEvent', 'Iscrizione', 'NewsLetter']);				}			});		}	}	else {		$("#warn").html("Devi accettare le condizioni sulla privacy.");		$("#loader").hide();		$("#iscriviti").show();	}}else {	$("#warn").html("Indirizzo mail non formalmente corretto.");	$("#loader").hide();	$("#iscriviti").show();}}var _gaq = _gaq || [];_gaq.push(['_setAccount', 'UA-26655321-1']);_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script');ga.type = 'text/javascript';ga.async = true;ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(ga, s);})();window.___gcfg = {lang: 'it'};(function() {var po = document.createElement('script');po.type = 'text/javascript';po.async = true;po.src = 'https://apis.google.com/js/plusone.js';var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(po, s);})();
