text: (function(f){var g=location.search?k(location.search).page:1;var b={index:g,pageContainer:".item",after:function(){},before:function(){},speed:false,refresh:false,useWheel:true,useKeyboard:true,useAnimation:true,};var e=true;var x=true;var j=b.index-1;var t=700;var p=1;var u=window.innerHeight;var q="";var v="";var r={};window.slidePage={init:function(z,A){t=f(b.pageContainer).css("transition-duration").replace("s","")*1000;p=f(b.pageContainer).length;f.extend(b,z);l(b);c(b);A&&A.call(this)},index:function(z){if(z>0&&z!=j+1){z=parseInt(z)-1;var C=f(".item").eq(z).children().height();var B=(C-u)>20?1:0;if(z>j){for(var A=j;A<z;A++){s(f(b.pageContainer).eq(A));a(A+2,B);m(A+2)}}else{if(z<j){for(var A=j;A>=z+1;A--){i(f(b.pageContainer).eq(A));a(A,B);m(A)}}}j=z}return j},next:function(){if(j<p-1){var z=f(b.pageContainer).eq(j++);s(z);a(z.index()+2);m(z.index()+2);x=false}},prev:function(){if(j>0){var z=f(b.pageContainer).eq(j--);i(z);a(z.index());m(z.index());x=false}},fire:function(z){w(z)},remove:function(z,A){if(!v.match(z)){p--;if(j>z){j--}v=z+","+v;r[z]=f(b.pageContainer).eq(z-1).remove();A&&A()}},recover:function(z,A){if(v.match(z)){v=v.replace(z+",","");if(z>=p){f(b.pageContainer).eq(p-1).after(r[z])}else{f(b.pageContainer).eq(z-1).before(r[z])}if(j>z){j++}p++;if(q=="prev"){o.prevSlide(r[z])}else{o.prevSlide(r[z])}A&&A()}},canNext:true,canPrev:true,isScroll:false,};var o={nextSlide:function(A){A.css({transform:"translate3d(0px, -100%, 0px)","-webkit-transform":"translate3d(0px,-100%, 0px)"});var z=n("0");A.next().css(z)},prevSlide:function(z){z.prev().css({"-webkit-transform":"scale(1)",transform:"scale(1)"});z.css(n("100%"))},showSlide:function(z){z.css({"-webkit-transform":"scale(1)",transform:"scale(1)"});z.next().css(n("100%"))}};function h(){var z=navigator.userAgent;var C=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"];var A=true;for(var B=0;B<C.length;B++){if(z.indexOf(C[B])>0){A=false;break}}return A}function n(z){return{"-webkit-transform":"translate3d(0px, "+z+" 0px)",transform:"translate3d(0px, "+z+", 0px)"}}function d(){if(b.refresh&&x&&b.useAnimation){f(b.pageContainer).eq(j).find(".step").addClass("hide");f(b.pageContainer).eq(j).find(".lazy").addClass("hide")}}function k(C){var B={};if(/\?/.test(C)){var A=C.substring(C.indexOf("?")+1);var F=A.split("&");for(var D=0,z=F.length;D<z;D++){var G=F[D];var E=G.split("=");B[E[0]]=E[1]}return B}}function s(z){q="next";if(z.next().length){currentItem=z.next();y(z.next(),q);o.nextSlide(z)}else{o.showSlide(z)}keyindex=f(b.pageContainer).index(z);b.before(z.index()+1,q,z.index()+2);d()}function i(z){q="prev";if(z.prev().length){currentItem=z.prev();y(z.prev(),q);o.prevSlide(z);z.prev().prev().css(n("-100%"))}else{o.showSlide(z)}b.before(z.index()+1,q,z.index());keyindex=f(b.pageContainer).index(z);d()}function l(A){if(!!A.speed){f(A.pageContainer).css({"transition-duration":A.speed+"ms","-webkit-transition-duration":A.speed+"ms"})}slidePage.index(A.index);if(!!A.useAnimation){var z=f(A.pageContainer);z.find(".step").addClass("hide");z.find(".lazy").addClass("hide");y(z.eq(A.index-1))}}function y(B,A){e=true;setTimeout(function(){x=A||x},b.speed||t);var z=f(B).find(".step");z.each(function(C,D){var E=f(D).attr("data-delay")||100;setTimeout(function(){f(D).removeClass("hide")},E)})}function w(z){var B=f(b.pageContainer).eq(z-1);var A=B.find(".lazy");A.each(function(C,D){var E=f(D).attr("data-delay")||100;setTimeout(function(){f(D).removeClass("hide")},E)})}function a(C,B){var B=B===0?0:false||1;var A=f(".item").eq(C-1).children().height();if((A-u)>20){var z=q=="next";!z?f(b.pageContainer).eq(C-1).scrollTop(A-u-B):f(b.pageContainer).eq(C-1).scrollTop(B)}}function m(A){var z=f(".item").eq(A-1).children().height();if((z-u)>20){f(b.pageContainer).eq(A-1).on("scroll",function(D){var C=z<=this.scrollTop+u+1;var B=this.scrollTop==0;slidePage.canSlide=C||B;slidePage.canPrev=B&&!C;slidePage.canNext=C&&!B;slidePage.isScroll=!(slidePage.canSlide)})}else{slidePage.canPrev=true;slidePage.canNext=true;slidePage.canSlide=true;slidePage.isScroll=false}}function c(z){function A(C){var C=C||window.event;if(C.wheelDeltaY<0||C.wheelDelta<0||C.detail>0){slidePage.canNext&&x&&slidePage.next()}else{if(C.wheelDeltaY>0||C.wheelDelta>0||C.detail<0){slidePage.canPrev&&x&&slidePage.prev()}}}if(!!z.useWheel){document.onmousewheel=A;document.addEventListener&&document.addEventListener("DOMMouseScroll",A,false)}if(!!z.useKeyboard){document.onkeydown=function(C){if(C.keyCode=="40"&&x&&j<p-1){slidePage.canNext&&slidePage.next()}else{if(C.keyCode=="38"&&x&&j>0){slidePage.canPrev&&slidePage.prev()}}}}var B=0;document.getElementById("slidePage-container").addEventListener("touchstart",function(C){B=C.touches[0].clientY});document.getElementById("slidePage-container").addEventListener("touchmove",function(D){var C=D.touches[0].clientY-B;!slidePage.canPrev&&C>5&&(slidePage.isScroll=true);!slidePage.canNext&&C<-5&&(slidePage.isScroll=true);!slidePage.isScroll&&D.preventDefault()});f(z.pageContainer).on({swipeUp:function(){slidePage.canNext&&slidePage.next()},swipeDown:function(){slidePage.canPrev&&slidePage.prev()}});f(z.pageContainer).on("transitionend webkitTransitionEnd",function(D){var C=v.split(",").length;if(e){if(C>1){z.after(q=="next"?j+1:j+2,q,j+2)}else{z.after(q=="next"?j:j+2,q,j+1)}e=false}})}})($);(function(f){var g={},a,k,c,i,d=750,l;function j(p,o,r,q){return Math.abs(p-o)>=Math.abs(r-q)?(p-o>0?"Left":"Right"):(r-q>0?"Up":"Down")}function n(){i=null;if(g.last){g.el.trigger("longTap");g={}}}function b(){if(i){clearTimeout(i)}i=null}function e(){if(a){clearTimeout(a)}if(k){clearTimeout(k)}if(c){clearTimeout(c)}if(i){clearTimeout(i)}a=k=c=i=null;g={}}function m(o){return(o.pointerType=="touch"||o.pointerType==o.MSPOINTER_TYPE_TOUCH)&&o.isPrimary}function h(p,o){return(p.type=="pointer"+o||p.type.toLowerCase()=="mspointer"+o)}f(document).ready(function(){var p,t,q=0,r=0,s,o;if("MSGesture" in window){l=new MSGesture();l.target=document.body}f(document).bind("MSGestureEnd",function(v){var u=v.velocityX>1?"Right":v.velocityX<-1?"Left":v.velocityY>1?"Down":v.velocityY<-1?"Up":null;if(u){g.el.trigger("swipe");g.el.trigger("swipe"+u)}}).on("touchstart MSPointerDown pointerdown",function(u){u.Touches=u.originalEvent?u.originalEvent.changedTouches:u.touches;if((o=h(u,"down"))&&!m(u)){return}s=o?u:u.Touches[0];if(u.Touches&&u.Touches.length===1&&g.x2){g.x2=undefined;g.y2=undefined}p=Date.now();t=p-(g.last||p);g.el=f("tagName" in s.target?s.target:s.target.parentNode);a&&clearTimeout(a);g.x1=s.pageX;g.y1=s.pageY;if(t>0&&t<=250){g.isDoubleTap=true}g.last=p;i=setTimeout(n,d);if(l&&o){l.addPointer(u.pointerId)}}).on("touchmove MSPointerMove pointermove",function(u){u.Touches=u.originalEvent?u.originalEvent.changedTouches:u.touches;if((o=h(u,"move"))&&!m(u)){return}s=o?u:u.Touches[0];b();g.x2=s.pageX;g.y2=s.pageY;q+=Math.abs(g.x1-g.x2);r+=Math.abs(g.y1-g.y2)}).on("touchend MSPointerUp pointerup",function(u){if((o=h(u,"up"))&&!m(u)){return}b();if((g.x2&&Math.abs(g.x1-g.x2)>30)||(g.y2&&Math.abs(g.y1-g.y2)>30)){c=setTimeout(function(){g.el.trigger("swipe");g.el.trigger("swipe"+(j(g.x1,g.x2,g.y1,g.y2)));g={}},0)}else{if("last" in g){if(q<30&&r<30){k=setTimeout(function(){var v=f.Event("tap");v.cancelTouch=e;g.el.trigger(v);if(g.isDoubleTap){if(g.el){g.el.trigger("doubleTap")}g={}}else{a=setTimeout(function(){a=null;if(g.el){g.el.trigger("singleTap")}g={}},250)}},0)}else{g={}}}}q=r=0}).on("touchcancel MSPointerCancel pointercancel",e);f(window).on("scroll",e)});["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap","singleTap","longTap"].forEach(function(o){f.fn[o]=function(p){return this.on(o,p)}})})($);