(function($)
{
	$.fn.zoom = function()
	{
		return this.each(function()
		{
			var el, w, h, t, l;
			el = $(this);
			w = el.outerWidth();
			h = el.outerHeight();
			t = el.position().top;
			l = el.position().left;
			el = el.clone().insertAfter(el.css('visibility', 'hidden'));
			el.css(
			{
				'position': 'absolute',
				'top': t+'px',
				'left': l+'px'
			});
			el.hover(function()
			{
				$(this).css('z-index', 2).animate(
				{
					'width': (w*2)+'px',
					'height': (h*2)+'px',
					'top': '-='+parseInt(h/2),
					'left': '-='+parseInt(w/2)
				}, 'fast');
			},
			function()
			{
				$(this).animate(
				{
					'width': w+'px',
					'height': h+'px',
					'top': '+='+parseInt(h/2),
					'left': '+='+parseInt(w/2)
				}, 'fast', null, function() {$(this).css('z-index', 1);});
			});
		});
	};
}(jQuery));
