/*! * jQuery Mobile v1.0a4.1 * http://jquerymobile.com/ * * Copyright 2010, jQuery Project * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license */ (function(a,c){if(a.cleanData){var d=a.cleanData;a.cleanData=function(b){for(var f=0,h;(h=b[f])!=null;f++)a(h).triggerHandler("remove");d(b)}}else{var e=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 e.call(a(this),b,f)})}}a.widget=function(b,f,h){var i=b.split(".")[0],g;b=b.split(".")[1];g=i+"-"+b;if(!h){h=f;f=a.Widget}a.expr[":"][g]=function(j){return!!a.data(j, b)};a[i]=a[i]||{};a[i][b]=function(j,m){arguments.length&&this._createWidget(j,m)};f=new f;f.options=a.extend(true,{},f.options);a[i][b].prototype=a.extend(true,f,{namespace:i,widgetName:b,widgetEventPrefix:a[i][b].prototype.widgetEventPrefix||b,widgetBaseClass:g},h);a.widget.bridge(b,a[i][b])};a.widget.bridge=function(b,f){a.fn[b]=function(h){var i=typeof h==="string",g=Array.prototype.slice.call(arguments,1),j=this;h=!i&&g.length?a.extend.apply(null,[true,h].concat(g)):h;if(i&&h.charAt(0)==="_")return j; i?this.each(function(){var m=a.data(this,b);if(!m)throw"cannot call methods on "+b+" prior to initialization; attempted to call method '"+h+"'";if(!a.isFunction(m[h]))throw"no such method '"+h+"' for "+b+" widget instance";var p=m[h].apply(m,g);if(p!==m&&p!==c){j=p;return false}}):this.each(function(){var m=a.data(this,b);m?m.option(h||{})._init():a.data(this,b,new f(h,this))});return j}};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 h=this;this.element.bind("remove."+this.widgetName,function(){h.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 h=b;if(arguments.length===0)return a.extend({},this.options);if(typeof b==="string"){if(f===c)return this.options[b];h={};h[b]=f}this._setOptions(h);return this},_setOptions:function(b){var f=this;a.each(b,function(h,i){f._setOption(h,i)});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,h){var i=this.options[b];f=a.Event(f);f.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();h=h||{};if(f.originalEvent){b=a.event.props.length;for(var g;b;){g=a.event.props[--b];f[g]=f.originalEvent[g]}}this.element.trigger(f, h);return!(a.isFunction(i)&&i.call(this.element[0],f,h)===false||f.isDefaultPrevented())}}})(jQuery);(function(a,c){a.widget("mobile.widget",{_getCreateOptions:function(){var d=this.element,e={};a.each(this.options,function(b){var f=d.jqmData(b.replace(/[A-Z]/g,function(h){return"-"+h.toLowerCase()}));if(f!==c)e[b]=f});return e}})})(jQuery); (function(a){function c(){var f=d.width(),h=[],i=[],g;e.removeClass("min-width-"+b.join("px min-width-")+"px max-width-"+b.join("px max-width-")+"px");a.each(b,function(j,m){f>=m&&h.push("min-width-"+m+"px");f<=m&&i.push("max-width-"+m+"px")});if(h.length)g=h.join(" ");if(i.length)g+=" "+i.join(" ");e.addClass(g)}var d=a(window),e=a("html"),b=[320,480,768,1024];a.mobile.media=function(){var f={},h=a("