$(function() {
    $('#list').tabs({ fxFade: true, fxSpeed: 'normal' });
});

$(document).ready(function() {
	
//	$('#galleryContainer a').lightBox({fixedNavigation:true});
	
	$('#galleryAccordion').accordion();
	
	$(".news:has(.content)").addClass("clickable").click(function () {
		$('.content', this).toggle("300");
		$('h3', this).toggleClass("open");
	});
	$("#producers li:first-child").addClass("first");
	
	$('#language').bind("mouseenter",function(){
		$(this).animate({ 
			marginRight: "0px"
		}, 150 );
	}).bind("mouseleave",function(){
		$(this).animate({ 
			marginRight: "-46px"
		}, 150 );
	});
	
	$('#archive li a').bind("mouseenter",function(){
		$(this).animate({ 
			paddingLeft: "10px",
			color: "#FFFFFF",
			backgroundColor: "#33383e"
		}, 150 );
	}).bind("mouseleave",function(){
		$(this).animate({ 
			paddingLeft: "0",
			color: "#30353b",			
			backgroundColor: "#f7f7f7"
		}, 150 );
	});
	
	$('#portfolioNav li a').bind("mouseenter",function(){
		$(this).animate({ 
			paddingLeft: "10px"
		}, 150 );
	}).bind("mouseleave",function(){
		$(this).animate({ 
			paddingLeft: "0"
		}, 150 );
	});	
	
	$('#sidebar #producers li a').bind("mouseenter",function(){
		$('img', this).animate({ 
			marginLeft: "10px",
			backgroundColor: "#33383e"
		}, 150 );
	}).bind("mouseleave",function(){
		$('img', this).animate({ 
			marginLeft: "0",
			backgroundColor: "#d4d4d4"
		}, 150 );
	});
	
	$('#footer #producers li a').bind("mouseenter",function(){
		$('img', this).animate({ 
			marginLeft: "10px",
			backgroundColor: "#ffffff"
		}, 150 );
		$(this).animate({ 
			color: "#FFFFFF"
		}, 150 );
	}).bind("mouseleave",function(){
		$('img', this).animate({ 
			marginLeft: "0",
			backgroundColor: "#74777d"
		}, 150 );
		$(this).animate({ 
			color: "#bfbfbf"
		}, 150 );
	});
	
	$('#gallery li').bind("mouseenter",function(){
		$('img', this).animate({
			backgroundColor: "#fff"
		}, 150 );
		$(this).animate({
			color: "#FFFFFF"
		}, 150 );
	}).bind("mouseleave",function(){
		$('img', this).animate({ 
			backgroundColor: "#74777d"
		}, 150 );
		$(this).animate({
			color: "#bfbfbf"
		}, 150 );
	});
		
/*
	$('#mainNav li a').simpletip({ 
	   content: $(this).attr("title"),
	   fixed: false
	});
*/

	// Newsletter
	$("#tutti").click(function () { 
		if ($(this).attr("checked")) {
			$("#utenti").attr("name","utenti");
		} else {
			$("#utenti").removeAttr("name");
		}
    });

});
