(function($){
	$.fn.zoomBaby = function(inpwidth, inpheight){
		if (inpwidth === undefined ) {inpwidth = '440';}
		if (inpheight === undefined ) {inpheight = '440';}
		
		var element = this;
    	var fullWidth = inpwidth;
    	var fullHeight = inpheight;

		zoomSetup();  
		function zoomSetup(){  
			$(element).each(function(){
				var zoomContainer = $('<div class="zoomContainer"></div>');
				var zoomImage = $('<img src="' + $(this).find('img').attr('alt') + '" class="zoomImage"/>');
				$(this).css({
					position: 'relative',
					width: fullWidth,
					height: fullHeight,
					overflow: 'hidden'	
				});
				zoomContainer.css({
					position: 'absolute',
					top: 0,
					left: 0,
					display: 'none'
				});
				zoomContainer.append(zoomImage);
				$(this).append(zoomContainer);
			});
		};
		
		$(this).hover(function(){
			$(this).find('.artworkzoom').fadeOut();
			$(this).find('.zoomContainer').fadeIn();
		}, function(){
			$(this).find('.artworkzoom').fadeIn();
			$(this).find('.zoomContainer').fadeOut();
		});
		
		//seems a bit bone but it works. this file is for just one number change for the width. Dont ever do this again.
    	// - Raj Parmer Feb 2010
		
		$(this).mousemove(function(e) {
			var offset = $(this).offset();
			var x = e.pageX - offset.left;
			var y = e.pageY - offset.top;
			var $zoomImage = $(this).find('.zoomImage');
			var $zoomer = $(this).find('.zoomContainer');
			$zoomer.css({
				left: (fullWidth - $zoomImage.width()) * ((x) / fullWidth) + "px",
				top: (fullHeight - $zoomImage.height()) * ((y) / fullHeight) + "px"
			});
		})	
	};
})(jQuery);
