/*
	Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dojox.mobile.app._event"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.mobile.app._event"]){_4._hasResource["dojox.mobile.app._event"]=true;_4.provide("dojox.mobile.app._event");_4.experimental("dojox.mobile.app._event.js");_4.mixin(_6.mobile.app,{eventMap:{},connectFlick:function(_7,_8,_9){var _a;var _b;var _c=false;var _d;var _e;var _f;var _10;var _11;var _12;var _13=_4.connect("onmousedown",_7,function(_14){_c=false;_a=_14.targetTouches?_14.targetTouches[0].clientX:_14.clientX;_b=_14.targetTouches?_14.targetTouches[0].clientY:_14.clientY;_12=(new Date()).getTime();_f=_4.connect(_7,"onmousemove",_15);_10=_4.connect(_7,"onmouseup",_16);});var _15=function(_17){_4.stopEvent(_17);_d=_17.targetTouches?_17.targetTouches[0].clientX:_17.clientX;_e=_17.targetTouches?_17.targetTouches[0].clientY:_17.clientY;if(Math.abs(Math.abs(_d)-Math.abs(_a))>15){_c=true;_11=(_d>_a)?"ltr":"rtl";}else{if(Math.abs(Math.abs(_e)-Math.abs(_b))>15){_c=true;_11=(_e>_b)?"ttb":"btt";}}};var _16=function(_18){_4.stopEvent(_18);_f&&_4.disconnect(_f);_10&&_4.disconnect(_10);if(_c){var _19={target:_7,direction:_11,duration:(new Date()).getTime()-_12};if(_8&&_9){_8[_9](_19);}else{_9(_19);}}};}});_6.mobile.app.isIPhone=(_4.isSafari&&(navigator.userAgent.indexOf("iPhone")>-1||navigator.userAgent.indexOf("iPod")>-1));_6.mobile.app.isWebOS=(navigator.userAgent.indexOf("webOS")>-1);_6.mobile.app.isAndroid=(navigator.userAgent.toLowerCase().indexOf("android")>-1);if(_6.mobile.app.isIPhone||_6.mobile.app.isAndroid){_6.mobile.app.eventMap={onmousedown:"ontouchstart",mousedown:"ontouchstart",onmouseup:"ontouchend",mouseup:"ontouchend",onmousemove:"ontouchmove",mousemove:"ontouchmove"};}_4._oldConnect=_4._connect;_4._connect=function(obj,_1a,_1b,_1c,_1d){_1a=_6.mobile.app.eventMap[_1a]||_1a;if(_1a=="flick"||_1a=="onflick"){if(_4.global["Mojo"]){_1a=Mojo.Event.flick;}else{return _6.mobile.app.connectFlick(obj,_1b,_1c);}}return _4._oldConnect(obj,_1a,_1b,_1c,_1d);};}}};});