function readCookie(name) {
	nameEQ = name + "=";
	ca = document.cookie.split(';');
	for(i=0;i < ca.length;i++) {
		c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function splash() {
	nome_biscotto="italarredo";
	valore_biscotto=readCookie(nome_biscotto);
	/*if(valore_biscotto) {
		$("#splash").css("display","none");
	}
	else {*/
	$("#splash").animate({
		opacity: 0.0
	  }, 2000, function() {
		$("#splash").css("display","none");
		$("#intro_complete").animate({
			opacity: 0.0
		  }, 2500, function() {
			$("#intro_complete").css("display","none");
		  });
	  });
		/*createCookie("italarredo","null",30);
	}*/
}
