
$(document).ready(function(){

$.fn.delay = function(time, callback){
    // Empty function:
    jQuery.fx.step.delay = function(){};
    // Return meaningless animation, (will be added to queue)
    return this.animate({delay:1}, time, callback);
}

    

$("ul.thumb li"). hover(function() {
	$(this).css({'z-index' : '10'});
	$(this).find('img').addClass("hover").stop()
	.delay(600)
		.animate({
			marginTop: '-110px', 
			marginLeft: '-110px', 
			top: '50%', 
			left: '50%', 
			width: '340px', 
			height: '340px',
			padding: '20px' 
		}, 200);
	
	} 
, function() {
	$(this).css({'z-index' : '0'});
	$(this).find('img').removeClass("hover").stop()
		.animate({
			marginTop: '0', 
			marginLeft: '0',
			top: '0', 
			left: '0', 
			width: '100px', 
			height: '100px', 
			padding: '0px'
		}, 400);
});
$("ul.thumb2 li"). hover(function() {
	$(this).css({'z-index' : '10'});
	$(this).find('img').addClass("hover").stop()
	.delay(600)
		.animate({
			marginTop: '-100px', 
			marginLeft: '-90px', 
			top: '50%', 
			left: '50%', 
			width: '340px', 
			height: '340px',
			padding: '20px' 
		}, 200);
	
	} 
, function() {
	$(this).css({'z-index' : '0'});
	$(this).find('img').removeClass("hover").stop()
		.animate({
			marginTop: '0', 
			marginLeft: '0',
			top: '0', 
			left: '0', 
			width: '140px', 
			height: '140px', 
			padding: '0px'
		}, 400);
});
//Swap Image on Click

 $("ul.thumb3 li"). hover(function() {
	$(this).css({'z-index' : '10'});
	$(this).find('img').addClass("hover").stop()
	.delay(600)
		.animate({
			marginTop: '-110px', 
			marginLeft: '-110px', 
			top: '50%', 
			left: '50%', 
			width: '340px', 
			height: '340px',
			padding: '20px' 
		}, 200);
	
	} 
, function() {
	$(this).css({'z-index' : '0'});
	$(this).find('img').removeClass("hover").stop()
		.animate({
			marginTop: '0', 
			marginLeft: '0',
			top: '0', 
			left: '0', 
			width: '80px', 
			height: '80px', 
			padding: '0px'
		}, 400);
});
 $("ul.thumb3a li"). hover(function() {
	$(this).css({'z-index' : '10'});
	$(this).find('img').addClass("hover").stop()
	.delay(600)
		.animate({
			marginTop: '-110px', 
			marginLeft: '-150px', 
			top: '50%', 
			left: '50%', 
			width: '340px', 
			height: '340px',
			padding: '20px' 
		}, 200);
	
	} 
, function() {
	$(this).css({'z-index' : '0'});
	$(this).find('img').removeClass("hover").stop()
		.animate({
			marginTop: '0', 
			marginLeft: '10px',
			top: '0', 
			left: '0', 
			width: '80px', 
			height: '80px', 
			padding: '0px'
		}, 400);
});
 $("ul.thumb4 li"). hover(function() {
	$(this).css({'z-index' : '10'});
	$(this).find('img').addClass("hover").stop()
	.delay(600)
		.animate({
			marginTop: '-125px', 
			marginLeft: '-165px', 
			top: '50%', 
			left: '50%', 
			width: '340px', 
			height: '340px',
			padding: '20px' 
		}, 200);
	
	} 
, function() {
	$(this).css({'z-index' : '0'});
	$(this).find('img').removeClass("hover").stop()
		.animate({
			marginTop: '0', 
			marginLeft: '0',
			top: '0', 
			left: '0', 
			width: '131px', 
			height: '131px', 
			padding: '0px'
		}, 400);
});
});


