(function($){
       $.fn.nuvuzoom = function( options ) {options = $.extend({magnifier : 2,outSpeed: 2000,easing: 'swing',grow: 'true',growPercent: 1.5,growSpeed: 2000,}, options);
return this.each(function() {var $this = $(this);var o = $.metadata ? $.extend({}, options, $this.metadata()) : options;var dh = $this.height();var dw = $this.width();var origl = $this.find('img').position().left;
var origt = $this.find('img').position().top;$this.hover(function(e){if(o.grow === 'true') {$(this).stop().animate({'height' : (dh*o.growPercent), 'width' : (dw*o.growPercent)},{duration: o.growSpeed, easing: o.easing, queue: 'false'});}
var cx =  $(this).outerWidth();var cy =  $(this).outerHeight();if(o.grow === 'true') {$(this).find('img').stop().css({'height' : ((cy*o.growPercent) * (o.magnifier + 1)), 'width' : ((cx*o.growPercent) * (o.magnifier + 1))});}
else {$(this).find('img').stop().css({'height' : (cy * (o.magnifier + 1)), 'width' : (cx * (o.magnifier + 1))});};$(this).mousemove(function(e){var x =   e.pageX - $(this).offset().left;var y = e.pageY - $(this).offset().top;
var xRate = Math.round((x/cx)* 100)/100;var yRate = Math.round((y/cy)* 100)/100;$(this).find('img').css ({'left' : (cx/cx) - (x*o.magnifier) },{duration : 1});$(this).find('img').css({'top' : (cy/cy) - (y*o.magnifier)},{duration : 1});});}, function(){
$(this).find('img').stop().animate({'height' : dh, 'width' : dw, 'left' : origl, 'top' : origt},{duration : o.outSpeed, easing: o.easing});
if(o.grow === 'true') { $(this).stop().animate({'height' : dh, 'width' : dw},{duration: o.outSpeed, easing: o.easing, queue: 'false'}); };});});};})(jQuery)

