text: define(function(require, exports, module){
      var jQuery = require('jquery');
      (function(e){function p(){var e=s();if(e!==o){o=e;r.trigger("orientationchange")}}function w(t,n,r,i){var s=r.type;r.type=n;e.event.dispatch.call(t,r,i);r.type=s}e.attrFn=e.attrFn||{};var t=navigator.userAgent.toLowerCase().indexOf("chrome")>-1&&(navigator.userAgent.toLowerCase().indexOf("windows")>-1||navigator.userAgent.toLowerCase().indexOf("macintosh")>-1||navigator.userAgent.toLowerCase().indexOf("linux")>-1);var n={swipe_h_threshold:50,swipe_v_threshold:50,taphold_threshold:750,doubletap_int:500,touch_capable:"ontouchstart"in document.documentElement&&!t,orientation_support:"orientation"in window&&"onorientationchange"in window,startevent:"ontouchstart"in document.documentElement&&!t?"touchstart":"mousedown",endevent:"ontouchstart"in document.documentElement&&!t?"touchend":"mouseup",moveevent:"ontouchstart"in document.documentElement&&!t?"touchmove":"mousemove",tapevent:"ontouchstart"in document.documentElement&&!t?"tap":"click",scrollevent:"ontouchstart"in document.documentElement&&!t?"touchmove":"scroll",hold_timer:null,tap_timer:null};e.each("tapstart tapend tap singletap doubletap taphold swipe swipeup swiperight swipedown swipeleft swipeend scrollstart scrollend orientationchange".split(" "),function(t,n){e.fn[n]=function(e){return e?this.bind(n,e):this.trigger(n)};e.attrFn[n]=true});e.event.special.tapstart={setup:function(){var t=this,r=e(t);r.bind(n.startevent,function(e){if(e.which&&e.which!==1){return false}else{var r=e.originalEvent;var i={position:{x:n.touch_capable?r.touches[0].screenX:e.screenX,y:n.touch_capable?r.touches[0].screenY:e.screenY},offset:{x:n.touch_capable?r.touches[0].pageX-r.touches[0].target.offsetLeft:e.offsetX,y:n.touch_capable?r.touches[0].pageY-r.touches[0].target.offsetTop:e.offsetY},time:(new Date).getTime(),target:e.target};w(t,"tapstart",e,i);return true}})}};e.event.special.tapend={setup:function(){var t=this,r=e(t);r.bind(n.endevent,function(e){var r=e.originalEvent;var i={position:{x:n.touch_capable?r.changedTouches[0].screenX:e.screenX,y:n.touch_capable?r.changedTouches[0].screenY:e.screenY},offset:{x:n.touch_capable?r.changedTouches[0].pageX-r.changedTouches[0].target.offsetLeft:e.offsetX,y:n.touch_capable?r.changedTouches[0].pageY-r.changedTouches[0].target.offsetTop:e.offsetY},time:(new Date).getTime(),target:e.target};w(t,"tapend",e,i);return true})}};e.event.special.taphold={setup:function(){var t=this,r=e(t),i,s,o={x:0,y:0};r.bind(n.startevent,function(e){if(e.which&&e.which!==1){return false}else{r.data("tapheld",false);i=e.target;var s=e.originalEvent;var u=(new Date).getTime(),a={x:n.touch_capable?s.touches[0].screenX:e.screenX,y:n.touch_capable?s.touches[0].screenY:e.screenY},f={x:n.touch_capable?s.touches[0].pageX-s.touches[0].target.offsetLeft:e.offsetX,y:n.touch_capable?s.touches[0].pageY-s.touches[0].target.offsetTop:e.offsetY};o.x=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageX:e.pageX;o.y=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageY:e.pageY;n.hold_timer=window.setTimeout(function(){var l=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageX:e.pageX,c=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageY:e.pageY;if(e.target==i&&o.x==l&&o.y==c){r.data("tapheld",true);var h=(new Date).getTime(),p={x:n.touch_capable?s.touches[0].screenX:e.screenX,y:n.touch_capable?s.touches[0].screenY:e.screenY},d={x:n.touch_capable?s.touches[0].pageX-s.touches[0].target.offsetLeft:e.offsetX,y:n.touch_capable?s.touches[0].pageY-s.touches[0].target.offsetTop:e.offsetY};duration=h-u;var v={startTime:u,endTime:h,startPosition:a,startOffset:f,endPosition:p,endOffset:d,duration:duration,target:e.target};w(t,"taphold",e,v)}},n.taphold_threshold);return true}}).bind(n.endevent,function(){r.data("tapheld",false);window.clearTimeout(n.hold_timer)})}};e.event.special.doubletap={setup:function(){var t=this,r=e(t),i,s,o;r.bind(n.startevent,function(e){if(e.which&&e.which!==1){return false}else{r.data("doubletapped",false);i=e.target;var t=e.originalEvent;o={position:{x:n.touch_capable?t.touches[0].screenX:e.screenX,y:n.touch_capable?t.touches[0].screenY:e.screenY},offset:{x:n.touch_capable?t.touches[0].pageX-t.touches[0].target.offsetLeft:e.offsetX,y:n.touch_capable?t.touches[0].pageY-t.touches[0].target.offsetTop:e.offsetY},time:(new Date).getTime(),target:e.target};return true}}).bind(n.endevent,function(e){var u=(new Date).getTime();var a=r.data("lastTouch")||u+1;var f=u-a;window.clearTimeout(s);if(f<n.doubletap_int&&f>0&&e.target==i&&f>100){r.data("doubletapped",true);window.clearTimeout(n.tap_timer);var l={position:{x:n.touch_capable?origEvent.touches[0].screenX:e.screenX,y:n.touch_capable?origEvent.touches[0].screenY:e.screenY},offset:{x:n.touch_capable?origEvent.touches[0].pageX-origEvent.touches[0].target.offsetLeft:e.offsetX,y:n.touch_capable?origEvent.touches[0].pageY-origEvent.touches[0].target.offsetTop:e.offsetY},time:(new Date).getTime(),target:e.target};var c={firstTap:o,secondTap:l,interval:l.time-o.time};w(t,"doubletap",e,c)}else{r.data("lastTouch",u);s=window.setTimeout(function(e){window.clearTimeout(s)},n.doubletap_int,[e])}r.data("lastTouch",u)})}};e.event.special.singletap={setup:function(){var t=this,r=e(t),i=null,s=null,o={x:0,y:0};r.bind(n.startevent,function(e){if(e.which&&e.which!==1){return false}else{s=(new Date).getTime();i=e.target;o.x=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageX:e.pageX;o.y=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageY:e.pageY;return true}}).bind(n.endevent,function(e){if(e.target==i){end_pos_x=e.originalEvent.changedTouches?e.originalEvent.changedTouches[0].pageX:e.pageX;end_pos_y=e.originalEvent.changedTouches?e.originalEvent.changedTouches[0].pageY:e.pageY;n.tap_timer=window.setTimeout(function(){if(!r.data("doubletapped")&&!r.data("tapheld")&&o.x==end_pos_x&&o.y==end_pos_y){var i=e.originalEvent;var s={position:{x:n.touch_capable?i.changedTouches[0].screenX:e.screenX,y:n.touch_capable?i.changedTouches[0].screenY:e.screenY},offset:{x:n.touch_capable?i.changedTouches[0].pageX-i.changedTouches[0].target.offsetLeft:e.offsetX,y:n.touch_capable?i.changedTouches[0].pageY-i.changedTouches[0].target.offsetTop:e.offsetY},time:(new Date).getTime(),target:e.target};w(t,"singletap",e,s)}},n.doubletap_int)}})}};e.event.special.tap={setup:function(){var t=this,r=e(t),i=false,s=null,o,u={x:0,y:0};r.bind(n.startevent,function(e){if(e.which&&e.which!==1){return false}else{i=true;u.x=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageX:e.pageX;u.y=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageY:e.pageY;o=(new Date).getTime();s=e.target;return true}}).bind(n.endevent,function(e){var r=e.originalEvent.targetTouches?e.originalEvent.changedTouches[0].pageX:e.pageX,a=e.originalEvent.targetTouches?e.originalEvent.changedTouches[0].pageY:e.pageY;if(s==e.target&&i&&(new Date).getTime()-o<n.taphold_threshold&&u.x==r&&u.y==a){var f=e.originalEvent;var l={position:{x:n.touch_capable?f.changedTouches[0].screenX:e.screenX,y:n.touch_capable?f.changedTouches[0].screenY:e.screenY},offset:{x:n.touch_capable?f.changedTouches[0].pageX-f.changedTouches[0].target.offsetLeft:e.offsetX,y:n.touch_capable?f.changedTouches[0].pageY-f.changedTouches[0].target.offsetTop:e.offsetY},time:(new Date).getTime(),target:e.target};w(t,"tap",e,l)}})}};e.event.special.swipe={setup:function(){function f(e){o.x=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageX:e.pageX;o.y=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageY:e.pageY;u.x=o.x;u.y=o.y;i=true;var t=e.originalEvent;a={position:{x:n.touch_capable?t.touches[0].screenX:e.screenX,y:n.touch_capable?t.touches[0].screenY:e.screenY},offset:{x:n.touch_capable?t.touches[0].pageX-t.touches[0].target.offsetLeft:e.offsetX,y:n.touch_capable?t.touches[0].pageY-t.touches[0].target.offsetTop:e.offsetY},time:(new Date).getTime(),target:e.target};var r=new Date;while(new Date-r<100){}}function l(e){u.x=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageX:e.pageX;u.y=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageY:e.pageY;window.clearTimeout(n.hold_timer);var t;var f=r.attr("data-xthreshold"),l=r.attr("data-ythreshold"),c=typeof f!=="undefined"&&f!==false&&parseInt(f)?parseInt(f):n.swipe_h_threshold,h=typeof l!=="undefined"&&l!==false&&parseInt(l)?parseInt(l):n.swipe_v_threshold;if(o.y>u.y&&o.y-u.y>h){t="swipeup"}if(o.x<u.x&&u.x-o.x>c){t="swiperight"}if(o.y<u.y&&u.y-o.y>h){t="swipedown"}if(o.x>u.x&&o.x-u.x>c){t="swipeleft"}if(t!=undefined&&i){o.x=0;o.y=0;u.x=0;u.y=0;i=false;var p=e.originalEvent;endEvnt={position:{x:n.touch_capable?p.touches[0].screenX:e.screenX,y:n.touch_capable?p.touches[0].screenY:e.screenY},offset:{x:n.touch_capable?p.touches[0].pageX-p.touches[0].target.offsetLeft:e.offsetX,y:n.touch_capable?p.touches[0].pageY-p.touches[0].target.offsetTop:e.offsetY},time:(new Date).getTime(),target:e.target};var d=Math.abs(a.position.x-endEvnt.position.x),v=Math.abs(a.position.y-endEvnt.position.y);var m={startEvnt:a,endEvnt:endEvnt,direction:t.replace("swipe",""),xAmount:d,yAmount:v,duration:endEvnt.time-a.time};s=true;r.trigger("swipe",m).trigger(t,m)}}function c(e){if(s){var t=r.attr("data-xthreshold"),o=r.attr("data-ythreshold"),u=typeof t!=="undefined"&&t!==false&&parseInt(t)?parseInt(t):n.swipe_h_threshold,f=typeof o!=="undefined"&&o!==false&&parseInt(o)?parseInt(o):n.swipe_v_threshold;var l=e.originalEvent;endEvnt={position:{x:n.touch_capable?l.changedTouches[0].screenX:e.screenX,y:n.touch_capable?l.changedTouches[0].screenY:e.screenY},offset:{x:n.touch_capable?l.changedTouches[0].pageX-l.changedTouches[0].target.offsetLeft:e.offsetX,y:n.touch_capable?l.changedTouches[0].pageY-l.changedTouches[0].target.offsetTop:e.offsetY},time:(new Date).getTime(),target:e.target};if(a.position.y>endEvnt.position.y&&a.position.y-endEvnt.position.y>f){swipedir="swipeup"}if(a.position.x<endEvnt.position.x&&endEvnt.position.x-a.position.x>u){swipedir="swiperight"}if(a.position.y<endEvnt.position.y&&endEvnt.position.y-a.position.y>f){swipedir="swipedown"}if(a.position.x>endEvnt.position.x&&a.position.x-endEvnt.position.x>u){swipedir="swipeleft"}var c=Math.abs(a.position.x-endEvnt.position.x),h=Math.abs(a.position.y-endEvnt.position.y);var p={startEvnt:a,endEvnt:endEvnt,direction:swipedir.replace("swipe",""),xAmount:c,yAmount:h,duration:endEvnt.time-a.time};r.trigger("swipeend",p)}i=false;s=false}var t=this,r=e(t),i=false,s=false,o={x:0,y:0},u={x:0,y:0},a;r.bind(n.startevent,f);r.bind(n.moveevent,l);r.bind(n.endevent,c)}};e.event.special.scrollstart={setup:function(){function o(e,n){i=n;w(t,i?"scrollstart":"scrollend",e)}var t=this,r=e(t),i,s;r.bind(n.scrollevent,function(e){if(!i){o(e,true)}clearTimeout(s);s=setTimeout(function(){o(e,false)},50)})}};var r=e(window),i,s,o,u,a,f={0:true,180:true};if(n.orientation_support){var l=window.innerWidth||e(window).width(),c=window.innerHeight||e(window).height(),h=50;u=l>c&&l-c>h;a=f[window.orientation];if(u&&a||!u&&!a){f={"-90":true,90:true}}}e.event.special.orientationchange=i={setup:function(){if(n.orientation_support){return false}o=s();r.bind("throttledresize",p);return true},teardown:function(){if(n.orientation_support){return false}r.unbind("throttledresize",p);return true},add:function(e){var t=e.handler;e.handler=function(e){e.orientation=s();return t.apply(this,arguments)}}};e.event.special.orientationchange.orientation=s=function(){var e=true,t=document.documentElement;if(n.orientation_support){e=f[window.orientation]}else{e=t&&t.clientWidth/t.clientHeight<1.1}return e?"portrait":"landscape"};e.event.special.throttledresize={setup:function(){e(this).bind("resize",v)},teardown:function(){e(this).unbind("resize",v)}};var d=250,v=function(){y=(new Date).getTime();b=y-m;if(b>=d){m=y;e(this).trigger("throttledresize")}else{if(g){window.clearTimeout(g)}g=window.setTimeout(p,d-b)}},m=0,g,y,b;e.each({scrollend:"scrollstart",swipeup:"swipe",swiperight:"swipe",swipedown:"swipe",swipeleft:"swipe",swipeend:"swipe"},function(t,n,r){e.event.special[t]={setup:function(){e(this).bind(n,e.noop)}}})})(jQuery)
  });