		$(window).load(function(){
			$(".my-border, .borders").liquidCanvas("[shadow{color:rgba(100,100,100,0.2);width:3;shift:0} border{color:#cacaca; width:1} fill{color:rgb(255,255,255);}] => roundedRect{radius:10}");
			$("a.scheda").each(function(){ a = this.href.split("/"); this.href = a[a.length-1] + ".php"; });
			
			$("a.scheda").fancybox({
				'width': 700,
				'height': "100%",
				'hideOnContentClick': false,
				'callbackOnClose': function() {
				$("#fancy_content").empty();}
			});

			$("a.galleria").fancybox({
				'zoomSpeedIn': 300,
				'zoomSpeedOut': 300,
				'overlayShow': true,
				'titleShow': false
			});

			//$(".box-home a").each(function(){ this.href = "#";});
			$("div.box-home").mouseenter(function(){ $(this).find(".linkarrow").animate({width:100}, {duration: 500, easing: 'easeOutExpo'}); });
			$("div.box-home").mouseleave(function(){ $(this).find(".linkarrow").animate({width:40}, {duration: 500, easing: 'easeOutExpo'}); });

			
			if(Baseurl=="home"){
				$("html").css({"overflow":"hidden"});
				$("#head").animate({top:0}, {duration: 1500});
				setTimeout(function(){ $("#homebox01").animate({top:0}, {duration: 1500, easing: 'easeOutExpo'}); },1500);
				setTimeout(function(){ $("#homebox02").animate({top:0}, {duration: 1500, easing: 'easeOutExpo'}); },2000);
				setTimeout(function(){ $("#homebox03").animate({top:0}, {duration: 1500, easing: 'easeOutExpo'}); },2500);
				setTimeout(function(){ 
					$(".footer").css({display:"block"});$("html").css({"overflow":"auto"}); 
					//$.fancybox('<img src="/img/banner01-12.jpg" style="display:block;width:634px;height:449px;"/>',{'width':634,'height':449}); 
				},4000);
			}
			/*
			$("#homebox01").click(function(){
				var box01;
				$.ajax({url:'inc/page-agricoltura.php', success:function(data){box01 = data;}});
				$(".footer").css({"display":"none"});
				$(".homebox02").remove();
				$("#homebox02").fadeOut(1000, function(){$(this).remove();});
				setTimeout(function(){ $(".homebox03").remove(); },300);
				setTimeout(function(){ $("#homebox03").fadeOut(1000, function(){$(this).remove();}); },500);
				setTimeout(function(){ $(".homebox01").remove(); },800);
				setTimeout(function(){ $("#homebox01").fadeOut(1000, function(){$(this).remove();}); },1000);

				setTimeout(function(){
					$("#page").append(box01);
					$(".borders").liquidCanvas("[shadow{color:rgba(100,100,100,0.2);width:3;shift:0} border{color:#cacaca; width:1} fill{color:rgb(255,255,255);}] => roundedRect{radius:10}");
					$("#page-agricoltura").animate({
						top: 0}, {
						duration: 1500,
						easing: 'easeOutExpo',
						complete: function(){
							$("#submenu").animate({top:-20},{duration:500});
							$("html").css({"overflow":"auto"});
							//$.fancybox('<img src="/img/offerta-2011.jpg" style="display:block;width:700px;height:322px;"/>',{'width':700,'height':'auto'});
					}});
				},1500);
			});

			$("#homebox02").click(function(){
				var box02;
				$.ajax({url:'inc/page-giardinaggio.php', success:function(data){box02 = data;}});
				$(".footer").css({"display":"none"});
				$(".homebox01").remove();
				$("#homebox01").fadeOut(1000, function(){$(this).remove();});
				setTimeout(function(){ $(".homebox03").remove(); },300);
				setTimeout(function(){ $("#homebox03").fadeOut(1000, function(){$(this).remove();}); },500);
				setTimeout(function(){ $(".homebox02").remove(); },800);
				setTimeout(function(){ $("#homebox02").fadeOut(1000, function(){$(this).remove();}); },1000);

				setTimeout(function(){
					$("#page").append(box02);
					$(".borders").liquidCanvas("[shadow{color:rgba(100,100,100,0.2);width:3;shift:0} border{color:#cacaca; width:1} fill{color:rgb(255,255,255);}] => roundedRect{radius:10}");
					$("#page-giardinaggio").animate({
						top: 0}, {
						duration: 1500,
						easing: 'easeOutExpo',
						complete: function(){
							$("#submenu").animate({top:-20},{duration:500});
							$("html").css({"overflow":"auto"});
					}});
				},1500);
			});

			$("#homebox03").click(function(){
				var box03;
				$.ajax({url:'inc/page-industriale.php', success:function(data){box03 = data;}});
				$(".footer").css({"display":"none"});
				$(".homebox02").remove();
				$("#homebox02").fadeOut(1000, function(){$(this).remove();});
				setTimeout(function(){ $(".homebox01").remove(); },300);
				setTimeout(function(){ $("#homebox01").fadeOut(1000, function(){$(this).remove();}); },500);
				setTimeout(function(){ $(".homebox03").remove(); },800);
				setTimeout(function(){ $("#homebox03").fadeOut(1000, function(){$(this).remove();}); },1000);

				setTimeout(function(){
					$("#page").append(box03);
					$(".borders").liquidCanvas("[shadow{color:rgba(100,100,100,0.2);width:3;shift:0} border{color:#cacaca; width:1} fill{color:rgb(255,255,255);}] => roundedRect{radius:10}");
					$("#page-industriale").animate({
						top: 0}, {
						duration: 1500,
						easing: 'easeOutExpo',
						complete: function(){
							$("#submenu").animate({top:-20},{duration:500});
							$("html").css({"overflow":"auto"});
					}});
				},1500);
			});
			*/

		});

