function contactFormInputCheck() {
	var filter = /^(([^<>()[\]\\.,;:\s@\”]+(\.[^<>()[\]\\.,;:\s@\”]+)*)|(\”.+\”))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
	if (document.contact.contactemail.value == '') {
		alert('Please enter your email address.');
		return false;
	} else if (!filter.test(document.contact.contactemail.value)) {
		alert('Please enter a valid email address.');
		return false;
	} else { 
		document.getElementById('submitsendingmsg').style.display = 'inline';		
		return true;
	}
}


function getthewindowsize() {
	var today = new Date();
	var expire = new Date();
	var thebrowserwidth = 0;
	var thebrowserheight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		thebrowserwidth = window.innerWidth;
		thebrowserheight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		thebrowserwidth = document.documentElement.clientWidth;
		thebrowserheight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		thebrowserwidth = document.body.clientWidth;
		thebrowserheight = document.body.clientHeight;
	}
	expire.setTime(today.getTime() + (1000*60*60*24*365));
	document.cookie = "w="+escape(thebrowserwidth)+"; expires="+expire.toGMTString()+"; path=/";
	document.cookie = "h="+escape(thebrowserheight)+"; expires="+expire.toGMTString()+"; path=/";
}


var mmLoaded=false;
var RecaptchaOptions = {
	theme : 'clean'
};
mmInit();

function mmInit() {
	var fileref=document.createElement("link");
	fileref.setAttribute("rel", "stylesheet");
	fileref.setAttribute("type", "text/css");
	fileref.setAttribute("href", "/mm/init.css");
	if (typeof fileref!="undefined") {
		document.getElementsByTagName("head")[0].appendChild(fileref);
	} else {
		mmMouseMoved=true;
	}
	jQuery(document).ready(function(){
		if(mmLoaded==false) {
			$('#markmarano').delay(50).fadeIn(1000);			
			$('#foto').delay(250).fadeIn(1000);
			$('#moment').delay(750).fadeIn(1000);
			$('#journey').delay(1500).fadeIn(1000);
			var mmBetween=100;
			var t=150+mmBetween;
			$('#untitled').delay(125).fadeIn(1000);
			$('#lightbox .slide').each(function(){
				$(this).delay(t).fadeIn(1000);
				t=t+mmBetween;
			});
			if(t>1200) {
				var tt=1200;
			} else {
				var tt=t;
			}
			if(t<800) {
				t=800;
			}
			$('#marano').delay(tt+500).fadeIn(1000);
			//$('#ask').delay(tt+1000).fadeIn(1000);
			$('#observer #ask #where').delay(tt+1000).fadeIn(1000);
			$('#observer #ask #when').delay(tt+1000+mmBetween*2).fadeIn(1000);
			$('#observer #ask #what').delay(tt+1000+mmBetween*4).fadeIn(1000);
			$('#observer #ask #who').delay(tt+1000+mmBetween*6).fadeIn(1000);
			$('#direction').delay(t+1250).fadeIn(1000);
			$('#below').delay(t+1750).fadeIn(1000);
			$('.thetest').delay(t+7000).fadeIn(1000);
			$("#observer #ask li").hover(
				function(){ $(".menu", this).fadeIn(500); $(".wp-tag-cloud", this).fadeIn(500); }, 
				function() { $(".menu", this).fadeOut(500); $(".wp-tag-cloud", this).fadeOut(500); } 
			);
			$("#observer #ask #where .menu li").hover(
				function(){ $("ul",this).fadeIn(500); },
				function(){ $("ul",this).fadeOut(500); }
			);
			$("#observer #ask #who .menu li").hover(
				function(){ $("ul",this).fadeIn(500); },
				function(){ $("ul",this).fadeOut(500); }
			);
			$("#below li").hover(
				function(){ $(".menu",this).fadeIn(500); },
				function(){ $(".menu",this).fadeOut(500); }
			);
			$("#finestra #gallery .slide a").hover(
				function(){ $(".slidehover",this).fadeIn(500); },
				function(){ $(".slidehover",this).fadeOut(500); }
			);
			$("#finestra #exposure #before a").hover(
				function(){ $("img",this).fadeIn(500); },
				function(){ $("img",this).fadeOut(500); }
			);
			$("#finestra #exposure #after a").hover(
				function(){ $("img",this).fadeIn(500); },
				function(){ $("img",this).fadeOut(500); }
			);
			$("#finestra #exposure #up a").hover(
				function(){ $("img",this).fadeIn(500); },
				function(){ $("img",this).fadeOut(500); }
			);
			mmLoaded=true;
		}
	});
}
