├── README ├── font.html ├── images ├── activity.png ├── cross.png └── font-test.png ├── index.html ├── jquery.ba-throttle-debounce.js ├── jquery.js ├── jquery.qnx.core.js ├── jquery.ui.widget.js ├── newstyles.html ├── qnxbuttons.css ├── qnxforms.js └── widgets ├── jquery.qnx.button.js ├── jquery.qnx.select.js ├── jquery.qnx.slider.js └── jquery.qnx.textfield.js /README: -------------------------------------------------------------------------------- 1 | EULA: 2 | 3 | The exact license is still pending but what matters is that it's free and you can use it for whatever you want, both commercial and non-commercial. 4 | 5 | That said, all this is to be considered pre-alpha. Use at your own risk. 6 | 7 | All code by Marco van Hylckama Vlieg and Douglas Neiner 8 | (c) 2011, All Rights Reserved 9 | -------------------------------------------------------------------------------- /font.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | untitled 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 28 | 44 | 45 | 46 | 47 |

Font Comparison

48 |
49 | 50 |

Arial

51 |
52 | 53 |
54 | 55 |

DejaVu

56 |
57 | 58 |
59 | 60 |

Myriad

61 |
62 | 63 |
64 | 65 |
66 | Font Test 67 |
68 | 69 |
70 | 71 | 72 | -------------------------------------------------------------------------------- /images/activity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMarco/WebWorksQNXWidgets/433863c7851a1588bfcc58fb99701d6ba0af4137/images/activity.png -------------------------------------------------------------------------------- /images/cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMarco/WebWorksQNXWidgets/433863c7851a1588bfcc58fb99701d6ba0af4137/images/cross.png -------------------------------------------------------------------------------- /images/font-test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMarco/WebWorksQNXWidgets/433863c7851a1588bfcc58fb99701d6ba0af4137/images/font-test.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | untitled 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 |

The QNX UI project

35 |

Because I was bored. Because I can.

36 |
37 | 38 |
39 | 40 |
41 |
42 | 43 |
44 |
45 | 46 |
47 |
48 | 49 |
50 |
51 | 52 |
53 |
54 | 55 |
56 |
57 | 58 |
59 | 60 | 61 | 62 |
63 | 69 |
70 | 71 |
72 | 79 |
80 | 81 |
82 | 87 |
88 |
89 | 94 |
95 |
96 | 97 |
Option 1
Option 2
Option 3
98 | 99 |
100 | 101 |
102 | 103 |
Option 1
Option 2
104 | 105 |
106 | 107 |
108 | 109 |
Option 1
Option 2
Option 3
Option 4
110 | 111 |
112 | 113 |
114 | 115 |
Option 1
Option 2
Option 3
116 | 117 |
118 | 119 | 120 | 121 | 156 | 157 |

 

158 |

 

159 |

 

160 |

 

161 |

 

162 |

 

163 |

 

164 |

 

165 |

 

166 |

 

 

167 |

 

168 |

 

169 |

 

170 |

 

