// Funzioni BIM by Pirolab

$(document).ready(function(){
						   
// FUNZIONI HOMEPAGE	

$("#intro").css("opacity", 0);
$("#content_home ul").css("opacity", 0);
$("#content_home ul").css("display", "none")
$("#intro").css("display", "block")
$(window).load(function () {
$("#intro").fadeTo(1500, 1)
$("#intro").fadeTo(500, 0)	
$("#intro").queue(function () {
$("#content_home ul").css('visibility','visible').fadeTo(1000, 1)
$("#intro").css("display", "none")
$("#content_home ul").css("display", "block")
$("#intro").dequeue();
});

$("#content_home img").fadeTo("slow", 1.0);
$("#content_home img").hover(function(){
$(this).fadeTo("slow", 0.7);
},function(){
$(this).fadeTo("slow", 1.0);
});
});

// FUNZIONI MENU COLONNA SX

$("ul#menu_sx li ul").hide(); 

$("ul#menu_sx>li>a").click(function() {

$(this).addClass("current");

var $subnav = $(this).next();

if($subnav.is(":visible")) {

$subnav.animate({height: "toggle"}, 500).prev().removeClass("current");

}

if(!$subnav.is(":visible")) {

$("ul#menu_sx li ul:visible").animate({height: "toggle"}, 500).prev().removeClass("current");

$subnav.animate({height: "toggle"}, 500);

}

return false;

});

});