var SwipeCore,_ref,__bind=function(a,b){return function(){return a.apply(b,arguments)}},__indexOf=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;b<c;b++)if(this[b]===a)return b;return-1},__hasProp=Object.prototype.hasOwnProperty,__extends=function(a,b){function d(){this.constructor=a}for(var c in b)__hasProp.call(b,c)&&(a[c]=b[c]);d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype;return a};(_ref=window.SwipeCoreUI)!=null?_ref:window.SwipeCoreUI=SwipeCore={},SwipeCore.Utils={friction:function(a,b){var c,d;d=Math.PI/2*a/b,c=d===0?1:1-Math.sin(d);return Math.abs(c)}},SwipeCoreUI.Swipeable=function(){function a(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G;this.wrapper=a,this.threshold=b,C=D=x=y=F=G=l=m=g=h=0,w=p=f=c=null,q=n=0,B=0,o=null,d=!1,E=[],j=function(){if("createTouch"in document)return!0;try{document.createEvent("TouchEvent").initTouchEvent!=null;return!0}catch(a){return!1}}(),i={start:j?"touchstart":"mousedown",move:j?"touchmove":"mousemove",end:j?"touchend":"mouseup",cancel:"touchcancel"},e=__bind(function(){this.wrapper.removeEventListener(i.move,u,!1),this.wrapper.removeEventListener(i.end,t,!1),C=D=x=y=F=G=l=m=g=h=0,w=p=f=null;return q=0},this),s=__bind(function(a){var b;if(j){b=5,E.length>=b&&(E=E.slice(1,b+1||9e9));return E.push(a)}},this),r=__bind(function(){var a,b,c,d;if(j){a=0;for(c=0,d=E.length;c<d;c++)b=E[c],b.length>a&&(a=b.length);return a}return 1},this),v=__bind(function(a){if(d!==!0){d=!0,a.preventDefault();if(typeof this.active=="function"&&!this.active())return!1;if(j){a.touches&&a.touches.length>q&&(n=q=a.touches.length),s(a.touches);if(a.touches&&a.touches.length>2){e();return}a.touches&&a.touches.length!=null&&(o=a=a.touches[0])}else n=q=1;f===null&&(C=l=F=x=a.pageX,D=m=G=y=a.pageY,g=h=0,f=null),this.startTime=new Date,this.wrapper.addEventListener(i.move,u,!1),this.wrapper.addEventListener(i.end,t,!1);if(typeof this.start=="function")return this.start({touch:a,numFingers:q})}},this),A=__bind(function(a){return this.startTime=new Date},this),k=__bind(function(a,c){var d,e;b=5;return a.pageX-b<(d=c.pageX)&&d<a.pageX+b?a.pageY-b<(e=c.pageY)&&e<a.pageY+b?!0:!1:!1},this),u=__bind(function(a){var b,d,e,i,t,u,v,z,B;a.preventDefault();if(j){s(a.touches),q=r(),n!==q&&A(),t=null,B=a.touches;for(v=0,z=B.length;v<z;v++)u=B[v],k(o,u)&&(t=u);t!==null?a=t:q<2?a=a.touches[0]:a=o}else q=1;g=a.pageX-C,h=a.pageY-D,this.startTime!=null&&(i=new Date,this.dTime=i-this.startTime,e=Math.sqrt(Math.pow(g,2)+Math.pow(h,2)),this.speed=e/this.dTime),F=a.pageX,G=a.pageY,b=Math.abs(g),d=Math.abs(h),__indexOf.call(this.swipeAxis,"horizontal")>=0?(a.pageX>x&&(f="right"),a.pageX<x&&(f="left")):(a.pageY>y&&(f="down"),a.pageY<y&&(f="up")),__indexOf.call(this.swipeAxis,"horizontal")>=0?c=g<0?"left":"right":c=h<0?"up":"down",p!==f&&(l=F,m=G,A()),p=f,x=a.pageX,y=a.pageY,j&&(o=a,n=q);if(typeof this.move=="function")return this.move({target:this.wrapper,direction:p,absDirection:c,velocity:Math.max(b,d),orientation:w,touch:a,d:e,dx:g,dy:h,speed:this.speed,dTime:this.dTime})},this),t=__bind(function(a){var b;if(a.touches&&a.touches.length===0||!a.touches){j&&q===1&&Math.sqrt(Math.pow(g,2)+Math.pow(h,2))<5&&(b=new jQuery.Event("click"),b.pageX=C,b.pageY=D),typeof this.end=="function"&&this.end({target:this.wrapper,direction:p,absDirection:c,orientation:w,d:Math.sqrt(Math.pow(g,2)+Math.pow(h,2)),dSinceDirectionChange:Math.sqrt(Math.pow(F-l,2)+Math.pow(G-m,2)),numFingers:q,speed:this.speed,dTime:this.dTime}),d=!1,E=[];return e()}},this),z=function(a){var b;return b={startX:C,startY:D,dx:g,dy:h}},typeof this.init=="function"&&this.init(this.wrapper,b),this.wrapper.addEventListener(i.start,v,!1);return this}a.prototype.swipeAxis=["vertical","horizontal"];return a}(),SwipeCoreUI.Paginator=function(){function a(b,c){var d,e;this.element=b,this.opts=c,e=this,d={listenerElement:this.element,swipeAxis:["horizontal"],countPages:function(){return __indexOf.call(this.swipeAxis,"vertical")>=0?e.totalPages=Math.ceil(e.element.clientHeight/(e.element.parentNode.clientHeight+e.opts.paginationDistAdjustment())):e.totalPages=Math.ceil(e.element.clientWidth/(e.element.parentNode.clientWidth+e.opts.paginationDistAdjustment()))},paginationDistAdjustment:function(){return 0},paginationOl:null,surpressFirstLastBounce:!1,freeze:!1,swipeThroughLastPageCallback:function(){},swipeThroughFirstPageCallback:function(){},lastPageCallback:function(){}},this.opts=$.extend(d,this.opts),a.__super__.constructor.call(this,this.opts.listenerElement)}__extends(a,SwipeCoreUI.Swipeable),a.prototype.currentPage=0,a.prototype.totalPages=null,a.prototype.initialOffset=null,a.prototype.show=null,a.prototype.init=function(){this.swipeAxis=this.opts.swipeAxis,this.element.style.webkitTransition="-webkit-transform .5s ease",this.element.style.MozTransition="-moz-transform .5s ease",this.totalPages=this.countPages;return this.show(0)},a.prototype.countPages=function(){if(this.lastPagesNum!=null){this.lastPagesNum=this.totalPages;return this.totalPages=this.opts.countPages()}return this.lastPagesNum=this.totalPages=this.opts.countPages()},a.prototype.destruct=function(){},a.prototype.start=function(a){var b;if(this.opts.freeze!==!0){b=new WebKitCSSMatrix(window.getComputedStyle(this.element).webkitTransform),this.initialOffset=__indexOf.call(this.opts.swipeAxis,"vertical")>=0?b.f:b.e,this.element.style.webkitTransition="";return this.element.style.MozTransition=""}},a.prototype.isLastPage=function(){return this.currentPage===this.totalPages-1},a.prototype.isFirstPage=function(){return this.currentPage===0},a.prototype.springDistance=function(a){return.5*a},a.prototype.move=function(a){if(this.opts.freeze!==!0){if(__indexOf.call(this.opts.swipeAxis,"vertical")>=0){this.element.style.webkitTransform="translate3d(0, "+(this.initialOffset+a.dy)+"px, 0)";return this.element.style.MozTransform="translate(0, "+(this.initialOffset+a.dy)+"px)"}if(this.isLastPage()&&a.absDirection==="left"||this.isFirstPage()&&a.absDirection==="right"){this.element.style.webkitTransform="translate3d("+(this.initialOffset+this.springDistance(a.dx))+"px, 0, 0)";return this.element.style.MozTransform="translate("+(this.initialOffset+this.springDistance(a.dx))+"px, 0)"}this.element.style.webkitTransform="translate3d("+(this.initialOffset+a.dx)+"px, 0, 0)";return this.element.style.MozTransform="translate("+(this.initialOffset+a.dx)+"px, 0)"}},a.prototype.toggleFreeze=function(a){return a!=null?this.opts.freeze=a:this.opts.freeze=!this.opts.freeze},a.prototype.shouldTurnPage=function(a,b){var c,d,e,f,g,h,i;g=!1,i=250,e=this.containerSize/2,h=e/i,b<i?(f=e/Math.pow(i,2),c=1,d=f*Math.pow(b/c,2),Math.abs(a>=d)&&(g=!0)):Math.abs(a>=e)&&(g=!0);return g},a.prototype.getEndDurationTransition=function(a,b){return.5},a.prototype.end=function(a){var b,c,d;if(this.opts.freeze!==!0){b=this.getEndDurationTransition(a.d,a.dTime),this.element.style.webkitTransition="-webkit-transform "+b+"s ease",this.element.style.MozTransition="-webkit-transform "+b+"s ease";return this.shouldTurnPage(a.d,a.dTime)?a.numFingers===1?(c=a.absDirection)==="up"||c==="left"?this.show(this.currentPage+1):this.show(this.currentPage-1):a.numFingers===2?(d=a.absDirection)==="up"||d==="left"?this.show(this.totalPages-1):this.show(0):this.show(this.currentPage):this.show(this.currentPage)}},a.prototype.show=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;e=this.currentPage,a==null&&(k=this.currentPage/this.lastPagesNum,console.log("paginator readRatio"+k),a=Math.round(k*this.totalPages)),a==="last"&&(a=this.totalPages-1),a==="last+1"&&(a=this.totalPages),a==="first-1"&&(a=-1),c={noCallback:!1},b=$.extend(c,b),b.noCallback||(a===this.totalPages-1?this.opts.lastPageCallback(!0):0<=a&&a<this.totalPages-1&&this.opts.lastPageCallback(!1)),a<0?(b.noCallback||this.opts.swipeThroughFirstPageCallback(),a=-2):a>this.totalPages-1&&(b.noCallback||this.opts.swipeThroughLastPageCallback(),a=this.totalPages+2),this.opts.surpressFirstLastBounce?this.currentPage=a:this.currentPage=a>0?a<this.totalPages-1?a:this.totalPages-1:0,console.log("paginator currentPage = "+this.currentPage),this.element.parentNode!=null&&(this.containerSize=__indexOf.call(this.opts.swipeAxis,"vertical")>=0?this.element.parentNode.clientHeight:this.element.parentNode.clientWidth,console.log("containersize: "+this.containerSize)),h=0-this.currentPage*(this.containerSize+this.opts.paginationDistAdjustment()),this.currentPage<0&&(h=h+100),this.currentPage>=this.totalPages&&(h=h-100),l=this,e!==this.currentPage&&$(this.element).bind("webkitTransitionEnd",function(){var a;$(this).unbind("webkitTransitionEnd"),console.log("page changing from "+e+" to "+l.currentPage),a=jQuery.Event("pagechange"),a.pageNum=l.currentPage;return $(this).trigger(a)}),__indexOf.call(this.opts.swipeAxis,"vertical")>=0?(this.element.style.webkitTransform="translate3d(0, "+h+"px, 0)",this.element.style.MozTransform="translate(0, "+h+"px)"):(this.element.style.webkitTransform="translate3d("+h+"px, 0, 0)",this.element.style.MozTransform="translate("+h+"px, 0)");if(-1<a&&a<this.totalPages&&this.opts.paginationOl!=null){console.log("paginationOL: "+this.totalPages);if(this.totalPages!==this.opts.paginationOl.getElementsByTagName("li").length){this.opts.paginationOl.innerHTML="";for(j=1,o=this.totalPages;1<=o?j<=o:j>=o;1<=o?j++:j--)i=document.createElement("li"),i.innerHTML=j,this.opts.paginationOl.appendChild(i);d=null,l=this,this.opts.paginationOl.addEventListener("touchstart",function(a){console.log("paginationOL: "+l.opts.freeze);if(l.opts.freeze!==!0)return a.touches[0]?d=a.touches[0]:d=a},!1),this.opts.paginationOl.addEventListener("touchmove",function(a){var b,c,e,f,g;if(l.opts.freeze!==!0){b=document.elementFromPoint(d.pageX,d.pageY);if(b.parentNode&&b.parentNode===this){a.touches[0]?d=a.touches[0]:d=a;if(b.classname!=="hot"){e=this.parentNode.querySelectorAll("li");for(f=0,g=e.length;f<g;f++)c=e[f],c.className="";return b.className="hot"}}}},!1),this.opts.paginationOl.addEventListener("touchend",__bind(function(){if(l.opts.freeze!==!0&&d)return this.show(parseInt(document.elementFromPoint(d.pageX,d.pageY).innerHTML-1))},this),!1)}g=this.opts.paginationOl.querySelectorAll("li");for(m=0,n=g.length;m<n;m++)f=g[m],f.className="";-1<(p=this.currentPage)&&p<this.totalPages&&(g[this.currentPage].className="hot");return this.opts.paginationOl.setAttribute("title",this.currentPage+1+" of "+this.totalPages)}};return a}(),SwipeCoreUI.Flip=function(){function a(b){var c;this.element=b,c={openCallback:function(){}},this.opts=$.extend(c,this.opts),$(this.element).wrap('<div id="flip"></div>').append('<div id="affordance"></div>'),$('<style type="text/css">\t\t\t@-webkit-keyframes glow {\t\t\t\t40% { color: #555; }\t\t\t\t100% { color: #fff; }\t\t\t}\t\t\t#flip { -webkit-perspective: 1000; width: 100%; height: 100%; z-index: 3 !important;}\t\t\t#flip #cover { -webkit-transform-origin: 0 50% 0; -webkit-transition: -webkit-transform 1.5 ease; -webkit-transform: rotate3d(0,0,0,0); }\t\t\t#flip #cover #affordance {\t\t\t\t-webkit-animation-name: glow;\t\t\t\t-webkit-animation-duration: 2s;\t\t\t\t-webkit-animation-iteration-count: infinite;\t\t\t\t-webkit-animation-direction: alternate;\t\t\t\tcolor: #555; text-shadow: 1px 1px 1px black; font: 22px AppleGothic, Arial, sans-serif; line-height: 26px; text-transform: lowercase; position: absolute; top: 45%; right: 0; background: url(http://s1.wp.com/wp-content/mu-plugins/onswipe/themes/warp/assets/images/swipe-tab.png); opacity: .8; padding: 8px 20px 8px 30px;\t\t\t}\t\t\t#flip #cover #affordance:before { content: "Swipe Me"; }\t\t\t#flip.flipped { pointer-events: none; }\t\t\t#flip.flipped #cover { -webkit-transform: rotate3d(0, 1, 0, -90deg); }\t\t</style>').appendTo("head"),a.__super__.constructor.call(this,this.element)}__extends(a,SwipeCoreUI.Swipeable),a.prototype.close=function(){return $(this.element).parent().removeClass("flipped")},a.prototype.open=function(a){if(a.direction==="left"){$(this.element).parent().addClass("flipped");return this.opts.openCallback()}},a.prototype.move=function(a){this.element.style.webkitTransition="-webkit-transform 0 ease";return this.element.style.webkitTransform="rotate3d(0, 1, 0, -"+90*(a.d/this.element.offsetWidth)+"deg)"},a.prototype.end=function(a){this.element.style.webkitTransform="",this.element.style.webkitTransition="-webkit-transform 1.5s ease",this.open(a);return!1};return a}(),SwipeCoreUI.Fold=function(){function a(b){var c;this.element=b,c={openCallback:function(){}},this.opts=$.extend(c,this.opts),$(this.element).wrap('<div id="fold" style="-webkit-perspective: 1000; width: 100%; height: 100%;"></div>'),this.element2=$(this.element).clone().addClass("cover2").prependTo("#fold").get(0),$('<style type="text/css">\t\t\t#fold #cover { background-size: cover; background-position: center; -webkit-transform-origin: 50% 50% 50%; -webkit-transition: -webkit-transform 1.5s ease; }\t\t\t#fold.flipped { pointer-events: none; }\t\t\t#fold.flipped #cover { -webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 1, 0, 90deg); }\t\t\t#fold.flipped .cover2 { -webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 1, 0, -90deg); }\t\t</style>').appendTo("head"),a.__super__.constructor.call(this,this.element)}__extends(a,SwipeCoreUI.Swipeable),a.prototype.close=function(){return $(this.element).parent().removeClass("flipped")},a.prototype.open=function(a){if(a.direction==="left"){$(this.element).parent().addClass("flipped");return this.opts.openCallback()}},a.prototype.move=function(a){this.element.style.webkitTransition="all 0 ease",this.element.style.webkitTransform="translate3d(-"+a.d/2+"px, 0, 0) rotate3d(0, 1, 0, "+90*(a.d/this.element.offsetWidth)+"deg)",this.element2.style.webkitTransition="all 0 ease";return this.element2.style.webkitTransform="translate3d(-"+a.d/2+"px, 0, 0) rotate3d(0, 1, 0, -"+90*(a.d/this.element.offsetWidth)+"deg)"},a.prototype.end=function(a){this.element.style.webkitTransform="",this.element.style.webkitTransition="all 1.5s ease",this.element2.style.webkitTransform="",this.element2.style.webkitTransition="all 1.5s ease",this.open(a);return!1};return a}(),SwipeCoreUI.Lift=function(){function a(b,c){var d;this.element=b,this.opts=c,d={swipeAxis:["vertical"],direction:"vertical",openCallback:function(){}},this.opts=$.extend(d,this.opts),this.swipeAxis=this.opts.swipeAxis,this.direction=this.opts.direction,this.direction==="vertical"?$('<style type="text/css">\t\t\t\t@-webkit-keyframes glow {\t\t\t\t\t40% { color: #555; }\t\t\t\t\t100% { color: #fff; }\t\t\t\t}\t\t\t\t#lift { width: 100%; height: 100%; }\t\t\t\t#lift.flipped { pointer-events: none; }\t\t\t\t#lift.flipped #liftAffordanceText { opacity: 0; }\t\t\t\t#lift:not(.flipped) #cover{ -webkit-transform: translate3d(0, 0, 0); }\t\t\t\t#lift.flipped #cover { -webkit-transition: -webkit-transform 1.5s ease; }\t\t\t\t#lift #liftAffordance { position: absolute; right: 0; bottom: 0; left: 0; background: black; background-image: -webkit-gradient(linear, center top, center bottom, from(rgba(10, 10, 10, 1)), to(rgba(50, 50, 50, 1))); height: 29px; padding: 3px; text-align: center; opacity: .9; }\t\t\t\t#lift #liftAffordance #liftAffordanceText {\t\t\t\t\t-webkit-animation-name: glow;\t\t\t\t\t-webkit-animation-duration: 2s;\t\t\t\t\t-webkit-animation-iteration-count: infinite;\t\t\t\t\t-webkit-animation-direction: alternate;\t\t\t\t\t-webkit-transition: opacity 1.5s ease; color: #555555; text-shadow: 1px 1px 1px black; font: 22px AppleGothic, Arial, sans-serif; text-transform: lowercase;\t\t\t\t}\t\t\t</style>').appendTo("head"):$('<style type="text/css">\t\t\t\t@-webkit-keyframes glow {\t\t\t\t\t40% { color: #555; }\t\t\t\t\t100% { color: #fff; }\t\t\t\t}\t\t\t\t#lift { width: 100%; height: 100%; }\t\t\t\t#lift.flipped { pointer-events: none; }\t\t\t\t#lift.flipped #liftAffordanceText { opacity: 0; }\t\t\t\t#lift:not(.flipped) #cover{ -webkit-transform: translate3d(0, 0, 0); }\t\t\t\t#lift.flipped #cover { -webkit-transition: -webkit-transform 1.5s ease; }\t\t\t\t#lift #liftAffordance { position: absolute; right: -100%; bottom: 0; left: 100%; width: 1500px; -webkit-transform-origin: 0 100%; -webkit-transform: rotate3d(0, 0, 1, -90deg); bottom: 0; background: black; background-image: -webkit-gradient(linear, center top, center bottom, from(rgba(10, 10, 10, 1)), to(rgba(50, 50, 50, 1))); height: 29px; padding: 3px; padding-left: 50%; opacity: .9; }\t\t\t\t#lift #liftAffordance #liftAffordanceText {\t\t\t\t\t-webkit-animation-name: glow;\t\t\t\t\t-webkit-animation-duration: 2s;\t\t\t\t\t-webkit-animation-iteration-count: infinite;\t\t\t\t\t-webkit-animation-direction: alternate;\t\t\t\t\t-webkit-transition: opacity 1.5s ease; color: #555555; text-shadow: 1px 1px 1px black; font: 22px AppleGothic, Arial, sans-serif; text-transform: lowercase;\t\t\t\t}\t\t\t</style>').appendTo("head"),$(this.element).wrap('<div id="lift"></div>').append('<div id="liftAffordance"><span id="liftAffordanceText">Swipe Me</span></div>'),a.__super__.constructor.call(this,this.element)}__extends(a,SwipeCoreUI.Swipeable),a.prototype.move=function(a){this.element.style.webkitTransition="all 0 ease",this.direction==="horizontal"?this.element.style.webkitTransform="translate3d(-"+a.d+"px, 0, 0)":this.element.style.webkitTransform="translate3d(0, -"+a.d+"px, 0)";return $("#liftAffordanceText").css("-webkit-transition","opacity 0 ease").css("opacity",1-parseFloat(a.d)/500)},a.prototype.close=function(){$(this.element).css({"-webkit-transform":"translate3d(0,0,0)"});return $(this.element).parent().removeClass("flipped")},a.prototype.open=function(a){if(this.direction==="horizontal"){if(a==="left"||a==="override")$(this.element).parent().addClass("flipped"),$(this.element).css({"-webkit-transform":"translate3d(-1500px, 0, 0)"});if(a!=="override")return this.opts.openCallback()}else{if(a==="up"||a==="override")$(this.element).parent().addClass("flipped"),$(this.element).css({"-webkit-transform":"translate3d(0, -1500px, 0)"});if(a!=="override")return this.opts.openCallback()}},a.prototype.end=function(a){this.element.style.webkitTransform="",this.element.style.webkitTransition="all 1.5s ease",$("#liftAffordanceText").css("-webkit-transition","opacity 1.5s ease").css("opacity","");return this.open(a.direction)};return a}(),SwipeCoreUI.Peel=function(){function a(b,c){var d,e;this.element=b,this.opts=c,d={openCallback:function(){}},this.opts=$.extend(d,this.opts),$(this.element).wrap('<div id="peel"></div>'),$("#peel").append('<div id="corner" style="'+(this.opts!=null&&this.opts.accentColor!=null?"background: -webkit-gradient(linear, left top, center center, from(rgba(255, 255, 255, .5)), to(rgba(255, 255, 255, 0))), -webkit-gradient(linear, 50% 50%, 38% 37%, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, 0))), "+this.opts.accentColor:"")+'"></div>'),a.__super__.constructor.call(this,$("#peel").get(0)),e=this.element,$(this.element).width(window.innerWidth).height(window.innerHeight),window.addEventListener("orientationchange",function(){return $(e).width(window.innerWidth).height(window.innerHeight)},!1),$('<style type="text/css">#peel {\t\t\tposition: absolute; width: 3000px; height: 3000px; bottom: -1500px; right: 0; overflow: hidden;\t\t\t-webkit-box-shadow: 5px 0 25px rgba(0, 0, 0, .5);\t\t\t-webkit-transform-origin: 100% 50%;\t\t\t-webkit-transform: rotate(45deg) translate3d(-35px, 0, 0);\t\t\t-webkit-transition: -webkit-transform 2.5s ease;\t\t\tbox-shadow: 5px 0 25px rgba(0, 0, 0, .5);\t\t\t-moz-transform-origin: 100% 50%;\t\t\t-moz-transform: rotate(45deg) translate(-35px, 0);\t\t\t-moz-transition: all 2.5s ease;\t\t\tz-index: 3;\t\t}\t\t#peel #cover {\t\t\ttop: auto; left: auto; right: 0; bottom: 1500px;\t\t\t-webkit-transform-origin: 100% 100%;\t\t\t-webkit-transform: translate3d(35px, 0, 0) rotate(-45deg);\t\t\t-webkit-transition: -webkit-transform 2.5s ease;\t\t/*\t-webkit-backface-visibility: hidden;\t/*\t/* prevents flicker if necessary */\t\t\t-moz-transform-origin: 100% 100%;\t\t\t-moz-transform: translate(35px, 0) rotate(-45deg);\t\t\t-moz-transition: -moz-transform 2.5s ease;\t\t}\t\t#peel #cover ~ #corner {\t\t\tposition: absolute; width: 5000px; height: 5000px; right: -2500px; bottom: -1000px;\t\t/*\t-webkit-box-shadow: -250px -250px 2500px rgba(0, 0, 0, .25);\t/* absolutely kills the browser */\t\t\tbackground: -webkit-gradient(linear, left top, center center, from(rgba(255, 255, 255, .5)), to(rgba(255, 255, 255, 0))), -webkit-gradient(linear, 50% 50%, 38% 37%, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, 0))), #1a1a1a;\t\t\t-webkit-transform: rotate(-45deg) scale3d(.01, .01, 1);\t\t\t-webkit-transition: -webkit-transform 2.5s ease;\t\t\t-moz-transform: rotate(-45deg) scale(.01, .01);\t\t\t-moz-transition: all 2.5s ease;\t\t\tz-index: 3;\t\t}\t\t#peel.flipped {\t\t\tpointer-events: none;\t\t\t-webkit-transform: rotate(45deg) translate3d(-3000px, 0, 0);\t\t\t-moz-transform: rotate(45deg) translate(-3000px, 0);\t\t}\t\t#peel.flipped #cover {\t\t\t-webkit-transform: translate3d(3000px, 0, 0) rotate(-45deg);\t\t\t-moz-transform: translate(3000px, 0) rotate(-45deg);\t\t}\t\t#peel.flipped #cover ~ #corner {\t\t\t-webkit-transform: scale3d(1, 1, 1);\t\t\t-moz-transform: scale(1, 1);\t\t}\t\t</style>').appendTo("head")}__extends(a,SwipeCoreUI.Swipeable),a.prototype.move=function(a){document.getElementById("peel").style.webkitTransition="-webkit-transform 0 ease",this.element.style.webkitTransition="all 0 ease",document.getElementById("corner").style.webkitTransition="-webkit-transform 0 ease",document.getElementById("peel").style.webkitTransform="rotate(45deg) translate3d("+(-35-a.d/2)+"px, 0, 0)",this.element.style.webkitTransform="translate3d("+(35+a.d/2)+"px, 0, 0) rotate(-45deg)",document.getElementById("corner").style.webkitTransform="rotate("+(-45+45*(a.d/2/2965))+"deg) scale3d("+(.01+.99*(a.d/2/2965))+", "+(.01+.99*(a.d/2/2965))+", 1)",document.getElementById("peel").style.MozTransition="-webkit-transform 0s ease",this.element.style.MozTransition="all 0s ease",document.getElementById("corner").style.MozTransition="-webkit-transform 0s ease",document.getElementById("peel").style.MozTransform="rotate(45deg) translate("+(-35-a.d/2)+"px, 0)",this.element.style.MozTransform="translate("+(35+a.d/2)+"px, 0) rotate(-45deg)";return document.getElementById("corner").style.MozTransform="rotate("+(-45+45*(a.d/2/2965))+"deg) scale("+(.01+.99*(a.d/2/2965))+", "+(.01+.99*(a.d/2/2965))+")"},a.prototype.close=function(){return $("#peel").removeClass("flipped")},a.prototype.open=function(a){if(a.direction==="up"||a.direction==="left"){$("#peel").addClass("flipped"),$("#peelHelper").css("pointer-events","none");return this.opts.openCallback()}},a.prototype.end=function(a){document.getElementById("peel").style.webkitTransform="",this.element.style.webkitTransform="",document.getElementById("corner").style.webkitTransform="",document.getElementById("peel").style.webkitTransition="-webkit-transform 2.5s ease",this.element.style.webkitTransition="all 2.5s ease",document.getElementById("corner").style.webkitTransition="-webkit-transform 2.5s ease",document.getElementById("peel").style.MozTransform="",this.element.style.MozTransform="",document.getElementById("corner").style.MozTransform="",document.getElementById("peel").style.MozTransition="-webkit-transform 2.5s ease",this.element.style.MozTransition="all 2.5s ease",document.getElementById("corner").style.MozTransition="-webkit-transform 2.5s ease",this.open(a);return!1};return a}(),SwipeCoreUI.Pinchable=function(){function a(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;this.wrapper=a,this.opts=b,q=j=0,k=r=0,s=!1,this.isOpening=!1,m=0,c=!1,l=[],this.transitionDuration=parseFloat($(this.wrapper).css("-webkit-transition-duration"))*1e3;if(this.opts!=null){if(this.opts.from!=null&&this.opts.openCallback!=null){b=this.opts,f=document.querySelectorAll(b.from);for(u=0,v=f.length;u<v;u++)e=f[u],e.addEventListener("click",function(){return b.openCallback()},!1)}this.opts.openCallback!=null&&(this.openCallback=this.opts.openCallback),this.opts.closeCallback!=null&&(this.closeCallback=this.opts.closeCallback),this.opts.pinchStartCallback!=null&&(this.pinchStartCallback=this.opts.pinchStartCallback),this.opts.pinchBounceBackCallback!=null&&(this.pinchBounceBackCallback=this.opts.pinchBounceBackCallback),this.opts.numFinger==null?m=3:m=this.opts.numFinger}else m=3;h=function(){if("createTouch"in document)return!0;try{document.createEvent("TouchEvent").initTouchEvent!=null;return!0}catch(a){return!1}}(),g={start:h?"touchstart":"mousedown",move:h?"touchmove":"mousemove",end:h?"touchend":"mouseup",cancel:"touchcancel"},d=__bind(function(){this.wrapper.removeEventListener(g.move,o,!1);return this.wrapper.removeEventListener(g.end,n,!1)},this),p=__bind(function(a){var b,e,f,h,i,p,s,t,u,v,w;if(typeof this.active=="function"&&!this.active())return!1;if(!c)if(a.touches&&a.touches.length!==m)d();else{c=!0,a.preventDefault(),this.opts&&this.opts.pinchStartCallback&&this.opts.pinchStartCallback(),l=a.touches,f=b=null,v=a.touches;for(p=0,t=v.length;p<t;p++){i=v[p];if(f===null||i.pageY>f.pageY)f=i;if(b===null||i.pageY<b.pageY)b=i}j=q=f.pageY-b.pageY,e=h=null,w=a.touches;for(s=0,u=w.length;s<u;s++){i=w[s];if(e===null||i.pageX>=e.pageX)e=i;if(h===null||i.pageX<=h.pageX)h=i}k=r=Math.sqrt(Math.pow(h.pageX-e.pageX,2)+Math.pow(h.pageY-e.pageY,2)),this.wrapper.addEventListener(g.move,o,!1),this.wrapper.addEventListener(g.end,n,!1);if(typeof this.start=="function")return this.start(a)}},this),i=__bind(function(a,b){var c,d,e;c=3;return a.pageX-c<(d=b.pageX)&&d<a.pageX+c?a.pageY-c<(e=b.pageY)&&e<a.pageY+c?!0:!1:!1},this),o=__bind(function(a){var b,c,d,e,f,g,h,j,m,n,o,p,q,t,u,v;a.preventDefault(),h=[];for(n=0,q=l.length;n<q;n++){f=l[n],v=a.touches;for(o=0,t=v.length;o<t;o++)e=v[o],i(f,e)&&h.push(e)}b=j=null;for(p=0,u=h.length;p<u;p++){m=h[p];if(b===null||m.pageX>b.pageX)b=m;if(j===null||m.pageX<j.pageX)j=m}newPinchDist=Math.sqrt(Math.pow(j.pageX-b.pageX,2)+Math.pow(j.pageY-b.pageY,2)),d=5,c=100,newPinchDist+d<k?s=!1:newPinchDist!==k&&(newPinchDist>k+d?s=!0:newPinchDist-k>c&&(s=!0)),k=newPinchDist,g=k/r,g>1&&(g=1+(g-1)*.5),g=parseFloat(g),this.wrapper.style.webkitTransition="all 0s ease",this.wrapper.style.webkitTransform="scale3d("+g+", "+g+", 1)",typeof this.move=="function"&&this.move({target:this.wrapper});return this.wrapper.style.webkitTransform="scale3d("+g+", "+g+", 1)"},this),n=__bind(function(a){var b;if(a.touches.length<m){this.wrapper.style.webkitTransform="",this.wrapper.style.webkitTransition="all .5s ease",s?this.opts&&this.opts.pinchBounceBackCallback&&this.opts.pinchBounceBackCallback():this.opts&&this.opts.closeCallback&&(b=this,b.opts.closeCallback()),typeof this.end=="function"&&this.end({target:this.wrapper,pinchWasExpanding:s}),c=!1;return d()}},this),t=function(a){var b;return b={startX:startX,startY:startY,dx:dx,dy:dy}},typeof this.init=="function"&&this.init(this.wrapper,threshold),this.wrapper.addEventListener(g.start,p,!1);return this}a.prototype.swipeAxis=["vertical","horizontal"],a.prototype.setIsOpening=function(){var a;a=this,this.isOpening=!0,console.log(this.isOpening);return window.setTimeout(function(){a.isOpening=!1;return console.log(a.isOpening)},this.transitionDuration)};return a}()
