// jQuery fade effect : lucasweb.it

$(document).ready(function () {
	
	// transition effect
	style = 'easeOutQuart';

	// if the mouse hover the image
	$('.ultimissime-photo').hover(
		function() {
			//display heading and caption
			//$(this).children('div:first').stop(false,true).animate({top:0},{duration:200, easing: style});
			$(this).children('div:last').stop(false,true).animate({bottom:0},{duration:200, easing: style});
		},

		function() {
			//hide heading and caption
			//$(this).children('div:first').stop(false,true).animate({top:-50},{duration:200, easing: style});
			$(this).children('div:last').stop(false,true).animate({bottom:-110},{duration:200, easing: style});
		}
	);
	
	$('.evidenza-photo').hover(
		function() {
			//display heading and caption
			//$(this).children('div:first').stop(false,true).animate({top:0},{duration:200, easing: style});
			$(this).children('div:last').stop(false,true).animate({bottom:0},{duration:200, easing: style});
		},

		function() {
			//hide heading and caption
			//$(this).children('div:first').stop(false,true).animate({top:-50},{duration:200, easing: style});
			$(this).children('div:last').stop(false,true).animate({bottom:-110},{duration:200, easing: style});
		}
	);
	
	$('.news-photo').hover(
		function() {
			//display heading and caption
			//$(this).children('div:first').stop(false,true).animate({top:0},{duration:200, easing: style});
			$(this).children('div:last').stop(false,true).animate({bottom:0},{duration:200, easing: style});
		},

		function() {
			//hide heading and caption
			//$(this).children('div:first').stop(false,true).animate({top:-50},{duration:200, easing: style});
			$(this).children('div:last').stop(false,true).animate({bottom:-110},{duration:200, easing: style});
		}
	);
});

