Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

hacky fix for the back and forward buttons #66

  • Loading branch information...
commit 4694cf27b1855ee69a5ffa6a20ec0139f596b8f7 1 parent 7585ad1
@jaukia authored
View
2  index.html
@@ -42,7 +42,7 @@
<li><a href="http://github.com/jaukia/zoomooz">Fork On <strong>GitHub</strong></a></li>
</ul>
- <div id="version">Latest version: 1.1.8 (Nov 10, 2013, made scroll reset default to true to fix issues on webkit + long zooms #74)</div>
+ <div id="version">Latest version: 1.1.9 (Nov 11, 2013, hacky fix for the back and forward buttons #66)</div>
<p>Zoomooz is a jQuery plugin for making web page elements zoom. It can be used for making Prezi like slideshows and for zooming to images or other details.</p>
View
9 jquery.zoomooz.js
@@ -848,6 +848,7 @@ if(!$.zoomooz) {
* http://janne.aukia.com/zoomooz
*
* Version history:
+ * 1.1.9 hacky fix for the back and forward buttons
* 1.1.8 made scroll reset default to true to fix issues on webkit + long zooms #74
* 1.1.7 moved Sylvester Matrix to a custom namespace
* 1.1.5 zoom for scrolled pages without flickering
@@ -1772,7 +1773,7 @@ if(!$.zoomooz) {
}());
clickTarget.on("click", function(evt) {
-
+
var target;
var performZoom = true;
@@ -1806,8 +1807,10 @@ if(!$.zoomooz) {
// not this easy! would need to read the data fields
//target.zoomTo();
- // FIXME: hacky...
- target.click();
+ // FIXME: hacky, and i have truly no idea, why the timeout is needed.
+ setTimeout(function() {
+ target.click();
+ },10);
} else {
// don't do anything if no wrap
// (would be great if the button was disabled)
View
2  jquery.zoomooz.min.js
@@ -1 +1 @@
-function zmMatrix(){}zmMatrix.prototype={dup:function(){return zmMatrix.create(this.elements)},canMultiplyFromLeft:function(e){var t=e.elements||e;return t[0][0]===void 0&&(t=zmMatrix.create(t).elements),this.elements[0].length==t.length},multiply:function(e){var t=e.modulus?!0:!1,r=e.elements||e;if(r[0][0]===void 0&&(r=zmMatrix.create(r).elements),!this.canMultiplyFromLeft(r))return null;var n,o,a,i,s,l,u=this.elements.length,c=u,m=r[0].length,f=this.elements[0].length,d=[];do{n=c-u,d[n]=[],o=m;do{a=m-o,i=0,s=f;do l=f-s,i+=this.elements[n][l]*r[l][a];while(--s);d[n][a]=i}while(--o)}while(--u);return r=zmMatrix.create(d),t?r.col(1):r},isSquare:function(){return this.elements.length==this.elements[0].length},toRightTriangular:function(){var e,t,r,n,o=this.dup(),a=this.elements.length,i=a,s=this.elements[0].length;do{if(t=i-a,0===o.elements[t][t])for(j=t+1;i>j;j++)if(0!==o.elements[j][t]){e=[],r=s;do n=s-r,e.push(o.elements[t][n]+o.elements[j][n]);while(--r);o.elements[t]=e;break}if(0!==o.elements[t][t])for(j=t+1;i>j;j++){var l=o.elements[j][t]/o.elements[t][t];e=[],r=s;do n=s-r,e.push(t>=n?0:o.elements[j][n]-o.elements[t][n]*l);while(--r);o.elements[j]=e}}while(--a);return o},determinant:function(){if(!this.isSquare())return null;var e,t=this.toRightTriangular(),r=t.elements[0][0],n=t.elements.length-1,o=n;do e=o-n+1,r*=t.elements[e][e];while(--n);return r},isSingular:function(){return this.isSquare()&&0===this.determinant()},augment:function(e){var t=e.elements||e;t[0][0]===void 0&&(t=zmMatrix.create(t).elements);var r,n,o,a=this.dup(),i=a.elements[0].length,s=a.elements.length,l=s,u=t[0].length;if(s!=t.length)return null;do{r=l-s,n=u;do o=u-n,a.elements[r][i+o]=t[r][o];while(--n)}while(--s);return a},inverse:function(){if(!this.isSquare()||this.isSingular())return null;var e,t,r,n,o,a,i,s=this.elements.length,l=s,u=this.augment(zmMatrix.I(s)).toRightTriangular(),c=u.elements[0].length,m=[];do{e=s-1,o=[],r=c,m[e]=[],a=u.elements[e][e];do n=c-r,i=u.elements[e][n]/a,o.push(i),n>=l&&m[e].push(i);while(--r);for(u.elements[e]=o,t=0;e>t;t++){o=[],r=c;do n=c-r,o.push(u.elements[t][n]-u.elements[e][n]*u.elements[t][e]);while(--r);u.elements[t]=o}}while(--s);return zmMatrix.create(m)},setElements:function(e){var t,r=e.elements||e;if(r[0][0]!==void 0){var n,o,a,i=r.length,s=i;this.elements=[];do{t=s-i,n=r[t].length,o=n,this.elements[t]=[];do a=o-n,this.elements[t][a]=r[t][a];while(--n)}while(--i);return this}var l=r.length,u=l;this.elements=[];do t=u-l,this.elements.push([r[t]]);while(--l);return this}},zmMatrix.create=function(e){var t=new zmMatrix;return t.setElements(e)},zmMatrix.I=function(e){var t,r,n,o=[],a=e;do{t=a-e,o[t]=[],r=a;do n=a-r,o[t][n]=t==n?1:0;while(--r)}while(--e);return zmMatrix.create(o)},PureCSSMatrix=function(){"use strict";function e(e){e&&null!==e&&"none"!=e?e instanceof zmMatrix?this.setMatrix(e):this.setMatrixValue(e):this.m=zmMatrix.I(3)}function t(e){var t=parseFloat(r(e));return e.match(o)&&(t=2*Math.PI*t/360),t}function r(e){return e.match(a)}function n(e){return Number(e).toFixed(6)}var o=/deg$/,a=/([0-9.\-e]+)/g,i=/([a-zA-Z]+)\(([^\)]+)\)/g;return e.prototype.setMatrix=function(e){this.m=e},e.prototype.setMatrixValue=function(e){for(var n,o=zmMatrix.I(3);null!==(n=i.exec(e));){var a,s=n[1].toLowerCase(),l=n[2].split(",");if("matrix"==s)a=zmMatrix.create([[parseFloat(l[0]),parseFloat(l[2]),parseFloat(r(l[4]))],[parseFloat(l[1]),parseFloat(l[3]),parseFloat(r(l[5]))],[0,0,1]]);else if("translate"==s)a=zmMatrix.I(3),a.elements[0][2]=parseFloat(r(l[0])),a.elements[1][2]=parseFloat(r(l[1]));else if("scale"==s){var u,c=parseFloat(l[0]);u=l.length>1?parseFloat(l[1]):c,a=zmMatrix.create([[c,0,0],[0,u,0],[0,0,1]])}else"rotate"==s?a=zmMatrix.RotationZ(t(l[0])):"skew"==s||"skewx"==s?(a=zmMatrix.I(3),a.elements[0][1]=Math.tan(t(l[0]))):"skewy"==s?(a=zmMatrix.I(3),a.elements[1][0]=Math.tan(t(l[0]))):console.log("Problem with setMatrixValue",s,l);o=o.multiply(a)}this.m=o},e.prototype.multiply=function(t){return new e(this.m.multiply(t.m))},e.prototype.inverse=function(){return 1e-6>Math.abs(this.m.elements[0][0])&&(this.m.elements[0][0]=0),new e(this.m.inverse())},e.prototype.translate=function(t,r){var n=zmMatrix.I(3);return n.elements[0][2]=t,n.elements[1][2]=r,new e(this.m.multiply(n))},e.prototype.scale=function(t,r){var n=zmMatrix.create([[t,0,0],[0,r,0],[0,0,1]]);return new e(this.m.multiply(n))},e.prototype.rotate=function(t){var r=zmMatrix.RotationZ(t);return new e(this.m.multiply(r))},e.prototype.toString=function(){var e=this.m.elements,t="";return($.browser.mozilla||$.browser.opera)&&(t="px"),"matrix("+n(e[0][0])+", "+n(e[1][0])+", "+n(e[0][1])+", "+n(e[1][1])+", "+n(e[0][2])+t+", "+n(e[1][2])+t+")"},e.prototype.elements=function(){var e=this.m.elements;return{a:e[0][0],b:e[1][0],c:e[0][1],d:e[1][1],e:e[0][2],f:e[1][2]}},e}(),$.zoomooz||($.zoomooz={}),$.zoomooz.helpers=function(e,t){"use strict";var r=["-moz-","-webkit-","-o-","-ms-"];return t.forEachPrefix=function(e,t){for(var n=0;r.length>n;n++)e(r[n]);t&&e("")},t.getElementTransform=function(r){var n;return t.forEachPrefix(function(t){n=n||e(r).css(t+"transform")},!0),n},t}(jQuery,{}),function(e){"use strict";function t(e,t,r){var n={};if(b.forEachPrefix(function(t){n[t+"transform"]=e},!0),t){var o=d(t/1e3,6)+"s";if(n["-webkit-transition-duration"]=o,n["-o-transition-duration"]=o,n["-moz-transition-duration"]=o,r){var a=i(r);n["-webkit-transition-timing-function"]=a,n["-o-transition-timing-function"]=a,n["-moz-transition-timing-function"]=a}}return n}function r(e,t,r,a,i,l){t||(t=o(new PureCSSMatrix)),p=(new Date).getTime(),v&&(clearInterval(v),v=null),a.easing&&(a.easingfunction=s(a.easing,a.duration)),n(e,t,r,a,i),l&&l(),v=setInterval(function(){n(e,t,r,a,i)},1)}function n(e,r,n,o,i){var s,l=(new Date).getTime()-p;s=o.easingfunction?o.easingfunction(l/o.duration):l/o.duration,e.css(t(a(f(r,n,s)))),l>o.duration&&(clearInterval(v),v=null,s=1,i&&i())}function o(e){var t=e.elements(),r=t.a,n=t.b,o=t.c,a=t.d,i=t.e,s=t.f;if(.01>Math.abs(r*a-n*o))return console.log("fail!"),void 0;var l=i,u=s,c=Math.sqrt(r*r+n*n);r/=c,n/=c;var m=r*o+n*a;o-=r*m,a-=n*m;var f=Math.sqrt(o*o+a*a);o/=f,a/=f,m/=f,0>r*a-n*o&&(r=-r,n=-n,o=-o,a=-a,c=-c,f=-f);var d=Math.atan2(n,r);return{tx:l,ty:u,r:d,k:Math.atan(m),sx:c,sy:f}}function a(e){var t="";return t+="translate("+d(e.tx,6)+"px,"+d(e.ty,6)+"px) ",t+="rotate("+d(e.r,6)+"rad) skewX("+d(e.k,6)+"rad) ",t+="scale("+d(e.sx,6)+","+d(e.sy,6)+")"}function i(e){return e instanceof Array?"cubic-bezier("+d(e[0],6)+","+d(e[1],6)+","+d(e[2],6)+","+d(e[3],6)+")":e}function s(e,t){var r=[];if(e instanceof Array)r=e;else switch(e){case"linear":r=[0,0,1,1];break;case"ease":r=[.25,.1,.25,1];break;case"ease-in":r=[.42,0,1,1];break;case"ease-out":r=[0,0,.58,1];break;case"ease-in-out":r=[.42,0,.58,1]}var n=function(e){return l(e,r[0],r[1],r[2],r[3],t)};return n}function l(e,t,r,n,o,a){function i(e){return((f*e+d)*e+h)*e}function s(e){return((p*e+v)*e+g)*e}function l(e){return(3*f*e+2*d)*e+h}function u(e){return 1/(200*e)}function c(e,t){return s(m(e,t))}function m(e,t){function r(e){return e>=0?e:0-e}var n,o,a,s,u,c;for(a=e,c=0;8>c;c++){if(s=i(a)-e,t>r(s))return a;if(u=l(a),1e-6>r(u))break;a-=s/u}if(n=0,o=1,a=e,n>a)return n;if(a>o)return o;for(;o>n;){if(s=i(a),t>r(s-e))return a;e>s?n=a:o=a,a=.5*(o-n)+n}return a}var f=0,d=0,h=0,p=0,v=0,g=0;return h=3*t,d=3*(n-t)-h,f=1-h-d,g=3*r,v=3*(o-r)-g,p=1-g-v,c(e,u(a))}function u(e,t){var r,n=b.getElementTransform(e);r=n?new PureCSSMatrix(n):new PureCSSMatrix,t&&(r=r.translate(t.x,t.y));var a=o(r);return a.r=c(n),a}function c(e){for(var t,r=0;null!==(t=x.exec(e));){var n=t[1].toLowerCase(),a=t[2].split(",");if("matrix"==n){var i=n+"("+t[2]+")";r+=o(new PureCSSMatrix(i)).r}else if("rotate"==n){var s=a[0],l=parseFloat(h(s));s.match(y)&&(l=2*Math.PI*l/360),r+=l}}return r}function m(e,t){if(Math.abs(e.r-t.r)>Math.PI)if(t.r<e.r)for(;Math.abs(e.r-t.r)>Math.PI;)t.r+=2*Math.PI;else for(;Math.abs(e.r-t.r)>Math.PI;)t.r-=2*Math.PI;return t}function f(e,t,r){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]+(t[o]-e[o])*r);return n}function d(e,t){t=Math.abs(parseInt(t,10))||0;var r=Math.pow(10,t);return Math.round(e*r)/r}function h(e){return e.match(z)}var p,v,g,z=/([0-9.\-e]+)/g,x=/([a-z]+)\(([^\)]+)\)/g,y=/deg$/,b=e.zoomooz.helpers,w={duration:450,easing:"ease",nativeanimation:!1};jQuery.cssHooks.MsTransform={set:function(e,t){e.style.msTransform=t}},jQuery.cssHooks.MsTransformOrigin={set:function(e,t){e.style.msTransformOrigin=t}},e.fn.animateTransformation=function(n,i,s,l,c){i=jQuery.extend({},w,i),g&&(clearTimeout(g),g=null);var f=!i.nativeanimation&&i.duration>0;!f&&l&&(g=setTimeout(l,i.duration)),this.each(function(){var d=e(this);n||(n=new PureCSSMatrix);var h=u(d,s),p=m(h,o(n));f?r(d,h,p,i,l,c):(d.css(t(a(p),i.duration,i.easing)),c&&c())})},e.fn.setTransformation=function(r){this.each(function(){var n=e(this),i=u(n),s=m(i,o(r));n.css(t(a(s)))})}}(jQuery),function(e){"use strict";function t(t,r){var n=jQuery.extend({},r);e.zoomooz.defaultSettings||e.zoomooz.setup();var o,a=e.zoomooz.defaultSettings,i=jQuery.extend({},n);for(o in a)a.hasOwnProperty(o)&&!i[o]&&(i[o]=t.data(o));for(var s=0;v.length>s;s++)o=v[s],i[o]||(i[o]=t.data(o));return jQuery.extend({},a,i)}function r(){var t=document.createElement("style");t.type="text/css";var r="";p.forEachPrefix(function(e){r+=e+"transform-origin: 0 0;"},!0),t.innerHTML="html {height:100%;}.noScroll{overflow:hidden !important;}* {"+r+"}",document.getElementsByTagName("head")[0].appendChild(t),e(document).ready(function(){var r=window.innerWidth-e("body").width();t.innerHTML+="body.noScroll,html.noScroll body{margin-right:"+r+"px;}"})}function n(){var t={targetsize:.9,scalemode:"both",root:e(document.body),debug:!1,animationendcallback:null,closeclick:!1,preservescroll:!1};return t}function o(t,r){var n,o=!r.preservescroll,u=null;(function(){var e=r.root,s=e.parent();t[0]===e[0]?u=a(e,s):e.data("original-scroll")?o||(u=a(e,s)):(n=!0,u=i(e,s,o))})();var c,m=null;s(r.root);var d=null;if(t[0]!==r.root[0]){var h=f(t,r.root).inverse();o||(d=u),c=l(t,h,d,r),r.animationendcallback&&(m=function(){r.animationendcallback.call(t[0])})}else o&&(c=(new PureCSSMatrix).translate(-u.x,-u.y)),m=function(){var n=e(r.root),a=u.elem;a.removeClass("noScroll"),n.setTransformation(new PureCSSMatrix),n.data("original-scroll",null),e(document).off("touchmove"),o&&(a[0]==document.body||a[0]==window?window.scrollTo(u.x,u.y):(a.scrollLeft(u.x),a.scrollTop(u.y))),r.animationendcallback&&r.animationendcallback.call(t[0])};var p=null;o&&u&&u.animationstartedcallback&&(p=u.animationstartedcallback),n||(d=!1),e(r.root).animateTransformation(c,r,d,m,p)}function a(e,t){var r=e.data("original-scroll");return r||(r={elem:t,x:0,"y:":0}),r}function i(t,r,n){var o=t.scrollTop(),a=t.scrollLeft(),i=t;o||(o=r.scrollTop(),a=r.scrollLeft(),i=r);var s={elem:i,x:a,y:o};t.data("original-scroll",s),e(document).on("touchmove",function(e){e.preventDefault()});var l="translate(-"+a+"px,-"+o+"px)";return p.forEachPrefix(function(e){t.css(e+"transform",l)}),i.addClass("noScroll"),n&&(s.animationstartedcallback=function(){i[0]==document.body||i[0]==document?window.scrollTo(0,0):(i.scrollLeft(0),i.scrollTop(0))}),s}function s(t){var r=e(t).parent(),n=r.width(),o=r.height(),a=n/2,i=o/2,s=d(a)+"px "+d(i)+"px";p.forEachPrefix(function(e){t.css(e+"transform-origin",s)})}function l(t,r,n,o){var a,i=o.targetsize,s=o.scalemode,l=o.root,u=e(l).parent(),c=u.width(),m=u.height(),f=c/t.outerWidth(),d=m/t.outerHeight();if("width"==s)a=i*f;else if("height"==s)a=i*d;else if("both"==s)a=i*Math.min(f,d);else{if("scale"!=s)return console.log("wrong zoommode"),void 0;a=i}var h=(c-t.outerWidth()*a)/2,p=(m-t.outerHeight()*a)/2,v=c/2,g=m/2,z=-parseFloat(l.css("margin-left"))||0,x=-parseFloat(l.css("margin-top"))||0,y=new PureCSSMatrix;n&&(y=y.translate(n.x,n.y));var b=y.translate(z,x).translate(-v,-g).translate(h,p).scale(a,a).multiply(r).translate(v,g);return b}function u(e,t,r){return[e.a*t+e.c*r+e.e,e.b*t+e.d*r+e.f]}function c(e,t){var r=f(e,t.root).elements();m(u(r,0,0)),m(u(r,0,e.outerHeight())),m(u(r,e.outerWidth(),e.outerHeight())),m(u(r,e.outerWidth(),0))}function m(t){var r="width:4px;height:4px;background-color:red;position:absolute;margin-left:-2px;margin-top:-2px;";r+="left:"+t[0]+"px;top:"+t[1]+"px;";var n='<div class="debuglabel" style="'+r+'"></div>';e("#debug").append(n)}function f(t,r){var n=t[0];if(!n||!n.ownerDocument)return null;var o,a=new PureCSSMatrix;if(n===n.ownerDocument.body){var i;return i=jQuery.offset.bodyOffset?jQuery.offset.bodyOffset(n):jQuery.fn.offset(n),o=new PureCSSMatrix,o=o.translate(i.left,i.top),a=a.multiply(o)}var s;jQuery.offset.initialize?(jQuery.offset.initialize(),s={fixedPosition:jQuery.offset.supportsFixedPosition,doesNotAddBorder:jQuery.offset.doesNotAddBorder,doesAddBorderForTableAndCells:jQuery.support.doesAddBorderForTableAndCells,subtractsBorderForOverflowNotVisible:jQuery.offset.subtractsBorderForOverflowNotVisible}):s=jQuery.support;var l,u,c=n.offsetParent,m=n.ownerDocument,f=m.documentElement,d=m.body,p=r[0],v=m.defaultView;u=v?v.getComputedStyle(n,null):n.currentStyle;var g=n.offsetTop,z=n.offsetLeft,x=h().translate(z,g);for(x=x.multiply(h(n)),a=x.multiply(a);(n=n.parentNode)&&n!==p&&(g=0,z=0,!s.fixedPosition||"fixed"!==u.position);)l=v?v.getComputedStyle(n,null):n.currentStyle,g-=n.scrollTop,z-=n.scrollLeft,n===c&&(g+=n.offsetTop,z+=n.offsetLeft,!s.doesNotAddBorder||s.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(n.nodeName)||(g+=parseFloat(l.borderTopWidth)||0,z+=parseFloat(l.borderLeftWidth)||0),c=n.offsetParent),s.subtractsBorderForOverflowNotVisible&&"visible"!==l.overflow&&(g+=parseFloat(l.borderTopWidth)||0,z+=parseFloat(l.borderLeftWidth)||0),u=l,n.offsetParent==p&&(g-=parseFloat(e(n.offsetParent).css("margin-top"))||0,z-=parseFloat(e(n.offsetParent).css("margin-left"))||0),x=h().translate(z,g),x=x.multiply(h(n)),a=x.multiply(a);g=0,z=0,("relative"===u.position||"static"===u.position)&&(g+=d.offsetTop,z+=d.offsetLeft),s.fixedPosition&&"fixed"===u.position&&(g+=Math.max(f.scrollTop,d.scrollTop),z+=Math.max(f.scrollLeft,d.scrollLeft));var y=(new PureCSSMatrix).translate(z,g);return a=a.multiply(y)}function d(e){return Number(e).toFixed(6)}function h(e){var t=p.getElementTransform(e);return t?new PureCSSMatrix(t):new PureCSSMatrix}var p=e.zoomooz.helpers,v=["duration","easing","nativeanimation"];r(),e.zoomooz||(e.zoomooz={}),e.zoomooz.setup=function(t){e.zoomooz.defaultSettings=jQuery.extend(n(),t)},e.fn.zoomSettings=function(r){var n;return this.each(function(){var o=e(this);n=t(o,r)}),n},e.fn.zoomTo=function(t,r){return this.each(function(){var n=e(this);r||(t=n.zoomSettings(t)),o(n,t),t.debug?(0===e("#debug").length?e(t.root).append('<div id="debug"><div>'):e("#debug").html(""),c(n,t)):0!==e("#debug").length&&e("#debug").html("")}),this}}(jQuery),function(e){"use strict";function t(r,n,o){r.addClass("zoomTarget"),o.animationendcallback||(o.animationendcallback=o.closeclick?function(){e(".selectedZoomTarget").removeClass("selectedZoomTarget zoomNotClickable"),r.addClass("selectedZoomTarget")}:function(){e(".selectedZoomTarget").removeClass("selectedZoomTarget zoomNotClickable"),r.addClass("selectedZoomTarget zoomNotClickable")});var a=n.closest(".zoomContainer");0!==a.length&&(o.root=a);var i=o.root;if(!i.hasClass("zoomTarget")){var s=i.zoomSettings({});s.animationendcallback=function(){var t=e(this);e(".selectedZoomTarget").removeClass("selectedZoomTarget zoomNotClickable"),t.addClass("selectedZoomTarget zoomNotClickable"),t.parent().addClass("selectedZoomTarget zoomNotClickable")},t(i,i,s),t(i.parent(),i,s),i.click()}r.on("click",function(t){var a=e(t.target);(!a.hasClass("zoomTarget")||a.is(r))&&(o.closeclick&&n.hasClass("selectedZoomTarget")?o.root.click():n.zoomTo(o))})}function r(){function e(e){var t="-webkit-touch-callout: "+(e?"default":"none")+";";return n.forEachPrefix(function(r){t+=r+"user-select:"+(e?"text":"none")+";"},!0),t}var t=document.createElement("style");t.type="text/css",t.innerHTML=".zoomTarget{"+e(!1)+"}"+".zoomTarget:hover{cursor:pointer!important;}"+".zoomNotClickable{"+e(!0)+"}"+".zoomNotClickable:hover{cursor:auto!important;}"+".zoomContainer{position:relative;padding:1px;margin:-1px;}",document.getElementsByTagName("head")[0].appendChild(t)}e.zoomooz||(e.zoomooz={});var n=e.zoomooz.helpers;e.fn.zoomTarget=function(r){this.each(function(){var n=e(this).zoomSettings(r);t(e(this),e(this),n)})},r(),e(document).ready(function(){e(".zoomTarget").zoomTarget()})}(jQuery),function(e){"use strict";e.zoomooz||(e.zoomooz={}),e.fn.zoomContainer=function(){},e(document).ready(function(){e(".zoomContainer").zoomContainer()})}(jQuery),function(e){function t(t,n){var o=r(),a=jQuery.extend({},n);for(var i in o)o.hasOwnProperty(i)&&!a[i]&&(a[i]=o[i]instanceof jQuery?e(t.data(i)):t.data(i));return jQuery.extend({},o,a)}function r(){return{type:"next",root:e(document.body),wrap:"true"}}function n(e,t){e.addClass("zoomButton");var r;r=t.root.hasClass("zoomContainer")?t.root:t.root.find(".zoomContainer");var n=function(){function e(e){return i.indexOf(e)}function t(t){var r=e(t)+1;return i.length>r&&0!==r?i[r]:null}function n(t){var r=e(t)-1;return 0>r?null:i[r]}function o(){return i[0]}function a(){return i[i.length-1]}var i=jQuery.makeArray(r.find(".zoomTarget"));return{next:t,prev:n,last:a,first:o}}();e.on("click",function(){var e,o=!0,a=r.find(".selectedZoomTarget");0===a.length&&(a=n.first()),0===t.type.indexOf("prev")?(e=n.prev(a[0]),null===e&&(t.wrap?e=n.last():o=!1)):(e=n.next(a[0]),null===e&&(t.wrap?e=n.first():o=!1)),o&&e.click()})}e.zoomooz||(e.zoomooz={}),e.zoomooz.helpers,e.fn.zoomButton=function(r){this.each(function(){var o=t(e(this),r);n(e(this),o)})},e(document).ready(function(){e(".zoomButton").zoomButton()})}(jQuery);
+function zmMatrix(){}zmMatrix.prototype={dup:function(){return zmMatrix.create(this.elements)},canMultiplyFromLeft:function(e){var t=e.elements||e;return t[0][0]===void 0&&(t=zmMatrix.create(t).elements),this.elements[0].length==t.length},multiply:function(e){var t=e.modulus?!0:!1,r=e.elements||e;if(r[0][0]===void 0&&(r=zmMatrix.create(r).elements),!this.canMultiplyFromLeft(r))return null;var n,o,a,i,s,l,u=this.elements.length,c=u,m=r[0].length,f=this.elements[0].length,d=[];do{n=c-u,d[n]=[],o=m;do{a=m-o,i=0,s=f;do l=f-s,i+=this.elements[n][l]*r[l][a];while(--s);d[n][a]=i}while(--o)}while(--u);return r=zmMatrix.create(d),t?r.col(1):r},isSquare:function(){return this.elements.length==this.elements[0].length},toRightTriangular:function(){var e,t,r,n,o=this.dup(),a=this.elements.length,i=a,s=this.elements[0].length;do{if(t=i-a,0===o.elements[t][t])for(j=t+1;i>j;j++)if(0!==o.elements[j][t]){e=[],r=s;do n=s-r,e.push(o.elements[t][n]+o.elements[j][n]);while(--r);o.elements[t]=e;break}if(0!==o.elements[t][t])for(j=t+1;i>j;j++){var l=o.elements[j][t]/o.elements[t][t];e=[],r=s;do n=s-r,e.push(t>=n?0:o.elements[j][n]-o.elements[t][n]*l);while(--r);o.elements[j]=e}}while(--a);return o},determinant:function(){if(!this.isSquare())return null;var e,t=this.toRightTriangular(),r=t.elements[0][0],n=t.elements.length-1,o=n;do e=o-n+1,r*=t.elements[e][e];while(--n);return r},isSingular:function(){return this.isSquare()&&0===this.determinant()},augment:function(e){var t=e.elements||e;t[0][0]===void 0&&(t=zmMatrix.create(t).elements);var r,n,o,a=this.dup(),i=a.elements[0].length,s=a.elements.length,l=s,u=t[0].length;if(s!=t.length)return null;do{r=l-s,n=u;do o=u-n,a.elements[r][i+o]=t[r][o];while(--n)}while(--s);return a},inverse:function(){if(!this.isSquare()||this.isSingular())return null;var e,t,r,n,o,a,i,s=this.elements.length,l=s,u=this.augment(zmMatrix.I(s)).toRightTriangular(),c=u.elements[0].length,m=[];do{e=s-1,o=[],r=c,m[e]=[],a=u.elements[e][e];do n=c-r,i=u.elements[e][n]/a,o.push(i),n>=l&&m[e].push(i);while(--r);for(u.elements[e]=o,t=0;e>t;t++){o=[],r=c;do n=c-r,o.push(u.elements[t][n]-u.elements[e][n]*u.elements[t][e]);while(--r);u.elements[t]=o}}while(--s);return zmMatrix.create(m)},setElements:function(e){var t,r=e.elements||e;if(r[0][0]!==void 0){var n,o,a,i=r.length,s=i;this.elements=[];do{t=s-i,n=r[t].length,o=n,this.elements[t]=[];do a=o-n,this.elements[t][a]=r[t][a];while(--n)}while(--i);return this}var l=r.length,u=l;this.elements=[];do t=u-l,this.elements.push([r[t]]);while(--l);return this}},zmMatrix.create=function(e){var t=new zmMatrix;return t.setElements(e)},zmMatrix.I=function(e){var t,r,n,o=[],a=e;do{t=a-e,o[t]=[],r=a;do n=a-r,o[t][n]=t==n?1:0;while(--r)}while(--e);return zmMatrix.create(o)},PureCSSMatrix=function(){"use strict";function e(e){e&&null!==e&&"none"!=e?e instanceof zmMatrix?this.setMatrix(e):this.setMatrixValue(e):this.m=zmMatrix.I(3)}function t(e){var t=parseFloat(r(e));return e.match(o)&&(t=2*Math.PI*t/360),t}function r(e){return e.match(a)}function n(e){return Number(e).toFixed(6)}var o=/deg$/,a=/([0-9.\-e]+)/g,i=/([a-zA-Z]+)\(([^\)]+)\)/g;return e.prototype.setMatrix=function(e){this.m=e},e.prototype.setMatrixValue=function(e){for(var n,o=zmMatrix.I(3);null!==(n=i.exec(e));){var a,s=n[1].toLowerCase(),l=n[2].split(",");if("matrix"==s)a=zmMatrix.create([[parseFloat(l[0]),parseFloat(l[2]),parseFloat(r(l[4]))],[parseFloat(l[1]),parseFloat(l[3]),parseFloat(r(l[5]))],[0,0,1]]);else if("translate"==s)a=zmMatrix.I(3),a.elements[0][2]=parseFloat(r(l[0])),a.elements[1][2]=parseFloat(r(l[1]));else if("scale"==s){var u,c=parseFloat(l[0]);u=l.length>1?parseFloat(l[1]):c,a=zmMatrix.create([[c,0,0],[0,u,0],[0,0,1]])}else"rotate"==s?a=zmMatrix.RotationZ(t(l[0])):"skew"==s||"skewx"==s?(a=zmMatrix.I(3),a.elements[0][1]=Math.tan(t(l[0]))):"skewy"==s?(a=zmMatrix.I(3),a.elements[1][0]=Math.tan(t(l[0]))):console.log("Problem with setMatrixValue",s,l);o=o.multiply(a)}this.m=o},e.prototype.multiply=function(t){return new e(this.m.multiply(t.m))},e.prototype.inverse=function(){return 1e-6>Math.abs(this.m.elements[0][0])&&(this.m.elements[0][0]=0),new e(this.m.inverse())},e.prototype.translate=function(t,r){var n=zmMatrix.I(3);return n.elements[0][2]=t,n.elements[1][2]=r,new e(this.m.multiply(n))},e.prototype.scale=function(t,r){var n=zmMatrix.create([[t,0,0],[0,r,0],[0,0,1]]);return new e(this.m.multiply(n))},e.prototype.rotate=function(t){var r=zmMatrix.RotationZ(t);return new e(this.m.multiply(r))},e.prototype.toString=function(){var e=this.m.elements,t="";return($.browser.mozilla||$.browser.opera)&&(t="px"),"matrix("+n(e[0][0])+", "+n(e[1][0])+", "+n(e[0][1])+", "+n(e[1][1])+", "+n(e[0][2])+t+", "+n(e[1][2])+t+")"},e.prototype.elements=function(){var e=this.m.elements;return{a:e[0][0],b:e[1][0],c:e[0][1],d:e[1][1],e:e[0][2],f:e[1][2]}},e}(),$.zoomooz||($.zoomooz={}),$.zoomooz.helpers=function(e,t){"use strict";var r=["-moz-","-webkit-","-o-","-ms-"];return t.forEachPrefix=function(e,t){for(var n=0;r.length>n;n++)e(r[n]);t&&e("")},t.getElementTransform=function(r){var n;return t.forEachPrefix(function(t){n=n||e(r).css(t+"transform")},!0),n},t}(jQuery,{}),function(e){"use strict";function t(e,t,r){var n={};if(b.forEachPrefix(function(t){n[t+"transform"]=e},!0),t){var o=d(t/1e3,6)+"s";if(n["-webkit-transition-duration"]=o,n["-o-transition-duration"]=o,n["-moz-transition-duration"]=o,r){var a=i(r);n["-webkit-transition-timing-function"]=a,n["-o-transition-timing-function"]=a,n["-moz-transition-timing-function"]=a}}return n}function r(e,t,r,a,i,l){t||(t=o(new PureCSSMatrix)),p=(new Date).getTime(),v&&(clearInterval(v),v=null),a.easing&&(a.easingfunction=s(a.easing,a.duration)),n(e,t,r,a,i),l&&l(),v=setInterval(function(){n(e,t,r,a,i)},1)}function n(e,r,n,o,i){var s,l=(new Date).getTime()-p;s=o.easingfunction?o.easingfunction(l/o.duration):l/o.duration,e.css(t(a(f(r,n,s)))),l>o.duration&&(clearInterval(v),v=null,s=1,i&&i())}function o(e){var t=e.elements(),r=t.a,n=t.b,o=t.c,a=t.d,i=t.e,s=t.f;if(.01>Math.abs(r*a-n*o))return console.log("fail!"),void 0;var l=i,u=s,c=Math.sqrt(r*r+n*n);r/=c,n/=c;var m=r*o+n*a;o-=r*m,a-=n*m;var f=Math.sqrt(o*o+a*a);o/=f,a/=f,m/=f,0>r*a-n*o&&(r=-r,n=-n,o=-o,a=-a,c=-c,f=-f);var d=Math.atan2(n,r);return{tx:l,ty:u,r:d,k:Math.atan(m),sx:c,sy:f}}function a(e){var t="";return t+="translate("+d(e.tx,6)+"px,"+d(e.ty,6)+"px) ",t+="rotate("+d(e.r,6)+"rad) skewX("+d(e.k,6)+"rad) ",t+="scale("+d(e.sx,6)+","+d(e.sy,6)+")"}function i(e){return e instanceof Array?"cubic-bezier("+d(e[0],6)+","+d(e[1],6)+","+d(e[2],6)+","+d(e[3],6)+")":e}function s(e,t){var r=[];if(e instanceof Array)r=e;else switch(e){case"linear":r=[0,0,1,1];break;case"ease":r=[.25,.1,.25,1];break;case"ease-in":r=[.42,0,1,1];break;case"ease-out":r=[0,0,.58,1];break;case"ease-in-out":r=[.42,0,.58,1]}var n=function(e){return l(e,r[0],r[1],r[2],r[3],t)};return n}function l(e,t,r,n,o,a){function i(e){return((f*e+d)*e+h)*e}function s(e){return((p*e+v)*e+g)*e}function l(e){return(3*f*e+2*d)*e+h}function u(e){return 1/(200*e)}function c(e,t){return s(m(e,t))}function m(e,t){function r(e){return e>=0?e:0-e}var n,o,a,s,u,c;for(a=e,c=0;8>c;c++){if(s=i(a)-e,t>r(s))return a;if(u=l(a),1e-6>r(u))break;a-=s/u}if(n=0,o=1,a=e,n>a)return n;if(a>o)return o;for(;o>n;){if(s=i(a),t>r(s-e))return a;e>s?n=a:o=a,a=.5*(o-n)+n}return a}var f=0,d=0,h=0,p=0,v=0,g=0;return h=3*t,d=3*(n-t)-h,f=1-h-d,g=3*r,v=3*(o-r)-g,p=1-g-v,c(e,u(a))}function u(e,t){var r,n=b.getElementTransform(e);r=n?new PureCSSMatrix(n):new PureCSSMatrix,t&&(r=r.translate(t.x,t.y));var a=o(r);return a.r=c(n),a}function c(e){for(var t,r=0;null!==(t=x.exec(e));){var n=t[1].toLowerCase(),a=t[2].split(",");if("matrix"==n){var i=n+"("+t[2]+")";r+=o(new PureCSSMatrix(i)).r}else if("rotate"==n){var s=a[0],l=parseFloat(h(s));s.match(y)&&(l=2*Math.PI*l/360),r+=l}}return r}function m(e,t){if(Math.abs(e.r-t.r)>Math.PI)if(t.r<e.r)for(;Math.abs(e.r-t.r)>Math.PI;)t.r+=2*Math.PI;else for(;Math.abs(e.r-t.r)>Math.PI;)t.r-=2*Math.PI;return t}function f(e,t,r){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]+(t[o]-e[o])*r);return n}function d(e,t){t=Math.abs(parseInt(t,10))||0;var r=Math.pow(10,t);return Math.round(e*r)/r}function h(e){return e.match(z)}var p,v,g,z=/([0-9.\-e]+)/g,x=/([a-z]+)\(([^\)]+)\)/g,y=/deg$/,b=e.zoomooz.helpers,w={duration:450,easing:"ease",nativeanimation:!1};jQuery.cssHooks.MsTransform={set:function(e,t){e.style.msTransform=t}},jQuery.cssHooks.MsTransformOrigin={set:function(e,t){e.style.msTransformOrigin=t}},e.fn.animateTransformation=function(n,i,s,l,c){i=jQuery.extend({},w,i),g&&(clearTimeout(g),g=null);var f=!i.nativeanimation&&i.duration>0;!f&&l&&(g=setTimeout(l,i.duration)),this.each(function(){var d=e(this);n||(n=new PureCSSMatrix);var h=u(d,s),p=m(h,o(n));f?r(d,h,p,i,l,c):(d.css(t(a(p),i.duration,i.easing)),c&&c())})},e.fn.setTransformation=function(r){this.each(function(){var n=e(this),i=u(n),s=m(i,o(r));n.css(t(a(s)))})}}(jQuery),function(e){"use strict";function t(t,r){var n=jQuery.extend({},r);e.zoomooz.defaultSettings||e.zoomooz.setup();var o,a=e.zoomooz.defaultSettings,i=jQuery.extend({},n);for(o in a)a.hasOwnProperty(o)&&!i[o]&&(i[o]=t.data(o));for(var s=0;v.length>s;s++)o=v[s],i[o]||(i[o]=t.data(o));return jQuery.extend({},a,i)}function r(){var t=document.createElement("style");t.type="text/css";var r="";p.forEachPrefix(function(e){r+=e+"transform-origin: 0 0;"},!0),t.innerHTML="html {height:100%;}.noScroll{overflow:hidden !important;}* {"+r+"}",document.getElementsByTagName("head")[0].appendChild(t),e(document).ready(function(){var r=window.innerWidth-e("body").width();t.innerHTML+="body.noScroll,html.noScroll body{margin-right:"+r+"px;}"})}function n(){var t={targetsize:.9,scalemode:"both",root:e(document.body),debug:!1,animationendcallback:null,closeclick:!1,preservescroll:!1};return t}function o(t,r){var n,o=!r.preservescroll,u=null;(function(){var e=r.root,s=e.parent();t[0]===e[0]?u=a(e,s):e.data("original-scroll")?o||(u=a(e,s)):(n=!0,u=i(e,s,o))})();var c,m=null;s(r.root);var d=null;if(t[0]!==r.root[0]){var h=f(t,r.root).inverse();o||(d=u),c=l(t,h,d,r),r.animationendcallback&&(m=function(){r.animationendcallback.call(t[0])})}else o&&(c=(new PureCSSMatrix).translate(-u.x,-u.y)),m=function(){var n=e(r.root),a=u.elem;a.removeClass("noScroll"),n.setTransformation(new PureCSSMatrix),n.data("original-scroll",null),e(document).off("touchmove"),o&&(a[0]==document.body||a[0]==window?window.scrollTo(u.x,u.y):(a.scrollLeft(u.x),a.scrollTop(u.y))),r.animationendcallback&&r.animationendcallback.call(t[0])};var p=null;o&&u&&u.animationstartedcallback&&(p=u.animationstartedcallback),n||(d=!1),e(r.root).animateTransformation(c,r,d,m,p)}function a(e,t){var r=e.data("original-scroll");return r||(r={elem:t,x:0,"y:":0}),r}function i(t,r,n){var o=t.scrollTop(),a=t.scrollLeft(),i=t;o||(o=r.scrollTop(),a=r.scrollLeft(),i=r);var s={elem:i,x:a,y:o};t.data("original-scroll",s),e(document).on("touchmove",function(e){e.preventDefault()});var l="translate(-"+a+"px,-"+o+"px)";return p.forEachPrefix(function(e){t.css(e+"transform",l)}),i.addClass("noScroll"),n&&(s.animationstartedcallback=function(){i[0]==document.body||i[0]==document?window.scrollTo(0,0):(i.scrollLeft(0),i.scrollTop(0))}),s}function s(t){var r=e(t).parent(),n=r.width(),o=r.height(),a=n/2,i=o/2,s=d(a)+"px "+d(i)+"px";p.forEachPrefix(function(e){t.css(e+"transform-origin",s)})}function l(t,r,n,o){var a,i=o.targetsize,s=o.scalemode,l=o.root,u=e(l).parent(),c=u.width(),m=u.height(),f=c/t.outerWidth(),d=m/t.outerHeight();if("width"==s)a=i*f;else if("height"==s)a=i*d;else if("both"==s)a=i*Math.min(f,d);else{if("scale"!=s)return console.log("wrong zoommode"),void 0;a=i}var h=(c-t.outerWidth()*a)/2,p=(m-t.outerHeight()*a)/2,v=c/2,g=m/2,z=-parseFloat(l.css("margin-left"))||0,x=-parseFloat(l.css("margin-top"))||0,y=new PureCSSMatrix;n&&(y=y.translate(n.x,n.y));var b=y.translate(z,x).translate(-v,-g).translate(h,p).scale(a,a).multiply(r).translate(v,g);return b}function u(e,t,r){return[e.a*t+e.c*r+e.e,e.b*t+e.d*r+e.f]}function c(e,t){var r=f(e,t.root).elements();m(u(r,0,0)),m(u(r,0,e.outerHeight())),m(u(r,e.outerWidth(),e.outerHeight())),m(u(r,e.outerWidth(),0))}function m(t){var r="width:4px;height:4px;background-color:red;position:absolute;margin-left:-2px;margin-top:-2px;";r+="left:"+t[0]+"px;top:"+t[1]+"px;";var n='<div class="debuglabel" style="'+r+'"></div>';e("#debug").append(n)}function f(t,r){var n=t[0];if(!n||!n.ownerDocument)return null;var o,a=new PureCSSMatrix;if(n===n.ownerDocument.body){var i;return i=jQuery.offset.bodyOffset?jQuery.offset.bodyOffset(n):jQuery.fn.offset(n),o=new PureCSSMatrix,o=o.translate(i.left,i.top),a=a.multiply(o)}var s;jQuery.offset.initialize?(jQuery.offset.initialize(),s={fixedPosition:jQuery.offset.supportsFixedPosition,doesNotAddBorder:jQuery.offset.doesNotAddBorder,doesAddBorderForTableAndCells:jQuery.support.doesAddBorderForTableAndCells,subtractsBorderForOverflowNotVisible:jQuery.offset.subtractsBorderForOverflowNotVisible}):s=jQuery.support;var l,u,c=n.offsetParent,m=n.ownerDocument,f=m.documentElement,d=m.body,p=r[0],v=m.defaultView;u=v?v.getComputedStyle(n,null):n.currentStyle;var g=n.offsetTop,z=n.offsetLeft,x=h().translate(z,g);for(x=x.multiply(h(n)),a=x.multiply(a);(n=n.parentNode)&&n!==p&&(g=0,z=0,!s.fixedPosition||"fixed"!==u.position);)l=v?v.getComputedStyle(n,null):n.currentStyle,g-=n.scrollTop,z-=n.scrollLeft,n===c&&(g+=n.offsetTop,z+=n.offsetLeft,!s.doesNotAddBorder||s.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(n.nodeName)||(g+=parseFloat(l.borderTopWidth)||0,z+=parseFloat(l.borderLeftWidth)||0),c=n.offsetParent),s.subtractsBorderForOverflowNotVisible&&"visible"!==l.overflow&&(g+=parseFloat(l.borderTopWidth)||0,z+=parseFloat(l.borderLeftWidth)||0),u=l,n.offsetParent==p&&(g-=parseFloat(e(n.offsetParent).css("margin-top"))||0,z-=parseFloat(e(n.offsetParent).css("margin-left"))||0),x=h().translate(z,g),x=x.multiply(h(n)),a=x.multiply(a);g=0,z=0,("relative"===u.position||"static"===u.position)&&(g+=d.offsetTop,z+=d.offsetLeft),s.fixedPosition&&"fixed"===u.position&&(g+=Math.max(f.scrollTop,d.scrollTop),z+=Math.max(f.scrollLeft,d.scrollLeft));var y=(new PureCSSMatrix).translate(z,g);return a=a.multiply(y)}function d(e){return Number(e).toFixed(6)}function h(e){var t=p.getElementTransform(e);return t?new PureCSSMatrix(t):new PureCSSMatrix}var p=e.zoomooz.helpers,v=["duration","easing","nativeanimation"];r(),e.zoomooz||(e.zoomooz={}),e.zoomooz.setup=function(t){e.zoomooz.defaultSettings=jQuery.extend(n(),t)},e.fn.zoomSettings=function(r){var n;return this.each(function(){var o=e(this);n=t(o,r)}),n},e.fn.zoomTo=function(t,r){return this.each(function(){var n=e(this);r||(t=n.zoomSettings(t)),o(n,t),t.debug?(0===e("#debug").length?e(t.root).append('<div id="debug"><div>'):e("#debug").html(""),c(n,t)):0!==e("#debug").length&&e("#debug").html("")}),this}}(jQuery),function(e){"use strict";function t(r,n,o){r.addClass("zoomTarget"),o.animationendcallback||(o.animationendcallback=o.closeclick?function(){e(".selectedZoomTarget").removeClass("selectedZoomTarget zoomNotClickable"),r.addClass("selectedZoomTarget")}:function(){e(".selectedZoomTarget").removeClass("selectedZoomTarget zoomNotClickable"),r.addClass("selectedZoomTarget zoomNotClickable")});var a=n.closest(".zoomContainer");0!==a.length&&(o.root=a);var i=o.root;if(!i.hasClass("zoomTarget")){var s=i.zoomSettings({});s.animationendcallback=function(){var t=e(this);e(".selectedZoomTarget").removeClass("selectedZoomTarget zoomNotClickable"),t.addClass("selectedZoomTarget zoomNotClickable"),t.parent().addClass("selectedZoomTarget zoomNotClickable")},t(i,i,s),t(i.parent(),i,s),i.click()}r.on("click",function(t){var a=e(t.target);(!a.hasClass("zoomTarget")||a.is(r))&&(o.closeclick&&n.hasClass("selectedZoomTarget")?o.root.click():n.zoomTo(o))})}function r(){function e(e){var t="-webkit-touch-callout: "+(e?"default":"none")+";";return n.forEachPrefix(function(r){t+=r+"user-select:"+(e?"text":"none")+";"},!0),t}var t=document.createElement("style");t.type="text/css",t.innerHTML=".zoomTarget{"+e(!1)+"}"+".zoomTarget:hover{cursor:pointer!important;}"+".zoomNotClickable{"+e(!0)+"}"+".zoomNotClickable:hover{cursor:auto!important;}"+".zoomContainer{position:relative;padding:1px;margin:-1px;}",document.getElementsByTagName("head")[0].appendChild(t)}e.zoomooz||(e.zoomooz={});var n=e.zoomooz.helpers;e.fn.zoomTarget=function(r){this.each(function(){var n=e(this).zoomSettings(r);t(e(this),e(this),n)})},r(),e(document).ready(function(){e(".zoomTarget").zoomTarget()})}(jQuery),function(e){"use strict";e.zoomooz||(e.zoomooz={}),e.fn.zoomContainer=function(){},e(document).ready(function(){e(".zoomContainer").zoomContainer()})}(jQuery),function(e){function t(t,n){var o=r(),a=jQuery.extend({},n);for(var i in o)o.hasOwnProperty(i)&&!a[i]&&(a[i]=o[i]instanceof jQuery?e(t.data(i)):t.data(i));return jQuery.extend({},o,a)}function r(){return{type:"next",root:e(document.body),wrap:"true"}}function n(e,t){e.addClass("zoomButton");var r;r=t.root.hasClass("zoomContainer")?t.root:t.root.find(".zoomContainer");var n=function(){function e(e){return i.indexOf(e)}function t(t){var r=e(t)+1;return i.length>r&&0!==r?i[r]:null}function n(t){var r=e(t)-1;return 0>r?null:i[r]}function o(){return i[0]}function a(){return i[i.length-1]}var i=jQuery.makeArray(r.find(".zoomTarget"));return{next:t,prev:n,last:a,first:o}}();e.on("click",function(){var e,o=!0,a=r.find(".selectedZoomTarget");0===a.length&&(a=n.first()),0===t.type.indexOf("prev")?(e=n.prev(a[0]),null===e&&(t.wrap?e=n.last():o=!1)):(e=n.next(a[0]),null===e&&(t.wrap?e=n.first():o=!1)),o&&setTimeout(function(){e.click()},10)})}e.zoomooz||(e.zoomooz={}),e.zoomooz.helpers,e.fn.zoomButton=function(r){this.each(function(){var o=t(e(this),r);n(e(this),o)})},e(document).ready(function(){e(".zoomButton").zoomButton()})}(jQuery);
View
1  src/js/jquery.zoomooz-core.js
@@ -3,6 +3,7 @@
* http://janne.aukia.com/zoomooz
*
* Version history:
+ * 1.1.9 hacky fix for the back and forward buttons
* 1.1.8 made scroll reset default to true to fix issues on webkit + long zooms #74
* 1.1.7 moved Sylvester Matrix to a custom namespace
* 1.1.5 zoom for scrolled pages without flickering
View
8 src/js/jquery.zoomooz-zoomButton.js
@@ -125,7 +125,7 @@
}());
clickTarget.on("click", function(evt) {
-
+
var target;
var performZoom = true;
@@ -159,8 +159,10 @@
// not this easy! would need to read the data fields
//target.zoomTo();
- // FIXME: hacky...
- target.click();
+ // FIXME: hacky, and i have truly no idea, why the timeout is needed.
+ setTimeout(function() {
+ target.click();
+ },10);
} else {
// don't do anything if no wrap
// (would be great if the button was disabled)
Please sign in to comment.
Something went wrong with that request. Please try again.