-
Notifications
You must be signed in to change notification settings - Fork 66
/
jquery.mobile.min.js
59 lines (59 loc) · 203 KB
/
jquery.mobile.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*!
* jQuery Mobile 1.4.5
* Git HEAD hash: 68e55e78b292634d3991c795f06f5e37a512decc <> Date: Fri Oct 31 2014 17:33:30 UTC
* http://jquerymobile.com
*
* Copyright 2010, 2014 jQuery Foundation, Inc. and othercontributors
* Released under the MIT license.
* http://jquery.org/license
*
*/
(function(a,c,b){if(typeof define==="function"&&define.amd){define(["jquery"],function(d){b(d,a,c);return d.mobile})}else{b(a.jQuery,a,c)}}(this,document,function(c,b,a,d){(function(e){e.mobile={}}(c));
/*!
* jQuery UI Core c0ab71056b936627e8a7821f03c044aec6280a40
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/category/ui-core/
*/
(function(f,j){var e=0,i=/^ui-id-\d+$/;f.ui=f.ui||{};f.extend(f.ui,{version:"c0ab71056b936627e8a7821f03c044aec6280a40",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}});f.fn.extend({focus:(function(k){return function(l,m){return typeof l==="number"?this.each(function(){var n=this;setTimeout(function(){f(n).focus();if(m){m.call(n)}},l)}):k.apply(this,arguments)}})(f.fn.focus),scrollParent:function(){var k;if((f.ui.ie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){k=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(f.css(this,"position"))&&(/(auto|scroll)/).test(f.css(this,"overflow")+f.css(this,"overflow-y")+f.css(this,"overflow-x"))}).eq(0)}else{k=this.parents().filter(function(){return(/(auto|scroll)/).test(f.css(this,"overflow")+f.css(this,"overflow-y")+f.css(this,"overflow-x"))}).eq(0)}return(/fixed/).test(this.css("position"))||!k.length?f(this[0].ownerDocument||a):k},uniqueId:function(){return this.each(function(){if(!this.id){this.id="ui-id-"+(++e)}})},removeUniqueId:function(){return this.each(function(){if(i.test(this.id)){f(this).removeAttr("id")}})}});function h(m,k){var o,n,l,p=m.nodeName.toLowerCase();if("area"===p){o=m.parentNode;n=o.name;if(!m.href||!n||o.nodeName.toLowerCase()!=="map"){return false}l=f("img[usemap=#"+n+"]")[0];return !!l&&g(l)}return(/input|select|textarea|button|object/.test(p)?!m.disabled:"a"===p?m.href||k:k)&&g(m)}function g(k){return f.expr.filters.visible(k)&&!f(k).parents().addBack().filter(function(){return f.css(this,"visibility")==="hidden"}).length}f.extend(f.expr[":"],{data:f.expr.createPseudo?f.expr.createPseudo(function(k){return function(l){return !!f.data(l,k)}}):function(m,l,k){return !!f.data(m,k[3])},focusable:function(k){return h(k,!isNaN(f.attr(k,"tabindex")))},tabbable:function(m){var k=f.attr(m,"tabindex"),l=isNaN(k);return(l||k>=0)&&h(m,!l)}});if(!f("<a>").outerWidth(1).jquery){f.each(["Width","Height"],function(m,k){var l=k==="Width"?["Left","Right"]:["Top","Bottom"],n=k.toLowerCase(),p={innerWidth:f.fn.innerWidth,innerHeight:f.fn.innerHeight,outerWidth:f.fn.outerWidth,outerHeight:f.fn.outerHeight};function o(s,r,q,t){f.each(l,function(){r-=parseFloat(f.css(s,"padding"+this))||0;if(q){r-=parseFloat(f.css(s,"border"+this+"Width"))||0}if(t){r-=parseFloat(f.css(s,"margin"+this))||0}});return r}f.fn["inner"+k]=function(q){if(q===j){return p["inner"+k].call(this)}return this.each(function(){f(this).css(n,o(this,q)+"px")})};f.fn["outer"+k]=function(q,r){if(typeof q!=="number"){return p["outer"+k].call(this,q)}return this.each(function(){f(this).css(n,o(this,q,true,r)+"px")})}})}if(!f.fn.addBack){f.fn.addBack=function(k){return this.add(k==null?this.prevObject:this.prevObject.filter(k))}}if(f("<a>").data("a-b","a").removeData("a-b").data("a-b")){f.fn.removeData=(function(k){return function(l){if(arguments.length){return k.call(this,f.camelCase(l))}else{return k.call(this)}}})(f.fn.removeData)}f.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());f.support.selectstart="onselectstart" in a.createElement("div");f.fn.extend({disableSelection:function(){return this.bind((f.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(k){k.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(n){if(n!==j){return this.css("zIndex",n)}if(this.length){var l=f(this[0]),k,m;while(l.length&&l[0]!==a){k=l.css("position");if(k==="absolute"||k==="relative"||k==="fixed"){m=parseInt(l.css("zIndex"),10);if(!isNaN(m)&&m!==0){return m}}l=l.parent()}}return 0}});f.ui.plugin={add:function(l,m,o){var k,n=f.ui[l].prototype;for(k in o){n.plugins[k]=n.plugins[k]||[];n.plugins[k].push([m,o[k]])}},call:function(k,n,m,l){var o,p=k.plugins[n];if(!p){return}if(!l&&(!k.element[0].parentNode||k.element[0].parentNode.nodeType===11)){return}for(o=0;o<p.length;o++){if(k.options[p[o][0]]){p[o][1].apply(k.element,m)}}}}})(c);(function(g,f,h){var e=function(p,j){var n=p.parent(),q=[],l=function(){var r=g(this),s=g.mobile.toolbar&&r.data("mobile-toolbar")?r.toolbar("option"):{position:r.attr("data-"+g.mobile.ns+"position"),updatePagePadding:(r.attr("data-"+g.mobile.ns+"update-page-padding")!==false)};return !(s.position==="fixed"&&s.updatePagePadding===true)},k=n.children(":jqmData(role='header')").filter(l),m=p.children(":jqmData(role='header')"),o=n.children(":jqmData(role='footer')").filter(l),i=p.children(":jqmData(role='footer')");if(m.length===0&&k.length>0){q=q.concat(k.toArray())}if(i.length===0&&o.length>0){q=q.concat(o.toArray())}g.each(q,function(r,s){j-=g(s).outerHeight()});return Math.max(0,j)};g.extend(g.mobile,{window:g(f),document:g(a),keyCode:g.ui.keyCode,behaviors:{},silentScroll:function(i){if(g.type(i)!=="number"){i=g.mobile.defaultHomeScroll}g.event.special.scrollstart.enabled=false;setTimeout(function(){f.scrollTo(0,i);g.mobile.document.trigger("silentscroll",{x:0,y:i})},20);setTimeout(function(){g.event.special.scrollstart.enabled=true},150)},getClosestBaseUrl:function(k){var i=g(k).closest(".ui-page").jqmData("url"),j=g.mobile.path.documentBase.hrefNoHash;if(!g.mobile.dynamicBaseEnabled||!i||!g.mobile.path.isPath(i)){i=j}return g.mobile.path.makeUrlAbsolute(i,j)},removeActiveLinkClass:function(i){if(!!g.mobile.activeClickedLink&&(!g.mobile.activeClickedLink.closest("."+g.mobile.activePageClass).length||i)){g.mobile.activeClickedLink.removeClass(g.mobile.activeBtnClass)}g.mobile.activeClickedLink=null},getInheritedTheme:function(n,j){var o=n[0],k="",l=/ui-(bar|body|overlay)-([a-z])\b/,p,i;while(o){p=o.className||"";if(p&&(i=l.exec(p))&&(k=i[2])){break}o=o.parentNode}return k||j||"a"},enhanceable:function(i){return this.haveParents(i,"enhance")},hijackable:function(i){return this.haveParents(i,"ajax")},haveParents:function(j,p){if(!g.mobile.ignoreContentEnabled){return j}var m=j.length,k=g(),o,r,n,l,q;for(l=0;l<m;l++){r=j.eq(l);n=false;o=j[l];while(o){q=o.getAttribute?o.getAttribute("data-"+g.mobile.ns+p):"";if(q==="false"){n=true;break}o=o.parentNode}if(!n){k=k.add(r)}}return k},getScreenHeight:function(){return f.innerHeight||g.mobile.window.height()},resetActivePageHeight:function(i){var l=g("."+g.mobile.activePageClass),k=l.height(),j=l.outerHeight(true);i=e(l,(typeof i==="number")?i:g.mobile.getScreenHeight());l.css("min-height","");if(l.height()<i){l.css("min-height",i-(j-k))}},loading:function(){var i=this.loading._widget||g(g.mobile.loader.prototype.defaultHtml).loader(),j=i.loader.apply(i,arguments);this.loading._widget=i;return j}});g.addDependents=function(j,k){var i=g(j),l=i.jqmData("dependents")||g();i.jqmData("dependents",g(l).add(k))};g.fn.extend({removeWithDependents:function(){g.removeWithDependents(this)},enhanceWithin:function(){var j,l={},i=g.mobile.page.prototype.keepNativeSelector(),k=this;if(g.mobile.nojs){g.mobile.nojs(this)}if(g.mobile.links){g.mobile.links(this)}if(g.mobile.degradeInputsWithin){g.mobile.degradeInputsWithin(this)}if(g.fn.buttonMarkup){this.find(g.fn.buttonMarkup.initSelector).not(i).jqmEnhanceable().buttonMarkup()}if(g.fn.fieldcontain){this.find(":jqmData(role='fieldcontain')").not(i).jqmEnhanceable().fieldcontain()}g.each(g.mobile.widgets,function(m,n){if(n.initSelector){var o=g.mobile.enhanceable(k.find(n.initSelector));if(o.length>0){o=o.not(i)}if(o.length>0){l[n.prototype.widgetName]=o}}});for(j in l){l[j][j]()}return this},addDependents:function(i){g.addDependents(this,i)},getEncodedText:function(){return g("<a>").text(this.text()).html()},jqmEnhanceable:function(){return g.mobile.enhanceable(this)},jqmHijackable:function(){return g.mobile.hijackable(this)}});g.removeWithDependents=function(j){var i=g(j);(i.jqmData("dependents")||g()).remove();i.remove()};g.addDependents=function(k,j){var i=g(k),l=i.jqmData("dependents")||g();i.jqmData("dependents",g(l).add(j))};g.find.matches=function(i,j){return g.find(i,null,null,j)};g.find.matchesSelector=function(i,j){return g.find(j,null,null,[i]).length>0}})(c,this);(function(f,e,g){f.extend(f.mobile,{version:"1.4.5",subPageUrlKey:"ui-page",hideUrlBar:true,keepNative:":jqmData(role='none'), :jqmData(role='nojs')",activePageClass:"ui-page-active",activeBtnClass:"ui-btn-active",focusClass:"ui-focus",ajaxEnabled:true,hashListeningEnabled:true,linkBindingEnabled:true,defaultPageTransition:"fade",maxTransitionWidth:false,minScrollBack:0,defaultDialogTransition:"pop",pageLoadErrorMessage:"Error Loading Page",pageLoadErrorMessageTheme:"a",phonegapNavigationEnabled:false,autoInitializePage:true,pushStateEnabled:true,ignoreContentEnabled:false,buttonMarkup:{hoverDelay:200},dynamicBaseEnabled:true,pageContainer:f(),allowCrossDomainPages:false,dialogHashKey:"&ui-state=dialog"})})(c,this);
/*!
* jQuery UI Widget c0ab71056b936627e8a7821f03c044aec6280a40
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/jQuery.widget/
*/
(function(f,i){var e=0,h=Array.prototype.slice,g=f.cleanData;f.cleanData=function(j){for(var k=0,l;(l=j[k])!=null;k++){try{f(l).triggerHandler("remove")}catch(m){}}g(j)};f.widget=function(j,k,r){var o,p,m,q,l={},n=j.split(".")[0];j=j.split(".")[1];o=n+"-"+j;if(!r){r=k;k=f.Widget}f.expr[":"][o.toLowerCase()]=function(s){return !!f.data(s,o)};f[n]=f[n]||{};p=f[n][j];m=f[n][j]=function(s,t){if(!this._createWidget){return new m(s,t)}if(arguments.length){this._createWidget(s,t)}};f.extend(m,p,{version:r.version,_proto:f.extend({},r),_childConstructors:[]});q=new k();q.options=f.widget.extend({},q.options);f.each(r,function(t,s){if(!f.isFunction(s)){l[t]=s;return}l[t]=(function(){var u=function(){return k.prototype[t].apply(this,arguments)},v=function(w){return k.prototype[t].apply(this,w)};return function(){var y=this._super,w=this._superApply,x;this._super=u;this._superApply=v;x=s.apply(this,arguments);this._super=y;this._superApply=w;return x}})()});m.prototype=f.widget.extend(q,{widgetEventPrefix:p?(q.widgetEventPrefix||j):j},l,{constructor:m,namespace:n,widgetName:j,widgetFullName:o});if(p){f.each(p._childConstructors,function(t,u){var s=u.prototype;f.widget(s.namespace+"."+s.widgetName,m,u._proto)});delete p._childConstructors}else{k._childConstructors.push(m)}f.widget.bridge(j,m);return m};f.widget.extend=function(o){var k=h.call(arguments,1),n=0,j=k.length,l,m;for(;n<j;n++){for(l in k[n]){m=k[n][l];if(k[n].hasOwnProperty(l)&&m!==i){if(f.isPlainObject(m)){o[l]=f.isPlainObject(o[l])?f.widget.extend({},o[l],m):f.widget.extend({},m)}else{o[l]=m}}}}return o};f.widget.bridge=function(k,j){var l=j.prototype.widgetFullName||k;f.fn[k]=function(o){var m=typeof o==="string",n=h.call(arguments,1),p=this;o=!m&&n.length?f.widget.extend.apply(null,[o].concat(n)):o;if(m){this.each(function(){var r,q=f.data(this,l);if(o==="instance"){p=q;return false}if(!q){return f.error("cannot call methods on "+k+" prior to initialization; attempted to call method '"+o+"'")}if(!f.isFunction(q[o])||o.charAt(0)==="_"){return f.error("no such method '"+o+"' for "+k+" widget instance")}r=q[o].apply(q,n);if(r!==q&&r!==i){p=r&&r.jquery?p.pushStack(r.get()):r;return false}})}else{this.each(function(){var q=f.data(this,l);if(q){q.option(o||{})._init()}else{f.data(this,l,new j(o,this))}})}return p}};f.Widget=function(){};f.Widget._childConstructors=[];f.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:false,create:null},_createWidget:function(j,k){k=f(k||this.defaultElement||this)[0];this.element=f(k);this.uuid=e++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=f.widget.extend({},this.options,this._getCreateOptions(),j);this.bindings=f();this.hoverable=f();this.focusable=f();if(k!==this){f.data(k,this.widgetFullName,this);this._on(true,this.element,{remove:function(l){if(l.target===k){this.destroy()}}});this.document=f(k.style?k.ownerDocument:k.document||k);this.window=f(this.document[0].defaultView||this.document[0].parentWindow)}this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:f.noop,_getCreateEventData:f.noop,_create:f.noop,_init:f.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(f.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:f.noop,widget:function(){return this.element},option:function(m,n){var j=m,o,l,k;if(arguments.length===0){return f.widget.extend({},this.options)}if(typeof m==="string"){j={};o=m.split(".");m=o.shift();if(o.length){l=j[m]=f.widget.extend({},this.options[m]);for(k=0;k<o.length-1;k++){l[o[k]]=l[o[k]]||{};l=l[o[k]]}m=o.pop();if(n===i){return l[m]===i?null:l[m]}l[m]=n}else{if(n===i){return this.options[m]===i?null:this.options[m]}j[m]=n}}this._setOptions(j);return this},_setOptions:function(j){var k;for(k in j){this._setOption(k,j[k])}return this},_setOption:function(j,k){this.options[j]=k;if(j==="disabled"){this.widget().toggleClass(this.widgetFullName+"-disabled",!!k);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")}return this},enable:function(){return this._setOptions({disabled:false})},disable:function(){return this._setOptions({disabled:true})},_on:function(m,l,k){var n,j=this;if(typeof m!=="boolean"){k=l;l=m;m=false}if(!k){k=l;l=this.element;n=this.widget()}else{l=n=f(l);this.bindings=this.bindings.add(l)}f.each(k,function(t,s){function q(){if(!m&&(j.options.disabled===true||f(this).hasClass("ui-state-disabled"))){return}return(typeof s==="string"?j[s]:s).apply(j,arguments)}if(typeof s!=="string"){q.guid=s.guid=s.guid||q.guid||f.guid++}var r=t.match(/^(\w+)\s*(.*)$/),p=r[1]+j.eventNamespace,o=r[2];if(o){n.delegate(o,p,q)}else{l.bind(p,q)}})},_off:function(k,j){j=(j||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;k.unbind(j).undelegate(j)},_delay:function(m,l){function k(){return(typeof m==="string"?j[m]:m).apply(j,arguments)}var j=this;return setTimeout(k,l||0)},_hoverable:function(j){this.hoverable=this.hoverable.add(j);this._on(j,{mouseenter:function(k){f(k.currentTarget).addClass("ui-state-hover")},mouseleave:function(k){f(k.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(j){this.focusable=this.focusable.add(j);this._on(j,{focusin:function(k){f(k.currentTarget).addClass("ui-state-focus")},focusout:function(k){f(k.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(j,k,l){var o,n,m=this.options[j];l=l||{};k=f.Event(k);k.type=(j===this.widgetEventPrefix?j:this.widgetEventPrefix+j).toLowerCase();k.target=this.element[0];n=k.originalEvent;if(n){for(o in n){if(!(o in k)){k[o]=n[o]}}}this.element.trigger(k,l);return !(f.isFunction(m)&&m.apply(this.element[0],[k].concat(l))===false||k.isDefaultPrevented())}};f.each({show:"fadeIn",hide:"fadeOut"},function(k,j){f.Widget.prototype["_"+k]=function(n,m,p){if(typeof m==="string"){m={effect:m}}var o,l=!m?k:m===true||typeof m==="number"?j:m.effect||j;m=m||{};if(typeof m==="number"){m={duration:m}}o=!f.isEmptyObject(m);m.complete=p;if(m.delay){n.delay(m.delay)}if(o&&f.effects&&f.effects.effect[l]){n[k](m)}else{if(l!==k&&n[l]){n[l](m.duration,m.easing,p)}else{n.queue(function(q){f(this)[k]();if(p){p.call(n[0])}q()})}}}})})(c);(function(j,h,k){var g={},f=j.find,i=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,e=/:jqmData\(([^)]*)\)/g;j.extend(j.mobile,{ns:"",getAttribute:function(m,l){var o;m=m.jquery?m[0]:m;if(m&&m.getAttribute){o=m.getAttribute("data-"+j.mobile.ns+l)}try{o=o==="true"?true:o==="false"?false:o==="null"?null:+o+""===o?+o:i.test(o)?JSON.parse(o):o}catch(n){}return o},nsNormalizeDict:g,nsNormalize:function(l){return g[l]||(g[l]=j.camelCase(j.mobile.ns+l))},closestPageData:function(l){return l.closest(":jqmData(role='page'), :jqmData(role='dialog')").data("mobile-page")}});j.fn.jqmData=function(n,m){var l;if(typeof n!=="undefined"){if(n){n=j.mobile.nsNormalize(n)}if(arguments.length<2||m===k){l=this.data(n)}else{l=this.data(n,m)}}return l};j.jqmData=function(m,o,n){var l;if(typeof o!=="undefined"){l=j.data(m,o?j.mobile.nsNormalize(o):o,n)}return l};j.fn.jqmRemoveData=function(l){return this.removeData(j.mobile.nsNormalize(l))};j.jqmRemoveData=function(l,m){return j.removeData(l,j.mobile.nsNormalize(m))};j.find=function(m,o,n,l){if(m.indexOf(":jqmData")>-1){m=m.replace(e,"[data-"+(j.mobile.ns||"")+"$1]")}return f.call(this,m,o,n,l)};j.extend(j.find,f)})(c,this);(function(f,h){var e=/[A-Z]/g,g=function(i){return"-"+i.toLowerCase()};f.extend(f.Widget.prototype,{_getCreateOptions:function(){var j,l,k=this.element[0],i={};if(!f.mobile.getAttribute(k,"defaults")){for(j in this.options){l=f.mobile.getAttribute(k,j.replace(e,g));if(l!=null){i[j]=l}}}return i}});f.mobile.widget=f.Widget})(c);(function(g){var f="ui-loader",e=g("html");g.widget("mobile.loader",{options:{theme:"a",textVisible:false,html:"",text:"loading"},defaultHtml:"<div class='"+f+"'><span class='ui-icon-loading'></span><h1></h1></div>",fakeFixLoader:function(){var h=g("."+g.mobile.activeBtnClass).first();this.element.css({top:g.support.scrollTop&&this.window.scrollTop()+this.window.height()/2||h.length&&h.offset().top||100})},checkLoaderPosition:function(){var i=this.element.offset(),h=this.window.scrollTop(),j=g.mobile.getScreenHeight();if(i.top<h||(i.top-h)>j){this.element.addClass("ui-loader-fakefix");this.fakeFixLoader();this.window.unbind("scroll",this.checkLoaderPosition).bind("scroll",g.proxy(this.fakeFixLoader,this))}},resetHtml:function(){this.element.html(g(this.defaultHtml).html())},show:function(l,h,m){var k,i,j;this.resetHtml();if(g.type(l)==="object"){j=g.extend({},this.options,l);l=j.theme}else{j=this.options;l=l||j.theme}i=h||(j.text===false?"":j.text);e.addClass("ui-loading");k=j.textVisible;this.element.attr("class",f+" ui-corner-all ui-body-"+l+" ui-loader-"+(k||h||l.text?"verbose":"default")+(j.textonly||m?" ui-loader-textonly":""));if(j.html){this.element.html(j.html)}else{this.element.find("h1").text(i)}this.element.appendTo(g.mobile.pagecontainer?g(":mobile-pagecontainer"):g("body"));this.checkLoaderPosition();this.window.bind("scroll",g.proxy(this.checkLoaderPosition,this))},hide:function(){e.removeClass("ui-loading");if(this.options.text){this.element.removeClass("ui-loader-fakefix")}this.window.unbind("scroll",this.fakeFixLoader);this.window.unbind("scroll",this.checkLoaderPosition)}})})(c,this);
/*!
* jQuery hashchange event - v1.3 - 7/21/2010
* http://benalman.com/projects/jquery-hashchange-plugin/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
(function($,i,f){var g="hashchange",l=a,j,k=$.event.special,m=l.documentMode,h="on"+g in i&&(m===f||m>7);function e(n){n=n||location.href;return"#"+n.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[g]=function(n){return n?this.bind(g,n):this.trigger(g)};$.fn[g].delay=50;k[g]=$.extend(k[g],{setup:function(){if(h){return false}$(j.start)},teardown:function(){if(h){return false}$(j.stop)}});j=(function(){var n={},t,q=e(),o=function(u){return u},p=o,s=o;n.start=function(){t||r()};n.stop=function(){t&&clearTimeout(t);t=f};function r(){var v=e(),u=s(q);if(v!==q){p(q=v,u);$(i).trigger(g)}else{if(u!==q){location.href=location.href.replace(/#.*/,"")+u}}t=setTimeout(r,$.fn[g].delay)}i.attachEvent&&!i.addEventListener&&!h&&(function(){var u,v;n.start=function(){if(!u){v=$.fn[g].src;v=v&&v+e();u=$('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){v||p(e());r()}).attr("src",v||"javascript:0").insertAfter("body")[0].contentWindow;l.onpropertychange=function(){try{if(event.propertyName==="title"){u.document.title=l.title}}catch(w){}}}};n.stop=o;s=function(){return e(u.location.href)};p=function(z,w){var y=u.document,x=$.fn[g].domain;if(z!==w){y.title=l.title;y.open();x&&y.write('\x3cscript>document.domain="'+x+'"\x3c/script>');y.close();u.location.hash=z}}})();return n})()})(c,this);(function(e,f){
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
b.matchMedia=b.matchMedia||(function(k,l){var i,g=k.documentElement,h=g.firstElementChild||g.firstChild,j=k.createElement("body"),m=k.createElement("div");m.id="mq-test-1";m.style.cssText="position:absolute;top:-100em";j.style.background="none";j.appendChild(m);return function(n){m.innerHTML='­<style media="'+n+'"> #mq-test-1 { width: 42px; }</style>';g.insertBefore(j,h);i=m.offsetWidth===42;g.removeChild(j);return{matches:i,media:n}}}(a));e.mobile.media=function(g){return b.matchMedia(g).matches}})(c);(function(f,g){var e={touch:"ontouchend" in a};f.mobile.support=f.mobile.support||{};f.extend(f.support,e);f.extend(f.mobile.support,e)}(c));(function(e,f){e.extend(e.support,{orientation:"orientation" in b&&"onorientationchange" in b})}(c));(function(k,h){function g(y){var x=y.charAt(0).toUpperCase()+y.substr(1),w=(y+" "+r.join(x+" ")+x).split(" "),u;for(u in w){if(p[w[u]]!==h){return true}}}var i=k("<body>").prependTo("html"),p=i[0].style,r=["Webkit","Moz","O"],t="palmGetResource" in b,q=b.operamini&&({}).toString.call(b.operamini)==="[object OperaMini]",o=b.blackberry&&!g("-webkit-transform"),n;function l(){var u=b,x=!!u.document.createElementNS&&!!u.document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect&&!(u.opera&&navigator.userAgent.indexOf("Chrome")===-1),y=function(w){if(!(w&&x)){k("html").addClass("ui-nosvg")}},v=new u.Image();v.onerror=function(){y(false)};v.onload=function(){y(v.width===1&&v.height===1)};v.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="}function j(){var y="transform-3d",u=k.mobile.media("(-"+r.join("-"+y+"),(-")+"-"+y+"),("+y+")"),x,w,v;if(u){return !!u}x=a.createElement("div");w={MozTransform:"-moz-transform",transform:"transform"};i.append(x);for(v in w){if(x.style[v]!==h){x.style[v]="translate3d( 100px, 1px, 1px )";u=b.getComputedStyle(x).getPropertyValue(w[v])}}return(!!u&&u!=="none")}function f(){var y=location.protocol+"//"+location.host+location.pathname+"ui-dir/",x=k("head base"),z=null,u="",w,v;if(!x.length){x=z=k("<base>",{href:y}).appendTo("head")}else{u=x.attr("href")}w=k("<a href='testurl' />").prependTo(i);v=w[0].href;x[0].href=u||location.pathname;if(z){z.remove()}return v.indexOf(y)===0}function s(){var v=a.createElement("x"),w=a.documentElement,x=b.getComputedStyle,u;if(!("pointerEvents" in v.style)){return false}v.style.pointerEvents="auto";v.style.pointerEvents="x";w.appendChild(v);u=x&&x(v,"").pointerEvents==="auto";w.removeChild(v);return !!u}function e(){var u=a.createElement("div");return typeof u.getBoundingClientRect!=="undefined"}k.extend(k.mobile,{browser:{}});k.mobile.browser.oldIE=(function(){var w=3,x=a.createElement("div"),u=x.all||[];do{x.innerHTML="<!--[if gt IE "+(++w)+"]><br><![endif]-->"}while(u[0]);return w>4?w:!w})();function m(){var D=b,v=navigator.userAgent,y=navigator.platform,C=v.match(/AppleWebKit\/([0-9]+)/),B=!!C&&C[1],x=v.match(/Fennec\/([0-9]+)/),z=!!x&&x[1],A=v.match(/Opera Mobi\/([0-9]+)/),u=!!A&&A[1];if(((y.indexOf("iPhone")>-1||y.indexOf("iPad")>-1||y.indexOf("iPod")>-1)&&B&&B<534)||(D.operamini&&({}).toString.call(D.operamini)==="[object OperaMini]")||(A&&u<7458)||(v.indexOf("Android")>-1&&B&&B<533)||(z&&z<6)||("palmGetResource" in b&&B&&B<534)||(v.indexOf("MeeGo")>-1&&v.indexOf("NokiaBrowser/8.5.0")>-1)){return false}return true}k.extend(k.support,{pushState:"pushState" in history&&"replaceState" in history&&!(b.navigator.userAgent.indexOf("Firefox")>=0&&b.top!==b)&&(b.navigator.userAgent.search(/CriOS/)===-1),mediaquery:k.mobile.media("only all"),cssPseudoElement:!!g("content"),touchOverflow:!!g("overflowScrolling"),cssTransform3d:j(),boxShadow:!!g("boxShadow")&&!o,fixedPosition:m(),scrollTop:("pageXOffset" in b||"scrollTop" in a.documentElement||"scrollTop" in i[0])&&!t&&!q,dynamicBaseTag:f(),cssPointerEvents:s(),boundingRect:e(),inlineSVG:l});i.remove();n=(function(){var u=b.navigator.userAgent;return u.indexOf("Nokia")>-1&&(u.indexOf("Symbian/3")>-1||u.indexOf("Series60/5")>-1)&&u.indexOf("AppleWebKit")>-1&&u.match(/(BrowserNG|NokiaBrowser)\/7\.[0-3]/)})();k.mobile.gradeA=function(){return((k.support.mediaquery&&k.support.cssPseudoElement)||k.mobile.browser.oldIE&&k.mobile.browser.oldIE>=8)&&(k.support.boundingRect||k.fn.jquery.match(/1\.[0-7+]\.[0-9+]?/)!==null)};k.mobile.ajaxBlacklist=b.blackberry&&!b.WebKitPoint||q||n;if(n){k(function(){k("head link[rel='stylesheet']").attr("rel","alternate stylesheet").attr("rel","stylesheet")})}if(!k.support.boxShadow){k("html").addClass("ui-noboxshadow")}})(c);(function(g,h){var i=g.mobile.window,f,e=function(){};g.event.special.beforenavigate={setup:function(){i.on("navigate",e)},teardown:function(){i.off("navigate",e)}};g.event.special.navigate=f={bound:false,pushStateEnabled:true,originalEventName:h,isPushStateEnabled:function(){return g.support.pushState&&g.mobile.pushStateEnabled===true&&this.isHashChangeEnabled()},isHashChangeEnabled:function(){return g.mobile.hashListeningEnabled===true},popstate:function(j){var l=new g.Event("navigate"),m=new g.Event("beforenavigate"),k=j.originalEvent.state||{};m.originalEvent=j;i.trigger(m);if(m.isDefaultPrevented()){return}if(j.historyState){g.extend(k,j.historyState)}l.originalEvent=j;setTimeout(function(){i.trigger(l,{state:k})},0)},hashchange:function(j){var k=new g.Event("navigate"),l=new g.Event("beforenavigate");l.originalEvent=j;i.trigger(l);if(l.isDefaultPrevented()){return}k.originalEvent=j;i.trigger(k,{state:j.hashchangeState||{}})},setup:function(){if(f.bound){return}f.bound=true;if(f.isPushStateEnabled()){f.originalEventName="popstate";i.bind("popstate.navigate",f.popstate)}else{if(f.isHashChangeEnabled()){f.originalEventName="hashchange";i.bind("hashchange.navigate",f.hashchange)}}}}})(c);(function(g,i){var h,e,f="&ui-state=dialog";g.mobile.path=h={uiStateKey:"&ui-state",urlParseRE:/^\s*(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,getLocation:function(j){var l=this.parseUrl(j||location.href),k=j?l:location,m=l.hash;m=m==="#"?"":m;return k.protocol+l.doubleSlash+k.host+((k.protocol!==""&&k.pathname.substring(0,1)!=="/")?"/":"")+k.pathname+k.search+m},getDocumentUrl:function(j){return j?g.extend({},h.documentUrl):h.documentUrl.href},parseLocation:function(){return this.parseUrl(this.getLocation())},parseUrl:function(j){if(g.type(j)==="object"){return j}var k=h.urlParseRE.exec(j||"")||[];return{href:k[0]||"",hrefNoHash:k[1]||"",hrefNoSearch:k[2]||"",domain:k[3]||"",protocol:k[4]||"",doubleSlash:k[5]||"",authority:k[6]||"",username:k[8]||"",password:k[9]||"",host:k[10]||"",hostname:k[11]||"",port:k[12]||"",pathname:k[13]||"",directory:k[14]||"",filename:k[15]||"",search:k[16]||"",hash:k[17]||""}},makePathAbsolute:function(m,l){var j,o,k,n;if(m&&m.charAt(0)==="/"){return m}m=m||"";l=l?l.replace(/^\/|(\/[^\/]*|[^\/]+)$/g,""):"";j=l?l.split("/"):[];o=m.split("/");for(k=0;k<o.length;k++){n=o[k];switch(n){case".":break;case"..":if(j.length){j.pop()}break;default:j.push(n);break}}return"/"+j.join("/")},isSameDomain:function(k,j){return h.parseUrl(k).domain.toLowerCase()===h.parseUrl(j).domain.toLowerCase()},isRelativeUrl:function(j){return h.parseUrl(j).protocol===""},isAbsoluteUrl:function(j){return h.parseUrl(j).protocol!==""},makeUrlAbsolute:function(k,m){if(!h.isRelativeUrl(k)){return k}if(m===i){m=this.documentBase}var o=h.parseUrl(k),r=h.parseUrl(m),s=o.protocol||r.protocol,l=o.protocol?o.doubleSlash:(o.doubleSlash||r.doubleSlash),p=o.authority||r.authority,q=o.pathname!=="",j=h.makePathAbsolute(o.pathname||r.filename,r.pathname),t=o.search||(!q&&r.search)||"",n=o.hash;return s+l+p+j+t+n},addSearchParams:function(k,n){var j=h.parseUrl(k),m=(typeof n==="object")?g.param(n):n,l=j.search||"?";return j.hrefNoSearch+l+(l.charAt(l.length-1)!=="?"?"&":"")+m+(j.hash||"")},convertUrlToDataUrl:function(l){var j=l,k=h.parseUrl(l);if(h.isEmbeddedPage(k)){j=k.hash.split(f)[0].replace(/^#/,"").replace(/\?.*$/,"")}else{if(h.isSameDomain(k,this.documentBase)){j=k.hrefNoHash.replace(this.documentBase.domain,"").split(f)[0]}}return b.decodeURIComponent(j)},get:function(j){if(j===i){j=h.parseLocation().hash}return h.stripHash(j).replace(/[^\/]*\.[^\/*]+$/,"")},set:function(j){location.hash=j},isPath:function(j){return(/\//).test(j)},clean:function(j){return j.replace(this.documentBase.domain,"")},stripHash:function(j){return j.replace(/^#/,"")},stripQueryParams:function(j){return j.replace(/\?.*$/,"")},cleanHash:function(j){return h.stripHash(j.replace(/\?.*$/,"").replace(f,""))},isHashValid:function(j){return(/^#[^#]+$/).test(j)},isExternal:function(k){var j=h.parseUrl(k);return !!(j.protocol&&(j.domain.toLowerCase()!==this.documentUrl.domain.toLowerCase()))},hasProtocol:function(j){return(/^(:?\w+:)/).test(j)},isEmbeddedPage:function(k){var j=h.parseUrl(k);if(j.protocol!==""){return(!this.isPath(j.hash)&&j.hash&&(j.hrefNoHash===this.documentUrl.hrefNoHash||(this.documentBaseDiffers&&j.hrefNoHash===this.documentBase.hrefNoHash)))}return(/^#/).test(j.href)},squash:function(j,s){var k,r,t,l,n,p=this.isPath(j),m=this.parseUrl(j),q=m.hash,o="";if(!s){if(p){s=h.getLocation()}else{n=h.getDocumentUrl(true);if(h.isPath(n.hash)){s=h.squash(n.href)}else{s=n.href}}}r=p?h.stripHash(j):j;r=h.isPath(m.hash)?h.stripHash(m.hash):r;l=r.indexOf(this.uiStateKey);if(l>-1){o=r.slice(l);r=r.slice(0,l)}k=h.makeUrlAbsolute(r,s);t=this.parseUrl(k).search;if(p){if(h.isPath(q)||q.replace("#","").indexOf(this.uiStateKey)===0){q=""}if(o&&q.indexOf(this.uiStateKey)===-1){q+=o}if(q.indexOf("#")===-1&&q!==""){q="#"+q}k=h.parseUrl(k);k=k.protocol+k.doubleSlash+k.host+k.pathname+t+q}else{k+=k.indexOf("#")>-1?o:"#"+o}return k},isPreservableHash:function(j){return j.replace("#","").indexOf(this.uiStateKey)===0},hashToSelector:function(k){var j=(k.substring(0,1)==="#");if(j){k=k.substring(1)}return(j?"#":"")+k.replace(/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g,"\\$1")},getFilePath:function(j){return j&&j.split(f)[0]},isFirstPageUrl:function(l){var k=h.parseUrl(h.makeUrlAbsolute(l,this.documentBase)),n=k.hrefNoHash===this.documentUrl.hrefNoHash||(this.documentBaseDiffers&&k.hrefNoHash===this.documentBase.hrefNoHash),j=g.mobile.firstPage,m=j&&j[0]?j[0].id:i;return n&&(!k.hash||k.hash==="#"||(m&&k.hash.replace(/^#/,"")===m))},isPermittedCrossDomainRequest:function(k,j){return g.mobile.allowCrossDomainPages&&(k.protocol==="file:"||k.protocol==="content:")&&j.search(/^https?:/)!==-1}};h.documentUrl=h.parseLocation();e=g("head").find("base");h.documentBase=e.length?h.parseUrl(h.makeUrlAbsolute(e.attr("href"),h.documentUrl.href)):h.documentUrl;h.documentBaseDiffers=(h.documentUrl.hrefNoHash!==h.documentBase.hrefNoHash);h.getDocumentBase=function(j){return j?g.extend({},h.documentBase):h.documentBase.href};g.extend(g.mobile,{getDocumentUrl:h.getDocumentUrl,getDocumentBase:h.getDocumentBase})})(c);(function(e,f){e.mobile.History=function(g,h){this.stack=g||[];this.activeIndex=h||0};e.extend(e.mobile.History.prototype,{getActive:function(){return this.stack[this.activeIndex]},getLast:function(){return this.stack[this.previousIndex]},getNext:function(){return this.stack[this.activeIndex+1]},getPrev:function(){return this.stack[this.activeIndex-1]},add:function(g,h){h=h||{};if(this.getNext()){this.clearForward()}if(h.hash&&h.hash.indexOf("#")===-1){h.hash="#"+h.hash}h.url=g;this.stack.push(h);this.activeIndex=this.stack.length-1},clearForward:function(){this.stack=this.stack.slice(0,this.activeIndex+1)},find:function(k,g,j){g=g||this.stack;var n,l,m=g.length,h;for(l=0;l<m;l++){n=g[l];if(decodeURIComponent(k)===decodeURIComponent(n.url)||decodeURIComponent(k)===decodeURIComponent(n.hash)){h=l;if(j){return h}}}return h},closest:function(h){var i,g=this.activeIndex;i=this.find(h,this.stack.slice(0,g));if(i===f){i=this.find(h,this.stack.slice(g),true);i=i===f?i:i+g}return i},direct:function(h){var i=this.closest(h.url),g=this.activeIndex;if(i!==f){this.activeIndex=i;this.previousIndex=g}if(i<g){(h.present||h.back||e.noop)(this.getActive(),"back")}else{if(i>g){(h.present||h.forward||e.noop)(this.getActive(),"forward")}else{if(i===f&&h.missing){h.missing(this.getActive())}}}}})})(c);(function(f,h){var g=f.mobile.path,e=location.href;f.mobile.Navigator=function(i){this.history=i;this.ignoreInitialHashChange=true;f.mobile.window.bind({"popstate.history":f.proxy(this.popstate,this),"hashchange.history":f.proxy(this.hashchange,this)})};f.extend(f.mobile.Navigator.prototype,{squash:function(j,l){var k,i,m=g.isPath(j)?g.stripHash(j):j;i=g.squash(j);k=f.extend({hash:m,url:i},l);b.history.replaceState(k,k.title||a.title,i);return k},hash:function(l,k){var j,n,m,i;j=g.parseUrl(l);n=g.parseLocation();if(n.pathname+n.search===j.pathname+j.search){m=j.hash?j.hash:j.pathname+j.search}else{if(g.isPath(l)){i=g.parseUrl(k);m=i.pathname+i.search+(g.isPreservableHash(i.hash)?i.hash.replace("#",""):"")}else{m=l}}return m},go:function(k,n,i){var m,j,o,p,l=f.event.special.navigate.isPushStateEnabled();j=g.squash(k);o=this.hash(k,j);if(i&&o!==g.stripHash(g.parseLocation().hash)){this.preventNextHashChange=i}this.preventHashAssignPopState=true;b.location.hash=o;this.preventHashAssignPopState=false;m=f.extend({url:j,hash:o,title:a.title},n);if(l){p=new f.Event("popstate");p.originalEvent={type:"popstate",state:null};this.squash(k,m);if(!i){this.ignorePopState=true;f.mobile.window.trigger(p)}}this.history.add(m.url,m)},popstate:function(i){var k,j;if(!f.event.special.navigate.isPushStateEnabled()){return}if(this.preventHashAssignPopState){this.preventHashAssignPopState=false;i.stopImmediatePropagation();return}if(this.ignorePopState){this.ignorePopState=false;return}if(!i.originalEvent.state&&this.history.stack.length===1&&this.ignoreInitialHashChange){this.ignoreInitialHashChange=false;if(location.href===e){i.preventDefault();return}}k=g.parseLocation().hash;if(!i.originalEvent.state&&k){j=this.squash(k);this.history.add(j.url,j);i.historyState=j;return}this.history.direct({url:(i.originalEvent.state||{}).url||k,present:function(m,l){i.historyState=f.extend({},m);i.historyState.direction=l}})},hashchange:function(i){var k,j;if(!f.event.special.navigate.isHashChangeEnabled()||f.event.special.navigate.isPushStateEnabled()){return}if(this.preventNextHashChange){this.preventNextHashChange=false;i.stopImmediatePropagation();return}k=this.history;j=g.parseLocation().hash;this.history.direct({url:j,present:function(m,l){i.hashchangeState=f.extend({},m);i.hashchangeState.direction=l},missing:function(){k.add(j,{hash:j,title:a.title})}})}})})(c);(function(e,g){e.mobile.navigate=function(i,j,h){e.mobile.navigate.navigator.go(i,j,h)};e.mobile.navigate.history=new e.mobile.History();e.mobile.navigate.navigator=new e.mobile.Navigator(e.mobile.navigate.history);var f=e.mobile.path.parseLocation();e.mobile.navigate.history.add(f.href,{hash:f.hash})})(c);(function(h,i){var f={animation:{},transition:{}},g=a.createElement("a"),e=["","webkit-","moz-","o-"];h.each(["animation","transition"],function(k,l){var j=(k===0)?l+"-name":l;h.each(e,function(m,n){if(g.style[h.camelCase(n+j)]!==i){f[l]["prefix"]=n;return false}});f[l]["duration"]=h.camelCase(f[l]["prefix"]+l+"-duration");f[l]["event"]=h.camelCase(f[l]["prefix"]+l+"-end");if(f[l]["prefix"]===""){f[l]["event"]=f[l]["event"].toLowerCase()}});h.support.cssTransitions=(f.transition["prefix"]!==i);h.support.cssAnimations=(f.animation["prefix"]!==i);h(g).remove();h.fn.animationComplete=function(q,k,j){var p,n,m=this,o=function(){clearTimeout(p);q.apply(this,arguments)},l=(!k||k==="animation")?"animation":"transition";if((h.support.cssTransitions&&l==="transition")||(h.support.cssAnimations&&l==="animation")){if(j===i){if(h(this).context!==a){n=parseFloat(h(this).css(f[l].duration))*3000}if(n===0||n===i||isNaN(n)){n=h.fn.animationComplete.defaultDuration}}p=setTimeout(function(){h(m).off(f[l].event,o);q.apply(m)},n);return h(this).one(f[l].event,o)}else{setTimeout(h.proxy(q,this),0);return h(this)}};h.fn.animationComplete.defaultDuration=1000})(c);(function(B,L,j,q){var K="virtualMouseBindings",f="virtualTouchID",e="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),D=("altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which").split(" "),A="clientX clientY pageX pageY screenX screenY".split(" "),H=B.event.mouseHooks?B.event.mouseHooks.props:[],C=D.concat(H),F={},M=0,w=0,v=0,t=false,P=[],l=false,W=false,y="addEventListener" in j,x=B(j),J=1,S=0,g,Q;B.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};function u(i){while(i&&typeof i.originalEvent!=="undefined"){i=i.originalEvent}return i}function m(Y,Z){var ah=Y.type,ai,ag,aa,X,ae,ad,ac,ab,af;Y=B.Event(Y);Y.type=Z;ai=Y.originalEvent;ag=D;if(ah.search(/^(mouse|click)/)>-1){ag=C}if(ai){for(ac=ag.length,X;ac;){X=ag[--ac];Y[X]=ai[X]}}if(ah.search(/mouse(down|up)|click/)>-1&&!Y.which){Y.which=1}if(ah.search(/^touch/)!==-1){aa=u(ai);ah=aa.touches;ae=aa.changedTouches;ad=(ah&&ah.length)?ah[0]:((ae&&ae.length)?ae[0]:q);if(ad){for(ab=0,af=A.length;ab<af;ab++){X=A[ab];Y[X]=ad[X]}}}return Y}function U(Z){var X={},i,Y;while(Z){i=B.data(Z,K);for(Y in i){if(i[Y]){X[Y]=X.hasVirtualBinding=true}}Z=Z.parentNode}return X}function G(Y,X){var i;while(Y){i=B.data(Y,K);if(i&&(!X||i[X])){return Y}Y=Y.parentNode}return null}function O(){W=false}function o(){W=true}function V(){S=0;P.length=0;l=false;o()}function s(){O()}function z(){E();M=setTimeout(function(){M=0;V()},B.vmouse.resetTimerDuration)}function E(){if(M){clearTimeout(M);M=0}}function r(Y,Z,i){var X;if((i&&i[Y])||(!i&&G(Z.target,Y))){X=m(Z,Y);B(Z.target).trigger(X)}return X}function n(X){var Y=B.data(X.target,f),i;if(!l&&(!S||S!==Y)){i=r("v"+X.type,X);if(i){if(i.isDefaultPrevented()){X.preventDefault()}if(i.isPropagationStopped()){X.stopPropagation()}if(i.isImmediatePropagationStopped()){X.stopImmediatePropagation()}}}}function T(Y){var aa=u(Y).touches,Z,i,X;if(aa&&aa.length===1){Z=Y.target;i=U(Z);if(i.hasVirtualBinding){S=J++;B.data(Z,f,S);E();s();t=false;X=u(Y).touches[0];w=X.pageX;v=X.pageY;r("vmouseover",Y,i);r("vmousedown",Y,i)}}}function N(i){if(W){return}if(!t){r("vmousecancel",i,U(i.target))}t=true;z()}function h(aa){if(W){return}var Y=u(aa).touches[0],X=t,Z=B.vmouse.moveDistanceThreshold,i=U(aa.target);t=t||(Math.abs(Y.pageX-w)>Z||Math.abs(Y.pageY-v)>Z);if(t&&!X){r("vmousecancel",aa,i)}r("vmousemove",aa,i);z()}function k(Z){if(W){return}o();var i=U(Z.target),X,Y;r("vmouseup",Z,i);if(!t){X=r("vclick",Z,i);if(X&&X.isDefaultPrevented()){Y=u(Z).changedTouches[0];P.push({touchID:S,x:Y.clientX,y:Y.clientY});l=true}}r("vmouseout",Z,i);t=false;z()}function I(X){var Y=B.data(X,K),i;if(Y){for(i in Y){if(Y[i]){return true}}}return false}function R(){}function p(i){var X=i.substr(1);return{setup:function(){if(!I(this)){B.data(this,K,{})}var Y=B.data(this,K);Y[i]=true;F[i]=(F[i]||0)+1;if(F[i]===1){x.bind(X,n)}B(this).bind(X,R);if(y){F.touchstart=(F.touchstart||0)+1;if(F.touchstart===1){x.bind("touchstart",T).bind("touchend",k).bind("touchmove",h).bind("scroll",N)}}},teardown:function(){--F[i];if(!F[i]){x.unbind(X,n)}if(y){--F.touchstart;if(!F.touchstart){x.unbind("touchstart",T).unbind("touchmove",h).unbind("touchend",k).unbind("scroll",N)}}var Y=B(this),Z=B.data(this,K);if(Z){Z[i]=false}Y.unbind(X,R);if(!I(this)){Y.removeData(K)}}}}for(Q=0;Q<e.length;Q++){B.event.special[e[Q]]=p(e[Q])}if(y){j.addEventListener("click",function(ab){var Y=P.length,ac=ab.target,ae,ad,af,aa,X,Z;if(Y){ae=ab.clientX;ad=ab.clientY;g=B.vmouse.clickDistanceThreshold;af=ac;while(af){for(aa=0;aa<Y;aa++){X=P[aa];Z=0;if((af===ac&&Math.abs(X.x-ae)<g&&Math.abs(X.y-ad)<g)||B.data(af,f)===X.touchID){ab.preventDefault();ab.stopPropagation();return}}af=af.parentNode}}},true)}})(c,b,a);(function(h,m,e){var f=h(a),i=h.mobile.support.touch,j="touchmove scroll",n=i?"touchstart":"mousedown",l=i?"touchend":"mouseup",g=i?"touchmove":"mousemove";h.each(("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop").split(" "),function(p,o){h.fn[o]=function(q){return q?this.bind(o,q):this.trigger(o)};if(h.attrFn){h.attrFn[o]=true}});function k(s,p,r,o){var q=r.type;r.type=p;if(o){h.event.trigger(r,e,s)}else{h.event.dispatch.call(s,r)}r.type=q}h.event.special.scrollstart={enabled:true,setup:function(){var o=this,r=h(o),q,s;function p(t,u){q=u;k(o,q?"scrollstart":"scrollstop",t)}r.bind(j,function(t){if(!h.event.special.scrollstart.enabled){return}if(!q){p(t,true)}clearTimeout(s);s=setTimeout(function(){p(t,false)},50)})},teardown:function(){h(this).unbind(j)}};h.event.special.tap={tapholdThreshold:750,emitTapOnTaphold:true,setup:function(){var o=this,q=h(o),p=false;q.bind("vmousedown",function(t){p=false;if(t.which&&t.which!==1){return false}var s=t.target,w;function r(){clearTimeout(w)}function v(){r();q.unbind("vclick",u).unbind("vmouseup",r);f.unbind("vmousecancel",v)}function u(x){v();if(!p&&s===x.target){k(o,"tap",x)}else{if(p){x.preventDefault()}}}q.bind("vmouseup",r).bind("vclick",u);f.bind("vmousecancel",v);w=setTimeout(function(){if(!h.event.special.tap.emitTapOnTaphold){p=true}k(o,"taphold",h.Event("taphold",{target:s}))},h.event.special.tap.tapholdThreshold)})},teardown:function(){h(this).unbind("vmousedown").unbind("vclick").unbind("vmouseup");f.unbind("vmousecancel")}};h.event.special.swipe={scrollSupressionThreshold:30,durationThreshold:1000,horizontalDistanceThreshold:30,verticalDistanceThreshold:30,getLocation:function(r){var q=m.pageXOffset,p=m.pageYOffset,o=r.clientX,s=r.clientY;if(r.pageY===0&&Math.floor(s)>Math.floor(r.pageY)||r.pageX===0&&Math.floor(o)>Math.floor(r.pageX)){o=o-q;s=s-p}else{if(s<(r.pageY-p)||o<(r.pageX-q)){o=r.pageX-q;s=r.pageY-p}}return{x:o,y:s}},start:function(p){var q=p.originalEvent.touches?p.originalEvent.touches[0]:p,o=h.event.special.swipe.getLocation(q);return{time:(new Date()).getTime(),coords:[o.x,o.y],origin:h(p.target)}},stop:function(p){var q=p.originalEvent.touches?p.originalEvent.touches[0]:p,o=h.event.special.swipe.getLocation(q);return{time:(new Date()).getTime(),coords:[o.x,o.y]}},handleSwipe:function(s,p,o,q){if(p.time-s.time<h.event.special.swipe.durationThreshold&&Math.abs(s.coords[0]-p.coords[0])>h.event.special.swipe.horizontalDistanceThreshold&&Math.abs(s.coords[1]-p.coords[1])<h.event.special.swipe.verticalDistanceThreshold){var r=s.coords[0]>p.coords[0]?"swipeleft":"swiperight";k(o,"swipe",h.Event("swipe",{target:q,swipestart:s,swipestop:p}),true);k(o,r,h.Event(r,{target:q,swipestart:s,swipestop:p}),true);return true}return false},eventInProgress:false,setup:function(){var q,o=this,r=h(o),p={};q=h.data(this,"mobile-events");if(!q){q={length:0};h.data(this,"mobile-events",q)}q.length++;q.swipe=p;p.start=function(u){if(h.event.special.swipe.eventInProgress){return}h.event.special.swipe.eventInProgress=true;var s,w=h.event.special.swipe.start(u),t=u.target,v=false;p.move=function(x){if(!w||x.isDefaultPrevented()){return}s=h.event.special.swipe.stop(x);if(!v){v=h.event.special.swipe.handleSwipe(w,s,o,t);if(v){h.event.special.swipe.eventInProgress=false}}if(Math.abs(w.coords[0]-s.coords[0])>h.event.special.swipe.scrollSupressionThreshold){x.preventDefault()}};p.stop=function(){v=true;h.event.special.swipe.eventInProgress=false;f.off(g,p.move);p.move=null};f.on(g,p.move).one(l,p.stop)};r.on(n,p.start)},teardown:function(){var p,o;p=h.data(this,"mobile-events");if(p){o=p.swipe;delete p.swipe;p.length--;if(p.length===0){h.removeData(this,"mobile-events")}}if(o){if(o.start){h(this).off(n,o.start)}if(o.move){f.off(g,o.move)}if(o.stop){f.off(l,o.stop)}}}};h.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(p,o){h.event.special[p]={setup:function(){h(this).bind(o,h.noop)},teardown:function(){h(this).unbind(o)}}})})(c,this);(function(i){i.event.special.throttledresize={setup:function(){i(this).bind("resize",g)},teardown:function(){i(this).unbind("resize",g)}};var h=250,g=function(){k=(new Date()).getTime();j=k-f;if(j>=h){f=k;i(this).trigger("throttledresize")}else{if(e){clearTimeout(e)}e=setTimeout(g,h-j)}},f=0,e,k,j})(c);(function(j,o){var m=j(o),l="orientationchange",f,k,g,p,n={"0":true,"180":true},i,e,h;if(j.support.orientation){i=o.innerWidth||m.width();e=o.innerHeight||m.height();h=50;g=i>e&&(i-e)>h;p=n[o.orientation];if((g&&p)||(!g&&!p)){n={"-90":true,"90":true}}}j.event.special.orientationchange=j.extend({},j.event.special.orientationchange,{setup:function(){if(j.support.orientation&&!j.event.special.orientationchange.disabled){return false}k=f();m.bind("throttledresize",q)},teardown:function(){if(j.support.orientation&&!j.event.special.orientationchange.disabled){return false}m.unbind("throttledresize",q)},add:function(r){var s=r.handler;r.handler=function(t){t.orientation=f();return s.apply(this,arguments)}}});function q(){var r=f();if(r!==k){k=r;m.trigger(l)}}j.event.special.orientationchange.orientation=f=function(){var s=true,r=a.documentElement;if(j.support.orientation){s=n[o.orientation]}else{s=r&&r.clientWidth/r.clientHeight<1.1}return s?"portrait":"landscape"};j.fn[l]=function(r){return r?this.bind(l,r):this.trigger(l)};if(j.attrFn){j.attrFn[l]=true}}(c,this));(function(g,h){var e=g("head").children("base"),f={element:(e.length?e:g("<base>",{href:g.mobile.path.documentBase.hrefNoHash}).prependTo(g("head"))),linkSelector:"[src], link[href], a[rel='external'], :jqmData(ajax='false'), a[target]",set:function(i){if(!g.mobile.dynamicBaseEnabled){return}if(g.support.dynamicBaseTag){f.element.attr("href",g.mobile.path.makeUrlAbsolute(i,g.mobile.path.documentBase))}},rewrite:function(i,k){var j=g.mobile.path.get(i);k.find(f.linkSelector).each(function(m,n){var p=g(n).is("[href]")?"href":g(n).is("[src]")?"src":"action",o=g.mobile.path.parseLocation(),l=g(n).attr(p);l=l.replace(o.protocol+o.doubleSlash+o.host+o.pathname,"");if(!/^(\w+:|#|\/)/.test(l)){g(n).attr(p,j+l)}})},reset:function(){f.element.attr("href",g.mobile.path.documentBase.hrefNoSearch)}};g.mobile.base=f})(c);(function(g,h){g.mobile.widgets={};var e=g.widget,f=g.mobile.keepNative;g.widget=(function(i){return function(){var k=i.apply(this,arguments),j=k.prototype.widgetName;k.initSelector=((k.prototype.initSelector!==h)?k.prototype.initSelector:":jqmData(role='"+j+"')");g.mobile.widgets[j]=k;return k}})(g.widget);g.extend(g.widget,e);g.mobile.document.on("create",function(i){g(i.target).enhanceWithin()});g.widget("mobile.page",{options:{theme:"a",domCache:false,keepNativeDefault:g.mobile.keepNative,contentTheme:null,enhanced:false},_createWidget:function(){g.Widget.prototype._createWidget.apply(this,arguments);this._trigger("init")},_create:function(){if(this._trigger("beforecreate")===false){return false}if(!this.options.enhanced){this._enhance()}this._on(this.element,{pagebeforehide:"removeContainerBackground",pagebeforeshow:"_handlePageBeforeShow"});this.element.enhanceWithin();if(g.mobile.getAttribute(this.element[0],"role")==="dialog"&&g.mobile.dialog){this.element.dialog()}},_enhance:function(){var j="data-"+g.mobile.ns,i=this;if(this.options.role){this.element.attr("data-"+g.mobile.ns+"role",this.options.role)}this.element.attr("tabindex","0").addClass("ui-page ui-page-theme-"+this.options.theme);this.element.find("["+j+"role='content']").each(function(){var l=g(this),k=this.getAttribute(j+"theme")||h;i.options.contentTheme=k||i.options.contentTheme||(i.options.dialog&&i.options.theme)||(i.element.jqmData("role")==="dialog"&&i.options.theme);l.addClass("ui-content");if(i.options.contentTheme){l.addClass("ui-body-"+(i.options.contentTheme))}l.attr("role","main").addClass("ui-content")})},bindRemove:function(j){var i=this.element;if(!i.data("mobile-page").options.domCache&&i.is(":jqmData(external-page='true')")){i.bind("pagehide.remove",j||function(n,l){if(!l.samePage){var m=g(this),k=new g.Event("pageremove");m.trigger(k);if(!k.isDefaultPrevented()){m.removeWithDependents()}}})}},_setOptions:function(i){if(i.theme!==h){this.element.removeClass("ui-page-theme-"+this.options.theme).addClass("ui-page-theme-"+i.theme)}if(i.contentTheme!==h){this.element.find("[data-"+g.mobile.ns+"='content']").removeClass("ui-body-"+this.options.contentTheme).addClass("ui-body-"+i.contentTheme)}},_handlePageBeforeShow:function(){this.setContainerBackground()},removeContainerBackground:function(){this.element.closest(":mobile-pagecontainer").pagecontainer({theme:"none"})},setContainerBackground:function(i){this.element.parent().pagecontainer({theme:i||this.options.theme})},keepNativeSelector:function(){var k=this.options,j=g.trim(k.keepNative||""),l=g.trim(g.mobile.keepNative),n=g.trim(k.keepNativeDefault),m=(f===l?"":l),i=(m===""?n:"");return((j?[j]:[]).concat(m?[m]:[]).concat(i?[i]:[]).join(", "))}})})(c);(function(f,h){f.widget("mobile.pagecontainer",{options:{theme:"a"},initSelector:false,_create:function(){this._trigger("beforecreate");this.setLastScrollEnabled=true;this._on(this.window,{navigate:"_disableRecordScroll",scrollstop:"_delayedRecordScroll"});this._on(this.window,{navigate:"_filterNavigateEvents"});this._on({pagechange:"_afterContentChange"});this.window.one("navigate",f.proxy(function(){this.setLastScrollEnabled=true},this))},_setOptions:function(i){if(i.theme!==h&&i.theme!=="none"){this.element.removeClass("ui-overlay-"+this.options.theme).addClass("ui-overlay-"+i.theme)}else{if(i.theme!==h){this.element.removeClass("ui-overlay-"+this.options.theme)}}this._super(i)},_disableRecordScroll:function(){this.setLastScrollEnabled=false},_enableRecordScroll:function(){this.setLastScrollEnabled=true},_afterContentChange:function(){this.setLastScrollEnabled=true;this._off(this.window,"scrollstop");this._on(this.window,{scrollstop:"_delayedRecordScroll"})},_recordScroll:function(){if(!this.setLastScrollEnabled){return}var k=this._getActiveHistory(),i,l,j;if(k){i=this._getScroll();l=this._getMinScroll();j=this._getDefaultScroll();k.lastScroll=i<l?j:i}},_delayedRecordScroll:function(){setTimeout(f.proxy(this,"_recordScroll"),100)},_getScroll:function(){return this.window.scrollTop()},_getMinScroll:function(){return f.mobile.minScrollBack},_getDefaultScroll:function(){return f.mobile.defaultHomeScroll},_filterNavigateEvents:function(k,j){var i;if(k.originalEvent&&k.originalEvent.isDefaultPrevented()){return}i=k.originalEvent.type.indexOf("hashchange")>-1?j.state.hash:j.state.url;if(!i){i=this._getHash()}if(!i||i==="#"||i.indexOf("#"+f.mobile.path.uiStateKey)===0){i=location.href}this._handleNavigate(i,j.state)},_getHash:function(){return f.mobile.path.parseLocation().hash},getActivePage:function(){return this.activePage},_getInitialContent:function(){return f.mobile.firstPage},_getHistory:function(){return f.mobile.navigate.history},_getActiveHistory:function(){return this._getHistory().getActive()},_getDocumentBase:function(){return f.mobile.path.documentBase},back:function(){this.go(-1)},forward:function(){this.go(1)},go:function(j){if(f.mobile.hashListeningEnabled){b.history.go(j)}else{var i=f.mobile.navigate.history.activeIndex,l=i+parseInt(j,10),k=f.mobile.navigate.history.stack[l].url,m=(j>=1)?"forward":"back";f.mobile.navigate.history.activeIndex=l;f.mobile.navigate.history.previousIndex=i;this.change(k,{direction:m,changeHash:false,fromHashChange:true})}},_handleDestination:function(j){var i;if(f.type(j)==="string"){j=f.mobile.path.stripHash(j)}if(j){i=this._getHistory();j=!f.mobile.path.isPath(j)?(f.mobile.path.makeUrlAbsolute("#"+j,this._getDocumentBase())):j}return j||this._getInitialContent()},_transitionFromHistory:function(l,j){var k=this._getHistory(),i=(l==="back"?k.getLast():k.getActive());return(i&&i.transition)||j},_handleDialog:function(i,j){var m,l,k=this.getActivePage();if(k&&!k.data("mobile-dialog")){if(j.direction==="back"){this.back()}else{this.forward()}return false}else{m=j.pageUrl;l=this._getActiveHistory();f.extend(i,{role:l.role,transition:this._transitionFromHistory(j.direction,i.transition),reverse:j.direction==="back"})}return m},_handleNavigate:function(i,k){var n=f.mobile.path.stripHash(i),l=this._getHistory(),m=l.stack.length===0?"none":this._transitionFromHistory(k.direction),j={changeHash:false,fromHashChange:true,reverse:k.direction==="back"};f.extend(j,k,{transition:m});if(l.activeIndex>0&&n.indexOf(f.mobile.dialogHashKey)>-1){n=this._handleDialog(j,k);if(n===false){return}}this._changeContent(this._handleDestination(n),j)},_changeContent:function(j,i){f.mobile.changePage(j,i)},_getBase:function(){return f.mobile.base},_getNs:function(){return f.mobile.ns},_enhance:function(i,j){return i.page({role:j})},_include:function(j,i){j.appendTo(this.element);this._enhance(j,i.role);j.page("bindRemove")},_find:function(j){var i=this._createFileUrl(j),m=this._createDataUrl(j),l,k=this._getInitialContent();l=this.element.children("[data-"+this._getNs()+"url='"+f.mobile.path.hashToSelector(m)+"']");if(l.length===0&&m&&!f.mobile.path.isPath(m)){l=this.element.children(f.mobile.path.hashToSelector("#"+m)).attr("data-"+this._getNs()+"url",m).jqmData("url",m)}if(l.length===0&&f.mobile.path.isFirstPageUrl(i)&&k&&k.parent().length){l=f(k)}return l},_getLoader:function(){return f.mobile.loading()},_showLoading:function(i,j,l,k){if(this._loadMsg){return}this._loadMsg=setTimeout(f.proxy(function(){this._getLoader().loader("show",j,l,k);this._loadMsg=0},this),i)},_hideLoading:function(){clearTimeout(this._loadMsg);this._loadMsg=0;this._getLoader().loader("hide")},_showError:function(){this._hideLoading();this._showLoading(0,f.mobile.pageLoadErrorMessageTheme,f.mobile.pageLoadErrorMessage,true);setTimeout(f.proxy(this,"_hideLoading"),1500)},_parse:function(j,i){var l,k=f("<div></div>");k.get(0).innerHTML=j;l=k.find(":jqmData(role='page'), :jqmData(role='dialog')").first();if(!l.length){l=f("<div data-"+this._getNs()+"role='page'>"+(j.split(/<\/?body[^>]*>/gmi)[1]||"")+"</div>")}l.attr("data-"+this._getNs()+"url",this._createDataUrl(i)).attr("data-"+this._getNs()+"external-page",true);return l},_setLoadedTitle:function(k,j){var i=j.match(/<title[^>]*>([^<]*)/)&&RegExp.$1;if(i&&!k.jqmData("title")){i=f("<div>"+i+"</div>").text();k.jqmData("title",i)}},_isRewritableBaseTag:function(){return f.mobile.dynamicBaseEnabled&&!f.support.dynamicBaseTag},_createDataUrl:function(i){return f.mobile.path.convertUrlToDataUrl(i)},_createFileUrl:function(i){return f.mobile.path.getFilePath(i)},_triggerWithDeprecated:function(j,m,l){var i=f.Event("page"+j),k=f.Event(this.widgetName+j);(l||this.element).trigger(i,m);this._trigger(j,k,m);return{deprecatedEvent:i,event:k}},_loadSuccess:function(k,m,l,j){var i=this._createFileUrl(k);return f.proxy(function(o,s,r){var p,q=new RegExp("(<[^>]+\\bdata-"+this._getNs()+"role=[\"']?page[\"']?[^>]*>)"),n=new RegExp("\\bdata-"+this._getNs()+"url=[\"']?([^\"'>]*)[\"']?");if(q.test(o)&&RegExp.$1&&n.test(RegExp.$1)&&RegExp.$1){i=f.mobile.path.getFilePath(f("<div>"+RegExp.$1+"</div>").text());i=this.window[0].encodeURIComponent(i)}if(l.prefetch===h){this._getBase().set(i)}p=this._parse(o,i);this._setLoadedTitle(p,o);m.xhr=r;m.textStatus=s;m.page=p;m.content=p;m.toPage=p;if(this._triggerWithDeprecated("load",m).event.isDefaultPrevented()){return}if(this._isRewritableBaseTag()&&p){this._getBase().rewrite(i,p)}this._include(p,l);if(l.showLoadMsg){this._hideLoading()}j.resolve(k,l,p)},this)},_loadDefaults:{type:"get",data:h,reloadPage:false,reload:false,role:h,showLoadMsg:false,loadMsgDelay:50},load:function(j,s){var r=(s&&s.deferred)||f.Deferred(),o=((s&&s.reload===h&&s.reloadPage!==h)?{reload:s.reloadPage}:{}),k=f.extend({},this._loadDefaults,s,o),m=null,l=f.mobile.path.makeUrlAbsolute(j,this._findBaseWithDefault()),p,n,q,i;if(k.data&&k.type==="get"){l=f.mobile.path.addSearchParams(l,k.data);k.data=h}if(k.data&&k.type==="post"){k.reload=true}p=this._createFileUrl(l);n=this._createDataUrl(l);m=this._find(l);if(m.length===0&&f.mobile.path.isEmbeddedPage(p)&&!f.mobile.path.isFirstPageUrl(p)){r.reject(l,k);return r.promise()}this._getBase().reset();if(m.length&&!k.reload){this._enhance(m,k.role);r.resolve(l,k,m);if(!k.prefetch){this._getBase().set(j)}return r.promise()}i={url:j,absUrl:l,toPage:j,prevPage:s?s.fromPage:h,dataUrl:n,deferred:r,options:k};q=this._triggerWithDeprecated("beforeload",i);if(q.deprecatedEvent.isDefaultPrevented()||q.event.isDefaultPrevented()){return r.promise()}if(k.showLoadMsg){this._showLoading(k.loadMsgDelay)}if(k.prefetch===h){this._getBase().reset()}if(!(f.mobile.allowCrossDomainPages||f.mobile.path.isSameDomain(f.mobile.path.documentUrl,l))){r.reject(l,k);return r.promise()}f.ajax({url:p,type:k.type,data:k.data,contentType:k.contentType,dataType:"html",success:this._loadSuccess(l,i,k,r),error:this._loadError(l,i,k,r)});return r.promise()},_loadError:function(j,l,k,i){return f.proxy(function(o,p,m){this._getBase().set(f.mobile.path.get());l.xhr=o;l.textStatus=p;l.errorThrown=m;var n=this._triggerWithDeprecated("loadfailed",l);if(n.deprecatedEvent.isDefaultPrevented()||n.event.isDefaultPrevented()){return}if(k.showLoadMsg){this._showError()}i.reject(j,k)},this)},_getTransitionHandler:function(i){i=f.mobile._maybeDegradeTransition(i);return f.mobile.transitionHandlers[i]||f.mobile.defaultTransitionHandler},_triggerCssTransitionEvents:function(l,k,j){var i=false;j=j||"";if(k){if(l[0]===k[0]){i=true}this._triggerWithDeprecated(j+"hide",{nextPage:l,toPage:l,prevPage:k,samePage:i},k)}this._triggerWithDeprecated(j+"show",{prevPage:k||f(""),toPage:l},l)},_cssTransition:function(p,o,l){var n=l.transition,k=l.reverse,j=l.deferred,i,m;this._triggerCssTransitionEvents(p,o,"before");this._hideLoading();i=this._getTransitionHandler(n);m=(new i(n,k,p,o)).transition();m.done(f.proxy(function(){this._triggerCssTransitionEvents(p,o)},this));m.done(function(){j.resolve.apply(j,arguments)})},_releaseTransitionLock:function(){g=false;if(e.length>0){f.mobile.changePage.apply(null,e.pop())}},_removeActiveLinkClass:function(i){f.mobile.removeActiveLinkClass(i)},_loadUrl:function(k,j,i){i.target=k;i.deferred=f.Deferred();this.load(k,i);i.deferred.done(f.proxy(function(m,l,n){g=false;l.absUrl=j.absUrl;this.transition(n,j,l)},this));i.deferred.fail(f.proxy(function(){this._removeActiveLinkClass(true);this._releaseTransitionLock();this._triggerWithDeprecated("changefailed",j)},this))},_triggerPageBeforeChange:function(l,k,j){var i;k.prevPage=this.activePage;f.extend(k,{toPage:l,options:j});if(f.type(l)==="string"){k.absUrl=f.mobile.path.makeUrlAbsolute(l,this._findBaseWithDefault())}else{k.absUrl=j.absUrl}i=this._triggerWithDeprecated("beforechange",k);if(i.event.isDefaultPrevented()||i.deprecatedEvent.isDefaultPrevented()){return false}return true},change:function(l,i){if(g){e.unshift(arguments);return}var k=f.extend({},f.mobile.changePage.defaults,i),j={};k.fromPage=k.fromPage||this.activePage;if(!this._triggerPageBeforeChange(l,j,k)){return}l=j.toPage;if(f.type(l)==="string"){g=true;this._loadUrl(l,j,k)}else{this.transition(l,j,k)}},transition:function(k,i,u){var y,l,s,r,o,j,q,m,n,v,w,x,p,z;if(g){e.unshift([k,u]);return}if(!this._triggerPageBeforeChange(k,i,u)){return}i.prevPage=u.fromPage;z=this._triggerWithDeprecated("beforetransition",i);if(z.deprecatedEvent.isDefaultPrevented()||z.event.isDefaultPrevented()){return}g=true;if(k[0]===f.mobile.firstPage[0]&&!u.dataUrl){u.dataUrl=f.mobile.path.documentUrl.hrefNoHash}y=u.fromPage;l=(u.dataUrl&&f.mobile.path.convertUrlToDataUrl(u.dataUrl))||k.jqmData("url");s=l;r=f.mobile.path.getFilePath(l);o=f.mobile.navigate.history.getActive();j=f.mobile.navigate.history.activeIndex===0;q=0;m=a.title;n=(u.role==="dialog"||k.jqmData("role")==="dialog")&&k.jqmData("dialog")!==true;if(y&&y[0]===k[0]&&!u.allowSamePageTransition){g=false;this._triggerWithDeprecated("transition",i);this._triggerWithDeprecated("change",i);if(u.fromHashChange){f.mobile.navigate.history.direct({url:l})}return}k.page({role:u.role});if(u.fromHashChange){q=u.direction==="back"?-1:1}try{if(a.activeElement&&a.activeElement.nodeName.toLowerCase()!=="body"){f(a.activeElement).blur()}else{f("input:focus, textarea:focus, select:focus").blur()}}catch(t){}v=false;if(n&&o){if(o.url&&o.url.indexOf(f.mobile.dialogHashKey)>-1&&this.activePage&&!this.activePage.hasClass("ui-dialog")&&f.mobile.navigate.history.activeIndex>0){u.changeHash=false;v=true}l=(o.url||"");if(!v&&l.indexOf("#")>-1){l+=f.mobile.dialogHashKey}else{l+="#"+f.mobile.dialogHashKey}}w=(!o)?m:k.jqmData("title")||k.children(":jqmData(role='header')").find(".ui-title").text();if(!!w&&m===a.title){m=w}if(!k.jqmData("title")){k.jqmData("title",m)}u.transition=u.transition||((q&&!j)?o.transition:h)||(n?f.mobile.defaultDialogTransition:f.mobile.defaultPageTransition);if(!q&&v){f.mobile.navigate.history.getActive().pageUrl=s}if(l&&!u.fromHashChange){if(!f.mobile.path.isPath(l)&&l.indexOf("#")<0){l="#"+l}x={transition:u.transition,title:m,pageUrl:s,role:u.role};if(u.changeHash!==false&&f.mobile.hashListeningEnabled){f.mobile.navigate(this.window[0].encodeURI(l),x,true)}else{if(k[0]!==f.mobile.firstPage[0]){f.mobile.navigate.history.add(l,x)}}}a.title=m;f.mobile.activePage=k;this.activePage=k;u.reverse=u.reverse||q<0;p=f.Deferred();this._cssTransition(k,y,{transition:u.transition,reverse:u.reverse,deferred:p});p.done(f.proxy(function(B,A,E,D,C){f.mobile.removeActiveLinkClass();if(u.duplicateCachedPage){u.duplicateCachedPage.remove()}if(!C){f.mobile.focusPage(k)}this._releaseTransitionLock();this._triggerWithDeprecated("transition",i);this._triggerWithDeprecated("change",i)},this))},_findBaseWithDefault:function(){var i=(this.activePage&&f.mobile.getClosestBaseUrl(this.activePage));return i||f.mobile.path.documentBase.hrefNoHash}});f.mobile.navreadyDeferred=f.Deferred();var e=[],g=false})(c);(function(j,l){var k=j.Deferred(),e=j.Deferred(),i=function(){e.resolve();e=null},h=j.mobile.path.documentUrl,f=null;function g(m){while(m){if((typeof m.nodeName==="string")&&m.nodeName.toLowerCase()==="a"){break}m=m.parentNode}return m}j.mobile.loadPage=function(n,o){var m;o=o||{};m=(o.pageContainer||j.mobile.pageContainer);o.deferred=j.Deferred();m.pagecontainer("load",n,o);return o.deferred.promise()};j.mobile.back=function(){var m=b.navigator;if(this.phonegapNavigationEnabled&&m&&m.app&&m.app.backHistory){m.app.backHistory()}else{j.mobile.pageContainer.pagecontainer("back")}};j.mobile.focusPage=function(n){var o=n.find("[autofocus]"),m=n.find(".ui-title:eq(0)");if(o.length){o.focus();return}if(m.length){m.focus()}else{n.focus()}};j.mobile._maybeDegradeTransition=j.mobile._maybeDegradeTransition||function(m){return m};j.mobile.changePage=function(n,m){j.mobile.pageContainer.pagecontainer("change",n,m)};j.mobile.changePage.defaults={transition:l,reverse:false,changeHash:true,fromHashChange:false,role:l,duplicateCachedPage:l,pageContainer:l,showLoadMsg:true,dataUrl:l,fromPage:l,allowSamePageTransition:false};j.mobile._registerInternalEvents=function(){var m=function(o,r){var q,p=true,s,n,t;if(!j.mobile.ajaxEnabled||o.is(":jqmData(ajax='false')")||!o.jqmHijackable().length||o.attr("target")){return false}q=(f&&f.attr("formaction"))||o.attr("action");t=(o.attr("method")||"get").toLowerCase();if(!q){q=j.mobile.getClosestBaseUrl(o);if(t==="get"){q=j.mobile.path.parseUrl(q).hrefNoSearch}if(q===j.mobile.path.documentBase.hrefNoHash){q=h.hrefNoSearch}}q=j.mobile.path.makeUrlAbsolute(q,j.mobile.getClosestBaseUrl(o));if((j.mobile.path.isExternal(q)&&!j.mobile.path.isPermittedCrossDomainRequest(h,q))){return false}if(!r){s=o.serializeArray();if(f&&f[0].form===o[0]){n=f.attr("name");if(n){j.each(s,function(u,v){if(v.name===n){n="";return false}});if(n){s.push({name:n,value:f.attr("value")})}}}p={url:q,options:{type:t,data:j.param(s),transition:o.jqmData("transition"),reverse:o.jqmData("direction")==="reverse",reloadPage:true}}}return p};j.mobile.document.delegate("form","submit",function(n){var o;if(!n.isDefaultPrevented()){o=m(j(this));if(o){j.mobile.changePage(o.url,o.options);n.preventDefault()}}});j.mobile.document.bind("vclick",function(q){var p,o,r=q.target,n=false;if(q.which>1||!j.mobile.linkBindingEnabled){return}f=j(r);if(j.data(r,"mobile-button")){if(!m(j(r).closest("form"),true)){return}if(r.parentNode){r=r.parentNode}}else{r=g(r);if(!(r&&j.mobile.path.parseUrl(r.getAttribute("href")||"#").hash!=="#")){return}if(!j(r).jqmHijackable().length){return}}if(!!~r.className.indexOf("ui-link-inherit")){if(r.parentNode){o=j.data(r.parentNode,"buttonElements")}}else{o=j.data(r,"buttonElements")}if(o){r=o.outer}else{n=true}p=j(r);if(n){p=p.closest(".ui-btn")}if(p.length>0&&!(p.hasClass("ui-state-disabled"||p.hasClass("ui-disabled")))){j.mobile.removeActiveLinkClass(true);j.mobile.activeClickedLink=p;j.mobile.activeClickedLink.addClass(j.mobile.activeBtnClass)}});j.mobile.document.bind("click",function(n){if(!j.mobile.linkBindingEnabled||n.isDefaultPrevented()){return}var x=g(n.target),v=j(x),r=function(){b.setTimeout(function(){j.mobile.removeActiveLinkClass(true)},200)},u,p,q,o,w,t,s;if(j.mobile.activeClickedLink&&j.mobile.activeClickedLink[0]===n.target.parentNode){r()}if(!x||n.which>1||!v.jqmHijackable().length){return}if(v.is(":jqmData(rel='back')")){j.mobile.back();return false}u=j.mobile.getClosestBaseUrl(v);p=j.mobile.path.makeUrlAbsolute(v.attr("href")||"#",u);if(!j.mobile.ajaxEnabled&&!j.mobile.path.isEmbeddedPage(p)){r();return}if(p.search("#")!==-1&&!(j.mobile.path.isExternal(p)&&j.mobile.path.isAbsoluteUrl(p))){p=p.replace(/[^#]*#/,"");if(!p){n.preventDefault();return}else{if(j.mobile.path.isPath(p)){p=j.mobile.path.makeUrlAbsolute(p,u)}else{p=j.mobile.path.makeUrlAbsolute("#"+p,h.hrefNoHash)}}}q=v.is("[rel='external']")||v.is(":jqmData(ajax='false')")||v.is("[target]");o=q||(j.mobile.path.isExternal(p)&&!j.mobile.path.isPermittedCrossDomainRequest(h,p));if(o){r();return}w=v.jqmData("transition");t=v.jqmData("direction")==="reverse"||v.jqmData("back");s=v.attr("data-"+j.mobile.ns+"rel")||l;j.mobile.changePage(p,{transition:w,reverse:t,role:s,link:v});n.preventDefault()});j.mobile.document.delegate(".ui-page","pageshow.prefetch",function(){var n=[];j(this).find("a:jqmData(prefetch)").each(function(){var o=j(this),p=o.attr("href");if(p&&j.inArray(p,n)===-1){n.push(p);j.mobile.loadPage(p,{role:o.attr("data-"+j.mobile.ns+"rel"),prefetch:true})}})});j.mobile.pageContainer.pagecontainer();j.mobile.document.bind("pageshow",function(){if(e){e.done(j.mobile.resetActivePageHeight)}else{j.mobile.resetActivePageHeight()}});j.mobile.window.bind("throttledresize",j.mobile.resetActivePageHeight)};j(function(){k.resolve()});if(a.readyState==="complete"){i()}else{j.mobile.window.on("load",i)}j.when(k,j.mobile.navreadyDeferred).done(function(){j.mobile._registerInternalEvents()})})(c);(function(f,e,g){f.mobile.Transition=function(){this.init.apply(this,arguments)};f.extend(f.mobile.Transition.prototype,{toPreClass:" ui-page-pre-in",init:function(i,h,k,j){f.extend(this,{name:i,reverse:h,$to:k,$from:j,deferred:new f.Deferred()})},cleanFrom:function(){this.$from.removeClass(f.mobile.activePageClass+" out in reverse "+this.name).height("")},beforeDoneIn:function(){},beforeDoneOut:function(){},beforeStartOut:function(){},doneIn:function(){this.beforeDoneIn();this.$to.removeClass("out in reverse "+this.name).height("");this.toggleViewportClass();if(f.mobile.window.scrollTop()!==this.toScroll){this.scrollPage()}if(!this.sequential){this.$to.addClass(f.mobile.activePageClass)}this.deferred.resolve(this.name,this.reverse,this.$to,this.$from,true)},doneOut:function(k,i,h,j){this.beforeDoneOut();this.startIn(k,i,h,j)},hideIn:function(h){this.$to.css("z-index",-10);h.call(this);this.$to.css("z-index","")},scrollPage:function(){f.event.special.scrollstart.enabled=false;if(f.mobile.hideUrlBar||this.toScroll!==f.mobile.defaultHomeScroll){e.scrollTo(0,this.toScroll)}setTimeout(function(){f.event.special.scrollstart.enabled=true},150)},startIn:function(k,i,h,j){this.hideIn(function(){this.$to.addClass(f.mobile.activePageClass+this.toPreClass);if(!j){f.mobile.focusPage(this.$to)}this.$to.height(k+this.toScroll);if(!h){this.scrollPage()}});this.$to.removeClass(this.toPreClass).addClass(this.name+" in "+i);if(!h){this.$to.animationComplete(f.proxy(function(){this.doneIn()},this))}else{this.doneIn()}},startOut:function(j,i,h){this.beforeStartOut(j,i,h);this.$from.height(j+f.mobile.window.scrollTop()).addClass(this.name+" out"+i)},toggleViewportClass:function(){f.mobile.pageContainer.toggleClass("ui-mobile-viewport-transitioning viewport-"+this.name)},transition:function(){var h,i=this.reverse?" reverse":"",k=f.mobile.getScreenHeight(),j=f.mobile.maxTransitionWidth!==false&&f.mobile.window.width()>f.mobile.maxTransitionWidth;this.toScroll=f.mobile.navigate.history.getActive().lastScroll||f.mobile.defaultHomeScroll;h=!f.support.cssTransitions||!f.support.cssAnimations||j||!this.name||this.name==="none"||Math.max(f.mobile.window.scrollTop(),this.toScroll)>f.mobile.getMaxScrollForTransition();this.toggleViewportClass();if(this.$from&&!h){this.startOut(k,i,h)}else{this.doneOut(k,i,h,true)}return this.deferred.promise()}})})(c,this);(function(e){e.mobile.SerialTransition=function(){this.init.apply(this,arguments)};e.extend(e.mobile.SerialTransition.prototype,e.mobile.Transition.prototype,{sequential:true,beforeDoneOut:function(){if(this.$from){this.cleanFrom()}},beforeStartOut:function(h,g,f){this.$from.animationComplete(e.proxy(function(){this.doneOut(h,g,f)},this))}})})(c);(function(e){e.mobile.ConcurrentTransition=function(){this.init.apply(this,arguments)};e.extend(e.mobile.ConcurrentTransition.prototype,e.mobile.Transition.prototype,{sequential:false,beforeDoneIn:function(){if(this.$from){this.cleanFrom()}},beforeStartOut:function(h,g,f){this.doneOut(h,g,f)}})})(c);(function(f){var e=function(){return f.mobile.getScreenHeight()*3};f.mobile.transitionHandlers={sequential:f.mobile.SerialTransition,simultaneous:f.mobile.ConcurrentTransition};f.mobile.defaultTransitionHandler=f.mobile.transitionHandlers.sequential;f.mobile.transitionFallbacks={};f.mobile._maybeDegradeTransition=function(g){if(g&&!f.support.cssTransform3d&&f.mobile.transitionFallbacks[g]){g=f.mobile.transitionFallbacks[g]}return g};f.mobile.getMaxScrollForTransition=f.mobile.getMaxScrollForTransition||e})(c);(function(f,e,g){f.mobile.transitionFallbacks.flip="fade"})(c,this);(function(f,e,g){f.mobile.transitionFallbacks.flow="fade"})(c,this);(function(f,e,g){f.mobile.transitionFallbacks.pop="fade"})(c,this);(function(f,e,g){f.mobile.transitionHandlers.slide=f.mobile.transitionHandlers.simultaneous;f.mobile.transitionFallbacks.slide="fade"})(c,this);(function(f,e,g){f.mobile.transitionFallbacks.slidedown="fade"})(c,this);(function(f,e,g){f.mobile.transitionFallbacks.slidefade="fade"})(c,this);(function(f,e,g){f.mobile.transitionFallbacks.slideup="fade"})(c,this);(function(f,e,g){f.mobile.transitionFallbacks.turn="fade"})(c,this);(function(e,f){e.mobile.degradeInputs={color:false,date:false,datetime:false,"datetime-local":false,email:false,month:false,number:false,range:"number",search:"text",tel:false,time:false,url:false,week:false};e.mobile.page.prototype.options.degradeInputs=e.mobile.degradeInputs;e.mobile.degradeInputsWithin=function(g){g=e(g);g.find("input").not(e.mobile.page.prototype.keepNativeSelector()).each(function(){var m=e(this),n=this.getAttribute("type"),i=e.mobile.degradeInputs[n]||"text",l,h,k,j;if(e.mobile.degradeInputs[n]){l=e("<div>").html(m.clone()).html();h=l.indexOf(" type=")>-1;k=h?/\s+type=["']?\w+['"]?/:/\/?>/;j=' type="'+i+'" data-'+e.mobile.ns+'type="'+n+'"'+(h?"":">");m.replaceWith(l.replace(k,j))}})}})(c);(function(f,e,g){f.widget("mobile.page",f.mobile.page,{options:{closeBtn:"left",closeBtnText:"Close",overlayTheme:"a",corners:true,dialog:false},_create:function(){this._super();if(this.options.dialog){f.extend(this,{_inner:this.element.children(),_headerCloseButton:null});if(!this.options.enhanced){this._setCloseBtn(this.options.closeBtn)}}},_enhance:function(){this._super();if(this.options.dialog){this.element.addClass("ui-dialog").wrapInner(f("<div/>",{role:"dialog","class":"ui-dialog-contain ui-overlay-shadow"+(this.options.corners?" ui-corner-all":"")}))}},_setOptions:function(i){var h,k,j=this.options;if(i.corners!==g){this._inner.toggleClass("ui-corner-all",!!i.corners)}if(i.overlayTheme!==g){if(f.mobile.activePage[0]===this.element[0]){j.overlayTheme=i.overlayTheme;this._handlePageBeforeShow()}}if(i.closeBtnText!==g){h=j.closeBtn;k=i.closeBtnText}if(i.closeBtn!==g){h=i.closeBtn}if(h){this._setCloseBtn(h,k)}this._super(i)},_handlePageBeforeShow:function(){if(this.options.overlayTheme&&this.options.dialog){this.removeContainerBackground();this.setContainerBackground(this.options.overlayTheme)}else{this._super()}},_setCloseBtn:function(h,j){var k,i=this._headerCloseButton;h="left"===h?"left":"right"===h?"right":"none";if("none"===h){if(i){i.remove();i=null}}else{if(i){i.removeClass("ui-btn-left ui-btn-right").addClass("ui-btn-"+h);if(j){i.text(j)}}else{k=this._inner.find(":jqmData(role='header')").first();i=f("<a></a>",{href:"#","class":"ui-btn ui-corner-all ui-icon-delete ui-btn-icon-notext ui-btn-"+h}).attr("data-"+f.mobile.ns+"rel","back").text(j||this.options.closeBtnText||"").prependTo(k)}}this._headerCloseButton=i}})})(c,this);(function(f,e,g){f.widget("mobile.dialog",{options:{closeBtn:"left",closeBtnText:"Close",overlayTheme:"a",corners:true},_handlePageBeforeShow:function(){this._isCloseable=true;if(this.options.overlayTheme){this.element.page("removeContainerBackground").page("setContainerBackground",this.options.overlayTheme)}},_handlePageBeforeHide:function(){this._isCloseable=false},_handleVClickSubmit:function(j){var i,h=f(j.target).closest(j.type==="vclick"?"a":"form");if(h.length&&!h.jqmData("transition")){i={};i["data-"+f.mobile.ns+"transition"]=(f.mobile.navigate.history.getActive()||{})["transition"]||f.mobile.defaultDialogTransition;i["data-"+f.mobile.ns+"direction"]="reverse";h.attr(i)}},_create:function(){var i=this.element,h=this.options;i.addClass("ui-dialog").wrapInner(f("<div/>",{role:"dialog","class":"ui-dialog-contain ui-overlay-shadow"+(!!h.corners?" ui-corner-all":"")}));f.extend(this,{_isCloseable:false,_inner:i.children(),_headerCloseButton:null});this._on(i,{vclick:"_handleVClickSubmit",submit:"_handleVClickSubmit",pagebeforeshow:"_handlePageBeforeShow",pagebeforehide:"_handlePageBeforeHide"});this._setCloseBtn(h.closeBtn)},_setOptions:function(i){var h,k,j=this.options;if(i.corners!==g){this._inner.toggleClass("ui-corner-all",!!i.corners)}if(i.overlayTheme!==g){if(f.mobile.activePage[0]===this.element[0]){j.overlayTheme=i.overlayTheme;this._handlePageBeforeShow()}}if(i.closeBtnText!==g){h=j.closeBtn;k=i.closeBtnText}if(i.closeBtn!==g){h=i.closeBtn}if(h){this._setCloseBtn(h,k)}this._super(i)},_setCloseBtn:function(h,j){var k,i=this._headerCloseButton;h="left"===h?"left":"right"===h?"right":"none";if("none"===h){if(i){i.remove();i=null}}else{if(i){i.removeClass("ui-btn-left ui-btn-right").addClass("ui-btn-"+h);if(j){i.text(j)}}else{k=this._inner.find(":jqmData(role='header')").first();i=f("<a></a>",{role:"button",href:"#","class":"ui-btn ui-corner-all ui-icon-delete ui-btn-icon-notext ui-btn-"+h}).text(j||this.options.closeBtnText||"").prependTo(k);this._on(i,{click:"close"})}}this._headerCloseButton=i},close:function(){var h=f.mobile.navigate.history;if(this._isCloseable){this._isCloseable=false;if(f.mobile.hashListeningEnabled&&h.activeIndex>0){f.mobile.back()}else{f.mobile.pageContainer.pagecontainer("back")}}}})})(c,this);(function(g,h){var f=/([A-Z])/g,e=function(i){return("ui-btn-icon-"+(i===null?"left":i))};g.widget("mobile.collapsible",{options:{enhanced:false,expandCueText:null,collapseCueText:null,collapsed:true,heading:"h1,h2,h3,h4,h5,h6,legend",collapsedIcon:null,expandedIcon:null,iconpos:null,theme:null,contentTheme:null,inset:null,corners:null,mini:null},_create:function(){var i=this.element,j={accordion:i.closest(":jqmData(role='collapsible-set'),:jqmData(role='collapsibleset')"+(g.mobile.collapsibleset?", :mobile-collapsibleset":"")).addClass("ui-collapsible-set")};this._ui=j;this._renderedOptions=this._getOptions(this.options);if(this.options.enhanced){j.heading=this.element.children(".ui-collapsible-heading");j.content=j.heading.next();j.anchor=j.heading.children();j.status=j.anchor.children(".ui-collapsible-heading-status")}else{this._enhance(i,j)}this._on(j.heading,{tap:function(){j.heading.find("a").first().addClass(g.mobile.activeBtnClass)},click:function(k){this._handleExpandCollapse(!j.heading.hasClass("ui-collapsible-heading-collapsed"));k.preventDefault();k.stopPropagation()}})},_getOptions:function(j){var k,i=this._ui.accordion,l=this._ui.accordionWidget;j=g.extend({},j);if(i.length&&!l){this._ui.accordionWidget=l=i.data("mobile-collapsibleset")}for(k in j){j[k]=(j[k]!=null)?j[k]:(l)?l.options[k]:i.length?g.mobile.getAttribute(i[0],k.replace(f,"-$1").toLowerCase()):null;if(null==j[k]){j[k]=g.mobile.collapsible.defaults[k]}}return j},_themeClassFromOption:function(j,i){return(i?(i==="none"?"":j+i):"")},_enhance:function(l,m){var j,k=this._renderedOptions,i=this._themeClassFromOption("ui-body-",k.contentTheme);l.addClass("ui-collapsible "+(k.inset?"ui-collapsible-inset ":"")+(k.inset&&k.corners?"ui-corner-all ":"")+(i?"ui-collapsible-themed-content ":""));m.originalHeading=l.children(this.options.heading).first(),m.content=l.wrapInner("<div class='ui-collapsible-content "+i+"'></div>").children(".ui-collapsible-content"),m.heading=m.originalHeading;if(m.heading.is("legend")){m.heading=g("<div role='heading'>"+m.heading.html()+"</div>");m.placeholder=g("<div><!-- placeholder for legend --></div>").insertBefore(m.originalHeading);m.originalHeading.remove()}j=(k.collapsed?(k.collapsedIcon?"ui-icon-"+k.collapsedIcon:""):(k.expandedIcon?"ui-icon-"+k.expandedIcon:""));m.status=g("<span class='ui-collapsible-heading-status'></span>");m.anchor=m.heading.detach().addClass("ui-collapsible-heading").append(m.status).wrapInner("<a href='#' class='ui-collapsible-heading-toggle'></a>").find("a").first().addClass("ui-btn "+(j?j+" ":"")+(j?e(k.iconpos)+" ":"")+this._themeClassFromOption("ui-btn-",k.theme)+" "+(k.mini?"ui-mini ":""));m.heading.insertBefore(m.content);this._handleExpandCollapse(this.options.collapsed);return m},refresh:function(){this._applyOptions(this.options);this._renderedOptions=this._getOptions(this.options)},_applyOptions:function(t){var o,r,p,j,l,k=this.element,s=this._renderedOptions,q=this._ui,n=q.anchor,m=q.status,i=this._getOptions(t);if(t.collapsed!==h){this._handleExpandCollapse(t.collapsed)}o=k.hasClass("ui-collapsible-collapsed");if(o){if(i.expandCueText!==h){m.text(i.expandCueText)}}else{if(i.collapseCueText!==h){m.text(i.collapseCueText)}}l=(i.collapsedIcon!==h?i.collapsedIcon!==false:s.collapsedIcon!==false);if(!(i.iconpos===h&&i.collapsedIcon===h&&i.expandedIcon===h)){n.removeClass([e(s.iconpos)].concat((s.expandedIcon?["ui-icon-"+s.expandedIcon]:[])).concat((s.collapsedIcon?["ui-icon-"+s.collapsedIcon]:[])).join(" "));if(l){n.addClass([e(i.iconpos!==h?i.iconpos:s.iconpos)].concat(o?["ui-icon-"+(i.collapsedIcon!==h?i.collapsedIcon:s.collapsedIcon)]:["ui-icon-"+(i.expandedIcon!==h?i.expandedIcon:s.expandedIcon)]).join(" "))}}if(i.theme!==h){p=this._themeClassFromOption("ui-btn-",s.theme);r=this._themeClassFromOption("ui-btn-",i.theme);n.removeClass(p).addClass(r)}if(i.contentTheme!==h){p=this._themeClassFromOption("ui-body-",s.contentTheme);r=this._themeClassFromOption("ui-body-",i.contentTheme);q.content.removeClass(p).addClass(r)}if(i.inset!==h){k.toggleClass("ui-collapsible-inset",i.inset);j=!!(i.inset&&(i.corners||s.corners))}if(i.corners!==h){j=!!(i.corners&&(i.inset||s.inset))}if(j!==h){k.toggleClass("ui-corner-all",j)}if(i.mini!==h){n.toggleClass("ui-mini",i.mini)}},_setOptions:function(i){this._applyOptions(i);this._super(i);this._renderedOptions=this._getOptions(this.options)},_handleExpandCollapse:function(k){var i=this._renderedOptions,j=this._ui;j.status.text(k?i.expandCueText:i.collapseCueText);j.heading.toggleClass("ui-collapsible-heading-collapsed",k).find("a").first().toggleClass("ui-icon-"+i.expandedIcon,!k).toggleClass("ui-icon-"+i.collapsedIcon,(k||i.expandedIcon===i.collapsedIcon)).removeClass(g.mobile.activeBtnClass);this.element.toggleClass("ui-collapsible-collapsed",k);j.content.toggleClass("ui-collapsible-content-collapsed",k).attr("aria-hidden",k).trigger("updatelayout");this.options.collapsed=k;this._trigger(k?"collapse":"expand")},expand:function(){this._handleExpandCollapse(false)},collapse:function(){this._handleExpandCollapse(true)},_destroy:function(){var j=this._ui,i=this.options;if(i.enhanced){return}if(j.placeholder){j.originalHeading.insertBefore(j.placeholder);j.placeholder.remove();j.heading.remove()}else{j.status.remove();j.heading.removeClass("ui-collapsible-heading ui-collapsible-heading-collapsed").children().contents().unwrap()}j.anchor.contents().unwrap();j.content.contents().unwrap();this.element.removeClass("ui-collapsible ui-collapsible-collapsed ui-collapsible-themed-content ui-collapsible-inset ui-corner-all")}});g.mobile.collapsible.defaults={expandCueText:" click to expand contents",collapseCueText:" click to collapse contents",collapsedIcon:"plus",contentTheme:"inherit",expandedIcon:"minus",iconpos:"left",inset:true,corners:true,theme:"inherit",mini:false}})(c);(function(g,h){var f=/\bui-screen-hidden\b/;function e(l){var j,k=l.length,i=[];for(j=0;j<k;j++){if(!l[j].className.match(f)){i.push(l[j])}}return g(i)}g.mobile.behaviors.addFirstLastClasses={_getVisibles:function(j,i){var k;if(i){k=e(j)}else{k=j.filter(":visible");if(k.length===0){k=e(j)}}return k},_addFirstLastClasses:function(k,j,i){k.removeClass("ui-first-child ui-last-child");j.eq(0).addClass("ui-first-child").end().last().addClass("ui-last-child");if(!i){this.element.trigger("updatelayout")}},_removeFirstLastClasses:function(i){i.removeClass("ui-first-child ui-last-child")}}})(c);(function(f,g){var e=":mobile-collapsible, "+f.mobile.collapsible.initSelector;f.widget("mobile.collapsibleset",f.extend({initSelector:":jqmData(role='collapsible-set'),:jqmData(role='collapsibleset')",options:f.extend({enhanced:false},f.mobile.collapsible.defaults),_handleCollapsibleExpand:function(i){var h=f(i.target).closest(".ui-collapsible");if(h.parent().is(":mobile-collapsibleset, :jqmData(role='collapsible-set')")){h.siblings(".ui-collapsible:not(.ui-collapsible-collapsed)").collapsible("collapse")}},_create:function(){var i=this.element,h=this.options;f.extend(this,{_classes:""});if(!h.enhanced){i.addClass("ui-collapsible-set "+this._themeClassFromOption("ui-group-theme-",h.theme)+" "+(h.corners&&h.inset?"ui-corner-all ":""));this.element.find(f.mobile.collapsible.initSelector).collapsible()}this._on(i,{collapsibleexpand:"_handleCollapsibleExpand"})},_themeClassFromOption:function(i,h){return(h?(h==="none"?"":i+h):"")},_init:function(){this._refresh(true);this.element.children(e).filter(":jqmData(collapsed='false')").collapsible("expand")},_setOptions:function(i){var h,k,j=this.element,l=this._themeClassFromOption("ui-group-theme-",i.theme);if(l){j.removeClass(this._themeClassFromOption("ui-group-theme-",this.options.theme)).addClass(l)}if(i.inset!==g){k=!!(i.inset&&(i.corners||this.options.corners))}if(i.corners!==g){k=!!(i.corners&&(i.inset||this.options.inset))}if(k!==g){j.toggleClass("ui-corner-all",k)}h=this._super(i);this.element.children(":mobile-collapsible").collapsible("refresh");return h},_destroy:function(){var h=this.element;this._removeFirstLastClasses(h.children(e));h.removeClass("ui-collapsible-set ui-corner-all "+this._themeClassFromOption("ui-group-theme-",this.options.theme)).children(":mobile-collapsible").collapsible("destroy")},_refresh:function(h){var i=this.element.children(e);this.element.find(f.mobile.collapsible.initSelector).not(".ui-collapsible").collapsible();this._addFirstLastClasses(i,this._getVisibles(i,h),h)},refresh:function(){this._refresh(false)}},f.mobile.behaviors.addFirstLastClasses))})(c);(function(e,f){e.fn.fieldcontain=function(){return this.addClass("ui-field-contain")}})(c);(function(e,f){e.fn.grid=function(g){return this.each(function(){var l=e(this),m=e.extend({grid:null},g),n=l.children(),j={solo:1,a:2,b:3,c:4,d:5},h=m.grid,i,k;if(!h){if(n.length<=5){for(k in j){if(j[k]===n.length){h=k}}}else{h="a";l.addClass("ui-grid-duo")}}i=j[h];l.addClass("ui-grid-"+h);n.filter(":nth-child("+i+"n+1)").addClass("ui-block-a");if(i>1){n.filter(":nth-child("+i+"n+2)").addClass("ui-block-b")}if(i>2){n.filter(":nth-child("+i+"n+3)").addClass("ui-block-c")}if(i>3){n.filter(":nth-child("+i+"n+4)").addClass("ui-block-d")}if(i>4){n.filter(":nth-child("+i+"n+5)").addClass("ui-block-e")}})}})(c);(function(e,f){e.widget("mobile.navbar",{options:{iconpos:"top",grid:null},_create:function(){var i=this.element,g=i.find("a, button"),h=g.filter(":jqmData(icon)").length?this.options.iconpos:f;i.addClass("ui-navbar").attr("role","navigation").find("ul").jqmEnhanceable().grid({grid:this.options.grid});g.each(function(){var k=e.mobile.getAttribute(this,"icon"),l=e.mobile.getAttribute(this,"theme"),j="ui-btn";if(l){j+=" ui-btn-"+l}if(k){j+=" ui-icon-"+k+" ui-btn-icon-"+h}e(this).addClass(j)});i.delegate("a","vclick",function(){var j=e(this);if(!(j.hasClass("ui-state-disabled")||j.hasClass("ui-disabled")||j.hasClass(e.mobile.activeBtnClass))){g.removeClass(e.mobile.activeBtnClass);j.addClass(e.mobile.activeBtnClass);e(a).one("pagehide",function(){j.removeClass(e.mobile.activeBtnClass)})}});i.closest(".ui-page").bind("pagebeforeshow",function(){g.filter(".ui-state-persist").addClass(e.mobile.activeBtnClass)})}})})(c);(function(f,g){var e=f.mobile.getAttribute;f.widget("mobile.listview",f.extend({options:{theme:null,countTheme:null,dividerTheme:null,icon:"carat-r",splitIcon:"carat-r",splitTheme:null,corners:true,shadow:true,inset:false},_create:function(){var i=this,h="";h+=i.options.inset?" ui-listview-inset":"";if(!!i.options.inset){h+=i.options.corners?" ui-corner-all":"";h+=i.options.shadow?" ui-shadow":""}i.element.addClass(" ui-listview"+h);i.refresh(true)},_findFirstElementByTagName:function(k,i,h,j){var l={};l[h]=l[j]=true;while(k){if(l[k.nodeName]){return k}k=k[i]}return null},_addThumbClasses:function(l){var k,j,h=l.length;for(k=0;k<h;k++){j=f(this._findFirstElementByTagName(l[k].firstChild,"nextSibling","img","IMG"));if(j.length){f(this._findFirstElementByTagName(j[0].parentNode,"parentNode","li","LI")).addClass(j.hasClass("ui-li-icon")?"ui-li-has-icon":"ui-li-has-thumb")}}},_getChildrenByTagName:function(k,i,j){var h=[],l={};l[i]=l[j]=true;k=k.firstChild;while(k){if(l[k.nodeName]){h.push(k)}k=k.nextSibling}return f(h)},_beforeListviewRefresh:f.noop,_afterListviewRefresh:f.noop,refresh:function(w){var A,r,j,I,i,u,E,H,J,C,p,G,F,t,q,n,z,K,m,y,D=this.options,h=this.element,x=!!f.nodeName(h[0],"ol"),l=h.attr("start"),v={},s=h.find(".ui-li-count"),B=e(h[0],"counttheme")||this.options.countTheme,k=B?"ui-body-"+B:"ui-body-inherit";if(D.theme){h.addClass("ui-group-theme-"+D.theme)}if(x&&(l||l===0)){p=parseInt(l,10)-1;h.css("counter-reset","listnumbering "+p)}this._beforeListviewRefresh();y=this._getChildrenByTagName(h[0],"li","LI");for(r=0,j=y.length;r<j;r++){I=y.eq(r);i="";if(w||I[0].className.search(/\bui-li-static\b|\bui-li-divider\b/)<0){J=this._getChildrenByTagName(I[0],"a","A");C=(e(I[0],"role")==="list-divider");F=I.attr("value");u=e(I[0],"theme");if(J.length&&J[0].className.search(/\bui-btn\b/)<0&&!C){E=e(I[0],"icon");H=(E===false)?false:(E||D.icon);J.removeClass("ui-link");A="ui-btn";if(u){A+=" ui-btn-"+u}if(J.length>1){i="ui-li-has-alt";t=J.last();q=e(t[0],"theme")||D.splitTheme||e(I[0],"theme",true);n=q?" ui-btn-"+q:"";z=e(t[0],"icon")||e(I[0],"icon")||D.splitIcon;K="ui-btn ui-btn-icon-notext ui-icon-"+z+n;t.attr("title",f.trim(t.getEncodedText())).addClass(K).empty();J=J.first()}else{if(H){A+=" ui-btn-icon-right ui-icon-"+H}}J.addClass(A)}else{if(C){m=(e(I[0],"theme")||D.dividerTheme||D.theme);i="ui-li-divider ui-bar-"+(m?m:"inherit");I.attr("role","heading")}else{if(J.length<=0){i="ui-li-static ui-body-"+(u?u:"inherit")}}}if(x&&F){G=parseInt(F,10)-1;I.css("counter-reset","listnumbering "+G)}}if(!v[i]){v[i]=[]}v[i].push(I[0])}for(i in v){f(v[i]).addClass(i)}s.each(function(){f(this).closest("li").addClass("ui-li-has-count")});if(k){s.not("[class*='ui-body-']").addClass(k)}this._addThumbClasses(y);this._addThumbClasses(y.find(".ui-btn"));this._afterListviewRefresh();this._addFirstLastClasses(y,this._getVisibles(y,w),w)}},f.mobile.behaviors.addFirstLastClasses))})(c);(function(f,g){function e(h){var i=f.trim(h.text())||null;if(!i){return null}i=i.slice(0,1).toUpperCase();return i}f.widget("mobile.listview",f.mobile.listview,{options:{autodividers:false,autodividersSelector:e},_beforeListviewRefresh:function(){if(this.options.autodividers){this._replaceDividers();this._superApply(arguments)}},_replaceDividers:function(){var l,k,h,n,j=null,o=this.element,m;o.children("li:jqmData(role='list-divider')").remove();k=o.children("li");for(l=0;l<k.length;l++){h=k[l];n=this.options.autodividersSelector(f(h));if(n&&j!==n){m=a.createElement("li");m.appendChild(a.createTextNode(n));m.setAttribute("data-"+f.mobile.ns+"role","list-divider");h.parentNode.insertBefore(m,h)}j=n}}})})(c);(function(e,g){var f=/(^|\s)ui-li-divider($|\s)/,h=/(^|\s)ui-screen-hidden($|\s)/;e.widget("mobile.listview",e.mobile.listview,{options:{hideDividers:false},_afterListviewRefresh:function(){var j,i,k,l=true;this._superApply(arguments);if(this.options.hideDividers){j=this._getChildrenByTagName(this.element[0],"li","LI");for(i=j.length-1;i>-1;i--){k=j[i];if(k.className.match(f)){if(l){k.className=k.className+" ui-screen-hidden"}l=true}else{if(!k.className.match(h)){l=false}}}}}})})(c);(function(e,f){e.mobile.nojs=function(g){e(":jqmData(role='nojs')",g).addClass("ui-nojs")}})(c);(function(e,f){e.mobile.behaviors.formReset={_handleFormReset:function(){this._on(this.element.closest("form"),{reset:function(){this._delay("_reset")}})}}})(c);(function(e,f){var g=e.mobile.path.hashToSelector;e.widget("mobile.checkboxradio",e.extend({initSelector:"input:not( :jqmData(role='flipswitch' ) )[type='checkbox'],input[type='radio']:not( :jqmData(role='flipswitch' ))",options:{theme:"inherit",mini:false,wrapperClass:null,enhanced:false,iconpos:"left"},_create:function(){var i=this.element,n=this.options,h=function(o,p){return o.jqmData(p)||o.closest("form, fieldset").jqmData(p)},j=this.options.enhanced?{element:this.element.siblings("label"),isParent:false}:this._findLabel(),m=i[0].type,k="ui-"+m+"-on",l="ui-"+m+"-off";if(m!=="checkbox"&&m!=="radio"){return}if(this.element[0].disabled){this.options.disabled=true}n.iconpos=h(i,"iconpos")||j.element.attr("data-"+e.mobile.ns+"iconpos")||n.iconpos,n.mini=h(i,"mini")||n.mini;e.extend(this,{input:i,label:j.element,labelIsParent:j.isParent,inputtype:m,checkedClass:k,uncheckedClass:l});if(!this.options.enhanced){this._enhance()}this._on(j.element,{vmouseover:"_handleLabelVMouseOver",vclick:"_handleLabelVClick"});this._on(i,{vmousedown:"_cacheVals",vclick:"_handleInputVClick",focus:"_handleInputFocus",blur:"_handleInputBlur"});this._handleFormReset();this.refresh()},_findLabel:function(){var l,k,j,i=this.element,h=i[0].labels;if(h&&h.length>0){k=e(h[0]);j=e.contains(k[0],i[0])}else{l=i.closest("label");j=(l.length>0);k=j?l:e(this.document[0].getElementsByTagName("label")).filter("[for='"+g(i[0].id)+"']").first()}return{element:k,isParent:j}},_enhance:function(){this.label.addClass("ui-btn ui-corner-all");if(this.labelIsParent){this.input.add(this.label).wrapAll(this._wrapper())}else{this.element.wrap(this._wrapper());this.element.parent().prepend(this.label)}this._setOptions({theme:this.options.theme,iconpos:this.options.iconpos,mini:this.options.mini})},_wrapper:function(){return e("<div class='"+(this.options.wrapperClass?this.options.wrapperClass:"")+" ui-"+this.inputtype+(this.options.disabled?" ui-state-disabled":"")+"' ></div>")},_handleInputFocus:function(){this.label.addClass(e.mobile.focusClass)},_handleInputBlur:function(){this.label.removeClass(e.mobile.focusClass)},_handleInputVClick:function(){this.element.prop("checked",this.element.is(":checked"));this._getInputSet().not(this.element).prop("checked",false);this._updateAll(true)},_handleLabelVMouseOver:function(h){if(this.label.parent().hasClass("ui-state-disabled")){h.stopPropagation()}},_handleLabelVClick:function(i){var h=this.element;if(h.is(":disabled")){i.preventDefault();return}this._cacheVals();h.prop("checked",this.inputtype==="radio"&&true||!h.prop("checked"));h.triggerHandler("click");this._getInputSet().not(h).prop("checked",false);this._updateAll();return false},_cacheVals:function(){this._getInputSet().each(function(){e(this).attr("data-"+e.mobile.ns+"cacheVal",this.checked)})},_getInputSet:function(){var h,m,j=this.element[0],i=j.name,k=j.form,l=this.element.parents().last().get(0),n=this.element;if(i&&this.inputtype==="radio"&&l){h="input[type='radio'][name='"+g(i)+"']";if(k){m=k.getAttribute("id");if(m){n=e(h+"[form='"+g(m)+"']",l)}n=e(k).find(h).filter(function(){return(this.form===k)}).add(n)}else{n=e(h,l).filter(function(){return !this.form})}}return n},_updateAll:function(i){var h=this;this._getInputSet().each(function(){var j=e(this);if((this.checked||h.inputtype==="checkbox")&&!i){j.trigger("change")}}).checkboxradio("refresh")},_reset:function(){this.refresh()},_hasIcon:function(){var h,j,i=e.mobile.controlgroup;if(i){h=this.element.closest(":mobile-controlgroup,"+i.prototype.initSelector);if(h.length>0){j=e.data(h[0],"mobile-controlgroup");return((j?j.options.type:h.attr("data-"+e.mobile.ns+"type"))!=="horizontal")}}return true},refresh:function(){var l=this.element[0].checked,k=e.mobile.activeBtnClass,i="ui-btn-icon-"+this.options.iconpos,j=[],h=[];if(this._hasIcon()){h.push(k);j.push(i)}else{h.push(i);(l?j:h).push(k)}if(l){j.push(this.checkedClass);h.push(this.uncheckedClass)}else{j.push(this.uncheckedClass);h.push(this.checkedClass)}this.widget().toggleClass("ui-state-disabled",this.element.prop("disabled"));this.label.addClass(j.join(" ")).removeClass(h.join(" "))},widget:function(){return this.label.parent()},_setOptions:function(k){var j=this.label,i=this.options,l=this.widget(),h=this._hasIcon();if(k.disabled!==f){this.input.prop("disabled",!!k.disabled);l.toggleClass("ui-state-disabled",!!k.disabled)}if(k.mini!==f){l.toggleClass("ui-mini",!!k.mini)}if(k.theme!==f){j.removeClass("ui-btn-"+i.theme).addClass("ui-btn-"+k.theme)}if(k.wrapperClass!==f){l.removeClass(i.wrapperClass).addClass(k.wrapperClass)}if(k.iconpos!==f&&h){j.removeClass("ui-btn-icon-"+i.iconpos).addClass("ui-btn-icon-"+k.iconpos)}else{if(!h){j.removeClass("ui-btn-icon-"+i.iconpos)}}this._super(k)}},e.mobile.behaviors.formReset))})(c);(function(e,f){e.widget("mobile.button",{initSelector:"input[type='button'], input[type='submit'], input[type='reset']",options:{theme:null,icon:null,iconpos:"left",iconshadow:false,corners:true,shadow:true,inline:null,mini:null,wrapperClass:null,enhanced:false},_create:function(){if(this.element.is(":disabled")){this.options.disabled=true}if(!this.options.enhanced){this._enhance()}e.extend(this,{wrapper:this.element.parent()});this._on({focus:function(){this.widget().addClass(e.mobile.focusClass)},blur:function(){this.widget().removeClass(e.mobile.focusClass)}});this.refresh(true)},_enhance:function(){this.element.wrap(this._button())},_button:function(){var g=this.options,h=this._getIconClasses(this.options);return e("<div class='ui-btn ui-input-btn"+(g.wrapperClass?" "+g.wrapperClass:"")+(g.theme?" ui-btn-"+g.theme:"")+(g.corners?" ui-corner-all":"")+(g.shadow?" ui-shadow":"")+(g.inline?" ui-btn-inline":"")+(g.mini?" ui-mini":"")+(g.disabled?" ui-state-disabled":"")+(h?(" "+h):"")+"' >"+this.element.val()+"</div>")},widget:function(){return this.wrapper},_destroy:function(){this.element.insertBefore(this.wrapper);this.wrapper.remove()},_getIconClasses:function(g){return(g.icon?("ui-icon-"+g.icon+(g.iconshadow?" ui-shadow-icon":"")+" ui-btn-icon-"+g.iconpos):"")},_setOptions:function(g){var h=this.widget();if(g.theme!==f){h.removeClass(this.options.theme).addClass("ui-btn-"+g.theme)}if(g.corners!==f){h.toggleClass("ui-corner-all",g.corners)}if(g.shadow!==f){h.toggleClass("ui-shadow",g.shadow)}if(g.inline!==f){h.toggleClass("ui-btn-inline",g.inline)}if(g.mini!==f){h.toggleClass("ui-mini",g.mini)}if(g.disabled!==f){this.element.prop("disabled",g.disabled);h.toggleClass("ui-state-disabled",g.disabled)}if(g.icon!==f||g.iconshadow!==f||g.iconpos!==f){h.removeClass(this._getIconClasses(this.options)).addClass(this._getIconClasses(e.extend({},this.options,g)))}this._super(g)},refresh:function(i){var g,h=this.element.prop("disabled");if(this.options.icon&&this.options.iconpos==="notext"&&this.element.attr("title")){this.element.attr("title",this.element.val())}if(!i){g=this.element.detach();e(this.wrapper).text(this.element.val()).append(g)}if(this.options.disabled!==h){this._setOptions({disabled:h})}}})})(c);(function(g){var h=g("meta[name=viewport]"),f=h.attr("content"),j=f+",maximum-scale=1, user-scalable=no",i=f+",maximum-scale=10, user-scalable=yes",e=/(user-scalable[\s]*=[\s]*no)|(maximum-scale[\s]*=[\s]*1)[$,\s]/.test(f);g.mobile.zoom=g.extend({},{enabled:!e,locked:false,disable:function(k){if(!e&&!g.mobile.zoom.locked){h.attr("content",j);g.mobile.zoom.enabled=false;g.mobile.zoom.locked=k||false}},enable:function(k){if(!e&&(!g.mobile.zoom.locked||k===true)){h.attr("content",i);g.mobile.zoom.enabled=true;g.mobile.zoom.locked=false}},restore:function(){if(!e){h.attr("content",f);g.mobile.zoom.enabled=true}}})}(c));(function(e,f){e.widget("mobile.textinput",{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']",options:{theme:null,corners:true,mini:false,preventFocusZoom:/iPhone|iPad|iPod/.test(navigator.platform)&&navigator.userAgent.indexOf("AppleWebKit")>-1,wrapperClass:"",enhanced:false},_create:function(){var i=this.options,g=this.element.is("[type='search'], :jqmData(type='search')"),k=this.element[0].tagName==="TEXTAREA",j=this.element.is("[data-"+(e.mobile.ns||"")+"type='range']"),h=((this.element.is("input")||this.element.is("[data-"+(e.mobile.ns||"")+"type='search']"))&&!j);if(this.element.prop("disabled")){i.disabled=true}e.extend(this,{classes:this._classesFromOptions(),isSearch:g,isTextarea:k,isRange:j,inputNeedsWrap:h});this._autoCorrect();if(!i.enhanced){this._enhance()}this._on({focus:"_handleFocus",blur:"_handleBlur"})},refresh:function(){this.setOptions({disabled:this.element.is(":disabled")})},_enhance:function(){var g=[];if(this.isTextarea){g.push("ui-input-text")}if(this.isTextarea||this.isRange){g.push("ui-shadow-inset")}if(this.inputNeedsWrap){this.element.wrap(this._wrap())}else{g=g.concat(this.classes)}this.element.addClass(g.join(" "))},widget:function(){return(this.inputNeedsWrap)?this.element.parent():this.element},_classesFromOptions:function(){var g=this.options,h=[];h.push("ui-body-"+((g.theme===null)?"inherit":g.theme));if(g.corners){h.push("ui-corner-all")}if(g.mini){h.push("ui-mini")}if(g.disabled){h.push("ui-state-disabled")}if(g.wrapperClass){h.push(g.wrapperClass)}return h},_wrap:function(){return e("<div class='"+(this.isSearch?"ui-input-search ":"ui-input-text ")+this.classes.join(" ")+" ui-shadow-inset'></div>")},_autoCorrect:function(){if(typeof this.element[0].autocorrect!=="undefined"&&!e.support.touchOverflow){this.element[0].setAttribute("autocorrect","off");this.element[0].setAttribute("autocomplete","off")}},_handleBlur:function(){this.widget().removeClass(e.mobile.focusClass);if(this.options.preventFocusZoom){e.mobile.zoom.enable(true)}},_handleFocus:function(){if(this.options.preventFocusZoom){e.mobile.zoom.disable(true)}this.widget().addClass(e.mobile.focusClass)},_setOptions:function(g){var h=this.widget();this._super(g);if(!(g.disabled===f&&g.mini===f&&g.corners===f&&g.theme===f&&g.wrapperClass===f)){h.removeClass(this.classes.join(" "));this.classes=this._classesFromOptions();h.addClass(this.classes.join(" "))}if(g.disabled!==f){this.element.prop("disabled",!!g.disabled)}},_destroy:function(){if(this.options.enhanced){return}if(this.inputNeedsWrap){this.element.unwrap()}this.element.removeClass("ui-input-text "+this.classes.join(" "))}})})(c);(function(e,f){e.widget("mobile.slider",e.extend({initSelector:"input[type='range'], :jqmData(type='range'), :jqmData(role='slider')",widgetEventPrefix:"slide",options:{theme:null,trackTheme:null,corners:true,mini:false,highlight:false},_create:function(){var v=this,r=this.element,w=this.options.trackTheme||e.mobile.getAttribute(r[0],"theme"),A=w?" ui-bar-"+w:" ui-bar-inherit",g=(this.options.corners||r.jqmData("corners"))?" ui-corner-all":"",J=(this.options.mini||r.jqmData("mini"))?" ui-mini":"",t=r[0].nodeName.toLowerCase(),E=(t==="select"),s=r.parent().is(":jqmData(role='rangeslider')"),G=(E)?"ui-slider-switch":"",o=r.attr("id"),M=e("[for='"+o+"']"),u=M.attr("id")||o+"-label",y=!E?parseFloat(r.attr("min")):0,C=!E?parseFloat(r.attr("max")):r.find("option").length-1,q=b.parseFloat(r.attr("step")||1),H=a.createElement("a"),I=e(H),h=a.createElement("div"),x=e(h),F=this.options.highlight&&!E?(function(){var i=a.createElement("div");i.className="ui-slider-bg "+e.mobile.activeBtnClass;return e(i).prependTo(x)})():false,n,p,z,m,B,L,l,k,K,D;M.attr("id",u);this.isToggleSwitch=E;H.setAttribute("href","#");h.setAttribute("role","application");h.className=[this.isToggleSwitch?"ui-slider ui-slider-track ui-shadow-inset ":"ui-slider-track ui-shadow-inset ",G,A,g,J].join("");H.className="ui-slider-handle";h.appendChild(H);I.attr({role:"slider","aria-valuemin":y,"aria-valuemax":C,"aria-valuenow":this._value(),"aria-valuetext":this._value(),title:this._value(),"aria-labelledby":u});e.extend(this,{slider:x,handle:I,control:r,type:t,step:q,max:C,min:y,valuebg:F,isRangeslider:s,dragging:false,beforeStart:null,userModified:false,mouseMoved:false});if(E){l=r.attr("tabindex");if(l){I.attr("tabindex",l)}r.attr("tabindex","-1").focus(function(){e(this).blur();I.focus()});p=a.createElement("div");p.className="ui-slider-inneroffset";for(z=0,m=h.childNodes.length;z<m;z++){p.appendChild(h.childNodes[z])}h.appendChild(p);I.addClass("ui-slider-handle-snapping");n=r.find("option");for(B=0,L=n.length;B<L;B++){k=!B?"b":"a";K=!B?"":" "+e.mobile.activeBtnClass;D=a.createElement("span");D.className=["ui-slider-label ui-slider-label-",k,K].join("");D.setAttribute("role","img");D.appendChild(a.createTextNode(n[B].innerHTML));e(D).prependTo(x)}v._labels=e(".ui-slider-label",x)}r.addClass(E?"ui-slider-switch":"ui-slider-input");this._on(r,{change:"_controlChange",keyup:"_controlKeyup",blur:"_controlBlur",vmouseup:"_controlVMouseUp"});x.bind("vmousedown",e.proxy(this._sliderVMouseDown,this)).bind("vclick",false);this._on(a,{vmousemove:"_preventDocumentDrag"});this._on(x.add(a),{vmouseup:"_sliderVMouseUp"});x.insertAfter(r);if(!E&&!s){p=this.options.mini?"<div class='ui-slider ui-mini'>":"<div class='ui-slider'>";r.add(x).wrapAll(p)}this._on(this.handle,{vmousedown:"_handleVMouseDown",keydown:"_handleKeydown",keyup:"_handleKeyup"});this.handle.bind("vclick",false);this._handleFormReset();this.refresh(f,f,true)},_setOptions:function(g){if(g.theme!==f){this._setTheme(g.theme)}if(g.trackTheme!==f){this._setTrackTheme(g.trackTheme)}if(g.corners!==f){this._setCorners(g.corners)}if(g.mini!==f){this._setMini(g.mini)}if(g.highlight!==f){this._setHighlight(g.highlight)}if(g.disabled!==f){this._setDisabled(g.disabled)}this._super(g)},_controlChange:function(g){if(this._trigger("controlchange",g)===false){return false}if(!this.mouseMoved){this.refresh(this._value(),true)}},_controlKeyup:function(){this.refresh(this._value(),true,true)},_controlBlur:function(){this.refresh(this._value(),true)},_controlVMouseUp:function(){this._checkedRefresh()},_handleVMouseDown:function(){this.handle.focus()},_handleKeydown:function(h){var g=this._value();if(this.options.disabled){return}switch(h.keyCode){case e.mobile.keyCode.HOME:case e.mobile.keyCode.END:case e.mobile.keyCode.PAGE_UP:case e.mobile.keyCode.PAGE_DOWN:case e.mobile.keyCode.UP:case e.mobile.keyCode.RIGHT:case e.mobile.keyCode.DOWN:case e.mobile.keyCode.LEFT:h.preventDefault();if(!this._keySliding){this._keySliding=true;this.handle.addClass("ui-state-active")}break}switch(h.keyCode){case e.mobile.keyCode.HOME:this.refresh(this.min);break;case e.mobile.keyCode.END:this.refresh(this.max);break;case e.mobile.keyCode.PAGE_UP:case e.mobile.keyCode.UP:case e.mobile.keyCode.RIGHT:this.refresh(g+this.step);break;case e.mobile.keyCode.PAGE_DOWN:case e.mobile.keyCode.DOWN:case e.mobile.keyCode.LEFT:this.refresh(g-this.step);break}},_handleKeyup:function(){if(this._keySliding){this._keySliding=false;this.handle.removeClass("ui-state-active")}},_sliderVMouseDown:function(g){if(this.options.disabled||!(g.which===1||g.which===0||g.which===f)){return false}if(this._trigger("beforestart",g)===false){return false}this.dragging=true;this.userModified=false;this.mouseMoved=false;if(this.isToggleSwitch){this.beforeStart=this.element[0].selectedIndex}this.refresh(g);this._trigger("start");return false},_sliderVMouseUp:function(){if(this.dragging){this.dragging=false;if(this.isToggleSwitch){this.handle.addClass("ui-slider-handle-snapping");if(this.mouseMoved){if(this.userModified){this.refresh(this.beforeStart===0?1:0)}else{this.refresh(this.beforeStart)}}else{this.refresh(this.beforeStart===0?1:0)}}this.mouseMoved=false;this._trigger("stop");return false}},_preventDocumentDrag:function(g){if(this._trigger("drag",g)===false){return false}if(this.dragging&&!this.options.disabled){this.mouseMoved=true;if(this.isToggleSwitch){this.handle.removeClass("ui-slider-handle-snapping")}this.refresh(g);this.userModified=this.beforeStart!==this.element[0].selectedIndex;return false}},_checkedRefresh:function(){if(this.value!==this._value()){this.refresh(this._value())}},_value:function(){return this.isToggleSwitch?this.element[0].selectedIndex:parseFloat(this.element.val())},_reset:function(){this.refresh(f,false,true)},refresh:function(K,H,q){var u=this,B=e.mobile.getAttribute(this.element[0],"theme"),F=this.options.theme||B,J=F?" ui-btn-"+F:"",v=this.options.trackTheme||B,D=v?" ui-bar-"+v:" ui-bar-inherit",i=this.options.corners?" ui-corner-all":"",G=this.options.mini?" ui-mini":"",m,y,I,x,o,j,r,w,g,A,E,n,t,C,p,s,z,h,k,l;u.slider[0].className=[this.isToggleSwitch?"ui-slider ui-slider-switch ui-slider-track ui-shadow-inset":"ui-slider-track ui-shadow-inset",D,i,G].join("");if(this.options.disabled||this.element.prop("disabled")){this.disable()}this.value=this._value();if(this.options.highlight&&!this.isToggleSwitch&&this.slider.find(".ui-slider-bg").length===0){this.valuebg=(function(){var L=a.createElement("div");L.className="ui-slider-bg "+e.mobile.activeBtnClass;return e(L).prependTo(u.slider)})()}this.handle.addClass("ui-btn"+J+" ui-shadow");r=this.element;w=!this.isToggleSwitch;g=w?[]:r.find("option");A=w?parseFloat(r.attr("min")):0;E=w?parseFloat(r.attr("max")):g.length-1;n=(w&&parseFloat(r.attr("step"))>0)?parseFloat(r.attr("step")):1;if(typeof K==="object"){I=K;x=8;m=this.slider.offset().left;y=this.slider.width();o=y/((E-A)/n);if(!this.dragging||I.pageX<m-x||I.pageX>m+y+x){return}if(o>1){j=((I.pageX-m)/y)*100}else{j=Math.round(((I.pageX-m)/y)*100)}}else{if(K==null){K=w?parseFloat(r.val()||0):r[0].selectedIndex}j=(parseFloat(K)-A)/(E-A)*100}if(isNaN(j)){return}t=(j/100)*(E-A)+A;C=(t-A)%n;p=t-C;if(Math.abs(C)*2>=n){p+=(C>0)?n:(-n)}s=100/((E-A)/n);t=parseFloat(p.toFixed(5));if(typeof o==="undefined"){o=y/((E-A)/n)}if(o>1&&w){j=(t-A)*s*(1/n)}if(j<0){j=0}if(j>100){j=100}if(t<A){t=A}if(t>E){t=E}this.handle.css("left",j+"%");this.handle[0].setAttribute("aria-valuenow",w?t:g.eq(t).attr("value"));this.handle[0].setAttribute("aria-valuetext",w?t:g.eq(t).getEncodedText());this.handle[0].setAttribute("title",w?t:g.eq(t).getEncodedText());if(this.valuebg){this.valuebg.css("width",j+"%")}if(this._labels){z=this.handle.width()/this.slider.width()*100;h=j&&z+(100-z)*j/100;k=j===100?0:Math.min(z+100-h,100);this._labels.each(function(){var L=e(this).hasClass("ui-slider-label-a");e(this).width((L?h:k)+"%")})}if(!q){l=false;if(w){l=parseFloat(r.val())!==t;r.val(t)}else{l=r[0].selectedIndex!==t;r[0].selectedIndex=t}if(this._trigger("beforechange",K)===false){return false}if(!H&&l){r.trigger("change")}}},_setHighlight:function(g){g=!!g;if(g){this.options.highlight=!!g;this.refresh()}else{if(this.valuebg){this.valuebg.remove();this.valuebg=false}}},_setTheme:function(h){this.handle.removeClass("ui-btn-"+this.options.theme).addClass("ui-btn-"+h);var g=this.options.theme?this.options.theme:"inherit",i=h?h:"inherit";this.control.removeClass("ui-body-"+g).addClass("ui-body-"+i)},_setTrackTheme:function(i){var h=this.options.trackTheme?this.options.trackTheme:"inherit",g=i?i:"inherit";this.slider.removeClass("ui-body-"+h).addClass("ui-body-"+g)},_setMini:function(g){g=!!g;if(!this.isToggleSwitch&&!this.isRangeslider){this.slider.parent().toggleClass("ui-mini",g);this.element.toggleClass("ui-mini",g)}this.slider.toggleClass("ui-mini",g)},_setCorners:function(g){this.slider.toggleClass("ui-corner-all",g);if(!this.isToggleSwitch){this.control.toggleClass("ui-corner-all",g)}},_setDisabled:function(g){g=!!g;this.element.prop("disabled",g);this.slider.toggleClass("ui-state-disabled",g).attr("aria-disabled",g);this.element.toggleClass("ui-state-disabled",g)}},e.mobile.behaviors.formReset))})(c);(function(g,h){var e;function f(){if(!e){e=g("<div></div>",{"class":"ui-slider-popup ui-shadow ui-corner-all"})}return e.clone()}g.widget("mobile.slider",g.mobile.slider,{options:{popupEnabled:false,showValue:false},_create:function(){this._super();g.extend(this,{_currentValue:null,_popup:null,_popupVisible:false});this._setOption("popupEnabled",this.options.popupEnabled);this._on(this.handle,{vmousedown:"_showPopup"});this._on(this.slider.add(this.document),{vmouseup:"_hidePopup"});this._refresh()},_positionPopup:function(){var i=this.handle.offset();this._popup.offset({left:i.left+(this.handle.width()-this._popup.width())/2,top:i.top-this._popup.outerHeight()-5})},_setOption:function(i,j){this._super(i,j);if(i==="showValue"){this.handle.html(j&&!this.options.mini?this._value():"")}else{if(i==="popupEnabled"){if(j&&!this._popup){this._popup=f().addClass("ui-body-"+(this.options.theme||"a")).hide().insertBefore(this.element)}}}},refresh:function(){this._super.apply(this,arguments);this._refresh()},_refresh:function(){var j=this.options,i;if(j.popupEnabled){this.handle.removeAttr("title")}i=this._value();if(i===this._currentValue){return}this._currentValue=i;if(j.popupEnabled&&this._popup){this._positionPopup();this._popup.html(i)}if(j.showValue&&!this.options.mini){this.handle.html(i)}},_showPopup:function(){if(this.options.popupEnabled&&!this._popupVisible){this.handle.html("");this._popup.show();this._positionPopup();this._popupVisible=true}},_hidePopup:function(){var i=this.options;if(i.popupEnabled&&this._popupVisible){if(i.showValue&&!i.mini){this.handle.html(this._value())}this._popup.hide();this._popupVisible=false}}})})(c);(function(e,f){e.widget("mobile.flipswitch",e.extend({options:{onText:"On",offText:"Off",theme:null,enhanced:false,wrapperClass:null,corners:true,mini:false},_create:function(){if(!this.options.enhanced){this._enhance()}else{e.extend(this,{flipswitch:this.element.parent(),on:this.element.find(".ui-flipswitch-on").eq(0),off:this.element.find(".ui-flipswitch-off").eq(0),type:this.element.get(0).tagName})}this._handleFormReset();this._originalTabIndex=this.element.attr("tabindex");if(this._originalTabIndex!=null){this.on.attr("tabindex",this._originalTabIndex)}this.element.attr("tabindex","-1");this._on({focus:"_handleInputFocus"});if(this.element.is(":disabled")){this._setOptions({disabled:true})}this._on(this.flipswitch,{click:"_toggle",swipeleft:"_left",swiperight:"_right"});this._on(this.on,{keydown:"_keydown"});this._on({change:"refresh"})},_handleInputFocus:function(){this.on.focus()},widget:function(){return this.flipswitch},_left:function(){this.flipswitch.removeClass("ui-flipswitch-active");if(this.type==="SELECT"){this.element.get(0).selectedIndex=0}else{this.element.prop("checked",false)}this.element.trigger("change")},_right:function(){this.flipswitch.addClass("ui-flipswitch-active");if(this.type==="SELECT"){this.element.get(0).selectedIndex=1}else{this.element.prop("checked",true)}this.element.trigger("change")},_enhance:function(){var h=e("<div>"),o=this.options,j=this.element,i=o.theme?o.theme:"inherit",k=e("<a></a>",{href:"#"}),g=e("<span></span>"),l=j.get(0).tagName,m=(l==="INPUT")?o.onText:j.find("option").eq(1).text(),n=(l==="INPUT")?o.offText:j.find("option").eq(0).text();k.addClass("ui-flipswitch-on ui-btn ui-shadow ui-btn-inherit").text(m);g.addClass("ui-flipswitch-off").text(n);h.addClass("ui-flipswitch ui-shadow-inset ui-bar-"+i+" "+(o.wrapperClass?o.wrapperClass:"")+" "+((j.is(":checked")||j.find("option").eq(1).is(":selected"))?"ui-flipswitch-active":"")+(j.is(":disabled")?" ui-state-disabled":"")+(o.corners?" ui-corner-all":"")+(o.mini?" ui-mini":"")).append(k,g);j.addClass("ui-flipswitch-input").after(h).appendTo(h);e.extend(this,{flipswitch:h,on:k,off:g,type:l})},_reset:function(){this.refresh()},refresh:function(){var h,g=this.flipswitch.hasClass("ui-flipswitch-active")?"_right":"_left";if(this.type==="SELECT"){h=(this.element.get(0).selectedIndex>0)?"_right":"_left"}else{h=this.element.prop("checked")?"_right":"_left"}if(h!==g){this[h]()}},_toggle:function(){var g=this.flipswitch.hasClass("ui-flipswitch-active")?"_left":"_right";this[g]()},_keydown:function(g){if(g.which===e.mobile.keyCode.LEFT){this._left()}else{if(g.which===e.mobile.keyCode.RIGHT){this._right()}else{if(g.which===e.mobile.keyCode.SPACE){this._toggle();g.preventDefault()}}}},_setOptions:function(g){if(g.theme!==f){var h=g.theme?g.theme:"inherit",i=g.theme?g.theme:"inherit";this.widget().removeClass("ui-bar-"+h).addClass("ui-bar-"+i)}if(g.onText!==f){this.on.text(g.onText)}if(g.offText!==f){this.off.text(g.offText)}if(g.disabled!==f){this.widget().toggleClass("ui-state-disabled",g.disabled)}if(g.mini!==f){this.widget().toggleClass("ui-mini",g.mini)}if(g.corners!==f){this.widget().toggleClass("ui-corner-all",g.corners)}this._super(g)},_destroy:function(){if(this.options.enhanced){return}if(this._originalTabIndex!=null){this.element.attr("tabindex",this._originalTabIndex)}else{this.element.removeAttr("tabindex")}this.on.remove();this.off.remove();this.element.unwrap();this.flipswitch.remove();this.removeClass("ui-flipswitch-input")}},e.mobile.behaviors.formReset))})(c);(function(e,f){e.widget("mobile.rangeslider",e.extend({options:{theme:null,trackTheme:null,corners:true,mini:false,highlight:true},_create:function(){var q=this.element,g=this.options.mini?"ui-rangeslider ui-mini":"ui-rangeslider",h=q.find("input").first(),j=q.find("input").last(),p=q.find("label").first(),i=e.data(h.get(0),"mobile-slider")||e.data(h.slider().get(0),"mobile-slider"),l=e.data(j.get(0),"mobile-slider")||e.data(j.slider().get(0),"mobile-slider"),n=i.slider,o=l.slider,m=i.handle,k=e("<div class='ui-rangeslider-sliders' />").appendTo(q);h.addClass("ui-rangeslider-first");j.addClass("ui-rangeslider-last");q.addClass(g);n.appendTo(k);o.appendTo(k);p.insertBefore(q);m.prependTo(o);e.extend(this,{_inputFirst:h,_inputLast:j,_sliderFirst:n,_sliderLast:o,_label:p,_targetVal:null,_sliderTarget:false,_sliders:k,_proxy:false});this.refresh();this._on(this.element.find("input.ui-slider-input"),{slidebeforestart:"_slidebeforestart",slidestop:"_slidestop",slidedrag:"_slidedrag",slidebeforechange:"_change",blur:"_change",keyup:"_change"});this._on({mousedown:"_change"});this._on(this.element.closest("form"),{reset:"_handleReset"});this._on(m,{vmousedown:"_dragFirstHandle"})},_handleReset:function(){var g=this;setTimeout(function(){g._updateHighlight()},0)},_dragFirstHandle:function(g){e.data(this._inputFirst.get(0),"mobile-slider").dragging=true;e.data(this._inputFirst.get(0),"mobile-slider").refresh(g);e.data(this._inputFirst.get(0),"mobile-slider")._trigger("start");return false},_slidedrag:function(h){var i=e(h.target).is(this._inputFirst),g=(i)?this._inputLast:this._inputFirst;this._sliderTarget=false;if((this._proxy==="first"&&i)||(this._proxy==="last"&&!i)){e.data(g.get(0),"mobile-slider").dragging=true;e.data(g.get(0),"mobile-slider").refresh(h);return false}},_slidestop:function(g){var h=e(g.target).is(this._inputFirst);this._proxy=false;this.element.find("input").trigger("vmouseup");this._sliderFirst.css("z-index",h?1:"")},_slidebeforestart:function(g){this._sliderTarget=false;if(e(g.originalEvent.target).hasClass("ui-slider-track")){this._sliderTarget=true;this._targetVal=e(g.target).val()}},_setOptions:function(g){if(g.theme!==f){this._setTheme(g.theme)}if(g.trackTheme!==f){this._setTrackTheme(g.trackTheme)}if(g.mini!==f){this._setMini(g.mini)}if(g.highlight!==f){this._setHighlight(g.highlight)}if(g.disabled!==f){this._setDisabled(g.disabled)}this._super(g);this.refresh()},refresh:function(){var g=this.element,h=this.options;if(this._inputFirst.is(":disabled")||this._inputLast.is(":disabled")){this.options.disabled=true}g.find("input").slider({theme:h.theme,trackTheme:h.trackTheme,disabled:h.disabled,corners:h.corners,mini:h.mini,highlight:h.highlight}).slider("refresh");this._updateHighlight()},_change:function(l){if(l.type==="keyup"){this._updateHighlight();return false}var i=this,j=parseFloat(this._inputFirst.val(),10),h=parseFloat(this._inputLast.val(),10),m=e(l.target).hasClass("ui-rangeslider-first"),k=m?this._inputFirst:this._inputLast,g=m?this._inputLast:this._inputFirst;if((this._inputFirst.val()>this._inputLast.val()&&l.type==="mousedown"&&!e(l.target).hasClass("ui-slider-handle"))){k.blur()}else{if(l.type==="mousedown"){return}}if(j>h&&!this._sliderTarget){k.val(m?h:j).slider("refresh");this._trigger("normalize")}else{if(j>h){k.val(this._targetVal).slider("refresh");setTimeout(function(){g.val(m?j:h).slider("refresh");e.data(g.get(0),"mobile-slider").handle.focus();i._sliderFirst.css("z-index",m?"":1);i._trigger("normalize")},0);this._proxy=(m)?"first":"last"}}if(j===h){e.data(k.get(0),"mobile-slider").handle.css("z-index",1);e.data(g.get(0),"mobile-slider").handle.css("z-index",0)}else{e.data(g.get(0),"mobile-slider").handle.css("z-index","");e.data(k.get(0),"mobile-slider").handle.css("z-index","")}this._updateHighlight();if(j>=h){return false}},_updateHighlight:function(){var h=parseInt(e.data(this._inputFirst.get(0),"mobile-slider").handle.get(0).style.left,10),g=parseInt(e.data(this._inputLast.get(0),"mobile-slider").handle.get(0).style.left,10),i=(g-h);this.element.find(".ui-slider-bg").css({"margin-left":h+"%",width:i+"%"})},_setTheme:function(g){this._inputFirst.slider("option","theme",g);this._inputLast.slider("option","theme",g)},_setTrackTheme:function(g){this._inputFirst.slider("option","trackTheme",g);this._inputLast.slider("option","trackTheme",g)},_setMini:function(g){this._inputFirst.slider("option","mini",g);this._inputLast.slider("option","mini",g);this.element.toggleClass("ui-mini",!!g)},_setHighlight:function(g){this._inputFirst.slider("option","highlight",g);this._inputLast.slider("option","highlight",g)},_setDisabled:function(g){this._inputFirst.prop("disabled",g);this._inputLast.prop("disabled",g)},_destroy:function(){this._label.prependTo(this.element);this.element.removeClass("ui-rangeslider ui-mini");this._inputFirst.after(this._sliderFirst);this._inputLast.after(this._sliderLast);this._sliders.remove();this.element.find("input").removeClass("ui-rangeslider-first ui-rangeslider-last").slider("destroy")}},e.mobile.behaviors.formReset))})(c);(function(e,f){e.widget("mobile.textinput",e.mobile.textinput,{options:{clearBtn:false,clearBtnText:"Clear text"},_create:function(){this._super();if(this.isSearch){this.options.clearBtn=true}if(!!this.options.clearBtn&&this.inputNeedsWrap){this._addClearBtn()}},clearButton:function(){return e("<a href='#' tabindex='-1' aria-hidden='true' class='ui-input-clear ui-btn ui-icon-delete ui-btn-icon-notext ui-corner-all'></a>").attr("title",this.options.clearBtnText).text(this.options.clearBtnText)},_clearBtnClick:function(g){this.element.val("").focus().trigger("change");this._clearBtn.addClass("ui-input-clear-hidden");g.preventDefault()},_addClearBtn:function(){if(!this.options.enhanced){this._enhanceClear()}e.extend(this,{_clearBtn:this.widget().find("a.ui-input-clear")});this._bindClearEvents();this._toggleClear()},_enhanceClear:function(){this.clearButton().appendTo(this.widget());this.widget().addClass("ui-input-has-clear")},_bindClearEvents:function(){this._on(this._clearBtn,{click:"_clearBtnClick"});this._on({keyup:"_toggleClear",change:"_toggleClear",input:"_toggleClear",focus:"_toggleClear",blur:"_toggleClear",cut:"_toggleClear",paste:"_toggleClear"})},_unbindClear:function(){this._off(this._clearBtn,"click");this._off(this.element,"keyup change input focus blur cut paste")},_setOptions:function(g){this._super(g);if(g.clearBtn!==f&&!this.element.is("textarea, :jqmData(type='range')")){if(g.clearBtn){this._addClearBtn()}else{this._destroyClear()}}if(g.clearBtnText!==f&&this._clearBtn!==f){this._clearBtn.text(g.clearBtnText).attr("title",g.clearBtnText)}},_toggleClear:function(){this._delay("_toggleClearClass",0)},_toggleClearClass:function(){this._clearBtn.toggleClass("ui-input-clear-hidden",!this.element.val())},_destroyClear:function(){this.widget().removeClass("ui-input-has-clear");this._unbindClear();this._clearBtn.remove()},_destroy:function(){this._super();if(this.options.clearBtn){this._destroyClear()}}})})(c);(function(e,f){e.widget("mobile.textinput",e.mobile.textinput,{options:{autogrow:true,keyupTimeoutBuffer:100},_create:function(){this._super();if(this.options.autogrow&&this.isTextarea){this._autogrow()}},_autogrow:function(){this.element.addClass("ui-textinput-autogrow");this._on({keyup:"_timeout",change:"_timeout",input:"_timeout",paste:"_timeout"});this._on(true,this.document,{pageshow:"_handleShow",popupbeforeposition:"_handleShow",updatelayout:"_handleShow",panelopen:"_handleShow"})},_handleShow:function(g){if(e.contains(g.target,this.element[0])&&this.element.is(":visible")){if(g.type!=="popupbeforeposition"){this.element.addClass("ui-textinput-autogrow-resize").animationComplete(e.proxy(function(){this.element.removeClass("ui-textinput-autogrow-resize")},this),"transition")}this._prepareHeightUpdate()}},_unbindAutogrow:function(){this.element.removeClass("ui-textinput-autogrow");this._off(this.element,"keyup change input paste");this._off(this.document,"pageshow popupbeforeposition updatelayout panelopen")},keyupTimeout:null,_prepareHeightUpdate:function(g){if(this.keyupTimeout){clearTimeout(this.keyupTimeout)}if(g===f){this._updateHeight()}else{this.keyupTimeout=this._delay("_updateHeight",g)}},_timeout:function(){this._prepareHeightUpdate(this.options.keyupTimeoutBuffer)},_updateHeight:function(){var o,i,g,p,k,j,m,l,n,h=this.window.scrollTop();this.keyupTimeout=0;if(!("onpage" in this.element[0])){this.element.css({height:0,"min-height":0,"max-height":0})}p=this.element[0].scrollHeight;k=this.element[0].clientHeight;j=parseFloat(this.element.css("border-top-width"));m=parseFloat(this.element.css("border-bottom-width"));l=j+m;n=p+l+15;if(k===0){o=parseFloat(this.element.css("padding-top"));i=parseFloat(this.element.css("padding-bottom"));g=o+i;n+=g}this.element.css({height:n,"min-height":"","max-height":""});this.window.scrollTop(h)},refresh:function(){if(this.options.autogrow&&this.isTextarea){this._updateHeight()}},_setOptions:function(g){this._super(g);if(g.autogrow!==f&&this.isTextarea){if(g.autogrow){this._autogrow()}else{this._unbindAutogrow()}}}})})(c);(function(e,f){e.widget("mobile.selectmenu",e.extend({initSelector:"select:not( :jqmData(role='slider')):not( :jqmData(role='flipswitch') )",options:{theme:null,icon:"carat-d",iconpos:"right",inline:false,corners:true,shadow:true,iconshadow:false,overlayTheme:null,dividerTheme:null,hidePlaceholderMenuItems:true,closeText:"Close",nativeMenu:true,preventFocusZoom:/iPhone|iPad|iPod/.test(navigator.platform)&&navigator.userAgent.indexOf("AppleWebKit")>-1,mini:false},_button:function(){return e("<div/>")},_setDisabled:function(g){this.element.attr("disabled",g);this.button.attr("aria-disabled",g);return this._setOption("disabled",g)},_focusButton:function(){var g=this;setTimeout(function(){g.button.focus()},40)},_selectOptions:function(){return this.select.find("option")},_preExtension:function(){var i=this.options.inline||this.element.jqmData("inline"),h=this.options.mini||this.element.jqmData("mini"),g="";if(!!~this.element[0].className.indexOf("ui-btn-left")){g=" ui-btn-left"}if(!!~this.element[0].className.indexOf("ui-btn-right")){g=" ui-btn-right"}if(i){g+=" ui-btn-inline"}if(h){g+=" ui-mini"}this.select=this.element.removeClass("ui-btn-left ui-btn-right").wrap("<div class='ui-select"+g+"'>");this.selectId=this.select.attr("id")||("select-"+this.uuid);this.buttonId=this.selectId+"-button";this.label=e("label[for='"+this.selectId+"']");this.isMultiple=this.select[0].multiple},_destroy:function(){var g=this.element.parents(".ui-select");if(g.length>0){if(g.is(".ui-btn-left, .ui-btn-right")){this.element.addClass(g.hasClass("ui-btn-left")?"ui-btn-left":"ui-btn-right")}this.element.insertAfter(g);g.remove()}},_create:function(){this._preExtension();this.button=this._button();var g=this,h=this.options,j=h.icon?(h.iconpos||this.select.jqmData("iconpos")):false,i=this.button.insertBefore(this.select).attr("id",this.buttonId).addClass("ui-btn"+(h.icon?(" ui-icon-"+h.icon+" ui-btn-icon-"+j+(h.iconshadow?" ui-shadow-icon":"")):"")+(h.theme?" ui-btn-"+h.theme:"")+(h.corners?" ui-corner-all":"")+(h.shadow?" ui-shadow":""));this.setButtonText();if(h.nativeMenu&&b.opera&&b.opera.version){i.addClass("ui-select-nativeonly")}if(this.isMultiple){this.buttonCount=e("<span>").addClass("ui-li-count ui-body-inherit").hide().appendTo(i.addClass("ui-li-has-count"))}if(h.disabled||this.element.attr("disabled")){this.disable()}this.select.change(function(){g.refresh();if(!!h.nativeMenu){g._delay(function(){g.select.blur()})}});this._handleFormReset();this._on(this.button,{keydown:"_handleKeydown"});this.build()},build:function(){var g=this;this.select.appendTo(g.button).bind("vmousedown",function(){g.button.addClass(e.mobile.activeBtnClass)}).bind("focus",function(){g.button.addClass(e.mobile.focusClass)}).bind("blur",function(){g.button.removeClass(e.mobile.focusClass)}).bind("focus vmouseover",function(){g.button.trigger("vmouseover")}).bind("vmousemove",function(){g.button.removeClass(e.mobile.activeBtnClass)}).bind("change blur vmouseout",function(){g.button.trigger("vmouseout").removeClass(e.mobile.activeBtnClass)});g.button.bind("vmousedown",function(){if(g.options.preventFocusZoom){e.mobile.zoom.disable(true)}});g.label.bind("click focus",function(){if(g.options.preventFocusZoom){e.mobile.zoom.disable(true)}});g.select.bind("focus",function(){if(g.options.preventFocusZoom){e.mobile.zoom.disable(true)}});g.button.bind("mouseup",function(){if(g.options.preventFocusZoom){setTimeout(function(){e.mobile.zoom.enable(true)},0)}});g.select.bind("blur",function(){if(g.options.preventFocusZoom){e.mobile.zoom.enable(true)}})},selected:function(){return this._selectOptions().filter(":selected")},selectedIndices:function(){var g=this;return this.selected().map(function(){return g._selectOptions().index(this)}).get()},setButtonText:function(){var g=this,i=this.selected(),j=this.placeholder,h=e(a.createElement("span"));this.button.children("span").not(".ui-li-count").remove().end().end().prepend((function(){if(i.length){j=i.map(function(){return e(this).text()}).get().join(", ")}else{j=g.placeholder}if(j){h.text(j)}else{h.html(" ")}return h.addClass(g.select.attr("class")).addClass(i.attr("class")).removeClass("ui-screen-hidden")})())},setButtonCount:function(){var g=this.selected();if(this.isMultiple){this.buttonCount[g.length>1?"show":"hide"]().text(g.length)}},_handleKeydown:function(){this._delay("_refreshButton")},_reset:function(){this.refresh()},_refreshButton:function(){this.setButtonText();this.setButtonCount()},refresh:function(){this._refreshButton()},open:e.noop,close:e.noop,disable:function(){this._setDisabled(true);this.button.addClass("ui-state-disabled")},enable:function(){this._setDisabled(false);this.button.removeClass("ui-state-disabled")}},e.mobile.behaviors.formReset))})(c);(function(e,f){e.mobile.links=function(g){e(g).find("a").jqmEnhanceable().filter(":jqmData(rel='popup')[href][href!='']").each(function(){var h=this,i=h.getAttribute("href").substring(1);if(i){h.setAttribute("aria-haspopup",true);h.setAttribute("aria-owns",i);h.setAttribute("aria-expanded",false)}}).end().not(".ui-btn, :jqmData(role='none'), :jqmData(role='nojs')").addClass("ui-link")}})(c);(function(f,h){function e(i,l,m,k){var j=k;if(i<l){j=m+(i-l)/2}else{j=Math.min(Math.max(m,k-l/2),m+i-l)}return j}function g(i){return{x:i.scrollLeft(),y:i.scrollTop(),cx:(i[0].innerWidth||i.width()),cy:(i[0].innerHeight||i.height())}}f.widget("mobile.popup",{options:{wrapperClass:null,theme:null,overlayTheme:null,shadow:true,corners:true,transition:"none",positionTo:"origin",tolerance:null,closeLinkSelector:"a:jqmData(rel='back')",closeLinkEvents:"click.popup",navigateEvents:"navigate.popup",closeEvents:"navigate.popup pagebeforechange.popup",dismissible:true,enhanced:false,history:!f.mobile.browser.oldIE},_handleDocumentVmousedown:function(i){if(this._isOpen&&f.contains(this._ui.container[0],i.target)){this._ignoreResizeEvents()}},_create:function(){var k=this.element,j=k.attr("id"),i=this.options;i.history=i.history&&f.mobile.ajaxEnabled&&f.mobile.hashListeningEnabled;this._on(this.document,{vmousedown:"_handleDocumentVmousedown"});f.extend(this,{_scrollTop:0,_page:k.closest(".ui-page"),_ui:null,_fallbackTransition:"",_currentTransition:false,_prerequisites:null,_isOpen:false,_tolerance:null,_resizeData:null,_ignoreResizeTo:0,_orientationchangeInProgress:false});if(this._page.length===0){this._page=f("body")}if(i.enhanced){this._ui={container:k.parent(),screen:k.parent().prev(),placeholder:f(this.document[0].getElementById(j+"-placeholder"))}}else{this._ui=this._enhance(k,j);this._applyTransition(i.transition)}this._setTolerance(i.tolerance)._ui.focusElement=this._ui.container;this._on(this._ui.screen,{vclick:"_eatEventAndClose"});this._on(this.window,{orientationchange:f.proxy(this,"_handleWindowOrientationchange"),resize:f.proxy(this,"_handleWindowResize"),keyup:f.proxy(this,"_handleWindowKeyUp")});this._on(this.document,{focusin:"_handleDocumentFocusIn"})},_enhance:function(n,l){var i=this.options,k=i.wrapperClass,m={screen:f("<div class='ui-screen-hidden ui-popup-screen "+this._themeClassFromOption("ui-overlay-",i.overlayTheme)+"'></div>"),placeholder:f("<div style='display: none;'><!-- placeholder --></div>"),container:f("<div class='ui-popup-container ui-popup-hidden ui-popup-truncate"+(k?(" "+k):"")+"'></div>")},j=this.document[0].createDocumentFragment();j.appendChild(m.screen[0]);j.appendChild(m.container[0]);if(l){m.screen.attr("id",l+"-screen");m.container.attr("id",l+"-popup");m.placeholder.attr("id",l+"-placeholder").html("<!-- placeholder for "+l+" -->")}this._page[0].appendChild(j);m.placeholder.insertAfter(n);n.detach().addClass("ui-popup "+this._themeClassFromOption("ui-body-",i.theme)+" "+(i.shadow?"ui-overlay-shadow ":"")+(i.corners?"ui-corner-all ":"")).appendTo(m.container);return m},_eatEventAndClose:function(i){i.preventDefault();i.stopImmediatePropagation();if(this.options.dismissible){this.close()}return false},_resizeScreen:function(){var i=this._ui.screen,k=this._ui.container.outerHeight(true),l=i.removeAttr("style").height(),j=this.document.height()-1;if(l<j){i.height(j)}else{if(k>l){i.height(k)}}},_handleWindowKeyUp:function(i){if(this._isOpen&&i.keyCode===f.mobile.keyCode.ESCAPE){return this._eatEventAndClose(i)}},_expectResizeEvent:function(){var i=g(this.window);if(this._resizeData){if(i.x===this._resizeData.windowCoordinates.x&&i.y===this._resizeData.windowCoordinates.y&&i.cx===this._resizeData.windowCoordinates.cx&&i.cy===this._resizeData.windowCoordinates.cy){return false}else{clearTimeout(this._resizeData.timeoutId)}}this._resizeData={timeoutId:this._delay("_resizeTimeout",200),windowCoordinates:i};return true},_resizeTimeout:function(){if(this._isOpen){if(!this._expectResizeEvent()){if(this._ui.container.hasClass("ui-popup-hidden")){this._ui.container.removeClass("ui-popup-hidden ui-popup-truncate");this.reposition({positionTo:"window"});this._ignoreResizeEvents()}this._resizeScreen();this._resizeData=null;this._orientationchangeInProgress=false}}else{this._resizeData=null;this._orientationchangeInProgress=false}},_stopIgnoringResizeEvents:function(){this._ignoreResizeTo=0},_ignoreResizeEvents:function(){if(this._ignoreResizeTo){clearTimeout(this._ignoreResizeTo)}this._ignoreResizeTo=this._delay("_stopIgnoringResizeEvents",1000)},_handleWindowResize:function(){if(this._isOpen&&this._ignoreResizeTo===0){if((this._expectResizeEvent()||this._orientationchangeInProgress)&&!this._ui.container.hasClass("ui-popup-hidden")){this._ui.container.addClass("ui-popup-hidden ui-popup-truncate").removeAttr("style")}}},_handleWindowOrientationchange:function(){if(!this._orientationchangeInProgress&&this._isOpen&&this._ignoreResizeTo===0){this._expectResizeEvent();this._orientationchangeInProgress=true}},_handleDocumentFocusIn:function(l){var k,i=l.target,j=this._ui;if(!this._isOpen){return}if(i!==j.container[0]){k=f(i);if(!f.contains(j.container[0],i)){f(this.document[0].activeElement).one("focus",f.proxy(function(){this._safelyBlur(i)},this));j.focusElement.focus();l.preventDefault();l.stopImmediatePropagation();return false}else{if(j.focusElement[0]===j.container[0]){j.focusElement=k}}}this._ignoreResizeEvents()},_themeClassFromOption:function(j,i){return(i?(i==="none"?"":(j+i)):(j+"inherit"))},_applyTransition:function(i){if(i){this._ui.container.removeClass(this._fallbackTransition);if(i!=="none"){this._fallbackTransition=f.mobile._maybeDegradeTransition(i);if(this._fallbackTransition==="none"){this._fallbackTransition=""}this._ui.container.addClass(this._fallbackTransition)}}return this},_setOptions:function(l){var j=this.options,k=this.element,i=this._ui.screen;if(l.wrapperClass!==h){this._ui.container.removeClass(j.wrapperClass).addClass(l.wrapperClass)}if(l.theme!==h){k.removeClass(this._themeClassFromOption("ui-body-",j.theme)).addClass(this._themeClassFromOption("ui-body-",l.theme))}if(l.overlayTheme!==h){i.removeClass(this._themeClassFromOption("ui-overlay-",j.overlayTheme)).addClass(this._themeClassFromOption("ui-overlay-",l.overlayTheme));if(this._isOpen){i.addClass("in")}}if(l.shadow!==h){k.toggleClass("ui-overlay-shadow",l.shadow)}if(l.corners!==h){k.toggleClass("ui-corner-all",l.corners)}if(l.transition!==h){if(!this._currentTransition){this._applyTransition(l.transition)}}if(l.tolerance!==h){this._setTolerance(l.tolerance)}if(l.disabled!==h){if(l.disabled){this.close()}}return this._super(l)},_setTolerance:function(k){var i={t:30,r:15,b:30,l:15},j;if(k!==h){j=String(k).split(",");f.each(j,function(l,m){j[l]=parseInt(m,10)});switch(j.length){case 1:if(!isNaN(j[0])){i.t=i.r=i.b=i.l=j[0]}break;case 2:if(!isNaN(j[0])){i.t=i.b=j[0]}if(!isNaN(j[1])){i.l=i.r=j[1]}break;case 4:if(!isNaN(j[0])){i.t=j[0]}if(!isNaN(j[1])){i.r=j[1]}if(!isNaN(j[2])){i.b=j[2]}if(!isNaN(j[3])){i.l=j[3]}break;default:break}}this._tolerance=i;return this},_clampPopupWidth:function(i){var j,l=g(this.window),k={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};if(!i){this._ui.container.css("max-width",k.cx)}j={cx:this._ui.container.outerWidth(true),cy:this._ui.container.outerHeight(true)};return{rc:k,menuSize:j}},_calculateFinalLocation:function(l,m){var k,j=m.rc,i=m.menuSize;k={left:e(j.cx,i.cx,j.x,l.x),top:e(j.cy,i.cy,j.y,l.y)};k.top=Math.max(0,k.top);k.top-=Math.min(k.top,Math.max(0,k.top+i.cy-this.document.height()));return k},_placementCoords:function(i){return this._calculateFinalLocation(i,this._clampPopupWidth())},_createPrerequisites:function(m,l,j){var k,i=this;k={screen:f.Deferred(),container:f.Deferred()};k.screen.then(function(){if(k===i._prerequisites){m()}});k.container.then(function(){if(k===i._prerequisites){l()}});f.when(k.screen,k.container).done(function(){if(k===i._prerequisites){i._prerequisites=null;j()}});i._prerequisites=k},_animate:function(i){this._ui.screen.removeClass(i.classToRemove).addClass(i.screenClassToAdd);i.prerequisites.screen.resolve();if(i.transition&&i.transition!=="none"){if(i.applyTransition){this._applyTransition(i.transition)}if(this._fallbackTransition){this._ui.container.addClass(i.containerClassToAdd).removeClass(i.classToRemove).animationComplete(f.proxy(i.prerequisites.container,"resolve"));return}}this._ui.container.removeClass(i.classToRemove);i.prerequisites.container.resolve()},_desiredCoords:function(p){var m,o=null,l=g(this.window),i=p.x,n=p.y,j=p.positionTo;if(j&&j!=="origin"){if(j==="window"){i=l.cx/2+l.x;n=l.cy/2+l.y}else{try{o=f(j)}catch(k){o=null}if(o){o.filter(":visible");if(o.length===0){o=null}}}}if(o){m=o.offset();i=m.left+o.outerWidth()/2;n=m.top+o.outerHeight()/2}if(f.type(i)!=="number"||isNaN(i)){i=l.cx/2+l.x}if(f.type(n)!=="number"||isNaN(n)){n=l.cy/2+l.y}return{x:i,y:n}},_reposition:function(i){i={x:i.x,y:i.y,positionTo:i.positionTo};this._trigger("beforeposition",h,i);this._ui.container.offset(this._placementCoords(this._desiredCoords(i)))},reposition:function(i){if(this._isOpen){this._reposition(i)}},_safelyBlur:function(i){if(i!==this.window[0]&&i.nodeName.toLowerCase()!=="body"){f(i).blur()}},_openPrerequisitesComplete:function(){var j=this.element.attr("id"),i=this._ui.container.find(":focusable").first();this._ui.container.addClass("ui-popup-active");this._isOpen=true;this._resizeScreen();if(!f.contains(this._ui.container[0],this.document[0].activeElement)){this._safelyBlur(this.document[0].activeElement)}if(i.length>0){this._ui.focusElement=i}this._ignoreResizeEvents();if(j){this.document.find("[aria-haspopup='true'][aria-owns='"+j+"']").attr("aria-expanded",true)}this._trigger("afteropen")},_open:function(i){var k=f.extend({},this.options,i),j=(function(){var n=navigator.userAgent,m=n.match(/AppleWebKit\/([0-9\.]+)/),q=!!m&&m[1],o=n.match(/Android (\d+(?:\.\d+))/),p=!!o&&o[1],l=n.indexOf("Chrome")>-1;if(o!==null&&p==="4.0"&&q&&q>534.13&&!l){return true}return false}());this._createPrerequisites(f.noop,f.noop,f.proxy(this,"_openPrerequisitesComplete"));this._currentTransition=k.transition;this._applyTransition(k.transition);this._ui.screen.removeClass("ui-screen-hidden");this._ui.container.removeClass("ui-popup-truncate");this._reposition(k);this._ui.container.removeClass("ui-popup-hidden");if(this.options.overlayTheme&&j){this.element.closest(".ui-page").addClass("ui-popup-open")}this._animate({additionalCondition:true,transition:k.transition,classToRemove:"",screenClassToAdd:"in",containerClassToAdd:"in",applyTransition:false,prerequisites:this._prerequisites})},_closePrerequisiteScreen:function(){this._ui.screen.removeClass("out").addClass("ui-screen-hidden")},_closePrerequisiteContainer:function(){this._ui.container.removeClass("reverse out").addClass("ui-popup-hidden ui-popup-truncate").removeAttr("style")},_closePrerequisitesDone:function(){var i=this._ui.container,j=this.element.attr("id");f.mobile.popup.active=h;f(":focus",i[0]).add(i[0]).blur();if(j){this.document.find("[aria-haspopup='true'][aria-owns='"+j+"']").attr("aria-expanded",false)}this._trigger("afterclose")},_close:function(i){this._ui.container.removeClass("ui-popup-active");this._page.removeClass("ui-popup-open");this._isOpen=false;this._createPrerequisites(f.proxy(this,"_closePrerequisiteScreen"),f.proxy(this,"_closePrerequisiteContainer"),f.proxy(this,"_closePrerequisitesDone"));this._animate({additionalCondition:this._ui.screen.hasClass("in"),transition:(i?"none":(this._currentTransition)),classToRemove:"in",screenClassToAdd:"out",containerClassToAdd:"reverse out",applyTransition:true,prerequisites:this._prerequisites})},_unenhance:function(){if(this.options.enhanced){return}this._setOptions({theme:f.mobile.popup.prototype.options.theme});this.element.detach().insertAfter(this._ui.placeholder).removeClass("ui-popup ui-overlay-shadow ui-corner-all ui-body-inherit");this._ui.screen.remove();this._ui.container.remove();this._ui.placeholder.remove()},_destroy:function(){if(f.mobile.popup.active===this){this.element.one("popupafterclose",f.proxy(this,"_unenhance"));this.close()}else{this._unenhance()}return this},_closePopup:function(m,l){var k,n,j=this.options,i=false;if((m&&m.isDefaultPrevented())||f.mobile.popup.active!==this){return}b.scrollTo(0,this._scrollTop);if(m&&m.type==="pagebeforechange"&&l){if(typeof l.toPage==="string"){k=l.toPage}else{k=l.toPage.jqmData("url")}k=f.mobile.path.parseUrl(k);n=k.pathname+k.search+k.hash;if(this._myUrl!==f.mobile.path.makeUrlAbsolute(n)){i=true}else{m.preventDefault()}}this.window.off(j.closeEvents);this.element.undelegate(j.closeLinkSelector,j.closeLinkEvents);this._close(i)},_bindContainerClose:function(){this.window.on(this.options.closeEvents,f.proxy(this,"_closePopup"))},widget:function(){return this._ui.container},open:function(p){var k,n,l,i,q,m,o=this,j=this.options;if(f.mobile.popup.active||j.disabled){return this}f.mobile.popup.active=this;this._scrollTop=this.window.scrollTop();if(!(j.history)){o._open(p);o._bindContainerClose();o.element.delegate(j.closeLinkSelector,j.closeLinkEvents,function(r){o.close();r.preventDefault()});return this}m=f.mobile.navigate.history;n=f.mobile.dialogHashKey;l=f.mobile.activePage;i=(l?l.hasClass("ui-dialog"):false);this._myUrl=k=m.getActive().url;q=(k.indexOf(n)>-1)&&!i&&(m.activeIndex>0);if(q){o._open(p);o._bindContainerClose();return this}if(k.indexOf(n)===-1&&!i){k=k+(k.indexOf("#")>-1?n:"#"+n)}else{k=f.mobile.path.parseLocation().hash+n}this.window.one("beforenavigate",function(r){r.preventDefault();o._open(p);o._bindContainerClose()});this.urlAltered=true;f.mobile.navigate(k,{role:"dialog"});return this},close:function(){if(f.mobile.popup.active!==this){return this}this._scrollTop=this.window.scrollTop();if(this.options.history&&this.urlAltered){f.mobile.back();this.urlAltered=false}else{this._closePopup()}return this}});f.mobile.popup.handleLink=function(j){var l,k=f.mobile.path,i=f(k.hashToSelector(k.parseUrl(j.attr("href")).hash)).first();if(i.length>0&&i.data("mobile-popup")){l=j.offset();i.popup("open",{x:l.left+j.outerWidth()/2,y:l.top+j.outerHeight()/2,transition:j.jqmData("transition"),positionTo:j.jqmData("position-to")})}setTimeout(function(){j.removeClass(f.mobile.activeBtnClass)},300)};f.mobile.document.on("pagebeforechange",function(j,i){if(i.options.role==="popup"){f.mobile.popup.handleLink(i.options.link);j.preventDefault()}})})(c);(function(e,h){var f=".ui-disabled,.ui-state-disabled,.ui-li-divider,.ui-screen-hidden,:jqmData(role='placeholder')",g=function(j,l,k){var i=j[k+"All"]().not(f).first();if(i.length){l.blur().attr("tabindex","-1");i.find("a").first().focus()}};e.widget("mobile.selectmenu",e.mobile.selectmenu,{_create:function(){var i=this.options;i.nativeMenu=i.nativeMenu||(this.element.parents(":jqmData(role='popup'),:mobile-popup").length>0);return this._super()},_handleSelectFocus:function(){this.element.blur();this.button.focus()},_handleKeydown:function(i){this._super(i);this._handleButtonVclickKeydown(i)},_handleButtonVclickKeydown:function(i){if(this.options.disabled||this.isOpen||this.options.nativeMenu){return}if(i.type==="vclick"||i.keyCode&&(i.keyCode===e.mobile.keyCode.ENTER||i.keyCode===e.mobile.keyCode.SPACE)){this._decideFormat();if(this.menuType==="overlay"){this.button.attr("href","#"+this.popupId).attr("data-"+(e.mobile.ns||"")+"rel","popup")}else{this.button.attr("href","#"+this.dialogId).attr("data-"+(e.mobile.ns||"")+"rel","dialog")}this.isOpen=true}},_handleListFocus:function(i){var j=(i.type==="focusin")?{tabindex:"0",event:"vmouseover"}:{tabindex:"-1",event:"vmouseout"};e(i.target).attr("tabindex",j.tabindex).trigger(j.event)},_handleListKeydown:function(j){var k=e(j.target),i=k.closest("li");switch(j.keyCode){case 38:g(i,k,"prev");return false;case 40:g(i,k,"next");return false;case 13:case 32:k.trigger("click");return false}},_handleMenuPageHide:function(){this._delayedTrigger();this.thisPage.page("bindRemove")},_handleHeaderCloseClick:function(){if(this.menuType==="overlay"){this.close();return false}},_handleListItemClick:function(l){var k=e(l.target).closest("li"),m=this.select[0].selectedIndex,i=e.mobile.getAttribute(k,"option-index"),j=this._selectOptions().eq(i)[0];j.selected=this.isMultiple?!j.selected:true;if(this.isMultiple){k.find("a").toggleClass("ui-checkbox-on",j.selected).toggleClass("ui-checkbox-off",!j.selected)}if(!this.isMultiple&&m!==i){this._triggerChange=true}if(this.isMultiple){this.select.trigger("change");this.list.find("li:not(.ui-li-divider)").eq(i).find("a").first().focus()}else{this.close()}l.preventDefault()},build:function(){var k,w,B,s,i,n,u,r,t,C,q,v,j,A,z,y,m,l,p,x=this.options;if(x.nativeMenu){return this._super()}k=this.selectId;w=k+"-listbox";B=k+"-dialog";s=this.label;i=this.element.closest(".ui-page");n=this.element[0].multiple;u=k+"-menu";r=x.theme?(" data-"+e.mobile.ns+"theme='"+x.theme+"'"):"";t=x.overlayTheme||x.theme||null;C=t?(" data-"+e.mobile.ns+"overlay-theme='"+t+"'"):"";q=(x.dividerTheme&&n)?(" data-"+e.mobile.ns+"divider-theme='"+x.dividerTheme+"'"):"";v=e("<div data-"+e.mobile.ns+"role='dialog' class='ui-selectmenu' id='"+B+"'"+r+C+"><div data-"+e.mobile.ns+"role='header'><div class='ui-title'></div></div><div data-"+e.mobile.ns+"role='content'></div></div>");j=e("<div"+r+C+" id='"+w+"' class='ui-selectmenu'></div>").insertAfter(this.select).popup();A=e("<ul class='ui-selectmenu-list' id='"+u+"' role='listbox' aria-labelledby='"+this.buttonId+"'"+r+q+"></ul>").appendTo(j);z=e("<div class='ui-header ui-bar-"+(x.theme?x.theme:"inherit")+"'></div>").prependTo(j);y=e("<h1 class='ui-title'></h1>").appendTo(z);if(this.isMultiple){p=e("<a>",{role:"button",text:x.closeText,href:"#","class":"ui-btn ui-corner-all ui-btn-left ui-btn-icon-notext ui-icon-delete"}).appendTo(z)}e.extend(this,{selectId:k,menuId:u,popupId:w,dialogId:B,thisPage:i,menuPage:v,label:s,isMultiple:n,theme:x.theme,listbox:j,list:A,header:z,headerTitle:y,headerClose:p,menuPageContent:m,menuPageClose:l,placeholder:""});this.refresh();if(this._origTabIndex===h){this._origTabIndex=(this.select[0].getAttribute("tabindex")===null)?false:this.select.attr("tabindex")}this.select.attr("tabindex","-1");this._on(this.select,{focus:"_handleSelectFocus"});this._on(this.button,{vclick:"_handleButtonVclickKeydown"});this.list.attr("role","listbox");this._on(this.list,{focusin:"_handleListFocus",focusout:"_handleListFocus",keydown:"_handleListKeydown","click li:not(.ui-disabled,.ui-state-disabled,.ui-li-divider)":"_handleListItemClick"});this._on(this.menuPage,{pagehide:"_handleMenuPageHide"});this._on(this.listbox,{popupafterclose:"_popupClosed"});if(this.isMultiple){this._on(this.headerClose,{click:"_handleHeaderCloseClick"})}return this},_popupClosed:function(){this.close();this._delayedTrigger()},_delayedTrigger:function(){if(this._triggerChange){this.element.trigger("change")}this._triggerChange=false},_isRebuildRequired:function(){var j=this.list.find("li"),i=this._selectOptions().not(".ui-screen-hidden");return i.text()!==j.text()},selected:function(){return this._selectOptions().filter(":selected:not( :jqmData(placeholder='true') )")},refresh:function(j){var i,k;if(this.options.nativeMenu){return this._super(j)}i=this;if(j||this._isRebuildRequired()){i._buildList()}k=this.selectedIndices();i.setButtonText();i.setButtonCount();i.list.find("li:not(.ui-li-divider)").find("a").removeClass(e.mobile.activeBtnClass).end().attr("aria-selected",false).each(function(l){var m=e(this);if(e.inArray(l,k)>-1){m.attr("aria-selected",true);if(i.isMultiple){m.find("a").removeClass("ui-checkbox-off").addClass("ui-checkbox-on")}else{if(m.hasClass("ui-screen-hidden")){m.next().find("a").addClass(e.mobile.activeBtnClass)}else{m.find("a").addClass(e.mobile.activeBtnClass)}}}else{if(i.isMultiple){m.find("a").removeClass("ui-checkbox-on").addClass("ui-checkbox-off")}}})},close:function(){if(this.options.disabled||!this.isOpen){return}var i=this;if(i.menuType==="page"){i.menuPage.dialog("close");i.list.appendTo(i.listbox)}else{i.listbox.popup("close")}i._focusButton();i.isOpen=false},open:function(){this.button.click()},_focusMenuItem:function(){var i=this.list.find("a."+e.mobile.activeBtnClass);if(i.length===0){i=this.list.find("li:not("+f+") a.ui-btn")}i.first().focus()},_decideFormat:function(){var i=this,l=this.window,j=i.list.parent(),o=j.outerHeight(),k=l.scrollTop(),n=i.button.offset().top,m=l.height();if(o>m-80||!e.support.scrollTop){i.menuPage.appendTo(e.mobile.pageContainer).page();i.menuPageContent=i.menuPage.find(".ui-content");i.menuPageClose=i.menuPage.find(".ui-header a");i.thisPage.unbind("pagehide.remove");if(k===0&&n>m){i.thisPage.one("pagehide",function(){e(this).jqmData("lastScroll",n)})}i.menuPage.one({pageshow:e.proxy(this,"_focusMenuItem"),pagehide:e.proxy(this,"close")});i.menuType="page";i.menuPageContent.append(i.list);i.menuPage.find("div .ui-title").text(i.label.getEncodedText()||i.placeholder)}else{i.menuType="overlay";i.listbox.one({popupafteropen:e.proxy(this,"_focusMenuItem")})}},_buildList:function(){var u=this,z=this.options,l=this.placeholder,k=true,p="false",B,r,y,I="data-"+e.mobile.ns,E=I+"option-index",J=I+"icon",m=I+"role",A=I+"placeholder",j=a.createDocumentFragment(),D=false,w,F,t,C,q,s,n,H,v,x,G;u.list.empty().filter(".ui-listview").listview("destroy");B=this._selectOptions();r=B.length;y=this.select[0];for(F=0;F<r;F++,D=false){t=B[F];C=e(t);if(C.hasClass("ui-screen-hidden")){continue}q=t.parentNode;H=[];s=C.text();n=a.createElement("a");n.setAttribute("href","#");n.appendChild(a.createTextNode(s));if(q!==y&&q.nodeName.toLowerCase()==="optgroup"){v=q.getAttribute("label");if(v!==w){x=a.createElement("li");x.setAttribute(m,"list-divider");x.setAttribute("role","option");x.setAttribute("tabindex","-1");x.appendChild(a.createTextNode(v));j.appendChild(x);w=v}}if(k&&(!t.getAttribute("value")||s.length===0||C.jqmData("placeholder"))){k=false;D=true;if(null===t.getAttribute(A)){this._removePlaceholderAttr=true}t.setAttribute(A,true);if(z.hidePlaceholderMenuItems){H.push("ui-screen-hidden")}if(l!==s){l=u.placeholder=s}}G=a.createElement("li");if(t.disabled){H.push("ui-state-disabled");G.setAttribute("aria-disabled",true)}G.setAttribute(E,F);G.setAttribute(J,p);if(D){G.setAttribute(A,true)}G.className=H.join(" ");G.setAttribute("role","option");n.setAttribute("tabindex","-1");if(this.isMultiple){e(n).addClass("ui-btn ui-checkbox-off ui-btn-icon-right")}G.appendChild(n);j.appendChild(G)}u.list[0].appendChild(j);if(!this.isMultiple&&!l.length){this.header.addClass("ui-screen-hidden")}else{this.headerTitle.text(this.placeholder)}u.list.listview()},_button:function(){return this.options.nativeMenu?this._super():e("<a>",{href:"#",role:"button",id:this.buttonId,"aria-haspopup":"true","aria-owns":this.menuId})},_destroy:function(){if(!this.options.nativeMenu){this.close();if(this._origTabIndex!==h){if(this._origTabIndex!==false){this.select.attr("tabindex",this._origTabIndex)}else{this.select.removeAttr("tabindex")}}if(this._removePlaceholderAttr){this._selectOptions().removeAttr("data-"+e.mobile.ns+"placeholder")}this.listbox.remove();this.menuPage.remove()}this._super()}})})(c);(function(j,k){var l={"ui-shadow":"shadow","ui-corner-all":"corners","ui-btn-inline":"inline","ui-shadow-icon":"iconshadow","ui-mini":"mini"},h=function(){var m=j.mobile.getAttribute.apply(this,arguments);return(m==null?k:m)},g=/[A-Z]/g;function f(m,o){var n=o?o:[];n.push("ui-btn");if(m.theme){n.push("ui-btn-"+m.theme)}if(m.icon){n=n.concat(["ui-icon-"+m.icon,"ui-btn-icon-"+m.iconpos]);if(m.iconshadow){n.push("ui-shadow-icon")}}if(m.inline){n.push("ui-btn-inline")}if(m.shadow){n.push("ui-shadow")}if(m.corners){n.push("ui-corner-all")}if(m.mini){n.push("ui-mini")}return n}function i(q){var m,s,p,n=false,u=true,t={icon:"",inline:false,shadow:false,corners:false,iconshadow:false,mini:false},r=[];q=q.split(" ");for(m=0;m<q.length;m++){p=true;s=l[q[m]];if(s!==k){p=false;t[s]=true}else{if(q[m].indexOf("ui-btn-icon-")===0){p=false;u=false;t.iconpos=q[m].substring(12)}else{if(q[m].indexOf("ui-icon-")===0){p=false;t.icon=q[m].substring(8)}else{if(q[m].indexOf("ui-btn-")===0&&q[m].length===8){p=false;t.theme=q[m].substring(7)}else{if(q[m]==="ui-btn"){p=false;n=true}}}}}if(p){r.push(q[m])}}if(u){t.icon=""}return{options:t,unknownClasses:r,alreadyEnhanced:n}}function e(m){return"-"+m.toLowerCase()}j.fn.buttonMarkup=function(p,o){var m,s,r,q,n,t=j.fn.buttonMarkup.defaults;for(m=0;m<this.length;m++){r=this[m];s=o?{alreadyEnhanced:false,unknownClasses:[]}:i(r.className);q=j.extend({},(s.alreadyEnhanced?s.options:{}),p);if(!s.alreadyEnhanced){for(n in t){if(q[n]===k){q[n]=h(r,n.replace(g,e))}}}r.className=f(j.extend({},t,q),s.unknownClasses).join(" ");if(r.tagName.toLowerCase()!=="button"){r.setAttribute("role","button")}}return this};j.fn.buttonMarkup.defaults={icon:"",iconpos:"left",theme:null,inline:false,shadow:true,corners:true,iconshadow:false,mini:false};j.extend(j.fn.buttonMarkup,{initSelector:"a:jqmData(role='button'), .ui-bar > a, .ui-bar > :jqmData(role='controlgroup') > a, button:not(:jqmData(role='navbar') button)"})})(c);(function(e,f){e.widget("mobile.controlgroup",e.extend({options:{enhanced:false,theme:null,shadow:false,corners:true,excludeInvisible:true,type:"vertical",mini:false},_create:function(){var i=this.element,h=this.options,g=e.mobile.page.prototype.keepNativeSelector();if(e.fn.buttonMarkup){this.element.find(e.fn.buttonMarkup.initSelector).not(g).buttonMarkup()}e.each(this._childWidgets,e.proxy(function(k,j){if(e.mobile[j]){this.element.find(e.mobile[j].initSelector).not(g)[j]()}},this));e.extend(this,{_ui:null,_initialRefresh:true});if(h.enhanced){this._ui={groupLegend:i.children(".ui-controlgroup-label").children(),childWrapper:i.children(".ui-controlgroup-controls")}}else{this._ui=this._enhance()}},_childWidgets:["checkboxradio","selectmenu","button"],_themeClassFromOption:function(g){return(g?(g==="none"?"":"ui-group-theme-"+g):"")},_enhance:function(){var h=this.element,g=this.options,i={groupLegend:h.children("legend"),childWrapper:h.addClass("ui-controlgroup ui-controlgroup-"+(g.type==="horizontal"?"horizontal":"vertical")+" "+this._themeClassFromOption(g.theme)+" "+(g.corners?"ui-corner-all ":"")+(g.mini?"ui-mini ":"")).wrapInner("<div class='ui-controlgroup-controls "+(g.shadow===true?"ui-shadow":"")+"'></div>").children()};if(i.groupLegend.length>0){e("<div role='heading' class='ui-controlgroup-label'></div>").append(i.groupLegend).prependTo(h)}return i},_init:function(){this.refresh()},_setOptions:function(h){var g,i,j=this.element;if(h.type!==f){j.removeClass("ui-controlgroup-horizontal ui-controlgroup-vertical").addClass("ui-controlgroup-"+(h.type==="horizontal"?"horizontal":"vertical"));g=true}if(h.theme!==f){j.removeClass(this._themeClassFromOption(this.options.theme)).addClass(this._themeClassFromOption(h.theme))}if(h.corners!==f){j.toggleClass("ui-corner-all",h.corners)}if(h.mini!==f){j.toggleClass("ui-mini",h.mini)}if(h.shadow!==f){this._ui.childWrapper.toggleClass("ui-shadow",h.shadow)}if(h.excludeInvisible!==f){this.options.excludeInvisible=h.excludeInvisible;g=true}i=this._super(h);if(g){this.refresh()}return i},container:function(){return this._ui.childWrapper},refresh:function(){var i=this.container(),h=i.find(".ui-btn").not(".ui-slider-handle"),g=this._initialRefresh;if(e.mobile.checkboxradio){i.find(":mobile-checkboxradio").checkboxradio("refresh")}this._addFirstLastClasses(h,this.options.excludeInvisible?this._getVisibles(h,g):h,g);this._initialRefresh=false},_destroy:function(){var i,h,g=this.options;if(g.enhanced){return this}i=this._ui;h=this.element.removeClass("ui-controlgroup ui-controlgroup-horizontal ui-controlgroup-vertical ui-corner-all ui-mini "+this._themeClassFromOption(g.theme)).find(".ui-btn").not(".ui-slider-handle");this._removeFirstLastClasses(h);i.groupLegend.unwrap();i.childWrapper.children().unwrap()}},e.mobile.behaviors.addFirstLastClasses))})(c);(function(e,f){e.widget("mobile.toolbar",{initSelector:":jqmData(role='footer'), :jqmData(role='header')",options:{theme:null,addBackBtn:false,backBtnTheme:null,backBtnText:"Back"},_create:function(){var g,h,j=this.element.is(":jqmData(role='header')")?"header":"footer",i=this.element.closest(".ui-page");if(i.length===0){i=false;this._on(this.document,{pageshow:"refresh"})}e.extend(this,{role:j,page:i,leftbtn:g,rightbtn:h});this.element.attr("role",j==="header"?"banner":"contentinfo").addClass("ui-"+j);this.refresh();this._setOptions(this.options)},_setOptions:function(i){if(i.addBackBtn!==f){this._updateBackButton()}if(i.backBtnTheme!=null){this.element.find(".ui-toolbar-back-btn").addClass("ui-btn ui-btn-"+i.backBtnTheme)}if(i.backBtnText!==f){this.element.find(".ui-toolbar-back-btn .ui-btn-text").text(i.backBtnText)}if(i.theme!==f){var g=this.options.theme?this.options.theme:"inherit",h=i.theme?i.theme:"inherit";this.element.removeClass("ui-bar-"+g).addClass("ui-bar-"+h)}this._super(i)},refresh:function(){if(this.role==="header"){this._addHeaderButtonClasses()}if(!this.page){this._setRelative();if(this.role==="footer"){this.element.appendTo("body")}else{if(this.role==="header"){this._updateBackButton()}}}this._addHeadingClasses();this._btnMarkup()},_setRelative:function(){e("[data-"+e.mobile.ns+"role='page']").css({position:"relative"})},_btnMarkup:function(){this.element.children("a").filter(":not([data-"+e.mobile.ns+"role='none'])").attr("data-"+e.mobile.ns+"role","button");this.element.trigger("create")},_addHeaderButtonClasses:function(){var g=this.element.children("a, button");this.leftbtn=g.hasClass("ui-btn-left")&&!g.hasClass("ui-toolbar-back-btn");this.rightbtn=g.hasClass("ui-btn-right");this.leftbtn=this.leftbtn||g.eq(0).not(".ui-btn-right,.ui-toolbar-back-btn").addClass("ui-btn-left").length;this.rightbtn=this.rightbtn||g.eq(1).addClass("ui-btn-right").length},_updateBackButton:function(){var h,g=this.options,i=g.backBtnTheme||g.theme;h=this._backButton=(this._backButton||{});if(this.options.addBackBtn&&this.role==="header"&&e(".ui-page").length>1&&(this.page?(this.page[0].getAttribute("data-"+e.mobile.ns+"url")!==e.mobile.path.stripHash(location.hash)):(e.mobile.navigate&&e.mobile.navigate.history&&e.mobile.navigate.history.activeIndex>0))&&!this.leftbtn){if(!h.attached){this.backButton=h.element=(h.element||e("<a role='button' href='javascript:void(0);' class='ui-btn ui-corner-all ui-shadow ui-btn-left "+(i?"ui-btn-"+i+" ":"")+"ui-toolbar-back-btn ui-icon-carat-l ui-btn-icon-left' data-"+e.mobile.ns+"rel='back'>"+g.backBtnText+"</a>")).prependTo(this.element);h.attached=true}}else{if(h.element){h.element.detach();h.attached=false}}},_addHeadingClasses:function(){this.element.children("h1, h2, h3, h4, h5, h6").addClass("ui-title").attr({role:"heading","aria-level":"1"})},_destroy:function(){var g;this.element.children("h1, h2, h3, h4, h5, h6").removeClass("ui-title").removeAttr("role").removeAttr("aria-level");if(this.role==="header"){this.element.children("a, button").removeClass("ui-btn-left ui-btn-right ui-btn ui-shadow ui-corner-all");if(this.backButton){this.backButton.remove()}}g=this.options.theme?this.options.theme:"inherit";this.element.removeClass("ui-bar-"+g);this.element.removeClass("ui-"+this.role).removeAttr("role")}})})(c);(function(e,f){e.widget("mobile.toolbar",e.mobile.toolbar,{options:{position:null,visibleOnPageShow:true,disablePageZoom:true,transition:"slide",fullscreen:false,tapToggle:true,tapToggleBlacklist:"a, button, input, select, textarea, .ui-header-fixed, .ui-footer-fixed, .ui-flipswitch, .ui-popup, .ui-panel, .ui-panel-dismiss-open",hideDuringFocus:"input, textarea, select",updatePagePadding:true,trackPersistentToolbars:true,supportBlacklist:function(){return !e.support.fixedPosition}},_create:function(){this._super();this.pagecontainer=e(":mobile-pagecontainer");if(this.options.position==="fixed"&&!this.options.supportBlacklist()){this._makeFixed()}},_makeFixed:function(){this.element.addClass("ui-"+this.role+"-fixed");this.updatePagePadding();this._addTransitionClass();this._bindPageEvents();this._bindToggleHandlers()},_setOptions:function(h){if(h.position==="fixed"&&this.options.position!=="fixed"){this._makeFixed()}if(this.options.position==="fixed"&&!this.options.supportBlacklist()){var g=(!!this.page)?this.page:(e(".ui-page-active").length>0)?e(".ui-page-active"):e(".ui-page").eq(0);if(h.fullscreen!==f){if(h.fullscreen){this.element.addClass("ui-"+this.role+"-fullscreen");g.addClass("ui-page-"+this.role+"-fullscreen")}else{this.element.removeClass("ui-"+this.role+"-fullscreen");g.removeClass("ui-page-"+this.role+"-fullscreen").addClass("ui-page-"+this.role+"-fixed")}}}this._super(h)},_addTransitionClass:function(){var g=this.options.transition;if(g&&g!=="none"){if(g==="slide"){g=this.element.hasClass("ui-header")?"slidedown":"slideup"}this.element.addClass(g)}},_bindPageEvents:function(){var g=(!!this.page)?this.element.closest(".ui-page"):this.document;this._on(g,{pagebeforeshow:"_handlePageBeforeShow",webkitAnimationStart:"_handleAnimationStart",animationstart:"_handleAnimationStart",updatelayout:"_handleAnimationStart",pageshow:"_handlePageShow",pagebeforehide:"_handlePageBeforeHide"})},_handlePageBeforeShow:function(){var g=this.options;if(g.disablePageZoom){e.mobile.zoom.disable(true)}if(!g.visibleOnPageShow){this.hide(true)}},_handleAnimationStart:function(){if(this.options.updatePagePadding){this.updatePagePadding((!!this.page)?this.page:".ui-page-active")}},_handlePageShow:function(){this.updatePagePadding((!!this.page)?this.page:".ui-page-active");if(this.options.updatePagePadding){this._on(this.window,{throttledresize:"updatePagePadding"})}},_handlePageBeforeHide:function(j,i){var m=this.options,l,k,h,g;if(m.disablePageZoom){e.mobile.zoom.enable(true)}if(m.updatePagePadding){this._off(this.window,"throttledresize")}if(m.trackPersistentToolbars){l=e(".ui-footer-fixed:jqmData(id)",this.page);k=e(".ui-header-fixed:jqmData(id)",this.page);h=l.length&&i.nextPage&&e(".ui-footer-fixed:jqmData(id='"+l.jqmData("id")+"')",i.nextPage)||e();g=k.length&&i.nextPage&&e(".ui-header-fixed:jqmData(id='"+k.jqmData("id")+"')",i.nextPage)||e();if(h.length||g.length){h.add(g).appendTo(e.mobile.pageContainer);i.nextPage.one("pageshow",function(){g.prependTo(this);h.appendTo(this)})}}},_visible:true,updatePagePadding:function(h){var g=this.element,j=(this.role==="header"),i=parseFloat(g.css(j?"top":"bottom"));if(this.options.fullscreen){return}h=(h&&h.type===f&&h)||this.page||g.closest(".ui-page");h=(!!this.page)?this.page:".ui-page-active";e(h).css("padding-"+(j?"top":"bottom"),g.outerHeight()+i)},_useTransition:function(k){var m=this.window,j=this.element,g=m.scrollTop(),h=j.height(),l=(!!this.page)?j.closest(".ui-page").height():e(".ui-page-active").height(),i=e.mobile.getScreenHeight();return !k&&(this.options.transition&&this.options.transition!=="none"&&((this.role==="header"&&!this.options.fullscreen&&g>h)||(this.role==="footer"&&!this.options.fullscreen&&g+i<l-h))||this.options.fullscreen)},show:function(h){var i="ui-fixed-hidden",g=this.element;if(this._useTransition(h)){g.removeClass("out "+i).addClass("in").animationComplete(function(){g.removeClass("in")})}else{g.removeClass(i)}this._visible=true},hide:function(h){var j="ui-fixed-hidden",g=this.element,i="out"+(this.options.transition==="slide"?" reverse":"");if(this._useTransition(h)){g.addClass(i).removeClass("in").animationComplete(function(){g.addClass(j).removeClass(i)})}else{g.addClass(j).removeClass(i)}this._visible=false},toggle:function(){this[this._visible?"hide":"show"]()},_bindToggleHandlers:function(){var i=this,l=i.options,h,j,g=true,k=(!!this.page)?this.page:e(".ui-page");k.bind("vclick",function(m){if(l.tapToggle&&!e(m.target).closest(l.tapToggleBlacklist).length){i.toggle()}}).bind("focusin focusout",function(m){if(screen.width<1025&&e(m.target).is(l.hideDuringFocus)&&!e(m.target).closest(".ui-header-fixed, .ui-footer-fixed").length){if(m.type==="focusout"&&!g){g=true;clearTimeout(j);h=setTimeout(function(){i.show()},0)}else{if(m.type==="focusin"&&!!g){clearTimeout(h);g=false;j=setTimeout(function(){i.hide()},0)}}}})},_setRelative:function(){if(this.options.position!=="fixed"){e("[data-"+e.mobile.ns+"role='page']").css({position:"relative"})}},_destroy:function(){var h,i,g,l,k,j=this.pagecontainer.pagecontainer("getActivePage");this._super();if(this.options.position==="fixed"){g=e("body>.ui-"+this.role+"-fixed").add(j.find(".ui-"+this.options.role+"-fixed")).not(this.element).length>0;k=e("body>.ui-"+this.role+"-fixed").add(j.find(".ui-"+this.options.role+"-fullscreen")).not(this.element).length>0;i="ui-header-fixed ui-footer-fixed ui-header-fullscreen in out ui-footer-fullscreen fade slidedown slideup ui-fixed-hidden";this.element.removeClass(i);if(!k){h="ui-page-"+this.role+"-fullscreen"}if(!g){l=this.role==="header";h+=" ui-page-"+this.role+"-fixed";j.css("padding-"+(l?"top":"bottom"),"")}j.removeClass(h)}}})})(c);(function(e,f){e.widget("mobile.toolbar",e.mobile.toolbar,{_makeFixed:function(){this._super();this._workarounds()},_workarounds:function(){var j=navigator.userAgent,g=navigator.platform,i=j.match(/AppleWebKit\/([0-9]+)/),l=!!i&&i[1],k=null,h=this;if(g.indexOf("iPhone")>-1||g.indexOf("iPad")>-1||g.indexOf("iPod")>-1){k="ios"}else{if(j.indexOf("Android")>-1){k="android"}else{return}}if(k==="ios"){h._bindScrollWorkaround()}else{if(k==="android"&&l&&l<534){h._bindScrollWorkaround();h._bindListThumbWorkaround()}else{return}}},_viewportOffset:function(){var g=this.element,i=g.hasClass("ui-header"),h=Math.abs(g.offset().top-this.window.scrollTop());if(!i){h=Math.round(h-this.window.height()+g.outerHeight())-60}return h},_bindScrollWorkaround:function(){var g=this;this._on(this.window,{scrollstop:function(){var h=g._viewportOffset();if(h>2&&g._visible){g._triggerRedraw()}}})},_bindListThumbWorkaround:function(){this.element.closest(".ui-page").addClass("ui-android-2x-fixed")},_triggerRedraw:function(){var g=parseFloat(e(".ui-page-active").css("padding-bottom"));e(".ui-page-active").css("padding-bottom",(g+1)+"px");setTimeout(function(){e(".ui-page-active").css("padding-bottom",g+"px")},0)},destroy:function(){this._super();this.element.closest(".ui-page-active").removeClass("ui-android-2x-fix")}})})(c);(function(g,i){var e=(g.mobile.browser.oldIE&&g.mobile.browser.oldIE<=8),h=g("<div class='ui-popup-arrow-guide'></div><div class='ui-popup-arrow-container"+(e?" ie":"")+"'><div class='ui-popup-arrow'></div></div>");function f(){var m=h.clone(),l=m.eq(0),k=m.eq(1),j=k.children();return{arEls:k.add(l),gd:l,ct:k,ar:j}}g.widget("mobile.popup",g.mobile.popup,{options:{arrow:""},_create:function(){var j,k=this._super();if(this.options.arrow){this._ui.arrow=j=this._addArrow()}return k},_addArrow:function(){var l,k=this.options,j=f();l=this._themeClassFromOption("ui-body-",k.theme);j.ar.addClass(l+(k.shadow?" ui-overlay-shadow":""));j.arEls.hide().appendTo(this.element);return j},_unenhance:function(){var j=this._ui.arrow;if(j){j.arEls.remove()}return this._super()},_tryAnArrow:function(l,m,k,u,n){var v,j,t,o={},q={};if(u.arFull[l.dimKey]>u.guideDims[l.dimKey]){return n}o[l.fst]=k[l.fst]+(u.arHalf[l.oDimKey]+u.menuHalf[l.oDimKey])*l.offsetFactor-u.contentBox[l.fst]+(u.clampInfo.menuSize[l.oDimKey]-u.contentBox[l.oDimKey])*l.arrowOffsetFactor;o[l.snd]=k[l.snd];v=u.result||this._calculateFinalLocation(o,u.clampInfo);j={x:v.left,y:v.top};q[l.fst]=j[l.fst]+u.contentBox[l.fst]+l.tipOffset;q[l.snd]=Math.max(v[l.prop]+u.guideOffset[l.prop]+u.arHalf[l.dimKey],Math.min(v[l.prop]+u.guideOffset[l.prop]+u.guideDims[l.dimKey]-u.arHalf[l.dimKey],k[l.snd]));t=Math.abs(k.x-q.x)+Math.abs(k.y-q.y);if(!n||t<n.diff){q[l.snd]-=u.arHalf[l.dimKey]+v[l.prop]+u.contentBox[l.snd];n={dir:m,diff:t,result:v,posProp:l.prop,posVal:q[l.snd]}}return n},_getPlacementState:function(m){var l,n,j=this._ui.arrow,k={clampInfo:this._clampPopupWidth(!m),arFull:{cx:j.ct.width(),cy:j.ct.height()},guideDims:{cx:j.gd.width(),cy:j.gd.height()},guideOffset:j.gd.offset()};l=this.element.offset();j.gd.css({left:0,top:0,right:0,bottom:0});n=j.gd.offset();k.contentBox={x:n.left-l.left,y:n.top-l.top,cx:j.gd.width(),cy:j.gd.height()};j.gd.removeAttr("style");k.guideOffset={left:k.guideOffset.left-l.left,top:k.guideOffset.top-l.top};k.arHalf={cx:k.arFull.cx/2,cy:k.arFull.cy/2};k.menuHalf={cx:k.clampInfo.menuSize.cx/2,cy:k.clampInfo.menuSize.cy/2};return k},_placementCoords:function(k){var m,o,n,q,l,p=this.options.arrow,j=this._ui.arrow;if(!j){return this._super(k)}j.arEls.show();l={};m=this._getPlacementState(true);n={l:{fst:"x",snd:"y",prop:"top",dimKey:"cy",oDimKey:"cx",offsetFactor:1,tipOffset:-m.arHalf.cx,arrowOffsetFactor:0},r:{fst:"x",snd:"y",prop:"top",dimKey:"cy",oDimKey:"cx",offsetFactor:-1,tipOffset:m.arHalf.cx+m.contentBox.cx,arrowOffsetFactor:1},b:{fst:"y",snd:"x",prop:"left",dimKey:"cx",oDimKey:"cy",offsetFactor:-1,tipOffset:m.arHalf.cy+m.contentBox.cy,arrowOffsetFactor:1},t:{fst:"y",snd:"x",prop:"left",dimKey:"cx",oDimKey:"cy",offsetFactor:1,tipOffset:-m.arHalf.cy,arrowOffsetFactor:0}};g.each((p===true?"l,t,r,b":p).split(","),g.proxy(function(r,s){o=this._tryAnArrow(n[s],s,k,m,o)},this));if(!o){j.arEls.hide();return this._super(k)}j.ct.removeClass("ui-popup-arrow-l ui-popup-arrow-t ui-popup-arrow-r ui-popup-arrow-b").addClass("ui-popup-arrow-"+o.dir).removeAttr("style").css(o.posProp,o.posVal).show();if(!e){q=this.element.offset();l[n[o.dir].fst]=j.ct.offset();l[n[o.dir].snd]={left:q.left+m.contentBox.x,top:q.top+m.contentBox.y}}return o.result},_setOptions:function(m){var n,l=this.options.theme,j=this._ui.arrow,k=this._super(m);if(m.arrow!==i){if(!j&&m.arrow){this._ui.arrow=this._addArrow();return}else{if(j&&!m.arrow){j.arEls.remove();this._ui.arrow=null}}}j=this._ui.arrow;if(j){if(m.theme!==i){l=this._themeClassFromOption("ui-body-",l);n=this._themeClassFromOption("ui-body-",m.theme);j.ar.removeClass(l).addClass(n)}if(m.shadow!==i){j.ar.toggleClass("ui-overlay-shadow",m.shadow)}}return k},_destroy:function(){var j=this._ui.arrow;if(j){j.arEls.remove()}return this._super()}})})(c);(function(e,f){e.widget("mobile.panel",{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",pageContainer:"ui-panel-page-container",pageWrapper:"ui-panel-wrapper",pageFixedToolbar:"ui-panel-fixed-toolbar",pageContentPrefix:"ui-panel-page-content",animate:"ui-panel-animate"},animate:true,theme:null,position:"left",dismissible:true,display:"reveal",swipeClose:true,positionFixed:false},_closeLink:null,_parentPage:null,_page:null,_modal:null,_panelInner:null,_wrapper:null,_fixedToolbars:null,_create:function(){var h=this.element,g=h.closest(".ui-page, :jqmData(role='page')");e.extend(this,{_closeLink:h.find(":jqmData(rel='close')"),_parentPage:(g.length>0)?g:false,_openedPage:null,_page:this._getPage,_panelInner:this._getPanelInner(),_fixedToolbars:this._getFixedToolbars});if(this.options.display!=="overlay"){this._getWrapper()}this._addPanelClasses();if(e.support.cssTransform3d&&!!this.options.animate){this.element.addClass(this.options.classes.animate)}this._bindUpdateLayout();this._bindCloseEvents();this._bindLinkListeners();this._bindPageEvents();if(!!this.options.dismissible){this._createModal()}this._bindSwipeEvents()},_getPanelInner:function(){var g=this.element.find("."+this.options.classes.panelInner);if(g.length===0){g=this.element.children().wrapAll("<div class='"+this.options.classes.panelInner+"' />").parent()}return g},_createModal:function(){var g=this,h=g._parentPage?g._parentPage.parent():g.element.parent();g._modal=e("<div class='"+g.options.classes.modal+"'></div>").on("mousedown",function(){g.close()}).appendTo(h)},_getPage:function(){var g=this._openedPage||this._parentPage||e("."+e.mobile.activePageClass);return g},_getWrapper:function(){var g=this._page().find("."+this.options.classes.pageWrapper);if(g.length===0){g=this._page().children(".ui-header:not(.ui-header-fixed), .ui-content:not(.ui-popup), .ui-footer:not(.ui-footer-fixed)").wrapAll("<div class='"+this.options.classes.pageWrapper+"'></div>").parent()}this._wrapper=g},_getFixedToolbars:function(){var i=e("body").children(".ui-header-fixed, .ui-footer-fixed"),h=this._page().find(".ui-header-fixed, .ui-footer-fixed"),g=i.add(h).addClass(this.options.classes.pageFixedToolbar);return g},_getPosDisplayClasses:function(g){return g+"-position-"+this.options.position+" "+g+"-display-"+this.options.display},_getPanelClasses:function(){var g=this.options.classes.panel+" "+this._getPosDisplayClasses(this.options.classes.panel)+" "+this.options.classes.panelClosed+" ui-body-"+(this.options.theme?this.options.theme:"inherit");if(!!this.options.positionFixed){g+=" "+this.options.classes.panelFixed}return g},_addPanelClasses:function(){this.element.addClass(this._getPanelClasses())},_handleCloseClick:function(g){if(!g.isDefaultPrevented()){this.close()}},_bindCloseEvents:function(){this._on(this._closeLink,{click:"_handleCloseClick"});this._on({"click a:jqmData(ajax='false')":"_handleCloseClick"})},_positionPanel:function(h){var g=this,j=g._panelInner.outerHeight(),i=j>e.mobile.getScreenHeight();if(i||!g.options.positionFixed){if(i){g._unfixPanel();e.mobile.resetActivePageHeight(j)}if(h){this.window[0].scrollTo(0,e.mobile.defaultHomeScroll)}}else{g._fixPanel()}},_bindFixListener:function(){this._on(e(b),{throttledresize:"_positionPanel"})},_unbindFixListener:function(){this._off(e(b),"throttledresize")},_unfixPanel:function(){if(!!this.options.positionFixed&&e.support.fixedPosition){this.element.removeClass(this.options.classes.panelFixed)}},_fixPanel:function(){if(!!this.options.positionFixed&&e.support.fixedPosition){this.element.addClass(this.options.classes.panelFixed)}},_bindUpdateLayout:function(){var g=this;g.element.on("updatelayout",function(){if(g._open){g._positionPanel()}})},_bindLinkListeners:function(){this._on("body",{"click a":"_handleClick"})},_handleClick:function(i){var h,g=this.element.attr("id");if(i.currentTarget.href.split("#")[1]===g&&g!==f){i.preventDefault();h=e(i.target);if(h.hasClass("ui-btn")){h.addClass(e.mobile.activeBtnClass);this.element.one("panelopen panelclose",function(){h.removeClass(e.mobile.activeBtnClass)})}this.toggle()}},_bindSwipeEvents:function(){var g=this,h=g._modal?g.element.add(g._modal):g.element;if(!!g.options.swipeClose){if(g.options.position==="left"){h.on("swipeleft.panel",function(){g.close()})}else{h.on("swiperight.panel",function(){g.close()})}}},_bindPageEvents:function(){var g=this;this.document.on("panelbeforeopen",function(h){if(g._open&&h.target!==g.element[0]){g.close()}}).on("keyup.panel",function(h){if(h.keyCode===27&&g._open){g.close()}});if(!this._parentPage&&this.options.display!=="overlay"){this._on(this.document,{pageshow:function(){this._openedPage=null;this._getWrapper()}})}if(g._parentPage){this.document.on("pagehide",":jqmData(role='page')",function(){if(g._open){g.close(true)}})}else{this.document.on("pagebeforehide",function(){if(g._open){g.close(true)}})}},_open:false,_pageContentOpenClasses:null,_modalOpenClasses:null,open:function(j){if(!this._open){var i=this,k=i.options,h=function(){i._off(i.document,"panelclose");i._page().jqmData("panel","open");if(e.support.cssTransform3d&&!!k.animate&&k.display!=="overlay"){i._wrapper.addClass(k.classes.animate);i._fixedToolbars().addClass(k.classes.animate)}if(!j&&e.support.cssTransform3d&&!!k.animate){(i._wrapper||i.element).animationComplete(g,"transition")}else{setTimeout(g,0)}if(k.theme&&k.display!=="overlay"){i._page().parent().addClass(k.classes.pageContainer+"-themed "+k.classes.pageContainer+"-"+k.theme)}i.element.removeClass(k.classes.panelClosed).addClass(k.classes.panelOpen);i._positionPanel(true);i._pageContentOpenClasses=i._getPosDisplayClasses(k.classes.pageContentPrefix);if(k.display!=="overlay"){i._page().parent().addClass(k.classes.pageContainer);i._wrapper.addClass(i._pageContentOpenClasses);i._fixedToolbars().addClass(i._pageContentOpenClasses)}i._modalOpenClasses=i._getPosDisplayClasses(k.classes.modal)+" "+k.classes.modalOpen;if(i._modal){i._modal.addClass(i._modalOpenClasses).height(Math.max(i._modal.height(),i.document.height()))}},g=function(){if(!i._open){return}if(k.display!=="overlay"){i._wrapper.addClass(k.classes.pageContentPrefix+"-open");i._fixedToolbars().addClass(k.classes.pageContentPrefix+"-open")}i._bindFixListener();i._trigger("open");i._openedPage=i._page()};i._trigger("beforeopen");if(i._page().jqmData("panel")==="open"){i._on(i.document,{panelclose:h})}else{h()}i._open=true}},close:function(i){if(this._open){var h=this,k=this.options,j=function(){h.element.removeClass(k.classes.panelOpen);if(k.display!=="overlay"){h._wrapper.removeClass(h._pageContentOpenClasses);h._fixedToolbars().removeClass(h._pageContentOpenClasses)}if(!i&&e.support.cssTransform3d&&!!k.animate){(h._wrapper||h.element).animationComplete(g,"transition")}else{setTimeout(g,0)}if(h._modal){h._modal.removeClass(h._modalOpenClasses).height("")}},g=function(){if(k.theme&&k.display!=="overlay"){h._page().parent().removeClass(k.classes.pageContainer+"-themed "+k.classes.pageContainer+"-"+k.theme)}h.element.addClass(k.classes.panelClosed);if(k.display!=="overlay"){h._page().parent().removeClass(k.classes.pageContainer);h._wrapper.removeClass(k.classes.pageContentPrefix+"-open");h._fixedToolbars().removeClass(k.classes.pageContentPrefix+"-open")}if(e.support.cssTransform3d&&!!k.animate&&k.display!=="overlay"){h._wrapper.removeClass(k.classes.animate);h._fixedToolbars().removeClass(k.classes.animate)}h._fixPanel();h._unbindFixListener();e.mobile.resetActivePageHeight();h._page().jqmRemoveData("panel");h._trigger("close");h._openedPage=null};h._trigger("beforeclose");j();h._open=false}},toggle:function(){this[this._open?"close":"open"]()},_destroy:function(){var h,i=this.options,g=(e("body > :mobile-panel").length+e.mobile.activePage.find(":mobile-panel").length)>1;if(i.display!=="overlay"){h=e("body > :mobile-panel").add(e.mobile.activePage.find(":mobile-panel"));if(h.not(".ui-panel-display-overlay").not(this.element).length===0){this._wrapper.children().unwrap()}if(this._open){this._fixedToolbars().removeClass(i.classes.pageContentPrefix+"-open");if(e.support.cssTransform3d&&!!i.animate){this._fixedToolbars().removeClass(i.classes.animate)}this._page().parent().removeClass(i.classes.pageContainer);if(i.theme){this._page().parent().removeClass(i.classes.pageContainer+"-themed "+i.classes.pageContainer+"-"+i.theme)}}}if(!g){this.document.off("panelopen panelclose")}if(this._open){this._page().jqmRemoveData("panel")}this._panelInner.children().unwrap();this.element.removeClass([this._getPanelClasses(),i.classes.panelOpen,i.classes.animate].join(" ")).off("swipeleft.panel swiperight.panel").off("panelbeforeopen").off("panelhide").off("keyup.panel").off("updatelayout");if(this._modal){this._modal.remove()}}})})(c);(function(e,f){e.widget("mobile.table",{options:{classes:{table:"ui-table"},enhanced:false},_create:function(){if(!this.options.enhanced){this.element.addClass(this.options.classes.table)}e.extend(this,{headers:f,allHeaders:f});this._refresh(true)},_setHeaders:function(){var g=this.element.find("thead tr");this.headers=this.element.find("tr:eq(0)").children();this.allHeaders=this.headers.add(g.children())},refresh:function(){this._refresh()},rebuild:e.noop,_refresh:function(){var h=this.element,g=h.find("thead tr");this._setHeaders();g.each(function(){var i=0;e(this).children().each(function(){var m=parseInt(this.getAttribute("colspan"),10),k=":nth-child("+(i+1)+")",l;this.setAttribute("data-"+e.mobile.ns+"colstart",i+1);if(m){for(l=0;l<m-1;l++){i++;k+=", :nth-child("+(i+1)+")"}}e(this).jqmData("cells",h.find("tr").not(g.eq(0)).not(this).children(k));i++})})}})})(c);(function(e,f){e.widget("mobile.table",e.mobile.table,{options:{mode:"columntoggle",columnBtnTheme:null,columnPopupTheme:null,columnBtnText:"Columns...",classes:e.extend(e.mobile.table.prototype.options.classes,{popup:"ui-table-columntoggle-popup",columnBtn:"ui-table-columntoggle-btn",priorityPrefix:"ui-table-priority-",columnToggleTable:"ui-table-columntoggle"})},_create:function(){this._super();if(this.options.mode!=="columntoggle"){return}e.extend(this,{_menu:null});if(this.options.enhanced){this._menu=e(this.document[0].getElementById(this._id()+"-popup")).children().first();this._addToggles(this._menu,true)}else{this._menu=this._enhanceColToggle();this.element.addClass(this.options.classes.columnToggleTable)}this._setupEvents();this._setToggleState()},_id:function(){return(this.element.attr("id")||(this.widgetName+this.uuid))},_setupEvents:function(){this._on(this.window,{throttledresize:"_setToggleState"});this._on(this._menu,{"change input":"_menuInputChange"})},_addToggles:function(l,j){var i,h=0,k=this.options,g=l.controlgroup("container");if(j){i=l.find("input")}else{g.empty()}this.headers.not("td").each(function(){var m,n,p=e(this),o=e.mobile.getAttribute(this,"priority");if(o){n=p.add(p.jqmData("cells"));n.addClass(k.classes.priorityPrefix+o);m=(j?i.eq(h++):e("<label><input type='checkbox' checked />"+(p.children("abbr").first().attr("title")||p.text())+"</label>").appendTo(g).children(0).checkboxradio({theme:k.columnPopupTheme})).jqmData("header",p).jqmData("cells",n);p.jqmData("input",m)}});if(!j){l.controlgroup("refresh")}},_menuInputChange:function(g){var h=e(g.target),i=h[0].checked;h.jqmData("cells").toggleClass("ui-table-cell-hidden",!i).toggleClass("ui-table-cell-visible",i)},_unlockCells:function(g){g.removeClass("ui-table-cell-hidden ui-table-cell-visible")},_enhanceColToggle:function(){var n,i,g,m,l=this.element,k=this.options,j=e.mobile.ns,h=this.document[0].createDocumentFragment();n=this._id()+"-popup";i=e("<a href='#"+n+"' class='"+k.classes.columnBtn+" ui-btn ui-btn-"+(k.columnBtnTheme||"a")+" ui-corner-all ui-shadow ui-mini' data-"+j+"rel='popup'>"+k.columnBtnText+"</a>");g=e("<div class='"+k.classes.popup+"' id='"+n+"'></div>");m=e("<fieldset></fieldset>").controlgroup();this._addToggles(m,false);m.appendTo(g);h.appendChild(g[0]);h.appendChild(i[0]);l.before(h);g.popup();return m},rebuild:function(){this._super();if(this.options.mode==="columntoggle"){this._refresh(false)}},_refresh:function(h){var j,i,g;this._super(h);if(!h&&this.options.mode==="columntoggle"){j=this.headers;i=[];this._menu.find("input").each(function(){var k=e(this),m=k.jqmData("header"),l=j.index(m[0]);if(l>-1&&!k.prop("checked")){i.push(l)}});this._unlockCells(this.element.find(".ui-table-cell-hidden, .ui-table-cell-visible"));this._addToggles(this._menu,h);for(g=i.length-1;g>-1;g--){j.eq(i[g]).jqmData("input").prop("checked",false).checkboxradio("refresh").trigger("change")}}},_setToggleState:function(){this._menu.find("input").each(function(){var g=e(this);this.checked=g.jqmData("cells").eq(0).css("display")==="table-cell";g.checkboxradio("refresh")})},_destroy:function(){this._super()}})})(c);(function(e,f){e.widget("mobile.table",e.mobile.table,{options:{mode:"reflow",classes:e.extend(e.mobile.table.prototype.options.classes,{reflowTable:"ui-table-reflow",cellLabels:"ui-table-cell-label"})},_create:function(){this._super();if(this.options.mode!=="reflow"){return}if(!this.options.enhanced){this.element.addClass(this.options.classes.reflowTable);this._updateReflow()}},rebuild:function(){this._super();if(this.options.mode==="reflow"){this._refresh(false)}},_refresh:function(g){this._super(g);if(!g&&this.options.mode==="reflow"){this._updateReflow()}},_updateReflow:function(){var h=this,g=this.options;e(h.allHeaders.get().reverse()).each(function(){var i=e(this).jqmData("cells"),j=e.mobile.getAttribute(this,"colstart"),n=i.not(this).filter("thead th").length&&" ui-table-cell-label-top",m=e(this).clone().contents(),l,k;if(m.length>0){if(n){l=parseInt(this.getAttribute("colspan"),10);k="";if(l){k="td:nth-child("+l+"n + "+(j)+")"}h._addLabels(i.filter(k),g.classes.cellLabels+n,m)}else{h._addLabels(i,g.classes.cellLabels,m)}}})},_addLabels:function(h,g,i){if(i.length===1&&i[0].nodeName.toLowerCase()==="abbr"){i=i.eq(0).attr("title")}h.not(":has(b."+g+")").prepend(e("<b class='"+g+"'></b>").append(i))}})})(c);(function(f,g){var e=function(h,i){return((""+(f.mobile.getAttribute(this,"filtertext")||f(this).text())).toLowerCase().indexOf(i)===-1)};f.widget("mobile.filterable",{initSelector:":jqmData(filter='true')",options:{filterReveal:false,filterCallback:e,enhanced:false,input:null,children:"> li, > option, > optgroup option, > tbody tr, > .ui-controlgroup-controls > .ui-btn, > .ui-controlgroup-controls > .ui-checkbox, > .ui-controlgroup-controls > .ui-radio"},_create:function(){var h=this.options;f.extend(this,{_search:null,_timer:0});this._setInput(h.input);if(!h.enhanced){this._filterItems(((this._search&&this._search.val())||"").toLowerCase())}},_onKeyUp:function(){var i,j,h=this._search;if(h){i=h.val().toLowerCase(),j=f.mobile.getAttribute(h[0],"lastval")+"";if(j&&j===i){return}if(this._timer){b.clearTimeout(this._timer);this._timer=0}this._timer=this._delay(function(){if(this._trigger("beforefilter",null,{input:h})===false){return false}h[0].setAttribute("data-"+f.mobile.ns+"lastval",i);this._filterItems(i);this._timer=0},250)}},_getFilterableItems:function(){var j=this.element,i=this.options.children,h=!i?{length:0}:f.isFunction(i)?i():i.nodeName?f(i):i.jquery?i:this.element.find(i);if(h.length===0){h=j.children()}return h},_filterItems:function(j){var o,p,i,m,n=[],l=[],h=this.options,k=this._getFilterableItems();if(j!=null){p=h.filterCallback||e;i=k.length;for(o=0;o<i;o++){m=(p.call(k[o],o,j))?l:n;m.push(k[o])}}if(l.length===0){k[(h.filterReveal&&j.length===0)?"addClass":"removeClass"]("ui-screen-hidden")}else{f(l).addClass("ui-screen-hidden");f(n).removeClass("ui-screen-hidden")}this._refreshChildWidget();this._trigger("filter",null,{items:k})},_refreshChildWidget:function(){var i,h,j=["collapsibleset","selectmenu","controlgroup","listview"];for(h=j.length-1;h>-1;h--){i=j[h];if(f.mobile[i]){i=this.element.data("mobile-"+i);if(i&&f.isFunction(i.refresh)){i.refresh()}}}},_setInput:function(h){var i=this._search;if(this._timer){b.clearTimeout(this._timer);this._timer=0}if(i){this._off(i,"keyup change input");i=null}if(h){i=h.jquery?h:h.nodeName?f(h):this.document.find(h);this._on(i,{keydown:"_onKeyDown",keypress:"_onKeyPress",keyup:"_onKeyUp",change:"_onKeyUp",input:"_onKeyUp"})}this._search=i},_onKeyDown:function(h){if(h.keyCode===f.ui.keyCode.ENTER){h.preventDefault();this._preventKeyPress=true}},_onKeyPress:function(h){if(this._preventKeyPress){h.preventDefault();this._preventKeyPress=false}},_setOptions:function(h){var i=!((h.filterReveal===g)&&(h.filterCallback===g)&&(h.children===g));this._super(h);if(h.input!==g){this._setInput(h.input);i=true}if(i){this.refresh()}},_destroy:function(){var i=this.options,h=this._getFilterableItems();if(i.enhanced){h.toggleClass("ui-screen-hidden",i.filterReveal)}else{h.removeClass("ui-screen-hidden")}},refresh:function(){if(this._timer){b.clearTimeout(this._timer);this._timer=0}this._filterItems(((this._search&&this._search.val())||"").toLowerCase())}})})(c);(function(f,i){var e=function(j,k){return function(l){k.call(this,l);j._syncTextInputOptions(l)}},g=/(^|\s)ui-li-divider(\s|$)/,h=f.mobile.filterable.prototype.options.filterCallback;f.mobile.filterable.prototype.options.filterCallback=function(j,k){return !this.className.match(g)&&h.call(this,j,k)};f.widget("mobile.filterable",f.mobile.filterable,{options:{filterPlaceholder:"Filter items...",filterTheme:null},_create:function(){var j,m,l=this.element,n=["collapsibleset","selectmenu","controlgroup","listview"],k={};this._super();f.extend(this,{_widget:null});for(j=n.length-1;j>-1;j--){m=n[j];if(f.mobile[m]){if(this._setWidget(l.data("mobile-"+m))){break}else{k[m+"create"]="_handleCreate"}}}if(!this._widget){this._on(l,k)}},_handleCreate:function(j){this._setWidget(this.element.data("mobile-"+j.type.substring(0,j.type.length-6)))},_trigger:function(j,k,l){if(this._widget&&this._widget.widgetFullName==="mobile-listview"&&j==="beforefilter"){this._widget._trigger("beforefilter",k,l)}return this._super(j,k,l)},_setWidget:function(j){if(!this._widget&&j){this._widget=j;this._widget._setOptions=e(this,this._widget._setOptions)}if(!!this._widget){this._syncTextInputOptions(this._widget.options);if(this._widget.widgetName==="listview"){this._widget.options.hideDividers=true;this._widget.element.listview("refresh")}}return !!this._widget},_isSearchInternal:function(){return(this._search&&this._search.jqmData("ui-filterable-"+this.uuid+"-internal"))},_setInput:function(j){var m=this.options,l=true,k={};if(!j){if(this._isSearchInternal()){return}else{l=false;j=f("<input data-"+f.mobile.ns+"type='search' placeholder='"+m.filterPlaceholder+"'></input>").jqmData("ui-filterable-"+this.uuid+"-internal",true);f("<form class='ui-filterable'></form>").append(j).submit(function(n){n.preventDefault();j.blur()}).insertBefore(this.element);if(f.mobile.textinput){if(this.options.filterTheme!=null){k.theme=m.filterTheme}j.textinput(k)}}}this._super(j);if(this._isSearchInternal()&&l){this._search.attr("placeholder",this.options.filterPlaceholder)}},_setOptions:function(k){var j=this._super(k);if(k.filterPlaceholder!==i){if(this._isSearchInternal()){this._search.attr("placeholder",k.filterPlaceholder)}}if(k.filterTheme!==i&&this._search&&f.mobile.textinput){this._search.textinput("option","theme",k.filterTheme)}return j},_refreshChildWidget:function(){this._refreshingChildWidget=true;this._superApply(arguments);this._refreshingChildWidget=false},refresh:function(){if(!this._refreshingChildWidget){this._superApply(arguments)}},_destroy:function(){if(this._isSearchInternal()){this._search.remove()}this._super()},_syncTextInputOptions:function(l){var k,j={};if(this._isSearchInternal()&&f.mobile.textinput){for(k in f.mobile.textinput.prototype.options){if(l[k]!==i){if(k==="theme"&&this.options.filterTheme!=null){j[k]=this.options.filterTheme}else{j[k]=l[k]}}}this._search.textinput("option",j)}}});f.widget("mobile.listview",f.mobile.listview,{options:{filter:false},_create:function(){if(this.options.filter===true&&!this.element.data("mobile-filterable")){this.element.filterable()}return this._super()},refresh:function(){var j;this._superApply(arguments);if(this.options.filter===true){j=this.element.data("mobile-filterable");if(j){j.refresh()}}}})})(c);
/*!
* jQuery UI Tabs fadf2b312a05040436451c64bbfaf4814bc62c56
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/tabs/
*
* Depends:
* jquery.ui.core.js
* jquery.ui.widget.js
*/
(function(g,i){var e=0,j=/#.*$/;function h(){return ++e}function f(k){return k.hash.length>1&&decodeURIComponent(k.href.replace(j,""))===decodeURIComponent(location.href.replace(j,""))}g.widget("ui.tabs",{version:"fadf2b312a05040436451c64bbfaf4814bc62c56",delay:300,options:{active:null,collapsible:false,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var l=this,k=this.options;this.running=false;this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",k.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(m){if(g(this).is(".ui-state-disabled")){m.preventDefault()}}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){if(g(this).closest("li").is(".ui-state-disabled")){this.blur()}});this._processTabs();k.active=this._initialActive();if(g.isArray(k.disabled)){k.disabled=g.unique(k.disabled.concat(g.map(this.tabs.filter(".ui-state-disabled"),function(m){return l.tabs.index(m)}))).sort()}if(this.options.active!==false&&this.anchors.length){this.active=this._findActive(k.active)}else{this.active=g()}this._refresh();if(this.active.length){this.load(k.active)}},_initialActive:function(){var l=this.options.active,k=this.options.collapsible,m=location.hash.substring(1);if(l===null){if(m){this.tabs.each(function(n,o){if(g(o).attr("aria-controls")===m){l=n;return false}})}if(l===null){l=this.tabs.index(this.tabs.filter(".ui-tabs-active"))}if(l===null||l===-1){l=this.tabs.length?0:false}}if(l!==false){l=this.tabs.index(this.tabs.eq(l));if(l===-1){l=k?false:0}}if(!k&&l===false&&this.anchors.length){l=0}return l},_getCreateEventData:function(){return{tab:this.active,panel:!this.active.length?g():this._getPanelForTab(this.active)}},_tabKeydown:function(m){var l=g(this.document[0].activeElement).closest("li"),k=this.tabs.index(l),n=true;if(this._handlePageNav(m)){return}switch(m.keyCode){case g.ui.keyCode.RIGHT:case g.ui.keyCode.DOWN:k++;break;case g.ui.keyCode.UP:case g.ui.keyCode.LEFT:n=false;k--;break;case g.ui.keyCode.END:k=this.anchors.length-1;break;case g.ui.keyCode.HOME:k=0;break;case g.ui.keyCode.SPACE:m.preventDefault();clearTimeout(this.activating);this._activate(k);return;case g.ui.keyCode.ENTER:m.preventDefault();clearTimeout(this.activating);this._activate(k===this.options.active?false:k);return;default:return}m.preventDefault();clearTimeout(this.activating);k=this._focusNextTab(k,n);if(!m.ctrlKey){l.attr("aria-selected","false");this.tabs.eq(k).attr("aria-selected","true");this.activating=this._delay(function(){this.option("active",k)},this.delay)}},_panelKeydown:function(k){if(this._handlePageNav(k)){return}if(k.ctrlKey&&k.keyCode===g.ui.keyCode.UP){k.preventDefault();this.active.focus()}},_handlePageNav:function(k){if(k.altKey&&k.keyCode===g.ui.keyCode.PAGE_UP){this._activate(this._focusNextTab(this.options.active-1,false));return true}if(k.altKey&&k.keyCode===g.ui.keyCode.PAGE_DOWN){this._activate(this._focusNextTab(this.options.active+1,true));return true}},_findNextTab:function(l,m){var k=this.tabs.length-1;function n(){if(l>k){l=0}if(l<0){l=k}return l}while(g.inArray(n(),this.options.disabled)!==-1){l=m?l+1:l-1}return l},_focusNextTab:function(k,l){k=this._findNextTab(k,l);this.tabs.eq(k).focus();return k},_setOption:function(k,l){if(k==="active"){this._activate(l);return}if(k==="disabled"){this._setupDisabled(l);return}this._super(k,l);if(k==="collapsible"){this.element.toggleClass("ui-tabs-collapsible",l);if(!l&&this.options.active===false){this._activate(0)}}if(k==="event"){this._setupEvents(l)}if(k==="heightStyle"){this._setupHeightStyle(l)}},_tabId:function(k){return k.attr("aria-controls")||"ui-tabs-"+h()},_sanitizeSelector:function(k){return k?k.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var l=this.options,k=this.tablist.children(":has(a[href])");l.disabled=g.map(k.filter(".ui-state-disabled"),function(m){return k.index(m)});this._processTabs();if(l.active===false||!this.anchors.length){l.active=false;this.active=g()}else{if(this.active.length&&!g.contains(this.tablist[0],this.active[0])){if(this.tabs.length===l.disabled.length){l.active=false;this.active=g()}else{this._activate(this._findNextTab(Math.max(0,l.active-1),false))}}else{l.active=this.tabs.index(this.active)}}this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled);this._setupEvents(this.options.event);this._setupHeightStyle(this.options.heightStyle);this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1});this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"});if(!this.active.length){this.tabs.eq(0).attr("tabIndex",0)}else{this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0});this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})}},_processTabs:function(){var k=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist");this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1});this.anchors=this.tabs.map(function(){return g("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1});this.panels=g();this.anchors.each(function(q,o){var l,m,p,n=g(o).uniqueId().attr("id"),r=g(o).closest("li"),s=r.attr("aria-controls");if(f(o)){l=o.hash;m=k.element.find(k._sanitizeSelector(l))}else{p=k._tabId(r);l="#"+p;m=k.element.find(l);if(!m.length){m=k._createPanel(p);m.insertAfter(k.panels[q-1]||k.tablist)}m.attr("aria-live","polite")}if(m.length){k.panels=k.panels.add(m)}if(s){r.data("ui-tabs-aria-controls",s)}r.attr({"aria-controls":l.substring(1),"aria-labelledby":n});m.attr("aria-labelledby",n)});this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(k){return g("<div>").attr("id",k).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",true)},_setupDisabled:function(m){if(g.isArray(m)){if(!m.length){m=false}else{if(m.length===this.anchors.length){m=true}}}for(var l=0,k;(k=this.tabs[l]);l++){if(m===true||g.inArray(l,m)!==-1){g(k).addClass("ui-state-disabled").attr("aria-disabled","true")}else{g(k).removeClass("ui-state-disabled").removeAttr("aria-disabled")}}this.options.disabled=m},_setupEvents:function(l){var k={click:function(m){m.preventDefault()}};if(l){g.each(l.split(" "),function(n,m){k[m]="_eventHandler"})}this._off(this.anchors.add(this.tabs).add(this.panels));this._on(this.anchors,k);this._on(this.tabs,{keydown:"_tabKeydown"});this._on(this.panels,{keydown:"_panelKeydown"});this._focusable(this.tabs);this._hoverable(this.tabs)},_setupHeightStyle:function(k){var m,l=this.element.parent();if(k==="fill"){m=l.height();m-=this.element.outerHeight()-this.element.height();this.element.siblings(":visible").each(function(){var o=g(this),n=o.css("position");if(n==="absolute"||n==="fixed"){return}m-=o.outerHeight(true)});this.element.children().not(this.panels).each(function(){m-=g(this).outerHeight(true)});this.panels.each(function(){g(this).height(Math.max(0,m-g(this).innerHeight()+g(this).height()))}).css("overflow","auto")}else{if(k==="auto"){m=0;this.panels.each(function(){m=Math.max(m,g(this).height("").height())}).height(m)}}},_eventHandler:function(k){var t=this.options,o=this.active,p=g(k.currentTarget),n=p.closest("li"),r=n[0]===o[0],l=r&&t.collapsible,m=l?g():this._getPanelForTab(n),q=!o.length?g():this._getPanelForTab(o),s={oldTab:o,oldPanel:q,newTab:l?g():n,newPanel:m};k.preventDefault();if(n.hasClass("ui-state-disabled")||n.hasClass("ui-tabs-loading")||this.running||(r&&!t.collapsible)||(this._trigger("beforeActivate",k,s)===false)){return}t.active=l?false:this.tabs.index(n);this.active=r?g():n;if(this.xhr){this.xhr.abort()}if(!q.length&&!m.length){g.error("jQuery UI Tabs: Mismatching fragment identifier.")}if(m.length){this.load(this.tabs.index(n),k)}this._toggle(k,s)},_toggle:function(q,p){var o=this,k=p.newPanel,n=p.oldPanel;this.running=true;function m(){o.running=false;o._trigger("activate",q,p)}function l(){p.newTab.closest("li").addClass("ui-tabs-active ui-state-active");if(k.length&&o.options.show){o._show(k,o.options.show,m)}else{k.show();m()}}if(n.length&&this.options.hide){this._hide(n,this.options.hide,function(){p.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");l()})}else{p.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");n.hide();l()}n.attr({"aria-expanded":"false","aria-hidden":"true"});p.oldTab.attr("aria-selected","false");if(k.length&&n.length){p.oldTab.attr("tabIndex",-1)}else{if(k.length){this.tabs.filter(function(){return g(this).attr("tabIndex")===0}).attr("tabIndex",-1)}}k.attr({"aria-expanded":"true","aria-hidden":"false"});p.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(l){var k,m=this._findActive(l);if(m[0]===this.active[0]){return}if(!m.length){m=this.active}k=m.find(".ui-tabs-anchor")[0];this._eventHandler({target:k,currentTarget:k,preventDefault:g.noop})},_findActive:function(k){return k===false?g():this.tabs.eq(k)},_getIndex:function(k){if(typeof k==="string"){k=this.anchors.index(this.anchors.filter("[href$='"+k+"']"))}return k},_destroy:function(){if(this.xhr){this.xhr.abort()}this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible");this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role");this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId();this.tabs.add(this.panels).each(function(){if(g.data(this,"ui-tabs-destroy")){g(this).remove()}else{g(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}});this.tabs.each(function(){var k=g(this),l=k.data("ui-tabs-aria-controls");if(l){k.attr("aria-controls",l).removeData("ui-tabs-aria-controls")}else{k.removeAttr("aria-controls")}});this.panels.show();if(this.options.heightStyle!=="content"){this.panels.css("height","")}},enable:function(k){var l=this.options.disabled;if(l===false){return}if(k===i){l=false}else{k=this._getIndex(k);if(g.isArray(l)){l=g.map(l,function(m){return m!==k?m:null})}else{l=g.map(this.tabs,function(m,n){return n!==k?n:null})}}this._setupDisabled(l)},disable:function(k){var l=this.options.disabled;if(l===true){return}if(k===i){l=true}else{k=this._getIndex(k);if(g.inArray(k,l)!==-1){return}if(g.isArray(l)){l=g.merge([k],l).sort()}else{l=[k]}}this._setupDisabled(l)},load:function(m,q){m=this._getIndex(m);var p=this,n=this.tabs.eq(m),l=n.find(".ui-tabs-anchor"),k=this._getPanelForTab(n),o={tab:n,panel:k};if(f(l[0])){return}this.xhr=g.ajax(this._ajaxSettings(l,q,o));if(this.xhr&&this.xhr.statusText!=="canceled"){n.addClass("ui-tabs-loading");k.attr("aria-busy","true");this.xhr.success(function(r){setTimeout(function(){k.html(r);p._trigger("load",q,o)},1)}).complete(function(s,r){setTimeout(function(){if(r==="abort"){p.panels.stop(false,true)}n.removeClass("ui-tabs-loading");k.removeAttr("aria-busy");if(s===p.xhr){delete p.xhr}},1)})}},_ajaxSettings:function(k,n,m){var l=this;return{url:k.attr("href"),beforeSend:function(p,o){return l._trigger("beforeLoad",n,g.extend({jqXHR:p,ajaxSettings:o},m))}}},_getPanelForTab:function(k){var l=g(k).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+l))}})})(c);(function(e,f){})(c);(function(h,i){h.mobile.iosorientationfixEnabled=true;var f=navigator.userAgent,n,m,l,k,j,e;if(!(/iPhone|iPad|iPod/.test(navigator.platform)&&/OS [1-5]_[0-9_]* like Mac OS X/i.test(f)&&f.indexOf("AppleWebKit")>-1)){h.mobile.iosorientationfixEnabled=false;return}n=h.mobile.zoom;function g(o){m=o.originalEvent;e=m.accelerationIncludingGravity;l=Math.abs(e.x);k=Math.abs(e.y);j=Math.abs(e.z);if(!i.orientation&&(l>7||((j>6&&k<8||j<8&&k>6)&&l>5))){if(n.enabled){n.disable()}}else{if(!n.enabled){n.enable()}}}h.mobile.document.on("mobileinit",function(){if(h.mobile.iosorientationfixEnabled){h.mobile.window.bind("orientationchange.iosorientationfix",n.enable).bind("devicemotion.iosorientationfix",g)}})}(c,this));(function(g,f,j){var e=g("html"),i=g.mobile.window;function h(){e.removeClass("ui-mobile-rendering")}g(f.document).trigger("mobileinit");if(!g.mobile.gradeA()){return}if(g.mobile.ajaxBlacklist){g.mobile.ajaxEnabled=false}e.addClass("ui-mobile ui-mobile-rendering");setTimeout(h,5000);g.extend(g.mobile,{initializePage:function(){var n=g.mobile.path,m=g(":jqmData(role='page'), :jqmData(role='dialog')"),l=n.stripHash(n.stripQueryParams(n.parseLocation().hash)),o=g.mobile.path.parseLocation(),k=l?a.getElementById(l):j;if(!m.length){m=g("body").wrapInner("<div data-"+g.mobile.ns+"role='page'></div>").children(0)}m.each(function(){var p=g(this);if(!p[0].getAttribute("data-"+g.mobile.ns+"url")){p.attr("data-"+g.mobile.ns+"url",p.attr("id")||n.convertUrlToDataUrl(o.pathname+o.search))}});g.mobile.firstPage=m.first();g.mobile.pageContainer=g.mobile.firstPage.parent().addClass("ui-mobile-viewport").pagecontainer();g.mobile.navreadyDeferred.resolve();i.trigger("pagecontainercreate");g.mobile.loading("show");h();if(!(g.mobile.hashListeningEnabled&&g.mobile.path.isHashValid(location.hash)&&(g(k).is(":jqmData(role='page')")||g.mobile.path.isPath(l)||l===g.mobile.dialogHashKey))){if(g.event.special.navigate.isPushStateEnabled()){g.mobile.navigate.navigator.squash(n.parseLocation().href)}g.mobile.changePage(g.mobile.firstPage,{transition:"none",reverse:true,changeHash:false,fromHashChange:true})}else{if(!g.event.special.navigate.isPushStateEnabled()){i.trigger("hashchange",[true])}else{g.mobile.navigate.history.stack=[];g.mobile.navigate(g.mobile.path.isPath(location.hash)?location.hash:location.href)}}}});g(function(){g.support.inlineSVG();if(g.mobile.hideUrlBar){f.scrollTo(0,1)}g.mobile.defaultHomeScroll=(!g.support.scrollTop||g.mobile.window.scrollTop()===1)?0:1;if(g.mobile.autoInitializePage){g.mobile.initializePage()}if(g.mobile.hideUrlBar){i.on("load",g.mobile.silentScroll)}if(!g.support.cssPointerEvents){g.mobile.document.delegate(".ui-state-disabled,.ui-disabled","vclick",function(k){k.preventDefault();k.stopImmediatePropagation()})}})}(c,this))}));