$(window).load(function(){
	$(".navLamp").lavaLamp({
		fx: "easeOutCubic", 
		speed: 700
	});
})
$(document).ready(function($){

	
	$('#head #slideDiario .leggi-tutto').hover(function(){
		$(this).stop().animate({'color':'#fff','backgroundColor':'#6e8c13'})
	},function(){
		$(this).stop().animate({'color':'#6e8c13','backgroundColor':'#fff'})
	})
	$('#head #slideDiario .richiedi').hover(function(){
		$(this).stop().animate({'backgroundColor':'#fff'})	
	},function(){
		$(this).stop().animate({'backgroundColor':'#caf646'})	
	})
	
	$('.btGreenRoll').not('.no-linkext').each(function(){
		$(this)
		.css('cursor','pointer')
		.hover(function(){
			$(this).find('a').stop().animate({'backgroundColor':'#6e8c13'})
		},function(){
			$(this).find('a').stop().animate({'backgroundColor':'#94bd1b'})
		})
		.click(function(){
			location.href=$(this).find('a').attr('href')
		})
	})

	$('.polaroids .polaroid').each(function(){
		$(this)
			.click(function(){
				location.href=$(this).find('a').attr('href')
			})
	})

	$('.btArancioRoll').each(function(){
		$(this)
		.css('cursor','pointer')
		.hover(function(){
			$(this).stop().animate({'backgroundColor':'#C36422'})
		},function(){
			$(this).stop().animate({'backgroundColor':'#e77728'})
		})
	})


	$('.btGreenRollBt').each(function(){
		$(this)
		.css('cursor','pointer')
		.hover(function(){
			$(this).stop().animate({'backgroundColor':'#6e8c13'})
		},function(){
			$(this).stop().animate({'backgroundColor':'#94bd1b'})
		})
	})
	$('#news-navigator').sliderNews({})

	$('#foot .social li a').each(function(){
		$(this).hover(function(){
			$(this).stop().animate({'opacity':0})	
		},function(){
			$(this).stop().animate({'opacity':1})	
		})
	})
	$('#news-navigator .item')
		.linkExtender({'_targetBlank':false})
		.hover(function(){
			$(this).stop().animate({'backgroundColor':'#ffffff'})
		},function(){
			$(this).stop().animate({'backgroundColor':'#EBEAE8'})
	})
		
	$('.rollMarginSx').each(function(){
		$(this).hover(function(){
			$(this).stop().animate({'marginRight':'5px'},600,'easeOutQuint')
		},function(){
			$(this).stop().animate({'marginRight':'0'},600,'easeOutQuint')
		})
	})
	$('.rollMarginDx').each(function(){
		$(this).hover(function(){
			$(this).stop().animate({'marginLeft':'5px'},600,'easeOutQuint')
		},function(){
			$(this).stop().animate({'marginLeft':'0'},600,'easeOutQuint')
		})
	})
})
