Edit file File name : jmpress.min.js Content :/*! For license information please see jmpress.min.js.LICENSE.txt */ !function(e,t,s,a){"use strict";var r,n,i,o=(r=t.createElement("dummy").style,n="Webkit Moz O ms Khtml".split(" "),i={},function(e){if(void 0===i[e]){var t=e.charAt(0).toUpperCase()+e.substr(1),s=(e+" "+n.join(t+" ")+t).split(" ");for(var o in i[e]=null,s)if(r[s[o]]!==a){i[e]=s[o];break}}return i[e]});function c(e){if(e){var t=1+e.substr(1).search(/[A-Z]/);return"-"+e.substr(0,t).toLowerCase()+"-"+e.substr(t).toLowerCase()}}function l(e){return e?e+",":""}function u(e){return e.length>0?e:null}var p={stepSelector:".step",containerClass:"",canvasClass:"",areaClass:"",notSupportedClass:"not-supported",fullscreen:!0,animation:{transformOrigin:"top left",transitionProperty:l(c(o("transform")))+l(c(o("perspective")))+"opacity",transitionDuration:"1s",transitionDelay:"500ms",transitionTimingFunction:"ease-in-out",transformStyle:"preserve-3d"},transitionDuration:1500},f={beforeChange:1,beforeInitStep:1,initStep:1,beforeInit:1,afterInit:1,beforeDeinit:1,afterDeinit:1,applyStep:1,unapplyStep:1,setInactive:1,beforeActive:1,setActive:1,selectInitialStep:1,selectPrev:1,selectNext:1,selectHome:1,selectEnd:1,idle:1,applyTarget:1};for(var d in f)p[d]=[];function m(r){r=e.extend(!0,{},r||{});var n={},i=null;for(i in f)n[i]=e.isFunction(r[i])?[r[i]]:r[i],r[i]=[];var o=e.extend(!0,{},p,r);for(i in f)n[i]&&Array.prototype.push.apply(o[i],n[i]);var c=e(this),l=null,d=null,m={container:"",area:""},g=null,b=null,y=!1,j=null,D=!1;function S(t,s){var a=v(t),r={oldStyle:e(t).attr("style")||""},n={data:a,stepData:r};C.call(this,"beforeInitStep",e(t),n),r.delegate=a.delegate,C.call(this,"initStep",e(t),n),e(t).data("stepData",r),e(t).attr("id")||e(t).attr("id","step-"+(s+1)),C.call(this,"applyStep",e(t),n)}function w(t){var s=e(t).data("stepData");e(t).attr("style",s.oldStyle),C.call(this,"unapplyStep",e(t),{stepData:s})}function x(){y&&C.call(this,"setInactive",y,{stepData:e(y).data("stepData"),reason:"deinit"}),b.jmpressClass&&e(c).removeClass(b.jmpressClass),C.call(this,"beforeDeinit",e(this),{}),e(o.stepSelector,c).each((function(e){w.call(c,this)})),l.attr("style",m.container),o.fullscreen&&e("html").attr("style",""),d.attr("style",m.area),e(g).children().each((function(){c.append(e(this))})),o.fullscreen?g.remove():(g.remove(),d.remove()),C.call(this,"afterDeinit",e(this),{}),e(c).data("jmpressmethods",!1)}function C(t,s,a){a.settings=o,a.current=b,a.container=l,a.parents=s?e(s).parentsUntil(c).not(c).filter(o.stepSelector):null,a.current=b,a.jmpress=this;var r={};return e.each(o[t],(function(e,t){r.value=t.call(c,s,a)||r.value})),r.value}function T(t,s){var r;if(e.isPlainObject(t)&&(r=t.substep,t=t.step),"string"==typeof t&&(t=c.find(t).first()),!t||!e(t).data("stepData"))return!1;P.call(this);var n=e(t).data("stepData"),i=!1;if(C.call(this,"beforeChange",t,{stepData:n,reason:s,cancel:function(){i=!0}}),i)return a;var l={},p=t;e(t).data("stepData").delegate&&((p=u(e(t).parentsUntil(c).filter(o.stepSelector).filter(n.delegate))||u(e(t).near(n.delegate))||u(e(t).near(n.delegate,!0))||u(e(n.delegate,c)))?n=p.data("stepData"):p=t),D&&C.call(this,"setInactive",D,{stepData:e(D).data("stepData"),delegatedFrom:y,reason:s,target:l,nextStep:p,nextSubstep:r,nextStepData:n});var f={stepData:n,delegatedFrom:t,reason:s,target:l,substep:r,prevStep:D,prevSubstep:j,prevStepData:D&&e(D).data("stepData")};return C.call(this,"beforeActive",p,f),C.call(this,"setActive",p,f),b.jmpressClass&&e(c).removeClass(b.jmpressClass),e(c).addClass(b.jmpressClass="step-"+e(p).attr("id")),b.jmpressDelegatedClass&&e(c).removeClass(b.jmpressDelegatedClass),e(c).addClass(b.jmpressDelegatedClass="delegating-step-"+e(t).attr("id")),C.call(this,"applyTarget",p,e.extend({canvas:g,area:d,beforeActive:D},f)),y=t,j=f.substep,D=p,b.idleTimeout&&clearTimeout(b.idleTimeout),b.idleTimeout=setTimeout((function(){C.call(this,"idle",p,f)}),Math.max(1,o.transitionDuration-100)),p}function P(){!function t(){if("BODY"===e(l)[0].tagName)try{s.scrollTo(0,0)}catch(e){}function a(){0===e(l).scrollTop()&&0===e(l).scrollLeft()||t()}e(l).scrollTop(0),e(l).scrollLeft(0),setTimeout(a,1),setTimeout(a,10),setTimeout(a,100),setTimeout(a,200),setTimeout(a,400)}()}if(c.data("jmpressmethods",{select:T,reselect:function(e){return T({step:y,substep:j},e)},scrollFix:P,goTo:function(e){return T.call(this,e,"jump")},next:function(){return T.call(this,C.call(this,"selectNext",y,{stepData:e(y).data("stepData"),substep:j}),"next")},prev:function(){return T.call(this,C.call(this,"selectPrev",y,{stepData:e(y).data("stepData"),substep:j}),"prev")},home:function(){return T.call(this,C.call(this,"selectHome",y,{stepData:e(y).data("stepData")}),"home")},end:function(){return T.call(this,C.call(this,"selectEnd",y,{stepData:e(y).data("stepData")}),"end")},canvas:function(t){return h(g,t||{}),e(g)},container:function(){return l},settings:function(){return o},active:function(){return D&&e(D)},current:function(){return b},fire:function(t,s,a){if(f[t])return C.call(this,t,s,a);e.error("callback "+t+" is not registered.")},init:function(t){S.call(this,e(t),b.nextIdNumber++)},deinit:function(t){t?w.call(this,e(t)):x.call(this)},reapply:function(t){C.call(this,"unapplyStep",e(t),{stepData:t.data("stepData")}),C.call(this,"applyStep",e(t),{stepData:t.data("stepData")})}}),0!=(-1===(M=navigator.userAgent.toLowerCase()).search(/(iphone)|(ipod)|(android)/)||-1!==M.search(/(chrome)/))){var M;o.notSupportedClass&&c.removeClass(o.notSupportedClass);var A=e(o.stepSelector,c);l=c,d=e("<div />"),g=e("<div />"),e(c).children().filter(A).each((function(){g.append(e(this))})),o.fullscreen&&(l=e("body"),e("html").css({overflow:"hidden"}),d=c),m.area=d.attr("style")||"",m.container=l.attr("style")||"",o.fullscreen?(l.css({height:"100%"}),c.append(g)):(l.css({position:"relative"}),d.append(g),c.append(d)),e(l).addClass(o.containerClass),e(d).addClass(o.areaClass),e(g).addClass(o.canvasClass),t.documentElement.style.height="100%",l.css({overflow:"hidden"});var I={position:"absolute",transitionDuration:"0s"};I=e.extend({},o.animation,I),h(d,I),h(d,{top:"50%",left:"50%",perspective:"1000px"}),h(g,I),b={},C.call(this,"beforeInit",null,{}),A.each((function(e){S.call(c,this,e)})),b.nextIdNumber=A.length,C.call(this,"afterInit",null,{}),T.call(this,C.call(this,"selectInitialStep","init",{})),o.initClass&&e(A).removeClass(o.initClass)}else o.notSupportedClass&&c.addClass(o.notSupportedClass)}function h(t,s){var a,r,n={};for(a in s)s.hasOwnProperty(a)&&null!==(r=o(a))&&(n[r]=s[a]);return e(t).css(n),t}function v(t){if(e(t)[0].dataset)return e.extend({},e(t)[0].dataset);var s={},a=e(t)[0].attributes;return e.each(a,(function(e,t){"data-"===t.nodeName.substr(0,5)&&(s[function(e){e=e.split("-");for(var t=1;t<e.length;t++)e[t]=e[t].substr(0,1).toUpperCase()+e[t].substr(1);return e.join("")}(t.nodeName.substr(5))]=t.nodeValue)})),s}var g={init:m,initialized:function(){return!!e(this).data("jmpressmethods")},deinit:function(){},css:h,pfx:o,defaults:function(){return p},register:function(t,s){e.isFunction(s)?g[t]?e.error("function "+t+" is already registered."):g[t]=s:f[t]?e.error("callback "+t+" is already registered."):(f[t]=1,p[t]=[])},dataset:v};e.fn.jmpress=function(t){function s(){var s=e(this).data("jmpressmethods");if(s&&s[t])return s[t].apply(this,Array.prototype.slice.call(arguments,1));if(g[t])return g[t].apply(this,Array.prototype.slice.call(arguments,1));if(f[t]&&s){var a=s.settings(),r=Array.prototype.slice.call(arguments,1)[0];e.isFunction(r)&&(a[t]=a[t]||[],a[t].push(r))}else{if("object"==typeof t||!t)return m.apply(this,arguments);e.error("Method "+t+" does not exist on jQuery.jmpress")}return this}var a,r=arguments;return e(this).each((function(e,t){a=s.apply(t,r)})),a},e.extend({jmpress:function(t){if(g[t])return g[t].apply(this,Array.prototype.slice.call(arguments,1));if(f[t]){var s=Array.prototype.slice.call(arguments,1)[0];e.isFunction(s)?p[t].push(s):e.error("Second parameter should be a function: $.jmpress( callbackName, callbackFunction )")}else e.error("Method "+t+" does not exist on jQuery.jmpress")}})}(jQuery,document,window),function(e){"use strict";function t(t,s,a,r){var n;return t.each((function(t,i){return(!r||!(n=s(i,a,r)))&&(e(i).is(a)?(n=i,!1):!(!r&&(n=s(i,a,r)))&&void 0)})),n}function s(a,r,n){var i=e(a).children();return n&&(i=e(i.get().reverse())),t(i,s,r,n)}function a(a,r,n){return t(e(a)[n?"prevAll":"nextAll"](),s,r,n)}e.fn.near=function(t,r){var n=[];return e(this).each((function(i,o){var c=!r&&s(o,t,r)||a(o,t,r)||function(t,s,r){var n,i=e(t).parents();return i=e(i.get()),e.each(i.get(),(function(t,i){return r&&e(i).is(s)?(n=i,!1):!(n=a(i,s,r))&&void 0})),n}(o,t,r);c&&n.push(c)})),e(n)}}(jQuery,document,window),function(e){"use strict";function t(e){return Math.round(1e4*e)/1e4+""}var s={3:{transform:function(s,a){var r="translate(-50%,-50%)";e.each(a,(function(e,s){var a,n=["X","Y","Z"];if("translate"===s[0])r+=" translate3d("+t(s[1]||0)+"px,"+t(s[2]||0)+"px,"+t(s[3]||0)+"px)";else if("rotate"===s[0]){var i=s[4]?[1,2,3]:[3,2,1];for(a=0;a<3;a++)r+=" rotate"+n[i[a]-1]+"("+t(s[i[a]]||0)+"deg)"}else if("scale"===s[0])for(a=0;a<3;a++)r+=" scale"+n[a]+"("+t(s[a+1]||1)+")"})),e.jmpress("css",s,e.extend({},{transform:r}))}},2:{transform:function(s,a){var r="translate(-50%,-50%)";e.each(a,(function(e,s){var a=["X","Y"];if("translate"===s[0])r+=" translate("+t(s[1]||0)+"px,"+t(s[2]||0)+"px)";else if("rotate"===s[0])r+=" rotate("+t(s[3]||0)+"deg)";else if("scale"===s[0])for(var n=0;n<2;n++)r+=" scale"+a[n]+"("+t(s[n+1]||1)+")"})),e.jmpress("css",s,e.extend({},{transform:r}))}},1:{transform:function(t,s){var a={top:0,left:0};e.each(s,(function(e,t){"translate"===t[0]&&(a.left=Math.round(t[1]||0)+"px",a.top=Math.round(t[2]||0)+"px")})),t.animate(a,1e3)}}},a=e.jmpress("pfx","perspective")?s[3]:e.jmpress("pfx","transform")?s[2]:s[1];e.jmpress("defaults").reasonableAnimation={},e.jmpress("initStep",(function(t,s){var a=s.data,r=s.stepData,n=parseFloat;e.extend(r,{x:n(a.x)||0,y:n(a.y)||0,z:n(a.z)||0,r:n(a.r)||0,phi:n(a.phi)||0,rotate:n(a.rotate)||0,rotateX:n(a.rotateX)||0,rotateY:n(a.rotateY)||0,rotateZ:n(a.rotateZ)||0,revertRotate:!1,scale:n(a.scale)||1,scaleX:n(a.scaleX)||!1,scaleY:n(a.scaleY)||!1,scaleZ:n(a.scaleZ)||1})})),e.jmpress("afterInit",(function(t,s){var a=s.settings.stepSelector,r=s.current;r.perspectiveScale=1,r.maxNestedDepth=0;for(var n=e(s.jmpress).find(a).children(a);n.length;)r.maxNestedDepth++,n=n.children(a)})),e.jmpress("applyStep",(function(t,s){e.jmpress("css",e(t),{position:"absolute",transformStyle:"preserve-3d"}),s.parents.length>0&&e.jmpress("css",e(t),{top:"50%",left:"50%"});var r=s.stepData,n=[["translate",r.x||r.r*Math.sin(r.phi*Math.PI/180),r.y||-r.r*Math.cos(r.phi*Math.PI/180),r.z],["rotate",r.rotateX,r.rotateY,r.rotateZ||r.rotate,!0],["scale",r.scaleX||r.scale,r.scaleY||r.scale,r.scaleZ||r.scale]];a.transform(t,n)})),e.jmpress("setActive",(function(t,s){var a=s.target,r=s.stepData,n=a.transform=[];a.perspectiveScale=1;for(var i=s.current.maxNestedDepth;i>(s.parents.length||0);i--)n.push(["scale"],["rotate"],["translate"]);n.push(["scale",1/(r.scaleX||r.scale),1/(r.scaleY||r.scale),1/r.scaleZ]),n.push(["rotate",-r.rotateX,-r.rotateY,-(r.rotateZ||r.rotate)]),n.push(["translate",-(r.x||r.r*Math.sin(r.phi*Math.PI/180)),-(r.y||-r.r*Math.cos(r.phi*Math.PI/180)),-r.z]),a.perspectiveScale*=r.scaleX||r.scale,e.each(s.parents,(function(t,s){var r=e(s).data("stepData");n.push(["scale",1/(r.scaleX||r.scale),1/(r.scaleY||r.scale),1/r.scaleZ]),n.push(["rotate",-r.rotateX,-r.rotateY,-(r.rotateZ||r.rotate)]),n.push(["translate",-(r.x||r.r*Math.sin(r.phi*Math.PI/180)),-(r.y||-r.r*Math.cos(r.phi*Math.PI/180)),-r.z]),a.perspectiveScale*=r.scaleX||r.scale})),e.each(n,(function(e,t){function a(a){void 0===s.current["rotate"+a+"-"+e]&&(s.current["rotate"+a+"-"+e]=t[a]||0);var r=s.current["rotate"+a+"-"+e],n=r%360,i=(t[a]||0)%360;n<0&&(n+=360),i<0&&(i+=360);var o=i-n;o<-180?o+=360:o>180&&(o-=360),s.current["rotate"+a+"-"+e]=t[a]=r+o}"rotate"===t[0]&&(a(1),a(2),a(3))}))})),e.jmpress("applyTarget",(function(t,s){var r,n=s.target,i=(s.stepData,s.settings),o=1.3*n.perspectiveScale<s.current.perspectiveScale,c=n.perspectiveScale>1.3*s.current.perspectiveScale,l=-1;e.each(n.transform,(function(e,t){if(!(t.length<=1||"rotate"===t[0]&&t[1]%360==0&&t[2]%360==0&&t[3]%360==0))return"scale"===t[0]&&void(l=e)})),l!==s.current.oldLastScale&&(o=c=!1,s.current.oldLastScale=l);var u=[];if(-1!==l)for(;l>=0;)"scale"===n.transform[l][0]&&(u.push(n.transform[l]),n.transform[l]=["scale"]),l--;var p=i.animation;i.reasonableAnimation[s.reason]&&(p=e.extend({},p,i.reasonableAnimation[s.reason])),r={perspective:Math.round(1e3*n.perspectiveScale)+"px"},r=e.extend({},p,r),o||(r.transitionDelay="0s"),s.beforeActive||(r.transitionDuration="0s",r.transitionDelay="0s"),e.jmpress("css",s.area,r),a.transform(s.area,u),r=e.extend({},p),c||(r.transitionDelay="0s"),s.beforeActive||(r.transitionDuration="0s",r.transitionDelay="0s"),s.current.perspectiveScale=n.perspectiveScale,e.jmpress("css",s.canvas,r),a.transform(s.canvas,n.transform)}))}(jQuery,document,window),function(e){"use strict";var t=e.jmpress,s="activeClass",a="nestedActiveClass",r=t("defaults");r[a]="nested-active",r[s]="active",t("setInactive",(function(t,r){var n=r.settings,i=n[s],o=n[a];i&&e(t).removeClass(i),o&&e.each(r.parents,(function(t,s){e(s).removeClass(o)}))})),t("setActive",(function(t,r){var n=r.settings,i=n[s],o=n[a];i&&e(t).addClass(i),o&&e.each(r.parents,(function(t,s){e(s).addClass(o)}))}))}(jQuery,document,window),function(e){"use strict";var t=e.jmpress;function s(t,s){return e(this).find(s.settings.stepSelector).first()}function a(t,s,a,r){if(!s)return!1;var n=a.settings.stepSelector;s=e(s);do{var i=s.near(n,r);if(0!==i.length&&0!==i.closest(t).length||(i=e(t).find(n)[r?"last":"first"]()),!i.length)return!1;s=i}while(s.data("stepData").exclude);return s}t("initStep",(function(e,t){t.stepData.exclude=t.data.exclude&&-1===["false","no"].indexOf(t.data.exclude)})),t("selectInitialStep",s),t("selectHome",s),t("selectEnd",(function(t,s){return e(this).find(s.settings.stepSelector).last()})),t("selectPrev",(function(e,t){return a(this,e,t,!0)})),t("selectNext",(function(e,t){return a(this,e,t)}))}(jQuery,document,window),function(e){"use strict";e.jmpress("selectInitialStep",(function(e,t){return t.settings.start}))}(jQuery,document,window),function(e){"use strict";var t=e.jmpress;function s(t,s,a){for(var r=0;r<s.length-1;r++){var n=s[r],i=s[r+1];e(t).jmpress("initialized")?e(n,t).data("stepData")[a]=i:e(n,t).attr("data-"+a,i)}}function a(t,s,a,r){var n=s.stepData;if(n[a]){var i=e(t).near(n[a],r);if(i&&i.length)return i;if((i=e(n[a],this)[r?"last":"first"]())&&i.length)return i}}t("register","route",(function(e,t,a){"string"==typeof e&&(e=[e,e]),s(this,e,a?"prev":"next"),t||s(this,e.reverse(),a?"next":"prev")})),t("initStep",(function(e,t){for(var s in{next:1,prev:1})t.stepData[s]=t.data[s]})),t("selectNext",(function(e,t){return a.call(this,e,t,"next")})),t("selectPrev",(function(e,t){return a.call(this,e,t,"prev",!0)}))}(jQuery,document,window),function(e){"use strict";var t=e.jmpress,s="ajax:afterStepLoaded",a="ajax:loadStep";t("register",a),t("register",s),t("defaults").ajaxLoadedClass="loaded",t("initStep",(function(t,s){s.stepData.src=e(t).attr("href")||s.data.src||!1,s.stepData.srcLoaded=!1})),t(a,(function(t,a){var r=a.stepData,n=r&&r.src,i=a.settings;n&&(e(t).addClass(i.ajaxLoadedClass),r.srcLoaded=!0,e(t).load(n,(function(r,n,i){e(a.jmpress).jmpress("fire",s,t,e.extend({},a,{response:r,status:n,xhr:i}))})))})),t("idle",(function(t,s){if(t){var r=s.settings,n=e(this);s.stepData,e(t).add(e(t).near(r.stepSelector)).add(e(t).near(r.stepSelector,!0)).add(n.jmpress("fire","selectPrev",t,{stepData:e(t).data("stepData")})).add(n.jmpress("fire","selectNext",t,{stepData:e(t).data("stepData")})).each((function(){var t=this,s=e(t).data("stepData");s.src&&!s.srcLoaded&&n.jmpress("fire",a,t,{stepData:e(t).data("stepData")})}))}})),t("setActive",(function(t,s){var r=e(t).data("stepData");r.src&&!r.srcLoaded&&e(this).jmpress("fire",a,t,{stepData:e(t).data("stepData")})}))}(jQuery,document,window),function(e,t,s){"use strict";var a=e.jmpress,r="a[href^='#']";function n(t){try{var a=e("#"+s.location.hash.replace(/^#\/?/,""));return a.length>0&&a.is(t.stepSelector)?a:void 0}catch(e){}}function i(e){var t="#/"+e;s.history&&s.history.pushState?s.location.hash!==t&&s.history.pushState({},"",t):s.location.hash!==t&&(s.location.hash=t)}a("defaults").hash={use:!0,update:!0,bindChange:!0},a("selectInitialStep",(function(t,a){var o=a.settings,c=o.hash,l=a.current,u=e(this);if(a.current.hashNamespace=".jmpress-"+Math.round(1e5*Math.random(),0),c.use)return c.bindChange&&(e(s).bind("hashchange"+l.hashNamespace,(function(e){var t=n(o);u.jmpress("initialized")&&u.jmpress("scrollFix"),t&&t.length&&(t.attr("id")!==u.jmpress("active").attr("id")&&u.jmpress("select",t),i(t.attr("id"))),e.preventDefault()})),e(r).on("click"+l.hashNamespace,(function(t){var s=e(this).attr("href");try{e(s).is(o.stepSelector)&&(u.jmpress("select",s),t.preventDefault(),t.stopPropagation())}catch(e){}}))),n(o)})),a("afterDeinit",(function(t,a){e(r).off(a.current.hashNamespace),e(s).unbind(a.current.hashNamespace)})),a("setActive",(function(t,s){var a=s.settings,r=s.current;a.hash.use&&a.hash.update&&(clearTimeout(r.hashtimeout),r.hashtimeout=setTimeout((function(){i(e(s.delegatedFrom).attr("id"))}),a.transitionDuration+200))}))}(jQuery,document,window),function(e,t){"use strict";var s=e.jmpress,a="next",r="prev";function n(e){e.preventDefault(),e.stopPropagation()}s("defaults").keyboard={use:!0,keys:{33:r,37:r,38:r,9:a+":"+r,32:a,34:a,39:a,40:a,36:"home",35:"end"},ignore:{INPUT:[32,37,38,39,40],TEXTAREA:[32,37,38,39,40],SELECT:[38,40]},tabSelector:"a[href]:visible, :input:visible"},s("afterInit",(function(s,a){var r=a.settings,i=r.keyboard,o=i.ignore,c=a.current,l=e(this);r.fullscreen||l.attr("tabindex",0),c.keyboardNamespace=".jmpress-"+Math.round(1e5*Math.random(),0),e(r.fullscreen?t:l).bind("keypress"+c.keyboardNamespace,(function(e){for(var t in o)if(e.target.nodeName===t&&-1!==o[t].indexOf(e.which))return;(e.which>=37&&e.which<=40||32===e.which)&&n(e)})),e(r.fullscreen?t:l).bind("keydown"+c.keyboardNamespace,(function(t){var s=e(t.target);if((r.fullscreen||s.closest(l).length)&&i.use){for(var a in o)if(s[0].nodeName===a&&-1!==o[a].indexOf(t.which))return;var c,u=!1;if(9===t.which){if(s.closest(l.jmpress("active")).length?(c=s.near(i.tabSelector,t.shiftKey),e(c).closest(r.stepSelector).is(l.jmpress("active"))||(c=void 0)):t.shiftKey?u=!0:c=l.jmpress("active").find("a[href], :input").filter(":visible").first(),c&&c.length>0)return c.focus(),l.jmpress("scrollFix"),void n(t);t.shiftKey&&(u=!0)}var p=i.keys[t.which];"string"==typeof p?(-1!==p.indexOf(":")&&(p=p.split(":"),p=t.shiftKey?p[1]:p[0]),l.jmpress(p),n(t)):e.isFunction(p)?p.call(l,t):p&&(l.jmpress.apply(l,p),n(t)),u&&((c=l.jmpress("active").find("a[href], :input").filter(":visible").last()).focus(),l.jmpress("scrollFix"))}}))})),s("afterDeinit",(function(s,a){e(t).unbind(a.current.keyboardNamespace)}))}(jQuery,document,window),function(e,t,s){"use strict";var a,r=(a=navigator.userAgent.toLowerCase(),(/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[])[1]||""),n=e.jmpress("defaults");n.viewPort={width:!1,height:!1,maxScale:0,minScale:0,zoomable:0,zoomBindMove:!0,zoomBindWheel:!0};var i=n.keyboard.keys;function o(e,t){return Math.max(Math.min(e,t),-t)}function c(t,s,a){var r=e(this).jmpress("current"),n=e(this).jmpress("settings"),i=e(this).jmpress("active").data("stepData"),c=e(this).jmpress("container");if(!(0===r.userZoom&&a<0)){var l=i.viewPortZoomable||n.viewPort.zoomable;if(!(r.userZoom===l&&a>0)){r.userZoom+=a;var u=e(c).innerWidth()/2,p=e(c).innerHeight()/2;t=t?t-u:t,s=s?s-p:s,r.userTranslateX=o(r.userTranslateX-a*t/r.zoomOriginWindowScale/l,u*r.userZoom*r.userZoom/l),r.userTranslateY=o(r.userTranslateY-a*s/r.zoomOriginWindowScale/l,p*r.userZoom*r.userZoom/l),e(this).jmpress("reselect","zoom")}}}i["mozilla"===r?107:187]="zoomIn",i["mozilla"===r?109:189]="zoomOut",n.reasonableAnimation.resize={transitionDuration:"0s",transitionDelay:"0ms"},n.reasonableAnimation.zoom={transitionDuration:"0s",transitionDelay:"0ms"},e.jmpress("initStep",(function(e,t){for(var s in{viewPortHeight:1,viewPortWidth:1,viewPortMinScale:1,viewPortMaxScale:1,viewPortZoomable:1})t.stepData[s]=t.data[s]&&parseFloat(t.data[s])})),e.jmpress("afterInit",(function(a,r){var n=this;r.current.viewPortNamespace=".jmpress-"+Math.round(1e5*Math.random(),0),e(s).bind("resize"+r.current.viewPortNamespace,(function(t){e(n).jmpress("reselect","resize")})),r.current.userZoom=0,r.current.userTranslateX=0,r.current.userTranslateY=0,r.settings.viewPort.zoomBindWheel&&e(r.settings.fullscreen?t:this).bind("mousewheel"+r.current.viewPortNamespace+" DOMMouseScroll"+r.current.viewPortNamespace,(function(t,s){var a=(s=s||t.originalEvent.wheelDelta||-t.originalEvent.detail)/Math.abs(s);return a<0?e(r.jmpress).jmpress("zoomOut",t.originalEvent.x,t.originalEvent.y):a>0&&e(r.jmpress).jmpress("zoomIn",t.originalEvent.x,t.originalEvent.y),!1})),r.settings.viewPort.zoomBindMove&&e(r.settings.fullscreen?t:this).bind("mousedown"+r.current.viewPortNamespace,(function(e){r.current.userZoom&&(r.current.userTranslating={x:e.clientX,y:e.clientY},e.preventDefault(),e.stopImmediatePropagation())})).bind("mousemove"+r.current.viewPortNamespace,(function(t){var s=r.current.userTranslating;s&&(e(n).jmpress("zoomTranslate",t.clientX-s.x,t.clientY-s.y),s.x=t.clientX,s.y=t.clientY,t.preventDefault(),t.stopImmediatePropagation())})).bind("mouseup"+r.current.viewPortNamespace,(function(e){r.current.userTranslating&&(r.current.userTranslating=void 0,e.preventDefault(),e.stopImmediatePropagation())}))})),e.jmpress("register","zoomIn",(function(e,t){c.call(this,e||0,t||0,1)})),e.jmpress("register","zoomOut",(function(e,t){c.call(this,e||0,t||0,-1)})),e.jmpress("register","zoomTranslate",(function(t,s){var a=e(this).jmpress("current"),r=e(this).jmpress("settings"),n=e(this).jmpress("active").data("stepData"),i=e(this).jmpress("container"),c=n.viewPortZoomable||r.viewPort.zoomable,l=e(i).innerWidth(),u=e(i).innerHeight();a.userTranslateX=o(a.userTranslateX+t/a.zoomOriginWindowScale,l*a.userZoom*a.userZoom/c),a.userTranslateY=o(a.userTranslateY+s/a.zoomOriginWindowScale,u*a.userZoom*a.userZoom/c),e(this).jmpress("reselect","zoom")})),e.jmpress("afterDeinit",(function(a,r){e(r.settings.fullscreen?t:this).unbind(r.current.viewPortNamespace),e(s).unbind(r.current.viewPortNamespace)})),e.jmpress("setActive",(function(t,s){var a=s.settings.viewPort,r=s.stepData.viewPortHeight||a.height,n=s.stepData.viewPortWidth||a.width,i=s.stepData.viewPortMaxScale||a.maxScale,o=s.stepData.viewPortMinScale||a.minScale,c=r&&e(s.container).innerHeight()/r,l=n&&e(s.container).innerWidth()/n,u=(l||c)&&Math.min(l||c,c||l);if(u){u=u||1,i&&(u=Math.min(u,i)),o&&(u=Math.max(u,o));var p=s.stepData.viewPortZoomable||s.settings.viewPort.zoomable;if(p){var f=1/u-1/i;u=1/(1/u-(f/=p)*s.current.userZoom)}s.target.transform.reverse(),s.current.userTranslateX&&s.current.userTranslateY?s.target.transform.push(["translate",s.current.userTranslateX,s.current.userTranslateY,0]):s.target.transform.push(["translate"]),s.target.transform.push(["scale",u,u,1]),s.target.transform.reverse(),s.target.perspectiveScale/=u}s.current.zoomOriginWindowScale=u})),e.jmpress("setInactive",(function(t,s){s.nextStep&&t&&e(s.nextStep).attr("id")===e(t).attr("id")||(s.current.userZoom=0,s.current.userTranslateX=0,s.current.userTranslateY=0)}))}(jQuery,document,window),function(e){"use strict";var t=e.jmpress;t("defaults").mouse={clickSelects:!0},t("afterInit",(function(t,s){var a=s.settings,r=a.stepSelector,n=s.current,i=e(this);n.clickableStepsNamespace=".jmpress-"+Math.round(1e5*Math.random(),0),i.bind("click"+n.clickableStepsNamespace,(function(t){if(a.mouse.clickSelects&&!n.userZoom){var s=e(t.target).closest(r);s.is(i.jmpress("active"))||s.length&&(i.jmpress("select",s[0],"click"),t.preventDefault(),t.stopPropagation())}}))})),t("afterDeinit",(function(t,s){e(this).unbind(s.current.clickableStepsNamespace)}))}(jQuery,document,window),function(e,t){"use strict";var s=e.jmpress;s("afterInit",(function(s,a){var r=a.settings,n=a.current,i=a.jmpress;n.mobileNamespace=".jmpress-"+Math.round(1e5*Math.random(),0);var o,c=[0,0];e(r.fullscreen?t:i).bind("touchstart"+n.mobileNamespace,(function(e){o=e.originalEvent.touches[0],c=[o.pageX,o.pageY]})).bind("touchmove"+n.mobileNamespace,(function(e){return o=e.originalEvent.touches[0],e.preventDefault(),!1})).bind("touchend"+n.mobileNamespace,(function(t){var s=[o.pageX,o.pageY],a=[s[0]-c[0],s[1]-c[1]];if(Math.max(Math.abs(a[0]),Math.abs(a[1]))>50)return a=Math.abs(a[0])>Math.abs(a[1])?a[0]:a[1],e(i).jmpress(a>0?"prev":"next"),t.preventDefault(),!1}))})),s("afterDeinit",(function(s,a){var r=a.settings,n=a.current,i=a.jmpress;e(r.fullscreen?t:i).unbind(n.mobileNamespace)}))}(jQuery,document,window),function(e){"use strict";var t=e.jmpress,s="_template_",a="_applied_template_",r={};function n(t,s,a){for(var r in s){var i=r;a&&(i=a+i.substr(0,1).toUpperCase()+i.substr(1)),e.isPlainObject(s[r])?n(t,s[r],i):void 0===t[i]&&(t[i]=s[r])}}function i(t,a){e.isArray(a)?a.length<t.length?e.error("more nested steps than children in template"):t.each((function(t,r){var i=(r=e(r)).data(s)||{};n(i,a[t]),r.data(s,i)})):e.isFunction(a)&&t.each((function(r,i){var o=(i=e(i)).data(s)||{};n(o,a(r,i,t)),i.data(s,o)}))}function o(e,t,s,a){s.children&&i(t.children(a.settings.stepSelector),s.children),function(e,t){n(e,t)}(e,s)}t("beforeInitStep",(function(t,n){t=e(t);var i=n.data,c=i.template,l=t.data(a),u=t.data(s);c&&e.each(c.split(" "),(function(e,s){var a=r[s];o(i,t,a,n)})),l&&o(i,t,l,n),u&&(o(i,t,u,n),t.data(s,null),u.template&&e.each(u.template.split(" "),(function(e,s){var a=r[s];o(i,t,a,n)})))})),t("beforeInit",(function(s,a){var n=t("dataset",this).template,o=a.settings.stepSelector;if(n){var c=r[n];i(e(this).find(o).filter((function(){return!e(this).parent().is(o)})),c.children)}})),t("register","template",(function(t,s){r[t]?r[t]=e.extend(!0,{},r[t],s):r[t]=e.extend(!0,{},s)})),t("register","apply",(function(t,s){if(s)if(e.isArray(s))i(e(t),s);else{var o;o="string"==typeof s?r[s]:e.extend(!0,{},s),e(t).each((function(t,s){var r=(s=e(s)).data(a)||{};n(r,o),s.data(a,r)}))}else{var c=e(this).jmpress("settings").stepSelector;i(e(this).find(c).filter((function(){return!e(this).parent().is(c)})),t)}}))}(jQuery,document,window),function(e){"use strict";e.jmpress("setActive",(function(t,s){s.prevStep!==t&&e(t).triggerHandler("enterStep")})),e.jmpress("setInactive",(function(t,s){s.nextStep!==t&&e(t).triggerHandler("leaveStep")}))}(jQuery,document,window),function(e,t,s,a){"use strict";function r(t,s,a,r){r=r||t.length-1;for(var n=a=a||0;n<r+1;n++)if(e(t[n].element).is(s))return n}function n(t,s,a){e.each(s._on,(function(e,s){t.push({substep:s.substep,delay:s.delay+a}),n(t,s.substep,s.delay+a)}))}e.jmpress("defaults").customAnimationDataAttribute="jmpress",e.jmpress("afterInit",(function(e,t){t.current.animationTimeouts=[],t.current.animationCleanupWaiting=[]})),e.jmpress("applyStep",(function(t,s){var i={},o=[];if(e(t).find("[data-"+s.settings.customAnimationDataAttribute+"]").each((function(a,r){e(r).closest(s.settings.stepSelector).is(t)&&o.push({element:r})})),0!==o.length){e.each(o,(function(t,a){a.info=function(t){for(var s=t.split(" "),a=s[0],r={willClass:"will-"+a,doClass:"do-"+a,hasClass:"has-"+a},n="",i=1;i<s.length;i++){var o=s[i];switch(n){case"":"after"===o?n="after":e.warn("unknown keyword in '"+t+"'. '"+o+"' unknown.");break;case"after":if(o.match(/^[1-9][0-9]*m?s?/)){var c=parseFloat(o);-1!==o.indexOf("ms")?c*=1:-1!==o.indexOf("s")?c*=1e3:-1!==o.indexOf("m")&&(c*=6e4),r.delay=c}else r.after=Array.prototype.slice.call(s,i).join(" "),i=s.length}}return r}(e(a.element).data(s.settings.customAnimationDataAttribute)),e(a.element).addClass(a.info.willClass),a._on=[],a._after=null}));var c={_after:a,_on:[],info:{}};if(e.each(o,(function(e,t){var s=t.info.after;if(s)if("step"===s)s=c;else if("prev"===s)s=o[e-1];else{var n=r(o,s,0,e-1);n===a&&(n=r(o,s)),s=n===a||n===e?o[e-1]:o[n]}else s=o[e-1];if(s){if(!t.info.delay){if(!s._after)return void(s._after=t);s=s._after}s._on.push({substep:t,delay:t.info.delay||0})}})),c._after===a&&0===c._on.length){var l=r(o,s.stepData.startSubstep)||0;c._after=o[l]}var u=[];do{var p=[{substep:c,delay:0}];n(p,c,0),u.push(p),c=null,e.each(p,f)}while(c);i.list=u,e(t).data("substepsData",i)}function f(e,t){if(t.substep._after)return c=t.substep._after,!1}})),e.jmpress("unapplyStep",(function(t,s){var a=e(t).data("substepsData");a&&e.each(a.list,(function(t,s){e.each(s,(function(t,s){s.substep.info.willClass&&e(s.substep.element).removeClass(s.substep.info.willClass),s.substep.info.hasClass&&e(s.substep.element).removeClass(s.substep.info.hasClass),s.substep.info.doClass&&e(s.substep.element).removeClass(s.substep.info.doClass)}))}))})),e.jmpress("setActive",(function(t,s){var r=e(t).data("substepsData");if(r){s.substep===a&&(s.substep="prev"===s.reason?r.list.length-1:0);var n=s.substep;e.each(s.current.animationTimeouts,(function(e,t){clearTimeout(t)})),s.current.animationTimeouts=[],e.each(r.list,(function(t,a){var r=t<n,i=t<=n;e.each(a,(function(t,a){a.substep.info.hasClass&&e(a.substep.element)[(r?"add":"remove")+"Class"](a.substep.info.hasClass),i&&!r&&a.delay&&"prev"!==s.reason?a.substep.info.doClass&&(e(a.substep.element).removeClass(a.substep.info.doClass),s.current.animationTimeouts.push(setTimeout((function(){e(a.substep.element).addClass(a.substep.info.doClass)}),a.delay))):a.substep.info.doClass&&e(a.substep.element)[(i?"add":"remove")+"Class"](a.substep.info.doClass)}))}))}})),e.jmpress("setInactive",(function(t,s){if(s.nextStep!==t){e.each(s.current.animationCleanupWaiting,(function(t,s){!function(t){e.each(t.list,(function(t,s){e.each(s,(function(t,s){s.substep.info.hasClass&&e(s.substep.element).removeClass(s.substep.info.hasClass),s.substep.info.doClass&&e(s.substep.element).removeClass(s.substep.info.doClass)}))}))}(s)})),s.current.animationCleanupWaiting=[];var a=e(t).data("substepsData");a&&s.current.animationCleanupWaiting.push(a)}})),e.jmpress("selectNext",(function(t,s){if(s.substep!==a){var r=e(t).data("substepsData");if(r)return s.substep<r.list.length-1?{step:t,substep:s.substep+1}:void 0}})),e.jmpress("selectPrev",(function(t,s){if(s.substep!==a&&e(t).data("substepsData"))return s.substep>0?{step:t,substep:s.substep-1}:void 0}))}(jQuery,document,window),function(e,t){"use strict";e.jmpress("register","toggle",(function(s,a,r){var n=this;e(t).bind("keydown",(function(t){t.keyCode===s&&(e(n).jmpress("initialized")?e(n).jmpress("deinit"):e(n).jmpress(a))})),r&&e(n).jmpress(a)}))}(jQuery,document,window),function(e){"use strict";function t(t,s,a){if(t.secondary&&-1!==t.secondary.split(" ").indexOf(s)){for(var r in t)if(r.length>9&&0===r.indexOf("secondary")){var n=t[r],i=r.substr(9);i=i.substr(0,1).toLowerCase()+i.substr(1),t[r]=t[i],t[i]=n}e(this).jmpress("reapply",e(a))}}e.jmpress("initStep",(function(e,t){for(var s in t.data)0===s.indexOf("secondary")&&(t.stepData[s]=t.data[s])})),e.jmpress("beforeActive",(function(s,a){t.call(a.jmpress,e(s).data("stepData"),"self",s);var r=e(s).parent();e(r).children(a.settings.stepSelector).each((function(s,r){var n=e(r).data("stepData");t.call(a.jmpress,n,"siblings",r)}));for(var n=1;n<a.parents.length;n++)e(a.parents[n]).children(a.settings.stepSelector).each()})),e.jmpress("setInactive",(function(s,a){t.call(a.jmpress,e(s).data("stepData"),"self",s);var r=e(s).parent();function n(s,r){var n=e(r).data("stepData");t.call(a.jmpress,n,"grandchildren",r)}e(r).children(a.settings.stepSelector).each((function(s,r){var n=e(r).data("stepData");t.call(a.jmpress,n,"siblings",r)}));for(var i=1;i<a.parents.length;i++)e(a.parents[i]).children(a.settings.stepSelector).each(n)}))}(jQuery,document,window),function(e,t,s,a){"use strict";e.jmpress("defaults").duration={defaultValue:-1,defaultAction:"next",barSelector:a,barProperty:"width",barPropertyStart:"0",barPropertyEnd:"100%"},e.jmpress("initStep",(function(e,t){t.stepData.duration=t.data.duration&&parseInt(t.data.duration,10),t.stepData.durationAction=t.data.durationAction})),e.jmpress("setInactive",(function(t,s){var a=s.settings.duration,r=s.current;if(s.stepData.duration||a.defaultValue,r.durationTimeout){if(a.barSelector){var n={transitionProperty:a.barProperty,transitionDuration:"0",transitionDelay:"0",transitionTimingFunction:"linear"};n[a.barProperty]=a.barPropertyStart;var i=e(a.barSelector);e.jmpress("css",i,n),i.each((function(t,s){var a=e(s).next(),r=e(s).parent();e(s).detach(),a.length?a.insertBefore(s):r.append(s)}))}clearTimeout(r.durationTimeout),delete r.durationTimeout}})),e.jmpress("setActive",(function(t,s){var r=s.settings,n=r.duration,i=s.current,o=s.stepData.duration||n.defaultValue;if(o&&o>0){if(n.barSelector){var c={transitionProperty:n.barProperty,transitionDuration:o-2*r.transitionDuration/3-100+"ms",transitionDelay:2*r.transitionDuration/3+"ms",transitionTimingFunction:"linear"};c[n.barProperty]=n.barPropertyEnd,e.jmpress("css",e(n.barSelector),c)}var l=this;i.durationTimeout&&(clearTimeout(i.durationTimeout),i.durationTimeout=a),i.durationTimeout=setTimeout((function(){var t=s.stepData.durationAction||n.defaultAction;e(l).jmpress(t)}),o)}}))}(jQuery,document,window),function(e,t,s){"use strict";var a=e.jmpress,r="jmpress-presentation-";a("defaults").presentationMode={use:!0,url:"presentation-screen.html",notesUrl:!1,transferredValues:["userZoom","userTranslateX","userTranslateY"]},a("defaults").keyboard.keys[80]="presentationPopup",a("afterInit",(function(t,a){var n=a.current;if(n.selectMessageListeners=[],a.settings.presentationMode.use){s.addEventListener("message",(function(t){try{if("string"!=typeof t.data||0!==t.data.indexOf(r))return;var i=JSON.parse(t.data.slice(21));switch(i.type){case"select":e.each(a.settings.presentationMode.transferredValues,(function(e,t){a.current[t]=i[t]})),/[a-z0-9\-]+/i.test(i.targetId)&&typeof i.substep in{number:1,undefined:1}?e(a.jmpress).jmpress("select",{step:"#"+i.targetId,substep:i.substep},i.reason):e.error("For security reasons the targetId must match /[a-z0-9\\-]+/i and substep must be a number.");break;case"listen":n.selectMessageListeners.push(t.source);break;case"ok":clearTimeout(n.presentationPopupTimeout);break;case"read":try{t.source.postMessage(r+JSON.stringify({type:"url",url:s.location.href,notesUrl:a.settings.presentationMode.notesUrl}),"*")}catch(t){e.error("Cannot post message to source: "+t)}break;default:throw"Unknown message type: "+i.type}}catch(t){e.error("Received message is malformed: "+t)}}));try{s.parent&&s.parent!==s&&s.parent.postMessage(r+JSON.stringify({type:"afterInit"}),"*")}catch(t){e.error("Cannot post message to parent: "+t)}}})),a("afterDeinit",(function(t,a){if(a.settings.presentationMode.use)try{s.parent&&s.parent!==s&&s.parent.postMessage(r+JSON.stringify({type:"afterDeinit"}),"*")}catch(t){e.error("Cannot post message to parent: "+t)}})),a("setActive",(function(t,s){var a=e(s.delegatedFrom).attr("id"),n=s.substep,i=s.reason;e.each(s.current.selectMessageListeners,(function(t,o){try{var c={type:"select",targetId:a,substep:n,reason:i};e.each(s.settings.presentationMode.transferredValues,(function(e,t){c[t]=s.current[t]})),o.postMessage(r+JSON.stringify(c),"*")}catch(t){e.error("Cannot post message to listener: "+t)}}))})),a("register","presentationPopup",(function(){var t,a=e(this);a.jmpress("settings").presentationMode.use&&(t=s.open(e(this).jmpress("settings").presentationMode.url),a.jmpress("current").presentationPopupTimeout=setTimeout((function e(){a.jmpress("current").presentationPopupTimeout=setTimeout(e,100);try{t.postMessage(r+JSON.stringify({type:"url",url:s.location.href,notesUrl:a.jmpress("settings").presentationMode.notesUrl}),"*")}catch(e){}}),100))}))}(jQuery,document,window); Save