(function(a){a.fn.zoomi=function(){a(this).filter("img").each(function(){this.z||(a(this).zoom1().mouseover(function(){a(this).zoom2().show()}),a(this.z).mouseout(function(){a(this).hide()}))});return this};a.fn.zoom1=function(){a(this).each(function(){a(this).css({position:"relative","z-index":"8"}).after('<img class="'+this.className+'">');this.z=this.nextSibling;a(this.z).removeClass("zoomi").addClass("zoom2").attr("src",this.alt||this.src).css({position:"absolute","z-index":"10"});a(this.z).hide()});return this};a.fn.zoom2=function(){var c=[];this.each(function(){var b=this;b.z||(b=a(b).zoom1()[0]);c.push(b.z);if(b.z.complete){if(!b.z.width)a(b.z).show(),b.z.width=b.z.width,a(b.z).hide();a(b.z).css({left:a(b).offsetLeft()-(b.z.width-b.scrollWidth)/2+"px",top:a(b).offsetTop()-(b.z.height-b.scrollHeight)/2+"px"})}});return this.pushStack(c)};a.fn.offsetLeft=function(){var c=this[0];if(!c.offsetParent)return c.offsetLeft;return c.offsetLeft+a(c.offsetParent).offsetLeft()};a.fn.offsetTop=function(){var c=this[0];if(!c.offsetParent)return c.offsetTop;return c.offsetTop+a(c.offsetParent).offsetTop()};a(function(){a("img.zoomi").zoomi()})})(jQuery);
