compass-jquery-plugin 0.3.1.beta.2 → 0.3.1.beta.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/jquery/jqgrid.rb CHANGED
@@ -1,5 +1,5 @@
1
- module JqGrid#:nodoc:
2
- end
3
-
4
- require 'jquery/jqgrid/jqgrid'
1
+ module JqGrid#:nodoc:
2
+ end
3
+
4
+ require 'jquery/jqgrid/jqgrid'
5
5
  require 'handle_attributes'
@@ -1,14 +1,14 @@
1
- module ActionController
2
- class Base
3
-
4
- def render_close_dialog(dialog_id)
5
- render :js => close_dialog
6
- end
7
-
8
- private
9
-
10
- def close_dialog(dialog_id)
11
- "jQuery('##{dialog_id}').dialog('close');"
12
- end
13
- end
1
+ module ActionController
2
+ class Base
3
+
4
+ def render_close_dialog(dialog_id)
5
+ render :js => close_dialog
6
+ end
7
+
8
+ private
9
+
10
+ def close_dialog(dialog_id)
11
+ "jQuery('##{dialog_id}').dialog('close');"
12
+ end
13
+ end
14
14
  end
@@ -1,18 +1,18 @@
1
- module ActionController
2
- class Base
3
-
4
- def render_refresh_grid
5
- render :js => refresh_grid("#{params[:controller]}_table")
6
- end
7
-
8
- def render_close_dialog_and_refresh_grid
9
- render :js => close_dialog("#{params["controller"]}_#{params["action"]}_dialog")+refresh_grid("#{params[:controller]}_table")
10
- end
11
-
12
- private
13
-
14
- def refresh_grid(grid_id)
15
- "jQuery('##{grid_id}').trigger('reloadGrid');"
16
- end
17
- end
18
- end
1
+ module ActionController
2
+ class Base
3
+
4
+ def render_refresh_grid
5
+ render :js => refresh_grid("#{params[:controller]}_table")
6
+ end
7
+
8
+ def render_close_dialog_and_refresh_grid
9
+ render :js => close_dialog("#{params["controller"]}_#{params["action"]}_dialog")+refresh_grid("#{params[:controller]}_table")
10
+ end
11
+
12
+ private
13
+
14
+ def refresh_grid(grid_id)
15
+ "jQuery('##{grid_id}').trigger('reloadGrid');"
16
+ end
17
+ end
18
+ end
@@ -1,6 +1,6 @@
1
- module SecretSauce
2
- module Helpers
3
- module UiDialogHelper
4
- end
5
- end
1
+ module SecretSauce
2
+ module Helpers
3
+ module UiDialogHelper
4
+ end
5
+ end
6
6
  end
@@ -1,42 +1,42 @@
1
- module ActiveRecord
2
- class Base
3
- # takes params from request and returns records serialized to json. handles the majority of the functionality
4
- # for searching, sorting, and serializing records to be consumed by jqGrid.
5
- def self.find_for_grid_2(params)
6
- search_options = {:limit => params["rows"]}
7
- search_options[:offset] = (params["page"].to_i * params["rows"].to_i) - params["rows"].to_i
8
- search_options[:order] = "#{params['sidx']} #{params['sord']}" if params["sidx"] != ""
9
- if params["_search"] == "true"
10
- string_search_operations = {
11
- "eq" => "=",
12
- "ne" => "<>",
13
- "bw" => "LIKE",
14
- "bn" => "NOT LIKE",
15
- "ew" => "LIKE",
16
- "en" => "NOT LIKE",
17
- "cn" => "LIKE",
18
- "nc" => "NOT LIKE"
19
- }
20
- integer_search_operations = {
21
- "eq" => "=",
22
- "ne" => "<>",
23
- "lt" => "<",
24
- "le" => "<=",
25
- "gt" => ">",
26
- "ge" => ">="
27
- }
28
- if [:text, :string].include?(self.columns.select {|c| c.name == params["searchField"]}.first.type) && string_search_operations.keys.include?(params["searchOper"])
29
- search_options[:conditions] = "#{params["searchField"]} "
30
- search_options[:conditions] << "#{string_search_operations[params["searchOper"]]}"
31
- search_options[:conditions] << "'#{"%" if ["ew", "en", "cn", "nc"].include?(params["searchOper"])}#{params["searchString"]}#{"%" if ["nc", "cn", "bn", "bw"].include?(params["searchOper"])}'"
32
- elsif [:integer].include?(self.columns.select {|c| c.name == params["searchField"]}.first.type) && integer_search_operations.keys.include?(params["searchOper"])
33
- search_options[:conditions] = "#{params["searchField"]} #{integer_search_operations[params["searchOper"]]} #{params["searchString"]}"
34
- end
35
- end
36
- count = self.count(:all, :conditions => search_options[:conditions]).to_f
37
- # raise count.inspect
38
- array = self.find(:all, search_options).collect {|r| r.attributes }
39
- {:total => (count / params["rows"].to_f).ceil, :page => params["page"], :records => count, :rows => array }.to_json
40
- end
41
- end
1
+ module ActiveRecord
2
+ class Base
3
+ # takes params from request and returns records serialized to json. handles the majority of the functionality
4
+ # for searching, sorting, and serializing records to be consumed by jqGrid.
5
+ def self.find_for_grid_2(params)
6
+ search_options = {:limit => params["rows"]}
7
+ search_options[:offset] = (params["page"].to_i * params["rows"].to_i) - params["rows"].to_i
8
+ search_options[:order] = "#{params['sidx']} #{params['sord']}" if params["sidx"] != ""
9
+ if params["_search"] == "true"
10
+ string_search_operations = {
11
+ "eq" => "=",
12
+ "ne" => "<>",
13
+ "bw" => "LIKE",
14
+ "bn" => "NOT LIKE",
15
+ "ew" => "LIKE",
16
+ "en" => "NOT LIKE",
17
+ "cn" => "LIKE",
18
+ "nc" => "NOT LIKE"
19
+ }
20
+ integer_search_operations = {
21
+ "eq" => "=",
22
+ "ne" => "<>",
23
+ "lt" => "<",
24
+ "le" => "<=",
25
+ "gt" => ">",
26
+ "ge" => ">="
27
+ }
28
+ if [:text, :string].include?(self.columns.select {|c| c.name == params["searchField"]}.first.type) && string_search_operations.keys.include?(params["searchOper"])
29
+ search_options[:conditions] = "#{params["searchField"]} "
30
+ search_options[:conditions] << "#{string_search_operations[params["searchOper"]]}"
31
+ search_options[:conditions] << "'#{"%" if ["ew", "en", "cn", "nc"].include?(params["searchOper"])}#{params["searchString"]}#{"%" if ["nc", "cn", "bn", "bw"].include?(params["searchOper"])}'"
32
+ elsif [:integer].include?(self.columns.select {|c| c.name == params["searchField"]}.first.type) && integer_search_operations.keys.include?(params["searchOper"])
33
+ search_options[:conditions] = "#{params["searchField"]} #{integer_search_operations[params["searchOper"]]} #{params["searchString"]}"
34
+ end
35
+ end
36
+ count = self.count(:all, :conditions => search_options[:conditions]).to_f
37
+ # raise count.inspect
38
+ array = self.find(:all, search_options).collect {|r| r.attributes }
39
+ {:total => (count / params["rows"].to_f).ceil, :page => params["page"], :records => count, :rows => array }.to_json
40
+ end
41
+ end
42
42
  end
@@ -1,9 +1,9 @@
1
- module SecretSauce#:nodoc:
2
- end
3
-
4
- require 'jquery/secret_sauce/controller/ui_dialog_controls'
5
- require 'jquery/secret_sauce/controller/ui_grid_controls'
6
- require 'jquery/secret_sauce/helpers/ui_dialog_helper'
7
- require 'jquery/secret_sauce/helpers/ui_form_helper'
8
- require 'jquery/secret_sauce/helpers/ui_grid_helper'
1
+ module SecretSauce#:nodoc:
2
+ end
3
+
4
+ require 'jquery/secret_sauce/controller/ui_dialog_controls'
5
+ require 'jquery/secret_sauce/controller/ui_grid_controls'
6
+ require 'jquery/secret_sauce/helpers/ui_dialog_helper'
7
+ require 'jquery/secret_sauce/helpers/ui_form_helper'
8
+ require 'jquery/secret_sauce/helpers/ui_grid_helper'
9
9
  require 'jquery/secret_sauce/model/find_for_grid'
