myHeight = 0;
clientHeight = 0;
switch (window.location.host){
	case "www.fluxair.it":
		window.location.href='http://www.materassi-fluxair.it/';
		break;
	case "www.fluxair.com":
		window.location.href='http://www.fluxair-mattresses.com/';
		break;
	default:
}
function altezzaWindow() {
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myHeight = (window.innerHeight > document.body.scrollHeight) ? window.innerHeight : document.body.scrollHeight;
  } else if( document.documentElement && (document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && (document.body.clientHeight ) ) {
    //IE 4 compatible
    myHeight = document.body.clientHeight;
  }
	$("#home").css({height:(myHeight-10) + "px"});
}

function skippa(url) {
	$("#flash").fadeOut("slow",function(){
		$(this).empty();
		$("#home").animate({opacity:0},3000,function(){
			location.href = url;
		});
	});
}

$(document).ready(function(){
	altezzaWindow();
	$("a#salta, a#skip").click(function(){
		skippa($(this).attr("href"));
		return false;
	});
});

window.onresize = function(){altezzaWindow();};