(function (d) {var l= ' left ', k= ' right ', c= ' up ', r= ' down ', b= ' in ', s= ' out ', i= ' none ', o= "Auto", u= "horizontal", p= "vertical" , f= "All", e= "Start", h= "move", g= ' End ', m= "Cancel", a= "Ontouchstart" in window,t= "TouchSwipe"; var j={fingers:1, Threshold:75,maxtimethreshold:null,swipe:null,swipeleft:null,swiperight:null,swipeup:null,swipedown:null, Swipestatus:null,pinchin:null,pinchout:null,pinchstatus:null,click:null,triggerontouchend:true,allowpagescroll : "Auto", fallbacktomouseevents:true,excludedelements: "button, input, select, textarea, a,. noswipe"};d. fn.swipe= function (x) {var w=d (this), V=w.data (t), if (v&&typeof x=== "string") {if (v[x)) {return v[x].apply Array.prototype.slice.call (arguments,1))}else{d.error ("method" +x+ "does not exist on Jquery.swipe")}}else{if (!v && (typeof x=== "Object" | |! x)) {return q.apply (this,arguments)}}return W};d. Fn.swipe.defaults=j;d.fn.swipe.phases={phase_start:e,phase_move: H,PHASE_END:G,PHASE_CANCEL:M};d. fn.swipe.directions={left:l,right:k,up:c,down:r,in:b,out:s};d.Fn.swipe.pagescroll={none:i,horizontal:u,vertical:p,auto:o};d. Fn.swipe.fingers={one:1,two:2,three:3,all:f}; function Q (v) {if (v&& v.allowpagescroll===undefined&& v.swipe!==undefined| | v.swipestatus!==undefined))) {v.allowpagescroll=i}if (!v) {v={}}v=d.extend ({},d.fn.swipe.defaults,v); This.each (function () {var x=d (this); var w=x.data (t); if (!w) {w=new n (this,v); X.data (T,w)}})}function N (j,r) {var aj= (a| |! r.fallbacktomouseevents), Ae=aj? " Touchstart ":" MouseDown ", K=aj?" Touchmove ":" MouseMove ", Ac=aj?" Touchend ":" MouseUp ", i=" Touchcancel "; var p=0;var e=null;var s=0;var af=0;var w=0;var u=1;var ak=0;var A=d (J); var F=" Start "; var ai=0;var t=null;var B=0;var M=0;try{a.bind (AE,AA); A.bind (i,d)}catch (AG) {d.error ("Events not supported" +ae+ "," +i+ "on Jquery.swipe")}this.enable=function () {A.bind (AE , AA); A.bind (i,d); return a};this.disable=function () {h (); return a};this.destroy=function () {h (); A.data (t,null); return a};function AA (AO) {if (L)) {return}if (d (Ao.target). Closest (R.excludedelements,a). Length>0) {Return}var Ap=ao.originalevent;var An,am=a?ap.touches[0]:ap; F=e;if (a) {Ai=ap.touches.length}else{ao.preventdefault ()}p=0; E=null;ak=null; s=0;af=0;w=0; U=1; T=al (); if (!a| | (ai===r.fingers| | R.FINGERS===F) | | W ()) {T[0].start.x=t[0].end.x=am.pagex; T[0].start.y=t[0].end.y=am.pagey; B=x (); if (ai==2) {T[1].start.x=t[1].end.x=ap.touches[1].pagex; T[1].start.y=t[1].end.y=ap.touches[1].pagey;af=w=n (T[0].start,t[1].start)}if (r.swipestatus| | R.pinchstatus) {An=ah (AP,F)}}else{d (AP) an=false}if (An===false) {F=m;ah (ap,f); return An}else{v (TRUE); A.bind (K,G); A.bind (Ac,o)}}function G (AO) {var aq=ao.originalevent;if (f===g| | f===m) {Return}var an,am=a?aq.touches[0]:aq; T[0].end.x=a?aq.touches[0].pagex:am.pagex; T[0].end.y=a?aq.touches[0].pagey:am.pagey; M=x (); E=z (T[0].start,t[0].end); if (a) {ai=aq.touches.length}f=h;if (ai==2) {if (af==0) {T[1].start.x=aq.touches[1].pagex; T[1].start.y=aq.touches[1].pagey;af=w=n (T[0].start,t[1].start)}else{t[1].end.x=aq.touches[1].pagex; T[1].end.y=aq.touches[1].pagey;w=n (T[0].end,t[1].end); Ak=x (T[0].end,t[1].end)}u=v (af,w)}if (ai===r.fingers| | R.FINGERS===F) | |! A) {Y (ao,e); P=z (T[0].start,t[0].end); S=c (T[0].start,t[0].end); if (r.swipestatus| | R.pinchstatus) {An=ah (aq,f)}if (! R.triggerontouchend) {var ap=! Y (); if (Q () ===true) {F=g;an=ah (AQ,F)}else{if (AP) {F=m;ah (aq,f)}}}}else{f=m;ah (aq,f)}if (an===false) {F=m;ah (Aq,F)}} function O (AO) {var au=ao.originalevent;if (au.touches&&au.touches.length>0) {return true} Ao.preventdefault (); M=x (); if (af!=0) {w=n (t[0].end,t[1].end); U=v (af,w); Ak=x (t[0].end,t[1].end)}p=z (t[0].start,t[0].end); E=z (T[0].start,t[0].end); S=c (); if (r.triggerontouchend| | (r.triggerontouchend===false&&f===h)) {F=g;var Aq=ad () | |! W (); var an= (ai===r.fingers| | R.FINGERS===F) | |! a); var am=t[0].end.x!==0;var ap= (An&&am&&aq); if (AP) {var ar=y (); var at=q (); if (at===true| | At===null) &&ar {AH (au,f)}else{if (!ar| | At===false) {F=m;ah (au,f)}}}else{f=m;ah (au,f)}}else{if (f===h) {F=m;ah (au,f)}}a.unbind (K,g,false); A.unbind (Ac,o,false); V (False)}function D () {ai=0; m=0;b=0;af=0;w=0; U=1; V (false)}function AH (ao,am) {var an=undefined;if (r.swipestatus) {An=r.swipestatus.call (a,ao,am,e| | null,p| | 0,s| | 0,ai)}if (R.pinchstatus&&ad ()) {An=r.pinchstatus.call (a,ao,am,ak| | null,w| | 0,s| | 0,ai,u)}if (am===m) {if r.click&& (ai===1| |! A) && (isNaN (P) | | p===0)) {An=r.click.call (a,ao,ao.target)}}if (am==g) {if (r.swipe) {an=r.swipe.call (A,ao,e,p,s,ai)}switch (E) {case L: if (r.swipeleft) {an=r.swipeleft.call (A,ao,e,p,s,ai)}break;case k:if (r.swiperight) {An=r.swiperight.call (A,ao,E,P, S,ai)}break;case c:if (r.swipeup) {an=r.swipeup.call (A,ao,e,p,s,ai)}break;case r:if (r.swipedown) {an= R.swipedown.call (A,ao,e,p,s,ai)}break}switch (AK) {case B:if (R.pinchin) {An=r.pinchin.call (a,ao,ak| | null,w| | 0,s| | 0,ai,u)}break;case s:if (r.pinchout) {An=r.pinchout.call (a,ao,ak| | null,w| | 0,s| | 0,ai,u)}break}}if (am===m| | AM===G) {D (AO)}return an}function Q () {if (r.threshold!==null) {return p>=r.threshold}return null}function Y () {var am ; if (r.maxtimethreshold) {if (s>=r.maxtimethreshold) {Am=false}else{aM=true}}else{am=true}return am}function y (am,an) {if (r.allowpagescroll===i| | W ()) {Am.preventdefault ()}else{var Ao=r.allowpagescroll===o;switch (a) {case l:if (R.swipeleft&&ao) | | (!ao&&r.allowpagescroll!=u)) {Am.preventdefault ()}break;case k:if (R.swiperight&&ao) | | (!ao&&r.allowpagescroll!=u)) {Am.preventdefault ()}break;case c:if (R.swipeup&&ao) | | (!ao&&r.allowpagescroll!=p)) {Am.preventdefault ()}break;case r:if (R.swipedown&&ao) | | (!ao&&r.allowpagescroll!=p)) {Am.preventdefault ()}break}}}function C () {return m-b}function N (Ap,ao) {var an=math.abs (ap.x-ao.x); var am=math.abs ( AP.Y-AO.Y); return Math.Round (Math.sqrt (an*an+am*am))}function V (am,an) {var ao= (an/am) *1;return ao.tofixed (2)} function X () {if (u<1) {return s}else{return b}}function Z (an,am) {return Math.Round (math.sqrt (MATH.POW) +math.pow (am.y-an.y,2))}function AB (Ap,an) {var am=ap.x-an.x;var ar=an.y-ap.y;var ao=math.atan2 (ar,am); var aq= Math.Round (AO*180/MATH.PI); if (aq< 0) {Aq=360-math.abs (aq)}return aq}function Z (an,am) {var ao=ab (an,am); if ((ao<=45) && (ao>=0)) {return L} Else{if ((ao<=360) && (ao>=315)) {return l}else{if (ao>=135) && (ao<=225)) {return k}else{ if ((ao>45) && (ao<135)) {return R}else{return c}}}}}function x () {var am=new Date (); return Am.gettime ()} function H () {a.unbind (AE,AA); A.unbind (I,D); A.unbind (K,G); A.unbind (Ac,o); V (False)}function W () {return r.pinchstatus| | r.pinchin| | R.pinchout}function AD () {return ak&&w ()}function L () {return a.data (t+ "_intouch") ===true?true:false} function V (AM) {am=am===true?true:false; A.data (t+ "_intouch", AM)}function al () {var am=[];for (var an=0;an<=5;an++) {Am.push ({start:{x:0,y:0},end:{x:0,y:0 },delta:{x:0,y:0}})}return am}}) (JQuery); |