// JavaScript Document

$(document).ready(function() {
	$(".fade").css("opacity","1.0");
	
	$(".box_sezione").mouseover(function () {
		$(this).find(".fade").stop().animate({ opacity: 0.6 }, 400);
	});
		
	$(".box_sezione").mouseleave(function () {
		$(this).find(".fade").stop().animate({ opacity: 1.0 }, "slow");
	});
	
	/* FUNZIONE TOGGLE AREA RISERVATA */
	
	$(".pul_areariservata").click(function() {
		$("#log").toggle();
	});
	
	/* FUNZIONE FADING MENU */
	
	$("#menu a.col1").hover(function() {
		$(this).stop().animate({ color: "#FFE67B" }, 400);
	},function() {
		$(this).stop().animate({ color: "#FFFFFF" }, 400);
	});
	
	$("#menu a.col2").hover(function() {
		$(this).stop().animate({ color: "#FEA101" }, 400);
	},function() {
		$(this).stop().animate({ color: "#FFFFFF" }, 400);
	});
	
	$("#menu a.col3").hover(function() {
		$(this).stop().animate({ color: "#B2BF04" }, 400);
	},function() {
		$(this).stop().animate({ color: "#FFFFFF" }, 400);
	});
	
	$("#menu a.col4").hover(function() {
		$(this).stop().animate({ color: "#E42375" }, 400);
	},function() {
		$(this).stop().animate({ color: "#FFFFFF" }, 400);
	});
	
	$("#menu a.col5").hover(function() {
		$(this).stop().animate({ color: "#019CDF" }, 400);
	},function() {
		$(this).stop().animate({ color: "#FFFFFF" }, 400);
	});
	
	$("#menu a.col6").hover(function() {
		$(this).stop().animate({ color: "#E03E12" }, 400);
	},function() {
		$(this).stop().animate({ color: "#FFFFFF" }, 400);
	});
	
	$("#menu a.col7").hover(function() {
		$(this).stop().animate({ color: "#FCCE30" }, 400);
	},function() {
		$(this).stop().animate({ color: "#FFFFFF" }, 400);
	});
	
	$(".box_news_progetti").hover(function() {
		$(this).find("h5").css({ background: "#AA64AD" });
		$(this).find("h5").css({ color: "#FFFFFF" });
		// $j(this).find("p.citta").css({ textDecoration: "underline" }, 600);
	},function() {
		$(this).find("h5").css({ background: "none" });
		$(this).find("h5").css({ color: "#AA64AD" });
			// $j(this).find("p.citta").css({ textDecoration: "none" }, 400);
	});
		
	$(".box_news_cooperativa").hover(function() {
		$(this).find("h5").css({ background: "#00768C" });
		$(this).find("h5").css({ color: "#FFFFFF" });
			// $j(this).find("p.citta").css({ textDecoration: "underline" }, 600);
	},function() {
		$(this).find("h5").css({ background: "none" });
		$(this).find("h5").css({ color: "#00768C" });
		// $j(this).find("p.citta").css({ textDecoration: "none" }, 400);
	});
	
});
