/*
 * jQuery Mobile v1.0a3
 * http://jquerymobile.com/
 *
 * Copyright 2010, jQuery Project
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 */
/*
 * jQuery UI Widget @VERSION
 *
 * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Widget
 */
(function(B,D){if(B.cleanData){var C=B.cleanData;B.cleanData=function(E){for(var F=0,G;(G=E[F])!=null;F++){B(G).triggerHandler("remove")}C(E)}}else{var A=B.fn.remove;B.fn.remove=function(E,F){return this.each(function(){if(!F){if(!E||B.filter(E,[this]).length){B("*",this).add([this]).each(function(){B(this).triggerHandler("remove")})}}return A.call(B(this),E,F)})}}B.widget=function(F,H,E){var G=F.split(".")[0],J;F=F.split(".")[1];J=G+"-"+F;if(!E){E=H;H=B.Widget}B.expr[":"][J]=function(K){return !!B.data(K,F)};B[G]=B[G]||{};B[G][F]=function(K,L){if(arguments.length){this._createWidget(K,L)}};var I=new H();I.options=B.extend(true,{},I.options);B[G][F].prototype=B.extend(true,I,{namespace:G,widgetName:F,widgetEventPrefix:B[G][F].prototype.widgetEventPrefix||F,widgetBaseClass:J},E);B.widget.bridge(F,B[G][F])};B.widget.bridge=function(F,E){B.fn[F]=function(I){var G=typeof I==="string",H=Array.prototype.slice.call(arguments,1),J=this;I=!G&&H.length?B.extend.apply(null,[true,I].concat(H)):I;if(G&&I.charAt(0)==="_"){return J}if(G){this.each(function(){var K=B.data(this,F);if(!K){throw"cannot call methods on "+F+" prior to initialization; attempted to call method '"+I+"'"}if(!B.isFunction(K[I])){throw"no such method '"+I+"' for "+F+" widget instance"}var L=K[I].apply(K,H);if(L!==K&&L!==D){J=L;return false}})}else{this.each(function(){var K=B.data(this,F);if(K){K.option(I||{})._init()}else{B.data(this,F,new E(I,this))}})}return J}};B.Widget=function(E,F){if(arguments.length){this._createWidget(E,F)}};B.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(F,G){B.data(G,this.widgetName,this);this.element=B(G);this.options=B.extend(true,{},this.options,this._getCreateOptions(),F);var E=this;this.element.bind("remove."+this.widgetName,function(){E.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){var E={};if(B.metadata){E=B.metadata.get(element)[this.widgetName]}return E},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(F,G){var E=F;if(arguments.length===0){return B.extend({},this.options)}if(typeof F==="string"){if(G===D){return this.options[F]}E={};E[F]=G}this._setOptions(E);return this},_setOptions:function(F){var E=this;B.each(F,function(G,H){E._setOption(G,H)});return this},_setOption:function(E,F){this.options[E]=F;if(E==="disabled"){this.widget()[F?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",F)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(F,G,H){var J=this.options[F];G=B.Event(G);G.type=(F===this.widgetEventPrefix?F:this.widgetEventPrefix+F).toLowerCase();H=H||{};if(G.originalEvent){for(var E=B.event.props.length,I;E;){I=B.event.props[--E];G[I]=G.originalEvent[I]}}this.element.trigger(G,H);return !(B.isFunction(J)&&J.call(this.element[0],G,H)===false||G.isDefaultPrevented())}}})(jQuery);(function(A,B){A.widget("mobile.widget",{_getCreateOptions:function(){var D=this.element,C={};A.each(this.options,function(E){var F=D.data(E.replace(/[A-Z]/g,function(G){return"-"+G.toLowerCase()}));if(F!==B){C[E]=F}});return C}})})(jQuery);(function(C,F){var E=C(window),A=C("html"),B=[320,480,768,1024];C.mobile.media=(function(){var G={},H=C("<div id='jquery-mediatest'>"),I=C("<body>").append(H);return function(L){if(!(L in G)){var J=document.createElement("style"),K="@media "+L+" { #jquery-mediatest { position:absolute; } }";J.type="text/css";if(J.styleSheet){J.styleSheet.cssText=K}else{J.appendChild(document.createTextNode(K))}A.prepend(I).prepend(J);G[L]=H.css("position")==="absolute";I.add(J).remove()}return G[L]}})();function D(){var G=E.width(),K="min-width-",I="max-width-",M=[],J=[],L="px",H;A.removeClass(K+B.join(L+" "+K)+L+" "+I+B.join(L+" "+I)+L);C.each(B,function(N,O){if(G>=O){M.push(K+O+L)}if(G<=O){J.push(I+O+L)}});if(M.length){H=M.join(" ")}if(J.length){H+=" "+J.join(" ")}A.addClass(H)}C.mobile.addResolutionBreakpoints=function(G){if(C.type(G)==="array"){B=B.concat(G)}else{B.push(G)}B.sort(function(I,H){return I-H});D()};C(document).bind("mobileinit.htmlclass",function(){E.bind("orientationchange.htmlclass resize.htmlclass",function(G){if(G.orientation){A.removeClass("portrait landscape").addClass(G.orientation)}D()})});C(function(){E.trigger("orientationchange.htmlclass")})})(jQuery);(function(E,C){var D=E("<body>").prependTo("html"),G=D[0].style,H=["webkit","moz","o"],I=window.palmGetResource||window.PalmServiceBridge,F=window.blackberry;function B(M){var L=M.charAt(0).toUpperCase()+M.substr(1),K=(M+" "+H.join(L+" ")+L).split(" ");for(var J in K){if(G[J]!==C){return true}}}function A(){return false;var N=location.protocol+"//"+location.host+location.pathname+"ui-dir/",M=E("head base"),O=null,J="";if(!M.length){M=O=E("<base>",{href:N}).appendTo("head")}else{J=M.attr("href")}var L=E("<a href='testurl'></a>").prependTo(D),K=L[0].href;M[0].href=J?J:location.pathname;if(O){O.remove()}return K.indexOf(N)===0}E.extend(E.support,{orientation:"orientation" in window,touch:"ontouchend" in document,cssTransitions:"WebKitTransitionEvent" in window,pushState:!!history.pushState,mediaquery:E.mobile.media("only all"),cssPseudoElement:!!B("content"),boxShadow:!!B("boxShadow")&&!F,scrollTop:("pageXOffset" in window||"scrollTop" in document.documentElement||"scrollTop" in D[0])&&!I,dynamicBaseTag:A()});D.remove();if(!E.support.boxShadow){E("html").addClass("ui-mobile-nosupport-boxshadow")}})(jQuery);(function(E,G){E.each("touchstart touchmove touchend orientationchange tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(I,H){E.fn[H]=function(J){return J?this.bind(H,J):this.trigger(H)};E.attrFn[H]=true});var D=E.support.touch,C="touchmove scroll",A=D?"touchstart":"mousedown",F=D?"touchend":"mouseup",B=D?"touchmove":"mousemove";E.event.special.scrollstart={enabled:true,setup:function(){var H=this,K=E(H),J,L;function I(N,O){J=O;var M=N.type;N.type=J?"scrollstart":"scrollstop";E.event.handle.call(H,N);N.type=M}K.bind(C,function(M){if(!E.event.special.scrollstart.enabled){return }if(!J){I(M,true)}clearTimeout(L);L=setTimeout(function(){I(M,false)},50)})}};E.event.special.tap={setup:function(){var H=this,I=E(H);I.bind("mousedown touchstart",function(J){if(J.which&&J.which!==1||I.data("prevEvent")&&I.data("prevEvent")!==J.type){return false}I.data("prevEvent",J.type);setTimeout(function(){I.removeData("prevEvent")},800);var P=false,N=true,O=J.target,Q=J.originalEvent,R=J.type=="touchstart"?[Q.touches[0].pageX,Q.touches[0].pageY]:[J.pageX,J.pageY],L,K;function M(T){if(T.type=="scroll"){P=true;return }var S=T.type=="touchmove"?T.originalEvent.touches[0]:T;if((Math.abs(R[0]-S.pageX)>10)||(Math.abs(R[1]-S.pageY)>10)){P=true}}K=setTimeout(function(){if(N&&!P){L=J.type;J.type="taphold";E.event.handle.call(H,J);J.type=L}},750);E(window).one("scroll",M);I.bind("mousemove touchmove",M).one("mouseup touchend",function(S){I.unbind("mousemove touchmove",M);E(window).unbind("scroll",M);clearTimeout(K);N=false;if(!P&&(O==S.target)){L=S.type;S.type="tap";E.event.handle.call(H,S);S.type=L}})})}};E.event.special.swipe={setup:function(){var H=this,I=E(H);I.bind(A,function(K){var M=K.originalEvent.touches?K.originalEvent.touches[0]:K,N={time:(new Date).getTime(),coords:[M.pageX,M.pageY],origin:E(K.target)},J;function L(O){if(!N){return }var P=O.originalEvent.touches?O.originalEvent.touches[0]:O;J={time:(new Date).getTime(),coords:[P.pageX,P.pageY]};if(Math.abs(N.coords[0]-J.coords[0])>10){O.preventDefault()}}I.bind(B,L).one(F,function(O){I.unbind(B,L);if(N&&J){if(J.time-N.time<1000&&Math.abs(N.coords[0]-J.coords[0])>30&&Math.abs(N.coords[1]-J.coords[1])<75){N.origin.trigger("swipe").trigger(N.coords[0]>J.coords[0]?"swipeleft":"swiperight")}}N=J=G})})}};(function(L){var M=L(window),H,K,J;L.event.special.orientationchange=H={setup:function(){if(L.support.orientation){return false}J=K();M.bind("resize",I)},teardown:function(){if(L.support.orientation){return false}M.unbind("resize",I)},add:function(N){var O=N.handler;N.handler=function(P){P.orientation=K();return O.apply(this,arguments)}}};function I(){var N=K();if(N!==J){J=N;M.trigger("orientationchange")}}H.orientation=K=function(){var N=document.documentElement;return N&&N.clientWidth/N.clientHeight<1.1?"portrait":"landscape"}})(jQuery);E.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe",swiperight:"swipe"},function(I,H){E.event.special[I]={setup:function(){E(this).bind(H,E.noop)}}})})(jQuery);
/*
 * 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($,E,B){var C="hashchange",H=document,F,G=$.event.special,I=H.documentMode,D="on"+C in E&&(I===B||I>7);function A(J){J=J||location.href;return"#"+J.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[C]=function(J){return J?this.bind(C,J):this.trigger(C)};$.fn[C].delay=50;G[C]=$.extend(G[C],{setup:function(){if(D){return false}$(F.start)},teardown:function(){if(D){return false}$(F.stop)}});F=(function(){var J={},P,M=A(),K=function(Q){return Q},L=K,O=K;J.start=function(){P||N()};J.stop=function(){P&&clearTimeout(P);P=B};function N(){var R=A(),Q=O(M);if(R!==M){L(M=R,Q);$(E).trigger(C)}else{if(Q!==M){location.href=location.href.replace(/#.*/,"")+Q}}P=setTimeout(N,$.fn[C].delay)}$.browser.msie&&!D&&(function(){var Q,R;J.start=function(){if(!Q){R=$.fn[C].src;R=R&&R+A();Q=$('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){R||L(A());N()}).attr("src",R||"javascript:0").insertAfter("body")[0].contentWindow;H.onpropertychange=function(){try{if(event.propertyName==="title"){Q.document.title=H.title}}catch(S){}}}};J.stop=K;O=function(){return A(Q.location.href)};L=function(V,S){var U=Q.document,T=$.fn[C].domain;if(V!==S){U.title=H.title;U.open();T&&U.write('<script>document.domain="'+T+'"<\/script>');U.close();Q.location.hash=V}}})();return J})()})(jQuery,this);(function(A,B){A.widget("mobile.page",A.mobile.widget,{options:{backBtnText:"Back",addBackBtn:true,degradeInputs:{color:false,date:false,datetime:false,"datetime-local":false,email:false,month:false,number:false,range:"number",search:true,tel:false,time:false,url:false,week:false},keepNative:null},_create:function(){var C=this.element,E=this.options;this.keepNative="[data-role='none'], [data-role='nojs']"+(E.keepNative?", "+E.keepNative:"");if(this._trigger("beforeCreate")===false){return }C.find("[data-role='page'], [data-role='content']").andSelf().each(function(){A(this).addClass("ui-"+A(this).data("role"))});C.find("[data-role='nojs']").addClass("ui-nojs");var D=C.find("[data-role]").andSelf().each(function(){var J=A(this),K=J.data("role"),I=J.data("theme");if(K==="header"||K==="footer"){J.addClass("ui-bar-"+(I||J.parent("[data-role=page]").data("theme")||"a"));J.attr("role",K==="header"?"banner":"contentinfo");var F=J.children("a"),G=F.hasClass("ui-btn-left"),H=F.hasClass("ui-btn-right");if(!G){G=F.eq(0).not(".ui-btn-right").addClass("ui-btn-left").length}if(!H){H=F.eq(1).addClass("ui-btn-right").length}if(E.addBackBtn&&K==="header"&&A(".ui-page").length>1&&C.data("url")!==A.mobile.path.stripHash(location.hash)&&!G&&J.data("backbtn")!==false){A("<a href='#' class='ui-btn-left' data-rel='back' data-icon='arrow-l'>"+E.backBtnText+"</a>").prependTo(J)}J.children("h1, h2, h3, h4, h5, h6").addClass("ui-title").attr({tabindex:"0",role:"heading","aria-level":"1"})}else{if(K==="content"){if(I){J.addClass("ui-body-"+I)}J.attr("role","main")}else{if(K==="page"){J.addClass("ui-body-"+(I||"c"))}}}switch(K){case"header":case"footer":case"page":case"content":J.addClass("ui-"+K);break;case"collapsible":case"fieldcontain":case"navbar":case"listview":case"dialog":J[K]();break}});this._enhanceControls();C.find("[data-role='button'], .ui-bar > a, .ui-header > a, .ui-footer > a").not(".ui-btn").not(this.keepNative).buttonMarkup();C.find("[data-role='controlgroup']").controlgroup();C.find("a:not(.ui-btn):not(.ui-link-inherit)").not(this.keepNative).addClass("ui-link");C.fixHeaderFooter()},_enhanceControls:function(){var D=this.options;this.element.find("input").not(this.keepNative).each(function(){var H=this.getAttribute("type"),G=D.degradeInputs[H]||"text";if(D.degradeInputs[H]){A(this).replaceWith(A("<div>").html(A(this).clone()).html().replace(/type="([a-zA-Z]+)"/,"type="+G+" data-type='$1'"))}});var F=this.element.find("input, textarea, select, button"),C=F.not(this.keepNative);var E=F.filter("input[type=text]");if(E.length&&typeof E[0].autocorrect!=="undefined"){E.each(function(){this.setAttribute("autocorrect","off");this.setAttribute("autocomplete","off")})}C.filter("[type='radio'], [type='checkbox']").checkboxradio();C.filter("button, [type='button'], [type='submit'], [type='reset'], [type='image']").button();C.filter("input, textarea").not("[type='radio'], [type='checkbox'], [type='button'], [type='submit'], [type='reset'], [type='image'], [type='hidden']").textinput();C.filter("input, select").filter("[data-role='slider'], [data-type='range']").slider();C.filter("select:not([data-role='slider'])").selectmenu()}})})(jQuery);
/*
 * jQuery Mobile v@VERSION
 * http://jquerymobile.com/
 *
 * Copyright 2010, jQuery Project
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 */
(function(E,D,G){E.extend(E.mobile,{subPageUrlKey:"ui-page",nonHistorySelectors:"dialog",activePageClass:"ui-page-active",activeBtnClass:"ui-btn-active",ajaxEnabled:true,hashListeningEnabled:true,ajaxLinksEnabled:true,ajaxFormsEnabled:true,defaultTransition:"slide",loadingMessage:"loading",metaViewportContent:"width=device-width, minimum-scale=1, maximum-scale=1",gradeA:function(){return E.support.mediaquery},autoInitialize:true,keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});E(D.document).trigger("mobileinit");if(!E.mobile.gradeA()){return }var F=E(D),B=E("html"),A=E("head"),C=E.mobile.loadingMessage?E("<div class='ui-loader ui-body-a ui-corner-all'><span class='ui-icon ui-icon-loading spin'></span><h1>"+E.mobile.loadingMessage+"</h1></div>"):G;B.addClass("ui-mobile ui-mobile-rendering");E.mobile.metaViewportContent?E("<meta>",{name:"viewport",content:E.mobile.metaViewportContent}).prependTo(A):G;E.extend(E.mobile,{pageLoading:function(H){if(H){B.removeClass("ui-loading")}else{if(E.mobile.loadingMessage){var I=E("."+E.mobile.activeBtnClass).first();C.appendTo(E.mobile.pageContainer).css({top:E.support.scrollTop&&E(D).scrollTop()+E(D).height()/2||I.length&&I.offset().top||100})}B.addClass("ui-loading")}},silentScroll:function(H){H=H||0;E.event.special.scrollstart.enabled=false;setTimeout(function(){D.scrollTo(0,H);E(document).trigger("silentscroll",{x:0,y:H})},20);setTimeout(function(){E.event.special.scrollstart.enabled=true},150)},initializePage:function(){var H=E("[data-role='page']");H.add("[data-role='dialog']").each(function(){E(this).attr("data-url",E(this).attr("id"))});E.mobile.firstPage=H.first();E.mobile.pageContainer=H.first().parent().addClass("ui-mobile-viewport");E.mobile.pageLoading();if(!E.mobile.hashListeningEnabled||!E.mobile.path.stripHash(location.hash)){E.mobile.changePage(E.mobile.firstPage,false,true,false,true)}else{F.trigger("hashchange",[true])}}});if(E.mobile.autoInitialize){E(E.mobile.initializePage)}F.load(E.mobile.silentScroll)})(jQuery,this);(function(C,E){var K=C(window),M=C("html"),I=C("head"),L={get:function(U){if(U==E){U=location.hash}return L.stripHash(U).replace(/[^\/]*\.[^\/*]+$/,"")},getFilePath:function(V){var U="&"+C.mobile.subPageUrlKey;return V&&V.split(U)[0].split(S)[0]},set:function(U){location.hash=U},origin:"",setOrigin:function(){L.origin=L.get(location.protocol+"//"+location.host+location.pathname)},makeAbsolute:function(U){return L.get()+U},clean:function(U){return U.replace(location.protocol+"//"+location.host,"")},stripHash:function(U){return U.replace(/^#/,"")},isExternal:function(U){return L.hasProtocol(L.clean(U))},hasProtocol:function(U){return/^(:?\w+:)/.test(U)},isRelative:function(U){return/^[^\/|#]/.test(U)&&!L.hasProtocol(U)},isEmbeddedPage:function(U){return/^#/.test(U)}},T=null,B={stack:[],activeIndex:0,getActive:function(){return B.stack[B.activeIndex]},getPrev:function(){return B.stack[B.activeIndex-1]},getNext:function(){return B.stack[B.activeIndex+1]},addNew:function(U,V){if(B.getNext()){B.clearForward()}B.stack.push({url:U,transition:V});B.activeIndex=B.stack.length-1},clearForward:function(){B.stack=B.stack.slice(0,B.activeIndex+1)},ignoreNextHashChange:true},N="[tabindex],a,button:visible,select:visible,input",A=null,J=[],P=false,S="&ui-state=dialog";var H=I.children("base"),R=location.protocol+"//"+location.host,G=L.get(R+location.pathname),D=G;if(H.length){var O=H.attr("href");if(O){if(O.search(/^[^:/]+:\/\/[^/]+\/?/)==-1){if(O.charAt(0)=="/"){D=R+O}else{D=G+O}}else{D=O}}D=D+(D.charAt(D.length-1)=="/"?"":"/")}base=C.support.dynamicBaseTag?{element:(H.length?H:C("<base>",{href:D}).prependTo(I)),set:function(U){base.element.attr("href",D+L.get(U))},reset:function(){base.element.attr("href",D)}}:E;L.setOrigin();function F(V){var U=V.find(".ui-title:eq(0)");if(U.length){U.focus()}else{V.find(N).eq(0).focus()}}function Q(U){if(!!T&&(!T.closest(".ui-page-active").length||U)){T.removeClass(C.mobile.activeBtnClass)}T=null}C.fn.animationComplete=function(U){if(C.support.cssTransitions){return C(this).one("webkitAnimationEnd",U)}else{setTimeout(U,0)}};C.mobile.updateHash=L.set;C.mobile.path=L;C.mobile.base=base;C.mobile.urlstack=B.stack;C.mobile.urlHistory=B;C.mobile.changePage=function(W,n,d,f,X){var Z=C.type(W)==="array",m=C.type(W)==="object",k=Z?W[0]:C.mobile.activePage,W=Z?W[1]:W,a=fileUrl=C.type(W)==="string"?L.stripHash(W):"",p=E,Y="get",g=false,c=null,i=B.getActive(),h=false,e=false,U;if(i&&B.stack.length>1&&i.url===a&&!Z&&!m){return }else{if(P){J.unshift(arguments);return }}P=true;if(X){C.each(B.stack,function(q){if(this.url==a){urlIndex=q;h=q<B.activeIndex;e=!h;B.activeIndex=q}});if(h){d=true;n=n||i.transition}else{if(e){n=n||B.getActive().transition}}}if(m&&W.url){a=W.url,p=W.data,Y=W.type,g=true;if(p&&Y=="get"){if(C.type(p)=="object"){p=C.param(p)}a+="?"+p;p=E}}if(base){base.reset()}C(window.document.activeElement).add("input:focus, textarea:focus, select:focus").blur();function b(){if(n===E){n=C.mobile.defaultTransition}}function l(){C.mobile.silentScroll();var r=K.scrollTop(),v=["flip"],s=[];if(a.indexOf("&"+C.mobile.subPageUrlKey)>-1){W=C("[data-url='"+a+"']")}if(k){k.data("lastScroll",r);k.data("page")._trigger("beforehide",{nextPage:W})}W.data("page")._trigger("beforeshow",{prevPage:k||C("")});function q(){if(f!==false&&a){B.ignoreNextHashChange=false;L.set(a)}if(!h&&!e){B.addNew(a,n)}Q();C.mobile.silentScroll(W.data("lastScroll"));F(W);if(k){k.data("page")._trigger("hide",null,{nextPage:W})}W.data("page")._trigger("show",null,{prevPage:k||C("")});C.mobile.activePage=W;if(c!=null){c.remove()}M.removeClass("ui-mobile-rendering");P=false;if(J.length>0){C.mobile.changePage.apply(C.mobile,J.pop())}}function u(w){C.mobile.pageContainer.addClass(w);s.push(w)}function t(){C.mobile.pageContainer.removeClass(s.join(" "));s=[]}if(n&&(n!=="none")){C.mobile.pageLoading(true);if(C.inArray(n,v)>=0){u("ui-mobile-viewport-perspective")}u("ui-mobile-viewport-transitioning");if(k){k.addClass(n+" out "+(d?"reverse":""))}W.addClass(C.mobile.activePageClass+" "+n+" in "+(d?"reverse":""));W.animationComplete(function(){k.add(W).removeClass("out in reverse "+n);if(k){k.removeClass(C.mobile.activePageClass)}q();t()})}else{C.mobile.pageLoading(true);if(k){k.removeClass(C.mobile.activePageClass)}W.addClass(C.mobile.activePageClass);q()}}function j(){if(A||W.data("role")=="dialog"){a=B.getActive().url+S;if(A){W.attr("data-role",A);A=null}}W.page()}if(a){W=C("[data-url='"+a+"']");fileUrl=L.getFilePath(a)}else{var V=W.attr("data-url"),o=L.getFilePath(V);if(V!=o){fileUrl=o}}if(fileUrl!=null&&fileUrl.search(/forcenoajax/)==-1){if(fileUrl.search(/\?/)==-1){U=true}else{U=false}fileUrl+=(U?"?":"&")+"forcenoajax=1"}b();if(W.length&&!g){if(fileUrl&&base){base.set(fileUrl)}j();l()}else{if(W.length){c=W}C.mobile.pageLoading();C.ajax({url:fileUrl,type:Y,data:p,success:function(r){var q=/ data-url="(.*)"/.test(r)&&RegExp.$1;if(q){if(base){base.set(q)}a=fileUrl=L.getFilePath(q)}else{if(base){base.set(fileUrl)}}var s=C("<div></div>");s.get(0).innerHTML=r;W=s.find('[data-role="page"], [data-role="dialog"]').first();if(!C.support.dynamicBaseTag){var t=L.get(fileUrl);W.find("[src],link[href]").each(function(){var v=C(this).is("[href]")?"href":"src",u=C(this).attr(v);u.replace(location.protocol+"//"+location.host+location.pathname,"");if(!/^(\w+:|#|\/)/.test(u)){C(this).attr(v,D+u)}})}W.attr("data-url",fileUrl).appendTo(C.mobile.pageContainer);j();setTimeout(function(){l()},0)},error:function(){C.mobile.pageLoading(true);Q(true);if(base){base.set(L.get())}C("<div class='ui-loader ui-overlay-shadow ui-body-e ui-corner-all'><h1>Error Loading Page</h1></div>").css({display:"block",opacity:0.96,top:C(window).scrollTop()+100}).appendTo(C.mobile.pageContainer).delay(800).fadeOut(400,function(){C(this).remove()})}})}};C("form[data-ajax!='false']").live("submit",function(W){if(!C.mobile.ajaxEnabled||!C.mobile.ajaxFormsEnabled){return }var V=C(this).attr("method"),U=L.clean(C(this).attr("action"));if(L.isExternal(U)){return }C.mobile.changePage({url:U,type:V,data:C(this).serialize()},E,E,true);W.preventDefault()});C("a").live("click",function(U){var d=C(this),X=d.attr("href")||"#",W=L.clean(X),Y=d.is("[rel='external']"),e=L.isEmbeddedPage(W),V=L.isExternal(W)||Y&&!e,c=d.is("[target]"),Z=d.is("[data-ajax='false']");if(d.is("[data-rel='back']")){window.history.back();return false}if(W==="#"){return false}T=d.closest(".ui-btn").addClass(C.mobile.activeBtnClass);if(V||Z||c||!C.mobile.ajaxEnabled||!C.mobile.ajaxLinksEnabled){Q(true);if(c){window.open(W)}else{if(Z){return }else{location.href=W}}}else{var b=d.data("transition"),f=d.data("direction"),a=f&&f=="reverse"||d.data("back");A=d.attr("data-rel");W=L.stripHash(W);C.mobile.changePage(W,b,a)}U.preventDefault()});K.bind("hashchange",function(V,U){var X=L.stripHash(location.hash),W=C.mobile.urlHistory.stack.length===0?false:E;if(!C.mobile.hashListeningEnabled||!B.ignoreNextHashChange||B.stack.length>1&&X.indexOf(S)>-1&&!C.mobile.activePage.is(".ui-dialog")){if(!B.ignoreNextHashChange){B.ignoreNextHashChange=true}return }if(X){C.mobile.changePage(X,W,E,false,true)}else{C.mobile.changePage(C.mobile.firstPage,W,true,false,true)}})})(jQuery);(function(A,B){A.fn.fixHeaderFooter=function(C){if(!A.support.scrollTop){return this}return this.each(function(){var D=A(this);if(D.data("fullscreen")){D.addClass("ui-page-fullscreen")}D.find('.ui-header[data-position="fixed"]').addClass("ui-header-fixed ui-fixed-inline fade");D.find('.ui-footer[data-position="fixed"]').addClass("ui-footer-fixed ui-fixed-inline fade")})};A.fixedToolbars=(function(){if(!A.support.scrollTop){return }var G="inline",O=false,D=100,E,N="a,input,textarea,select,button,label,.ui-header-fixed,.ui-footer-fixed",P=".ui-header-fixed:first, .ui-footer-fixed:not(.ui-footer-duplicate):last",M,I=A.support.touch,Q=I?"touchstart":"mousedown",K=I?"touchend":"mouseup",H=null,J=false,C=true;function F(S){if(!O&&G=="overlay"){if(!E){A.fixedToolbars.hide(true)}A.fixedToolbars.startShowTimer()}}A(function(){A(document).bind(Q,function(S){if(C){if(A(S.target).closest(N).length){return }H=G}}).bind(K,function(S){if(C){if(A(S.target).closest(N).length){return }if(!J){A.fixedToolbars.toggle(H);H=null}}}).bind("scrollstart",function(T){if(A(T.target).closest(N).length){return }J=true;if(H==null){H=G}var S=H=="overlay";O=S||!!E;if(O){A.fixedToolbars.clearShowTimer();if(S){A.fixedToolbars.hide(true)}}}).bind("scrollstop",function(S){if(A(S.target).closest(N).length){return }J=false;if(O){O=false;A.fixedToolbars.startShowTimer()}H=null}).bind("silentscroll",F);A(window).bind("resize",F)});A(".ui-page").live("pagebeforeshow",function(S,U){var T=A(S.target),W=T.find('[data-role="footer"]:not(.ui-sticky-footer)'),V=W.data("id");M=null;if(V){M=A('.ui-footer[data-id="'+V+'"].ui-sticky-footer');if(M.length==0){M=W;W=M.clone();M.addClass("ui-sticky-footer").before(W)}W.addClass("ui-footer-duplicate");M.appendTo(A.pageContainer).css("top",0);R(M)}});A(".ui-page").live("pageshow",function(S,T){if(M&&M.length){M.appendTo(S.target).css("top",0)}A.fixedToolbars.show(true,this)});function L(T){var U=0;if(T){var V=T.offsetParent,S=document.body;U=T.offsetTop;while(T&&T!=S){U+=T.scrollTop||0;if(T==V){U+=V.offsetTop;V=T.offsetParent}T=T.parentNode}}return U}function R(W){var S=A(window).scrollTop(),X=L(W[0]),V=W.css("top")=="auto"?0:parseFloat(W.css("top")),Z=window.innerHeight,Y=W.outerHeight(),U=W.parents(".ui-page:not(.ui-page-fullscreen)").length,T;if(W.is(".ui-header-fixed")){T=S-X+V;if(T<X){T=0}return W.css("top",(U)?T:S)}else{T=S+Z-Y-(X-V);return W.css("top",(U)?T:S+Z-Y)}}return{show:function(S,U){A.fixedToolbars.clearShowTimer();G="overlay";var T=U?A(U):(A.mobile.activePage?A.mobile.activePage:A(".ui-page-active"));return T.children(P).each(function(){var X=A(this),V=A(window).scrollTop(),Y=L(X[0]),a=window.innerHeight,Z=X.outerHeight(),W=(X.is(".ui-header-fixed")&&V<=Y+Z)||(X.is(".ui-footer-fixed")&&Y<=V+a);X.addClass("ui-fixed-overlay").removeClass("ui-fixed-inline");if(!W&&!S){X.animationComplete(function(){X.removeClass("in")}).addClass("in")}R(X)})},hide:function(S){G="inline";var T=A.mobile.activePage?A.mobile.activePage:A(".ui-page-active");return T.children(P).each(function(){var W=A(this);var V=W.css("top");V=V=="auto"?0:parseFloat(V);W.addClass("ui-fixed-inline").removeClass("ui-fixed-overlay");if(V<0||(W.is(".ui-header-fixed")&&V!=0)){if(S){W.css("top",0)}else{if(W.css("top")!=="auto"&&parseFloat(W.css("top"))!==0){var U="out reverse";W.animationComplete(function(){W.removeClass(U);W.css("top",0)}).addClass(U)}}}})},startShowTimer:function(){A.fixedToolbars.clearShowTimer();var S=A.makeArray(arguments);E=setTimeout(function(){E=B;A.fixedToolbars.show.apply(null,S)},D)},clearShowTimer:function(){if(E){clearTimeout(E)}E=B},toggle:function(S){if(S){G=S}return(G=="overlay")?A.fixedToolbars.hide():A.fixedToolbars.show()},setTouchToggleEnabled:function(S){C=S}}})()})(jQuery);(function(A,B){A.widget("mobile.checkboxradio",A.mobile.widget,{options:{theme:null},_create:function(){var D=this,C=this.element,F=C.closest("form,fieldset,[data-role='page']").find("label[for='"+C.attr("id")+"']"),H=C.attr("type"),G="ui-icon-"+H+"-on",E="ui-icon-"+H+"-off";if(H!="checkbox"&&H!="radio"){return }if(!this.options.theme){this.options.theme=this.element.data("theme")}F.buttonMarkup({theme:this.options.theme,icon:this.element.parents("[data-type='horizontal']").length?B:E,shadow:false});C.add(F).wrapAll("<div class='ui-"+H+"'></div>");F.bind({mouseover:function(){if(A(this).parent().is(".ui-disabled")){return false}},touchmove:function(I){var J=I.originalEvent.touches[0];if(F.data("movestart")){if(Math.abs(F.data("movestart")[0]-J.pageX)>10||Math.abs(abel.data("movestart")[1]-J.pageY)>10){F.data("moved",true)}}else{F.data("movestart",[parseFloat(J.pageX),parseFloat(J.pageY)])}},"touchend mouseup":function(I){F.removeData("movestart");if(F.data("etype")&&F.data("etype")!==I.type||F.data("moved")){F.removeData("etype").removeData("moved");if(F.data("moved")){F.removeData("moved")}return false}F.data("etype",I.type);D._cacheVals();C.attr("checked",H==="radio"&&true||!C.is(":checked"));D._updateAll();I.preventDefault()},click:false});C.bind({mousedown:function(){this._cacheVals()},click:function(){D._updateAll()},focus:function(){F.addClass("ui-focus")},blur:function(){F.removeClass("ui-focus")}});this.refresh()},_cacheVals:function(){this._getInputSet().each(function(){A(this).data("cacheVal",A(this).is(":checked"))})},_getInputSet:function(){return this.element.closest("form,fieldset,[data-role='page']").find("input[name='"+this.element.attr("name")+"'][type='"+this.element.attr("type")+"']")},_updateAll:function(){this._getInputSet().each(function(){var C=A(this).data("cacheVal");if(C&&C!==A(this).is(":checked")||A(this).is("[type='checkbox']")){A(this).trigger("change")}}).checkboxradio("refresh")},refresh:function(){var C=this.element,E=C.closest("form,fieldset,[data-role='page']").find("label[for='"+C.attr("id")+"']"),H=C.attr("type"),G=E.find(".ui-icon"),F="ui-icon-"+H+"-on",D="ui-icon-"+H+"-off";if(C[0].checked){E.addClass("ui-btn-active");G.addClass(F);G.removeClass(D)}else{E.removeClass("ui-btn-active");G.removeClass(F);G.addClass(D)}if(C.is(":disabled")){this.disable()}else{this.enable()}},disable:function(){this.element.attr("disabled",true).parent().addClass("ui-disabled")},enable:function(){this.element.attr("disabled",false).parent().removeClass("ui-disabled")}})})(jQuery);(function(A,B){A.widget("mobile.textinput",A.mobile.widget,{options:{theme:null},_create:function(){var K=this.element,E=this.options,H=E.theme,N;if(!H){var F=this.element.closest("[class*='ui-bar-'],[class*='ui-body-']");H=F.length?/ui-(bar|body)-([a-z])/.exec(F.attr("class"))[2]:"c"}N=" ui-body-"+H;A("label[for="+K.attr("id")+"]").addClass("ui-input-text");K.addClass("ui-input-text ui-body-"+E.theme);var I=K;if(K.is('[type="search"],[data-type="search"]')){I=K.wrap('<div class="ui-input-search ui-shadow-inset ui-btn-corner-all ui-btn-shadow ui-icon-searchfield'+N+'"></div>').parent();var L=A('<a href="#" class="ui-input-clear" title="clear text">clear text</a>').tap(function(O){K.val("").focus();K.trigger("change");L.addClass("ui-input-clear-hidden");O.preventDefault()}).appendTo(I).buttonMarkup({icon:"delete",iconpos:"notext",corners:true,shadow:true});function D(){if(K.val()==""){L.addClass("ui-input-clear-hidden")}else{L.removeClass("ui-input-clear-hidden")}}D();K.keyup(D)}else{K.addClass("ui-corner-all ui-shadow-inset"+N)}K.focus(function(){I.addClass("ui-focus")}).blur(function(){I.removeClass("ui-focus")});if(K.is("textarea")){var G=15,J=100,C=function(){var P=K[0].scrollHeight,O=K[0].clientHeight;if(O<P){K.css({height:(P+G)})}},M;K.keyup(function(){clearTimeout(M);M=setTimeout(C,J)})}},disable:function(){(this.element.attr("disabled",true).is('[type="search"],[data-type="search"]')?this.element.parent():this.element).addClass("ui-disabled")},enable:function(){(this.element.attr("disabled",false).is('[type="search"],[data-type="search"]')?this.element.parent():this.element).removeClass("ui-disabled")}})})(jQuery);(function(A,B){A.widget("mobile.selectmenu",A.mobile.widget,{options:{theme:null,disabled:false,icon:"arrow-d",iconpos:"right",inline:null,corners:true,shadow:true,iconshadow:true,menuPageTheme:"b",overlayTheme:"a",hidePlaceholderMenuItems:true,closeText:"Close",nativeMenu:false},_create:function(){var P=this,S=this.options,R=this.element.wrap("<div class='ui-select'>"),V=R.attr("id"),M=A("label[for="+V+"]").addClass("ui-select"),D=(P.options.nativeMenu?A("<div/>"):A("<a>",{href:"#",role:"button",id:L,"aria-haspopup":"true","aria-owns":N})).text(A(R[0].options.item(R[0].selectedIndex)).text()).insertBefore(R).buttonMarkup({theme:S.theme,icon:S.icon,iconpos:S.iconpos,inline:S.inline,corners:S.corners,shadow:S.shadow,iconshadow:S.iconshadow}),J=P.isMultiple=R[0].multiple;if(S.nativeMenu&&window.opera&&window.opera.version){R.addClass("ui-select-nativeonly")}if(!S.nativeMenu){var H=R.find("option"),L=V+"-button",N=V+"-menu",C=R.closest(".ui-page"),X=/ui-btn-up-([a-z])/.exec(D.attr("class"))[1],Q=A("<div data-role='dialog' data-theme='"+S.menuPageTheme+"'><div data-role='header'><div class='ui-title'>"+M.text()+"</div></div><div data-role='content'></div></div>").appendTo(A.mobile.pageContainer).page(),I=Q.find(".ui-content"),G=Q.find(".ui-header a"),F=A("<div>",{"class":"ui-selectmenu-screen ui-screen-hidden"}).appendTo(C),E=A("<div>",{"class":"ui-selectmenu ui-selectmenu-hidden ui-overlay-shadow ui-corner-all pop ui-body-"+S.overlayTheme}).insertAfter(F),W=A("<ul>",{"class":"ui-selectmenu-list",id:N,role:"listbox","aria-labelledby":L,"data-theme":X}).appendTo(E),U=A("<div>",{"class":"ui-header ui-bar-"+X}).prependTo(E),T=A("<h1>",{"class":"ui-title"}).appendTo(U),K=A("<a>",{"data-iconpos":"notext","data-icon":"delete",text:S.closeText,href:"#","class":"ui-btn-left"}).appendTo(U).buttonMarkup(),O}if(J){P.buttonCount=A("<span>").addClass("ui-li-count ui-btn-up-c ui-btn-corner-all").hide().appendTo(D)}if(S.disabled){this.disable()}R.change(function(){P.refresh()});A.extend(P,{select:R,optionElems:H,selectID:V,label:M,buttonId:L,menuId:N,thisPage:C,button:D,menuPage:Q,menuPageContent:I,screen:F,listbox:E,list:W,menuType:O,header:U,headerClose:K,headerTitle:T,placeholder:""});if(S.nativeMenu){R.appendTo(D).bind("touchstart mousedown",function(Y){D.addClass(A.mobile.activeBtnClass)}).bind("focus mouseover",function(){D.trigger("mouseover")}).bind("touchmove",function(){D.removeClass(A.mobile.activeBtnClass)}).bind("change blur mouseout",function(){D.trigger("mouseout").removeClass(A.mobile.activeBtnClass)});D.attr("tabindex","-1")}else{P.refresh();R.attr("tabindex","-1").focus(function(){A(this).blur();D.focus()});D.bind("touchstart",function(Y){A(this).data("startTouches",A.extend({},Y.originalEvent.touches[0]))}).bind(A.support.touch?"touchend":"mouseup",function(Y){if(A(this).data("moved")){A(this).removeData("moved")}else{P.open()}Y.preventDefault()}).bind("touchmove",function(a){var c=a.originalEvent.touches[0],b=A(this).data("startTouches"),Z=Math.abs(c.pageX-b.pageX),Y=Math.abs(c.pageY-b.pageY);if(Z>10||Y>10){A(this).data("moved",true)}});W.delegate("li:not(.ui-disabled, .ui-li-divider)","click",function(a){if(!A(a.target).is("a")){return }var Y=W.find("li:not(.ui-li-divider)").index(this),Z=P.optionElems.eq(Y)[0];Z.selected=J?!Z.selected:true;if(J){A(this).find(".ui-icon").toggleClass("ui-icon-checkbox-on",Z.selected).toggleClass("ui-icon-checkbox-off",!Z.selected)}R.trigger("change");if(!J){P.close()}a.preventDefault()});F.add(K).add(G).bind("click",function(Y){P.close();Y.preventDefault();if(A.contains(G[0],Y.target)){Y.stopImmediatePropagation()}})}},_buildList:function(){var E=this,H=this.options,G=this.placeholder,C=[],F=[],D=E.isMultiple?"checkbox-off":"false";E.list.empty().filter(".ui-listview").listview("destroy");E.select.find("option").each(function(L){var O=A(this),N=O.parent(),P=O.text(),I="<a href='#'>"+P+"</a>",K=[],M=[];if(N.is("optgroup")){var J=N.attr("label");if(A.inArray(J,C)===-1){F.push("<li data-role='list-divider'>"+J+"</li>");C.push(J)}}if(!this.getAttribute("value")||P.length==0||O.data("placeholder")){if(H.hidePlaceholderMenuItems){K.push("ui-selectmenu-placeholder")}G=E.placeholder=P}if(this.disabled){K.push("ui-disabled");M.push("aria-disabled='true'")}F.push("<li data-icon='"+D+"' class='"+K.join(" ")+"' "+M.join(" ")+">"+I+"</li>")});E.list.html(F.join(" "));if(!this.isMultiple){this.headerClose.hide()}if(!this.isMultiple&&!G.length){this.header.hide()}else{this.headerTitle.text(this.placeholder)}E.list.listview()},refresh:function(G){var D=this,C=this.element,H=this.isMultiple,E=this.optionElems=C.find("option"),F=E.filter(":selected"),I=F.map(function(){return E.index(this)}).get();if(!D.options.nativeMenu&&(G||C[0].options.length>D.list.find("li").length)){D._buildList()}D.button.find(".ui-btn-text").text(function(){if(!H){return F.text()}return F.length?F.map(function(){return A(this).text()}).get().join(", "):D.placeholder});if(H){D.buttonCount[F.length>1?"show":"hide"]().text(F.length)}if(!D.options.nativeMenu){D.list.find("li:not(.ui-li-divider)").removeClass(A.mobile.activeBtnClass).attr("aria-selected",false).each(function(J){if(A.inArray(J,I)>-1){var K=A(this).addClass(A.mobile.activeBtnClass);K.find("a").attr("aria-selected",true);if(H){K.find(".ui-icon").removeClass("ui-icon-checkbox-off").addClass("ui-icon-checkbox-on")}}})}},open:function(){if(this.options.disabled||this.options.nativeMenu){return }var P=this,G=P.list.outerHeight(),L=P.list.outerWidth(),F=A(window).scrollTop(),O=P.button.offset().top,D=window.innerHeight,C=window.innerWidth,E=P.list.parents(".ui-dialog").length;P.button.addClass(A.mobile.activeBtnClass);function H(){P.list.find(".ui-btn-active").focus()}if(E||G>D-80||!A.support.scrollTop){if(F==0&&O>D){P.thisPage.one("pagehide",function(){A(this).data("lastScroll",O)})}P.menuPage.one("pageshow",function(){A(window).one("silentscroll",function(){H()})});P.menuType="page";P.menuPageContent.append(P.list);A.mobile.changePage(P.menuPage,"pop",false,true)}else{P.menuType="overlay";P.screen.height(A(document).height()).removeClass("ui-screen-hidden");var K=O-F,I=F+D-O,N=G/2,M,J;if(K>G/2&&I>G/2){M=O+(P.button.outerHeight()/2)-N}else{M=K>I?F+D-G-30:F+30}J=P.button.offset().left+P.button.outerWidth()/2-L/2;P.listbox.append(P.list).removeClass("ui-selectmenu-hidden").css({top:M,left:J}).addClass("in");H()}setTimeout(function(){P.isOpen=true},400)},close:function(){if(this.options.disabled||!this.isOpen||this.options.nativeMenu){return }var C=this;function D(){setTimeout(function(){C.button.focus();C.button.removeClass(A.mobile.activeBtnClass)},40);C.listbox.removeAttr("style").append(C.list)}if(C.menuType=="page"){A.mobile.changePage([C.menuPage,C.thisPage],"pop",true,false);C.menuPage.one("pagehide",D)}else{C.screen.addClass("ui-screen-hidden");C.listbox.addClass("ui-selectmenu-hidden").removeAttr("style").removeClass("in");D()}this.isOpen=false},disable:function(){this.element.attr("disabled",true);this.button.addClass("ui-disabled").attr("aria-disabled",true);return this._setOption("disabled",true)},enable:function(){this.element.attr("disabled",false);this.button.removeClass("ui-disabled").attr("aria-disabled",false);return this._setOption("disabled",false)}})})(jQuery);(function(B,C){B.fn.buttonMarkup=function(D){return this.each(function(){var J=B(this),K=B.extend({},B.fn.buttonMarkup.defaults,J.data(),D),F,H="ui-btn-inner",E;if(A){A()}if(!K.theme){var G=J.closest("[class*='ui-bar-'],[class*='ui-body-']");K.theme=G.length?/ui-(bar|body)-([a-z])/.exec(G.attr("class"))[2]:"c"}F="ui-btn ui-btn-up-"+K.theme;if(K.inline){F+=" ui-btn-inline"}if(K.icon){K.icon="ui-icon-"+K.icon;K.iconpos=K.iconpos||"left";E="ui-icon "+K.icon;if(K.shadow){E+=" ui-icon-shadow"}}if(K.iconpos){F+=" ui-btn-icon-"+K.iconpos;if(K.iconpos=="notext"&&!J.attr("title")){J.attr("title",J.text())}}if(K.corners){F+=" ui-btn-corner-all";H+=" ui-btn-corner-all"}if(K.shadow){F+=" ui-shadow"}J.attr("data-theme",K.theme).addClass(F);var I=("<D class='"+H+"'><D class='ui-btn-text'></D>"+(K.icon?"<span class='"+E+"'></span>":"")+"</D>").replace(/D/g,K.wrapperEls);J.wrapInner(I)})};B.fn.buttonMarkup.defaults={corners:true,shadow:true,iconshadow:true,wrapperEls:"span"};var A=function(){B(".ui-btn:not(.ui-disabled)").live({"touchstart mousedown":function(){var D=B(this).attr("data-theme");B(this).removeClass("ui-btn-up-"+D).addClass("ui-btn-down-"+D)},"touchmove touchend mouseup":function(){var D=B(this).attr("data-theme");B(this).removeClass("ui-btn-down-"+D).addClass("ui-btn-up-"+D)},"mouseover focus":function(){var D=B(this).attr("data-theme");B(this).removeClass("ui-btn-up-"+D).addClass("ui-btn-hover-"+D)},"mouseout blur":function(){var D=B(this).attr("data-theme");B(this).removeClass("ui-btn-hover-"+D).addClass("ui-btn-up-"+D)}});A=null}})(jQuery);(function(A,B){A.widget("mobile.button",A.mobile.widget,{options:{theme:null,icon:null,iconpos:null,inline:null,corners:true,shadow:true,iconshadow:true},_create:function(){var C=this.element,D=this.options;this.button=A("<div></div>").text(C.text()||C.val()).buttonMarkup({theme:D.theme,icon:D.icon,iconpos:D.iconpos,inline:D.inline,corners:D.corners,shadow:D.shadow,iconshadow:D.iconshadow}).insertBefore(C).append(C.addClass("ui-btn-hidden"));if(C.attr("type")!=="reset"){C.click(function(){var E=A("<input>",{type:"hidden",name:C.attr("name"),value:C.attr("value")}).insertBefore(C);A(document).submit(function(){E.remove()})})}},enable:function(){this.element.attr("disabled",false);this.button.removeClass("ui-disabled").attr("aria-disabled",false);return this._setOption("disabled",false)},disable:function(){this.element.attr("disabled",true);this.button.addClass("ui-disabled").attr("aria-disabled",true);return this._setOption("disabled",true)}})})(jQuery);(function(A,B){A.widget("mobile.slider",A.mobile.widget,{options:{theme:null,trackTheme:null,disabled:false},_create:function(){var R=this,J=this.element,F=J.parents("[class*=ui-bar-],[class*=ui-body-]").eq(0),F=F.length?F.attr("class").match(/ui-(bar|body)-([a-z])/)[2]:"c",K=this.options.theme?this.options.theme:F,G=this.options.trackTheme?this.options.trackTheme:F,L=J[0].nodeName.toLowerCase(),N=(L=="select")?"ui-slider-switch":"",H=J.attr("id"),M=H+"-label",Q=A("[for="+H+"]").attr("id",M),E=function(){return(L=="input")?parseFloat(J.val()):J[0].selectedIndex},I=(L=="input")?parseFloat(J.attr("min")):0,P=(L=="input")?parseFloat(J.attr("max")):J.find("option").length-1,D=window.parseFloat(J.attr("step")||1),C=A('<div class="ui-slider '+N+" ui-btn-down-"+G+' ui-btn-corner-all" role="application"></div>'),O=A('<a href="#" class="ui-slider-handle"></a>').appendTo(C).buttonMarkup({corners:true,theme:K,shadow:true}).attr({role:"slider","aria-valuemin":I,"aria-valuemax":P,"aria-valuenow":E(),"aria-valuetext":E(),title:E(),"aria-labelledby":M});A.extend(this,{slider:C,handle:O,dragging:false,beforeStart:null});if(L=="select"){C.wrapInner('<div class="ui-slider-inneroffset"></div>');var S=J.find("option");J.find("option").each(function(V){var U=(V==0)?"b":"a",T=(V==0)?"right":"left",W=(V==0)?" ui-btn-down-"+G:" ui-btn-active";A('<div class="ui-slider-labelbg ui-slider-labelbg-'+U+W+" ui-btn-corner-"+T+'"></div>').prependTo(C);A('<span class="ui-slider-label ui-slider-label-'+U+W+" ui-btn-corner-"+T+'" role="img">'+A(this).text()+"</span>").prependTo(O)})}Q.addClass("ui-slider");J.addClass((L=="input")?"ui-slider-input":"ui-slider-switch").change(function(){R.refresh(E(),true)}).keyup(function(){R.refresh(E(),true,true)}).blur(function(){R.refresh(E(),true)});A(document).bind("touchmove mousemove",function(T){if(R.dragging){R.refresh(T);return false}});C.bind("touchstart mousedown",function(T){R.dragging=true;if(L==="select"){R.beforeStart=J[0].selectedIndex}R.refresh(T);return false});C.add(document).bind("touchend mouseup",function(){if(R.dragging){R.dragging=false;if(L==="select"){if(R.beforeStart===J[0].selectedIndex){R.refresh(R.beforeStart===0?1:0)}var U=E();var T=Math.round(U/(P-I)*100);O.addClass("ui-slider-handle-snapping").css("left",T+"%").animationComplete(function(){O.removeClass("ui-slider-handle-snapping")})}return false}});C.insertAfter(J);this.handle.bind("touchstart mousedown",function(){A(this).focus()});this.handle.bind("keydown",function(U){var T=E();if(R.options.disabled){return }switch(U.keyCode){case A.mobile.keyCode.HOME:case A.mobile.keyCode.END:case A.mobile.keyCode.PAGE_UP:case A.mobile.keyCode.PAGE_DOWN:case A.mobile.keyCode.UP:case A.mobile.keyCode.RIGHT:case A.mobile.keyCode.DOWN:case A.mobile.keyCode.LEFT:U.preventDefault();if(!R._keySliding){R._keySliding=true;A(this).addClass("ui-state-active")}break}switch(U.keyCode){case A.mobile.keyCode.HOME:R.refresh(I);break;case A.mobile.keyCode.END:R.refresh(P);break;case A.mobile.keyCode.PAGE_UP:case A.mobile.keyCode.UP:case A.mobile.keyCode.RIGHT:R.refresh(T+D);break;case A.mobile.keyCode.PAGE_DOWN:case A.mobile.keyCode.DOWN:case A.mobile.keyCode.LEFT:R.refresh(T-D);break}}).keyup(function(T){if(R._keySliding){R._keySliding=false;A(this).removeClass("ui-state-active")}});this.refresh()},refresh:function(E,C,M){if(this.options.disabled){return }var H=this.element,J,I=H[0].nodeName.toLowerCase(),F=(I==="input")?parseFloat(H.attr("min")):0,K=(I==="input")?parseFloat(H.attr("max")):H.find("option").length-1;if(typeof E==="object"){var G=E.originalEvent.touches?E.originalEvent.touches[0]:E,L=8;if(!this.dragging||G.pageX<this.slider.offset().left-L||G.pageX>this.slider.offset().left+this.slider.width()+L){return }J=Math.round(((G.pageX-this.slider.offset().left)/this.slider.width())*100)}else{if(E==null){E=(I==="input")?parseFloat(H.val()):H[0].selectedIndex}J=(parseFloat(E)-F)/(K-F)*100}if(isNaN(J)){return }if(J<0){J=0}if(J>100){J=100}var D=Math.round((J/100)*(K-F))+F;if(D<F){D=F}if(D>K){D=K}if(J>60&&I==="select"){}this.handle.css("left",J+"%");this.handle.attr({"aria-valuenow":(I==="input")?D:H.find("option").eq(D).attr("value"),"aria-valuetext":(I==="input")?D:H.find("option").eq(D).text(),title:D});if(I==="select"){if(D===0){this.slider.addClass("ui-slider-switch-a").removeClass("ui-slider-switch-b")}else{this.slider.addClass("ui-slider-switch-b").removeClass("ui-slider-switch-a")}}if(!M){if(I==="input"){H.val(D)}else{H[0].selectedIndex=D}if(!C){H.trigger("change")}}},enable:function(){this.element.attr("disabled",false);this.slider.removeClass("ui-disabled").attr("aria-disabled",false);return this._setOption("disabled",false)},disable:function(){this.element.attr("disabled",true);this.slider.addClass("ui-disabled").attr("aria-disabled",true);return this._setOption("disabled",true)}})})(jQuery);(function(A,B){A.widget("mobile.collapsible",A.mobile.widget,{options:{expandCueText:" click to expand contents",collapseCueText:" click to collapse contents",collapsed:false,heading:">:header,>legend",theme:null,iconTheme:"d"},_create:function(){var E=this.element,F=this.options,C=E.addClass("ui-collapsible-contain"),D=E.find(F.heading).eq(0),I=C.wrapInner('<div class="ui-collapsible-content"></div>').find(".ui-collapsible-content"),H=E.closest('[data-role="collapsible-set"]').addClass("ui-collapsible-set");if(D.is("legend")){D=A('<div role="heading">'+D.html()+"</div>").insertBefore(D);D.next().remove()}D.insertBefore(I);D.addClass("ui-collapsible-heading").append('<span class="ui-collapsible-heading-status"></span>').wrapInner('<a href="#" class="ui-collapsible-heading-toggle"></a>').find("a:eq(0)").buttonMarkup({shadow:!!!H.length,corners:false,iconPos:"left",icon:"plus",theme:F.theme}).find(".ui-icon").removeAttr("class").buttonMarkup({shadow:true,corners:true,iconPos:"notext",icon:"plus",theme:F.iconTheme});if(!H.length){D.find("a:eq(0)").addClass("ui-corner-all").find(".ui-btn-inner").addClass("ui-corner-all")}else{if(C.data("collapsible-last")){D.find("a:eq(0), .ui-btn-inner").addClass("ui-corner-bottom")}}C.bind("collapse",function(J){if(!J.isDefaultPrevented()){J.preventDefault();D.addClass("ui-collapsible-heading-collapsed").find(".ui-collapsible-heading-status").text(F.expandCueText);D.find(".ui-icon").removeClass("ui-icon-minus").addClass("ui-icon-plus");I.addClass("ui-collapsible-content-collapsed").attr("aria-hidden",true);if(C.data("collapsible-last")){D.find("a:eq(0), .ui-btn-inner").addClass("ui-corner-bottom")}}}).bind("expand",function(J){if(!J.isDefaultPrevented()){J.preventDefault();D.removeClass("ui-collapsible-heading-collapsed").find(".ui-collapsible-heading-status").text(F.collapseCueText);D.find(".ui-icon").removeClass("ui-icon-plus").addClass("ui-icon-minus");I.removeClass("ui-collapsible-content-collapsed").attr("aria-hidden",false);if(C.data("collapsible-last")){D.find("a:eq(0), .ui-btn-inner").removeClass("ui-corner-bottom")}}}).trigger(F.collapsed?"collapse":"expand");if(H.length&&!H.data("collapsiblebound")){H.data("collapsiblebound",true).bind("expand",function(J){A(this).find(".ui-collapsible-contain").not(A(J.target).closest(".ui-collapsible-contain")).not("> .ui-collapsible-contain .ui-collapsible-contain").trigger("collapse")});var G=H.find("[data-role=collapsible]");G.first().find("a:eq(0)").addClass("ui-corner-top").find(".ui-btn-inner").addClass("ui-corner-top");G.last().data("collapsible-last",true)}D.bind(A.support.touch?"touchstart":"click",function(){if(D.is(".ui-collapsible-heading-collapsed")){C.trigger("expand")}else{C.trigger("collapse")}return false})}})})(jQuery);(function(A,B){A.fn.controlgroup=function(C){return this.each(function(){var G=A.extend({direction:A(this).data("type")||"vertical",shadow:false},C);var H=A(this).find(">legend"),D=G.direction=="horizontal"?["ui-corner-left","ui-corner-right"]:["ui-corner-top","ui-corner-bottom"],E=A(this).find("input:eq(0)").attr("type");if(H.length){A(this).wrapInner('<div class="ui-controlgroup-controls"></div>');A('<div role="heading" class="ui-controlgroup-label">'+H.html()+"</div>").insertBefore(A(this).children(0));H.remove()}A(this).addClass("ui-corner-all ui-controlgroup ui-controlgroup-"+G.direction);function F(I){I.removeClass("ui-btn-corner-all ui-shadow").eq(0).addClass(D[0]).end().filter(":last").addClass(D[1]).addClass("ui-controlgroup-last")}F(A(this).find(".ui-btn"));F(A(this).find(".ui-btn-inner"));if(G.shadow){A(this).addClass("ui-shadow")}})}})(jQuery);(function(A,B){A.fn.fieldcontain=function(C){return this.addClass("ui-field-contain ui-body ui-br")}})(jQuery);(function(A,B){A.widget("mobile.listview",A.mobile.widget,{options:{theme:"c",countTheme:"c",headerTheme:"b",dividerTheme:"b",splitIcon:"arrow-r",splitTheme:"b",inset:false},_create:function(){var C=this.element,D=this.options;C.addClass("ui-listview").attr("role","listbox");if(D.inset){C.addClass("ui-listview-inset ui-corner-all ui-shadow")}C.delegate(".ui-li","focusin",function(){A(this).attr("tabindex","0")});this._itemApply(C,C);this.refresh(true);C.keydown(function(J){var I=A(J.target),E=I.closest("li");switch(J.keyCode){case 38:var H=E.prev();if(H.length){I.blur().attr("tabindex","-1");H.find("a").first().focus()}return false;break;case 40:var G=E.next();if(G.length){I.blur().attr("tabindex","-1");G.find("a").first().focus()}return false;break;case 39:var F=E.find("a.ui-li-link-alt");if(F.length){I.blur();F.first().focus()}return false;break;case 37:var F=E.find("a.ui-link-inherit");if(F.length){I.blur();F.first().focus()}return false;break;case 13:case 32:I.trigger("click");return false;break}});C.delegate("li","click",function(E){if(!A(E.target).closest("a").length){A(this).find("a").first().trigger("click");return false}})},_itemApply:function(D,E){E.find(".ui-li-count").addClass("ui-btn-up-"+(D.data("counttheme")||this.options.countTheme)+" ui-btn-corner-all");E.find("h1, h2, h3, h4, h5, h6").addClass("ui-li-heading");E.find("p, dl").addClass("ui-li-desc");E.find("li").find("img:eq(0)").addClass("ui-li-thumb").each(function(){A(this).closest("li").addClass(A(this).is(".ui-li-icon")?"ui-li-has-icon":"ui-li-has-thumb")});var C=E.find(".ui-li-aside");if(C.length){C.each(function(F,G){A(G).prependTo(A(G).parent())})}if(A.support.cssPseudoElement||!A.nodeName(E[0],"ol")){return }},_removeCorners:function(C){C.add(C.find(".ui-btn-inner, .ui-li-link-alt, .ui-li-thumb")).removeClass("ui-corner-top ui-corner-bottom ui-corner-br ui-corner-bl ui-corner-tr ui-corner-tl")},refresh:function(G){this._createSubPages();var I=this.options,F=this.element,E=this,H=F.data("dividertheme")||I.dividerTheme,C=F.children("li"),D=A.support.cssPseudoElement||!A.nodeName(F[0],"ol")?0:1;if(D){F.find(".ui-li-dec").remove()}C.attr({role:"option",tabindex:"-1"});C.first().attr("tabindex","0");C.each(function(Q){var N=A(this),O="ui-li";if(!G&&N.hasClass("ui-li")){return }var P=N.data("theme")||I.theme;var J=N.find("a");if(J.length){var L=N.data("icon");N.buttonMarkup({wrapperEls:"div",shadow:false,corners:false,iconpos:"right",icon:J.length>1||L===false?false:L||"arrow-r",theme:P});J.first().addClass("ui-link-inherit");if(J.length>1){O+=" ui-li-has-alt";var M=J.last(),K=F.data("splittheme")||M.data("theme")||I.splitTheme;M.appendTo(N).attr("title",M.text()).addClass("ui-li-link-alt").empty().buttonMarkup({shadow:false,corners:false,theme:P,icon:false,iconpos:false}).find(".ui-btn-inner").append(A("<span>").buttonMarkup({shadow:true,corners:true,theme:K,iconpos:"notext",icon:F.data("spliticon")||M.data("icon")||I.splitIcon}))}}else{if(N.data("role")==="list-divider"){O+=" ui-li-divider ui-btn ui-bar-"+H;N.attr("role","heading");if(D){D=1}}else{O+=" ui-li-static ui-btn-up-"+P}}if(I.inset){if(Q===0){O+=" ui-corner-top";N.add(N.find(".ui-btn-inner")).find(".ui-li-link-alt").addClass("ui-corner-tr").end().find(".ui-li-thumb").addClass("ui-corner-tl");if(N.next().next().length){E._removeCorners(N.next())}}if(Q===C.length-1){O+=" ui-corner-bottom";N.add(N.find(".ui-btn-inner")).find(".ui-li-link-alt").addClass("ui-corner-br").end().find(".ui-li-thumb").addClass("ui-corner-bl");if(N.prev().prev().length){E._removeCorners(N.prev())}}}if(D&&O.indexOf("ui-li-divider")<0){N.find(".ui-link-inherit").first().addClass("ui-li-jsnumbering").prepend("<span class='ui-li-dec'>"+(D++)+". </span>")}N.addClass(O);if(!G){E._itemApply(F,N)}})},_idStringEscape:function(C){return C.replace(/[^a-zA-Z0-9]/g,"-")},_createSubPages:function(){var D=this.element,C=D.closest(".ui-page"),H=C.data("url"),G=this.options,E=this,F=C.find("[data-role='footer']").data("id");A(D.find("ul, ol").toArray().reverse()).each(function(N){var O=A(this),Q=O.parent(),P=A.trim(Q.contents()[0].nodeValue)||Q.find("a:first").text(),I=H+"&"+A.mobile.subPageUrlKey+"="+E._idStringEscape(P+" "+N),M=O.data("theme")||G.theme,J=O.data("counttheme")||D.data("counttheme")||G.countTheme,K=O.wrap("<div data-role='page'><div data-role='content'></div></div>").parent().before("<div data-role='header' data-theme='"+G.headerTheme+"'><div class='ui-title'>"+P+"</div></div>").after(F?A("<div>",{"data-role":"footer","data-id":F,"class":"ui-footer-duplicate"}):"").parent().attr({"data-url":I,"data-theme":M,"data-count-theme":J}).appendTo(A.mobile.pageContainer);K.page();var L=Q.find("a:first");if(!L.length){L=A("<a></a>").html(P).prependTo(Q.empty())}L.attr("href","#"+I)}).listview()}})})(jQuery);(function(A,B){A.mobile.listview.prototype.options.filter=false;A("[data-role='listview']").live("listviewcreate",function(){var E=A(this),D=E.data("listview");if(!D.options.filter){return }var F=A("<form>",{"class":"ui-listview-filter ui-bar-c",role:"search"}),C=A("<input>",{placeholder:"Filter results...","data-type":"search"}).bind("keyup change",function(){var G=this.value.toLowerCase();E.children().show();if(G){E.children().filter(function(){return A(this).text().toLowerCase().indexOf(G)===-1}).hide()}}).appendTo(F).textinput();F.insertBefore(E)})})(jQuery);(function(A,B){A.widget("mobile.dialog",A.mobile.widget,{options:{},_create:function(){var C=this,D=C.element;this.element.attr("role","dialog").addClass("ui-page ui-dialog ui-body-a").find("[data-role=header]").addClass("ui-corner-top ui-overlay-shadow").prepend('<a href="#" data-icon="delete" data-rel="back" data-iconpos="notext">Close</a>').end().find('.ui-content:not([class*="ui-body-"])').addClass("ui-body-c").end().find(".ui-content,[data-role=footer]").last().addClass("ui-corner-bottom ui-overlay-shadow");this.element.bind("click submit",function(F){var E;if(F.type=="click"){E=A(F.target).closest("a")}else{E=A(F.target).closest("form")}if(E.length&&!E.data("transition")){E.attr("data-transition",A.mobile.urlHistory.getActive().transition).attr("data-direction","reverse")}})},close:function(){window.history.back()}})})(jQuery);(function(A,B){A.widget("mobile.navbar",A.mobile.widget,{options:{iconpos:"top",grid:null},_create:function(){var E=this.element,C=E.find("a"),D=C.filter("[data-icon]").length?this.options.iconpos:B;E.addClass("ui-navbar").attr("role","navigation").find("ul").grid({grid:this.options.grid});if(!D){E.addClass("ui-navbar-noicons")}C.buttonMarkup({corners:false,shadow:false,iconpos:D});E.delegate("a","click",function(F){C.removeClass("ui-btn-active");A(this).addClass("ui-btn-active")})}})})(jQuery);(function(A,B){A.fn.grid=function(C){return this.each(function(){var H=A.extend({grid:null},C);var I=A(this).children(),F={a:2,b:3,c:4,d:5},D=H.grid,E;if(!D){if(I.length<=5){for(var G in F){if(F[G]==I.length){D=G}}}else{D="a"}}E=F[D];A(this).addClass("ui-grid-"+D);I.filter(":nth-child("+E+"n+1)").addClass("ui-block-a");I.filter(":nth-child("+E+"n+2)").addClass("ui-block-b");if(E>2){I.filter(":nth-child(3n+3)").addClass("ui-block-c")}if(E>3){I.filter(":nth-child(4n+4)").addClass("ui-block-d")}if(E>4){I.filter(":nth-child(5n+5)").addClass("ui-block-e")}})}})(jQuery);