").addClass("abigimage-bottom").appendTo(u),B=v[0];a.fn.abigimage=function(b){var d=new c(this,b);return this._abigimage=d,r=d,this.each(function(b){a(this).unbind("click.abigimage").bind("click.abigimage",function(a){f(a),d.open(b)})})},a.fn.abigimage.defaults={fadeIn:"fast",fadeOut:"fast",slideWidth:.4,slideVelocity:.4,zoomMin:1.5,zoomMax:5,doubleTapInterval:400,prevBtnHtml:"←",closeBtnHtml:"x",keyNext:[13,32,39,40],keyPrev:[8,37,38],keyClose:[27,35,36],onopen:null,onclose:null},a.abigimage={overlay:t,layout:u,prevBtnBox:w,prevBtn:y,closeBtnBox:x,closeBtn:z,box:v,bottom:A,open:function(a,b,c){(c&&c._abigimage||s||r).open(a,b)},close:function(a){(a&&a._abigimage||s||r).close()},next:function(a){(a&&a._abigimage||s||r).next()},prev:function(a){(a&&a._abigimage||s||r).prev()},unbind:function(a){(a&&a._abigimage||s||r).unbind()}},w.click(function(a){f(a),s&&s.prev()}).hover(function(){y.addClass("abigimage-prevBtn-hover")},function(){y.removeClass("abigimage-prevBtn-hover")}),x.click(function(a){f(a),s&&s.close()}).hover(function(){z.addClass("abigimage-closeBtn-hover")},function(){z.removeClass("abigimage-closeBtn-hover")}),y.click(function(a){f(a),s&&s.prev()}),z.click(function(a){f(a),s&&s.close()}),u.on("touchmove",f).on("wheel",f),B.addEventListener&&(b(B,"touchstart",g),b(B,"touchmove",h),b(B,"touchend",i),b(B,"touchcancel",i),b(B,"webkitTransitionEnd",q),b(B,"mozTransitionEnd",q),b(B,"msTransitionEnd",q),b(B,"oTransitionEnd",q),b(B,"transitionend",q)),c.prototype.open=function(b,c){s=this;var g;if("number"==typeof b){if(c=b,c==this.index||0>c||c>this.elements.length-1)return;g=a(this.elements[c]),b=g.data("href")||g.attr("href")}else if("number"!=typeof c)c=this.index;else if(c==this.index)return;this.index=c,this.prevBtn.html(this.prevBtnHtml),this.closeBtn.html(this.closeBtnHtml),this.bottom.html(""),a("img",this.box).remove(),this.box.removeClass("abigimage-box-zoom"),p(0,0,1),this.img=d("abigimage-img",b).click(function(a){f(a),s&&s.next()});var h=a(this.elements[this.nextIndex()]);this.imgNext=d("abigimage-imgNext",h.data("href")||h.attr("href"));var i=a(this.elements[this.prevIndex()]);this.imgPrev=d("abigimage-imgPrev",i.data("href")||i.attr("href")),t.fadeIn(),u.fadeIn(),a(document).unbind("keydown",e).bind("keydown",e),this.onopen&&this.onopen.call(this,g)},c.prototype.next=function(){this.distance==this.elements.length-1?this.close():(++this.distance,this.elements[this.nextIndex()].click())},c.prototype.prev=function(){this.distance==1-this.elements.length?this.close():(--this.distance,this.elements[this.prevIndex()].click())},c.prototype.close=function(){s&&(a(document).unbind("keydown",e),t.fadeOut(this.fadeOut),u.fadeOut(this.fadeOut,q),this.onclose&&this.onclose.call(this),this.index=-1,this.distance=0,s=null)},c.prototype.unbind=function(){this.close(),this.elements.each(function(){a(this).unbind("click.abigimage")})},c.prototype.key=function(a){-1!=this.keyNext.indexOf(a)?this.next():-1!=this.keyPrev.indexOf(a)?this.prev():-1!=this.keyClose.indexOf(a)&&this.close()},c.prototype.nextIndex=function(){var a=this.index+1;return a>=this.elements.length&&(a=0),a},c.prototype.prevIndex=function(){var a=this.index-1;return 0>a&&(a=this.elements.length-1),a};var C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W=B.style}(jQuery);
\ No newline at end of file
+/*! abigimage v2.0.1 (2016-06-07) */
+!function(a){function b(a,b,c){a.addEventListener(b,c)}function c(b,c){a.extend(this,a.fn.abigimage.defaults,c),this.elements=b,this.overlay=v,this.layout=w,this.prevBtnBox=y,this.prevBtn=A,this.closeBtnBox=z,this.closeBtn=B,this.box=x,this.bottom=C,this.index=-1,this.distance=0}function d(b,c){return a("
").addClass(b).attr("src",c).appendTo(x)}function e(a){u&&u.key(a.which)&&f(a)}function f(a){a.preventDefault(),a.stopPropagation()}function g(a){u&&(a.touches.length>1?(L=k(a),u.box.addClass("abigimage-box-zoom")):(Z=null,U=V,V=(new Date).getTime(),W=.34*x.width(),X=x.height(),Y=u.slideWidth*W,l()),F=I,G=J,H=K,M=0,N=0,$=a.touches,f(a))}function h(a){if(u){if(a.touches.length>1&&(K=H*(k(a)/L),1>K&&(K=.333*K*K*K+.666)),M=(Q-j($,"X"))/H-(Q-j(a.touches,"X"))/K,N=(R-j($,"Y"))/H-(R-j(a.touches,"Y"))/K,I=F+M,J=G+N,K<=u.zoomMin&&a.touches.length<=1){if(null===Z){var b=Math.abs(N)-Math.abs(M);Math.abs(b)>2&&(Z=b>0)}Z?I=0:J=0}q(I,J,K),f(a)}}function i(a){if(u){var b=(new Date).getTime(),c=b-V;if(a.touches.length)F=I,G=J,H=K,M=0,N=0,$=a.touches;else if(K<=u.zoomMin)if(1>=c||M>=-1&&1>=M&&N>=-1&&1>=N)if(V-U<=u.doubleTapInterval){K=u.zoomMax;var d=j($,"X"),e=j($,"Y");I+=(Q-d)/H-(Q-d)/K,J+=(R-e)/H-(R-e)/K,S=O-Q/K,T=P-R/K,I=0>=S?0:Math.max(-S,Math.min(S,I)),J=0>=T?0:Math.max(-T,Math.min(T,J)),u.box.addClass("abigimage-box-zoom"),q(I,J,K,!0)}else q(0,0,1,!0);else if(Z){var g=Math.abs(N);g>Y?p():g/c>u.slideVelocity?p():o()}else-Y>M?m():M>Y?n():Math.abs(M)/c>u.slideVelocity?0>M?m():n():o();else b-U<=u.doubleTapInterval?o():(K=Math.max(1,Math.min(u.zoomMax,K)),S=O-Q/K,T=P-R/K,I=0>=S?0:Math.max(-S,Math.min(S,I)),J=0>=T?0:Math.max(-T,Math.min(T,J)),q(I,J,K,!0));$=a.touches,f(a)}}function j(a,b){for(var c=0,d=0,e=a.length;e>d;d++)c+=a[d]["client"+b];return c/e}function k(a){return Math.sqrt(Math.pow(a.touches[0].pageX-a.touches[1].pageX,2)+Math.pow(a.touches[0].pageY-a.touches[1].pageY,2))}function l(){O=u.img.width()/2,P=u.img.height()/2,Q=E.width()/2,R=E.height()/2}function m(){q(-W,0,1,!0,function(){u.next()})}function n(){q(W,0,1,!0,function(){u.prev()})}function o(){u.box.removeClass("abigimage-box-zoom"),q(0,0,1,!0)}function p(){o(),u.close()}function q(a,b,c,d,e){I=a,J=b,K=c,_=d,aa=e;var f="scale("+K+") translate3d("+I+"px, "+J+"px, 0)";ba.transition=d?"all .2s ease-out":"",ba.webkitTransform=f,ba.mozTransform=f,ba.msTransform=f,ba.oTransform=f,ba.transform=f}function r(){if(_=!1,aa){var a=aa;aa=null,a()}}function s(a){u&&(l(),a.deltaY>0?K/=u.zoomScrollMultiplier:a.deltaY<0&&(K*=u.zoomScrollMultiplier),K=Math.max(1,Math.min(u.zoomMax,K)),I=0,J=0,S=O-Q/K,T=P-R/K,S>0&&(I=(Q-a.clientX)/(u.zoomMoveViewport*Q/O)-(Q-a.clientX)/K,I=Math.max(-S,Math.min(S,I))),T>0&&(J=(R-a.clientY)/(u.zoomMoveViewport*R/P)-(R-a.clientY)/K,J=Math.max(-T,Math.min(T,J))),q(I,J,K,!0),f(a))}var t,u,v=a("
").addClass("abigimage-overlay").appendTo("body").hide(),w=a("
").addClass("abigimage-layout").appendTo("body").hide(),x=a("
").addClass("abigimage-box").appendTo(w),y=a("
").addClass("abigimage-prevBtnBox").appendTo(x),z=a("
").addClass("abigimage-closeBtnBox").appendTo(x),A=a("
").addClass("abigimage-prevBtn").appendTo(w),B=a("
").addClass("abigimage-closeBtn").appendTo(w),C=a("
").addClass("abigimage-bottom").appendTo(w),D=x[0],E=a(window);a.fn.abigimage=function(b){var d=new c(this,b);return this._abigimage=d,t=d,this.each(function(b){a(this).unbind("click.abigimage").bind("click.abigimage",function(a){f(a),d.open(b)})})},a.fn.abigimage.defaults={fadeIn:"fast",fadeOut:"fast",slideWidth:.4,slideVelocity:.4,zoomMin:1.5,zoomMax:5,zoomScrollMultiplier:1.25,zoomMoveViewport:.9,doubleTapInterval:400,prevBtnHtml:"←",closeBtnHtml:"x",keyNext:[13,32,39,40],keyPrev:[8,37,38],keyClose:[27,35,36],onopen:null,onclose:null},a.abigimage={overlay:v,layout:w,prevBtnBox:y,prevBtn:A,closeBtnBox:z,closeBtn:B,box:x,bottom:C,open:function(a,b,c){(c&&c._abigimage||u||t).open(a,b)},close:function(a){(a&&a._abigimage||u||t).close()},next:function(a){(a&&a._abigimage||u||t).next()},prev:function(a){(a&&a._abigimage||u||t).prev()},unbind:function(a){(a&&a._abigimage||u||t).unbind()}},y.click(function(a){f(a),u&&u.prev()}).hover(function(){A.addClass("abigimage-prevBtn-hover")},function(){A.removeClass("abigimage-prevBtn-hover")}),z.click(function(a){f(a),u&&u.close()}).hover(function(){B.addClass("abigimage-closeBtn-hover")},function(){B.removeClass("abigimage-closeBtn-hover")}),A.click(function(a){f(a),u&&u.prev()}),B.click(function(a){f(a),u&&u.close()}),w.on("touchmove",f).on("wheel",f),D.addEventListener&&(b(D,"touchstart",g),b(D,"touchmove",h),b(D,"touchend",i),b(D,"touchcancel",i),b(D,"webkitTransitionEnd",r),b(D,"mozTransitionEnd",r),b(D,"msTransitionEnd",r),b(D,"oTransitionEnd",r),b(D,"transitionend",r),b(D,"wheel",s),b(D,"mousemove",s)),c.prototype.open=function(b,c){u=this;var g;if("number"==typeof b){if(c=b,c==this.index||0>c||c>this.elements.length-1)return;g=a(this.elements[c]),b=g.data("href")||g.attr("href")}else if("number"!=typeof c)c=this.index;else if(c==this.index)return;this.index=c,this.prevBtn.html(this.prevBtnHtml),this.closeBtn.html(this.closeBtnHtml),this.bottom.html(""),a("img",this.box).remove(),this.box.removeClass("abigimage-box-zoom"),q(0,0,1),this.img=d("abigimage-img",b).click(function(a){f(a),u&&u.next()});var h=a(this.elements[this.nextIndex()]);this.imgNext=d("abigimage-imgNext",h.data("href")||h.attr("href"));var i=a(this.elements[this.prevIndex()]);this.imgPrev=d("abigimage-imgPrev",i.data("href")||i.attr("href")),v.fadeIn(),w.fadeIn(),a(document).unbind("keydown",e).bind("keydown",e),this.onopen&&this.onopen.call(this,g)},c.prototype.next=function(){this.distance==this.elements.length-1?this.close():(++this.distance,this.elements[this.nextIndex()].click())},c.prototype.prev=function(){this.distance==1-this.elements.length?this.close():(--this.distance,this.elements[this.prevIndex()].click())},c.prototype.close=function(){u&&(a(document).unbind("keydown",e),v.fadeOut(this.fadeOut),w.fadeOut(this.fadeOut,r),this.onclose&&this.onclose.call(this),this.index=-1,this.distance=0,u=null)},c.prototype.unbind=function(){this.close(),this.elements.each(function(){a(this).unbind("click.abigimage")})},c.prototype.key=function(a){if(-1!=this.keyNext.indexOf(a))this.next();else if(-1!=this.keyPrev.indexOf(a))this.prev();else{if(-1==this.keyClose.indexOf(a))return!1;this.close()}return!0},c.prototype.nextIndex=function(){var a=this.index+1;return a>=this.elements.length&&(a=0),a},c.prototype.prevIndex=function(){var a=this.index-1;return 0>a&&(a=this.elements.length-1),a};var F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ba=D.style}(jQuery);
\ No newline at end of file
diff --git a/index.html b/index.html
index 64e6c25..553a968 100644
--- a/index.html
+++ b/index.html
@@ -111,7 +111,7 @@
ABigImage
ABigImage
is jQuery plugin for viewing big versions of images.
-
Current version 2.0.0 (2016-02-14).
+
Current version 2.0.1 (2016-06-07).
Features
@@ -153,7 +153,7 @@
Example
Live example, where I'm using and testing this plugin at the moment: kawaiinyan.com .
-
+
-
+