Файл: static/js/jquery_mobile.js
Строк: 5554
<?php
/*! jQuery Mobile vGit Build: SHA1: c2d61e2e592c67519d9a9ed0ba796fa44787e136 <> Date: Tue Sep 25 10:38:12 2012 -0700 jquerymobile.com | jquery.org/license !*/
(function(e,d,f){typeof define=="function"&&define.amd?define(["jquery"],function(a){return f(a,e,d),a.mobile}):f(e.jQuery,e,d)})(this,document,function(f,e,h,g){(function(i,c,m){var l={};i.mobile=i.extend({},{version:"1.2.0",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},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},silentScroll:function(a){i.type(a)!=="number"&&(a=i.mobile.defaultHomeScroll),i.event.special.scrollstart.enabled=!1,setTimeout(function(){c.scrollTo(0,a),i(h).trigger("silentscroll",{x:0,y:a})},20),setTimeout(function(){i.event.special.scrollstart.enabled=!0},150)},nsNormalizeDict:l,nsNormalize:function(a){if(!a){return}return l[a]||(l[a]=i.camelCase(i.mobile.ns+a))},getInheritedTheme:function(o,n){var t=o[0],s="",r=/ui-(bar|body|overlay)-([a-z])b/,q,p;while(t){q=t.className||"";if(q&&(p=r.exec(q))&&(s=p[2])){break}t=t.parentNode}return s||n||"a"},closestPageData:function(b){return b.closest(':jqmData(role="page"), :jqmData(role="dialog")').data("page")},enhanceable:function(b){return this.haveParents(b,"enhance")},hijackable:function(b){return this.haveParents(b,"ajax")},haveParents:function(u,t){if(!i.mobile.ignoreContentEnabled){return u}var s=u.length,r=i(),q,p,o;for(var n=0;n<s;n++){p=u.eq(n),o=!1,q=u[n];while(q){var a=q.getAttribute?q.getAttribute("data-"+i.mobile.ns+t):"";if(a==="false"){o=!0;break}q=q.parentNode}o||(r=r.add(p))}return r},getScreenHeight:function(){return c.innerHeight||i(c).height()}},i.mobile),i.fn.jqmData=function(a,n){var d;return typeof a!="undefined"&&(a&&(a=i.mobile.nsNormalize(a)),arguments.length<2||n===m?d=this.data(a):d=this.data(a,n)),d},i.jqmData=function(a,p,o){var n;return typeof p!="undefined"&&(n=i.data(a,p?i.mobile.nsNormalize(p):p,o)),n},i.fn.jqmRemoveData=function(a){return this.removeData(i.mobile.nsNormalize(a))},i.jqmRemoveData=function(a,d){return i.removeData(a,i.mobile.nsNormalize(d))},i.fn.removeWithDependents=function(){i.removeWithDependents(this)},i.removeWithDependents=function(a){var d=i(a);(d.jqmData("dependents")||i()).remove(),d.remove()},i.fn.addDependents=function(a){i.addDependents(i(this),a)},i.addDependents=function(a,o){var n=i(a).jqmData("dependents")||i();i(a).jqmData("dependents",i.merge(n,o))},i.fn.getEncodedText=function(){return i("<div/>").text(i(this).text()).html()},i.fn.jqmEnhanceable=function(){return i.mobile.enhanceable(this)},i.fn.jqmHijackable=function(){return i.mobile.hijackable(this)};var k=i.find,j=/:jqmData(([^)]*))/g;i.find=function(a,p,o,n){return a=a.replace(j,"[data-"+(i.mobile.ns||"")+"$1]"),k.call(this,a,p,o,n)},i.extend(i.find,k),i.find.matches=function(a,d){return i.find(a,null,null,d)},i.find.matchesSelector=function(a,d){return i.find(d,null,null,[a]).length>0}})(f,this),function(j,i){var m=0,l=Array.prototype.slice,k=j.cleanData;j.cleanData=function(a){for(var p=0,o;(o=a[p])!=null;p++){try{j(o).triggerHandler("remove")}catch(n){}}k(a)},j.widget=function(a,t,s){var r,q,p,o,n=a.split(".")[0];a=a.split(".")[1],r=n+"-"+a,s||(s=t,t=j.Widget),j.expr[":"][r]=function(c){return !!j.data(c,r)},j[n]=j[n]||{},q=j[n][a],p=j[n][a]=function(d,c){if(!this._createWidget){return new p(d,c)}arguments.length&&this._createWidget(d,c)},j.extend(p,q,{version:s.version,_proto:j.extend({},s),_childConstructors:[]}),o=new t,o.options=j.widget.extend({},o.options),j.each(s,function(c,d){j.isFunction(d)&&(s[c]=function(){var b=function(){return t.prototype[c].apply(this,arguments)},u=function(v){return t.prototype[c].apply(this,v)};return function(){var v=this._super,x=this._superApply,w;return this._super=b,this._superApply=u,w=d.apply(this,arguments),this._super=v,this._superApply=x,w}}())}),p.prototype=j.widget.extend(o,{widgetEventPrefix:a},s,{constructor:p,namespace:n,widgetName:a,widgetBaseClass:r,widgetFullName:r}),q?(j.each(q._childConstructors,function(u,w){var v=w.prototype;j.widget(v.namespace+"."+v.widgetName,p,w._proto)}),delete q._childConstructors):t._childConstructors.push(p),j.widget.bridge(a,p)},j.widget.extend=function(p){var o=l.call(arguments,1),n=0,d=o.length,b,a;for(;n<d;n++){for(b in o[n]){a=o[n][b],o[n].hasOwnProperty(b)&&a!==i&&(p[b]=j.isPlainObject(a)?j.widget.extend({},p[b],a):a)}}return p},j.widget.bridge=function(d,b){var a=b.prototype.widgetFullName;j.fn[d]=function(p){var o=typeof p=="string",n=l.call(arguments,1),c=this;return p=!o&&n.length?j.widget.extend.apply(null,[p].concat(n)):p,o?this.each(function(){var r,q=j.data(this,a);if(!q){return j.error("cannot call methods on "+d+" prior to initialization; attempted to call method '"+p+"'")}if(!j.isFunction(q[p])||p.charAt(0)==="_"){return j.error("no such method '"+p+"' for "+d+" widget instance")}r=q[p].apply(q,n);if(r!==q&&r!==i){return c=r&&r.jquery?c.pushStack(r.get()):r,!1}}):this.each(function(){var q=j.data(this,a);q?q.option(p||{})._init():new b(p,this)}),c}},j.Widget=function(d,c){},j.Widget._childConstructors=[],j.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(a,c){c=j(c||this.defaultElement||this)[0],this.element=j(c),this.uuid=m++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=j.widget.extend({},this.options,this._getCreateOptions(),a),this.bindings=j(),this.hoverable=j(),this.focusable=j(),c!==this&&(j.data(c,this.widgetName,this),j.data(c,this.widgetFullName,this),this._on({remove:"destroy"}),this.document=j(c.style?c.ownerDocument:c.document||c),this.window=j(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:j.noop,_getCreateEventData:j.noop,_create:j.noop,_init:j.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(j.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:j.noop,widget:function(){return this.element},option:function(q,p){var o=q,n,b,a;if(arguments.length===0){return j.widget.extend({},this.options)}if(typeof q=="string"){o={},n=q.split("."),q=n.shift();if(n.length){b=o[q]=j.widget.extend({},this.options[q]);for(a=0;a<n.length-1;a++){b[n[a]]=b[n[a]]||{},b=b[n[a]]}q=n.pop();if(p===i){return b[q]===i?null:b[q]}b[q]=p}else{if(p===i){return this.options[q]===i?null:this.options[q]}o[q]=p}}return this._setOptions(o),this},_setOptions:function(d){var c;for(c in d){this._setOption(c,d[c])}return this},_setOption:function(d,c){return this.options[d]=c,d==="disabled"&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!c).attr("aria-disabled",c),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(a,o){o?(a=j(a),this.bindings=this.bindings.add(a)):(o=a,a=this.element);var n=this;j.each(o,function(s,r){function q(){if(n.options.disabled===!0||j(this).hasClass("ui-state-disabled")){return}return(typeof r=="string"?n[r]:r).apply(n,arguments)}typeof r!="string"&&(q.guid=r.guid=r.guid||q.guid||j.guid++);var p=s.match(/^(w+)s*(.*)$/),d=p[1]+n.eventNamespace,b=p[2];b?n.widget().delegate(b,d,q):a.bind(d,q)})},_off:function(d,c){c=(c||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,d.unbind(c).undelegate(c)},_delay:function(o,n){function q(){return(typeof o=="string"?p[o]:o).apply(p,arguments)}var p=this;return setTimeout(q,n||0)},_hoverable:function(a){this.hoverable=this.hoverable.add(a),this._on(a,{mouseenter:function(c){j(c.currentTarget).addClass("ui-state-hover")},mouseleave:function(c){j(c.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(a){this.focusable=this.focusable.add(a),this._on(a,{focusin:function(c){j(c.currentTarget).addClass("ui-state-focus")},focusout:function(c){j(c.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(a,r,q){var p,o,n=this.options[a];q=q||{},r=j.Event(r),r.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase(),r.target=this.element[0],o=r.originalEvent;if(o){for(p in o){p in r||(r[p]=o[p])}}return this.element.trigger(r,q),!(j.isFunction(n)&&n.apply(this.element[0],[r].concat(q))===!1||r.isDefaultPrevented())}},j.each({show:"fadeIn",hide:"fadeOut"},function(a,d){j.Widget.prototype["_"+a]=function(p,o,n){typeof o=="string"&&(o={effect:o});var c,b=o?o===!0||typeof o=="number"?d:o.effect||d:a;o=o||{},typeof o=="number"&&(o={duration:o}),c=!j.isEmptyObject(o),o.complete=n,o.delay&&p.delay(o.delay),c&&j.effects&&(j.effects.effect[b]||j.uiBackCompat!==!1&&j.effects[b])?p[a](o):b!==a&&p[b]?p[b](o.duration,o.easing,n):p.queue(function(q){j(this)[a](),n&&n.call(p[0]),q()})}}),j.uiBackCompat!==!1&&(j.Widget.prototype._getCreateOptions=function(){return j.metadata&&j.metadata.get(this.element[0])[this.widgetName]})}(f),function(d,c){d.widget("mobile.widget",{_createWidget:function(){d.Widget.prototype._createWidget.apply(this,arguments),this._trigger("init")},_getCreateOptions:function(){var b=this.element,a={};return d.each(this.options,function(i){var j=b.jqmData(i.replace(/[A-Z]/g,function(k){return"-"+k.toLowerCase()}));j!==c&&(a[i]=j)}),a},enhanceWithin:function(a,i){this.enhance(d(this.options.initSelector,d(a)),i)},enhance:function(a,m){var l,k,j=d(a),i=this;j=d.mobile.enhanceable(j),m&&j.length&&(l=d.mobile.closestPageData(j),k=l&&l.keepNativeSelector()||"",j=j.not(k)),j[this.widgetName]()},raise:function(b){throw"Widget ["+this.widgetName+"]: "+b}})}(f),function(i,d){i.extend(i.mobile,{loadingMessageTextVisible:g,loadingMessageTheme:g,loadingMessage:g,showPageLoadingMsg:function(a,n,m){i.mobile.loading("show",a,n,m)},hidePageLoadingMsg:function(){i.mobile.loading("hide")},loading:function(){this.loaderWidget.loader.apply(this.loaderWidget,arguments)}});var l="ui-loader",k=i("html"),j=i(d);i.widget("mobile.loader",{options:{theme:"a",textVisible:!1,html:"",text:"loading"},defaultHtml:"<div class='"+l+"'><span class='ui-icon ui-icon-loading'></span><h1></h1></div>",fakeFixLoader:function(){var a=i("."+i.mobile.activeBtnClass).first();this.element.css({top:i.support.scrollTop&&j.scrollTop()+j.height()/2||a.length&&a.offset().top||100})},checkLoaderPosition:function(){var a=this.element.offset(),n=j.scrollTop(),m=i.mobile.getScreenHeight();if(a.top<n||a.top-n>m){this.element.addClass("ui-loader-fakefix"),this.fakeFixLoader(),j.unbind("scroll",this.checkLoaderPosition).bind("scroll",this.fakeFixLoader)}},resetHtml:function(){this.element.html(i(this.defaultHtml).html())},show:function(a,q,p){var o,n,m,c;this.resetHtml(),i.type(a)==="object"?(c=i.extend({},this.options,a),a=c.theme||i.mobile.loadingMessageTheme):(c=this.options,a=a||i.mobile.loadingMessageTheme||c.theme),n=q||i.mobile.loadingMessage||c.text,k.addClass("ui-loading");if(i.mobile.loadingMessage!==!1||c.html){i.mobile.loadingMessageTextVisible!==g?o=i.mobile.loadingMessageTextVisible:o=c.textVisible,this.element.attr("class",l+" ui-corner-all ui-body-"+a+" ui-loader-"+(o||q||a.text?"verbose":"default")+(c.textonly||p?" ui-loader-textonly":"")),c.html?this.element.html(c.html):this.element.find("h1").text(n),this.element.appendTo(i.mobile.pageContainer),this.checkLoaderPosition(),j.bind("scroll",i.proxy(this.checkLoaderPosition,this))}},hide:function(){k.removeClass("ui-loading"),i.mobile.loadingMessage&&this.element.removeClass("ui-loader-fakefix"),i(d).unbind("scroll",i.proxy(this.fakeFixLoader,this)),i(d).unbind("scroll",i.proxy(this.checkLoaderPosition,this))}}),j.bind("pagecontainercreate",function(){i.mobile.loaderWidget=i.mobile.loaderWidget||i(i.mobile.loader.prototype.defaultHtml).loader()})}(f,this),function(aI,aH,aG,aF){function ak(b){while(b&&typeof b.originalEvent!="undefined"){b=b.originalEvent}return b}function aj(y,x){var w=y.type,v,u,t,s,r,q,j,d,a;y=aI.Event(y),y.type=x,v=y.originalEvent,u=aI.event.props,w.search(/^(mouse|click)/)>-1&&(u=az);if(v){for(j=u.length,s;j;){s=u[--j],y[s]=v[s]}}w.search(/mouse(down|up)|click/)>-1&&!y.which&&(y.which=1);if(w.search(/^touch/)!==-1){t=ak(v),w=t.touches,r=t.changedTouches,q=w&&w.length?w[0]:r&&r.length?r[0]:aF;if(q){for(d=0,a=aB.length;d<a;d++){s=aB[d],y[s]=q[s]}}}return y}function ai(a){var k={},j,i;while(a){j=aI.data(a,aE);for(i in j){j[i]&&(k[i]=k.hasVirtualBinding=!0)}a=a.parentNode}return k}function ah(a,j){var i;while(a){i=aI.data(a,aE);if(i&&(!j||i[j])){return a}a=a.parentNode}return null}function ag(){aq=!1}function af(){aq=!0}function ae(){am=0,at.length=0,ar=!1,af()}function ad(){ag()}function ac(){ab(),ax=setTimeout(function(){ax=0,ae()},aI.vmouse.resetTimerDuration)}function ab(){ax&&(clearTimeout(ax),ax=0)}function aa(a,k,j){var i;if(j&&j[a]||!j&&ah(k.target,a)){i=aj(k,a),aI(k.target).trigger(i)}return i}function Z(a){var j=aI.data(a.target,aD);if(!ar&&(!am||am!==j)){var i=aa("v"+a.type,a);i&&(i.isDefaultPrevented()&&a.preventDefault(),i.isPropagationStopped()&&a.stopPropagation(),i.isImmediatePropagationStopped()&&a.stopImmediatePropagation())}}function Y(a){var l=ak(a).touches,k,j;if(l&&l.length===1){k=a.target,j=ai(k);if(j.hasVirtualBinding){am=an++,aI.data(k,aD,am),ab(),ad(),au=!1;var i=ak(a).touches[0];aw=i.pageX,av=i.pageY,aa("vmouseover",a,j),aa("vmousedown",a,j)}}}function X(b){if(aq){return}au||aa("vmousecancel",b,ai(b.target)),au=!0,ac()}function W(a){if(aq){return}var l=ak(a).touches[0],k=au,j=aI.vmouse.moveDistanceThreshold,i=ai(a.target);au=au||Math.abs(l.pageX-aw)>j||Math.abs(l.pageY-av)>j,au&&!k&&aa("vmousecancel",a,i),aa("vmousemove",a,i),ac()}function V(j){if(aq){return}af();var i=ai(j.target),l;aa("vmouseup",j,i);if(!au){var k=aa("vclick",j,i);k&&k.isDefaultPrevented()&&(l=ak(j).changedTouches[0],at.push({touchID:am,x:l.clientX,y:l.clientY}),ar=!0)}aa("vmouseout",j,i),au=!1,ac()}function U(a){var j=aI.data(a,aE),i;if(j){for(i in j){if(j[i]){return !0}}}return !1}function T(){}function S(a){var d=a.substr(1);return{setup:function(i,c){U(this)||aI.data(this,aE,{});var b=aI.data(this,aE);b[a]=!0,ay[a]=(ay[a]||0)+1,ay[a]===1&&ao.bind(d,Z),aI(this).bind(d,T),ap&&(ay.touchstart=(ay.touchstart||0)+1,ay.touchstart===1&&ao.bind("touchstart",Y).bind("touchend",V).bind("touchmove",W).bind("scroll",X))},teardown:function(j,i){--ay[a],ay[a]||ao.unbind(d,Z),ap&&(--ay.touchstart,ay.touchstart||ao.unbind("touchstart",Y).unbind("touchmove",W).unbind("touchend",V).unbind("scroll",X));var c=aI(this),b=aI.data(this,aE);b&&(b[a]=!1),c.unbind(d,T),U(this)||c.removeData(aE)}}}var aE="virtualMouseBindings",aD="virtualTouchID",aC="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),aB="clientX clientY pageX pageY screenX screenY".split(" "),aA=aI.event.mouseHooks?aI.event.mouseHooks.props:[],az=aI.event.props.concat(aA),ay={},ax=0,aw=0,av=0,au=!1,at=[],ar=!1,aq=!1,ap="addEventListener" in aG,ao=aI(aG),an=1,am=0,al;aI.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};for(var R=0;R<aC.length;R++){aI.event.special[aC[R]]=S(aC[R])}ap&&aG.addEventListener("click",function(s){var r=at.length,q=s.target,p,o,n,m,l,a;if(r){p=s.clientX,o=s.clientY,al=aI.vmouse.clickDistanceThreshold,n=q;while(n){for(m=0;m<r;m++){l=at[m],a=0;if(n===q&&Math.abs(l.x-p)<al&&Math.abs(l.y-o)<al||aI.data(n,aD)===l.touchID){s.preventDefault(),s.stopPropagation();return}}n=n.parentNode}}},!0)}(f,e,h),function(i,c){var j={touch:"ontouchend" in h};i.mobile=i.mobile||{},i.mobile.support=i.mobile.support||{},i.extend(i.support,j),i.extend(i.mobile.support,j)}(f),function(r,q,p){function c(a,s,j){var i=j.type;j.type=s,r.event.handle.call(a,j),j.type=i}r.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(a,d){r.fn[d]=function(b){return b?this.bind(d,b):this.trigger(d)},r.attrFn&&(r.attrFn[d]=!0)});var o=r.mobile.support.touch,n="touchmove scroll",m=o?"touchstart":"mousedown",l=o?"touchend":"mouseup",k=o?"touchmove":"mousemove";r.event.special.scrollstart={enabled:!0,setup:function(){function i(b,d){s=d,c(a,s?"scrollstart":"scrollstop",b)}var a=this,t=r(a),s,j;t.bind(n,function(d){if(!r.event.special.scrollstart.enabled){return}s||i(d,!0),clearTimeout(j),j=setTimeout(function(){i(d,!1)},50)})}},r.event.special.tap={tapholdThreshold:750,setup:function(){var a=this,i=r(a);i.bind("vmousedown",function(v){function j(){clearTimeout(s)}function d(){j(),i.unbind("vclick",b).unbind("vmouseup",j),r(h).unbind("vmousecancel",d)}function b(w){d(),u===w.target&&c(a,"tap",w)}if(v.which&&v.which!==1){return !1}var u=v.target,t=v.originalEvent,s;i.bind("vmouseup",j).bind("vclick",b),r(h).bind("vmousecancel",d),s=setTimeout(function(){c(a,"taphold",r.Event("taphold",{target:u}))},r.event.special.tap.tapholdThreshold)})}},r.event.special.swipe={scrollSupressionThreshold:30,durationThreshold:1000,horizontalDistanceThreshold:30,verticalDistanceThreshold:75,setup:function(){var a=this,d=r(a);d.bind(m,function(i){function s(j){if(!u){return}var w=j.originalEvent.touches?j.originalEvent.touches[0]:j;t={time:(new Date).getTime(),coords:[w.pageX,w.pageY]},Math.abs(u.coords[0]-t.coords[0])>r.event.special.swipe.scrollSupressionThreshold&&j.preventDefault()}var v=i.originalEvent.touches?i.originalEvent.touches[0]:i,u={time:(new Date).getTime(),coords:[v.pageX,v.pageY],origin:r(i.target)},t;d.bind(k,s).one(l,function(j){d.unbind(k,s),u&&t&&t.time-u.time<r.event.special.swipe.durationThreshold&&Math.abs(u.coords[0]-t.coords[0])>r.event.special.swipe.horizontalDistanceThreshold&&Math.abs(u.coords[1]-t.coords[1])<r.event.special.swipe.verticalDistanceThreshold&&u.origin.trigger("swipe").trigger(u.coords[0]>t.coords[0]?"swipeleft":"swiperight"),u=t=p})})}},r.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe",swiperight:"swipe"},function(a,d){r.event.special[a]={setup:function(){r(this).bind(d,r.noop)}}})}(f,this),function(b,d){b.extend(b.support,{orientation:"orientation" in e&&"onorientationchange" in e})}(f),function(j){j.event.special.throttledresize={setup:function(){j(this).bind("resize",o)},teardown:function(){j(this).unbind("resize",o)}};var i=250,o=function(){l=(new Date).getTime(),k=l-n,k>=i?(n=l,j(this).trigger("throttledresize")):(m&&clearTimeout(m),m=setTimeout(o,i-k))},n=0,m,l,k}(f),function(B,A){function c(){var b=w();b!==v&&(v=b,z.trigger(y))}var z=B(A),y="orientationchange",x,w,v,u,t,s={0:!0,180:!0};if(B.support.orientation){var r=A.innerWidth||B(A).width(),q=A.innerHeight||B(A).height(),p=50;u=r>q&&r-q>p,t=s[A.orientation];if(u&&t||!u&&!t){s={"-90":!0,90:!0}}}B.event.special.orientationchange=B.extend({},B.event.special.orientationchange,{setup:function(){if(B.support.orientation&&!B.event.special.orientationchange.disabled){return !1}v=w(),z.bind("throttledresize",c)},teardown:function(){if(B.support.orientation&&!B.event.special.orientationchange.disabled){return !1}z.unbind("throttledresize",c)},add:function(i){var d=i.handler;i.handler=function(b){return b.orientation=w(),d.apply(this,arguments)}}}),B.event.special.orientationchange.orientation=w=function(){var b=!0,a=h.documentElement;return B.support.orientation?b=s[A.orientation]:b=a&&a.clientWidth/a.clientHeight<1.1,b?"portrait":"landscape"},B.fn[y]=function(b){return b?this.bind(y,b):this.trigger(y)},B.attrFn&&(B.attrFn[y]=!0)}(f,this),function(b,j){var i=b(e),c=b("html");b.mobile.media=function(){var a={},l=b("<div id='jquery-mediatest'></div>"),k=b("<body>").append(l);return function(d){if(!(d in a)){var n=h.createElement("style"),m="@media "+d+" { #jquery-mediatest { position:absolute; } }";n.type="text/css",n.styleSheet?n.styleSheet.cssText=m:n.appendChild(h.createTextNode(m)),c.prepend(k).prepend(n),a[d]=l.css("position")==="absolute",k.add(n).remove()}return a[d]}}()}(f),function(F,E){function D(i){var d=i.charAt(0).toUpperCase()+i.substr(1),k=(i+" "+A.join(d+" ")+d).split(" ");for(var j in k){if(B[k[j]]!==E){return !0}}}function v(J,I,H){var G=h.createElement("div"),r=function(d){return d.charAt(0).toUpperCase()+d.substr(1)},q=function(d){return"-"+d.charAt(0).toLowerCase()+d.substr(1)+"-"},p=function(l){var k=q(l)+J+": "+I+";",j=r(l),a=j+r(J);G.setAttribute("style",k),!G.style[a]||(n=!0)},o=H?[H]:A,n;for(var m=0;m<o.length;m++){p(o[m])}return !!n}function u(){var a="transform-3d";return v("perspective","10px","moz")||F.mobile.media("(-"+A.join("-"+a+"),(-")+"-"+a+"),("+a+")")}function t(){var a=location.protocol+"//"+location.host+location.pathname+"ui-dir/",m=F("head base"),l=null,k="",j,i;return m.length?k=m.attr("href"):m=l=F("<base>",{href:a}).appendTo("head"),j=F("<a href='testurl' />").prependTo(C),i=j[0].href,m[0].href=k||location.pathname,l&&l.remove(),i.indexOf(a)===0}function s(){var i=h.createElement("x"),l=h.documentElement,k=e.getComputedStyle,j;return"pointerEvents" in i.style?(i.style.pointerEvents="auto",i.style.pointerEvents="x",l.appendChild(i),j=k&&k(i,"").pointerEvents==="auto",l.removeChild(i),!!j):!1}function c(){var d=h.createElement("div");return typeof d.getBoundingClientRect!="undefined"}var C=F("<body>").prependTo("html"),B=C[0].style,A=["Webkit","Moz","O"],z="palmGetResource" in e,y=e.opera,x=e.operamini&&{}.toString.call(e.operamini)==="[object OperaMini]",w=e.blackberry&&!D("-webkit-transform");F.extend(F.mobile,{browser:{}}),F.mobile.browser.ie=function(){var j=3,i=h.createElement("div"),k=i.all||[];do{i.innerHTML="<!--[if gt IE "+ ++j+"]><br><![endif]-->"}while(k[0]);return j>4?j:!j}(),F.extend(F.support,{cssTransitions:"WebKitTransitionEvent" in e||v("transition","height 100ms linear")&&!y,pushState:"pushState" in history&&"replaceState" in history,mediaquery:F.mobile.media("only all"),cssPseudoElement:!!D("content"),touchOverflow:!!D("overflowScrolling"),cssTransform3d:u(),boxShadow:!!D("boxShadow")&&!w,scrollTop:("pageXOffset" in e||"scrollTop" in h.documentElement||"scrollTop" in C[0])&&!z&&!x,dynamicBaseTag:t(),cssPointerEvents:s(),boundingRect:c()}),C.remove();var b=function(){var d=e.navigator.userAgent;return d.indexOf("Nokia")>-1&&(d.indexOf("Symbian/3")>-1||d.indexOf("Series60/5")>-1)&&d.indexOf("AppleWebKit")>-1&&d.match(/(BrowserNG|NokiaBrowser)/7.[0-3]/)}();F.mobile.gradeA=function(){return(F.support.mediaquery||F.mobile.browser.ie&&F.mobile.browser.ie>=7)&&(F.support.boundingRect||F.fn.jquery.match(/1.[0-7+].[0-9+]?/)!==null)},F.mobile.ajaxBlacklist=e.blackberry&&!e.WebKitPoint||x||b,b&&F(function(){F("head link[rel='stylesheet']").attr("rel","alternate stylesheet").attr("rel","stylesheet")}),F.support.boxShadow||F("html").addClass("ui-mobile-nosupport-boxshadow")}(f),function(d,c){d.widget("mobile.page",d.mobile.widget,{options:{theme:"c",domCache:!1,keepNativeDefault:":jqmData(role='none'), :jqmData(role='nojs')"},_create:function(){var b=this;if(b._trigger("beforecreate")===!1){return !1}b.element.attr("tabindex","0").addClass("ui-page ui-body-"+b.options.theme).bind("pagebeforehide",function(){b.removeContainerBackground()}).bind("pagebeforeshow",function(){b.setContainerBackground()})},removeContainerBackground:function(){d.mobile.pageContainer.removeClass("ui-overlay-"+d.mobile.getInheritedTheme(this.element.parent()))},setContainerBackground:function(a){this.options.theme&&d.mobile.pageContainer.addClass("ui-overlay-"+(a||this.options.theme))},keepNativeSelector:function(){var a=this.options,i=a.keepNative&&d.trim(a.keepNative);return i&&a.keepNative!==a.keepNativeDefault?[a.keepNative,a.keepNativeDefault].join(", "):a.keepNativeDefault}})}(f),function(t,s,r){function c(b){return b=b||location.href,"#"+b.replace(/^[^#]*#?(.*)$/,"$1")}var q="hashchange",p=h,o,n=t.event.special,m=p.documentMode,l="on"+q in s&&(m===r||m>7);t.fn[q]=function(b){return b?this.bind(q,b):this.trigger(q)},t.fn[q].delay=50,n[q]=t.extend(n[q],{setup:function(){if(l){return !1}t(o.start)},teardown:function(){if(l){return !1}t(o.stop)}}),o=function(){function v(){var w=c(),i=a(j);w!==j?(b(j=w,i),t(s).trigger(q)):i!==j&&(location.href=location.href.replace(/#.*/,"")+i),k=setTimeout(v,t.fn[q].delay)}var u={},k,j=c(),d=function(i){return i},b=d,a=d;return u.start=function(){k||v()},u.stop=function(){k&&clearTimeout(k),k=r},t.browser.msie&&!l&&function(){var i,w;u.start=function(){i||(w=t.fn[q].src,w=w&&w+c(),i=t('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){w||b(c()),v()}).attr("src",w||"javascript:0").insertAfter("body")[0].contentWindow,p.onpropertychange=function(){try{event.propertyName==="title"&&(i.document.title=p.title)}catch(x){}})},u.stop=d,a=function(){return c(i.location.href)},b=function(A,z){var y=i.document,x=t.fn[q].domain;A!==z&&(y.title=p.title,y.open(),x&&y.write('<script>document.domain="'+x+'"</script>'),y.close(),i.location.hash=A)}}(),u}()}(f,this),function(j,i,o){var n=function(a){return a===o&&(a=!0),function(M,L,K,J){var I=new j.Deferred,H=L?" reverse":"",G=j.mobile.urlHistory.getActive(),F=G.lastScroll||j.mobile.defaultHomeScroll,E=j.mobile.getScreenHeight(),D=j.mobile.maxTransitionWidth!==!1&&j(i).width()>j.mobile.maxTransitionWidth,C=!j.support.cssTransitions||D||!M||M==="none"||Math.max(j(i).scrollTop(),F)>j.mobile.getMaxScrollForTransition(),B=" ui-page-pre-in",A=function(){j.mobile.pageContainer.toggleClass("ui-mobile-viewport-transitioning viewport-"+M)},z=function(){j.event.special.scrollstart.enabled=!1,i.scrollTo(0,F),setTimeout(function(){j.event.special.scrollstart.enabled=!0},150)},y=function(){J.removeClass(j.mobile.activePageClass+" out in reverse "+M).height("")},x=function(){a?J.animationComplete(w):w(),J.height(E+j(i).scrollTop()).addClass(M+" out"+H)},w=function(){J&&a&&y(),d()},d=function(){K.css("z-index",-10),K.addClass(j.mobile.activePageClass+B),j.mobile.focusPage(K),K.height(E+F),z(),K.css("z-index",""),C||K.animationComplete(b),K.removeClass(B).addClass(M+" in"+H),C&&b()},b=function(){a||J&&y(),K.removeClass("out in reverse "+M).height(""),A(),j(i).scrollTop()!==F&&z(),I.resolve(M,L,K,J,!0)};return A(),J&&!C?x():w(),I.promise()}},m=n(),l=n(!1),k=function(){return j.mobile.getScreenHeight()*3};j.mobile.defaultTransitionHandler=m,j.mobile.transitionHandlers={"default":j.mobile.defaultTransitionHandler,sequential:m,simultaneous:l},j.mobile.transitionFallbacks={},j.mobile._maybeDegradeTransition=function(a){return a&&!j.support.cssTransform3d&&j.mobile.transitionFallbacks[a]&&(a=j.mobile.transitionFallbacks[a]),a},j.mobile.getMaxScrollForTransition=j.mobile.getMaxScrollForTransition||k}(f,this),function(ad,ac){function H(a){!!X&&(!X.closest("."+ad.mobile.activePageClass).length||a)&&X.removeClass(ad.mobile.activeBtnClass),X=null}function G(){T=!1,U.length>0&&ad.mobile.changePage.apply(null,U.pop())}function b(a,m,l,k){m&&m.data("page")._trigger("beforehide",null,{nextPage:a}),a.data("page")._trigger("beforeshow",null,{prevPage:m||ad("")}),ad.mobile.hidePageLoadingMsg(),l=ad.mobile._maybeDegradeTransition(l);var j=ad.mobile.transitionHandlers[l||"default"]||ad.mobile.defaultTransitionHandler,i=j(l,k,a,m);return i.done(function(){m&&m.data("page")._trigger("hide",null,{nextPage:a}),a.data("page")._trigger("show",null,{prevPage:m||ad("")})}),i}function Q(){var a=ad("."+ad.mobile.activePageClass),l=parseFloat(a.css("padding-top")),k=parseFloat(a.css("padding-bottom")),j=parseFloat(a.css("border-top-width")),i=parseFloat(a.css("border-bottom-width"));a.css("min-height",J()-l-k-j-i)}function O(a,d){d&&a.attr("data-"+ad.mobile.ns+"role",d),a.page()}function M(d){while(d){if(typeof d.nodeName=="string"&&d.nodeName.toLowerCase()==="a"){break}d=d.parentNode}return d}function K(a){var j=ad(a).closest(".ui-page").jqmData("url"),i=N.hrefNoHash;if(!j||!Y.isPath(j)){j=i}return Y.makeUrlAbsolute(j,i)}var ab=ad(e),aa=ad("html"),Z=ad("head"),Y={urlParseRE:/^(((([^:/#?]+:)?(?:(//)((?:(([^:@/#?]+)(?::([^:@/#?]+))?)@)?(([^:/#?][]+|[[^/]@#?]+])(?::([0-9]+))?))?)?)?((/?(?:[^/?#]+/+)*)([^?#]*)))?(?[^#]+)?)(#.*)?/,getLocation:function(i){var d=i?this.parseUrl(i):location,j=this.parseUrl(i||location.href).hash;return j=j==="#"?"":j,d.protocol+"//"+d.host+d.pathname+d.search+j},parseLocation:function(){return this.parseUrl(this.getLocation())},parseUrl:function(a){if(ad.type(a)==="object"){return a}var d=Y.urlParseRE.exec(a||"")||[];return{href:d[0]||"",hrefNoHash:d[1]||"",hrefNoSearch:d[2]||"",domain:d[3]||"",protocol:d[4]||"",doubleSlash:d[5]||"",authority:d[6]||"",username:d[8]||"",password:d[9]||"",host:d[10]||"",hostname:d[11]||"",port:d[12]||"",pathname:d[13]||"",directory:d[14]||"",filename:d[15]||"",search:d[16]||"",hash:d[17]||""}},makePathAbsolute:function(j,i){if(j&&j.charAt(0)==="/"){return j}j=j||"",i=i?i.replace(/^/|(/[^/]*|[^/]+)$/g,""):"";var n=i?i.split("/"):[],m=j.split("/");for(var l=0;l<m.length;l++){var k=m[l];switch(k){case".":break;case"..":n.length&&n.pop();break;default:n.push(k)}}return"/"+n.join("/")},isSameDomain:function(i,d){return Y.parseUrl(i).domain===Y.parseUrl(d).domain},isRelativeUrl:function(d){return Y.parseUrl(d).protocol===""},isAbsoluteUrl:function(d){return Y.parseUrl(d).protocol!==""},makeUrlAbsolute:function(w,v){if(!Y.isRelativeUrl(w)){return w}v===ac&&(v=N);var u=Y.parseUrl(w),t=Y.parseUrl(v),s=u.protocol||t.protocol,r=u.protocol?u.doubleSlash:u.doubleSlash||t.doubleSlash,q=u.authority||t.authority,p=u.pathname!=="",o=Y.makePathAbsolute(u.pathname||t.filename,t.pathname),n=u.search||!p&&t.search||"",d=u.hash;return s+r+q+o+n+d},addSearchParams:function(a,l){var k=Y.parseUrl(a),j=typeof l=="object"?ad.param(l):l,i=k.search||"?";return k.hrefNoSearch+i+(i.charAt(i.length-1)!=="?"?"&":"")+j+(k.hash||"")},convertUrlToDataUrl:function(d){var i=Y.parseUrl(d);return Y.isEmbeddedPage(i)?i.hash.split(S)[0].replace(/^#/,""):Y.isSameDomain(i,N)?i.hrefNoHash.replace(N.domain,"").split(S)[0]:e.decodeURIComponent(d)},get:function(d){return d===ac&&(d=Y.parseLocation().hash),Y.stripHash(d).replace(/[^/]*.[^/*]+$/,"")},getFilePath:function(a){var d="&"+ad.mobile.subPageUrlKey;return a&&a.split(d)[0].split(S)[0]},set:function(d){location.hash=d},isPath:function(d){return///.test(d)},clean:function(d){return d.replace(N.domain,"")},stripHash:function(d){return d.replace(/^#/,"")},cleanHash:function(d){return Y.stripHash(d.replace(/?.*$/,"").replace(S,""))},isHashValid:function(d){return/^#[^#]+$/.test(d)},isExternal:function(i){var d=Y.parseUrl(i);return d.protocol&&d.domain!==P.domain?!0:!1},hasProtocol:function(d){return/^(:?w+:)/.test(d)},isFirstPageUrl:function(a){var k=Y.parseUrl(Y.makeUrlAbsolute(a,N)),j=k.hrefNoHash===P.hrefNoHash||L&&k.hrefNoHash===N.hrefNoHash,i=ad.mobile.firstPage,d=i&&i[0]?i[0].id:ac;return j&&(!k.hash||k.hash==="#"||d&&k.hash.replace(/^#/,"")===d)},isEmbeddedPage:function(i){var d=Y.parseUrl(i);return d.protocol!==""?d.hash&&(d.hrefNoHash===P.hrefNoHash||L&&d.hrefNoHash===N.hrefNoHash):/^#/.test(d.href)},isPermittedCrossDomainRequest:function(a,d){return ad.mobile.allowCrossDomainPages&&a.protocol==="file:"&&d.search(/^https?:/)!==-1}},X=null,W={stack:[],activeIndex:0,getActive:function(){return W.stack[W.activeIndex]},getPrev:function(){return W.stack[W.activeIndex-1]},getNext:function(){return W.stack[W.activeIndex+1]},addNew:function(j,i,m,l,k){W.getNext()&&W.clearForward(),W.stack.push({url:j,transition:i,title:m,pageUrl:l,role:k}),W.activeIndex=W.stack.length-1},clearForward:function(){W.stack=W.stack.slice(0,W.activeIndex+1)},directHashChange:function(a){var k,j,i,d=this.getActive();ad.each(W.stack,function(l,m){decodeURIComponent(a.currentUrl)===decodeURIComponent(m.url)&&(k=l<W.activeIndex,j=!k,i=l)}),this.activeIndex=i!==ac?i:this.activeIndex,k?(a.either||a.isBack)(!0):j&&(a.either||a.isForward)(!1)},ignoreNextHashChange:!1},V="[tabindex],a,button:visible,select:visible,input",U=[],T=!1,S="&ui-state=dialog",R=Z.children("base"),P=Y.parseLocation(),N=R.length?Y.parseUrl(Y.makeUrlAbsolute(R.attr("href"),P.href)):P,L=P.hrefNoHash!==N.hrefNoHash,J=ad.mobile.getScreenHeight,I=ad.support.dynamicBaseTag?{element:R.length?R:ad("<base>",{href:N.hrefNoHash}).prependTo(Z),set:function(d){I.element.attr("href",Y.makeUrlAbsolute(d,N))},reset:function(){I.element.attr("href",N.hrefNoHash)}}:ac;ad.mobile.back=function(){var d=e.navigator;this.phonegapNavigationEnabled&&d&&d.app&&d.app.backHistory?d.app.backHistory():e.history.back()},ad.mobile.focusPage=function(i){var d=i.find("[autofocus]"),j=i.find(".ui-title:eq(0)");if(d.length){d.focus();return}j.length?j.focus():i.focus()};var F=!0,E,c;E=function(){if(!F){return}var a=ad.mobile.urlHistory.getActive();if(a){var d=ab.scrollTop();a.lastScroll=d<ad.mobile.minScrollBack?ad.mobile.defaultHomeScroll:d}},c=function(){setTimeout(E,100)},ab.bind(ad.support.pushState?"popstate":"hashchange",function(){F=!1}),ab.one(ad.support.pushState?"popstate":"hashchange",function(){F=!0}),ab.one("pagecontainercreate",function(){ad.mobile.pageContainer.bind("pagechange",function(){F=!0,ab.unbind("scrollstop",c),ab.bind("scrollstop",c)})}),ab.bind("scrollstop",c),ad.mobile._maybeDegradeTransition=ad.mobile._maybeDegradeTransition||function(d){return d},ad.fn.animationComplete=function(a){return ad.support.cssTransitions?ad(this).one("webkitAnimationEnd animationend",a):(setTimeout(a,0),ad(this))},ad.mobile.path=Y,ad.mobile.base=I,ad.mobile.urlHistory=W,ad.mobile.dialogHashKey=S,ad.mobile.allowCrossDomainPages=!1,ad.mobile.getDocumentUrl=function(a){return a?ad.extend({},P):P.href},ad.mobile.getDocumentBase=function(a){return a?ad.extend({},N):N.href},ad.mobile._bindPageRemove=function(){var a=ad(this);!a.data("page").options.domCache&&a.is(":jqmData(external-page='true')")&&a.bind("pagehide.remove",function(){var d=ad(this),i=new ad.Event("pageremove");d.trigger(i),i.isDefaultPrevented()||d.removeWithDependents()})},ad.mobile.loadPage=function(C,B){var A=ad.Deferred(),z=ad.extend({},ad.mobile.loadPage.defaults,B),y=null,x=null,w=function(){var i=ad.mobile.activePage&&K(ad.mobile.activePage);return i||N.hrefNoHash},v=Y.makeUrlAbsolute(C,w());z.data&&z.type==="get"&&(v=Y.addSearchParams(v,z.data),z.data=ac),z.data&&z.type==="post"&&(z.reloadPage=!0);var t=Y.getFilePath(v),q=Y.convertUrlToDataUrl(v);z.pageContainer=z.pageContainer||ad.mobile.pageContainer,y=z.pageContainer.children("[data-"+ad.mobile.ns+"url='"+q+"']"),y.length===0&&q&&!Y.isPath(q)&&(y=z.pageContainer.children("#"+q).attr("data-"+ad.mobile.ns+"url",q).jqmData("url",q));if(y.length===0){if(ad.mobile.firstPage&&Y.isFirstPageUrl(t)){ad.mobile.firstPage.parent().length&&(y=ad(ad.mobile.firstPage))}else{if(Y.isEmbeddedPage(t)){return A.reject(v,B),A.promise()}}}if(y.length){if(!z.reloadPage){return O(y,z.role),A.resolve(v,B,y),A.promise()}x=y}var p=z.pageContainer,d=new ad.Event("pagebeforeload"),a={url:C,absUrl:v,dataUrl:q,deferred:A,options:z};p.trigger(d,a);if(d.isDefaultPrevented()){return A.promise()}if(z.showLoadMsg){var ae=setTimeout(function(){ad.mobile.showPageLoadingMsg()},z.loadMsgDelay),D=function(){clearTimeout(ae),ad.mobile.hidePageLoadingMsg()}}return I&&I.reset(),!ad.mobile.allowCrossDomainPages&&!Y.isSameDomain(P,v)?A.reject(v,B):ad.ajax({url:t,type:z.type,data:z.data,dataType:"html",success:function(af,k,ag){var u=ad("<div></div>"),r=af.match(/<title[^>]*>([^<]*)/)&&RegExp.$1,m=new RegExp("(<[^>]+\bdata-"+ad.mobile.ns+"role=["']?page["']?[^>]*>)"),l=new RegExp("\bdata-"+ad.mobile.ns+"url=["']?([^"'>]*)["']?");m.test(af)&&RegExp.$1&&l.test(RegExp.$1)&&RegExp.$1&&(C=t=Y.getFilePath(ad("<div>"+RegExp.$1+"</div>").text())),I&&I.set(t),u.get(0).innerHTML=af,y=u.find(":jqmData(role='page'), :jqmData(role='dialog')").first(),y.length||(y=ad("<div data-"+ad.mobile.ns+"role='page'>"+af.split(/</?body[^>]*>/gmi)[1]+"</div>")),r&&!y.jqmData("title")&&(~r.indexOf("&")&&(r=ad("<div>"+r+"</div>").text()),y.jqmData("title",r));if(!ad.support.dynamicBaseTag){var i=Y.get(t);y.find("[src], link[href], a[rel='external'], :jqmData(ajax='false'), a[target]").each(function(){var j=ad(this).is("[href]")?"href":ad(this).is("[src]")?"src":"action",n=ad(this).attr(j);n=n.replace(location.protocol+"//"+location.host+location.pathname,""),/^(w+:|#|/)/.test(n)||ad(this).attr(j,i+n)})}y.attr("data-"+ad.mobile.ns+"url",Y.convertUrlToDataUrl(t)).attr("data-"+ad.mobile.ns+"external-page",!0).appendTo(z.pageContainer),y.one("pagecreate",ad.mobile._bindPageRemove),O(y,z.role),v.indexOf("&"+ad.mobile.subPageUrlKey)>-1&&(y=z.pageContainer.children("[data-"+ad.mobile.ns+"url='"+q+"']")),z.showLoadMsg&&D(),a.xhr=ag,a.textStatus=k,a.page=y,z.pageContainer.trigger("pageload",a),A.resolve(v,B,y,x)},error:function(j,m,l){I&&I.set(Y.get()),a.xhr=j,a.textStatus=m,a.errorThrown=l;var k=new ad.Event("pageloadfailed");z.pageContainer.trigger(k,a);if(k.isDefaultPrevented()){return}z.showLoadMsg&&(D(),ad.mobile.showPageLoadingMsg(ad.mobile.pageLoadErrorMessageTheme,ad.mobile.pageLoadErrorMessage,!0),setTimeout(ad.mobile.hidePageLoadingMsg,1500)),A.reject(v,B)}}),A.promise()},ad.mobile.loadPage.defaults={type:"get",data:ac,reloadPage:!1,role:ac,showLoadMsg:!1,pageContainer:ac,loadMsgDelay:50},ad.mobile.changePage=function(ak,aj){if(T){U.unshift(arguments);return}var ai=ad.extend({},ad.mobile.changePage.defaults,aj);ai.pageContainer=ai.pageContainer||ad.mobile.pageContainer,ai.fromPage=ai.fromPage||ad.mobile.activePage;var ah=ai.pageContainer,ag=new ad.Event("pagebeforechange"),af={toPage:ak,options:ai};ah.trigger(ag,af);if(ag.isDefaultPrevented()){return}ak=af.toPage,T=!0;if(typeof ak=="string"){ad.mobile.loadPage(ak,ai).done(function(i,q,o,k){T=!1,q.duplicateCachedPage=k,ad.mobile.changePage(o,q)}).fail(function(k,i){T=!1,H(!0),G(),ai.pageContainer.trigger("pagechangefailed",af)});return}ak[0]===ad.mobile.firstPage[0]&&!ai.dataUrl&&(ai.dataUrl=P.hrefNoHash);var ae=ai.fromPage,z=ai.dataUrl&&Y.convertUrlToDataUrl(ai.dataUrl)||ak.jqmData("url"),v=z,n=Y.getFilePath(z),m=W.getActive(),j=W.activeIndex===0,d=0,a=h.title,B=ai.role==="dialog"||ak.jqmData("role")==="dialog";if(ae&&ae[0]===ak[0]&&!ai.allowSamePageTransition){T=!1,ah.trigger("pagechange",af),ai.fromHashChange&&W.directHashChange({currentUrl:z,isBack:function(){},isForward:function(){}});return}O(ak,ai.role),ai.fromHashChange&&W.directHashChange({currentUrl:z,isBack:function(){d=-1},isForward:function(){d=1}});try{h.activeElement&&h.activeElement.nodeName.toLowerCase()!=="body"?ad(h.activeElement).blur():ad("input:focus, textarea:focus, select:focus").blur()}catch(u){}var p=!1;B&&m&&(m.url.indexOf(S)>-1&&!ad.mobile.activePage.is(".ui-dialog")&&(ai.changeHash=!1,p=!0),z=(m.url||"")+(p?"":S),W.activeIndex===0&&z===W.initialDst&&(z+=S)),ai.changeHash!==!1&&z&&(W.ignoreNextHashChange=!0,Y.set(z));var l=m?ak.jqmData("title")||ak.children(":jqmData(role='header')").find(".ui-title").getEncodedText():a;!!l&&a===h.title&&(a=l),ak.jqmData("title")||ak.jqmData("title",a),ai.transition=ai.transition||(d&&!j?m.transition:ac)||(B?ad.mobile.defaultDialogTransition:ad.mobile.defaultPageTransition),d||(p&&(W.activeIndex=Math.max(0,W.activeIndex-1)),W.addNew(z,ai.transition,a,v,ai.role)),h.title=W.getActive().title,ad.mobile.activePage=ak,ai.reverse=ai.reverse||d<0,b(ak,ae,ai.transition,ai.reverse).done(function(s,r,q,o,k){H(),ai.duplicateCachedPage&&ai.duplicateCachedPage.remove(),k||ad.mobile.focusPage(ak),G(),ah.trigger("pagechange",af)})},ad.mobile.changePage.defaults={transition:ac,reverse:!1,changeHash:!0,fromHashChange:!1,role:ac,duplicateCachedPage:ac,pageContainer:ac,showLoadMsg:!0,dataUrl:ac,fromPage:ac,allowSamePageTransition:!1},ad.mobile.navreadyDeferred=ad.Deferred(),ad.mobile.navreadyDeferred.done(function(){ad(h).delegate("form","submit",function(a){var l=ad(this);if(!ad.mobile.ajaxEnabled||l.is(":jqmData(ajax='false')")||!l.jqmHijackable().length){return}var k=l.attr("method"),j=l.attr("target"),i=l.attr("action");i||(i=K(l),i===N.hrefNoHash&&(i=P.hrefNoSearch)),i=Y.makeUrlAbsolute(i,K(l));if(Y.isExternal(i)&&!Y.isPermittedCrossDomainRequest(P,i)||j){return}ad.mobile.changePage(i,{type:k&&k.length&&k.toLowerCase()||"get",data:l.serialize(),transition:l.jqmData("transition"),reverse:l.jqmData("direction")==="reverse",reloadPage:!0}),a.preventDefault()}),ad(h).bind("vclick",function(a){if(a.which>1||!ad.mobile.linkBindingEnabled){return}var d=M(a.target);if(!ad(d).jqmHijackable().length){return}d&&Y.parseUrl(d.getAttribute("href")||"#").hash!=="#"&&(H(!0),X=ad(d).closest(".ui-btn").not(".ui-disabled"),X.addClass(ad.mobile.activeBtnClass))}),ad(h).bind("click",function(x){if(!ad.mobile.linkBindingEnabled){return}var w=M(x.target),v=ad(w),u;if(!w||x.which>1||!v.jqmHijackable().length){return}u=function(){e.setTimeout(function(){H(!0)},200)};if(v.is(":jqmData(rel='back')")){return ad.mobile.back(),!1}var t=K(v),s=Y.makeUrlAbsolute(v.attr("href")||"#",t);if(!ad.mobile.ajaxEnabled&&!Y.isEmbeddedPage(s)){u();return}if(s.search("#")!==-1){s=s.replace(/[^#]*#/,"");if(!s){x.preventDefault();return}Y.isPath(s)?s=Y.makeUrlAbsolute(s,t):s=Y.makeUrlAbsolute("#"+s,P.hrefNoHash)}var r=v.is("[rel='external']")||v.is(":jqmData(ajax='false')")||v.is("[target]"),q=r||Y.isExternal(s)&&!Y.isPermittedCrossDomainRequest(P,s);if(q){u();return}var p=v.jqmData("transition"),d=v.jqmData("direction")==="reverse"||v.jqmData("back"),a=v.attr("data-"+ad.mobile.ns+"rel")||ac;ad.mobile.changePage(s,{transition:p,reverse:d,role:a,link:v}),x.preventDefault()}),ad(h).delegate(".ui-page","pageshow.prefetch",function(){var a=[];ad(this).find("a:jqmData(prefetch)").each(function(){var j=ad(this),i=j.attr("href");i&&ad.inArray(i,a)===-1&&(a.push(i),ad.mobile.loadPage(i,{role:j.attr("data-"+ad.mobile.ns+"rel")}))})}),ad.mobile._handleHashChange=function(l){var k=Y.stripHash(l),j=ad.mobile.urlHistory.stack.length===0?"none":ac,d=new ad.Event("navigate"),a={transition:j,changeHash:!1,fromHashChange:!0};0===W.stack.length&&(W.initialDst=k),ad.mobile.pageContainer.trigger(d);if(d.isDefaultPrevented()){return}if(!ad.mobile.hashListeningEnabled||W.ignoreNextHashChange){W.ignoreNextHashChange=!1;return}if(W.stack.length>1&&k.indexOf(S)>-1&&W.initialDst!==k){if(!ad.mobile.activePage.is(".ui-dialog")){W.directHashChange({currentUrl:k,isBack:function(){ad.mobile.back()},isForward:function(){e.history.forward()}});return}W.directHashChange({currentUrl:k,either:function(i){var m=ad.mobile.urlHistory.getActive();k=m.pageUrl,ad.extend(a,{role:m.role,transition:m.transition,reverse:i})}})}k?(k=typeof k=="string"&&!Y.isPath(k)?Y.makeUrlAbsolute("#"+k,N):k,k===Y.makeUrlAbsolute("#"+W.initialDst,N)&&W.stack.length&&W.stack[0].url!==W.initialDst.replace(S,"")&&(k=ad.mobile.firstPage),ad.mobile.changePage(k,a)):ad.mobile.changePage(ad.mobile.firstPage,a)},ab.bind("hashchange",function(a,d){ad.mobile._handleHashChange(Y.parseLocation().hash)}),ad(h).bind("pageshow",Q),ad(e).bind("throttledresize",Q)})}(f),function(d,c){var p={},o=p,n=d(c),m=d.mobile.path.parseLocation(),l=d.Deferred(),k=d.Deferred();d(h).ready(d.proxy(k,"resolve")),d(h).one("mobileinit",d.proxy(l,"resolve")),d.extend(p,{initialFilePath:function(){return m.pathname+m.search}(),hashChangeTimeout:200,hashChangeEnableTimer:g,initialHref:m.hrefNoHash,state:function(){return{hash:d.mobile.path.parseLocation().hash||"#"+o.initialFilePath,title:h.title,initialHref:o.initialHref}},resetUIKeys:function(a){var q=d.mobile.dialogHashKey,j="&"+d.mobile.subPageUrlKey,i=a.indexOf(q);return i>-1?a=a.slice(0,i)+"#"+a.slice(i):a.indexOf(j)>-1&&(a=a.split(j).join("#"+j)),a},nextHashChangePrevented:function(a){d.mobile.urlHistory.ignoreNextHashChange=a,o.onHashChangeDisabled=a},onHashChange:function(a){if(o.onHashChangeDisabled){return}var t,s,r=d.mobile.path.parseLocation().hash,q=d.mobile.path.isPath(r),j=q?d.mobile.path.getLocation():d.mobile.getDocumentUrl();r=q?r.replace("#",""):r,s=o.state(),t=d.mobile.path.makeUrlAbsolute(r,j),q&&(t=o.resetUIKeys(t)),history.replaceState(s,h.title,t)},onPopState:function(a){var r=a.originalEvent.state,q,j,i;r&&(clearTimeout(o.hashChangeEnableTimer),o.nextHashChangePrevented(!1),d.mobile._handleHashChange(r.hash),o.nextHashChangePrevented(!0),o.hashChangeEnableTimer=setTimeout(function(){o.nextHashChangePrevented(!1)},o.hashChangeTimeout))},init:function(){n.bind("hashchange",o.onHashChange),n.bind("popstate",o.onPopState),location.hash===""&&history.replaceState(o.state(),h.title,d.mobile.path.getLocation())}}),d.when(k,l,d.mobile.navreadyDeferred).done(function(){d.mobile.pushStateEnabled&&d.support.pushState&&p.init()})}(f,this),function(i,d,j){i.mobile.transitionFallbacks.flip="fade"}(f,this),function(i,d,j){i.mobile.transitionFallbacks.flow="fade"}(f,this),function(i,d,j){i.mobile.transitionFallbacks.pop="fade"}(f,this),function(i,d,j){i.mobile.transitionHandlers.slide=i.mobile.transitionHandlers.simultaneous,i.mobile.transitionFallbacks.slide="fade"}(f,this),function(i,d,j){i.mobile.transitionFallbacks.slidedown="fade"}(f,this),function(i,d,j){i.mobile.transitionFallbacks.slidefade="fade"}(f,this),function(i,d,j){i.mobile.transitionFallbacks.slideup="fade"}(f,this),function(i,d,j){i.mobile.transitionFallbacks.turn="fade"}(f,this),function(d,c){d.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},d(h).bind("pagecreate create",function(a){var j=d.mobile.closestPageData(d(a.target)),i;if(!j){return}i=j.options,d(a.target).find("input").not(j.keepNativeSelector()).each(function(){var k=d(this),q=this.getAttribute("type"),p=i.degradeInputs[q]||"text";if(i.degradeInputs[q]){var o=d("<div>").html(k.clone()).html(),n=o.indexOf(" type=")>-1,m=n?/s+type=["']?w+['"]?/://?>/,l=' type="'+p+'" data-'+d.mobile.ns+'type="'+q+'"'+(n?"":">");k.replaceWith(o.replace(m,l))}})})}(f),function(i,c,j){i.widget("mobile.dialog",i.mobile.widget,{options:{closeBtnText:"Close",overlayTheme:"a",initSelector:":jqmData(role='dialog')"},_create:function(){var a=this,m=this.element,l=i("<a href='#' data-"+i.mobile.ns+"icon='delete' data-"+i.mobile.ns+"iconpos='notext'>"+this.options.closeBtnText+"</a>"),k=i("<div/>",{role:"dialog","class":"ui-dialog-contain ui-corner-all ui-overlay-shadow"});m.addClass("ui-dialog ui-overlay-"+this.options.overlayTheme),m.wrapInner(k).children().find(":jqmData(role='header')").prepend(l).end().children(":first-child").addClass("ui-corner-top").end().children(":last-child").addClass("ui-corner-bottom"),l.bind("click",function(){a.close()}),m.bind("vclick submit",function(n){var p=i(n.target).closest(n.type==="vclick"?"a":"form"),o;p.length&&!p.jqmData("transition")&&(o=i.mobile.urlHistory.getActive()||{},p.attr("data-"+i.mobile.ns+"transition",o.transition||i.mobile.defaultDialogTransition).attr("data-"+i.mobile.ns+"direction","reverse"))}).bind("pagehide",function(d,n){i(this).find("."+i.mobile.activeBtnClass).not(".ui-slider-bg").removeClass(i.mobile.activeBtnClass)}).bind("pagebeforeshow",function(){a._isCloseable=!0,a.options.overlayTheme&&a.element.page("removeContainerBackground").page("setContainerBackground",a.options.overlayTheme)})},close:function(){var a;this._isCloseable&&(this._isCloseable=!1,i.mobile.hashListeningEnabled?i.mobile.back():(a=i.mobile.urlHistory.getPrev().url,i.mobile.path.isPath(a)||(a=i.mobile.path.makeUrlAbsolute("#"+a)),i.mobile.changePage(a,{changeHash:!1,fromHashChange:!0})))}}),i(h).delegate(i.mobile.dialog.prototype.options.initSelector,"pagecreate",function(){i.mobile.dialog.prototype.enhance(this)})}(f,this),function(d,c){d.mobile.page.prototype.options.backBtnText="Back",d.mobile.page.prototype.options.addBackBtn=!1,d.mobile.page.prototype.options.backBtnTheme=null,d.mobile.page.prototype.options.headerTheme="a",d.mobile.page.prototype.options.footerTheme="a",d.mobile.page.prototype.options.contentTheme=null,d(h).bind("pagecreate",function(a){var l=d(a.target),k=l.data("page").options,j=l.jqmData("role"),i=k.theme;d(":jqmData(role='header'), :jqmData(role='footer'), :jqmData(role='content')",l).jqmEnhanceable().each(function(){var w=d(this),v=w.jqmData("role"),u=w.jqmData("theme"),t=u||k.contentTheme||j==="dialog"&&i,s,r,q,p;w.addClass("ui-"+v);if(v==="header"||v==="footer"){var o=u||(v==="header"?k.headerTheme:k.footerTheme)||i;w.addClass("ui-bar-"+o).attr("role",v==="header"?"banner":"contentinfo"),v==="header"&&(s=w.children("a, button"),r=s.hasClass("ui-btn-left"),q=s.hasClass("ui-btn-right"),r=r||s.eq(0).not(".ui-btn-right").addClass("ui-btn-left").length,q=q||s.eq(1).addClass("ui-btn-right").length),k.addBackBtn&&v==="header"&&d(".ui-page").length>1&&l.jqmData("url")!==d.mobile.path.stripHash(location.hash)&&!r&&(p=d("<a href='javascript:void(0);' class='ui-btn-left' data-"+d.mobile.ns+"rel='back' data-"+d.mobile.ns+"icon='arrow-l'>"+k.backBtnText+"</a>").attr("data-"+d.mobile.ns+"theme",k.backBtnTheme||o).prependTo(w)),w.children("h1, h2, h3, h4, h5, h6").addClass("ui-title").attr({role:"heading","aria-level":"1"})}else{v==="content"&&(t&&w.addClass("ui-body-"+t),w.attr("role","main"))}})})}(f),function(d,c){d.fn.fieldcontain=function(b){return this.addClass("ui-field-contain ui-body ui-br").contents().filter(function(){return this.nodeType===3&&!/S/.test(this.nodeValue)}).remove()},d(h).bind("pagecreate create",function(a){d(":jqmData(role='fieldcontain')",a.target).jqmEnhanceable().fieldcontain()})}(f),function(d,c){d.fn.grid=function(a){return this.each(function(){var o=d(this),n=d.extend({grid:null},a),m=o.children(),l={solo:1,a:2,b:3,c:4,d:5},k=n.grid,j;if(!k){if(m.length<=5){for(var b in l){l[b]===m.length&&(k=b)}}else{k="a",o.addClass("ui-grid-duo")}}j=l[k],o.addClass("ui-grid-"+k),m.filter(":nth-child("+j+"n+1)").addClass("ui-block-a"),j>1&&m.filter(":nth-child("+j+"n+2)").addClass("ui-block-b"),j>2&&m.filter(":nth-child("+j+"n+3)").addClass("ui-block-c"),j>3&&m.filter(":nth-child("+j+"n+4)").addClass("ui-block-d"),j>4&&m.filter(":nth-child("+j+"n+5)").addClass("ui-block-e")})}}(f),function(d,c){d(h).bind("pagecreate create",function(a){d(":jqmData(role='nojs')",a.target).addClass("ui-nojs")})}(f),function(i,c){function k(l){var d;while(l){d=typeof l.className=="string"&&l.className+" ";if(d&&d.indexOf("ui-btn ")>-1&&d.indexOf("ui-disabled ")<0){break}l=l.parentNode}return l}i.fn.buttonMarkup=function(E){var D=this,C=function(d,l){z.setAttribute("data-"+i.mobile.ns+d,l),A.jqmData(d,l)};E=E&&i.type(E)==="object"?E:{};for(var B=0;B<D.length;B++){var A=D.eq(B),z=A[0],y=i.extend({},i.fn.buttonMarkup.defaults,{icon:E.icon!==c?E.icon:A.jqmData("icon"),iconpos:E.iconpos!==c?E.iconpos:A.jqmData("iconpos"),theme:E.theme!==c?E.theme:A.jqmData("theme")||i.mobile.getInheritedTheme(A,"c"),inline:E.inline!==c?E.inline:A.jqmData("inline"),shadow:E.shadow!==c?E.shadow:A.jqmData("shadow"),corners:E.corners!==c?E.corners:A.jqmData("corners"),iconshadow:E.iconshadow!==c?E.iconshadow:A.jqmData("iconshadow"),mini:E.mini!==c?E.mini:A.jqmData("mini")},E),x="ui-btn-inner",w="ui-btn-text",v,u,t,b,a,F;i.each(y,C),A.jqmData("rel")==="popup"&&A.attr("href")&&(z.setAttribute("aria-haspopup",!0),z.setAttribute("aria-owns",z.getAttribute("href"))),F=i.data(z.tagName==="INPUT"||z.tagName==="BUTTON"?z.parentNode:z,"buttonElements"),F?(z=F.outer,A=i(z),t=F.inner,b=F.text,i(F.icon).remove(),F.icon=null):(t=h.createElement(y.wrapperEls),b=h.createElement(y.wrapperEls)),a=y.icon?h.createElement("span"):null,j&&!F&&j(),y.theme||(y.theme=i.mobile.getInheritedTheme(A,"c")),v="ui-btn ui-btn-up-"+y.theme,v+=y.shadow?" ui-shadow":"",v+=y.corners?" ui-btn-corner-all":"",y.mini!==c&&(v+=y.mini===!0?" ui-mini":" ui-fullsize"),y.inline!==c&&(v+=y.inline===!0?" ui-btn-inline":" ui-btn-block"),y.icon&&(y.icon="ui-icon-"+y.icon,y.iconpos=y.iconpos||"left",u="ui-icon "+y.icon,y.iconshadow&&(u+=" ui-icon-shadow")),y.iconpos&&(v+=" ui-btn-icon-"+y.iconpos,y.iconpos==="notext"&&!A.attr("title")&&A.attr("title",A.getEncodedText())),x+=y.corners?" ui-btn-corner-all":"",y.iconpos&&y.iconpos==="notext"&&!A.attr("title")&&A.attr("title",A.getEncodedText()),F&&A.removeClass(F.bcls||""),A.removeClass("ui-link").addClass(v),t.className=x,b.className=w,F||t.appendChild(b);if(a){a.className=u;if(!F||!F.icon){a.innerHTML=" ",t.appendChild(a)}}while(z.firstChild&&!F){b.appendChild(z.firstChild)}F||z.appendChild(t),F={bcls:v,outer:z,inner:t,text:b,icon:a},i.data(z,"buttonElements",F),i.data(t,"buttonElements",F),i.data(b,"buttonElements",F),a&&i.data(a,"buttonElements",F)}return this},i.fn.buttonMarkup.defaults={corners:!0,shadow:!0,iconshadow:!0,wrapperEls:"span"};var j=function(){var a=i.mobile.buttonMarkup.hoverDelay,l,d;i(h).bind({"vmousedown vmousecancel vmouseup vmouseover vmouseout focus blur scrollstart":function(p){var o,n=i(k(p.target)),m=p.originalEvent&&/^touch/.test(p.originalEvent.type),b=p.type;if(n.length){o=n.attr("data-"+i.mobile.ns+"theme");if(b==="vmousedown"){m?l=setTimeout(function(){n.removeClass("ui-btn-up-"+o).addClass("ui-btn-down-"+o)},a):n.removeClass("ui-btn-up-"+o).addClass("ui-btn-down-"+o)}else{if(b==="vmousecancel"||b==="vmouseup"){n.removeClass("ui-btn-down-"+o).addClass("ui-btn-up-"+o)}else{if(b==="vmouseover"||b==="focus"){m?d=setTimeout(function(){n.removeClass("ui-btn-up-"+o).addClass("ui-btn-hover-"+o)},a):n.removeClass("ui-btn-up-"+o).addClass("ui-btn-hover-"+o)}else{if(b==="vmouseout"||b==="blur"||b==="scrollstart"){n.removeClass("ui-btn-hover-"+o+" ui-btn-down-"+o).addClass("ui-btn-up-"+o),l&&clearTimeout(l),d&&clearTimeout(d)}}}}}},"focusin focus":function(m){i(k(m.target)).addClass(i.mobile.focusClass)},"focusout blur":function(m){i(k(m.target)).removeClass(i.mobile.focusClass)}}),j=null};i(h).bind("pagecreate create",function(a){i(":jqmData(role='button'), .ui-bar > a, .ui-header > a, .ui-footer > a, .ui-bar > :jqmData(role='controlgroup') > a",a.target).jqmEnhanceable().not("button, input, .ui-btn, :jqmData(role='none'), :jqmData(role='nojs')").buttonMarkup()})}(f),function(d,c){d.widget("mobile.collapsible",d.mobile.widget,{options:{expandCueText:" click to expand contents",collapseCueText:" click to collapse contents",collapsed:!0,heading:"h1,h2,h3,h4,h5,h6,legend",theme:null,contentTheme:null,inset:!0,mini:!1,initSelector:":jqmData(role='collapsible')"},_create:function(){var p=this.element,o=this.options,n=p.addClass("ui-collapsible"),m=p.children(o.heading).first(),l=p.jqmData("collapsed-icon")||o.collapsedIcon,k=p.jqmData("expanded-icon")||o.expandedIcon,b=n.wrapInner("<div class='ui-collapsible-content'></div>").children(".ui-collapsible-content"),a=p.closest(":jqmData(role='collapsible-set')").addClass("ui-collapsible-set");m.is("legend")&&(m=d("<div role='heading'>"+m.html()+"</div>").insertBefore(m),m.next().remove()),a.length?(o.theme||(o.theme=a.jqmData("theme")||d.mobile.getInheritedTheme(a,"c")),o.contentTheme||(o.contentTheme=a.jqmData("content-theme")),o.collapsedIcon||(o.collapsedIcon=a.jqmData("collapsed-icon")),o.expandedIcon||(o.expandedIcon=a.jqmData("expanded-icon")),o.iconPos||(o.iconPos=a.jqmData("iconpos")),a.jqmData("inset")!==c?o.inset=a.jqmData("inset"):o.inset=!0,o.mini||(o.mini=a.jqmData("mini"))):o.theme||(o.theme=d.mobile.getInheritedTheme(p,"c")),!o.inset||n.addClass("ui-collapsible-inset"),b.addClass(o.contentTheme?"ui-body-"+o.contentTheme:""),l=p.jqmData("collapsed-icon")||o.collapsedIcon||"plus",k=p.jqmData("expanded-icon")||o.expandedIcon||"minus",m.insertBefore(b).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:p.jqmData("iconpos")||o.iconPos||"left",icon:l,mini:o.mini,theme:o.theme}),!o.inset||m.find("a").first().add(".ui-btn-inner",p).addClass("ui-corner-top ui-corner-bottom"),n.bind("expand collapse",function(i){if(!i.isDefaultPrevented()){var r=d(this),q=i.type==="collapse",j=o.contentTheme;i.preventDefault(),m.toggleClass("ui-collapsible-heading-collapsed",q).find(".ui-collapsible-heading-status").text(q?o.expandCueText:o.collapseCueText).end().find(".ui-icon").toggleClass("ui-icon-"+k,!q).toggleClass("ui-icon-"+l,q||k===l).end().find("a").first().removeClass(d.mobile.activeBtnClass),r.toggleClass("ui-collapsible-collapsed",q),b.toggleClass("ui-collapsible-content-collapsed",q).attr("aria-hidden",q),j&&!!o.inset&&(!a.length||n.jqmData("collapsible-last"))&&(m.find("a").first().add(m.find(".ui-btn-inner")).toggleClass("ui-corner-bottom",q),b.toggleClass("ui-corner-bottom",!q)),b.trigger("updatelayout")}}).trigger(o.collapsed?"collapse":"expand"),m.bind("tap",function(i){m.find("a").first().addClass(d.mobile.activeBtnClass)}).bind("click",function(j){var i=m.is(".ui-collapsible-heading-collapsed")?"expand":"collapse";n.trigger(i),j.preventDefault(),j.stopPropagation()})}}),d(h).bind("pagecreate create",function(a){d.mobile.collapsible.prototype.enhanceWithin(a.target)})}(f),function(d,c){d.widget("mobile.collapsibleset",d.mobile.widget,{options:{initSelector:":jqmData(role='collapsible-set')"},_create:function(){var b=this.element.addClass("ui-collapsible-set"),a=this.options;a.theme||(a.theme=d.mobile.getInheritedTheme(b,"c")),a.contentTheme||(a.contentTheme=b.jqmData("content-theme")),b.jqmData("inset")!==c&&(a.inset=b.jqmData("inset")),a.inset=a.inset!==c?a.inset:!0,b.jqmData("collapsiblebound")||b.jqmData("collapsiblebound",!0).bind("expand collapse",function(i){var l=i.type==="collapse",k=d(i.target).closest(".ui-collapsible"),j=k.data("collapsible");k.jqmData("collapsible-last")&&!!a.inset&&(k.find(".ui-collapsible-heading").first().find("a").first().toggleClass("ui-corner-bottom",l).find(".ui-btn-inner").toggleClass("ui-corner-bottom",l),k.find(".ui-collapsible-content").toggleClass("ui-corner-bottom",!l))}).bind("expand",function(i){var j=d(i.target).closest(".ui-collapsible");j.parent().is(":jqmData(role='collapsible-set')")&&j.siblings(".ui-collapsible").trigger("collapse")})},_init:function(){var j=this.element,i=j.children(":jqmData(role='collapsible')"),k=i.filter(":jqmData(collapsed='false')");this.refresh(),k.trigger("expand")},refresh:function(){var a=this.element,j=this.options,i=a.children(":jqmData(role='collapsible')");d.mobile.collapsible.prototype.enhance(i.not(".ui-collapsible")),!j.inset||(i.each(function(){d(this).jqmRemoveData("collapsible-last").find(".ui-collapsible-heading").find("a").first().removeClass("ui-corner-top ui-corner-bottom").find(".ui-btn-inner").removeClass("ui-corner-top ui-corner-bottom")}),i.first().find("a").first().addClass("ui-corner-top").find(".ui-btn-inner").addClass("ui-corner-top"),i.last().jqmData("collapsible-last",!0).find("a").first().addClass("ui-corner-bottom").find(".ui-btn-inner").addClass("ui-corner-bottom"))}}),d(h).bind("pagecreate create",function(a){d.mobile.collapsibleset.prototype.enhanceWithin(a.target)})}(f),function(d,c){d.widget("mobile.navbar",d.mobile.widget,{options:{iconpos:"top",grid:null,initSelector:":jqmData(role='navbar')"},_create:function(){var i=this.element,b=i.find("a"),a=b.filter(":jqmData(icon)").length?this.options.iconpos:c;i.addClass("ui-navbar ui-mini").attr("role","navigation").find("ul").jqmEnhanceable().grid({grid:this.options.grid}),b.buttonMarkup({corners:!1,shadow:!1,inline:!0,iconpos:a}),i.delegate("a","vclick",function(j){d(j.target).hasClass("ui-disabled")||(b.removeClass(d.mobile.activeBtnClass),d(this).addClass(d.mobile.activeBtnClass))}),i.closest(".ui-page").bind("pagebeforeshow",function(){b.filter(".ui-state-persist").addClass(d.mobile.activeBtnClass)})}}),d(h).bind("pagecreate create",function(a){d.mobile.navbar.prototype.enhanceWithin(a.target)})}(f),function(i,c){var j={};i.widget("mobile.listview",i.mobile.widget,{options:{theme:null,countTheme:"c",headerTheme:"b",dividerTheme:"b",splitIcon:"arrow-r",splitTheme:"b",inset:!1,initSelector:":jqmData(role='listview')"},_create:function(){var k=this,d="";d+=k.options.inset?" ui-listview-inset ui-corner-all ui-shadow ":"",k.element.addClass(function(b,l){return l+" ui-listview "+d}),k.refresh(!0)},_removeCorners:function(l,k){var n="ui-corner-top ui-corner-tr ui-corner-tl",m="ui-corner-bottom ui-corner-br ui-corner-bl";l=l.add(l.find(".ui-btn-inner, .ui-li-link-alt, .ui-li-thumb")),k==="top"?l.removeClass(n):k==="bottom"?l.removeClass(m):l.removeClass(n+" "+m)},_refreshCorners:function(l){var k,o,n,m;k=this.element.children("li"),o=l||k.filter(":visible").length===0?k.not(".ui-screen-hidden"):k.filter(":visible"),k.filter(".ui-li-last").removeClass("ui-li-last"),this.options.inset?(this._removeCorners(k),n=o.first().addClass("ui-corner-top"),n.add(n.find(".ui-btn-inner").not(".ui-li-link-alt span:first-child")).addClass("ui-corner-top").end().find(".ui-li-link-alt, .ui-li-link-alt span:first-child").addClass("ui-corner-tr").end().find(".ui-li-thumb").not(".ui-li-icon").addClass("ui-corner-tl"),m=o.last().addClass("ui-corner-bottom ui-li-last"),m.add(m.find(".ui-btn-inner")).find(".ui-li-link-alt").addClass("ui-corner-br").end().find(".ui-li-thumb").not(".ui-li-icon").addClass("ui-corner-bl")):o.last().addClass("ui-li-last"),l||this.element.trigger("updatelayout")},_findFirstElementByTagName:function(l,k,o,n){var m={};m[o]=m[n]=!0;while(l){if(m[l.nodeName]){return l}l=l[k]}return null},_getChildrenByTagName:function(a,n,m){var l=[],k={};k[n]=k[m]=!0,a=a.firstChild;while(a){k[a.nodeName]&&l.push(a),a=a.nextSibling}return i(l)},_addThumbClasses:function(a){var m,l,k=a.length;for(m=0;m<k;m++){l=i(this._findFirstElementByTagName(a[m].firstChild,"nextSibling","img","IMG")),l.length&&(l.addClass("ui-li-thumb"),i(this._findFirstElementByTagName(l[0].parentNode,"parentNode","li","LI")).addClass(l.is(".ui-li-icon")?"ui-li-has-icon":"ui-li-has-thumb"))}},refresh:function(ag){this.parentPage=this.element.closest(".ui-page"),this._createSubPages();var af=this.options,ae=this.element,ad=this,ac=ae.jqmData("dividertheme")||af.dividerTheme,ab=ae.jqmData("splittheme"),aa=ae.jqmData("spliticon"),Z=this._getChildrenByTagName(ae[0],"li","LI"),Y=!!i.nodeName(ae[0],"ol"),X=!i.support.cssPseudoElement,W=ae.attr("start"),V={},U,T,R,P,N,L,J,I,H,G,F,a,S,Q;Y&&X&&ae.find(".ui-li-dec").remove(),Y&&(W||W===0?X?J=parseFloat(W):(I=parseFloat(W)-1,ae.css("counter-reset","listnumbering "+I)):X&&(J=1)),af.theme||(af.theme=i.mobile.getInheritedTheme(this.element,"c"));for(var O=0,M=Z.length;O<M;O++){U=Z.eq(O),T="ui-li";if(ag||!U.hasClass("ui-li")){R=U.jqmData("theme")||af.theme,P=this._getChildrenByTagName(U[0],"a","A");var K=U.jqmData("role")==="list-divider";P.length&&!K?(F=U.jqmData("icon"),U.buttonMarkup({wrapperEls:"div",shadow:!1,corners:!1,iconpos:"right",icon:P.length>1||F===!1?!1:F||"arrow-r",theme:R}),F!==!1&&P.length===1&&U.addClass("ui-li-has-arrow"),P.first().removeClass("ui-link").addClass("ui-link-inherit"),P.length>1&&(T+=" ui-li-has-alt",N=P.last(),L=ab||N.jqmData("theme")||af.splitTheme,Q=N.jqmData("icon"),N.appendTo(U).attr("title",N.getEncodedText()).addClass("ui-li-link-alt").empty().buttonMarkup({shadow:!1,corners:!1,theme:R,icon:!1,iconpos:"notext"}).find(".ui-btn-inner").append(i(h.createElement("span")).buttonMarkup({shadow:!0,corners:!0,theme:L,iconpos:"notext",icon:Q||F||aa||af.splitIcon})))):K?(T+=" ui-li-divider ui-bar-"+ac,U.attr("role","heading"),Y&&(W||W===0?X?J=parseFloat(W):(H=parseFloat(W)-1,U.css("counter-reset","listnumbering "+H)):X&&(J=1))):T+=" ui-li-static ui-btn-up-"+R}Y&&X&&T.indexOf("ui-li-divider")<0&&(G=T.indexOf("ui-li-static")>0?U:U.find(".ui-link-inherit"),G.addClass("ui-li-jsnumbering").prepend("<span class='ui-li-dec'>"+J+++". </span>")),V[T]||(V[T]=[]),V[T].push(U[0])}for(T in V){i(V[T]).addClass(T).children(".ui-btn-inner").addClass(T)}ae.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 d=i(this);d.prependTo(d.parent())}).end().find(".ui-li-count").each(function(){i(this).closest("li").addClass("ui-li-has-count")}).addClass("ui-btn-up-"+(ae.jqmData("counttheme")||this.options.countTheme)+" ui-btn-corner-all"),this._addThumbClasses(Z),this._addThumbClasses(ae.find(".ui-link-inherit")),this._refreshCorners(ag),this._trigger("afterrefresh")},_idStringEscape:function(b){return b.replace(/[^a-zA-Z0-9]/g,"-")},_createSubPages:function(){var v=this.element,u=v.closest(".ui-page"),t=u.jqmData("url"),s=t||u[0][i.expando],r=v.attr("id"),q=this.options,p="data-"+i.mobile.ns,o=this,n=u.find(":jqmData(role='footer')").jqmData("id"),d;typeof j[s]=="undefined"&&(j[s]=-1),r=r||++j[s],i(v.find("li>ul, li>ol").toArray().reverse()).each(function(B){var A=this,z=i(this),y=z.attr("id")||r+"-"+B,x=z.parent(),w=i(z.prevAll().toArray().reverse()),l=w.length?w:i("<span>"+i.trim(x.contents()[0].nodeValue)+"</span>"),k=l.first().getEncodedText(),b=(t||"")+"&"+i.mobile.subPageUrlKey+"="+y,F=z.jqmData("theme")||q.theme,E=z.jqmData("counttheme")||v.jqmData("counttheme")||q.countTheme,D,C;d=!0,D=z.detach().wrap("<div "+p+"role='page' "+p+"url='"+b+"' "+p+"theme='"+F+"' "+p+"count-theme='"+E+"'><div "+p+"role='content'></div></div>").parent().before("<div "+p+"role='header' "+p+"theme='"+q.headerTheme+"'><div class='ui-title'>"+k+"</div></div>").after(n?i("<div "+p+"role='footer' "+p+"id='"+n+"'>"):"").parent().appendTo(i.mobile.pageContainer),D.page(),C=x.find("a:first"),C.length||(C=i("<a/>").html(l||k).prependTo(x.empty())),C.attr("href","#"+b)}).listview();if(d&&u.is(":jqmData(external-page='true')")&&u.data("page").options.domCache===!1){var a=function(k,x){var w=x.nextPage,m,l=new i.Event("pageremove");x.nextPage&&(m=w.jqmData("url"),m.indexOf(t+"&"+i.mobile.subPageUrlKey)!==0&&(o.childPages().remove(),u.trigger(l),l.isDefaultPrevented()||u.removeWithDependents()))};u.unbind("pagehide.remove").bind("pagehide.remove",a)}},childPages:function(){var a=this.parentPage.jqmData("url");return i(":jqmData(url^='"+a+"&"+i.mobile.subPageUrlKey+"')")}}),i(h).bind("pagecreate create",function(a){i.mobile.listview.prototype.enhanceWithin(a.target)})}(f),function(d,c){d.mobile.listview.prototype.options.autodividers=!1,d.mobile.listview.prototype.options.autodividersSelector=function(j){var i=j.text()||null;return i?(i=i.slice(0,1).toUpperCase(),i):null},d(h).delegate("ul,ol","listviewcreate",function(){var a=d(this),k=a.data("listview");if(!k||!k.options.autodividers){return}var j=function(){a.find("li:jqmData(role='list-divider')").remove();var p=a.find("li"),o=null,n,m;for(var l=0;l<p.length;l++){n=p[l],m=k.options.autodividersSelector(d(n));if(m&&o!==m){var b=h.createElement("li");b.appendChild(h.createTextNode(m)),b.setAttribute("data-"+d.mobile.ns+"role","list-divider"),n.parentNode.insertBefore(b,n)}o=m}},i=function(){a.unbind("listviewafterrefresh",i),j(),k.refresh(),a.bind("listviewafterrefresh",i)};i()})}(f),function(d,c){d.widget("mobile.checkboxradio",d.mobile.widget,{options:{theme:null,initSelector:"input[type='checkbox'],input[type='radio']"},_create:function(){var G=this,F=this.element,E=function(j,i){return j.jqmData(i)||j.closest("form, fieldset").jqmData(i)},D=d(F).closest("label"),C=D.length?D:d(F).closest("form, fieldset, :jqmData(role='page'), :jqmData(role='dialog')").find("label").filter("[for='"+F[0].id+"']").first(),B=F[0].type,A=E(F,"mini"),z=B+"-on",y=B+"-off",x=F.parents(":jqmData(type='horizontal')").length?c:y,w=E(F,"iconpos"),v=x?"":" "+d.mobile.activeBtnClass,u="ui-"+z+v,b="ui-"+y,a="ui-icon-"+z,I="ui-icon-"+y;if(B!=="checkbox"&&B!=="radio"){return}d.extend(this,{label:C,inputtype:B,checkedClass:u,uncheckedClass:b,checkedicon:a,uncheckedicon:I}),this.options.theme||(this.options.theme=d.mobile.getInheritedTheme(this.element,"c")),C.buttonMarkup({theme:this.options.theme,icon:x,shadow:!1,mini:A,iconpos:w});var H=h.createElement("div");H.className="ui-"+B,F.add(C).wrapAll(H),C.bind({vmouseover:function(i){d(this).parent().is(".ui-disabled")&&i.stopPropagation()},vclick:function(i){if(F.is(":disabled")){i.preventDefault();return}return G._cacheVals(),F.prop("checked",B==="radio"&&!0||!F.prop("checked")),F.triggerHandler("click"),G._getInputSet().not(F).prop("checked",!1),G._updateAll(),!1}}),F.bind({vmousedown:function(){G._cacheVals()},vclick:function(){var i=d(this);i.is(":checked")?(i.prop("checked",!0),G._getInputSet().not(i).prop("checked",!1)):i.prop("checked",!1),G._updateAll()},focus:function(){C.addClass(d.mobile.focusClass)},blur:function(){C.removeClass(d.mobile.focusClass)}}),this.refresh()},_cacheVals:function(){this._getInputSet().each(function(){d(this).jqmData("cacheVal",this.checked)})},_getInputSet:function(){return this.inputtype==="checkbox"?this.element:this.element.closest("form, fieldset, :jqmData(role='page'), :jqmData(role='dialog')").find("input[name='"+this.element[0].name+"'][type='"+this.inputtype+"']")},_updateAll:function(){var a=this;this._getInputSet().each(function(){var b=d(this);(this.checked||a.inputtype==="checkbox")&&b.trigger("change")}).checkboxradio("refresh")},refresh:function(){var j=this.element[0],i=this.label,k=i.find(".ui-icon");j.checked?(i.addClass(this.checkedClass).removeClass(this.uncheckedClass),k.addClass(this.checkedicon).removeClass(this.uncheckedicon)):(i.removeClass(this.checkedClass).addClass(this.uncheckedClass),k.removeClass(this.checkedicon).addClass(this.uncheckedicon)),j.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")}}),d(h).bind("pagecreate create",function(a){d.mobile.checkboxradio.prototype.enhanceWithin(a.target,!0)})}(f),function(d,c){d.widget("mobile.button",d.mobile.widget,{options:{theme:null,icon:null,iconpos:null,corners:!0,shadow:!0,iconshadow:!0,initSelector:"button, [type='button'], [type='submit'], [type='reset']"},_create:function(){var s=this.element,r,q=this.options,p,o,n=q.inline||s.jqmData("inline"),m=q.mini||s.jqmData("mini"),b="",a;if(s[0].tagName==="A"){s.hasClass("ui-btn")||s.buttonMarkup();return}this.options.theme||(this.options.theme=d.mobile.getInheritedTheme(this.element,"c")),!~s[0].className.indexOf("ui-btn-left")||(b="ui-btn-left"),!~s[0].className.indexOf("ui-btn-right")||(b="ui-btn-right");if(s.attr("type")==="submit"||s.attr("type")==="reset"){b?b+=" ui-submit":b="ui-submit"}d("label[for='"+s.attr("id")+"']").addClass("ui-submit"),this.button=d("<div></div>")[s.html()?"html":"text"](s.html()||s.val()).insertBefore(s).buttonMarkup({theme:q.theme,icon:q.icon,iconpos:q.iconpos,inline:n,corners:q.corners,shadow:q.shadow,iconshadow:q.iconshadow,mini:m}).addClass(b).append(s.addClass("ui-btn-hidden")),r=this.button,p=s.attr("type"),o=s.attr("name"),p!=="button"&&p!=="reset"&&o&&s.bind("vclick",function(){a===c&&(a=d("<input>",{type:"hidden",name:s.attr("name"),value:s.attr("value")}).insertBefore(s),d(h).one("submit",function(){a.remove(),a=c}))}),s.bind({focus:function(){r.addClass(d.mobile.focusClass)},blur:function(){r.removeClass(d.mobile.focusClass)}}),this.refresh()},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 a=this.element;a.prop("disabled")?this.disable():this.enable(),d(this.button.data("buttonElements").text)[a.html()?"html":"text"](a.html()||a.val())}}),d(h).bind("pagecreate create",function(a){d.mobile.button.prototype.enhanceWithin(a.target,!0)})}(f),function(d,c){d.fn.controlgroup=function(a){function i(k,j){k.removeClass("ui-btn-corner-all ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-controlgroup-last ui-shadow").eq(0).addClass(j[0]).end().last().addClass(j[1]).addClass("ui-controlgroup-last")}return this.each(function(){var p=d(this),o=d.extend({direction:p.jqmData("type")||"vertical",shadow:!1,excludeInvisible:!0,mini:p.jqmData("mini")},a),n=p.children("legend"),m=p.children(".ui-controlgroup-label"),l=p.children(".ui-controlgroup-controls"),k=o.direction==="horizontal"?["ui-corner-left","ui-corner-right"]:["ui-corner-top","ui-corner-bottom"],b=p.find("input").first().attr("type");l.length&&l.contents().unwrap(),p.wrapInner("<div class='ui-controlgroup-controls'></div>"),n.length?(d("<div role='heading' class='ui-controlgroup-label'>"+n.html()+"</div>").insertBefore(p.children(0)),n.remove()):m.length&&p.prepend(m),p.addClass("ui-corner-all ui-controlgroup ui-controlgroup-"+o.direction),i(p.find(".ui-btn"+(o.excludeInvisible?":visible":"")).not(".ui-slider-handle"),k),i(p.find(".ui-btn-inner"),k),o.shadow&&p.addClass("ui-shadow"),o.mini&&p.addClass("ui-mini")})}}(f),function(d,c){d(h).bind("pagecreate create",function(a){d(a.target).find("a").jqmEnhanceable().not(".ui-btn, .ui-link-inherit, :jqmData(role='none'), :jqmData(role='nojs')").addClass("ui-link")})}(f),function(b,j){function i(l,k,o,n){var m=n;return l<k?m=o+(l-k)/2:m=Math.min(Math.max(o,n-k/2),o+l-k),m}function c(){var a=b(e);return{x:a.scrollLeft(),y:a.scrollTop(),cx:e.innerWidth||a.width(),cy:e.innerHeight||a.height()}}b.widget("mobile.popup",b.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",history:!b.mobile.browser.ie},_eatEventAndClose:function(d){return d.preventDefault(),d.stopImmediatePropagation(),this.close(),!1},_resizeScreen:function(){var d=this._ui.container.outerHeight(!0);this._ui.screen.removeAttr("style"),d>this._ui.screen.height()&&this._ui.screen.height(d)},_handleWindowKeyUp:function(a){if(this._isOpen&&a.keyCode===b.mobile.keyCode.ESCAPE){return this._eatEventAndClose(a)}},_maybeRefreshTimeout:function(){var a=c();if(this._resizeData){if(a.x===this._resizeData.winCoords.x&&a.y===this._resizeData.winCoords.y&&a.cx===this._resizeData.winCoords.cx&&a.cy===this._resizeData.winCoords.cy){return !1}clearTimeout(this._resizeData.timeoutId)}return this._resizeData={timeoutId:setTimeout(b.proxy(this,"_resizeTimeout"),200),winCoords:a},!0},_resizeTimeout:function(){this._maybeRefreshTimeout()||(this._trigger("beforeposition"),this._ui.container.removeClass("ui-selectmenu-hidden").offset(this._placementCoords(this._desiredCoords(j,j,"window"))),this._resizeScreen(),this._resizeData=null,this._orientationchangeInProgress=!1)},_handleWindowResize:function(d){this._isOpen&&this._maybeRefreshTimeout()},_handleWindowOrientationchange:function(d){this._orientationchangeInProgress||(this._ui.container.addClass("ui-selectmenu-hidden").removeAttr("style"),this._orientationchangeInProgress=!0)},_create:function(){var l={screen:b("<div class='ui-screen-hidden ui-popup-screen'></div>"),placeholder:b("<div style='display: none;'><!-- placeholder --></div>"),container:b("<div class='ui-popup-container ui-selectmenu-hidden'></div>")},k=this.element.closest(".ui-page"),d=this.element.attr("id"),a=this;this.options.history=this.options.history&&b.mobile.ajaxEnabled&&b.mobile.hashListeningEnabled,k.length===0&&(k=b("body")),this.options.container=this.options.container||b.mobile.pageContainer,k.append(l.screen),l.container.insertAfter(l.screen),l.placeholder.insertAfter(this.element),d&&(l.screen.attr("id",d+"-screen"),l.container.attr("id",d+"-popup"),l.placeholder.html("<!-- placeholder for "+d+" -->")),l.container.append(this.element),this.element.addClass("ui-popup"),b.extend(this,{_page:k,_ui:l,_fallbackTransition:"",_currentTransition:!1,_prereqs:null,_isOpen:!1,_tolerance:null,_resizeData:null,_orientationchangeInProgress:!1,_globalHandlers:[{src:b(e),handler:{orientationchange:b.proxy(this,"_handleWindowOrientationchange"),resize:b.proxy(this,"_handleWindowResize"),keyup:b.proxy(this,"_handleWindowKeyUp")}}]}),b.each(this.options,function(n,m){a.options[n]=j,a._setOption(n,m,!0)}),l.screen.bind("vclick",b.proxy(this,"_eatEventAndClose")),b.each(this._globalHandlers,function(n,m){m.src.bind(m.handler)})},_applyTheme:function(l,k,r){var q=(l.attr("class")||"").split(" "),p=!0,o=null,n,m=String(k);while(q.length>0){o=q.pop(),n=(new RegExp("^ui-"+r+"-([a-z])$")).exec(o);if(n&&n.length>1){o=n[1];break}o=null}k!==o&&(l.removeClass("ui-"+r+"-"+o),k!==null&&k!=="none"&&l.addClass("ui-"+r+"-"+m))},_setTheme:function(d){this._applyTheme(this.element,d,"body")},_setOverlayTheme:function(d){this._applyTheme(this._ui.screen,d,"overlay"),this._isOpen&&this._ui.screen.addClass("in")},_setShadow:function(d){this.element.toggleClass("ui-overlay-shadow",d)},_setCorners:function(d){this.element.toggleClass("ui-corner-all",d)},_applyTransition:function(a){this._ui.container.removeClass(this._fallbackTransition),a&&a!=="none"&&(this._fallbackTransition=b.mobile._maybeDegradeTransition(a),this._ui.container.addClass(this._fallbackTransition))},_setTransition:function(d){this._currentTransition||this._applyTransition(d)},_setTolerance:function(a){var l={t:30,r:15,b:30,l:15};if(a){var k=String(a).split(",");b.each(k,function(m,d){k[m]=parseInt(d,10)});switch(k.length){case 1:isNaN(k[0])||(l.t=l.r=l.b=l.l=k[0]);break;case 2:isNaN(k[0])||(l.t=l.b=k[0]),isNaN(k[1])||(l.l=l.r=k[1]);break;case 4:isNaN(k[0])||(l.t=k[0]),isNaN(k[1])||(l.r=k[1]),isNaN(k[2])||(l.b=k[2]),isNaN(k[3])||(l.l=k[3]);break;default:}}this._tolerance=l},_setOption:function(a,l){var k,d="_set"+a.charAt(0).toUpperCase()+a.slice(1);this[d]!==j&&this[d](l),k=["initSelector","closeLinkSelector","closeLinkEvents","navigateEvents","closeEvents","history","container"],b.mobile.widget.prototype._setOption.apply(this,arguments),b.inArray(a,k)===-1&&this.element.attr("data-"+(b.mobile.ns||"")+a.replace(/([A-Z])/,"-$1").toLowerCase(),l)},_placementCoords:function(m){var l=c(),s={x:this._tolerance.l,y:l.y+this._tolerance.t,cx:l.cx-this._tolerance.l-this._tolerance.r,cy:l.cy-this._tolerance.t-this._tolerance.b},r,q;this._ui.container.css("max-width",s.cx),r={cx:this._ui.container.outerWidth(!0),cy:this._ui.container.outerHeight(!0)},q={x:i(s.cx,r.cx,s.x,m.x),y:i(s.cy,r.cy,s.y,m.y)},q.y=Math.max(0,q.y);var p=h.documentElement,o=h.body,n=Math.max(p.clientHeight,o.scrollHeight,o.offsetHeight,p.scrollHeight,p.offsetHeight);return q.y-=Math.min(q.y,Math.max(0,q.y+r.cy-n)),{left:q.x,top:q.y}},_createPrereqs:function(a,n,m){var l=this,k;k={screen:b.Deferred(),container:b.Deferred()},k.screen.then(function(){k===l._prereqs&&a()}),k.container.then(function(){k===l._prereqs&&n()}),b.when(k.screen,k.container).done(function(){k===l._prereqs&&(l._prereqs=null,m())}),l._prereqs=k},_animate:function(a){this._ui.screen.removeClass(a.classToRemove).addClass(a.screenClassToAdd),a.prereqs.screen.resolve(),a.transition&&a.transition!=="none"?(a.applyTransition&&this._applyTransition(a.transition),this._ui.container.animationComplete(b.proxy(a.prereqs.container,"resolve")).addClass(a.containerClassToAdd).removeClass(a.classToRemove)):a.prereqs.container.resolve()},_desiredCoords:function(a,p,o){var n=null,m,l=c();if(o&&o!=="origin"){if(o==="window"){a=l.cx/2+l.x,p=l.cy/2+l.y}else{try{n=b(o)}catch(k){n=null}n&&(n.filter(":visible"),n.length===0&&(n=null))}}n&&(m=n.offset(),a=m.left+n.outerWidth()/2,p=m.top+n.outerHeight()/2);if(b.type(a)!=="number"||isNaN(a)){a=l.cx/2+l.x}if(b.type(p)!=="number"||isNaN(p)){p=l.cy/2+l.y}return{x:a,y:p}},_openPrereqsComplete:function(){var d=this;d._ui.container.addClass("ui-popup-active"),d._isOpen=!0,d._resizeScreen(),setTimeout(function(){d._ui.container.attr("tabindex","0").focus(),d._trigger("afteropen")})},_open:function(m){var l,k,a=function(){var n=e,t=navigator.userAgent,s=t.match(/AppleWebKit/([0-9.]+)/),r=!!s&&s[1],q=t.match(/Android (d+(?:.d+))/),p=!!q&&q[1],o=t.indexOf("Chrome")>-1;return q!==null&&p==="4.0"&&r&&r>534.13&&!o?!0:!1}();m=m||{},k=m.transition||this.options.transition,this._trigger("beforeposition"),l=this._placementCoords(this._desiredCoords(m.x,m.y,m.positionTo||this.options.positionTo||"origin")),this._createPrereqs(b.noop,b.noop,b.proxy(this,"_openPrereqsComplete")),k?(this._currentTransition=k,this._applyTransition(k)):k=this.options.transition,this.options.theme||this._setTheme(this._page.jqmData("theme")||b.mobile.getInheritedTheme(this._page,"c")),this._ui.screen.removeClass("ui-screen-hidden"),this._ui.container.removeClass("ui-selectmenu-hidden").offset(l),this.options.overlayTheme&&a&&this.element.closest(".ui-page").addClass("ui-popup-open"),this._animate({additionalCondition:!0,transition:k,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-selectmenu-hidden").removeAttr("style")},_closePrereqsDone:function(){var a=this,d=a.options;a._ui.container.removeAttr("tabindex"),d.container.unbind(d.closeEvents),a.element.undelegate(d.closeLinkSelector,d.closeLinkEvents),b.mobile.popup.active=j,a._trigger("afterclose")},_close:function(){this._ui.container.removeClass("ui-popup-active"),this._page.removeClass("ui-popup-open"),this._isOpen=!1,this._createPrereqs(b.proxy(this,"_closePrereqScreen"),b.proxy(this,"_closePrereqContainer"),b.proxy(this,"_closePrereqsDone")),this._animate({additionalCondition:this._ui.screen.hasClass("in"),transition:this._currentTransition||this.options.transition,classToRemove:"in",screenClassToAdd:"out",containerClassToAdd:"reverse out",applyTransition:!0,prereqs:this._prereqs})},_destroy:function(){var a=this;a._close(),a._setTheme("none"),a.element.insertAfter(a._ui.placeholder).removeClass("ui-popup ui-overlay-shadow ui-corner-all"),a._ui.screen.remove(),a._ui.container.remove(),a._ui.placeholder.remove(),b.each(a._globalHandlers,function(d,k){b.each(k.handler,function(m,l){k.src.unbind(m,l)})})},_bindContainerClose:function(){var a=this;a.options.container.one(a.options.closeEvents,b.proxy(a._close,a))},open:function(r){var q=this,p=this.options,o,n,m,l,d,a;if(b.mobile.popup.active){return}b.mobile.popup.active=this;if(!p.history){q._open(r),q._bindContainerClose(),q.element.delegate(p.closeLinkSelector,p.closeLinkEvents,function(k){return q._close(),!1});return}n=b.mobile.dialogHashKey,m=b.mobile.activePage,l=m.is(".ui-dialog"),o=b.mobile.urlHistory.getActive().url,d=o.indexOf(n)>-1&&!l,a=b.mobile.urlHistory;if(d){q._open(r),q._bindContainerClose();return}o.indexOf(n)===-1&&!l?o=o+n:o=b.mobile.path.parseLocation().hash+n,a.activeIndex===0&&o===a.initialDst&&(o+=n),p.container.one(p.navigateEvents,function(k){k.preventDefault(),q._open(r),q._bindContainerClose()}),a.ignoreNextHashChange=l,a.addNew(o,j,j,j,"dialog"),b.mobile.path.set(o)},close:function(){if(!b.mobile.popup.active){return}this.options.history?b.mobile.back():this._close()}}),b.mobile.popup.handleLink=function(a){var n=a.closest(":jqmData(role='page')"),m=n.length===0?b("body"):n,l=b(b.mobile.path.parseUrl(a.attr("href")).hash,m[0]),k;l.data("popup")&&(k=a.offset(),l.popup("open",{x:k.left+a.outerWidth()/2,y:k.top+a.outerHeight()/2,transition:a.jqmData("transition"),positionTo:a.jqmData("position-to"),link:a})),setTimeout(function(){a.removeClass(b.mobile.activeBtnClass)},300)},b(h).bind("pagebeforechange",function(a,d){d.options.role==="popup"&&(b.mobile.popup.handleLink(d.options.link),a.preventDefault())}),b(h).bind("pagecreate create",function(a){b.mobile.popup.prototype.enhanceWithin(a.target,!0)})}(f),function(j){var i=j("meta[name=viewport]"),n=i.attr("content"),m=n+",maximum-scale=1, user-scalable=no",l=n+",maximum-scale=10, user-scalable=yes",k=/(user-scalable[s]*=[s]*no)|(maximum-scale[s]*=[s]*1)[$,s]/.test(n);j.mobile.zoom=j.extend({},{enabled:!k,locked:!1,disable:function(a){!k&&!j.mobile.zoom.locked&&(i.attr("content",m),j.mobile.zoom.enabled=!1,j.mobile.zoom.locked=a||!1)},enable:function(a){!k&&(!j.mobile.zoom.locked||a===!0)&&(i.attr("content",l),j.mobile.zoom.enabled=!0,j.mobile.zoom.locked=!1)},restore:function(){k||(i.attr("content",n),j.mobile.zoom.enabled=!0)}})}(f),function(b,c){b.widget("mobile.textinput",b.mobile.widget,{options:{theme:null,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])",clearSearchButtonText:"clear text",disabled:!1},_create:function(){function s(){setTimeout(function(){t.toggleClass("ui-input-clear-hidden",!A.val())},0)}var B=this,A=this.element,z=this.options,y=z.theme||b.mobile.getInheritedTheme(this.element,"c"),x=" ui-body-"+y,w=A.jqmData("mini")===!0,v=w?" ui-mini":"",u,t;b("label[for='"+A.attr("id")+"']").addClass("ui-input-text"),u=A.addClass("ui-input-text ui-body-"+y),typeof A[0].autocorrect!="undefined"&&!b.support.touchOverflow&&(A[0].setAttribute("autocorrect","off"),A[0].setAttribute("autocomplete","off")),A.is("[type='search'],:jqmData(type='search')")?(u=A.wrap("<div class='ui-input-search ui-shadow-inset ui-btn-corner-all ui-btn-shadow ui-icon-searchfield"+x+v+"'></div>").parent(),t=b("<a href='#' class='ui-input-clear' title='"+z.clearSearchButtonText+"'>"+z.clearSearchButtonText+"</a>").bind("click",function(d){A.val("").focus().trigger("change"),t.addClass("ui-input-clear-hidden"),d.preventDefault()}).appendTo(u).buttonMarkup({icon:"delete",iconpos:"notext",corners:!0,shadow:!0,mini:w}),s(),A.bind("paste cut keyup focus change blur",s)):A.addClass("ui-corner-all ui-shadow-inset"+x+v),A.focus(function(){u.addClass(b.mobile.focusClass)}).blur(function(){u.removeClass(b.mobile.focusClass)}).bind("focus",function(){z.preventFocusZoom&&b.mobile.zoom.disable(!0)}).bind("blur",function(){z.preventFocusZoom&&b.mobile.zoom.enable(!0)});if(A.is("textarea")){var r=15,q=100,a;this._keyup=function(){var i=A[0].scrollHeight,d=A[0].clientHeight;d<i&&A.height(i+r)},A.keyup(function(){clearTimeout(a),a=setTimeout(B._keyup,q)}),this._on(b(h),{pagechange:"_keyup"}),b.trim(A.val())&&this._on(b(e),{load:"_keyup"})}A.attr("disabled")&&this.disable()},disable:function(){var d;return this.element.attr("disabled",!0).is("[type='search'], :jqmData(type='search')")?d=this.element.parent():d=this.element,d.addClass("ui-disabled"),this._setOption("disabled",!0)},enable:function(){var d;return this.element.attr("disabled",!1).is("[type='search'], :jqmData(type='search')")?d=this.element.parent():d=this.element,d.removeClass("ui-disabled"),this._setOption("disabled",!1)}}),b(h).bind("pagecreate create",function(a){b.mobile.textinput.prototype.enhanceWithin(a.target,!0)})}(f),function(i,c){i.mobile.listview.prototype.options.filter=!1,i.mobile.listview.prototype.options.filterPlaceholder="Поиск...",i.mobile.listview.prototype.options.filterTheme="c";var j=function(k,d,l){return k.toString().toLowerCase().indexOf(d)===-1};i.mobile.listview.prototype.options.filterCallback=j,i(h).delegate(":jqmData(role='listview')","listviewcreate",function(){var a=i(this),l=a.data("listview");if(!l.options.filter){return}var k=i("<form>",{"class":"ui-listview-filter ui-bar-"+l.options.filterTheme,role:"search"}),d=i("<input>",{placeholder:l.options.filterPlaceholder}).attr("data-"+i.mobile.ns+"type","search").jqmData("lastval","").bind("keyup change",function(){var u=i(this),t=this.value.toLowerCase(),s=null,r=u.jqmData("lastval")+"",q=!1,p="",o,n=l.options.filterCallback!==j;l._trigger("beforefilter","beforefilter",{input:this}),u.jqmData("lastval",t),n||t.length<r.length||t.indexOf(r)!==0?s=a.children():s=a.children(":not(.ui-screen-hidden)");if(t){for(var b=s.length-1;b>=0;b--){o=i(s[b]),p=o.jqmData("filtertext")||o.text(),o.is("li:jqmData(role=list-divider)")?(o.toggleClass("ui-filter-hidequeue",!q),q=!1):l.options.filterCallback(p,t,o)?o.toggleClass("ui-filter-hidequeue",!0):q=!0}s.filter(":not(.ui-filter-hidequeue)").toggleClass("ui-screen-hidden",!1),s.filter(".ui-filter-hidequeue").toggleClass("ui-screen-hidden",!0).toggleClass("ui-filter-hidequeue",!1)}else{s.toggleClass("ui-screen-hidden",!1)}l._refreshCorners()}).appendTo(k).textinput();l.options.inset&&k.addClass("ui-listview-filter-inset"),k.bind("submit",function(){return !1}).insertBefore(a)})}(f),function(b,c){b.widget("mobile.slider",b.mobile.widget,{widgetEventPrefix:"slide",options:{theme:null,trackTheme:null,disabled:!1,initSelector:"input[type='range'], :jqmData(type='range'), :jqmData(role='slider')",mini:!1},_create:function(){var an=this,am=this.element,al=b.mobile.getInheritedTheme(am,"c"),ak=this.options.theme||al,aj=this.options.trackTheme||al,ai=am[0].nodeName.toLowerCase(),ah=ai==="select"?"ui-slider-switch":"",ag=am.attr("id"),af=b("[for='"+ag+"']"),ae=af.attr("id")||ag+"-label",ad=af.attr("id",ae),ac=function(){return ai==="input"?parseFloat(am.val()):am[0].selectedIndex},aa=ai==="input"?parseFloat(am.attr("min")):0,Y=ai==="input"?parseFloat(am.attr("max")):am.find("option").length-1,W=e.parseFloat(am.attr("step")||1),U=this.options.inline||am.jqmData("inline")===!0?" ui-slider-inline":"",S=this.options.mini||am.jqmData("mini")?" ui-slider-mini":"",Q=h.createElement("a"),O=b(Q),M=h.createElement("div"),K=b(M),a=am.jqmData("highlight")&&ai!=="select"?function(){var i=h.createElement("div");return i.className="ui-slider-bg "+b.mobile.activeBtnClass+" ui-btn-corner-all",b(i).prependTo(K)}():!1,ab;this._type=ai,Q.setAttribute("href","#"),M.setAttribute("role","application"),M.className=["ui-slider ",ah," ui-btn-down-",aj," ui-btn-corner-all",U,S].join(""),Q.className="ui-slider-handle",M.appendChild(Q),O.buttonMarkup({corners:!0,theme:ak,shadow:!0}).attr({role:"slider","aria-valuemin":aa,"aria-valuemax":Y,"aria-valuenow":ac(),"aria-valuetext":ac(),title:ac(),"aria-labelledby":ae}),b.extend(this,{slider:K,handle:O,valuebg:a,dragging:!1,beforeStart:null,userModified:!1,mouseMoved:!1});if(ai==="select"){var Z=h.createElement("div");Z.className="ui-slider-inneroffset";for(var X=0,V=M.childNodes.length;X<V;X++){Z.appendChild(M.childNodes[X])}M.appendChild(Z),O.addClass("ui-slider-handle-snapping"),ab=am.find("option");for(var T=0,R=ab.length;T<R;T++){var P=T?"a":"b",N=T?" "+b.mobile.activeBtnClass:" ui-btn-down-"+aj,L=h.createElement("div"),d=h.createElement("span");d.className=["ui-slider-label ui-slider-label-",P,N," ui-btn-corner-all"].join(""),d.setAttribute("role","img"),d.appendChild(h.createTextNode(ab[T].innerHTML)),b(d).prependTo(K)}an._labels=b(".ui-slider-label",K)}ad.addClass("ui-slider"),am.addClass(ai==="input"?"ui-slider-input":"ui-slider-switch").change(function(){an.mouseMoved||an.refresh(ac(),!0)}).keyup(function(){an.refresh(ac(),!0,!0)}).blur(function(){an.refresh(ac(),!0)}),this._preventDocumentDrag=function(i){if(an.dragging&&!an.options.disabled){return an.mouseMoved=!0,ai==="select"&&O.removeClass("ui-slider-handle-snapping"),an.refresh(i),an.userModified=an.beforeStart!==am[0].selectedIndex,!1}},this._on(b(h),{vmousemove:this._preventDocumentDrag}),am.bind("vmouseup",b.proxy(an._checkedRefresh,an)),K.bind("vmousedown",function(i){return an.options.disabled?!1:(an.dragging=!0,an.userModified=!1,an.mouseMoved=!1,ai==="select"&&(an.beforeStart=am[0].selectedIndex),an.refresh(i),an._trigger("start"),!1)}).bind("vclick",!1),this._sliderMouseUp=function(){if(an.dragging){return an.dragging=!1,ai==="select"&&(O.addClass("ui-slider-handle-snapping"),an.mouseMoved?an.userModified?an.refresh(an.beforeStart===0?1:0):an.refresh(an.beforeStart):an.refresh(an.beforeStart===0?1:0)),an.mouseMoved=!1,an._trigger("stop"),!1}},this._on(K.add(h),{vmouseup:this._sliderMouseUp}),K.insertAfter(am),ai==="select"&&this.handle.bind({focus:function(){K.addClass(b.mobile.focusClass)},blur:function(){K.removeClass(b.mobile.focusClass)}}),this.handle.bind({vmousedown:function(){b(this).focus()},vclick:!1,keydown:function(i){var j=ac();if(an.options.disabled){return}switch(i.keyCode){case b.mobile.keyCode.HOME:case b.mobile.keyCode.END:case b.mobile.keyCode.PAGE_UP:case b.mobile.keyCode.PAGE_DOWN:case b.mobile.keyCode.UP:case b.mobile.keyCode.RIGHT:case b.mobile.keyCode.DOWN:case b.mobile.keyCode.LEFT:i.preventDefault(),an._keySliding||(an._keySliding=!0,b(this).addClass("ui-state-active"))}switch(i.keyCode){case b.mobile.keyCode.HOME:an.refresh(aa);break;case b.mobile.keyCode.END:an.refresh(Y);break;case b.mobile.keyCode.PAGE_UP:case b.mobile.keyCode.UP:case b.mobile.keyCode.RIGHT:an.refresh(j+W);break;case b.mobile.keyCode.PAGE_DOWN:case b.mobile.keyCode.DOWN:case b.mobile.keyCode.LEFT:an.refresh(j-W)}},keyup:function(i){an._keySliding&&(an._keySliding=!1,b(this).removeClass("ui-state-active"))}}),this.refresh(c,c,!0)},_checkedRefresh:function(){this.value!=this._value()&&this.refresh(this._value())},_value:function(){return this._type==="input"?parseFloat(this.element.val()):this.element[0].selectedIndex},refresh:function(J,I,H){(this.options.disabled||this.element.attr("disabled"))&&this.disable(),this.value=this._value();var G=this.element,F,E=G[0].nodeName.toLowerCase(),D=E==="input"?parseFloat(G.attr("min")):0,C=E==="input"?parseFloat(G.attr("max")):G.find("option").length-1,B=E==="input"&&parseFloat(G.attr("step"))>0?parseFloat(G.attr("step")):1;if(typeof J=="object"){var A=J,z=8;if(!this.dragging||A.pageX<this.slider.offset().left-z||A.pageX>this.slider.offset().left+this.slider.width()+z){return}F=Math.round((A.pageX-this.slider.offset().left)/this.slider.width()*100)}else{J==null&&(J=E==="input"?parseFloat(G.val()||0):G[0].selectedIndex),F=(parseFloat(J)-D)/(C-D)*100}if(isNaN(F)){return}F<0&&(F=0),F>100&&(F=100);var y=F/100*(C-D)+D,x=(y-D)%B,w=y-x;Math.abs(x)*2>=B&&(w+=x>0?B:-B),y=parseFloat(w.toFixed(5)),y<D&&(y=D),y>C&&(y=C),this.handle.css("left",F+"%"),this.handle.attr({"aria-valuenow":E==="input"?y:G.find("option").eq(y).attr("value"),"aria-valuetext":E==="input"?y:G.find("option").eq(y).getEncodedText(),title:E==="input"?y:G.find("option").eq(y).getEncodedText()}),this.valuebg&&this.valuebg.css("width",F+"%");if(this._labels){var v=this.handle.width()/this.slider.width()*100,u=F&&v+(100-v)*F/100,t=F===100?0:Math.min(v+100-u,100);this._labels.each(function(){var d=b(this).is(".ui-slider-label-a");b(this).width((d?u:t)+"%")})}if(!H){var a=!1;E==="input"?(a=G.val()!==y,G.val(y)):(a=G[0].selectedIndex!==y,G[0].selectedIndex=y),!I&&a&&G.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)}}),b(h).bind("pagecreate create",function(a){b.mobile.slider.prototype.enhanceWithin(a.target,!0)})}(f),function(b,c){b.widget("mobile.selectmenu",b.mobile.widget,{options:{theme:null,disabled:!1,icon:"arrow-d",iconpos:"right",inline:!1,corners:!0,shadow:!0,iconshadow:!0,overlayTheme:"a",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 b("<div/>")},_setDisabled:function(d){return this.element.attr("disabled",d),this.button.attr("aria-disabled",d),this._setOption("disabled",d)},_focusButton:function(){var d=this;setTimeout(function(){d.button.focus()},40)},_selectOptions:function(){return this.select.find("option")},_preExtension:function(){var a="";!~this.element[0].className.indexOf("ui-btn-left")||(a=" ui-btn-left"),!~this.element[0].className.indexOf("ui-btn-right")||(a=" ui-btn-right"),this.select=this.element.wrap("<div class='ui-select"+a+"'>"),this.selectID=this.select.attr("id"),this.label=b("label[for='"+this.selectID+"']").addClass("ui-select"),this.isMultiple=this.select[0].multiple,this.options.theme||(this.options.theme=b.mobile.getInheritedTheme(this.select,"c"))},_create:function(){this._preExtension(),this._trigger("beforeCreate"),this.button=this._button();var o=this,n=this.options,m=n.inline||this.select.jqmData("inline"),l=n.mini||this.select.jqmData("mini"),k=n.icon?n.iconpos||this.select.jqmData("iconpos"):!1,j=this.select[0].selectedIndex===-1?0:this.select[0].selectedIndex,a=this.button.insertBefore(this.select).buttonMarkup({theme:n.theme,icon:n.icon,iconpos:k,inline:m,corners:n.corners,shadow:n.shadow,iconshadow:n.iconshadow,mini:l});this.setButtonText(),n.nativeMenu&&e.opera&&e.opera.version&&a.addClass("ui-select-nativeonly"),this.isMultiple&&(this.buttonCount=b("<span>").addClass("ui-li-count ui-btn-up-c ui-btn-corner-all").hide().appendTo(a.addClass("ui-li-has-count"))),(n.disabled||this.element.attr("disabled"))&&this.disable(),this.select.change(function(){o.refresh()}),this.build()},build:function(){var a=this;this.select.appendTo(a.button).bind("vmousedown",function(){a.button.addClass(b.mobile.activeBtnClass)}).bind("focus",function(){a.button.addClass(b.mobile.focusClass)}).bind("blur",function(){a.button.removeClass(b.mobile.focusClass)}).bind("focus vmouseover",function(){a.button.trigger("vmouseover")}).bind("vmousemove",function(){a.button.removeClass(b.mobile.activeBtnClass)}).bind("change blur vmouseout",function(){a.button.trigger("vmouseout").removeClass(b.mobile.activeBtnClass)}).bind("change blur",function(){a.button.removeClass("ui-btn-down-"+a.options.theme)}),a.button.bind("vmousedown",function(){a.options.preventFocusZoom&&b.mobile.zoom.disable(!0)}).bind("mouseup",function(){a.options.preventFocusZoom&&setTimeout(function(){b.mobile.zoom.enable(!0)},0)})},selected:function(){return this._selectOptions().filter(":selected")},selectedIndices:function(){var d=this;return this.selected().map(function(){return d._selectOptions().index(this)}).get()},setButtonText:function(){var a=this,k=this.selected(),j=this.placeholder,i=b(h.createElement("span"));this.button.find(".ui-btn-text").html(function(){return k.length?j=k.map(function(){return b(this).text()}).get().join(", "):j=a.placeholder,i.text(j).addClass(a.select.attr("class")).addClass(k.attr("class"))})},setButtonCount:function(){var d=this.selected();this.isMultiple&&this.buttonCount[d.length>1?"show":"hide"]().text(d.length)},refresh:function(){this.setButtonText(),this.setButtonCount()},open:b.noop,close:b.noop,disable:function(){this._setDisabled(!0),this.button.addClass("ui-disabled")},enable:function(){this._setDisabled(!1),this.button.removeClass("ui-disabled")}}),b(h).bind("pagecreate create",function(a){b.mobile.selectmenu.prototype.enhanceWithin(a.target,!0)})}(f),function(b,i){var c=function(H){var G=H.select,F=H.selectID,E=H.label,D=H.select.closest(".ui-page"),C=H._selectOptions(),B=H.isMultiple=H.select[0].multiple,A=F+"-button",z=F+"-menu",y=b("<div data-"+b.mobile.ns+"role='dialog' data-"+b.mobile.ns+"theme='"+H.options.theme+"' data-"+b.mobile.ns+"overlay-theme='"+H.options.overlayTheme+"'><div data-"+b.mobile.ns+"role='header'><div class='ui-title'>"+E.getEncodedText()+"</div></div><div data-"+b.mobile.ns+"role='content'></div></div>"),x=b("<div>",{"class":"ui-selectmenu"}).insertAfter(H.select).popup({theme:"a"}),w=b("<ul>",{"class":"ui-selectmenu-list",id:z,role:"listbox","aria-labelledby":A}).attr("data-"+b.mobile.ns+"theme",H.options.theme).appendTo(x),v=b("<div>",{"class":"ui-header ui-bar-"+H.options.theme}).prependTo(x),u=b("<h1>",{"class":"ui-title"}).appendTo(v),a,J,I;H.isMultiple&&(I=b("<a>",{text:H.options.closeText,href:"#","class":"ui-btn-left"}).attr("data-"+b.mobile.ns+"iconpos","notext").attr("data-"+b.mobile.ns+"icon","delete").appendTo(v).buttonMarkup()),b.extend(H,{select:H.select,selectID:F,buttonId:A,menuId:z,thisPage:D,menuPage:y,label:E,selectOptions:C,isMultiple:B,theme:H.options.theme,listbox:x,list:w,header:v,headerTitle:u,headerClose:I,menuPageContent:a,menuPageClose:J,placeholder:"",build:function(){var d=this;d.refresh(),d.select.attr("tabindex","-1").focus(function(){b(this).blur(),d.button.focus()}),d.button.bind("vclick keydown",function(j){if(j.type==="vclick"||j.keyCode&&(j.keyCode===b.mobile.keyCode.ENTER||j.keyCode===b.mobile.keyCode.SPACE)){d.open(),j.preventDefault()}}),d.list.attr("role","listbox").bind("focusin",function(j){b(j.target).attr("tabindex","0").trigger("vmouseover")}).bind("focusout",function(j){b(j.target).attr("tabindex","-1").trigger("vmouseout")}).delegate("li:not(.ui-disabled, .ui-li-divider)","click",function(m){var l=d.select[0].selectedIndex,k=d.list.find("li:not(.ui-li-divider)").index(this),j=d._selectOptions().eq(k)[0];j.selected=d.isMultiple?!j.selected:!0,d.isMultiple&&b(this).find(".ui-icon").toggleClass("ui-icon-checkbox-on",j.selected).toggleClass("ui-icon-checkbox-off",!j.selected),(d.isMultiple||l!==k)&&d.select.trigger("change"),d.isMultiple?d.list.find("li:not(.ui-li-divider)").eq(k).addClass("ui-btn-down-"+H.options.theme).find("a").first().focus():d.close(),m.preventDefault()}).keydown(function(j){var n=b(j.target),m=n.closest("li"),l,k;switch(j.keyCode){case 38:return l=m.prev().not(".ui-selectmenu-placeholder"),l.is(".ui-li-divider")&&(l=l.prev()),l.length&&(n.blur().attr("tabindex","-1"),l.addClass("ui-btn-down-"+H.options.theme).find("a").first().focus()),!1;case 40:return k=m.next(),k.is(".ui-li-divider")&&(k=k.next()),k.length&&(n.blur().attr("tabindex","-1"),k.addClass("ui-btn-down-"+H.options.theme).find("a").first().focus()),!1;case 13:case 32:return n.trigger("click"),!1}}),d.menuPage.bind("pagehide",function(){d.list.appendTo(d.listbox),d._focusButton(),b.mobile._bindPageRemove.call(d.thisPage)}),d.listbox.bind("popupafterclose",function(j){d.close()}),d.isMultiple&&d.headerClose.click(function(){if(d.menuType==="overlay"){return d.close(),!1}}),d.thisPage.addDependents(this.menuPage)},_isRebuildRequired:function(){var j=this.list.find("li"),d=this._selectOptions();return d.text()!==j.text()},selected:function(){return this._selectOptions().filter(":selected:not( :jqmData(placeholder='true') )")},refresh:function(j,o){var n=this,m=this.element,l=this.isMultiple,k;(j||this._isRebuildRequired())&&n._buildList(),k=this.selectedIndices(),n.setButtonText(),n.setButtonCount(),n.list.find("li:not(.ui-li-divider)").removeClass(b.mobile.activeBtnClass).attr("aria-selected",!1).each(function(d){if(b.inArray(d,k)>-1){var p=b(this);p.attr("aria-selected",!0),n.isMultiple?p.find(".ui-icon").removeClass("ui-icon-checkbox-off").addClass("ui-icon-checkbox-on"):p.is(".ui-selectmenu-placeholder")?p.next().addClass(b.mobile.activeBtnClass):p.addClass(b.mobile.activeBtnClass)}})},close:function(){if(this.options.disabled||!this.isOpen){return}var d=this;d.menuType==="page"?b.mobile.back():(d.listbox.popup("close"),d.list.appendTo(d.listbox),d._focusButton()),d.isOpen=!1},open:function(){function d(){var j=N.list.find("."+b.mobile.activeBtnClass+" a");j.length===0&&(j=N.list.find("li.ui-btn:not( :jqmData(placeholder='true') ) a")),j.first().focus().closest("li").addClass("ui-btn-down-"+H.options.theme)}if(this.options.disabled){return}var N=this,M=b(e),L=N.list.parent(),K=L.outerHeight(),t=L.outerWidth(),s=b("."+b.mobile.activePageClass),r=M.scrollTop(),q=N.button.offset().top,p=M.height(),m=M.width();N.button.addClass(b.mobile.activeBtnClass),setTimeout(function(){N.button.removeClass(b.mobile.activeBtnClass)},300),K>p-80||!b.support.scrollTop?(N.menuPage.appendTo(b.mobile.pageContainer).page(),N.menuPageContent=y.find(".ui-content"),N.menuPageClose=y.find(".ui-header a"),N.thisPage.unbind("pagehide.remove"),r===0&&q>p&&N.thisPage.one("pagehide",function(){b(this).jqmData("lastScroll",q)}),N.menuPage.one("pageshow",function(){d(),N.isOpen=!0}),N.menuType="page",N.menuPageContent.append(N.list),N.menuPage.find("div .ui-title").text(N.label.text()),b.mobile.changePage(N.menuPage,{transition:b.mobile.defaultDialogTransition})):(N.menuType="overlay",N.listbox.one("popupafteropen",d).popup("open",{x:N.button.offset().left+N.button.outerWidth()/2,y:N.button.offset().top+N.button.outerHeight()/2}),N.isOpen=!0)},_buildList:function(){var al=this,ak=this.options,aj=this.placeholder,ai=!0,ah=[],ag=[],af=al.isMultiple?"checkbox-off":"false";al.list.empty().filter(".ui-listview").listview("destroy");var ae=al.select.find("option"),ad=ae.length,ac=this.select[0],ab="data-"+b.mobile.ns,aa=ab+"option-index",Z=ab+"icon",Y=ab+"role",W=ab+"placeholder",U=h.createDocumentFragment(),S=!1,Q;for(var P=0;P<ad;P++,S=!1){var O=ae[P],N=b(O),M=O.parentNode,L=N.text(),K=h.createElement("a"),X=[];K.setAttribute("href","#"),K.appendChild(h.createTextNode(L));if(M!==ac&&M.nodeName.toLowerCase()==="optgroup"){var V=M.getAttribute("label");if(V!==Q){var T=h.createElement("li");T.setAttribute(Y,"list-divider"),T.setAttribute("role","option"),T.setAttribute("tabindex","-1"),T.appendChild(h.createTextNode(V)),U.appendChild(T),Q=V}}ai&&(!O.getAttribute("value")||L.length===0||N.jqmData("placeholder"))&&(ai=!1,S=!0,O.setAttribute(W,!0),ak.hidePlaceholderMenuItems&&X.push("ui-selectmenu-placeholder"),aj||(aj=al.placeholder=L));var R=h.createElement("li");O.disabled&&(X.push("ui-disabled"),R.setAttribute("aria-disabled",!0)),R.setAttribute(aa,P),R.setAttribute(Z,af),S&&R.setAttribute(W,!0),R.className=X.join(" "),R.setAttribute("role","option"),K.setAttribute("tabindex","-1"),R.appendChild(K),U.appendChild(R)}al.list[0].appendChild(U),!this.isMultiple&&!aj.length?this.header.hide():this.headerTitle.text(this.placeholder),al.list.listview()},_button:function(){return b("<a>",{href:"#",role:"button",id:this.buttonId,"aria-haspopup":"true","aria-owns":this.menuId})}})};b(h).bind("selectmenubeforecreate",function(a){var d=b(a.target).data("selectmenu");!d.options.nativeMenu&&d.element.parents(":jqmData(role='popup')").length===0&&c(d)})}(f),function(b,c){b.widget("mobile.fixedtoolbar",b.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",hideDuringFocus:"input, textarea, select",updatePagePadding:!0,trackPersistentToolbars:!0,supportBlacklist:function(){var s=e,r=navigator.userAgent,q=navigator.platform,p=r.match(/AppleWebKit/([0-9]+)/),o=!!p&&p[1],n=r.match(/Fennec/([0-9]+)/),m=!!n&&n[1],l=r.match(/Opera Mobi/([0-9]+)/),k=!!l&&l[1];return(q.indexOf("iPhone")>-1||q.indexOf("iPad")>-1||q.indexOf("iPod")>-1)&&o&&o<534||s.operamini&&{}.toString.call(s.operamini)==="[object OperaMini]"||l&&k<7458||r.indexOf("Android")>-1&&o&&o<533||m&&m<6||"palmGetResource" in e&&o&&o<534||r.indexOf("MeeGo")>-1&&r.indexOf("NokiaBrowser/8.5.0")>-1?!0:!1},initSelector:":jqmData(position='fixed')"},_create:function(){var j=this,i=j.options,m=j.element,l=m.is(":jqmData(role='header')")?"header":"footer",k=m.closest(".ui-page");if(i.supportBlacklist()){j.destroy();return}m.addClass("ui-"+l+"-fixed"),i.fullscreen?(m.addClass("ui-"+l+"-fullscreen"),k.addClass("ui-page-"+l+"-fullscreen")):k.addClass("ui-page-"+l+"-fixed"),j._addTransitionClass(),j._bindPageEvents(),j._bindToggleHandlers()},_addTransitionClass:function(){var d=this.options.transition;d&&d!=="none"&&(d==="slide"&&(d=this.element.is(".ui-header")?"slidedown":"slideup"),this.element.addClass(d))},_bindPageEvents:function(){var j=this,i=j.options,a=j.element;a.closest(".ui-page").bind("pagebeforeshow",function(){i.disablePageZoom&&b.mobile.zoom.disable(!0),i.visibleOnPageShow||j.hide(!0)}).bind("webkitAnimationStart animationstart updatelayout",function(){var d=this;i.updatePagePadding&&j.updatePagePadding(d)}).bind("pageshow",function(){var d=this;j.updatePagePadding(d),i.updatePagePadding&&b(e).bind("throttledresize."+j.widgetName,function(){j.updatePagePadding(d)})}).bind("pagebeforehide",function(o,n){i.disablePageZoom&&b.mobile.zoom.enable(!0),i.updatePagePadding&&b(e).unbind("throttledresize."+j.widgetName);if(i.trackPersistentToolbars){var m=b(".ui-footer-fixed:jqmData(id)",this),l=b(".ui-header-fixed:jqmData(id)",this),k=m.length&&n.nextPage&&b(".ui-footer-fixed:jqmData(id='"+m.jqmData("id")+"')",n.nextPage)||b(),d=l.length&&n.nextPage&&b(".ui-header-fixed:jqmData(id='"+l.jqmData("id")+"')",n.nextPage)||b();if(k.length||d.length){k.add(d).appendTo(b.mobile.pageContainer),n.nextPage.one("pageshow",function(){k.add(d).appendTo(this)})}}})},_visible:!0,updatePagePadding:function(a){var j=this.element,i=j.is(".ui-header");if(this.options.fullscreen){return}a=a||j.closest(".ui-page"),b(a).css("padding-"+(i?"top":"bottom"),j.outerHeight())},_useTransition:function(q){var p=b(e),o=this.element,n=p.scrollTop(),m=o.height(),l=o.closest(".ui-page").height(),k=b.mobile.getScreenHeight(),a=o.is(":jqmData(role='header')")?"header":"footer";return !q&&(this.options.transition&&this.options.transition!=="none"&&(a==="header"&&!this.options.fullscreen&&n>m||a==="footer"&&!this.options.fullscreen&&n+k<l-m)||this.options.fullscreen)},show:function(i){var d="ui-fixed-hidden",j=this.element;this._useTransition(i)?j.removeClass("out "+d).addClass("in"):j.removeClass(d),this._visible=!0},hide:function(j){var i="ui-fixed-hidden",l=this.element,k="out"+(this.options.transition==="slide"?" reverse":"");this._useTransition(j)?l.addClass(k).removeClass("in").animationComplete(function(){l.addClass(i).removeClass(k)}):l.addClass(i).removeClass(k),this._visible=!1},toggle:function(){this[this._visible?"hide":"show"]()},_bindToggleHandlers:function(){var a=this,j=a.options,i=a.element;i.closest(".ui-page").bind("vclick",function(k){j.tapToggle&&!b(k.target).closest(j.tapToggleBlacklist).length&&a.toggle()}).bind("focusin focusout",function(k){screen.width<500&&b(k.target).is(j.hideDuringFocus)&&!b(k.target).closest(".ui-header-fixed, .ui-footer-fixed").length&&a[k.type==="focusin"&&a._visible?"hide":"show"]()})},destroy:function(){this.element.removeClass("ui-header-fixed ui-footer-fixed ui-header-fullscreen ui-footer-fullscreen in out fade slidedown slideup ui-fixed-hidden"),this.element.closest(".ui-page").removeClass("ui-page-header-fixed ui-page-footer-fixed ui-page-header-fullscreen ui-page-footer-fullscreen")}}),b(h).bind("pagecreate create",function(a){b(a.target).jqmData("fullscreen")&&b(b.mobile.fixedtoolbar.prototype.options.initSelector,a.target).not(":jqmData(fullscreen)").jqmData("fullscreen",!0),b.mobile.fixedtoolbar.prototype.enhanceWithin(a.target)})}(f),function(r,q){function j(b){o=b.originalEvent,k=o.accelerationIncludingGravity,n=Math.abs(k.x),m=Math.abs(k.y),l=Math.abs(k.z),!q.orientation&&(n>7||(l>6&&m<8||l<8&&m>6)&&n>5)?p.enabled&&p.disable():p.enabled||p.enable()}if(!(/iPhone|iPad|iPod/.test(navigator.platform)&&navigator.userAgent.indexOf("AppleWebKit")>-1)){return}var p=r.mobile.zoom,o,n,m,l,k;r(q).bind("orientationchange.iosorientationfix",p.enable).bind("devicemotion.iosorientationfix",j)}(f,this),function(i,c,n){function j(){m.removeClass("ui-mobile-rendering")}var m=i("html"),l=i("head"),k=i(c);i(c.document).trigger("mobileinit");if(!i.mobile.gradeA()){return}i.mobile.ajaxBlacklist&&(i.mobile.ajaxEnabled=!1),m.addClass("ui-mobile ui-mobile-rendering"),setTimeout(j,5000),i.extend(i.mobile,{initializePage:function(){var a=i(":jqmData(role='page'), :jqmData(role='dialog')"),p=i.mobile.path.parseLocation().hash.replace("#",""),o=h.getElementById(p);a.length||(a=i("body").wrapInner("<div data-"+i.mobile.ns+"role='page'></div>").children(0)),a.each(function(){var d=i(this);d.jqmData("url")||d.attr("data-"+i.mobile.ns+"url",d.attr("id")||location.pathname+location.search)}),i.mobile.firstPage=a.first(),i.mobile.pageContainer=a.first().parent().addClass("ui-mobile-viewport"),k.trigger("pagecontainercreate"),i.mobile.showPageLoadingMsg(),j(),!i.mobile.hashListeningEnabled||!i.mobile.path.isHashValid(location.hash)||!i(o).is(':jqmData(role="page")')&&!i.mobile.path.isPath(p)&&p!==i.mobile.dialogHashKey?(i.mobile.path.isHashValid(location.hash)&&(i.mobile.urlHistory.initialDst=p.replace("#","")),i.mobile.changePage(i.mobile.firstPage,{transition:"none",reverse:!0,changeHash:!1,fromHashChange:!0})):k.trigger("hashchange",[!0])}}),i.mobile.navreadyDeferred.resolve(),i(function(){c.scrollTo(0,1),i.mobile.defaultHomeScroll=!i.support.scrollTop||i(c).scrollTop()===1?0:1,i.fn.controlgroup&&i(h).bind("pagecreate create",function(a){i(":jqmData(role='controlgroup')",a.target).jqmEnhanceable().controlgroup({excludeInvisible:!1})}),i.mobile.autoInitializePage&&i.mobile.initializePage(),k.load(i.mobile.silentScroll),i.support.cssPointerEvents||i(h).delegate(".ui-disabled","vclick",function(b){b.preventDefault(),b.stopImmediatePropagation()})})}(f,this)});
?>