// JavaScript Document

$(document).ready(function() {

	var move = -15;
	var zoom = 1.1;

	// item1
	$('.item1').hover(function() {
		
		width = $('.item1').width() * zoom;
		height = $('.item1').height() * zoom;
	
		$(this).find('img').stop(false,true).animate({'width':width, 'height':height, 'top':move, 'left':move}, {duration:300});
		$(this).find('div.caption1').stop(false,true).fadeIn(300);
	},
	function() {

		$(this).find('img').stop(false,true).animate({'width':$('.item1').width(), 'height':$('.item1').height(), 'top':'0', 'left':'0'}, {duration:300});	
		$(this).find('div.caption1').stop(false,true).fadeOut(400);
	});
	
	
	// item2
	$('.item2').hover(function() {
		
		width = $('.item2').width() * zoom;
		height = $('.item2').height() * zoom;
	
		$(this).find('img').stop(false,true).animate({'width':width, 'height':height, 'top':move, 'left':move}, {duration:300});
		$(this).find('div.caption2').stop(false,true).fadeIn(300);
	},
	function() {

		$(this).find('img').stop(false,true).animate({'width':$('.item2').width(), 'height':$('.item2').height(), 'top':'0', 'left':'0'}, {duration:300});	
		$(this).find('div.caption2').stop(false,true).fadeOut(400);
	});
	
	
	// item3
	$('.item3').hover(function() {
		
		width = $('.item3').width() * zoom;
		height = $('.item3').height() * zoom;
	
		$(this).find('img').stop(false,true).animate({'width':width, 'height':height, 'top':move, 'left':move}, {duration:300});
		$(this).find('div.caption3').stop(false,true).fadeIn(300);
	},
	function() {

		$(this).find('img').stop(false,true).animate({'width':$('.item3').width(), 'height':$('.item3').height(), 'top':'0', 'left':'0'}, {duration:300});	
		$(this).find('div.caption3').stop(false,true).fadeOut(400);
	});
	
	
	// item4
	$('.item4').hover(function() {
		
		width = $('.item4').width() * zoom;
		height = $('.item4').height() * zoom;
	
		$(this).find('img').stop(false,true).animate({'width':width, 'height':height, 'top':move, 'left':move}, {duration:300});
		$(this).find('div.caption4').stop(false,true).fadeIn(300);
	},
	function() {

		$(this).find('img').stop(false,true).animate({'width':$('.item4').width(), 'height':$('.item4').height(), 'top':'0', 'left':'0'}, {duration:300});	
		$(this).find('div.caption4').stop(false,true).fadeOut(400);
	});
	
	
	// item5
	$('.item5').hover(function() {
		
		width = $('.item5').width() * zoom;
		height = $('.item5').height() * zoom;
	
		$(this).find('img').stop(false,true).animate({'width':width, 'height':height, 'top':move, 'left':move}, {duration:300});
		$(this).find('div.caption5').stop(false,true).fadeIn(300);
	},
	function() {

		$(this).find('img').stop(false,true).animate({'width':$('.item5').width(), 'height':$('.item5').height(), 'top':'0', 'left':'0'}, {duration:300});	
		$(this).find('div.caption5').stop(false,true).fadeOut(400);
	});
	
	
	// item6
	$('.item6').hover(function() {
		
		width = $('.item6').width() * zoom;
		height = $('.item6').height() * zoom;
	
		$(this).find('img').stop(false,true).animate({'width':width, 'height':height, 'top':move, 'left':move}, {duration:300});
		$(this).find('div.caption6').stop(false,true).fadeIn(300);
	},
	function() {

		$(this).find('img').stop(false,true).animate({'width':$('.item6').width(), 'height':$('.item6').height(), 'top':'0', 'left':'0'}, {duration:300});	
		$(this).find('div.caption6').stop(false,true).fadeOut(400);
	});
});