171 |
172 | 173 | 174 | -------------------------------------------------------------------------------- /jquery.ba-throttle-debounce.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery throttle / debounce - v1.1 - 3/7/2010 3 | * http://benalman.com/projects/jquery-throttle-debounce-plugin/ 4 | * 5 | * Copyright (c) 2010 "Cowboy" Ben Alman 6 | * Dual licensed under the MIT and GPL licenses. 7 | * http://benalman.com/about/license/ 8 | */ 9 | 10 | // Script: jQuery throttle / debounce: Sometimes, less is more! 11 | // 12 | // *Version: 1.1, Last updated: 3/7/2010* 13 | // 14 | // Project Home - http://benalman.com/projects/jquery-throttle-debounce-plugin/ 15 | // GitHub - http://github.com/cowboy/jquery-throttle-debounce/ 16 | // Source - http://github.com/cowboy/jquery-throttle-debounce/raw/master/jquery.ba-throttle-debounce.js 17 | // (Minified) - http://github.com/cowboy/jquery-throttle-debounce/raw/master/jquery.ba-throttle-debounce.min.js (0.7kb) 18 | // 19 | // About: License 20 | // 21 | // Copyright (c) 2010 "Cowboy" Ben Alman, 22 | // Dual licensed under the MIT and GPL licenses. 23 | // http://benalman.com/about/license/ 24 | // 25 | // About: Examples 26 | // 27 | // These working examples, complete with fully commented code, illustrate a few 28 | // ways in which this plugin can be used. 29 | // 30 | // Throttle - http://benalman.com/code/projects/jquery-throttle-debounce/examples/throttle/ 31 | // Debounce - http://benalman.com/code/projects/jquery-throttle-debounce/examples/debounce/ 32 | // 33 | // About: Support and Testing 34 | // 35 | // Information about what version or versions of jQuery this plugin has been 36 | // tested with, what browsers it has been tested in, and where the unit tests 37 | // reside (so you can test it yourself). 38 | // 39 | // jQuery Versions - none, 1.3.2, 1.4.2 40 | // Browsers Tested - Internet Explorer 6-8, Firefox 2-3.6, Safari 3-4, Chrome 4-5, Opera 9.6-10.1. 41 | // Unit Tests - http://benalman.com/code/projects/jquery-throttle-debounce/unit/ 42 | // 43 | // About: Release History 44 | // 45 | // 1.1 - (3/7/2010) Fixed a bug in where trailing callbacks 46 | // executed later than they should. Reworked a fair amount of internal 47 | // logic as well. 48 | // 1.0 - (3/6/2010) Initial release as a stand-alone project. Migrated over 49 | // from jquery-misc repo v0.4 to jquery-throttle repo v1.0, added the 50 | // no_trailing throttle parameter and debounce functionality. 51 | // 52 | // Topic: Note for non-jQuery users 53 | // 54 | // jQuery isn't actually required for this plugin, because nothing internal 55 | // uses any jQuery methods or properties. jQuery is just used as a namespace 56 | // under which these methods can exist. 57 | // 58 | // Since jQuery isn't actually required for this plugin, if jQuery doesn't exist 59 | // when this plugin is loaded, the method described below will be created in 60 | // the `Cowboy` namespace. Usage will be exactly the same, but instead of 61 | // $.method() or jQuery.method(), you'll need to use Cowboy.method(). 62 | 63 | (function(window,undefined){ 64 | '$:nomunge'; // Used by YUI compressor. 65 | 66 | // Since jQuery really isn't required for this plugin, use `jQuery` as the 67 | // namespace only if it already exists, otherwise use the `Cowboy` namespace, 68 | // creating it if necessary. 69 | var $ = window.jQuery || window.Cowboy || ( window.Cowboy = {} ), 70 | 71 | // Internal method reference. 72 | jq_throttle; 73 | 74 | // Method: jQuery.throttle 75 | // 76 | // Throttle execution of a function. Especially useful for rate limiting 77 | // execution of handlers on events like resize and scroll. If you want to 78 | // rate-limit execution of a function to a single time, see the 79 | // method. 80 | // 81 | // In this visualization, | is a throttled-function call and X is the actual 82 | // callback execution: 83 | // 84 | // > Throttled with `no_trailing` specified as false or unspecified: 85 | // > ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| 86 | // > X X X X X X X X X X X X 87 | // > 88 | // > Throttled with `no_trailing` specified as true: 89 | // > ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| 90 | // > X X X X X X X X X X 91 | // 92 | // Usage: 93 | // 94 | // > var throttled = jQuery.throttle( delay, [ no_trailing, ] callback ); 95 | // > 96 | // > jQuery('selector').bind( 'someevent', throttled ); 97 | // > jQuery('selector').unbind( 'someevent', throttled ); 98 | // 99 | // This also works in jQuery 1.4+: 100 | // 101 | // > jQuery('selector').bind( 'someevent', jQuery.throttle( delay, [ no_trailing, ] callback ) ); 102 | // > jQuery('selector').unbind( 'someevent', callback ); 103 | // 104 | // Arguments: 105 | // 106 | // delay - (Number) A zero-or-greater delay in milliseconds. For event 107 | // callbacks, values around 100 or 250 (or even higher) are most useful. 108 | // no_trailing - (Boolean) Optional, defaults to false. If no_trailing is 109 | // true, callback will only execute every `delay` milliseconds while the 110 | // throttled-function is being called. If no_trailing is false or 111 | // unspecified, callback will be executed one final time after the last 112 | // throttled-function call. (After the throttled-function has not been 113 | // called for `delay` milliseconds, the internal counter is reset) 114 | // callback - (Function) A function to be executed after delay milliseconds. 115 | // The `this` context and all arguments are passed through, as-is, to 116 | // `callback` when the throttled-function is executed. 117 | // 118 | // Returns: 119 | // 120 | // (Function) A new, throttled, function. 121 | 122 | $.throttle = jq_throttle = function( delay, no_trailing, callback, debounce_mode ) { 123 | // After wrapper has stopped being called, this timeout ensures that 124 | // `callback` is executed at the proper times in `throttle` and `end` 125 | // debounce modes. 126 | var timeout_id, 127 | 128 | // Keep track of the last time `callback` was executed. 129 | last_exec = 0; 130 | 131 | // `no_trailing` defaults to falsy. 132 | if ( typeof no_trailing !== 'boolean' ) { 133 | debounce_mode = callback; 134 | callback = no_trailing; 135 | no_trailing = undefined; 136 | } 137 | 138 | // The `wrapper` function encapsulates all of the throttling / debouncing 139 | // functionality and when executed will limit the rate at which `callback` 140 | // is executed. 141 | function wrapper() { 142 | var that = this, 143 | elapsed = +new Date() - last_exec, 144 | args = arguments; 145 | 146 | // Execute `callback` and update the `last_exec` timestamp. 147 | function exec() { 148 | last_exec = +new Date(); 149 | callback.apply( that, args ); 150 | }; 151 | 152 | // If `debounce_mode` is true (at_begin) this is used to clear the flag 153 | // to allow future `callback` executions. 154 | function clear() { 155 | timeout_id = undefined; 156 | }; 157 | 158 | if ( debounce_mode && !timeout_id ) { 159 | // Since `wrapper` is being called for the first time and 160 | // `debounce_mode` is true (at_begin), execute `callback`. 161 | exec(); 162 | } 163 | 164 | // Clear any existing timeout. 165 | timeout_id && clearTimeout( timeout_id ); 166 | 167 | if ( debounce_mode === undefined && elapsed > delay ) { 168 | // In throttle mode, if `delay` time has been exceeded, execute 169 | // `callback`. 170 | exec(); 171 | 172 | } else if ( no_trailing !== true ) { 173 | // In trailing throttle mode, since `delay` time has not been 174 | // exceeded, schedule `callback` to execute `delay` ms after most 175 | // recent execution. 176 | // 177 | // If `debounce_mode` is true (at_begin), schedule `clear` to execute 178 | // after `delay` ms. 179 | // 180 | // If `debounce_mode` is false (at end), schedule `callback` to 181 | // execute after `delay` ms. 182 | timeout_id = setTimeout( debounce_mode ? clear : exec, debounce_mode === undefined ? delay - elapsed : delay ); 183 | } 184 | }; 185 | 186 | // Set the guid of `wrapper` function to the same of original callback, so 187 | // it can be removed in jQuery 1.4+ .unbind or .die by using the original 188 | // callback as a reference. 189 | if ( $.guid ) { 190 | wrapper.guid = callback.guid = callback.guid || $.guid++; 191 | } 192 | 193 | // Return the wrapper function. 194 | return wrapper; 195 | }; 196 | 197 | // Method: jQuery.debounce 198 | // 199 | // Debounce execution of a function. Debouncing, unlike throttling, 200 | // guarantees that a function is only executed a single time, either at the 201 | // very beginning of a series of calls, or at the very end. If you want to 202 | // simply rate-limit execution of a function, see the 203 | // method. 204 | // 205 | // In this visualization, | is a debounced-function call and X is the actual 206 | // callback execution: 207 | // 208 | // > Debounced with `at_begin` specified as false or unspecified: 209 | // > ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| 210 | // > X X 211 | // > 212 | // > Debounced with `at_begin` specified as true: 213 | // > ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| 214 | // > X X 215 | // 216 | // Usage: 217 | // 218 | // > var debounced = jQuery.debounce( delay, [ at_begin, ] callback ); 219 | // > 220 | // > jQuery('selector').bind( 'someevent', debounced ); 221 | // > jQuery('selector').unbind( 'someevent', debounced ); 222 | // 223 | // This also works in jQuery 1.4+: 224 | // 225 | // > jQuery('selector').bind( 'someevent', jQuery.debounce( delay, [ at_begin, ] callback ) ); 226 | // > jQuery('selector').unbind( 'someevent', callback ); 227 | // 228 | // Arguments: 229 | // 230 | // delay - (Number) A zero-or-greater delay in milliseconds. For event 231 | // callbacks, values around 100 or 250 (or even higher) are most useful. 232 | // at_begin - (Boolean) Optional, defaults to false. If at_begin is false or 233 | // unspecified, callback will only be executed `delay` milliseconds after 234 | // the last debounced-function call. If at_begin is true, callback will be 235 | // executed only at the first debounced-function call. (After the 236 | // throttled-function has not been called for `delay` milliseconds, the 237 | // internal counter is reset) 238 | // callback - (Function) A function to be executed after delay milliseconds. 239 | // The `this` context and all arguments are passed through, as-is, to 240 | // `callback` when the debounced-function is executed. 241 | // 242 | // Returns: 243 | // 244 | // (Function) A new, debounced, function. 245 | 246 | $.debounce = function( delay, at_begin, callback ) { 247 | return callback === undefined 248 | ? jq_throttle( delay, at_begin, false ) 249 | : jq_throttle( delay, callback, at_begin !== false ); 250 | }; 251 | 252 | })(this); -------------------------------------------------------------------------------- /jquery.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery JavaScript Library v1.6.1 3 | * http://jquery.com/ 4 | * 5 | * Copyright 2011, John Resig 6 | * Dual licensed under the MIT or GPL Version 2 licenses. 7 | * http://jquery.org/license 8 | * 9 | * Includes Sizzle.js 10 | * http://sizzlejs.com/ 11 | * Copyright 2011, The Dojo Foundation 12 | * Released under the MIT, BSD, and GPL Licenses. 13 | * 14 | * Date: Thu May 12 15:04:36 2011 -0400 15 | */ 16 | (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!cj[a]){var b=f("<"+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),c.body.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write("");b=cl.createElement(a),cl.body.appendChild(b),d=f.css(b,"display"),c.body.removeChild(ck)}cj[a]=d}return cj[a]}function cu(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function ct(){cq=b}function cs(){setTimeout(ct,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g=0===c})}function W(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function O(a,b){return(a&&a!=="*"?a+".":"")+b.replace(A,"`").replace(B,"&")}function N(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;ic)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function L(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function F(){return!0}function E(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function H(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(H,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=d.userAgent,x,y,z,A=Object.prototype.toString,B=Object.prototype.hasOwnProperty,C=Array.prototype.push,D=Array.prototype.slice,E=String.prototype.trim,F=Array.prototype.indexOf,G={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.1",length:0,size:function(){return this.length},toArray:function(){return D.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?C.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),y.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(D.apply(this,arguments),"slice",D.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:C,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;y.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!y){y=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",z,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",z),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&H()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):G[A.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!B.call(a,"constructor")&&!B.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||B.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c
a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};f=c.createElement("select"),g=f.appendChild(c.createElement("option")),h=a.getElementsByTagName("input")[0],j={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},h.checked=!0,j.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,j.optDisabled=!g.disabled;try{delete a.test}catch(s){j.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function b(){j.noCloneEvent=!1,a.detachEvent("onclick",b)}),a.cloneNode(!0).fireEvent("onclick")),h=c.createElement("input"),h.value="t",h.setAttribute("type","radio"),j.radioValue=h.value==="t",h.setAttribute("checked","checked"),a.appendChild(h),k=c.createDocumentFragment(),k.appendChild(a.firstChild),j.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",l=c.createElement("body"),m={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};for(q in m)l.style[q]=m[q];l.appendChild(a),b.insertBefore(l,b.firstChild),j.appendChecked=h.checked,j.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,j.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
",j.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
t
",n=a.getElementsByTagName("td"),r=n[0].offsetHeight===0,n[0].style.display="",n[1].style.display="none",j.reliableHiddenOffsets=r&&n[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(i=c.createElement("div"),i.style.width="0",i.style.marginRight="0",a.appendChild(i),j.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(i,null)||{marginRight:0}).marginRight,10)||0)===0),l.innerHTML="",b.removeChild(l);if(a.attachEvent)for(q in{submit:1,change:1,focusin:1})p="on"+q,r=p in a,r||(a.setAttribute(p,"return;"),r=typeof a[p]=="function"),j[q+"Bubbles"]=r;return j}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[f.camelCase(c)]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[f.camelCase(c)]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;return(e.value||"").replace(p,"")}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);c=j&&f.attrFix[c]||c,i=f.attrHooks[c],i||(!t.test(c)||typeof d!="boolean"&&d!==b&&d.toLowerCase()!==c.toLowerCase()?v&&(f.nodeName(a,"form")||u.test(c))&&(i=v):i=w);if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j)return i.get(a,c);h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);c=i&&f.propFix[c]||c,h=f.propHooks[c];return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return a[f.propFix[c]||c]?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=b),a.setAttribute(c,c.toLowerCase()));return c}},f.attrHooks.value={get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return a.value},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=b}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var x=Object.prototype.hasOwnProperty,y=/\.(.*)$/,z=/^(?:textarea|input|select)$/i,A=/\./g,B=/ /g,C=/[^\w\s.|`]/g,D=function(a){return a.replace(C,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=E;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=E);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),D).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem 17 | )});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},K=function(c){var d=c.target,e,g;if(!!z.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=J(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:K,beforedeactivate:K,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&K.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&K.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",J(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in I)f.event.add(this,c+".specialChange",I[c]);return z.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return z.test(this.nodeName)}},I=f.event.special.change.filters,I.focus=I.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(h=g;h0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=U.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(W(c[0])||W(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=T.call(arguments);P.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!V[a]?f.unique(e):e,(this.length>1||R.test(d))&&Q.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var Y=/ jQuery\d+="(?:\d+|null)"/g,Z=/^\s+/,$=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,_=/<([\w:]+)/,ba=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Y,""):null;if(typeof a=="string"&&!bc.test(a)&&(f.support.leadingWhitespace||!Z.test(a))&&!bg[(_.exec(a)||["",""])[1].toLowerCase()]){a=a.replace($,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bj(a,d),e=bk(a),g=bk(d);for(h=0;e[h];++h)bj(e[h],g[h])}if(b){bi(a,d);if(c){e=bk(a),g=bk(d);for(h=0;e[h];++h)bi(e[h],g[h])}}return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument|| 18 | b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!bb.test(k))k=b.createTextNode(k);else{k=k.replace($,"<$1>");var l=(_.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=ba.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&Z.test(k)&&o.insertBefore(b.createTextNode(Z.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bp.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bo.test(g)?g.replace(bo,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,c){var d,e,g;c=c.replace(br,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bs.test(d)&&bt.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bE=/%20/g,bF=/\[\]$/,bG=/\r?\n/g,bH=/#.*$/,bI=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bJ=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bK=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bL=/^(?:GET|HEAD)$/,bM=/^\/\//,bN=/\?/,bO=/)<[^<]*)*<\/script>/gi,bP=/^(?:select|textarea)/i,bQ=/\s+/,bR=/([?&])_=[^&]*/,bS=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bT=f.fn.load,bU={},bV={},bW,bX;try{bW=e.href}catch(bY){bW=c.createElement("a"),bW.href="",bW=bW.href}bX=bS.exec(bW.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bT)return bT.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bO,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bP.test(this.nodeName)||bJ.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bG,"\r\n")}}):{name:b.name,value:c.replace(bG,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bW,isLocal:bK.test(bX[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML}},ajaxPrefilter:bZ(bU),ajaxTransport:bZ(bV),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a?4:0;var o,r,u,w=l?ca(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=cb(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bI.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bH,"").replace(bM,bX[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bQ),d.crossDomain==null&&(r=bS.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bX[1]&&r[2]==bX[2]&&(r[3]||(r[1]==="http:"?80:443))==(bX[3]||(bX[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bU,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bL.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bN.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bR,"$1_="+x);d.url=y+(y===d.url?(bN.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", */*; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bV,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){status<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bE,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq,cr=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b
";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){return this[0]?parseFloat(f.css(this[0],d,"padding")):null},f.fn["outer"+c]=function(a){return this[0]?parseFloat(f.css(this[0],d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); -------------------------------------------------------------------------------- /jquery.qnx.core.js: -------------------------------------------------------------------------------- 1 | (function ( $ ) { 2 | 3 | $.qnx = { 4 | version: "0.1" 5 | }; 6 | 7 | $.qnx.getBounds = function ( el, padding ) { 8 | var offset = el.offset(); 9 | 10 | padding = padding || 0; 11 | 12 | return { 13 | top: offset.top - padding, 14 | left: offset.left - padding, 15 | right: offset.left + el.outerWidth() + padding, 16 | bottom: offset.top + el.outerHeight() + padding 17 | }; 18 | }; 19 | 20 | $.qnx.inBounds = function ( bounds, pageX, pageY ) { 21 | return ( pageX >= bounds.left && pageX <= bounds.right && pageY >= bounds.top && pageY <= bounds.bottom ); 22 | }; 23 | 24 | // Only use this in a touchstart handler 25 | $.fn.enableTouchEnter = function ( padding ) { 26 | return this.each( function ( i, el ) { 27 | var $el = $( el ), 28 | bounds = $.qnx.getBounds( $el, padding ), 29 | inside = true; 30 | 31 | $el.bind( "touchmove.qnxtouch", function ( e ) { 32 | e = e.originalEvent; 33 | if ( e.touches && e.touches.length ) { 34 | if ( $.qnx.inBounds( bounds, e.touches[0].pageX, e.touches[0].pageY ) !== inside ) { 35 | inside = !inside; 36 | $el.trigger( "touch" + ( inside ? "enter" : "leave" ) ); 37 | } 38 | } 39 | }); 40 | }); 41 | }; 42 | 43 | $.fn.disableTouchEnter = function () { 44 | return this.each( function ( i, el ) { 45 | $( el ).unbind( "touchmove.qnxtouch" ); 46 | }); 47 | }; 48 | 49 | }( jQuery )); -------------------------------------------------------------------------------- /jquery.ui.widget.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Widget 1.8.13 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Widget 9 | */ 10 | (function( $, undefined ) { 11 | 12 | // jQuery 1.4+ 13 | if ( $.cleanData ) { 14 | var _cleanData = $.cleanData; 15 | $.cleanData = function( elems ) { 16 | for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { 17 | $( elem ).triggerHandler( "remove" ); 18 | } 19 | _cleanData( elems ); 20 | }; 21 | } else { 22 | var _remove = $.fn.remove; 23 | $.fn.remove = function( selector, keepData ) { 24 | return this.each(function() { 25 | if ( !keepData ) { 26 | if ( !selector || $.filter( selector, [ this ] ).length ) { 27 | $( "*", this ).add( [ this ] ).each(function() { 28 | $( this ).triggerHandler( "remove" ); 29 | }); 30 | } 31 | } 32 | return _remove.call( $(this), selector, keepData ); 33 | }); 34 | }; 35 | } 36 | 37 | $.widget = function( name, base, prototype ) { 38 | var namespace = name.split( "." )[ 0 ], 39 | fullName; 40 | name = name.split( "." )[ 1 ]; 41 | fullName = namespace + "-" + name; 42 | 43 | if ( !prototype ) { 44 | prototype = base; 45 | base = $.Widget; 46 | } 47 | 48 | // create selector for plugin 49 | $.expr[ ":" ][ fullName ] = function( elem ) { 50 | return !!$.data( elem, name ); 51 | }; 52 | 53 | $[ namespace ] = $[ namespace ] || {}; 54 | $[ namespace ][ name ] = function( options, element ) { 55 | // allow instantiation without initializing for simple inheritance 56 | if ( arguments.length ) { 57 | this._createWidget( options, element ); 58 | } 59 | }; 60 | 61 | var basePrototype = new base(); 62 | // we need to make the options hash a property directly on the new instance 63 | // otherwise we'll modify the options hash on the prototype that we're 64 | // inheriting from 65 | // $.each( basePrototype, function( key, val ) { 66 | // if ( $.isPlainObject(val) ) { 67 | // basePrototype[ key ] = $.extend( {}, val ); 68 | // } 69 | // }); 70 | basePrototype.options = $.extend( true, {}, basePrototype.options ); 71 | $[ namespace ][ name ].prototype = $.extend( true, basePrototype, { 72 | namespace: namespace, 73 | widgetName: name, 74 | widgetEventPrefix: $[ namespace ][ name ].prototype.widgetEventPrefix || name, 75 | widgetBaseClass: fullName 76 | }, prototype ); 77 | 78 | $.widget.bridge( name, $[ namespace ][ name ] ); 79 | }; 80 | 81 | $.widget.bridge = function( name, object ) { 82 | $.fn[ name ] = function( options ) { 83 | var isMethodCall = typeof options === "string", 84 | args = Array.prototype.slice.call( arguments, 1 ), 85 | returnValue = this; 86 | 87 | // allow multiple hashes to be passed on init 88 | options = !isMethodCall && args.length ? 89 | $.extend.apply( null, [ true, options ].concat(args) ) : 90 | options; 91 | 92 | // prevent calls to internal methods 93 | if ( isMethodCall && options.charAt( 0 ) === "_" ) { 94 | return returnValue; 95 | } 96 | 97 | if ( isMethodCall ) { 98 | this.each(function() { 99 | var instance = $.data( this, name ), 100 | methodValue = instance && $.isFunction( instance[options] ) ? 101 | instance[ options ].apply( instance, args ) : 102 | instance; 103 | // TODO: add this back in 1.9 and use $.error() (see #5972) 104 | // if ( !instance ) { 105 | // throw "cannot call methods on " + name + " prior to initialization; " + 106 | // "attempted to call method '" + options + "'"; 107 | // } 108 | // if ( !$.isFunction( instance[options] ) ) { 109 | // throw "no such method '" + options + "' for " + name + " widget instance"; 110 | // } 111 | // var methodValue = instance[ options ].apply( instance, args ); 112 | if ( methodValue !== instance && methodValue !== undefined ) { 113 | returnValue = methodValue; 114 | return false; 115 | } 116 | }); 117 | } else { 118 | this.each(function() { 119 | var instance = $.data( this, name ); 120 | if ( instance ) { 121 | instance.option( options || {} )._init(); 122 | } else { 123 | $.data( this, name, new object( options, this ) ); 124 | } 125 | }); 126 | } 127 | 128 | return returnValue; 129 | }; 130 | }; 131 | 132 | $.Widget = function( options, element ) { 133 | // allow instantiation without initializing for simple inheritance 134 | if ( arguments.length ) { 135 | this._createWidget( options, element ); 136 | } 137 | }; 138 | 139 | $.Widget.prototype = { 140 | widgetName: "widget", 141 | widgetEventPrefix: "", 142 | options: { 143 | disabled: false 144 | }, 145 | _createWidget: function( options, element ) { 146 | // $.widget.bridge stores the plugin instance, but we do it anyway 147 | // so that it's stored even before the _create function runs 148 | $.data( element, this.widgetName, this ); 149 | this.element = $( element ); 150 | this.options = $.extend( true, {}, 151 | this.options, 152 | this._getCreateOptions(), 153 | options ); 154 | 155 | var self = this; 156 | this.element.bind( "remove." + this.widgetName, function() { 157 | self.destroy(); 158 | }); 159 | 160 | this._create(); 161 | this._trigger( "create" ); 162 | this._init(); 163 | }, 164 | _getCreateOptions: function() { 165 | return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ]; 166 | }, 167 | _create: function() {}, 168 | _init: function() {}, 169 | 170 | destroy: function() { 171 | this.element 172 | .unbind( "." + this.widgetName ) 173 | .removeData( this.widgetName ); 174 | this.widget() 175 | .unbind( "." + this.widgetName ) 176 | .removeAttr( "aria-disabled" ) 177 | .removeClass( 178 | this.widgetBaseClass + "-disabled " + 179 | "ui-state-disabled" ); 180 | }, 181 | 182 | widget: function() { 183 | return this.element; 184 | }, 185 | 186 | option: function( key, value ) { 187 | var options = key; 188 | 189 | if ( arguments.length === 0 ) { 190 | // don't return a reference to the internal hash 191 | return $.extend( {}, this.options ); 192 | } 193 | 194 | if (typeof key === "string" ) { 195 | if ( value === undefined ) { 196 | return this.options[ key ]; 197 | } 198 | options = {}; 199 | options[ key ] = value; 200 | } 201 | 202 | this._setOptions( options ); 203 | 204 | return this; 205 | }, 206 | _setOptions: function( options ) { 207 | var self = this; 208 | $.each( options, function( key, value ) { 209 | self._setOption( key, value ); 210 | }); 211 | 212 | return this; 213 | }, 214 | _setOption: function( key, value ) { 215 | this.options[ key ] = value; 216 | 217 | if ( key === "disabled" ) { 218 | this.widget() 219 | [ value ? "addClass" : "removeClass"]( 220 | this.widgetBaseClass + "-disabled" + " " + 221 | "ui-state-disabled" ) 222 | .attr( "aria-disabled", value ); 223 | } 224 | 225 | return this; 226 | }, 227 | 228 | enable: function() { 229 | return this._setOption( "disabled", false ); 230 | }, 231 | disable: function() { 232 | return this._setOption( "disabled", true ); 233 | }, 234 | 235 | _trigger: function( type, event, data ) { 236 | var callback = this.options[ type ]; 237 | 238 | event = $.Event( event ); 239 | event.type = ( type === this.widgetEventPrefix ? 240 | type : 241 | this.widgetEventPrefix + type ).toLowerCase(); 242 | data = data || {}; 243 | 244 | // copy original event properties over to the new event 245 | // this would happen if we could call $.event.fix instead of $.Event 246 | // but we don't have a way to force an event to be fixed multiple times 247 | if ( event.originalEvent ) { 248 | for ( var i = $.event.props.length, prop; i; ) { 249 | prop = $.event.props[ --i ]; 250 | event[ prop ] = event.originalEvent[ prop ]; 251 | } 252 | } 253 | 254 | this.element.trigger( event, data ); 255 | 256 | return !( $.isFunction(callback) && 257 | callback.call( this.element[0], event, data ) === false || 258 | event.isDefaultPrevented() ); 259 | } 260 | }; 261 | 262 | })( jQuery ); -------------------------------------------------------------------------------- /newstyles.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | untitled 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | 33 |
34 |
35 |
36 |
37 |
38 | foo 39 | bar 40 | womble 41 |
42 |
43 |
44 | 45 |
46 | 47 | 48 |
49 | 50 |
51 |
52 | bar 53 | bar 54 | bar 55 |
56 |
57 | 58 | 59 |
60 |
61 |
62 |
63 | 64 |
65 |
    66 |
  • foo
  • 67 |
  • bar
  • 68 |
  • womble
  • 69 |
  • womble
  • 70 |
  • womble
  • 71 |
  • womble
  • 72 |
73 |
74 |
75 |
    76 |
  • foo
  • 77 |
  • bar
  • 78 |
  • womble
  • 79 |
  • womble
  • 80 |
  • womble
  • 81 |
  • womble
  • 82 |
83 |
84 |
85 |
    86 |
  • foo
  • 87 |
  • bar
  • 88 |
  • womble
  • 89 |
  • womble
  • 90 |
  • womble
  • 91 |
  • womble
  • 92 |
93 |
94 |
95 |

96 |

97 |
98 |
99 | 100 | 101 | 102 |
103 |
104 |
105 | 133 | 134 | -------------------------------------------------------------------------------- /qnxbuttons.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #c7c7cf; 3 | 4 | } 5 | 6 | .qnxform .hidden, .qnxform .qnxselectdropdown.hidden { 7 | display: none; 8 | } 9 | 10 | .qnxform .relative { 11 | position: relative; 12 | } 13 | 14 | .qnxform, .qnxform input, .qnxform button, .qnxform select { 15 | font-family: "Myriad Pro"; 16 | font-size: 21px; 17 | } 18 | 19 | .qnxform label { 20 | line-height: 45px; 21 | height: 45px; 22 | display: inline-block; 23 | margin-right: 10px; 24 | } 25 | 26 | .qnxform button, 27 | .qnxform input[type="submit"], 28 | .qnxform input[type="button"], 29 | .qnxform .qnxselectinner, 30 | .qnxform .qnxoptiongroupinner, 31 | .qnxform .qnxoptionholder.active .qnxoption, 32 | .qnxform .qnxspinnercontrollerinner 33 | { 34 | 35 | -webkit-border-radius: 5px; 36 | background-image: -webkit-gradient( 37 | linear, 38 | left bottom, 39 | left top, 40 | color-stop(0, rgb(209,210,212)), 41 | color-stop(1, rgb(252,252,252)) 42 | ); 43 | border: 1px rgba(255,255,255,0.5) solid; 44 | margin: 0; 45 | height: 38px; 46 | line-height: 41px; 47 | } 48 | 49 | .qnxform button, 50 | .qnxform input[type="submit"], 51 | .qnxform input[type="button"], 52 | .qnxform .qnxselectinner 53 | { 54 | padding: 0 35px; 55 | } 56 | 57 | .qnxform button[disabled], 58 | .qnxform input[type="submit"][disabled], 59 | .qnxform input[type="button"][disabled], 60 | .qnxform .qnxselectholder.disabled .qnxselectinner 61 | { 62 | color: #b0b0b0; 63 | -webkit-box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.2); 64 | background: #ebebeb; 65 | border: none; 66 | } 67 | 68 | .qnxform .qnxbuttonholder.disabled, 69 | .qnxform .qnxselectholder.disabled 70 | { 71 | display: inline-block; 72 | -webkit-border-radius: 5px; 73 | border: 1px rgba(0, 0, 0, 0.1) solid; 74 | max-width: 500px; 75 | -webkit-box-shadow: 1px 1px 0px rgba(255,255,255,0.2); 76 | } 77 | 78 | .qnxform .qnxbuttonholder.active button, 79 | .qnxform .qnxbuttonholder.active input[type="submit"], 80 | .qnxform .qnxbuttonholder.active input[type="button"], 81 | .qnxform .qnxselectholder.down .qnxselectinner, 82 | .qnxform .qnxselectholder.active .qnxselectinner, 83 | .qnxform .qnxoptionholder.active .qnxoption 84 | { 85 | background-image: -webkit-gradient( 86 | linear, 87 | left bottom, 88 | left top, 89 | color-stop(1, rgb(0,184,253)), 90 | color-stop(0, rgb(0,130,228)) 91 | ); 92 | border: 1px #2ccfff solid; 93 | color: #fff; 94 | } 95 | 96 | .qnxform .qnxbuttonholder.active, 97 | .qnxform .qnxselectholder.active, 98 | .qnxform .qnxoptionholder.active .qnxoption 99 | { 100 | border: 1px #295b9a solid; 101 | } 102 | 103 | .qnxform .qnxbuttonholder, 104 | .qnxform .qnxselectholder, 105 | .qnxform .qnxoptiongroupholder, 106 | .qnxform .qnxspinnerholder .qnxspinnercontroller 107 | { 108 | display: inline-block; 109 | -webkit-border-radius: 5px; 110 | border: 1px rgba(0,0,0,0.5) solid; 111 | -webkit-box-shadow: 1px 1px 1px rgba(0,0,0,0.1); 112 | max-width: 500px; 113 | } 114 | 115 | .qnxform .qnxtextfieldholder 116 | { 117 | background: #fff; 118 | -webkit-border-radius: 5px; 119 | border: 1px rgba(0,0,0,0.5) solid; 120 | display: inline-block; 121 | outline-bottom: 1px #fff solid; 122 | -webkit-box-shadow: 1px 1px 0px rgba(255,255,255,1); 123 | height: 34px; 124 | position: relative; 125 | } 126 | 127 | .qnxform .qnxtextfieldholder input 128 | { 129 | -webkit-box-shadow:inset 1px 1px 2px rgba(0,0,0,0.2); 130 | background: transparent; 131 | outline: none; 132 | border: 0; 133 | margin: 0; 134 | padding: 0 30px 0 10px; 135 | height: 32px; 136 | line-height: 38px; 137 | } 138 | 139 | .qnxform .qnxtextfieldholder.focused 140 | { 141 | -webkit-box-shadow: 0 0 6px #0096ff; 142 | border: 1px #366889 solid; 143 | } 144 | 145 | .qnxform .qnxtextfieldholder div.closecross 146 | { 147 | display: none; 148 | } 149 | .qnxform .qnxtextfieldholder.focused div.closecross 150 | { 151 | display: block; 152 | position: absolute; 153 | z-index: 3; 154 | right: 10px; 155 | top: 9px; 156 | width: 16px; 157 | height: 17px; 158 | background: url(images/cross.png); 159 | } 160 | 161 | .qnxform > div { 162 | margin-bottom: 10px; 163 | } 164 | 165 | .qnxform .qnxtoggle 166 | { 167 | -webkit-box-shadow:inset 1px 1px 3px rgba(0,0,0,0.3); 168 | -webkit-border-radius: 5px; 169 | border: 1px #363636 solid; 170 | display: inline-block; 171 | background: #e1e1e1; 172 | position: relative; 173 | top: 15px; 174 | } 175 | 176 | .qnxform .qnxtoggle .onlabel, 177 | .qnxform .qnxtoggle .offlabel 178 | { 179 | display: block; 180 | width: 80px; 181 | float: left; 182 | height: 38px; 183 | line-height: 45px; 184 | text-align: center; 185 | } 186 | 187 | .qnxform .qnxtoggle .slider 188 | { 189 | height: 36px; 190 | border: 1px #fff solid; 191 | -webkit-border-radius: 4px; 192 | background-image: -webkit-gradient( 193 | linear, 194 | left bottom, 195 | left top, 196 | color-stop(0, rgb(209,210,212)), 197 | color-stop(1, rgb(252,252,252)) 198 | ); 199 | width: 80px; 200 | -webkit-box-shadow: 0 0 3px #000; 201 | position: absolute; 202 | left: 0; 203 | top: 0; 204 | -webkit-transform-style: preserve-3d; 205 | -webkit-transition-property: -webkit-transform; 206 | -webkit-transition-duration: 350ms; 207 | -webkit-transition-timing-function: ease-in; 208 | } 209 | 210 | .qnxform .qnxtoggle.blue 211 | { 212 | background-image: -webkit-gradient( 213 | linear, 214 | left bottom, 215 | left top, 216 | color-stop(1, rgb(6,168,233)), 217 | color-stop(0, rgb(0,113,199)) 218 | ); 219 | } 220 | 221 | .qnxform .qnxtoggle.blue .onlabel 222 | { 223 | color: #fff; 224 | } 225 | 226 | .qnxform .qnxtoggle.off .slider 227 | { 228 | -webkit-transform: translate3d(0,0,0); 229 | } 230 | .qnxform .qnxtoggle.on .slider 231 | { 232 | -webkit-transform: translate3d(78px,0,0); 233 | } 234 | 235 | .qnxform .qnxcheckbox 236 | { 237 | width: 18px; 238 | height: 18px; 239 | -webkit-border-radius: 4px; 240 | border: 1px #f0f0f0 solid; 241 | background-image: -webkit-gradient( 242 | linear, 243 | left bottom, 244 | left top, 245 | color-stop(0, rgb(209,210,212)), 246 | color-stop(1, rgb(252,252,252)) 247 | ); 248 | } 249 | 250 | .qnxform .qnxcheckboxholder 251 | { 252 | border: 1px rgba(0,0,0,0.5) solid; 253 | -webkit-box-shadow: 1px 1px 1px rgba(0,0,0,0.1); 254 | -webkit-border-radius: 5px; 255 | width: 20px; 256 | height: 20px; 257 | display: inline-block; 258 | position: relative; 259 | } 260 | 261 | .qnxform .qnxcheckboxholder.active .qnxcheckbox { 262 | border: 1px #29c5ff solid; 263 | background-image: -webkit-gradient( 264 | linear, 265 | left bottom, 266 | left top, 267 | color-stop(0, #0c7ed7), 268 | color-stop(1, #00bdff) 269 | ); 270 | } 271 | 272 | .qnxform .qnxcheckboxholder .check 273 | { 274 | width: 7px; 275 | height: 19px; 276 | border-left: 3px #000 solid; 277 | border-top: 3px #000 solid; 278 | -webkit-box-shadow: -1px -1px 1px rgba(0,0,0,0.3); 279 | -webkit-transform: rotate(-135deg); 280 | position: absolute; 281 | top: -7px; 282 | left: 8px; 283 | } 284 | 285 | .qnxform .qnxcheckboxholder.active .check { 286 | border-left: 3px #fff solid; 287 | border-top: 3px #fff solid; 288 | -webkit-box-shadow: none; 289 | } 290 | 291 | .qnxform .qnxselectholder .arrowholder .arrow 292 | { 293 | width: 11px; 294 | height: 11px; 295 | background: #fff; 296 | -webkit-border-radius: 2px; 297 | -webkit-border-bottom-right-radius: 0; 298 | -webkit-transform: rotate(45deg); 299 | position: relative; 300 | bottom: 4px; 301 | left: 2px; 302 | } 303 | 304 | .qnxform .qnxselectholder.disabled .arrowholder .arrow { 305 | background: #666867; 306 | } 307 | 308 | .qnxform .qnxselectholder.down .arrowholder .arrow 309 | { 310 | width: 11px; 311 | height: 11px; 312 | background: #fff; 313 | -webkit-border-radius: 2px; 314 | -webkit-border-top-left-radius: 0; 315 | -webkit-transform: rotate(45deg); 316 | position: relative; 317 | bottom: -2px; 318 | left: 2px; 319 | } 320 | 321 | .qnxform .qnxselectholder.down .arrowholder { 322 | top: 14px; 323 | } 324 | 325 | .qnxform .qnxselectholder 326 | { 327 | position: relative; 328 | padding-right: 40px; 329 | z-index: 2; 330 | } 331 | 332 | 333 | .qnxform .qnxselectholder.down { 334 | z-index: 5; 335 | } 336 | 337 | .qnxform .arrowholder 338 | { 339 | text-align: center; 340 | width: 15px; 341 | height: 9px; 342 | overflow: hidden; 343 | display: inline-block; 344 | position: absolute; 345 | top: 16px; 346 | right: 12px; 347 | } 348 | 349 | .qnxform .qnxselectholder .qnxselectinner 350 | { 351 | line-height: 45px; 352 | border-right: none; 353 | border-top-right-radius: 0; 354 | border-bottom-right-radius: 0; 355 | white-space: nowrap; 356 | overflow: hidden; 357 | text-overflow: ellipsis; 358 | } 359 | 360 | .qnxform .qnxselectright 361 | { 362 | height: 38px; 363 | width: 41px; 364 | position: absolute; 365 | right: 0; 366 | top: 0; 367 | background-image: -webkit-gradient( 368 | linear, 369 | left bottom, 370 | left top, 371 | color-stop(0, rgb(161,165,168)), 372 | color-stop(1, rgb(201,200,205)) 373 | ); 374 | border: 1px #ccc solid; 375 | border-left: none; 376 | -webkit-border-top-right-radius: 4px; 377 | -webkit-border-bottom-right-radius: 4px; 378 | } 379 | 380 | .qnxform .qnxselectholder.disabled .qnxselectright { 381 | background: #bdbec0; 382 | border: none; 383 | -webkit-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.1); 384 | } 385 | 386 | .qnxform .qnxselectholder.active .qnxselectright, 387 | .qnxform .qnxselectholder.down .qnxselectright 388 | { 389 | background-image: -webkit-gradient( 390 | linear, 391 | left bottom, 392 | left top, 393 | color-stop(0, rgb(16,101,168)), 394 | color-stop(1, rgb(5,141,217)) 395 | ); 396 | border: 1px #149ce8 solid; 397 | border-left: none; 398 | } 399 | 400 | .qnxform .qnxselectdropdown 401 | { 402 | position: absolute; 403 | top: 39px; 404 | left: 0; 405 | margin-top: -3px; 406 | z-index: 4; 407 | display: inline-block; 408 | -webkit-border-bottom-left-radius: 5px; 409 | -webkit-border-bottom-right-radius: 5px; 410 | border: 1px rgba(0,0,0,0.5) solid; 411 | border-top: none; 412 | -webkit-box-shadow: 1px 1px 1px rgba(0,0,0,0.1); 413 | } 414 | 415 | .qnxform .qnxselectdropdown ul 416 | { 417 | display: inline-block; 418 | list-style-type: none; 419 | -webkit-border-bottom-left-radius: 4px; 420 | -webkit-border-bottom-right-radius: 4px; 421 | background: #f3f3f3; 422 | border: 1px rgba(255,255,255,0.5) solid; 423 | border-top: none; 424 | margin: 0; 425 | padding: 5px 1px 1px 1px; 426 | max-width: 535px; 427 | } 428 | 429 | .qnxform .qnxselectdropdown ul li { 430 | height: 45px; 431 | line-height: 50px; 432 | padding: 0 35px; 433 | white-space: nowrap; 434 | overflow: hidden; 435 | text-overflow: ellipsis; 436 | } 437 | 438 | .qnxform .qnxselectdropdown ul li.active 439 | { 440 | background-image: -webkit-gradient( 441 | linear, 442 | left bottom, 443 | left top, 444 | color-stop(0, rgb(27,100,211)), 445 | color-stop(1, rgb(2,141,246)) 446 | ); 447 | color: #fff; 448 | } 449 | 450 | .qnxform .qnxoptiongroupholder 451 | { 452 | height: 40px; 453 | padding-right: -3px; 454 | } 455 | 456 | .qnxform .qnxoptiongroupinner:after 457 | { 458 | content: "."; 459 | display: block; 460 | clear: both; 461 | visibility: hidden; 462 | line-height: 0; 463 | height: 0; 464 | } 465 | 466 | .qnxform .qnxoptiongroupholder 467 | { 468 | max-width: 1024px; 469 | } 470 | .qnxform .qnxoptiongroupinner 471 | { 472 | display: inline-block; 473 | } 474 | 475 | .qnxform .qnxoptiongroupinner .qnxoption 476 | { 477 | display: inline-block; 478 | padding: 0 35px; 479 | } 480 | .qnxform .qnxoptiongroupinner .qnxoptionholder.active .qnxoption 481 | { 482 | padding: 0 34px; 483 | } 484 | 485 | .qnxform .qnxoptiongroupinner .qnxoptionholder, 486 | .qnxform .qnxspinnerinner .qnxspinnersection 487 | { 488 | display: inline-block; 489 | float: left; 490 | margin-right: 0px; 491 | line-height: 45px; 492 | } 493 | 494 | .qnxform .qnxoptiongroupinner .qnxoptionholder.active .qnxoption 495 | { 496 | height: 40px; 497 | line-height: 47px; 498 | 499 | } 500 | 501 | .qnxform .qnxoptiongroupinner .qnxoptionholder.active 502 | { 503 | position: relative; 504 | bottom: 2px; 505 | left: -2px; 506 | } 507 | 508 | .qnxform .qnxoptiongroupinner .qnxoptionholder:last-child 509 | { 510 | margin-right: -4px; 511 | } 512 | 513 | .qnxform .qnxspinnerholder { 514 | position: relative; 515 | } 516 | 517 | .qnxform .qnxspinnerholder span.qnxspinneritem { 518 | display: inline-block; 519 | text-align: center; 520 | } 521 | .qnxform .qnxspinnerholder .qnxspinnershim { 522 | position: absolute; 523 | top: 0px; 524 | z-index: 3; 525 | } 526 | .qnxform .qnxspinnerholder.active .qnxspinnershim { 527 | -webkit-border-radius: 5px; 528 | border: 1px rgba(0,0,0,0.5) solid; 529 | max-width: 500px; 530 | } 531 | .qnxform .qnxspinnerholder.active .qnxspinnercontroller { 532 | visibility: hidden; 533 | } 534 | .qnxform .qnxspinnerholder.active .qnxspinnershiminner { 535 | 536 | -webkit-box-shadow: inset 0px 0px 9px #fff; 537 | border: 1px #fff solid; 538 | -webkit-border-radius: 4px; 539 | } 540 | 541 | 542 | .qnxform .qnxspinnerholder ul 543 | { 544 | margin: 0; 545 | padding: 10px 35px; 546 | list-style-type: none; 547 | line-height: 40px; 548 | border: 1px #656668 solid; 549 | -webkit-border-radius: 3px; 550 | text-align: center; 551 | } 552 | .qnxform .qnxspinnerholder ul li { 553 | height: 40px; 554 | line-height: 22px; 555 | } 556 | 557 | .qnxform .qnxspinnerholder .qnxspinnerlistholder { 558 | display: none; 559 | } 560 | .qnxform .qnxspinnerholder.active .qnxspinnerlistholder { 561 | display: block; 562 | } 563 | .qnxform .qnxspinnerholder .qnxspinnerlistholder 564 | { 565 | z-index: 1; 566 | position: absolute; 567 | top: -38px; 568 | -webkit-border-radius: 4px; 569 | margin-left: 5px; 570 | border: 1px #fff solid; 571 | background-image: -webkit-gradient( 572 | linear, 573 | left bottom, 574 | left top, 575 | color-stop(0, #a3a8ae), 576 | color-stop(0.2, #e4e7ec), 577 | color-stop(0.5, rgb(255,255,255)), 578 | color-stop(0.8, #e4e7ec), 579 | color-stop(1, #a3a8ae) 580 | ); 581 | 582 | -webkit-box-shadow: inset 0px 0px 7px #717479; 583 | height: 120px; 584 | overflow: auto; 585 | } 586 | 587 | .qnxform .activityindicator { 588 | width: 34px; 589 | height: 34px; 590 | background: url(images/activity.png); 591 | } 592 | 593 | .qnxform .qnxslider .qnxsliderleft { 594 | background: #0ea6f2; 595 | height: 2px; 596 | border-top: 1px rgba(0,0,0,0.2) solid; 597 | border-bottom: 1px rgba(0,0,0,0.4) solid; 598 | border-left: 1px rgba(20,174,248, 0.7) solid; 599 | -webkit-box-shadow: -1px 0px 1px rgba(255,255,255,0.2); 600 | display: inline-block; 601 | position: relative; 602 | } 603 | 604 | .qnxform .qnxsliderright { 605 | background: #87888c; 606 | height: 2px; 607 | border-top: 1px #6b6b6d solid; 608 | border-bottom: 1px #6b6b6d solid; 609 | -webkit-box-shadow: 1px 0px 1px rgba(255,255,255,0.2); 610 | display: inline-block; 611 | position: relative; 612 | } 613 | .qnxform .qnxslider { 614 | position: relative; 615 | } 616 | input[type="range"]{ 617 | -webkit-appearance:none !important; 618 | background:transparent; 619 | position: absolute; 620 | left: 0; 621 | top: -7px; 622 | left: 1px; 623 | } 624 | input[type="range"]:active::-webkit-slider-thumb { 625 | -webkit-appearance:none !important; 626 | height: 17px; 627 | border-top: 1px #41a2e7 solid; 628 | border-left: 1px #41a2e7 solid; 629 | border-right: 1px #41a2e7 solid; 630 | border-bottom: 2px #3f648e solid; 631 | -webkit-box-shadow: 0px 1px 4px rgba(0,0,0,0.5); 632 | background-image: -webkit-gradient( 633 | linear, 634 | left bottom, 635 | left top, 636 | color-stop(1, #0064b3), 637 | color-stop(0.7, #0075bd), 638 | color-stop(0.6, #0075bd), 639 | color-stop(0.4, #0075bd), 640 | color-stop(0, #00a9f7) 641 | ); 642 | 643 | } 644 | 645 | input[type="range"]::-webkit-slider-thumb { 646 | -webkit-appearance:none !important; 647 | position: relative; 648 | z-index: 2; 649 | width:44px; 650 | height: 16px; 651 | border-top: 1px #f4f4f6 solid; 652 | border-left: 1px #dadadc solid; 653 | border-right: 1px #dadadc solid; 654 | border-bottom: 1px #a8a8aa solid; 655 | -webkit-border-top-left-radius: 4px; 656 | -webkit-border-top-right-radius: 4px; 657 | -webkit-border-bottom-left-radius: 5px; 658 | -webkit-border-bottom-right-radius: 5px; 659 | -webkit-box-shadow: 0px 1px 4px rgba(0,0,0,0.5); 660 | background-image: -webkit-gradient( 661 | linear, 662 | left bottom, 663 | left top, 664 | color-stop(1, #c1c1c3), 665 | color-stop(0.8, #d3d3d3), 666 | color-stop(0.6, #d3d3d3), 667 | color-stop(0.4, #d3d3d3), 668 | color-stop(0, #f7f7f9) 669 | ); 670 | } 671 | .moveleft input[type="range"]::-webkit-slider-thumb { 672 | left: -3px; 673 | } -------------------------------------------------------------------------------- /qnxforms.js: -------------------------------------------------------------------------------- 1 | (function ( $ ){ 2 | 3 | var wrappers = { 4 | toggle: "
ON
OFF
", 5 | checkbox: "
" 6 | }; 7 | 8 | function qnxToggle () { 9 | var toggle = this, 10 | on = toggle.prop( "checked" ), 11 | wrapper = $( wrappers.toggle ); 12 | 13 | wrapper 14 | .toggleClass( "on blue", on ) 15 | .insertAfter( toggle ) 16 | .append( toggle.hide() ) 17 | .bind( "click" , function () { 18 | on = !on; 19 | 20 | wrapper.toggleClass( "on", on ).toggleClass( "off", !on ); 21 | toggle.prop( "checked", on ); 22 | 23 | window.setTimeout( function () { 24 | wrapper.toggleClass( "blue", on ); 25 | }, 350 ); 26 | }); 27 | } 28 | 29 | function qnxCheckbox () { 30 | var checkbox = this, 31 | wrapper = $( wrappers.checkbox ), 32 | on = checkbox.prop( "checked" ), 33 | check = wrapper.find( ".check" ).toggleClass( "hidden", !on ); 34 | 35 | wrapper 36 | .insertAfter( checkbox ) 37 | .append( checkbox.hide() ) 38 | .click( function () { 39 | on = !on; 40 | check.toggleClass( "hidden", !on ); 41 | checkbox.prop( "checked", on ); 42 | }); 43 | } 44 | 45 | 46 | $.fn.qnxwidget = function ( options ) { 47 | return this.each( function ( i, el ) { 48 | var widget = $( el ); 49 | if ( widget.is( "input[type='submit'], input[type='button'], button" ) ) { 50 | widget.button(); 51 | } 52 | 53 | if ( widget.is( "input[type='text'], input[type='email']" ) ) { 54 | widget.textfield(); 55 | } 56 | if ( widget.is( "input[type='range']" ) ) { 57 | widget.slider(); 58 | } 59 | if ( widget.is( "input[type='checkbox'].toggle") ) { 60 | qnxToggle.call( widget ); 61 | } 62 | 63 | if ( widget.is( "input[type='checkbox']:not(.toggle)") ) { 64 | qnxCheckbox.call( widget ); 65 | } 66 | 67 | if ( widget.is( "select" ) ) { 68 | widget.select(); 69 | } 70 | }); 71 | }; 72 | 73 | $.fn.qnxwidget.defaults = { 74 | 75 | }; 76 | 77 | }(jQuery)); 78 | 79 | 80 | $(document).ready(function() { 81 | var qnxelements = $('.qnx'); 82 | qnxelements.qnxwidget(); 83 | }); -------------------------------------------------------------------------------- /widgets/jquery.qnx.button.js: -------------------------------------------------------------------------------- 1 | (function ( $ ) { 2 | 3 | var wrapper = "
"; 4 | 5 | $.widget( "qnx.button", { 6 | options: { 7 | preventScroll: false, 8 | disabled: false 9 | }, 10 | _create: function () { 11 | this.element.wrap( wrapper ); 12 | 13 | this.parent = this.element.parent(); 14 | 15 | if ( this.element.attr( "disabled" ) ) { 16 | this.options.disabled = true; 17 | } 18 | 19 | this._initEvents(); 20 | this.refresh(); 21 | }, 22 | 23 | // Helper function to update the display of the button 24 | _class: function ( down ) { 25 | this.parent.toggleClass( "active", down ); 26 | }, 27 | 28 | _setOption: function( key, value ) { 29 | if ( key === "disabled" ) { 30 | this.options.disabled = value; // Prevent using the Widget factory's default 31 | this.refresh(); 32 | return; 33 | } 34 | 35 | $.Widget.prototype._setOption.apply( this, arguments ); 36 | }, 37 | 38 | _initEvents: function () { 39 | var that = this, bounds, inside = false; 40 | 41 | this.element 42 | // On mouse down, we start listening for enter and leave events 43 | .bind( "touchstart." + this.widgetName + " mousedown." + this.widgetName, $.debounce( 50, true, function ( e ) { 44 | if ( that.options.disabled ) { 45 | return; 46 | } 47 | 48 | if ( that.options.preventScroll ) { 49 | e.preventDefault(); 50 | } 51 | 52 | $( document ).one( "scroll." + this.widgetName, function () { 53 | inside = false; 54 | that._class( false ); 55 | $( document ).trigger( "touchend" ); 56 | }); 57 | 58 | // Update visual display to on 59 | that._class( true ); 60 | inside = true; 61 | 62 | that.element 63 | .bind( "touchenter." + this.widgetName + " mouseenter." + this.widgetName, $.debounce( 50, true, function () { 64 | // User has left the button area, turn it off 65 | that._class( true ); 66 | inside = true; 67 | })) 68 | .bind( "touchleave." + this.widgetName + " mouseleave." + this.widgetName, $.debounce( 50, true, function () { 69 | // User has reentered the button area, turn it on 70 | that._class( false ); 71 | inside = false; 72 | })) 73 | .enableTouchEnter( 10 ); 74 | 75 | 76 | // Regardless of if this button will fire a click event 77 | // we need to be sure to unbind our hover events 78 | $( document ).one( "mouseup." + this.widgetName + " touchend." + this.widgetName, $.debounce( 50, true, function () { 79 | if ( that.options.preventScroll && inside ) { 80 | that.element.trigger( "click" ); 81 | }; 82 | 83 | that._class( false ); 84 | that.element.unbind( 85 | "mouseleave." + this.widgetName + " mouseenter." + this.widgetName + 86 | " touchleave." + this.widgetName + " touchenter." + this.widgetName 87 | ).disableTouchEnter(); 88 | 89 | $( document ).unbind( "scroll." + this.widgetName ); 90 | })); 91 | })); 92 | 93 | }, 94 | 95 | refresh: function () { 96 | this.parent.toggleClass( "disabled", this.options.disabled ); 97 | this.element[ this.options.disabled ? "attr" : "removeAttr"]( "disabled", true ); 98 | }, 99 | 100 | // Runs cleanup. Automatically removes bound events 101 | // that were attached with the correct namespace 102 | destroy: function () { 103 | // Remove the wrapper 104 | this.element.unwrap(); 105 | $.Widget.prototype.destroy.apply( this, arguments ); // Call 'super' 106 | } 107 | }); 108 | 109 | }( jQuery )); -------------------------------------------------------------------------------- /widgets/jquery.qnx.select.js: -------------------------------------------------------------------------------- 1 | (function ( $ ) { 2 | 3 | var wrapper = "
", 4 | select_markup = [ 5 | '
', 6 | '
', 7 | '
', 8 | '
', 9 | '
', 10 | '
', 11 | '
', 12 | '
', 13 | '
'].join( "\n"), 14 | dropdown_markup = [ 15 | ''].join( "\n" ); 18 | 19 | $.widget( "qnx.select", { 20 | options: { 21 | disabled: false 22 | }, 23 | 24 | 25 | select: null, 26 | dropdown: null, 27 | 28 | option_items: null, 29 | option_data: null, 30 | 31 | dropdown_showing: false, 32 | 33 | eventCache: null, 34 | 35 | _create: function () { 36 | this.element.addClass( "hidden" ); 37 | 38 | this.eventCache = {}; 39 | 40 | this.select = $( select_markup ).insertAfter( this.element ); 41 | this.dropdown = $( dropdown_markup ).insertAfter( this.select ); 42 | this.label = $( '' ).appendTo( this.select.find( ".qnxselectinner" ) ); 43 | 44 | if ( this.element.attr( "disabled" ) ) { 45 | this.options.disabled = true; 46 | this.select.addClass( "disabled" ); 47 | } 48 | 49 | this._initEvents(); 50 | this.reloadOptions(); 51 | 52 | // this hack makes the select 'native' 53 | 54 | if ( this.element.hasClass( "selectnative" ) ) { 55 | this.options.selectnative = true; 56 | 57 | this.element.removeClass('hidden'); 58 | this.element.css('position', 'absolute'); 59 | this.element.css('z-index', '3'); 60 | this.element.css('width', ($(this.dropdown).width() + 35) + 'px'); 61 | this.element.css('height', '50px'); 62 | this.element.css('opacity', '0'); 63 | 64 | } 65 | }, 66 | 67 | _class: function ( active ) { 68 | this.select.toggleClass( "active", active ); 69 | }, 70 | 71 | _initEvents: function () { 72 | var that = this, showOnUp = false, inside = false; 73 | 74 | this.select 75 | .bind( "touchstart mousedown", function ( e ){ 76 | if ( that.options.disabled ) { 77 | return; // This control is already disabled 78 | } 79 | if ( that.options.nativeselect) { 80 | that.select.onclick(); 81 | } 82 | bounds = $.qnx.getBounds( that.select ); 83 | 84 | that.select.enableTouchEnter(); 85 | 86 | inside = true; 87 | that._class( true ); 88 | 89 | that.select 90 | .bind( "touchenter mouseenter", $.debounce( 50, true, function ( e ) { 91 | inside = true; 92 | that._class( true ); 93 | })) 94 | .bind( "touchleave mouseleave", $.debounce( 50, true, function ( e ) { 95 | inside = false; 96 | that._class( false ); 97 | })); 98 | 99 | that.select.trigger( "selecttouch" ); 100 | 101 | $( document ) 102 | .one( "touchend mouseup", function ( e ) { 103 | if ( inside ) { 104 | that.select.trigger( "click" ); 105 | } 106 | 107 | inside = false; 108 | 109 | that.select 110 | .unbind( "touchenter touchleave mouseenter mouseleave") 111 | .disableTouchEnter(); 112 | }); 113 | 114 | return false; // Cancel scroll, and stop propagation 115 | }) 116 | .bind( "click", $.debounce( 50, true, function ( e ) { 117 | if ( that.options.disabled ) { 118 | return; 119 | } 120 | if ( that.dropdown_showing && that.eventCache.hide ) { 121 | that.eventCache.hide(); 122 | } else if ( !that.dropdown_showing ) { 123 | that.show(); 124 | } 125 | })); 126 | 127 | 128 | 129 | this.dropdown.delegate( "li", "touchstart mousedown", function ( e ) { 130 | e.stopPropagation(); 131 | }); 132 | 133 | this.dropdown.delegate( "li", "touchend mouseup", function ( e ) { 134 | that.element.selectedIndex = $( this ).index(); 135 | 136 | // make the elements actually change 137 | 138 | $(that.element).find('option').each(function(){ 139 | this.removeAttribute('selected'); 140 | }); 141 | $(that.element).find('option')[$( this ).index()].setAttribute('selected', 'selected'); 142 | $(that.element).prop('value', $(that.element).find('option')[$( this ).index()].value); 143 | that.selectByIndex( $( this ).index() ); 144 | that.select.triggerHandler( "click" ); 145 | that.element.triggerHandler('change'); 146 | }); 147 | 148 | this.element.bind( "change." + this.widgetName, function () { 149 | that.selectByIndex( this.selectedIndex ); 150 | }); 151 | }, 152 | 153 | show: function () { 154 | this.dropdown_showing = true; 155 | 156 | this.option_items 157 | .removeClass( "active" ) 158 | .eq( this.selectedIndex ) 159 | .addClass( "active" ); 160 | 161 | this.dropdown.toggleClass( "hidden", false ); 162 | this.select.toggleClass( "down", true ); 163 | 164 | var that = this; 165 | 166 | this.eventCache.hide = function ( e ) { 167 | if ( e && e.target === that.select[0] ) { 168 | return; // Don't hide on the same control 169 | } 170 | 171 | that.hide(); 172 | $( document ).unbind( "selecttouch touchstart mousedown", that.eventCache.hide ); 173 | that.eventCache.hide = null; 174 | }; 175 | 176 | $( document ).bind( "touchstart mousedown selecttouch", this.eventCache.hide ); 177 | }, 178 | 179 | hide: function () { 180 | this.dropdown.toggleClass( "hidden", true ); 181 | this.select.toggleClass( "down", false ); 182 | this.select.toggleClass( "active", false ); 183 | this.dropdown_showing = false; 184 | }, 185 | 186 | _setOption: function( key, value ) { 187 | if ( key === "disabled" ) { 188 | this.options.disabled = value; // Prevent using the Widget factory's default 189 | this.select.toggleClass( "disabled", value ); 190 | return; 191 | } 192 | 193 | $.Widget.prototype._setOption.apply( this, arguments ); 194 | }, 195 | 196 | 197 | reloadOptions: function () { 198 | var data = [], 199 | selectedIndex = 0, 200 | options = this.element.find( "option" ).map( function ( i, el ) { 201 | var opt = $( el ); 202 | 203 | data.push( { val: opt.val(), label: opt.html() } ); 204 | 205 | if ( opt.is( ":selected" ) ) { 206 | selectedIndex = i; 207 | }; 208 | 209 | return "
  • " + el.innerHTML + "
  • "; 210 | }).get().join(""); 211 | 212 | this.option_data = data; 213 | 214 | 215 | this.dropdown.find( "ul" ).html( options ); 216 | this.option_items = this.dropdown.find( "li" ); 217 | 218 | this.refresh(); 219 | this.selectByIndex( selectedIndex ); 220 | }, 221 | 222 | refresh: function () { 223 | var selectWidth = 0, 224 | ul = this.dropdown.find( "ul" ).css( "width", "" ), 225 | position = this.select.position(); 226 | 227 | this.dropdown.removeClass( "hidden" ); 228 | selectWidth = ul.outerWidth(); 229 | this.dropdown.addClass( "hidden" ); 230 | 231 | ul.css( "width", selectWidth + 35 ); 232 | this.dropdown.css( { 233 | "left": position.left, 234 | "top": position.top + this.select.outerHeight() 235 | }); 236 | this.select.css( "width", selectWidth ); 237 | }, 238 | 239 | selectByIndex: function ( index ) { 240 | var display = this.option_data[ index ] || {} ; 241 | this.label.html( display.label || "" ); 242 | this.selectedIndex = index; 243 | this.element.selectedIndex = index; 244 | }, 245 | 246 | // Runs cleanup. Automatically removes bound events 247 | // that were attached with the correct namespace 248 | destroy: function () { 249 | // Remove the wrapper 250 | this.element.removeClass( "hidden" ); 251 | 252 | this.dropdown.remove(); 253 | this.select.remove(); 254 | 255 | $.Widget.prototype.destroy.apply( this, arguments ); // Call 'super' 256 | } 257 | }); 258 | 259 | }( jQuery )); -------------------------------------------------------------------------------- /widgets/jquery.qnx.slider.js: -------------------------------------------------------------------------------- 1 | (function ( $ ) { 2 | 3 | var wrapper = "
    ", 4 | indicatorleft_markup = '
    ', 5 | indicatorright_markup = '
    '; 6 | 7 | $.widget( "qnx.slider", { 8 | options: { 9 | disabled: false 10 | }, 11 | _create: function () { 12 | var initialvalue = this.element.attr('value'); 13 | this.size = this.element.attr('data-size'); 14 | this.element 15 | .wrap( wrapper ) 16 | .css('width', this.size + 'px'); 17 | this.parent = this.element.parent(); 18 | this.parent 19 | .css('width', this.size + 'px') 20 | .prepend( indicatorleft_markup ) 21 | .append( indicatorright_markup ); 22 | 23 | if ( this.element.attr( "disabled" ) ) { 24 | this.options.disabled = true; 25 | } 26 | 27 | this._initEvents(); 28 | this.refresh(); 29 | }, 30 | 31 | _setMarkers: function() { 32 | var element; 33 | if(this.element == undefined) 34 | {element = $(this)} 35 | else 36 | {element = $(this.element)} 37 | var leftMarkerWidth = Math.floor((element.val() / (element.attr('max') - element.attr('min'))) * element.attr('data-size')), 38 | rightMarkerWidth = element.attr('data-size') - leftMarkerWidth; 39 | element.parent().find('.qnxsliderleft').css('width', leftMarkerWidth - 2 + 'px'); 40 | element.parent().find('.qnxsliderright').css('width', rightMarkerWidth - 2 + 'px'); 41 | if(leftMarkerWidth < 2) { 42 | element.parent().addClass('moveleft'); 43 | } 44 | else { 45 | element.parent().removeClass('moveleft'); 46 | } 47 | }, 48 | 49 | _setOption: function( key, value ) { 50 | if ( key === "disabled" ) { 51 | this.options.disabled = value; // Prevent using the Widget factory's default 52 | this.refresh(); 53 | return; 54 | } 55 | 56 | $.Widget.prototype._setOption.apply( this, arguments ); 57 | }, 58 | 59 | _initEvents: function () { 60 | var that = this; 61 | this.element.bind('change', this._setMarkers); 62 | // stuff comes here 63 | }, 64 | 65 | refresh: function () { 66 | this.parent.toggleClass( "disabled", this.options.disabled ); 67 | this.element[ this.options.disabled ? "attr" : "removeAttr"]( "disabled", true ); 68 | this._setMarkers(); 69 | }, 70 | 71 | // Runs cleanup. Automatically removes bound events 72 | // that were attached with the correct namespace 73 | destroy: function () { 74 | // Remove the wrapper 75 | this.element.unwrap(); 76 | $.Widget.prototype.destroy.apply( this, arguments ); // Call 'super' 77 | } 78 | }); 79 | 80 | }( jQuery )); -------------------------------------------------------------------------------- /widgets/jquery.qnx.textfield.js: -------------------------------------------------------------------------------- 1 | (function ( $ ){ 2 | 3 | var wrapper = "
    "; 4 | 5 | $.widget( "qnx.textfield", { 6 | options: { 7 | showClear: true 8 | }, 9 | 10 | clearButton: null, 11 | 12 | _create: function () { 13 | this.element.wrap( wrapper ); 14 | this.parent = this.element.parent(); 15 | 16 | this._initEvents(); 17 | }, 18 | 19 | _initEvents: function () { 20 | var that = this, focussed = false; 21 | 22 | // Handle clicking on the clear button 23 | this.parent 24 | // We bind on mousedown so focus can remain in the 25 | // textarea when tapped 26 | .delegate( ".closecross", "mousedown", function ( e ) { 27 | that.option( "value", "" ); 28 | return false; // Cancel propagation and default 29 | }); 30 | 31 | this.element 32 | // Add a focused class on focus 33 | .bind( "focus." + this.widgetName, function () { 34 | focused = true; 35 | that.parent.addClass( "focused" ); 36 | }) 37 | 38 | // On blur, wait a split second, then remove the 39 | // focused class 40 | .bind( "blur." + this.widgetName, function () { 41 | focused = false; 42 | window.setTimeout( function () { 43 | // Sanity check in case a focus happens 44 | // within 200 ms of blurring 45 | if ( focused === false ) { 46 | that.parent.removeClass( "focused" ); 47 | } 48 | }, 200 ); 49 | }) 50 | 51 | // Refresh on key up and change 52 | .bind( "keyup." + this.widgetName + " change." + this.widgetName, function () { 53 | that.refresh(); 54 | }); 55 | }, 56 | 57 | _setOption: function ( key, value ) { 58 | $.Widget.prototype._setOption.apply( this, arguments ); 59 | 60 | switch ( key ) { 61 | case "value": 62 | this.element.val( value ); 63 | // falls through to the next item 64 | // so it will refresh 65 | case "showClear": 66 | this.refresh(); 67 | break; 68 | } 69 | }, 70 | 71 | refresh: function () { 72 | // Add clearButton if needed 73 | if ( this.options.showClear && !this.clearButton ) { 74 | this.clearButton = $( "
    " ).appendTo( this.parent ); 75 | } 76 | 77 | // Remove clearButton if needed 78 | if ( !this.options.showClear && this.clearButton ) { 79 | this.clearButton.remove(); 80 | this.clearButton = null; 81 | } 82 | 83 | // Update visual state 84 | if ( this.clearButton ) { 85 | this.clearButton[ this.value() === "" ? "hide" : "show" ](); 86 | } 87 | }, 88 | 89 | value: function () { 90 | return $.trim( this.element.val() ); 91 | }, 92 | 93 | destroy: function () { 94 | this.clearButton.remove(); 95 | this.element.unwrap(); 96 | $.Widget.prototype.destroy.apply( this, arguments ); 97 | } 98 | }); 99 | 100 | }( jQuery )); --------------------------------------------------------------------------------