/*!
* jQuery Mobile
* http://jquerymobile.com/
*
* Copyright 2010, jQuery Project
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*/
(function(a,e){if(a.cleanData){var d=a.cleanData;a.cleanData=function(b){for(var f=0,g;(g=b[f])!=null;f++)a(g).triggerHandler("remove");d(b)}}else{var c=a.fn.remove;a.fn.remove=function(b,f){return this.each(function(){if(!f)if(!b||a.filter(b,[this]).length)a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")});return c.call(a(this),b,f)})}}a.widget=function(b,f,g){var h=b.split(".")[0],m;b=b.split(".")[1];m=h+"-"+b;if(!g){g=f;f=a.Widget}a.expr[":"][m]=function(i){return!!a.data(i,
b)};a[h]=a[h]||{};a[h][b]=function(i,j){arguments.length&&this._createWidget(i,j)};f=new f;f.options=a.extend(true,{},f.options);a[h][b].prototype=a.extend(true,f,{namespace:h,widgetName:b,widgetEventPrefix:a[h][b].prototype.widgetEventPrefix||b,widgetBaseClass:m},g);a.widget.bridge(b,a[h][b])};a.widget.bridge=function(b,f){a.fn[b]=function(g){var h=typeof g==="string",m=Array.prototype.slice.call(arguments,1),i=this;g=!h&&m.length?a.extend.apply(null,[true,g].concat(m)):g;if(h&&g.charAt(0)==="_")return i;
h?this.each(function(){var j=a.data(this,b);if(!j)throw"cannot call methods on "+b+" prior to initialization; attempted to call method '"+g+"'";if(!a.isFunction(j[g]))throw"no such method '"+g+"' for "+b+" widget instance";var l=j[g].apply(j,m);if(l!==j&&l!==e){i=l;return false}}):this.each(function(){var j=a.data(this,b);j?j.option(g||{})._init():a.data(this,b,new f(g,this))});return i}};a.Widget=function(b,f){arguments.length&&this._createWidget(b,f)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",
options:{disabled:false},_createWidget:function(b,f){a.data(f,this.widgetName,this);this.element=a(f);this.options=a.extend(true,{},this.options,this._getCreateOptions(),b);var g=this;this.element.bind("remove."+this.widgetName,function(){g.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){var b={};if(a.metadata)b=a.metadata.get(element)[this.widgetName];return b},_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(b,f){var g=b;if(arguments.length===0)return a.extend({},this.options);if(typeof b==="string"){if(f===e)return this.options[b];g={};g[b]=f}this._setOptions(g);return this},_setOptions:function(b){var f=this;a.each(b,function(g,h){f._setOption(g,h)});return this},_setOption:function(b,f){this.options[b]=f;if(b===
"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(b,f,g){var h=this.options[b];f=a.Event(f);f.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();g=g||{};if(f.originalEvent){b=a.event.props.length;for(var m;b;){m=a.event.props[--b];f[m]=f.originalEvent[m]}}this.element.trigger(f,
g);return!(a.isFunction(h)&&h.call(this.element[0],f,g)===false||f.isDefaultPrevented())}}})(jQuery);(function(a){a.widget("mobile.widget",{_getCreateOptions:function(){var e=this.element,d={};a.each(this.options,function(c){var b=e.data(c.replace(/[A-Z]/g,function(f){return"-"+f.toLowerCase()}));if(b!==undefined)d[c]=b});return d}})})(jQuery);
$.media=function(){var a={},e=$("html"),d=$("
"),c=$("").append(d);return function(b){if(!(b in a)){var f=$("");e.prepend(c).prepend(f);a[b]=d.css("position")==="absolute";c.add(f).remove()}return a[b]}}();var fakeBody=$("").prependTo("html"),fbCSS=fakeBody[0].style,vendors=["webkit","moz","o"],webos=window.palmGetResource||window.PalmServiceBridge,bb=window.blackberry;
function propExists(a){var e=a.charAt(0).toUpperCase()+a.substr(1);a=(a+" "+vendors.join(e+" ")+e).split(" ");for(var d in a)if(fbCSS[d]!==undefined)return true}
$.extend($.support,{orientation:"orientation"in window,touch:"ontouchend"in document,WebKitAnimationEvent:typeof WebKitTransitionEvent==="object",pushState:!!history.pushState,mediaquery:$.media("only all"),cssPseudoElement:!!propExists("content"),boxShadow:!!propExists("boxShadow")&&!bb,scrollTop:("pageXOffset"in window||"scrollTop"in document.documentElement||"scrollTop"in fakeBody[0])&&!webos});fakeBody.remove();$.support.boxShadow||$("html").addClass("ui-mobile-nosupport-boxshadow");
$.each("touchstart touchmove touchend orientationchange tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(a,e){$.fn[e]=function(d){return d?this.bind(e,d):this.trigger(e)};$.attrFn[e]=true});var supportTouch=$.support.touch,scrollEvent="touchmove scroll",touchStartEvent=supportTouch?"touchstart":"mousedown",touchStopEvent=supportTouch?"touchend":"mouseup",touchMoveEvent=supportTouch?"touchmove":"mousemove";
$.event.special.scrollstart={enabled:true,setup:function(){function a(b,f){d=f;var g=b.type;b.type=d?"scrollstart":"scrollstop";$.event.handle.call(e,b);b.type=g}var e=this,d,c;$(e).bind(scrollEvent,function(b){if($.event.special.scrollstart.enabled){d||a(b,true);clearTimeout(c);c=setTimeout(function(){a(b,false)},50)}})}};
$.event.special.tap={setup:function(){var a=this,e=$(a);e.bind(touchStartEvent,function(d){function c(){b=true}if(!(d.which&&d.which!==1)){var b=false,f=true,g,h;h=setTimeout(function(){if(f&&!b){g=d.type;d.type="taphold";$.event.handle.call(a,d);d.type=g}},750);e.one(touchMoveEvent,c).one(touchStopEvent,function(m){e.unbind(touchMoveEvent,c);clearTimeout(h);f=false;if(!b){g=m.type;m.type="tap";$.event.handle.call(a,m);m.type=g}})}})}};
$.event.special.swipe={setup:function(){var a=$(this);a.bind(touchStartEvent,function(e){function d(g){if(b){var h=g.originalEvent.touches?g.originalEvent.touches[0]:g;f={time:(new Date).getTime(),coords:[h.pageX,h.pageY]};Math.abs(b.coords[0]-f.coords[0])>10&&g.preventDefault()}}var c=e.originalEvent.touches?e.originalEvent.touches[0]:e,b={time:(new Date).getTime(),coords:[c.pageX,c.pageY],origin:$(e.target)},f;a.bind(touchMoveEvent,d).one(touchStopEvent,function(){a.unbind(touchMoveEvent,d);if(b&&
f)if(f.time-b.time<1E3&&Math.abs(b.coords[0]-f.coords[0])>30&&Math.abs(b.coords[1]-f.coords[1])<20)b.origin.trigger("swipe").trigger(b.coords[0]>f.coords[0]?"swipeleft":"swiperight");b=f=undefined})})}};
$.event.special.orientationchange={orientation:function(a){return document.body&&a.width()/a.height()<1.1?"portrait":"landscape"},setup:function(){function a(){var b=$.event.special.orientationchange.orientation(d);if(c!==b){$.event.handle.call(e,"orientationchange",{orientation:b});c=b}}var e=this,d=$(e),c=$.event.special.orientationchange.orientation(d);$.support.orientation?e.addEventListener("orientationchange",a,false):d.bind("resize",a)}};
$.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe",swiperight:"swipe"},function(a,e){$.event.special[a]={setup:function(){$(this).bind(e,$.noop)}}});
(function(a,e,d){function c(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}var b="hashchange",f=document,g,h=a.event.special,m=f.documentMode,i="on"+b in e&&(m===d||m>7);a.fn[b]=function(j){return j?this.bind(b,j):this.trigger(b)};a.fn[b].delay=50;h[b]=a.extend(h[b],{setup:function(){if(i)return false;a(g.start)},teardown:function(){if(i)return false;a(g.stop)}});g=function(){function j(){var t=c(),n=s(v);if(t!==v){q(v=t,n);a(e).trigger(b)}else if(n!==v)location.href=location.href.replace(/#.*/,
"")+n;p=setTimeout(j,a.fn[b].delay)}var l={},p,v=c(),o=function(t){return t},q=o,s=o;l.start=function(){p||j()};l.stop=function(){p&&clearTimeout(p);p=d};a.browser.msie&&!i&&function(){var t,n;l.start=function(){if(!t){n=(n=a.fn[b].src)&&n+c();t=a('').hide().one("load",function(){n||q(c());j()}).attr("src",n||"javascript:0").insertAfter("body")[0].contentWindow;f.onpropertychange=function(){try{if(event.propertyName==="title")t.document.title=f.title}catch(x){}}}};
l.stop=o;s=function(){return c(t.location.href)};q=function(x,r){var k=t.document,u=a.fn[b].domain;if(x!==r){k.title=f.title;k.open();u&&k.write('