[snowy] Initial HTML5 offline note app built on jQuery Mobile
- From: Sanford Armstrong <sharm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [snowy] Initial HTML5 offline note app built on jQuery Mobile
- Date: Fri, 5 Nov 2010 16:56:12 +0000 (UTC)
commit 2e4a0c4ff12ff7640c12e82fe827ea7e40236070
Author: Sandy Armstrong <sanfordarmstrong gmail com>
Date: Wed Sep 15 15:47:30 2010 -0700
Initial HTML5 offline note app built on jQuery Mobile
After logging in, hit <domain>/mobile/ in a webkit-based browser.
Major missing features are transforming note content to HTML,
automatic synchronization, and, of course, editing.
One major thing to change is that we are bundling a recent git
version of jquery mobile and related assets. This is just my own
convenience, for now.
mobile_notes/templates/mobile/cache.manifest | 10 +
mobile_notes/templates/mobile/index.html | 218 ++
mobile_notes/urls.py | 24 +
mobile_notes/views.py | 46 +
settings.py | 1 +
site_media/css/images/icons-18-white.png | Bin 0 -> 908 bytes
site_media/css/jquery.mobile-1.0a1.min.css | 9 +
site_media/js/jquery.mobile-1.0a1.js | 3106 ++++++++++++++++++++++++++
site_media/js/jquery.mobile-1.0a1.min.js | 94 +
urls.py | 2 +
10 files changed, 3510 insertions(+), 0 deletions(-)
---
diff --git a/mobile_notes/__init__.py b/mobile_notes/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/mobile_notes/templates/mobile/cache.manifest b/mobile_notes/templates/mobile/cache.manifest
new file mode 100644
index 0000000..bc81c08
--- /dev/null
+++ b/mobile_notes/templates/mobile/cache.manifest
@@ -0,0 +1,10 @@
+CACHE MANIFEST
+# Revision: 0.1
+index.html
+{{ jquery_uri }}
+{{ jquery_mobile_js_uri }}
+{{ jquery_mobile_css_uri }}
+http://192.168.1.106:8000/site_media/css/images/icons-18-white.png
+
+NETWORK:
+{{ root_uri }}
diff --git a/mobile_notes/templates/mobile/index.html b/mobile_notes/templates/mobile/index.html
new file mode 100644
index 0000000..f395399
--- /dev/null
+++ b/mobile_notes/templates/mobile/index.html
@@ -0,0 +1,218 @@
+<!DOCTYPE html>
+<html manifest="cache.manifest">
+ <head>
+ <title>Slick Notes</title>
+ <link rel="stylesheet" href="{{ jquery_mobile_css_uri }}" />
+ <script src="{{ jquery_uri }}"></script>
+ <script src="{{ jquery_mobile_js_uri }}"></script>
+ <script type="text/javascript">
+
+ var TomboyWeb = {
+ root_uri: '{{ root_uri }}',
+ notes_uri: null,
+
+ _get_notes: function(params, callback) {
+ if(this.notes_uri == null) {
+ var that = this;
+ $.getJSON(this.root_uri, null, function(root) {
+ $.getJSON(root['user-ref']['api-ref'], null, function(user) {
+ that.notes_uri = user['notes-ref']['api-ref'];
+ that._get_notes(params, callback);
+ });
+ });
+ } else {
+ // TODO: On certain errors, set notes_uri to null and
+ // start from scratch
+ $.getJSON(this.notes_uri, params, callback);
+ }
+ },
+
+ get_updates_since: function(version, noteJsonCallback) {
+ this._get_notes({include_notes:true, since:version},
+ noteJsonCallback);
+ },
+
+ get_note_list: function(minimalNoteJsonCallback) {
+ this._get_notes(null, minimalNoteJsonCallback);
+ }
+ };
+
+ var OfflineNotesDatabase = {
+ db: null,
+
+ init_db: function() {
+ // NOTE: openDatabase can only be called once, so init_db should
+ // also only be called once (could protect against this?)
+ this.db = openDatabase('Notes', 0.1, 'Tomboy Online Notes', 5*1024*1024);
+ this.check_db();
+ },
+
+ check_db: function() {
+ // TODO: Error-checking, encapuslation, etc
+ this.db.transaction(function(tx) {
+ tx.executeSql('CREATE TABLE IF NOT EXISTS ' +
+ 'notes(guid TEXT PRIMARY KEY ON CONFLICT REPLACE, title TEXT, content TEXT)',
+ []);
+ });
+ },
+
+ wipe_db: function() {
+ this.db.transaction(function(tx) {
+ tx.executeSql('DROP TABLE notes');
+ });
+ },
+
+ insert_note: function(guid, title, content, insertedRowCallback) {
+ // TODO: Should we handle case where there is no desired callback?
+ this.db.transaction(function(tx) {
+ tx.executeSql('INSERT INTO notes(guid, title, content) VALUES (?,?,?)',
+ [guid, title, content],
+ insertedRowCallback,
+ OfflineNotesDatabase.on_error);
+ });
+ },
+
+ _select_from_notes: function(params, where, selectedRowCallback) {
+ var sql = "SELECT " + params + " FROM notes";
+ if(where) {
+ sql += " WHERE " + where;
+ }
+ var selection_processor = function(tx, rs) {
+ for(var i=0; i < rs.rows.length; i++) {
+ var note = rs.rows.item(i);
+ selectedRowCallback(note);
+ }
+ };
+ this.db.readTransaction(function(tx) {
+ tx.executeSql(sql,
+ [],
+ selection_processor,
+ OfflineNotesDatabase.on_error);
+ });
+ },
+
+ select_notes: function(selectedRowCallback) {
+ this._select_from_notes("*", null, selectedRowCallback);
+ },
+
+ select_note_guids: function(selectedRowCallback) {
+ this._select_from_notes("guid", null, selectedRowCallback);
+ },
+
+ deleteAtGuid: function(guid, onSuccess) {
+ this.db.transaction(function(tx) {
+ tx.executeSql("DELETE FROM notes WHERE guid=?", [guid],
+ onSuccess,
+ OfflineNotesDatabase.on_error);
+ });
+ },
+
+ on_error: function(tx, e) {
+ alert("There has been a db error: " + e.message);
+ },
+ };
+
+ $(function() {
+ // Set up controls
+ $('#wipe').bind('click', function(event) {
+ OfflineNotesDatabase.wipe_db();
+ localStorage.setItem('latest-sync-revision', -1);
+ $('#note-title-list > li').remove();
+ });
+ $('#beginSync').bind('click', function(event) {
+ // TODO: Obviously this whole function should be refactored into
+ // one or two calls to a NoteSync object
+ OfflineNotesDatabase.check_db();
+ var lastSyncRev = localStorage.getItem('latest-sync-revision');
+ if (lastSyncRev == null)
+ lastSyncRev = -1;
+
+ TomboyWeb.get_updates_since(lastSyncRev, function(notes) {
+ var insertCallbackMaker = function(note) {
+ return function() {
+ // TODO: Ugh, this is gross. Calling this method
+ // with both JSON objects and db row objects
+ note.content = note['note-content'];
+ add_note_list_item(note);
+ };
+ };
+ for(var i=0; i < notes.notes.length; i++) {
+ var note = notes.notes[i];
+ // NOTE: Tricky ON CONFLICT REPLACE option makes this INSERT
+ // magically turn into a DELETE+INSERT if the row already
+ // exists.
+ // TODO: This is probably wasteful since we should most likely
+ // prefer optimizing the UPDATE case over the new INSERT
+ // case.
+ OfflineNotesDatabase.insert_note(note.guid, note.title, note['note-content'],
+ insertCallbackMaker(note));
+ }
+ // TODO: Error-handling whenever using localStorage (applies elsewhere)
+ localStorage.setItem('latest-sync-revision', notes['latest-sync-revision']);
+ //$('#status').html('Processed ' + notes.notes.length + ' note updates, not including deletions');
+ });
+
+ // Look for note that have been deleted on the server
+ TomboyWeb.get_note_list(function(noteInfo) {
+ var allNoteGuids = [];
+ for(var i=0; i < noteInfo.notes.length; i++) {
+ allNoteGuids.push(noteInfo.notes[i].guid);
+ }
+ OfflineNotesDatabase.select_note_guids(function(noteInfo) {
+ var guid = noteInfo.guid;
+ if (allNoteGuids.indexOf(guid) == -1) {
+ OfflineNotesDatabase.deleteAtGuid(guid, function(tx,rs) {
+ $('#note-title-list > li#' + guid).remove();
+ });
+ }
+ });
+ });
+ });
+
+ // TODO: Refactor, move somewhere reasonable
+ function add_note_list_item(note) {
+ $('<li id="' + note.guid + '"><a href="#' + note.guid + '-page">' + note.title + '</a></li>').appendTo('#note-title-list');
+ $('li#' + note.guid).bind('mouseenter', note, function(event) {
+ $('.note-content-page').remove();
+ var note = event.data;
+ $('<div data-role="page" class="note-content-page" id="' + note.guid + '-page">' +
+ '<div data-role="header"><h1>' + note.title + '</h1></div>' +
+ '<div data-role="content"><p>' + escape(note.content) + '</p></div>')
+ .page()
+ .insertAfter('#note-list-page');
+ });
+ //$('li#' + note.guid).bind('mouseleave', note, function(event) {
+ // var note = event.data;
+ // $('div#' + note.guid + '-page').remove();
+ //});
+ $("#note-title-list").listview('refresh');
+ }
+
+ OfflineNotesDatabase.init_db();
+
+ // Show cached notes
+ OfflineNotesDatabase.select_notes(add_note_list_item);
+ });
+ </script>
+ </head>
+
+ <body>
+
+ <div data-role="page" id="main-page">
+ <div data-role="header"><h1>Slick Notes</h1></div>
+ <div data-role="content">
+ <a href="#" id="beginSync" data-role="button">Sync Notes</a>
+ <a href="#" id="wipe" data-role="button">Clear Offline Storage</a>
+ <a href="#note-list-page" data-role="button">View Notes List</a>
+ </div>
+ </div>
+
+ <div data-role="page" id="note-list-page">
+ <div data-role="header"><h1>Slick Notes</h1></div>
+ <div data-role="content">
+ <ul id="note-title-list" data-role="listview" />
+ </div>
+ </div>
+
+ </body>
+</html>
diff --git a/mobile_notes/urls.py b/mobile_notes/urls.py
new file mode 100644
index 0000000..15fa365
--- /dev/null
+++ b/mobile_notes/urls.py
@@ -0,0 +1,24 @@
+#
+# Copyright (c) 2010 Sandy Armstrong <sanfordarmstrong gmail com>
+#
+# This program is free software: you can redistribute it and/or modify it under
+# the terms of the GNU Affero General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+from django.conf.urls.defaults import *
+
+urlpatterns = patterns('',
+ url(r'^$', 'snowy.mobile_notes.views.mobile_note_index_redirect'),
+ url(r'index.html$', 'snowy.mobile_notes.views.mobile_note_index', name='mobile_note_index'),
+ url(r'cache.manifest$', 'snowy.mobile_notes.views.cache_manifest', name='cache_manifest'),
+)
diff --git a/mobile_notes/views.py b/mobile_notes/views.py
new file mode 100644
index 0000000..bf774bd
--- /dev/null
+++ b/mobile_notes/views.py
@@ -0,0 +1,46 @@
+#
+# Copyright (c) 2010 Sandy Armstrong <sanfordarmstrong gmail com>
+#
+# This program is free software: you can redistribute it and/or modify it under
+# the terms of the GNU Affero General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+from django.http import HttpResponseRedirect
+
+from django.shortcuts import render_to_response
+
+from django.template import RequestContext
+
+from snowy.core.urlresolvers import reverse_full
+
+from settings import MEDIA_URL
+
+def mobile_note_index_redirect(request):
+ return HttpResponseRedirect(reverse_full('mobile_note_index'))
+
+def mobile_note_index(request):
+ return render_to_response('mobile/index.html',
+ {'root_uri': reverse_full('api_root'),
+ 'jquery_uri': 'http://code.jquery.com/jquery-1.4.3.min.js',
+ 'jquery_mobile_js_uri': MEDIA_URL + 'js/jquery.mobile-1.0a1.js',
+ 'jquery_mobile_css_uri': MEDIA_URL + 'css/jquery.mobile-1.0a1.min.css',},
+ context_instance=RequestContext(request))
+
+def cache_manifest(request):
+ return render_to_response('mobile/cache.manifest',
+ {'root_uri': reverse_full('api_root'),
+ 'jquery_uri': 'http://code.jquery.com/jquery-1.4.3.min.js',
+ 'jquery_mobile_js_uri': MEDIA_URL + 'js/jquery.mobile-1.0a1.js',
+ 'jquery_mobile_css_uri': MEDIA_URL + 'css/jquery.mobile-1.0a1.min.css',},
+ mimetype='text/cache-manifest',
+ context_instance=RequestContext(request))
diff --git a/settings.py b/settings.py
index 84f49c9..fec54e8 100644
--- a/settings.py
+++ b/settings.py
@@ -125,6 +125,7 @@ INSTALLED_APPS = [
'accounts',
'django_openid_auth',
'notes',
+ 'mobile_notes',
# System apps
'django.contrib.admin',
diff --git a/site_media/css/images/icons-18-white.png b/site_media/css/images/icons-18-white.png
new file mode 100644
index 0000000..6297254
Binary files /dev/null and b/site_media/css/images/icons-18-white.png differ
diff --git a/site_media/css/jquery.mobile-1.0a1.min.css b/site_media/css/jquery.mobile-1.0a1.min.css
new file mode 100644
index 0000000..4ee9327
--- /dev/null
+++ b/site_media/css/jquery.mobile-1.0a1.min.css
@@ -0,0 +1,9 @@
+/*!
+ * jQuery Mobile
+ * http://jquerymobile.com/
+ *
+ * Copyright 2010, jQuery Project
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ */
+/*!* jQuery Mobile * http://jquerymobile.com/ * * Copyright 2010,jQuery Project * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license */ .ui-bar-a{border:1px solid #2A2A2A;background:#111;color:#fff;font-weight:bold;text-shadow:0 -1px 1px #000;background-image:-moz-linear-gradient(top,#3c3c3c,#111);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#3c3c3c),color-stop(1,#111));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#3c3c3c',EndColorStr='#111111')";}.ui-bar-a,.ui-bar-a input,.ui-bar-a select,.ui-bar-a textarea,.ui-bar-a button{font-family:Helvetica,Arial,sans-serif;}.ui-bar-a .ui-link-inherit{color:#fff;}.ui-bar-a .ui-link{color:#7cc4e7;font-weight:bold;}.ui-body-a{border:1px solid #2A2A2A;background:#222;color:#fff;text-shadow:0 1px 0 #000;font-weight:normal;background-image:-moz-linear-gradient(top,#666,#222);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#666),
color-stop(1,#222));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#666666',EndColorStr='#222222)')";}.ui-body-a,.ui-body-a input,.ui-body-a select,.ui-body-a textarea,.ui-body-a button{font-family:Helvetica,Arial,sans-serif;}.ui-body-a .ui-link-inherit{color:#fff;}.ui-body-a .ui-link{color:#2489CE;font-weight:bold;}.ui-br{border-bottom:1px solid rgba(130,130,130,.3);}.ui-btn-up-a{border:1px solid #222;background:#333;font-weight:bold;color:#fff;cursor:pointer;text-shadow:0 -1px 1px #000;text-decoration:none;background-image:-moz-linear-gradient(top,#555,#333);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#555),color-stop(1,#333));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#555555',EndColorStr='#333333')";}.ui-btn-up-a a.ui-link-inherit{color:#fff;}.ui-btn-hover-a{border:1px solid #000;background:#444;font-weight:bold;color:#fff;text-shadow:0 -1px 1px #000;text-decoration:none;background-image:-mo
z-linear-gradient(top,#666,#444);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#666),color-stop(1,#444));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#666666',EndColorStr='#444444')";}.ui-btn-hover-a a.ui-link-inherit{color:#fff;}.ui-btn-down-a{border:1px solid #000;background:#3d3d3d;font-weight:bold;color:#fff;text-shadow:0 -1px 1px #000;background-image:-moz-linear-gradient(top,#333,#5a5a5a);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#333),color-stop(1,#5a5a5a));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#333333',EndColorStr='#5a5a5a')";}.ui-btn-down-a a.ui-link-inherit{color:#fff;}.ui-btn-up-a,.ui-btn-hover-a,.ui-btn-down-a{font-family:Helvetica,Arial,sans-serif;}.ui-bar-b{border:1px solid #456f9a;background:#5e87b0;color:#fff;font-weight:bold;text-shadow:0 -1px 1px #254f7a;background-image:-moz-linear-gradient(top,#81a8ce,#5e87b0);background-image:-webkit-gra
dient(linear,left top,left bottom,color-stop(0,#81a8ce),color-stop(1,#5e87b0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#81a8ce',EndColorStr='#5e87b0')";}.ui-bar-b,.ui-bar-b input,.ui-bar-b select,.ui-bar-b textarea,.ui-bar-b button{font-family:Helvetica,Arial,sans-serif;}.ui-bar-b .ui-link-inherit{color:#fff;}.ui-bar-b .ui-link{color:#7cc4e7;font-weight:bold;}.ui-body-b{border:1px solid #C6C6C6;background:#ccc;color:#333;text-shadow:0 1px 0 #fff;font-weight:normal;background-image:-moz-linear-gradient(top,#e6e6e6,#ccc);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#e6e6e6),color-stop(1,#ccc));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#e6e6e6',EndColorStr='#cccccc')";}.ui-body-b,.ui-body-b input,.ui-body-b select,.ui-body-b textarea,.ui-body-b button{font-family:Helvetica,Arial,sans-serif;}.ui-body-b .ui-link-inherit{color:#333;}.ui-body-b .ui-link{color:#2489CE;font-weight:bold;}.ui-btn-up
-b{border:1px solid #145072;background:#2567ab;font-weight:bold;color:#fff;cursor:pointer;text-shadow:0 -1px 1px #145072;text-decoration:none;background-image:-moz-linear-gradient(top,#4e89c5,#2567ab);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#5f9cc5),color-stop(1,#396b9e));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#4e89c5',EndColorStr='#2567ab')";}.ui-btn-up-b a.ui-link-inherit{color:#fff;}.ui-btn-hover-b{border:1px solid #397cbe;background:#5397d5;font-weight:bold;color:#fff;text-shadow:0 -1px 1px #014D68;background-image:-moz-linear-gradient(top,#71a2d0,#397cbe);text-decoration:none;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#71a2d0),color-stop(1,#397cbe));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#71a2d0',EndColorStr='#397cbe')";}.ui-btn-hover-b a.ui-link-inherit{color:#fff;}.ui-btn-down-b{border:1px solid #225377;background:#4e89c5;font-weight:bold;co
lor:#fff;text-shadow:0 -1px 1px #225377;background-image:-moz-linear-gradient(top,#396b9e,#4e89c5);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#396b9e),color-stop(1,#4e89c5));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#396b9e',EndColorStr='#4e89c5')";}.ui-btn-down-b a.ui-link-inherit{color:#fff;}.ui-btn-up-b,.ui-btn-hover-b,.ui-btn-down-b{font-family:Helvetica,Arial,sans-serif;}.ui-bar-c{border:1px solid #B3B3B3;background:#e9eaeb;color:#3E3E3E;font-weight:bold;text-shadow:0 1px 1px #fff;background-image:-moz-linear-gradient(top,#f0f0f0,#e9eaeb);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#f0f0f0),color-stop(1,#e9eaeb));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#f0f0f0',EndColorStr='#e9eaeb')";}.ui-bar-c,.ui-bar-c input,.ui-bar-c select,.ui-bar-c textarea,.ui-bar-c button{font-family:Helvetica,Arial,sans-serif;}.ui-body-c{border:1px solid #B3B3B3;color:#333;te
xt-shadow:0 1px 0 #fff;background:#f0f0f0;background-image:-moz-linear-gradient(top,#fff,#f0f0f0);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(1,#f0f0f0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffffff',EndColorStr='#f0f0f0')";}.ui-body-c,.ui-body-c input,.ui-body-c select,.ui-body-c textarea,.ui-body-c button{font-family:Helvetica,Arial,sans-serif;}.ui-body-c .ui-link-inherit{color:#333;}.ui-body-c .ui-link{color:#2489CE;font-weight:bold;}.ui-btn-up-c{border:1px solid #ccc;background:#eee;font-weight:bold;color:#444;cursor:pointer;text-shadow:0 1px 1px #f6f6f6;text-decoration:none;background-image:-moz-linear-gradient(top,#fdfdfd,#eee);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fdfdfd),color-stop(1,#eee));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#fdfdfd',EndColorStr='#eeeeee')";}.ui-btn-up-c a.ui-link-inherit{color:#2F3E46;}.ui-btn-hove
r-c{border:1px solid #aaa;background:#f5f5f5;font-weight:bold;color:#111;text-decoration:none;text-shadow:0 1px 1px #fff;background-image:-moz-linear-gradient(top,#fff,#f5f5f5);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(1,#f5f5f5));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffffff',EndColorStr='#f5f5f5')";}.ui-btn-hover-c a.ui-link-inherit{color:#2F3E46;}.ui-btn-down-c{border:1px solid #808080;background:#fdfdfd;font-weight:bold;color:#111;text-shadow:0 1px 1px #fff;background-image:-moz-linear-gradient(top,#eee,#fdfdfd);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#eee),color-stop(1,#fdfdfd));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#eeeeee',EndColorStr='#fdfdfd')";}.ui-btn-down-c a.ui-link-inherit{color:#2F3E46;}.ui-btn-up-c,.ui-btn-hover-c,.ui-btn-down-c{font-family:Helvetica,Arial,sans-serif;}.ui-bar-d{border:1px solid #ccc;background:#b
bb;color:#333;text-shadow:0 1px 0 #eee;background-image:-moz-linear-gradient(top,#ddd,#bbb);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#ddd),color-stop(1,#bbb));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#ddd',EndColorStr='#bbb')";}.ui-bar-d,.ui-bar-d input,.ui-bar-d select,.ui-bar-d textarea,.ui-bar-d button{font-family:Helvetica,Arial,sans-serif;}.ui-bar-d .ui-link-inherit{color:#333;}.ui-bar-d .ui-link{color:#2489CE;font-weight:bold;}.ui-body-d{border:1px solid #ccc;color:#333;text-shadow:0 1px 0 #fff;background:#fff;}.ui-body-d,.ui-body-d input,.ui-body-d select,.ui-body-d textarea,.ui-body-d button{font-family:Helvetica,Arial,sans-serif;}.ui-body-d .ui-link-inherit{color:#333;}.ui-body-d .ui-link{color:#2489CE;font-weight:bold;}.ui-btn-up-d{border:1px solid #ccc;background:#fff;font-weight:bold;color:#444;text-decoration:none;text-shadow:0 1px 1px #fff;}.ui-btn-up-d a.ui-link-inherit{color:#333;}.ui-btn-hover-d{
border:1px solid #aaa;background:#eee;font-weight:bold;color:#222;cursor:pointer;text-shadow:0 1px 1px #fff;text-decoration:none;background-image:-moz-linear-gradient(top,#fdfdfd,#eee);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fdfdfd),color-stop(1,#eee));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#fdfdfd',EndColorStr='#eeeeee')";}.ui-btn-hover-d a.ui-link-inherit{color:#222;}.ui-btn-down-d{border:1px solid #aaa;background:#fff;font-weight:bold;color:#111;text-shadow:0 1px 1px #fff;background-image:-moz-linear-gradient(top,#eee,#fff);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#eee),color-stop(1,#fff));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#eeeeee',EndColorStr='#ffffff')";}.ui-btn-down-d a.ui-link-inherit{border:1px solid #808080;background:#ced0d2;font-weight:bold;color:#111;text-shadow:none;background-image:-moz-linear-gradient(top,#ccc,#eee);backgroun
d-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#ccc),color-stop(1,#eee));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#cccccc',EndColorStr='#eeeeee')";}.ui-btn-up-d,.ui-btn-hover-d,.ui-btn-down-d{font-family:Helvetica,Arial,sans-serif;}.ui-bar-e{border:1px solid #F7C942;background:#fadb4e;color:#333;text-shadow:0 1px 0 #fff;background-image:-moz-linear-gradient(top,#fceda7,#fadb4e);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fceda7),color-stop(1,#fadb4e));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#fceda7',EndColorStr='#fadb4e')";}.ui-bar-e,.ui-bar-e input,.ui-bar-e select,.ui-bar-e textarea,.ui-bar-d button{font-family:Helvetica,Arial,sans-serif;}.ui-bar-e .ui-link-inherit{color:#333;}.ui-bar-e .ui-link{color:#2489CE;font-weight:bold;}.ui-body-e{border:1px solid #F7C942;color:#333;text-shadow:0 1px 0 #fff;background:#faeb9e;background-image:-moz-linear-gradient(top,#fff,#f
aeb9e);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(1,#faeb9e));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffffff',EndColorStr='#faeb9e')";}.ui-body-e,.ui-body-e input,.ui-body-e select,.ui-body-e textarea,.ui-body-e button{font-family:Helvetica,Arial,sans-serif;}.ui-body-e .ui-link-inherit{color:#333;}.ui-body-e .ui-link{color:#2489CE;font-weight:bold;}.ui-btn-up-e{border:1px solid #F7C942;background:#fadb4e;font-weight:bold;color:#333;cursor:pointer;text-shadow:0 1px 1px #fe3;text-decoration:none;text-shadow:0 1px 0 #fff;background-image:-moz-linear-gradient(top,#fceda7,#fadb4e);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fceda7),color-stop(1,#fadb4e));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#fceda7',EndColorStr='#fadb4e')";}.ui-btn-up-e a.ui-link-inherit{color:#333;}.ui-btn-hover-e{border:1px solid #e79952;background:#fbe26f;font-weight:
bold;color:#111;text-decoration:none;text-shadow:0 1px 1px #fff;background-image:-moz-linear-gradient(top,#fcf0b5,#fbe26f);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fcf0b5),color-stop(1,#fbe26f));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#fcf0b5',EndColorStr='#fbe26f')";}.ui-btn-hover-e a.ui-link-inherit{color:#333;}.ui-btn-down-e{border:1px solid #F7C942;background:#fceda7;font-weight:bold;color:#111;text-shadow:0 1px 1px #fff;background-image:-moz-linear-gradient(top,#fadb4e,#fceda7);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fadb4e),color-stop(1,#fceda7));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#fadb4e',EndColorStr='#fceda7')";}.ui-btn-down-e a.ui-link-inherit{color:#333;}.ui-btn-up-e,.ui-btn-hover-e,.ui-btn-down-e{font-family:Helvetica,Arial,sans-serif;}a.ui-link-inherit{text-decoration:none!important;}.ui-btn-active{border:1px solid #155678;backgr
ound:#4596ce;font-weight:bold;color:#fff;cursor:pointer;text-shadow:0 -1px 1px #145072;text-decoration:none;background-image:-moz-linear-gradient(top,#85bae4,#5393c5);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#85bae4),color-stop(1,#5393c5));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#85bae4',EndColorStr='#5393c5')";}.ui-btn-active a.ui-link-inherit{color:#fff;}.ui-btn-inner{border-top:1px solid #fff;border-color:rgba(255,255,255,.3);}.ui-corner-tl{-moz-border-radius-topleft:.6em;-webkit-border-top-left-radius:.6em;border-top-left-radius:.6em;}.ui-corner-tr{-moz-border-radius-topright:.6em;-webkit-border-top-right-radius:.6em;border-top-right-radius:.6em;}.ui-corner-bl{-moz-border-radius-bottomleft:.6em;-webkit-border-bottom-left-radius:.6em;border-bottom-left-radius:.6em;}.ui-corner-br{-moz-border-radius-bottomright:.6em;-webkit-border-bottom-right-radius:.6em;border-bottom-right-radius:.6em;}.ui-corner-top{-moz-bor
der-radius-topleft:.6em;-webkit-border-top-left-radius:.6em;border-top-left-radius:.6em;-moz-border-radius-topright:.6em;-webkit-border-top-right-radius:.6em;border-top-right-radius:.6em;}.ui-corner-bottom{-moz-border-radius-bottomleft:.6em;-webkit-border-bottom-left-radius:.6em;border-bottom-left-radius:.6em;-moz-border-radius-bottomright:.6em;-webkit-border-bottom-right-radius:.6em;border-bottom-right-radius:.6em;}.ui-corner-right{-moz-border-radius-topright:.6em;-webkit-border-top-right-radius:.6em;border-top-right-radius:.6em;-moz-border-radius-bottomright:.6em;-webkit-border-bottom-right-radius:.6em;border-bottom-right-radius:.6em;}.ui-corner-left{-moz-border-radius-topleft:.6em;-webkit-border-top-left-radius:.6em;border-top-left-radius:.6em;-moz-border-radius-bottomleft:.6em;-webkit-border-bottom-left-radius:.6em;border-bottom-left-radius:.6em;}.ui-corner-all{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em;}.ui-disabled{cursor:default!important;op
acity:.3;}.ui-icon{background-image:url(images/icons-18-white.png);background-repeat:no-repeat;background-color:#666;background-color:rgba(0,0,0,.4);-moz-border-radius:9px;-webkit-border-radius:9px;border-radius:9px;}.ui-icon-disc{background-color:#666;background-color:rgba(0,0,0,.3);-moz-border-radius:9px;-webkit-border-radius:9px;border-radius:9px;}.ui-icon-black{background-image:url(images/icons-18-black.png);}.ui-icon-black-disc{background-color:#fff;background-color:rgba(255,255,255,.3);-moz-border-radius:9px;-webkit-border-radius:9px;border-radius:9px;} media screen and(-webkit-min-device-pixel-ratio:2),screen and(max--moz-device-pixel-ratio:2){.ui-icon{background-image:url(images/icons-36-white.png);background-size:558px 18px;}.ui-icon-black{background-image:url(images/icons-36-black.png);}}.ui-icon-plus{background-position:-0 0;}.ui-icon-minus{background-position:-36px 0;}.ui-icon-delete{background-position:-72px 0;}.ui-icon-arrow-r{background-position:-108px 0;}.ui-
icon-arrow-l{background-position:-144px 0;}.ui-icon-arrow-u{background-position:-180px 0;}.ui-icon-arrow-d{background-position:-216px 0;}.ui-icon-check{background-position:-252px 0;}.ui-icon-gear{background-position:-288px 0;}.ui-icon-refresh{background-position:-324px 0;}.ui-icon-forward{background-position:-360px 0;}.ui-icon-back{background-position:-396px 0;}.ui-icon-grid{background-position:-432px 0;}.ui-icon-star{background-position:-468px 0;}.ui-icon-alert{background-position:-504px 0;}.ui-icon-info{background-position:-540px 0;}.ui-icon-checkbox-off,.ui-icon-checkbox-on,.ui-icon-radio-off,.ui-icon-radio-on{background-color:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;}.ui-icon-checkbox-off{background-image:url(images/form-check-off.png);}.ui-icon-checkbox-on{background-image:url(images/form-check-on.png);}.ui-icon-radio-off{background-image:url(images/form-radio-off.png);}.ui-icon-radio-on{background-image:url(images/form-radio-on.png);}.ui
-icon-search{background-image:url(images/icon-search-black.png);}.ui-icon-loading{background-image:url(images/ajax-loader.png);width:40px;height:40px;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;}.ui-btn-corner-tl{-moz-border-radius-topleft:1em;-webkit-border-top-left-radius:1em;border-top-left-radius:1em;}.ui-btn-corner-tr{-moz-border-radius-topright:1em;-webkit-border-top-right-radius:1em;border-top-right-radius:1em;}.ui-btn-corner-bl{-moz-border-radius-bottomleft:1em;-webkit-border-bottom-left-radius:1em;border-bottom-left-radius:1em;}.ui-btn-corner-br{-moz-border-radius-bottomright:1em;-webkit-border-bottom-right-radius:1em;border-bottom-right-radius:1em;}.ui-btn-corner-top{-moz-border-radius-topleft:1em;-webkit-border-top-left-radius:1em;border-top-left-radius:1em;-moz-border-radius-topright:1em;-webkit-border-top-right-radius:1em;border-top-right-radius:1em;}.ui-btn-corner-bottom{-moz-border-radius-bottomleft:1em;-webkit-border-bottom-left-radi
us:1em;border-bottom-left-radius:1em;-moz-border-radius-bottomright:1em;-webkit-border-bottom-right-radius:1em;border-bottom-right-radius:1em;}.ui-btn-corner-right{-moz-border-radius-topright:1em;-webkit-border-top-right-radius:1em;border-top-right-radius:1em;-moz-border-radius-bottomright:1em;-webkit-border-bottom-right-radius:1em;border-bottom-right-radius:1em;}.ui-btn-corner-left{-moz-border-radius-topleft:1em;-webkit-border-top-left-radius:1em;border-top-left-radius:1em;-moz-border-radius-bottomleft:1em;-webkit-border-bottom-left-radius:1em;border-bottom-left-radius:1em;}.ui-btn-corner-all{-moz-border-radius:1em;-webkit-border-radius:1em;border-radius:1em;}.ui-corner-tl,.ui-corner-tr,.ui-corner-bl,.ui-corner-br,.ui-corner-top,.ui-corner-bottom,.ui-corner-right,.ui-corner-left,.ui-corner-all,.ui-btn-corner-tl,.ui-btn-corner-tr,.ui-btn-corner-bl,.ui-btn-corner-br,.ui-btn-corner-top,.ui-btn-corner-bottom,.ui-btn-corner-right,.ui-btn-corner-left,.ui-btn-corner-all{-webkit-ba
ckground-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.ui-overlay{background:#666;opacity:.5;filter:Alpha(Opacity=50);position:absolute;width:100%;height:100%;}.ui-overlay-shadow{-moz-box-shadow:0 0 12px rgba(0,0,0,.6);-webkit-box-shadow:0 0 12px rgba(0,0,0,.6);box-shadow:0 0 12px rgba(0,0,0,.6);}.ui-shadow{-moz-box-shadow:0 1px 4px rgba(0,0,0,.3);-webkit-box-shadow:0 1px 4px rgba(0,0,0,.3);box-shadow:0 1px 4px rgba(0,0,0,.3);}.ui-bar-a .ui-shadow,.ui-bar-b .ui-shadow,.ui-bar-c .ui-shadow{-moz-box-shadow:0 1px 0 rgba(255,255,255,.3);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.3);box-shadow:0 1px 0 rgba(255,255,255,.3);}.ui-shadow-inset{-moz-box-shadow:inset 0 1px 4px rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 4px rgba(0,0,0,.2);box-shadow:inset 0 1px 4px rgba(0,0,0,.2);}.ui-icon-shadow{-moz-box-shadow:0 1px 0 rgba(255,255,255,.4);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.4);box-shadow:0 1px 0 rgba(255,255,255,.4);}.ui-focus{outline-wi
dth:0;-moz-box-shadow:0 0 12px #387bbe;-webkit-box-shadow:0 0 12px #387bbe;box-shadow:0 0 12px #387bbe;}.ui-mobile-nosupport-boxshadow *{-moz-box-shadow:none!important;-webkit-box-shadow:none!important;box-shadow:none!important;}.ui-mobile-nosupport-boxshadow .ui-focus{outline-width:2px;}.ui-mobile fieldset,.ui-page{padding:0;margin:0;}.ui-mobile a img,.ui-mobile fieldset{border:0;}.ui-mobile body{margin:0;overflow-x:hidden;-webkit-backface-visibility:hidden;-webkit-text-size-adjust:none;min-height:100%;}.ui-page{top:0;left:0;width:100%;min-height:100%;position:absolute;display:none;-webkit-backface-visibility:hidden;border:0;}.ui-page-active{display:block;overflow:visible;}.ui-loading body{overflow:hidden!important;}.ui-loading .ui-loader{display:block;}.ui-loading .ui-page{overflow:hidden;}.ui-loader{display:none;position:absolute;opacity:.85;z-index:10;top:75px;left:50%;width:200px;margin-left:-130px;padding:20px 30px;}.ui-loader h1{font-size:15px;text-align:center;}.ui-l
oader .ui-icon{position:static;display:block;opacity:.9;margin:0 auto;width:35px;height:35px;background-color:transparent;}.ui-bar,.ui-body{position:relative;padding:.4em 15px;overflow:hidden;display:block;clear:both;}.ui-bar{font-size:16px;margin:0;}.ui-bar h1,.ui-bar h2,.ui-bar h3,.ui-bar h4,.ui-bar h5,.ui-bar h6{margin:0;padding:0;font-size:16px;display:inline-block;}.ui-header,.ui-footer{display:block;}.ui-page .ui-header,.ui-page .ui-footer{position:relative;}.ui-header .ui-btn-left{position:absolute;left:10px;top:.4em;}.ui-header .ui-title,.ui-footer .ui-title{text-align:center;font-size:16px;display:block;margin:.6em 90px .8em;padding:0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;outline:0!important;}.ui-header .ui-btn-right{position:absolute;right:10px;top:.4em;}.ui-content{border-width:0;overflow:visible;padding:15px;}.ui-page-fullscreen .ui-content{padding:0;}.ui-icon{width:18px;height:18px;}.ui-fullscreen img{max-width:100%;}.ui-nojs{position:absolut
e;left:-9999px;}.spin{-webkit-transform:rotate(360deg);-webkit-animation-name:spin;-webkit-animation-duration:1s;-webkit-animation-iteration-count:infinite;} -webkit-keyframes spin{from{-webkit-transform:rotate(0deg);}to{-webkit-transform:rotate(360deg);}}.in,.out{-webkit-animation-timing-function:ease-in-out;-webkit-animation-duration:350ms;}.slide.in{-webkit-transform:translateX(0);-webkit-animation-name:slideinfromright;}.slide.out{-webkit-transform:translateX(-100%);-webkit-animation-name:slideouttoleft;}.slide.in.reverse{-webkit-transform:translateX(0);-webkit-animation-name:slideinfromleft;}.slide.out.reverse{-webkit-transform:translateX(100%);-webkit-animation-name:slideouttoright;}.slideup.in{-webkit-transform:translateY(0);-webkit-animation-name:slideinfrombottom;z-index:10;}.slideup.out{-webkit-animation-name:dontmove;z-index:0;}.slideup.out.reverse{-webkit-transform:translateY(100%);z-index:10;-webkit-animation-name:slideouttobottom;}.slideup.in.reverse{z-index:0;
-webkit-animation-name:dontmove;}.slidedown.in{-webkit-transform:translateY(0);-webkit-animation-name:slideinfromtop;z-index:10;}.slidedown.out{-webkit-animation-name:dontmove;z-index:0;}.slidedown.out.reverse{-webkit-transform:translateY(-100%);z-index:10;-webkit-animation-name:slideouttotop;}.slidedown.in.reverse{z-index:0;-webkit-animation-name:dontmove;} -webkit-keyframes slideinfromright{from{-webkit-transform:translateX(100%);}to{-webkit-transform:translateX(0);}} -webkit-keyframes slideinfromleft{from{-webkit-transform:translateX(-100%);}to{-webkit-transform:translateX(0);}} -webkit-keyframes slideouttoleft{from{-webkit-transform:translateX(0);}to{-webkit-transform:translateX(-100%);}} -webkit-keyframes slideouttoright{from{-webkit-transform:translateX(0);}to{-webkit-transform:translateX(100%);}} -webkit-keyframes slideinfromtop{from{-webkit-transform:translateY(-100%);}to{-webkit-transform:translateY(0);}} -webkit-keyframes slideinfrombottom{from{-webkit-transform:tr
anslateY(100%);}to{-webkit-transform:translateY(0);}} -webkit-keyframes slideouttobottom{from{-webkit-transform:translateY(0);}to{-webkit-transform:translateY(100%);}} -webkit-keyframes slideouttotop{from{-webkit-transform:translateY(0);}to{-webkit-transform:translateY(-100%);}} -webkit-keyframes fadein{from{opacity:0;}to{opacity:1;}} -webkit-keyframes fadeout{from{opacity:1;}to{opacity:0;}}.fade.in{opacity:1;z-index:10;-webkit-animation-name:fadein;}.fade.out{z-index:0;}body{-webkit-perspective:1000;}.flip{-webkit-animation-duration:.65s;}.flip.in{-webkit-transform:rotateY(0) scale(1);-webkit-animation-name:flipinfromleft;}.flip.out{-webkit-transform:rotateY(-180deg) scale(.8);-webkit-animation-name:flipouttoleft;}.flip.in.reverse{-webkit-transform:rotateY(0) scale(1);-webkit-animation-name:flipinfromright;}.flip.out.reverse{-webkit-transform:rotateY(180deg) scale(.8);-webkit-animation-name:flipouttoright;} -webkit-keyframes flipinfromright{from{-webkit-transform:rotateY(-1
80deg) scale(.8);}to{-webkit-transform:rotateY(0) scale(1);}} -webkit-keyframes flipinfromleft{from{-webkit-transform:rotateY(180deg) scale(.8);}to{-webkit-transform:rotateY(0) scale(1);}} -webkit-keyframes flipouttoleft{from{-webkit-transform:rotateY(0) scale(1);}to{-webkit-transform:rotateY(-180deg) scale(.8);}} -webkit-keyframes flipouttoright{from{-webkit-transform:rotateY(0) scale(1);}to{-webkit-transform:rotateY(180deg) scale(.8);}} -webkit-keyframes dontmove{from{opacity:1;}to{opacity:1;}}.pop{-webkit-transform-origin:50% 50%;}.pop.in{-webkit-transform:scale(1);opacity:1;-webkit-animation-name:popin;z-index:10;}.pop.out.reverse{-webkit-transform:scale(.2);opacity:0;-webkit-animation-name:popout;z-index:10;}.pop.in.reverse{z-index:0;-webkit-animation-name:dontmove;} -webkit-keyframes popin{from{-webkit-transform:scale(.2);opacity:0;}to{-webkit-transform:scale(1);opacity:1;}} -webkit-keyframes popout{from{-webkit-transform:scale(1);opacity:1;}to{-webkit-transform:scale(
.2);opacity:0;}}.ui-grid-a,.ui-grid-b,.ui-grid-c{overflow:hidden;}.ui-block-a,.ui-block-b,.ui-block-c,.ui-block-d{margin:0;padding:0;border:0;float:left;}.ui-grid-a .ui-block-a,.ui-grid-a .ui-block-b{width:50%;}.ui-grid-a .ui-block-a{clear:left;}.ui-grid-b .ui-block-a,.ui-grid-b .ui-block-b,.ui-grid-b .ui-block-c{width:33.333%;}.ui-grid-b .ui-block-a{clear:left;}.ui-header,.ui-footer,.ui-page-fullscreen .ui-header,.ui-page-fullscreen .ui-footer{position:absolute;overflow:hidden;width:100%;border-left-width:0;border-right-width:0;}.ui-header-fixed,.ui-footer-fixed{z-index:1000;}.ui-footer-duplicate,.ui-page-fullscreen .ui-fixed-inline{display:none;}.ui-page-fullscreen .ui-header,.ui-page-fullscreen .ui-footer{opacity:.9;}.ui-navbar{overflow:hidden;}.ui-navbar ul,.ui-navbar-expanded ul{list-style:none;padding:0;margin:0;position:relative;display:block;border:0;}.ui-navbar-collapsed ul{float:left;width:75%;margin-right:-2px;}.ui-navbar-collapsed .ui-navbar-toggle{float:left;wid
th:25%;}.ui-navbar li.ui-navbar-truncate{position:absolute;left:-99999px;top:-99999px;}.ui-navbar li .ui-btn,.ui-navbar .ui-navbar-toggle .ui-btn{display:block;font-size:12px;text-align:center;margin:0;outline:none;border-right-width:0;}.ui-navbar li .ui-btn{margin-right:-1px;}.ui-navbar li .ui-btn:last-child{margin-right:0;}.ui-header .ui-navbar li .ui-btn,.ui-header .ui-navbar .ui-navbar-toggle .ui-btn,.ui-footer .ui-navbar li .ui-btn,.ui-footer .ui-navbar .ui-navbar-toggle .ui-btn{border-top-width:0;border-bottom-width:0;}.ui-navbar .ui-btn-inner{padding-left:2px;padding-right:2px;}.ui-navbar-noicons li .ui-btn .ui-btn-inner,.ui-navbar-noicons .ui-navbar-toggle .ui-btn-inner{padding-top:.8em;padding-bottom:.9em;}.ui-navbar-expanded .ui-btn{margin:0;font-size:14px;}.ui-navbar-expanded .ui-btn-inner{padding-left:5px;padding-right:5px;}.ui-navbar-expanded .ui-btn-icon-top .ui-btn-inner{padding:45px 5px 15px;text-align:center;}.ui-navbar-expanded .ui-btn-icon-top .ui-icon{top
:15px;}.ui-navbar-expanded .ui-btn-icon-bottom .ui-btn-inner{padding:15px 5px 45px;text-align:center;}.ui-navbar-expanded .ui-btn-icon-bottom .ui-icon{bottom:15px;}.ui-navbar-expanded li .ui-btn .ui-btn-inner{min-height:2.5em;}.ui-navbar-expanded .ui-navbar-noicons .ui-btn .ui-btn-inner{padding-top:1.8em;padding-bottom:1.9em;}.ui-btn{display:block;text-align:center;cursor:pointer;position:relative;margin:.5em 5px;padding:0;}.ui-btn:focus,.ui-btn a:focus{outline:none;}.ui-header .ui-btn,.ui-footer .ui-btn,.ui-bar .ui-btn{display:inline-block;font-size:13px;margin:0;}.ui-btn-inline{display:inline-block;}.ui-btn-inner{padding:.6em 25px;display:block;height:100%;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;position:relative;}.ui-header .ui-btn-inner,.ui-footer .ui-btn-inner,.ui-bar .ui-btn-inner{padding:.4em 8px .5em;}.ui-btn-icon-notext{display:block;width:20px;height:20px;padding:1px 0 1px 2px;text-indent:-9999px;}.ui-btn-icon-notext .ui-btn-inner{padding:0;}.ui-b
tn-icon-notext .ui-btn-text{position:absolute;left:-999px;}.ui-btn-icon-left .ui-btn-inner{padding-left:33px;}.ui-header .ui-btn-icon-left .ui-btn-inner,.ui-footer .ui-btn-icon-left .ui-btn-inner,.ui-bar .ui-btn-icon-left .ui-btn-inner{padding-left:27px;}.ui-btn-icon-right .ui-btn-inner{padding-right:33px;}.ui-header .ui-btn-icon-right .ui-btn-inner,.ui-footer .ui-btn-icon-right .ui-btn-inner,.ui-bar .ui-btn-icon-right .ui-btn-inner{padding-right:27px;}.ui-btn-icon-top .ui-btn-inner{padding-top:33px;}.ui-header .ui-btn-icon-top .ui-btn-inner,.ui-footer .ui-btn-icon-top .ui-btn-inner,.ui-bar .ui-btn-icon-top .ui-btn-inner{padding-top:27px;}.ui-btn-icon-bottom .ui-btn-inner{padding-bottom:33px;}.ui-header .ui-btn-icon-bottom .ui-btn-inner,.ui-footer .ui-btn-icon-bottom .ui-btn-inner,.ui-bar .ui-btn-icon-bottom .ui-btn-inner{padding-bottom:27px;}.ui-btn-icon-notext .ui-icon{display:block;}.ui-btn-icon-left .ui-icon,.ui-btn-icon-right .ui-icon{position:absolute;top:50%;margin-to
p:-9px;}.ui-btn-icon-top .ui-icon,.ui-btn-icon-bottom .ui-icon{position:absolute;left:50%;margin-left:-9px;}.ui-btn-icon-left .ui-icon{left:10px;}.ui-btn-icon-right .ui-icon{right:10px;}.ui-header .ui-btn-icon-left .ui-icon,.ui-footer .ui-btn-icon-left .ui-icon,.ui-bar .ui-btn-icon-left .ui-icon{left:4px;}.ui-header .ui-btn-icon-right .ui-icon,.ui-footer .ui-btn-icon-right .ui-icon,.ui-bar .ui-btn-icon-right .ui-icon{right:4px;}.ui-header .ui-btn-icon-top .ui-icon,.ui-footer .ui-btn-icon-top .ui-icon,.ui-bar .ui-btn-icon-top .ui-icon{top:4px;}.ui-header .ui-btn-icon-bottom .ui-icon,.ui-footer .ui-btn-icon-bottom .ui-icon,.ui-bar .ui-btn-icon-bottom .ui-icon{bottom:4px;}.ui-btn-icon-top .ui-icon{top:5px;}.ui-btn-icon-bottom .ui-icon{bottom:5px;}.ui-btn-hidden{position:absolute;left:-9999px;}.ui-collapsible-contain{margin:.5em 0;}.ui-collapsible-heading{font-size:16px;display:block;margin:0 -8px;padding:0;border-width:0 0 1px 0;position:relative;}.ui-collapsible-heading a{text
-align:left;margin:0;}.ui-collapsible-heading a .ui-btn-inner{padding-left:40px;}.ui-collapsible-heading a span.ui-btn{position:absolute;left:6px;top:50%;margin:-12px 0 0 0;width:20px;height:20px;padding:1px 0 1px 2px;text-indent:-9999px;}.ui-collapsible-heading a span.ui-btn .ui-btn-inner{padding:0;}.ui-collapsible-heading a span.ui-btn .ui-icon{left:0;margin-top:-10px;}.ui-collapsible-heading-status{position:absolute;left:-99999px;}.ui-collapsible-content{display:block;padding:10px 0 10px 8px;}.ui-collapsible-content-collapsed{display:none;}.ui-collapsible-set{margin:.5em 0;}.ui-collapsible-set .ui-collapsible-contain{margin:-1px 0 0;}.ui-controlgroup,fieldset.ui-controlgroup{padding:0;margin:.5em 0 1em;}.ui-bar .ui-controlgroup{margin:0 .3em;}.ui-controlgroup-label{font-size:16px;line-height:1.4;font-weight:normal;margin:0 0 .3em;}.ui-controlgroup-controls{display:block;width:95%;}.ui-controlgroup li{list-style:none;}.ui-controlgroup-vertical .ui-btn,.ui-controlgroup-vert
ical .ui-checkbox,.ui-controlgroup-vertical .ui-radio{margin:0;border-bottom-width:0;}.ui-controlgroup-vertical .ui-controlgroup-last{border-bottom-width:1px;}.ui-controlgroup-horizontal{padding:0;}.ui-controlgroup-horizontal .ui-btn,.ui-controlgroup-horizontal .ui-checkbox,.ui-controlgroup-horizontal .ui-radio{margin:0 -5px 0 0;display:inline-block;}.ui-controlgroup-horizontal .ui-checkbox .ui-btn,.ui-controlgroup-horizontal .ui-radio .ui-btn,.ui-controlgroup-horizontal .ui-checkbox:last-child,.ui-controlgroup-horizontal .ui-radio:last-child{margin-right:0;}.ui-controlgroup-horizontal .ui-controlgroup-last{margin-right:0;}.ui-controlgroup .ui-checkbox label,.ui-controlgroup .ui-radio label{font-size:16px;}.min-width-480px .ui-controlgroup-label{vertical-align:top;display:inline-block;width:20%;margin:0 2% 0 0;}.min-width-480px .ui-controlgroup-controls{width:60%;display:inline-block;}.ui-dialog .ui-header,.ui-dialog .ui-content,.ui-dialog .ui-footer{margin:15px;position:rel
ative;}.ui-dialog .ui-header,.ui-dialog .ui-footer{z-index:10;width:auto;}.ui-dialog .ui-content,.ui-dialog .ui-footer{margin-top:-15px;}.ui-checkbox,.ui-radio{position:relative;margin:.2em 0 .5em;}.ui-checkbox .ui-btn,.ui-radio .ui-btn{margin:0;text-align:left;}.ui-checkbox .ui-btn-icon-left .ui-btn-inner,.ui-radio .ui-btn-icon-left .ui-btn-inner{padding-left:45px;}.ui-checkbox .ui-btn-icon-right .ui-btn-inner,.ui-radio .ui-btn-icon-right .ui-btn-inner{padding-right:45px;}.ui-checkbox .ui-btn-icon-left .ui-icon,.ui-radio .ui-btn-icon-left .ui-icon{left:15px;}.ui-checkbox .ui-btn-icon-right .ui-icon,.ui-radio .ui-btn-icon-right .ui-icon{right:15px;}.ui-checkbox input,.ui-radio input{position:absolute;left:20px;top:50%;width:10px;height:10px;margin:-5px 0 0 0;outline:0!important;}.ui-field-contain{background:none;padding:1.5em 0;margin:0;border-bottom-width:1px;overflow:visible;}.ui-field-contain:first-child{border-top-width:0;} media screen and(max-width:480px){.ui-field-con
tain{border-width:0;padding:0;margin:1em 0;}}.ui-select{display:block;}.ui-select select{position:absolute;left:-99999px;}.ui-select .ui-btn-icon-right .ui-btn-inner{padding-right:45px;}.ui-select .ui-btn-icon-right .ui-icon{right:15px;}label.ui-select{font-size:16px;line-height:1.4;font-weight:normal;margin:0 0 .3em;display:block;}.ui-listbox{position:absolute;padding:0;z-index:100!important;width:80%;max-width:350px;padding:6px;}.ui-listbox .ui-listview{margin:0;}.ui-listbox-hidden{top:-999999px;left:-99999px;}.ui-listbox-screen{position:absolute;top:0;left:0;width:100%;height:100%;z-index:99;}.ui-screen-hidden,.ui-listbox-list .ui-li .ui-icon{display:none;}.ui-listbox-list .ui-btn-active .ui-icon{display:block;}.ui-helper-hidden,.ui-mobile .ui-content-hidden{display:none;}.min-width-480px label.ui-select{display:inline-block;width:20%;margin:0 2% 0 0;}.min-width-480px .ui-select{width:60%;display:inline-block;}label.ui-input-text{font-size:16px;line-height:1.4;display:blo
ck;font-weight:normal;margin:0 0 .3em;}input.ui-input-text,textarea.ui-input-text{background-image:none;padding:.4em;line-height:1.4;font-size:16px;display:block;width:95%;}textarea.ui-input-text{height:50px;-webkit-transition:height 200ms linear;-moz-transition:height 200ms linear;-o-transition:height 200ms linear;transition:height 200ms linear;}.ui-input-search{padding:0 30px;width:77%;background-position:8px 50%;background-repeat:no-repeat;position:relative;}.ui-input-search input.ui-input-text{border:none;width:98%;padding:.4em 0;margin:0;display:block;background:transparent none;outline:0!important;}.ui-input-search .ui-input-clear{position:absolute;right:2px;top:50%;margin-top:-12px;}.ui-input-search .ui-input-clear-hidden{display:none;}.min-width-480px label.ui-input-text{vertical-align:top;}.min-width-480px label.ui-input-text,label.ui-select{display:inline-block;width:20%;margin:0 2% 0 0;}.min-width-480px input.ui-input-text,textarea.ui-input-text,.ui-input-search{w
idth:60%;display:inline-block;}.min-width-480px .ui-input-search{width:50%;}.ui-listview{margin:0;counter-reset:listnumbering;}.ui-content .ui-listview{margin:-15px;}.ui-content .ui-listview-inset{margin:1em 0;}.ui-listview,.ui-li{list-style:none;padding:0;zoom:1;}.ui-li{display:block;margin:0;position:relative;overflow:hidden;text-align:left;border-width:0;border-top-width:1px;}.ui-li .ui-btn-text{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;}.ui-li-divider,.ui-li-static{padding:.5em 15px;font-size:14px;font-weight:bold;counter-reset:listnumbering;}ol.ui-listview .ui-link-inherit:before,.ui-li-dec{font-size:.8em;display:inline-block;padding-right:.3em;font-weight:normal;counter-increment:listnumbering;content:counter(listnumbering) ". ";}ol.ui-listview .ui-li-jsnumbering:before{content:""!important;}.ui-listview-inset .ui-li{border-right-width:1px;border-left-width:1px;}.ui-li:last-child{border-bottom-width:1px;}.ui-li .ui-btn-inner{display:block;position:relat
ive;padding:.7em 75px .7em 15px;}.ui-li-has-thumb .ui-btn-inner{min-height:60px;padding-left:100px;}.ui-li-has-icon .ui-btn-inner{min-height:20px;padding-left:40px;}.ui-li-heading{font-size:16px;font-weight:bold;display:block;margin:.6em 0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;}.ui-li-desc{font-size:12px;font-weight:normal;display:block;margin:-.5em 0 .6em;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;}.ui-li-thumb,.ui-li-icon{position:absolute;left:1px;top:0;max-height:80px;max-width:80px;}.ui-li-icon{max-height:40px;max-width:40px;left:10px;top:.9em;}.ui-li-thumb,.ui-li-icon,.ui-li-content{float:left;margin-right:10px;}.ui-li-aside{float:right;width:25%;text-align:right;margin:.3em 0;}.ui-li-has-alt .ui-btn-inner{padding-right:95px;}.ui-li-count{position:absolute;font-size:11px;font-weight:bold;padding:.2em .5em;top:50%;margin-top:-.9em;right:38px;}.ui-li-divider .ui-li-count{right:10px;}.ui-li-has-alt .ui-li-count{right:55px;}.ui-li-link-al
t{position:absolute;width:40px;height:100%;border-width:0;border-left-width:1px;top:0;right:0;margin:0;padding:0;}.ui-li-link-alt .ui-btn{overflow:hidden;position:absolute;right:8px;top:50%;margin:-11px 0 0 0;border-bottom-width:1px;}.ui-li-link-alt .ui-btn-inner{padding:0;position:static;}.ui-li-link-alt .ui-btn .ui-icon{right:50%;margin-right:-9px;}.ui-listview-filter{border-width:0;overflow:hidden;margin:-15px -15px 15px -15px;}.ui-listview-filter .ui-input-search{margin:5px;width:auto;display:block;} media only screen and(min-device-width:768px) and(max-device-width:1024px){.ui-li .ui-btn-text{overflow:visible;}}label.ui-slider{display:block;}input.ui-slider-input{display:inline-block;width:40px;}select.ui-slider-switch{display:none;}div.ui-slider{position:relative;display:inline-block;overflow:visible;height:15px;padding:0;margin:0 2% 0 15px;top:4px;width:66%;}a.ui-slider-handle{position:absolute;z-index:10;top:50%;width:28px;height:28px;margin-top:-15px;margin-left:-15
px;}a.ui-slider-handle .ui-btn-inner{padding-left:0;padding-right:0;}.min-width-480px label.ui-slider{display:inline-block;width:20%;margin:0 2% 0 0;}.min-width-480px div.ui-slider{width:45%;}div.ui-slider-switch{height:32px;overflow:hidden;margin-left:0;}div.ui-slider-inneroffset{margin-left:50%;position:absolute;top:1px;height:100%;width:50%;}div.ui-slider-handle-snapping{-webkit-transition:left 100ms linear;}div.ui-slider-labelbg{position:absolute;top:0;margin:0;border-width:0;}div.ui-slider-switch div.ui-slider-labelbg-a{width:60%;height:100%;left:0;}div.ui-slider-switch div.ui-slider-labelbg-b{width:60%;height:100%;right:0;}.ui-slider-switch-a div.ui-slider-labelbg-a,.ui-slider-switch-b div.ui-slider-labelbg-b{z-index:1;}.ui-slider-switch-a div.ui-slider-labelbg-b,.ui-slider-switch-b div.ui-slider-labelbg-a{z-index:10;}div.ui-slider-switch a.ui-slider-handle{z-index:20;width:101%;height:32px;margin-top:-18px;margin-left:-101%;}span.ui-slider-label{width:100%;position:ab
solute;height:32px;font-size:16px;text-align:center;line-height:2;background:none;border-color:transparent;}span.ui-slider-label-a{left:-100%;margin-right:-1px;}span.ui-slider-label-b{right:-100%;margin-left:-1px;}
\ No newline at end of file
diff --git a/site_media/js/jquery.mobile-1.0a1.js b/site_media/js/jquery.mobile-1.0a1.js
new file mode 100644
index 0000000..480729e
--- /dev/null
+++ b/site_media/js/jquery.mobile-1.0a1.js
@@ -0,0 +1,3106 @@
+/*!
+ * jQuery Mobile
+ * http://jquerymobile.com/
+ *
+ * Copyright 2010, jQuery Project
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ */
+/*!
+ * jQuery UI Widget @VERSION
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Widget
+ */
+(function( $, undefined ) {
+
+// jQuery 1.4+
+if ( $.cleanData ) {
+ var _cleanData = $.cleanData;
+ $.cleanData = function( elems ) {
+ for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+ $( elem ).triggerHandler( "remove" );
+ }
+ _cleanData( elems );
+ };
+} else {
+ var _remove = $.fn.remove;
+ $.fn.remove = function( selector, keepData ) {
+ return this.each(function() {
+ if ( !keepData ) {
+ if ( !selector || $.filter( selector, [ this ] ).length ) {
+ $( "*", this ).add( [ this ] ).each(function() {
+ $( this ).triggerHandler( "remove" );
+ });
+ }
+ }
+ return _remove.call( $(this), selector, keepData );
+ });
+ };
+}
+
+$.widget = function( name, base, prototype ) {
+ var namespace = name.split( "." )[ 0 ],
+ fullName;
+ name = name.split( "." )[ 1 ];
+ fullName = namespace + "-" + name;
+
+ if ( !prototype ) {
+ prototype = base;
+ base = $.Widget;
+ }
+
+ // create selector for plugin
+ $.expr[ ":" ][ fullName ] = function( elem ) {
+ return !!$.data( elem, name );
+ };
+
+ $[ namespace ] = $[ namespace ] || {};
+ $[ namespace ][ name ] = function( options, element ) {
+ // allow instantiation without initializing for simple inheritance
+ if ( arguments.length ) {
+ this._createWidget( options, element );
+ }
+ };
+
+ var basePrototype = new base();
+ // we need to make the options hash a property directly on the new instance
+ // otherwise we'll modify the options hash on the prototype that we're
+ // inheriting from
+// $.each( basePrototype, function( key, val ) {
+// if ( $.isPlainObject(val) ) {
+// basePrototype[ key ] = $.extend( {}, val );
+// }
+// });
+ basePrototype.options = $.extend( true, {}, basePrototype.options );
+ $[ namespace ][ name ].prototype = $.extend( true, basePrototype, {
+ namespace: namespace,
+ widgetName: name,
+ widgetEventPrefix: $[ namespace ][ name ].prototype.widgetEventPrefix || name,
+ widgetBaseClass: fullName
+ }, prototype );
+
+ $.widget.bridge( name, $[ namespace ][ name ] );
+};
+
+$.widget.bridge = function( name, object ) {
+ $.fn[ name ] = function( options ) {
+ var isMethodCall = typeof options === "string",
+ args = Array.prototype.slice.call( arguments, 1 ),
+ returnValue = this;
+
+ // allow multiple hashes to be passed on init
+ options = !isMethodCall && args.length ?
+ $.extend.apply( null, [ true, options ].concat(args) ) :
+ options;
+
+ // prevent calls to internal methods
+ if ( isMethodCall && options.charAt( 0 ) === "_" ) {
+ return returnValue;
+ }
+
+ if ( isMethodCall ) {
+ this.each(function() {
+ var instance = $.data( this, name );
+ if ( !instance ) {
+ throw "cannot call methods on " + name + " prior to initialization; " +
+ "attempted to call method '" + options + "'";
+ }
+ if ( !$.isFunction( instance[options] ) ) {
+ throw "no such method '" + options + "' for " + name + " widget instance";
+ }
+ var methodValue = instance[ options ].apply( instance, args );
+ if ( methodValue !== instance && methodValue !== undefined ) {
+ returnValue = methodValue;
+ return false;
+ }
+ });
+ } else {
+ this.each(function() {
+ var instance = $.data( this, name );
+ if ( instance ) {
+ instance.option( options || {} )._init();
+ } else {
+ $.data( this, name, new object( options, this ) );
+ }
+ });
+ }
+
+ return returnValue;
+ };
+};
+
+$.Widget = function( options, element ) {
+ // allow instantiation without initializing for simple inheritance
+ if ( arguments.length ) {
+ this._createWidget( options, element );
+ }
+};
+
+$.Widget.prototype = {
+ widgetName: "widget",
+ widgetEventPrefix: "",
+ options: {
+ disabled: false
+ },
+ _createWidget: function( options, element ) {
+ // $.widget.bridge stores the plugin instance, but we do it anyway
+ // so that it's stored even before the _create function runs
+ $.data( element, this.widgetName, this );
+ this.element = $( element );
+ this.options = $.extend( true, {},
+ this.options,
+ this._getCreateOptions(),
+ options );
+
+ var self = this;
+ this.element.bind( "remove." + this.widgetName, function() {
+ self.destroy();
+ });
+
+ this._create();
+ this._trigger( "create" );
+ this._init();
+ },
+ _getCreateOptions: function() {
+ var options = {};
+ if ( $.metadata ) {
+ options = $.metadata.get( element )[ this.widgetName ];
+ }
+ return options;
+ },
+ _create: function() {},
+ _init: function() {},
+
+ destroy: function() {
+ this.element
+ .unbind( "." + this.widgetName )
+ .removeData( this.widgetName );
+ this.widget()
+ .unbind( "." + this.widgetName )
+ .removeAttr( "aria-disabled" )
+ .removeClass(
+ this.widgetBaseClass + "-disabled " +
+ "ui-state-disabled" );
+ },
+
+ widget: function() {
+ return this.element;
+ },
+
+ option: function( key, value ) {
+ var options = key;
+
+ if ( arguments.length === 0 ) {
+ // don't return a reference to the internal hash
+ return $.extend( {}, this.options );
+ }
+
+ if (typeof key === "string" ) {
+ if ( value === undefined ) {
+ return this.options[ key ];
+ }
+ options = {};
+ options[ key ] = value;
+ }
+
+ this._setOptions( options );
+
+ return this;
+ },
+ _setOptions: function( options ) {
+ var self = this;
+ $.each( options, function( key, value ) {
+ self._setOption( key, value );
+ });
+
+ return this;
+ },
+ _setOption: function( key, value ) {
+ this.options[ key ] = value;
+
+ if ( key === "disabled" ) {
+ this.widget()
+ [ value ? "addClass" : "removeClass"](
+ this.widgetBaseClass + "-disabled" + " " +
+ "ui-state-disabled" )
+ .attr( "aria-disabled", value );
+ }
+
+ return this;
+ },
+
+ enable: function() {
+ return this._setOption( "disabled", false );
+ },
+ disable: function() {
+ return this._setOption( "disabled", true );
+ },
+
+ _trigger: function( type, event, data ) {
+ var callback = this.options[ type ];
+
+ event = $.Event( event );
+ event.type = ( type === this.widgetEventPrefix ?
+ type :
+ this.widgetEventPrefix + type ).toLowerCase();
+ data = data || {};
+
+ // copy original event properties over to the new event
+ // this would happen if we could call $.event.fix instead of $.Event
+ // but we don't have a way to force an event to be fixed multiple times
+ if ( event.originalEvent ) {
+ for ( var i = $.event.props.length, prop; i; ) {
+ prop = $.event.props[ --i ];
+ event[ prop ] = event.originalEvent[ prop ];
+ }
+ }
+
+ this.element.trigger( event, data );
+
+ return !( $.isFunction(callback) &&
+ callback.call( this.element[0], event, data ) === false ||
+ event.isDefaultPrevented() );
+ }
+};
+
+})( jQuery );
+(function( $ ) {
+
+$.widget( "mobile.widget", {
+ _getCreateOptions: function() {
+ var elem = this.element,
+ options = {};
+ $.each( this.options, function( option ) {
+ var value = elem.data( option.replace( /[A-Z]/g, function( c ) {
+ return "-" + c.toLowerCase();
+ } ) );
+ if ( value !== undefined ) {
+ options[ option ] = value;
+ }
+ });
+ return options;
+ }
+});
+
+})( jQuery );
+/*
+Possible additions:
+ scollTop
+ CSS Matrix
+*/
+
+// test whether a CSS media type or query applies
+$.media = (function() {
+ // TODO: use window.matchMedia once at least one UA implements it
+ var cache = {},
+ $html = $( "html" ),
+ testDiv = $( "<div id='jquery-mediatest'>" ),
+ fakeBody = $( "<body>" ).append( testDiv );
+
+ return function( query ) {
+ if ( !( query in cache ) ) {
+ var styleBlock = $( "<style type='text/css'>" +
+ "@media " + query + "{#jquery-mediatest{position:absolute;}}" +
+ "</style>" );
+ $html.prepend( fakeBody ).prepend( styleBlock );
+ cache[ query ] = testDiv.css( "position" ) === "absolute";
+ fakeBody.add( styleBlock ).remove();
+ }
+ return cache[ query ];
+ };
+})();
+
+var fakeBody = $( "<body>" ).prependTo( "html" ),
+ fbCSS = fakeBody[0].style,
+ vendors = ['webkit','moz','o'],
+ webos = window.palmGetResource || window.PalmServiceBridge, //only used to rule out scrollTop
+ bb = window.blackberry; //only used to rule out box shadow, as it's filled opaque on BB
+
+//thx Modernizr
+function propExists( prop ){
+ var uc_prop = prop.charAt(0).toUpperCase() + prop.substr(1),
+ props = (prop + ' ' + vendors.join(uc_prop + ' ') + uc_prop).split(' ');
+ for(var v in props){
+ if( fbCSS[ v ] !== undefined ){
+ return true;
+ }
+ }
+};
+
+//test for dynamic-updating base tag support (allows us to avoid href,src attr rewriting)
+function baseTagTest(){
+ var fauxBase = location.protocol + '//' + location.host + location.pathname + "ui-dir/",
+ base = $("<base>", {"href": fauxBase}).appendTo("head"),
+ link = $( "<a href='testurl'></a>" ).prependTo( fakeBody ),
+ rebase = link[0].href;
+ base.remove();
+ return rebase.indexOf(fauxBase) === 0;
+};
+
+$.extend( $.support, {
+ orientation: "orientation" in window,
+ touch: "ontouchend" in document,
+ WebKitAnimationEvent: typeof WebKitTransitionEvent === "object",
+ pushState: !!history.pushState,
+ mediaquery: $.media('only all'),
+ cssPseudoElement: !!propExists('content'),
+ boxShadow: !!propExists('boxShadow') && !bb,
+ scrollTop: ("pageXOffset" in window || "scrollTop" in document.documentElement || "scrollTop" in fakeBody[0]) && !webos,
+ dynamicBaseTag: baseTagTest()
+});
+
+fakeBody.remove();
+
+//for ruling out shadows via css
+if( !$.support.boxShadow ){ $('html').addClass('ui-mobile-nosupport-boxshadow'); }// add new event shortcuts
+$.each( "touchstart touchmove touchend orientationchange tap taphold swipe swipeleft swiperight scrollstart scrollstop".split( " " ), function( i, name ) {
+ $.fn[ name ] = function( fn ) {
+ return fn ? this.bind( name, fn ) : this.trigger( name );
+ };
+ $.attrFn[ name ] = true;
+});
+
+var supportTouch = $.support.touch,
+ scrollEvent = "touchmove scroll",
+ touchStartEvent = supportTouch ? "touchstart" : "mousedown",
+ touchStopEvent = supportTouch ? "touchend" : "mouseup",
+ touchMoveEvent = supportTouch ? "touchmove" : "mousemove";
+
+// also handles scrollstop
+$.event.special.scrollstart = {
+ enabled: true,
+
+ setup: function() {
+ var thisObject = this,
+ $this = $( thisObject ),
+ scrolling,
+ timer;
+
+ function trigger( event, state ) {
+ scrolling = state;
+ var originalType = event.type;
+ event.type = scrolling ? "scrollstart" : "scrollstop";
+ $.event.handle.call( thisObject, event );
+ event.type = originalType;
+ }
+
+ // iPhone triggers scroll after a small delay; use touchmove instead
+ $this.bind( scrollEvent, function( event ) {
+ if ( !$.event.special.scrollstart.enabled ) {
+ return;
+ }
+
+ if ( !scrolling ) {
+ trigger( event, true );
+ }
+
+ clearTimeout( timer );
+ timer = setTimeout(function() {
+ trigger( event, false );
+ }, 50 );
+ });
+ }
+};
+
+// also handles taphold
+$.event.special.tap = {
+ setup: function() {
+ var thisObject = this,
+ $this = $( thisObject );
+
+ $this
+ .bind( touchStartEvent, function( event ) {
+ if ( event.which && event.which !== 1 ) {
+ return;
+ }
+
+ var moved = false,
+ touching = true,
+ originalType,
+ timer;
+
+ function moveHandler() {
+ moved = true;
+ }
+
+ timer = setTimeout(function() {
+ if ( touching && !moved ) {
+ originalType = event.type;
+ event.type = "taphold";
+ $.event.handle.call( thisObject, event );
+ event.type = originalType;
+ }
+ }, 750 );
+
+ $this
+ .one( touchMoveEvent, moveHandler)
+ .one( touchStopEvent, function( event ) {
+ $this.unbind( touchMoveEvent, moveHandler );
+ clearTimeout( timer );
+ touching = false;
+
+ if ( !moved ) {
+ originalType = event.type;
+ event.type = "tap";
+ $.event.handle.call( thisObject, event );
+ event.type = originalType;
+ }
+ });
+ });
+ }
+};
+
+// also handles swipeleft, swiperight
+$.event.special.swipe = {
+ setup: function() {
+ var thisObject = this,
+ $this = $( thisObject );
+
+ $this
+ .bind( touchStartEvent, function( event ) {
+ var data = event.originalEvent.touches ?
+ event.originalEvent.touches[ 0 ] :
+ event,
+ start = {
+ time: (new Date).getTime(),
+ coords: [ data.pageX, data.pageY ],
+ origin: $( event.target )
+ },
+ stop;
+
+ function moveHandler( event ) {
+ if ( !start ) {
+ return;
+ }
+
+ var data = event.originalEvent.touches ?
+ event.originalEvent.touches[ 0 ] :
+ event;
+ stop = {
+ time: (new Date).getTime(),
+ coords: [ data.pageX, data.pageY ]
+ };
+
+ // prevent scrolling
+ if ( Math.abs( start.coords[0] - stop.coords[0] ) > 10 ) {
+ event.preventDefault();
+ }
+ }
+
+ $this
+ .bind( touchMoveEvent, moveHandler )
+ .one( touchStopEvent, function( event ) {
+ $this.unbind( touchMoveEvent, moveHandler );
+ if ( start && stop ) {
+ if ( stop.time - start.time < 1000 &&
+ Math.abs( start.coords[0] - stop.coords[0]) > 30 &&
+ Math.abs( start.coords[1] - stop.coords[1]) < 20 ) {
+ start.origin
+ .trigger( "swipe" )
+ .trigger( start.coords[0] > stop.coords[0] ? "swipeleft" : "swiperight" );
+ }
+ }
+ start = stop = undefined;
+ });
+ });
+ }
+};
+
+$.event.special.orientationchange = {
+ orientation: function( elem ) {
+ return document.body && elem.width() / elem.height() < 1.1 ? "portrait" : "landscape";
+ },
+
+ setup: function() {
+ var thisObject = this,
+ $this = $( thisObject ),
+ orientation = $.event.special.orientationchange.orientation( $this );
+
+ function handler() {
+ var newOrientation = $.event.special.orientationchange.orientation( $this );
+
+ if ( orientation !== newOrientation ) {
+ $.event.handle.call( thisObject, "orientationchange", {
+ orientation: newOrientation
+ } );
+ orientation = newOrientation;
+ }
+ }
+
+ if ( $.support.orientation ) {
+ thisObject.addEventListener( "orientationchange", handler, false );
+ } else {
+ $this.bind( "resize", handler );
+ }
+ }
+};
+
+$.each({
+ scrollstop: "scrollstart",
+ taphold: "tap",
+ swipeleft: "swipe",
+ swiperight: "swipe"
+}, function( event, sourceEvent ) {
+ $.event.special[ event ] = {
+ setup: function() {
+ $( this ).bind( sourceEvent, $.noop );
+ }
+ };
+});
+/*!
+ * jQuery hashchange event - v1.3 - 7/21/2010
+ * http://benalman.com/projects/jquery-hashchange-plugin/
+ *
+ * Copyright (c) 2010 "Cowboy" Ben Alman
+ * Dual licensed under the MIT and GPL licenses.
+ * http://benalman.com/about/license/
+ */
+
+// Script: jQuery hashchange event
+//
+// *Version: 1.3, Last updated: 7/21/2010*
+//
+// Project Home - http://benalman.com/projects/jquery-hashchange-plugin/
+// GitHub - http://github.com/cowboy/jquery-hashchange/
+// Source - http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.js
+// (Minified) - http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.min.js (0.8kb gzipped)
+//
+// About: License
+//
+// Copyright (c) 2010 "Cowboy" Ben Alman,
+// Dual licensed under the MIT and GPL licenses.
+// http://benalman.com/about/license/
+//
+// About: Examples
+//
+// These working examples, complete with fully commented code, illustrate a few
+// ways in which this plugin can be used.
+//
+// hashchange event - http://benalman.com/code/projects/jquery-hashchange/examples/hashchange/
+// document.domain - http://benalman.com/code/projects/jquery-hashchange/examples/document_domain/
+//
+// About: Support and Testing
+//
+// Information about what version or versions of jQuery this plugin has been
+// tested with, what browsers it has been tested in, and where the unit tests
+// reside (so you can test it yourself).
+//
+// jQuery Versions - 1.2.6, 1.3.2, 1.4.1, 1.4.2
+// Browsers Tested - Internet Explorer 6-8, Firefox 2-4, Chrome 5-6, Safari 3.2-5,
+// Opera 9.6-10.60, iPhone 3.1, Android 1.6-2.2, BlackBerry 4.6-5.
+// Unit Tests - http://benalman.com/code/projects/jquery-hashchange/unit/
+//
+// About: Known issues
+//
+// While this jQuery hashchange event implementation is quite stable and
+// robust, there are a few unfortunate browser bugs surrounding expected
+// hashchange event-based behaviors, independent of any JavaScript
+// window.onhashchange abstraction. See the following examples for more
+// information:
+//
+// Chrome: Back Button - http://benalman.com/code/projects/jquery-hashchange/examples/bug-chrome-back-button/
+// Firefox: Remote XMLHttpRequest - http://benalman.com/code/projects/jquery-hashchange/examples/bug-firefox-remote-xhr/
+// WebKit: Back Button in an Iframe - http://benalman.com/code/projects/jquery-hashchange/examples/bug-webkit-hash-iframe/
+// Safari: Back Button from a different domain - http://benalman.com/code/projects/jquery-hashchange/examples/bug-safari-back-from-diff-domain/
+//
+// Also note that should a browser natively support the window.onhashchange
+// event, but not report that it does, the fallback polling loop will be used.
+//
+// About: Release History
+//
+// 1.3 - (7/21/2010) Reorganized IE6/7 Iframe code to make it more
+// "removable" for mobile-only development. Added IE6/7 document.title
+// support. Attempted to make Iframe as hidden as possible by using
+// techniques from http://www.paciellogroup.com/blog/?p=604. Added
+// support for the "shortcut" format $(window).hashchange( fn ) and
+// $(window).hashchange() like jQuery provides for built-in events.
+// Renamed jQuery.hashchangeDelay to <jQuery.fn.hashchange.delay> and
+// lowered its default value to 50. Added <jQuery.fn.hashchange.domain>
+// and <jQuery.fn.hashchange.src> properties plus document-domain.html
+// file to address access denied issues when setting document.domain in
+// IE6/7.
+// 1.2 - (2/11/2010) Fixed a bug where coming back to a page using this plugin
+// from a page on another domain would cause an error in Safari 4. Also,
+// IE6/7 Iframe is now inserted after the body (this actually works),
+// which prevents the page from scrolling when the event is first bound.
+// Event can also now be bound before DOM ready, but it won't be usable
+// before then in IE6/7.
+// 1.1 - (1/21/2010) Incorporated document.documentMode test to fix IE8 bug
+// where browser version is incorrectly reported as 8.0, despite
+// inclusion of the X-UA-Compatible IE=EmulateIE7 meta tag.
+// 1.0 - (1/9/2010) Initial Release. Broke out the jQuery BBQ event.special
+// window.onhashchange functionality into a separate plugin for users
+// who want just the basic event & back button support, without all the
+// extra awesomeness that BBQ provides. This plugin will be included as
+// part of jQuery BBQ, but also be available separately.
+
+(function($,window,undefined){
+ '$:nomunge'; // Used by YUI compressor.
+
+ // Reused string.
+ var str_hashchange = 'hashchange',
+
+ // Method / object references.
+ doc = document,
+ fake_onhashchange,
+ special = $.event.special,
+
+ // Does the browser support window.onhashchange? Note that IE8 running in
+ // IE7 compatibility mode reports true for 'onhashchange' in window, even
+ // though the event isn't supported, so also test document.documentMode.
+ doc_mode = doc.documentMode,
+ supports_onhashchange = 'on' + str_hashchange in window && ( doc_mode === undefined || doc_mode > 7 );
+
+ // Get location.hash (or what you'd expect location.hash to be) sans any
+ // leading #. Thanks for making this necessary, Firefox!
+ function get_fragment( url ) {
+ url = url || location.href;
+ return '#' + url.replace( /^[^#]*#?(.*)$/, '$1' );
+ };
+
+ // Method: jQuery.fn.hashchange
+ //
+ // Bind a handler to the window.onhashchange event or trigger all bound
+ // window.onhashchange event handlers. This behavior is consistent with
+ // jQuery's built-in event handlers.
+ //
+ // Usage:
+ //
+ // > jQuery(window).hashchange( [ handler ] );
+ //
+ // Arguments:
+ //
+ // handler - (Function) Optional handler to be bound to the hashchange
+ // event. This is a "shortcut" for the more verbose form:
+ // jQuery(window).bind( 'hashchange', handler ). If handler is omitted,
+ // all bound window.onhashchange event handlers will be triggered. This
+ // is a shortcut for the more verbose
+ // jQuery(window).trigger( 'hashchange' ). These forms are described in
+ // the <hashchange event> section.
+ //
+ // Returns:
+ //
+ // (jQuery) The initial jQuery collection of elements.
+
+ // Allow the "shortcut" format $(elem).hashchange( fn ) for binding and
+ // $(elem).hashchange() for triggering, like jQuery does for built-in events.
+ $.fn[ str_hashchange ] = function( fn ) {
+ return fn ? this.bind( str_hashchange, fn ) : this.trigger( str_hashchange );
+ };
+
+ // Property: jQuery.fn.hashchange.delay
+ //
+ // The numeric interval (in milliseconds) at which the <hashchange event>
+ // polling loop executes. Defaults to 50.
+
+ // Property: jQuery.fn.hashchange.domain
+ //
+ // If you're setting document.domain in your JavaScript, and you want hash
+ // history to work in IE6/7, not only must this property be set, but you must
+ // also set document.domain BEFORE jQuery is loaded into the page. This
+ // property is only applicable if you are supporting IE6/7 (or IE8 operating
+ // in "IE7 compatibility" mode).
+ //
+ // In addition, the <jQuery.fn.hashchange.src> property must be set to the
+ // path of the included "document-domain.html" file, which can be renamed or
+ // modified if necessary (note that the document.domain specified must be the
+ // same in both your main JavaScript as well as in this file).
+ //
+ // Usage:
+ //
+ // jQuery.fn.hashchange.domain = document.domain;
+
+ // Property: jQuery.fn.hashchange.src
+ //
+ // If, for some reason, you need to specify an Iframe src file (for example,
+ // when setting document.domain as in <jQuery.fn.hashchange.domain>), you can
+ // do so using this property. Note that when using this property, history
+ // won't be recorded in IE6/7 until the Iframe src file loads. This property
+ // is only applicable if you are supporting IE6/7 (or IE8 operating in "IE7
+ // compatibility" mode).
+ //
+ // Usage:
+ //
+ // jQuery.fn.hashchange.src = 'path/to/file.html';
+
+ $.fn[ str_hashchange ].delay = 50;
+ /*
+ $.fn[ str_hashchange ].domain = null;
+ $.fn[ str_hashchange ].src = null;
+ */
+
+ // Event: hashchange event
+ //
+ // Fired when location.hash changes. In browsers that support it, the native
+ // HTML5 window.onhashchange event is used, otherwise a polling loop is
+ // initialized, running every <jQuery.fn.hashchange.delay> milliseconds to
+ // see if the hash has changed. In IE6/7 (and IE8 operating in "IE7
+ // compatibility" mode), a hidden Iframe is created to allow the back button
+ // and hash-based history to work.
+ //
+ // Usage as described in <jQuery.fn.hashchange>:
+ //
+ // > // Bind an event handler.
+ // > jQuery(window).hashchange( function(e) {
+ // > var hash = location.hash;
+ // > ...
+ // > });
+ // >
+ // > // Manually trigger the event handler.
+ // > jQuery(window).hashchange();
+ //
+ // A more verbose usage that allows for event namespacing:
+ //
+ // > // Bind an event handler.
+ // > jQuery(window).bind( 'hashchange', function(e) {
+ // > var hash = location.hash;
+ // > ...
+ // > });
+ // >
+ // > // Manually trigger the event handler.
+ // > jQuery(window).trigger( 'hashchange' );
+ //
+ // Additional Notes:
+ //
+ // * The polling loop and Iframe are not created until at least one handler
+ // is actually bound to the 'hashchange' event.
+ // * If you need the bound handler(s) to execute immediately, in cases where
+ // a location.hash exists on page load, via bookmark or page refresh for
+ // example, use jQuery(window).hashchange() or the more verbose
+ // jQuery(window).trigger( 'hashchange' ).
+ // * The event can be bound before DOM ready, but since it won't be usable
+ // before then in IE6/7 (due to the necessary Iframe), recommended usage is
+ // to bind it inside a DOM ready handler.
+
+ // Override existing $.event.special.hashchange methods (allowing this plugin
+ // to be defined after jQuery BBQ in BBQ's source code).
+ special[ str_hashchange ] = $.extend( special[ str_hashchange ], {
+
+ // Called only when the first 'hashchange' event is bound to window.
+ setup: function() {
+ // If window.onhashchange is supported natively, there's nothing to do..
+ if ( supports_onhashchange ) { return false; }
+
+ // Otherwise, we need to create our own. And we don't want to call this
+ // until the user binds to the event, just in case they never do, since it
+ // will create a polling loop and possibly even a hidden Iframe.
+ $( fake_onhashchange.start );
+ },
+
+ // Called only when the last 'hashchange' event is unbound from window.
+ teardown: function() {
+ // If window.onhashchange is supported natively, there's nothing to do..
+ if ( supports_onhashchange ) { return false; }
+
+ // Otherwise, we need to stop ours (if possible).
+ $( fake_onhashchange.stop );
+ }
+
+ });
+
+ // fake_onhashchange does all the work of triggering the window.onhashchange
+ // event for browsers that don't natively support it, including creating a
+ // polling loop to watch for hash changes and in IE 6/7 creating a hidden
+ // Iframe to enable back and forward.
+ fake_onhashchange = (function(){
+ var self = {},
+ timeout_id,
+
+ // Remember the initial hash so it doesn't get triggered immediately.
+ last_hash = get_fragment(),
+
+ fn_retval = function(val){ return val; },
+ history_set = fn_retval,
+ history_get = fn_retval;
+
+ // Start the polling loop.
+ self.start = function() {
+ timeout_id || poll();
+ };
+
+ // Stop the polling loop.
+ self.stop = function() {
+ timeout_id && clearTimeout( timeout_id );
+ timeout_id = undefined;
+ };
+
+ // This polling loop checks every $.fn.hashchange.delay milliseconds to see
+ // if location.hash has changed, and triggers the 'hashchange' event on
+ // window when necessary.
+ function poll() {
+ var hash = get_fragment(),
+ history_hash = history_get( last_hash );
+
+ if ( hash !== last_hash ) {
+ history_set( last_hash = hash, history_hash );
+
+ $(window).trigger( str_hashchange );
+
+ } else if ( history_hash !== last_hash ) {
+ location.href = location.href.replace( /#.*/, '' ) + history_hash;
+ }
+
+ timeout_id = setTimeout( poll, $.fn[ str_hashchange ].delay );
+ };
+
+ // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+ // vvvvvvvvvvvvvvvvvvv REMOVE IF NOT SUPPORTING IE6/7/8 vvvvvvvvvvvvvvvvvvv
+ // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+ $.browser.msie && !supports_onhashchange && (function(){
+ // Not only do IE6/7 need the "magical" Iframe treatment, but so does IE8
+ // when running in "IE7 compatibility" mode.
+
+ var iframe,
+ iframe_src;
+
+ // When the event is bound and polling starts in IE 6/7, create a hidden
+ // Iframe for history handling.
+ self.start = function(){
+ if ( !iframe ) {
+ iframe_src = $.fn[ str_hashchange ].src;
+ iframe_src = iframe_src && iframe_src + get_fragment();
+
+ // Create hidden Iframe. Attempt to make Iframe as hidden as possible
+ // by using techniques from http://www.paciellogroup.com/blog/?p=604.
+ iframe = $('<iframe tabindex="-1" title="empty"/>').hide()
+
+ // When Iframe has completely loaded, initialize the history and
+ // start polling.
+ .one( 'load', function(){
+ iframe_src || history_set( get_fragment() );
+ poll();
+ })
+
+ // Load Iframe src if specified, otherwise nothing.
+ .attr( 'src', iframe_src || 'javascript:0' )
+
+ // Append Iframe after the end of the body to prevent unnecessary
+ // initial page scrolling (yes, this works).
+ .insertAfter( 'body' )[0].contentWindow;
+
+ // Whenever `document.title` changes, update the Iframe's title to
+ // prettify the back/next history menu entries. Since IE sometimes
+ // errors with "Unspecified error" the very first time this is set
+ // (yes, very useful) wrap this with a try/catch block.
+ doc.onpropertychange = function(){
+ try {
+ if ( event.propertyName === 'title' ) {
+ iframe.document.title = doc.title;
+ }
+ } catch(e) {}
+ };
+
+ }
+ };
+
+ // Override the "stop" method since an IE6/7 Iframe was created. Even
+ // if there are no longer any bound event handlers, the polling loop
+ // is still necessary for back/next to work at all!
+ self.stop = fn_retval;
+
+ // Get history by looking at the hidden Iframe's location.hash.
+ history_get = function() {
+ return get_fragment( iframe.location.href );
+ };
+
+ // Set a new history item by opening and then closing the Iframe
+ // document, *then* setting its location.hash. If document.domain has
+ // been set, update that as well.
+ history_set = function( hash, history_hash ) {
+ var iframe_doc = iframe.document,
+ domain = $.fn[ str_hashchange ].domain;
+
+ if ( hash !== history_hash ) {
+ // Update Iframe with any initial `document.title` that might be set.
+ iframe_doc.title = doc.title;
+
+ // Opening the Iframe's document after it has been closed is what
+ // actually adds a history entry.
+ iframe_doc.open();
+
+ // Set document.domain for the Iframe document as well, if necessary.
+ domain && iframe_doc.write( '<script>document.domain="' + domain + '"</script>' );
+
+ iframe_doc.close();
+
+ // Update the Iframe's hash, for great justice.
+ iframe.location.hash = hash;
+ }
+ };
+
+ })();
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ // ^^^^^^^^^^^^^^^^^^^ REMOVE IF NOT SUPPORTING IE6/7/8 ^^^^^^^^^^^^^^^^^^^
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+ return self;
+ })();
+
+})(jQuery,this);
+(function ( jQuery ) {
+
+jQuery.widget( "mobile.page", jQuery.mobile.widget, {
+ options: {},
+
+ _create: function() {
+ var $elem = this.element;
+
+ if ( this._trigger( "beforeCreate" ) === false ) {
+ return;
+ }
+
+ //some of the form elements currently rely on the presence of ui-page and ui-content
+ // classes so we'll handle page and content roles outside of the main role processing
+ // loop below.
+ $elem.find( "[data-role='page'], [data-role='content']" ).andSelf().each(function() {
+ jQuery(this).addClass( "ui-" + jQuery(this).data( "role" ) );
+ });
+
+ $elem.find( "[data-role='nojs']" ).addClass( "ui-nojs" );
+
+ this._enchanceControls();
+
+ // pre-find data els
+ var $dataEls = $elem.find( "[data-role]" ).andSelf().each(function() {
+ var $this = jQuery( this ),
+ role = $this.data( "role" ),
+ theme = $this.data( "theme" );
+
+ //apply theming and markup modifications to page,header,content,footer
+ if ( role === "header" || role === "footer" ) {
+ $this.addClass( "ui-bar-" + (theme || "a") );
+
+ // add ARIA role
+ $this.attr( "role", role === "header" ? "banner" : "contentinfo" );
+
+ //right,left buttons
+ var $headeranchors = $this.children( "a" ),
+ leftbtn = $headeranchors.hasClass( "ui-btn-left" ),
+ rightbtn = $headeranchors.hasClass( "ui-btn-right" );
+
+ if ( !leftbtn ) {
+ leftbtn = $headeranchors.eq( 0 ).not( ".ui-btn-right" ).addClass( "ui-btn-left" ).length;
+ }
+
+ if ( !rightbtn ) {
+ rightbtn = $headeranchors.eq( 1 ).addClass( "ui-btn-right" ).length;
+ }
+
+ // auto-add back btn on pages beyond first view
+ if ( jQuery.mobile.addBackBtn && role === "header" &&
+ (jQuery.mobile.urlStack.length > 1 || jQuery(".ui-page").length > 1) &&
+ !leftbtn && !$this.data( "noBackBtn" ) ) {
+
+ jQuery( "<a href='#' class='ui-btn-left' data-icon='arrow-l'>Back</a>" )
+ .click(function() {
+ history.back();
+ return false;
+ })
+ .prependTo( $this );
+ }
+
+ //page title
+ $this.children( "h1, h2, h3, h4, h5, h6" )
+ .addClass( "ui-title" )
+ //regardless of h element number in src, it becomes h1 for the enhanced page
+ .attr({ "tabindex": "0", "role": "heading", "aria-level": "1" });
+
+ } else if ( role === "content" ) {
+ if ( theme ) {
+ $this.addClass( "ui-body-" + theme );
+ }
+
+ // add ARIA role
+ $this.attr( "role", "main" );
+
+ } else if ( role === "page" ) {
+ $this.addClass( "ui-body-" + (theme || "c") );
+ }
+
+ switch(role) {
+ case "header":
+ case "footer":
+ case "page":
+ case "content":
+ $this.addClass( "ui-" + role );
+ break;
+ case "collapsible":
+ case "fieldcontain":
+ case "navbar":
+ case "listview":
+ case "dialog":
+ case "ajaxform":
+ $this[ role ]();
+ break;
+ }
+ });
+
+ //links in bars, or those with data-role become buttons
+ $elem.find( "[data-role='button'], .ui-bar a, .ui-header a, .ui-footer a" )
+ .not( ".ui-btn" )
+ .buttonMarkup();
+
+ $elem
+ .find("[data-role='controlgroup']")
+ .controlgroup();
+
+ //links within content areas
+ $elem.find( "a:not(.ui-btn):not(.ui-link-inherit)" )
+ .addClass( "ui-link" );
+
+ //fix toolbars
+ $elem.fixHeaderFooter();
+ },
+
+ _enchanceControls: function() {
+ // degrade inputs to avoid poorly implemented native functionality
+ this.element.find( "input" ).each(function() {
+ var type = this.getAttribute( "type" );
+ if ( jQuery.mobile.degradeInputs[ type ] ) {
+ jQuery( this ).replaceWith(
+ jQuery( "<div>" ).html( jQuery(this).clone() ).html()
+ .replace( /type="([a-zA-Z]+)"/, "data-type='$1'" ) );
+ }
+ });
+
+ // enchance form controls
+ 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']" )
+ .customTextInput();
+
+ this.element
+ .find( "input, select" )
+ .filter( "[data-role='slider'], [data-type='range']" )
+ .slider();
+
+ this.element
+ .find( "select:not([data-role='slider'])" )
+ .customSelect();
+ }
+});
+
+})( jQuery );
+/*
+* jQuery Mobile Framework : prototype for "fixHeaderFooter" plugin - on-demand positioning for headers,footers
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+* Note: Code is in draft form and is subject to change
+*/
+(function($){
+$.fn.fixHeaderFooter = function(options){
+ if( !$.support.scrollTop ){ return $(this); }
+ return $(this).each(function(){
+ if( $(this).data('fullscreen') ){ $(this).addClass('ui-page-fullscreen'); }
+ $(this).find('.ui-header[data-position="fixed"]').addClass('ui-header-fixed ui-fixed-inline fade'); //should be slidedown
+ $(this).find('.ui-footer[data-position="fixed"]').addClass('ui-footer-fixed ui-fixed-inline fade'); //should be slideup
+ });
+};
+
+//single controller for all showing,hiding,toggling
+$.fixedToolbars = (function(){
+ if( !$.support.scrollTop ){ return; }
+ var currentstate = 'inline',
+ delayTimer,
+ ignoreTargets = 'a,input,textarea,select,button,label,.ui-header-fixed,.ui-footer-fixed',
+ toolbarSelector = '.ui-page-active .ui-header-fixed:first, .ui-page-active .ui-footer-fixed:not(.ui-footer-duplicate):last',
+ stickyFooter, //for storing quick references to duplicate footers
+ supportTouch = $.support.touch,
+ touchStartEvent = supportTouch ? "touchstart" : "mousedown",
+ touchStopEvent = supportTouch ? "touchend" : "mouseup",
+ stateBefore = null,
+ scrollTriggered = false;
+
+ $(function() {
+ $(document)
+ .bind(touchStartEvent,function(event){
+ if( $(event.target).closest(ignoreTargets).length ){ return; }
+ stateBefore = currentstate;
+ $.fixedToolbars.hide(true);
+ })
+ .bind('scrollstart',function(event){
+ if( $(event.target).closest(ignoreTargets).length ){ return; } //because it could be a touchmove...
+ scrollTriggered = true;
+ if(stateBefore == null){ stateBefore = currentstate; }
+ $.fixedToolbars.hide(true);
+ })
+ .bind(touchStopEvent,function(event){
+ if( $(event.target).closest(ignoreTargets).length ){ return; }
+ if( !scrollTriggered ){
+ $.fixedToolbars.toggle(stateBefore);
+ stateBefore = null;
+ }
+ })
+ .bind('scrollstop',function(event){
+ if( $(event.target).closest(ignoreTargets).length ){ return; }
+ scrollTriggered = false;
+ $.fixedToolbars.toggle( stateBefore == 'overlay' ? 'inline' : 'overlay' );
+ stateBefore = null;
+ });
+
+ //function to return another footer already in the dom with the same data-id
+ function findStickyFooter(el){
+ var thisFooter = el.find('[data-role="footer"]');
+ return jQuery( '.ui-footer[data-id="'+ thisFooter.data('id') +'"]:not(.ui-footer-duplicate)' ).not(thisFooter);
+ }
+
+ //before page is shown, check for duplicate footer
+ $('.ui-page').live('pagebeforeshow', function(event, ui){
+ stickyFooter = findStickyFooter( $(event.target) );
+ if( stickyFooter.length ){
+ //if the existing footer is the first of its kind, create a placeholder before stealing it
+ if( stickyFooter.parents('.ui-page:eq(0)').find('.ui-footer[data-id="'+ stickyFooter.data('id') +'"]').length == 1 ){
+ stickyFooter.before( stickyFooter.clone().addClass('ui-footer-duplicate') );
+ }
+ $(event.target).find('[data-role="footer"]').addClass('ui-footer-duplicate');
+ stickyFooter.appendTo($.pageContainer).css('top',0);
+ setTop(stickyFooter);
+ }
+ });
+
+ //after page is shown, append footer to new page
+ $('.ui-page').live('pageshow', function(event, ui){
+ if( stickyFooter && stickyFooter.length ){
+ stickyFooter.appendTo(event.target).css('top',0);
+ }
+ $.fixedToolbars.show(true);
+ });
+
+ });
+
+ function setTop(el){
+ var fromTop = $(window).scrollTop(),
+ thisTop = el.offset().top,
+ thisCSStop = el.css('top') == 'auto' ? 0 : parseFloat(el.css('top')),
+ screenHeight = window.innerHeight,
+ thisHeight = el.outerHeight(),
+ useRelative = el.parents('.ui-page:not(.ui-page-fullscreen)').length,
+ relval;
+ if( el.is('.ui-header-fixed') ){
+ relval = fromTop - thisTop + thisCSStop;
+ if( relval < thisTop){ relval = 0; }
+ return el.css('top', ( useRelative ) ? relval : fromTop);
+ }
+ else{
+ relval = -1 * (thisTop - (fromTop + screenHeight) + thisCSStop + thisHeight);
+ if( relval > thisTop ){ relval = 0; }
+ return el.css('top', ( useRelative ) ? relval : fromTop + screenHeight - thisHeight );
+ }
+ }
+
+ //exposed methods
+ return {
+ show: function(immediately){
+ currentstate = 'overlay';
+ return $( toolbarSelector ).each(function(){
+ var el = $(this),
+ fromTop = $(window).scrollTop(),
+ thisTop = el.offset().top,
+ screenHeight = window.innerHeight,
+ thisHeight = el.outerHeight(),
+ alreadyVisible = (el.is('.ui-header-fixed') && fromTop <= thisTop + thisHeight) || (el.is('.ui-footer-fixed') && thisTop <= fromTop + screenHeight);
+
+ //add state class
+ el.addClass('ui-fixed-overlay').removeClass('ui-fixed-inline');
+
+ if( !alreadyVisible && !immediately ){
+ el.addClass('in').animationComplete(function(){
+ el.removeClass('in');
+ });
+ }
+ setTop(el);
+ });
+ },
+ hide: function(immediately){
+ currentstate = 'inline';
+ return $( toolbarSelector ).each(function(){
+ var el = $(this);
+
+ //add state class
+ el.addClass('ui-fixed-inline').removeClass('ui-fixed-overlay');
+
+ if(immediately){
+ el.css('top',0);
+ }
+ else{
+ if( el.css('top') !== 'auto' && parseFloat(el.css('top')) !== 0 ){
+ var classes = 'out reverse';
+ el.addClass(classes).animationComplete(function(){
+ el.removeClass(classes);
+ el.css('top',0);
+ });
+ }
+ }
+ });
+ },
+ hideAfterDelay: function(){
+ delayTimer = setTimeout(function(){
+ $.fixedToolbars.hide();
+ }, 3000);
+ },
+ toggle: function(from){
+ if(from){ currentstate = from; }
+ return (currentstate == 'overlay') ? $.fixedToolbars.hide() : $.fixedToolbars.show();
+ }
+ };
+})();
+
+})(jQuery);/*
+* jQuery Mobile Framework : "customCheckboxRadio" plugin (based on code from Filament Group,Inc)
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+* Note: Code is in draft form and is subject to change
+*/
+(function ( $ ) {
+$.widget( "mobile.checkboxradio", $.mobile.widget, {
+ options: {
+ theme: undefined,
+ icon: undefined
+ },
+ _create: function(){
+ var input = this.element,
+ label = jQuery("label[for='" + input.attr( "id" ) + "']"),
+ inputtype = input.attr( "type" ),
+ checkedicon = "ui-icon-" + inputtype + "-on",
+ uncheckedicon = "ui-icon-" + inputtype + "-off";
+
+ if ( inputtype != "checkbox" && inputtype != "radio" ) { return; }
+
+ label
+ .buttonMarkup({
+ iconpos: this.options.icon,
+ theme: this.options.theme,
+ icon: this.options.icon ? uncheckedicon : ( this.element.parents( "[data-type='horizontal']" ).length ? undefined : uncheckedicon ),
+ shadow: false
+ });
+
+ // wrap the input + label in a div
+ input
+ .add( label )
+ .wrapAll( "<div class='ui-" + inputtype +"'></div>" );
+
+ label.bind({
+ mouseover: function() {
+ if( $(this).parent().is('.ui-disabled') ){ return false; }
+ },
+
+ mousedown: function() {
+ if( $(this).parent().is('.ui-disabled') ){ return false; }
+ label.data( "state", input.attr( "checked" ) );
+ },
+
+ click: function() {
+ setTimeout(function() {
+ if ( input.attr( "checked" ) === label.data( "state" ) ) {
+ input.trigger( "click" );
+ }
+ }, 1);
+ }
+ });
+
+ input
+ .bind({
+
+ click: function() {
+ jQuery( "input[name='" + input.attr( "name" ) + "']" ).checkboxradio( "refresh" );
+ },
+
+ focus: function() {
+ label.addClass( "ui-focus" );
+ },
+
+ blur: function() {
+ label.removeClass( "ui-focus" );
+ }
+ });
+
+ this.refresh();
+
+ },
+
+ refresh: function( ){
+ var input = this.element,
+ label = jQuery("label[for='" + input.attr( "id" ) + "']"),
+ inputtype = input.attr( "type" ),
+ icon = label.find( ".ui-icon" ),
+ checkedicon = "ui-icon-" + inputtype + "-on",
+ uncheckedicon = "ui-icon-" + inputtype + "-off";
+
+ if ( input[0].checked ) {
+ label.addClass( "ui-btn-active" );
+ icon.addClass( checkedicon );
+ icon.removeClass( uncheckedicon );
+
+ } else {
+ label.removeClass( "ui-btn-active" );
+ icon.removeClass( checkedicon );
+ icon.addClass( uncheckedicon );
+ }
+
+ if( input.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 );
+/*
+* jQuery Mobile Framework : "customTextInput" plugin for text inputs, textareas (based on code from Filament Group,Inc)
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+* Note: Code is in draft form and is subject to change
+*/
+(function($){
+jQuery.fn.customTextInput = function(options){
+ return $(this).each(function(){
+ var input = $(this);
+
+ var o = $.extend({
+ search: input.is('[type="search"],[data-type="search"]'),
+ theme: input.data("theme") || "c"
+ }, options);
+
+ $('label[for='+input.attr('id')+']').addClass('ui-input-text');
+
+ input.addClass('ui-input-text ui-body-'+ o.theme);
+
+ var focusedEl = input;
+
+ //"search" input widget
+ if(o.search){
+ focusedEl = input.wrap('<div class="ui-input-search ui-shadow-inset ui-btn-corner-all ui-body-c ui-btn-shadow ui-icon-search"></div>').parent();
+ var clearbtn = $('<a href="#" class="ui-input-clear" title="clear text">clear text</a>')
+ .click(function(){
+ input.val('').focus();
+ input.trigger('change');
+ clearbtn.addClass('ui-input-clear-hidden');
+ return false;
+ })
+ .appendTo(focusedEl)
+ .buttonMarkup({icon: 'delete', iconpos: 'notext', corners:true, shadow:true});
+
+ function toggleClear(){
+ if(input.val() == ''){
+ clearbtn.addClass('ui-input-clear-hidden');
+ }
+ else{
+ clearbtn.removeClass('ui-input-clear-hidden');
+ }
+ }
+
+ toggleClear();
+ input.keyup(toggleClear);
+ }
+ else{
+ input.addClass('ui-corner-all ui-shadow-inset');
+ }
+
+ input
+ .focus(function(){
+ focusedEl.addClass('ui-focus');
+ })
+ .blur(function(){
+ focusedEl.removeClass('ui-focus');
+ });
+
+ //autogrow
+ if ( input.is('textarea') ) {
+ var extraLineHeight = 15,
+ keyupTimeoutBuffer = 100,
+ keyup = function() {
+ var scrollHeight = input[0].scrollHeight,
+ clientHeight = input[0].clientHeight;
+ if ( clientHeight < scrollHeight ) {
+ input.css({ height: (scrollHeight + extraLineHeight) });
+ }
+ },
+ keyupTimeout;
+ input.keyup(function() {
+ clearTimeout( keyupTimeout );
+ keyupTimeout = setTimeout( keyup, keyupTimeoutBuffer );
+ });
+ }
+ });
+};
+})(jQuery);
+/*
+* jQuery Mobile Framework : "customSelect" plugin (based on code from Filament Group,Inc)
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+* Note: Code is in draft form and is subject to change
+*/
+(function($){
+$.fn.customSelect = function(options){
+ return $(this).each(function(){
+ var select = $(this)
+ .attr( "tabindex", "-1" )
+ .wrap( "<div class='ui-select'>" ),
+ selectID = select.attr( "id" ),
+ label = $( "label[for="+ selectID +"]" )
+ .addClass( "ui-select" ),
+
+ //extendable options
+ o = $.extend({
+ chooseText: label.text(),
+ theme: select.data("theme")
+ }, options),
+
+ buttonId = selectID + "-button",
+ menuId = selectID + "-menu",
+ thisPage = select.closest( ".ui-page" ),
+ menuType,
+ currScroll,
+ button = $( "<a>", {
+ "href": "#",
+ "role": "button",
+ "id": buttonId,
+ "aria-haspopup": "true",
+ "aria-owns": menuId
+ })
+ .text( $( this.options.item(this.selectedIndex) ).text() )
+ .insertBefore( select )
+ .buttonMarkup({
+ iconpos: 'right',
+ icon: 'arrow-d',
+ theme: o.theme
+ }),
+ menuPage = $( "<div data-role='dialog' data-theme='a'>" +
+ "<div data-role='header' data-theme='b'>" +
+ "<div class='ui-title'>" + o.chooseText + "</div>"+
+ "</div>"+
+ "<div data-role='content'></div>"+
+ "</div>" )
+ .appendTo( $.pageContainer )
+ .page(),
+ menuPageContent = menuPage.find( ".ui-content" ),
+ screen = $( "<div>", {
+ "class": "ui-listbox-screen ui-overlay ui-screen-hidden fade"
+ })
+ .appendTo( thisPage ),
+ listbox = $( "<div>", { "class": "ui-listbox ui-listbox-hidden ui-body-a ui-overlay-shadow ui-corner-all pop"} )
+ .insertAfter(screen),
+ list = $( "<ul>", {
+ "class": "ui-listbox-list",
+ "id": menuId,
+ "role": "listbox",
+ "aria-labelledby": buttonId
+ })
+ .appendTo( listbox );
+
+ //populate menu
+ select.find( "option" ).each(function( i ){
+ var selected = (select[0].selectedIndex == i),
+ anchor = $("<a>", {
+ "aria-selected": selected,
+ "role": "option",
+ "href": "#"
+ })
+ .text( $(this).text() );
+
+ $( "<li>", {
+ "class": selected ? "ui-btn-active" : '',
+ "data-icon": "checkbox-on"
+ })
+ .append( anchor )
+ .appendTo( list );
+ });
+
+ //now populated, create listview
+ list.listview();
+
+
+
+ function showmenu(){
+ var menuHeight = list.outerHeight();
+ currScroll = [ $(window).scrollLeft(), $(window).scrollTop() ];
+
+ if( menuHeight > window.innerHeight - 80 || !$.support.scrollTop ){
+ menuType = "page";
+ menuPageContent.append( list );
+ $.changePage(menuPage, undefined);
+ }
+ else {
+ menuType = "overlay";
+
+ screen
+ .height( $(document).height() )
+ .removeClass('ui-screen-hidden');
+
+ listbox
+ .append( list )
+ .removeClass( "ui-listbox-hidden" )
+ .css({
+ top: $(window).scrollTop() + (window.innerHeight/2),
+ "margin-top": -menuHeight/2,
+ left: window.innerWidth/2,
+ "margin-left": -1* listbox.outerWidth() / 2
+ })
+ .addClass("in");
+ }
+ };
+
+ function hidemenu(){
+ if(menuType == "page"){
+ $.changePage([menuPage,thisPage], undefined, true);
+ }
+ else{
+ screen.addClass( "ui-screen-hidden" );
+ listbox.addClass( "ui-listbox-hidden" ).removeAttr( "style" ).removeClass("in");
+ }
+ };
+
+ //page show/hide events
+ menuPage
+ .bind("pageshow", function(){
+ list.find( ".ui-btn-active" ).focus();
+ return false;
+ })
+ .bind("pagehide", function(){
+ window.scrollTo(currScroll[0], currScroll[1]);
+ select.focus();
+ listbox.append( list ).removeAttr('style');
+ return false;
+ });
+
+
+ //select properties,events
+ select
+ .change(function(){
+ var $el = select.get(0);
+ button.find( ".ui-btn-text" ).text( $($el.options.item($el.selectedIndex)).text() );
+ })
+ .focus(function(){
+ $(this).blur();
+ button.focus();
+ });
+
+ //button events
+ button.mousedown(function(event){
+ showmenu();
+ return false;
+ });
+
+ //apply click events for items
+ list
+ .find("li")
+ .mousedown(function(){
+ //deselect active
+ list.find( "li" )
+ .removeClass( "ui-btn-active" )
+ .children(0)
+ .attr( "aria-selected", "false");
+
+ //select this one
+ $(this)
+ .addClass( "ui-btn-active" )
+ .find( "a" )
+ .attr( "aria-selected", "true");
+
+ //update select
+ var newIndex = list.find( "li" ).index( this ),
+ prevIndex = select[0].selectedIndex;
+
+ select[0].selectedIndex = newIndex;
+
+ //trigger change event
+ if(newIndex !== prevIndex){
+ select.trigger( "change" );
+ }
+
+ //hide custom select
+ hidemenu();
+ return false;
+ });
+
+ //hide on outside click
+ screen.click(function(){
+ hidemenu();
+ return false;
+ });
+ });
+};
+
+})(jQuery);
+
+/*
+* jQuery Mobile Framework : sample plugin for making button-like links
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+* Note: Code is in draft form and is subject to change
+*/
+(function( jQuery ) {
+
+jQuery.fn.buttonMarkup = function( options ){
+ return this.each( function() {
+ var el = jQuery( this ),
+ o = jQuery.extend( {}, jQuery.fn.buttonMarkup.defaults, el.data(), options),
+
+ // Classes Defined
+ buttonClass,
+ innerClass = "ui-btn-inner",
+ iconClass;
+
+ if ( attachEvents ) {
+ attachEvents();
+ }
+
+ // if not, try to find closest theme container
+ if ( !o.theme ) {
+ var themedParent = el.closest("[class*='ui-bar-'],[class*='ui-body-']");
+ o.theme = themedParent.length ?
+ /ui-(bar|body)-([a-z])/.exec( themedParent.attr("class") )[2] :
+ "c";
+ }
+
+ buttonClass = "ui-btn ui-btn-up-" + o.theme;
+
+ if ( o.inline ) {
+ buttonClass += " ui-btn-inline";
+ }
+
+ if ( o.icon ) {
+ o.icon = "ui-icon-" + o.icon;
+ o.iconpos = o.iconpos || "left";
+
+ iconClass = "ui-icon " + o.icon;
+
+ if ( o.shadow ) {
+ iconClass += " ui-icon-shadow"
+ }
+ }
+
+ if ( o.iconpos ) {
+ buttonClass += " ui-btn-icon-" + o.iconpos;
+
+ if ( o.iconpos == "notext" && !el.attr("title") ) {
+ el.attr( "title", el.text() );
+ }
+ }
+
+ if ( o.corners ) {
+ buttonClass += " ui-btn-corner-all";
+ innerClass += " ui-btn-corner-all";
+ }
+
+ if ( o.shadow ) {
+ buttonClass += " ui-shadow";
+ }
+
+ el
+ .attr( "data-theme", o.theme )
+ .addClass( buttonClass );
+
+ var wrap = ("<D class='" + innerClass + "'><D class='ui-btn-text'></D>" +
+ ( o.icon ? "<span class='" + iconClass + "'></span>" : "" ) +
+ "</D>").replace(/D/g, o.wrapperEls);
+
+ el.wrapInner( wrap );
+ });
+};
+
+jQuery.fn.buttonMarkup.defaults = {
+ corners: true,
+ shadow: true,
+ iconshadow: true,
+ wrapperEls: "span"
+};
+
+var attachEvents = function() {
+ jQuery(".ui-btn").live({
+ mousedown: function() {
+ var theme = jQuery(this).attr( "data-theme" );
+ jQuery(this).removeClass( "ui-btn-up-" + theme ).addClass( "ui-btn-down-" + theme );
+ },
+ mouseup: function() {
+ var theme = jQuery(this).attr( "data-theme" );
+ jQuery(this).removeClass( "ui-btn-down-" + theme ).addClass( "ui-btn-up-" + theme );
+ },
+ "mouseover focus": function() {
+ var theme = jQuery(this).attr( "data-theme" );
+ jQuery(this).removeClass( "ui-btn-up-" + theme ).addClass( "ui-btn-hover-" + theme );
+ },
+ "mouseout blur": function() {
+ var theme = jQuery(this).attr( "data-theme" );
+ jQuery(this).removeClass( "ui-btn-hover-" + theme ).addClass( "ui-btn-up-" + theme );
+ }
+ });
+
+ attachEvents = null;
+};
+
+})(jQuery);
+/*
+* jQuery Mobile Framework : sample plugin for making button links that proxy to native input/buttons
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+* Note: Code is in draft form and is subject to change
+*/
+(function ( $ ) {
+$.widget( "mobile.button", $.mobile.widget, {
+ options: {},
+ _create: function(){
+ var $el = this.element;
+ $el
+ .addClass('ui-btn-hidden')
+ .attr('tabindex','-1');
+
+ //add ARIA role
+ $( "<a>", {
+ "href": "#",
+ "role": "button",
+ "aria-label": $el.attr( "type" )
+ } )
+ .text( $el.text() || $el.val() )
+ .insertBefore( $el )
+ .click(function(){
+ $el.click();
+ return false;
+ })
+ .buttonMarkup({
+ theme: $el.data("theme"),
+ icon: $el.data("icon"),
+ iconpos: $el.data("iconpos"),
+ inline: $el.data("inline"),
+ corners: $el.data("corners"),
+ shadow: $el.data("shadow"),
+ iconshadow: $el.data("icon-shadow")
+ });
+ }
+});
+})( jQuery );/*
+* jQuery Mobile Framework : "slider" plugin (based on code from Filament Group,Inc)
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+* Note: Code is in draft form and is subject to change
+*/
+(function($){
+$.fn.slider = function(options){
+ return this.each(function(){
+ var control = $(this),
+ themedParent = control.parents('[class*=ui-bar-],[class*=ui-body-]').eq(0),
+
+ o = $.extend({
+ trackTheme: (themedParent.length ? themedParent.attr('class').match(/ui-(bar|body)-([a-z])/)[2] : 'c'),
+ theme: control.data("theme") || (themedParent.length ? themedParent.attr('class').match(/ui-(bar|body)-([a-z])/)[2] : 'c')
+ },options),
+
+ cType = control[0].nodeName.toLowerCase(),
+ selectClass = (cType == 'select') ? 'ui-slider-switch' : '',
+ controlID = control.attr('id'),
+ labelID = controlID + '-label',
+ label = $('[for='+ controlID +']').attr('id',labelID),
+ val = (cType == 'input') ? control.val() : control[0].selectedIndex,
+ min = (cType == 'input') ? parseFloat(control.attr('min')) : 0,
+ max = (cType == 'input') ? parseFloat(control.attr('max')) : control.find('option').length-1,
+ percent = val / (max - min) * 100,
+ snappedPercent = percent,
+ slider = $('<div class="ui-slider '+ selectClass +' ui-btn-down-'+o.trackTheme+' ui-btn-corner-all" role="application"></div>'),
+ handle = $('<a href="#" class="ui-slider-handle"></a>')
+ .appendTo(slider)
+ .buttonMarkup({corners: true, theme: o.theme, shadow: true})
+ .attr({
+ 'role': 'slider',
+ 'aria-valuemin': min,
+ 'aria-valuemax': max,
+ 'aria-valuenow': val,
+ 'aria-valuetext': val,
+ 'title': val,
+ 'aria-labelledby': labelID
+ }),
+ dragging = false;
+
+ if(cType == 'select'){
+ slider.wrapInner('<div class="ui-slider-inneroffset"></div>');
+ var options = control.find('option');
+
+ control.find('option').each(function(i){
+ var side = (i==0) ?'b':'a',
+ corners = (i==0) ? 'right' :'left',
+ theme = (i==0) ? ' ui-btn-down-' + o.trackTheme :' ui-btn-active';
+ $('<div class="ui-slider-labelbg ui-slider-labelbg-'+ side + theme +' ui-btn-corner-'+ corners+'"></div>').prependTo(slider);
+ $('<span class="ui-slider-label ui-slider-label-'+ side + theme +' ui-btn-corner-'+ corners+'" role="img">'+$(this).text()+'</span>').prependTo(handle);
+ });
+
+ }
+
+ function updateControl(val){
+ if(cType == 'input'){
+ control.val(val);
+ }
+ else {
+ control[0].selectedIndex = val;
+ }
+ control.trigger("change");
+ }
+
+ function slideUpdate(event, val){
+ if (val){
+ percent = parseFloat(val) / (max - min) * 100;
+ } else {
+ var data = event.originalEvent.touches ? event.originalEvent.touches[ 0 ] : event,
+ // a slight tolerance helped get to the ends of the slider
+ tol = 4;
+ if( !dragging
+ || data.pageX < slider.offset().left - tol
+ || data.pageX > slider.offset().left + slider.width() + tol ){
+ return;
+ }
+ percent = Math.round(((data.pageX - slider.offset().left) / slider.width() ) * 100);
+ }
+ if( percent < 0 ) { percent = 0; }
+ if( percent > 100 ) { percent = 100; }
+ var newval = Math.round( (percent/100) * max );
+ if( newval < min ) { newval = min; }
+ if( newval > max ) { newval = max; }
+ //flip the stack of the bg colors
+ if(percent > 60 && cType == 'select'){
+
+ }
+ snappedPercent = Math.round( newval / max * 100 );
+ handle.css('left', percent + '%');
+ handle.attr({
+ 'aria-valuenow': (cType == 'input') ? newval : control.find('option').eq(newval).attr('value'),
+ 'aria-valuetext': (cType == 'input') ? newval : control.find('option').eq(newval).text(),
+ 'title': newval
+ });
+ updateSwitchClass(newval);
+ updateControl(newval);
+ }
+
+ function updateSwitchClass(val){
+ if(cType == 'input'){return;}
+ if(val == 0){ slider.addClass('ui-slider-switch-a').removeClass('ui-slider-switch-b'); }
+ else { slider.addClass('ui-slider-switch-b').removeClass('ui-slider-switch-a'); }
+ }
+
+ updateSwitchClass(val);
+
+ function updateSnap(){
+ if(cType == 'select'){
+ handle
+ .addClass('ui-slider-handle-snapping')
+ .css('left', snappedPercent + '%')
+ .animationComplete(function(){
+ handle.removeClass('ui-slider-handle-snapping');
+ });
+ }
+ }
+
+ label.addClass('ui-slider');
+
+ control
+ .addClass((cType == 'input') ? 'ui-slider-input' : 'ui-slider-switch')
+ .keyup(function(e){
+ slideUpdate(e, $(this).val() );
+ });
+
+ slider
+ .bind($.support.touch ? "touchstart" : "mousedown", function(event){
+ dragging = true;
+ if((cType == 'select')){
+ val = control[0].selectedIndex;
+ }
+ slideUpdate(event);
+ return false;
+ })
+ .bind($.support.touch ? "touchmove" : "mousemove", function(event){
+ slideUpdate(event);
+ return false;
+ })
+ .bind($.support.touch ? "touchend" : "mouseup", function(event){
+ dragging = false;
+ if(cType == 'select'){
+ if(val == control[0].selectedIndex){
+ val = val == 0 ? 1 : 0;
+ //tap occurred, but value didn't change. flip it!
+ slideUpdate(event,val);
+ }
+ updateSnap();
+ }
+ return false;
+ })
+ .insertAfter(control);
+
+ handle
+ .css('left', percent + '%')
+ .bind('click', function(e){ return false; });
+ });
+};
+})(jQuery);
+
+/*
+* jQuery Mobile Framework : "collapsible" plugin (based on code from Filament Group,Inc)
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+* Note: Code is in draft form and is subject to change
+*/
+(function($){
+$.fn.collapsible = function(options){
+ return $(this).each(function(){
+ var o = $.extend({
+ expandCueText: ' click to expand contents',
+ collapseCueText: ' click to collapse contents',
+ collapsed: $(this).is('[data-state="collapsed"]'),
+ heading: '>h1,>h2,>h3,>h4,>h5,>h6,>legend',
+ theme: $(this).data('theme'),
+ iconTheme: $(this).data('icontheme') || 'd'
+ },options);
+
+ //define
+ var collapsibleContain = $(this).addClass('ui-collapsible-contain'),
+ collapsibleHeading = $(this).find(o.heading).eq(0),
+ collapsibleContent = collapsibleContain.wrapInner('<div class="ui-collapsible-content"></div>').find('.ui-collapsible-content'),
+ collapsibleParent = $(this).closest('[data-role=collapsible-set]').addClass('ui-collapsible-set');
+
+ //replace collapsibleHeading if it's a legend
+ if(collapsibleHeading.is('legend')){
+ collapsibleHeading = $('<div role="heading">'+ collapsibleHeading.html() +'</div>').insertBefore(collapsibleHeading);
+ collapsibleHeading.next().remove();
+ }
+
+ //drop heading in before content
+ collapsibleHeading.insertBefore(collapsibleContent);
+
+ //modify markup & attributes
+ collapsibleHeading.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: !!!collapsibleParent.length,
+ corners:false,
+ iconPos: 'left',
+ icon: 'plus',
+ theme: o.theme
+ })
+ .find('.ui-icon')
+ .removeAttr('class')
+ .buttonMarkup({
+ shadow: true,
+ corners:true,
+ iconPos: 'notext',
+ icon: 'plus',
+ theme: o.iconTheme
+ });
+
+ if( !collapsibleParent.length ){
+ collapsibleHeading
+ .find('a:eq(0)')
+ .addClass('ui-corner-all')
+ .find('.ui-btn-inner')
+ .addClass('ui-corner-all');
+ }
+ else {
+ if( collapsibleContain.data('collapsible-last') ){
+ collapsibleHeading
+ .find('a:eq(0), .ui-btn-inner')
+ .addClass('ui-corner-bottom');
+ }
+ }
+
+
+ //events
+ collapsibleContain
+ .bind('collapse', function(event){
+ if( !event.isDefaultPrevented() ){
+ event.preventDefault();
+ collapsibleHeading
+ .addClass('ui-collapsible-heading-collapsed')
+ .find('.ui-collapsible-heading-status').text(o.expandCueText);
+
+ collapsibleHeading.find('.ui-icon').removeClass('ui-icon-minus').addClass('ui-icon-plus');
+ collapsibleContent.addClass('ui-collapsible-content-collapsed').attr('aria-hidden',true);
+
+ if( collapsibleContain.data('collapsible-last') ){
+ collapsibleHeading
+ .find('a:eq(0), .ui-btn-inner')
+ .addClass('ui-corner-bottom');
+ }
+ }
+
+ })
+ .bind('expand', function(event){
+ if( !event.isDefaultPrevented() ){
+ event.preventDefault();
+ collapsibleHeading
+ .removeClass('ui-collapsible-heading-collapsed')
+ .find('.ui-collapsible-heading-status').text(o.collapseCueText);
+
+ collapsibleHeading.find('.ui-icon').removeClass('ui-icon-plus').addClass('ui-icon-minus');
+ collapsibleContent.removeClass('ui-collapsible-content-collapsed').attr('aria-hidden',false);
+
+ if( collapsibleContain.data('collapsible-last') ){
+ collapsibleHeading
+ .find('a:eq(0), .ui-btn-inner')
+ .removeClass('ui-corner-bottom');
+ }
+
+ }
+ })
+ .trigger(o.collapsed ? 'collapse' : 'expand');
+
+
+ //close others in a set
+ if( collapsibleParent.length && !collapsibleParent.data("collapsiblebound") ){
+ collapsibleParent
+ .data("collapsiblebound", true)
+ .bind("expand", function( event ){
+ $(this).find( ".ui-collapsible-contain" )
+ .not( $(event.target).closest( ".ui-collapsible-contain" ) )
+ .not( "> .ui-collapsible-contain .ui-collapsible-contain" )
+ .trigger( "collapse" );
+ })
+ var set = collapsibleParent.find('[data-role=collapsible]')
+
+ set.first()
+ .find('a:eq(0)')
+ .addClass('ui-corner-top')
+ .find('.ui-btn-inner')
+ .addClass('ui-corner-top');
+
+ set.last().data('collapsible-last', true)
+ }
+
+ collapsibleHeading.click(function(){
+ if( collapsibleHeading.is('.ui-collapsible-heading-collapsed') ){
+ collapsibleContain.trigger('expand');
+ }
+ else {
+ collapsibleContain.trigger('collapse');
+ }
+ return false;
+ });
+
+ });
+};
+})(jQuery);/*
+* jQuery Mobile Framework : prototype for "controlgroup" plugin - corner-rounding for groups of buttons, checks, radios, etc
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+* Note: Code is in draft form and is subject to change
+*/
+(function($){
+$.fn.controlgroup = function(options){
+
+ return $(this).each(function(){
+ var o = $.extend({
+ direction: $( this ).data( "type" ) || "vertical",
+ shadow: false
+ },options);
+ var groupheading = $(this).find('>legend'),
+ flCorners = o.direction == 'horizontal' ? ['ui-corner-left', 'ui-corner-right'] : ['ui-corner-top', 'ui-corner-bottom'],
+ type = $(this).find('input:eq(0)').attr('type');
+
+ //replace legend with more stylable replacement div
+ if( groupheading.length ){
+ $(this).wrapInner('<div class="ui-controlgroup-controls"></div>');
+ $('<div role="heading" class="ui-controlgroup-label">'+ groupheading.html() +'</div>').insertBefore( $(this).children(0) );
+ groupheading.remove();
+ }
+
+ $(this).addClass('ui-corner-all ui-controlgroup ui-controlgroup-'+o.direction);
+
+ function flipClasses(els){
+ els
+ .removeClass('ui-btn-corner-all ui-shadow')
+ .eq(0).addClass(flCorners[0])
+ .end()
+ .filter(':last').addClass(flCorners[1]).addClass('ui-controlgroup-last');
+ }
+ flipClasses($(this).find('.ui-btn'));
+ flipClasses($(this).find('.ui-btn-inner'));
+ if(o.shadow){
+ $(this).addClass('ui-shadow');
+ }
+ });
+};
+})(jQuery);/*
+* jQuery Mobile Framework : prototype for "fieldcontain" plugin - simple class additions to make form row separators
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+* Note: Code is in draft form and is subject to change
+*/
+(function($){
+$.fn.fieldcontain = function(options){
+ var o = $.extend({
+ theme: 'c'
+ },options);
+ return $(this).addClass('ui-field-contain ui-body ui-br');
+};
+})(jQuery);/*
+* jQuery Mobile Framework : listview plugin
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+* Note: Code is in draft form and is subject to change
+*/
+(function( jQuery ) {
+
+jQuery.widget( "mobile.listview", jQuery.mobile.widget, {
+ options: {
+ theme: "c",
+ countTheme: "c",
+ headerTheme: "b",
+ dividerTheme: "b",
+ splitIcon: "arrow-r",
+ splitTheme: "b",
+ inset: false
+ },
+
+ _create: function() {
+ var $list = this.element,
+ o = this.options;
+
+ // create listview markup
+ $list
+ .addClass( "ui-listview" )
+ .attr( "role", "listbox" )
+
+ if ( o.inset ) {
+ $list.addClass( "ui-listview-inset ui-corner-all ui-shadow" );
+ }
+
+ $list.delegate( ".ui-li", "focusin", function() {
+ jQuery( this ).attr( "tabindex", "0" );
+ });
+
+ this._itemApply( $list, $list );
+
+ this.refresh( true );
+
+ //keyboard events for menu items
+ $list.keydown(function( e ) {
+ var target = jQuery( e.target ),
+ li = target.closest( "li" );
+
+ // switch logic based on which key was pressed
+ switch ( e.keyCode ) {
+ // up or left arrow keys
+ case 38:
+ var prev = li.prev();
+
+ // if there's a previous option, focus it
+ if ( prev.length ) {
+ target
+ .blur()
+ .attr( "tabindex", "-1" );
+
+ prev.find( "a" ).first().focus();
+ }
+
+ return false;
+ break;
+
+ // down or right arrow keys
+ case 40:
+ var next = li.next();
+
+ // if there's a next option, focus it
+ if ( next.length ) {
+ target
+ .blur()
+ .attr( "tabindex", "-1" );
+
+ next.find( "a" ).first().focus();
+ }
+
+ return false;
+ break;
+
+ case 39:
+ var a = li.find( "a.ui-li-link-alt" );
+
+ if ( a.length ) {
+ target.blur();
+ a.first().focus();
+ }
+
+ return false;
+ break;
+
+ case 37:
+ var a = li.find( "a.ui-link-inherit" );
+
+ if ( a.length ) {
+ target.blur();
+ a.first().focus();
+ }
+
+ return false;
+ break;
+
+ // if enter or space is pressed, trigger click
+ case 13:
+ case 32:
+ target.trigger( "click" );
+
+ return false;
+ break;
+ }
+ });
+
+ // tapping the whole LI triggers click on the first link
+ $list.delegate( "li", "click", function(event) {
+ if ( !jQuery( event.target ).closest( "a" ).length ) {
+ jQuery( this ).find( "a" ).first().trigger( "click" );
+ return false;
+ }
+ });
+ },
+
+ _itemApply: function( $list, item ) {
+ // TODO class has to be defined in markup
+ item.find( ".ui-li-count" )
+ .addClass( "ui-btn-up-" + ($list.data( "counttheme" ) || this.options.countTheme) + " ui-btn-corner-all" );
+
+ item.find( "h1, h2, h3, h4, h5, h6" ).addClass( "ui-li-heading" );
+
+ item.find( "p, ul, dl" ).addClass( "ui-li-desc" );
+
+ item.find( "img" ).addClass( "ui-li-thumb" ).each(function() {
+ jQuery( this ).closest( "li" )
+ .addClass( jQuery(this).is( ".ui-li-icon" ) ? "ui-li-has-icon" : "ui-li-has-thumb" );
+ });
+
+ var aside = item.find( ".ui-li-aside" );
+
+ if ( aside.length ) {
+ aside.each(function(i, el) {
+ $(el).prependTo( $(el).parent() ); //shift aside to front for css float
+ });
+ }
+
+ if ( jQuery.support.cssPseudoElement || !jQuery.nodeName( item[0], "ol" ) ) {
+ return;
+ }
+ },
+
+ refresh: function( create ) {
+ this._createSubPages();
+
+ var o = this.options,
+ $list = this.element,
+ self = this,
+ dividertheme = $list.data( "dividertheme" ) || o.dividerTheme,
+ li = $list.children( "li" ),
+ counter = jQuery.support.cssPseudoElement || !jQuery.nodeName( $list[0], "ol" ) ? 0 : 1;
+
+ if ( counter ) {
+ $list.find( ".ui-li-dec" ).remove();
+ }
+
+ li.attr({ "role": "option", "tabindex": "-1" });
+
+ li.first().attr( "tabindex", "0" );
+
+ li.each(function( pos ) {
+ var item = jQuery( this ),
+ itemClass = "ui-li";
+
+ // If we're creating the element, we update it regardless
+ if ( !create && item.hasClass( "ui-li" ) ) {
+ return;
+ }
+
+ var a = item.find( "a" );
+
+ if ( a.length ) {
+ item
+ .buttonMarkup({
+ wrapperEls: "div",
+ shadow: false,
+ corners: false,
+ iconpos: "right",
+ icon: item.data("icon") || "arrow-r",
+ theme: o.theme
+ });
+
+ a.first().addClass( "ui-link-inherit" );
+
+ if ( a.length > 1 ) {
+ itemClass += " ui-li-has-alt";
+
+ var last = a.last();
+
+ last
+ .attr( "title", last.text() )
+ .addClass( "ui-li-link-alt" )
+ .empty()
+ .buttonMarkup({
+ shadow: false,
+ corners: false,
+ theme: o.theme,
+ icon: false,
+ iconpos: false
+ })
+ .find( ".ui-btn-inner" )
+ .append( jQuery( "<span>" ).buttonMarkup({
+ shadow: true,
+ corners: true,
+ theme: $list.data( "splittheme" ) || last.data( "theme" ) || o.splitTheme,
+ iconpos: "notext",
+ icon: $list.data( "spliticon" ) || last.data( "icon" ) || o.splitIcon
+ } ) );
+ }
+
+ } else if ( item.data( "role" ) === "list-divider" ) {
+ itemClass += " ui-li-divider ui-btn ui-bar-" + dividertheme;
+ item.attr( "role", "heading" );
+
+ //reset counter when a divider heading is encountered
+ if ( counter ) {
+ counter = 1;
+ }
+
+ } else {
+ itemClass += " ui-li-static ui-btn-up-" + o.theme;
+ }
+
+ if ( pos === 0 ) {
+ item.find( "img" ).addClass( "ui-corner-tl" );
+
+ if ( o.inset ) {
+ itemClass += " ui-corner-top";
+
+ item
+ .add( item.find( ".ui-btn-inner" ) )
+ .find( ".ui-li-link-alt" )
+ .addClass( "ui-corner-tr" )
+ .end()
+ .find( ".ui-li-thumb" )
+ .addClass( "ui-corner-tl" );
+ }
+
+ } else if ( pos === li.length - 1 ) {
+ item.find( "img" ).addClass( "ui-corner-bl" );
+
+ if ( o.inset ) {
+ itemClass += " ui-corner-bottom";
+
+ item
+ .add( item.find( ".ui-btn-inner" ) )
+ .find( ".ui-li-link-alt" )
+ .addClass( "ui-corner-br" )
+ .end()
+ .find( ".ui-li-thumb" )
+ .addClass( "ui-corner-bl" );
+ }
+ }
+
+ if ( counter && itemClass.indexOf( "ui-li-divider" ) < 0 ) {
+ item
+ .find( ".ui-link-inherit" ).first()
+ .addClass( "ui-li-jsnumbering" )
+ .prepend( "<span class='ui-li-dec'>" + (counter++) + ". </span>" );
+ }
+
+ item.addClass( itemClass );
+
+ if ( !create ) {
+ self._itemApply( $list, item );
+ }
+ });
+ },
+
+ _createSubPages: function() {
+ var parentList = this.element,
+ parentPage = parentList.closest( ".ui-page" ),
+ parentId = parentPage.attr( "id" ),
+ o = this.options,
+ persistentFooterID = parentPage.find( "[data-role='footer']" ).data( "id" );
+
+ jQuery( parentList.find( "ul, ol" ).toArray().reverse() ).each(function( i ) {
+ var list = jQuery( this ),
+ parent = list.parent(),
+ title = parent.contents()[ 0 ].nodeValue.split("\n")[0],
+ id = parentId + "&" + $.mobile.subPageUrlKey + "=" + $.mobile.idStringEscape(title + " " + i),
+ theme = list.data( "theme" ) || o.theme,
+ countTheme = list.data( "counttheme" ) || parentList.data( "counttheme" ) || o.countTheme,
+ newPage = list.wrap( "<div data-role='page'><div data-role='content'></div></div>" )
+ .parent()
+ .before( "<div data-role='header' data-theme='" + o.headerTheme + "'><div class='ui-title'>" + title + "</div></div>" )
+ .after( persistentFooterID ? $( "<div>", { "data-role": "footer", "data-id": persistentFooterID, "class": "ui-footer-duplicate" } ) : "" )
+ .parent()
+ .attr({
+ id: id,
+ "data-theme": theme,
+ "data-count-theme": countTheme
+ })
+ .appendTo( jQuery.pageContainer );
+
+
+
+ newPage.page();
+
+ parent.html( "<a href='#" + id + "'>" + title + "</a>" );
+ }).listview();
+ }
+});
+
+})( jQuery );
+(function( $ ) {
+
+$.mobile.listview.prototype.options.filter = false;
+
+$( "[data-role='listview']" ).live( "listviewcreate", function() {
+ var list = $( this ),
+ listview = list.data( "listview" );
+ if ( !listview.options.filter ) {
+ return;
+ }
+
+ var wrapper = $( "<form>", { "class": "ui-listview-filter ui-bar-c", "role": "search" } ),
+
+ search = $( "<input>", {
+ placeholder: "Filter results...",
+ "data-type": "search"
+ })
+ .bind( "keyup change", function() {
+ var val = this.value.toLowerCase();;
+ list.children().show();
+ if ( val ) {
+ list.children().filter(function() {
+ return $( this ).text().toLowerCase().indexOf( val ) === -1;
+ }).hide();
+ }
+
+ //listview._numberItems();
+ })
+ .appendTo( wrapper )
+ .customTextInput();
+
+ wrapper.insertBefore( list );
+});
+
+})( jQuery );
+/*
+* jQuery Mobile Framework : prototype for "dialog" plugin.
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+* Note: Code is in draft form and is subject to change
+*/
+(function ( $ ) {
+$.widget( "mobile.dialog", $.mobile.widget, {
+ options: {},
+ _create: function(){
+ var $el = this.element,
+ $closeBtn = $('<a href="#" data-icon="delete" data-iconpos="notext">Close</a>')
+ .click(function(){
+ $.changePage([$el, $.activePage], undefined, true );
+ return false;
+ });
+
+ this.element
+ .bind("pageshow",function(){
+ return false;
+ })
+ //add ARIA role
+ .attr("role","dialog")
+ .addClass('ui-page ui-dialog ui-body-a')
+ .find('[data-role=header]')
+ .addClass('ui-corner-top ui-overlay-shadow')
+ .prepend( $closeBtn )
+ .end()
+ .find('.ui-content,[data-role=footer]')
+ .last()
+ .addClass('ui-corner-bottom ui-overlay-shadow');
+
+ }
+});
+})( jQuery );/*
+* jQuery Mobile Framework : prototype for "navbar" plugin
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+* Note: Code is in draft form and is subject to change
+*/
+(function ( $ ) {
+$.widget( "mobile.navbar", $.mobile.widget, {
+ options: {
+ iconpos: 'top'
+ },
+ _create: function(){
+ var $navbar = this.element,
+ $navbtns = $navbar.find("a"),
+ iconpos = $navbtns.filter('icon').length ? this.options.iconpos : undefined;
+
+ $navbar
+ .addClass('ui-navbar')
+ .attr("role","navigation")
+ .find("ul")
+ .grid({grid: $navbtns.length > 2 ? "b" : "a"});
+
+ if( !iconpos ){
+ $navbar.addClass("ui-navbar-noicons");
+ }
+
+ $navbtns
+ .buttonMarkup({
+ corners: false,
+ shadow: false,
+ iconpos: iconpos
+ });
+
+ $navbar.delegate("a", "click",function(event){
+ $navbtns.removeClass("ui-btn-active");
+ });
+ }
+});
+})( jQuery );/*
+* jQuery Mobile Framework : plugin for creating grids
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+* Note: Code is in draft form and is subject to change
+*/
+(function($){
+$.fn.grid = function(options){
+ return $(this).each(function(){
+ var o = $.extend({
+ grid: 'a'
+ },options);
+
+ $(this).addClass('ui-grid-' + o.grid);
+
+ var $kids = $(this).children();
+ iterator = o.grid == 'a' ? 2 : 3;
+
+ $kids.filter(':nth-child(' + iterator + 'n+1)').addClass('ui-block-a');
+ $kids.filter(':nth-child(' + iterator + 'n+2)').addClass('ui-block-b');
+
+ if(iterator == 3){
+ $kids.filter(':nth-child(3n+3)').addClass('ui-block-c');
+ }
+ });
+};
+})(jQuery);
+
+/*!
+ * jQuery Mobile
+ * http://jquerymobile.com/
+ *
+ * Copyright 2010, jQuery Project
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ */
+(function( jQuery, window, undefined ) {
+ //some critical feature tests should be placed here.
+ //if we're missing support for any of these, then we're a C-grade browser
+ //to-do: see if we need more qualifiers here.
+ if ( !jQuery.support.mediaquery ) {
+ return;
+ }
+
+ //these properties should be made easy to override externally
+ jQuery.mobile = {};
+
+ jQuery.extend(jQuery.mobile, {
+ subPageUrlKey: 'ui-page', //define the key used in urls for sub-pages. Defaults to &ui-page=
+ degradeInputs: {
+ color: true,
+ date: true,
+ datetime: true,
+ "datetime-local": true,
+ email: true,
+ month: true,
+ number: true,
+ range: true,
+ search: true,
+ tel: true,
+ time: true,
+ url: true,
+ week: true
+ },
+ addBackBtn: true
+ });
+
+ var $window = jQuery(window),
+ $html = jQuery('html'),
+ $head = jQuery('head'),
+ $body,
+ $loader = jQuery('<div class="ui-loader ui-body-a ui-corner-all"><span class="ui-icon ui-icon-loading spin"></span><h1>loading</h1></div>'),
+ $startPage,
+ $pageContainer,
+ startPageId = 'ui-page-start',
+ activePageClass = 'ui-page-active',
+ activeBtnClass = 'ui-btn-active',
+ activeClickedLink = null,
+ pageTransition,
+ forceBack,
+ transitions = 'slide slideup slidedown pop flip fade',
+ transitionDuration = 350,
+ backBtnText = "Back",
+ urlStack = [ {
+ url: location.hash.replace( /^#/, "" ),
+ transition: "slide"
+ } ],
+ focusable = "[tabindex],a,button:visible,select:visible,input",
+ nextPageRole = null,
+ hashListener = true,
+ unHashedSelectors = '[data-rel=dialog]',
+ baseUrl = location.protocol + '//' + location.host + location.pathname,
+ resolutionBreakpoints = [320,480,768,1024];
+
+ // TODO: don't expose (temporary during code reorg)
+ $.mobile.urlStack = urlStack;
+
+ //consistent string escaping for urls and IDs
+ function idStringEscape(str){
+ return str.replace(/[^a-zA-Z0-9]/g, '-');
+ }
+
+ $.mobile.idStringEscape = idStringEscape;
+
+ // hide address bar
+ function hideBrowserChrome() {
+ // prevent scrollstart and scrollstop events
+ jQuery.event.special.scrollstart.enabled = false;
+ setTimeout(function() {
+ window.scrollTo( 0, 0 );
+ },0);
+ setTimeout(function() {
+ jQuery.event.special.scrollstart.enabled = true;
+ }, 150 );
+ }
+
+ function getBaseURL( nonHashPath ){
+ var newPath = nonHashPath || location.hash,
+ newBaseURL = newPath.replace(/#/,'').split('/');
+
+ if(newBaseURL.length && /[.|&]/.test(newBaseURL[newBaseURL.length-1]) ){
+ newBaseURL.pop();
+ }
+ newBaseURL = newBaseURL.join('/');
+ if(newBaseURL !== "" && newBaseURL.charAt(newBaseURL.length-1) !== '/'){ newBaseURL += '/'; }
+ return newBaseURL;
+ }
+
+ var setBaseURL = !$.support.dynamicBaseTag ? $.noop : function( nonHashPath ){
+ //set base url for new page assets
+ $('#ui-base').attr('href', baseUrl + getBaseURL( nonHashPath ));
+ }
+
+ var resetBaseURL = !$.support.dynamicBaseTag ? $.noop : function(){
+ $('#ui-base').attr('href', baseUrl);
+ }
+
+ //click routing - direct to HTTP or Ajax, accordingly
+ jQuery( "a" ).live( "click", function(event) {
+ var $this = $(this),
+ //get href, remove same-domain protocol and host
+ href = $this.attr( "href" ).replace( location.protocol + "//" + location.host, ""),
+ //if it still starts with a protocol, it's external, or could be :mailto, etc
+ external = /^(:?\w+:)/.test( href ) || $this.is( "[target],[rel=external]" );
+
+ if( href === '#' ){
+ //for links created purely for interaction - ignore
+ return false;
+ }
+
+ activeClickedLink = $this.closest( ".ui-btn" ).addClass( activeBtnClass );
+
+ if( external ){
+ //deliberately redirect, in case click was triggered
+ location.href = href;
+ }
+ else {
+ //use ajax
+ var pageTransition = $this.data( "transition" ) || "slide",
+ forceBack = $this.data( "back" ) || undefined,
+ changeHashOnSuccess = !$this.is(unHashedSelectors);
+
+ nextPageRole = $this.attr( "data-rel" );
+
+ //if it's a relative href, prefix href with base url
+ if( href.indexOf('/') && href.indexOf('#') !== 0 ){
+ href = getBaseURL() + href;
+ }
+
+ href.replace(/^#/,'');
+
+ changePage(href, pageTransition, forceBack, changeHashOnSuccess);
+ }
+ event.preventDefault();
+ });
+
+ // turn on/off page loading message.
+ function pageLoading( done ) {
+ if ( done ) {
+ $html.removeClass( "ui-loading" );
+ } else {
+ $loader.appendTo($pageContainer).css({top: $(window).scrollTop() + 75});
+ $html.addClass( "ui-loading" );
+ }
+ };
+
+ //for directing focus to the page title, or otherwise first focusable element
+ function reFocus(page){
+ var pageTitle = page.find( ".ui-title:eq(0)" );
+ if( pageTitle.length ){
+ pageTitle.focus();
+ }
+ else{
+ page.find( focusable ).eq(0).focus();
+ }
+ }
+
+ //function for setting role of next page
+ function setPageRole( newPage ) {
+ if ( nextPageRole ) {
+ newPage.attr( "data-role", nextPageRole );
+ nextPageRole = undefined;
+ }
+ }
+
+ //wrap page and transfer data-attrs if it has an ID
+ function wrapNewPage( newPage ){
+ var copyAttrs = ['data-role', 'data-theme', 'data-fullscreen'], //TODO: more page-level attrs?
+ wrapper = newPage.wrap( "<div>" ).parent();
+
+ $.each(copyAttrs,function(i){
+ if( newPage.attr( copyAttrs[ i ] ) ){
+ wrapper.attr( copyAttrs[ i ], newPage.attr( copyAttrs[ i ] ) );
+ newPage.removeAttr( copyAttrs[ i ] );
+ }
+ });
+ return wrapper;
+ }
+
+ //remove active classes after page transition or error
+ function removeActiveLinkClass(){
+ if(activeClickedLink && !activeClickedLink.closest( '.ui-page-active' ).length ){
+ activeClickedLink.removeClass( activeBtnClass );
+ }
+ activeClickedLink = null;
+ }
+
+
+ //for getting or creating a new page
+ function changePage( to, transition, back, changeHash){
+
+ //from is always the currently viewed page
+ var toIsArray = $.type(to) === "array",
+ from = toIsArray ? to[0] : $.activePage,
+ to = toIsArray ? to[1] : to,
+ url = fileUrl = $.type(to) === "string" ? to.replace( /^#/, "" ) : null,
+ back = (back !== undefined) ? back : ( urlStack.length > 1 && urlStack[ urlStack.length - 2 ].url === url ),
+ transition = (transition !== undefined) ? transition : ( pageTransition || "slide" );
+
+ //unset pageTransition, forceBack
+ pageTransition = undefined;
+ forceBack = undefined;
+
+ //reset base to pathname for new request
+ resetBaseURL();
+
+ // if the new href is the same as the previous one
+ if ( back ) {
+ transition = urlStack.pop().transition;
+ } else {
+ urlStack.push({ url: url, transition: transition });
+ }
+
+ //function for transitioning between two existing pages
+ function transitionPages() {
+
+ //kill the keyboard
+ jQuery( document.activeElement ).blur();
+
+ //trigger before show/hide events
+ from.data("page")._trigger("beforehide", {nextPage: to});
+ to.data("page")._trigger("beforeshow", {prevPage: from});
+
+ function loadComplete(){
+ pageLoading( true );
+ //trigger show/hide events, allow preventing focus change through return false
+ if( from.data("page")._trigger("hide", null, {nextPage: to}) !== false && to.data("page")._trigger("show", null, {prevPage: from}) !== false ){
+ $.activePage = to;
+ }
+ reFocus( to );
+ if( changeHash && url ){
+ hashListener = false;
+ location.hash = url;
+ setTimeout(function(){
+ hashListener = true;
+ }, 500);
+ }
+ removeActiveLinkClass();
+ }
+
+ if(transition){
+ // animate in / out
+ from.addClass( transition + " out " + ( back ? "reverse" : "" ) );
+ to.addClass( activePageClass + " " + transition +
+ " in " + ( back ? "reverse" : "" ) );
+
+ // callback - remove classes, etc
+ to.animationComplete(function() {
+ from.add( to ).removeClass(" out in reverse " + transitions );
+ from.removeClass( activePageClass );
+ loadComplete();
+ });
+ }
+ else{
+ from.removeClass( activePageClass );
+ to.addClass( activePageClass );
+ loadComplete();
+ }
+ };
+
+ //shared page enhancements
+ function enhancePage(){
+ setPageRole( to );
+ to.page();
+ }
+
+ //get the actual file in a jq-mobile nested url
+ function getFileURL( url ){
+ return url.match( '&' + jQuery.mobile.subPageUrlKey ) ? url.split( '&' + jQuery.mobile.subPageUrlKey )[0] : url;
+ }
+
+ //if url is a string
+ if( url ){
+ to = jQuery( "[id='" + url + "']" ),
+ fileUrl = getFileURL(url);
+ }
+ else{ //find base url of element, if avail
+ var toID = to.attr('id'),
+ toIDfileurl = getFileURL(toID);
+
+ if(toID != toIDfileurl){
+ fileUrl = toIDfileurl;
+ }
+ }
+
+ // find the "to" page, either locally existing in the dom or by creating it through ajax
+ if ( to.length ) {
+ if( fileUrl ){
+ setBaseURL(fileUrl);
+ }
+ enhancePage();
+ transitionPages();
+ } else {
+
+ pageLoading();
+
+ $.ajax({
+ url: fileUrl,
+ success: function( html ) {
+ setBaseURL(fileUrl);
+ var all = jQuery("<div></div>");
+ //workaround to allow scripts to execute when included in page divs
+ all.get(0).innerHTML = html;
+ to = all.find('[data-role="page"]');
+
+ //rewrite src and href attrs to use a base url
+ if( !$.support.dynamicBaseTag ){
+ var baseUrl = getBaseURL(fileUrl);
+ to.find('[src],[href]').each(function(){
+ var thisAttr = $(this).is('[href]') ? 'href' : 'src',
+ thisUrl = $(this).attr(thisAttr);
+
+ //if full path exists and is same, chop it - helps IE out
+ thisUrl.replace( location.protocol + '//' + location.host + location.pathname, '' );
+
+ if( !/^(\w+:|#|\/)/.test(thisUrl) ){
+ $(this).attr(thisAttr, baseUrl + thisUrl);
+ }
+ });
+ }
+
+ //preserve ID on a retrieved page
+ if ( to.attr('id') ) {
+ to = wrapNewPage( to );
+ }
+
+ to
+ .attr( "id", fileUrl )
+ .appendTo( $pageContainer );
+
+ enhancePage();
+ transitionPages();
+ },
+ error: function() {
+ pageLoading( true );
+ removeActiveLinkClass();
+ jQuery("<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": $(window).scrollTop() + 100 })
+ .appendTo( $pageContainer )
+ .delay( 800 )
+ .fadeOut( 400, function(){
+ $(this).remove();
+ });
+ }
+ });
+ }
+
+ };
+
+
+ jQuery(function() {
+
+ $body = jQuery( "body" );
+ pageLoading();
+
+ // needs to be bound at domready (for IE6)
+ // find or load content, make it active
+ $window.bind( "hashchange", function(e, extras) {
+ if( !hashListener ){ return; }
+ var to = location.hash,
+ transition = (extras && extras.manuallyTriggered) ? false : undefined;
+
+ // either we've backed up to the root page url
+ // or it's the first page load with no hash present
+ //there's a hash and it wasn't manually triggered
+ // > probably a new page, "back" will be figured out by changePage
+ if ( to ){
+ changePage( to, transition);
+ }
+ //there's no hash, the active page is not the start page, and it's not manually triggered hashchange
+ // > probably backed out to the first page visited
+ else if( $.activePage.length && !$startPage.is( $.activePage ) && !(extras && extras.manuallyTriggered) ) {
+ changePage( $startPage, transition, true );
+ }
+ else{
+ $startPage.trigger("pagebeforeshow", {prevPage: $('')});
+ $startPage.addClass( activePageClass );
+ pageLoading( true );
+
+ if( $startPage.trigger("pageshow", {prevPage: $('')}) !== false ){
+ reFocus($startPage);
+ }
+ }
+
+ });
+ });
+
+ //add mobile, loading classes to doc
+ $html.addClass('ui-mobile');
+
+ //add orientation class on flip/resize.
+ $window.bind( "orientationchange", function( event, data ) {
+ $html.removeClass( "portrait landscape" ).addClass( data.orientation );
+ });
+
+ //add breakpoint classes for faux media-q support
+ function detectResolutionBreakpoints(){
+ var currWidth = $window.width(),
+ minPrefix = "min-width-",
+ maxPrefix = "max-width-",
+ minBreakpoints = [],
+ maxBreakpoints = [],
+ unit = "px",
+ breakpointClasses;
+
+ $html.removeClass( minPrefix + resolutionBreakpoints.join(unit + " " + minPrefix) + unit + " " +
+ maxPrefix + resolutionBreakpoints.join( unit + " " + maxPrefix) + unit );
+
+ $.each(resolutionBreakpoints,function( i ){
+ if( currWidth >= resolutionBreakpoints[ i ] ){
+ minBreakpoints.push( minPrefix + resolutionBreakpoints[ i ] + unit );
+ }
+ if( currWidth <= resolutionBreakpoints[ i ] ){
+ maxBreakpoints.push( maxPrefix + resolutionBreakpoints[ i ] + unit );
+ }
+ });
+
+ if( minBreakpoints.length ){ breakpointClasses = minBreakpoints.join(" "); }
+ if( maxBreakpoints.length ){ breakpointClasses += " " + maxBreakpoints.join(" "); }
+
+ $html.addClass( breakpointClasses );
+ };
+
+ //add breakpoints now and on oc/resize events
+ $window.bind( "orientationchange resize", detectResolutionBreakpoints);
+ detectResolutionBreakpoints();
+
+ //common breakpoints, overrideable, changeable
+ $.mobile.addResolutionBreakpoints = function( newbps ){
+ if( $.type( newbps ) === "array" ){
+ resolutionBreakpoints = resolutionBreakpoints.concat( newbps );
+ }
+ else {
+ resolutionBreakpoints.push( newbps );
+ }
+ detectResolutionBreakpoints();
+ }
+
+ //insert mobile meta - these will need to be configurable somehow.
+ var headPrepends =
+ $head.prepend(
+ '<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1" />' +
+ ($.support.dynamicBaseTag ? '<base href="" id="ui-base" />' : '')
+ );
+
+ //set base href to pathname
+ resetBaseURL();
+
+ //incomplete fallback to workaround lack of animation callbacks.
+ //should this be extended into a full special event?
+ // note: Expects CSS animations use transitionDuration (350ms)
+ jQuery.fn.animationComplete = function(callback){
+ if(jQuery.support.WebKitAnimationEvent){
+ return jQuery(this).one('webkitAnimationEnd', callback); //check out transitionEnd (opera per Paul's request)
+ }
+ else{
+ setTimeout(callback, transitionDuration);
+ }
+ };
+
+ jQuery.extend({
+ pageLoading: pageLoading,
+ changePage: changePage,
+ hideBrowserChrome: hideBrowserChrome
+ });
+
+ //dom-ready
+ jQuery(function(){
+ var $pages = jQuery("[data-role='page']");
+ //set up active page
+ $startPage = $.activePage = $pages.first();
+
+ //set page container
+ $pageContainer = $startPage.parent();
+
+ jQuery.extend({
+ pageContainer: $pageContainer
+ });
+
+ //make sure it has an ID - for finding it later
+ if(!$startPage.attr('id')){
+ $startPage.attr('id', startPageId);
+ }
+
+ //initialize all pages present
+ $pages.page();
+
+ //trigger a new hashchange, hash or not
+ $window.trigger( "hashchange", { manuallyTriggered: true } );
+
+ //update orientation
+ $html.addClass( jQuery.event.special.orientationchange.orientation( $window ) );
+ });
+
+ $window.load(hideBrowserChrome);
+
+})( jQuery, this );
diff --git a/site_media/js/jquery.mobile-1.0a1.min.js b/site_media/js/jquery.mobile-1.0a1.min.js
new file mode 100644
index 0000000..bee274c
--- /dev/null
+++ b/site_media/js/jquery.mobile-1.0a1.min.js
@@ -0,0 +1,94 @@
+/*!
+ * jQuery Mobile
+ * http://jquerymobile.com/
+ *
+ * Copyright 2010, jQuery Project
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ */
+(function(a,f){if(a.cleanData){var c=a.cleanData;a.cleanData=function(b){for(var e=0,g;(g=b[e])!=null;e++)a(g).triggerHandler("remove");c(b)}}else{var d=a.fn.remove;a.fn.remove=function(b,e){return this.each(function(){if(!e)if(!b||a.filter(b,[this]).length)a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")});return d.call(a(this),b,e)})}}a.widget=function(b,e,g){var h=b.split(".")[0],l;b=b.split(".")[1];l=h+"-"+b;if(!g){g=e;e=a.Widget}a.expr[":"][l]=function(i){return!!a.data(i,
+b)};a[h]=a[h]||{};a[h][b]=function(i,j){arguments.length&&this._createWidget(i,j)};e=new e;e.options=a.extend(true,{},e.options);a[h][b].prototype=a.extend(true,e,{namespace:h,widgetName:b,widgetEventPrefix:a[h][b].prototype.widgetEventPrefix||b,widgetBaseClass:l},g);a.widget.bridge(b,a[h][b])};a.widget.bridge=function(b,e){a.fn[b]=function(g){var h=typeof g==="string",l=Array.prototype.slice.call(arguments,1),i=this;g=!h&&l.length?a.extend.apply(null,[true,g].concat(l)):g;if(h&&g.charAt(0)==="_")return i;
+h?this.each(function(){var j=a.data(this,b);if(!j)throw"cannot call methods on "+b+" prior to initialization; attempted to call method '"+g+"'";if(!a.isFunction(j[g]))throw"no such method '"+g+"' for "+b+" widget instance";var m=j[g].apply(j,l);if(m!==j&&m!==f){i=m;return false}}):this.each(function(){var j=a.data(this,b);j?j.option(g||{})._init():a.data(this,b,new e(g,this))});return i}};a.Widget=function(b,e){arguments.length&&this._createWidget(b,e)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",
+options:{disabled:false},_createWidget:function(b,e){a.data(e,this.widgetName,this);this.element=a(e);this.options=a.extend(true,{},this.options,this._getCreateOptions(),b);var g=this;this.element.bind("remove."+this.widgetName,function(){g.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){var b={};if(a.metadata)b=a.metadata.get(element)[this.widgetName];return b},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);
+this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(b,e){var g=b;if(arguments.length===0)return a.extend({},this.options);if(typeof b==="string"){if(e===f)return this.options[b];g={};g[b]=e}this._setOptions(g);return this},_setOptions:function(b){var e=this;a.each(b,function(g,h){e._setOption(g,h)});return this},_setOption:function(b,e){this.options[b]=e;if(b===
+"disabled")this.widget()[e?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",e);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(b,e,g){var h=this.options[b];e=a.Event(e);e.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();g=g||{};if(e.originalEvent){b=a.event.props.length;for(var l;b;){l=a.event.props[--b];e[l]=e.originalEvent[l]}}this.element.trigger(e,
+g);return!(a.isFunction(h)&&h.call(this.element[0],e,g)===false||e.isDefaultPrevented())}}})(jQuery);(function(a){a.widget("mobile.widget",{_getCreateOptions:function(){var f=this.element,c={};a.each(this.options,function(d){var b=f.data(d.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()}));if(b!==undefined)c[d]=b});return c}})})(jQuery);
+$.media=function(){var a={},f=$("html"),c=$("<div id='jquery-mediatest'>"),d=$("<body>").append(c);return function(b){if(!(b in a)){var e=$("<style type='text/css'>@media "+b+"{#jquery-mediatest{position:absolute;}}</style>");f.prepend(d).prepend(e);a[b]=c.css("position")==="absolute";d.add(e).remove()}return a[b]}}();var fakeBody=$("<body>").prependTo("html"),fbCSS=fakeBody[0].style,vendors=["webkit","moz","o"],webos=window.palmGetResource||window.PalmServiceBridge,bb=window.blackberry;
+function propExists(a){var f=a.charAt(0).toUpperCase()+a.substr(1);a=(a+" "+vendors.join(f+" ")+f).split(" ");for(var c in a)if(fbCSS[c]!==undefined)return true}function baseTagTest(){var a=location.protocol+"//"+location.host+location.pathname+"ui-dir/",f=$("<base>",{href:a}).appendTo("head"),c=$("<a href='testurl'></a>").prependTo(fakeBody)[0].href;f.remove();return c.indexOf(a)===0}
+$.extend($.support,{orientation:"orientation"in window,touch:"ontouchend"in document,WebKitAnimationEvent:typeof WebKitTransitionEvent==="object",pushState:!!history.pushState,mediaquery:$.media("only all"),cssPseudoElement:!!propExists("content"),boxShadow:!!propExists("boxShadow")&&!bb,scrollTop:("pageXOffset"in window||"scrollTop"in document.documentElement||"scrollTop"in fakeBody[0])&&!webos,dynamicBaseTag:baseTagTest()});fakeBody.remove();$.support.boxShadow||$("html").addClass("ui-mobile-nosupport-boxshadow");
+$.each("touchstart touchmove touchend orientationchange tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(a,f){$.fn[f]=function(c){return c?this.bind(f,c):this.trigger(f)};$.attrFn[f]=true});var supportTouch=$.support.touch,scrollEvent="touchmove scroll",touchStartEvent=supportTouch?"touchstart":"mousedown",touchStopEvent=supportTouch?"touchend":"mouseup",touchMoveEvent=supportTouch?"touchmove":"mousemove";
+$.event.special.scrollstart={enabled:true,setup:function(){function a(b,e){c=e;var g=b.type;b.type=c?"scrollstart":"scrollstop";$.event.handle.call(f,b);b.type=g}var f=this,c,d;$(f).bind(scrollEvent,function(b){if($.event.special.scrollstart.enabled){c||a(b,true);clearTimeout(d);d=setTimeout(function(){a(b,false)},50)}})}};
+$.event.special.tap={setup:function(){var a=this,f=$(a);f.bind(touchStartEvent,function(c){function d(){b=true}if(!(c.which&&c.which!==1)){var b=false,e=true,g,h;h=setTimeout(function(){if(e&&!b){g=c.type;c.type="taphold";$.event.handle.call(a,c);c.type=g}},750);f.one(touchMoveEvent,d).one(touchStopEvent,function(l){f.unbind(touchMoveEvent,d);clearTimeout(h);e=false;if(!b){g=l.type;l.type="tap";$.event.handle.call(a,l);l.type=g}})}})}};
+$.event.special.swipe={setup:function(){var a=$(this);a.bind(touchStartEvent,function(f){function c(g){if(b){var h=g.originalEvent.touches?g.originalEvent.touches[0]:g;e={time:(new Date).getTime(),coords:[h.pageX,h.pageY]};Math.abs(b.coords[0]-e.coords[0])>10&&g.preventDefault()}}var d=f.originalEvent.touches?f.originalEvent.touches[0]:f,b={time:(new Date).getTime(),coords:[d.pageX,d.pageY],origin:$(f.target)},e;a.bind(touchMoveEvent,c).one(touchStopEvent,function(){a.unbind(touchMoveEvent,c);if(b&&
+e)if(e.time-b.time<1E3&&Math.abs(b.coords[0]-e.coords[0])>30&&Math.abs(b.coords[1]-e.coords[1])<20)b.origin.trigger("swipe").trigger(b.coords[0]>e.coords[0]?"swipeleft":"swiperight");b=e=undefined})})}};
+$.event.special.orientationchange={orientation:function(a){return document.body&&a.width()/a.height()<1.1?"portrait":"landscape"},setup:function(){function a(){var b=$.event.special.orientationchange.orientation(c);if(d!==b){$.event.handle.call(f,"orientationchange",{orientation:b});d=b}}var f=this,c=$(f),d=$.event.special.orientationchange.orientation(c);$.support.orientation?f.addEventListener("orientationchange",a,false):c.bind("resize",a)}};
+$.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe",swiperight:"swipe"},function(a,f){$.event.special[a]={setup:function(){$(this).bind(f,$.noop)}}});
+(function(a,f,c){function d(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}var b="hashchange",e=document,g,h=a.event.special,l=e.documentMode,i="on"+b in f&&(l===c||l>7);a.fn[b]=function(j){return j?this.bind(b,j):this.trigger(b)};a.fn[b].delay=50;h[b]=a.extend(h[b],{setup:function(){if(i)return false;a(g.start)},teardown:function(){if(i)return false;a(g.stop)}});g=function(){function j(){var u=d(),p=t(w);if(u!==w){o(w=u,p);a(f).trigger(b)}else if(p!==w)location.href=location.href.replace(/#.*/,
+"")+p;n=setTimeout(j,a.fn[b].delay)}var m={},n,w=d(),s=function(u){return u},o=s,t=s;m.start=function(){n||j()};m.stop=function(){n&&clearTimeout(n);n=c};a.browser.msie&&!i&&function(){var u,p;m.start=function(){if(!u){p=(p=a.fn[b].src)&&p+d();u=a('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){p||o(d());j()}).attr("src",p||"javascript:0").insertAfter("body")[0].contentWindow;e.onpropertychange=function(){try{if(event.propertyName==="title")u.document.title=e.title}catch(y){}}}};
+m.stop=s;t=function(){return d(u.location.href)};o=function(y,r){var D=u.document,B=a.fn[b].domain;if(y!==r){D.title=e.title;D.open();B&&D.write('<script>document.domain="'+B+'"<\/script>');D.close();u.location.hash=y}}}();return m}()})(jQuery,this);
+(function(a){a.widget("mobile.page",a.mobile.widget,{options:{},_create:function(){var f=this.element;if(this._trigger("beforeCreate")!==false){f.find("[data-role='page'], [data-role='content']").andSelf().each(function(){a(this).addClass("ui-"+a(this).data("role"))});f.find("[data-role='nojs']").addClass("ui-nojs");this._enchanceControls();f.find("[data-role]").andSelf().each(function(){var c=a(this),d=c.data("role"),b=c.data("theme");if(d==="header"||d==="footer"){c.addClass("ui-bar-"+(b||"a"));
+c.attr("role",d==="header"?"banner":"contentinfo");b=c.children("a");var e=b.hasClass("ui-btn-left"),g=b.hasClass("ui-btn-right");if(!e)e=b.eq(0).not(".ui-btn-right").addClass("ui-btn-left").length;if(!g)g=b.eq(1).addClass("ui-btn-right").length;if(a.mobile.addBackBtn&&d==="header"&&(a.mobile.urlStack.length>1||a(".ui-page").length>1)&&!e&&!c.data("noBackBtn"))a("<a href='#' class='ui-btn-left' data-icon='arrow-l'>Back</a>").click(function(){history.back();return false}).prependTo(c);c.children("h1, h2, h3, h4, h5, h6").addClass("ui-title").attr({tabindex:"0",
+role:"heading","aria-level":"1"})}else if(d==="content"){b&&c.addClass("ui-body-"+b);c.attr("role","main")}else if(d==="page")c.addClass("ui-body-"+(b||"c"));switch(d){case "header":case "footer":case "page":case "content":c.addClass("ui-"+d);break;case "collapsible":case "fieldcontain":case "navbar":case "listview":case "dialog":case "ajaxform":c[d]()}});f.find("[data-role='button'], .ui-bar a, .ui-header a, .ui-footer a").not(".ui-btn").buttonMarkup();f.find("[data-role='controlgroup']").controlgroup();
+f.find("a:not(.ui-btn):not(.ui-link-inherit)").addClass("ui-link");f.fixHeaderFooter()}},_enchanceControls:function(){this.element.find("input").each(function(){var f=this.getAttribute("type");a.mobile.degradeInputs[f]&&a(this).replaceWith(a("<div>").html(a(this).clone()).html().replace(/type="([a-zA-Z]+)"/,"data-type='$1'"))});this.element.find("[type='radio'], [type='checkbox']").customCheckboxRadio();this.element.find("button, [type='button'], [type='submit'], [type='reset'], [type='image']").not(".ui-nojs").customButton();
+this.element.find("input, textarea").not("[type='radio'], [type='checkbox'], button, [type='button'], [type='submit'], [type='reset'], [type='image']").customTextInput();this.element.find("input, select").filter("[data-role='slider'], [data-type='range']").slider();this.element.find("select:not([data-role='slider'])").customSelect()}})})(jQuery);
+(function(a){a.fn.fixHeaderFooter=function(){if(!a.support.scrollTop)return a(this);return a(this).each(function(){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(){function f(i){var j=a(window).scrollTop(),m=i.offset().top,n=i.css("top")=="auto"?0:parseFloat(i.css("top")),
+w=window.innerHeight,s=i.outerHeight(),o=i.parents(".ui-page:not(.ui-page-fullscreen)").length;if(i.is(".ui-header-fixed")){n=j-m+n;if(n<m)n=0;return i.css("top",o?n:j)}else{n=-1*(m-(j+w)+n+s);if(n>m)n=0;return i.css("top",o?n:j+w-s)}}if(a.support.scrollTop){var c="inline",d,b=a.support.touch,e=b?"touchstart":"mousedown",g=b?"touchend":"mouseup",h=null,l=false;a(function(){a(document).bind(e,function(i){if(!a(i.target).closest("a,input,textarea,select,button,label,.ui-header-fixed,.ui-footer-fixed").length){h=
+c;a.fixedToolbars.hide(true)}}).bind("scrollstart",function(i){if(!a(i.target).closest("a,input,textarea,select,button,label,.ui-header-fixed,.ui-footer-fixed").length){l=true;if(h==null)h=c;a.fixedToolbars.hide(true)}}).bind(g,function(i){if(!a(i.target).closest("a,input,textarea,select,button,label,.ui-header-fixed,.ui-footer-fixed").length)if(!l){a.fixedToolbars.toggle(h);h=null}}).bind("scrollstop",function(i){if(!a(i.target).closest("a,input,textarea,select,button,label,.ui-header-fixed,.ui-footer-fixed").length){l=
+false;a.fixedToolbars.toggle(h=="overlay"?"inline":"overlay");h=null}});a(".ui-page").live("pagebeforeshow",function(i){var j=a(i.target).find('[data-role="footer"]');d=jQuery('.ui-footer[data-id="'+j.data("id")+'"]:not(.ui-footer-duplicate)').not(j);if(d.length){d.parents(".ui-page:eq(0)").find('.ui-footer[data-id="'+d.data("id")+'"]').length==1&&d.before(d.clone().addClass("ui-footer-duplicate"));a(i.target).find('[data-role="footer"]').addClass("ui-footer-duplicate");d.appendTo(a.pageContainer).css("top",
+0);f(d)}});a(".ui-page").live("pageshow",function(i){d&&d.length&&d.appendTo(i.target).css("top",0);a.fixedToolbars.show(true)})});return{show:function(i){c="overlay";return a(".ui-page-active .ui-header-fixed:first, .ui-page-active .ui-footer-fixed:not(.ui-footer-duplicate):last").each(function(){var j=a(this),m=a(window).scrollTop(),n=j.offset().top,w=window.innerHeight,s=j.outerHeight();m=j.is(".ui-header-fixed")&&m<=n+s||j.is(".ui-footer-fixed")&&n<=m+w;j.addClass("ui-fixed-overlay").removeClass("ui-fixed-inline");
+!m&&!i&&j.addClass("in").animationComplete(function(){j.removeClass("in")});f(j)})},hide:function(i){c="inline";return a(".ui-page-active .ui-header-fixed:first, .ui-page-active .ui-footer-fixed:not(.ui-footer-duplicate):last").each(function(){var j=a(this);j.addClass("ui-fixed-inline").removeClass("ui-fixed-overlay");if(i)j.css("top",0);else j.css("top")!=="auto"&&parseFloat(j.css("top"))!==0&&j.addClass("out reverse").animationComplete(function(){j.removeClass("out reverse");j.css("top",0)})})},
+hideAfterDelay:function(){setTimeout(function(){a.fixedToolbars.hide()},3E3)},toggle:function(i){if(i)c=i;return c=="overlay"?a.fixedToolbars.hide():a.fixedToolbars.show()}}}}()})(jQuery);
+(function(a){a.fn.customCheckboxRadio=function(f){return this.each(function(){var c=a(this),d=c.attr("type");if(d==="checkbox"||d==="radio"){var b=a.extend({theme:c.data("theme"),icon:c.data("icon")||!c.parents("[data-type='horizontal']").length,checkedicon:"ui-icon-"+d+"-on",uncheckedicon:"ui-icon-"+d+"-off"},f),e=a("label[for='"+c.attr("id")+"']").buttonMarkup({iconpos:b.icon?"left":"",theme:b.theme,icon:b.icon?b.uncheckedicon:null,shadow:false}),g=e.find(".ui-icon");c.add(e).wrapAll("<div class='ui-"+
+d+"'></div>");e.bind({mousedown:function(){e.data("state",c.attr("checked"))},click:function(){setTimeout(function(){c.attr("checked")===e.data("state")&&c.trigger("click")},1)}});c.bind({updateState:function(){if(this.checked){e.addClass("ui-btn-active");g.addClass(b.checkedicon);g.removeClass(b.uncheckedicon)}else{e.removeClass("ui-btn-active");g.removeClass(b.checkedicon);g.addClass(b.uncheckedicon)}},click:function(){a("input[name='"+c.attr("name")+"']").trigger("updateState")},focus:function(){e.addClass("ui-focus")},
+blur:function(){e.removeClass("ui-focus")}}).trigger("updateState")}})}})(jQuery);
+(function(a){jQuery.fn.customTextInput=function(f){return a(this).each(function(){var c=a(this),d=a.extend({search:c.is('[type="search"],[data-type="search"]'),theme:c.data("theme")||"c"},f);a("label[for="+c.attr("id")+"]").addClass("ui-input-text");c.addClass("ui-input-text ui-body-"+d.theme);var b=c;if(d.search){b=c.wrap('<div class="ui-input-search ui-shadow-inset ui-btn-corner-all ui-body-c ui-btn-shadow ui-icon-search"></div>').parent();var e=a('<a href="#" class="ui-input-clear" title="clear text">clear text</a>').buttonMarkup({icon:"delete",
+iconpos:"notext",corners:true,shadow:true}).click(function(){c.val("").focus();c.trigger("change");e.addClass("ui-input-clear-hidden");return false}).appendTo(b);d=function(){c.val()==""?e.addClass("ui-input-clear-hidden"):e.removeClass("ui-input-clear-hidden")};d();c.keyup(d)}else c.addClass("ui-corner-all ui-shadow-inset");c.focus(function(){b.addClass("ui-focus")}).blur(function(){b.removeClass("ui-focus")});if(c.is("textarea")){var g=function(){var l=c[0].scrollHeight;c[0].clientHeight<l&&c.css({height:l+
+15})},h;c.keyup(function(){clearTimeout(h);h=setTimeout(g,100)})}})}})(jQuery);
+(function(a){a.fn.customSelect=function(f){return a(this).each(function(){function c(){if(l=="page")a.changePage([m,h],undefined,true);else{w.addClass("ui-screen-hidden");s.addClass("ui-listbox-hidden").removeAttr("style").removeClass("in")}}var d=a(this).attr("tabindex","-1").wrap("<div class='ui-select'>"),b=d.attr("id"),e=a("label[for="+b+"]").addClass("ui-select");e=a.extend({chooseText:e.text(),theme:d.data("theme")},f);var g=b+"-button";b=b+"-menu";var h=d.closest(".ui-page"),l,i,j=a("<a>",
+{href:"#",role:"button",title:"select menu",id:g,"aria-haspopup":"true","aria-owns":b}).text(a(this.options.item(this.selectedIndex)).text()).insertBefore(d).buttonMarkup({iconpos:"right",icon:"arrow-d",theme:e.theme}),m=a("<div data-role='dialog' data-theme='a'><div data-role='header' data-theme='b'><div class='ui-title'>"+e.chooseText+"</div></div><div data-role='content'></div></div>").appendTo(a.pageContainer).page(),n=m.find(".ui-content"),w=a("<div>",{"class":"ui-listbox-screen ui-overlay ui-screen-hidden fade"}).appendTo(h),
+s=a("<div>",{"class":"ui-listbox ui-listbox-hidden ui-body-a ui-overlay-shadow ui-corner-all pop"}).insertAfter(w),o=a("<ul>",{"class":"ui-listbox-list",id:b,role:"listbox","aria-labelledby":g}).appendTo(s);d.find("option").each(function(t){t=d[0].selectedIndex==t;var u=a("<a>",{"aria-selected":t,role:"option",href:"#"}).text(a(this).text());a("<li>",{"class":t?"ui-btn-active":"","data-icon":"checkbox-on"}).append(u).appendTo(o)});o.listview();m.bind("pageshow",function(){o.find(".ui-btn-active").focus();
+return false}).bind("pagehide",function(){window.scrollTo(i[0],i[1]);d.focus();s.append(o).removeAttr("style");return false});d.change(function(){var t=d.get(0);j.find(".ui-btn-text").text(a(t.options.item(t.selectedIndex)).text())}).focus(function(){a(this).blur();j.focus()});j.mousedown(function(){var t=o.outerHeight();i=[a(window).scrollLeft(),a(window).scrollTop()];if(t>window.innerHeight-80||!a.support.scrollTop){l="page";n.append(o);a.changePage(m,undefined)}else{l="overlay";w.height(a(document).height()).removeClass("ui-screen-hidden");
+s.append(o).removeClass("ui-listbox-hidden").css({top:a(window).scrollTop()+window.innerHeight/2,"margin-top":-t/2,left:window.innerWidth/2,"margin-left":-1*s.outerWidth()/2}).addClass("in")}return false});o.find("li").mousedown(function(){o.find("li").removeClass("ui-btn-active").children(0).attr("aria-selected","false");a(this).addClass("ui-btn-active").find("a").attr("aria-selected","true");var t=o.find("li").index(this),u=d[0].selectedIndex;d[0].selectedIndex=t;t!==u&&d.trigger("change");c();
+return false});w.click(function(){c();return false})})}})(jQuery);
+(function(a){a.fn.buttonMarkup=function(c){return this.each(function(){var d=a(this),b=a.extend({},a.fn.buttonMarkup.defaults,d.data(),c),e,g="ui-btn-inner",h;f&&f();if(!b.theme){e=d.closest("[class*='ui-bar-'],[class*='ui-body-']");b.theme=e.length?/ui-(bar|body)-([a-z])/.exec(e.attr("class"))[2]:"c"}e="ui-btn ui-btn-up-"+b.theme;if(b.inline)e+=" ui-btn-inline";if(b.icon){b.icon="ui-icon-"+b.icon;b.iconpos=b.iconpos||"left";h="ui-icon "+b.icon;if(b.shadow)h+=" ui-icon-shadow"}if(b.iconpos){e+=" ui-btn-icon-"+
+b.iconpos;b.iconpos=="notext"&&!d.attr("title")&&d.attr("title",d.text())}if(b.corners){e+=" ui-btn-corner-all";g+=" ui-btn-corner-all"}if(b.shadow)e+=" ui-shadow";d.attr("data-theme",b.theme).addClass(e);b=("<D class='"+g+"'><D class='ui-btn-text'></D>"+(b.icon?"<span class='"+h+"'></span>":"")+"</D>").replace(/D/g,b.wrapperEls);d.wrapInner(b)})};a.fn.buttonMarkup.defaults={corners:true,shadow:true,iconshadow:true,wrapperEls:"span"};var f=function(){a(".ui-btn").live({mousedown:function(){var c=
+a(this).attr("data-theme");a(this).removeClass("ui-btn-up-"+c).addClass("ui-btn-down-"+c)},mouseup:function(){var c=a(this).attr("data-theme");a(this).removeClass("ui-btn-down-"+c).addClass("ui-btn-up-"+c)},"mouseover focus":function(){var c=a(this).attr("data-theme");a(this).removeClass("ui-btn-up-"+c).addClass("ui-btn-hover-"+c)},"mouseout blur":function(){var c=a(this).attr("data-theme");a(this).removeClass("ui-btn-hover-"+c).addClass("ui-btn-up-"+c)}});f=null}})(jQuery);
+(function(a){a.fn.customButton=function(){return a(this).each(function(){var f=a(this).addClass("ui-btn-hidden").attr("tabindex","-1");a('<a href="#" role="button">'+(f.text()||f.val())+"</a>").buttonMarkup({theme:f.data("theme"),icon:f.data("icon"),iconpos:f.data("iconpos"),inline:f.data("inline")}).click(function(){f.click();return false}).insertBefore(f)})}})(jQuery);
+(function(a){a.fn.slider=function(){return this.each(function(){function f(p,y){if(y)n=parseFloat(y)/(m-j)*100;else{var r=p.originalEvent.touches?p.originalEvent.touches[0]:p;if(!t||r.pageX<s.offset().left-4||r.pageX>s.offset().left+s.width()+4)return;n=Math.round((r.pageX-s.offset().left)/s.width()*100)}if(n<0)n=0;if(n>100)n=100;r=Math.round(n/100*m);if(r<j)r=j;if(r>m)r=m;w=Math.round(r/m*100);o.css("left",n+"%");o.attr({"aria-valuenow":h=="input"?r:b.find("option").eq(r).attr("value"),"aria-valuetext":h==
+"input"?r:b.find("option").eq(r).text(),title:r});c(r);r=r;if(h=="input")b.val(r);else b[0].selectedIndex=r;b.trigger("change")}function c(p){if(h!="input")p==0?s.addClass("ui-slider-switch-a").removeClass("ui-slider-switch-b"):s.addClass("ui-slider-switch-b").removeClass("ui-slider-switch-a")}function d(){h=="select"&&o.addClass("ui-slider-handle-snapping").css("left",w+"%").animationComplete(function(){o.removeClass("ui-slider-handle-snapping")})}var b=a(this),e=b.parents("[class*=ui-bar-],[class*=ui-body-]").eq(0),
+g=a.extend({trackTheme:e.length?e.attr("class").match(/ui-(bar|body)-([a-z])/)[2]:"c",theme:b.data("theme")||(e.length?e.attr("class").match(/ui-(bar|body)-([a-z])/)[2]:"c")},u),h=b[0].nodeName.toLowerCase();u=h=="select"?"ui-slider-switch":"";var l=b.attr("id");e=l+"-label";l=a("[for="+l+"]").attr("id",e);var i=h=="input"?b.val():b[0].selectedIndex,j=h=="input"?parseFloat(b.attr("min")):0,m=h=="input"?parseFloat(b.attr("max")):b.find("option").length-1,n=i/(m-j)*100,w=n,s=a('<div class="ui-slider '+
+u+" ui-btn-down-"+g.trackTheme+' ui-btn-corner-all" role="application"></div>'),o=a('<a href="#" class="ui-slider-handle"></a>').appendTo(s).buttonMarkup({corners:true,theme:g.theme,shadow:true}).attr({role:"slider","aria-valuemin":j,"aria-valuemax":m,"aria-valuenow":i,"aria-valuetext":i,title:i,"aria-labelledby":e}),t=false;if(h=="select"){s.wrapInner('<div class="ui-slider-inneroffset"></div>');var u=b.find("option");b.find("option").each(function(p){var y=p==0?"b":"a",r=p==0?"right":"left";p=p==
+0?" ui-btn-down-"+g.trackTheme:" ui-btn-active";a('<div class="ui-slider-labelbg ui-slider-labelbg-'+y+p+" ui-btn-corner-"+r+'"></div>').prependTo(s);a('<span class="ui-slider-label ui-slider-label-'+y+p+" ui-btn-corner-"+r+'" role="img">'+a(this).text()+"</span>").prependTo(o)})}c(i);l.addClass("ui-slider");b.addClass(h=="input"?"ui-slider-input":"ui-slider-switch").keyup(function(p){f(p,a(this).val())});s.bind(a.support.touch?"touchstart":"mousedown",function(p){t=true;if(h=="select")i=b[0].selectedIndex;
+f(p);return false}).bind(a.support.touch?"touchmove":"mousemove",function(p){f(p);return false}).bind(a.support.touch?"touchend":"mouseup",function(p){t=false;if(h=="select"){if(i==b[0].selectedIndex){i=i==0?1:0;f(p,i)}d()}return false}).insertAfter(b);o.css("left",n+"%").bind("click",function(){return false})})}})(jQuery);
+(function(a){a.fn.collapsible=function(f){return a(this).each(function(){var c=a.extend({expandCueText:" click to expand contents",collapseCueText:" click to collapse contents",collapsed:a(this).is('[data-state="collapsed"]'),heading:">h1,>h2,>h3,>h4,>h5,>h6,>legend",theme:a(this).data("theme"),iconTheme:a(this).data("icontheme")||"d"},f),d=a(this).addClass("ui-collapsible-contain"),b=a(this).find(c.heading).eq(0),e=d.wrapInner('<div class="ui-collapsible-content"></div>').find(".ui-collapsible-content"),
+g=a(this).closest("[data-role=collapsible-set]").addClass("ui-collapsible-set");if(b.is("legend")){b=a('<div role="heading">'+b.html()+"</div>").insertBefore(b);b.next().remove()}b.insertBefore(e);b.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:!!!g.length,corners:false,iconPos:"left",icon:"plus",theme:c.theme}).find(".ui-icon").removeAttr("class").buttonMarkup({shadow:true,
+corners:true,iconPos:"notext",icon:"plus",theme:c.iconTheme});if(g.length)d.data("collapsible-last")&&b.find("a:eq(0), .ui-btn-inner").addClass("ui-corner-bottom");else b.find("a:eq(0)").addClass("ui-corner-all").find(".ui-btn-inner").addClass("ui-corner-all");d.bind("collapse",function(h){if(!h.isDefaultPrevented()){h.preventDefault();b.addClass("ui-collapsible-heading-collapsed").find(".ui-collapsible-heading-status").text(c.expandCueText);b.find(".ui-icon").removeClass("ui-icon-minus").addClass("ui-icon-plus");
+e.addClass("ui-collapsible-content-collapsed").attr("aria-hidden",true);d.data("collapsible-last")&&b.find("a:eq(0), .ui-btn-inner").addClass("ui-corner-bottom")}}).bind("expand",function(h){if(!h.isDefaultPrevented()){h.preventDefault();b.removeClass("ui-collapsible-heading-collapsed").find(".ui-collapsible-heading-status").text(c.collapseCueText);b.find(".ui-icon").removeClass("ui-icon-plus").addClass("ui-icon-minus");e.removeClass("ui-collapsible-content-collapsed").attr("aria-hidden",false);d.data("collapsible-last")&&
+b.find("a:eq(0), .ui-btn-inner").removeClass("ui-corner-bottom")}}).trigger(c.collapsed?"collapse":"expand");if(g.length&&!g.data("collapsiblebound")){g.data("collapsiblebound",true).bind("expand",function(h){a(this).find(".ui-collapsible-contain").not(a(h.target).closest(".ui-collapsible-contain")).not("> .ui-collapsible-contain .ui-collapsible-contain").trigger("collapse")});g=g.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)}b.click(function(){b.is(".ui-collapsible-heading-collapsed")?d.trigger("expand"):d.trigger("collapse");return false})})}})(jQuery);
+(function(a){a.fn.controlgroup=function(f){return a(this).each(function(){function c(g){g.removeClass("ui-btn-corner-all ui-shadow").eq(0).addClass(e[0]).end().filter(":last").addClass(e[1]).addClass("ui-controlgroup-last")}var d=a.extend({direction:a(this).data("type")||"vertical",shadow:false},f),b=a(this).find(">legend"),e=d.direction=="horizontal"?["ui-corner-left","ui-corner-right"]:["ui-corner-top","ui-corner-bottom"];a(this).find("input:eq(0)").attr("type");if(b.length){a(this).wrapInner('<div class="ui-controlgroup-controls"></div>');
+a('<div role="heading" class="ui-controlgroup-label">'+b.html()+"</div>").insertBefore(a(this).children(0));b.remove()}a(this).addClass("ui-corner-all ui-controlgroup ui-controlgroup-"+d.direction);c(a(this).find(".ui-btn"));c(a(this).find(".ui-btn-inner"));d.shadow&&a(this).addClass("ui-shadow")})}})(jQuery);(function(a){a.fn.fieldcontain=function(f){a.extend({theme:"c"},f);return a(this).addClass("ui-field-contain ui-body ui-br")}})(jQuery);
+(function(a){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 f=this.element,c=this.options;f.addClass("ui-listview").attr("role","listbox");c.inset&&f.addClass("ui-listview-inset ui-corner-all ui-shadow");f.delegate(".ui-li","focusin",function(){a(this).attr("tabindex","0")});this._itemApply(f,f);this.refresh(true);f.keydown(function(d){var b=a(d.target),e=b.closest("li");
+switch(d.keyCode){case 38:d=e.prev();if(d.length){b.blur().attr("tabindex","-1");d.find("a").first().focus()}return false;case 40:d=e.next();if(d.length){b.blur().attr("tabindex","-1");d.find("a").first().focus()}return false;case 39:d=e.find("a.ui-li-link-alt");if(d.length){b.blur();d.first().focus()}return false;case 37:d=e.find("a.ui-link-inherit");if(d.length){b.blur();d.first().focus()}return false;case 13:case 32:b.trigger("click");return false}});f.delegate("li","click",function(d){if(!a(d.target).closest("a").length){a(this).find("a").first().trigger("click");
+return false}})},_itemApply:function(f,c){c.find(".ui-li-count").addClass("ui-btn-up-"+(f.data("counttheme")||this.options.countTheme)+" ui-btn-corner-all");c.find("h1, h2, h3, h4, h5, h6").addClass("ui-li-heading");c.find("p, ul, dl").addClass("ui-li-desc");c.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 d=c.find(".ui-li-aside");d.length&&d.prependTo(d.parent());a.support.cssPseudoElement||a.nodeName(c[0],
+"ol")},refresh:function(f){this._createSubPages();var c=this.options,d=this.element,b=d.data("dividertheme")||c.dividerTheme,e=d.children("li"),g=a.support.cssPseudoElement||!a.nodeName(d[0],"ol")?0:1;g&&d.find(".ui-li-dec").remove();e.attr({role:"option",tabindex:"-1"});e.first().attr("tabindex","0");that=this;e.each(function(h){var l=a(this),i="ui-li";if(!(!f&&l.hasClass("ui-li"))){var j=l.find("a");if(j.length){l.buttonMarkup({wrapperEls:"div",shadow:false,corners:false,iconpos:"right",icon:l.data("icon")||
+"arrow-r",theme:c.theme});j.first().addClass("ui-link-inherit");if(j.length>1){i+=" ui-li-has-alt";j=j.last();j.attr("title",j.text()).addClass("ui-li-link-alt").empty().buttonMarkup({shadow:false,corners:false,theme:c.theme,icon:false,iconpos:false}).find(".ui-btn-inner").append(a("<span>").buttonMarkup({shadow:true,corners:true,theme:d.data("splittheme")||j.data("theme")||c.splitTheme,iconpos:"notext",icon:d.data("spliticon")||j.data("icon")||c.splitIcon}))}}else if(l.data("role")==="list-divider"){i+=
+" ui-li-divider ui-btn ui-bar-"+b;l.attr("role","heading");if(g)g=1}else i+=" ui-li-static ui-btn-up-"+c.theme;if(h===0){l.find("img").addClass("ui-corner-tl");if(c.inset){i+=" ui-corner-top";l.add(l.find(".ui-btn-inner")).find(".ui-li-link-alt").addClass("ui-corner-tr").end().find(".ui-li-thumb").addClass("ui-corner-tl")}}else if(h===e.length-1){l.find("img").addClass("ui-corner-bl");if(c.inset){i+=" ui-corner-bottom";l.add(l.find(".ui-btn-inner")).find(".ui-li-link-alt").addClass("ui-corner-br").end().find(".ui-li-thumb").addClass("ui-corner-bl")}}g&&
+i.indexOf("ui-li-divider")<0&&l.find(".ui-link-inherit").first().addClass("ui-li-jsnumbering").prepend("<span class='ui-li-dec'>"+g++ +". </span>");l.addClass(i);f||that._itemApply(d,l)}})},_createSubPages:function(){var f=this.element,c=f.closest(".ui-page"),d=c.attr("id"),b=this.options,e=c.find("[data-role='footer']").data("id");a(f.find("ul, ol").toArray().reverse()).each(function(g){var h=a(this),l=h.parent(),i=l.contents()[0].nodeValue.split("\n")[0];g=d+"&"+$.mobile.subPageUrlKey+"="+$.mobile.idStringEscape(i+
+" "+g);var j=h.data("theme")||b.theme,m=h.data("counttheme")||f.data("counttheme")||b.countTheme;h.wrap("<div data-role='page'><div data-role='content'></div></div>").parent().before("<div data-role='header' data-theme='"+b.headerTheme+"'><div class='ui-title'>"+i+"</div></div>").after(e?$("<div>",{"data-role":"footer","data-id":e,"class":"ui-footer-duplicate"}):"").parent().attr({id:g,"data-theme":j,"data-count-theme":m}).appendTo(a.pageContainer).page();l.html("<a href='#"+g+"'>"+i+"</a>")}).listview()}})})(jQuery);
+(function(a){a.mobile.listview.prototype.options.filter=false;a("[data-role='listview']").live("listviewcreate",function(){var f=a(this),c=f.data("listview");if(c.options.filter){var d=a("<form>",{"class":"ui-listview-filter ui-bar-c",role:"search"});a("<input>",{placeholder:"Filter results...","data-type":"search"}).bind("keyup change",function(){var b=this.value.toLowerCase();f.children().show();b&&f.children().filter(function(){return a(this).text().toLowerCase().indexOf(b)===-1}).hide();c._numberItems()}).appendTo(d).customTextInput();
+d.insertBefore(f)}})})(jQuery);(function(a){a.widget("mobile.dialog",a.mobile.widget,{options:{},_create:function(){var f=this.element,c=a('<a href="#" data-icon="delete" data-iconpos="notext">Close</a>').click(function(){a.changePage([f,a.activePage],undefined,true);return false});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(c).end().find(".ui-content,[data-role=footer]").last().addClass("ui-corner-bottom ui-overlay-shadow")}})})(jQuery);
+(function(a){a.fn.navbar=function(f){return a(this).each(function(){var c=a.extend({iconpos:a(this).data("iconpos")||"top",transition:a(this).data("transition")||"slideup"},f),d=a(this).addClass("ui-navbar"),b=d.find("li").length;if((d.find("a[data-icon]").length?"arrow-r":null)==null){c.iconpos=null;d.add(d.children(0)).addClass("ui-navbar-noicons")}d.attr("role","navigation").find("ul").grid({grid:b>2?"b":"a"});d.find("ul a").buttonMarkup({corners:false,shadow:false,iconpos:c.iconpos}).bind("click",
+function(){d.find(".ui-btn-active").removeClass("ui-btn-active");a(this).addClass("ui-btn-active")})})}})(jQuery);(function(a){a.fn.grid=function(f){return a(this).each(function(){var c=a.extend({grid:"a"},f);a(this).addClass("ui-grid-"+c.grid);var d=a(this).children();iterator=c.grid=="a"?2:3;d.filter(":nth-child("+iterator+"n+1)").addClass("ui-block-a");d.filter(":nth-child("+iterator+"n+2)").addClass("ui-block-b");iterator==3&&d.filter(":nth-child(3n+3)").addClass("ui-block-c")})}})(jQuery);
+(function(a,f,c){function d(){a.event.special.scrollstart.enabled=false;setTimeout(function(){f.scrollTo(0,0)},0);setTimeout(function(){a.event.special.scrollstart.enabled=true},150)}function b(k){k=(k||location.hash).replace(/#/,"").split("/");k.length&&/[.|&]/.test(k[k.length-1])&&k.pop();k=k.join("/");if(k!==""&&k.charAt(k.length-1)!=="/")k+="/";return k}function e(k){if(k)n.removeClass("ui-loading");else{s.appendTo(t).css({top:$(f).scrollTop()+75});n.addClass("ui-loading")}}function g(k){var q=
+k.find(".ui-title:eq(0)");q.length?q.focus():k.find(D).eq(0).focus()}function h(k){if(B){k.attr("data-role",B);B=c}}function l(k){var q=["data-role","data-theme","data-fullscreen"],v=k.wrap("<div>").parent();$.each(q,function(x){if(k.attr(q[x])){v.attr(q[x],k.attr(q[x]));k.removeAttr(q[x])}});return v}function i(k,q,v,x){function G(){function z(){e(true);if(A.data("page")._trigger("hide",null,{nextPage:k})!==false&&k.data("page")._trigger("show",null,{prevPage:A})!==false)$.activePage=k;g(k);if(x&&
+C){I=false;location.hash=C;setTimeout(function(){I=true},500)}}a(document.activeElement).blur();A.data("page")._trigger("beforehide",{nextPage:k});k.data("page")._trigger("beforeshow",{prevPage:A});if(q){A.addClass(q+" out "+(v?"reverse":""));k.addClass(u+" "+q+" in "+(v?"reverse":""));k.animationComplete(function(){A.add(k).removeClass(" out in reverse "+y);A.removeClass(u);z()})}else{A.removeClass(u);k.addClass(u);z()}}function H(z){return z.match("&"+a.mobile.subPageUrlKey)?z.split("&"+a.mobile.subPageUrlKey)[0]:
+z}var F=$.type(k)==="array",A=F?k[0]:$.activePage;k=F?k[1]:k;var C=fileUrl=$.type(k)==="string"?k.replace(/^#/,""):null;v=v!==c?v:r.length>1&&r[r.length-2].url===C;q=q!==c?q:p||"slide";p=c;J();if(v)q=r.pop().transition;else r.push({url:C,transition:q});if(C){k=a("[id='"+C+"']");fileUrl=H(C)}else{F=k.attr("id");var K=H(F);if(F!=K)fileUrl=K}if(k.length){fileUrl&&L(fileUrl);h(k);k.page();G()}else{e();$.ajax({url:fileUrl,success:function(z){L(fileUrl);var M=a("<div></div>");M.get(0).innerHTML=z;k=M.find('[data-role="page"]');
+if(!$.support.dynamicBaseTag){var O=b(fileUrl);k.find("[src],[href]").each(function(){var E=$(this).attr("href"),P=$(this).attr("src"),Q=E?"href":"src";E=E||P;E.replace(location.protocol+"//"+location.host+location.pathname,"");/^(\w+:|#|\/)/.test(E)||$(this).attr(Q,O+E)})}if(k.attr("id"))k=l(k);k.attr("id",fileUrl).appendTo(t);h(k);k.page();G()},error:function(){e(true);a("<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:$(f).scrollTop()+100}).appendTo(t).delay(800).fadeOut(400,function(){$(this).remove()})}})}}function j(){var k=m.width(),q=[],v=[];n.removeClass("min-width-"+$.mobile.resolutionBreakpoints.join(" min-width-")+"max-width- "+$.mobile.resolutionBreakpoints.join(" max-width-"));$.each($.mobile.resolutionBreakpoints,function(x){k>=$.mobile.resolutionBreakpoints[x]&&q.push($.mobile.resolutionBreakpoints[x]);k<=$.mobile.resolutionBreakpoints[x]&&v.push($.mobile.resolutionBreakpoints[x])});n.addClass("min-width-"+
+q.join(" min-width-")+" max-width-"+v.join(" max-width-"))}if(a.support.mediaquery){a.mobile={};a.extend(a.mobile,{subPageUrlKey:"ui-page",degradeInputs:{color:true,date:true,datetime:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,time:true,url:true,week:true},addBackBtn:true});var m=a(f),n=a("html"),w=a("head"),s=a('<div class="ui-loader ui-body-a ui-corner-all"><span class="ui-icon ui-icon-loading spin"></span><h1>loading</h1></div>'),o,t,u="ui-page-active",
+p,y="slide slideup slidedown pop flip fade",r=[{url:location.hash.replace(/^#/,""),transition:"slide"}],D="[tabindex],a,button:visible,select:visible,input",B=null,I=true,N=location.protocol+"//"+location.host+location.pathname;$.mobile.urlStack=r;$.mobile.idStringEscape=function(k){return k.replace(/[^a-zA-Z0-9]/g,"-")};var L=!$.support.dynamicBaseTag?$.noop:function(k){$("#ui-base").attr("href",N+b(k))},J=!$.support.dynamicBaseTag?$.noop:function(){$("#ui-base").attr("href",N)};a("a").live("click",
+function(k){var q=$(this),v=q.attr("href").replace(location.protocol+"//"+location.host,""),x=/^\w+:|#/.test(v)||q.is("[target],[rel=external]");if(v=="#")return false;else if(x)location.href=v;else{x=q.data("transition")||"slide";var G=q.data("back")||c,H=!$(this).is("[data-rel=dialog]");B=q.attr("data-rel");if(v.indexOf("/")!==0&&v.indexOf("#")!==0)v=b()+v;i(v,x,G,H)}k.preventDefault()});a(function(){a("body");e();m.bind("hashchange",function(k,q){if(I){var v=location.hash,x=q&&q.manuallyTriggered?
+false:c;if(v)i(v,x);else if($.activePage.length&&!o.is($.activePage)&&!(q&&q.manuallyTriggered))i(o,x,true);else{o.trigger("pagebeforeshow",{prevPage:$("")});o.addClass(u);e(true);o.trigger("pageshow",{prevPage:$("")})!==false&&g(o)}}})});n.addClass("ui-mobile");m.bind("orientationchange",function(k,q){n.removeClass("portrait landscape").addClass(q.orientation)});$.mobile.resolutionBreakpoints=[320,480,768,1024];m.bind("orientationchange resize",j);j();w.prepend('<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1" />'+
+($.support.dynamicBaseTag?'<base href="" id="ui-base" />':""));J();a.fn.animationComplete=function(k){if(a.support.WebKitAnimationEvent)return a(this).one("webkitAnimationEnd",k);else setTimeout(k,350)};a.extend({pageLoading:e,changePage:i,hideBrowserChrome:d});a(function(){o=$.activePage=a("[data-role='page']").first();t=o.parent();a.extend({pageContainer:t});o.attr("id")||o.attr("id","ui-page-start");a("[data-role='page']").page();m.trigger("hashchange",{manuallyTriggered:true});n.addClass(a.event.special.orientationchange.orientation(m))});
+m.load(d)}})(jQuery,this);
diff --git a/urls.py b/urls.py
index ff767a8..923cfb7 100644
--- a/urls.py
+++ b/urls.py
@@ -33,6 +33,8 @@ urlpatterns = patterns('',
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^admin/', include(admin.site.urls)),
+ (r'^mobile/', include('snowy.mobile_notes.urls')),
+
url(r'^(?P<username>\w+)/$', 'snowy.views.user_index', name="user_index"),
(r'^(?P<username>\w+)/notes/', include('snowy.notes.urls')),
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]