/*!
 * jQuery Mobile v1.0rc2
 * 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 k=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,j;e;){j=b.event.props[--e];g[j]=g.originalEvent[j]}}this.element.trigger(g,h);return !(b.isFunction(k)&&k.call(this.element[0],g,h)===false||g.isDefaultPrevented())}}})(jQuery);(function(a,b){a.widget("mobile.widget",{_createWidget:function(){a.Widget.prototype._createWidget.apply(this,arguments);this._trigger("init")},_getCreateOptions:function(){var d=this.element,c={};a.each(this.options,function(e){var f=d.jqmData(e.replace(/[A-Z]/g,function(g){return"-"+g.toLowerCase()}));if(f!==b){c[e]=f}});return c},enhanceWithin:function(e){var d=a(e).data("page"),c=d&&d.keepNativeSelector();a(this.options.initSelector,e).not(c||"")[this.widgetName]()}})})(jQuery);(function(b,d){var c=b(window),a=b("html");b.mobile.media=(function(){var e={},f=b("<div id='jquery-mediatest'>"),g=b("<body>").append(f);return function(j){if(!(j in e)){var h=document.createElement("style"),i="@media "+j+" { #jquery-mediatest { position:absolute; } }";h.type="text/css";if(h.styleSheet){h.styleSheet.cssText=i}else{h.appendChild(document.createTextNode(i))}a.prepend(g).prepend(h);e[j]=f.css("position")==="absolute";g.add(h).remove()}return e[j]}})()})(jQuery);(function(e,c){var d=e("<body>").prependTo("html"),h=d[0].style,i=["Webkit","Moz","O"],j="palmGetResource" in window,g=window.blackberry;function b(n){var m=n.charAt(0).toUpperCase()+n.substr(1),l=(n+" "+i.join(m+" ")+m).split(" ");for(var k in l){if(h[l[k]]!==c){return true}}}function a(){var o=location.protocol+"//"+location.host+location.pathname+"ui-dir/",n=e("head base"),p=null,k="",m,l;if(!n.length){n=p=e("<base>",{href:o}).appendTo("head")}else{k=n.attr("href")}m=e("<a href='testurl' />").prependTo(d);l=m[0].href;n[0].href=k||location.pathname;if(p){p.remove()}return l.indexOf(o)===0}e.mobile.browser={};e.mobile.browser.ie=(function(){var l=3,m=document.createElement("div"),k=m.all||[];while(m.innerHTML="<!--[if gt IE "+(++l)+"]><br><![endif]-->",k[0]){}return l>4?l:!l})();e.extend(e.support,{orientation:"orientation" in window&&"onorientationchange" in window,touch:"ontouchend" in document,cssTransitions:"WebKitTransitionEvent" in window,pushState:"pushState" in history&&"replaceState" in history,mediaquery:e.mobile.media("only all"),cssPseudoElement:!!b("content"),touchOverflow:!!b("overflowScrolling"),boxShadow:!!b("boxShadow")&&!g,scrollTop:("pageXOffset" in window||"scrollTop" in document.documentElement||"scrollTop" in d[0])&&!j,dynamicBaseTag:a()});d.remove();var f=(function(){var k=window.navigator.userAgent;return k.indexOf("Nokia")>-1&&(k.indexOf("Symbian/3")>-1||k.indexOf("Series60/5")>-1)&&k.indexOf("AppleWebKit")>-1&&k.match(/(BrowserNG|NokiaBrowser)\/7\.[0-3]/)})();e.mobile.ajaxBlacklist=window.blackberry&&!window.WebKitPoint||window.operamini&&Object.prototype.toString.call(window.operamini)==="[object OperaMini]"||f;if(f){e(function(){e("head link[rel='stylesheet']").attr("rel","alternate stylesheet").attr("rel","stylesheet")})}if(!e.support.boxShadow){e("html").addClass("ui-mobile-nosupport-boxshadow")}})(jQuery);(function(w,D,d,l){var C="virtualMouseBindings",b="virtualTouchID",a="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),v="clientX clientY pageX pageY screenX screenY".split(" "),y={},E=0,r=0,q=0,o=false,H=[],f=false,O=false,t="addEventListener" in d,s=w(d),B=1,K=0;w.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};function p(i){while(i&&typeof i.originalEvent!=="undefined"){i=i.originalEvent}return i}function g(Q,R){var Y=Q.type,Z,X,S,P,W,V,U,T;Q=w.Event(Q);Q.type=R;Z=Q.originalEvent;X=w.event.props;if(Z){for(U=X.length,P;U;){P=X[--U];Q[P]=Z[P]}}if(Y.search(/mouse(down|up)|click/)>-1&&!Q.which){Q.which=1}if(Y.search(/^touch/)!==-1){S=p(Z);Y=S.touches;W=S.changedTouches;V=(Y&&Y.length)?Y[0]:((W&&W.length)?W[0]:l);if(V){for(T=0,len=v.length;T<len;T++){P=v[T];Q[P]=V[P]}}}return Q}function M(R){var P={},i,Q;while(R){i=w.data(R,C);for(Q in i){if(i[Q]){P[Q]=P.hasVirtualBinding=true}}R=R.parentNode}return P}function z(Q,P){var i;while(Q){i=w.data(Q,C);if(i&&(!P||i[P])){return Q}Q=Q.parentNode}return null}function F(){O=false}function j(){O=true}function N(){K=0;H.length=0;f=false;j()}function n(){F()}function u(){x();E=setTimeout(function(){E=0;N()},w.vmouse.resetTimerDuration)}function x(){if(E){clearTimeout(E);E=0}}function m(Q,R,i){var P;if((i&&i[Q])||(!i&&z(R.target,Q))){P=g(R,Q);w(R.target).trigger(P)}return P}function h(P){var Q=w.data(P.target,b);if(!f&&(!K||K!==Q)){var i=m("v"+P.type,P);if(i){if(i.isDefaultPrevented()){P.preventDefault()}if(i.isPropagationStopped()){P.stopPropagation()}if(i.isImmediatePropagationStopped()){P.stopImmediatePropagation()}}}}function L(Q){var S=p(Q).touches,R,i;if(S&&S.length===1){R=Q.target;i=M(R);if(i.hasVirtualBinding){K=B++;w.data(R,b,K);x();n();o=false;var P=p(Q).touches[0];r=P.pageX;q=P.pageY;m("vmouseover",Q,i);m("vmousedown",Q,i)}}}function G(i){if(O){return}if(!o){m("vmousecancel",i,M(i.target))}o=true;u()}function c(R){if(O){return}var P=p(R).touches[0],i=o,Q=w.vmouse.moveDistanceThreshold;o=o||(Math.abs(P.pageX-r)>Q||Math.abs(P.pageY-q)>Q),flags=M(R.target);if(o&&!i){m("vmousecancel",R,flags)}m("vmousemove",R,flags);u()}function e(R){if(O){return}j();var i=M(R.target),Q;m("vmouseup",R,i);if(!o){var P=m("vclick",R,i);if(P&&P.isDefaultPrevented()){Q=p(R).changedTouches[0];H.push({touchID:K,x:Q.clientX,y:Q.clientY});f=true}}m("vmouseout",R,i);o=false;u()}function A(P){var Q=w.data(P,C),i;if(Q){for(i in Q){if(Q[i]){return true}}}return false}function J(){}function k(i){var P=i.substr(1);return{setup:function(R,Q){if(!A(this)){w.data(this,C,{})}var S=w.data(this,C);S[i]=true;y[i]=(y[i]||0)+1;if(y[i]===1){s.bind(P,h)}w(this).bind(P,J);if(t){y.touchstart=(y.touchstart||0)+1;if(y.touchstart===1){s.bind("touchstart",L).bind("touchend",e).bind("touchmove",c).bind("scroll",G)}}},teardown:function(R,Q){--y[i];if(!y[i]){s.unbind(P,h)}if(t){--y.touchstart;if(!y.touchstart){s.unbind("touchstart",L).unbind("touchmove",c).unbind("touchend",e).unbind("scroll",G)}}var S=w(this),T=w.data(this,C);if(T){T[i]=false}S.unbind(P,J);if(!A(this)){S.removeData(C)}}}}for(var I=0;I<a.length;I++){w.event.special[a[I]]=k(a[I])}if(t){d.addEventListener("click",function(T){var Q=H.length,U=T.target,W,V,X,S,P,R;if(Q){W=T.clientX;V=T.clientY;threshold=w.vmouse.clickDistanceThreshold;X=U;while(X){for(S=0;S<Q;S++){P=H[S];R=0;if((X===U&&Math.abs(P.x-W)<threshold&&Math.abs(P.y-V)<threshold)||w.data(X,b)===P.touchID){T.preventDefault();T.stopPropagation();return}}X=X.parentNode}}},true)}})(jQuery,window,document);(function(c,h,a){c.each(("touchstart touchmove touchend orientationchange throttledresize tap taphold swipe swipeleft swiperight scrollstart scrollstop").split(" "),function(k,j){c.fn[j]=function(l){return l?this.bind(j,l):this.trigger(j)};c.attrFn[j]=true});var d=c.support.touch,e="touchmove scroll",i=d?"touchstart":"mousedown",g=d?"touchend":"mouseup",b=d?"touchmove":"mousemove";function f(m,j,l){var k=l.type;l.type=j;c.event.handle.call(m,l);l.type=k}c.event.special.scrollstart={enabled:true,setup:function(){var j=this,m=c(j),l,n;function k(o,p){l=p;f(j,l?"scrollstart":"scrollstop",o)}m.bind(e,function(o){if(!c.event.special.scrollstart.enabled){return}if(!l){k(o,true)}clearTimeout(n);n=setTimeout(function(){k(o,false)},50)})}};c.event.special.tap={setup:function(){var j=this,k=c(j);k.bind("vmousedown",function(o){if(o.which&&o.which!==1){return false}var n=o.target,l=o.originalEvent,r;function m(){clearTimeout(r)}function q(){m();k.unbind("vclick",p).unbind("vmouseup",m).unbind("vmousecancel",q)}function p(s){q();if(n==s.target){f(j,"tap",s)}}k.bind("vmousecancel",q).bind("vmouseup",m).bind("vclick",p);r=setTimeout(function(){f(j,"taphold",c.Event("taphold"))},750)})}};c.event.special.swipe={scrollSupressionThreshold:10,durationThreshold:1000,horizontalDistanceThreshold:30,verticalDistanceThreshold:75,setup:function(){var j=this,k=c(j);k.bind(i,function(m){var o=m.originalEvent.touches?m.originalEvent.touches[0]:m,p={time:(new Date()).getTime(),coords:[o.pageX,o.pageY],origin:c(m.target)},l;function n(q){if(!p){return}var r=q.originalEvent.touches?q.originalEvent.touches[0]:q;l={time:(new Date()).getTime(),coords:[r.pageX,r.pageY]};if(Math.abs(p.coords[0]-l.coords[0])>c.event.special.swipe.scrollSupressionThreshold){q.preventDefault()}}k.bind(b,n).one(g,function(q){k.unbind(b,n);if(p&&l){if(l.time-p.time<c.event.special.swipe.durationThreshold&&Math.abs(p.coords[0]-l.coords[0])>c.event.special.swipe.horizontalDistanceThreshold&&Math.abs(p.coords[1]-l.coords[1])<c.event.special.swipe.verticalDistanceThreshold){p.origin.trigger("swipe").trigger(p.coords[0]>l.coords[0]?"swipeleft":"swiperight")}}p=l=a})})}};(function(o,m){var p=o(m),j,n,l;o.event.special.orientationchange=j={setup:function(){if(o.support.orientation&&o.mobile.orientationChangeEnabled){return false}l=n();p.bind("throttledresize",k)},teardown:function(){if(o.support.orientation&&o.mobile.orientationChangeEnabled){return false}p.unbind("throttledresize",k)},add:function(q){var r=q.handler;q.handler=function(s){s.orientation=n();return r.apply(this,arguments)}}};function k(){var q=n();if(q!==l){l=q;p.trigger("orientationchange")}}o.event.special.orientationchange.orientation=n=function(){var r=true,q=document.documentElement;if(o.support.orientation){r=m.orientation%180==0}else{r=q&&q.clientWidth/q.clientHeight<1.1}return r?"portrait":"landscape"}})(jQuery,h);(function(){c.event.special.throttledresize={setup:function(){c(this).bind("resize",l)},teardown:function(){c(this).unbind("resize",l)}};var m=250,l=function(){o=(new Date()).getTime();n=o-k;if(n>=m){k=o;c(this).trigger("throttledresize")}else{if(j){clearTimeout(j)}j=setTimeout(l,m-n)}},k=0,j,o,n})();c.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe",swiperight:"swipe"},function(k,j){c.event.special[k]={setup:function(){c(this).bind(j,c.noop)}}})})(jQuery,this);(function(c,b,d){c.extend(c.mobile,{ns:"",subPageUrlKey:"ui-page",activePageClass:"ui-page-active",activeBtnClass:"ui-btn-active",ajaxEnabled:true,hashListeningEnabled:true,linkBindingEnabled:true,defaultPageTransition:"slide",minScrollBack:250,defaultDialogTransition:"pop",loadingMessage:"loading",pageLoadErrorMessage:"Error Loading Page",autoInitializePage:true,pushStateEnabled:true,orientationChangeEnabled:true,gradeA:function(){return c.support.mediaquery||c.mobile.browser.ie&&c.mobile.browser.ie>=7},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91},silentScroll:function(e){if(c.type(e)!=="number"){e=c.mobile.defaultHomeScroll}c.event.special.scrollstart.enabled=false;setTimeout(function(){b.scrollTo(0,e);c(document).trigger("silentscroll",{x:0,y:e})},20);setTimeout(function(){c.event.special.scrollstart.enabled=true},150)},nsNormalize:function(e){if(!e){return}return c.camelCase(c.mobile.ns+e)},getInheritedTheme:function(j,g){var k=j[0],h="",i=/ui-(bar|body)-([a-z])\b/,l,f;while(k){var l=k.className||"";if((f=i.exec(l))&&(h=f[2])){break}k=k.parentNode}return h||g||"a"}});c.fn.jqmData=function(g,f){var e;if(typeof g!="undefined"){e=this.data(g?c.mobile.nsNormalize(g):g,f)}return e};c.jqmData=function(f,h,g){var e;if(typeof h!="undefined"){e=c.data(f,h?c.mobile.nsNormalize(h):h,g)}return e};c.fn.jqmRemoveData=function(e){return this.removeData(c.mobile.nsNormalize(e))};c.jqmRemoveData=function(e,f){return c.removeData(e,c.mobile.nsNormalize(f))};c.fn.removeWithDependents=function(){c.removeWithDependents(this)};c.removeWithDependents=function(f){var e=c(f);(e.jqmData("dependents")||c()).remove();e.remove()};c.fn.addDependents=function(e){c.addDependents(c(this),e)};c.addDependents=function(e,f){var g=c(e).jqmData("dependents")||c();c(e).jqmData("dependents",c.merge(g,f))};c.fn.getEncodedText=function(){return c("<div/>").text(c(this).text()).html()};var a=c.find;c.find=function(f,h,g,e){f=f.replace(/:jqmData\(([^)]*)\)/g,"[data-"+(c.mobile.ns||"")+"$1]");return a.call(this,f,h,g,e)};c.extend(c.find,a);c.find.matches=function(e,f){return c.find(e,null,null,f)};c.find.matchesSelector=function(e,f){return c.find(f,null,null,[e]).length>0}})(jQuery,this);
/*!
 * 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(f,e,h){var b=f("html"),a=f("head"),g=f(e);f(e.document).trigger("mobileinit");if(!f.mobile.gradeA()){return}if(f.mobile.ajaxBlacklist){f.mobile.ajaxEnabled=false}b.addClass("ui-mobile ui-mobile-rendering");var c=f("<div class='ui-loader ui-body-a ui-corner-all'><span class='ui-icon ui-icon-loading spin'></span><h1></h1></div>");f.extend(f.mobile,{showPageLoadingMsg:function(){if(f.mobile.loadingMessage){var i=f("."+f.mobile.activeBtnClass).first();c.find("h1").text(f.mobile.loadingMessage).end().appendTo(f.mobile.pageContainer).css({top:f.support.scrollTop&&g.scrollTop()+g.height()/2||i.length&&i.offset().top||100})}b.addClass("ui-loading")},hidePageLoadingMsg:function(){b.removeClass("ui-loading")},initializePage:function(){var i=f(":jqmData(role='page')");if(!i.length){i=f("body").wrapInner("<div data-"+f.mobile.ns+"role='page'></div>").children(0)}i.add(":jqmData(role='dialog')").each(function(){var j=f(this);if(!j.jqmData("url")){j.attr("data-"+f.mobile.ns+"url",j.attr("id")||location.pathname+location.search)}});f.mobile.firstPage=i.first();f.mobile.pageContainer=i.first().parent().addClass("ui-mobile-viewport");g.trigger("pagecontainercreate");f.mobile.showPageLoadingMsg();if(!f.mobile.hashListeningEnabled||!f.mobile.path.stripHash(location.hash)){f.mobile.changePage(f.mobile.firstPage,{transition:"none",reverse:true,changeHash:false,fromHashChange:true})}else{g.trigger("hashchange",[true])}}});function d(){var i="user-scalable=no",j=f("meta[name='viewport']");if(j.length){j.attr("content",j.attr("content")+", "+i)}else{f("head").prepend("<meta>",{name:"viewport",content:i})}}if(f.support.touchOverflow&&f.mobile.touchOverflowEnabled&&!f.mobile.touchOverflowZoomEnabled){d()}f.mobile._registerInternalEvents();f(function(){e.scrollTo(0,1);f.mobile.defaultHomeScroll=(!f.support.scrollTop||f(e).scrollTop()===1)?0:1;if(f.mobile.autoInitializePage){f.mobile.initializePage()}g.load(f.mobile.silentScroll)})})(jQuery,this);
