/*
 * jQuery Mobile v1.0a2
 * 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(E,C){E.media=(function(){var K={},J=E("html"),L=E("<div id='jquery-mediatest'>"),M=E("<body>").append(L);return function(O){if(!(O in K)){var N=E("<style type='text/css'>@media "+O+"{#jquery-mediatest{position:absolute;}}</style>");J.prepend(M).prepend(N);K[O]=L.css("position")==="absolute";M.add(N).remove()}return K[O]}})();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 M=location.protocol+"//"+location.host+location.pathname+"ui-dir/",L=E("<base>",{href:M}).appendTo("head"),K=E("<a href='testurl'></a>").prependTo(D),J=K[0].href;L.remove();return J.indexOf(M)===0}E.extend(E.support,{orientation:"orientation" in window,touch:"ontouchend" in document,cssTransitions:"WebKitTransitionEvent" in window,pushState:!!history.pushState,mediaquery:E.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(A,function(N){if(N.which&&N.which!==1){return }var M=false,K=true,J=[N.pageX,N.pageY],L,P;function O(){if((Math.abs(J[0]-N.pageX)>10)||(Math.abs(J[1]-N.pageY)>10)){M=true}}P=setTimeout(function(){if(K&&!M){L=N.type;N.type="taphold";E.event.handle.call(H,N);N.type=L}},750);I.one(B,O).one(F,function(Q){I.unbind(B,O);clearTimeout(P);K=false;if(!M){L=Q.type;Q.type="tap";E.event.handle.call(H,Q);Q.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:true,search:true,tel:false,time:false,url:false,week:false}},_create:function(){var C=this.element,E=this.options;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");this._enchanceControls();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.mobile.urlStack.length>1||A(".ui-page").length>1)&&!G&&!J.data("noBackBtn")){A("<a href='#' class='ui-btn-left' data-icon='arrow-l'>"+E.backBtnText+"</a>").click(function(){history.back();return false}).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}});C.find("[data-role='button'], .ui-bar a, .ui-header a, .ui-footer a").not(".ui-btn").buttonMarkup();C.find("[data-role='controlgroup']").controlgroup();C.find("a:not(.ui-btn):not(.ui-link-inherit)").addClass("ui-link");C.fixHeaderFooter()},_enchanceControls:function(){var C=this.options;this.element.find("input").each(function(){var D=this.getAttribute("type");if(C.degradeInputs[D]){A(this).replaceWith(A("<div>").html(A(this).clone()).html().replace(/type="([a-zA-Z]+)"/,"data-type='$1'"))}});this.element.find("[type='radio'], [type='checkbox']").checkboxradio();this.element.find("button, [type='button'], [type='submit'], [type='reset'], [type='image']").not(".ui-nojs").button();this.element.find("input, textarea").not("[type='radio'], [type='checkbox'], button, [type='button'], [type='submit'], [type='reset'], [type='image']").textinput();this.element.find("input, select").filter("[data-role='slider'], [data-type='range']").slider();this.element.find("select:not([data-role='slider'])").selectmenu()}})})(jQuery);(function(A,B){A.fn.fixHeaderFooter=function(C){if(!A.support.scrollTop){return A(this)}return A(this).each(function(){if(A(this).data("fullscreen")){A(this).addClass("ui-page-fullscreen")}A(this).find('.ui-header[data-position="fixed"]').addClass("ui-header-fixed ui-fixed-inline fade");A(this).find('.ui-footer[data-position="fixed"]').addClass("ui-footer-fixed ui-fixed-inline fade")})};A.fixedToolbars=(function(){if(!A.support.scrollTop){return }var D="inline",C,K="a,input,textarea,select,button,label,.ui-header-fixed,.ui-footer-fixed",L=".ui-header-fixed:first, .ui-footer-fixed:not(.ui-footer-duplicate):last",J,F=A.support.touch,M=F?"touchstart":"mousedown",H=F?"touchend":"mouseup",E=null,G=false;A(function(){A(document).bind(M,function(P){if(A(P.target).closest(K).length){return }E=D;A.fixedToolbars.hide(true)}).bind("scrollstart",function(P){if(A(P.target).closest(K).length){return }G=true;if(E==null){E=D}A.fixedToolbars.hide(true)}).bind(H,function(P){if(A(P.target).closest(K).length){return }if(!G){A.fixedToolbars.toggle(E);E=null}}).bind("scrollstop",function(P){if(A(P.target).closest(K).length){return }G=false;A.fixedToolbars.toggle(E=="overlay"?"inline":"overlay");E=null});function O(P){var Q=P.find('[data-role="footer"]');return A('.ui-footer[data-id="'+Q.data("id")+'"]:not(.ui-footer-duplicate)').not(Q)}A(".ui-page").live("pagebeforeshow",function(P,Q){J=O(A(P.target));if(J.length){if(J.parents(".ui-page:eq(0)").find('.ui-footer[data-id="'+J.data("id")+'"]').length==1){J.before(J.clone().addClass("ui-footer-duplicate"))}A(P.target).find('[data-role="footer"]').addClass("ui-footer-duplicate");J.appendTo(A.pageContainer).css("top",0);N(J)}});A(".ui-page").live("pageshow",function(P,Q){if(J&&J.length){J.appendTo(P.target).css("top",0)}A.fixedToolbars.show(true,this)})});function I(P){var Q=0;if(P){var R=P.offsetParent,O=document.body;Q=P.offsetTop;while(P&&P!=O){Q+=P.scrollTop||0;if(P==R){Q+=R.offsetTop;R=P.offsetParent}P=P.parentNode}}return Q}function N(S){var O=A(window).scrollTop(),T=I(S[0]),R=S.css("top")=="auto"?0:parseFloat(S.css("top")),V=window.innerHeight,U=S.outerHeight(),Q=S.parents(".ui-page:not(.ui-page-fullscreen)").length,P;if(S.is(".ui-header-fixed")){P=O-T+R;if(P<T){P=0}return S.css("top",(Q)?P:O)}else{P=O+V-U-(T-R);return S.css("top",(Q)?P:O+V-U)}}return{show:function(O,Q){D="overlay";var P=Q?A(Q):(A.mobile.activePage?A.mobile.activePage:A(".ui-page-active"));return P.children(L).each(function(){var T=A(this),R=A(window).scrollTop(),U=I(T[0]),W=window.innerHeight,V=T.outerHeight(),S=(T.is(".ui-header-fixed")&&R<=U+V)||(T.is(".ui-footer-fixed")&&U<=R+W);T.addClass("ui-fixed-overlay").removeClass("ui-fixed-inline");if(!S&&!O){T.addClass("in").animationComplete(function(){T.removeClass("in")})}N(T)})},hide:function(O){D="inline";var P=A.mobile.activePage?A.mobile.activePage:A(".ui-page-active");return P.children(L).each(function(){var S=A(this);var R=S.css("top");R=R=="auto"?0:parseFloat(R);S.addClass("ui-fixed-inline").removeClass("ui-fixed-overlay");if(R<0||(S.is(".ui-header-fixed")&&R!=0)){if(O){S.css("top",0)}else{if(S.css("top")!=="auto"&&parseFloat(S.css("top"))!==0){var Q="out reverse";S.addClass(Q).animationComplete(function(){S.removeClass(Q);S.css("top",0)})}}}})},hideAfterDelay:function(){C=setTimeout(function(){A.fixedToolbars.hide()},3000)},toggle:function(O){if(O){D=O}return(D=="overlay")?A.fixedToolbars.hide():A.fixedToolbars.show()}}})()})(jQuery);(function(A,B){A.widget("mobile.checkboxradio",A.mobile.widget,{options:{theme:null},_create:function(){var C=this.element,E=A("label[for='"+C.attr("id")+"']"),G=C.attr("type"),F="ui-icon-"+G+"-on",D="ui-icon-"+G+"-off";if(G!="checkbox"&&G!="radio"){return }E.buttonMarkup({theme:this.options.theme,icon:this.element.parents("[data-type='horizontal']").length?B:D,shadow:false});C.add(E).wrapAll("<div class='ui-"+G+"'></div>");E.bind({mouseover:function(){if(A(this).parent().is(".ui-disabled")){return false}},mousedown:function(){if(A(this).parent().is(".ui-disabled")){return false}E.data("state",C.attr("checked"))},click:function(){setTimeout(function(){if(C.attr("checked")===E.data("state")){C.trigger("click")}},1)}});C.bind({click:function(){A("input[name='"+C.attr("name")+"'][type='"+G+"']").checkboxradio("refresh")},focus:function(){E.addClass("ui-focus")},blur:function(){E.removeClass("ui-focus")}});this.refresh()},refresh:function(){var C=this.element,E=A("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-search'+N+'"></div>').parent();var L=A('<a href="#" class="ui-input-clear" title="clear text">clear text</a>').click(function(){K.val("").focus();K.trigger("change");L.addClass("ui-input-clear-hidden");return false}).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"},_create:function(){var R=this,D=this.options,P=this.element.attr("tabindex","-1").wrap("<div class='ui-select'>"),G=P.attr("id"),O=A("label[for="+G+"]").addClass("ui-select"),J=G+"-button",K=G+"-menu",N=P.closest(".ui-page"),F=A("<a>",{href:"#",role:"button",id:J,"aria-haspopup":"true","aria-owns":K}).text(A(P[0].options.item(P[0].selectedIndex)).text()).insertBefore(P).buttonMarkup({theme:D.theme,icon:D.icon,iconpos:D.iconpos,inline:D.inline,corners:D.corners,shadow:D.shadow,iconshadow:D.iconshadow}),E=/ui-btn-up-([a-z])/.exec(F.attr("class"))[1],L=A("<div data-role='dialog' data-theme='"+D.menuPageTheme+"'><div data-role='header'><div class='ui-title'>"+O.text()+"</div></div><div data-role='content'></div></div>").appendTo(A.pageContainer).page(),I=L.find(".ui-content"),Q=A("<div>",{"class":"ui-listbox-screen ui-overlay ui-screen-hidden fade"}).appendTo(N),C=A("<div>",{"class":"ui-listbox ui-listbox-hidden ui-overlay-shadow ui-corner-all pop ui-body-"+D.overlayTheme}).insertAfter(Q),H=A("<ul>",{"class":"ui-listbox-list",id:K,role:"listbox","aria-labelledby":J,"data-theme":E}).appendTo(C),M;A.extend(R,{select:P,selectID:G,label:O,buttonId:J,menuId:K,thisPage:N,button:F,menuPage:L,menuPageContent:I,screen:Q,listbox:C,list:H,menuType:M});R.refresh();if(this.options.disabled){this.disable()}P.change(function(){R.refresh()}).focus(function(){A(this).blur();F.focus()});F.click(function(S){R.open();return false});H.delegate("li","click",function(){var T=H.find("li").index(this),S=P[0].selectedIndex;P[0].selectedIndex=T;if(T!==S){P.trigger("change")}R.refresh();R.close();return false});Q.click(function(){R.close();return false})},_buildList:function(){var C=this;C.list.empty().filter(".ui-listview").listview("destroy");C.select.find("option").each(function(E){var D=A("<a>",{role:"option",href:"#"}).text(A(this).text());A("<li>",{"data-icon":"checkbox-on"}).append(D).appendTo(C.list)});C.list.listview()},refresh:function(F){var D=this,C=this.element,E=C[0].selectedIndex;if(F||C[0].options.length>D.list.find("li").length){D._buildList()}D.button.find(".ui-btn-text").text(A(C[0].options.item(E)).text());D.list.find("li").removeClass(A.mobile.activeBtnClass).attr("aria-selected",false).eq(E).addClass(A.mobile.activeBtnClass).find("a").attr("aria-selected",true)},open:function(){if(this.options.disabled){return }var D=this,H=D.list.outerHeight(),E=A(window).scrollTop(),G=D.button.offset().top,F=window.innerHeight;function C(){D.list.find(".ui-btn-active").focus()}if(H>F-80||!A.support.scrollTop){if(E==0&&G>F){D.thisPage.one("pagehide",function(){A(this).data("lastScroll",G)})}D.menuPage.one("pageshow",C);D.menuType="page";D.menuPageContent.append(D.list);A.mobile.changePage(D.menuPage,"pop",false,false)}else{D.menuType="overlay";D.screen.height(A(document).height()).removeClass("ui-screen-hidden");D.listbox.append(D.list).removeClass("ui-listbox-hidden").css({top:E+(F/2),"margin-top":-H/2,left:window.innerWidth/2,"margin-left":-1*D.listbox.outerWidth()/2}).addClass("in");C()}},close:function(){if(this.options.disabled){return }var C=this;function D(){setTimeout(function(){C.button.focus()},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",function(){D()})}else{C.screen.addClass("ui-screen-hidden");C.listbox.addClass("ui-listbox-hidden").removeAttr("style").removeClass("in");D()}},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").live({mousedown:function(){var D=B(this).attr("data-theme");B(this).removeClass("ui-btn-up-"+D).addClass("ui-btn-down-"+D)},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,E=this.options,D=C.attr("type");C.addClass("ui-btn-hidden").attr("tabindex","-1");A("<a>",{href:"#",role:"button","aria-label":C.attr("type")}).text(C.text()||C.val()).insertBefore(C).click(function(){if(D=="submit"){A(this).closest("form").submit()}else{C.click()}return false}).buttonMarkup({theme:E.theme,icon:E.icon,iconpos:E.iconpos,inline:E.inline,corners:E.corners,shadow:E.shadow,iconshadow:E.iconshadow})}})})(jQuery);(function(A,B){A.widget("mobile.slider",A.mobile.widget,{options:{theme:null,trackTheme:null},_create:function(){var I=this.element,Q=I.parents("[class*=ui-bar-],[class*=ui-body-]").eq(0),Q=Q.length?Q.attr("class").match(/ui-(bar|body)-([a-z])/)[2]:"c",V=this.options.theme?this.options.theme:Q,M=this.options.trackTheme?this.options.trackTheme:Q,K=I[0].nodeName.toLowerCase(),T=(K=="select")?"ui-slider-switch":"",F=I.attr("id"),L=F+"-label",H=A("[for="+F+"]").attr("id",L),X=(K=="input")?parseFloat(I.val()):I[0].selectedIndex,P=(K=="input")?parseFloat(I.attr("min")):0,R=(K=="input")?parseFloat(I.attr("max")):I.find("option").length-1,C=((parseFloat(X)-P)/(R-P))*100,G=C,O=A('<div class="ui-slider '+T+" ui-btn-down-"+M+' ui-btn-corner-all" role="application"></div>'),U=A('<a href="#" class="ui-slider-handle"></a>').appendTo(O).buttonMarkup({corners:true,theme:V,shadow:true}).attr({role:"slider","aria-valuemin":P,"aria-valuemax":R,"aria-valuenow":X,"aria-valuetext":X,title:X,"aria-labelledby":L}),N=false;if(K=="select"){O.wrapInner('<div class="ui-slider-inneroffset"></div>');var E=I.find("option");I.find("option").each(function(a){var Z=(a==0)?"b":"a",Y=(a==0)?"right":"left",b=(a==0)?" ui-btn-down-"+M:" ui-btn-active";A('<div class="ui-slider-labelbg ui-slider-labelbg-'+Z+b+" ui-btn-corner-"+Y+'"></div>').prependTo(O);A('<span class="ui-slider-label ui-slider-label-'+Z+b+" ui-btn-corner-"+Y+'" role="img">'+A(this).text()+"</span>").prependTo(U)})}function D(Y){if(K=="input"){I.val(Y)}else{I[0].selectedIndex=Y}I.trigger("change")}function J(Z,c){if(c){C=(parseFloat(c)-P)/(R-P)*100}else{var b=Z.originalEvent.touches?Z.originalEvent.touches[0]:Z,Y=8;if(!N||b.pageX<O.offset().left-Y||b.pageX>O.offset().left+O.width()+Y){return }C=Math.round(((b.pageX-O.offset().left)/O.width())*100)}if(C<0){C=0}if(C>100){C=100}var a=Math.round((C/100)*(R-P))+P;if(a<P){a=P}if(a>R){a=R}if(C>60&&K=="select"){}G=Math.round(a/(R-P)*100);U.css("left",C+"%");U.attr({"aria-valuenow":(K=="input")?a:I.find("option").eq(a).attr("value"),"aria-valuetext":(K=="input")?a:I.find("option").eq(a).text(),title:a});W(a);D(a)}function W(Y){if(K=="input"){return }if(Y==0){O.addClass("ui-slider-switch-a").removeClass("ui-slider-switch-b")}else{O.addClass("ui-slider-switch-b").removeClass("ui-slider-switch-a")}}W(X);function S(){if(K=="select"){U.addClass("ui-slider-handle-snapping").css("left",G+"%").animationComplete(function(){U.removeClass("ui-slider-handle-snapping")})}}H.addClass("ui-slider");I.addClass((K=="input")?"ui-slider-input":"ui-slider-switch").keyup(function(Y){J(Y,A(this).val())});A(document).bind(A.support.touch?"touchmove":"mousemove",function(Y){if(N){J(Y);return false}});O.bind(A.support.touch?"touchstart":"mousedown",function(Y){N=true;if((K=="select")){X=I[0].selectedIndex}J(Y);return false});O.add(document).bind(A.support.touch?"touchend":"mouseup",function(Y){if(N){N=false;if(K=="select"){if(X==I[0].selectedIndex){X=X==0?1:0;J(Y,X)}S()}return false}});O.insertAfter(I);U.css("left",C+"%").bind("click",function(Y){return false})}})})(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.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 A(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){var D=A.extend({theme:"c"},C);return A(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("img").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 }},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(O){var M=A(this),N="ui-li";if(!G&&M.hasClass("ui-li")){return }var J=M.find("a");if(J.length){M.buttonMarkup({wrapperEls:"div",shadow:false,corners:false,iconpos:"right",icon:J.length>1?false:M.data("icon")||"arrow-r",theme:I.theme});J.first().addClass("ui-link-inherit");if(J.length>1){N+=" ui-li-has-alt";var L=J.last(),K=F.data("splittheme")||L.data("theme")||I.splitTheme;L.attr("title",L.text()).addClass("ui-li-link-alt").empty().buttonMarkup({shadow:false,corners:false,theme:I.theme,icon:false,iconpos:false}).find(".ui-btn-inner").append(A("<span>").buttonMarkup({shadow:true,corners:true,theme:K,iconpos:"notext",icon:F.data("spliticon")||L.data("icon")||I.splitIcon}))}}else{if(M.data("role")==="list-divider"){N+=" ui-li-divider ui-btn ui-bar-"+H;M.attr("role","heading");if(D){D=1}}else{N+=" ui-li-static ui-btn-up-"+I.theme}}if(O===0){if(I.inset){N+=" ui-corner-top";M.add(M.find(".ui-btn-inner")).find(".ui-li-link-alt").addClass("ui-corner-tr").end().find(".ui-li-thumb").addClass("ui-corner-tl")}}else{if(O===C.length-1){if(I.inset){N+=" ui-corner-bottom";M.add(M.find(".ui-btn-inner")).find(".ui-li-link-alt").addClass("ui-corner-br").end().find(".ui-li-thumb").addClass("ui-corner-bl")}}}if(D&&N.indexOf("ui-li-divider")<0){M.find(".ui-link-inherit").first().addClass("ui-li-jsnumbering").prepend("<span class='ui-li-dec'>"+(D++)+". </span>")}M.addClass(N);if(!G){E._itemApply(F,M)}})},_createSubPages:function(){var D=this.element,C=D.closest(".ui-page"),G=C.attr("id"),F=this.options,E=C.find("[data-role='footer']").data("id");A(D.find("ul, ol").toArray().reverse()).each(function(H){var L=A(this),J=L.parent(),N=J.contents()[0].nodeValue.split("\n")[0],O=G+"&"+A.mobile.subPageUrlKey+"="+A.mobile.idStringEscape(N+" "+H),M=L.data("theme")||F.theme,K=L.data("counttheme")||D.data("counttheme")||F.countTheme,I=L.wrap("<div data-role='page'><div data-role='content'></div></div>").parent().before("<div data-role='header' data-theme='"+F.headerTheme+"'><div class='ui-title'>"+N+"</div></div>").after(E?A("<div>",{"data-role":"footer","data-id":E,"class":"ui-footer-duplicate"}):"").parent().attr({id:O,"data-theme":M,"data-count-theme":K}).appendTo(A.pageContainer);I.page();J.html("<a href='#"+O+"'>"+N+"</a>")}).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 D=this,E=D.element,C=A.mobile.activePage,F=A('<a href="#" data-icon="delete" data-iconpos="notext">Close</a>');E.delegate("a, submit","click submit",function(G){if(G.type=="click"&&(A(G.target).closest("[data-back]")||A(G.target).closest(F))){D.close();return false}A.mobile.activePage=this.element});this.element.bind("pageshow",function(){return false}).attr("role","dialog").addClass("ui-page ui-dialog ui-body-a").find("[data-role=header]").addClass("ui-corner-top ui-overlay-shadow").prepend(F).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");A(window).bind("hashchange",function(){if(E.is(".ui-page-active")){D.close();E.bind("pagehide",function(){A.mobile.updateHash(C.attr("id"),true)})}})},close:function(){A.mobile.changePage([this.element,A.mobile.activePage],B,true,true)}})})(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")})}})})(jQuery);(function(A,B){A.fn.grid=function(C){return A(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);
/*
 * 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,J,F){E.extend(E.mobile,{subPageUrlKey:"ui-page",nonHistorySelectors:"dialog",activePageClass:"ui-page-active",activeBtnClass:"ui-btn-active",ajaxLinksEnabled:true,ajaxFormsEnabled:true,transitions:["slide","slideup","slidedown","pop","flip","fade"],defaultTransition:"slide",loadingMessage:"loading",metaViewportContent:"width=device-width, minimum-scale=1, maximum-scale=1",gradeA:function(){return E.support.mediaquery}});E(J.document).trigger("mobileinit");if(!E.mobile.gradeA()){return }var S=E(J),V=E("html"),P=E("head"),U,T=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>"):F,R=E.mobile.metaViewportContent?E("<meta>",{name:"viewport",content:E.mobile.metaViewportContent}).prependTo(P):F,B=H(location.protocol+"//"+location.host+location.pathname),O=E.support.dynamicBaseTag?E("<base>",{href:B}).prependTo(P):F,G,b,f=null,K=[{url:location.hash.replace(/^#/,""),transition:F}],X="[tabindex],a,button:visible,select:visible,input",C=null,M=true,Z=[320,480,768,1024];if(typeof E("base").attr("href")!=="undefined"){B=E("base").attr("href")}V.addClass("ui-mobile ui-mobile-rendering");E.mobile.urlStack=K;function A(g){return g.replace(/[^a-zA-Z0-9]/g,"-")}E.mobile.idStringEscape=A;function D(g){E.event.special.scrollstart.enabled=false;setTimeout(function(){J.scrollTo(0,g||0)},20);setTimeout(function(){E.event.special.scrollstart.enabled=true},150)}function H(h){var g=h.replace(/#/,"").split("/");g.pop();return g.join("/")+(g.length?"/":"")}function Q(g){if(typeof E("base").attr("href")!=="undefined"){return""}return H(g||location.hash)}var d=!E.support.dynamicBaseTag?E.noop:function(g){O.attr("href",B+Q(g))};var e=!E.support.dynamicBaseTag?E.noop:function(){O.attr("href",B)};e();E("form").live("submit",function(i){if(!E.mobile.ajaxFormsEnabled){return }var h=E(this).attr("method"),g=E(this).attr("action").replace(location.protocol+"//"+location.host,"");if(/^(:?\w+:)/.test(g)){return }if(g.indexOf("/")&&g.indexOf("#")!==0){g=Q()+g}Y({url:g,type:h,data:E(this).serialize()},F,F,true);i.preventDefault()});E("a").live("click",function(i){var l=E(this),h=l.attr("href").replace(location.protocol+"//"+location.host,""),k=l.is("[target]"),n=k||/^(:?\w+:)/.test(h)||l.is("[rel=external]"),k=l.is("[target]");if(h==="#"){return false}f=l.closest(".ui-btn").addClass(E.mobile.activeBtnClass);if(n||!E.mobile.ajaxLinksEnabled){a(true);if(k){J.open(h)}else{location.href=h}}else{var m=l.data("transition"),g=l.data("back"),j=!l.is("[data-rel="+E.mobile.nonHistorySelectors+"]");C=l.attr("data-rel");if(h.indexOf("/")&&h.indexOf("#")!==0){h=Q()+h}h.replace(/^#/,"");Y(h,m,g,j)}i.preventDefault()});function c(g){if(g){V.removeClass("ui-loading")}else{if(E.mobile.loadingMessage){T.appendTo(b).css({top:E(J).scrollTop()+75})}V.addClass("ui-loading")}}function I(h){var g=h.find(".ui-title:eq(0)");if(g.length){g.focus()}else{h.find(X).eq(0).focus()}}function N(g){if(C){g.attr("data-role",C);C=F}}E.mobile.updateHash=function(g,h){if(h){M=false}location.hash=g};function W(g){var h=["data-role","data-theme","data-fullscreen"],i=g.wrap("<div>").parent();E.each(h,function(j){if(g.attr(h[j])){i.attr(h[j],g.attr(h[j]));g.removeAttr(h[j])}});return i}function a(g){if(!!f&&(!f.closest(".ui-page-active").length||g)){f.removeClass(E.mobile.activeBtnClass)}f=null}function Y(v,r,m,s){var q=E.type(v)==="array",w=q?v[0]:E.mobile.activePage,v=q?v[1]:v,h=fileUrl=E.type(v)==="string"?v.replace(/^#/,""):null,l=F,t="get",i=false,g=null,m=(m!==F)?m:(K.length>1&&K[K.length-2].url===h),r=(r!==F)?r:E.mobile.defaultTransition,u;if(E.type(v)==="object"&&v.url){h=v.url,l=v.data,t=v.type,i=true;if(l&&t=="get"){h+="?"+l;l=F}}if(h!=null&&h.search(/forcenoajax/)==-1){if(h.search(/\?/)==-1){u=true}else{u=false}h+=(u?"?":"&")+"forcenoajax=1"}e();if(m){r=K.pop().transition}else{K.push({url:h,transition:r})}function k(){E(J.document.activeElement).blur();var y=S.scrollTop();w.data("lastScroll",y);w.data("page")._trigger("beforehide",{nextPage:v});v.data("page")._trigger("beforeshow",{prevPage:w});function x(){c(true);if(w.data("page")._trigger("hide",null,{nextPage:v})!==false&&v.data("page")._trigger("show",null,{prevPage:w})!==false){E.mobile.activePage=v}I(v);if(s&&h){E.mobile.updateHash(h,true)}a();if(g!=null){g.remove()}D(v.data("lastScroll"))}if(r&&(r!=="none")){b.addClass("ui-mobile-viewport-transitioning");w.addClass(r+" out "+(m?"reverse":""));v.addClass(E.mobile.activePageClass+" "+r+" in "+(m?"reverse":""));T.css({top:75});v.animationComplete(function(){w.add(v).removeClass(" out in reverse "+E.mobile.transitions.join(" "));w.removeClass(E.mobile.activePageClass);x();b.removeClass("ui-mobile-viewport-transitioning")})}else{w.removeClass(E.mobile.activePageClass);v.addClass(E.mobile.activePageClass);x()}}function p(){N(v);v.page()}function j(x){return x.match("&"+E.mobile.subPageUrlKey)?x.split("&"+E.mobile.subPageUrlKey)[0]:x}if(h){v=E("[id='"+h+"']"),fileUrl=j(h)}else{var n=v.attr("id"),o=j(n);if(n!=o){fileUrl=o}}if(v.length&&!i){if(fileUrl){d(fileUrl)}if(w.attr("id")!=v.attr("id")){p();k()}}else{if(v.length){g=v}c();E.ajax({url:fileUrl,type:t,data:l,success:function(x){d(fileUrl);var y=E("<div></div>");y.get(0).innerHTML=x;v=y.find('[data-role="page"]');if(!E.support.dynamicBaseTag){var z=Q(fileUrl);v.find("[src],link[href]").each(function(){var AB=E(this).is("[href]")?"href":"src",AA=E(this).attr(AB);AA.replace(location.protocol+"//"+location.host+location.pathname,"");if(!/^(\w+:|#|\/)/.test(AA)){E(this).attr(AB,z+AA)}})}if(v.attr("id")){v=W(v)}v.attr("id",fileUrl).appendTo(b);p();k()},error:function(){c(true);a(true);E("<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:E(J).scrollTop()+100}).appendTo(b).delay(800).fadeOut(400,function(){E(this).remove()})}})}}E(function(){U=E("body");c();S.bind("hashchange",function(h,g){if(!M){M=true;return }if(E(".ui-page-active").is("[data-role="+E.mobile.nonHistorySelectors+"]")){return }var j=location.hash,i=g?false:F;if(j){Y(j,i)}else{if(E.mobile.activePage.length&&G[0]!==E.mobile.activePage[0]&&!g){Y(G,i,true)}else{G.trigger("pagebeforeshow",{prevPage:E("")});G.addClass(E.mobile.activePageClass);c(true);if(G.trigger("pageshow",{prevPage:E("")})!==false){I(G)}}}})});S.bind("orientationchange.htmlclass",function(g){V.removeClass("portrait landscape").addClass(g.orientation)});function L(){var g=S.width(),k="min-width-",i="max-width-",m=[],j=[],l="px",h;V.removeClass(k+Z.join(l+" "+k)+l+" "+i+Z.join(l+" "+i)+l);E.each(Z,function(n){if(g>=Z[n]){m.push(k+Z[n]+l)}if(g<=Z[n]){j.push(i+Z[n]+l)}});if(m.length){h=m.join(" ")}if(j.length){h+=" "+j.join(" ")}V.addClass(h)}S.bind("orientationchange resize",L);L();E.mobile.addResolutionBreakpoints=function(g){if(E.type(g)==="array"){Z=Z.concat(g)}else{Z.push(g)}L()};E.fn.animationComplete=function(g){if(E.support.cssTransitions){return E(this).one("webkitAnimationEnd",g)}else{g()}};E.extend(E.mobile,{pageLoading:c,changePage:Y,silentScroll:D});E(function(){var g=E("[data-role='page']");G=E.mobile.activePage=g.first();b=G.parent().addClass("ui-mobile-viewport");E.extend({pageContainer:b});g.page();S.trigger("hashchange",[true]);S.trigger("orientationchange.htmlclass");V.removeClass("ui-mobile-rendering")});S.load(D)})(jQuery,this);