(function(d){var f,c,k,g=30,j=75,i=10,l=1000;if("ontouchend" in document){f="touchend.cj_swp";c="touchmove.cj_swp";k="touchstart.cj_swp"}else{f="mouseup.cj_swp";c="mousemove.cj_swp";k="mousedown.cj_swp"}d.fn.touchSwipe=function(n,o){if(o){this.data("stopPropagation",true)}if(n){return this.each(m,[n])}};d.fn.touchSwipeLeft=function(n,o){if(o){this.data("stopPropagation",true)}if(n){return this.each(e,[n])}};d.fn.touchSwipeRight=function(n,o){if(o){this.data("stopPropagation",true)}if(n){return this.each(b,[n])}};function m(n){d(this).touchSwipeLeft(n).touchSwipeRight(n)}function e(n){var o=d(this);if(!o.data("swipeLeft")){o.data("swipeLeft",n)}if(!o.data("swipeRight")){h(o)}}function b(n){var o=d(this);if(!o.data("swipeRight")){o.data("swipeRight",n)}if(!o.data("swipeLeft")){h(o)}}d.fn.unbindSwipeLeft=function(){this.removeData("swipeLeft");if(!this.data("swipeRight")){this.unbindSwipe(true)}};d.fn.unbindSwipeRight=function(){this.removeData("swipeRight");if(!this.data("swipeLeft")){this.unbindSwipe(true)}};d.fn.unbindSwipe=function(n){if(!n){this.removeData("swipeLeft swipeRight stopPropagation")}return this.unbind(k+" "+c+" "+f)};function h(n){n.unbindSwipe(true).bind(k,a)}function a(n){var o=new Date().getTime(),r=n.originalEvent.touches?n.originalEvent.touches[0]:n,u=d(this).bind(c,s).one(f,x),q=r.pageX,p=r.pageY,v,t,w;if(u.data("stopPropagation")){n.stopImmediatePropagation()}function x(y){u.unbind(c);if(o&&w){if(w-og&&Math.abs(p-t)v){if(u.data("swipeLeft")){u.data("swipeLeft")("left")}}else{if(u.data("swipeRight")){u.data("swipeRight")("right")}}}}o=w=null}function s(y){if(o){r=y.originalEvent.touches?y.originalEvent.touches[0]:y;w=new Date().getTime();v=r.pageX;t=r.pageY;if(Math.abs(q-v)>i){y.preventDefault()}}}}})(joms.jQuery);