@@ -1612,7 +1612,11 @@ DynaTreeNode.prototype = {
1612
1612
  // self.tree.logDebug("appendAjax().success");
1613
1613
  var prevPhase = self.tree.phase;
1614
1614
  self.tree.phase = "init";
1615
-
1615
+ // postProcess is similar to the standard dataFilter hook,
1616
+ // but it is also called for JSONP
1617
+ if( options.postProcess ){
1618
+ data = options.postProcess.call(this, data, this.dataType);
1619
+ }
1616
1620
  if(!$.isArray(data) || data.length !== 0){
1617
1621
  self.addChild(data, null);
1618
1622
  }
@@ -2167,7 +2171,7 @@ DynaTree.prototype = {
2167
2171
  },
2168
2172
 
2169
2173
  serializeArray: function(stopOnParents) {
2170
- // Return a JavaScript array of objects, ready to be encoded as a JSON
2174
+ // Return a JavaScript array of objects, ready to be encoded as a JSON
2171
2175
  // string for selected nodes
2172
2176
  var nodeList = this.getSelectedNodes(stopOnParents),
2173
2177
  name = this.$tree.attr("name") || this.$tree.attr("id"),
@@ -40,21 +40,21 @@ i,a);b.call(c,h,"error")}})}else{b.call(c,h,"loaded");h._loadKeyPath(d.join(c.op
40
40
  1].span).removeClass(d.classNames.lastsib);if(b){var g=f.inArray(b,this.childList);if(g<0)throw"<beforeNode> must be a child of <this>";this.childList.splice(g,0,a)}else this.childList.push(a);g=c.isInitializing();if(d.persist&&e.cookiesFound&&g){if(e.activeKey==a.data.key)c.activeNode=a;if(e.focusedKey==a.data.key)c.focusNode=a;a.bExpanded=f.inArray(a.data.key,e.expandedKeyList)>=0;a.bSelected=f.inArray(a.data.key,e.selectedKeyList)>=0}else{if(a.data.activate){c.activeNode=a;if(d.persist)e.activeKey=
41
41
  a.data.key}if(a.data.focus){c.focusNode=a;if(d.persist)e.focusedKey=a.data.key}a.bExpanded=a.data.expand===true;a.bExpanded&&d.persist&&e.addExpand(a.data.key);a.bSelected=a.data.select===true;a.bSelected&&d.persist&&e.addSelect(a.data.key)}if(d.minExpandLevel>=a.getLevel())this.bExpanded=true;if(a.bSelected&&d.selectMode==3)for(d=this;d;){d.hasSubSel||d._setSubSel(true);d=d.parent}c.bEnableUpdate&&this.render();return a},addChild:function(a,b){if(typeof a=="string")throw"Invalid data type for "+
42
42
  a;else if(!a||a.length===0)return;else if(a instanceof p)return this._addChildNode(a,b);a.length||(a=[a]);for(var c=this.tree.enableUpdate(false),d=null,e=0;e<a.length;e++){var g=a[e],h=this._addChildNode(new p(this,this.tree,g),b);d||(d=h);g.children&&h.addChild(g.children,null)}this.tree.enableUpdate(c);return d},append:function(a){this.tree.logWarning("node.append() is deprecated (use node.addChild() instead).");return this.addChild(a,null)},appendAjax:function(a){this.removeChildren(false,true);
43
- this.setLazyNodeStatus(DTNodeStatus_Loading);if(a.debugLazyDelay){var b=a.debugLazyDelay,c=this;a.debugLazyDelay=0;this.tree.logInfo("appendAjax: waiting for debugLazyDelay "+b);setTimeout(function(){c.appendAjax(a)},b)}else{c=this;var d=a.success,e=a.error,g="nodeLoaded.dynatree."+this.tree.$tree.attr("id")+"."+this.data.key,h=f.extend({},this.tree.options.ajaxDefaults,a,{success:function(i){var j=c.tree.phase;c.tree.phase="init";if(!f.isArray(i)||i.length!==0)c.addChild(i,null);c.tree.phase="postInit";
44
- d&&d.call(h,c);c.tree.logInfo("trigger "+g);c.tree.$tree.trigger(g,[c,true]);c.tree.phase=j;c.setLazyNodeStatus(DTNodeStatus_Ok);if(f.isArray(i)&&i.length===0){c.childList=[];c.render()}},error:function(i,j,l){c.tree.logWarning("appendAjax failed:",j,":\n",i,"\n",l);e&&e.call(h,c,i,j,l);c.tree.$tree.trigger(g,[c,false]);c.setLazyNodeStatus(DTNodeStatus_Error,{info:j,tooltip:""+l})}});f.ajax(h)}},move:function(a,b){if(this!==a){if(!this.parent)throw"Cannot move system root";if(b===undefined||b=="over")b=
45
- "child";var c=this.parent,d=b==="child"?a:a.parent;if(d.isDescendantOf(this))throw"Cannot move a node to it's own descendant";if(this.parent.childList.length==1){this.parent.childList=null;this.parent.bExpanded=false}else{var e=f.inArray(this,this.parent.childList);if(e<0)throw"Internal error";this.parent.childList.splice(e,1)}this.parent.ul.removeChild(this.li);this.parent=d;if(d.hasChildren())switch(b){case "child":d.childList.push(this);break;case "before":e=f.inArray(a,d.childList);if(e<0)throw"Internal error";
46
- d.childList.splice(e,0,this);break;case "after":e=f.inArray(a,d.childList);if(e<0)throw"Internal error";d.childList.splice(e+1,0,this);break;default:throw"Invalid mode "+b;}else{d.childList=[this];if(!d.ul){d.ul=document.createElement("ul");d.ul.style.display="none";d.li.appendChild(d.ul)}}d.ul.appendChild(this.li);if(this.tree!==a.tree){this.visit(function(g){g.tree=a.tree},null,true);throw"Not yet implemented.";}c.isDescendantOf(d)||c.render();d.isDescendantOf(c)||d.render()}},lastentry:undefined};
47
- var n=o.create();n._getTreePersistData=function(a,b){var c=new n(a,b);c.read();return c.toDict()};getDynaTreePersistData=n._getTreePersistData;n.prototype={initialize:function(a,b){this._log("DynaTreeStatus: initialize");if(a===undefined)a=f.ui.dynatree.prototype.options.cookieId;b=f.extend({},f.ui.dynatree.prototype.options.cookie,b);this.cookieId=a;this.cookieOpts=b;this.cookiesFound=undefined;this.selectedKeyList=this.expandedKeyList=this.focusedKey=this.activeKey=null},_log:function(){Array.prototype.unshift.apply(arguments,
48
- ["debug"]);_log.apply(this,arguments)},read:function(){this._log("DynaTreeStatus: read");this.cookiesFound=false;var a=f.cookie(this.cookieId+"-active");this.activeKey=a===null?"":a;if(a!==null)this.cookiesFound=true;a=f.cookie(this.cookieId+"-focus");this.focusedKey=a===null?"":a;if(a!==null)this.cookiesFound=true;a=f.cookie(this.cookieId+"-expand");this.expandedKeyList=a===null?[]:a.split(",");if(a!==null)this.cookiesFound=true;a=f.cookie(this.cookieId+"-select");this.selectedKeyList=a===null?[]:
49
- a.split(",");if(a!==null)this.cookiesFound=true},write:function(){this._log("DynaTreeStatus: write");f.cookie(this.cookieId+"-active",this.activeKey===null?"":this.activeKey,this.cookieOpts);f.cookie(this.cookieId+"-focus",this.focusedKey===null?"":this.focusedKey,this.cookieOpts);f.cookie(this.cookieId+"-expand",this.expandedKeyList===null?"":this.expandedKeyList.join(","),this.cookieOpts);f.cookie(this.cookieId+"-select",this.selectedKeyList===null?"":this.selectedKeyList.join(","),this.cookieOpts)},
50
- addExpand:function(a){this._log("addExpand(%o)",a);if(f.inArray(a,this.expandedKeyList)<0){this.expandedKeyList.push(a);f.cookie(this.cookieId+"-expand",this.expandedKeyList.join(","),this.cookieOpts)}},clearExpand:function(a){this._log("clearExpand(%o)",a);a=f.inArray(a,this.expandedKeyList);if(a>=0){this.expandedKeyList.splice(a,1);f.cookie(this.cookieId+"-expand",this.expandedKeyList.join(","),this.cookieOpts)}},addSelect:function(a){this._log("addSelect(%o)",a);if(f.inArray(a,this.selectedKeyList)<
51
- 0){this.selectedKeyList.push(a);f.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts)}},clearSelect:function(a){this._log("clearSelect(%o)",a);a=f.inArray(a,this.selectedKeyList);if(a>=0){this.selectedKeyList.splice(a,1);f.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts)}},isReloading:function(){return this.cookiesFound===true},toDict:function(){return{cookiesFound:this.cookiesFound,activeKey:this.activeKey,focusedKey:this.activeKey,expandedKeyList:this.expandedKeyList,
52
- selectedKeyList:this.selectedKeyList}},lastentry:undefined};var q=o.create();q.version="$Version:$";q.prototype={initialize:function(a){this.phase="init";this.$widget=a;this.options=a.options;this.$tree=a.element;this.timer=null;this.divTree=this.$tree.get(0);m(this)},_load:function(a){var b=this.options;this.bEnableUpdate=true;this._nodeCount=1;this.focusNode=this.activeNode=null;b.rootVisible!==undefined&&_log("warn","Option 'rootVisible' is no longer supported.");b.title!==undefined&&_log("warn",
53
- "Option 'title' is no longer supported.");if(b.minExpandLevel<1){_log("warn","Option 'minExpandLevel' must be >= 1.");b.minExpandLevel=1}if(b.classNames!==f.ui.dynatree.prototype.options.classNames)b.classNames=f.extend({},f.ui.dynatree.prototype.options.classNames,b.classNames);if(b.ajaxDefaults!==f.ui.dynatree.prototype.options.ajaxDefaults)b.ajaxDefaults=f.extend({},f.ui.dynatree.prototype.options.ajaxDefaults,b.ajaxDefaults);if(b.dnd!==f.ui.dynatree.prototype.options.dnd)b.dnd=f.extend({},f.ui.dynatree.prototype.options.dnd,
54
- b.dnd);b.imagePath||f("script").each(function(){if(this.src.search(/.*dynatree[^\/]*\.js$/i)>=0){b.imagePath=this.src.indexOf("/")>=0?this.src.slice(0,this.src.lastIndexOf("/"))+"/skin/":"skin/";logMsg("Guessing imagePath from '%s': '%s'",this.src,b.imagePath);return false}});this.persistence=new n(b.cookieId,b.cookie);if(b.persist){f.cookie||_log("warn","Please include jquery.cookie.js to use persistence.");this.persistence.read()}this.logDebug("DynaTree.persistence: %o",this.persistence.toDict());
55
- this.cache={tagEmpty:"<span class='"+b.classNames.empty+"'></span>",tagVline:"<span class='"+b.classNames.vline+"'></span>",tagExpander:"<span class='"+b.classNames.expander+"'></span>",tagConnector:"<span class='"+b.classNames.connector+"'></span>",tagNodeIcon:"<span class='"+b.classNames.nodeIcon+"'></span>",tagCheckbox:"<span class='"+b.classNames.checkbox+"'></span>",lastentry:undefined};if(b.children||b.initAjax&&b.initAjax.url||b.initId)f(this.divTree).empty();else this.divRoot&&f(this.divRoot).remove();
56
- this.tnRoot=new p(null,this,{});this.tnRoot.bExpanded=true;this.tnRoot.render();this.divTree.appendChild(this.tnRoot.ul);var c=this.tnRoot,d=b.persist&&this.persistence.isReloading(),e=false,g=this.enableUpdate(false);this.logDebug("Dynatree._load(): read tree structure...");if(b.children)c.addChild(b.children);else if(b.initAjax&&b.initAjax.url){e=true;c.data.isLazy=true;this._reloadAjax(a)}else if(b.initId)this._createFromTag(c,f("#"+b.initId));else{a=this.$tree.find(">ul:first").hide();this._createFromTag(c,
57
- a);a.remove()}this._checkConsistency();this.logDebug("Dynatree._load(): render nodes...");this.enableUpdate(g);this.logDebug("Dynatree._load(): bind events...");this.$widget.bind();this.logDebug("Dynatree._load(): postInit...");this.phase="postInit";b.persist&&this.persistence.write();if(this.focusNode&&this.focusNode.isVisible()){this.logDebug("Focus on init: %o",this.focusNode);this.focusNode.focus()}!e&&b.onPostInit&&b.onPostInit.call(this,d,false);this.phase="idle"},_reloadAjax:function(a){var b=
43
+ this.setLazyNodeStatus(DTNodeStatus_Loading);if(a.debugLazyDelay){var b=a.debugLazyDelay,c=this;a.debugLazyDelay=0;this.tree.logInfo("appendAjax: waiting for debugLazyDelay "+b);setTimeout(function(){c.appendAjax(a)},b)}else{c=this;var d=a.success,e=a.error,g="nodeLoaded.dynatree."+this.tree.$tree.attr("id")+"."+this.data.key,h=f.extend({},this.tree.options.ajaxDefaults,a,{success:function(i){var j=c.tree.phase;c.tree.phase="init";if(h.postProcess)i=h.postProcess.call(this,i,this.dataType);if(!f.isArray(i)||
44
+ i.length!==0)c.addChild(i,null);c.tree.phase="postInit";d&&d.call(h,c);c.tree.logInfo("trigger "+g);c.tree.$tree.trigger(g,[c,true]);c.tree.phase=j;c.setLazyNodeStatus(DTNodeStatus_Ok);if(f.isArray(i)&&i.length===0){c.childList=[];c.render()}},error:function(i,j,l){c.tree.logWarning("appendAjax failed:",j,":\n",i,"\n",l);e&&e.call(h,c,i,j,l);c.tree.$tree.trigger(g,[c,false]);c.setLazyNodeStatus(DTNodeStatus_Error,{info:j,tooltip:""+l})}});f.ajax(h)}},move:function(a,b){if(this!==a){if(!this.parent)throw"Cannot move system root";
45
+ if(b===undefined||b=="over")b="child";var c=this.parent,d=b==="child"?a:a.parent;if(d.isDescendantOf(this))throw"Cannot move a node to it's own descendant";if(this.parent.childList.length==1){this.parent.childList=null;this.parent.bExpanded=false}else{var e=f.inArray(this,this.parent.childList);if(e<0)throw"Internal error";this.parent.childList.splice(e,1)}this.parent.ul.removeChild(this.li);this.parent=d;if(d.hasChildren())switch(b){case "child":d.childList.push(this);break;case "before":e=f.inArray(a,
46
+ d.childList);if(e<0)throw"Internal error";d.childList.splice(e,0,this);break;case "after":e=f.inArray(a,d.childList);if(e<0)throw"Internal error";d.childList.splice(e+1,0,this);break;default:throw"Invalid mode "+b;}else{d.childList=[this];if(!d.ul){d.ul=document.createElement("ul");d.ul.style.display="none";d.li.appendChild(d.ul)}}d.ul.appendChild(this.li);if(this.tree!==a.tree){this.visit(function(g){g.tree=a.tree},null,true);throw"Not yet implemented.";}c.isDescendantOf(d)||c.render();d.isDescendantOf(c)||
47
+ d.render()}},lastentry:undefined};var n=o.create();n._getTreePersistData=function(a,b){var c=new n(a,b);c.read();return c.toDict()};getDynaTreePersistData=n._getTreePersistData;n.prototype={initialize:function(a,b){this._log("DynaTreeStatus: initialize");if(a===undefined)a=f.ui.dynatree.prototype.options.cookieId;b=f.extend({},f.ui.dynatree.prototype.options.cookie,b);this.cookieId=a;this.cookieOpts=b;this.cookiesFound=undefined;this.selectedKeyList=this.expandedKeyList=this.focusedKey=this.activeKey=
48
+ null},_log:function(){Array.prototype.unshift.apply(arguments,["debug"]);_log.apply(this,arguments)},read:function(){this._log("DynaTreeStatus: read");this.cookiesFound=false;var a=f.cookie(this.cookieId+"-active");this.activeKey=a===null?"":a;if(a!==null)this.cookiesFound=true;a=f.cookie(this.cookieId+"-focus");this.focusedKey=a===null?"":a;if(a!==null)this.cookiesFound=true;a=f.cookie(this.cookieId+"-expand");this.expandedKeyList=a===null?[]:a.split(",");if(a!==null)this.cookiesFound=true;a=f.cookie(this.cookieId+
49
+ "-select");this.selectedKeyList=a===null?[]:a.split(",");if(a!==null)this.cookiesFound=true},write:function(){this._log("DynaTreeStatus: write");f.cookie(this.cookieId+"-active",this.activeKey===null?"":this.activeKey,this.cookieOpts);f.cookie(this.cookieId+"-focus",this.focusedKey===null?"":this.focusedKey,this.cookieOpts);f.cookie(this.cookieId+"-expand",this.expandedKeyList===null?"":this.expandedKeyList.join(","),this.cookieOpts);f.cookie(this.cookieId+"-select",this.selectedKeyList===null?"":
50
+ this.selectedKeyList.join(","),this.cookieOpts)},addExpand:function(a){this._log("addExpand(%o)",a);if(f.inArray(a,this.expandedKeyList)<0){this.expandedKeyList.push(a);f.cookie(this.cookieId+"-expand",this.expandedKeyList.join(","),this.cookieOpts)}},clearExpand:function(a){this._log("clearExpand(%o)",a);a=f.inArray(a,this.expandedKeyList);if(a>=0){this.expandedKeyList.splice(a,1);f.cookie(this.cookieId+"-expand",this.expandedKeyList.join(","),this.cookieOpts)}},addSelect:function(a){this._log("addSelect(%o)",
51
+ a);if(f.inArray(a,this.selectedKeyList)<0){this.selectedKeyList.push(a);f.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts)}},clearSelect:function(a){this._log("clearSelect(%o)",a);a=f.inArray(a,this.selectedKeyList);if(a>=0){this.selectedKeyList.splice(a,1);f.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts)}},isReloading:function(){return this.cookiesFound===true},toDict:function(){return{cookiesFound:this.cookiesFound,activeKey:this.activeKey,
52
+ focusedKey:this.activeKey,expandedKeyList:this.expandedKeyList,selectedKeyList:this.selectedKeyList}},lastentry:undefined};var q=o.create();q.version="$Version:$";q.prototype={initialize:function(a){this.phase="init";this.$widget=a;this.options=a.options;this.$tree=a.element;this.timer=null;this.divTree=this.$tree.get(0);m(this)},_load:function(a){var b=this.options;this.bEnableUpdate=true;this._nodeCount=1;this.focusNode=this.activeNode=null;b.rootVisible!==undefined&&_log("warn","Option 'rootVisible' is no longer supported.");
53
+ b.title!==undefined&&_log("warn","Option 'title' is no longer supported.");if(b.minExpandLevel<1){_log("warn","Option 'minExpandLevel' must be >= 1.");b.minExpandLevel=1}if(b.classNames!==f.ui.dynatree.prototype.options.classNames)b.classNames=f.extend({},f.ui.dynatree.prototype.options.classNames,b.classNames);if(b.ajaxDefaults!==f.ui.dynatree.prototype.options.ajaxDefaults)b.ajaxDefaults=f.extend({},f.ui.dynatree.prototype.options.ajaxDefaults,b.ajaxDefaults);if(b.dnd!==f.ui.dynatree.prototype.options.dnd)b.dnd=
54
+ f.extend({},f.ui.dynatree.prototype.options.dnd,b.dnd);b.imagePath||f("script").each(function(){if(this.src.search(/.*dynatree[^\/]*\.js$/i)>=0){b.imagePath=this.src.indexOf("/")>=0?this.src.slice(0,this.src.lastIndexOf("/"))+"/skin/":"skin/";logMsg("Guessing imagePath from '%s': '%s'",this.src,b.imagePath);return false}});this.persistence=new n(b.cookieId,b.cookie);if(b.persist){f.cookie||_log("warn","Please include jquery.cookie.js to use persistence.");this.persistence.read()}this.logDebug("DynaTree.persistence: %o",
55
+ this.persistence.toDict());this.cache={tagEmpty:"<span class='"+b.classNames.empty+"'></span>",tagVline:"<span class='"+b.classNames.vline+"'></span>",tagExpander:"<span class='"+b.classNames.expander+"'></span>",tagConnector:"<span class='"+b.classNames.connector+"'></span>",tagNodeIcon:"<span class='"+b.classNames.nodeIcon+"'></span>",tagCheckbox:"<span class='"+b.classNames.checkbox+"'></span>",lastentry:undefined};if(b.children||b.initAjax&&b.initAjax.url||b.initId)f(this.divTree).empty();else this.divRoot&&
56
+ f(this.divRoot).remove();this.tnRoot=new p(null,this,{});this.tnRoot.bExpanded=true;this.tnRoot.render();this.divTree.appendChild(this.tnRoot.ul);var c=this.tnRoot,d=b.persist&&this.persistence.isReloading(),e=false,g=this.enableUpdate(false);this.logDebug("Dynatree._load(): read tree structure...");if(b.children)c.addChild(b.children);else if(b.initAjax&&b.initAjax.url){e=true;c.data.isLazy=true;this._reloadAjax(a)}else if(b.initId)this._createFromTag(c,f("#"+b.initId));else{a=this.$tree.find(">ul:first").hide();
57
+ this._createFromTag(c,a);a.remove()}this._checkConsistency();this.logDebug("Dynatree._load(): render nodes...");this.enableUpdate(g);this.logDebug("Dynatree._load(): bind events...");this.$widget.bind();this.logDebug("Dynatree._load(): postInit...");this.phase="postInit";b.persist&&this.persistence.write();if(this.focusNode&&this.focusNode.isVisible()){this.logDebug("Focus on init: %o",this.focusNode);this.focusNode.focus()}!e&&b.onPostInit&&b.onPostInit.call(this,d,false);this.phase="idle"},_reloadAjax:function(a){var b=
58
58
  this.options;if(!b.initAjax||!b.initAjax.url)throw"tree.reload() requires 'initAjax' mode.";var c=this.persistence,d=f.extend({},b.initAjax);if(d.addActiveKey)d.data.activeKey=c.activeKey;if(d.addFocusedKey)d.data.focusedKey=c.focusedKey;if(d.addExpandedKeyList)d.data.expandedKeyList=c.expandedKeyList.join(",");if(d.addSelectedKeyList)d.data.selectedKeyList=c.selectedKeyList.join(",");if(b.onPostInit){d.success&&this.logWarning("initAjax: success callback is ignored when onPostInit was specified.");
59
59
  d.error&&this.logWarning("initAjax: error callback is ignored when onPostInit was specified.");var e=c.isReloading();d.success=function(g){b.onPostInit.call(g.tree,e,false);a&&a.call(g.tree,"ok")};d.error=function(g){b.onPostInit.call(g.tree,e,true);a&&a.call(g.tree,"error")}}this.logDebug("Dynatree._init(): send Ajax request...");this.tnRoot.appendAjax(d)},toString:function(){return"Dynatree '"+this.$tree.attr("id")+"'"},toDict:function(){return this.tnRoot.toDict(true)},serializeArray:function(a){a=
60
60
  this.getSelectedNodes(a);for(var b=this.$tree.attr("name")||this.$tree.attr("id"),c=[],d=0,e=a.length;d<e;d++)c.push({name:b,value:a[d].data.key});return c},getPersistData:function(){return this.persistence.toDict()},logDebug:function(){if(this.options.debugLevel>=2){Array.prototype.unshift.apply(arguments,["debug"]);_log.apply(this,arguments)}},logInfo:function(){if(this.options.debugLevel>=1){Array.prototype.unshift.apply(arguments,["info"]);_log.apply(this,arguments)}},logWarning:function(){Array.prototype.unshift.apply(arguments,
@@ -2994,12 +2994,7 @@ $.widget( "mobile.button", $.mobile.widget, {
2994
2994
  .insertBefore( $el )
2995
2995
  .click(function(){
2996
2996
  if(!o.disabled){
2997
- if( type == "submit" ){
2998
- $(this).closest('form').submit();
2999
- }
3000
- else{
3001
- $el.click();
3002
- }
2997
+ $el.click();
3003
2998
  }
3004
2999
 
3005
3000
  return false;
@@ -25,4 +25,4 @@
25
25
  * Dual licensed under the MIT or GPL Version 2 licenses.
26
26
  * http://jquery.org/license
27
27
  */
28
- (function(e,d,g){e.extend(e.mobile,{subPageUrlKey:"ui-page",nonHistorySelectors:"dialog",activePageClass:"ui-page-active",activeBtnClass:"ui-btn-active",ajaxLinksEnabled:true,ajaxFormsEnabled:true,defaultTransition:"slide",loadingMessage:"loading",metaViewportContent:"width=device-width, minimum-scale=1, maximum-scale=1",gradeA:function(){return e.support.mediaquery}});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){c.appendTo(e.mobile.pageContainer).css({top:e(d).scrollTop()+75})}b.addClass("ui-loading")}},silentScroll:function(h){e.event.special.scrollstart.enabled=false;setTimeout(function(){d.scrollTo(0,h||0)},20);setTimeout(function(){e.event.special.scrollstart.enabled=true},150)}});e(function(){var h=e("[data-role='page']");e.mobile.startPage=e.mobile.activePage=h.first();e.mobile.pageContainer=e.mobile.startPage.parent().addClass("ui-mobile-viewport");e.mobile.pageLoading();h.page();f.trigger("hashchange",[true]);b.removeClass("ui-mobile-rendering")});f.load(e.mobile.silentScroll)})(jQuery,this);(function(h,f){var d=h(window),g=h("html"),k=h("head"),n={get:function(o){if(o==f){o=location.hash}o=o.replace(/#/,"").split("/");o.pop();return o.join("/")+(o.length?"/":"")},getFilePath:function(p){var o="&"+h.mobile.subPageUrlKey;return p.indexOf(o)>-1?p.split(o)[0]:p},set:function(o,p){if(p){m=false}location.hash=o},origin:null,setOrigin:function(){n.origin=n.get(location.protocol+"//"+location.host+location.pathname)}},b=h.support.dynamicBaseTag?{element:h("<base>",{href:n.origin}).prependTo(k),set:function(o){b.element.attr("href",n.origin+n.get(o))},reset:function(){b.element.attr("href",n.origin)}}:f,e=null,i=[{url:location.hash.replace(/^#/,""),transition:f}],l="[tabindex],a,button:visible,select:visible,input",c=null,m=true;n.setOrigin();function j(p){var o=p.find(".ui-title:eq(0)");if(o.length){o.focus()}else{p.find(l).eq(0).focus()}}function a(o){if(!!e&&(!e.closest(".ui-page-active").length||o)){e.removeClass(h.mobile.activeBtnClass)}e=null}h.fn.animationComplete=function(o){if(h.support.cssTransitions){return h(this).one("webkitAnimationEnd",o)}else{o()}};h.mobile.updateHash=n.set;h.mobile.urlStack=i;h.mobile.changePage=function(B,y,t,z){var x=h.type(B)==="array",C=x?B[0]:h.mobile.activePage,B=x?B[1]:B,p=fileUrl=h.type(B)==="string"?B.replace(/^#/,""):null,s=f,A="get",q=false,o=null,t=(t!==f)?t:(i.length>1&&i[i.length-2].url===p),y=(y!==f)?y:h.mobile.defaultTransition;if(h.type(B)==="object"&&B.url){p=B.url,s=B.data,A=B.type,q=true;if(s&&A=="get"){p+="?"+s;s=f}}if(b){b.reset()}if(t){var D=i.pop();if(D){y=D.transition}}else{i.push({url:p,transition:y})}function r(){h(window.document.activeElement).blur();var F=d.scrollTop();C.data("lastScroll",F);C.data("page")._trigger("beforehide",{nextPage:B});B.data("page")._trigger("beforeshow",{prevPage:C});function E(){h.mobile.pageLoading(true);if(C.data("page")._trigger("hide",null,{nextPage:B})!==false&&B.data("page")._trigger("show",null,{prevPage:C})!==false){h.mobile.activePage=B}j(B);if(z!==false&&p){n.set(p,true)}a();if(o!=null){o.remove()}h.mobile.silentScroll(B.data("lastScroll"))}if(y&&(y!=="none")){h.mobile.pageContainer.addClass("ui-mobile-viewport-transitioning");C.addClass(y+" out "+(t?"reverse":""));B.addClass(h.mobile.activePageClass+" "+y+" in "+(t?"reverse":""));B.animationComplete(function(){C.add(B).removeClass("out in reverse "+y);C.removeClass(h.mobile.activePageClass);E();h.mobile.pageContainer.removeClass("ui-mobile-viewport-transitioning")})}else{C.removeClass(h.mobile.activePageClass);B.addClass(h.mobile.activePageClass);E()}}function w(){if(c){B.attr("data-role",c);c=f}B.page()}if(p){B=h("[id='"+p+"']"),fileUrl=n.getFilePath(p)}else{var u=B.attr("id"),v=n.getFilePath(u);if(u!=v){fileUrl=v}}if(B.length&&!q){if(fileUrl&&b){b.set(fileUrl)}w();r()}else{if(B.length){o=B}h.mobile.pageLoading();h.ajax({url:fileUrl,type:A,data:s,success:function(E){if(b){b.set(fileUrl)}var F=h("<div></div>");F.get(0).innerHTML=E;B=F.find('[data-role="page"]');if(!h.support.dynamicBaseTag){var G=n.get(fileUrl);B.find("[src],link[href]").each(function(){var K=h(this).is("[href]")?"href":"src",J=h(this).attr(K);J.replace(location.protocol+"//"+location.host+location.pathname,"");if(!/^(\w+:|#|\/)/.test(J)){h(this).attr(K,G+J)}})}if(B.attr("id")){var H=["data-role","data-theme","data-fullscreen"],I=B.wrap("<div>").parent();h.each(H,function(J){if(B.attr(H[J])){I.attr(H[J],B.attr(H[J]));B.removeAttr(H[J])}});B=I}B.attr("id",fileUrl).appendTo(h.mobile.pageContainer);w();r()},error:function(){h.mobile.pageLoading(true);a(true);h("<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:h(window).scrollTop()+100}).appendTo(h.mobile.pageContainer).delay(800).fadeOut(400,function(){h(this).remove()})}})}};h("form").live("submit",function(q){if(!h.mobile.ajaxFormsEnabled){return}var p=h(this).attr("method"),o=h(this).attr("action").replace(location.protocol+"//"+location.host,"");if(/^(:?\w+:)/.test(o)){return}if(o.indexOf("/")&&o.indexOf("#")!==0){o=n.get()+o}h.mobile.changePage({url:o,type:p,data:h(this).serialize()},f,f,true);q.preventDefault()});h("a").live("click",function(q){if(!h.mobile.ajaxLinksEnabled){return}var t=h(this),p=t.attr("href").replace(location.protocol+"//"+location.host,""),s=t.is("[target]"),v=s||/^(:?\w+:)/.test(p)||t.is("[rel=external]"),s=t.is("[target]");if(p==="#"){return false}e=t.closest(".ui-btn").addClass(h.mobile.activeBtnClass);if(v||!h.mobile.ajaxLinksEnabled){a(true);if(s){window.open(p)}else{location.href=p}}else{var u=t.data("transition"),o=t.data("back"),r=!t.is("[data-rel="+h.mobile.nonHistorySelectors+"]");c=t.attr("data-rel");if(p.indexOf("/")&&p.indexOf("#")!==0){p=n.get()+p}p.replace(/^#/,"");h.mobile.changePage(p,u,o,r)}q.preventDefault()});d.bind("hashchange",function(p,o){if(!m){m=true;return}if(h(".ui-page-active").is("[data-role="+h.mobile.nonHistorySelectors+"]")){return}var r=location.hash,q=o?false:f;if(r){h.mobile.changePage(r,q)}else{if(h.mobile.activePage.length&&h.mobile.startPage[0]!==h.mobile.activePage[0]&&!o){h.mobile.changePage(h.mobile.startPage,q,true)}else{h.mobile.startPage.trigger("pagebeforeshow",{prevPage:h("")});h.mobile.startPage.addClass(h.mobile.activePageClass);h.mobile.pageLoading(true);if(h.mobile.startPage.trigger("pageshow",{prevPage:h("")})!==false){j(h.mobile.startPage)}}}})})(jQuery);(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}},_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 e=this.getAttribute("type"),d=c.degradeInputs[e]||"text";if(c.degradeInputs[e]){a(this).replaceWith(a("<div>").html(a(this).clone()).html().replace(/type="([a-zA-Z]+)"/,"type="+d+" 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(f,g){f.ui=f.ui||{};var d=/left|center|right/,e=/top|center|bottom/,a="center",b=f.fn.position,c=f.fn.offset;f.fn.position=function(i){if(!i||!i.of){return b.apply(this,arguments)}i=f.extend({},i);var m=f(i.of),l=m[0],o=(i.collision||"flip").split(" "),n=i.offset?i.offset.split(" "):[0,0],k,h,j;if(l.nodeType===9){k=m.width();h=m.height();j={top:0,left:0}}else{if(l.setTimeout){k=m.width();h=m.height();j={top:m.scrollTop(),left:m.scrollLeft()}}else{if(l.preventDefault){i.at="left top";k=h=0;j={top:i.of.pageY,left:i.of.pageX}}else{k=m.outerWidth();h=m.outerHeight();j=m.offset()}}}f.each(["my","at"],function(){var p=(i[this]||"").split(" ");if(p.length===1){p=d.test(p[0])?p.concat([a]):e.test(p[0])?[a].concat(p):[a,a]}p[0]=d.test(p[0])?p[0]:a;p[1]=e.test(p[1])?p[1]:a;i[this]=p});if(o.length===1){o[1]=o[0]}n[0]=parseInt(n[0],10)||0;if(n.length===1){n[1]=n[0]}n[1]=parseInt(n[1],10)||0;if(i.at[0]==="right"){j.left+=k}else{if(i.at[0]===a){j.left+=k/2}}if(i.at[1]==="bottom"){j.top+=h}else{if(i.at[1]===a){j.top+=h/2}}j.left+=n[0];j.top+=n[1];return this.each(function(){var s=f(this),u=s.outerWidth(),r=s.outerHeight(),t=parseInt(f.curCSS(this,"marginLeft",true))||0,q=parseInt(f.curCSS(this,"marginTop",true))||0,w=u+t+parseInt(f.curCSS(this,"marginRight",true))||0,x=r+q+parseInt(f.curCSS(this,"marginBottom",true))||0,v=f.extend({},j),p;if(i.my[0]==="right"){v.left-=u}else{if(i.my[0]===a){v.left-=u/2}}if(i.my[1]==="bottom"){v.top-=r}else{if(i.my[1]===a){v.top-=r/2}}v.left=parseInt(v.left);v.top=parseInt(v.top);p={left:v.left-t,top:v.top-q};f.each(["left","top"],function(z,y){if(f.ui.position[o[z]]){f.ui.position[o[z]][y](v,{targetWidth:k,targetHeight:h,elemWidth:u,elemHeight:r,collisionPosition:p,collisionWidth:w,collisionHeight:x,offset:n,my:i.my,at:i.at})}});if(f.fn.bgiframe){s.bgiframe()}s.offset(f.extend(v,{using:i.using}))})};f.ui.position={fit:{left:function(h,i){var k=f(window),j=i.collisionPosition.left+i.collisionWidth-k.width()-k.scrollLeft();h.left=j>0?h.left-j:Math.max(h.left-i.collisionPosition.left,h.left)},top:function(h,i){var k=f(window),j=i.collisionPosition.top+i.collisionHeight-k.height()-k.scrollTop();h.top=j>0?h.top-j:Math.max(h.top-i.collisionPosition.top,h.top)}},flip:{left:function(i,k){if(k.at[0]===a){return}var m=f(window),l=k.collisionPosition.left+k.collisionWidth-m.width()-m.scrollLeft(),h=k.my[0]==="left"?-k.elemWidth:k.my[0]==="right"?k.elemWidth:0,j=k.at[0]==="left"?k.targetWidth:-k.targetWidth,n=-2*k.offset[0];i.left+=k.collisionPosition.left<0?h+j+n:l>0?h+j+n:0},top:function(i,k){if(k.at[1]===a){return}var m=f(window),l=k.collisionPosition.top+k.collisionHeight-m.height()-m.scrollTop(),h=k.my[1]==="top"?-k.elemHeight:k.my[1]==="bottom"?k.elemHeight:0,j=k.at[1]==="top"?k.targetHeight:-k.targetHeight,n=-2*k.offset[1];i.top+=k.collisionPosition.top<0?h+j+n:l>0?h+j+n:0}}};if(!f.offset.setOffset){f.offset.setOffset=function(l,i){if(/static/.test(f.curCSS(l,"position"))){l.style.position="relative"}var k=f(l),n=k.offset(),h=parseInt(f.curCSS(l,"top",true),10)||0,m=parseInt(f.curCSS(l,"left",true),10)||0,j={top:(i.top-n.top)+h,left:(i.left-n.left)+m};if("using" in i){i.using.call(l,j)}else{k.css(j)}};f.fn.offset=function(h){var i=this[0];if(!i||!i.ownerDocument){return null}if(h){return this.each(function(){f.offset.setOffset(this,h)})}return c.call(this)}}}(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 s=this,d=this.options,q=this.element.attr("tabindex","-1").wrap("<div class='ui-select'>"),g=q.attr("id"),p=a("label[for="+g+"]").addClass("ui-select"),j=g+"-button",k=g+"-menu",n=q.closest(".ui-page"),f=a("<a>",{href:"#",role:"button",id:j,"aria-haspopup":"true","aria-owns":k}).text(a(q[0].options.item(q[0].selectedIndex)).text()).insertBefore(q).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'>"+p.text()+"</div></div><div data-role='content'></div></div>").appendTo(a.mobile.pageContainer).page(),i=l.find(".ui-content"),r=a("<div>",{"class":"ui-selectmenu-screen ui-screen-hidden"}).appendTo(n),c=a("<div>",{"class":"ui-selectmenu ui-selectmenu-hidden ui-overlay-shadow ui-corner-all pop ui-body-"+d.overlayTheme}).insertAfter(r),h=a("<ul>",{"class":"ui-selectmenu-list",id:k,role:"listbox","aria-labelledby":j,"data-theme":e}).appendTo(c),m;a.extend(s,{select:q,selectID:g,label:p,buttonId:j,menuId:k,thisPage:n,button:f,menuPage:l,menuPageContent:i,screen:r,listbox:c,list:h,menuType:m});s.refresh();if(this.options.disabled){this.disable()}q.change(function(){s.refresh()}).focus(function(){a(this).blur();f.focus()});f.bind(a.support.touch?"touchstart":"click",function(o){s.open();return false});h.delegate("li","click",function(){var t=h.find("li").index(this),o=q[0].selectedIndex;q[0].selectedIndex=t;if(t!==o){q.trigger("change")}s.refresh();s.close();return false});r.click(function(){s.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,j=d.list.outerHeight(),f=d.list.outerWidth(),g=a(window).scrollTop(),i=d.button.offset().top,h=window.innerHeight,e=window.innerWidth;d.button.addClass(a.mobile.activeBtnClass);function c(){d.list.find(".ui-btn-active").focus()}if(j>h-80||!a.support.scrollTop){if(g==0&&i>h){d.thisPage.one("pagehide",function(){a(this).data("lastScroll",i)})}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-selectmenu-hidden").position({my:"center center",at:"center center",of:d.button,collision:"fit"}).addClass("in");c()}},close:function(){if(this.options.disabled){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",function(){d()})}else{c.screen.addClass("ui-screen-hidden");c.listbox.addClass("ui-selectmenu-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");this.button=a("<a>",{href:"#",role:"button","aria-label":c.attr("type")}).text(c.text()||c.val()).insertBefore(c).click(function(){if(!e.disabled){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})},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 q=this,i=this.element,e=i.parents("[class*=ui-bar-],[class*=ui-body-]").eq(0),e=e.length?e.attr("class").match(/ui-(bar|body)-([a-z])/)[2]:"c",j=this.options.theme?this.options.theme:e,f=this.options.trackTheme?this.options.trackTheme:e,k=i[0].nodeName.toLowerCase(),m=(k=="select")?"ui-slider-switch":"",g=i.attr("id"),l=g+"-label",p=a("[for="+g+"]").attr("id",l),d=(k=="input")?parseFloat(i.val()):i[0].selectedIndex,h=(k=="input")?parseFloat(i.attr("min")):0,o=(k=="input")?parseFloat(i.attr("max")):i.find("option").length-1,c=a('<div class="ui-slider '+m+" ui-btn-down-"+f+' ui-btn-corner-all" role="application"></div>'),n=a('<a href="#" class="ui-slider-handle"></a>').appendTo(c).buttonMarkup({corners:true,theme:j,shadow:true}).attr({role:"slider","aria-valuemin":h,"aria-valuemax":o,"aria-valuenow":d,"aria-valuetext":d,title:d,"aria-labelledby":l});a.extend(this,{slider:c,handle:n,dragging:false,beforeStart:null});if(k=="select"){c.wrapInner('<div class="ui-slider-inneroffset"></div>');var r=i.find("option");i.find("option").each(function(u){var t=(u==0)?"b":"a",s=(u==0)?"right":"left",v=(u==0)?" ui-btn-down-"+f:" ui-btn-active";a('<div class="ui-slider-labelbg ui-slider-labelbg-'+t+v+" ui-btn-corner-"+s+'"></div>').prependTo(c);a('<span class="ui-slider-label ui-slider-label-'+t+v+" ui-btn-corner-"+s+'" role="img">'+a(this).text()+"</span>").prependTo(n)})}p.addClass("ui-slider");i.addClass((k=="input")?"ui-slider-input":"ui-slider-switch").keyup(function(){q.refresh(a(this).val())});a(document).bind(a.support.touch?"touchmove":"mousemove",function(s){if(q.dragging){q.refresh(s);return false}});c.bind(a.support.touch?"touchstart":"mousedown",function(s){q.dragging=true;if(k==="select"){q.beforeStart=i[0].selectedIndex}q.refresh(s);return false});c.add(document).bind(a.support.touch?"touchend":"mouseup",function(){if(q.dragging){q.dragging=false;if(k==="select"){if(q.beforeStart===i[0].selectedIndex){q.refresh(q.beforeStart===0?1:0)}var t=(k==="input")?parseFloat(i.val()):i[0].selectedIndex;var s=Math.round(t/(o-h)*100);n.addClass("ui-slider-handle-snapping").css("left",s+"%").animationComplete(function(){n.removeClass("ui-slider-handle-snapping")})}return false}});c.insertAfter(i);n.bind("click",function(s){return false});this.refresh()},refresh:function(d){if(this.options.disabled){return}var f=this.element,i,h=f[0].nodeName.toLowerCase(),e=(h==="input")?parseFloat(f.attr("min")):0,j=(h==="input")?parseFloat(f.attr("max")):f.find("option").length-1;if(typeof d==="object"){var g=d.originalEvent.touches?d.originalEvent.touches[0]:d,k=8;if(!this.dragging||g.pageX<this.slider.offset().left-k||g.pageX>this.slider.offset().left+this.slider.width()+k){return}i=Math.round(((g.pageX-this.slider.offset().left)/this.slider.width())*100)}else{if(d==null){d=(h==="input")?parseFloat(f.val()):f[0].selectedIndex}i=(parseFloat(d)-e)/(j-e)*100}if(isNaN(i)){return}if(i<0){i=0}if(i>100){i=100}var c=Math.round((i/100)*(j-e))+e;if(c<e){c=e}if(c>j){c=j}if(i>60&&h==="select"){}this.handle.css("left",i+"%");this.handle.attr({"aria-valuenow":(h==="input")?c:f.find("option").eq(c).attr("value"),"aria-valuetext":(h==="input")?c:f.find("option").eq(c).text(),title:c});if(h==="select"){if(c===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(h==="input"){f.val(c)}else{f[0].selectedIndex=c}f.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 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){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(k){var j=a(k.target),f=j.closest("li");switch(k.keyCode){case 38:var i=f.prev();if(i.length){j.blur().attr("tabindex","-1");i.find("a").first().focus()}return false;break;case 40:var h=f.next();if(h.length){j.blur().attr("tabindex","-1");h.find("a").first().focus()}return false;break;case 39:var g=f.find("a.ui-li-link-alt");if(g.length){j.blur();g.first().focus()}return false;break;case 37:var g=f.find("a.ui-link-inherit");if(g.length){j.blur();g.first().focus()}return false;break;case 13:case 32:j.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}},_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(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(i.inset){if(o===0){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");e._removeCorners(m.next())}else{if(o===c.length-1){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");e._removeCorners(m.prev())}}}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)}})},_idStringEscape:function(c){return c.replace(/[^a-zA-Z0-9]/g,"-")},_createSubPages:function(){var d=this.element,c=d.closest(".ui-page"),h=c.attr("id"),g=this.options,e=this,f=c.find("[data-role='footer']").data("id");a(d.find("ul, ol").toArray().reverse()).each(function(j){var n=a(this),l=n.parent(),p=l.contents()[0].nodeValue.split("\n")[0],q=h+"&"+a.mobile.subPageUrlKey+"="+e._idStringEscape(p+" "+j),o=n.data("theme")||g.theme,m=n.data("counttheme")||d.data("counttheme")||g.countTheme,k=n.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({id:q,"data-theme":o,"data-count-theme":m}).appendTo(a.mobile.pageContainer);k.page();l.html("<a href='#"+q+"'>"+p+"</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, form","click submit",function(g){if(g.type=="click"&&(a(g.target).closest("[data-back]")[0]||this==f[0])){d.close();return false}a.mobile.activePage=d.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);(function(a){a.themeswitcher=function(){var c="/stylesheets/compiled/jquery/mobile/",b=["default","valencia"],d=a.mobile.activePage,e=a("<div data-role='dialog' data-theme='a'><div data-role='header' data-theme='b'><div class='ui-title'>Switch Theme:</div></div><div data-role='content' data-theme='c'><ul data-role='listview' data-inset='true'></ul></div></div>").appendTo(a.mobile.pageContainer),g=e.find("ul");a.each(b,function(h){a("<li><a href='#'>"+b[h].charAt(0).toUpperCase()+b[h].substr(1)+"</a></li>").click(function(){f(b[h])}).appendTo(g)});function f(h){a("head").append("<link rel='stylesheet' href='"+c+h+".css' />")}e.page();a.mobile.changePage([d,e],"pop",false)}})(jQuery);
28
+ (function(e,d,g){e.extend(e.mobile,{subPageUrlKey:"ui-page",nonHistorySelectors:"dialog",activePageClass:"ui-page-active",activeBtnClass:"ui-btn-active",ajaxLinksEnabled:true,ajaxFormsEnabled:true,defaultTransition:"slide",loadingMessage:"loading",metaViewportContent:"width=device-width, minimum-scale=1, maximum-scale=1",gradeA:function(){return e.support.mediaquery}});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){c.appendTo(e.mobile.pageContainer).css({top:e(d).scrollTop()+75})}b.addClass("ui-loading")}},silentScroll:function(h){e.event.special.scrollstart.enabled=false;setTimeout(function(){d.scrollTo(0,h||0)},20);setTimeout(function(){e.event.special.scrollstart.enabled=true},150)}});e(function(){var h=e("[data-role='page']");e.mobile.startPage=e.mobile.activePage=h.first();e.mobile.pageContainer=e.mobile.startPage.parent().addClass("ui-mobile-viewport");e.mobile.pageLoading();h.page();f.trigger("hashchange",[true]);b.removeClass("ui-mobile-rendering")});f.load(e.mobile.silentScroll)})(jQuery,this);(function(h,f){var d=h(window),g=h("html"),k=h("head"),n={get:function(o){if(o==f){o=location.hash}o=o.replace(/#/,"").split("/");o.pop();return o.join("/")+(o.length?"/":"")},getFilePath:function(p){var o="&"+h.mobile.subPageUrlKey;return p.indexOf(o)>-1?p.split(o)[0]:p},set:function(o,p){if(p){m=false}location.hash=o},origin:null,setOrigin:function(){n.origin=n.get(location.protocol+"//"+location.host+location.pathname)}},b=h.support.dynamicBaseTag?{element:h("<base>",{href:n.origin}).prependTo(k),set:function(o){b.element.attr("href",n.origin+n.get(o))},reset:function(){b.element.attr("href",n.origin)}}:f,e=null,i=[{url:location.hash.replace(/^#/,""),transition:f}],l="[tabindex],a,button:visible,select:visible,input",c=null,m=true;n.setOrigin();function j(p){var o=p.find(".ui-title:eq(0)");if(o.length){o.focus()}else{p.find(l).eq(0).focus()}}function a(o){if(!!e&&(!e.closest(".ui-page-active").length||o)){e.removeClass(h.mobile.activeBtnClass)}e=null}h.fn.animationComplete=function(o){if(h.support.cssTransitions){return h(this).one("webkitAnimationEnd",o)}else{o()}};h.mobile.updateHash=n.set;h.mobile.urlStack=i;h.mobile.changePage=function(B,y,t,z){var x=h.type(B)==="array",C=x?B[0]:h.mobile.activePage,B=x?B[1]:B,p=fileUrl=h.type(B)==="string"?B.replace(/^#/,""):null,s=f,A="get",q=false,o=null,t=(t!==f)?t:(i.length>1&&i[i.length-2].url===p),y=(y!==f)?y:h.mobile.defaultTransition;if(h.type(B)==="object"&&B.url){p=B.url,s=B.data,A=B.type,q=true;if(s&&A=="get"){p+="?"+s;s=f}}if(b){b.reset()}if(t){var D=i.pop();if(D){y=D.transition}}else{i.push({url:p,transition:y})}function r(){h(window.document.activeElement).blur();var F=d.scrollTop();C.data("lastScroll",F);C.data("page")._trigger("beforehide",{nextPage:B});B.data("page")._trigger("beforeshow",{prevPage:C});function E(){h.mobile.pageLoading(true);if(C.data("page")._trigger("hide",null,{nextPage:B})!==false&&B.data("page")._trigger("show",null,{prevPage:C})!==false){h.mobile.activePage=B}j(B);if(z!==false&&p){n.set(p,true)}a();if(o!=null){o.remove()}h.mobile.silentScroll(B.data("lastScroll"))}if(y&&(y!=="none")){h.mobile.pageContainer.addClass("ui-mobile-viewport-transitioning");C.addClass(y+" out "+(t?"reverse":""));B.addClass(h.mobile.activePageClass+" "+y+" in "+(t?"reverse":""));B.animationComplete(function(){C.add(B).removeClass("out in reverse "+y);C.removeClass(h.mobile.activePageClass);E();h.mobile.pageContainer.removeClass("ui-mobile-viewport-transitioning")})}else{C.removeClass(h.mobile.activePageClass);B.addClass(h.mobile.activePageClass);E()}}function w(){if(c){B.attr("data-role",c);c=f}B.page()}if(p){B=h("[id='"+p+"']"),fileUrl=n.getFilePath(p)}else{var u=B.attr("id"),v=n.getFilePath(u);if(u!=v){fileUrl=v}}if(B.length&&!q){if(fileUrl&&b){b.set(fileUrl)}w();r()}else{if(B.length){o=B}h.mobile.pageLoading();h.ajax({url:fileUrl,type:A,data:s,success:function(E){if(b){b.set(fileUrl)}var F=h("<div></div>");F.get(0).innerHTML=E;B=F.find('[data-role="page"]');if(!h.support.dynamicBaseTag){var G=n.get(fileUrl);B.find("[src],link[href]").each(function(){var K=h(this).is("[href]")?"href":"src",J=h(this).attr(K);J.replace(location.protocol+"//"+location.host+location.pathname,"");if(!/^(\w+:|#|\/)/.test(J)){h(this).attr(K,G+J)}})}if(B.attr("id")){var H=["data-role","data-theme","data-fullscreen"],I=B.wrap("<div>").parent();h.each(H,function(J){if(B.attr(H[J])){I.attr(H[J],B.attr(H[J]));B.removeAttr(H[J])}});B=I}B.attr("id",fileUrl).appendTo(h.mobile.pageContainer);w();r()},error:function(){h.mobile.pageLoading(true);a(true);h("<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:h(window).scrollTop()+100}).appendTo(h.mobile.pageContainer).delay(800).fadeOut(400,function(){h(this).remove()})}})}};h("form").live("submit",function(q){if(!h.mobile.ajaxFormsEnabled){return}var p=h(this).attr("method"),o=h(this).attr("action").replace(location.protocol+"//"+location.host,"");if(/^(:?\w+:)/.test(o)){return}if(o.indexOf("/")&&o.indexOf("#")!==0){o=n.get()+o}h.mobile.changePage({url:o,type:p,data:h(this).serialize()},f,f,true);q.preventDefault()});h("a").live("click",function(q){if(!h.mobile.ajaxLinksEnabled){return}var t=h(this),p=t.attr("href").replace(location.protocol+"//"+location.host,""),s=t.is("[target]"),v=s||/^(:?\w+:)/.test(p)||t.is("[rel=external]"),s=t.is("[target]");if(p==="#"){return false}e=t.closest(".ui-btn").addClass(h.mobile.activeBtnClass);if(v||!h.mobile.ajaxLinksEnabled){a(true);if(s){window.open(p)}else{location.href=p}}else{var u=t.data("transition"),o=t.data("back"),r=!t.is("[data-rel="+h.mobile.nonHistorySelectors+"]");c=t.attr("data-rel");if(p.indexOf("/")&&p.indexOf("#")!==0){p=n.get()+p}p.replace(/^#/,"");h.mobile.changePage(p,u,o,r)}q.preventDefault()});d.bind("hashchange",function(p,o){if(!m){m=true;return}if(h(".ui-page-active").is("[data-role="+h.mobile.nonHistorySelectors+"]")){return}var r=location.hash,q=o?false:f;if(r){h.mobile.changePage(r,q)}else{if(h.mobile.activePage.length&&h.mobile.startPage[0]!==h.mobile.activePage[0]&&!o){h.mobile.changePage(h.mobile.startPage,q,true)}else{h.mobile.startPage.trigger("pagebeforeshow",{prevPage:h("")});h.mobile.startPage.addClass(h.mobile.activePageClass);h.mobile.pageLoading(true);if(h.mobile.startPage.trigger("pageshow",{prevPage:h("")})!==false){j(h.mobile.startPage)}}}})})(jQuery);(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}},_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 e=this.getAttribute("type"),d=c.degradeInputs[e]||"text";if(c.degradeInputs[e]){a(this).replaceWith(a("<div>").html(a(this).clone()).html().replace(/type="([a-zA-Z]+)"/,"type="+d+" 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(f,g){f.ui=f.ui||{};var d=/left|center|right/,e=/top|center|bottom/,a="center",b=f.fn.position,c=f.fn.offset;f.fn.position=function(i){if(!i||!i.of){return b.apply(this,arguments)}i=f.extend({},i);var m=f(i.of),l=m[0],o=(i.collision||"flip").split(" "),n=i.offset?i.offset.split(" "):[0,0],k,h,j;if(l.nodeType===9){k=m.width();h=m.height();j={top:0,left:0}}else{if(l.setTimeout){k=m.width();h=m.height();j={top:m.scrollTop(),left:m.scrollLeft()}}else{if(l.preventDefault){i.at="left top";k=h=0;j={top:i.of.pageY,left:i.of.pageX}}else{k=m.outerWidth();h=m.outerHeight();j=m.offset()}}}f.each(["my","at"],function(){var p=(i[this]||"").split(" ");if(p.length===1){p=d.test(p[0])?p.concat([a]):e.test(p[0])?[a].concat(p):[a,a]}p[0]=d.test(p[0])?p[0]:a;p[1]=e.test(p[1])?p[1]:a;i[this]=p});if(o.length===1){o[1]=o[0]}n[0]=parseInt(n[0],10)||0;if(n.length===1){n[1]=n[0]}n[1]=parseInt(n[1],10)||0;if(i.at[0]==="right"){j.left+=k}else{if(i.at[0]===a){j.left+=k/2}}if(i.at[1]==="bottom"){j.top+=h}else{if(i.at[1]===a){j.top+=h/2}}j.left+=n[0];j.top+=n[1];return this.each(function(){var s=f(this),u=s.outerWidth(),r=s.outerHeight(),t=parseInt(f.curCSS(this,"marginLeft",true))||0,q=parseInt(f.curCSS(this,"marginTop",true))||0,w=u+t+parseInt(f.curCSS(this,"marginRight",true))||0,x=r+q+parseInt(f.curCSS(this,"marginBottom",true))||0,v=f.extend({},j),p;if(i.my[0]==="right"){v.left-=u}else{if(i.my[0]===a){v.left-=u/2}}if(i.my[1]==="bottom"){v.top-=r}else{if(i.my[1]===a){v.top-=r/2}}v.left=parseInt(v.left);v.top=parseInt(v.top);p={left:v.left-t,top:v.top-q};f.each(["left","top"],function(z,y){if(f.ui.position[o[z]]){f.ui.position[o[z]][y](v,{targetWidth:k,targetHeight:h,elemWidth:u,elemHeight:r,collisionPosition:p,collisionWidth:w,collisionHeight:x,offset:n,my:i.my,at:i.at})}});if(f.fn.bgiframe){s.bgiframe()}s.offset(f.extend(v,{using:i.using}))})};f.ui.position={fit:{left:function(h,i){var k=f(window),j=i.collisionPosition.left+i.collisionWidth-k.width()-k.scrollLeft();h.left=j>0?h.left-j:Math.max(h.left-i.collisionPosition.left,h.left)},top:function(h,i){var k=f(window),j=i.collisionPosition.top+i.collisionHeight-k.height()-k.scrollTop();h.top=j>0?h.top-j:Math.max(h.top-i.collisionPosition.top,h.top)}},flip:{left:function(i,k){if(k.at[0]===a){return}var m=f(window),l=k.collisionPosition.left+k.collisionWidth-m.width()-m.scrollLeft(),h=k.my[0]==="left"?-k.elemWidth:k.my[0]==="right"?k.elemWidth:0,j=k.at[0]==="left"?k.targetWidth:-k.targetWidth,n=-2*k.offset[0];i.left+=k.collisionPosition.left<0?h+j+n:l>0?h+j+n:0},top:function(i,k){if(k.at[1]===a){return}var m=f(window),l=k.collisionPosition.top+k.collisionHeight-m.height()-m.scrollTop(),h=k.my[1]==="top"?-k.elemHeight:k.my[1]==="bottom"?k.elemHeight:0,j=k.at[1]==="top"?k.targetHeight:-k.targetHeight,n=-2*k.offset[1];i.top+=k.collisionPosition.top<0?h+j+n:l>0?h+j+n:0}}};if(!f.offset.setOffset){f.offset.setOffset=function(l,i){if(/static/.test(f.curCSS(l,"position"))){l.style.position="relative"}var k=f(l),n=k.offset(),h=parseInt(f.curCSS(l,"top",true),10)||0,m=parseInt(f.curCSS(l,"left",true),10)||0,j={top:(i.top-n.top)+h,left:(i.left-n.left)+m};if("using" in i){i.using.call(l,j)}else{k.css(j)}};f.fn.offset=function(h){var i=this[0];if(!i||!i.ownerDocument){return null}if(h){return this.each(function(){f.offset.setOffset(this,h)})}return c.call(this)}}}(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 s=this,d=this.options,q=this.element.attr("tabindex","-1").wrap("<div class='ui-select'>"),g=q.attr("id"),p=a("label[for="+g+"]").addClass("ui-select"),j=g+"-button",k=g+"-menu",n=q.closest(".ui-page"),f=a("<a>",{href:"#",role:"button",id:j,"aria-haspopup":"true","aria-owns":k}).text(a(q[0].options.item(q[0].selectedIndex)).text()).insertBefore(q).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'>"+p.text()+"</div></div><div data-role='content'></div></div>").appendTo(a.mobile.pageContainer).page(),i=l.find(".ui-content"),r=a("<div>",{"class":"ui-selectmenu-screen ui-screen-hidden"}).appendTo(n),c=a("<div>",{"class":"ui-selectmenu ui-selectmenu-hidden ui-overlay-shadow ui-corner-all pop ui-body-"+d.overlayTheme}).insertAfter(r),h=a("<ul>",{"class":"ui-selectmenu-list",id:k,role:"listbox","aria-labelledby":j,"data-theme":e}).appendTo(c),m;a.extend(s,{select:q,selectID:g,label:p,buttonId:j,menuId:k,thisPage:n,button:f,menuPage:l,menuPageContent:i,screen:r,listbox:c,list:h,menuType:m});s.refresh();if(this.options.disabled){this.disable()}q.change(function(){s.refresh()}).focus(function(){a(this).blur();f.focus()});f.bind(a.support.touch?"touchstart":"click",function(o){s.open();return false});h.delegate("li","click",function(){var t=h.find("li").index(this),o=q[0].selectedIndex;q[0].selectedIndex=t;if(t!==o){q.trigger("change")}s.refresh();s.close();return false});r.click(function(){s.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,j=d.list.outerHeight(),f=d.list.outerWidth(),g=a(window).scrollTop(),i=d.button.offset().top,h=window.innerHeight,e=window.innerWidth;d.button.addClass(a.mobile.activeBtnClass);function c(){d.list.find(".ui-btn-active").focus()}if(j>h-80||!a.support.scrollTop){if(g==0&&i>h){d.thisPage.one("pagehide",function(){a(this).data("lastScroll",i)})}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-selectmenu-hidden").position({my:"center center",at:"center center",of:d.button,collision:"fit"}).addClass("in");c()}},close:function(){if(this.options.disabled){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",function(){d()})}else{c.screen.addClass("ui-screen-hidden");c.listbox.addClass("ui-selectmenu-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");this.button=a("<a>",{href:"#",role:"button","aria-label":c.attr("type")}).text(c.text()||c.val()).insertBefore(c).click(function(){if(!e.disabled){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})},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 q=this,i=this.element,e=i.parents("[class*=ui-bar-],[class*=ui-body-]").eq(0),e=e.length?e.attr("class").match(/ui-(bar|body)-([a-z])/)[2]:"c",j=this.options.theme?this.options.theme:e,f=this.options.trackTheme?this.options.trackTheme:e,k=i[0].nodeName.toLowerCase(),m=(k=="select")?"ui-slider-switch":"",g=i.attr("id"),l=g+"-label",p=a("[for="+g+"]").attr("id",l),d=(k=="input")?parseFloat(i.val()):i[0].selectedIndex,h=(k=="input")?parseFloat(i.attr("min")):0,o=(k=="input")?parseFloat(i.attr("max")):i.find("option").length-1,c=a('<div class="ui-slider '+m+" ui-btn-down-"+f+' ui-btn-corner-all" role="application"></div>'),n=a('<a href="#" class="ui-slider-handle"></a>').appendTo(c).buttonMarkup({corners:true,theme:j,shadow:true}).attr({role:"slider","aria-valuemin":h,"aria-valuemax":o,"aria-valuenow":d,"aria-valuetext":d,title:d,"aria-labelledby":l});a.extend(this,{slider:c,handle:n,dragging:false,beforeStart:null});if(k=="select"){c.wrapInner('<div class="ui-slider-inneroffset"></div>');var r=i.find("option");i.find("option").each(function(u){var t=(u==0)?"b":"a",s=(u==0)?"right":"left",v=(u==0)?" ui-btn-down-"+f:" ui-btn-active";a('<div class="ui-slider-labelbg ui-slider-labelbg-'+t+v+" ui-btn-corner-"+s+'"></div>').prependTo(c);a('<span class="ui-slider-label ui-slider-label-'+t+v+" ui-btn-corner-"+s+'" role="img">'+a(this).text()+"</span>").prependTo(n)})}p.addClass("ui-slider");i.addClass((k=="input")?"ui-slider-input":"ui-slider-switch").keyup(function(){q.refresh(a(this).val())});a(document).bind(a.support.touch?"touchmove":"mousemove",function(s){if(q.dragging){q.refresh(s);return false}});c.bind(a.support.touch?"touchstart":"mousedown",function(s){q.dragging=true;if(k==="select"){q.beforeStart=i[0].selectedIndex}q.refresh(s);return false});c.add(document).bind(a.support.touch?"touchend":"mouseup",function(){if(q.dragging){q.dragging=false;if(k==="select"){if(q.beforeStart===i[0].selectedIndex){q.refresh(q.beforeStart===0?1:0)}var t=(k==="input")?parseFloat(i.val()):i[0].selectedIndex;var s=Math.round(t/(o-h)*100);n.addClass("ui-slider-handle-snapping").css("left",s+"%").animationComplete(function(){n.removeClass("ui-slider-handle-snapping")})}return false}});c.insertAfter(i);n.bind("click",function(s){return false});this.refresh()},refresh:function(d){if(this.options.disabled){return}var f=this.element,i,h=f[0].nodeName.toLowerCase(),e=(h==="input")?parseFloat(f.attr("min")):0,j=(h==="input")?parseFloat(f.attr("max")):f.find("option").length-1;if(typeof d==="object"){var g=d.originalEvent.touches?d.originalEvent.touches[0]:d,k=8;if(!this.dragging||g.pageX<this.slider.offset().left-k||g.pageX>this.slider.offset().left+this.slider.width()+k){return}i=Math.round(((g.pageX-this.slider.offset().left)/this.slider.width())*100)}else{if(d==null){d=(h==="input")?parseFloat(f.val()):f[0].selectedIndex}i=(parseFloat(d)-e)/(j-e)*100}if(isNaN(i)){return}if(i<0){i=0}if(i>100){i=100}var c=Math.round((i/100)*(j-e))+e;if(c<e){c=e}if(c>j){c=j}if(i>60&&h==="select"){}this.handle.css("left",i+"%");this.handle.attr({"aria-valuenow":(h==="input")?c:f.find("option").eq(c).attr("value"),"aria-valuetext":(h==="input")?c:f.find("option").eq(c).text(),title:c});if(h==="select"){if(c===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(h==="input"){f.val(c)}else{f[0].selectedIndex=c}f.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 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){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(k){var j=a(k.target),f=j.closest("li");switch(k.keyCode){case 38:var i=f.prev();if(i.length){j.blur().attr("tabindex","-1");i.find("a").first().focus()}return false;break;case 40:var h=f.next();if(h.length){j.blur().attr("tabindex","-1");h.find("a").first().focus()}return false;break;case 39:var g=f.find("a.ui-li-link-alt");if(g.length){j.blur();g.first().focus()}return false;break;case 37:var g=f.find("a.ui-link-inherit");if(g.length){j.blur();g.first().focus()}return false;break;case 13:case 32:j.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}},_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(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(i.inset){if(o===0){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");e._removeCorners(m.next())}else{if(o===c.length-1){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");e._removeCorners(m.prev())}}}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)}})},_idStringEscape:function(c){return c.replace(/[^a-zA-Z0-9]/g,"-")},_createSubPages:function(){var d=this.element,c=d.closest(".ui-page"),h=c.attr("id"),g=this.options,e=this,f=c.find("[data-role='footer']").data("id");a(d.find("ul, ol").toArray().reverse()).each(function(j){var n=a(this),l=n.parent(),p=l.contents()[0].nodeValue.split("\n")[0],q=h+"&"+a.mobile.subPageUrlKey+"="+e._idStringEscape(p+" "+j),o=n.data("theme")||g.theme,m=n.data("counttheme")||d.data("counttheme")||g.countTheme,k=n.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({id:q,"data-theme":o,"data-count-theme":m}).appendTo(a.mobile.pageContainer);k.page();l.html("<a href='#"+q+"'>"+p+"</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, form","click submit",function(g){if(g.type=="click"&&(a(g.target).closest("[data-back]")[0]||this==f[0])){d.close();return false}a.mobile.activePage=d.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);(function(a){a.themeswitcher=function(){var c="/stylesheets/compiled/jquery/mobile/",b=["default","valencia"],d=a.mobile.activePage,e=a("<div data-role='dialog' data-theme='a'><div data-role='header' data-theme='b'><div class='ui-title'>Switch Theme:</div></div><div data-role='content' data-theme='c'><ul data-role='listview' data-inset='true'></ul></div></div>").appendTo(a.mobile.pageContainer),g=e.find("ul");a.each(b,function(h){a("<li><a href='#'>"+b[h].charAt(0).toUpperCase()+b[h].substr(1)+"</a></li>").click(function(){f(b[h])}).appendTo(g)});function f(h){a("head").append("<link rel='stylesheet' href='"+c+h+".css' />")}e.page();a.mobile.changePage([d,e],"pop",false)}})(jQuery);
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compass-jquery-plugin
3
3
  version: !ruby/object:Gem::Version
4
- hash: 62196383
4
+ hash: 62196381
5
5
  prerelease: true
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
9
  - 1
10
10
  - beta
11
- - 2
12
- version: 0.3.1.beta.2
11
+ - 3
12
+ version: 0.3.1.beta.3
13
13
  platform: ruby
14
14
  authors:
15
15
  - Kosmas Schuetz
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-11-27 00:00:00 +01:00
20
+ date: 2010-11-30 00:00:00 +01:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency