$(document).ready(function() {
	$("#navigation li ul").hide();
	
	$("#navigation li").hover(function() {
		$(this).children('ul').fadeIn('fast');
	});
	
	$("#navigation li").mouseleave(function() {
		$(this).children('ul').fadeOut('fast');
	});
	
	/*** ANIMAZIONI EFFETTO BOUNCE IMMAGINI HOME ***/
	$(".donna-agenzia img").mouseenter(function() {
		$(this).animate({width: '95%', height: '95%'}, 1200, 'easeOutBack');
		$(".donna-agenzia > div").animate({top: '-=12px', left: '+=2px'}, 1200, 'easeOutBack');
	});
	
	$(".donna-agenzia img").mouseout(function() {
		$(this).animate({width: '100%', height: '100%'}, 700, 'easeOutBack');
		$(".donna-agenzia > div").animate({top: '+=12px', left: '-=2px'}, 700, 'easeOutBack');
	});
	
	$(".radar-dove img").mouseenter(function() {
		$(this).animate({marginTop: '+=5px', width: '95%', height: '95%'}, 1200, 'easeOutBack');
		$(".radar-dove > div").animate({top: '-=7px', left: '+=3px'}, 1200, 'easeOutBack');
	});
	
	$(".radar-dove img").mouseout(function() {
		$(this).animate({marginTop: '-=5px', width: '100%', height: '100%'}, 700, 'easeOutBack');
		$(".radar-dove > div").animate({top: '+=7px', left: '-=3px'}, 700, 'easeOutBack');
	});
	
	$(".team-team img").mouseenter(function() {
		$(this).animate({width: '95%', height: '95%'}, 1200, 'easeOutBack');
		$(".team-team > div").animate({top: '-=2px'}, 1200, 'easeOutBack');
	});
	
	$(".team-team img").mouseout(function() {
		$(this).animate({width: '100%', height: '100%'}, 700, 'easeOutBack');
		$(".team-team > div").animate({top: '+=2px'}, 700, 'easeOutBack');
	});
	
	$(".citta-lavora img").mouseenter(function() {
		$(this).animate({marginTop: '+=6px', width: '95%', height: '95%'}, 1200, 'easeOutBack');
		$(".citta-lavora > div").animate({bottom: '-=4px', right: '+=3px'}, 1200, 'easeOutBack'); 
	});
	
	$(".citta-lavora img").mouseout(function() {
		$(this).animate({marginTop: '-=6px', width: '100%', height: '100%'}, 700, 'easeOutBack');
		$(".citta-lavora > div").animate({bottom: '+=4px', right: '-=3px'}, 700, 'easeOutBack'); 
	});
	
	$(".foro-intervento img").mouseenter(function() {
		$(this).animate({width: '95%', height: '95%'}, 1200, 'easeOutBack');
		$(".foro-intervento > div").animate({bottom: '+=12px'}, 1200, 'easeOutBack');
	});
	
	$(".foro-intervento img").mouseout(function() {
		$(this).animate({width: '100%', height: '100%'}, 700, 'easeOutBack');
		$(".foro-intervento > div").animate({bottom: '-=12px'}, 700, 'easeOutBack');
	});
	
	$(".fatt-struttura img").mouseenter(function() {
		$(this).animate({marginLeft: '+=3px', width: '95%', height: '95%'}, 1200, 'easeOutBack');
		$(".fatt-struttura > div").animate({bottom: '+=7px', left: '+=9px'}, 1200, 'easeOutBack');
	});
	
	$(".fatt-struttura img").mouseout(function() {
		$(this).animate({marginLeft: '-=3px', width: '100%', height: '100%'}, 700, 'easeOutBack');
		$(".fatt-struttura > div").animate({bottom: '-=7px', left: '-=9px'}, 700, 'easeOutBack');
	});
	
	$(".castello-outdoor img").mouseenter(function() {
		$(this).animate({marginTop: '+=3px', width: '95%', height: '95%'}, 1200, 'easeOutBack');
		$(".castello-outdoor > div").animate({top: '-=6px', left: '+=6px'}, 1200, 'easeOutBack');
	});
	
	$(".castello-outdoor img").mouseout(function() {
		$(this).animate({marginTop: '-=3px', width: '100%', height: '100%'}, 700, 'easeOutBack');
		$(".castello-outdoor > div").animate({top: '+=6px', left: '-=6px'}, 700, 'easeOutBack');
	});
	/*** ANIMAZIONI EFFETTO BOUNCE IMMAGINI HOME ***/
});
