",{href:b}).appendto("head"),g=a(" ").prependto(f),h=g[0].href,c[0].href=e||location.pathname,d&&d.remove(),h.indexof(b)===0}function p(){var a=c.createelement("x"),d=c.documentelement,e=b.getcomputedstyle,f;return"pointerevents"in a.style?(a.style.pointerevents="auto",a.style.pointerevents="x",d.appendchild(a),f=e&&e(a,"").pointerevents==="auto",d.removechild(a),!!f):!1}function q(){var a=c.createelement("div");return typeof a.getboundingclientrect!="undefined"}function r(){var a=b,c=navigator.useragent,d=navigator.platform,e=c.match(/applewebkit\/([0-9]+)/),f=!!e&&e[1],g=c.match(/fennec\/([0-9]+)/),h=!!g&&g[1],i=c.match(/opera mobi\/([0-9]+)/),j=!!i&&i[1];return(d.indexof("iphone")>-1||d.indexof("ipad")>-1||d.indexof("ipod")>-1)&&f&&f<534||a.operamini&&{}.tostring.call(a.operamini)==="[object operamini]"||i&&j<7458||c.indexof("android")>-1&&f&&f<533||h&&h<6||"palmgetresource"in b&&f&&f<534||c.indexof("meego")>-1&&c.indexof("nokiabrowser/8.5.0")>-1?!1:!0}var f=a("").prependto("html"),g=f[0].style,h=["webkit","moz","o"],i="palmgetresource"in b,j=b.opera,k=b.operamini&&{}.tostring.call(b.operamini)==="[object operamini]",l=b.blackberry&&!e("-webkit-transform");a.extend(a.mobile,{browser:{}}),a.mobile.browser.oldie=function(){var a=3,b=c.createelement("div"),d=b.all||[];do b.innerhtml="";while(d[0]);return a>4?a:!a}(),a.extend(a.support,{csstransitions:"webkittransitionevent"in b||m("transition","height 100ms linear",["webkit","moz",""])&&!a.mobile.browser.oldie&&!j,pushstate:"pushstate"in history&&"replacestate"in history&&b.navigator.useragent.search(/crios/)===-1,mediaquery:a.mobile.media("only all"),csspseudoelement:!!e("content"),touchoverflow:!!e("overflowscrolling"),csstransform3d:n(),boxshadow:!!e("boxshadow")&&!l,fixedposition:r(),scrolltop:("pagexoffset"in b||"scrolltop"in c.documentelement||"scrolltop"in f[0])&&!i&&!k,dynamicbasetag:o(),csspointerevents:p(),boundingrect:q()}),f.remove();var s=function(){var a=b.navigator.useragent;return a.indexof("nokia")>-1&&(a.indexof("symbian/3")>-1||a.indexof("series60/5")>-1)&&a.indexof("applewebkit")>-1&&a.match(/(browserng|nokiabrowser)\/7\.[0-3]/)}();a.mobile.gradea=function(){return(a.support.mediaquery||a.mobile.browser.oldie&&a.mobile.browser.oldie>=7)&&(a.support.boundingrect||a.fn.jquery.match(/1\.[0-7+]\.[0-9+]?/)!==null)},a.mobile.ajaxblacklist=b.blackberry&&!b.webkitpoint||k||s,s&&a(function(){a("head link[rel='stylesheet']").attr("rel","alternate stylesheet").attr("rel","stylesheet")}),a.support.boxshadow||a("html").addclass("ui-mobile-nosupport-boxshadow")}(a),function(a,b){var c=a.mobile.window,d,e;a.event.special.navigate=d={bound:!1,pushstateenabled:!0,originaleventname:b,ispushstateenabled:function(){return a.support.pushstate&&a.mobile.pushstateenabled===!0&&this.ishashchangeenabled()},ishashchangeenabled:function(){return a.mobile.hashlisteningenabled===!0},popstate:function(b){var d=new a.event("navigate"),e=new a.event("beforenavigate"),f=b.originalevent.state||{},g=location.href;c.trigger(e);if(e.isdefaultprevented())return;b.historystate&&a.extend(f,b.historystate),d.originalevent=b,settimeout(function(){c.trigger(d,{state:f})},0)},hashchange:function(b,d){var e=new a.event("navigate"),f=new a.event("beforenavigate");c.trigger(f);if(f.isdefaultprevented())return;e.originalevent=b,c.trigger(e,{state:b.hashchangestate||{}})},setup:function(a,b){if(d.bound)return;d.bound=!0,d.ispushstateenabled()?(d.originaleventname="popstate",c.bind("popstate.navigate",d.popstate)):d.ishashchangeenabled()&&(d.originaleventname="hashchange",c.bind("hashchange.navigate",d.hashchange))}}}(a),function(a,b,c){var d=function(d){return d===c&&(d=!0),function(c,e,f,g){var h=new a.deferred,i=e?" reverse":"",j=a.mobile.urlhistory.getactive(),k=j.lastscroll||a.mobile.defaulthomescroll,l=a.mobile.getscreenheight(),m=a.mobile.maxtransitionwidth!==!1&&a.mobile.window.width()>a.mobile.maxtransitionwidth,n=!a.support.csstransitions||m||!c||c==="none"||math.max(a.mobile.window.scrolltop(),k)>a.mobile.getmaxscrollfortransition(),o=" ui-page-pre-in",p=function(){a.mobile.pagecontainer.toggleclass("ui-mobile-viewport-transitioning viewport-"+c)},q=function(){a.event.special.scrollstart.enabled=!1,b.scrollto(0,k),settimeout(function(){a.event.special.scrollstart.enabled=!0},150)},r=function(){g.removeclass(a.mobile.activepageclass+" out in reverse "+c).height("")},s=function(){d?g.animationcomplete(t):t(),g.height(l+a.mobile.window.scrolltop()).addclass(c+" out"+i)},t=function(){g&&d&&r(),u()},u=function(){f.css("z-index",-10),f.addclass(a.mobile.activepageclass+o),a.mobile.focuspage(f),f.height(l+k),q(),f.css("z-index",""),n||f.animationcomplete(v),f.removeclass(o).addclass(c+" in"+i),n&&v()},v=function(){d||g&&r(),f.removeclass("out in reverse "+c).height(""),p(),a.mobile.window.scrolltop()!==k&&q(),h.resolve(c,e,f,g,!0)};return p(),g&&!n?s():t(),h.promise()}},e=d(),f=d(!1),g=function(){return a.mobile.getscreenheight()*3};a.mobile.defaulttransitionhandler=e,a.mobile.transitionhandlers={"default":a.mobile.defaulttransitionhandler,sequential:e,simultaneous:f},a.mobile.transitionfallbacks={},a.mobile._maybedegradetransition=function(b){return b&&!a.support.csstransform3d&&a.mobile.transitionfallbacks[b]&&(b=a.mobile.transitionfallbacks[b]),b},a.mobile.getmaxscrollfortransition=a.mobile.getmaxscrollfortransition||g}(a,this),function(a,b,c,d){function x(a){while(a&&typeof a.originalevent!="undefined")a=a.originalevent;return a}function y(b,c){var e=b.type,f,g,i,k,l,m,n,o,p;b=a.event(b),b.type=c,f=b.originalevent,g=a.event.props,e.search(/^(mouse|click)/)>-1&&(g=j);if(f)for(n=g.length,k;n;)k=g[--n],b[k]=f[k];e.search(/mouse(down|up)|click/)>-1&&!b.which&&(b.which=1);if(e.search(/^touch/)!==-1){i=x(f),e=i.touches,l=i.changedtouches,m=e&&e.length?e[0]:l&&l.length?l[0]:d;if(m)for(o=0,p=h.length;oe||math.abs(c.pagey-n)>e,o&&!d&&h("vmousecancel",b,f),h("vmousemove",b,f),f()}function m(a){if(r)return;c();var b=z(a.target),c;h("vmouseup",a,b);if(!o){var d=h("vclick",a,b);d&&d.isdefaultprevented()&&(c=x(a).changedtouches[0],p.push({touchid:v,x:c.clientx,y:c.clienty}),q=!0)}h("vmouseout",a,b),o=!1,f()}function n(b){var c=a.data(b,e),d;if(c)for(d in c)if(c[d])return!0;return!1}function o(){}function p(b){var c=b.substr(1);return{setup:function(d,f){n(this)||a.data(this,e,{});var g=a.data(this,e);g[b]=!0,k[b]=(k[b]||0)+1,k[b]===1&&t.bind(c,i),a(this).bind(c,o),s&&(k.touchstart=(k.touchstart||0)+1,k.touchstart===1&&t.bind("touchstart",j).bind("touchend",m).bind("touchmove",l).bind("scroll",k))},teardown:function(d,f){--k[b],k[b]||t.unbind(c,i),s&&(--k.touchstart,k.touchstart||t.unbind("touchstart",j).unbind("touchmove",l).unbind("touchend",m).unbind("scroll",k));var g=a(this),h=a.data(this,e);h&&(h[b]=!1),g.unbind(c,o),n(this)||g.removedata(e)}}}var e="virtualmousebindings",f="virtualtouchid",g="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),h="clientx clienty pagex pagey screenx screeny".split(" "),i=a.event.mousehooks?a.event.mousehooks.props:[],j=a.event.props.concat(i),k={},l=0,m=0,n=0,o=!1,p=[],q=!1,r=!1,s="addeventlistener"in c,t=a(c),u=1,v=0,w;a.vmouse={movedistancethreshold:10,clickdistancethreshold:10,resettimerduration:1500};for(var q=0;qa.event.special.swipe.horizontaldistancethreshold&&math.abs(b.coords[1]-c.coords[1])c.coords[0]?"swipeleft":"swiperight")},setup:function(){var b=this,c=a(b);c.bind(h,function(b){function g(b){if(!e)return;f=a.event.special.swipe.stop(b),math.abs(e.coords[0]-f.coords[0])>a.event.special.swipe.scrollsupressionthreshold&&b.preventdefault()}var e=a.event.special.swipe.start(b),f;c.bind(j,g).one(i,function(){c.unbind(j,g),e&&f&&a.event.special.swipe.handleswipe(e,f),e=f=d})})}},a.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe",swiperight:"swipe"},function(b,c){a.event.special[b]={setup:function(){a(this).bind(c,a.noop)}}})}(a,this),function(a,b){function e(a){var b;while(a){b=typeof a.classname=="string"&&a.classname+" ";if(b&&b.indexof("ui-btn ")>-1&&b.indexof("ui-disabled ")<0)break;a=a.parentnode}return a}function f(d,e,f,g,h){var i=a.data(d[0],"buttonelements");d.removeclass(e).addclass(f),i&&(i.bcls=a(c.createelement("div")).addclass(i.bcls+" "+f).removeclass(e).attr("class"),g!==b&&(i.hover=g),i.state=h)}var d=function(a,c){var d=a.getattribute(c);return d==="true"?!0:d==="false"?!1:d===null?b:d};a.fn.buttonmarkup=function(e){var f=this,h="data-"+a.mobile.ns,i;e=e&&a.type(e)==="object"?e:{};for(var j=0;j a, .ui-header > a, .ui-footer > a, .ui-bar > :jqmdata(role='controlgroup') > a",b.target).jqmenhanceable().not("button, input, .ui-btn, :jqmdata(role='none'), :jqmdata(role='nojs')").buttonmarkup()})}(a),function(a,b){var c=0,d=array.prototype.slice,e=a.cleandata;a.cleandata=function(b){for(var c=0,d;(d=b[c])!=null;c++)try{a(d).triggerhandler("remove")}catch(f){}e(b)},a.widget=function(b,c,d){var e,f,g,h,i=b.split(".")[0];b=b.split(".")[1],e=i+"-"+b,d||(d=c,c=a.widget),a.expr[":"][e.tolowercase()]=function(b){return!!a.data(b,e)},a[i]=a[i]||{},f=a[i][b],g=a[i][b]=function(a,b){if(!this._createwidget)return new g(a,b);arguments.length&&this._createwidget(a,b)},a.extend(g,f,{version:d.version,_proto:a.extend({},d),_childconstructors:[]}),h=new c,h.options=a.widget.extend({},h.options),a.each(d,function(b,e){a.isfunction(e)&&(d[b]=function(){var a=function(){return c.prototype[b].apply(this,arguments)},d=function(a){return c.prototype[b].apply(this,a)};return function(){var b=this._super,c=this._superapply,f;return this._super=a,this._superapply=d,f=e.apply(this,arguments),this._super=b,this._superapply=c,f}}())}),g.prototype=a.widget.extend(h,{widgeteventprefix:f?h.widgeteventprefix:b},d,{constructor:g,namespace:i,widgetname:b,widgetfullname:e}),f?(a.each(f._childconstructors,function(b,c){var d=c.prototype;a.widget(d.namespace+"."+d.widgetname,g,c._proto)}),delete f._childconstructors):c._childconstructors.push(g),a.widget.bridge(b,g)},a.widget.extend=function(c){var e=d.call(arguments,1),f=0,g=e.length,h,i;for(;f",options:{disabled:!1,create:null},_createwidget:function(b,d){d=a(d||this.defaultelement||this)[0],this.element=a(d),this.uuid=c++,this.eventnamespace="."+this.widgetname+this.uuid,this.options=a.widget.extend({},this.options,this._getcreateoptions(),b),this.bindings=a(),this.hoverable=a(),this.focusable=a(),d!==this&&(a.data(d,this.widgetfullname,this),this._on(!0,this.element,{remove:function(a){a.target===d&&this.destroy()}}),this.document=a(d.style?d.ownerdocument:d.document||d),this.window=a(this.document[0].defaultview||this.document[0].parentwindow)),this._create(),this._trigger("create",null,this._getcreateeventdata()),this._init()},_getcreateoptions:a.noop,_getcreateeventdata:a.noop,_create:a.noop,_init:a.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventnamespace).removedata(this.widgetname).removedata(this.widgetfullname).removedata(a.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:a.noop,widget:function(){return this.element},option:function(c,d){var e=c,f,g,h;if(arguments.length===0)return a.widget.extend({},this.options);if(typeof c=="string"){e={},f=c.split("."),c=f.shift();if(f.length){g=e[c]=a.widget.extend({},this.options[c]);for(h=0;h-1&&(l=f.slice(h),f=f.slice(0,h)),e=d.makeurlabsolute(f,b),g=this.parseurl(e).search;if(i){if(d.ispath(k)||k.replace("#","").indexof(this.uistatekey)===0)k="";l&&k.indexof(this.uistatekey)===-1&&(k+=l),k.indexof("#")===-1&&k!==""&&(k="#"+k),e=d.parseurl(e),e=e.protocol+"//"+e.host+e.pathname+g+k}else e+=e.indexof("#")>-1?l:"#"+l;return e},ispreservablehash:function(a){return a.replace("#","").indexof(this.uistatekey)===0}},d.documenturl=d.parselocation(),f=a("head").find("base"),d.documentbase=f.length?d.parseurl(d.makeurlabsolute(f.attr("href"),d.documenturl.href)):d.documenturl,d.documentbasediffers=d.documenturl.hrefnohash!==d.documentbase.hrefnohash,d.getdocumenturl=function(b){return b?a.extend({},d.documenturl):d.documenturl.href},d.getdocumentbase=function(b){return b?a.extend({},d.documentbase):d.documentbase.href}}(a),function(a,b){var c=a.mobile.path;a.mobile.history=function(a,b){this.stack=a||[],this.activeindex=b||0},a.extend(a.mobile.history.prototype,{getactive:function(){return this.stack[this.activeindex]},getlast:function(){return this.stack[this.previousindex]},getnext:function(){return this.stack[this.activeindex+1]},getprev:function(){return this.stack[this.activeindex-1]},add:function(a,b){b=b||{},this.getnext()&&this.clearforward(),b.hash&&b.hash.indexof("#")===-1&&(b.hash="#"+b.hash),b.url=a,this.stack.push(b),this.activeindex=this.stack.length-1},clearforward:function(){this.stack=this.stack.slice(0,this.activeindex+1)},find:function(a,b,c){b=b||this.stack;var d,e,f=b.length,g;for(e=0;ee?(c.present||c.forward||a.noop)(this.getactive(),"forward"):d===b&&c.missing&&c.missing(this.getactive())}})}(a),function(a,d){var e=a.mobile.path;a.mobile.navigator=function(b){this.history=b,this.ignoreinitialhashchange=!0,settimeout(a.proxy(function(){this.ignoreinitialhashchange=!1},this),200),a.mobile.window.bind({"popstate.history":a.proxy(this.popstate,this),"hashchange.history":a.proxy(this.hashchange,this)})},a.extend(a.mobile.navigator.prototype,{squash:function(d,f){var g,h,i=e.ispath(d)?e.striphash(d):d;return h=e.squash(d),g=a.extend({hash:i,url:h},f),b.history.replacestate(g,g.title||c.title,h),g},hash:function(a,b){var c,d,f;c=e.parseurl(a),d=e.parselocation();if(d.pathname+d.search===c.pathname+c.search)f=c.hash?c.hash:c.pathname+c.search;else if(e.ispath(a)){var g=e.parseurl(b);f=g.pathname+g.search+(e.ispreservablehash(g.hash)?g.hash.replace("#",""):"")}else f=a;return f},go:function(d,f,g){var h,i,j,k,l=a.event.special.navigate.ispushstateenabled();i=e.squash(d),j=this.hash(d,i),g&&j!==e.striphash(e.parselocation().hash)&&(this.preventnexthashchange=g),this.preventhashassignpopstate=!0,b.location.hash=j,this.preventhashassignpopstate=!1,h=a.extend({url:i,hash:j,title:c.title},f),l&&(k=new a.event("popstate"),k.originalevent={type:"popstate",state:null},this.squash(d,h),g||(this.ignorepopstate=!0,a.mobile.window.trigger(k))),this.history.add(h.url,h)},popstate:function(b){var c,d,f,g;if(!a.event.special.navigate.ispushstateenabled())return;if(this.preventhashassignpopstate){this.preventhashassignpopstate=!1,b.stopimmediatepropagation();return}if(this.ignorepopstate){this.ignorepopstate=!1;return}if(!b.originalevent.state&&this.history.stack.length===1&&this.ignoreinitialhashchange){this.ignoreinitialhashchange=!1;return}d=e.parselocation().hash;if(!b.originalevent.state&&d){f=this.squash(d),this.history.add(f.url,f),b.historystate=f;return}this.history.direct({url:(b.originalevent.state||{}).url||d,present:function(c,d){b.historystate=a.extend({},c),b.historystate.direction=d}})},hashchange:function(b){var d,f;if(!a.event.special.navigate.ishashchangeenabled()||a.event.special.navigate.ispushstateenabled())return;if(this.preventnexthashchange){this.preventnexthashchange=!1,b.stopimmediatepropagation();return}d=this.history,f=e.parselocation().hash,this.history.direct({url:f,present:function(c,d){b.hashchangestate=a.extend({},c),b.hashchangestate.direction=d},missing:function(){d.add(f,{hash:f,title:c.title})}})}})}(a),function(a,b){a.mobile.navigate=function(b,c,d){a.mobile.navigate.navigator.go(b,c,d)},a.mobile.navigate.history=new a.mobile.history,a.mobile.navigate.navigator=new a.mobile.navigator(a.mobile.navigate.history);var c=a.mobile.path.parselocation();a.mobile.navigate.history.add(c.href,{hash:c.hash})}(a),function(a,b){a.mobile.behaviors.addfirstlastclasses={_getvisibles:function(a,b){var c;return b?c=a.not(".ui-screen-hidden"):(c=a.filter(":visible"),c.length===0&&(c=a.not(".ui-screen-hidden"))),c},_addfirstlastclasses:function(a,b,c){a.removeclass("ui-first-child ui-last-child"),b.eq(0).addclass("ui-first-child").end().last().addclass("ui-last-child"),c||this.element.trigger("updatelayout")}}}(a),function(a,b){a.widget("mobile.collapsible",a.mobile.widget,{options:{expandcuetext:" click to expand contents",collapsecuetext:" click to collapse contents",collapsed:!0,heading:"h1,h2,h3,h4,h5,h6,legend",collapsedicon:"plus",expandedicon:"minus",iconpos:"left",theme:null,contenttheme:null,inset:!0,corners:!0,mini:!1,initselector:":jqmdata(role='collapsible')"},_create:function(){var c=this.element,d=this.options,e=c.addclass("ui-collapsible"),f=c.children(d.heading).first(),g=e.wrapinner("
").children(".ui-collapsible-content"),h=c.closest(":jqmdata(role='collapsible-set')").addclass("ui-collapsible-set"),i="";f.is("legend")&&(f=a(""+f.html()+"
").insertbefore(f),f.next().remove()),h.length?(d.theme||(d.theme=h.jqmdata("theme")||a.mobile.getinheritedtheme(h,"c")),d.contenttheme||(d.contenttheme=h.jqmdata("content-theme")),d.collapsedicon=c.jqmdata("collapsed-icon")||h.jqmdata("collapsed-icon")||d.collapsedicon,d.expandedicon=c.jqmdata("expanded-icon")||h.jqmdata("expanded-icon")||d.expandedicon,d.iconpos=c.jqmdata("iconpos")||h.jqmdata("iconpos")||d.iconpos,h.jqmdata("inset")!==b?d.inset=h.jqmdata("inset"):d.inset=!0,d.corners=!1,d.mini||(d.mini=h.jqmdata("mini"))):d.theme||(d.theme=a.mobile.getinheritedtheme(c,"c")),!d.inset||(i+=" ui-collapsible-inset",!d.corners||(i+=" ui-corner-all")),d.contenttheme&&(i+=" ui-collapsible-themed-content",g.addclass("ui-body-"+d.contenttheme)),i!==""&&e.addclass(i),f.insertbefore(g).addclass("ui-collapsible-heading").append(" ").wrapinner(" ").find("a").first().buttonmarkup({shadow:!1,corners:!1,iconpos:d.iconpos,icon:d.collapsedicon,mini:d.mini,theme:d.theme}),e.bind("expand collapse",function(b){if(!b.isdefaultprevented()){var c=a(this),e=b.type==="collapse";b.preventdefault(),f.toggleclass("ui-collapsible-heading-collapsed",e).find(".ui-collapsible-heading-status").text(e?d.expandcuetext:d.collapsecuetext).end().find(".ui-icon").toggleclass("ui-icon-"+d.expandedicon,!e).toggleclass("ui-icon-"+d.collapsedicon,e||d.expandedicon===d.collapsedicon).end().find("a").first().removeclass(a.mobile.activebtnclass),c.toggleclass("ui-collapsible-collapsed",e),g.toggleclass("ui-collapsible-content-collapsed",e).attr("aria-hidden",e),g.trigger("updatelayout")}}).trigger(d.collapsed?"collapse":"expand"),f.bind("tap",function(b){f.find("a").first().addclass(a.mobile.activebtnclass)}).bind("click",function(a){var b=f.is(".ui-collapsible-heading-collapsed")?"expand":"collapse";e.trigger(b),a.preventdefault(),a.stoppropagation()})}}),a.mobile.document.bind("pagecreate create",function(b){a.mobile.collapsible.prototype.enhancewithin(b.target)})}(a),function(a,b){a.widget("mobile.collapsibleset",a.mobile.widget,{options:{initselector:":jqmdata(role='collapsible-set')"},_create:function(){var c=this.element.addclass("ui-collapsible-set"),d=this.options;d.theme||(d.theme=a.mobile.getinheritedtheme(c,"c")),d.contenttheme||(d.contenttheme=c.jqmdata("content-theme")),d.corners||(d.corners=c.jqmdata("corners")),c.jqmdata("inset")!==b&&(d.inset=c.jqmdata("inset")),d.inset=d.inset!==b?d.inset:!0,d.corners=d.corners!==b?d.corners:!0,!!d.corners&&!!d.inset&&c.addclass("ui-corner-all"),c.jqmdata("collapsiblebound")||c.jqmdata("collapsiblebound",!0).bind("expand",function(b){var c=a(b.target).closest(".ui-collapsible");c.parent().is(":jqmdata(role='collapsible-set')")&&c.siblings(".ui-collapsible").trigger("collapse")})},_init:function(){var a=this.element,b=a.children(":jqmdata(role='collapsible')"),c=b.filter(":jqmdata(collapsed='false')");this._refresh("true"),c.trigger("expand")},_refresh:function(b){var c=this.element.children(":jqmdata(role='collapsible')");a.mobile.collapsible.prototype.enhance(c.not(".ui-collapsible")),this._addfirstlastclasses(c,this._getvisibles(c,b),b)},refresh:function(){this._refresh(!1)}}),a.widget("mobile.collapsibleset",a.mobile.collapsibleset,a.mobile.behaviors.addfirstlastclasses),a.mobile.document.bind("pagecreate create",function(b){a.mobile.collapsibleset.prototype.enhancewithin(b.target)})}(a),function(a,b){a.extend(a.mobile,{loadingmessagetextvisible:d,loadingmessagetheme:d,loadingmessage:d,showpageloadingmsg:function(b,c,d){a.mobile.loading("show",b,c,d)},hidepageloadingmsg:function(){a.mobile.loading("hide")},loading:function(){this.loaderwidget.loader.apply(this.loaderwidget,arguments)}});var c="ui-loader",e=a("html"),f=a.mobile.window;a.widget("mobile.loader",{options:{theme:"a",textvisible:!1,html:"",text:"loading"},defaulthtml:""+" "+"
"+"
",fakefixloader:function(){var b=a("."+a.mobile.activebtnclass).first();this.element.css({top:a.support.scrolltop&&f.scrolltop()+f.height()/2||b.length&&b.offset().top||100})},checkloaderposition:function(){var b=this.element.offset(),c=f.scrolltop(),d=a.mobile.getscreenheight();if(b.topd)this.element.addclass("ui-loader-fakefix"),this.fakefixloader(),f.unbind("scroll",this.checkloaderposition).bind("scroll",a.proxy(this.fakefixloader,this))},resethtml:function(){this.element.html(a(this.defaulthtml).html())},show:function(b,g,h){var i,j,k,l;this.resethtml(),a.type(b)==="object"?(l=a.extend({},this.options,b),b=l.theme||a.mobile.loadingmessagetheme):(l=this.options,b=b||a.mobile.loadingmessagetheme||l.theme),j=g||a.mobile.loadingmessage||l.text,e.addclass("ui-loading");if(a.mobile.loadingmessage!==!1||l.html)a.mobile.loadingmessagetextvisible!==d?i=a.mobile.loadingmessagetextvisible:i=l.textvisible,this.element.attr("class",c+" ui-corner-all ui-body-"+b+" ui-loader-"+(i||g||b.text?"verbose":"default")+(l.textonly||h?" ui-loader-textonly":"")),l.html?this.element.html(l.html):this.element.find("h1").text(j),this.element.appendto(a.mobile.pagecontainer),this.checkloaderposition(),f.bind("scroll",a.proxy(this.checkloaderposition,this))},hide:function(){e.removeclass("ui-loading"),a.mobile.loadingmessage&&this.element.removeclass("ui-loader-fakefix"),a.mobile.window.unbind("scroll",this.fakefixloader),a.mobile.window.unbind("scroll",this.checkloaderposition)}}),f.bind("pagecontainercreate",function(){a.mobile.loaderwidget=a.mobile.loaderwidget||a(a.mobile.loader.prototype.defaulthtml).loader()})}(a,this),function(a,b){a.widget("mobile.navbar",a.mobile.widget,{options:{iconpos:"top",grid:null,initselector:":jqmdata(role='navbar')"},_create:function(){var d=this.element,e=d.find("a"),f=e.filter(":jqmdata(icon)").length?this.options.iconpos:b;d.addclass("ui-navbar ui-mini").attr("role","navigation").find("ul").jqmenhanceable().grid({grid:this.options.grid}),e.buttonmarkup({corners:!1,shadow:!1,inline:!0,iconpos:f}),d.delegate("a","vclick",function(b){if(!a(b.target).hasclass("ui-disabled")){e.removeclass(a.mobile.activebtnclass),a(this).addclass(a.mobile.activebtnclass);var d=a(this);a(c).one("pagechange",function(b){d.removeclass(a.mobile.activebtnclass)})}}),d.closest(".ui-page").bind("pagebeforeshow",function(){e.filter(".ui-state-persist").addclass(a.mobile.activebtnclass)})}}),a.mobile.document.bind("pagecreate create",function(b){a.mobile.navbar.prototype.enhancewithin(b.target)})}(a),function(a,b){a.widget("mobile.page",a.mobile.widget,{options:{theme:"c",domcache:!1,keepnativedefault:":jqmdata(role='none'), :jqmdata(role='nojs')"},_create:function(){if(this._trigger("beforecreate")===!1)return!1;this.element.attr("tabindex","0").addclass("ui-page ui-body-"+this.options.theme),this._on(this.element,{pagebeforehide:"removecontainerbackground",pagebeforeshow:"_handlepagebeforeshow"})},_handlepagebeforeshow:function(a){this.setcontainerbackground()},removecontainerbackground:function(){a.mobile.pagecontainer.removeclass("ui-overlay-"+a.mobile.getinheritedtheme(this.element.parent()))},setcontainerbackground:function(b){this.options.theme&&a.mobile.pagecontainer.addclass("ui-overlay-"+(b||this.options.theme))},keepnativeselector:function(){var b=this.options,c=b.keepnative&&a.trim(b.keepnative);return c&&b.keepnative!==b.keepnativedefault?[b.keepnative,b.keepnativedefault].join(", "):b.keepnativedefault}})}(a),function(a,b){a.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},a.mobile.document.bind("pagecreate create",function(b){var c=a.mobile.closestpagedata(a(b.target)),d;if(!c)return;d=c.options,a(b.target).find("input").not(c.keepnativeselector()).each(function(){var b=a(this),c=this.getattribute("type"),e=d.degradeinputs[c]||"text";if(d.degradeinputs[c]){var f=a("").html(b.clone()).html(),g=f.indexof(" type=")>-1,h=g?/\s+type=["']?\w+['"]?/:/\/?>/,i=' type="'+e+'" data-'+a.mobile.ns+'type="'+c+'"'+(g?"":">");b.replacewith(f.replace(h,i))}})})}(a),function(a,b){a.widget("mobile.textinput",a.mobile.widget,{options:{theme:null,mini:!1,preventfocuszoom:/iphone|ipad|ipod/.test(navigator.platform)&&navigator.useragent.indexof("applewebkit")>-1,initselector:"input[type='text'], input[type='search'], :jqmdata(type='search'), input[type='number'], :jqmdata(type='number'), input[type='password'], input[type='email'], input[type='url'], input[type='tel'], textarea, input[type='time'], input[type='date'], input[type='month'], input[type='week'], input[type='datetime'], input[type='datetime-local'], input[type='color'], input:not([type]), input[type='file']",clearbtn:!1,clearsearchbuttontext:null,clearbtntext:"clear text",disabled:!1},_create:function(){function o(){settimeout(function(){j.toggleclass("ui-input-clear-hidden",!c.val())},0)}var b=this,c=this.element,d=this.options,e=d.theme||a.mobile.getinheritedtheme(this.element,"c"),f=" ui-body-"+e,g=d.mini?" ui-mini":"",h=c.is("[type='search'], :jqmdata(type='search')"),i,j,k=d.clearsearchbuttontext||d.clearbtntext,l=c.is("textarea, :jqmdata(type='range')"),m=!!d.clearbtn&&!l,n=c.is("input")&&!c.is(":jqmdata(type='range')");a("label[for='"+c.attr("id")+"']").addclass("ui-input-text"),i=c.addclass("ui-input-text ui-body-"+e),typeof c[0].autocorrect!="undefined"&&!a.support.touchoverflow&&(c[0].setattribute("autocorrect","off"),c[0].setattribute("autocomplete","off")),h?i=c.wrap("
").parent():n&&(i=c.wrap("
").parent()),m||h?(j=a("
"+k+" ").bind("click",function(a){c.val("").focus().trigger("change"),j.addclass("ui-input-clear-hidden"),a.preventdefault()}).appendto(i).buttonmarkup({icon:"delete",iconpos:"notext",corners:!0,shadow:!0,mini:d.mini}),h||i.addclass("ui-input-has-clear"),o(),c.bind("paste cut keyup input focus change blur",o)):!n&&!h&&c.addclass("ui-corner-all ui-shadow-inset"+f+g),c.focus(function(){d.preventfocuszoom&&a.mobile.zoom.disable(!0),i.addclass(a.mobile.focusclass)}).blur(function(){i.removeclass(a.mobile.focusclass),d.preventfocuszoom&&a.mobile.zoom.enable(!0)});if(c.is("textarea")){var p=15,q=100,r;this._keyup=function(){var a=c[0].scrollheight,b=c[0].clientheight;b
0&&a.mobile.changepage.apply(null,n.pop())}function b(b,c,d,e){c&&c.data("mobile-page")._trigger("beforehide",null,{nextpage:b}),b.data("mobile-page")._trigger("beforeshow",null,{prevpage:c||a("")}),a.mobile.hidepageloadingmsg(),d=a.mobile._maybedegradetransition(d);var f=a.mobile.transitionhandlers[d||"default"]||a.mobile.defaulttransitionhandler,g=f(d,e,b,c);return g.done(function(){c&&c.data("mobile-page")._trigger("hide",null,{nextpage:b}),b.data("mobile-page")._trigger("show",null,{prevpage:c||a("")})}),g}function c(b,c){c&&b.attr("data-"+a.mobile.ns+"role",c),b.page()}function d(){var b=a.mobile.activepage&&f(a.mobile.activepage);return b||s.hrefnohash}function e(a){while(a){if(typeof a.nodename=="string"&&a.nodename.tolowercase()==="a")break;a=a.parentnode}return a}function f(b){var c=a(b).closest(".ui-page").jqmdata("url"),d=s.hrefnohash;if(!c||!h.ispath(c))c=d;return h.makeurlabsolute(c,d)}var e=a.mobile.window,f=a("html"),g=a("head"),h=a.extend(a.mobile.path,{getfilepath:function(b){var c="&"+a.mobile.subpageurlkey;return b&&b.split(c)[0].split(p)[0]},isfirstpageurl:function(b){var c=h.parseurl(h.makeurlabsolute(b,this.documentbase)),e=c.hrefnohash===this.documenturl.hrefnohash||this.documentbasediffers&&c.hrefnohash===this.documentbase.hrefnohash,f=a.mobile.firstpage,g=f&&f[0]?f[0].id:d;return e&&(!c.hash||c.hash==="#"||g&&c.hash.replace(/^#/,"")===g)},ispermittedcrossdomainrequest:function(b,c){return a.mobile.allowcrossdomainpages&&b.protocol==="file:"&&c.search(/^https?:/)!==-1}}),i=null,j=null,k=a.deferred(),l=a.mobile.navigate.history,m="[tabindex],a,button:visible,select:visible,input",n=[],o=!1,p="&ui-state=dialog",q=g.children("base"),r=h.documenturl,s=h.documentbase,t=h.documentbasediffers,u=a.mobile.getscreenheight,v=a.support.dynamicbasetag?{element:q.length?q:a(" ",{href:s.hrefnohash}).prependto(g),set:function(a){a=h.parseurl(a).hrefnohash,v.element.attr("href",h.makeurlabsolute(a,s))},reset:function(){v.element.attr("href",s.hrefnosearch)}}:d;a.mobile.getdocumenturl=h.getdocumenturl,a.mobile.getdocumentbase=h.getdocumentbase,a.mobile.back=function(){var a=b.navigator;this.phonegapnavigationenabled&&a&&a.app&&a.app.backhistory?a.app.backhistory():b.history.back()},a.mobile.focuspage=function(a){var b=a.find("[autofocus]"),c=a.find(".ui-title:eq(0)");if(b.length){b.focus();return}c.length?c.focus():a.focus()};var y=!0,z,a;z=function(){if(!y)return;var b=a.mobile.urlhistory.getactive();if(b){var c=e.scrolltop();b.lastscroll=c "),r=d.match(/]*>([^<]*)/)&®exp.$1,s=new regexp("(<[^>]+\\bdata-"+a.mobile.ns+"role=[\"']?page[\"']?[^>]*>)"),t=new regexp("\\bdata-"+a.mobile.ns+"url=[\"']?([^\"'>]*)[\"']?");s.test(d)&®exp.$1&&t.test(regexp.$1)&®exp.$1&&(b=k=h.getfilepath(a(""+regexp.$1+"
").text())),v&&v.set(k),p.get(0).innerhtml=d,g=p.find(":jqmdata(role='page'), :jqmdata(role='dialog')").first(),g.length||(g=a(""+(d.split(/<\/?body[^>]*>/gmi)[1]||"")+"
")),r&&!g.jqmdata("title")&&(~r.indexof("&")&&(r=a(""+r+"
").text()),g.jqmdata("title",r));if(!a.support.dynamicbasetag){var u=h.get(k);g.find("[src], link[href], a[rel='external'], :jqmdata(ajax='false'), a[target]").each(function(){var b=a(this).is("[href]")?"href":a(this).is("[src]")?"src":"action",c=a(this).attr(b);c=c.replace(location.protocol+"//"+location.host+location.pathname,""),/^(\w+:|#|\/)/.test(c)||a(this).attr(b,u+c)})}g.attr("data-"+a.mobile.ns+"url",h.converturltodataurl(k)).attr("data-"+a.mobile.ns+"external-page",!0).appendto(f.pagecontainer),g.one("pagecreate",a.mobile._bindpageremove),c(g,f.role),j.indexof("&"+a.mobile.subpageurlkey)>-1&&(g=f.pagecontainer.children("[data-"+a.mobile.ns+"url='"+l+"']")),f.showloadmsg&&q(),o.xhr=n,o.textstatus=m,o.page=g,f.pagecontainer.trigger("pageload",o),e.resolve(j,c,g,i)},error:function(b,d,g){v&&v.set(h.get()),o.xhr=b,o.textstatus=d,o.errorthrown=g;var i=new a.event("pageloadfailed");f.pagecontainer.trigger(i,o);if(i.isdefaultprevented())return;f.showloadmsg&&(q(),a.mobile.showpageloadingmsg(a.mobile.pageloaderrormessagetheme,a.mobile.pageloaderrormessage,!0),settimeout(a.mobile.hidepageloadingmsg,1500)),e.reject(j,c)}}),e.promise()},a.mobile.loadpage.defaults={type:"get",data:d,reloadpage:!1,role:d,showloadmsg:!1,pagecontainer:d,loadmsgdelay:50},a.mobile.changepage=function(b,e){if(o){n.unshift(arguments);return}var f=a.extend({},a.mobile.changepage.defaults,e),g;f.pagecontainer=f.pagecontainer||a.mobile.pagecontainer,f.frompage=f.frompage||a.mobile.activepage,g=typeof b=="string";var i=f.pagecontainer,j=new a.event("pagebeforechange"),k={topage:b,options:f};g?k.absurl=h.makeurlabsolute(b,d()):k.absurl=b.data("absurl"),i.trigger(j,k);if(j.isdefaultprevented())return;b=k.topage,g=typeof b=="string",o=!0;if(g){f.target=b,a.mobile.loadpage(b,f).done(function(b,c,d,e){o=!1,c.duplicatecachedpage=e,d.data("absurl",k.absurl),a.mobile.changepage(d,c)}).fail(function(a,b){o=!1,w(!0),x(),f.pagecontainer.trigger("pagechangefailed",k)});return}b[0]===a.mobile.firstpage[0]&&!f.dataurl&&(f.dataurl=r.hrefnohash);var m=f.frompage,q=f.dataurl&&h.converturltodataurl(f.dataurl)||b.jqmdata("url"),s=q,t=h.getfilepath(q),u=l.getactive(),v=l.activeindex===0,y=0,z=c.title,a=f.role==="dialog"||b.jqmdata("role")==="dialog";if(m&&m[0]===b[0]&&!f.allowsamepagetransition){o=!1,i.trigger("pagechange",k),f.fromhashchange&&l.direct({url:q});return}c(b,f.role),f.fromhashchange&&(y=e.direction==="back"?-1:1);try{c.activeelement&&c.activeelement.nodename.tolowercase()!=="body"?a(c.activeelement).blur():a("input:focus, textarea:focus, select:focus").blur()}catch(e){}var f=!1;a&&u&&(u.url&&u.url.indexof(p)>-1&&a.mobile.activepage&&!a.mobile.activepage.is(".ui-dialog")&&l.activeindex>0&&(f.changehash=!1,f=!0),q=u.url||"",!f&&q.indexof("#")>-1?q+=p:q+="#"+p,l.activeindex===0&&q===l.initialdst&&(q+=p));var g=u?b.jqmdata("title")||b.children(":jqmdata(role='header')").find(".ui-title").getencodedtext():z;!!g&&z===c.title&&(z=g),b.jqmdata("title")||b.jqmdata("title",z),f.transition=f.transition||(y&&!v?u.transition:d)||(a?a.mobile.defaultdialogtransition:a.mobile.defaultpagetransition),!y&&f&&(l.getactive().pageurl=s);if(q&&!f.fromhashchange){var h;!h.ispath(q)&&q.indexof("#")<0&&(q="#"+q),h={transition:f.transition,title:z,pageurl:s,role:f.role},f.changehash!==!1&&a.mobile.hashlisteningenabled?a.mobile.navigate(q,h,!0):b[0]!==a.mobile.firstpage[0]&&a.mobile.navigate.history.add(q,h)}c.title=z,a.mobile.activepage=b,f.reverse=f.reverse||y<0,b(b,m,f.transition,f.reverse).done(function(c,d,e,g,h){w(),f.duplicatecachedpage&&f.duplicatecachedpage.remove(),h||a.mobile.focuspage(b),x(),i.trigger("pagechange",k)})},a.mobile.changepage.defaults={transition:d,reverse:!1,changehash:!0,fromhashchange:!1,role:d,duplicatecachedpage:d,pagecontainer:d,showloadmsg:!0,dataurl:d,frompage:d,allowsamepagetransition:!1},a.mobile.navreadydeferred=a.deferred(),a.mobile._registerinternalevents=function(){var c=function(b,c){var d,e,f,g=!0,j,k;return!a.mobile.ajaxenabled||b.is(":jqmdata(ajax='false')")||!b.jqmhijackable().length?!1:(e=b.attr("target"),f=b.attr("action"),f||(f=f(b),f===s.hrefnohash&&(f=r.hrefnosearch)),f=h.makeurlabsolute(f,f(b)),h.isexternal(f)&&!h.ispermittedcrossdomainrequest(r,f)||e?!1:(c||(d=b.attr("method"),j=b.serializearray(),i&&i[0].form===b[0]&&(k=i.attr("name"),k&&(a.each(j,function(a,b){if(b.name===k)return k="",!1}),k&&j.push({name:k,value:i.attr("value")}))),g={url:f,options:{type:d&&d.length&&d.tolowercase()||"get",data:a.param(j),transition:b.jqmdata("transition"),reverse:b.jqmdata("direction")==="reverse",reloadpage:!0}}),g))};a.mobile.document.delegate("form","submit",function(b){var d=c(a(this));d&&(a.mobile.changepage(d.url,d.options),b.preventdefault())}),a.mobile.document.bind("vclick",function(b){var d,e,f=b.target,g=!1;if(b.which>1||!a.mobile.linkbindingenabled)return;i=a(f);if(a.data(f,"mobile-button")){if(!c(a(f).closest("form"),!0))return;f.parentnode&&(f=f.parentnode)}else{f=e(f);if(!f||h.parseurl(f.getattribute("href")||"#").hash==="#")return;if(!a(f).jqmhijackable().length)return}~f.classname.indexof("ui-link-inherit")?f.parentnode&&(e=a.data(f.parentnode,"buttonelements")):e=a.data(f,"buttonelements"),e?f=e.outer:g=!0,d=a(f),g&&(d=d.closest(".ui-btn")),d.length>0&&!d.hasclass("ui-disabled")&&(w(!0),j=d,j.addclass(a.mobile.activebtnclass))}),a.mobile.document.bind("click",function(c){if(!a.mobile.linkbindingenabled||c.isdefaultprevented())return;var e=e(c.target),f=a(e),g;if(!e||c.which>1||!f.jqmhijackable().length)return;g=function(){b.settimeout(function(){w(!0)},200)};if(f.is(":jqmdata(rel='back')"))return a.mobile.back(),!1;var i=f(f),j=h.makeurlabsolute(f.attr("href")||"#",i);if(!a.mobile.ajaxenabled&&!h.isembeddedpage(j)){g();return}if(j.search("#")!==-1){j=j.replace(/[^#]*#/,"");if(!j){c.preventdefault();return}h.ispath(j)?j=h.makeurlabsolute(j,i):j=h.makeurlabsolute("#"+j,r.hrefnohash)}var k=f.is("[rel='external']")||f.is(":jqmdata(ajax='false')")||f.is("[target]"),l=k||h.isexternal(j)&&!h.ispermittedcrossdomainrequest(r,j);if(l){g();return}var m=f.jqmdata("transition"),n=f.jqmdata("direction")==="reverse"||f.jqmdata("back"),o=f.attr("data-"+a.mobile.ns+"rel")||d;a.mobile.changepage(j,{transition:m,reverse:n,role:o,link:f}),c.preventdefault()}),a.mobile.document.delegate(".ui-page","pageshow.prefetch",function(){var b=[];a(this).find("a:jqmdata(prefetch)").each(function(){var c=a(this),d=c.attr("href");d&&a.inarray(d,b)===-1&&(b.push(d),a.mobile.loadpage(d,{role:c.attr("data-"+a.mobile.ns+"rel")}))})}),a.mobile._handlehashchange=function(c,e){var f=h.striphash(c),g=a.mobile.urlhistory.stack.length===0?"none":d,i={changehash:!1,fromhashchange:!0,reverse:e.direction==="back"};a.extend(i,e,{transition:(l.getlast()||{}).transition||g});if(l.activeindex>0&&f.indexof(p)>-1&&l.initialdst!==f){if(a.mobile.activepage&&!a.mobile.activepage.is(".ui-dialog")){e.direction==="back"?a.mobile.back():b.history.forward();return}f=e.pageurl;var j=a.mobile.urlhistory.getactive();a.extend(i,{role:j.role,transition:j.transition,reverse:e.direction==="back"})}f?(f=h.ispath(f)?f:h.makeurlabsolute("#"+f,s),f===h.makeurlabsolute("#"+l.initialdst,s)&&l.stack.length&&l.stack[0].url!==l.initialdst.replace(p,"")&&(f=a.mobile.firstpage),a.mobile.changepage(f,i)):a.mobile.changepage(a.mobile.firstpage,i)},e.bind("navigate",function(b,c){var d=a.event.special.navigate.originaleventname.indexof("hashchange")>-1?c.state.hash:c.state.url;d||(d=a.mobile.path.parselocation().hash);if(!d||d==="#"||d.indexof("#"+a.mobile.path.uistatekey)===0)d=location.href;a.mobile._handlehashchange(d,c.state)}),a.mobile.document.bind("pageshow",a.mobile.resetactivepageheight),a.mobile.window.bind("throttledresize",a.mobile.resetactivepageheight)},a(function(){k.resolve()}),a.when(k,a.mobile.navreadydeferred).done(function(){a.mobile._registerinternalevents()})}(a),function(a,b,c){a.widget("mobile.dialog",a.mobile.widget,{options:{closebtn:"left",closebtntext:"close",overlaytheme:"a",corners:!0,initselector:":jqmdata(role='dialog')"},_handlepagebeforeshow:function(){this._iscloseable=!0,this.options.overlaytheme&&this.element.page("removecontainerbackground").page("setcontainerbackground",this.options.overlaytheme)},_create:function(){var b=this,c=this.element,d=this.options.corners?" ui-corner-all":"",e=a("
",{role:"dialog","class":"ui-dialog-contain ui-overlay-shadow"+d});c.addclass("ui-dialog ui-overlay-"+this.options.overlaytheme),c.wrapinner(e),c.bind("vclick submit",function(b){var c=a(b.target).closest(b.type==="vclick"?"a":"form"),d;c.length&&!c.jqmdata("transition")&&(d=a.mobile.urlhistory.getactive()||{},c.attr("data-"+a.mobile.ns+"transition",d.transition||a.mobile.defaultdialogtransition).attr("data-"+a.mobile.ns+"direction","reverse"))}),this._on(c,{pagebeforeshow:"_handlepagebeforeshow"}),a.extend(this,{_createcomplete:!1}),this._setclosebtn(this.options.closebtn)},_setclosebtn:function(b){var c=this,d,e;this._headerclosebutton&&(this._headerclosebutton.remove(),this._headerclosebutton=null),b!=="none"&&(e=b==="left"?"left":"right",d=a(""+this.options.closebtntext+" "),this.element.children().find(":jqmdata(role='header')").first().prepend(d),this._createcomplete&&a.fn.buttonmarkup&&d.buttonmarkup(),this._createcomplete=!0,d.bind("click",function(){c.close()}),this._headerclosebutton=d)},_setoption:function(b,c){b==="closebtn"&&(this._setclosebtn(c),this._super(b,c),this.element.attr("data-"+(a.mobile.ns||"")+"close-btn",c))},close:function(){var b,c,d=a.mobile.navigate.history;this._iscloseable&&(this._iscloseable=!1,a.mobile.hashlisteningenabled&&d.activeindex>0?a.mobile.back():(b=math.max(0,d.activeindex-1),c=d.stack[b].pageurl||d.stack[b].url,d.previousindex=d.activeindex,d.activeindex=b,a.mobile.path.ispath(c)||(c=a.mobile.path.makeurlabsolute("#"+c)),a.mobile.changepage(c,{direction:"back",changehash:!1,fromhashchange:!0})))}}),a.mobile.document.delegate(a.mobile.dialog.prototype.options.initselector,"pagecreate",function(){a.mobile.dialog.prototype.enhance(this)})}(a,this),function(a,b){a.mobile.page.prototype.options.backbtntext="back",a.mobile.page.prototype.options.addbackbtn=!1,a.mobile.page.prototype.options.backbtntheme=null,a.mobile.page.prototype.options.headertheme="a",a.mobile.page.prototype.options.footertheme="a",a.mobile.page.prototype.options.contenttheme=null,a.mobile.document.bind("pagecreate",function(b){var c=a(b.target),d=c.data("mobile-page").options,e=c.jqmdata("role"),f=d.theme;a(":jqmdata(role='header'), :jqmdata(role='footer'), :jqmdata(role='content')",c).jqmenhanceable().each(function(){var b=a(this),g=b.jqmdata("role"),h=b.jqmdata("theme"),i=h||d.contenttheme||e==="dialog"&&f,j,k,l,m;b.addclass("ui-"+g);if(g==="header"||g==="footer"){var n=h||(g==="header"?d.headertheme:d.footertheme)||f;b.addclass("ui-bar-"+n).attr("role",g==="header"?"banner":"contentinfo"),g==="header"&&(j=b.children("a, button"),k=j.hasclass("ui-btn-left"),l=j.hasclass("ui-btn-right"),k=k||j.eq(0).not(".ui-btn-right").addclass("ui-btn-left").length,l=l||j.eq(1).addclass("ui-btn-right").length),d.addbackbtn&&g==="header"&&a(".ui-page").length>1&&c.jqmdata("url")!==a.mobile.path.striphash(location.hash)&&!k&&(m=a(""+d.backbtntext+" ").attr("data-"+a.mobile.ns+"theme",d.backbtntheme||n).prependto(b)),b.children("h1, h2, h3, h4, h5, h6").addclass("ui-title").attr({role:"heading","aria-level":"1"})}else g==="content"&&(i&&b.addclass("ui-body-"+i),b.attr("role","main"))})})}(a),function(a,b){a.widget("mobile.fixedtoolbar",a.mobile.widget,{options:{visibleonpageshow:!0,disablepagezoom:!0,transition:"slide",fullscreen:!1,taptoggle:!0,taptoggleblacklist:"a, button, input, select, textarea, .ui-header-fixed, .ui-footer-fixed, .ui-popup, .ui-panel, .ui-panel-dismiss-open",hideduringfocus:"input, textarea, select",updatepagepadding:!0,trackpersistenttoolbars:!0,supportblacklist:function(){return!a.support.fixedposition},initselector:":jqmdata(position='fixed')"},_create:function(){var b=this,c=b.options,d=b.element,e=d.is(":jqmdata(role='header')")?"header":"footer",f=d.closest(".ui-page");if(c.supportblacklist()){b.destroy();return}d.addclass("ui-"+e+"-fixed"),c.fullscreen?(d.addclass("ui-"+e+"-fullscreen"),f.addclass("ui-page-"+e+"-fullscreen")):f.addclass("ui-page-"+e+"-fixed"),a.extend(this,{_thispage:null}),b._addtransitionclass(),b._bindpageevents(),b._bindtogglehandlers()},_addtransitionclass:function(){var a=this.options.transition;a&&a!=="none"&&(a==="slide"&&(a=this.element.is(".ui-header")?"slidedown":"slideup"),this.element.addclass(a))},_bindpageevents:function(){this._thispage=this.element.closest(".ui-page"),this._on(this._thispage,{pagebeforeshow:"_handlepagebeforeshow",webkitanimationstart:"_handleanimationstart",animationstart:"_handleanimationstart",updatelayout:"_handleanimationstart",pageshow:"_handlepageshow",pagebeforehide:"_handlepagebeforehide"})},_handlepagebeforeshow:function(){var b=this.options;b.disablepagezoom&&a.mobile.zoom.disable(!0),b.visibleonpageshow||this.hide(!0)},_handleanimationstart:function(){this.options.updatepagepadding&&this.updatepagepadding(this._thispage)},_handlepageshow:function(){this.updatepagepadding(this._thispage),this.options.updatepagepadding&&this._on(a.mobile.window,{throttledresize:"updatepagepadding"})},_handlepagebeforehide:function(b,c){var d=this.options;d.disablepagezoom&&a.mobile.zoom.enable(!0),d.updatepagepadding&&this._off(a.mobile.window,"throttledresize");if(d.trackpersistenttoolbars){var e=a(".ui-footer-fixed:jqmdata(id)",this._thispage),f=a(".ui-header-fixed:jqmdata(id)",this._thispage),g=e.length&&c.nextpage&&a(".ui-footer-fixed:jqmdata(id='"+e.jqmdata("id")+"')",c.nextpage)||a(),h=f.length&&c.nextpage&&a(".ui-header-fixed:jqmdata(id='"+f.jqmdata("id")+"')",c.nextpage)||a();if(g.length||h.length)g.add(h).appendto(a.mobile.pagecontainer),c.nextpage.one("pageshow",function(){h.prependto(this),g.appendto(this)})}},_visible:!0,updatepagepadding:function(b){var c=this.element,d=c.is(".ui-header"),e=parsefloat(c.css(d?"top":"bottom"));if(this.options.fullscreen)return;b=b||this._thispage||c.closest(".ui-page"),a(b).css("padding-"+(d?"top":"bottom"),c.outerheight()+e)},_usetransition:function(b){var c=a.mobile.window,d=this.element,e=c.scrolltop(),f=d.height(),g=d.closest(".ui-page").height(),h=a.mobile.getscreenheight(),i=d.is(":jqmdata(role='header')")?"header":"footer";return!b&&(this.options.transition&&this.options.transition!=="none"&&(i==="header"&&!this.options.fullscreen&&e>f||i==="footer"&&!this.options.fullscreen&&e+h-1||b.indexof("ipad")>-1||b.indexof("ipod")>-1)e="ios";else{if(!(a.indexof("android")>-1))return;e="android"}if(e==="ios")f._bindscrollworkaround();else{if(!(e==="android"&&d&&d<534))return;f._bindscrollworkaround(),f._bindlistthumbworkaround()}},_viewportoffset:function(){var b=this.element,c=b.is(".ui-header"),d=math.abs(b.offset().top-a.mobile.window.scrolltop());return c||(d=math.round(d-a.mobile.window.height()+b.outerheight())-60),d},_bindscrollworkaround:function(){var b=this;this._on(a.mobile.window,{scrollstop:function(){var a=b._viewportoffset();a>2&&b._visible&&b._triggerredraw()}})},_bindlistthumbworkaround:function(){this.element.closest(".ui-page").addclass("ui-android-2x-fixed")},_triggerredraw:function(){var b=parsefloat(a(".ui-page-active").css("padding-bottom"));a(".ui-page-active").css("padding-bottom",b+1+"px"),settimeout(function(){a(".ui-page-active").css("padding-bottom",b+"px")},0)},destroy:function(){this._super(),this.element.closest(".ui-page-active").removeclass("ui-android-2x-fix")}})}(a),function(a,b){var d={};a.widget("mobile.listview",a.mobile.widget,{options:{theme:null,counttheme:"c",headertheme:"b",dividertheme:"b",icon:"arrow-r",spliticon:"arrow-r",splittheme:"b",corners:!0,shadow:!0,inset:!1,initselector:":jqmdata(role='listview')"},_create:function(){var a=this,b="";b+=a.options.inset?" ui-listview-inset":"",!a.options.inset||(b+=a.options.corners?" ui-corner-all":"",b+=a.options.shadow?" ui-shadow":""),a.element.addclass(function(a,c){return c+" ui-listview"+b}),a.refresh(!0)},_findfirstelementbytagname:function(a,b,c,d){var e={};e[c]=e[d]=!0;while(a){if(e[a.nodename])return a;a=a[b]}return null},_getchildrenbytagname:function(b,c,d){var e=[],f={};f[c]=f[d]=!0,b=b.firstchild;while(b)f[b.nodename]&&e.push(b),b=b.nextsibling;return a(e)},_addthumbclasses:function(b){var c,d,e=b.length;for(c=0;c1||z===!1?!1:z||j||d.icon,theme:r}),z!==!1&&s.length===1&&p.addclass("ui-li-has-arrow"),s.first().removeclass("ui-link").addclass("ui-link-inherit"),s.length>1&&(q+=" ui-li-has-alt",t=s.last(),u=h||t.jqmdata("theme")||d.splittheme,c=t.jqmdata("icon"),t.appendto(p).attr("title",a.trim(t.getencodedtext())).addclass("ui-li-link-alt").empty().buttonmarkup({shadow:!1,corners:!1,theme:r,icon:!1,iconpos:"notext"}).find(".ui-btn-inner").append(a(c.createelement("span")).buttonmarkup({shadow:!0,corners:!0,theme:u,iconpos:"notext",icon:c||z||i||d.spliticon})))):f?(q+=" ui-li-divider ui-bar-"+(p.jqmdata("theme")||g),p.attr("role","heading"),l&&(n||n===0?m?v=parseint(n,10):(x=parseint(n,10)-1,p.css("counter-reset","listnumbering "+x)):m&&(v=1))):q+=" ui-li-static ui-btn-up-"+r}l&&m&&q.indexof("ui-li-divider")<0&&(y=q.indexof("ui-li-static")>0?p:p.find(".ui-link-inherit"),y.addclass("ui-li-jsnumbering").prepend(""+v++ +". ")),o[q]||(o[q]=[]),o[q].push(p[0])}for(q in o)a(o[q]).addclass(q).children(".ui-btn-inner").addclass(q);e.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 b=a(this);b.prependto(b.parent())}).end().find(".ui-li-count").each(function(){a(this).closest("li").addclass("ui-li-has-count")}).addclass("ui-btn-up-"+(e.jqmdata("counttheme")||this.options.counttheme)+" ui-btn-corner-all"),this._addthumbclasses(k),this._addthumbclasses(e.find(".ui-link-inherit")),this._addfirstlastclasses(k,this._getvisibles(k,b),b),this._trigger("afterrefresh")},_idstringescape:function(a){return a.replace(/[^a-za-z0-9]/g,"-")},_createsubpages:function(){var b=this.element,c=b.closest(".ui-page"),e=c.jqmdata("url"),f=e||c[0][a.expando],g=b.attr("id"),h=this.options,i="data-"+a.mobile.ns,j=this,k=c.find(":jqmdata(role='footer')").jqmdata("id"),l;typeof d[f]=="undefined"&&(d[f]=-1),g=g||++d[f],a(b.find("li>ul, li>ol").toarray().reverse()).each(function(c){var d=this,f=a(this),j=f.attr("id")||g+"-"+c,m=f.parent(),n=a(f.prevall().toarray().reverse()),p=n.length?n:a(""+a.trim(m.contents()[0].nodevalue)+" "),q=p.first().getencodedtext(),r=(e||"")+"&"+a.mobile.subpageurlkey+"="+j,s=f.jqmdata("theme")||h.theme,t=f.jqmdata("counttheme")||b.jqmdata("counttheme")||h.counttheme,u,v;l=!0,u=f.detach().wrap("").parent().before("").after(k?a(""):"").parent().appendto(a.mobile.pagecontainer),u.page(),v=m.find("a:first"),v.length||(v=a("
").html(p||q).prependto(m.empty())),v.attr("href","#"+r)}).listview();if(l&&c.is(":jqmdata(external-page='true')")&&c.data("mobile-page").options.domcache===!1){var m=function(b,d){var f=d.nextpage,g,h=new a.event("pageremove");d.nextpage&&(g=f.jqmdata("url"),g.indexof(e+"&"+a.mobile.subpageurlkey)!==0&&(j.childpages().remove(),c.trigger(h),h.isdefaultprevented()||c.removewithdependents()))};c.unbind("pagehide.remove").bind("pagehide.remove",m)}},childpages:function(){var b=this.parentpage.jqmdata("url");return a(":jqmdata(url^='"+b+"&"+a.mobile.subpageurlkey+"')")}}),a.widget("mobile.listview",a.mobile.listview,a.mobile.behaviors.addfirstlastclasses),a.mobile.document.bind("pagecreate create",function(b){a.mobile.listview.prototype.enhancewithin(b.target)})}(a),function(a,b){a.mobile.listview.prototype.options.autodividers=!1,a.mobile.listview.prototype.options.autodividersselector=function(b){var c=a.trim(b.text())||null;return c?(c=c.slice(0,1).touppercase(),c):null},a.mobile.document.delegate("ul,ol","listviewcreate",function(){var b=a(this),d=b.data("mobile-listview");if(!d||!d.options.autodividers)return;var e=function(){b.find("li:jqmdata(role='list-divider')").remove();var e=b.find("li"),f=null,g,h;for(var i=0;i
",{"class":"ui-listview-filter ui-bar-"+d.options.filtertheme,role:"search"}).submit(function(a){a.preventdefault(),g.blur()}),f=function(e){var f=a(this),g=this.value.tolowercase(),h=null,i=b.children(),j=f.jqmdata("lastval")+"",k=!1,l="",m,n=d.options.filtercallback!==c;if(j&&j===g)return;d._trigger("beforefilter","beforefilter",{input:this}),f.jqmdata("lastval",g),n||g.length=0;o--)m=a(h[o]),l=m.jqmdata("filtertext")||m.text(),m.is("li:jqmdata(role=list-divider)")?(m.toggleclass("ui-filter-hidequeue",!k),k=!1):d.options.filtercallback(l,g,m)?m.toggleclass("ui-filter-hidequeue",!0):k=!0;h.filter(":not(.ui-filter-hidequeue)").toggleclass("ui-screen-hidden",!1),h.filter(".ui-filter-hidequeue").toggleclass("ui-screen-hidden",!0).toggleclass("ui-filter-hidequeue",!1)}else h.toggleclass("ui-screen-hidden",!!d.options.filterreveal);d._addfirstlastclasses(i,d._getvisibles(i,!1),!1)},g=a(" ",{placeholder:d.options.filterplaceholder}).attr("data-"+a.mobile.ns+"type","search").jqmdata("lastval","").bind("keyup change input",f).appendto(e).textinput();d.options.inset&&e.addclass("ui-listview-filter-inset"),e.bind("submit",function(){return!1}).insertbefore(b)})}(a),function(a,d){a.widget("mobile.panel",a.mobile.widget,{options:{classes:{panel:"ui-panel",panelopen:"ui-panel-open",panelclosed:"ui-panel-closed",panelfixed:"ui-panel-fixed",panelinner:"ui-panel-inner",modal:"ui-panel-dismiss",modalopen:"ui-panel-dismiss-open",pagepanel:"ui-page-panel",pagepanelopen:"ui-page-panel-open",contentwrap:"ui-panel-content-wrap",contentwrapopen:"ui-panel-content-wrap-open",contentwrapclosed:"ui-panel-content-wrap-closed",contentfixedtoolbar:"ui-panel-content-fixed-toolbar",contentfixedtoolbaropen:"ui-panel-content-fixed-toolbar-open",contentfixedtoolbarclosed:"ui-panel-content-fixed-toolbar-closed",animate:"ui-panel-animate"},animate:!0,theme:"c",position:"left",dismissible:!0,display:"reveal",initselector:":jqmdata(role='panel')",swipeclose:!0,positionfixed:!1},_panelid:null,_closelink:null,_page:null,_modal:null,_pannelinner:null,_wrapper:null,_fixedtoolbar:null,_create:function(){var b=this,c=b.element,d=c.closest(":jqmdata(role='page')"),e=function(){var b=a.data(d[0],"mobilepage").options.theme,c="ui-body-"+b;return c},f=function(){var a=c.find("."+b.options.classes.panelinner);return a.length===0&&(a=c.children().wrapall('
').parent()),a},g=function(){var c=d.find("."+b.options.classes.contentwrap);return c.length===0&&(c=d.children(".ui-header:not(:jqmdata(position='fixed')), .ui-content:not(:jqmdata(role='popup')), .ui-footer:not(:jqmdata(position='fixed'))").wrapall('
').parent(),a.support.csstransform3d&&!!b.options.animate&&c.addclass(b.options.classes.animate)),c},h=function(){var c=d.find("."+b.options.classes.contentfixedtoolbar);return c.length===0&&(c=d.find(".ui-header:jqmdata(position='fixed'), .ui-footer:jqmdata(position='fixed')").addclass(b.options.classes.contentfixedtoolbar),a.support.csstransform3d&&!!b.options.animate&&c.addclass(b.options.classes.animate)),c};a.extend(this,{_panelid:c.attr("id"),_closelink:c.find(":jqmdata(rel='close')"),_page:c.closest(":jqmdata(role='page')"),_pagetheme:e(),_pannelinner:f(),_wrapper:g(),_fixedtoolbar:h()}),b._addpanelclasses(),b._wrapper.addclass(this.options.classes.contentwrapclosed),b._fixedtoolbar.addclass(this.options.classes.contentfixedtoolbarclosed),b._page.addclass(b.options.classes.pagepanel),a.support.csstransform3d&&!!b.options.animate&&this.element.addclass(b.options.classes.animate),b._bindupdatelayout(),b._bindcloseevents(),b._bindlinklisteners(),b._bindpageevents(),!b.options.dismissible||b._createmodal(),b._bindswipeevents()},_createmodal:function(b){var c=this;c._modal=a("
").on("mousedown",function(){c.close()}).appendto(this._page)},_getposdisplayclasses:function(a){return a+"-position-"+this.options.position+" "+a+"-display-"+this.options.display},_getpanelclasses:function(){var a=this.options.classes.panel+" "+this._getposdisplayclasses(this.options.classes.panel)+" "+this.options.classes.panelclosed;return this.options.theme&&(a+=" ui-body-"+this.options.theme),!this.options.positionfixed||(a+=" "+this.options.classes.panelfixed),a},_addpanelclasses:function(){this.element.addclass(this._getpanelclasses())},_bindcloseevents:function(){var a=this;a._closelink.on("click.panel",function(b){return b.preventdefault(),a.close(),!1}),a.element.on("click.panel","a:jqmdata(ajax='false')",function(b){a.close()})},_positionpanel:function(){var b=this,c=b._pannelinner.outerheight(),d=c>a.mobile.getscreenheight();d||!b.options.positionfixed?(d&&(b._unfixpanel(),a.mobile.resetactivepageheight(c)),b._scrollintoview(c)):b._fixpanel()},_scrollintoview:function(c){cthis._ui.screen.height()&&this._ui.screen.height(a)},_handlewindowkeyup:function(b){if(this._isopen&&b.keycode===a.mobile.keycode.escape)return this._eateventandclose(b)},_expectresizeevent:function(){var b=f();if(this._resizedata){if(b.x===this._resizedata.wincoords.x&&b.y===this._resizedata.wincoords.y&&b.cx===this._resizedata.wincoords.cx&&b.cy===this._resizedata.wincoords.cy)return!1;cleartimeout(this._resizedata.timeoutid)}return this._resizedata={timeoutid:settimeout(a.proxy(this,"_resizetimeout"),200),wincoords:b},!0},_resizetimeout:function(){this._isopen?this._expectresizeevent()||(this._ui.container.hasclass("ui-popup-hidden")&&(this._ui.container.removeclass("ui-popup-hidden"),this.reposition({positionto:"window"}),this._ignoreresizeevents()),this._resizescreen(),this._resizedata=null,this._orientationchangeinprogress=!1):(this._resizedata=null,this._orientationchangeinprogress=!1)},_ignoreresizeevents:function(){var a=this;this._ignoreresizeto&&cleartimeout(this._ignoreresizeto),this._ignoreresizeto=settimeout(function(){a._ignoreresizeto=0},1e3)},_handlewindowresize:function(a){this._isopen&&this._ignoreresizeto===0&&(this._expectresizeevent()||this._orientationchangeinprogress)&&!this._ui.container.hasclass("ui-popup-hidden")&&this._ui.container.addclass("ui-popup-hidden").removeattr("style")},_handlewindoworientationchange:function(a){!this._orientationchangeinprogress&&this._isopen&&this._ignoreresizeto===0&&(this._expectresizeevent(),this._orientationchangeinprogress=!0)},_handledocumentfocusin:function(b){var d=b.target,e,f=this._ui;if(!this._isopen)return;if(d!==f.container[0]){e=a(b.target);if(0===e.parents().filter(f.container[0]).length)return a(c.activeelement).one("focus",function(a){e.blur()}),f.focuselement.focus(),b.preventdefault(),b.stopimmediatepropagation(),!1;f.focuselement[0]===f.container[0]&&(f.focuselement=e)}else f.focuselement&&f.focuselement[0]!==f.container[0]&&(f.container.blur(),f.focuselement.focus());this._ignoreresizeevents()},_create:function(){var b={screen:a(""),placeholder:a("
"),container:a("")},c=this.element.closest(".ui-page"),e=this.element.attr("id"),f=this;this.options.history=this.options.history&&a.mobile.ajaxenabled&&a.mobile.hashlisteningenabled,c.length===0&&(c=a("body")),this.options.container=this.options.container||a.mobile.pagecontainer,c.append(b.screen),b.container.insertafter(b.screen),b.placeholder.insertafter(this.element),e&&(b.screen.attr("id",e+"-screen"),b.container.attr("id",e+"-popup"),b.placeholder.html("")),b.container.append(this.element),b.focuselement=b.container,this.element.addclass("ui-popup"),a.extend(this,{_scrolltop:0,_page:c,_ui:b,_fallbacktransition:"",_currenttransition:!1,_prereqs:null,_isopen:!1,_tolerance:null,_resizedata:null,_ignoreresizeto:0,_orientationchangeinprogress:!1}),a.each(this.options,function(a,b){f.options[a]=d,f._setoption(a,b,!0)}),b.screen.bind("vclick",a.proxy(this,"_eateventandclose")),this._on(a.mobile.window,{orientationchange:a.proxy(this,"_handlewindoworientationchange"),resize:a.proxy(this,"_handlewindowresize"),keyup:a.proxy(this,"_handlewindowkeyup")}),this._on(a.mobile.document,{focusin:a.proxy(this,"_handledocumentfocusin")})},_applytheme:function(a,b,c){var d=(a.attr("class")||"").split(" "),e=!0,f=null,g,h=string(b);while(d.length>0){f=d.pop(),g=(new regexp("^ui-"+c+"-([a-z])$")).exec(f);if(g&&g.length>1){f=g[1];break}f=null}b!==f&&(a.removeclass("ui-"+c+"-"+f),b!==null&&b!=="none"&&a.addclass("ui-"+c+"-"+h))},_settheme:function(a){this._applytheme(this.element,a,"body")},_setoverlaytheme:function(a){this._applytheme(this._ui.screen,a,"overlay"),this._isopen&&this._ui.screen.addclass("in")},_setshadow:function(a){this.element.toggleclass("ui-overlay-shadow",a)},_setcorners:function(a){this.element.toggleclass("ui-corner-all",a)},_applytransition:function(b){this._ui.container.removeclass(this._fallbacktransition),b&&b!=="none"&&(this._fallbacktransition=a.mobile._maybedegradetransition(b),this._fallbacktransition==="none"&&(this._fallbacktransition=""),this._ui.container.addclass(this._fallbacktransition))},_settransition:function(a){this._currenttransition||this._applytransition(a)},_settolerance:function(b){var c={t:30,r:15,b:30,l:15};if(b!==d){var e=string(b).split(",");a.each(e,function(a,b){e[a]=parseint(b,10)});switch(e.length){case 1:isnan(e[0])||(c.t=c.r=c.b=c.l=e[0]);break;case 2:isnan(e[0])||(c.t=c.b=e[0]),isnan(e[1])||(c.l=c.r=e[1]);break;case 4:isnan(e[0])||(c.t=e[0]),isnan(e[1])||(c.r=e[1]),isnan(e[2])||(c.b=e[2]),isnan(e[3])||(c.l=e[3]);break;default:}}this._tolerance=c},_setoption:function(b,c){var e,f="_set"+b.charat(0).touppercase()+b.slice(1);this[f]!==d&&this[f](c),e=["initselector","closelinkselector","closelinkevents","navigateevents","closeevents","history","container"],a.mobile.widget.prototype._setoption.apply(this,arguments),a.inarray(b,e)===-1&&this.element.attr("data-"+(a.mobile.ns||"")+b.replace(/([a-z])/,"-$1").tolowercase(),c)},_placementcoords:function(a){var b=f(),d={x:this._tolerance.l,y:b.y+this._tolerance.t,cx:b.cx-this._tolerance.l-this._tolerance.r,cy:b.cy-this._tolerance.t-this._tolerance.b},g,h;this._ui.container.css("max-width",d.cx),g={cx:this._ui.container.outerwidth(!0),cy:this._ui.container.outerheight(!0)},h={x:e(d.cx,g.cx,d.x,a.x),y:e(d.cy,g.cy,d.y,a.y)},h.y=math.max(0,h.y);var i=c.documentelement,j=c.body,k=math.max(i.clientheight,j.scrollheight,j.offsetheight,i.scrollheight,i.offsetheight);return h.y-=math.min(h.y,math.max(0,h.y+g.cy-k)),{left:h.x,top:h.y}},_createprereqs:function(b,c,d){var e=this,f;f={screen:a.deferred(),container:a.deferred()},f.screen.then(function(){f===e._prereqs&&b()}),f.container.then(function(){f===e._prereqs&&c()}),a.when(f.screen,f.container).done(function(){f===e._prereqs&&(e._prereqs=null,d())}),e._prereqs=f},_animate:function(b){this._ui.screen.removeclass(b.classtoremove).addclass(b.screenclasstoadd),b.prereqs.screen.resolve();if(b.transition&&b.transition!=="none"){b.applytransition&&this._applytransition(b.transition);if(this._fallbacktransition){this._ui.container.animationcomplete(a.proxy(b.prereqs.container,"resolve")).addclass(b.containerclasstoadd).removeclass(b.classtoremove);return}}this._ui.container.removeclass(b.classtoremove),b.prereqs.container.resolve()},_desiredcoords:function(b){var c=null,d,e=f(),g=b.x,h=b.y,i=b.positionto;if(i&&i!=="origin")if(i==="window")g=e.cx/2+e.x,h=e.cy/2+e.y;else{try{c=a(i)}catch(j){c=null}c&&(c.filter(":visible"),c.length===0&&(c=null))}c&&(d=c.offset(),g=d.left+c.outerwidth()/2,h=d.top+c.outerheight()/2);if(a.type(g)!=="number"||isnan(g))g=e.cx/2+e.x;if(a.type(h)!=="number"||isnan(h))h=e.cy/2+e.y;return{x:g,y:h}},_reposition:function(a){a={x:a.x,y:a.y,positionto:a.positionto},this._trigger("beforeposition",a),this._ui.container.offset(this._placementcoords(this._desiredcoords(a)))},reposition:function(a){this._isopen&&this._reposition(a)},_openprereqscomplete:function(){this._ui.container.addclass("ui-popup-active"),this._isopen=!0,this._resizescreen(),this._ui.container.attr("tabindex","0").focus(),this._ignoreresizeevents(),this._trigger("afteropen")},_open:function(c){var d=a.extend({},this.options,c),e=function(){var a=b,c=navigator.useragent,d=c.match(/applewebkit\/([0-9\.]+)/),e=!!d&&d[1],f=c.match(/android (\d+(?:\.\d+))/),g=!!f&&f[1],h=c.indexof("chrome")>-1;return f!==null&&g==="4.0"&&e&&e>534.13&&!h?!0:!1}();this._createprereqs(a.noop,a.noop,a.proxy(this,"_openprereqscomplete")),this._currenttransition=d.transition,this._applytransition(d.transition),this.options.theme||this._settheme(this._page.jqmdata("theme")||a.mobile.getinheritedtheme(this._page,"c")),this._ui.screen.removeclass("ui-screen-hidden"),this._ui.container.removeclass("ui-popup-hidden"),this._reposition(d),this.options.overlaytheme&&e&&this.element.closest(".ui-page").addclass("ui-popup-open"),this._animate({additionalcondition:!0,transition:d.transition,classtoremove:"",screenclasstoadd:"in",containerclasstoadd:"in",applytransition:!1,prereqs:this._prereqs})},_closeprereqscreen:function(){this._ui.screen.removeclass("out").addclass("ui-screen-hidden")},_closeprereqcontainer:function(){this._ui.container.removeclass("reverse out").addclass("ui-popup-hidden").removeattr("style")},_closeprereqsdone:function(){var b=this.options;this._ui.container.removeattr("tabindex"),a.mobile.popup.active=d,this._trigger("afterclose")},_close:function(b){this._ui.container.removeclass("ui-popup-active"),this._page.removeclass("ui-popup-open"),this._isopen=!1,this._createprereqs(a.proxy(this,"_closeprereqscreen"),a.proxy(this,"_closeprereqcontainer"),a.proxy(this,"_closeprereqsdone")),this._animate({additionalcondition:this._ui.screen.hasclass("in"),transition:b?"none":this._currenttransition,classtoremove:"in",screenclasstoadd:"out",containerclasstoadd:"reverse out",applytransition:!0,prereqs:this._prereqs})},_unenhance:function(){this._settheme("none"),this.element.detach().insertafter(this._ui.placeholder).removeclass("ui-popup ui-overlay-shadow ui-corner-all"),this._ui.screen.remove(),this._ui.container.remove(),this._ui.placeholder.remove()},_destroy:function(){a.mobile.popup.active===this?(this.element.one("popupafterclose",a.proxy(this,"_unenhance")),this.close()):this._unenhance()},_closepopup:function(c,d){var e,f,g=this.options,h=!1;b.scrollto(0,this._scrolltop),c&&c.type==="pagebeforechange"&&d&&(typeof d.topage=="string"?e=d.topage:e=d.topage.jqmdata("url"),e=a.mobile.path.parseurl(e),f=e.pathname+e.search+e.hash,this._myurl!==a.mobile.path.makeurlabsolute(f)?h=!0:c.preventdefault()),g.container.unbind(g.closeevents),this.element.undelegate(g.closelinkselector,g.closelinkevents),this._close(h)},_bindcontainerclose:function(){this.options.container.one(this.options.closeevents,a.proxy(this,"_closepopup"))},open:function(c){var d=this,e=this.options,f,g,h,i,j,k;if(a.mobile.popup.active)return;a.mobile.popup.active=this,this._scrolltop=a.mobile.window.scrolltop();if(!e.history){d._open(c),d._bindcontainerclose(),d.element.delegate(e.closelinkselector,e.closelinkevents,function(a){d.close(),a.preventdefault()});return}k=a.mobile.urlhistory,g=a.mobile.dialoghashkey,h=a.mobile.activepage,i=h.is(".ui-dialog"),this._myurl=f=k.getactive().url,j=f.indexof(g)>-1&&!i&&k.activeindex>0;if(j){d._open(c),d._bindcontainerclose();return}f.indexof(g)===-1&&!i?f+=f.indexof("#")>-1?g:"#"+g:f=a.mobile.path.parselocation().hash+g,k.activeindex===0&&f===k.initialdst&&(f+=g),a(b).one("beforenavigate",function(a){a.preventdefault(),d._open(c),d._bindcontainerclose()}),this.urlaltered=!0,a.mobile.navigate(f,{role:"dialog"})},close:function(){if(a.mobile.popup.active!==this)return;this._scrolltop=a.mobile.window.scrolltop(),this.options.history&&this.urlaltered?(a.mobile.back(),this.urlaltered=!1):this._closepopup()}}),a.mobile.popup.handlelink=function(b){var c=b.closest(":jqmdata(role='page')"),d=c.length===0?a("body"):c,e=a(a.mobile.path.parseurl(b.attr("href")).hash,d[0]),f;e.data("mobile-popup")&&(f=b.offset(),e.popup("open",{x:f.left+b.outerwidth()/2,y:f.top+b.outerheight()/2,transition:b.jqmdata("transition"),positionto:b.jqmdata("position-to")})),settimeout(function(){var c=b.parent().parent();c.hasclass("ui-li")&&(b=c.parent()),b.removeclass(a.mobile.activebtnclass)},300)},a.mobile.document.bind("pagebeforechange",function(b,c){c.options.role==="popup"&&(a.mobile.popup.handlelink(c.options.link),b.preventdefault())}),a.mobile.document.bind("pagecreate create",function(b){a.mobile.popup.prototype.enhancewithin(b.target,!0)})}(a),function(a,b){a.widget("mobile.table",a.mobile.widget,{options:{classes:{table:"ui-table"},initselector:":jqmdata(role='table')"},_create:function(){var b=this,c=this.element.find("thead tr");this.element.addclass(this.options.classes.table),b.headers=this.element.find("tr:eq(0)").children(),b.allheaders=b.headers.add(c.children()),c.each(function(){var d=0;a(this).children().each(function(e){var f=parseint(a(this).attr("colspan"),10),g=":nth-child("+(d+1)+")";a(this).jqmdata("colstart",d+1);if(f)for(var h=0;h "),legend:a("
")},e=c.children("legend"),f=this;c.wrapinner(d.inner),e.length&&d.legend.append(e).insertbefore(c.children(0)),c.addclass("ui-corner-all ui-controlgroup"),a.extend(this,{_initialrefresh:!0}),a.each(this.options,function(a,c){f.options[a]=b,f._setoption(a,c,!0)})},_init:function(){this.refresh()},_setoption:function(c,d){var e="_set"+c.charat(0).touppercase()+c.slice(1);this[e]!==b&&this[e](d),this._super(c,d),this.element.attr("data-"+(a.mobile.ns||"")+c.replace(/([a-z])/,"-$1").tolowercase(),d)},_settype:function(a){this.element.removeclass("ui-controlgroup-horizontal ui-controlgroup-vertical").addclass("ui-controlgroup-"+a),this.refresh()},_setcorners:function(a){this.element.toggleclass("ui-corner-all",a)},_setshadow:function(a){this.element.toggleclass("ui-shadow",a)},_setmini:function(a){this.element.toggleclass("ui-mini",a)},container:function(){return this.element.children(".ui-controlgroup-controls")},refresh:function(){var b=this.element.find(".ui-btn").not(".ui-slider-handle"),c=this._initialrefresh;a.mobile.checkboxradio&&this.element.find(":mobile-checkboxradio").checkboxradio("refresh"),this._addfirstlastclasses(b,this.options.excludeinvisible?this._getvisibles(b,c):b,c),this._initialrefresh=!1}}),a.widget("mobile.controlgroup",a.mobile.controlgroup,a.mobile.behaviors.addfirstlastclasses),a(function(){a.mobile.document.bind("pagecreate create",function(b){a.mobile.controlgroup.prototype.enhancewithin(b.target,!0)})})}(a),function(a,b){a.mobile.behaviors.formreset={_handleformreset:function(){this._on(this.element.closest("form"),{reset:function(){this._delay("_reset")}})}}}(a),function(a,b){a.widget("mobile.checkboxradio",a.mobile.widget,{options:{theme:null,mini:!1,initselector:"input[type='checkbox'],input[type='radio']"},_create:function(){var b=this,d=this.element,e=this.options,f=function(a,b){return a.jqmdata(b)||a.closest("form, fieldset").jqmdata(b)},g=a(d).closest("label"),h=g.length?g:a(d).closest("form, fieldset, :jqmdata(role='page'), :jqmdata(role='dialog')").find("label").filter("[for='"+d[0].id+"']").first(),i=d[0].type,j=f(d,"mini")||e.mini,k=i+"-on",l=i+"-off",m=f(d,"iconpos"),n="ui-"+k,o="ui-"+l;if(i!=="checkbox"&&i!=="radio")return;a.extend(this,{label:h,inputtype:i,checkedclass:n,uncheckedclass:o,checkedicon:k,uncheckedicon:l}),e.theme||(e.theme=a.mobile.getinheritedtheme(this.element,"c")),h.buttonmarkup({theme:e.theme,icon:l,shadow:!1,mini:j,iconpos:m});var p=c.createelement("div");p.classname="ui-"+i,d.add(h).wrapall(p),h.bind({vmouseover:function(b){a(this).parent().is(".ui-disabled")&&b.stoppropagation()},vclick:function(a){if(d.is(":disabled")){a.preventdefault();return}return b._cachevals(),d.prop("checked",i==="radio"&&!0||!d.prop("checked")),d.triggerhandler("click"),b._getinputset().not(d).prop("checked",!1),b._updateall(),!1}}),d.bind({vmousedown:function(){b._cachevals()},vclick:function(){var c=a(this);c.is(":checked")?(c.prop("checked",!0),b._getinputset().not(c).prop("checked",!1)):c.prop("checked",!1),b._updateall()},focus:function(){h.addclass(a.mobile.focusclass)},blur:function(){h.removeclass(a.mobile.focusclass)}}),this._handleformreset&&this._handleformreset(),this.refresh()},_cachevals:function(){this._getinputset().each(function(){a(this).jqmdata("cacheval",this.checked)})},_getinputset:function(){return this.inputtype==="checkbox"?this.element:this.element.closest("form, :jqmdata(role='page'), :jqmdata(role='dialog')").find("input[name='"+this.element[0].name+"'][type='"+this.inputtype+"']")},_updateall:function(){var b=this;this._getinputset().each(function(){var c=a(this);(this.checked||b.inputtype==="checkbox")&&c.trigger("change")}).checkboxradio("refresh")},_reset:function(){this.refresh()},refresh:function(){var b=this.element[0],c=" "+a.mobile.activebtnclass,d=this.checkedclass+(this.element.parents(".ui-controlgroup-horizontal").length?c:""),e=this.label;b.checked?e.removeclass(this.uncheckedclass+c).addclass(d).buttonmarkup({icon:this.checkedicon}):e.removeclass(d).addclass(this.uncheckedclass).buttonmarkup({icon:this.uncheckedicon}),b.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")}}),a.widget("mobile.checkboxradio",a.mobile.checkboxradio,a.mobile.behaviors.formreset),a.mobile.document.bind("pagecreate create",function(b){a.mobile.checkboxradio.prototype.enhancewithin(b.target,!0)})}(a),function(a,b){a.mobile.table.prototype.options.mode="columntoggle",a.mobile.table.prototype.options.columnbtntheme=null,a.mobile.table.prototype.options.columnpopuptheme=null,a.mobile.table.prototype.options.columnbtntext="columns...",a.mobile.table.prototype.options.classes=a.extend(a.mobile.table.prototype.options.classes,{popup:"ui-table-columntoggle-popup",columnbtn:"ui-table-columntoggle-btn",priorityprefix:"ui-table-priority-",columntoggletable:"ui-table-columntoggle"}),a.mobile.document.delegate(":jqmdata(role='table')","tablecreate",function(){var b=a(this),c=b.data("mobile-table"),d=c.options,e=a.mobile.ns;if(d.mode!=="columntoggle")return;c.element.addclass(d.classes.columntoggletable);var f=(b.attr("id")||d.classes.popup)+"-popup",g=a(""+d.columnbtntext+" "),h=a(""),i=a(" ");c.headers.not("td").each(function(){var b=a(this).jqmdata("priority"),c=a(this).add(a(this).jqmdata("cells"));b&&(c.addclass(d.classes.priorityprefix+b),a(" "+a(this).text()+" ").appendto(i).children(0).jqmdata("cells",c).checkboxradio({theme:d.columnpopuptheme}))}),i.appendto(h),i.on("change","input",function(b){this.checked?a(this).jqmdata("cells").removeclass("ui-table-cell-hidden").addclass("ui-table-cell-visible"):a(this).jqmdata("cells").removeclass("ui-table-cell-visible").addclass("ui-table-cell-hidden")}),g.insertbefore(b).buttonmarkup({theme:d.columnbtntheme}),h.insertbefore(b).popup(),c.refresh=function(){i.find("input").each(function(){this.checked=a(this).jqmdata("cells").eq(0).css("display")==="table-cell",a(this).checkboxradio("refresh")})},a.mobile.window.on("throttledresize",c.refresh),c.refresh()})}(a),function(a,b){a.mobile.table.prototype.options.mode="reflow",a.mobile.table.prototype.options.classes=a.extend(a.mobile.table.prototype.options.classes,{reflowtable:"ui-table-reflow",celllabels:"ui-table-cell-label"}),a.mobile.document.delegate(":jqmdata(role='table')","tablecreate",function(){var b=a(this),c=b.data("mobile-table"),d=c.options;if(d.mode!=="reflow")return;c.element.addclass(d.classes.reflowtable);var e=a(c.allheaders.get().reverse());e.each(function(b){var c=a(this).jqmdata("cells"),e=a(this).jqmdata("colstart"),f=c.not(this).filter("thead th").length&&" ui-table-cell-label-top",g=a(this).text();if(g!=="")if(f){var h=parseint(a(this).attr("colspan"),10),i="";h&&(i="td:nth-child("+h+"n + "+e+")"),c.filter(i).prepend(""+g+" ")}else c.prepend(""+g+" ")})})}(a)});