38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/map-full.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
17 |
18 |
21 |
22 |
23 |
24 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/directions.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 | '
10 |
11 |
12 |
13 |
14 |
15 |
18 |
19 |
22 |
23 |
24 |
25 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/parkit.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/scripts/positions.js:
--------------------------------------------------------------------------------
1 | $(window).load(function() {
2 | var state = document.readyState;
3 |
4 | if (typeof(localStorage) == 'undefined' ) {
5 | console.log("upgrade your browser");
6 | alert('Upgrade your browser as it does not support HTML5 localStorage.');
7 | }
8 |
9 | if (state == 'loaded' || state == 'complete') {
10 | //console.log("load completed, calling geoLocation");
11 | getPositions();
12 | } else {
13 | if (navigator.userAgent.indexOf('Browzr') > -1) {
14 | //console.log("setting timeout for getPositions");
15 | setTimeout(getPositions, 250);
16 | } else {
17 | document.addEventListener('deviceready',getPositions,false);
18 | }
19 | }
20 |
21 | });
22 |
23 | var getPositions = function() {
24 | var store = new Lawnchair({table: 'mygps', adaptor: 'dom'});
25 | var newText;
26 | var results = 0;
27 |
28 | $(".result").hide();
29 |
30 | //newText = "
"
31 | newText = "";
32 |
33 | store.each(function(r){
34 | results = 1;
35 | el = r.value;
36 | if(el.name !== undefined) {
37 | newText += "
";
42 | newText += "";
43 | $('.ui-listview').html(newText).listview("refresh");
44 |
45 | // lis = $("li").get();
46 | // for (var i = 0; i < lis.length; i++) {
47 | if(results) {
48 | $("li").click(function() {
49 | attr_value = $(this).attr("id");
50 | window.location.pathname = "/whereis.html?id="+attr_value;
51 | });
52 | // }
53 | }
54 | }
--------------------------------------------------------------------------------
/scripts/LawnchairAdaptorHelpers.js:
--------------------------------------------------------------------------------
1 | /**
2 | * LawnchairAdaptorHelpers
3 | * =======================
4 | * Useful helpers for creating Lawnchair stores. Used as a mixin.
5 | *
6 | */
7 | var LawnchairAdaptorHelpers = {
8 | // merging default properties with user defined args
9 | merge: function(defaultOption, userOption) {
10 | return (userOption == undefined || userOption == null) ? defaultOption: userOption;
11 | },
12 |
13 | // awesome shorthand callbacks as strings. this is shameless theft from dojo.
14 | terseToVerboseCallback: function(callback) {
15 | return (typeof arguments[0] == 'string') ?
16 | function(r, i) {
17 | eval(callback);
18 | }: callback;
19 | },
20 |
21 | // Returns current datetime for timestamps.
22 | now: function() {
23 | return new Date().getTime();
24 | },
25 |
26 | // Returns a unique identifier
27 | uuid: function(len, radix) {
28 | // based on Robert Kieffer's randomUUID.js at http://www.broofa.com
29 | var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
30 | var uuid = [];
31 | radix = radix || chars.length;
32 |
33 | if (len) {
34 | for (var i = 0; i < len; i++) uuid[i] = chars[0 | Math.random() * radix];
35 | } else {
36 | // rfc4122, version 4 form
37 | var r;
38 |
39 | // rfc4122 requires these characters
40 | uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
41 | uuid[14] = '4';
42 |
43 | // Fill in random data. At i==19 set the high bits of clock sequence as
44 | // per rfc4122, sec. 4.1.5
45 | for (var i = 0; i < 36; i++) {
46 | if (!uuid[i]) {
47 | r = 0 | Math.random() * 16;
48 | uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8: r];
49 | }
50 | }
51 | }
52 | return uuid.join('');
53 | },
54 |
55 | // Serialize a JSON object as a string.
56 | serialize: function(obj) {
57 | var r = '';
58 | r = JSON.stringify(obj);
59 | return r;
60 | },
61 |
62 | // Deserialize JSON.
63 | deserialize: function(json) {
64 | return eval('(' + json + ')');
65 | }
66 | };
67 |
--------------------------------------------------------------------------------
/whereis.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
Back
22 |
Give my car
23 |
24 |
25 |
26 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
43 |
44 |
45 |
46 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/scripts/delete.js:
--------------------------------------------------------------------------------
1 | $(window).load(function() {
2 | var state = document.readyState;
3 |
4 | if (typeof(localStorage) == 'undefined' ) {
5 | console.log("upgrade your browser");
6 | alert('Upgrade your browser as it does not support HTML5 localStorage.');
7 | }
8 |
9 | if (state == 'loaded' || state == 'complete') {
10 | console.log("load completed, calling deleteLocation");
11 | deleteLocation();
12 | } else {
13 | if (navigator.userAgent.indexOf('Browzr') > -1) {
14 | setTimeout(deleteLocation, 250);
15 | } else {
16 | document.addEventListener('deviceready',deletetLocation,false);
17 | }
18 | }
19 |
20 | });
21 |
22 | $.extend({
23 | getUrlVars: function(){
24 | var vars = [], hash;
25 | var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
26 | for(var i = 0; i < hashes.length; i++)
27 | {
28 | hash = hashes[i].split('=');
29 | vars.push(hash[0]);
30 | vars[hash[0]] = hash[1];
31 | }
32 | return vars;
33 | },
34 | getUrlVar: function(name){
35 | return $.getUrlVars()[name];
36 | },
37 | getParentUrlVars: function(){
38 | var vars = [], hash;
39 | var hashes = parent.window.location.href.slice(parent.window.location.href.indexOf('?') + 1).split('&');
40 | for(var i = 0; i < hashes.length; i++)
41 | {
42 | hash = hashes[i].split('=');
43 | vars.push(hash[0]);
44 | vars[hash[0]] = hash[1];
45 | }
46 | return vars;
47 | },
48 | getParentUrlVar: function(name){
49 | return $.getParentUrlVars()[name];
50 | }
51 | });
52 |
53 | var getStoreIndex = function(store) {
54 | // var gpsstore = new Lawnchair({table: 'mygps', adaptor: 'dom'});
55 | var result;
56 | store.get('index', function(r) {
57 | if(r === null) {
58 | console.log("index undefined, initializing...");
59 | result = 0;
60 | console.log(result);
61 | store.save({key:'index', value:result});
62 | return result;
63 | } else {
64 | console.log(r);
65 | result = r.value;
66 | console.log("result value = " + result);
67 | return result;
68 | }
69 | return result;
70 | });
71 | }
72 |
73 | function deleteLocation() {
74 | try {
75 | // create my Lawnchair stores
76 | var store = new Lawnchair({table: 'mygps', adaptor: 'dom'});
77 | var index;
78 | var position = {};
79 | var currentId = $.getUrlVar('id');
80 |
81 | if(currentId === undefined) {
82 | console.log("id is undefined");
83 | } else {
84 | if(currentId == 0) currentId = "default";
85 | }
86 |
87 | $('#delete').click(function() {
88 | //console.log("DELETE button clicked");
89 | store.remove(currentId);
90 | //console.log("maybe REMOVED" + currentId);
91 | $('ui-dialog').dialog('close');
92 | window.location.pathname = 'index.html';
93 | });
94 |
95 | } catch (e) {
96 | console.log("something wrong happened");
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/scripts/Lawnchair.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Lawnchair
3 | * =========
4 | * A lightweight JSON document store.
5 | *
6 | */
7 | var Lawnchair = function(opts) {
8 | this.init(opts);
9 | }
10 |
11 | Lawnchair.prototype = {
12 |
13 | init:function(opts) {
14 | var adaptors = {
15 | 'webkit':window.WebkitSQLiteAdaptor,
16 | 'gears':window.GearsSQLiteAdaptor,
17 | 'dom':window.DOMStorageAdaptor,
18 | 'cookie':window.CookieAdaptor,
19 | 'air':window.AIRSQLiteAdaptor,
20 | 'userdata':window.UserDataAdaptor,
21 | 'air-async':window.AIRSQLiteAsyncAdaptor,
22 | 'blackberry':window.BlackBerryPersistentStorageAdaptor,
23 | 'couch':window.CouchAdaptor
24 | };
25 | this.adaptor = opts.adaptor ? new adaptors[opts.adaptor](opts) : new DOMStorageAdaptor(opts);
26 |
27 | // Check for native JSON functions.
28 | if (!JSON || !JSON.stringify) throw "Native JSON functions unavailable - please include http://www.json.org/json2.js or run on a decent browser :P";
29 | },
30 |
31 | // Save an object to the store. If a key is present then update. Otherwise create a new record.
32 | save:function(obj, callback) {this.adaptor.save(obj, callback)},
33 |
34 | // Invokes a callback on an object with the matching key.
35 | get:function(key, callback) {this.adaptor.get(key, callback)},
36 |
37 | // Returns whether a key exists to a callback.
38 | exists:function(callback) {this.adaptor.exists(callback)},
39 |
40 | // Returns all rows to a callback.
41 | all:function(callback) {this.adaptor.all(callback)},
42 |
43 | // Removes a json object from the store.
44 | remove:function(keyOrObj, callback) {this.adaptor.remove(keyOrObj, callback)},
45 |
46 | // Removes all documents from a store and returns self.
47 | nuke:function(callback) {this.adaptor.nuke(callback);return this},
48 |
49 | // Returns a page of results based on offset provided by user and perPage option
50 | paged:function(page, callback) {this.adaptor.paged(page, callback)},
51 |
52 | /**
53 | * Iterator that accepts two paramters (methods or eval strings):
54 | *
55 | * - conditional test for a record
56 | * - callback to invoke on matches
57 | *
58 | */
59 | find:function(condition, callback) {
60 | var is = (typeof condition == 'string') ? function(r){return eval(condition)} : condition
61 | , cb = this.adaptor.terseToVerboseCallback(callback);
62 |
63 | this.each(function(record, index) {
64 | if (is(record)) cb(record, index); // thats hot
65 | });
66 | },
67 |
68 |
69 | /**
70 | * Classic iterator.
71 | * - Passes the record and the index as the second parameter to the callback.
72 | * - Accepts a string for eval or a method to be invoked for each document in the collection.
73 | */
74 | each:function(callback) {
75 | var cb = this.adaptor.terseToVerboseCallback(callback);
76 | this.all(function(results) {
77 | var l = results.length;
78 | for (var i = 0; i < l; i++) {
79 | cb(results[i], i);
80 | }
81 | });
82 | }
83 | // --
84 | };
85 |
--------------------------------------------------------------------------------
/scripts/DOMStorageAdaptor.js:
--------------------------------------------------------------------------------
1 | /**
2 | * DOMStorageAdaptor
3 | * ===================
4 | * DOM Storage implementation for Lawnchair.
5 | *
6 | * - originally authored by Joseph Pecoraro
7 | * - window.name code courtesy Remy Sharp: http://24ways.org/2009/breaking-out-the-edges-of-the-browser
8 | *
9 | */
10 | var DOMStorageAdaptor = function(options) {
11 | for (var i in LawnchairAdaptorHelpers) {
12 | this[i] = LawnchairAdaptorHelpers[i];
13 | }
14 | this.init(options);
15 | };
16 |
17 |
18 | DOMStorageAdaptor.prototype = {
19 | init:function(options) {
20 | var self = this;
21 | this.storage = this.merge(window.localStorage, options.storage);
22 | this.table = this.merge('field', options.table);
23 |
24 | if (!window.Storage) {
25 | this.storage = (function () {
26 | // window.top.name ensures top level, and supports around 2Mb
27 | var data = window.top.name ? self.deserialize(window.top.name) : {};
28 | return {
29 | setItem: function (key, value) {
30 | data[key] = value+""; // force to string
31 | window.top.name = self.serialize(data);
32 | },
33 | removeItem: function (key) {
34 | delete data[key];
35 | window.top.name = self.serialize(data);
36 | },
37 | getItem: function (key) {
38 | return data[key] || null;
39 | },
40 | clear: function () {
41 | data = {};
42 | window.top.name = '';
43 | }
44 | };
45 | })();
46 | };
47 | },
48 |
49 | save:function(obj, callback) {
50 | var id = this.table + '::' + (obj.key || this.uuid());
51 | delete obj.key;
52 | this.storage.setItem(id, this.serialize(obj));
53 | if (callback) {
54 | obj.key = id.split('::')[1];
55 | callback(obj);
56 | }
57 | },
58 |
59 | get:function(key, callback) {
60 | var obj = this.deserialize(this.storage.getItem(this.table + '::' + key))
61 | , cb = this.terseToVerboseCallback(callback);
62 |
63 | if (obj) {
64 | obj.key = key;
65 | if (callback) cb(obj);
66 | } else {
67 | if (callback) cb(null);
68 | }
69 | },
70 |
71 | all:function(callback) {
72 | var cb = this.terseToVerboseCallback(callback);
73 | var results = [];
74 | for (var i = 0, l = this.storage.length; i < l; ++i) {
75 | var id = this.storage.key(i);
76 | var tbl = id.split('::')[0]
77 | var key = id.split('::').slice(1).join("::");
78 | if (tbl == this.table) {
79 | var obj = this.deserialize(this.storage.getItem(id));
80 | obj.key = key;
81 | results.push(obj);
82 | }
83 | }
84 | if (cb)
85 | cb(results);
86 | },
87 |
88 | remove:function(keyOrObj, callback) {
89 | var key = this.table + '::' + (typeof keyOrObj === 'string' ? keyOrObj : keyOrObj.key);
90 | this.storage.removeItem(key);
91 | if(callback)
92 | callback();
93 | },
94 |
95 | nuke:function(callback) {
96 | var self = this;
97 | this.all(function(r) {
98 | for (var i = 0, l = r.length; i < l; i++) {
99 | self.remove(r[i]);
100 | }
101 | if(callback)
102 | callback();
103 | });
104 | }
105 | };
106 |
--------------------------------------------------------------------------------
/scripts/parkit.js:
--------------------------------------------------------------------------------
1 | $(window).load(function() {
2 | var state = document.readyState;
3 |
4 | if (typeof(localStorage) == 'undefined' ) {
5 | console.log("upgrade your browser");
6 | alert('Upgrade your browser as it does not support HTML5 localStorage.');
7 | }
8 |
9 | if (state == 'loaded' || state == 'complete') {
10 | console.log("load completed, calling geoLocation");
11 | getLocation();
12 | } else {
13 | if (navigator.userAgent.indexOf('Browzr') > -1) {
14 | setTimeout(getLocation, 250);
15 | } else {
16 | document.addEventListener('deviceready',getLocation,false);
17 | }
18 | }
19 |
20 | });
21 |
22 |
23 | var getLocation = function() {
24 | var suc = function(p) {
25 | parkIt(p);
26 | };
27 | var fail = function() {
28 | console.log("not able to get the current position");
29 | alert("NOT ABLE TO GET THE CURRENT POSITION");
30 | };
31 | navigator.geolocation.getCurrentPosition(suc,fail);
32 | }
33 |
34 | var getStoreIndex = function(store) {
35 | // var gpsstore = new Lawnchair({table: 'mygps', adaptor: 'dom'});
36 | var result;
37 | store.get('index', function(r) {
38 | if(r === null) {
39 | console.log("index undefined, initializing...");
40 | result = 0;
41 | console.log(result);
42 | store.save({key:'index', value:result});
43 | return result;
44 | } else {
45 | console.log(r);
46 | result = r.value;
47 | console.log("result value = " + result);
48 | return result;
49 | }
50 | return result;
51 | });
52 | }
53 |
54 | function parkIt(p) {
55 | try {
56 | var gpsstore = new Lawnchair({table: 'mygps', adaptor: 'dom'});
57 | var index;
58 | var position = {};
59 |
60 | gpsstore.get('index', function(r) {
61 | if(r === null) {
62 | console.log("index undefined, initializing...");
63 | index = 0;
64 | gpsstore.save({key:'index', value:index});
65 | } else {
66 | console.log(r);
67 | index = r.value;
68 | }
69 | });
70 |
71 | position.index = index;
72 | position.name = 'Last Saved';
73 | position.latitude = p.coords.latitude;
74 | position.longitude = p.coords.longitude;
75 | gpsstore.save({key:'default', value:position});
76 |
77 | index = parseInt(index) + 1;
78 | gpsstore.save({key:'index', value:index});
79 |
80 | // $('#result').text(newtext);
81 | $('#result').hide();
82 | $('#success').show();
83 | $('#latitude').html("Latitude: " + p.coords.latitude);
84 | $('#longitude').html("Longitude: " + p.coords.latitude);
85 | $('#save').show();
86 |
87 | $('#save').click(function() {
88 | $('#save').hide();
89 | $('.saving').show("slow");
90 | $("a").button();
91 | });
92 |
93 | $(".savingButton" ).click(function() {
94 | position = $("input").val();
95 | position_with_name = {};
96 | position_with_name.index = index;
97 | position_with_name.name = position;
98 | position_with_name.latitude = p.coords.latitude;
99 | position_with_name.longitude = p.coords.longitude;
100 | gpsstore.save({key:index, value:position_with_name});
101 |
102 | // gpsstore.save({key:'destination', value:position});
103 | $('.saving').hide("slow");
104 | $('#success').append("
This GPS position has been saved as " + position);
105 | });
106 | } catch (e) {
107 | if (e == QUOTA_EXCEEDED_ERR) {
108 | alert('Quota exceeded!');
109 | }
110 | }
111 |
112 | }
113 |
--------------------------------------------------------------------------------
/scripts/whereis.js:
--------------------------------------------------------------------------------
1 | // steps = 0 => coming from map-full.html i.e. not show steps
2 | // steps = 1 => coming from directions.html i.e. show steps
3 | function loader(method, steps) {
4 | var state = document.readyState;
5 |
6 | if (typeof(localStorage) == 'undefined' ) {
7 | alert('Upgrade your browser as it does not support HTML5 localStorage.');
8 | }
9 |
10 | if (state == 'loaded' || state == 'complete') {
11 | method(steps);
12 | } else {
13 | if (navigator.userAgent.indexOf('Browzr') > -1) {
14 | setTimeout(method(steps), 250);
15 | } else {
16 | document.addEventListener('deviceready',method(steps),false);
17 | }
18 | }
19 | }
20 |
21 | $.extend({
22 | getUrlVars: function(){
23 | var vars = [], hash;
24 | var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
25 | for(var i = 0; i < hashes.length; i++)
26 | {
27 | hash = hashes[i].split('=');
28 | vars.push(hash[0]);
29 | vars[hash[0]] = hash[1];
30 | }
31 | return vars;
32 | },
33 | getUrlVar: function(name){
34 | return $.getUrlVars()[name];
35 | },
36 | getParentUrlVars: function(){
37 | var vars = [], hash;
38 | var hashes = parent.window.location.href.slice(parent.window.location.href.indexOf('?') + 1).split('&');
39 | for(var i = 0; i < hashes.length; i++)
40 | {
41 | hash = hashes[i].split('=');
42 | vars.push(hash[0]);
43 | vars[hash[0]] = hash[1];
44 | }
45 | return vars;
46 | },
47 | getParentUrlVar: function(name){
48 | return $.getParentUrlVars()[name];
49 | }
50 | });
51 |
52 | function getLocationFromStore() {
53 | var gpsstore = new Lawnchair({table: 'mygps', adaptor: 'dom'});
54 | var destination;
55 | var to_lat;
56 | var to_long;
57 | var result = 0;
58 |
59 | // Getting URL var by its name
60 | var currentId = $.getUrlVar('id');
61 |
62 | if(currentId === undefined) {
63 | console.log("id is undefined, getting default store");
64 | // retrieve my data from my stores
65 | gpsstore.get('default', function(r) {
66 | if(r !== null) {
67 | result = 1;
68 | console.log(r);
69 | destination = r.value.name;
70 | to_lat = r.value.latitude;
71 | to_long = r.value.longitude;
72 | }
73 | });
74 | } else {
75 | if(currentId == 0) currentId = "default";
76 | console.log("have an id value, GETTING store " + currentId);
77 | // retrieve my data from my stores
78 | gpsstore.get(currentId, function(r) {
79 | if(r !== null) {
80 | result = 1;
81 | console.log(r);
82 | destination = r.value.name;
83 | to_lat = r.value.latitude;
84 | to_long = r.value.longitude;
85 | }
86 | });
87 | }
88 |
89 | if(result) {
90 | $('#main').show();
91 | $('#posname').html("" + destination);
92 | $('#latitude').html("Latitude: " + to_lat);
93 | $('#longitude').html("Longitude: " + to_long);
94 | $('#sidebar').show();
95 | if(currentId === undefined) {
96 | $('#directions').attr('href', 'directions.html');
97 | $('#full-screen').attr('href', 'map-full.html');
98 | $('#delete').attr('href', 'delete.html');
99 | } else {
100 | if(currentId == "default") currentId = 0;
101 | $('#directions').attr('href', 'directions.html?id='+currentId);
102 | $('#full-screen').attr('href', 'map-full.html?id='+currentId);
103 | $('#delete').attr('href', 'delete.html?id='+currentId);
104 | }
105 | } else {
106 | $('.content').append("No saved positions, park your car first!");
107 | }
108 |
109 | }
110 |
111 | var getLocation = function(steps, id) {
112 | console.log("getLocation()");
113 | var suc = function(p) {
114 | initializeMap(p, steps);
115 | };
116 | var fail = function() {
117 | alert("NOT ABLE TO GET THE CURRENT POSITION");
118 | };
119 | navigator.geolocation.getCurrentPosition(suc,fail);
120 | }
121 |
122 | function initializeMap(p, steps) {
123 | console.log("initializeMap");
124 |
125 | var gpsstore = new Lawnchair({table: 'mygps', adaptor: 'dom'});
126 | var destination;
127 | var to_lat;
128 | var to_long;
129 | var fromLatLng;
130 | var toLatLng;
131 | var directionsDisplay = new google.maps.DirectionsRenderer();
132 | var directionsService = new google.maps.DirectionsService();
133 | var map;
134 | var result = 0;
135 |
136 | console.log("actual latitude " + p.coords.latitude);
137 | console.log("actual longitude " + p.coords.longitude);
138 |
139 | // Get object of URL parameters
140 | // var allVars = $.getUrlVars();
141 | // console.log("allVars");
142 | // console.log(allVars);
143 |
144 | // Getting URL var by its name
145 | var currentId = $.getParentUrlVar('id');
146 |
147 | if(currentId === undefined) {
148 | console.log("id is undefined, getting default store");
149 | // retrieve my data from my stores
150 | gpsstore.get('default', function(r) {
151 | if(r !== null) {
152 | result = 1;
153 | console.log(r);
154 | destination = r.value.name;
155 | to_lat = r.value.latitude;
156 | to_long = r.value.longitude;
157 | }
158 | });
159 | } else {
160 | if(currentId == 0) currentId = "default";
161 | console.log("have an id value, getting store " + currentId);
162 | // retrieve my data from my stores
163 | gpsstore.get(currentId, function(r) {
164 | if(r !== null) {
165 | result = 1;
166 | console.log(r);
167 | destination = r.value.name;
168 | to_lat = r.value.latitude;
169 | to_long = r.value.longitude;
170 | }
171 | });
172 | }
173 |
174 | if(!result) {
175 | console.log("no positions saved, exit...");
176 | $('.content').append("
No saved positions, park your car first!
");
177 | return;
178 | }
179 |
180 | // gpsstore.get('destination', function(r) {
181 | // destination = r.value;
182 | // console.log("destination " + destination);
183 | // });
184 |
185 | //ATTENTION!! fake pos!!
186 | //toLatLng = new google.maps.LatLng(to_lat, to_long);
187 | toLatLng = new google.maps.LatLng(to_lat+1, to_long-2);
188 |
189 | fromLatLng = new google.maps.LatLng(p.coords.latitude, p.coords.longitude);
190 | // fromLatLng = new google.maps.LatLng(p.latitude, p.longitude);
191 |
192 | var request = {
193 | origin:fromLatLng,
194 | destination:toLatLng,
195 | travelMode: google.maps.DirectionsTravelMode.DRIVING
196 | // WALKING, BICYCLING
197 | };
198 |
199 | directionsService.route(request, function(result, status) {
200 | console.log("waiting for google service");
201 | console.log("status " + status);
202 | if (status == google.maps.DirectionsStatus.OK) {
203 | console.log("google returned OK");
204 | directionsDisplay.setDirections(result);
205 | if(steps) {
206 | showSteps(result);
207 | return;
208 | }
209 | }
210 | });
211 |
212 | var myOptions = {
213 | zoom:7,
214 | mapTypeId: google.maps.MapTypeId.ROADMAP,
215 | }
216 |
217 | map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
218 | directionsDisplay.setMap(map);
219 | }
220 |
221 | function showSteps(directionResult) {
222 | console.log("showSteps");
223 | var myRoute = directionResult.routes[0].legs[0];
224 | var newText;
225 | $('.result').hide();
226 | newText = "
Total time";
227 | newText += "
" + myRoute.duration.text + "";
228 | newText += "
FROM"
229 | newText += "
" + myRoute.start_address + "";
230 |
231 | newText += "
Directions"
232 | //TODO: paginate
233 | for (var i = 0; i < myRoute.steps.length; i++) {
234 | newText += "
" + i + " " + myRoute.steps[i].instructions;
235 | newText += " " + myRoute.steps[i].distance.text + "" ;
236 | }
237 |
238 | newText += "
DESTINATION"
239 | newText += "
" + myRoute.end_address + "";
240 | $('.ui-listview').html(newText).listview("refresh");
241 | }
242 |
243 |
--------------------------------------------------------------------------------
/scripts/phonegap.js:
--------------------------------------------------------------------------------
1 | if (typeof(DeviceInfo) != 'object')
2 | DeviceInfo = {};
3 |
4 | /**
5 | * This represents the PhoneGap API itself, and provides a global namespace for accessing
6 | * information about the state of PhoneGap.
7 | * @class
8 | */
9 | PhoneGap = {
10 | queue: {
11 | ready: true,
12 | commands: [],
13 | timer: null
14 | },
15 | _constructors: []
16 | };
17 |
18 | /**
19 | * Boolean flag indicating if the PhoneGap API is available and initialized.
20 | */ // TODO: Remove this, it is unused here ... -jm
21 | PhoneGap.available = DeviceInfo.uuid != undefined;
22 |
23 | /**
24 | * Add an initialization function to a queue that ensures it will run and initialize
25 | * application constructors only once PhoneGap has been initialized.
26 | * @param {Function} func The function callback you want run once PhoneGap is initialized
27 | */
28 | PhoneGap.addConstructor = function(func) {
29 | var state = document.readyState;
30 | if ( state == 'loaded' || state == 'complete' )
31 | {
32 | func();
33 | }
34 | else
35 | {
36 | PhoneGap._constructors.push(func);
37 | }
38 | };
39 |
40 | (function()
41 | {
42 | var timer = setInterval(function()
43 | {
44 |
45 | var state = document.readyState;
46 |
47 | if ( state == 'loaded' || state == 'complete' )
48 | {
49 | clearInterval(timer); // stop looking
50 | // run our constructors list
51 | while (PhoneGap._constructors.length > 0)
52 | {
53 | var constructor = PhoneGap._constructors.shift();
54 | try
55 | {
56 | constructor();
57 | }
58 | catch(e)
59 | {
60 | if (typeof(debug['log']) == 'function')
61 | {
62 | debug.log("Failed to run constructor: " + debug.processMessage(e));
63 | }
64 | else
65 | {
66 | alert("Failed to run constructor: " + e.message);
67 | }
68 | }
69 | }
70 | // all constructors run, now fire the deviceready event
71 | var e = document.createEvent('Events');
72 | e.initEvent('deviceready');
73 | document.dispatchEvent(e);
74 | }
75 | }, 5);
76 | })();
77 |
78 |
79 | /**
80 | * Execute a PhoneGap command in a queued fashion, to ensure commands do not
81 | * execute with any race conditions, and only run when PhoneGap is ready to
82 | * recieve them.
83 | * @param {String} command Command to be run in PhoneGap, e.g. "ClassName.method"
84 | * @param {String[]} [args] Zero or more arguments to pass to the method
85 | */
86 | PhoneGap.exec = function() {
87 | PhoneGap.queue.commands.push(arguments);
88 | if (PhoneGap.queue.timer == null)
89 | PhoneGap.queue.timer = setInterval(PhoneGap.run_command, 10);
90 | };
91 |
92 | /**
93 | * Internal function used to dispatch the request to PhoneGap. It processes the
94 | * command queue and executes the next command on the list. If one of the
95 | * arguments is a JavaScript object, it will be passed on the QueryString of the
96 | * url, which will be turned into a dictionary on the other end.
97 | * @private
98 | */
99 | PhoneGap.run_command = function() {
100 | if (!PhoneGap.available || !PhoneGap.queue.ready)
101 | return;
102 |
103 | PhoneGap.queue.ready = false;
104 |
105 | var args = PhoneGap.queue.commands.shift();
106 | if (PhoneGap.queue.commands.length == 0) {
107 | clearInterval(PhoneGap.queue.timer);
108 | PhoneGap.queue.timer = null;
109 | }
110 |
111 | var uri = [];
112 | var dict = null;
113 | for (var i = 1; i < args.length; i++) {
114 | var arg = args[i];
115 | if (arg == undefined || arg == null)
116 | arg = '';
117 | if (typeof(arg) == 'object')
118 | dict = arg;
119 | else
120 | uri.push(encodeURIComponent(arg));
121 | }
122 | var url = "gap://" + args[0] + "/" + uri.join("/");
123 | if (dict != null) {
124 | var query_args = [];
125 | for (var name in dict) {
126 | if (typeof(name) != 'string')
127 | continue;
128 | query_args.push(encodeURIComponent(name) + "=" + encodeURIComponent(dict[name]));
129 | }
130 | if (query_args.length > 0)
131 | url += "?" + query_args.join("&");
132 | }
133 | document.location = url;
134 |
135 | };
136 | function Acceleration(x, y, z)
137 | {
138 | this.x = x;
139 | this.y = y;
140 | this.z = z;
141 | this.timestamp = new Date().getTime();
142 | this.win = null;
143 | this.fail = null;
144 | }
145 |
146 | var accelListeners = [];
147 |
148 | /**
149 | * This class provides access to device accelerometer data.
150 | * @constructor
151 | */
152 | function Accelerometer() {
153 | /**
154 | * The last known acceleration.
155 | */
156 | this.lastAcceleration = null;
157 | }
158 |
159 | /**
160 | * Asynchronously aquires the current acceleration.
161 | * @param {Function} successCallback The function to call when the acceleration
162 | * data is available
163 | * @param {Function} errorCallback The function to call when there is an error
164 | * getting the acceleration data.
165 | * @param {AccelerationOptions} options The options for getting the accelerometer data
166 | * such as timeout.
167 | */
168 | Accelerometer.prototype.getCurrentAcceleration = function(successCallback, errorCallback, options) {
169 | // If the acceleration is available then call success
170 | // If the acceleration is not available then call error
171 |
172 | // Created for iPhone, Iphone passes back _accel obj litteral
173 | if (typeof successCallback == "function") {
174 | if(this.lastAcceleration)
175 | successCallback(accel);
176 | else
177 | {
178 | watchAcceleration(this.gotCurrentAcceleration, this.fail);
179 | }
180 | }
181 | }
182 |
183 |
184 | Accelerometer.prototype.gotAccel = function(key, x, y, z)
185 | {
186 | console.log('we won');
187 | var a = new Acceleration(x,y,z);
188 | a.x = x;
189 | a.y = y;
190 | a.x = z;
191 | a.win = accelListeners[key].win;
192 | a.fail = accelListeners[key].fail;
193 | this.timestamp = new Date().getTime();
194 | this.lastAcceleration = a;
195 | accelListeners[key] = a;
196 | if (typeof a.win == "function") {
197 | a.win(a);
198 | }
199 | }
200 |
201 |
202 | /**
203 | * Asynchronously aquires the acceleration repeatedly at a given interval.
204 | * @param {Function} successCallback The function to call each time the acceleration
205 | * data is available
206 | * @param {Function} errorCallback The function to call when there is an error
207 | * getting the acceleration data.
208 | * @param {AccelerationOptions} options The options for getting the accelerometer data
209 | * such as timeout.
210 | */
211 |
212 | Accelerometer.prototype.watchAcceleration = function(successCallback, errorCallback, options) {
213 | // TODO: add the interval id to a list so we can clear all watches
214 | var frequency = (options != undefined)? options.frequency : 10000;
215 | var accel = Acceleration(0,0,0);
216 | accel.win = successCallback;
217 | accel.fail = errorCallback;
218 | accel.opts = options;
219 | var key = accelListeners.push( accel ) - 1;
220 | Accel.start(frequency, key);
221 | }
222 |
223 | /**
224 | * Clears the specified accelerometer watch.
225 | * @param {String} watchId The ID of the watch returned from #watchAcceleration.
226 | */
227 | Accelerometer.prototype.clearWatch = function(watchId) {
228 | Accel.stop(watchId);
229 | }
230 |
231 | Accelerometer.prototype.epicFail = function(watchId, message) {
232 | accelWatcher[key].fail();
233 | }
234 |
235 | PhoneGap.addConstructor(function() {
236 | if (typeof navigator.accelerometer == "undefined") navigator.accelerometer = new Accelerometer();
237 | });
238 |
239 |
240 | /**
241 | * This class provides access to the device media, interfaces to both sound and video
242 | * @constructor
243 | */
244 | function Media(src, successCallback, errorCallback) {
245 | this.src = src;
246 | this.successCallback = successCallback;
247 | this.errorCallback = errorCallback;
248 | }
249 |
250 | Media.prototype.record = function() {
251 | }
252 |
253 | Media.prototype.play = function() {
254 | }
255 |
256 | Media.prototype.pause = function() {
257 | }
258 |
259 | Media.prototype.stop = function() {
260 | }
261 |
262 |
263 | /**
264 | * This class contains information about any Media errors.
265 | * @constructor
266 | */
267 | function MediaError() {
268 | this.code = null,
269 | this.message = "";
270 | }
271 |
272 | MediaError.MEDIA_ERR_ABORTED = 1;
273 | MediaError.MEDIA_ERR_NETWORK = 2;
274 | MediaError.MEDIA_ERR_DECODE = 3;
275 | MediaError.MEDIA_ERR_NONE_SUPPORTED = 4;
276 |
277 |
278 | //if (typeof navigator.audio == "undefined") navigator.audio = new Media(src);
279 |
280 | /**
281 | * This class provides access to the device media, interfaces to both sound and video
282 | * @constructor
283 | */
284 |
285 | Media.prototype.play = function() {
286 | GapAudio.startPlayingAudio(this.src);
287 | }
288 |
289 | Media.prototype.stop = function() {
290 | GapAudio.stopPlayingAudio();
291 | }
292 |
293 | Media.prototype.startRecord = function() {
294 | GapAudio.startRecordingAudio(this.src);
295 | }
296 |
297 | Media.prototype.stopRecordingAudio = function() {
298 | GapAudio.stopRecordingAudio();
299 | }
300 |
301 |
302 |
303 |
304 | /**
305 | * This class provides access to device Compass data.
306 | * @constructor
307 | */
308 | function Compass() {
309 | /**
310 | * The last known Compass position.
311 | */
312 | this.lastHeading = null;
313 | this.lastError = null;
314 | this.callbacks = {
315 | onHeadingChanged: [],
316 | onError: []
317 | };
318 | };
319 |
320 | /**
321 | * Asynchronously aquires the current heading.
322 | * @param {Function} successCallback The function to call when the heading
323 | * data is available
324 | * @param {Function} errorCallback The function to call when there is an error
325 | * getting the heading data.
326 | * @param {PositionOptions} options The options for getting the heading data
327 | * such as timeout.
328 | */
329 | Compass.prototype.getCurrentHeading = function(successCallback, errorCallback, options) {
330 | if (this.lastHeading == null) {
331 | CompassHook.start();
332 | }
333 | else
334 | if (typeof successCallback == "function") {
335 | successCallback(this.lastHeading);
336 | }
337 | };
338 |
339 | /**
340 | * Asynchronously aquires the heading repeatedly at a given interval.
341 | * @param {Function} successCallback The function to call each time the heading
342 | * data is available
343 | * @param {Function} errorCallback The function to call when there is an error
344 | * getting the heading data.
345 | * @param {HeadingOptions} options The options for getting the heading data
346 | * such as timeout and the frequency of the watch.
347 | */
348 | Compass.prototype.watchHeading= function(successCallback, errorCallback, options) {
349 | // Invoke the appropriate callback with a new Position object every time the implementation
350 | // determines that the position of the hosting device has changed.
351 |
352 | this.getCurrentHeading(successCallback, errorCallback, options);
353 | var frequency = 100;
354 | if (typeof(options) == 'object' && options.frequency)
355 | frequency = options.frequency;
356 |
357 | var self = this;
358 | return setInterval(function() {
359 | self.getCurrentHeading(successCallback, errorCallback, options);
360 | }, frequency);
361 | };
362 |
363 |
364 | /**
365 | * Clears the specified heading watch.
366 | * @param {String} watchId The ID of the watch returned from #watchHeading.
367 | */
368 | Compass.prototype.clearWatch = function(watchId) {
369 | clearInterval(watchId);
370 | };
371 |
372 |
373 | /**
374 | * Called by the geolocation framework when the current heading is found.
375 | * @param {HeadingOptions} position The current heading.
376 | */
377 | Compass.prototype.setHeading = function(heading) {
378 | this.lastHeading = heading;
379 | for (var i = 0; i < this.callbacks.onHeadingChanged.length; i++) {
380 | var f = this.callbacks.onHeadingChanged.shift();
381 | f(heading);
382 | }
383 | };
384 |
385 | /**
386 | * Called by the geolocation framework when an error occurs while looking up the current position.
387 | * @param {String} message The text of the error message.
388 | */
389 | Compass.prototype.setError = function(message) {
390 | this.lastError = message;
391 | for (var i = 0; i < this.callbacks.onError.length; i++) {
392 | var f = this.callbacks.onError.shift();
393 | f(message);
394 | }
395 | };
396 |
397 | PhoneGap.addConstructor(function() {
398 | if (typeof navigator.compass == "undefined") navigator.compass = new Compass();
399 | });
400 |
401 |
402 | /**
403 | * this represents the mobile device, and provides properties for inspecting the model, version, UUID of the
404 | * phone, etc.
405 | * @constructor
406 | */
407 | function Device() {
408 | this.available = PhoneGap.available;
409 | this.platform = null;
410 | this.version = null;
411 | this.name = null;
412 | this.gap = null;
413 | this.uuid = null;
414 | try {
415 | if (window.DroidGap) {
416 | this.available = true;
417 | this.uuid = window.DroidGap.getUuid();
418 | this.version = window.DroidGap.getOSVersion();
419 | this.gapVersion = window.DroidGap.getVersion();
420 | this.platform = window.DroidGap.getPlatform();
421 | this.name = window.DroidGap.getProductName();
422 | this.line1Number = window.DroidGap.getLine1Number();
423 | this.deviceId = window.DroidGap.getDeviceId();
424 | this.simSerialNumber = window.DroidGap.getSimSerialNumber();
425 | this.subscriberId = window.DroidGap.getSubscriberId();
426 | }
427 | } catch(e) {
428 | this.available = false;
429 | }
430 | }
431 |
432 | /*
433 | * You must explicitly override the back button.
434 | */
435 |
436 | Device.prototype.overrideBackButton = function()
437 | {
438 | BackButton.override();
439 | }
440 |
441 | /*
442 | * This resets the back button to the default behaviour
443 | */
444 |
445 | Device.prototype.resetBackButton = function()
446 | {
447 | BackButton.reset();
448 | }
449 |
450 | /*
451 | * This terminates the activity!
452 | */
453 | Device.prototype.exitApp = function()
454 | {
455 | BackButton.exitApp();
456 | }
457 |
458 | PhoneGap.addConstructor(function() {
459 | navigator.device = window.device = new Device();
460 | });
461 |
462 |
463 | var Contact = function(){
464 | this.name = new ContactName();
465 | this.emails = [];
466 | this.phones = [];
467 | }
468 |
469 | var ContactName = function()
470 | {
471 | this.formatted = "";
472 | this.familyName = "";
473 | this.givenName = "";
474 | this.additionalNames = [];
475 | this.prefixes = [];
476 | this.suffixes = [];
477 | }
478 |
479 |
480 | var ContactEmail = function()
481 | {
482 | this.types = [];
483 | this.address = "";
484 | }
485 |
486 | var ContactPhoneNumber = function()
487 | {
488 | this.types = [];
489 | this.number = "";
490 | }
491 |
492 |
493 | var Contacts = function()
494 | {
495 | this.records = [];
496 | }
497 |
498 | Contacts.prototype.find = function(obj, win, fail)
499 | {
500 | if(obj.name != null)
501 | {
502 | // Build up the search term that we'll use in SQL, based on the structure/contents of the contact object passed into find.
503 | var searchTerm = '';
504 | if (obj.name.givenName && obj.name.givenName.length > 0) {
505 | searchTerm = obj.name.givenName.split(' ').join('%');
506 | }
507 | if (obj.name.familyName && obj.name.familyName.length > 0) {
508 | searchTerm += obj.name.familyName.split(' ').join('%');
509 | }
510 | if (!obj.name.familyName && !obj.name.givenName && obj.name.formatted) {
511 | searchTerm = obj.name.formatted;
512 | }
513 | ContactHook.search(searchTerm, "", "");
514 | }
515 | this.win = win;
516 | this.fail = fail;
517 | }
518 |
519 | Contacts.prototype.droidFoundContact = function(name, npa, email)
520 | {
521 | var contact = new Contact();
522 | contact.name = new ContactName();
523 | contact.name.formatted = name;
524 | contact.name.givenName = name;
525 | var mail = new ContactEmail();
526 | mail.types.push("home");
527 | mail.address = email;
528 | contact.emails.push(mail);
529 | phone = new ContactPhoneNumber();
530 | phone.types.push("home");
531 | phone.number = npa;
532 | contact.phones.push(phone);
533 | this.records.push(contact);
534 | }
535 |
536 | Contacts.prototype.droidDone = function()
537 | {
538 | this.win(this.records);
539 | }
540 |
541 | PhoneGap.addConstructor(function() {
542 | if(typeof navigator.contacts == "undefined") navigator.contacts = new Contacts();
543 | });
544 |
545 |
546 | /**
547 | * This class provides access to the device camera.
548 | * @constructor
549 | */
550 | function Camera() {
551 |
552 | }
553 |
554 | /**
555 | *
556 | * @param {Function} successCallback
557 | * @param {Function} errorCallback
558 | * @param {Object} options
559 | */
560 | Camera.prototype.getPicture = function(successCallback, errorCallback, options) {
561 |
562 | this.winCallback = successCallback;
563 | this.failCallback = errorCallback;
564 | if (options.quality)
565 | {
566 | GapCam.takePicture(options.quality);
567 | }
568 | else
569 | {
570 | GapCam.takePicture(80);
571 | }
572 | }
573 |
574 | Camera.prototype.win = function(picture)
575 | {
576 | this.winCallback(picture);
577 | }
578 |
579 | Camera.prototype.fail = function(err)
580 | {
581 | this.failCallback(err);
582 | }
583 |
584 | PhoneGap.addConstructor(function() {
585 | if (typeof navigator.camera == "undefined") navigator.camera = new Camera();
586 | });
587 |
588 |
589 |
590 |
591 |
592 | PhoneGap.addConstructor(function() { if (typeof navigator.fileMgr == "undefined") navigator.fileMgr = new FileMgr();});
593 |
594 |
595 | /**
596 | * This class provides iPhone read and write access to the mobile device file system.
597 | * Based loosely on http://www.w3.org/TR/2009/WD-FileAPI-20091117/#dfn-empty
598 | */
599 | function FileMgr()
600 | {
601 | this.fileWriters = {}; // empty maps
602 | this.fileReaders = {};
603 |
604 | this.docsFolderPath = "../../Documents";
605 | this.tempFolderPath = "../../tmp";
606 | this.freeDiskSpace = -1;
607 | this.getFileBasePaths();
608 | }
609 |
610 | // private, called from Native Code
611 | FileMgr.prototype._setPaths = function(docs,temp)
612 | {
613 | this.docsFolderPath = docs;
614 | this.tempFolderPath = temp;
615 | }
616 |
617 | // private, called from Native Code
618 | FileMgr.prototype._setFreeDiskSpace = function(val)
619 | {
620 | this.freeDiskSpace = val;
621 | }
622 |
623 |
624 | // FileWriters add/remove
625 | // called internally by writers
626 | FileMgr.prototype.addFileWriter = function(filePath,fileWriter)
627 | {
628 | this.fileWriters[filePath] = fileWriter;
629 | }
630 |
631 | FileMgr.prototype.removeFileWriter = function(filePath)
632 | {
633 | this.fileWriters[filePath] = null;
634 | }
635 |
636 | // File readers add/remove
637 | // called internally by readers
638 | FileMgr.prototype.addFileReader = function(filePath,fileReader)
639 | {
640 | this.fileReaders[filePath] = fileReader;
641 | }
642 |
643 | FileMgr.prototype.removeFileReader = function(filePath)
644 | {
645 | this.fileReaders[filePath] = null;
646 | }
647 |
648 | /*******************************************
649 | *
650 | * private reader callback delegation
651 | * called from native code
652 | */
653 | FileMgr.prototype.reader_onloadstart = function(filePath,result)
654 | {
655 | this.fileReaders[filePath].onloadstart(result);
656 | }
657 |
658 | FileMgr.prototype.reader_onprogress = function(filePath,result)
659 | {
660 | this.fileReaders[filePath].onprogress(result);
661 | }
662 |
663 | FileMgr.prototype.reader_onload = function(filePath,result)
664 | {
665 | this.fileReaders[filePath].result = unescape(result);
666 | this.fileReaders[filePath].onload(this.fileReaders[filePath].result);
667 | }
668 |
669 | FileMgr.prototype.reader_onerror = function(filePath,err)
670 | {
671 | this.fileReaders[filePath].result = err;
672 | this.fileReaders[filePath].onerror(err);
673 | }
674 |
675 | FileMgr.prototype.reader_onloadend = function(filePath,result)
676 | {
677 | this.fileReaders[filePath].onloadend(result);
678 | }
679 |
680 | /*******************************************
681 | *
682 | * private writer callback delegation
683 | * called from native code
684 | */
685 | FileMgr.prototype.writer_onerror = function(filePath,err)
686 | {
687 | this.fileWriters[filePath].onerror(err);
688 | }
689 |
690 | FileMgr.prototype.writer_oncomplete = function(filePath,result)
691 | {
692 | this.fileWriters[filePath].oncomplete(result); // result contains bytes written
693 | }
694 |
695 |
696 | FileMgr.prototype.getFileBasePaths = function()
697 | {
698 | //PhoneGap.exec("File.getFileBasePaths");
699 | }
700 |
701 | FileMgr.prototype.testFileExists = function(fileName, successCallback, errorCallback)
702 | {
703 | var test = FileUtil.testFileExists(fileName);
704 | test ? successCallback() : errorCallback();
705 | }
706 |
707 | FileMgr.prototype.testDirectoryExists = function(dirName, successCallback, errorCallback)
708 | {
709 | this.successCallback = successCallback;
710 | this.errorCallback = errorCallback;
711 | var test = FileUtil.testDirectoryExists(dirName);
712 | test ? successCallback() : errorCallback();
713 | }
714 |
715 | FileMgr.prototype.createDirectory = function(dirName, successCallback, errorCallback)
716 | {
717 | this.successCallback = successCallback;
718 | this.errorCallback = errorCallback;
719 | var test = FileUtils.createDirectory(dirName);
720 | test ? successCallback() : errorCallback();
721 | }
722 |
723 | FileMgr.prototype.deleteDirectory = function(dirName, successCallback, errorCallback)
724 | {
725 | this.successCallback = successCallback;
726 | this.errorCallback = errorCallback;
727 | var test = FileUtils.deleteDirectory(dirName);
728 | test ? successCallback() : errorCallback();
729 | }
730 |
731 | FileMgr.prototype.deleteFile = function(fileName, successCallback, errorCallback)
732 | {
733 | this.successCallback = successCallback;
734 | this.errorCallback = errorCallback;
735 | FileUtils.deleteFile(fileName);
736 | test ? successCallback() : errorCallback();
737 | }
738 |
739 | FileMgr.prototype.getFreeDiskSpace = function(successCallback, errorCallback)
740 | {
741 | if(this.freeDiskSpace > 0)
742 | {
743 | return this.freeDiskSpace;
744 | }
745 | else
746 | {
747 | this.successCallback = successCallback;
748 | this.errorCallback = errorCallback;
749 | this.freeDiskSpace = FileUtils.getFreeDiskSpace();
750 | (this.freeDiskSpace > 0) ? successCallback() : errorCallback();
751 | }
752 | }
753 |
754 |
755 | // File Reader
756 |
757 |
758 | function FileReader()
759 | {
760 | this.fileName = "";
761 | this.result = null;
762 | this.onloadstart = null;
763 | this.onprogress = null;
764 | this.onload = null;
765 | this.onerror = null;
766 | this.onloadend = null;
767 | }
768 |
769 |
770 | FileReader.prototype.abort = function()
771 | {
772 | // Not Implemented
773 | }
774 |
775 | FileReader.prototype.readAsText = function(file)
776 | {
777 | if(this.fileName && this.fileName.length > 0)
778 | {
779 | navigator.fileMgr.removeFileReader(this.fileName,this);
780 | }
781 | this.fileName = file;
782 | navigator.fileMgr.addFileReader(this.fileName,this);
783 |
784 | return FileUtil.read(this.fileName);
785 | }
786 |
787 | // File Writer
788 |
789 | function FileWriter()
790 | {
791 | this.fileName = "";
792 | this.result = null;
793 | this.readyState = 0; // EMPTY
794 | this.result = null;
795 | this.onerror = null;
796 | this.oncomplete = null;
797 | }
798 |
799 | FileWriter.prototype.writeAsText = function(file,text,bAppend)
800 | {
801 | if(this.fileName && this.fileName.length > 0)
802 | {
803 | navigator.fileMgr.removeFileWriter(this.fileName,this);
804 | }
805 | this.fileName = file;
806 | if(bAppend != true)
807 | {
808 | bAppend = false; // for null values
809 | }
810 | navigator.fileMgr.addFileWriter(file,this);
811 | this.readyState = 0; // EMPTY
812 | var call = FileUtil.write(file, text, bAppend);
813 | this.result = null;
814 | }
815 |
816 |
817 | /*
818 | * This is purely for the Android 1.5/1.6 HTML 5 Storage
819 | * I was hoping that Android 2.0 would deprecate this, but given the fact that
820 | * most manufacturers ship with Android 1.5 and do not do OTA Updates, this is required
821 | */
822 |
823 | var DroidDB = function()
824 | {
825 | this.txQueue = [];
826 | }
827 |
828 | DroidDB.prototype.addResult = function(rawdata, tx_id)
829 | {
830 | eval("var data = " + rawdata);
831 | var tx = this.txQueue[tx_id];
832 | tx.resultSet.push(data);
833 | }
834 |
835 | DroidDB.prototype.completeQuery = function(tx_id)
836 | {
837 | var tx = this.txQueue[tx_id];
838 | var r = new result();
839 | r.rows.resultSet = tx.resultSet;
840 | r.rows.length = tx.resultSet.length;
841 | tx.win(r);
842 | }
843 |
844 | DroidDB.prototype.fail = function(reason, tx_id)
845 | {
846 | var tx = this.txQueue[tx_id];
847 | tx.fail(reason);
848 | }
849 |
850 | var DatabaseShell = function()
851 | {
852 |
853 | }
854 |
855 | DatabaseShell.prototype.transaction = function(process)
856 | {
857 | tx = new Tx();
858 | process(tx);
859 | }
860 |
861 | var Tx = function()
862 | {
863 | droiddb.txQueue.push(this);
864 | this.id = droiddb.txQueue.length - 1;
865 | this.resultSet = [];
866 | }
867 |
868 | Tx.prototype.executeSql = function(query, params, win, fail)
869 | {
870 | droidStorage.executeSql(query, params, this.id);
871 | tx.win = win;
872 | tx.fail = fail;
873 | }
874 |
875 | var result = function()
876 | {
877 | this.rows = new Rows();
878 | }
879 |
880 | var Rows = function()
881 | {
882 | this.resultSet = [];
883 | this.length = 0;
884 | }
885 |
886 | Rows.prototype.item = function(row_id)
887 | {
888 | return this.resultSet[id];
889 | }
890 |
891 | var dbSetup = function(name, version, display_name, size)
892 | {
893 | droidStorage.openDatabase(name, version, display_name, size)
894 | db_object = new DatabaseShell();
895 | return db_object;
896 | }
897 |
898 | PhoneGap.addConstructor(function() {
899 | if (typeof window.openDatabase == "undefined")
900 | {
901 | navigator.openDatabase = window.openDatabase = dbSetup;
902 | window.droiddb = new DroidDB();
903 | }
904 | });
905 |
906 |
907 |
908 | /**
909 | * This class provides access to device GPS data.
910 | * @constructor
911 | */
912 | function Geolocation() {
913 | /**
914 | * The last known GPS position.
915 | */
916 | this.lastPosition = null;
917 | this.lastError = null;
918 | this.listeners = null;
919 | };
920 |
921 | var geoListeners = [];
922 |
923 | Geolocation.prototype.getCurrentPosition = function(successCallback, errorCallback, options)
924 | {
925 | var position = Geo.getCurrentLocation();
926 | this.global_success = successCallback;
927 | this.fail = errorCallback;
928 | }
929 |
930 | // Run the global callback
931 | Geolocation.prototype.gotCurrentPosition = function(lat, lng, alt, altacc, head, vel, stamp)
932 | {
933 | if (lat == "undefined" || lng == "undefined")
934 | {
935 | this.fail();
936 | }
937 | else
938 | {
939 | coords = new Coordinates(lat, lng, alt, altacc, head, vel);
940 | loc = new Position(coords, stamp);
941 | this.lastPosition = loc;
942 | this.global_success(loc);
943 | }
944 | }
945 |
946 | /*
947 | * This turns on the GeoLocator class, which has two listeners.
948 | * The listeners have their own timeouts, and run independently of this process
949 | * In this case, we return the key to the watch hash
950 | */
951 |
952 | Geolocation.prototype.watchPosition = function(successCallback, errorCallback, options)
953 | {
954 | var frequency = (options != undefined)? options.frequency : 10000;
955 |
956 | var key = geoListeners.push( {"success" : successCallback, "fail" : errorCallback }) - 1;
957 |
958 | // TO-DO: Get the names of the method and pass them as strings to the Java.
959 | return Geo.start(frequency, key);
960 | }
961 |
962 | /*
963 | * Retrieve and stop this listener from listening to the GPS
964 | *
965 | */
966 | Geolocation.prototype.success = function(key, lat, lng, alt, altacc, head, vel, stamp)
967 | {
968 | var coords = new Coordinates(lat, lng, alt, altacc, head, vel);
969 | var loc = new Position(coords, stamp);
970 | geoListeners[key].success(loc);
971 | }
972 |
973 | Geolocation.prototype.fail = function(key)
974 | {
975 | geoListeners[key].fail();
976 | }
977 |
978 | Geolocation.prototype.clearWatch = function(watchId)
979 | {
980 | Geo.stop(watchId);
981 | }
982 |
983 | PhoneGap.addConstructor(function() {
984 | // Taken from Jesse's geo fix (similar problem) in PhoneGap iPhone. Go figure, same browser!
985 | function __proxyObj(origObj, proxyObj, funkList) {
986 | for (var v in funkList) {
987 | origObj[funkList[v]] = proxyObj[funkList[v]];
988 | }
989 | }
990 | // In case a native geolocation object exists, proxy the native one over to a diff object so that we can overwrite the native implementation.
991 | if (typeof navigator.geolocation != 'undefined') {
992 | navigator._geo = new Geolocation();
993 | __proxyObj(navigator.geolocation, navigator._geo, ["setLocation", "getCurrentPosition", "watchPosition", "clearWatch", "setError", "start", "stop", "gotCurrentPosition"]);
994 | } else {
995 | navigator.geolocation = new Geolocation();
996 | }
997 | });
998 |
999 | var Crypto = function()
1000 | {
1001 | }
1002 |
1003 | Crypto.prototype.encrypt = function(seed, string, callback)
1004 | {
1005 | GapCrypto.encrypt(seed, string);
1006 | this.encryptWin = callback;
1007 | }
1008 |
1009 | Crypto.prototype.decrypt = function(seed, string, callback)
1010 | {
1011 | GapCrypto.decrypt(seed, string);
1012 | this.decryptWin = callback;
1013 | }
1014 |
1015 | Crypto.prototype.gotCryptedString = function(string)
1016 | {
1017 | this.encryptWin(string);
1018 | }
1019 |
1020 | Crypto.prototype.getPlainString = function(string)
1021 | {
1022 | this.decryptWin(string);
1023 | }
1024 |
1025 | PhoneGap.addConstructor(function() {
1026 | if (typeof navigator.Crypto == "undefined")
1027 | {
1028 | navigator.Crypto = new Crypto();
1029 | }
1030 | });
1031 |
1032 |
1033 |
1034 | function KeyEvent()
1035 | {
1036 | }
1037 |
1038 | KeyEvent.prototype.backTrigger = function()
1039 | {
1040 | var e = document.createEvent('Events');
1041 | e.initEvent('backKeyDown');
1042 | document.dispatchEvent(e);
1043 | }
1044 |
1045 | if (document.keyEvent == null || typeof document.keyEvent == 'undefined')
1046 | {
1047 | window.keyEvent = document.keyEvent = new KeyEvent();
1048 | }
1049 |
1050 |
1051 | /**
1052 | * This class provides access to notifications on the device.
1053 | */
1054 | function Notification() {
1055 |
1056 | }
1057 |
1058 | /**
1059 | * Open a native alert dialog, with a customizable title and button text.
1060 | * @param {String} message Message to print in the body of the alert
1061 | * @param {String} [title="Alert"] Title of the alert dialog (default: Alert)
1062 | * @param {String} [buttonLabel="OK"] Label of the close button (default: OK)
1063 | */
1064 | Notification.prototype.alert = function(message, title, buttonLabel) {
1065 | // Default is to use a browser alert; this will use "index.html" as the title though
1066 | alert(message);
1067 | };
1068 |
1069 | /**
1070 | * Start spinning the activity indicator on the statusbar
1071 | */
1072 | Notification.prototype.activityStart = function() {
1073 | };
1074 |
1075 | /**
1076 | * Stop spinning the activity indicator on the statusbar, if it's currently spinning
1077 | */
1078 | Notification.prototype.activityStop = function() {
1079 | };
1080 |
1081 | /**
1082 | * Causes the device to blink a status LED.
1083 | * @param {Integer} count The number of blinks.
1084 | * @param {String} colour The colour of the light.
1085 | */
1086 | Notification.prototype.blink = function(count, colour) {
1087 |
1088 | };
1089 |
1090 | /**
1091 | * Causes the device to vibrate.
1092 | * @param {Integer} mills The number of milliseconds to vibrate for.
1093 | */
1094 | Notification.prototype.vibrate = function(mills) {
1095 |
1096 | };
1097 |
1098 | /**
1099 | * Causes the device to beep.
1100 | * @param {Integer} count The number of beeps.
1101 | * @param {Integer} volume The volume of the beep.
1102 | */
1103 | Notification.prototype.beep = function(count, volume) {
1104 |
1105 | };
1106 |
1107 | // TODO: of course on Blackberry and Android there notifications in the UI as well
1108 |
1109 | PhoneGap.addConstructor(function() {
1110 | if (typeof navigator.notification == "undefined") navigator.notification = new Notification();
1111 | });
1112 |
1113 | Notification.prototype.vibrate = function(mills)
1114 | {
1115 | DroidGap.vibrate(mills);
1116 | }
1117 |
1118 | /*
1119 | * On the Android, we don't beep, we notify you with your
1120 | * notification! We shouldn't keep hammering on this, and should
1121 | * review what we want beep to do.
1122 | */
1123 |
1124 | Notification.prototype.beep = function(count, volume)
1125 | {
1126 | DroidGap.beep(count);
1127 | }
1128 |
1129 |
1130 | /**
1131 | * This class contains position information.
1132 | * @param {Object} lat
1133 | * @param {Object} lng
1134 | * @param {Object} acc
1135 | * @param {Object} alt
1136 | * @param {Object} altacc
1137 | * @param {Object} head
1138 | * @param {Object} vel
1139 | * @constructor
1140 | */
1141 | function Position(coords, timestamp) {
1142 | this.coords = coords;
1143 | this.timestamp = new Date().getTime();
1144 | }
1145 |
1146 | function Coordinates(lat, lng, alt, acc, head, vel) {
1147 | /**
1148 | * The latitude of the position.
1149 | */
1150 | this.latitude = lat;
1151 | /**
1152 | * The longitude of the position,
1153 | */
1154 | this.longitude = lng;
1155 | /**
1156 | * The accuracy of the position.
1157 | */
1158 | this.accuracy = acc;
1159 | /**
1160 | * The altitude of the position.
1161 | */
1162 | this.altitude = alt;
1163 | /**
1164 | * The direction the device is moving at the position.
1165 | */
1166 | this.heading = head;
1167 | /**
1168 | * The velocity with which the device is moving at the position.
1169 | */
1170 | this.speed = vel;
1171 | }
1172 |
1173 | /**
1174 | * This class specifies the options for requesting position data.
1175 | * @constructor
1176 | */
1177 | function PositionOptions() {
1178 | /**
1179 | * Specifies the desired position accuracy.
1180 | */
1181 | this.enableHighAccuracy = true;
1182 | /**
1183 | * The timeout after which if position data cannot be obtained the errorCallback
1184 | * is called.
1185 | */
1186 | this.timeout = 10000;
1187 | }
1188 |
1189 | /**
1190 | * This class contains information about any GSP errors.
1191 | * @constructor
1192 | */
1193 | function PositionError() {
1194 | this.code = null;
1195 | this.message = "";
1196 | }
1197 |
1198 | PositionError.UNKNOWN_ERROR = 0;
1199 | PositionError.PERMISSION_DENIED = 1;
1200 | PositionError.POSITION_UNAVAILABLE = 2;
1201 | PositionError.TIMEOUT = 3;
1202 |
1203 |
1204 | /**
1205 | * This class contains information about any NetworkStatus.
1206 | * @constructor
1207 | */
1208 | function NetworkStatus() {
1209 | this.code = null;
1210 | this.message = "";
1211 | }
1212 | NetworkStatus.NOT_REACHABLE = 0;
1213 | NetworkStatus.REACHABLE_VIA_CARRIER_DATA_NETWORK = 1;
1214 | NetworkStatus.REACHABLE_VIA_WIFI_NETWORK = 2;
1215 | /**
1216 | * This class provides access to device Network data (reachability).
1217 | * @constructor
1218 | */
1219 | function Network() {
1220 | /**
1221 | * The last known Network status.
1222 | * { hostName: string, ipAddress: string,
1223 | remoteHostStatus: int(0/1/2), internetConnectionStatus: int(0/1/2), localWiFiConnectionStatus: int (0/2) }
1224 | */
1225 | this.lastReachability = null;
1226 | };
1227 | /**
1228 | * Called by the geolocation framework when the reachability status has changed.
1229 | * @param {Reachibility} reachability The current reachability status.
1230 | */
1231 | Network.prototype.updateReachability = function(reachability) {
1232 | this.lastReachability = reachability;
1233 | };
1234 | /**
1235 | *
1236 | * @param {Object} uri
1237 | * @param {Function} win
1238 | * @param {Object} options (isIpAddress:boolean)
1239 | */
1240 | Network.prototype.isReachable = function(uri, win, options)
1241 | {
1242 | var status = new NetworkStatus();
1243 | if(NetworkManager.isReachable(uri))
1244 | {
1245 | if (NetworkManager.isWifiActive()) {
1246 | status.code = NetworkStatus.REACHABLE_VIA_WIFI_NETWORK;
1247 | } else {
1248 | status.code = NetworkStatus.REACHABLE_VIA_CARRIER_DATA_NETWORK;
1249 | }
1250 | } else {
1251 | status.code = NetworkStatus.NOT_REACHABLE;
1252 | }
1253 | win(status);
1254 | };
1255 | PhoneGap.addConstructor(function() {
1256 | if (typeof navigator.network == "undefined") navigator.network = new Network();
1257 | });
1258 |
1259 |
--------------------------------------------------------------------------------
/jquery.mobile-1.0a2.min.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery Mobile v1.0a2
3 | * http://jquerymobile.com/
4 | *
5 | * Copyright 2010, jQuery Project
6 | * Dual licensed under the MIT or GPL Version 2 licenses.
7 | * http://jquery.org/license
8 | */
9 | /*!* jQuery Mobile v1.0a2 * 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:-moz-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-gradient(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 #00516e;background:#4b88b6;font-weight:bold;color:#fff;text-shadow:0 -1px 1px #014D68;background-image:-moz-linear-gradient(top,#72b0d4,#4b88b6);text-decoration:none;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#72b0d4),color-stop(1,#4b88b6));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#72b0d4',EndColorStr='#4b88b6')";}.ui-btn-hover-b a.ui-link-inherit{color:#fff;}.ui-btn-down-b{border:1px solid #225377;background:#4e89c5;font-weight:bold;color:#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;text-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-hover-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:#bbb;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);background-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,#faeb9e);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;background:#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-border-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;opacity:.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;background-size:20px 20px;}.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);background-size:16px 16px;}.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;background-size:35px 35px;}.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-radius: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-background-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-width: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-viewport{margin:0;overflow-x:hidden;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;-webkit-tap-highlight-color:rgba(0,0,0,0);}.ui-page{top:0;left:0;width:100%;min-height:100%;position:absolute;display:none;border:0;}.ui-page-active{display:block;overflow:visible;min-height:100%;}.ui-loading .ui-mobile-viewport{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-loader .ui-icon{position:static;display:block;opacity:.9;margin:0 auto;width:35px;height:35px;background-color:transparent;}.ui-mobile-rendering>*{visibility:hidden;}.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;overflow-x:hidden;padding:15px;}.ui-page-fullscreen .ui-content{padding:0;}.ui-icon{width:18px;height:18px;}.ui-fullscreen img{max-width:100%;}.ui-nojs{position:absolute;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:translateY(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;}.ui-mobile-viewport-transitioning{-webkit-perspective:1000;position:absolute;}.ui-mobile-viewport-transitioning,.ui-mobile-viewport-transitioning .ui-page{width:100%;height:100%;overflow:hidden;}.flip{-webkit-animation-duration:.65s;-webkit-backface-visibility:hidden;-webkit-transform:translateX(0);}.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(-180deg) 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,.ui-grid-d{overflow:hidden;}.ui-block-a,.ui-block-b,.ui-block-c,.ui-block-d,.ui-block-e{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-grid-c .ui-block-a,.ui-grid-c .ui-block-b,.ui-grid-c .ui-block-c,.ui-grid-c .ui-block-d{width:25%;}.ui-grid-c .ui-block-a{clear:left;}.ui-grid-d .ui-block-a,.ui-grid-d .ui-block-b,.ui-grid-d .ui-block-c,.ui-grid-d .ui-block-d,.ui-grid-d .ui-block-e{width:20%;}.ui-grid-d .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;-webkit-transform:translateZ(0);}.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;width: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:inline-block;width:20px;height:20px;padding:1px 0 1px 2px;text-indent:-9999px;}.ui-btn-icon-notext .ui-btn-inner{padding:0;}.ui-btn-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-top:-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-vertical .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:relative;}.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-contain{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:block;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{display:inline-block;width:20%;margin:0 2% 0 0;}.min-width-480px input.ui-input-text,.min-width-480px textarea.ui-input-text,.min-width-480px .ui-input-search{width: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:relative;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:50%;text-align:right;margin:.3em 0;}.min-width-480px .ui-li-aside{width:45%;}.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-alt{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,.min-width-480px 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 20px;top:4px;width:66%;}a.ui-slider-handle{position:absolute;z-index:10;top:50%;width:28px;height:28px;margin-top:-15px;margin-left:-15px;}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:absolute;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;}
--------------------------------------------------------------------------------
/scripts/jquery.mobile-1.0a2.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery Mobile v1.0a2
3 | * http://jquerymobile.com/
4 | *
5 | * Copyright 2010, jQuery Project
6 | * Dual licensed under the MIT or GPL Version 2 licenses.
7 | * http://jquery.org/license
8 | */
9 | (function(a,e){if(a.cleanData){var c=a.cleanData;a.cleanData=function(b){for(var f=0,h;(h=b[f])!=null;f++)a(h).triggerHandler("remove");c(b)}}else{var d=a.fn.remove;a.fn.remove=function(b,f){return this.each(function(){if(!f)if(!b||a.filter(b,[this]).length)a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")});return d.call(a(this),b,f)})}}a.widget=function(b,f,h){var l=b.split(".")[0],j;b=b.split(".")[1];j=l+"-"+b;if(!h){h=f;f=a.Widget}a.expr[":"][j]=function(n){return!!a.data(n,
10 | b)};a[l]=a[l]||{};a[l][b]=function(n,g){arguments.length&&this._createWidget(n,g)};f=new f;f.options=a.extend(true,{},f.options);a[l][b].prototype=a.extend(true,f,{namespace:l,widgetName:b,widgetEventPrefix:a[l][b].prototype.widgetEventPrefix||b,widgetBaseClass:j},h);a.widget.bridge(b,a[l][b])};a.widget.bridge=function(b,f){a.fn[b]=function(h){var l=typeof h==="string",j=Array.prototype.slice.call(arguments,1),n=this;h=!l&&j.length?a.extend.apply(null,[true,h].concat(j)):h;if(l&&h.charAt(0)==="_")return n;
11 | l?this.each(function(){var g=a.data(this,b);if(!g)throw"cannot call methods on "+b+" prior to initialization; attempted to call method '"+h+"'";if(!a.isFunction(g[h]))throw"no such method '"+h+"' for "+b+" widget instance";var i=g[h].apply(g,j);if(i!==g&&i!==e){n=i;return false}}):this.each(function(){var g=a.data(this,b);g?g.option(h||{})._init():a.data(this,b,new f(h,this))});return n}};a.Widget=function(b,f){arguments.length&&this._createWidget(b,f)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",
12 | options:{disabled:false},_createWidget:function(b,f){a.data(f,this.widgetName,this);this.element=a(f);this.options=a.extend(true,{},this.options,this._getCreateOptions(),b);var h=this;this.element.bind("remove."+this.widgetName,function(){h.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){var b={};if(a.metadata)b=a.metadata.get(element)[this.widgetName];return b},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);
13 | this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(b,f){var h=b;if(arguments.length===0)return a.extend({},this.options);if(typeof b==="string"){if(f===e)return this.options[b];h={};h[b]=f}this._setOptions(h);return this},_setOptions:function(b){var f=this;a.each(b,function(h,l){f._setOption(h,l)});return this},_setOption:function(b,f){this.options[b]=f;if(b===
14 | "disabled")this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(b,f,h){var l=this.options[b];f=a.Event(f);f.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();h=h||{};if(f.originalEvent){b=a.event.props.length;for(var j;b;){j=a.event.props[--b];f[j]=f.originalEvent[j]}}this.element.trigger(f,
15 | h);return!(a.isFunction(l)&&l.call(this.element[0],f,h)===false||f.isDefaultPrevented())}}})(jQuery);(function(a,e){a.widget("mobile.widget",{_getCreateOptions:function(){var c=this.element,d={};a.each(this.options,function(b){var f=c.data(b.replace(/[A-Z]/g,function(h){return"-"+h.toLowerCase()}));if(f!==e)d[b]=f});return d}})})(jQuery);
16 | (function(a,e){function c(j){var n=j.charAt(0).toUpperCase()+j.substr(1);j=(j+" "+f.join(n+" ")+n).split(" ");for(var g in j)if(b[g]!==e)return true}a.media=function(){var j={},n=a("html"),g=a("
"),i=a("").append(g);return function(m){if(!(m in j)){var o=a("");n.prepend(i).prepend(o);j[m]=g.css("position")==="absolute";i.add(o).remove()}return j[m]}}();var d=a("").prependTo("html"),
17 | b=d[0].style,f=["webkit","moz","o"],h=window.palmGetResource||window.PalmServiceBridge,l=window.blackberry;a.extend(a.support,{orientation:"orientation"in window,touch:"ontouchend"in document,cssTransitions:"WebKitTransitionEvent"in window,pushState:!!history.pushState,mediaquery:a.media("only all"),cssPseudoElement:!!c("content"),boxShadow:!!c("boxShadow")&&!l,scrollTop:("pageXOffset"in window||"scrollTop"in document.documentElement||"scrollTop"in d[0])&&!h,dynamicBaseTag:function(){var j=location.protocol+
18 | "//"+location.host+location.pathname+"ui-dir/",n=a("
",{href:j}).appendTo("head"),g=a("
").prependTo(d)[0].href;n.remove();return g.indexOf(j)===0}()});d.remove();a.support.boxShadow||a("html").addClass("ui-mobile-nosupport-boxshadow")})(jQuery);
19 | (function(a,e){a.each("touchstart touchmove touchend orientationchange tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(h,l){a.fn[l]=function(j){return j?this.bind(l,j):this.trigger(l)};a.attrFn[l]=true});var c=a.support.touch,d=c?"touchstart":"mousedown",b=c?"touchend":"mouseup",f=c?"touchmove":"mousemove";a.event.special.scrollstart={enabled:true,setup:function(){function h(g,i){j=i;var m=g.type;g.type=j?"scrollstart":"scrollstop";a.event.handle.call(l,g);g.type=
20 | m}var l=this,j,n;a(l).bind("touchmove scroll",function(g){if(a.event.special.scrollstart.enabled){j||h(g,true);clearTimeout(n);n=setTimeout(function(){h(g,false)},50)}})}};a.event.special.tap={setup:function(){var h=this,l=a(h);l.bind(d,function(j){function n(){if(Math.abs(m[0]-j.pageX)>10||Math.abs(m[1]-j.pageY)>10)g=true}if(!(j.which&&j.which!==1)){var g=false,i=true,m=[j.pageX,j.pageY],o,t;t=setTimeout(function(){if(i&&!g){o=j.type;j.type="taphold";a.event.handle.call(h,j);j.type=o}},750);l.one(f,
21 | n).one(b,function(w){l.unbind(f,n);clearTimeout(t);i=false;if(!g){o=w.type;w.type="tap";a.event.handle.call(h,w);w.type=o}})}})}};a.event.special.swipe={setup:function(){var h=a(this);h.bind(d,function(l){function j(m){if(g){var o=m.originalEvent.touches?m.originalEvent.touches[0]:m;i={time:(new Date).getTime(),coords:[o.pageX,o.pageY]};Math.abs(g.coords[0]-i.coords[0])>10&&m.preventDefault()}}var n=l.originalEvent.touches?l.originalEvent.touches[0]:l,g={time:(new Date).getTime(),coords:[n.pageX,
22 | n.pageY],origin:a(l.target)},i;h.bind(f,j).one(b,function(){h.unbind(f,j);if(g&&i)if(i.time-g.time<1E3&&Math.abs(g.coords[0]-i.coords[0])>30&&Math.abs(g.coords[1]-i.coords[1])<75)g.origin.trigger("swipe").trigger(g.coords[0]>i.coords[0]?"swipeleft":"swiperight");g=i=e})})}};(function(h){function l(){var i=n();if(i!==g){g=i;j.trigger("orientationchange")}}var j=h(window),n,g;h.event.special.orientationchange={setup:function(){if(h.support.orientation)return false;g=n();j.bind("resize",l)},teardown:function(){if(h.support.orientation)return false;
23 | j.unbind("resize",l)},add:function(i){var m=i.handler;i.handler=function(o){o.orientation=n();return m.apply(this,arguments)}}};n=function(){var i=document.documentElement;return i&&i.clientWidth/i.clientHeight<1.1?"portrait":"landscape"}})(jQuery);a.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe",swiperight:"swipe"},function(h,l){a.event.special[h]={setup:function(){a(this).bind(l,a.noop)}}})})(jQuery);
24 | (function(a,e,c){function d(g){g=g||location.href;return"#"+g.replace(/^[^#]*#?(.*)$/,"$1")}var b="hashchange",f=document,h,l=a.event.special,j=f.documentMode,n="on"+b in e&&(j===c||j>7);a.fn[b]=function(g){return g?this.bind(b,g):this.trigger(b)};a.fn[b].delay=50;l[b]=a.extend(l[b],{setup:function(){if(n)return false;a(h.start)},teardown:function(){if(n)return false;a(h.stop)}});h=function(){function g(){var x=d(),v=u(o);if(x!==o){w(o=x,v);a(e).trigger(b)}else if(v!==o)location.href=location.href.replace(/#.*/,
25 | "")+v;m=setTimeout(g,a.fn[b].delay)}var i={},m,o=d(),t=function(x){return x},w=t,u=t;i.start=function(){m||g()};i.stop=function(){m&&clearTimeout(m);m=c};a.browser.msie&&!n&&function(){var x,v;i.start=function(){if(!x){v=(v=a.fn[b].src)&&v+d();x=a('
').hide().one("load",function(){v||w(d());g()}).attr("src",v||"javascript:0").insertAfter("body")[0].contentWindow;f.onpropertychange=function(){try{if(event.propertyName==="title")x.document.title=f.title}catch(s){}}}};
26 | i.stop=t;u=function(){return d(x.location.href)};w=function(s,z){var q=x.document,G=a.fn[b].domain;if(s!==z){q.title=f.title;q.open();G&&q.write('