Deutschland United States United Kingdom
ContentLion - Open Source CMS

jquery.mobile.custom.min.js

Blame | Last modification | View Log

/*! jQuery Mobile v1.3.1 | Copyright 2010, 2013 jQuery Foundation, Inc. | jquery.org/license */

(function(e,t,n){typeof define=="function"&&define.amd?define(["jquery"],function(r){return n(r,e,t),r.mobile}):n(e.jQuery,e,t)})(this,document,function(e,t,n,r){(function(e,t,r){function l(e){return e=e||location.href,"#"+e.replace(/^[^#]*#?(.*)$/,"$1")}var i="hashchange",s=n,o,u=e.event.special,a=s.documentMode,f="on"+i in t&&(a===r||a>7);e.fn[i]=function(e){return e?this.bind(i,e):this.trigger(i)},e.fn[i].delay=50,u[i]=e.extend(u[i],{setup:function(){if(f)return!1;e(o.start)},teardown:function(){if(f)return!1;e(o.stop)}}),o=function(){function p(){var n=l(),r=h(u);n!==u?(c(u=n,r),e(t).trigger(i)):r!==u&&(location.href=location.href.replace(/#.*/,"")+r),o=setTimeout(p,e.fn[i].delay)}var n={},o,u=l(),a=function(e){return e},c=a,h=a;return n.start=function(){o||p()},n.stop=function(){o&&clearTimeout(o),o=r},t.attachEvent&&!t.addEventListener&&!f&&function(){var t,r;n.start=function(){t||(r=e.fn[i].src,r=r&&r+l(),t=e('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){r||c(l()),p()}).attr("src",r||"javascript:0").insertAfter("body")[0].contentWindow,s.onpropertychange=function(){try{event.propertyName==="title"&&(t.document.title=s.title)}catch(e){}})},n.stop=a,h=function(){return l(t.location.href)},c=function(n,r){var o=t.document,u=e.fn[i].domain;n!==r&&(o.title=s.title,o.open(),u&&o.write('<script>document.domain="'+u+'"</script>'),o.close(),t.location.hash=n)}}(),n}()})(e,this),function(e){e.mobile={}}(e),function(e,t,r){var i={};e.mobile=e.extend(e.mobile,{version:"1.3.1",ns:"",subPageUrlKey:"ui-page",activePageClass:"ui-page-active",activeBtnClass:"ui-btn-active",focusClass:"ui-focus",ajaxEnabled:!0,hashListeningEnabled:!0,linkBindingEnabled:!0,defaultPageTransition:"fade",maxTransitionWidth:!1,minScrollBack:250,touchOverflowEnabled:!1,defaultDialogTransition:"pop",pageLoadErrorMessage:"Error Loading Page",pageLoadErrorMessageTheme:"e",phonegapNavigationEnabled:!1,autoInitializePage:!0,pushStateEnabled:!0,ignoreContentEnabled:!1,orientationChangeEnabled:!0,buttonMarkup:{hoverDelay:200},window:e(t),document:e(n),keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91},behaviors:{},silentScroll:function(n){e.type(n)!=="number"&&(n=e.mobile.defaultHomeScroll),e.event.special.scrollstart.enabled=!1,setTimeout(function(){t.scrollTo(0,n),e.mobile.document.trigger("silentscroll",{x:0,y:n})},20),setTimeout(function(){e.event.special.scrollstart.enabled=!0},150)},nsNormalizeDict:i,nsNormalize:function(t){if(!t)return;return i[t]||(i[t]=e.camelCase(e.mobile.ns+t))},getInheritedTheme:function(e,t){var n=e[0],r="",i=/ui-(bar|body|overlay)-([a-z])\b/,s,o;while(n){s=n.className||"";if(s&&(o=i.exec(s))&&(r=o[2]))break;n=n.parentNode}return r||t||"a"},closestPageData:function(e){return e.closest(':jqmData(role="page"), :jqmData(role="dialog")').data("mobile-page")},enhanceable:function(e){return this.haveParents(e,"enhance")},hijackable:function(e){return this.haveParents(e,"ajax")},haveParents:function(t,n){if(!e.mobile.ignoreContentEnabled)return t;var r=t.length,i=e(),s,o,u;for(var a=0;a<r;a++){o=t.eq(a),u=!1,s=t[a];while(s){var f=s.getAttribute?s.getAttribute("data-"+e.mobile.ns+n):"";if(f==="false"){u=!0;break}s=s.parentNode}u||(i=i.add(o))}return i},getScreenHeight:function(){return t.innerHeight||e.mobile.window.height()}},e.mobile),e.fn.jqmData=function(t,n){var i;return typeof t!="undefined"&&(t&&(t=e.mobile.nsNormalize(t)),arguments.length<2||n===r?i=this.data(t):i=this.data(t,n)),i},e.jqmData=function(t,n,r){var i;return typeof n!="undefined"&&(i=e.data(t,n?e.mobile.nsNormalize(n):n,r)),i},e.fn.jqmRemoveData=function(t){return this.removeData(e.mobile.nsNormalize(t))},e.jqmRemoveData=function(t,n){return e.removeData(t,e.mobile.nsNormalize(n))},e.fn.removeWithDependents=function(){e.removeWithDependents(this)},e.removeWithDependents=function(t){var n=e(t);(n.jqmData("dependents")||e()).remove(),n.remove()},e.fn.addDependents=function(t){e.addDependents(e(this),t)},e.addDependents=function(t,n){var r=e(t).jqmData("dependents")||e();e(t).jqmData("dependents",e.merge(r,n))},e.fn.getEncodedText=function(){return e("<div/>").text(e(this).text()).html()},e.fn.jqmEnhanceable=function(){return e.mobile.enhanceable(this)},e.fn.jqmHijackable=function(){return e.mobile.hijackable(this)};var s=e.find,o=/:jqmData\(([^)]*)\)/g;e.find=function(t,n,r,i){return t=t.replace(o,"[data-"+(e.mobile.ns||"")+"$1]"),s.call(this,t,n,r,i)},e.extend(e.find,s),e.find.matches=function(t,n){return e.find(t,null,null,n)},e.find.matchesSelector=function(t,n){return e.find(n,null,null,[t]).length>0}}(e,this),function(e,r){t.matchMedia=t.matchMedia||function(e,t){var n,r=e.documentElement,i=r.firstElementChild||r.firstChild,s=e.createElement("body"),o=e.createElement("div");return o.id="mq-test-1",o.style.cssText="position:absolute;top:-100em",s.style.background="none",s.appendChild(o),function(e){return o.innerHTML='&shy;<style media="'+e+'"> #mq-test-1 { width: 42px; }</style>',r.insertBefore(s,i),n=o.offsetWidth===42,r.removeChild(s),{matches:n,media:e}}}(n),e.mobile.media=function(e){return t.matchMedia(e).matches}}(e),function(e,t){var r={touch:"ontouchend"in n};e.mobile.support=e.mobile.support||{},e.extend(e.support,r),e.extend(e.mobile.support,r)}(e),function(e,n){e.extend(e.support,{orientation:"orientation"in t&&"onorientationchange"in t})}(e),function(e,r){function i(e){var t=e.charAt(0).toUpperCase()+e.substr(1),n=(e+" "+u.join(t+" ")+t).split(" ");for(var i in n)if(o[n[i]]!==r)return!0}function h(e,t,r){var i=n.createElement("div"),s=function(e){return e.charAt(0).toUpperCase()+e.substr(1)},o=function(e){return e===""?"":"-"+e.charAt(0).toLowerCase()+e.substr(1)+"-"},a=function(n){var r=o(n)+e+": "+t+";",u=s(n),a=u+(u===""?e:s(e));i.setAttribute("style",r),!i.style[a]||(l=!0)},f=r?r:u,l;for(var c=0;c<f.length;c++)a(f[c]);return!!l}function p(){var i="transform-3d",o=e.mobile.media("(-"+u.join("-"+i+"),(-")+"-"+i+"),("+i+")");if(o)return!!o;var a=n.createElement("div"),f={MozTransform:"-moz-transform",transform:"transform"};s.append(a);for(var l in f)a.style[l]!==r&&(a.style[l]="translate3d( 100px, 1px, 1px )",o=t.getComputedStyle(a).getPropertyValue(f[l]));return!!o&&o!=="none"}function d(){var t=location.protocol+"//"+location.host+location.pathname+"ui-dir/",n=e("head base"),r=null,i="",o,u;return n.length?i=n.attr("href"):n=r=e("<base>",{href:t}).appendTo("head"),o=e("<a href='testurl' />").prependTo(s),u=o[0].href,n[0].href=i||location.pathname,r&&r.remove(),u.indexOf(t)===0}function v(){var e=n.createElement("x"),r=n.documentElement,i=t.getComputedStyle,s;return"pointerEvents"in e.style?(e.style.pointerEvents="auto",e.style.pointerEvents="x",r.appendChild(e),s=i&&i(e,"").pointerEvents==="auto",r.removeChild(e),!!s):!1}function m(){var e=n.createElement("div");return typeof e.getBoundingClientRect!="undefined"}function g(){var e=t,n=navigator.userAgent,r=navigator.platform,i=n.match(/AppleWebKit\/([0-9]+)/),s=!!i&&i[1],o=n.match(/Fennec\/([0-9]+)/),u=!!o&&o[1],a=n.match(/Opera Mobi\/([0-9]+)/),f=!!a&&a[1];return(r.indexOf("iPhone")>-1||r.indexOf("iPad")>-1||r.indexOf("iPod")>-1)&&s&&s<534||e.operamini&&{}.toString.call(e.operamini)==="[object OperaMini]"||a&&f<7458||n.indexOf("Android")>-1&&s&&s<533||u&&u<6||"palmGetResource"in t&&s&&s<534||n.indexOf("MeeGo")>-1&&n.indexOf("NokiaBrowser/8.5.0")>-1?!1:!0}var s=e("<body>").prependTo("html"),o=s[0].style,u=["Webkit","Moz","O"],a="palmGetResource"in t,f=t.opera,l=t.operamini&&{}.toString.call(t.operamini)==="[object OperaMini]",c=t.blackberry&&!i("-webkit-transform");e.extend(e.mobile,{browser:{}}),e.mobile.browser.oldIE=function(){var e=3,t=n.createElement("div"),r=t.all||[];do t.innerHTML="<!--[if gt IE "+ ++e+"]><br><![endif]-->";while(r[0]);return e>4?e:!e}(),e.extend(e.support,{cssTransitions:"WebKitTransitionEvent"in t||h("transition","height 100ms linear",["Webkit","Moz",""])&&!e.mobile.browser.oldIE&&!f,pushState:"pushState"in history&&"replaceState"in history&&!(t.navigator.userAgent.indexOf("Firefox")>=0&&t.top!==t)&&t.navigator.userAgent.search(/CriOS/)===-1,mediaquery:e.mobile.media("only all"),cssPseudoElement:!!i("content"),touchOverflow:!!i("overflowScrolling"),cssTransform3d:p(),boxShadow:!!i("boxShadow")&&!c,fixedPosition:g(),scrollTop:("pageXOffset"in t||"scrollTop"in n.documentElement||"scrollTop"in s[0])&&!a&&!l,dynamicBaseTag:d(),cssPointerEvents:v(),boundingRect:m()}),s.remove();var y=function(){var e=t.navigator.userAgent;return e.indexOf("Nokia")>-1&&(e.indexOf("Symbian/3")>-1||e.indexOf("Series60/5")>-1)&&e.indexOf("AppleWebKit")>-1&&e.match(/(BrowserNG|NokiaBrowser)\/7\.[0-3]/)}();e.mobile.gradeA=function(){return(e.support.mediaquery||e.mobile.browser.oldIE&&e.mobile.browser.oldIE>=7)&&(e.support.boundingRect||e.fn.jquery.match(/1\.[0-7+]\.[0-9+]?/)!==null)},e.mobile.ajaxBlacklist=t.blackberry&&!t.WebKitPoint||l||y,y&&e(function(){e("head link[rel='stylesheet']").attr("rel","alternate stylesheet").attr("rel","stylesheet")}),e.support.boxShadow||e("html").addClass("ui-mobile-nosupport-boxshadow")}(e),function(e,t){var n=e.mobile.window,r,i;e.event.special.navigate=r={bound:!1,pushStateEnabled:!0,originalEventName:t,isPushStateEnabled:function(){return e.support.pushState&&e.mobile.pushStateEnabled===!0&&this.isHashChangeEnabled()},isHashChangeEnabled:function(){return e.mobile.hashListeningEnabled===!0},popstate:function(t){var r=new e.Event("navigate"),i=new e.Event("beforenavigate"),s=t.originalEvent.state||{},o=location.href;n.trigger(i);if(i.isDefaultPrevented())return;t.historyState&&e.extend(s,t.historyState),r.originalEvent=t,setTimeout(function(){n.trigger(r,{state:s})},0)},hashchange:function(t,r){var i=new e.Event("navigate"),s=new e.Event("beforenavigate");n.trigger(s);if(s.isDefaultPrevented())return;i.originalEvent=t,n.trigger(i,{state:t.hashchangeState||{}})},setup:function(e,t){if(r.bound)return;r.bound=!0,r.isPushStateEnabled()?(r.originalEventName="popstate",n.bind("popstate.navigate",r.popstate)):r.isHashChangeEnabled()&&(r.originalEventName="hashchange",n.bind("hashchange.navigate",r.hashchange))}}}(e),function(e){e.event.special.throttledresize={setup:function(){e(this).bind("resize",n)},teardown:function(){e(this).unbind("resize",n)}};var t=250,n=function(){s=(new Date).getTime(),o=s-r,o>=t?(r=s,e(this).trigger("throttledresize")):(i&&clearTimeout(i),i=setTimeout(n,t-o))},r=0,i,s,o}(e),function(e,t){function d(){var e=o();e!==u&&(u=e,r.trigger(i))}var r=e(t),i="orientationchange",s,o,u,a,f,l={0:!0,180:!0};if(e.support.orientation){var c=t.innerWidth||r.width(),h=t.innerHeight||r.height(),p=50;a=c>h&&c-h>p,f=l[t.orientation];if(a&&f||!a&&!f)l={"-90":!0,90:!0}}e.event.special.orientationchange=e.extend({},e.event.special.orientationchange,{setup:function(){if(e.support.orientation&&!e.event.special.orientationchange.disabled)return!1;u=o(),r.bind("throttledresize",d)},teardown:function(){if(e.support.orientation&&!e.event.special.orientationchange.disabled)return!1;r.unbind("throttledresize",d)},add:function(e){var t=e.handler;e.handler=function(e){return e.orientation=o(),t.apply(this,arguments)}}}),e.event.special.orientationchange.orientation=o=function(){var r=!0,i=n.documentElement;return e.support.orientation?r=l[t.orientation]:r=i&&i.clientWidth/i.clientHeight<1.1,r?"portrait":"landscape"},e.fn[i]=function(e){return e?this.bind(i,e):this.trigger(i)},e.attrFn&&(e.attrFn[i]=!0)}(e,this),function(e,t,n,r){function x(e){while(e&&typeof e.originalEvent!="undefined")e=e.originalEvent;return e}function T(t,n){var i=t.type,s,o,a,l,c,h,p,d,v;t=e.Event(t),t.type=n,s=t.originalEvent,o=e.event.props,i.search(/^(mouse|click)/)>-1&&(o=f);if(s)for(p=o.length,l;p;)l=o[--p],t[l]=s[l];i.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1);if(i.search(/^touch/)!==-1){a=x(s),i=a.touches,c=a.changedTouches,h=i&&i.length?i[0]:c&&c.length?c[0]:r;if(h)for(d=0,v=u.length;d<v;d++)l=u[d],t[l]=h[l]}return t}function N(t){var n={},r,s;while(t){r=e.data(t,i);for(s in r)r[s]&&(n[s]=n.hasVirtualBinding=!0);t=t.parentNode}return n}function C(t,n){var r;while(t){r=e.data(t,i);if(r&&(!n||r[n]))return t;t=t.parentNode}return null}function k(){g=!1}function L(){g=!0}function A(){E=0,v.length=0,m=!1,L()}function O(){k()}function M(){_(),c=setTimeout(function(){c=0,A()},e.vmouse.resetTimerDuration)}function _(){c&&(clearTimeout(c),c=0)}function D(t,n,r){var i;if(r&&r[t]||!r&&C(n.target,t))i=T(n,t),e(n.target).trigger(i);return i}function P(t){var n=e.data(t.target,s);if(!m&&(!E||E!==n)){var r=D("v"+t.type,t);r&&(r.isDefaultPrevented()&&t.preventDefault(),r.isPropagationStopped()&&t.stopPropagation(),r.isImmediatePropagationStopped()&&t.stopImmediatePropagation())}}function H(t){var n=x(t).touches,r,i;if(n&&n.length===1){r=t.target,i=N(r);if(i.hasVirtualBinding){E=w++,e.data(r,s,E),_(),O(),d=!1;var o=x(t).touches[0];h=o.pageX,p=o.pageY,D("vmouseover",t,i),D("vmousedown",t,i)}}}function B(e){if(g)return;d||D("vmousecancel",e,N(e.target)),d=!0,M()}function j(t){if(g)return;var n=x(t).touches[0],r=d,i=e.vmouse.moveDistanceThreshold,s=N(t.target);d=d||Math.abs(n.pageX-h)>i||Math.abs(n.pageY-p)>i,d&&!r&&D("vmousecancel",t,s),D("vmousemove",t,s),M()}function F(e){if(g)return;L();var t=N(e.target),n;D("vmouseup",e,t);if(!d){var r=D("vclick",e,t);r&&r.isDefaultPrevented()&&(n=x(e).changedTouches[0],v.push({touchID:E,x:n.clientX,y:n.clientY}),m=!0)}D("vmouseout",e,t),d=!1,M()}function I(t){var n=e.data(t,i),r;if(n)for(r in n)if(n[r])return!0;return!1}function q(){}function R(t){var n=t.substr(1);return{setup:function(r,s){I(this)||e.data(this,i,{});var o=e.data(this,i);o[t]=!0,l[t]=(l[t]||0)+1,l[t]===1&&b.bind(n,P),e(this).bind(n,q),y&&(l.touchstart=(l.touchstart||0)+1,l.touchstart===1&&b.bind("touchstart",H).bind("touchend",F).bind("touchmove",j).bind("scroll",B))},teardown:function(r,s){--l[t],l[t]||b.unbind(n,P),y&&(--l.touchstart,l.touchstart||b.unbind("touchstart",H).unbind("touchmove",j).unbind("touchend",F).unbind("scroll",B));var o=e(this),u=e.data(this,i);u&&(u[t]=!1),o.unbind(n,q),I(this)||o.removeData(i)}}}var i="virtualMouseBindings",s="virtualTouchID",o="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),u="clientX clientY pageX pageY screenX screenY".split(" "),a=e.event.mouseHooks?e.event.mouseHooks.props:[],f=e.event.props.concat(a),l={},c=0,h=0,p=0,d=!1,v=[],m=!1,g=!1,y="addEventListener"in n,b=e(n),w=1,E=0,S;e.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};for(var U=0;U<o.length;U++)e.event.special[o[U]]=R(o[U]);y&&n.addEventListener("click",function(t){var n=v.length,r=t.target,i,o,u,a,f,l;if(n){i=t.clientX,o=t.clientY,S=e.vmouse.clickDistanceThreshold,u=r;while(u){for(a=0;a<n;a++){f=v[a],l=0;if(u===r&&Math.abs(f.x-i)<S&&Math.abs(f.y-o)<S||e.data(u,s)===f.touchID){t.preventDefault(),t.stopPropagation();return}}u=u.parentNode}}},!0)}(e,t,n),function(e,t,r){function l(t,n,r){var i=r.type;r.type=n,e.event.dispatch.call(t,r),r.type=i}var i=e(n);e.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(t,n){e.fn[n]=function(e){return e?this.bind(n,e):this.trigger(n)},e.attrFn&&(e.attrFn[n]=!0)});var s=e.mobile.support.touch,o="touchmove scroll",u=s?"touchstart":"mousedown",a=s?"touchend":"mouseup",f=s?"touchmove":"mousemove";e.event.special.scrollstart={enabled:!0,setup:function(){function s(e,n){r=n,l(t,r?"scrollstart":"scrollstop",e)}var t=this,n=e(t),r,i;n.bind(o,function(t){if(!e.event.special.scrollstart.enabled)return;r||s(t,!0),clearTimeout(i),i=setTimeout(function(){s(t,!1)},50)})}},e.event.special.tap={tapholdThreshold:750,setup:function(){var t=this,n=e(t);n.bind("vmousedown",function(r){function a(){clearTimeout(u)}function f(){a(),n.unbind("vclick",c).unbind("vmouseup",a),i.unbind("vmousecancel",f)}function c(e){f(),s===e.target&&l(t,"tap",e)}if(r.which&&r.which!==1)return!1;var s=r.target,o=r.originalEvent,u;n.bind("vmouseup",a).bind("vclick",c),i.bind("vmousecancel",f),u=setTimeout(function(){l(t,"taphold",e.Event("taphold",{target:s}))},e.event.special.tap.tapholdThreshold)})}},e.event.special.swipe={scrollSupressionThreshold:30,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:75,start:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t;return{time:(new Date).getTime(),coords:[n.pageX,n.pageY],origin:e(t.target)}},stop:function(e){var t=e.originalEvent.touches?e.originalEvent.touches[0]:e;return{time:(new Date).getTime(),coords:[t.pageX,t.pageY]}},handleSwipe:function(t,n){n.time-t.time<e.event.special.swipe.durationThreshold&&Math.abs(t.coords[0]-n.coords[0])>e.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-n.coords[1])<e.event.special.swipe.verticalDistanceThreshold&&t.origin.trigger("swipe").trigger(t.coords[0]>n.coords[0]?"swipeleft":"swiperight")},setup:function(){var t=this,n=e(t);n.bind(u,function(t){function o(t){if(!i)return;s=e.event.special.swipe.stop(t),Math.abs(i.coords[0]-s.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&t.preventDefault()}var i=e.event.special.swipe.start(t),s;n.bind(f,o).one(a,function(){n.unbind(f,o),i&&s&&e.event.special.swipe.handleSwipe(i,s),i=s=r})})}},e.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe",swiperight:"swipe"},function(t,n){e.event.special[t]={setup:function(){e(this).bind(n,e.noop)}}})}(e,this),function(e,t){function i(e){var t;while(e){t=typeof e.className=="string"&&e.className+" ";if(t&&t.indexOf("ui-btn ")>-1&&t.indexOf("ui-disabled ")<0)break;e=e.parentNode}return e}function s(r,i,s,o,u){var a=e.data(r[0],"buttonElements");r.removeClass(i).addClass(s),a&&(a.bcls=e(n.createElement("div")).addClass(a.bcls+" "+s).removeClass(i).attr("class"),o!==t&&(a.hover=o),a.state=u)}var r=function(e,n){var r=e.getAttribute(n);return r==="true"?!0:r==="false"?!1:r===null?t:r};e.fn.buttonMarkup=function(i){var s=this,u="data-"+e.mobile.ns,a;i=i&&e.type(i)==="object"?i:{};for(var f=0;f<s.length;f++){var l=s.eq(f),c=l[0],h=e.extend({},e.fn.buttonMarkup.defaults,{icon:i.icon!==t?i.icon:r(c,u+"icon"),iconpos:i.iconpos!==t?i.iconpos:r(c,u+"iconpos"),theme:i.theme!==t?i.theme:r(c,u+"theme")||e.mobile.getInheritedTheme(l,"c"),inline:i.inline!==t?i.inline:r(c,u+"inline"),shadow:i.shadow!==t?i.shadow:r(c,u+"shadow"),corners:i.corners!==t?i.corners:r(c,u+"corners"),iconshadow:i.iconshadow!==t?i.iconshadow:r(c,u+"iconshadow"),mini:i.mini!==t?i.mini:r(c,u+"mini")},i),p="ui-btn-inner",d="ui-btn-text",v,m,g=!1,y="up",b,w,E,S;for(a in h)h[a]===t||h[a]===null?l.removeAttr(u+a):c.setAttribute(u+a,h[a]);r(c,u+"rel")==="popup"&&l.attr("href")&&(c.setAttribute("aria-haspopup",!0),c.setAttribute("aria-owns",l.attr("href"))),S=e.data(c.tagName==="INPUT"||c.tagName==="BUTTON"?c.parentNode:c,"buttonElements"),S?(c=S.outer,l=e(c),b=S.inner,w=S.text,e(S.icon).remove(),S.icon=null,g=S.hover,y=S.state):(b=n.createElement(h.wrapperEls),w=n.createElement(h.wrapperEls)),E=h.icon?n.createElement("span"):null,o&&!S&&o(),h.theme||(h.theme=e.mobile.getInheritedTheme(l,"c")),v="ui-btn ",v+=g?"ui-btn-hover-"+h.theme:"",v+=y?" ui-btn-"+y+"-"+h.theme:"",v+=h.shadow?" ui-shadow":"",v+=h.corners?" ui-btn-corner-all":"",h.mini!==t&&(v+=h.mini===!0?" ui-mini":" ui-fullsize"),h.inline!==t&&(v+=h.inline===!0?" ui-btn-inline":" ui-btn-block"),h.icon&&(h.icon="ui-icon-"+h.icon,h.iconpos=h.iconpos||"left",m="ui-icon "+h.icon,h.iconshadow&&(m+=" ui-icon-shadow")),h.iconpos&&(v+=" ui-btn-icon-"+h.iconpos,h.iconpos==="notext"&&!l.attr("title")&&l.attr("title",l.getEncodedText())),S&&l.removeClass(S.bcls||""),l.removeClass("ui-link").addClass(v),b.className=p,w.className=d,S||b.appendChild(w);if(E){E.className=m;if(!S||!S.icon)E.innerHTML="&#160;",b.appendChild(E)}while(c.firstChild&&!S)w.appendChild(c.firstChild);S||c.appendChild(b),S={hover:g,state:y,bcls:v,outer:c,inner:b,text:w,icon:E},e.data(c,"buttonElements",S),e.data(b,"buttonElements",S),e.data(w,"buttonElements",S),E&&e.data(E,"buttonElements",S)}return this},e.fn.buttonMarkup.defaults={corners:!0,shadow:!0,iconshadow:!0,wrapperEls:"span"};var o=function(){var n=e.mobile.buttonMarkup.hoverDelay,r,u;e.mobile.document.bind({"vmousedown vmousecancel vmouseup vmouseover vmouseout focus blur scrollstart":function(o){var a,f=e(i(o.target)),l=o.originalEvent&&/^touch/.test(o.originalEvent.type),c=o.type;if(f.length){a=f.attr("data-"+e.mobile.ns+"theme");if(c==="vmousedown")l?r=setTimeout(function(){s(f,"ui-btn-up-"+a,"ui-btn-down-"+a,t,"down")},n):s(f,"ui-btn-up-"+a,"ui-btn-down-"+a,t,"down");else if(c==="vmousecancel"||c==="vmouseup")s(f,"ui-btn-down-"+a,"ui-btn-up-"+a,t,"up");else if(c==="vmouseover"||c==="focus")l?u=setTimeout(function(){s(f,"ui-btn-up-"+a,"ui-btn-hover-"+a,!0,"")},n):s(f,"ui-btn-up-"+a,"ui-btn-hover-"+a,!0,"");else if(c==="vmouseout"||c==="blur"||c==="scrollstart")s(f,"ui-btn-hover-"+a+" ui-btn-down-"+a,"ui-btn-up-"+a,!1,"up"),r&&clearTimeout(r),u&&clearTimeout(u)}},"focusin focus":function(t){e(i(t.target)).addClass(e.mobile.focusClass)},"focusout blur":function(t){e(i(t.target)).removeClass(e.mobile.focusClass)}}),o=null};e.mobile.document.bind("pagecreate create",function(t){e(":jqmData(role='button'), .ui-bar > a, .ui-header > a, .ui-footer > a, .ui-bar > :jqmData(role='controlgroup') > a",t.target).jqmEnhanceable().not("button, input, .ui-btn, :jqmData(role='none'), :jqmData(role='nojs')").buttonMarkup()})}(e),function(e,t){var n=0,r=Array.prototype.slice,i=e.cleanData;e.cleanData=function(t){for(var n=0,r;(r=t[n])!=null;n++)try{e(r).triggerHandler("remove")}catch(s){}i(t)},e.widget=function(t,n,r){var i,s,o,u,a=t.split(".")[0];t=t.split(".")[1],i=a+"-"+t,r||(r=n,n=e.Widget),e.expr[":"][i.toLowerCase()]=function(t){return!!e.data(t,i)},e[a]=e[a]||{},s=e[a][t],o=e[a][t]=function(e,t){if(!this._createWidget)return new o(e,t);arguments.length&&this._createWidget(e,t)},e.extend(o,s,{version:r.version,_proto:e.extend({},r),_childConstructors:[]}),u=new n,u.options=e.widget.extend({},u.options),e.each(r,function(t,i){e.isFunction(i)&&(r[t]=function(){var e=function(){return n.prototype[t].apply(this,arguments)},r=function(e){return n.prototype[t].apply(this,e)};return function(){var t=this._super,n=this._superApply,s;return this._super=e,this._superApply=r,s=i.apply(this,arguments),this._super=t,this._superApply=n,s}}())}),o.prototype=e.widget.extend(u,{widgetEventPrefix:s?u.widgetEventPrefix:t},r,{constructor:o,namespace:a,widgetName:t,widgetFullName:i}),s?(e.each(s._childConstructors,function(t,n){var r=n.prototype;e.widget(r.namespace+"."+r.widgetName,o,n._proto)}),delete s._childConstructors):n._childConstructors.push(o),e.widget.bridge(t,o)},e.widget.extend=function(n){var i=r.call(arguments,1),s=0,o=i.length,u,a;for(;s<o;s++)for(u in i[s])a=i[s][u],i[s].hasOwnProperty(u)&&a!==t&&(e.isPlainObject(a)?n[u]=e.isPlainObject(n[u])?e.widget.extend({},n[u],a):e.widget.extend({},a):n[u]=a);return n},e.widget.bridge=function(n,i){var s=i.prototype.widgetFullName||n;e.fn[n]=function(o){var u=typeof o=="string",a=r.call(arguments,1),f=this;return o=!u&&a.length?e.widget.extend.apply(null,[o].concat(a)):o,u?this.each(function(){var r,i=e.data(this,s);if(!i)return e.error("cannot call methods on "+n+" prior to initialization; "+"attempted to call method '"+o+"'");if(!e.isFunction(i[o])||o.charAt(0)==="_")return e.error("no such method '"+o+"' for "+n+" widget instance");r=i[o].apply(i,a);if(r!==i&&r!==t)return f=r&&r.jquery?f.pushStack(r.get()):r,!1}):this.each(function(){var t=e.data(this,s);t?t.option(o||{})._init():e.data(this,s,new i(o,this))}),f}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),r!==this&&(e.data(r,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===r&&this.destroy()}}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(n,r){var i=n,s,o,u;if(arguments.length===0)return e.widget.extend({},this.options);if(typeof n=="string"){i={},s=n.split("."),n=s.shift();if(s.length){o=i[n]=e.widget.extend({},this.options[n]);for(u=0;u<s.length-1;u++)o[s[u]]=o[s[u]]||{},o=o[s[u]];n=s.pop();if(r===t)return o[n]===t?null:o[n];o[n]=r}else{if(r===t)return this.options[n]===t?null:this.options[n];i[n]=r}}return this._setOptions(i),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,e==="disabled"&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(t,n,r){var i,s=this;typeof t!="boolean"&&(r=n,n=t,t=!1),r?(n=i=e(n),this.bindings=this.bindings.add(n)):(r=n,n=this.element,i=this.widget()),e.each(r,function(r,o){function u(){if(!t&&(s.options.disabled===!0||e(this).hasClass("ui-state-disabled")))return;return(typeof o=="string"?s[o]:o).apply(s,arguments)}typeof o!="string"&&(u.guid=o.guid=o.guid||u.guid||e.guid++);var a=r.match(/^(\w+)\s*(.*)$/),f=a[1]+s.eventNamespace,l=a[2];l?i.delegate(l,f,u):n.bind(f,u)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function n(){return(typeof e=="string"?r[e]:e).apply(r,arguments)}var r=this;return setTimeout(n,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,n,r){var i,s,o=this.options[t];r=r||{},n=e.Event(n),n.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],s=n.originalEvent;if(s)for(i in s)i in n||(n[i]=s[i]);return this.element.trigger(n,r),!(e.isFunction(o)&&o.apply(this.element[0],[n].concat(r))===!1||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(r,i,s){typeof i=="string"&&(i={effect:i});var o,u=i?i===!0||typeof i=="number"?n:i.effect||n:t;i=i||{},typeof i=="number"&&(i={duration:i}),o=!e.isEmptyObject(i),i.complete=s,i.delay&&r.delay(i.delay),o&&e.effects&&e.effects.effect[u]?r[t](i):u!==t&&r[u]?r[u](i.duration,i.easing,s):r.queue(function(n){e(this)[t](),s&&s.call(r[0]),n()})}})}(e),function(e,t){e.widget("mobile.widget",{_createWidget:function(){e.Widget.prototype._createWidget.apply(this,arguments),this._trigger("init")},_getCreateOptions:function(){var n=this.element,r={};return e.each(this.options,function(e){var i=n.jqmData(e.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()}));i!==t&&(r[e]=i)}),r},enhanceWithin:function(t,n){this.enhance(e(this.options.initSelector,e(t)),n)},enhance:function(t,n){var r,i,s=e(t),o=this;s=e.mobile.enhanceable(s),n&&s.length&&(r=e.mobile.closestPageData(s),i=r&&r.keepNativeSelector()||"",s=s.not(i)),s[this.widgetName]()},raise:function(e){throw"Widget ["+this.widgetName+"]: "+e}})}(e),function(e,t){e.widget("mobile.page",e.mobile.widget,{options:{theme:"c",domCache:!1,keepNativeDefault:":jqmData(role='none'), :jqmData(role='nojs')"},_create:function(){if(this._trigger("beforecreate")===!1)return!1;this.element.attr("tabindex","0").addClass("ui-page ui-body-"+this.options.theme),this._on(this.element,{pagebeforehide:"removeContainerBackground",pagebeforeshow:"_handlePageBeforeShow"})},_handlePageBeforeShow:function(e){this.setContainerBackground()},removeContainerBackground:function(){e.mobile.pageContainer.removeClass("ui-overlay-"+e.mobile.getInheritedTheme(this.element.parent()))},setContainerBackground:function(t){this.options.theme&&e.mobile.pageContainer.addClass("ui-overlay-"+(t||this.options.theme))},keepNativeSelector:function(){var t=this.options,n=t.keepNative&&e.trim(t.keepNative);return n&&t.keepNative!==t.keepNativeDefault?[t.keepNative,t.keepNativeDefault].join(", "):t.keepNativeDefault}})}(e),function(e,t){e.mobile.page.prototype.options.degradeInputs={color:!1,date:!1,datetime:!1,"datetime-local":!1,email:!1,month:!1,number:!1,range:"number",search:"text",tel:!1,time:!1,url:!1,week:!1},e.mobile.document.bind("pagecreate create",function(t){var n=e.mobile.closestPageData(e(t.target)),r;if(!n)return;r=n.options,e(t.target).find("input").not(n.keepNativeSelector()).each(function(){var t=e(this),n=this.getAttribute("type"),i=r.degradeInputs[n]||"text";if(r.degradeInputs[n]){var s=e("<div>").html(t.clone()).html(),o=s.indexOf(" type=")>-1,u=o?/\s+type=["']?\w+['"]?/:/\/?>/,a=' type="'+i+'" data-'+e.mobile.ns+'type="'+n+'"'+(o?"":">");t.replaceWith(s.replace(u,a))}})})}(e),function(e,t){e.fn.fieldcontain=function(e){return this.addClass("ui-field-contain ui-body ui-br").contents().filter(function(){return this.nodeType===3&&!/\S/.test(this.nodeValue)}).remove()},e(n).bind("pagecreate create",function(t){e(":jqmData(role='fieldcontain')",t.target).jqmEnhanceable().fieldcontain()})}(e),function(e,t){e.fn.grid=function(t){return this.each(function(){var n=e(this),r=e.extend({grid:null},t),i=n.children(),s={solo:1,a:2,b:3,c:4,d:5},o=r.grid,u;if(!o)if(i.length<=5)for(var a in s)s[a]===i.length&&(o=a);else o="a",n.addClass("ui-grid-duo");u=s[o],n.addClass("ui-grid-"+o),i.filter(":nth-child("+u+"n+1)").addClass("ui-block-a"),u>1&&i.filter(":nth-child("+u+"n+2)").addClass("ui-block-b"),u>2&&i.filter(":nth-child("+u+"n+3)").addClass("ui-block-c"),u>3&&i.filter(":nth-child("+u+"n+4)").addClass("ui-block-d"),u>4&&i.filter(":nth-child("+u+"n+5)").addClass("ui-block-e")})}}(e),function(e,n){var r,i,s,o="&ui-state=dialog";e.mobile.path=r={uiStateKey:"&ui-state",urlParseRE:/^\s*(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,getLocation:function(e){var t=e?this.parseUrl(e):location,n=this.parseUrl(e||location.href).hash;return n=n==="#"?"":n,t.protocol+"//"+t.host+t.pathname+t.search+n},parseLocation:function(){return this.parseUrl(this.getLocation())},parseUrl:function(t){if(e.type(t)==="object")return t;var n=r.urlParseRE.exec(t||"")||[];return{href:n[0]||"",hrefNoHash:n[1]||"",hrefNoSearch:n[2]||"",domain:n[3]||"",protocol:n[4]||"",doubleSlash:n[5]||"",authority:n[6]||"",username:n[8]||"",password:n[9]||"",host:n[10]||"",hostname:n[11]||"",port:n[12]||"",pathname:n[13]||"",directory:n[14]||"",filename:n[15]||"",search:n[16]||"",hash:n[17]||""}},makePathAbsolute:function(e,t){if(e&&e.charAt(0)==="/")return e;e=e||"",t=t?t.replace(/^\/|(\/[^\/]*|[^\/]+)$/g,""):"";var n=t?t.split("/"):[],r=e.split("/");for(var i=0;i<r.length;i++){var s=r[i];switch(s){case".":break;case"..":n.length&&n.pop();break;default:n.push(s)}}return"/"+n.join("/")},isSameDomain:function(e,t){return r.parseUrl(e).domain===r.parseUrl(t).domain},isRelativeUrl:function(e){return r.parseUrl(e).protocol===""},isAbsoluteUrl:function(e){return r.parseUrl(e).protocol!==""},makeUrlAbsolute:function(e,t){if(!r.isRelativeUrl(e))return e;t===n&&(t=this.documentBase);var i=r.parseUrl(e),s=r.parseUrl(t),o=i.protocol||s.protocol,u=i.protocol?i.doubleSlash:i.doubleSlash||s.doubleSlash,a=i.authority||s.authority,f=i.pathname!=="",l=r.makePathAbsolute(i.pathname||s.filename,s.pathname),c=i.search||!f&&s.search||"",h=i.hash;return o+u+a+l+c+h},addSearchParams:function(t,n){var i=r.parseUrl(t),s=typeof n=="object"?e.param(n):n,o=i.search||"?";return i.hrefNoSearch+o+(o.charAt(o.length-1)!=="?"?"&":"")+s+(i.hash||"")},convertUrlToDataUrl:function(e){var n=r.parseUrl(e);return r.isEmbeddedPage(n)?n.hash.split(o)[0].replace(/^#/,"").replace(/\?.*$/,""):r.isSameDomain(n,this.documentBase)?n.hrefNoHash.replace(this.documentBase.domain,"").split(o)[0]:t.decodeURIComponent(e)},get:function(e){return e===n&&(e=r.parseLocation().hash),r.stripHash(e).replace(/[^\/]*\.[^\/*]+$/,"")},set:function(e){location.hash=e},isPath:function(e){return/\//.test(e)},clean:function(e){return e.replace(this.documentBase.domain,"")},stripHash:function(e){return e.replace(/^#/,"")},stripQueryParams:function(e){return e.replace(/\?.*$/,"")},cleanHash:function(e){return r.stripHash(e.replace(/\?.*$/,"").replace(o,""))},isHashValid:function(e){return/^#[^#]+$/.test(e)},isExternal:function(e){var t=r.parseUrl(e);return t.protocol&&t.domain!==this.documentUrl.domain?!0:!1},hasProtocol:function(e){return/^(:?\w+:)/.test(e)},isEmbeddedPage:function(e){var t=r.parseUrl(e);return t.protocol!==""?!this.isPath(t.hash)&&t.hash&&(t.hrefNoHash===this.documentUrl.hrefNoHash||this.documentBaseDiffers&&t.hrefNoHash===this.documentBase.hrefNoHash):/^#/.test(t.href)},squash:function(e,t){var n,i,s,o,u,a=this.isPath(e),f=this.parseUrl(e),l=f.hash,c="";t=t||(r.isPath(e)?r.getLocation():r.getDocumentUrl()),s=a?r.stripHash(e):e,s=r.isPath(f.hash)?r.stripHash(f.hash):s,u=s.indexOf(this.uiStateKey),u>-1&&(c=s.slice(u),s=s.slice(0,u)),i=r.makeUrlAbsolute(s,t),o=this.parseUrl(i).search;if(a){if(r.isPath(l)||l.replace("#","").indexOf(this.uiStateKey)===0)l="";c&&l.indexOf(this.uiStateKey)===-1&&(l+=c),l.indexOf("#")===-1&&l!==""&&(l="#"+l),i=r.parseUrl(i),i=i.protocol+"//"+i.host+i.pathname+o+l}else i+=i.indexOf("#")>-1?c:"#"+c;return i},isPreservableHash:function(e){return e.replace("#","").indexOf(this.uiStateKey)===0}},r.documentUrl=r.parseLocation(),s=e("head").find("base"),r.documentBase=s.length?r.parseUrl(r.makeUrlAbsolute(s.attr("href"),r.documentUrl.href)):r.documentUrl,r.documentBaseDiffers=r.documentUrl.hrefNoHash!==r.documentBase.hrefNoHash,r.getDocumentUrl=function(t){return t?e.extend({},r.documentUrl):r.documentUrl.href},r.getDocumentBase=function(t){return t?e.extend({},r.documentBase):r.documentBase.href}}(e),function(e,t){var n=e.mobile.path;e.mobile.History=function(e,t){this.stack=e||[],this.activeIndex=t||0},e.extend(e.mobile.History.prototype,{getActive:function(){return this.stack[this.activeIndex]},getLast:function(){return this.stack[this.previousIndex]},getNext:function(){return this.stack[this.activeIndex+1]},getPrev:function(){return this.stack[this.activeIndex-1]},add:function(e,t){t=t||{},this.getNext()&&this.clearForward(),t.hash&&t.hash.indexOf("#")===-1&&(t.hash="#"+t.hash),t.url=e,this.stack.push(t),this.activeIndex=this.stack.length-1},clearForward:function(){this.stack=this.stack.slice(0,this.activeIndex+1)},find:function(e,t,n){t=t||this.stack;var r,i,s=t.length,o;for(i=0;i<s;i++){r=t[i];if(decodeURIComponent(e)===decodeURIComponent(r.url)||decodeURIComponent(e)===decodeURIComponent(r.hash)){o=i;if(n)return o}}return o},closest:function(e){var n,r=this.activeIndex;return n=this.find(e,this.stack.slice(0,r)),n===t&&(n=this.find(e,this.stack.slice(r),!0),n=n===t?n:n+r),n},direct:function(n){var r=this.closest(n.url),i=this.activeIndex;r!==t&&(this.activeIndex=r,this.previousIndex=i),r<i?(n.present||n.back||e.noop)(this.getActive(),"back"):r>i?(n.present||n.forward||e.noop)(this.getActive(),"forward"):r===t&&n.missing&&n.missing(this.getActive())}})}(e),function(e,r){var i=e.mobile.path,s=location.href;e.mobile.Navigator=function(t){this.history=t,this.ignoreInitialHashChange=!0,e.mobile.window.bind({"popstate.history":e.proxy(this.popstate,this),"hashchange.history":e.proxy(this.hashchange,this)})},e.extend(e.mobile.Navigator.prototype,{squash:function(r,s){var o,u,a=i.isPath(r)?i.stripHash(r):r;return u=i.squash(r),o=e.extend({hash:a,url:u},s),t.history.replaceState(o,o.title||n.title,u),o},hash:function(e,t){var n,r,s;n=i.parseUrl(e),r=i.parseLocation();if(r.pathname+r.search===n.pathname+n.search)s=n.hash?n.hash:n.pathname+n.search;else if(i.isPath(e)){var o=i.parseUrl(t);s=o.pathname+o.search+(i.isPreservableHash(o.hash)?o.hash.replace("#",""):"")}else s=e;return s},go:function(r,s,o){var u,a,f,l,c=e.event.special.navigate.isPushStateEnabled();a=i.squash(r),f=this.hash(r,a),o&&f!==i.stripHash(i.parseLocation().hash)&&(this.preventNextHashChange=o),this.preventHashAssignPopState=!0,t.location.hash=f,this.preventHashAssignPopState=!1,u=e.extend({url:a,hash:f,title:n.title},s),c&&(l=new e.Event("popstate"),l.originalEvent={type:"popstate",state:null},this.squash(r,u),o||(this.ignorePopState=!0,e.mobile.window.trigger(l))),this.history.add(u.url,u)},popstate:function(t){var n,r,o,u;if(!e.event.special.navigate.isPushStateEnabled())return;if(this.preventHashAssignPopState){this.preventHashAssignPopState=!1,t.stopImmediatePropagation();return}if(this.ignorePopState){this.ignorePopState=!1;return}if(!t.originalEvent.state&&this.history.stack.length===1&&this.ignoreInitialHashChange){this.ignoreInitialHashChange=!1;if(location.href===s){t.preventDefault();return}}r=i.parseLocation().hash;if(!t.originalEvent.state&&r){o=this.squash(r),this.history.add(o.url,o),t.historyState=o;return}this.history.direct({url:(t.originalEvent.state||{}).url||r,present:function(n,r){t.historyState=e.extend({},n),t.historyState.direction=r}})},hashchange:function(t){var r,s;if(!e.event.special.navigate.isHashChangeEnabled()||e.event.special.navigate.isPushStateEnabled())return;if(this.preventNextHashChange){this.preventNextHashChange=!1,t.stopImmediatePropagation();return}r=this.history,s=i.parseLocation().hash,this.history.direct({url:s,present:function(n,r){t.hashchangeState=e.extend({},n),t.hashchangeState.direction=r},missing:function(){r.add(s,{hash:s,title:n.title})}})}})}(e),function(e,t){e.mobile.navigate=function(t,n,r){e.mobile.navigate.navigator.go(t,n,r)},e.mobile.navigate.history=new e.mobile.History,e.mobile.navigate.navigator=new e.mobile.Navigator(e.mobile.navigate.history);var n=e.mobile.path.parseLocation();e.mobile.navigate.history.add(n.href,{hash:n.hash})}(e),function(e,t,n){var r=function(r){return r===n&&(r=!0),function(n,i,s,o){var u=new e.Deferred,a=i?" reverse":"",f=e.mobile.urlHistory.getActive(),l=f.lastScroll||e.mobile.defaultHomeScroll,c=e.mobile.getScreenHeight(),h=e.mobile.maxTransitionWidth!==!1&&e.mobile.window.width()>e.mobile.maxTransitionWidth,p=!e.support.cssTransitions||h||!n||n==="none"||Math.max(e.mobile.window.scrollTop(),l)>e.mobile.getMaxScrollForTransition(),d=" ui-page-pre-in",v=function(){e.mobile.pageContainer.toggleClass("ui-mobile-viewport-transitioning viewport-"+n)},m=function(){e.event.special.scrollstart.enabled=!1,t.scrollTo(0,l),setTimeout(function(){e.event.special.scrollstart.enabled=!0},150)},g=function(){o.removeClass(e.mobile.activePageClass+" out in reverse "+n).height("")},y=function(){r?o.animationComplete(b):b(),o.height(c+e.mobile.window.scrollTop()).addClass(n+" out"+a)},b=function(){o&&r&&g(),w()},w=function(){s.css("z-index",-10),s.addClass(e.mobile.activePageClass+d),e.mobile.focusPage(s),s.height(c+l),m(),s.css("z-index",""),p||s.animationComplete(E),s.removeClass(d).addClass(n+" in"+a),p&&E()},E=function(){r||o&&g(),s.removeClass("out in reverse "+n).height(""),v(),e.mobile.window.scrollTop()!==l&&m(),u.resolve(n,i,s,o,!0)};return v(),o&&!p?y():b(),u.promise()}},i=r(),s=r(!1),o=function(){return e.mobile.getScreenHeight()*3};e.mobile.defaultTransitionHandler=i,e.mobile.transitionHandlers={"default":e.mobile.defaultTransitionHandler,sequential:i,simultaneous:s},e.mobile.transitionFallbacks={},e.mobile._maybeDegradeTransition=function(t){return t&&!e.support.cssTransform3d&&e.mobile.transitionFallbacks[t]&&(t=e.mobile.transitionFallbacks[t]),t},e.mobile.getMaxScrollForTransition=e.mobile.getMaxScrollForTransition||o}(e,this),function(e,r){function S(t){!!f&&(!f.closest("."+e.mobile.activePageClass).length||t)&&f.removeClass(e.mobile.activeBtnClass),f=null}function x(){d=!1,p.length>0&&e.mobile.changePage.apply(null,p.pop())}function k(t,n,r,i){n&&n.data("mobile-page")._trigger("beforehide",null,{nextPage:t}),t.data("mobile-page")._trigger("beforeshow",null,{prevPage:n||e("")}),e.mobile.hidePageLoadingMsg(),r=e.mobile._maybeDegradeTransition(r);var s=e.mobile.transitionHandlers[r||"default"]||e.mobile.defaultTransitionHandler,o=s(r,i,t,n);return o.done(function(){n&&n.data("mobile-page")._trigger("hide",null,{nextPage:t}),t.data("mobile-page")._trigger("show",null,{prevPage:n||e("")})}),o}function L(t,n){n&&t.attr("data-"+e.mobile.ns+"role",n),t.page()}function A(){var t=e.mobile.activePage&&M(e.mobile.activePage);return t||y.hrefNoHash}function O(e){while(e){if(typeof e.nodeName=="string"&&e.nodeName.toLowerCase()==="a")break;e=e.parentNode}return e}function M(t){var n=e(t).closest(".ui-page").jqmData("url"),r=y.hrefNoHash;if(!n||!u.isPath(n))n=r;return u.makeUrlAbsolute(n,r)}var i=e.mobile.window,s=e("html"),o=e("head"),u=e.extend(e.mobile.path,{getFilePath:function(t){var n="&"+e.mobile.subPageUrlKey;return t&&t.split(n)[0].split(v)[0]},isFirstPageUrl:function(t){var n=u.parseUrl(u.makeUrlAbsolute(t,this.documentBase)),i=n.hrefNoHash===this.documentUrl.hrefNoHash||this.documentBaseDiffers&&n.hrefNoHash===this.documentBase.hrefNoHash,s=e.mobile.firstPage,o=s&&s[0]?s[0].id:r;return i&&(!n.hash||n.hash==="#"||o&&n.hash.replace(/^#/,"")===o)},isPermittedCrossDomainRequest:function(t,n){return e.mobile.allowCrossDomainPages&&t.protocol==="file:"&&n.search(/^https?:/)!==-1}}),a=null,f=null,l=e.Deferred(),c=e.mobile.navigate.history,h="[tabindex],a,button:visible,select:visible,input",p=[],d=!1,v="&ui-state=dialog",m=o.children("base"),g=u.documentUrl,y=u.documentBase,b=u.documentBaseDiffers,w=e.mobile.getScreenHeight,E=e.support.dynamicBaseTag?{element:m.length?m:e("<base>",{href:y.hrefNoHash}).prependTo(o),set:function(e){e=u.parseUrl(e).hrefNoHash,E.element.attr("href",u.makeUrlAbsolute(e,y))},reset:function(){E.element.attr("href",y.hrefNoSearch)}}:r;e.mobile.getDocumentUrl=u.getDocumentUrl,e.mobile.getDocumentBase=u.getDocumentBase,e.mobile.back=function(){var e=t.navigator;this.phonegapNavigationEnabled&&e&&e.app&&e.app.backHistory?e.app.backHistory():t.history.back()},e.mobile.focusPage=function(e){var t=e.find("[autofocus]"),n=e.find(".ui-title:eq(0)");if(t.length){t.focus();return}n.length?n.focus():e.focus()};var T=!0,N,C;N=function(){if(!T)return;var t=e.mobile.urlHistory.getActive();if(t){var n=i.scrollTop();t.lastScroll=n<e.mobile.minScrollBack?e.mobile.defaultHomeScroll:n}},C=function(){setTimeout(N,100)},i.bind(e.support.pushState?"popstate":"hashchange",function(){T=!1}),i.one(e.support.pushState?"popstate":"hashchange",function(){T=!0}),i.one("pagecontainercreate",function(){e.mobile.pageContainer.bind("pagechange",function(){T=!0,i.unbind("scrollstop",C),i.bind("scrollstop",C)})}),i.bind("scrollstop",C),e.mobile._maybeDegradeTransition=e.mobile._maybeDegradeTransition||function(e){return e},e.mobile.resetActivePageHeight=function(n){var r=e("."+e.mobile.activePageClass),i=parseFloat(r.css("padding-top")),s=parseFloat(r.css("padding-bottom")),o=parseFloat(r.css("border-top-width")),u=parseFloat(r.css("border-bottom-width"));n=typeof n=="number"?n:w(),r.css("min-height",n-i-s-o-u)},e.fn.animationComplete=function(t){return e.support.cssTransitions?e(this).one("webkitAnimationEnd animationend",t):(setTimeout(t,0),e(this))},e.mobile.path=u,e.mobile.base=E,e.mobile.urlHistory=c,e.mobile.dialogHashKey=v,e.mobile.allowCrossDomainPages=!1,e.mobile._bindPageRemove=function(){var t=e(this);!t.data("mobile-page").options.domCache&&t.is(":jqmData(external-page='true')")&&t.bind("pagehide.remove",function(t){var n=e(this),r=new e.Event("pageremove");n.trigger(r),r.isDefaultPrevented()||n.removeWithDependents()})},e.mobile.loadPage=function(t,n){var i=e.Deferred(),s=e.extend({},e.mobile.loadPage.defaults,n),o=null,a=null,f=u.makeUrlAbsolute(t,A());s.data&&s.type==="get"&&(f=u.addSearchParams(f,s.data),s.data=r),s.data&&s.type==="post"&&(s.reloadPage=!0);var l=u.getFilePath(f),c=u.convertUrlToDataUrl(f);s.pageContainer=s.pageContainer||e.mobile.pageContainer,o=s.pageContainer.children("[data-"+e.mobile.ns+"url='"+c+"']"),o.length===0&&c&&!u.isPath(c)&&(o=s.pageContainer.children("#"+c).attr("data-"+e.mobile.ns+"url",c).jqmData("url",c));if(o.length===0)if(e.mobile.firstPage&&u.isFirstPageUrl(l))e.mobile.firstPage.parent().length&&(o=e(e.mobile.firstPage));else if(u.isEmbeddedPage(l))return i.reject(f,n),i.promise();if(o.length){if(!s.reloadPage)return L(o,s.role),i.resolve(f,n,o),E&&!n.prefetch&&E.set(t),i.promise();a=o}var h=s.pageContainer,p=new e.Event("pagebeforeload"),d={url:t,absUrl:f,dataUrl:c,deferred:i,options:s};h.trigger(p,d);if(p.isDefaultPrevented())return i.promise();if(s.showLoadMsg)var v=setTimeout(function(){e.mobile.showPageLoadingMsg()},s.loadMsgDelay),m=function(){clearTimeout(v),e.mobile.hidePageLoadingMsg()};return E&&typeof n.prefetch=="undefined"&&E.reset(),!e.mobile.allowCrossDomainPages&&!u.isSameDomain(g,f)?i.reject(f,n):e.ajax({url:l,type:s.type,data:s.data,contentType:s.contentType,dataType:"html",success:function(r,h,p){var v=e("<div></div>"),g=r.match(/<title[^>]*>([^<]*)/)&&RegExp.$1,y=new RegExp("(<[^>]+\\bdata-"+e.mobile.ns+"role=[\"']?page[\"']?[^>]*>)"),b=new RegExp("\\bdata-"+e.mobile.ns+"url=[\"']?([^\"'>]*)[\"']?");y.test(r)&&RegExp.$1&&b.test(RegExp.$1)&&RegExp.$1&&(t=l=u.getFilePath(e("<div>"+RegExp.$1+"</div>").text())),E&&typeof n.prefetch=="undefined"&&E.set(l),v.get(0).innerHTML=r,o=v.find(":jqmData(role='page'), :jqmData(role='dialog')").first(),o.length||(o=e("<div data-"+e.mobile.ns+"role='page'>"+(r.split(/<\/?body[^>]*>/gmi)[1]||"")+"</div>")),g&&!o.jqmData("title")&&(~g.indexOf("&")&&(g=e("<div>"+g+"</div>").text()),o.jqmData("title",g));if(!e.support.dynamicBaseTag){var w=u.get(l);o.find("[src], link[href], a[rel='external'], :jqmData(ajax='false'), a[target]").each(function(){var t=e(this).is("[href]")?"href":e(this).is("[src]")?"src":"action",n=e(this).attr(t);n=n.replace(location.protocol+"//"+location.host+location.pathname,""),/^(\w+:|#|\/)/.test(n)||e(this).attr(t,w+n)})}o.attr("data-"+e.mobile.ns+"url",u.convertUrlToDataUrl(l)).attr("data-"+e.mobile.ns+"external-page",!0).appendTo(s.pageContainer),o.one("pagecreate",e.mobile._bindPageRemove),L(o,s.role),f.indexOf("&"+e.mobile.subPageUrlKey)>-1&&(o=s.pageContainer.children("[data-"+e.mobile.ns+"url='"+c+"']")),s.showLoadMsg&&m(),d.xhr=p,d.textStatus=h,d.page=o,s.pageContainer.trigger("pageload",d),i.resolve(f,n,o,a)},error:function(t,r,o){E&&E.set(u.get()),d.xhr=t,d.textStatus=r,d.errorThrown=o;var a=new e.Event("pageloadfailed");s.pageContainer.trigger(a,d);if(a.isDefaultPrevented())return;s.showLoadMsg&&(m(),e.mobile.showPageLoadingMsg(e.mobile.pageLoadErrorMessageTheme,e.mobile.pageLoadErrorMessage,!0),setTimeout(e.mobile.hidePageLoadingMsg,1500)),i.reject(f,n)}}),i.promise()},e.mobile.loadPage.defaults={type:"get",data:r,reloadPage:!1,role:r,showLoadMsg:!1,pageContainer:r,loadMsgDelay:50},e.mobile.changePage=function(t,i){if(d){p.unshift(arguments);return}var s=e.extend({},e.mobile.changePage.defaults,i),o;s.pageContainer=s.pageContainer||e.mobile.pageContainer,s.fromPage=s.fromPage||e.mobile.activePage,o=typeof t=="string";var a=s.pageContainer,f=new e.Event("pagebeforechange"),l={toPage:t,options:s};o?l.absUrl=u.makeUrlAbsolute(t,A()):l.absUrl=t.data("absUrl"),a.trigger(f,l);if(f.isDefaultPrevented())return;t=l.toPage,o=typeof t=="string",d=!0;if(o){s.target=t,e.mobile.loadPage(t,s).done(function(t,n,r,i){d=!1,n.duplicateCachedPage=i,r.data("absUrl",l.absUrl),e.mobile.changePage(r,n)}).fail(function(e,t){S(!0),x(),s.pageContainer.trigger("pagechangefailed",l)});return}t[0]===e.mobile.firstPage[0]&&!s.dataUrl&&(s.dataUrl=g.hrefNoHash);var h=s.fromPage,m=s.dataUrl&&u.convertUrlToDataUrl(s.dataUrl)||t.jqmData("url"),y=m,b=u.getFilePath(m),w=c.getActive(),E=c.activeIndex===0,T=0,N=n.title,C=s.role==="dialog"||t.jqmData("role")==="dialog";if(h&&h[0]===t[0]&&!s.allowSamePageTransition){d=!1,a.trigger("pagechange",l),s.fromHashChange&&c.direct({url:m});return}L(t,s.role),s.fromHashChange&&(T=i.direction==="back"?-1:1);try{n.activeElement&&n.activeElement.nodeName.toLowerCase()!=="body"?e(n.activeElement).blur():e("input:focus, textarea:focus, select:focus").blur()}catch(O){}var M=!1;C&&w&&(w.url&&w.url.indexOf(v)>-1&&e.mobile.activePage&&!e.mobile.activePage.is(".ui-dialog")&&c.activeIndex>0&&(s.changeHash=!1,M=!0),m=w.url||"",!M&&m.indexOf("#")>-1?m+=v:m+="#"+v,c.activeIndex===0&&m===c.initialDst&&(m+=v));var _=w?t.jqmData("title")||t.children(":jqmData(role='header')").find(".ui-title").text():N;!!_&&N===n.title&&(N=_),t.jqmData("title")||t.jqmData("title",N),s.transition=s.transition||(T&&!E?w.transition:r)||(C?e.mobile.defaultDialogTransition:e.mobile.defaultPageTransition),!T&&M&&(c.getActive().pageUrl=y);if(m&&!s.fromHashChange){var D;!u.isPath(m)&&m.indexOf("#")<0&&(m="#"+m),D={transition:s.transition,title:N,pageUrl:y,role:s.role},s.changeHash!==!1&&e.mobile.hashListeningEnabled?e.mobile.navigate(m,D,!0):t[0]!==e.mobile.firstPage[0]&&e.mobile.navigate.history.add(m,D)}n.title=N,e.mobile.activePage=t,s.reverse=s.reverse||T<0,k(t,h,s.transition,s.reverse).done(function(n,r,i,o,u){S(),s.duplicateCachedPage&&s.duplicateCachedPage.remove(),u||e.mobile.focusPage(t),x(),a.trigger("pagechange",l)})},e.mobile.changePage.defaults={transition:r,reverse:!1,changeHash:!0,fromHashChange:!1,role:r,duplicateCachedPage:r,pageContainer:r,showLoadMsg:!0,dataUrl:r,fromPage:r,allowSamePageTransition:!1},e.mobile.navreadyDeferred=e.Deferred(),e.mobile._registerInternalEvents=function(){var n=function(t,n){var r,i=!0,s,o,f;return!e.mobile.ajaxEnabled||t.is(":jqmData(ajax='false')")||!t.jqmHijackable().length||t.attr("target")?!1:(r=t.attr("action"),f=(t.attr("method")||"get").toLowerCase(),r||(r=M(t),f==="get"&&(r=u.parseUrl(r).hrefNoSearch),r===y.hrefNoHash&&(r=g.hrefNoSearch)),r=u.makeUrlAbsolute(r,M(t)),u.isExternal(r)&&!u.isPermittedCrossDomainRequest(g,r)?!1:(n||(s=t.serializeArray(),a&&a[0].form===t[0]&&(o=a.attr("name"),o&&(e.each(s,function(e,t){if(t.name===o)return o="",!1}),o&&s.push({name:o,value:a.attr("value")}))),i={url:r,options:{type:f,data:e.param(s),transition:t.jqmData("transition"),reverse:t.jqmData("direction")==="reverse",reloadPage:!0}}),i))};e.mobile.document.delegate("form","submit",function(t){var r=n(e(this));r&&(e.mobile.changePage(r.url,r.options),t.preventDefault())}),e.mobile.document.bind("vclick",function(t){var r,i,s=t.target,o=!1;if(t.which>1||!e.mobile.linkBindingEnabled)return;a=e(s);if(e.data(s,"mobile-button")){if(!n(e(s).closest("form"),!0))return;s.parentNode&&(s=s.parentNode)}else{s=O(s);if(!s||u.parseUrl(s.getAttribute("href")||"#").hash==="#")return;if(!e(s).jqmHijackable().length)return}~s.className.indexOf("ui-link-inherit")?s.parentNode&&(i=e.data(s.parentNode,"buttonElements")):i=e.data(s,"buttonElements"),i?s=i.outer:o=!0,r=e(s),o&&(r=r.closest(".ui-btn")),r.length>0&&!r.hasClass("ui-disabled")&&(S(!0),f=r,f.addClass(e.mobile.activeBtnClass))}),e.mobile.document.bind("click",function(n){if(!e.mobile.linkBindingEnabled||n.isDefaultPrevented())return;var i=O(n.target),s=e(i),o;if(!i||n.which>1||!s.jqmHijackable().length)return;o=function(){t.setTimeout(function(){S(!0)},200)};if(s.is(":jqmData(rel='back')"))return e.mobile.back(),!1;var a=M(s),f=u.makeUrlAbsolute(s.attr("href")||"#",a);if(!e.mobile.ajaxEnabled&&!u.isEmbeddedPage(f)){o();return}if(f.search("#")!==-1){f=f.replace(/[^#]*#/,"");if(!f){n.preventDefault();return}u.isPath(f)?f=u.makeUrlAbsolute(f,a):f=u.makeUrlAbsolute("#"+f,g.hrefNoHash)}var l=s.is("[rel='external']")||s.is(":jqmData(ajax='false')")||s.is("[target]"),c=l||u.isExternal(f)&&!u.isPermittedCrossDomainRequest(g,f);if(c){o();return}var h=s.jqmData("transition"),p=s.jqmData("direction")==="reverse"||s.jqmData("back"),d=s.attr("data-"+e.mobile.ns+"rel")||r;e.mobile.changePage(f,{transition:h,reverse:p,role:d,link:s}),n.preventDefault()}),e.mobile.document.delegate(".ui-page","pageshow.prefetch",function(){var t=[];e(this).find("a:jqmData(prefetch)").each(function(){var n=e(this),r=n.attr("href");r&&e.inArray(r,t)===-1&&(t.push(r),e.mobile.loadPage(r,{role:n.attr("data-"+e.mobile.ns+"rel"),prefetch:!0}))})}),e.mobile._handleHashChange=function(n,i){var s=u.stripHash(n),o=e.mobile.urlHistory.stack.length===0?"none":r,a={changeHash:!1,fromHashChange:!0,reverse:i.direction==="back"};e.extend(a,i,{transition:(c.getLast()||{}).transition||o});if(c.activeIndex>0&&s.indexOf(v)>-1&&c.initialDst!==s){if(e.mobile.activePage&&!e.mobile.activePage.is(".ui-dialog")){i.direction==="back"?e.mobile.back():t.history.forward();return}s=i.pageUrl;var f=e.mobile.urlHistory.getActive();e.extend(a,{role:f.role,transition:f.transition,reverse:i.direction==="back"})}s?(s=u.isPath(s)?s:u.makeUrlAbsolute("#"+s,y),s===u.makeUrlAbsolute("#"+c.initialDst,y)&&c.stack.length&&c.stack[0].url!==c.initialDst.replace(v,"")&&(s=e.mobile.firstPage),e.mobile.changePage(s,a)):e.mobile.changePage(e.mobile.firstPage,a)},i.bind("navigate",function(t,n){var r;if(t.originalEvent&&t.originalEvent.isDefaultPrevented())return;r=e.event.special.navigate.originalEventName.indexOf("hashchange")>-1?n.state.hash:n.state.url,r||(r=e.mobile.path.parseLocation().hash);if(!r||r==="#"||r.indexOf("#"+e.mobile.path.uiStateKey)===0)r=location.href;e.mobile._handleHashChange(r,n.state)}),e.mobile.document.bind("pageshow",e.mobile.resetActivePageHeight),e.mobile.window.bind("throttledresize",e.mobile.resetActivePageHeight)},e(function(){l.resolve()}),e.when(l,e.mobile.navreadyDeferred).done(function(){e.mobile._registerInternalEvents()})}(e),function(e,t){e.extend(e.mobile,{loadingMessageTextVisible:r,loadingMessageTheme:r,loadingMessage:r,showPageLoadingMsg:function(t,n,r){e.mobile.loading("show",t,n,r)},hidePageLoadingMsg:function(){e.mobile.loading("hide")},loading:function(){this.loaderWidget.loader.apply(this.loaderWidget,arguments)}});var n="ui-loader",i=e("html"),s=e.mobile.window;e.widget("mobile.loader",{options:{theme:"a",textVisible:!1,html:"",text:"loading"},defaultHtml:"<div class='"+n+"'>"+"<span class='ui-icon ui-icon-loading'></span>"+"<h1></h1>"+"</div>",fakeFixLoader:function(){var t=e("."+e.mobile.activeBtnClass).first();this.element.css({top:e.support.scrollTop&&s.scrollTop()+s.height()/2||t.length&&t.offset().top||100})},checkLoaderPosition:function(){var t=this.element.offset(),n=s.scrollTop(),r=e.mobile.getScreenHeight();if(t.top<n||t.top-n>r)this.element.addClass("ui-loader-fakefix"),this.fakeFixLoader(),s.unbind("scroll",this.checkLoaderPosition).bind("scroll",e.proxy(this.fakeFixLoader,this))},resetHtml:function(){this.element.html(e(this.defaultHtml).html())},show:function(t,o,u){var a,f,l,c;this.resetHtml(),e.type(t)==="object"?(c=e.extend({},this.options,t),t=c.theme||e.mobile.loadingMessageTheme):(c=this.options,t=t||e.mobile.loadingMessageTheme||c.theme),f=o||e.mobile.loadingMessage||c.text,i.addClass("ui-loading");if(e.mobile.loadingMessage!==!1||c.html)e.mobile.loadingMessageTextVisible!==r?a=e.mobile.loadingMessageTextVisible:a=c.textVisible,this.element.attr("class",n+" ui-corner-all ui-body-"+t+" ui-loader-"+(a||o||t.text?"verbose":"default")+(c.textonly||u?" ui-loader-textonly":"")),c.html?this.element.html(c.html):this.element.find("h1").text(f),this.element.appendTo(e.mobile.pageContainer),this.checkLoaderPosition(),s.bind("scroll",e.proxy(this.checkLoaderPosition,this))},hide:function(){i.removeClass("ui-loading"),e.mobile.loadingMessage&&this.element.removeClass("ui-loader-fakefix"),e.mobile.window.unbind("scroll",this.fakeFixLoader),e.mobile.window.unbind("scroll",this.checkLoaderPosition)}}),s.bind("pagecontainercreate",function(){e.mobile.loaderWidget=e.mobile.loaderWidget||e(e.mobile.loader.prototype.defaultHtml).loader()})}(e,this),function(e,t,r){function u(){i.removeClass("ui-mobile-rendering")}var i=e("html"),s=e("head"),o=e.mobile.window;e(t.document).trigger("mobileinit");if(!e.mobile.gradeA())return;e.mobile.ajaxBlacklist&&(e.mobile.ajaxEnabled=!1),i.addClass("ui-mobile ui-mobile-rendering"),setTimeout(u,5e3),e.extend(e.mobile,{initializePage:function(){var t=e.mobile.path,r=e(":jqmData(role='page'), :jqmData(role='dialog')"),i=t.stripHash(t.stripQueryParams(t.parseLocation().hash)),s=n.getElementById(i);r.length||(r=e("body").wrapInner("<div data-"+e.mobile.ns+"role='page'></div>").children(0)),r.each(function(){var t=e(this);t.jqmData("url")||t.attr("data-"+e.mobile.ns+"url",t.attr("id")||location.pathname+location.search)}),e.mobile.firstPage=r.first(),e.mobile.pageContainer=e.mobile.firstPage.parent().addClass("ui-mobile-viewport"),o.trigger("pagecontainercreate"),e.mobile.showPageLoadingMsg(),u(),!e.mobile.hashListeningEnabled||!e.mobile.path.isHashValid(location.hash)||!e(s).is(':jqmData(role="page")')&&!e.mobile.path.isPath(i)&&i!==e.mobile.dialogHashKey?(e.mobile.path.isHashValid(location.hash)&&(e.mobile.urlHistory.initialDst=i.replace("#","")),e.event.special.navigate.isPushStateEnabled()&&e.mobile.navigate.navigator.squash(t.parseLocation().href),e.mobile.changePage(e.mobile.firstPage,{transition:"none",reverse:!0,changeHash:!1,fromHashChange:!0})):e.event.special.navigate.isPushStateEnabled()?(e.mobile.navigate.history.stack=[],e.mobile.navigate(e.mobile.path.isPath(location.hash)?location.hash:location.href)):o.trigger("hashchange",[!0])}}),e.mobile.navreadyDeferred.resolve(),e(function(){t.scrollTo(0,1),e.mobile.defaultHomeScroll=!e.support.scrollTop||e.mobile.window.scrollTop()===1?0:1,e.mobile.autoInitializePage&&e.mobile.initializePage(),o.load(e.mobile.silentScroll),e.support.cssPointerEvents||e.mobile.document.delegate(".ui-disabled","vclick",function(e){e.preventDefault(),e.stopImmediatePropagation()})})}(e,this),function(e,t){e(n).bind("pagecreate create",function(t){e(t.target).find("a").jqmEnhanceable().not(".ui-btn, .ui-link-inherit, :jqmData(role='none'), :jqmData(role='nojs')").addClass("ui-link")})}(e),function(e,t){e(n).bind("pagecreate create",function(t){e(":jqmData(role='nojs')",t.target).addClass("ui-nojs")})}(e),function(e,t,n){e.mobile.transitionFallbacks.flip="fade"}(e,this),function(e,t,n){e.mobile.transitionFallbacks.flow="fade"}(e,this),function(e,t,n){e.mobile.transitionFallbacks.pop="fade"}(e,this),function(e,t,n){e.mobile.transitionHandlers.slide=e.mobile.transitionHandlers.simultaneous,e.mobile.transitionFallbacks.slide="fade"}(e,this),function(e,t,n){e.mobile.transitionFallbacks.slidedown="fade"}(e,this),function(e,t,n){e.mobile.transitionFallbacks.slidefade="fade"}(e,this),function(e,t,n){e.mobile.transitionFallbacks.slideup="fade"}(e,this),function(e,t,n){e.mobile.transitionFallbacks.turn="fade"}(e,this),function(e){var t=e("meta[name=viewport]"),n=t.attr("content"),r=n+",maximum-scale=1, user-scalable=no",i=n+",maximum-scale=10, user-scalable=yes",s=/(user-scalable[\s]*=[\s]*no)|(maximum-scale[\s]*=[\s]*1)[$,\s]/.test(n);e.mobile.zoom=e.extend({},{enabled:!s,locked:!1,disable:function(n){!s&&!e.mobile.zoom.locked&&(t.attr("content",r),e.mobile.zoom.enabled=!1,e.mobile.zoom.locked=n||!1)},enable:function(n){!s&&(!e.mobile.zoom.locked||n===!0)&&(t.attr("content",i),e.mobile.zoom.enabled=!0,e.mobile.zoom.locked=!1)},restore:function(){s||(t.attr("content",n),e.mobile.zoom.enabled=!0)}})}(e),function(e,t){e.mobile.behaviors.addFirstLastClasses={_getVisibles:function(e,t){var n;return t?n=e.not(".ui-screen-hidden"):(n=e.filter(":visible"),n.length===0&&(n=e.not(".ui-screen-hidden"))),n},_addFirstLastClasses:function(e,t,n){e.removeClass("ui-first-child ui-last-child"),t.eq(0).addClass("ui-first-child").end().last().addClass("ui-last-child"),n||this.element.trigger("updatelayout")}}}(e),function(e,t){e.widget("mobile.collapsible",e.mobile.widget,{options:{expandCueText:" click to expand contents",collapseCueText:" click to collapse contents",collapsed:!0,heading:"h1,h2,h3,h4,h5,h6,legend",collapsedIcon:"plus",expandedIcon:"minus",iconpos:"left",theme:null,contentTheme:null,inset:!0,corners:!0,mini:!1,initSelector:":jqmData(role='collapsible')"},_create:function(){var n=this.element,r=this.options,i=n.addClass("ui-collapsible"),s=n.children(r.heading).first(),o=i.wrapInner("<div class='ui-collapsible-content'></div>").children(".ui-collapsible-content"),u=n.closest(":jqmData(role='collapsible-set')").addClass("ui-collapsible-set"),a="";s.is("legend")&&(s=e("<div role='heading'>"+s.html()+"</div>").insertBefore(s),s.next().remove()),u.length?(r.theme||(r.theme=u.jqmData("theme")||e.mobile.getInheritedTheme(u,"c")),r.contentTheme||(r.contentTheme=u.jqmData("content-theme")),r.collapsedIcon=n.jqmData("collapsed-icon")||u.jqmData("collapsed-icon")||r.collapsedIcon,r.expandedIcon=n.jqmData("expanded-icon")||u.jqmData("expanded-icon")||r.expandedIcon,r.iconpos=n.jqmData("iconpos")||u.jqmData("iconpos")||r.iconpos,u.jqmData("inset")!==t?r.inset=u.jqmData("inset"):r.inset=!0,r.corners=!1,r.mini||(r.mini=u.jqmData("mini"))):r.theme||(r.theme=e.mobile.getInheritedTheme(n,"c")),!r.inset||(a+=" ui-collapsible-inset",!r.corners||(a+=" ui-corner-all")),r.contentTheme&&(a+=" ui-collapsible-themed-content",o.addClass("ui-body-"+r.contentTheme)),a!==""&&i.addClass(a),s.insertBefore(o).addClass("ui-collapsible-heading").append("<span class='ui-collapsible-heading-status'></span>").wrapInner("<a href='#' class='ui-collapsible-heading-toggle'></a>").find("a").first().buttonMarkup({shadow:!1,corners:!1,iconpos:r.iconpos,icon:r.collapsedIcon,mini:r.mini,theme:r.theme}),i.bind("expand collapse",function(t){if(!t.isDefaultPrevented()){var n=e(this),i=t.type==="collapse";t.preventDefault(),s.toggleClass("ui-collapsible-heading-collapsed",i).find(".ui-collapsible-heading-status").text(i?r.expandCueText:r.collapseCueText).end().find(".ui-icon").toggleClass("ui-icon-"+r.expandedIcon,!i).toggleClass("ui-icon-"+r.collapsedIcon,i||r.expandedIcon===r.collapsedIcon).end().find("a").first().removeClass(e.mobile.activeBtnClass),n.toggleClass("ui-collapsible-collapsed",i),o.toggleClass("ui-collapsible-content-collapsed",i).attr("aria-hidden",i),o.trigger("updatelayout")}}).trigger(r.collapsed?"collapse":"expand"),s.bind("tap",function(t){s.find("a").first().addClass(e.mobile.activeBtnClass)}).bind("click",function(e){var t=s.is(".ui-collapsible-heading-collapsed")?"expand":"collapse";i.trigger(t),e.preventDefault(),e.stopPropagation()})}}),e.mobile.document.bind("pagecreate create",function(t){e.mobile.collapsible.prototype.enhanceWithin(t.target)})}(e),function(e,t){e.widget("mobile.collapsibleset",e.mobile.widget,e.extend({options:{initSelector:":jqmData(role='collapsible-set')"},_create:function(){var n=this.element.addClass("ui-collapsible-set"),r=this.options;r.theme||(r.theme=e.mobile.getInheritedTheme(n,"c")),r.contentTheme||(r.contentTheme=n.jqmData("content-theme")),r.corners||(r.corners=n.jqmData("corners")),n.jqmData("inset")!==t&&(r.inset=n.jqmData("inset")),r.inset=r.inset!==t?r.inset:!0,r.corners=r.corners!==t?r.corners:!0,!!r.corners&&!!r.inset&&n.addClass("ui-corner-all"),n.jqmData("collapsiblebound")||n.jqmData("collapsiblebound",!0).bind("expand",function(t){var n=e(t.target).closest(".ui-collapsible");n.parent().is(":jqmData(role='collapsible-set')")&&n.siblings(".ui-collapsible").trigger("collapse")})},_init:function(){var e=this.element,t=e.children(":jqmData(role='collapsible')"),n=t.filter(":jqmData(collapsed='false')");this._refresh("true"),n.trigger("expand")},_refresh:function(t){var n=this.element.children(":jqmData(role='collapsible')");e.mobile.collapsible.prototype.enhance(n.not(".ui-collapsible")),this._addFirstLastClasses(n,this._getVisibles(n,t),t)},refresh:function(){this._refresh(!1)}},e.mobile.behaviors.addFirstLastClasses)),e.mobile.document.bind("pagecreate create",function(t){e.mobile.collapsibleset.prototype.enhanceWithin(t.target)})}(e),function(e,t){e.widget("mobile.controlgroup",e.mobile.widget,e.extend({options:{shadow:!1,corners:!0,excludeInvisible:!0,type:"vertical",mini:!1,initSelector:":jqmData(role='controlgroup')"},_create:function(){var n=this.element,r={inner:e("<div class='ui-controlgroup-controls'></div>"),legend:e("<div role='heading' class='ui-controlgroup-label'></div>")},i=n.children("legend"),s=this;n.wrapInner(r.inner),i.length&&r.legend.append(i).insertBefore(n.children(0)),n.addClass("ui-corner-all ui-controlgroup"),e.extend(this,{_initialRefresh:!0}),e.each(this.options,function(e,n){s.options[e]=t,s._setOption(e,n,!0)})},_init:function(){this.refresh()},_setOption:function(n,r){var i="_set"+n.charAt(0).toUpperCase()+n.slice(1);this[i]!==t&&this[i](r),this._super(n,r),this.element.attr("data-"+(e.mobile.ns||"")+n.replace(/([A-Z])/,"-$1").toLowerCase(),r)},_setType:function(e){this.element.removeClass("ui-controlgroup-horizontal ui-controlgroup-vertical").addClass("ui-controlgroup-"+e),this.refresh()},_setCorners:function(e){this.element.toggleClass("ui-corner-all",e)},_setShadow:function(e){this.element.toggleClass("ui-shadow",e)},_setMini:function(e){this.element.toggleClass("ui-mini",e)},container:function(){return this.element.children(".ui-controlgroup-controls")},refresh:function(){var t=this.element.find(".ui-btn").not(".ui-slider-handle"),n=this._initialRefresh;e.mobile.checkboxradio&&this.element.find(":mobile-checkboxradio").checkboxradio("refresh"),this._addFirstLastClasses(t,this.options.excludeInvisible?this._getVisibles(t,n):t,n),this._initialRefresh=!1}},e.mobile.behaviors.addFirstLastClasses)),e(function(){e.mobile.document.bind("pagecreate create",function(t){e.mobile.controlgroup.prototype.enhanceWithin(t.target,!0)})})}(e),function(e,t,n){e.widget("mobile.dialog",e.mobile.widget,{options:{closeBtn:"left",closeBtnText:"Close",overlayTheme:"a",corners:!0,initSelector:":jqmData(role='dialog')"},_handlePageBeforeShow:function(){this._isCloseable=!0,this.options.overlayTheme&&this.element.page("removeContainerBackground").page("setContainerBackground",this.options.overlayTheme)},_create:function(){var t=this,n=this.element,r=this.options.corners?" ui-corner-all":"",i=e("<div/>",{role:"dialog","class":"ui-dialog-contain ui-overlay-shadow"+r});n.addClass("ui-dialog ui-overlay-"+this.options.overlayTheme),n.wrapInner(i),n.bind("vclick submit",function(t){var n=e(t.target).closest(t.type==="vclick"?"a":"form"),r;n.length&&!n.jqmData("transition")&&(r=e.mobile.urlHistory.getActive()||{},n.attr("data-"+e.mobile.ns+"transition",r.transition||e.mobile.defaultDialogTransition).attr("data-"+e.mobile.ns+"direction","reverse"))}),this._on(n,{pagebeforeshow:"_handlePageBeforeShow"}),e.extend(this,{_createComplete:!1}),this._setCloseBtn(this.options.closeBtn)},_setCloseBtn:function(t){var n=this,r,i;this._headerCloseButton&&(this._headerCloseButton.remove(),this._headerCloseButton=null),t!=="none"&&(i=t==="left"?"left":"right",r=e("<a href='#' class='ui-btn-"+i+"' data-"+e.mobile.ns+"icon='delete' data-"+e.mobile.ns+"iconpos='notext'>"+this.options.closeBtnText+"</a>"),this.element.children().find(":jqmData(role='header')").first().prepend(r),this._createComplete&&e.fn.buttonMarkup&&r.buttonMarkup(),this._createComplete=!0,r.bind("click",function(){n.close()}),this._headerCloseButton=r)},_setOption:function(e,t){e==="closeBtn"&&this._setCloseBtn(t),this._super(e,t)},close:function(){var t,n,r=e.mobile.navigate.history;this._isCloseable&&(this._isCloseable=!1,e.mobile.hashListeningEnabled&&r.activeIndex>0?e.mobile.back():(t=Math.max(0,r.activeIndex-1),n=r.stack[t].pageUrl||r.stack[t].url,r.previousIndex=r.activeIndex,r.activeIndex=t,e.mobile.path.isPath(n)||(n=e.mobile.path.makeUrlAbsolute("#"+n)),e.mobile.changePage(n,{direction:"back",changeHash:!1,fromHashChange:!0})))}}),e.mobile.document.delegate(e.mobile.dialog.prototype.options.initSelector,"pagecreate",function(){e.mobile.dialog.prototype.enhance(this)})}(e,this),function(e,t){e.mobile.page.prototype.options.backBtnText="Back",e.mobile.page.prototype.options.addBackBtn=!1,e.mobile.page.prototype.options.backBtnTheme=null,e.mobile.page.prototype.options.headerTheme="a",e.mobile.page.prototype.options.footerTheme="a",e.mobile.page.prototype.options.contentTheme=null,e.mobile.document.bind("pagecreate",function(t){var n=e(t.target),r=n.data("mobile-page").options,i=n.jqmData("role"),s=r.theme;e(":jqmData(role='header'), :jqmData(role='footer'), :jqmData(role='content')",n).jqmEnhanceable().each(function(){var t=e(this),u=t.jqmData("role"),a=t.jqmData("theme"),f=a||r.contentTheme||i==="dialog"&&s,l,c,h,p;t.addClass("ui-"+u);if(u==="header"||u==="footer"){var d=a||(u==="header"?r.headerTheme:r.footerTheme)||s;t.addClass("ui-bar-"+d).attr("role",u==="header"?"banner":"contentinfo"),u==="header"&&(l=t.children("a, button"),c=l.hasClass("ui-btn-left"),h=l.hasClass("ui-btn-right"),c=c||l.eq(0).not(".ui-btn-right").addClass("ui-btn-left").length,h=h||l.eq(1).addClass("ui-btn-right").length),r.addBackBtn&&u==="header"&&e(".ui-page").length>1&&n.jqmData("url")!==e.mobile.path.stripHash(location.hash)&&!c&&(p=e("<a href='javascript:void(0);' class='ui-btn-left' data-"+e.mobile.ns+"rel='back' data-"+e.mobile.ns+"icon='arrow-l'>"+r.backBtnText+"</a>").attr("data-"+e.mobile.ns+"theme",r.backBtnTheme||d).prependTo(t)),t.children("h1, h2, h3, h4, h5, h6").addClass("ui-title").attr({role:"heading","aria-level":"1"})}else u==="content"&&(f&&t.addClass("ui-body-"+f),t.attr("role","main"))})})}(e),function(e,t){e.widget("mobile.fixedtoolbar",e.mobile.widget,{options:{visibleOnPageShow:!0,disablePageZoom:!0,transition:"slide",fullscreen:!1,tapToggle:!0,tapToggleBlacklist:"a, button, input, select, textarea, .ui-header-fixed, .ui-footer-fixed, .ui-popup, .ui-panel, .ui-panel-dismiss-open",hideDuringFocus:"input, textarea, select",updatePagePadding:!0,trackPersistentToolbars:!0,supportBlacklist:function(){return!e.support.fixedPosition},initSelector:":jqmData(position='fixed')"},_create:function(){var t=this,n=t.options,r=t.element,i=r.is(":jqmData(role='header')")?"header":"footer",s=r.closest(".ui-page");if(n.supportBlacklist()){t.destroy();return}r.addClass("ui-"+i+"-fixed"),n.fullscreen?(r.addClass("ui-"+i+"-fullscreen"),s.addClass("ui-page-"+i+"-fullscreen")):s.addClass("ui-page-"+i+"-fixed"),e.extend(this,{_thisPage:null}),t._addTransitionClass(),t._bindPageEvents(),t._bindToggleHandlers()},_addTransitionClass:function(){var e=this.options.transition;e&&e!=="none"&&(e==="slide"&&(e=this.element.is(".ui-header")?"slidedown":"slideup"),this.element.addClass(e))},_bindPageEvents:function(){this._thisPage=this.element.closest(".ui-page"),this._on(this._thisPage,{pagebeforeshow:"_handlePageBeforeShow",webkitAnimationStart:"_handleAnimationStart",animationstart:"_handleAnimationStart",updatelayout:"_handleAnimationStart",pageshow:"_handlePageShow",pagebeforehide:"_handlePageBeforeHide"})},_handlePageBeforeShow:function(){var t=this.options;t.disablePageZoom&&e.mobile.zoom.disable(!0),t.visibleOnPageShow||this.hide(!0)},_handleAnimationStart:function(){this.options.updatePagePadding&&this.updatePagePadding(this._thisPage)},_handlePageShow:function(){this.updatePagePadding(this._thisPage),this.options.updatePagePadding&&this._on(e.mobile.window,{throttledresize:"updatePagePadding"})},_handlePageBeforeHide:function(t,n){var r=this.options;r.disablePageZoom&&e.mobile.zoom.enable(!0),r.updatePagePadding&&this._off(e.mobile.window,"throttledresize");if(r.trackPersistentToolbars){var i=e(".ui-footer-fixed:jqmData(id)",this._thisPage),s=e(".ui-header-fixed:jqmData(id)",this._thisPage),o=i.length&&n.nextPage&&e(".ui-footer-fixed:jqmData(id='"+i.jqmData("id")+"')",n.nextPage)||e(),u=s.length&&n.nextPage&&e(".ui-header-fixed:jqmData(id='"+s.jqmData("id")+"')",n.nextPage)||e();if(o.length||u.length)o.add(u).appendTo(e.mobile.pageContainer),n.nextPage.one("pageshow",function(){u.prependTo(this),o.appendTo(this)})}},_visible:!0,updatePagePadding:function(n){var r=this.element,i=r.is(".ui-header"),s=parseFloat(r.css(i?"top":"bottom"));if(this.options.fullscreen)return;n=n&&n.type===t&&n||this._thisPage||r.closest(".ui-page"),e(n).css("padding-"+(i?"top":"bottom"),r.outerHeight()+s)},_useTransition:function(t){var n=e.mobile.window,r=this.element,i=n.scrollTop(),s=r.height(),o=r.closest(".ui-page").height(),u=e.mobile.getScreenHeight(),a=r.is(":jqmData(role='header')")?"header":"footer";return!t&&(this.options.transition&&this.options.transition!=="none"&&(a==="header"&&!this.options.fullscreen&&i>s||a==="footer"&&!this.options.fullscreen&&i+u<o-s)||this.options.fullscreen)},show:function(e){var t="ui-fixed-hidden",n=this.element;this._useTransition(e)?n.removeClass("out "+t).addClass("in").animationComplete(function(){n.removeClass("in")}):n.removeClass(t),this._visible=!0},hide:function(e){var t="ui-fixed-hidden",n=this.element,r="out"+(this.options.transition==="slide"?" reverse":"");this._useTransition(e)?n.addClass(r).removeClass("in").animationComplete(function(){n.addClass(t).removeClass(r)}):n.addClass(t).removeClass(r),this._visible=!1},toggle:function(){this[this._visible?"hide":"show"]()},_bindToggleHandlers:function(){var t=this,n=t.options,r=t.element,i,s,o=!0;r.closest(".ui-page").bind("vclick",function(r){n.tapToggle&&!e(r.target).closest(n.tapToggleBlacklist).length&&t.toggle()}).bind("focusin focusout",function(r){screen.width<1025&&e(r.target).is(n.hideDuringFocus)&&!e(r.target).closest(".ui-header-fixed, .ui-footer-fixed").length&&(r.type==="focusout"&&!o?(o=!0,clearTimeout(s),i=setTimeout(function(){t.show()},0)):r.type==="focusin"&&!!o&&(clearTimeout(i),o=!1,s=setTimeout(function(){t.hide()},0)))})},_destroy:function(){var e=this.element,t=e.is(".ui-header");e.closest(".ui-page").css("padding-"+(t?"top":"bottom"),""),e.removeClass("ui-header-fixed ui-footer-fixed ui-header-fullscreen ui-footer-fullscreen in out fade slidedown slideup ui-fixed-hidden"),e.closest(".ui-page").removeClass("ui-page-header-fixed ui-page-footer-fixed ui-page-header-fullscreen ui-page-footer-fullscreen")}}),e.mobile.document.bind("pagecreate create",function(t){e(t.target).jqmData("fullscreen")&&e(e.mobile.fixedtoolbar.prototype.options.initSelector,t.target).not(":jqmData(fullscreen)").jqmData("fullscreen",!0),e.mobile.fixedtoolbar.prototype.enhanceWithin(t.target)})}(e),function(e,t){e.widget("mobile.fixedtoolbar",e.mobile.fixedtoolbar,{_create:function(){this._super(),this._workarounds()},_workarounds:function(){var e=navigator.userAgent,t=navigator.platform,n=e.match(/AppleWebKit\/([0-9]+)/),r=!!n&&n[1],i=null,s=this;if(t.indexOf("iPhone")>-1||t.indexOf("iPad")>-1||t.indexOf("iPod")>-1)i="ios";else{if(!(e.indexOf("Android")>-1))return;i="android"}if(i==="ios")s._bindScrollWorkaround();else{if(!(i==="android"&&r&&r<534))return;s._bindScrollWorkaround(),s._bindListThumbWorkaround()}},_viewportOffset:function(){var t=this.element,n=t.is(".ui-header"),r=Math.abs(t.offset().top-e.mobile.window.scrollTop());return n||(r=Math.round(r-e.mobile.window.height()+t.outerHeight())-60),r},_bindScrollWorkaround:function(){var t=this;this._on(e.mobile.window,{scrollstop:function(){var e=t._viewportOffset();e>2&&t._visible&&t._triggerRedraw()}})},_bindListThumbWorkaround:function(){this.element.closest(".ui-page").addClass("ui-android-2x-fixed")},_triggerRedraw:function(){var t=parseFloat(e(".ui-page-active").css("padding-bottom"));e(".ui-page-active").css("padding-bottom",t+1+"px"),setTimeout(function(){e(".ui-page-active").css("padding-bottom",t+"px")},0)},destroy:function(){this._super(),this.element.closest(".ui-page-active").removeClass("ui-android-2x-fix")}})}(e),function(e,t){e.widget("mobile.button",e.mobile.widget,{options:{theme:null,icon:null,iconpos:null,corners:!0,shadow:!0,iconshadow:!0,inline:null,mini:null,initSelector:"button, [type='button'], [type='submit'], [type='reset']"},_create:function(){var t=this.element,n,r=function(e){var t,n={};for(t in e)e[t]!==null&&t!=="initSelector"&&(n[t]=e[t]);return n}(this.options),i="",s;if(t[0].tagName==="A"){t.hasClass("ui-btn")||t.buttonMarkup();return}this.options.theme||(this.options.theme=e.mobile.getInheritedTheme(this.element,"c")),!~t[0].className.indexOf("ui-btn-left")||(i="ui-btn-left"),!~t[0].className.indexOf("ui-btn-right")||(i="ui-btn-right");if(t.attr("type")==="submit"||t.attr("type")==="reset")i?i+=" ui-submit":i="ui-submit";e("label[for='"+t.attr("id")+"']").addClass("ui-submit"),this.button=e("<div></div>")[t.html()?"html":"text"](t.html()||t.val()).insertBefore(t).buttonMarkup(r).addClass(i).append(t.addClass("ui-btn-hidden")),n=this.button,t.bind({focus:function(){n.addClass(e.mobile.focusClass)},blur:function(){n.removeClass(e.mobile.focusClass)}}),this.refresh()},_setOption:function(t,n){var r={};r[t]=n,t!=="initSelector"&&(this.button.buttonMarkup(r),this.element.attr("data-"+(e.mobile.ns||"")+t.replace(/([A-Z])/,"-$1").toLowerCase(),n)),this._super("_setOption",t,n)},enable:function(){return this.element.attr("disabled",!1),this.button.removeClass("ui-disabled").attr("aria-disabled",!1),this._setOption("disabled",!1)},disable:function(){return this.element.attr("disabled",!0),this.button.addClass("ui-disabled").attr("aria-disabled",!0),this._setOption("disabled",!0)},refresh:function(){var t=this.element;t.prop("disabled")?this.disable():this.enable(),e(this.button.data("buttonElements").text)[t.html()?"html":"text"](t.html()||t.val())}}),e.mobile.document.bind("pagecreate create",function(t){e.mobile.button.prototype.enhanceWithin(t.target,!0)})}(e),function(e,t){e.mobile.behaviors.formReset={_handleFormReset:function(){this._on(this.element.closest("form"),{reset:function(){this._delay("_reset")}})}}}(e),function(e,t){e.widget("mobile.checkboxradio",e.mobile.widget,e.extend({options:{theme:null,mini:!1,initSelector:"input[type='checkbox'],input[type='radio']"},_create:function(){var t=this,r=this.element,i=this.options,s=function(e,t){return e.jqmData(t)||e.closest("form, fieldset").jqmData(t)},o=e(r).closest("label"),u=o.length?o:e(r).closest("form, fieldset, :jqmData(role='page'), :jqmData(role='dialog')").find("label").filter("[for='"+r[0].id+"']").first(),a=r[0].type,f=s(r,"mini")||i.mini,l=a+"-on",c=a+"-off",h=s(r,"iconpos"),p="ui-"+l,d="ui-"+c;if(a!=="checkbox"&&a!=="radio")return;e.extend(this,{label:u,inputtype:a,checkedClass:p,uncheckedClass:d,checkedicon:l,uncheckedicon:c}),i.theme||(i.theme=e.mobile.getInheritedTheme(this.element,"c")),u.buttonMarkup({theme:i.theme,icon:c,shadow:!1,mini:f,iconpos:h});var v=n.createElement("div");v.className="ui-"+a,r.add(u).wrapAll(v),u.bind({vmouseover:function(t){e(this).parent().is(".ui-disabled")&&t.stopPropagation()},vclick:function(e){if(r.is(":disabled")){e.preventDefault();return}return t._cacheVals(),r.prop("checked",a==="radio"&&!0||!r.prop("checked")),r.triggerHandler("click"),t._getInputSet().not(r).prop("checked",!1),t._updateAll(),!1}}),r.bind({vmousedown:function(){t._cacheVals()},vclick:function(){var n=e(this);n.is(":checked")?(n.prop("checked",!0),t._getInputSet().not(n).prop("checked",!1)):n.prop("checked",!1),t._updateAll()},focus:function(){u.addClass(e.mobile.focusClass)},blur:function(){u.removeClass(e.mobile.focusClass)}}),this._handleFormReset(),this.refresh()},_cacheVals:function(){this._getInputSet().each(function(){e(this).jqmData("cacheVal",this.checked)})},_getInputSet:function(){return this.inputtype==="checkbox"?this.element:this.element.closest("form, :jqmData(role='page'), :jqmData(role='dialog')").find("input[name='"+this.element[0].name+"'][type='"+this.inputtype+"']")},_updateAll:function(){var t=this;this._getInputSet().each(function(){var n=e(this);(this.checked||t.inputtype==="checkbox")&&n.trigger("change")}).checkboxradio("refresh")},_reset:function(){this.refresh()},refresh:function(){var t=this.element[0],n=" "+e.mobile.activeBtnClass,r=this.checkedClass+(this.element.parents(".ui-controlgroup-horizontal").length?n:""),i=this.label;t.checked?i.removeClass(this.uncheckedClass+n).addClass(r).buttonMarkup({icon:this.checkedicon}):i.removeClass(r).addClass(this.uncheckedClass).buttonMarkup({icon:this.uncheckedicon}),t.disabled?this.disable():this.enable()},disable:function(){this.element.prop("disabled",!0).parent().addClass("ui-disabled")},enable:function(){this.element.prop("disabled",!1).parent().removeClass("ui-disabled")}},e.mobile.behaviors.formReset)),e.mobile.document.bind("pagecreate create",function(t){e.mobile.checkboxradio.prototype.enhanceWithin(t.target,!0)})}(e),function(e,t){e.widget("mobile.textinput",e.mobile.widget,{options:{theme:null,mini:!1,preventFocusZoom:/iPhone|iPad|iPod/.test(navigator.platform)&&navigator.userAgent.indexOf("AppleWebKit")>-1,initSelector:"input[type='text'], input[type='search'], :jqmData(type='search'), input[type='number'], :jqmData(type='number'), input[type='password'], input[type='email'], input[type='url'], input[type='tel'], textarea, input[type='time'], input[type='date'], input[type='month'], input[type='week'], input[type='datetime'], input[type='datetime-local'], input[type='color'], input:not([type]), input[type='file']",clearBtn:!1,clearSearchButtonText:null,clearBtnText:"clear text",disabled:!1},_create:function(){function d(){setTimeout(function(){f.toggleClass("ui-input-clear-hidden",!n.val())},0)}var t=this,n=this.element,r=this.options,i=r.theme||e.mobile.getInheritedTheme(this.element,"c"),s=" ui-body-"+i,o=r.mini?" ui-mini":"",u=n.is("[type='search'], :jqmData(type='search')"),a,f,l=r.clearSearchButtonText||r.clearBtnText,c=n.is("textarea, :jqmData(type='range')"),h=!!r.clearBtn&&!c,p=n.is("input")&&!n.is(":jqmData(type='range')");e("label[for='"+n.attr("id")+"']").addClass("ui-input-text"),a=n.addClass("ui-input-text ui-body-"+i),typeof n[0].autocorrect!="undefined"&&!e.support.touchOverflow&&(n[0].setAttribute("autocorrect","off"),n[0].setAttribute("autocomplete","off")),u?a=n.wrap("<div class='ui-input-search ui-shadow-inset ui-btn-corner-all ui-btn-shadow ui-icon-searchfield"+s+o+"'></div>").parent():p&&(a=n.wrap("<div class='ui-input-text ui-shadow-inset ui-corner-all ui-btn-shadow"+s+o+"'></div>").parent()),h||u?(f=e("<a href='#' class='ui-input-clear' title='"+l+"'>"+l+"</a>").bind("click",function(e){n.val("").focus().trigger("change"),f.addClass("ui-input-clear-hidden"),e.preventDefault()}).appendTo(a).buttonMarkup({icon:"delete",iconpos:"notext",corners:!0,shadow:!0,mini:r.mini}),u||a.addClass("ui-input-has-clear"),d(),n.bind("paste cut keyup input focus change blur",d)):!p&&!u&&n.addClass("ui-corner-all ui-shadow-inset"+s+o),n.focus(function(){r.preventFocusZoom&&e.mobile.zoom.disable(!0),a.addClass(e.mobile.focusClass)}).blur(function(){a.removeClass(e.mobile.focusClass),r.preventFocusZoom&&e.mobile.zoom.enable(!0)});if(n.is("textarea")){var v=15,m=100,g;this._keyup=function(){var e=n[0].scrollHeight,t=n[0].clientHeight;if(t<e){var r=parseFloat(n.css("padding-top")),i=parseFloat(n.css("padding-bottom")),s=r+i;n.height(e-s+v)}},n.on("keyup change input paste",function(){clearTimeout(g),g=setTimeout(t._keyup,m)}),this._on(!0,e.mobile.document,{pagechange:"_keyup"}),e.trim(n.val())&&this._on(!0,e.mobile.window,{load:"_keyup"})}n.attr("disabled")&&this.disable()},disable:function(){var e,t=this.element.is("[type='search'], :jqmData(type='search')"),n=this.element.is("input")&&!this.element.is(":jqmData(type='range')"),r=this.element.attr("disabled",!0)&&(n||t);return r?e=this.element.parent():e=this.element,e.addClass("ui-disabled"),this._setOption("disabled",!0)},enable:function(){var e,t=this.element.is("[type='search'], :jqmData(type='search')"),n=this.element.is("input")&&!this.element.is(":jqmData(type='range')"),r=this.element.attr("disabled",!1)&&(n||t);return r?e=this.element.parent():e=this.element,e.removeClass("ui-disabled"),this._setOption("disabled",!1)}}),e.mobile.document.bind("pagecreate create",function(t){e.mobile.textinput.prototype.enhanceWithin(t.target,!0)})}(e),function(e,r){e.widget("mobile.slider",e.mobile.widget,e.extend({widgetEventPrefix:"slide",options:{theme:null,trackTheme:null,disabled:!1,initSelector:"input[type='range'], :jqmData(type='range'), :jqmData(role='slider')",mini:!1,highlight:!1},_create:function(){var i=this,s=this.element,o=e.mobile.getInheritedTheme(s,"c"),u=this.options.theme||o,a=this.options.trackTheme||o,f=s[0].nodeName.toLowerCase(),l=this.isToggleSwitch=f==="select",c=s.parent().is(":jqmData(role='rangeslider')"),h=this.isToggleSwitch?"ui-slider-switch":"",p=s.attr("id"),d=e("[for='"+p+"']"),v=d.attr("id")||p+"-label",m=d.attr("id",v),g=this.isToggleSwitch?0:parseFloat(s.attr("min")),y=this.isToggleSwitch?s.find("option").length-1:parseFloat(s.attr("max")),b=t.parseFloat(s.attr("step")||1),w=this.options.mini||s.jqmData("mini")?" ui-mini":"",E=n.createElement("a"),S=e(E),x=n.createElement("div"),T=e(x),N=this.options.highlight&&!this.isToggleSwitch?function(){var t=n.createElement("div");return t.className="ui-slider-bg "+e.mobile.activeBtnClass+" ui-btn-corner-all",e(t).prependTo(T)}():!1,C,k;E.setAttribute("href","#"),x.setAttribute("role","application"),x.className=[this.isToggleSwitch?"ui-slider ":"ui-slider-track ",h," ui-btn-down-",a," ui-btn-corner-all",w].join(""),E.className="ui-slider-handle",x.appendChild(E),S.buttonMarkup({corners:!0,theme:u,shadow:!0}).attr({role:"slider","aria-valuemin":g,"aria-valuemax":y,"aria-valuenow":this._value(),"aria-valuetext":this._value(),title:this._value(),"aria-labelledby":v}),e.extend(this,{slider:T,handle:S,type:f,step:b,max:y,min:g,valuebg:N,isRangeslider:c,dragging:!1,beforeStart:null,userModified:!1,mouseMoved:!1});if(this.isToggleSwitch){k=n.createElement("div"),k.className="ui-slider-inneroffset";for(var L=0,A=x.childNodes.length;L<A;L++)k.appendChild(x.childNodes[L]);x.appendChild(k),S.addClass("ui-slider-handle-snapping"),C=s.find("option");for(var O=0,M=C.length;O<M;O++){var _=O?"a":"b",D=O?" "+e.mobile.activeBtnClass:" ui-btn-down-"+a,P=n.createElement("div"),H=n.createElement("span");H.className=["ui-slider-label ui-slider-label-",_,D," ui-btn-corner-all"].join(""),H.setAttribute("role","img"),H.appendChild(n.createTextNode(C[O].innerHTML)),e(H).prependTo(T)}i._labels=e(".ui-slider-label",T)}m.addClass("ui-slider"),s.addClass(this.isToggleSwitch?"ui-slider-switch":"ui-slider-input"),this._on(s,{change:"_controlChange",keyup:"_controlKeyup",blur:"_controlBlur",vmouseup:"_controlVMouseUp"}),T.bind("vmousedown",e.proxy(this._sliderVMouseDown,this)).bind("vclick",!1),this._on(n,{vmousemove:"_preventDocumentDrag"}),this._on(T.add(n),{vmouseup:"_sliderVMouseUp"}),T.insertAfter(s),!this.isToggleSwitch&&!c&&(k=this.options.mini?"<div class='ui-slider ui-mini'>":"<div class='ui-slider'>",s.add(T).wrapAll(k)),this.isToggleSwitch&&this.handle.bind({focus:function(){T.addClass(e.mobile.focusClass)},blur:function(){T.removeClass(e.mobile.focusClass)}}),this._on(this.handle,{vmousedown:"_handleVMouseDown",keydown:"_handleKeydown",keyup:"_handleKeyup"}),this.handle.bind("vclick",!1),this._handleFormReset(),this.refresh(r,r,!0)},_controlChange:function(e){if(this._trigger("controlchange",e)===!1)return!1;this.mouseMoved||this.refresh(this._value(),!0)},_controlKeyup:function(e){this.refresh(this._value(),!0,!0)},_controlBlur:function(e){this.refresh(this._value(),!0)},_controlVMouseUp:function(e){this._checkedRefresh()},_handleVMouseDown:function(e){this.handle.focus()},_handleKeydown:function(t){var n=this._value();if(this.options.disabled)return;switch(t.keyCode){case e.mobile.keyCode.HOME:case e.mobile.keyCode.END:case e.mobile.keyCode.PAGE_UP:case e.mobile.keyCode.PAGE_DOWN:case e.mobile.keyCode.UP:case e.mobile.keyCode.RIGHT:case e.mobile.keyCode.DOWN:case e.mobile.keyCode.LEFT:t.preventDefault(),this._keySliding||(this._keySliding=!0,this.handle.addClass("ui-state-active"))}switch(t.keyCode){case e.mobile.keyCode.HOME:this.refresh(this.min);break;case e.mobile.keyCode.END:this.refresh(this.max);break;case e.mobile.keyCode.PAGE_UP:case e.mobile.keyCode.UP:case e.mobile.keyCode.RIGHT:this.refresh(n+this.step);break;case e.mobile.keyCode.PAGE_DOWN:case e.mobile.keyCode.DOWN:case e.mobile.keyCode.LEFT:this.refresh(n-this.step)}},_handleKeyup:function(e){this._keySliding&&(this._keySliding=!1,this.handle.removeClass("ui-state-active"))},_sliderVMouseDown:function(e){return this.options.disabled||e.which!==1&&e.which!==0?!1:this._trigger("beforestart",e)===!1?!1:(this.dragging=!0,this.userModified=!1,this.mouseMoved=!1,this.isToggleSwitch&&(this.beforeStart=this.element[0].selectedIndex),this.refresh(e),this._trigger("start"),!1)},_sliderVMouseUp:function(){if(this.dragging)return this.dragging=!1,this.isToggleSwitch&&(this.handle.addClass("ui-slider-handle-snapping"),this.mouseMoved?this.userModified?this.refresh(this.beforeStart===0?1:0):this.refresh(this.beforeStart):this.refresh(this.beforeStart===0?1:0)),this.mouseMoved=!1,this._trigger("stop"),!1},_preventDocumentDrag:function(e){if(this._trigger("drag",e)===!1)return!1;if(this.dragging&&!this.options.disabled)return this.mouseMoved=!0,this.isToggleSwitch&&this.handle.removeClass("ui-slider-handle-snapping"),this.refresh(e),this.userModified=this.beforeStart!==this.element[0].selectedIndex,!1},_checkedRefresh:function(){this.value!==this._value()&&this.refresh(this._value())},_value:function(){return this.isToggleSwitch?this.element[0].selectedIndex:parseFloat(this.element.val())},_reset:function(){this.refresh(r,!1,!0)},refresh:function(t,r,i){var s=this,o=e.mobile.getInheritedTheme(this.element,"c"),u=this.options.theme||o,a=this.options.trackTheme||o,f,l,c,h;s.slider[0].className=[this.isToggleSwitch?"ui-slider ui-slider-switch":"ui-slider-track"," ui-btn-down-"+a," ui-btn-corner-all",this.options.mini?" ui-mini":""].join(""),(this.options.disabled||this.element.attr("disabled"))&&this.disable(),this.value=this._value(),this.options.highlight&&!this.isToggleSwitch&&this.slider.find(".ui-slider-bg").length===0&&(this.valuebg=function(){var t=n.createElement("div");return t.className="ui-slider-bg "+e.mobile.activeBtnClass+" ui-btn-corner-all",e(t).prependTo(s.slider)}()),this.handle.buttonMarkup({corners:!0,theme:u,shadow:!0});var p,d,v=this.element,m=!this.isToggleSwitch,g=m?[]:v.find("option"),y=m?parseFloat(v.attr("min")):0,b=m?parseFloat(v.attr("max")):g.length-1,w=m&&parseFloat(v.attr("step"))>0?parseFloat(v.attr("step")):1;if(typeof t=="object"){c=t,h=8,f=this.slider.offset().left,l=this.slider.width(),p=l/((b-y)/w);if(!this.dragging||c.pageX<f-h||c.pageX>f+l+h)return;p>1?d=(c.pageX-f)/l*100:d=Math.round((c.pageX-f)/l*100)}else t==null&&(t=m?parseFloat(v.val()||0):v[0].selectedIndex),d=(parseFloat(t)-y)/(b-y)*100;if(isNaN(d))return;var E=d/100*(b-y)+y,S=(E-y)%w,x=E-S;Math.abs(S)*2>=w&&(x+=S>0?w:-w);var T=100/((b-y)/w);E=parseFloat(x.toFixed(5)),typeof p=="undefined"&&(p=l/((b-y)/w)),p>1&&m&&(d=(E-y)*T*(1/w)),d<0&&(d=0),d>100&&(d=100),E<y&&(E=y),E>b&&(E=b),this.handle.css("left",d+"%"),this.handle[0].setAttribute("aria-valuenow",m?E:g.eq(E).attr("value")),this.handle[0].setAttribute("aria-valuetext",m?E:g.eq(E).getEncodedText()),this.handle[0].setAttribute("title",m?E:g.eq(E).getEncodedText()),this.valuebg&&this.valuebg.css("width",d+"%");if(this._labels){var N=this.handle.width()/this.slider.width()*100,C=d&&N+(100-N)*d/100,k=d===100?0:Math.min(N+100-C,100);this._labels.each(function(){var t=e(this).is(".ui-slider-label-a");e(this).width((t?C:k)+"%")})}if(!i){var L=!1;m?(L=v.val()!==E,v.val(E)):(L=v[0].selectedIndex!==E,v[0].selectedIndex=E);if(this._trigger("beforechange",t)===!1)return!1;!r&&L&&v.trigger("change")}},enable:function(){return this.element.attr("disabled",!1),this.slider.removeClass("ui-disabled").attr("aria-disabled",!1),this._setOption("disabled",!1)},disable:function(){return this.element.attr("disabled",!0),this.slider.addClass("ui-disabled").attr("aria-disabled",!0),this._setOption("disabled",!0)}},e.mobile.behaviors.formReset)),e.mobile.document.bind("pagecreate create",function(t){e.mobile.slider.prototype.enhanceWithin(t.target,!0)})}(e),function(e,t){e.widget("mobile.rangeslider",e.mobile.widget,{options:{theme:null,trackTheme:null,disabled:!1,initSelector:":jqmData(role='rangeslider')",mini:!1,highlight:!0},_create:function(){var t,n=this.element,r=this.options.mini?"ui-rangeslider ui-mini":"ui-rangeslider",i=n.find("input").first(),s=n.find("input").last(),o=n.find("label").first(),u=e.data(i.get(0),"mobileSlider").slider,a=e.data(s.get(0),"mobileSlider").slider,f=e.data(i.get(0),"mobileSlider").handle,l=e('<div class="ui-rangeslider-sliders" />').appendTo(n);n.find("label").length>1&&(t=n.find("label").last().hide()),i.addClass("ui-rangeslider-first"),s.addClass("ui-rangeslider-last"),n.addClass(r),u.appendTo(l),a.appendTo(l),o.prependTo(n),f.prependTo(a),e.extend(this,{_inputFirst:i,_inputLast:s,_sliderFirst:u,_sliderLast:a,_targetVal:null,_sliderTarget:!1,_sliders:l,_proxy:!1}),this.refresh(),this._on(this.element.find("input.ui-slider-input"),{slidebeforestart:"_slidebeforestart",slidestop:"_slidestop",slidedrag:"_slidedrag",slidebeforechange:"_change",blur:"_change",keyup:"_change"}),this._on({mousedown:"_change"}),this._on(this.element.closest("form"),{reset:"_handleReset"}),this._on(f,{vmousedown:"_dragFirstHandle"})},_handleReset:function(){var e=this;setTimeout(function(){e._updateHighlight()},0)},_dragFirstHandle:function(t){return e.data(this._inputFirst.get(0),"mobileSlider").dragging=!0,e.data(this._inputFirst.get(0),"mobileSlider").refresh(t),!1},_slidedrag:function(t){var n=e(t.target).is(this._inputFirst),r=n?this._inputLast:this._inputFirst;this._sliderTarget=!1;if(this._proxy==="first"&&n||this._proxy==="last"&&!n)return e.data(r.get(0),"mobileSlider").dragging=!0,e.data(r.get(0),"mobileSlider").refresh(t),!1},_slidestop:function(t){var n=e(t.target).is(this._inputFirst);this._proxy=!1,this.element.find("input").trigger("vmouseup"),this._sliderFirst.css("z-index",n?1:"")},_slidebeforestart:function(t){this._sliderTarget=!1,e(t.originalEvent.target).hasClass("ui-slider-track")&&(this._sliderTarget=!0,this._targetVal=e(t.target).val())},_setOption:function(e){this._superApply(e),this.refresh()},refresh:function(){var e=this.element,t=this.options;e.find("input").slider({theme:t.theme,trackTheme:t.trackTheme,disabled:t.disabled,mini:t.mini,highlight:t.highlight}).slider("refresh"),this._updateHighlight()},_change:function(t){if(t.type==="keyup")return this._updateHighlight(),!1;var n=this,r=parseFloat(this._inputFirst.val(),10),i=parseFloat(this._inputLast.val(),10),s=e(t.target).hasClass("ui-rangeslider-first"),o=s?this._inputFirst:this._inputLast,u=s?this._inputLast:this._inputFirst;if(this._inputFirst.val()>this._inputLast.val()&&t.type==="mousedown"&&!e(t.target).hasClass("ui-slider-handle"))o.blur();else if(t.type==="mousedown")return;r>i&&!this._sliderTarget?(o.val(s?i:r).slider("refresh"),this._trigger("normalize")):r>i&&(o.val(this._targetVal).slider("refresh"),setTimeout(function(){u.val(s?r:i).slider("refresh"),e.data(u.get(0),"mobileSlider").handle.focus(),n._sliderFirst.css("z-index",s?"":1),n._trigger("normalize")},0),this._proxy=s?"first":"last"),r===i?(e.data(o.get(0),"mobileSlider").handle.css("z-index",1),e.data(u.get(0),"mobileSlider").handle.css("z-index",0)):(e.data(u.get(0),"mobileSlider").handle.css("z-index",""),e.data(o.get(0),"mobileSlider").handle.css("z-index","")),this._updateHighlight();if(r>=i)return!1},_updateHighlight:function(){var t=parseInt(e.data(this._inputFirst.get(0),"mobileSlider").handle.get(0).style.left,10),n=parseInt(e.data(this._inputLast.get(0),"mobileSlider").handle.get(0).style.left,10),r=n-t;this.element.find(".ui-slider-bg").css({"margin-left":t+"%",width:r+"%"})},_destroy:function(){this.element.removeClass("ui-rangeslider ui-mini").find("label").show(),this._inputFirst.after(this._sliderFirst),this._inputLast.after(this._sliderLast),this._sliders.remove(),this.element.find("input").removeClass("ui-rangeslider-first ui-rangeslider-last").slider("destroy")}}),e.widget("mobile.rangeslider",e.mobile.rangeslider,e.mobile.behaviors.formReset),e(n).bind("pagecreate create",function(t){e.mobile.rangeslider.prototype.enhanceWithin(t.target,!0)})}(e),function(e,r){e.widget("mobile.selectmenu",e.mobile.widget,e.extend({options:{theme:null,disabled:!1,icon:"arrow-d",iconpos:"right",inline:!1,corners:!0,shadow:!0,iconshadow:!0,overlayTheme:"a",dividerTheme:"b",hidePlaceholderMenuItems:!0,closeText:"Close",nativeMenu:!0,preventFocusZoom:/iPhone|iPad|iPod/.test(navigator.platform)&&navigator.userAgent.indexOf("AppleWebKit")>-1,initSelector:"select:not( :jqmData(role='slider') )",mini:!1},_button:function(){return e("<div/>")},_setDisabled:function(e){return this.element.attr("disabled",e),this.button.attr("aria-disabled",e),this._setOption("disabled",e)},_focusButton:function(){var e=this;setTimeout(function(){e.button.focus()},40)},_selectOptions:function(){return this.select.find("option")},_preExtension:function(){var t="";!~this.element[0].className.indexOf("ui-btn-left")||(t=" ui-btn-left"),!~this.element[0].className.indexOf("ui-btn-right")||(t=" ui-btn-right"),this.select=this.element.removeClass("ui-btn-left ui-btn-right").wrap("<div class='ui-select"+t+"'>"),this.selectID=this.select.attr("id"),this.label=e("label[for='"+this.selectID+"']").addClass("ui-select"),this.isMultiple=this.select[0].multiple,this.options.theme||(this.options.theme=e.mobile.getInheritedTheme(this.select,"c"))},_destroy:function(){var e=this.element.parents(".ui-select");e.length>0&&(e.is(".ui-btn-left, .ui-btn-right")&&this.element.addClass(e.is(".ui-btn-left")?"ui-btn-left":"ui-btn-right"),this.element.insertAfter(e),e.remove())},_create:function(){this._preExtension(),this._trigger("beforeCreate"),this.button=this._button();var n=this,r=this.options,i=r.inline||this.select.jqmData("inline"),s=r.mini||this.select.jqmData("mini"),o=r.icon?r.iconpos||this.select.jqmData("iconpos"):!1,u=this.select[0].selectedIndex===-1?0:this.select[0].selectedIndex,a=this.button.insertBefore(this.select).buttonMarkup({theme:r.theme,icon:r.icon,iconpos:o,inline:i,corners:r.corners,shadow:r.shadow,iconshadow:r.iconshadow,mini:s});this.setButtonText(),r.nativeMenu&&t.opera&&t.opera.version&&a.addClass("ui-select-nativeonly"),this.isMultiple&&(this.buttonCount=e("<span>").addClass("ui-li-count ui-btn-up-c ui-btn-corner-all").hide().appendTo(a.addClass("ui-li-has-count"))),(r.disabled||this.element.attr("disabled"))&&this.disable(),this.select.change(function(){n.refresh(),!r.nativeMenu||this.blur()}),this._handleFormReset(),this.build()},build:function(){var t=this;this.select.appendTo(t.button).bind("vmousedown",function(){t.button.addClass(e.mobile.activeBtnClass)}).bind("focus",function(){t.button.addClass(e.mobile.focusClass)}).bind("blur",function(){t.button.removeClass(e.mobile.focusClass)}).bind("focus vmouseover",function(){t.button.trigger("vmouseover")}).bind("vmousemove",function(){t.button.removeClass(e.mobile.activeBtnClass)}).bind("change blur vmouseout",function(){t.button.trigger("vmouseout").removeClass(e.mobile.activeBtnClass)}).bind("change blur",function(){t.button.removeClass("ui-btn-down-"+t.options.theme)}),t.button.bind("vmousedown",function(){t.options.preventFocusZoom&&e.mobile.zoom.disable(!0)}),t.label.bind("click focus",function(){t.options.preventFocusZoom&&e.mobile.zoom.disable(!0)}),t.select.bind("focus",function(){t.options.preventFocusZoom&&e.mobile.zoom.disable(!0)}),t.button.bind("mouseup",function(){t.options.preventFocusZoom&&setTimeout(function(){e.mobile.zoom.enable(!0)},0)}),t.select.bind("blur",function(){t.options.preventFocusZoom&&e.mobile.zoom.enable(!0)})},selected:function(){return this._selectOptions().filter(":selected")},selectedIndices:function(){var e=this;return this.selected().map(function(){return e._selectOptions().index(this)}).get()},setButtonText:function(){var t=this,r=this.selected(),i=this.placeholder,s=e(n.createElement("span"));this.button.find(".ui-btn-text").html(function(){return r.length?i=r.map(function(){return e(this).text()}).get().join(", "):i=t.placeholder,s.text(i).addClass(t.select.attr("class")).addClass(r.attr("class"))})},setButtonCount:function(){var e=this.selected();this.isMultiple&&this.buttonCount[e.length>1?"show":"hide"]().text(e.length)},_reset:function(){this.refresh()},refresh:function(){this.setButtonText(),this.setButtonCount()},open:e.noop,close:e.noop,disable:function(){this._setDisabled(!0),this.button.addClass("ui-disabled")},enable:function(){this._setDisabled(!1),this.button.removeClass("ui-disabled")}},e.mobile.behaviors.formReset)),e.mobile.document.bind("pagecreate create",function(t){e.mobile.selectmenu.prototype.enhanceWithin(t.target,!0)})}(e),function(e,t){var r={};e.widget("mobile.listview",e.mobile.widget,e.extend({options:{theme:null,countTheme:"c",headerTheme:"b",dividerTheme:"b",icon:"arrow-r",splitIcon:"arrow-r",splitTheme:"b",corners:!0,shadow:!0,inset:!1,initSelector:":jqmData(role='listview')"},_create:function(){var e=this,t="";t+=e.options.inset?" ui-listview-inset":"",!e.options.inset||(t+=e.options.corners?" ui-corner-all":"",t+=e.options.shadow?" ui-shadow":""),e.element.addClass(function(e,n){return n+" ui-listview"+t}),e.refresh(!0)},_findFirstElementByTagName:function(e,t,n,r){var i={};i[n]=i[r]=!0;while(e){if(i[e.nodeName])return e;e=e[t]}return null},_getChildrenByTagName:function(t,n,r){var i=[],s={};s[n]=s[r]=!0,t=t.firstChild;while(t)s[t.nodeName]&&i.push(t),t=t.nextSibling;return e(i)},_addThumbClasses:function(t){var n,r,i=t.length;for(n=0;n<i;n++)r=e(this._findFirstElementByTagName(t[n].firstChild,"nextSibling","img","IMG")),r.length&&(r.addClass("ui-li-thumb"),e(this._findFirstElementByTagName(r[0].parentNode,"parentNode","li","LI")).addClass(r.is(".ui-li-icon")?"ui-li-has-icon":"ui-li-has-thumb"))},refresh:function(t){this.parentPage=this.element.closest(".ui-page"),this._createSubPages();var r=this.options,i=this.element,s=this,o=i.jqmData("dividertheme")||r.dividerTheme,u=i.jqmData("splittheme"),a=i.jqmData("spliticon"),f=i.jqmData("icon"),l=this._getChildrenByTagName(i[0],"li","LI"),c=!!e.nodeName(i[0],"ol"),h=!e.support.cssPseudoElement,p=i.attr("start"),d={},v,m,g,y,b,w,E,S,x,T,N,C,k,L;c&&h&&i.find(".ui-li-dec").remove(),c&&(p||p===0?h?E=parseInt(p,10):(S=parseInt(p,10)-1,i.css("counter-reset","listnumbering "+S)):h&&(E=1)),r.theme||(r.theme=e.mobile.getInheritedTheme(this.element,"c"));for(var A=0,O=l.length;A<O;A++){v=l.eq(A),m="ui-li";if(t||!v.hasClass("ui-li")){g=v.jqmData("theme")||r.theme,y=this._getChildrenByTagName(v[0],"a","A");var M=v.jqmData("role")==="list-divider";y.length&&!M?(N=v.jqmData("icon"),v.buttonMarkup({wrapperEls:"div",shadow:!1,corners:!1,iconpos:"right",icon:y.length>1||N===!1?!1:N||f||r.icon,theme:g}),N!==!1&&y.length===1&&v.addClass("ui-li-has-arrow"),y.first().removeClass("ui-link").addClass("ui-link-inherit"),y.length>1&&(m+=" ui-li-has-alt",b=y.last(),w=u||b.jqmData("theme")||r.splitTheme,L=b.jqmData("icon"),b.appendTo(v).attr("title",e.trim(b.getEncodedText())).addClass("ui-li-link-alt").empty().buttonMarkup({shadow:!1,corners:!1,theme:g,icon:!1,iconpos:"notext"}).find(".ui-btn-inner").append(e(n.createElement("span")).buttonMarkup({shadow:!0,corners:!0,theme:w,iconpos:"notext",icon:L||N||a||r.splitIcon})))):M?(m+=" ui-li-divider ui-bar-"+(v.jqmData("theme")||o),v.attr("role","heading"),c&&(p||p===0?h?E=parseInt(p,10):(x=parseInt(p,10)-1,v.css("counter-reset","listnumbering "+x)):h&&(E=1))):m+=" ui-li-static ui-btn-up-"+g}c&&h&&m.indexOf("ui-li-divider")<0&&(T=m.indexOf("ui-li-static")>0?v:v.find(".ui-link-inherit"),T.addClass("ui-li-jsnumbering").prepend("<span class='ui-li-dec'>"+E++ +". </span>")),d[m]||(d[m]=[]),d[m].push(v[0])}for(m in d)e(d[m]).addClass(m).children(".ui-btn-inner").addClass(m);i.find("h1, h2, h3, h4, h5, h6").addClass("ui-li-heading").end().find("p, dl").addClass("ui-li-desc").end().find(".ui-li-aside").each(function(){var t=e(this);t.prependTo(t.parent())}).end().find(".ui-li-count").each(function(){e(this).closest("li").addClass("ui-li-has-count")}).addClass("ui-btn-up-"+(i.jqmData("counttheme")||this.options.countTheme)+" ui-btn-corner-all"),this._addThumbClasses(l),this._addThumbClasses(i.find(".ui-link-inherit")),this._addFirstLastClasses(l,this._getVisibles(l,t),t),this._trigger("afterrefresh")},_idStringEscape:function(e){return e.replace(/[^a-zA-Z0-9]/g,"-")},_createSubPages:function(){var t=this.element,n=t.closest(".ui-page"),i=n.jqmData("url"),s=i||n[0][e.expando],o=t.attr("id"),u=this.options,a="data-"+e.mobile.ns,f=this,l=n.find(":jqmData(role='footer')").jqmData("id"),c;typeof r[s]=="undefined"&&(r[s]=-1),o=o||++r[s],e(t.find("li>ul, li>ol").toArray().reverse()).each(function(n){var r=this,s=e(this),f=s.attr("id")||o+"-"+n,h=s.parent(),p=e(s.prevAll().toArray().reverse()),d=p.length?p:e("<span>"+e.trim(h.contents()[0].nodeValue)+"</span>"),v=d.first().getEncodedText(),m=(i||"")+"&"+e.mobile.subPageUrlKey+"="+f,g=s.jqmData("theme")||u.theme,y=s.jqmData("counttheme")||t.jqmData("counttheme")||u.countTheme,b,w;c=!0,b=s.detach().wrap("<div "+a+"role='page' "+a+"url='"+m+"' "+a+"theme='"+g+"' "+a+"count-theme='"+y+"'><div "+a+"role='content'></div></div>").parent().before("<div "+a+"role='header' "+a+"theme='"+u.headerTheme+"'><div class='ui-title'>"+v+"</div></div>").after(l?e("<div "+a+"role='footer' "+a+"id='"+l+"'>"):"").parent().appendTo(e.mobile.pageContainer),b.page(),w=h.find("a:first"),w.length||(w=e("<a/>").html(d||v).prependTo(h.empty())),w.attr("href","#"+m)}).listview();if(c&&n.is(":jqmData(external-page='true')")&&n.data("mobile-page").options.domCache===!1){var h=function(t,r){var s=r.nextPage,o,u=new e.Event("pageremove");r.nextPage&&(o=s.jqmData("url"),o.indexOf(i+"&"+e.mobile.subPageUrlKey)!==0&&(f.childPages().remove(),n.trigger(u),u.isDefaultPrevented()||n.removeWithDependents()))};n.unbind("pagehide.remove").bind("pagehide.remove",h)}},childPages:function(){var t=this.parentPage.jqmData("url");return e(":jqmData(url^='"+t+"&"+e.mobile.subPageUrlKey+"')")}},e.mobile.behaviors.addFirstLastClasses)),e.mobile.document.bind("pagecreate create",function(t){e.mobile.listview.prototype.enhanceWithin(t.target)})}(e),function(e,r){function i(e,t,n,r){var i=r;return e<t?i=n+(e-t)/2:i=Math.min(Math.max(n,r-t/2),n+e-t),i}function s(){var n=e.mobile.window;return{x:n.scrollLeft(),y:n.scrollTop(),cx:t.innerWidth||n.width(),cy:t.innerHeight||n.height()}}e.widget("mobile.popup",e.mobile.widget,{options:{theme:null,overlayTheme:null,shadow:!0,corners:!0,transition:"none",positionTo:"origin",tolerance:null,initSelector:":jqmData(role='popup')",closeLinkSelector:"a:jqmData(rel='back')",closeLinkEvents:"click.popup",navigateEvents:"navigate.popup",closeEvents:"navigate.popup pagebeforechange.popup",dismissible:!0,history:!e.mobile.browser.oldIE},_eatEventAndClose:function(e){return e.preventDefault(),e.stopImmediatePropagation(),this.options.dismissible&&this.close(),!1},_resizeScreen:function(){var e=this._ui.container.outerHeight(!0);this._ui.screen.removeAttr("style"),e>this._ui.screen.height()&&this._ui.screen.height(e)},_handleWindowKeyUp:function(t){if(this._isOpen&&t.keyCode===e.mobile.keyCode.ESCAPE)return this._eatEventAndClose(t)},_expectResizeEvent:function(){var t=s();if(this._resizeData){if(t.x===this._resizeData.winCoords.x&&t.y===this._resizeData.winCoords.y&&t.cx===this._resizeData.winCoords.cx&&t.cy===this._resizeData.winCoords.cy)return!1;clearTimeout(this._resizeData.timeoutId)}return this._resizeData={timeoutId:setTimeout(e.proxy(this,"_resizeTimeout"),200),winCoords:t},!0},_resizeTimeout:function(){this._isOpen?this._expectResizeEvent()||(this._ui.container.hasClass("ui-popup-hidden")&&(this._ui.container.removeClass("ui-popup-hidden"),this.reposition({positionTo:"window"}),this._ignoreResizeEvents()),this._resizeScreen(),this._resizeData=null,this._orientationchangeInProgress=!1):(this._resizeData=null,this._orientationchangeInProgress=!1)},_ignoreResizeEvents:function(){var e=this;this._ignoreResizeTo&&clearTimeout(this._ignoreResizeTo),this._ignoreResizeTo=setTimeout(function(){e._ignoreResizeTo=0},1e3)},_handleWindowResize:function(e){this._isOpen&&this._ignoreResizeTo===0&&(this._expectResizeEvent()||this._orientationchangeInProgress)&&!this._ui.container.hasClass("ui-popup-hidden")&&this._ui.container.addClass("ui-popup-hidden").removeAttr("style")},_handleWindowOrientationchange:function(e){!this._orientationchangeInProgress&&this._isOpen&&this._ignoreResizeTo===0&&(this._expectResizeEvent(),this._orientationchangeInProgress=!0)},_handleDocumentFocusIn:function(t){var r=t.target,i,s=this._ui;if(!this._isOpen)return;if(r!==s.container[0]){i=e(t.target);if(0===i.parents().filter(s.container[0]).length)return e(n.activeElement).one("focus",function(e){i.blur()}),s.focusElement.focus(),t.preventDefault(),t.stopImmediatePropagation(),!1;s.focusElement[0]===s.container[0]&&(s.focusElement=i)}this._ignoreResizeEvents()},_create:function(){var t={screen:e("<div class='ui-screen-hidden ui-popup-screen'></div>"),placeholder:e("<div style='display: none;'><!-- placeholder --></div>"),container:e("<div class='ui-popup-container ui-popup-hidden'></div>")},n=this.element.closest(".ui-page"),i=this.element.attr("id"),s=this;this.options.history=this.options.history&&e.mobile.ajaxEnabled&&e.mobile.hashListeningEnabled,n.length===0&&(n=e("body")),this.options.container=this.options.container||e.mobile.pageContainer,n.append(t.screen),t.container.insertAfter(t.screen),t.placeholder.insertAfter(this.element),i&&(t.screen.attr("id",i+"-screen"),t.container.attr("id",i+"-popup"),t.placeholder.html("<!-- placeholder for "+i+" -->")),t.container.append(this.element),t.focusElement=t.container,this.element.addClass("ui-popup"),e.extend(this,{_scrollTop:0,_page:n,_ui:t,_fallbackTransition:"",_currentTransition:!1,_prereqs:null,_isOpen:!1,_tolerance:null,_resizeData:null,_ignoreResizeTo:0,_orientationchangeInProgress:!1}),e.each(this.options,function(e,t){s.options[e]=r,s._setOption(e,t,!0)}),t.screen.bind("vclick",e.proxy(this,"_eatEventAndClose")),this._on(e.mobile.window,{orientationchange:e.proxy(this,"_handleWindowOrientationchange"),resize:e.proxy(this,"_handleWindowResize"),keyup:e.proxy(this,"_handleWindowKeyUp")}),this._on(e.mobile.document,{focusin:e.proxy(this,"_handleDocumentFocusIn")})},_applyTheme:function(e,t,n){var r=(e.attr("class")||"").split(" "),i=!0,s=null,o,u=String(t);while(r.length>0){s=r.pop(),o=(new RegExp("^ui-"+n+"-([a-z])$")).exec(s);if(o&&o.length>1){s=o[1];break}s=null}t!==s&&(e.removeClass("ui-"+n+"-"+s),t!==null&&t!=="none"&&e.addClass("ui-"+n+"-"+u))},_setTheme:function(e){this._applyTheme(this.element,e,"body")},_setOverlayTheme:function(e){this._applyTheme(this._ui.screen,e,"overlay"),this._isOpen&&this._ui.screen.addClass("in")},_setShadow:function(e){this.element.toggleClass("ui-overlay-shadow",e)},_setCorners:function(e){this.element.toggleClass("ui-corner-all",e)},_applyTransition:function(t){this._ui.container.removeClass(this._fallbackTransition),t&&t!=="none"&&(this._fallbackTransition=e.mobile._maybeDegradeTransition(t),this._fallbackTransition==="none"&&(this._fallbackTransition=""),this._ui.container.addClass(this._fallbackTransition))},_setTransition:function(e){this._currentTransition||this._applyTransition(e)},_setTolerance:function(t){var n={t:30,r:15,b:30,l:15};if(t!==r){var i=String(t).split(",");e.each(i,function(e,t){i[e]=parseInt(t,10)});switch(i.length){case 1:isNaN(i[0])||(n.t=n.r=n.b=n.l=i[0]);break;case 2:isNaN(i[0])||(n.t=n.b=i[0]),isNaN(i[1])||(n.l=n.r=i[1]);break;case 4:isNaN(i[0])||(n.t=i[0]),isNaN(i[1])||(n.r=i[1]),isNaN(i[2])||(n.b=i[2]),isNaN(i[3])||(n.l=i[3]);break;default:}}this._tolerance=n},_setOption:function(t,n){var i,s="_set"+t.charAt(0).toUpperCase()+t.slice(1);this[s]!==r&&this[s](n),i=["initSelector","closeLinkSelector","closeLinkEvents","navigateEvents","closeEvents","history","container"],e.mobile.widget.prototype._setOption.apply(this,arguments),e.inArray(t,i)===-1&&this.element.attr("data-"+(e.mobile.ns||"")+t.replace(/([A-Z])/,"-$1").toLowerCase(),n)},_placementCoords:function(e){var t=s(),r={x:this._tolerance.l,y:t.y+this._tolerance.t,cx:t.cx-this._tolerance.l-this._tolerance.r,cy:t.cy-this._tolerance.t-this._tolerance.b},o,u;this._ui.container.css("max-width",r.cx),o={cx:this._ui.container.outerWidth(!0),cy:this._ui.container.outerHeight(!0)},u={x:i(r.cx,o.cx,r.x,e.x),y:i(r.cy,o.cy,r.y,e.y)},u.y=Math.max(0,u.y);var a=n.documentElement,f=n.body,l=Math.max(a.clientHeight,f.scrollHeight,f.offsetHeight,a.scrollHeight,a.offsetHeight);return u.y-=Math.min(u.y,Math.max(0,u.y+o.cy-l)),{left:u.x,top:u.y}},_createPrereqs:function(t,n,r){var i=this,s;s={screen:e.Deferred(),container:e.Deferred()},s.screen.then(function(){s===i._prereqs&&t()}),s.container.then(function(){s===i._prereqs&&n()}),e.when(s.screen,s.container).done(function(){s===i._prereqs&&(i._prereqs=null,r())}),i._prereqs=s},_animate:function(t){this._ui.screen.removeClass(t.classToRemove).addClass(t.screenClassToAdd),t.prereqs.screen.resolve();if(t.transition&&t.transition!=="none"){t.applyTransition&&this._applyTransition(t.transition);if(this._fallbackTransition){this._ui.container.animationComplete(e.proxy(t.prereqs.container,"resolve")).addClass(t.containerClassToAdd).removeClass(t.classToRemove);return}}this._ui.container.removeClass(t.classToRemove),t.prereqs.container.resolve()},_desiredCoords:function(t){var n=null,r,i=s(),o=t.x,u=t.y,a=t.positionTo;if(a&&a!=="origin")if(a==="window")o=i.cx/2+i.x,u=i.cy/2+i.y;else{try{n=e(a)}catch(f){n=null}n&&(n.filter(":visible"),n.length===0&&(n=null))}n&&(r=n.offset(),o=r.left+n.outerWidth()/2,u=r.top+n.outerHeight()/2);if(e.type(o)!=="number"||isNaN(o))o=i.cx/2+i.x;if(e.type(u)!=="number"||isNaN(u))u=i.cy/2+i.y;return{x:o,y:u}},_reposition:function(e){e={x:e.x,y:e.y,positionTo:e.positionTo},this._trigger("beforeposition",e),this._ui.container.offset(this._placementCoords(this._desiredCoords(e)))},reposition:function(e){this._isOpen&&this._reposition(e)},_openPrereqsComplete:function(){this._ui.container.addClass("ui-popup-active"),this._isOpen=!0,this._resizeScreen(),this._ui.container.attr("tabindex","0").focus(),this._ignoreResizeEvents(),this._trigger("afteropen")},_open:function(n){var r=e.extend({},this.options,n),i=function(){var e=t,n=navigator.userAgent,r=n.match(/AppleWebKit\/([0-9\.]+)/),i=!!r&&r[1],s=n.match(/Android (\d+(?:\.\d+))/),o=!!s&&s[1],u=n.indexOf("Chrome")>-1;return s!==null&&o==="4.0"&&i&&i>534.13&&!u?!0:!1}();this._createPrereqs(e.noop,e.noop,e.proxy(this,"_openPrereqsComplete")),this._currentTransition=r.transition,this._applyTransition(r.transition),this.options.theme||this._setTheme(this._page.jqmData("theme")||e.mobile.getInheritedTheme(this._page,"c")),this._ui.screen.removeClass("ui-screen-hidden"),this._ui.container.removeClass("ui-popup-hidden"),this._reposition(r),this.options.overlayTheme&&i&&this.element.closest(".ui-page").addClass("ui-popup-open"),this._animate({additionalCondition:!0,transition:r.transition,classToRemove:"",screenClassToAdd:"in",containerClassToAdd:"in",applyTransition:!1,prereqs:this._prereqs})},_closePrereqScreen:function(){this._ui.screen.removeClass("out").addClass("ui-screen-hidden")},_closePrereqContainer:function(){this._ui.container.removeClass("reverse out").addClass("ui-popup-hidden").removeAttr("style")},_closePrereqsDone:function(){var t=this.options;this._ui.container.removeAttr("tabindex"),e.mobile.popup.active=r,this._trigger("afterclose")},_close:function(t){this._ui.container.removeClass("ui-popup-active"),this._page.removeClass("ui-popup-open"),this._isOpen=!1,this._createPrereqs(e.proxy(this,"_closePrereqScreen"),e.proxy(this,"_closePrereqContainer"),e.proxy(this,"_closePrereqsDone")),this._animate({additionalCondition:this._ui.screen.hasClass("in"),transition:t?"none":this._currentTransition,classToRemove:"in",screenClassToAdd:"out",containerClassToAdd:"reverse out",applyTransition:!0,prereqs:this._prereqs})},_unenhance:function(){this._setTheme("none"),this.element.detach().insertAfter(this._ui.placeholder).removeClass("ui-popup ui-overlay-shadow ui-corner-all"),this._ui.screen.remove(),this._ui.container.remove(),this._ui.placeholder.remove()},_destroy:function(){e.mobile.popup.active===this?(this.element.one("popupafterclose",e.proxy(this,"_unenhance")),this.close()):this._unenhance()},_closePopup:function(n,r){var i,s,o=this.options,u=!1;t.scrollTo(0,this._scrollTop),n&&n.type==="pagebeforechange"&&r&&(typeof r.toPage=="string"?i=r.toPage:i=r.toPage.jqmData("url"),i=e.mobile.path.parseUrl(i),s=i.pathname+i.search+i.hash,this._myUrl!==e.mobile.path.makeUrlAbsolute(s)?u=!0:n.preventDefault()),o.container.unbind(o.closeEvents),this.element.undelegate(o.closeLinkSelector,o.closeLinkEvents),this._close(u)},_bindContainerClose:function(){this.options.container.one(this.options.closeEvents,e.proxy(this,"_closePopup"))},open:function(n){var r=this,i=this.options,s,o,u,a,f,l;if(e.mobile.popup.active)return;e.mobile.popup.active=this,this._scrollTop=e.mobile.window.scrollTop();if(!i.history){r._open(n),r._bindContainerClose(),r.element.delegate(i.closeLinkSelector,i.closeLinkEvents,function(e){r.close(),e.preventDefault()});return}l=e.mobile.urlHistory,o=e.mobile.dialogHashKey,u=e.mobile.activePage,a=u.is(".ui-dialog"),this._myUrl=s=l.getActive().url,f=s.indexOf(o)>-1&&!a&&l.activeIndex>0;if(f){r._open(n),r._bindContainerClose();return}s.indexOf(o)===-1&&!a?s+=s.indexOf("#")>-1?o:"#"+o:s=e.mobile.path.parseLocation().hash+o,l.activeIndex===0&&s===l.initialDst&&(s+=o),e(t).one("beforenavigate",function(e){e.preventDefault(),r._open(n),r._bindContainerClose()}),this.urlAltered=!0,e.mobile.navigate(s,{role:"dialog"})},close:function(){if(e.mobile.popup.active!==this)return;this._scrollTop=e.mobile.window.scrollTop(),this.options.history&&this.urlAltered?(e.mobile.back(),this.urlAltered=!1):this._closePopup()}}),e.mobile.popup.handleLink=function(t){var n=t.closest(":jqmData(role='page')"),r=n.length===0?e("body"):n,i=e(e.mobile.path.parseUrl(t.attr("href")).hash,r[0]),s;i.data("mobile-popup")&&(s=t.offset(),i.popup("open",{x:s.left+t.outerWidth()/2,y:s.top+t.outerHeight()/2,transition:t.jqmData("transition"),positionTo:t.jqmData("position-to")})),setTimeout(function(){var n=t.parent().parent();n.hasClass("ui-li")&&(t=n.parent()),t.removeClass(e.mobile.activeBtnClass)},300)},e.mobile.document.bind("pagebeforechange",function(t,n){n.options.role==="popup"&&(e.mobile.popup.handleLink(n.options.link),t.preventDefault())}),e.mobile.document.bind("pagecreate create",function(t){e.mobile.popup.prototype.enhanceWithin(t.target,!0)})}(e),function(e,t){var r=function(r){var i=r.select,s=r._destroy,o=r.selectID,u=o?o:(e.mobile.ns||"")+"uuid-"+r.uuid,a=u+"-listbox",f=u+"-dialog",l=r.label,c=r.select.closest(".ui-page"),h=r._selectOptions(),p=r.isMultiple=r.select[0].multiple,d=o+"-button",v=o+"-menu",m=e("<div data-"+e.mobile.ns+"role='dialog' id='"+f+"' data-"+e.mobile.ns+"theme='"+r.options.theme+"' data-"+e.mobile.ns+"overlay-theme='"+r.options.overlayTheme+"'>"+"<div data-"+e.mobile.ns+"role='header'>"+"<div class='ui-title'>"+l.getEncodedText()+"</div>"+"</div>"+"<div data-"+e.mobile.ns+"role='content'></div>"+"</div>"),g=e("<div id='"+a+"' class='ui-selectmenu'>").insertAfter(r.select).popup({theme:r.options.overlayTheme}),y=e("<ul>",{"class":"ui-selectmenu-list",id:v,role:"listbox","aria-labelledby":d}).attr("data-"+e.mobile.ns+"theme",r.options.theme).attr("data-"+e.mobile.ns+"divider-theme",r.options.dividerTheme).appendTo(g),b=e("<div>",{"class":"ui-header ui-bar-"+r.options.theme}).prependTo(g),w=e("<h1>",{"class":"ui-title"}).appendTo(b),E,S,x;r.isMultiple&&(x=e("<a>",{text:r.options.closeText,href:"#","class":"ui-btn-left"}).attr("data-"+e.mobile.ns+"iconpos","notext").attr("data-"+e.mobile.ns+"icon","delete").appendTo(b).buttonMarkup()),e.extend(r,{select:r.select,selectID:o,buttonId:d,menuId:v,popupID:a,dialogID:f,thisPage:c,menuPage:m,label:l,selectOptions:h,isMultiple:p,theme:r.options.theme,listbox:g,list:y,header:b,headerTitle:w,headerClose:x,menuPageContent:E,menuPageClose:S,placeholder:"",build:function(){var n=this;n.refresh(),n._origTabIndex===t&&(n._origTabIndex=n.select[0].getAttribute("tabindex")===null?!1:n.select.attr("tabindex")),n.select.attr("tabindex","-1").focus(function(){e(this).blur(),n.button.focus()}),n.button.bind("vclick keydown",function(t){if(n.options.disabled||n.isOpen)return;if(t.type==="vclick"||t.keyCode&&(t.keyCode===e.mobile.keyCode.ENTER||t.keyCode===e.mobile.keyCode.SPACE))n._decideFormat(),n.menuType==="overlay"?n.button.attr("href","#"+n.popupID).attr("data-"+(e.mobile.ns||"")+"rel","popup"):n.button.attr("href","#"+n.dialogID).attr("data-"+(e.mobile.ns||"")+"rel","dialog"),n.isOpen=!0}),n.list.attr("role","listbox").bind("focusin",function(t){e(t.target).attr("tabindex","0").trigger("vmouseover")}).bind("focusout",function(t){e(t.target).attr("tabindex","-1").trigger("vmouseout")}).delegate("li:not(.ui-disabled, .ui-li-divider)","click",function(t){var i=n.select[0].selectedIndex,s=n.list.find("li:not(.ui-li-divider)").index(this),o=n._selectOptions().eq(s)[0];o.selected=n.isMultiple?!o.selected:!0,n.isMultiple&&e(this).find(".ui-icon").toggleClass("ui-icon-checkbox-on",o.selected).toggleClass("ui-icon-checkbox-off",!o.selected),(n.isMultiple||i!==s)&&n.select.trigger("change"),n.isMultiple?n.list.find("li:not(.ui-li-divider)").eq(s).addClass("ui-btn-down-"+r.options.theme).find("a").first().focus():n.close(),t.preventDefault()}).keydown(function(t){var n=e(t.target),i=n.closest("li"),s,o;switch(t.keyCode){case 38:return s=i.prev().not(".ui-selectmenu-placeholder"),s.is(".ui-li-divider")&&(s=s.prev()),s.length&&(n.blur().attr("tabindex","-1"),s.addClass("ui-btn-down-"+r.options.theme).find("a").first().focus()),!1;case 40:return o=i.next(),o.is(".ui-li-divider")&&(o=o.next()),o.length&&(n.blur().attr("tabindex","-1"),o.addClass("ui-btn-down-"+r.options.theme).find("a").first().focus()),!1;case 13:case 32:return n.trigger("click"),!1}}),n.menuPage.bind("pagehide",function(){e.mobile._bindPageRemove.call(n.thisPage)}),n.listbox.bind("popupafterclose",function(e){n.close()}),n.isMultiple&&n.headerClose.click(function(){if(n.menuType==="overlay")return n.close(),!1}),n.thisPage.addDependents(this.menuPage)},_isRebuildRequired:function(){var e=this.list.find("li"),t=this._selectOptions();return t.text()!==e.text()},selected:function(){return this._selectOptions().filter(":selected:not( :jqmData(placeholder='true') )")},refresh:function(t,n){var r=this,i=this.element,s=this.isMultiple,o;(t||this._isRebuildRequired())&&r._buildList(),o=this.selectedIndices(),r.setButtonText(),r.setButtonCount(),r.list.find("li:not(.ui-li-divider)").removeClass(e.mobile.activeBtnClass).attr("aria-selected",!1).each(function(t){if(e.inArray(t,o)>-1){var n=e(this);n.attr("aria-selected",!0),r.isMultiple?n.find(".ui-icon").removeClass("ui-icon-checkbox-off").addClass("ui-icon-checkbox-on"):n.is(".ui-selectmenu-placeholder")?n.next().addClass(e.mobile.activeBtnClass):n.addClass(e.mobile.activeBtnClass)}})},close:function(){if(this.options.disabled||!this.isOpen)return;var e=this;e.menuType==="page"?(e.menuPage.dialog("close"),e.list.appendTo(e.listbox)):e.listbox.popup("close"),e._focusButton(),e.isOpen=!1},open:function(){this.button.click()},_decideFormat:function(){function h(){var n=t.list.find("."+e.mobile.activeBtnClass+" a");n.length===0&&(n=t.list.find("li.ui-btn:not( :jqmData(placeholder='true') ) a")),n.first().focus().closest("li").addClass("ui-btn-down-"+r.options.theme)}var t=this,n=e.mobile.window,i=t.list.parent(),s=i.outerHeight(),o=i.outerWidth(),u=e("."+e.mobile.activePageClass),a=n.scrollTop(),f=t.button.offset().top,l=n.height(),c=n.width();s>l-80||!e.support.scrollTop?(t.menuPage.appendTo(e.mobile.pageContainer).page(),t.menuPageContent=m.find(".ui-content"),t.menuPageClose=m.find(".ui-header a"),t.thisPage.unbind("pagehide.remove"),a===0&&f>l&&t.thisPage.one("pagehide",function(){e(this).jqmData("lastScroll",f)}),t.menuPage.one("pageshow",function(){h()}).one("pagehide",function(){t.close()}),t.menuType="page",t.menuPageContent.append(t.list),t.menuPage.find("div .ui-title").text(t.label.text())):(t.menuType="overlay",t.listbox.one("popupafteropen",h))},_buildList:function(){var t=this,r=this.options,i=this.placeholder,s=!0,o=[],u=[],a=t.isMultiple?"checkbox-off":"false";t.list.empty().filter(".ui-listview").listview("destroy");var f=t.select.find("option"),l=f.length,c=this.select[0],h="data-"+e.mobile.ns,p=h+"option-index",d=h+"icon",v=h+"role",m=h+"placeholder",g=n.createDocumentFragment(),y=!1,b;for(var w=0;w<l;w++,y=!1){var E=f[w],S=e(E),x=E.parentNode,T=S.text(),N=n.createElement("a"),C=[];N.setAttribute("href","#"),N.appendChild(n.createTextNode(T));if(x!==c&&x.nodeName.toLowerCase()==="optgroup"){var k=x.getAttribute("label");if(k!==b){var L=n.createElement("li");L.setAttribute(v,"list-divider"),L.setAttribute("role","option"),L.setAttribute("tabindex","-1"),L.appendChild(n.createTextNode(k)),g.appendChild(L),b=k}}s&&(!E.getAttribute("value")||T.length===0||S.jqmData("placeholder"))&&(s=!1,y=!0,null===E.getAttribute(m)&&(this._removePlaceholderAttr=!0),E.setAttribute(m,!0),r.hidePlaceholderMenuItems&&C.push("ui-selectmenu-placeholder"),i!==T&&(i=t.placeholder=T));var A=n.createElement("li");E.disabled&&(C.push("ui-disabled"),A.setAttribute("aria-disabled",!0)),A.setAttribute(p,w),A.setAttribute(d,a),y&&A.setAttribute(m,!0),A.className=C.join(" "),A.setAttribute("role","option"),N.setAttribute("tabindex","-1"),A.appendChild(N),g.appendChild(A)}t.list[0].appendChild(g),!this.isMultiple&&!i.length?this.header.hide():this.headerTitle.text(this.placeholder),t.list.listview()},_button:function(){return e("<a>",{href:"#",role:"button",id:this.buttonId,"aria-haspopup":"true","aria-owns":this.menuId})},_destroy:function(){this.close(),this._origTabIndex!==t&&(this._origTabIndex!==!1?this.select.attr("tabindex",this._origTabIndex):this.select.removeAttr("tabindex")),this._removePlaceholderAttr&&this._selectOptions().removeAttr("data-"+e.mobile.ns+"placeholder"),this.listbox.remove(),s.apply(this,arguments)}})};e.mobile.document.bind("selectmenubeforecreate",function(t){var n=e(t.target).data("mobile-selectmenu");!n.options.nativeMenu&&n.element.parents(":jqmData(role='popup')").length===0&&r(n)})}(e),function(e,t){e.mobile.listview.prototype.options.autodividers=!1,e.mobile.listview.prototype.options.autodividersSelector=function(t){var n=e.trim(t.text())||null;return n?(n=n.slice(0,1).toUpperCase(),n):null},e.mobile.document.delegate("ul,ol","listviewcreate",function(){var t=e(this),r=t.data("mobile-listview");if(!r||!r.options.autodividers)return;var i=function(){t.find("li:jqmData(role='list-divider')").remove();var i=t.find("li"),s=null,o,u;for(var a=0;a<i.length;a++){o=i[a],u=r.options.autodividersSelector(e(o));if(u&&s!==u){var f=n.createElement("li");f.appendChild(n.createTextNode(u)),f.setAttribute("data-"+e.mobile.ns+"role","list-divider"),o.parentNode.insertBefore(f,o)}s=u}},s=function(){t.unbind("listviewafterrefresh",s),i(),r.refresh(),t.bind("listviewafterrefresh",s)};s()})}(e),function(e,t){e.mobile.listview.prototype.options.filter=!1,e.mobile.listview.prototype.options.filterPlaceholder="Filter items...",e.mobile.listview.prototype.options.filterTheme="c",e.mobile.listview.prototype.options.filterReveal=!1;var n=function(e,t,n){return e.toString().toLowerCase().indexOf(t)===-1};e.mobile.listview.prototype.options.filterCallback=n,e.mobile.document.delegate("ul, ol","listviewcreate",function(){var t=e(this),r=t.data("mobile-listview");if(!r||!r.options.filter)return;r.options.filterReveal&&t.children().addClass("ui-screen-hidden");var i=e("<form>",{"class":"ui-listview-filter ui-bar-"+r.options.filterTheme,role:"search"}).submit(function(e){e.preventDefault(),o.blur()}),s=function(i){var s=e(this),o=this.value.toLowerCase(),u=null,a=t.children(),f=s.jqmData("lastval")+"",l=!1,c="",h,p=r.options.filterCallback!==n;if(f&&f===o)return;r._trigger("beforefilter","beforefilter",{input:this}),s.jqmData("lastval",o),p||o.length<f.length||o.indexOf(f)!==0?u=t.children():(u=t.children(":not(.ui-screen-hidden)"),!u.length&&r.options.filterReveal&&(u=t.children(".ui-screen-hidden")));if(o){for(var d=u.length-1;d>=0;d--)h=e(u[d]),c=h.jqmData("filtertext")||h.text(),h.is("li:jqmData(role=list-divider)")?(h.toggleClass("ui-filter-hidequeue",!l),l=!1):r.options.filterCallback(c,o,h)?h.toggleClass("ui-filter-hidequeue",!0):l=!0;u.filter(":not(.ui-filter-hidequeue)").toggleClass("ui-screen-hidden",!1),u.filter(".ui-filter-hidequeue").toggleClass("ui-screen-hidden",!0).toggleClass("ui-filter-hidequeue",!1)}else u.toggleClass("ui-screen-hidden",!!r.options.filterReveal);r._addFirstLastClasses(a,r._getVisibles(a,!1),!1)},o=e("<input>",{placeholder:r.options.filterPlaceholder}).attr("data-"+e.mobile.ns+"type","search").jqmData("lastval","").bind("keyup change input",s).appendTo(i).textinput();r.options.inset&&i.addClass("ui-listview-filter-inset"),i.bind("submit",function(){return!1}).insertBefore(t)})}(e),function(e,t){e.widget("mobile.navbar",e.mobile.widget,{options:{iconpos:"top",grid:null,initSelector:":jqmData(role='navbar')"},_create:function(){var r=this.element,i=r.find("a"),s=i.filter(":jqmData(icon)").length?this.options.iconpos:t;r.addClass("ui-navbar ui-mini").attr("role","navigation").find("ul").jqmEnhanceable().grid({grid:this.options.grid}),i.buttonMarkup({corners:!1,shadow:!1,inline:!0,iconpos:s}),r.delegate("a","vclick",function(t){var r=e(t.target).is("a")?e(this):e(this).parent("a");if(!r.is(".ui-disabled, .ui-btn-active")){i.removeClass(e.mobile.activeBtnClass),e(this).addClass(e.mobile.activeBtnClass);var s=e(this);e(n).one("pagehide",function(){s.removeClass(e.mobile.activeBtnClass)})}}),r.closest(".ui-page").bind("pagebeforeshow",function(){i.filter(".ui-state-persist").addClass(e.mobile.activeBtnClass)})}}),e.mobile.document.bind("pagecreate create",function(t){e.mobile.navbar.prototype.enhanceWithin(t.target)})}(e),function(e,r){e.widget("mobile.panel",e.mobile.widget,{options:{classes:{panel:"ui-panel",panelOpen:"ui-panel-open",panelClosed:"ui-panel-closed",panelFixed:"ui-panel-fixed",panelInner:"ui-panel-inner",modal:"ui-panel-dismiss",modalOpen:"ui-panel-dismiss-open",pagePanel:"ui-page-panel",pagePanelOpen:"ui-page-panel-open",contentWrap:"ui-panel-content-wrap",contentWrapOpen:"ui-panel-content-wrap-open",contentWrapClosed:"ui-panel-content-wrap-closed",contentFixedToolbar:"ui-panel-content-fixed-toolbar",contentFixedToolbarOpen:"ui-panel-content-fixed-toolbar-open",contentFixedToolbarClosed:"ui-panel-content-fixed-toolbar-closed",animate:"ui-panel-animate"},animate:!0,theme:"c",position:"left",dismissible:!0,display:"reveal",initSelector:":jqmData(role='panel')",swipeClose:!0,positionFixed:!1},_panelID:null,_closeLink:null,_page:null,_modal:null,_panelInner:null,_wrapper:null,_fixedToolbar:null,_create:function(){var t=this,n=t.element,r=n.closest(":jqmData(role='page')"),i=function(){var t=e.data(r[0],"mobilePage").options.theme,n="ui-body-"+t;return n},s=function(){var e=n.find("."+t.options.classes.panelInner);return e.length===0&&(e=n.children().wrapAll('<div class="'+t.options.classes.panelInner+'" />').parent()),e},o=function(){var n=r.find("."+t.options.classes.contentWrap);return n.length===0&&(n=r.children(".ui-header:not(:jqmData(position='fixed')), .ui-content:not(:jqmData(role='popup')), .ui-footer:not(:jqmData(position='fixed'))").wrapAll('<div class="'+t.options.classes.contentWrap+" "+i()+'" />').parent(),e.support.cssTransform3d&&!!t.options.animate&&n.addClass(t.options.classes.animate)),n},u=function(){var n=r.find("."+t.options.classes.contentFixedToolbar);return n.length===0&&(n=r.find(".ui-header:jqmData(position='fixed'), .ui-footer:jqmData(position='fixed')").addClass(t.options.classes.contentFixedToolbar),e.support.cssTransform3d&&!!t.options.animate&&n.addClass(t.options.classes.animate)),n};e.extend(this,{_panelID:n.attr("id"),_closeLink:n.find(":jqmData(rel='close')"),_page:n.closest(":jqmData(role='page')"),_pageTheme:i(),_panelInner:s(),_wrapper:o(),_fixedToolbar:u()}),t._addPanelClasses(),t._wrapper.addClass(this.options.classes.contentWrapClosed),t._fixedToolbar.addClass(this.options.classes.contentFixedToolbarClosed),t._page.addClass(t.options.classes.pagePanel),e.support.cssTransform3d&&!!t.options.animate&&this.element.addClass(t.options.classes.animate),t._bindUpdateLayout(),t._bindCloseEvents(),t._bindLinkListeners(),t._bindPageEvents(),!t.options.dismissible||t._createModal(),t._bindSwipeEvents()},_createModal:function(t){var n=this;n._modal=e("<div class='"+n.options.classes.modal+"' data-panelid='"+n._panelID+"'></div>").on("mousedown",function(){n.close()}).appendTo(this._page)},_getPosDisplayClasses:function(e){return e+"-position-"+this.options.position+" "+e+"-display-"+this.options.display},_getPanelClasses:function(){var e=this.options.classes.panel+" "+this._getPosDisplayClasses(this.options.classes.panel)+" "+this.options.classes.panelClosed;return this.options.theme&&(e+=" ui-body-"+this.options.theme),!this.options.positionFixed||(e+=" "+this.options.classes.panelFixed),e},_addPanelClasses:function(){this.element.addClass(this._getPanelClasses())},_bindCloseEvents:function(){var e=this;e._closeLink.on("click.panel",function(t){return t.preventDefault(),e.close(),!1}),e.element.on("click.panel","a:jqmData(ajax='false')",function(t){e.close()})},_positionPanel:function(){var t=this,n=t._panelInner.outerHeight(),r=n>e.mobile.getScreenHeight();r||!t.options.positionFixed?(r&&(t._unfixPanel(),e.mobile.resetActivePageHeight(n)),t._scrollIntoView(n)):t._fixPanel()},_scrollIntoView:function(n){n<e(t).scrollTop()&&t.scrollTo(0,0)},_bindFixListener:function(){this._on(e(t),{throttledresize:"_positionPanel"})},_unbindFixListener:function(){this._off(e(t),"throttledresize")},_unfixPanel:function(){!!this.options.positionFixed&&e.support.fixedPosition&&this.element.removeClass(this.options.classes.panelFixed)},_fixPanel:function(){!!this.options.positionFixed&&e.support.fixedPosition&&this.element.addClass(this.options.classes.panelFixed)},_bindUpdateLayout:function(){var e=this;e.element.on("updatelayout",function(t){e._open&&e._positionPanel()})},_bindLinkListeners:function(){var t=this;t._page.on("click.panel","a",function(n){if(this.href.split("#")[1]===t._panelID&&t._panelID!==r){n.preventDefault();var i=e(this);return i.hasClass("ui-link")||(i.addClass(e.mobile.activeBtnClass),t.element.one("panelopen panelclose",function(){i.removeClass(e.mobile.activeBtnClass)})),t.toggle(),!1}})},_bindSwipeEvents:function(){var e=this,t=e._modal?e.element.add(e._modal):e.element;!e.options.swipeClose||(e.options.position==="left"?t.on("swipeleft.panel",function(t){e.close()}):t.on("swiperight.panel",function(t){e.close()}))},_bindPageEvents:function(){var e=this;e._page.on("panelbeforeopen",function(t){e._open&&t.target!==e.element[0]&&e.close()}).on("pagehide",function(t){e._open&&e.close(!0)}).on("keyup.panel",function(t){t.keyCode===27&&e._open&&e.close()})},_open:!1,_contentWrapOpenClasses:null,_fixedToolbarOpenClasses:null,_modalOpenClasses:null,open:function(t){if(!this._open){var n=this,r=n.options,i=function(){n._page.off("panelclose"),n._page.jqmData("panel","open"),!t&&e.support.cssTransform3d&&!!r.animate?n.element.add(n._wrapper).on(n._transitionEndEvents,s):setTimeout(s,0),n.options.theme&&n.options.display!=="overlay"&&n._page.removeClass(n._pageTheme).addClass("ui-body-"+n.options.theme),n.element.removeClass(r.classes.panelClosed).addClass(r.classes.panelOpen),n._positionPanel(),n.options.theme&&n.options.display!=="overlay"&&n._wrapper.css("min-height",n._page.css("min-height")),n._contentWrapOpenClasses=n._getPosDisplayClasses(r.classes.contentWrap),n._wrapper.removeClass(r.classes.contentWrapClosed).addClass(n._contentWrapOpenClasses+" "+r.classes.contentWrapOpen),n._fixedToolbarOpenClasses=n._getPosDisplayClasses(r.classes.contentFixedToolbar),n._fixedToolbar.removeClass(r.classes.contentFixedToolbarClosed).addClass(n._fixedToolbarOpenClasses+" "+r.classes.contentFixedToolbarOpen),n._modalOpenClasses=n._getPosDisplayClasses(r.classes.modal)+" "+r.classes.modalOpen,n._modal&&n._modal.addClass(n._modalOpenClasses)},s=function(){n.element.add(n._wrapper).off(n._transitionEndEvents,s),n._page.addClass(r.classes.pagePanelOpen),n._bindFixListener(),n._trigger("open")};this.element.closest(".ui-page-active").length<0&&(t=!0),n._trigger("beforeopen"),n._page.jqmData("panel")==="open"?n._page.on("panelclose",function(){i()}):i(),n._open=!0}},close:function(t){if(this._open){var n=this.options,r=this,i=function(){!t&&e.support.cssTransform3d&&!!n.animate?r.element.add(r._wrapper).on(r._transitionEndEvents,s):setTimeout(s,0),r._page.removeClass(n.classes.pagePanelOpen),r.element.removeClass(n.classes.panelOpen),r._wrapper.removeClass(n.classes.contentWrapOpen),r._fixedToolbar.removeClass(n.classes.contentFixedToolbarOpen),r._modal&&r._modal.removeClass(r._modalOpenClasses)},s=function(){r.options.theme&&r.options.display!=="overlay"&&(r._page.removeClass("ui-body-"+r.options.theme).addClass(r._pageTheme),r._wrapper.css("min-height","")),r.element.add(r._wrapper).off(r._transitionEndEvents,s),r.element.addClass(n.classes.panelClosed),r._wrapper.removeClass(r._contentWrapOpenClasses).addClass(n.classes.contentWrapClosed),r._fixedToolbar.removeClass(r._fixedToolbarOpenClasses).addClass(n.classes.contentFixedToolbarClosed),r._fixPanel(),r._unbindFixListener(),e.mobile.resetActivePageHeight(),r._page.jqmRemoveData("panel"),r._trigger("close")};this.element.closest(".ui-page-active").length<0&&(t=!0),r._trigger("beforeclose"),i(),r._open=!1}},toggle:function(e){this[this._open?"close":"open"]()},_transitionEndEvents:"webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd",_destroy:function(){var t=this.options.classes,n=this.options.theme,r=this.element.siblings("."+t.panel).length;r?this._open&&(this._wrapper.removeClass(t.contentWrapOpen),this._fixedToolbar.removeClass(t.contentFixedToolbarOpen),this._page.jqmRemoveData("panel"),this._page.removeClass(t.pagePanelOpen),n&&this._page.removeClass("ui-body-"+n).addClass(this._pageTheme)):(this._wrapper.children().unwrap(),this._page.find("a").unbind("panelopen panelclose"),this._page.removeClass(t.pagePanel),this._open&&(this._page.jqmRemoveData("panel"),this._page.removeClass(t.pagePanelOpen),n&&this._page.removeClass("ui-body-"+n).addClass(this._pageTheme),e.mobile.resetActivePageHeight())),this._panelInner.children().unwrap(),this.element.removeClass([this._getPanelClasses(),t.panelAnimate].join(" ")).off("swipeleft.panel swiperight.panel").off("panelbeforeopen").off("panelhide").off("keyup.panel").off("updatelayout"),this._closeLink.off("click.panel"),this._modal&&this._modal.remove(),this.element.off(this._transitionEndEvents).removeClass([t.panelUnfixed,t.panelClosed,t.panelOpen].join(" "))}}),e(n).bind("pagecreate create",function(t){e.mobile.panel.prototype.enhanceWithin(t.target)})}(e),function(e,t){e.widget("mobile.table",e.mobile.widget,{options:{classes:{table:"ui-table"},initSelector:":jqmData(role='table')"},_create:function(){var e=this;e.refresh(!0)},refresh:function(n){var r=this,i=this.element.find("thead tr");n&&this.element.addClass(this.options.classes.table),r.headers=this.element.find("tr:eq(0)").children(),r.allHeaders=r.headers.add(i.children()),i.each(function(){var s=0;e(this).children().each(function(o){var u=parseInt(e(this).attr("colspan"),10),a=":nth-child("+(s+1)+")";e(this).jqmData("colstart",s+1);if(u)for(var f=0;f<u-1;f++)s++,a+=", :nth-child("+(s+1)+")";n===t&&e(this).jqmData("cells",""),e(this).jqmData("cells",r.element.find("tr").not(i.eq(0)).not(this).children(a)),s++})}),n===t&&this.element.trigger("refresh")}}),e.mobile.document.bind("pagecreate create",function(t){e.mobile.table.prototype.enhanceWithin(t.target)})}(e),function(e,t){e.mobile.table.prototype.options.mode="columntoggle",e.mobile.table.prototype.options.columnBtnTheme=null,e.mobile.table.prototype.options.columnPopupTheme=null,e.mobile.table.prototype.options.columnBtnText="Columns...",e.mobile.table.prototype.options.classes=e.extend(e.mobile.table.prototype.options.classes,{popup:"ui-table-columntoggle-popup",columnBtn:"ui-table-columntoggle-btn",priorityPrefix:"ui-table-priority-",columnToggleTable:"ui-table-columntoggle"}),e.mobile.document.delegate(":jqmData(role='table')","tablecreate refresh",function(n){var r=e(this),i=r.data("mobile-table"),s=n.type,o=i.options,u=e.mobile.ns,a=(r.attr("id")||o.classes.popup)+"-popup",f,l,c,h;if(o.mode!=="columntoggle")return;s!=="refresh"&&(i.element.addClass(o.classes.columnToggleTable),f=e("<a href='#"+a+"' class='"+o.classes.columnBtn+"' data-"+u+"rel='popup' data-"+u+"mini='true'>"+o.columnBtnText+"</a>"),l=e("<div data-"+u+"role='popup' data-"+u+"role='fieldcontain' class='"+o.classes.popup+"' id='"+a+"'></div>"),c=e("<fieldset data-"+u+"role='controlgroup'></fieldset>")),i.headers.not("td").each(function(t){var n=e(this).jqmData("priority"),r=e(this).add(e(this).jqmData("cells"));n&&(r.addClass(o.classes.priorityPrefix+n),s!=="refresh"?e("<label><input type='checkbox' checked />"+e(this).text()+"</label>").appendTo(c).children(0).jqmData("cells",r).checkboxradio({theme:o.columnPopupTheme}):e("#"+a+" fieldset div:eq("+t+")").find("input").jqmData("cells",r))}),s!=="refresh"&&c.appendTo(l),c===t?h=e("#"+a+" fieldset"):h=c,s!=="refresh"&&(h.on("change","input",function(t){this.checked?e(this).jqmData("cells").removeClass("ui-table-cell-hidden").addClass("ui-table-cell-visible"):e(this).jqmData("cells").removeClass("ui-table-cell-visible").addClass("ui-table-cell-hidden")}),f.insertBefore(r).buttonMarkup({theme:o.columnBtnTheme}),l.insertBefore(r).popup()),i.update=function(){h.find("input").each(function(){this.checked?(this.checked=e(this).jqmData("cells").eq(0).css("display")==="table-cell",s==="refresh"&&e(this).jqmData("cells").addClass("ui-table-cell-visible")):e(this).jqmData("cells").addClass("ui-table-cell-hidden"),e(this).checkboxradio("refresh")})},e.mobile.window.on("throttledresize",i.update),i.update()})}(e),function(e,t){e.mobile.table.prototype.options.mode="reflow",e.mobile.table.prototype.options.classes=e.extend(e.mobile.table.prototype.options.classes,{reflowTable:"ui-table-reflow",cellLabels:"ui-table-cell-label"}),e.mobile.document.delegate(":jqmData(role='table')","tablecreate refresh",function(t){var n=e(this),r=t.type,i=n.data("mobile-table"),s=i.options;if(s.mode!=="reflow")return;r!=="refresh"&&i.element.addClass(s.classes.reflowTable);var o=e(i.allHeaders.get().reverse());o.each(function(t){var n=e(this).jqmData("cells"),r=e(this).jqmData("colstart"),i=n.not(this).filter("thead th").length&&" ui-table-cell-label-top",o=e(this).text();if(o!=="")if(i){var u=parseInt(e(this).attr("colspan"),10),a="";u&&(a="td:nth-child("+u+"n + "+r+")"),n.filter(a).prepend("<b class='"+s.classes.cellLabels+i+"'>"+o+"</b>")}else n.prepend("<b class='"+s.classes.cellLabels+"'>"+o+"</b>")})})}(e)});