jQuery Updater - Version 1.6.2

Version Description

  • Updated jQuery to 1.6.2 (minified)
Download this release

Release Info

Developer Ramoonus
Plugin Icon wp plugin jQuery Updater
Version 1.6.2
Comparing to
See all releases

Code changes from version 1.6.1.1.1 to 1.6.2

jquery-updater.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: jQuery updater
4
  Plugin URI: http://www.ramoonus.nl/wordpress/jquery-updater/
5
  Description: This plugin updates jQuery to the latest (stable) version.
6
- Version: 1.6.1.1.1
7
  Author: Ramoonus
8
  Author URI: http://www.ramoonus.nl/
9
  License: GPL2
@@ -15,7 +15,7 @@ function rw_jquery_update() {
15
  if (!is_admin()) { // when not in admin screen
16
  wp_deregister_script('jquery'); // deregister
17
  // wp_register_script( $handle, $src, $deps, $ver, $in_footer );
18
- wp_register_script('jquery', plugins_url('/js/jquery-1.6.2rc1.js', __FILE__), false, '1.6.1.1.1');
19
  wp_enqueue_script('jquery'); // load
20
  }
21
  }
3
  Plugin Name: jQuery updater
4
  Plugin URI: http://www.ramoonus.nl/wordpress/jquery-updater/
5
  Description: This plugin updates jQuery to the latest (stable) version.
6
+ Version: 1.6.2
7
  Author: Ramoonus
8
  Author URI: http://www.ramoonus.nl/
9
  License: GPL2
15
  if (!is_admin()) { // when not in admin screen
16
  wp_deregister_script('jquery'); // deregister
17
  // wp_register_script( $handle, $src, $deps, $ver, $in_footer );
18
+ wp_register_script('jquery', plugins_url('/js/jquery-1.6.2.min.js', __FILE__), false, '1.6.2');
19
  wp_enqueue_script('jquery'); // load
20
  }
21
  }
js/jquery-1.6.1.min.js DELETED
@@ -1,19 +0,0 @@
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("<!doctype><html><body></body></html>");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<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bF.test(a)?d(a,e):b_(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bU,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bQ),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bD(a,b,c){var d=b==="width"?bx:by,e=b==="width"?a.offsetWidth:a.offsetHeight;if(c==="border")return e;f.each(d,function(){c||(e-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?e+=parseFloat(f.css(a,"margin"+this))||0:e-=parseFloat(f.css(a,"border"+this+"Width"))||0});return e}function bn(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bm(a){f.nodeName(a,"input")?bl(a):a.getElementsByTagName&&f.grep(a.getElementsByTagName("input"),bl)}function bl(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bk(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bj(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bi(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bh(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function X(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(S.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=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;i<s.length;i++)g=s[i],g.origType.replace(y,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)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(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)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(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:E?function(a){return a==null?"":E.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?C.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(F)return F.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=D.call(arguments,2),g=function(){return a.apply(c,f.concat(D.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){G["[object "+b+"]"]=b.toLowerCase()}),x=e.uaMatch(w),x.browser&&(e.browser[x.browser]=!0,e.browser.version=x.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?z=function(){c.removeEventListener("DOMContentLoaded",z,!1),e.ready()}:c.attachEvent&&(z=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",z),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g](h)}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?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<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",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="<div style='width:4px;'></div>",j.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",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<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u=/\:/,v,w;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.addClass(a.call(this,b,c.attr("class")||""))});if(a&&typeof a=="string"){var b=(a||"").split(o);for(var c=0,d=this.length;c<d;c++){var e=this[c];if(e.nodeType===1)if(!e.className)e.className=a;else{var g=" "+e.className+" ",h=e.className;for(var i=0,j=b.length;i<j;i++)g.indexOf(" "+b[i]+" ")<0&&(h+=" "+b[i]);e.className=f.trim(h)}}}return this},removeClass:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.removeClass(a.call(this,b,c.attr("class")))});if(a&&typeof a=="string"||a===b){var c=(a||"").split(o);for(var d=0,e=this.length;d<e;d++){var g=this[d];if(g.nodeType===1&&g.className)if(a){var h=(" "+g.className+" ").replace(n," ");for(var i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){var d=f(this);d.toggleClass(a.call(this,c,d.attr("class"),b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(n," ").indexOf(b)>-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<i;h++){var j=e[h];if(j.selected&&(f.support.optDisabled?!j.disabled:j.getAttribute("disabled")===null)&&(!j.parentNode.disabled||!f.nodeName(j.parentNode,"optgroup"))){b=f(j).val();if(g)return b;d.push(b)}}if(g&&!d.length&&e.length)return f(e[c]).val();return d},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=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<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=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<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,O(a.origType,a.selector),f.extend({},a,{handler:N,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,O(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?F:E):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=F;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=F;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=F,this.stopPropagation()},isDefaultPrevented:E,isPropagationStopped:E,isImmediatePropagationStopped:E};var G=function(a){var b=a.relatedTarget;a.type=a.data;try{if(b&&b!==c&&!b.parentNode)return;while(b&&b!==this)b=b.parentNode;b!==this&&f.event.handle.apply(this,arguments)}catch(d){}},H=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?H:G,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?H:G)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=b.type;(c==="submit"||c==="image")&&f(b).closest("form").length&&L("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=b.type;(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&L("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var I,J=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-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;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f.data(this,"lastToggle"+a.guid)||0)%d;f.data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var M={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||E,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=y.exec(h),k="",j&&(k=j[0],h=h.replace(y,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,M[h]?(a.push(M[h]+k),h=h+k):h=(M[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+O(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+O(h,m),e)}return this}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?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;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){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<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\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;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=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 b<c[3]-0},gt:function(a,b,c){return b>c[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<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=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<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){if(a===b){g=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",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 href='#'></a>",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="<p class='TEST'></p>";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="<div class='test e'></div><div class='test'></div>";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;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var P=/Until$/,Q=/^(?:parents|prevUntil|prevAll)/,R=/,/,S=/^.[^:#\[\.,]*$/,T=Array.prototype.slice,U=f.expr.match.POS,V={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(X(this,a,!1),"not",a)},filter:function(a){return this.pushStack(X(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?f.filter(a,this).length>0: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<e;d++)i=a[d],j[i]||(j[i]=U.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-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<e;d++){g=this[d];while(g){if(l?l.index(g)>-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=/<tbody/i,bb=/<|&#?\w+;/,bc=/<(?:script|object|embed|option|style)/i,bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_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<div>","</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></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bh(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bn)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i=b&&b[0]?b[0].ownerDocument||b[0]:c;a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!bc.test(a[0])&&(f.support.checkClone||!bd.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[a[0]]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?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></$2>");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]==="<table>"&&!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<r;i++)bm(k[i]);else bm(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bo=/alpha\([^)]*\)/i,bp=/opacity=([^)]*)/,bq=/-([a-z])/ig,br=/([A-Z]|^ms)/g,bs=/^-?\d+(?:px)?$/i,bt=/^-?\d/,bu=/^[+\-]=/,bv=/[^+\-\.\de]+/g,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB,bC=function(a,b){return b.toUpperCase()};f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0,widows:!0,orphans:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d;if(h==="number"&&isNaN(d)||d==null)return;h==="string"&&bu.test(d)&&(d=+d.replace(bv,"")+parseFloat(f.css(a,c))),h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bq,bC)}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){a.offsetWidth!==0?e=bD(a,b,d):f.swap(a,bw,function(){e=bD(a,b,d)});if(e<=0){e=bz(a,b,b),e==="0px"&&bB&&(e=bB(a,b,b));if(e!=null)return e===""||e==="auto"?"0px":e}if(e<0||e==null){e=a.style[b];return e===""||e==="auto"?"0px":e}return typeof e=="string"?e:e+"px"}},set:function(a,b){if(!bs.test(b))return b;b=parseFloat(b);if(b>=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\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/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("<div>").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<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return this[e.queue===!1?"each":"queue"](function(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(f.support.inlineBlockNeedsLayout?(j=cv(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],cm.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=cn.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[i]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default,d.old=d.complete,d.complete=function(a){d.queue!==!1?f.dequeue(this):a!==!1&&f._unmark(this),f.isFunction(d.old)&&d.old.call(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function h(a){return d.step(a)}var d=this,e=f.fx,g;this.startTime=cq||cs(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,h.elem=this.elem,h()&&f.timers.push(h)&&!co&&(cr?(co=1,g=function(){co&&(cr(g),e.tick())},cr(g)):co=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=cq||cs(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=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<a.length;++b)a[b]()||a.splice(b--,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(co),co=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);f.offset.initialize();var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";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);
19
- jQuery.noConflict();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jquery-1.6.2.min.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * jQuery JavaScript Library v1.6.2
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 Jun 30 14:16:56 2011 -0400
15
+ */
16
+ (function(a,b){function cv(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cs(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cr(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cq(){cn=b}function cp(){setTimeout(cq,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(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<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bZ(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bY(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bC.test(a)?d(a,e):bY(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bY(a+"["+e+"]",b[e],c,d);else d(a,b)}function bX(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bR,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bX(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bX(a,c,d,e,"*",g));return l}function bW(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bN),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bA(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bv:bw;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bx(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bm(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(be,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bl(a){f.nodeName(a,"input")?bk(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bk)}function bk(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bj(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bi(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bh(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bg(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function W(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(R.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(a,b){return(a&&a!=="*"?a+".":"")+b.replace(z,"`").replace(A,"&")}function M(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;i<s.length;i++)g=s[i],g.origType.replace(x,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)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 K(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 E(){return!0}function D(){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 J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,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=/-([a-z])/ig,x=function(a,b){return b.toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};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.2",length:0,size:function(){return this.length},toArray:function(){return F.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)?E.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(),A.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(F.apply(this,arguments),"slice",F.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:E,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(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!A){A=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},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):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||D.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)},camelCase:function(a){return a.replace(w,x)},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(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(H)return H.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g](h)}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?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<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={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:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0},m&&f.extend(p,{position:"absolute",left:-1e3,top:-1e3});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),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[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<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u=/\:|^on/,v,w;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(o);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(o);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(n," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(n," ").indexOf(b)>-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;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}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<i;h++){var j=e[h];if(j.selected&&(f.support.optDisabled?!j.disabled:j.getAttribute("disabled")===null)&&(!j.parentNode.disabled||!f.nodeName(j.parentNode,"optgroup"))){b=f(j).val();if(g)return b;d.push(b)}}if(g&&!d.length&&e.length)return f(e[c]).val();return d},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=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);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=w:v&&c!=="className"&&(f.nodeName(a,"form")||u.test(c))&&(i=v)));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&&(h=i.get(a,c))!==null)return h;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}},value:{get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=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);i&&(c=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 f.prop(a,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]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.attrHooks.title=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=/\.(.*)$/,y=/^(?:textarea|input|select)$/i,z=/\./g,A=/ /g,B=/[^\w\s.|`]/g,C=function(a){return a.replace(B,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=D;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=D);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(),C).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.
17
+ 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)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?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<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,N(a.origType,a.selector),f.extend({},a,{handler:M,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,N(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?E:D):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=E;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=E;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=E,this.stopPropagation()},isDefaultPrevented:D,isPropagationStopped:D,isImmediatePropagationStopped:D};var F=function(a){var b=a.relatedTarget,c=!1,d=a.type;a.type=a.data,b!==this&&(b&&(c=f.contains(this,b)),c||(f.event.handle.apply(this,arguments),a.type=d))},G=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?G:F,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?G:F)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=b.type;(c==="submit"||c==="image")&&f(b).closest("form").length&&K("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=b.type;(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&K("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var H,I=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},J=function(c){var d=c.target,e,g;if(!!y.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=I(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:J,beforedeactivate:J,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&J.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")&&J.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",I(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in H)f.event.add(this,c+".specialChange",H[c]);return y.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return y.test(this.nodeName)}},H=f.event.special.change.filters,H.focus=H.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;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f.data(this,"lastToggle"+a.guid)||0)%d;f.data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var L={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||D,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=x.exec(h),k="",j&&(k=j[0],h=h.replace(x,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,L[h]?(a.push(L[h]+k),h=h+k):h=(L[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+N(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+N(h,m),e)}return this}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?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;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){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<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\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;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=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 b<c[3]-0},gt:function(a,b,c){return b>c[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<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=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<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){if(a===b){g=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",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 href='#'></a>",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="<p class='TEST'></p>";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="<div class='test e'></div><div class='test'></div>";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;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var O=/Until$/,P=/^(?:parents|prevUntil|prevAll)/,Q=/,/,R=/^.[^:#\[\.,]*$/,S=Array.prototype.slice,T=f.expr.match.POS,U={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(W(this,a,!1),"not",a)},filter:function(a){return this.pushStack(W(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?f.filter(a,this).length>0: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<e;d++)i=a[d],j[i]||(j[i]=T.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=T.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(l?l.index(g)>-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(V(c[0])||V(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=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.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 X=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,Z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,$=/<([\w:]+)/,_=/<tbody/i,ba=/<|&#?\w+;/,bb=/<(?:script|object|embed|option|style)/i,bc=/checked\s*(?:[^=]|=\s*.checked.)/i,bd=/\/(java|ecma)script/i,be=/^\s*<!(?:\[CDATA\[|\-\-)/,bf={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};bf.optgroup=bf.option,bf.tbody=bf.tfoot=bf.colgroup=bf.caption=bf.thead,bf.th=bf.td,f.support.htmlSerialize||(bf._default=[1,"div<div>","</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(X,""):null;if(typeof a=="string"&&!bb.test(a)&&(f.support.leadingWhitespace||!Y.test(a))&&!bf[($.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Z,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bc.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bg(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bm)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i;b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!bb.test(a[0])&&(f.support.checkClone||!bc.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[a[0]]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j
18
+ )}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)){bi(a,d),e=bj(a),g=bj(d);for(h=0;e[h];++h)bi(e[h],g[h])}if(b){bh(a,d);if(c){e=bj(a),g=bj(d);for(h=0;e[h];++h)bh(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||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(!ba.test(k))k=b.createTextNode(k);else{k=k.replace(Z,"<$1></$2>");var l=($.exec(k)||["",""])[1].toLowerCase(),m=bf[l]||bf._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=_.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!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&&Y.test(k)&&o.insertBefore(b.createTextNode(Y.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<r;i++)bl(k[i]);else bl(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bd.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bn=/alpha\([^)]*\)/i,bo=/opacity=([^)]*)/,bp=/([A-Z]|^ms)/g,bq=/^-?\d+(?:px)?$/i,br=/^-?\d/,bs=/^[+\-]=/,bt=/[^+\-\.\de]+/g,bu={position:"absolute",visibility:"hidden",display:"block"},bv=["Left","Right"],bw=["Top","Bottom"],bx,by,bz;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bx(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d;if(h==="number"&&isNaN(d)||d==null)return;h==="string"&&bs.test(d)&&(d=+d.replace(bt,"")+parseFloat(f.css(a,c)),h="number"),h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bx)return bx(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bA(a,b,d);f.swap(a,bu,function(){e=bA(a,b,d)});return e}},set:function(a,b){if(!bq.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bo.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=bn.test(g)?g.replace(bn,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=bx(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(by=function(a,c){var d,e,g;c=c.replace(bp,"-$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&&(bz=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bq.test(d)&&br.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}),bx=by||bz,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 bB=/%20/g,bC=/\[\]$/,bD=/\r?\n/g,bE=/#.*$/,bF=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bG=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bH=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bI=/^(?:GET|HEAD)$/,bJ=/^\/\//,bK=/\?/,bL=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bM=/^(?:select|textarea)/i,bN=/\s+/,bO=/([?&])_=[^&]*/,bP=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bQ=f.fn.load,bR={},bS={},bT,bU;try{bT=e.href}catch(bV){bT=c.createElement("a"),bT.href="",bT=bT.href}bU=bP.exec(bT.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bQ)return bQ.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("<div>").append(c.replace(bL,"")).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||bM.test(this.nodeName)||bG.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(bD,"\r\n")}}):{name:b.name,value:c.replace(bD,"\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:bT,isLocal:bH.test(bU[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:bW(bR),ajaxTransport:bW(bS),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?bZ(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=b$(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=bF.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(bE,"").replace(bJ,bU[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bN),d.crossDomain==null&&(r=bP.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bU[1]&&r[2]==bU[2]&&(r[3]||(r[1]==="http:"?80:443))==(bU[3]||(bU[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bX(bR,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bI.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bK.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bO,"$1_="+x);d.url=y+(y===d.url?(bK.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=bX(bS,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)bY(g,a[g],c,e);return d.join("&").replace(bB,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),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&&(ca.test(b.url)||e&&ca.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(ca,l),b.url===j&&(e&&(k=k.replace(ca,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 cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,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,cb&&delete cd[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=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn,co=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cr("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cs(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cr("hide",3),a,b,c);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cr("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return this[e.queue===!1?"each":"queue"](function(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(f.support.inlineBlockNeedsLayout?(j=cs(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],cj.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=ck.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[i]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),f.each({slideDown:cr("show",1),slideUp:cr("hide",1),slideToggle:cr("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default,d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue!==!1?f.dequeue(this):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function h(a){return d.step(a)}var d=this,e=f.fx,g;this.startTime=cn||cp(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,h.elem=this.elem,h()&&f.timers.push(h)&&!cl&&(co?(cl=!0,g=function(){cl&&(co(g),e.tick())},co(g)):cl=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=cn||cp(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=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<a.length;++b)a[b]()||a.splice(b--,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cl),cl=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var ct=/^t(?:able|d|h)$/i,cu=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cv(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);f.offset.initialize();var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!ct.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";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=cu.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&&!cu.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=cv(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=cv(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(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,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);
js/jquery-1.6.2rc1.js DELETED
@@ -1,8984 +0,0 @@
1
- /*!
2
- * jQuery JavaScript Library v1.6.2rc1
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: Tue Jun 14 14:54:23 2011 -0700
15
- */
16
- (function( window, undefined ) {
17
-
18
- // Use the correct document accordingly with window argument (sandbox)
19
- var document = window.document,
20
- navigator = window.navigator,
21
- location = window.location;
22
- var jQuery = (function() {
23
-
24
- // Define a local copy of jQuery
25
- var jQuery = function( selector, context ) {
26
- // The jQuery object is actually just the init constructor 'enhanced'
27
- return new jQuery.fn.init( selector, context, rootjQuery );
28
- },
29
-
30
- // Map over jQuery in case of overwrite
31
- _jQuery = window.jQuery,
32
-
33
- // Map over the $ in case of overwrite
34
- _$ = window.$,
35
-
36
- // A central reference to the root jQuery(document)
37
- rootjQuery,
38
-
39
- // A simple way to check for HTML strings or ID strings
40
- // (both of which we optimize for)
41
- quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
42
-
43
- // Check if a string has a non-whitespace character in it
44
- rnotwhite = /\S/,
45
-
46
- // Used for trimming whitespace
47
- trimLeft = /^\s+/,
48
- trimRight = /\s+$/,
49
-
50
- // Check for digits
51
- rdigit = /\d/,
52
-
53
- // Match a standalone tag
54
- rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
55
-
56
- // JSON RegExp
57
- rvalidchars = /^[\],:{}\s]*$/,
58
- rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
59
- rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
60
- rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
61
-
62
- // Useragent RegExp
63
- rwebkit = /(webkit)[ \/]([\w.]+)/,
64
- ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
65
- rmsie = /(msie) ([\w.]+)/,
66
- rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
67
-
68
- // Matches dashed string for camelizing
69
- rdashAlpha = /-([a-z])/ig,
70
-
71
- // Used by jQuery.camelCase as callback to replace()
72
- fcamelCase = function( all, letter ) {
73
- return letter.toUpperCase();
74
- },
75
-
76
- // Keep a UserAgent string for use with jQuery.browser
77
- userAgent = navigator.userAgent,
78
-
79
- // For matching the engine and version of the browser
80
- browserMatch,
81
-
82
- // The deferred used on DOM ready
83
- readyList,
84
-
85
- // The ready event handler
86
- DOMContentLoaded,
87
-
88
- // Save a reference to some core methods
89
- toString = Object.prototype.toString,
90
- hasOwn = Object.prototype.hasOwnProperty,
91
- push = Array.prototype.push,
92
- slice = Array.prototype.slice,
93
- trim = String.prototype.trim,
94
- indexOf = Array.prototype.indexOf,
95
-
96
- // [[Class]] -> type pairs
97
- class2type = {};
98
-
99
- jQuery.fn = jQuery.prototype = {
100
- constructor: jQuery,
101
- init: function( selector, context, rootjQuery ) {
102
- var match, elem, ret, doc;
103
-
104
- // Handle $(""), $(null), or $(undefined)
105
- if ( !selector ) {
106
- return this;
107
- }
108
-
109
- // Handle $(DOMElement)
110
- if ( selector.nodeType ) {
111
- this.context = this[0] = selector;
112
- this.length = 1;
113
- return this;
114
- }
115
-
116
- // The body element only exists once, optimize finding it
117
- if ( selector === "body" && !context && document.body ) {
118
- this.context = document;
119
- this[0] = document.body;
120
- this.selector = selector;
121
- this.length = 1;
122
- return this;
123
- }
124
-
125
- // Handle HTML strings
126
- if ( typeof selector === "string" ) {
127
- // Are we dealing with HTML string or an ID?
128
- if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
129
- // Assume that strings that start and end with <> are HTML and skip the regex check
130
- match = [ null, selector, null ];
131
-
132
- } else {
133
- match = quickExpr.exec( selector );
134
- }
135
-
136
- // Verify a match, and that no context was specified for #id
137
- if ( match && (match[1] || !context) ) {
138
-
139
- // HANDLE: $(html) -> $(array)
140
- if ( match[1] ) {
141
- context = context instanceof jQuery ? context[0] : context;
142
- doc = (context ? context.ownerDocument || context : document);
143
-
144
- // If a single string is passed in and it's a single tag
145
- // just do a createElement and skip the rest
146
- ret = rsingleTag.exec( selector );
147
-
148
- if ( ret ) {
149
- if ( jQuery.isPlainObject( context ) ) {
150
- selector = [ document.createElement( ret[1] ) ];
151
- jQuery.fn.attr.call( selector, context, true );
152
-
153
- } else {
154
- selector = [ doc.createElement( ret[1] ) ];
155
- }
156
-
157
- } else {
158
- ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
159
- selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes;
160
- }
161
-
162
- return jQuery.merge( this, selector );
163
-
164
- // HANDLE: $("#id")
165
- } else {
166
- elem = document.getElementById( match[2] );
167
-
168
- // Check parentNode to catch when Blackberry 4.6 returns
169
- // nodes that are no longer in the document #6963
170
- if ( elem && elem.parentNode ) {
171
- // Handle the case where IE and Opera return items
172
- // by name instead of ID
173
- if ( elem.id !== match[2] ) {
174
- return rootjQuery.find( selector );
175
- }
176
-
177
- // Otherwise, we inject the element directly into the jQuery object
178
- this.length = 1;
179
- this[0] = elem;
180
- }
181
-
182
- this.context = document;
183
- this.selector = selector;
184
- return this;
185
- }
186
-
187
- // HANDLE: $(expr, $(...))
188
- } else if ( !context || context.jquery ) {
189
- return (context || rootjQuery).find( selector );
190
-
191
- // HANDLE: $(expr, context)
192
- // (which is just equivalent to: $(context).find(expr)
193
- } else {
194
- return this.constructor( context ).find( selector );
195
- }
196
-
197
- // HANDLE: $(function)
198
- // Shortcut for document ready
199
- } else if ( jQuery.isFunction( selector ) ) {
200
- return rootjQuery.ready( selector );
201
- }
202
-
203
- if (selector.selector !== undefined) {
204
- this.selector = selector.selector;
205
- this.context = selector.context;
206
- }
207
-
208
- return jQuery.makeArray( selector, this );
209
- },
210
-
211
- // Start with an empty selector
212
- selector: "",
213
-
214
- // The current version of jQuery being used
215
- jquery: "1.6.2rc1",
216
-
217
- // The default length of a jQuery object is 0
218
- length: 0,
219
-
220
- // The number of elements contained in the matched element set
221
- size: function() {
222
- return this.length;
223
- },
224
-
225
- toArray: function() {
226
- return slice.call( this, 0 );
227
- },
228
-
229
- // Get the Nth element in the matched element set OR
230
- // Get the whole matched element set as a clean array
231
- get: function( num ) {
232
- return num == null ?
233
-
234
- // Return a 'clean' array
235
- this.toArray() :
236
-
237
- // Return just the object
238
- ( num < 0 ? this[ this.length + num ] : this[ num ] );
239
- },
240
-
241
- // Take an array of elements and push it onto the stack
242
- // (returning the new matched element set)
243
- pushStack: function( elems, name, selector ) {
244
- // Build a new jQuery matched element set
245
- var ret = this.constructor();
246
-
247
- if ( jQuery.isArray( elems ) ) {
248
- push.apply( ret, elems );
249
-
250
- } else {
251
- jQuery.merge( ret, elems );
252
- }
253
-
254
- // Add the old object onto the stack (as a reference)
255
- ret.prevObject = this;
256
-
257
- ret.context = this.context;
258
-
259
- if ( name === "find" ) {
260
- ret.selector = this.selector + (this.selector ? " " : "") + selector;
261
- } else if ( name ) {
262
- ret.selector = this.selector + "." + name + "(" + selector + ")";
263
- }
264
-
265
- // Return the newly-formed element set
266
- return ret;
267
- },
268
-
269
- // Execute a callback for every element in the matched set.
270
- // (You can seed the arguments with an array of args, but this is
271
- // only used internally.)
272
- each: function( callback, args ) {
273
- return jQuery.each( this, callback, args );
274
- },
275
-
276
- ready: function( fn ) {
277
- // Attach the listeners
278
- jQuery.bindReady();
279
-
280
- // Add the callback
281
- readyList.done( fn );
282
-
283
- return this;
284
- },
285
-
286
- eq: function( i ) {
287
- return i === -1 ?
288
- this.slice( i ) :
289
- this.slice( i, +i + 1 );
290
- },
291
-
292
- first: function() {
293
- return this.eq( 0 );
294
- },
295
-
296
- last: function() {
297
- return this.eq( -1 );
298
- },
299
-
300
- slice: function() {
301
- return this.pushStack( slice.apply( this, arguments ),
302
- "slice", slice.call(arguments).join(",") );
303
- },
304
-
305
- map: function( callback ) {
306
- return this.pushStack( jQuery.map(this, function( elem, i ) {
307
- return callback.call( elem, i, elem );
308
- }));
309
- },
310
-
311
- end: function() {
312
- return this.prevObject || this.constructor(null);
313
- },
314
-
315
- // For internal use only.
316
- // Behaves like an Array's method, not like a jQuery method.
317
- push: push,
318
- sort: [].sort,
319
- splice: [].splice
320
- };
321
-
322
- // Give the init function the jQuery prototype for later instantiation
323
- jQuery.fn.init.prototype = jQuery.fn;
324
-
325
- jQuery.extend = jQuery.fn.extend = function() {
326
- var options, name, src, copy, copyIsArray, clone,
327
- target = arguments[0] || {},
328
- i = 1,
329
- length = arguments.length,
330
- deep = false;
331
-
332
- // Handle a deep copy situation
333
- if ( typeof target === "boolean" ) {
334
- deep = target;
335
- target = arguments[1] || {};
336
- // skip the boolean and the target
337
- i = 2;
338
- }
339
-
340
- // Handle case when target is a string or something (possible in deep copy)
341
- if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
342
- target = {};
343
- }
344
-
345
- // extend jQuery itself if only one argument is passed
346
- if ( length === i ) {
347
- target = this;
348
- --i;
349
- }
350
-
351
- for ( ; i < length; i++ ) {
352
- // Only deal with non-null/undefined values
353
- if ( (options = arguments[ i ]) != null ) {
354
- // Extend the base object
355
- for ( name in options ) {
356
- src = target[ name ];
357
- copy = options[ name ];
358
-
359
- // Prevent never-ending loop
360
- if ( target === copy ) {
361
- continue;
362
- }
363
-
364
- // Recurse if we're merging plain objects or arrays
365
- if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
366
- if ( copyIsArray ) {
367
- copyIsArray = false;
368
- clone = src && jQuery.isArray(src) ? src : [];
369
-
370
- } else {
371
- clone = src && jQuery.isPlainObject(src) ? src : {};
372
- }
373
-
374
- // Never move original objects, clone them
375
- target[ name ] = jQuery.extend( deep, clone, copy );
376
-
377
- // Don't bring in undefined values
378
- } else if ( copy !== undefined ) {
379
- target[ name ] = copy;
380
- }
381
- }
382
- }
383
- }
384
-
385
- // Return the modified object
386
- return target;
387
- };
388
-
389
- jQuery.extend({
390
- noConflict: function( deep ) {
391
- if ( window.$ === jQuery ) {
392
- window.$ = _$;
393
- }
394
-
395
- if ( deep && window.jQuery === jQuery ) {
396
- window.jQuery = _jQuery;
397
- }
398
-
399
- return jQuery;
400
- },
401
-
402
- // Is the DOM ready to be used? Set to true once it occurs.
403
- isReady: false,
404
-
405
- // A counter to track how many items to wait for before
406
- // the ready event fires. See #6781
407
- readyWait: 1,
408
-
409
- // Hold (or release) the ready event
410
- holdReady: function( hold ) {
411
- if ( hold ) {
412
- jQuery.readyWait++;
413
- } else {
414
- jQuery.ready( true );
415
- }
416
- },
417
-
418
- // Handle when the DOM is ready
419
- ready: function( wait ) {
420
- // Either a released hold or an DOMready/load event and not yet ready
421
- if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
422
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
423
- if ( !document.body ) {
424
- return setTimeout( jQuery.ready, 1 );
425
- }
426
-
427
- // Remember that the DOM is ready
428
- jQuery.isReady = true;
429
-
430
- // If a normal DOM Ready event fired, decrement, and wait if need be
431
- if ( wait !== true && --jQuery.readyWait > 0 ) {
432
- return;
433
- }
434
-
435
- // If there are functions bound, to execute
436
- readyList.resolveWith( document, [ jQuery ] );
437
-
438
- // Trigger any bound ready events
439
- if ( jQuery.fn.trigger ) {
440
- jQuery( document ).trigger( "ready" ).unbind( "ready" );
441
- }
442
- }
443
- },
444
-
445
- bindReady: function() {
446
- if ( readyList ) {
447
- return;
448
- }
449
-
450
- readyList = jQuery._Deferred();
451
-
452
- // Catch cases where $(document).ready() is called after the
453
- // browser event has already occurred.
454
- if ( document.readyState === "complete" ) {
455
- // Handle it asynchronously to allow scripts the opportunity to delay ready
456
- return setTimeout( jQuery.ready, 1 );
457
- }
458
-
459
- // Mozilla, Opera and webkit nightlies currently support this event
460
- if ( document.addEventListener ) {
461
- // Use the handy event callback
462
- document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
463
-
464
- // A fallback to window.onload, that will always work
465
- window.addEventListener( "load", jQuery.ready, false );
466
-
467
- // If IE event model is used
468
- } else if ( document.attachEvent ) {
469
- // ensure firing before onload,
470
- // maybe late but safe also for iframes
471
- document.attachEvent( "onreadystatechange", DOMContentLoaded );
472
-
473
- // A fallback to window.onload, that will always work
474
- window.attachEvent( "onload", jQuery.ready );
475
-
476
- // If IE and not a frame
477
- // continually check to see if the document is ready
478
- var toplevel = false;
479
-
480
- try {
481
- toplevel = window.frameElement == null;
482
- } catch(e) {}
483
-
484
- if ( document.documentElement.doScroll && toplevel ) {
485
- doScrollCheck();
486
- }
487
- }
488
- },
489
-
490
- // See test/unit/core.js for details concerning isFunction.
491
- // Since version 1.3, DOM methods and functions like alert
492
- // aren't supported. They return false on IE (#2968).
493
- isFunction: function( obj ) {
494
- return jQuery.type(obj) === "function";
495
- },
496
-
497
- isArray: Array.isArray || function( obj ) {
498
- return jQuery.type(obj) === "array";
499
- },
500
-
501
- // A crude way of determining if an object is a window
502
- isWindow: function( obj ) {
503
- return obj && typeof obj === "object" && "setInterval" in obj;
504
- },
505
-
506
- isNaN: function( obj ) {
507
- return obj == null || !rdigit.test( obj ) || isNaN( obj );
508
- },
509
-
510
- type: function( obj ) {
511
- return obj == null ?
512
- String( obj ) :
513
- class2type[ toString.call(obj) ] || "object";
514
- },
515
-
516
- isPlainObject: function( obj ) {
517
- // Must be an Object.
518
- // Because of IE, we also have to check the presence of the constructor property.
519
- // Make sure that DOM nodes and window objects don't pass through, as well
520
- if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
521
- return false;
522
- }
523
-
524
- // Not own constructor property must be Object
525
- if ( obj.constructor &&
526
- !hasOwn.call(obj, "constructor") &&
527
- !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
528
- return false;
529
- }
530
-
531
- // Own properties are enumerated firstly, so to speed up,
532
- // if last one is own, then all properties are own.
533
-
534
- var key;
535
- for ( key in obj ) {}
536
-
537
- return key === undefined || hasOwn.call( obj, key );
538
- },
539
-
540
- isEmptyObject: function( obj ) {
541
- for ( var name in obj ) {
542
- return false;
543
- }
544
- return true;
545
- },
546
-
547
- error: function( msg ) {
548
- throw msg;
549
- },
550
-
551
- parseJSON: function( data ) {
552
- if ( typeof data !== "string" || !data ) {
553
- return null;
554
- }
555
-
556
- // Make sure leading/trailing whitespace is removed (IE can't handle it)
557
- data = jQuery.trim( data );
558
-
559
- // Attempt to parse using the native JSON parser first
560
- if ( window.JSON && window.JSON.parse ) {
561
- return window.JSON.parse( data );
562
- }
563
-
564
- // Make sure the incoming data is actual JSON
565
- // Logic borrowed from http://json.org/json2.js
566
- if ( rvalidchars.test( data.replace( rvalidescape, "@" )
567
- .replace( rvalidtokens, "]" )
568
- .replace( rvalidbraces, "")) ) {
569
-
570
- return (new Function( "return " + data ))();
571
-
572
- }
573
- jQuery.error( "Invalid JSON: " + data );
574
- },
575
-
576
- // Cross-browser xml parsing
577
- // (xml & tmp used internally)
578
- parseXML: function( data , xml , tmp ) {
579
-
580
- if ( window.DOMParser ) { // Standard
581
- tmp = new DOMParser();
582
- xml = tmp.parseFromString( data , "text/xml" );
583
- } else { // IE
584
- xml = new ActiveXObject( "Microsoft.XMLDOM" );
585
- xml.async = "false";
586
- xml.loadXML( data );
587
- }
588
-
589
- tmp = xml.documentElement;
590
-
591
- if ( ! tmp || ! tmp.nodeName || tmp.nodeName === "parsererror" ) {
592
- jQuery.error( "Invalid XML: " + data );
593
- }
594
-
595
- return xml;
596
- },
597
-
598
- noop: function() {},
599
-
600
- // Evaluates a script in a global context
601
- // Workarounds based on findings by Jim Driscoll
602
- // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
603
- globalEval: function( data ) {
604
- if ( data && rnotwhite.test( data ) ) {
605
- // We use execScript on Internet Explorer
606
- // We use an anonymous function so that context is window
607
- // rather than jQuery in Firefox
608
- ( window.execScript || function( data ) {
609
- window[ "eval" ].call( window, data );
610
- } )( data );
611
- }
612
- },
613
-
614
- // Converts a dashed string to camelCased string;
615
- // Used by both the css and data modules
616
- camelCase: function( string ) {
617
- return string.replace( rdashAlpha, fcamelCase );
618
- },
619
-
620
- nodeName: function( elem, name ) {
621
- return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
622
- },
623
-
624
- // args is for internal usage only
625
- each: function( object, callback, args ) {
626
- var name, i = 0,
627
- length = object.length,
628
- isObj = length === undefined || jQuery.isFunction( object );
629
-
630
- if ( args ) {
631
- if ( isObj ) {
632
- for ( name in object ) {
633
- if ( callback.apply( object[ name ], args ) === false ) {
634
- break;
635
- }
636
- }
637
- } else {
638
- for ( ; i < length; ) {
639
- if ( callback.apply( object[ i++ ], args ) === false ) {
640
- break;
641
- }
642
- }
643
- }
644
-
645
- // A special, fast, case for the most common use of each
646
- } else {
647
- if ( isObj ) {
648
- for ( name in object ) {
649
- if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
650
- break;
651
- }
652
- }
653
- } else {
654
- for ( ; i < length; ) {
655
- if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
656
- break;
657
- }
658
- }
659
- }
660
- }
661
-
662
- return object;
663
- },
664
-
665
- // Use native String.trim function wherever possible
666
- trim: trim ?
667
- function( text ) {
668
- return text == null ?
669
- "" :
670
- trim.call( text );
671
- } :
672
-
673
- // Otherwise use our own trimming functionality
674
- function( text ) {
675
- return text == null ?
676
- "" :
677
- text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
678
- },
679
-
680
- // results is for internal usage only
681
- makeArray: function( array, results ) {
682
- var ret = results || [];
683
-
684
- if ( array != null ) {
685
- // The window, strings (and functions) also have 'length'
686
- // The extra typeof function check is to prevent crashes
687
- // in Safari 2 (See: #3039)
688
- // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
689
- var type = jQuery.type( array );
690
-
691
- if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
692
- push.call( ret, array );
693
- } else {
694
- jQuery.merge( ret, array );
695
- }
696
- }
697
-
698
- return ret;
699
- },
700
-
701
- inArray: function( elem, array ) {
702
-
703
- if ( indexOf ) {
704
- return indexOf.call( array, elem );
705
- }
706
-
707
- for ( var i = 0, length = array.length; i < length; i++ ) {
708
- if ( array[ i ] === elem ) {
709
- return i;
710
- }
711
- }
712
-
713
- return -1;
714
- },
715
-
716
- merge: function( first, second ) {
717
- var i = first.length,
718
- j = 0;
719
-
720
- if ( typeof second.length === "number" ) {
721
- for ( var l = second.length; j < l; j++ ) {
722
- first[ i++ ] = second[ j ];
723
- }
724
-
725
- } else {
726
- while ( second[j] !== undefined ) {
727
- first[ i++ ] = second[ j++ ];
728
- }
729
- }
730
-
731
- first.length = i;
732
-
733
- return first;
734
- },
735
-
736
- grep: function( elems, callback, inv ) {
737
- var ret = [], retVal;
738
- inv = !!inv;
739
-
740
- // Go through the array, only saving the items
741
- // that pass the validator function
742
- for ( var i = 0, length = elems.length; i < length; i++ ) {
743
- retVal = !!callback( elems[ i ], i );
744
- if ( inv !== retVal ) {
745
- ret.push( elems[ i ] );
746
- }
747
- }
748
-
749
- return ret;
750
- },
751
-
752
- // arg is for internal usage only
753
- map: function( elems, callback, arg ) {
754
- var value, key, ret = [],
755
- i = 0,
756
- length = elems.length,
757
- // jquery objects are treated as arrays
758
- isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
759
-
760
- // Go through the array, translating each of the items to their
761
- if ( isArray ) {
762
- for ( ; i < length; i++ ) {
763
- value = callback( elems[ i ], i, arg );
764
-
765
- if ( value != null ) {
766
- ret[ ret.length ] = value;
767
- }
768
- }
769
-
770
- // Go through every key on the object,
771
- } else {
772
- for ( key in elems ) {
773
- value = callback( elems[ key ], key, arg );
774
-
775
- if ( value != null ) {
776
- ret[ ret.length ] = value;
777
- }
778
- }
779
- }
780
-
781
- // Flatten any nested arrays
782
- return ret.concat.apply( [], ret );
783
- },
784
-
785
- // A global GUID counter for objects
786
- guid: 1,
787
-
788
- // Bind a function to a context, optionally partially applying any
789
- // arguments.
790
- proxy: function( fn, context ) {
791
- if ( typeof context === "string" ) {
792
- var tmp = fn[ context ];
793
- context = fn;
794
- fn = tmp;
795
- }
796
-
797
- // Quick check to determine if target is callable, in the spec
798
- // this throws a TypeError, but we will just return undefined.
799
- if ( !jQuery.isFunction( fn ) ) {
800
- return undefined;
801
- }
802
-
803
- // Simulated bind
804
- var args = slice.call( arguments, 2 ),
805
- proxy = function() {
806
- return fn.apply( context, args.concat( slice.call( arguments ) ) );
807
- };
808
-
809
- // Set the guid of unique handler to the same of original handler, so it can be removed
810
- proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
811
-
812
- return proxy;
813
- },
814
-
815
- // Mutifunctional method to get and set values to a collection
816
- // The value/s can optionally be executed if it's a function
817
- access: function( elems, key, value, exec, fn, pass ) {
818
- var length = elems.length;
819
-
820
- // Setting many attributes
821
- if ( typeof key === "object" ) {
822
- for ( var k in key ) {
823
- jQuery.access( elems, k, key[k], exec, fn, value );
824
- }
825
- return elems;
826
- }
827
-
828
- // Setting one attribute
829
- if ( value !== undefined ) {
830
- // Optionally, function values get executed if exec is true
831
- exec = !pass && exec && jQuery.isFunction(value);
832
-
833
- for ( var i = 0; i < length; i++ ) {
834
- fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
835
- }
836
-
837
- return elems;
838
- }
839
-
840
- // Getting an attribute
841
- return length ? fn( elems[0], key ) : undefined;
842
- },
843
-
844
- now: function() {
845
- return (new Date()).getTime();
846
- },
847
-
848
- // Use of jQuery.browser is frowned upon.
849
- // More details: http://docs.jquery.com/Utilities/jQuery.browser
850
- uaMatch: function( ua ) {
851
- ua = ua.toLowerCase();
852
-
853
- var match = rwebkit.exec( ua ) ||
854
- ropera.exec( ua ) ||
855
- rmsie.exec( ua ) ||
856
- ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
857
- [];
858
-
859
- return { browser: match[1] || "", version: match[2] || "0" };
860
- },
861
-
862
- sub: function() {
863
- function jQuerySub( selector, context ) {
864
- return new jQuerySub.fn.init( selector, context );
865
- }
866
- jQuery.extend( true, jQuerySub, this );
867
- jQuerySub.superclass = this;
868
- jQuerySub.fn = jQuerySub.prototype = this();
869
- jQuerySub.fn.constructor = jQuerySub;
870
- jQuerySub.sub = this.sub;
871
- jQuerySub.fn.init = function init( selector, context ) {
872
- if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
873
- context = jQuerySub( context );
874
- }
875
-
876
- return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
877
- };
878
- jQuerySub.fn.init.prototype = jQuerySub.fn;
879
- var rootjQuerySub = jQuerySub(document);
880
- return jQuerySub;
881
- },
882
-
883
- browser: {}
884
- });
885
-
886
- // Populate the class2type map
887
- jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
888
- class2type[ "[object " + name + "]" ] = name.toLowerCase();
889
- });
890
-
891
- browserMatch = jQuery.uaMatch( userAgent );
892
- if ( browserMatch.browser ) {
893
- jQuery.browser[ browserMatch.browser ] = true;
894
- jQuery.browser.version = browserMatch.version;
895
- }
896
-
897
- // Deprecated, use jQuery.browser.webkit instead
898
- if ( jQuery.browser.webkit ) {
899
- jQuery.browser.safari = true;
900
- }
901
-
902
- // IE doesn't match non-breaking spaces with \s
903
- if ( rnotwhite.test( "\xA0" ) ) {
904
- trimLeft = /^[\s\xA0]+/;
905
- trimRight = /[\s\xA0]+$/;
906
- }
907
-
908
- // All jQuery objects should point back to these
909
- rootjQuery = jQuery(document);
910
-
911
- // Cleanup functions for the document ready method
912
- if ( document.addEventListener ) {
913
- DOMContentLoaded = function() {
914
- document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
915
- jQuery.ready();
916
- };
917
-
918
- } else if ( document.attachEvent ) {
919
- DOMContentLoaded = function() {
920
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
921
- if ( document.readyState === "complete" ) {
922
- document.detachEvent( "onreadystatechange", DOMContentLoaded );
923
- jQuery.ready();
924
- }
925
- };
926
- }
927
-
928
- // The DOM ready check for Internet Explorer
929
- function doScrollCheck() {
930
- if ( jQuery.isReady ) {
931
- return;
932
- }
933
-
934
- try {
935
- // If IE is used, use the trick by Diego Perini
936
- // http://javascript.nwbox.com/IEContentLoaded/
937
- document.documentElement.doScroll("left");
938
- } catch(e) {
939
- setTimeout( doScrollCheck, 1 );
940
- return;
941
- }
942
-
943
- // and execute any waiting functions
944
- jQuery.ready();
945
- }
946
-
947
- return jQuery;
948
-
949
- })();
950
-
951
-
952
- var // Promise methods
953
- promiseMethods = "done fail isResolved isRejected promise then always pipe".split( " " ),
954
- // Static reference to slice
955
- sliceDeferred = [].slice;
956
-
957
- jQuery.extend({
958
- // Create a simple deferred (one callbacks list)
959
- _Deferred: function() {
960
- var // callbacks list
961
- callbacks = [],
962
- // stored [ context , args ]
963
- fired,
964
- // to avoid firing when already doing so
965
- firing,
966
- // flag to know if the deferred has been cancelled
967
- cancelled,
968
- // the deferred itself
969
- deferred = {
970
-
971
- // done( f1, f2, ...)
972
- done: function() {
973
- if ( !cancelled ) {
974
- var args = arguments,
975
- i,
976
- length,
977
- elem,
978
- type,
979
- _fired;
980
- if ( fired ) {
981
- _fired = fired;
982
- fired = 0;
983
- }
984
- for ( i = 0, length = args.length; i < length; i++ ) {
985
- elem = args[ i ];
986
- type = jQuery.type( elem );
987
- if ( type === "array" ) {
988
- deferred.done.apply( deferred, elem );
989
- } else if ( type === "function" ) {
990
- callbacks.push( elem );
991
- }
992
- }
993
- if ( _fired ) {
994
- deferred.resolveWith( _fired[ 0 ], _fired[ 1 ] );
995
- }
996
- }
997
- return this;
998
- },
999
-
1000
- // resolve with given context and args
1001
- resolveWith: function( context, args ) {
1002
- if ( !cancelled && !fired && !firing ) {
1003
- // make sure args are available (#8421)
1004
- args = args || [];
1005
- firing = 1;
1006
- try {
1007
- while( callbacks[ 0 ] ) {
1008
- callbacks.shift().apply( context, args );
1009
- }
1010
- }
1011
- finally {
1012
- fired = [ context, args ];
1013
- firing = 0;
1014
- }
1015
- }
1016
- return this;
1017
- },
1018
-
1019
- // resolve with this as context and given arguments
1020
- resolve: function() {
1021
- deferred.resolveWith( this, arguments );
1022
- return this;
1023
- },
1024
-
1025
- // Has this deferred been resolved?
1026
- isResolved: function() {
1027
- return !!( firing || fired );
1028
- },
1029
-
1030
- // Cancel
1031
- cancel: function() {
1032
- cancelled = 1;
1033
- callbacks = [];
1034
- return this;
1035
- }
1036
- };
1037
-
1038
- return deferred;
1039
- },
1040
-
1041
- // Full fledged deferred (two callbacks list)
1042
- Deferred: function( func ) {
1043
- var deferred = jQuery._Deferred(),
1044
- failDeferred = jQuery._Deferred(),
1045
- promise;
1046
- // Add errorDeferred methods, then and promise
1047
- jQuery.extend( deferred, {
1048
- then: function( doneCallbacks, failCallbacks ) {
1049
- deferred.done( doneCallbacks ).fail( failCallbacks );
1050
- return this;
1051
- },
1052
- always: function() {
1053
- return deferred.done.apply( deferred, arguments ).fail.apply( this, arguments );
1054
- },
1055
- fail: failDeferred.done,
1056
- rejectWith: failDeferred.resolveWith,
1057
- reject: failDeferred.resolve,
1058
- isRejected: failDeferred.isResolved,
1059
- pipe: function( fnDone, fnFail ) {
1060
- return jQuery.Deferred(function( newDefer ) {
1061
- jQuery.each( {
1062
- done: [ fnDone, "resolve" ],
1063
- fail: [ fnFail, "reject" ]
1064
- }, function( handler, data ) {
1065
- var fn = data[ 0 ],
1066
- action = data[ 1 ],
1067
- returned;
1068
- if ( jQuery.isFunction( fn ) ) {
1069
- deferred[ handler ](function() {
1070
- returned = fn.apply( this, arguments );
1071
- if ( returned && jQuery.isFunction( returned.promise ) ) {
1072
- returned.promise().then( newDefer.resolve, newDefer.reject );
1073
- } else {
1074
- newDefer[ action ]( returned );
1075
- }
1076
- });
1077
- } else {
1078
- deferred[ handler ]( newDefer[ action ] );
1079
- }
1080
- });
1081
- }).promise();
1082
- },
1083
- // Get a promise for this deferred
1084
- // If obj is provided, the promise aspect is added to the object
1085
- promise: function( obj ) {
1086
- if ( obj == null ) {
1087
- if ( promise ) {
1088
- return promise;
1089
- }
1090
- promise = obj = {};
1091
- }
1092
- var i = promiseMethods.length;
1093
- while( i-- ) {
1094
- obj[ promiseMethods[i] ] = deferred[ promiseMethods[i] ];
1095
- }
1096
- return obj;
1097
- }
1098
- });
1099
- // Make sure only one callback list will be used
1100
- deferred.done( failDeferred.cancel ).fail( deferred.cancel );
1101
- // Unexpose cancel
1102
- delete deferred.cancel;
1103
- // Call given func if any
1104
- if ( func ) {
1105
- func.call( deferred, deferred );
1106
- }
1107
- return deferred;
1108
- },
1109
-
1110
- // Deferred helper
1111
- when: function( firstParam ) {
1112
- var args = arguments,
1113
- i = 0,
1114
- length = args.length,
1115
- count = length,
1116
- deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?
1117
- firstParam :
1118
- jQuery.Deferred();
1119
- function resolveFunc( i ) {
1120
- return function( value ) {
1121
- args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
1122
- if ( !( --count ) ) {
1123
- // Strange bug in FF4:
1124
- // Values changed onto the arguments object sometimes end up as undefined values
1125
- // outside the $.when method. Cloning the object into a fresh array solves the issue
1126
- deferred.resolveWith( deferred, sliceDeferred.call( args, 0 ) );
1127
- }
1128
- };
1129
- }
1130
- if ( length > 1 ) {
1131
- for( ; i < length; i++ ) {
1132
- if ( args[ i ] && jQuery.isFunction( args[ i ].promise ) ) {
1133
- args[ i ].promise().then( resolveFunc(i), deferred.reject );
1134
- } else {
1135
- --count;
1136
- }
1137
- }
1138
- if ( !count ) {
1139
- deferred.resolveWith( deferred, args );
1140
- }
1141
- } else if ( deferred !== firstParam ) {
1142
- deferred.resolveWith( deferred, length ? [ firstParam ] : [] );
1143
- }
1144
- return deferred.promise();
1145
- }
1146
- });
1147
-
1148
-
1149
-
1150
- jQuery.support = (function() {
1151
-
1152
- var div = document.createElement( "div" ),
1153
- documentElement = document.documentElement,
1154
- all,
1155
- a,
1156
- select,
1157
- opt,
1158
- input,
1159
- marginDiv,
1160
- support,
1161
- fragment,
1162
- body,
1163
- testElementParent,
1164
- testElement,
1165
- testElementStyle,
1166
- tds,
1167
- events,
1168
- eventName,
1169
- i,
1170
- isSupported;
1171
-
1172
- // Preliminary tests
1173
- div.setAttribute("className", "t");
1174
- div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
1175
-
1176
- all = div.getElementsByTagName( "*" );
1177
- a = div.getElementsByTagName( "a" )[ 0 ];
1178
-
1179
- // Can't get basic test support
1180
- if ( !all || !all.length || !a ) {
1181
- return {};
1182
- }
1183
-
1184
- // First batch of supports tests
1185
- select = document.createElement( "select" );
1186
- opt = select.appendChild( document.createElement("option") );
1187
- input = div.getElementsByTagName( "input" )[ 0 ];
1188
-
1189
- support = {
1190
- // IE strips leading whitespace when .innerHTML is used
1191
- leadingWhitespace: ( div.firstChild.nodeType === 3 ),
1192
-
1193
- // Make sure that tbody elements aren't automatically inserted
1194
- // IE will insert them into empty tables
1195
- tbody: !div.getElementsByTagName( "tbody" ).length,
1196
-
1197
- // Make sure that link elements get serialized correctly by innerHTML
1198
- // This requires a wrapper element in IE
1199
- htmlSerialize: !!div.getElementsByTagName( "link" ).length,
1200
-
1201
- // Get the style information from getAttribute
1202
- // (IE uses .cssText instead)
1203
- style: /top/.test( a.getAttribute("style") ),
1204
-
1205
- // Make sure that URLs aren't manipulated
1206
- // (IE normalizes it by default)
1207
- hrefNormalized: ( a.getAttribute( "href" ) === "/a" ),
1208
-
1209
- // Make sure that element opacity exists
1210
- // (IE uses filter instead)
1211
- // Use a regex to work around a WebKit issue. See #5145
1212
- opacity: /^0.55$/.test( a.style.opacity ),
1213
-
1214
- // Verify style float existence
1215
- // (IE uses styleFloat instead of cssFloat)
1216
- cssFloat: !!a.style.cssFloat,
1217
-
1218
- // Make sure that if no value is specified for a checkbox
1219
- // that it defaults to "on".
1220
- // (WebKit defaults to "" instead)
1221
- checkOn: ( input.value === "on" ),
1222
-
1223
- // Make sure that a selected-by-default option has a working selected property.
1224
- // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
1225
- optSelected: opt.selected,
1226
-
1227
- // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
1228
- getSetAttribute: div.className !== "t",
1229
-
1230
- // Will be defined later
1231
- submitBubbles: true,
1232
- changeBubbles: true,
1233
- focusinBubbles: false,
1234
- deleteExpando: true,
1235
- noCloneEvent: true,
1236
- inlineBlockNeedsLayout: false,
1237
- shrinkWrapBlocks: false,
1238
- reliableMarginRight: true
1239
- };
1240
-
1241
- // Make sure checked status is properly cloned
1242
- input.checked = true;
1243
- support.noCloneChecked = input.cloneNode( true ).checked;
1244
-
1245
- // Make sure that the options inside disabled selects aren't marked as disabled
1246
- // (WebKit marks them as disabled)
1247
- select.disabled = true;
1248
- support.optDisabled = !opt.disabled;
1249
-
1250
- // Test to see if it's possible to delete an expando from an element
1251
- // Fails in Internet Explorer
1252
- try {
1253
- delete div.test;
1254
- } catch( e ) {
1255
- support.deleteExpando = false;
1256
- }
1257
-
1258
- if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
1259
- div.attachEvent( "onclick", function() {
1260
- // Cloning a node shouldn't copy over any
1261
- // bound event handlers (IE does this)
1262
- support.noCloneEvent = false;
1263
- });
1264
- div.cloneNode( true ).fireEvent( "onclick" );
1265
- }
1266
-
1267
- // Check if a radio maintains it's value
1268
- // after being appended to the DOM
1269
- input = document.createElement("input");
1270
- input.value = "t";
1271
- input.setAttribute("type", "radio");
1272
- support.radioValue = input.value === "t";
1273
-
1274
- input.setAttribute("checked", "checked");
1275
- div.appendChild( input );
1276
- fragment = document.createDocumentFragment();
1277
- fragment.appendChild( div.firstChild );
1278
-
1279
- // WebKit doesn't clone checked state correctly in fragments
1280
- support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
1281
-
1282
- div.innerHTML = "";
1283
-
1284
- // Figure out if the W3C box model works as expected
1285
- div.style.width = div.style.paddingLeft = "1px";
1286
-
1287
- body = document.getElementsByTagName( "body" )[ 0 ];
1288
- // We use our own, invisible, body unless the body is already present
1289
- // in which case we use a div (#9239)
1290
- testElement = document.createElement( body ? "div" : "body" );
1291
- testElementStyle = {
1292
- visibility: "hidden",
1293
- width: 0,
1294
- height: 0,
1295
- border: 0,
1296
- margin: 0
1297
- };
1298
- if ( body ) {
1299
- jQuery.extend( testElementStyle, {
1300
- position: "absolute",
1301
- left: -1000,
1302
- top: -1000
1303
- });
1304
- }
1305
- for ( i in testElementStyle ) {
1306
- testElement.style[ i ] = testElementStyle[ i ];
1307
- }
1308
- testElement.appendChild( div );
1309
- testElementParent = body || documentElement;
1310
- testElementParent.insertBefore( testElement, testElementParent.firstChild );
1311
-
1312
- // Check if a disconnected checkbox will retain its checked
1313
- // value of true after appended to the DOM (IE6/7)
1314
- support.appendChecked = input.checked;
1315
-
1316
- support.boxModel = div.offsetWidth === 2;
1317
-
1318
- if ( "zoom" in div.style ) {
1319
- // Check if natively block-level elements act like inline-block
1320
- // elements when setting their display to 'inline' and giving
1321
- // them layout
1322
- // (IE < 8 does this)
1323
- div.style.display = "inline";
1324
- div.style.zoom = 1;
1325
- support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 );
1326
-
1327
- // Check if elements with layout shrink-wrap their children
1328
- // (IE 6 does this)
1329
- div.style.display = "";
1330
- div.innerHTML = "<div style='width:4px;'></div>";
1331
- support.shrinkWrapBlocks = ( div.offsetWidth !== 2 );
1332
- }
1333
-
1334
- div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
1335
- tds = div.getElementsByTagName( "td" );
1336
-
1337
- // Check if table cells still have offsetWidth/Height when they are set
1338
- // to display:none and there are still other visible table cells in a
1339
- // table row; if so, offsetWidth/Height are not reliable for use when
1340
- // determining if an element has been hidden directly using
1341
- // display:none (it is still safe to use offsets if a parent element is
1342
- // hidden; don safety goggles and see bug #4512 for more information).
1343
- // (only IE 8 fails this test)
1344
- isSupported = ( tds[ 0 ].offsetHeight === 0 );
1345
-
1346
- tds[ 0 ].style.display = "";
1347
- tds[ 1 ].style.display = "none";
1348
-
1349
- // Check if empty table cells still have offsetWidth/Height
1350
- // (IE < 8 fail this test)
1351
- support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
1352
- div.innerHTML = "";
1353
-
1354
- // Check if div with explicit width and no margin-right incorrectly
1355
- // gets computed margin-right based on width of container. For more
1356
- // info see bug #3333
1357
- // Fails in WebKit before Feb 2011 nightlies
1358
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
1359
- if ( document.defaultView && document.defaultView.getComputedStyle ) {
1360
- marginDiv = document.createElement( "div" );
1361
- marginDiv.style.width = "0";
1362
- marginDiv.style.marginRight = "0";
1363
- div.appendChild( marginDiv );
1364
- support.reliableMarginRight =
1365
- ( parseInt( ( document.defaultView.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
1366
- }
1367
-
1368
- // Remove the body element we added
1369
- testElement.innerHTML = "";
1370
- testElementParent.removeChild( testElement );
1371
-
1372
- // Technique from Juriy Zaytsev
1373
- // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
1374
- // We only care about the case where non-standard event systems
1375
- // are used, namely in IE. Short-circuiting here helps us to
1376
- // avoid an eval call (in setAttribute) which can cause CSP
1377
- // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
1378
- if ( div.attachEvent ) {
1379
- for( i in {
1380
- submit: 1,
1381
- change: 1,
1382
- focusin: 1
1383
- } ) {
1384
- eventName = "on" + i;
1385
- isSupported = ( eventName in div );
1386
- if ( !isSupported ) {
1387
- div.setAttribute( eventName, "return;" );
1388
- isSupported = ( typeof div[ eventName ] === "function" );
1389
- }
1390
- support[ i + "Bubbles" ] = isSupported;
1391
- }
1392
- }
1393
-
1394
- // Null connected elements to avoid leaks in IE
1395
- testElement = fragment = select = opt = body = marginDiv = div = input = null;
1396
-
1397
- return support;
1398
- })();
1399
-
1400
- // Keep track of boxModel
1401
- jQuery.boxModel = jQuery.support.boxModel;
1402
-
1403
-
1404
-
1405
-
1406
- var rbrace = /^(?:\{.*\}|\[.*\])$/,
1407
- rmultiDash = /([a-z])([A-Z])/g;
1408
-
1409
- jQuery.extend({
1410
- cache: {},
1411
-
1412
- // Please use with caution
1413
- uuid: 0,
1414
-
1415
- // Unique for each copy of jQuery on the page
1416
- // Non-digits removed to match rinlinejQuery
1417
- expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
1418
-
1419
- // The following elements throw uncatchable exceptions if you
1420
- // attempt to add expando properties to them.
1421
- noData: {
1422
- "embed": true,
1423
- // Ban all objects except for Flash (which handle expandos)
1424
- "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
1425
- "applet": true
1426
- },
1427
-
1428
- hasData: function( elem ) {
1429
- elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
1430
-
1431
- return !!elem && !isEmptyDataObject( elem );
1432
- },
1433
-
1434
- data: function( elem, name, data, pvt /* Internal Use Only */ ) {
1435
- if ( !jQuery.acceptData( elem ) ) {
1436
- return;
1437
- }
1438
-
1439
- var internalKey = jQuery.expando, getByName = typeof name === "string", thisCache,
1440
-
1441
- // We have to handle DOM nodes and JS objects differently because IE6-7
1442
- // can't GC object references properly across the DOM-JS boundary
1443
- isNode = elem.nodeType,
1444
-
1445
- // Only DOM nodes need the global jQuery cache; JS object data is
1446
- // attached directly to the object so GC can occur automatically
1447
- cache = isNode ? jQuery.cache : elem,
1448
-
1449
- // Only defining an ID for JS objects if its cache already exists allows
1450
- // the code to shortcut on the same path as a DOM node with no cache
1451
- id = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando;
1452
-
1453
- // Avoid doing any more work than we need to when trying to get data on an
1454
- // object that has no data at all
1455
- if ( (!id || (pvt && id && !cache[ id ][ internalKey ])) && getByName && data === undefined ) {
1456
- return;
1457
- }
1458
-
1459
- if ( !id ) {
1460
- // Only DOM nodes need a new unique ID for each element since their data
1461
- // ends up in the global cache
1462
- if ( isNode ) {
1463
- elem[ jQuery.expando ] = id = ++jQuery.uuid;
1464
- } else {
1465
- id = jQuery.expando;
1466
- }
1467
- }
1468
-
1469
- if ( !cache[ id ] ) {
1470
- cache[ id ] = {};
1471
-
1472
- // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery
1473
- // metadata on plain JS objects when the object is serialized using
1474
- // JSON.stringify
1475
- if ( !isNode ) {
1476
- cache[ id ].toJSON = jQuery.noop;
1477
- }
1478
- }
1479
-
1480
- // An object can be passed to jQuery.data instead of a key/value pair; this gets
1481
- // shallow copied over onto the existing cache
1482
- if ( typeof name === "object" || typeof name === "function" ) {
1483
- if ( pvt ) {
1484
- cache[ id ][ internalKey ] = jQuery.extend(cache[ id ][ internalKey ], name);
1485
- } else {
1486
- cache[ id ] = jQuery.extend(cache[ id ], name);
1487
- }
1488
- }
1489
-
1490
- thisCache = cache[ id ];
1491
-
1492
- // Internal jQuery data is stored in a separate object inside the object's data
1493
- // cache in order to avoid key collisions between internal data and user-defined
1494
- // data
1495
- if ( pvt ) {
1496
- if ( !thisCache[ internalKey ] ) {
1497
- thisCache[ internalKey ] = {};
1498
- }
1499
-
1500
- thisCache = thisCache[ internalKey ];
1501
- }
1502
-
1503
- if ( data !== undefined ) {
1504
- thisCache[ jQuery.camelCase( name ) ] = data;
1505
- }
1506
-
1507
- // TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should
1508
- // not attempt to inspect the internal events object using jQuery.data, as this
1509
- // internal data object is undocumented and subject to change.
1510
- if ( name === "events" && !thisCache[name] ) {
1511
- return thisCache[ internalKey ] && thisCache[ internalKey ].events;
1512
- }
1513
-
1514
- return getByName ?
1515
- // Check for both converted-to-camel and non-converted data property names
1516
- thisCache[ jQuery.camelCase( name ) ] || thisCache[ name ] :
1517
- thisCache;
1518
- },
1519
-
1520
- removeData: function( elem, name, pvt /* Internal Use Only */ ) {
1521
- if ( !jQuery.acceptData( elem ) ) {
1522
- return;
1523
- }
1524
-
1525
- var internalKey = jQuery.expando, isNode = elem.nodeType,
1526
-
1527
- // See jQuery.data for more information
1528
- cache = isNode ? jQuery.cache : elem,
1529
-
1530
- // See jQuery.data for more information
1531
- id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
1532
-
1533
- // If there is already no cache entry for this object, there is no
1534
- // purpose in continuing
1535
- if ( !cache[ id ] ) {
1536
- return;
1537
- }
1538
-
1539
- if ( name ) {
1540
- var thisCache = pvt ? cache[ id ][ internalKey ] : cache[ id ];
1541
-
1542
- if ( thisCache ) {
1543
- delete thisCache[ name ];
1544
-
1545
- // If there is no data left in the cache, we want to continue
1546
- // and let the cache object itself get destroyed
1547
- if ( !isEmptyDataObject(thisCache) ) {
1548
- return;
1549
- }
1550
- }
1551
- }
1552
-
1553
- // See jQuery.data for more information
1554
- if ( pvt ) {
1555
- delete cache[ id ][ internalKey ];
1556
-
1557
- // Don't destroy the parent cache unless the internal data object
1558
- // had been the only thing left in it
1559
- if ( !isEmptyDataObject(cache[ id ]) ) {
1560
- return;
1561
- }
1562
- }
1563
-
1564
- var internalCache = cache[ id ][ internalKey ];
1565
-
1566
- // Browsers that fail expando deletion also refuse to delete expandos on
1567
- // the window, but it will allow it on all other JS objects; other browsers
1568
- // don't care
1569
- if ( jQuery.support.deleteExpando || cache != window ) {
1570
- delete cache[ id ];
1571
- } else {
1572
- cache[ id ] = null;
1573
- }
1574
-
1575
- // We destroyed the entire user cache at once because it's faster than
1576
- // iterating through each key, but we need to continue to persist internal
1577
- // data if it existed
1578
- if ( internalCache ) {
1579
- cache[ id ] = {};
1580
- // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery
1581
- // metadata on plain JS objects when the object is serialized using
1582
- // JSON.stringify
1583
- if ( !isNode ) {
1584
- cache[ id ].toJSON = jQuery.noop;
1585
- }
1586
-
1587
- cache[ id ][ internalKey ] = internalCache;
1588
-
1589
- // Otherwise, we need to eliminate the expando on the node to avoid
1590
- // false lookups in the cache for entries that no longer exist
1591
- } else if ( isNode ) {
1592
- // IE does not allow us to delete expando properties from nodes,
1593
- // nor does it have a removeAttribute function on Document nodes;
1594
- // we must handle all of these cases
1595
- if ( jQuery.support.deleteExpando ) {
1596
- delete elem[ jQuery.expando ];
1597
- } else if ( elem.removeAttribute ) {
1598
- elem.removeAttribute( jQuery.expando );
1599
- } else {
1600
- elem[ jQuery.expando ] = null;
1601
- }
1602
- }
1603
- },
1604
-
1605
- // For internal use only.
1606
- _data: function( elem, name, data ) {
1607
- return jQuery.data( elem, name, data, true );
1608
- },
1609
-
1610
- // A method for determining if a DOM node can handle the data expando
1611
- acceptData: function( elem ) {
1612
- if ( elem.nodeName ) {
1613
- var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
1614
-
1615
- if ( match ) {
1616
- return !(match === true || elem.getAttribute("classid") !== match);
1617
- }
1618
- }
1619
-
1620
- return true;
1621
- }
1622
- });
1623
-
1624
- jQuery.fn.extend({
1625
- data: function( key, value ) {
1626
- var data = null;
1627
-
1628
- if ( typeof key === "undefined" ) {
1629
- if ( this.length ) {
1630
- data = jQuery.data( this[0] );
1631
-
1632
- if ( this[0].nodeType === 1 ) {
1633
- var attr = this[0].attributes, name;
1634
- for ( var i = 0, l = attr.length; i < l; i++ ) {
1635
- name = attr[i].name;
1636
-
1637
- if ( name.indexOf( "data-" ) === 0 ) {
1638
- name = jQuery.camelCase( name.substring(5) );
1639
-
1640
- dataAttr( this[0], name, data[ name ] );
1641
- }
1642
- }
1643
- }
1644
- }
1645
-
1646
- return data;
1647
-
1648
- } else if ( typeof key === "object" ) {
1649
- return this.each(function() {
1650
- jQuery.data( this, key );
1651
- });
1652
- }
1653
-
1654
- var parts = key.split(".");
1655
- parts[1] = parts[1] ? "." + parts[1] : "";
1656
-
1657
- if ( value === undefined ) {
1658
- data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
1659
-
1660
- // Try to fetch any internally stored data first
1661
- if ( data === undefined && this.length ) {
1662
- data = jQuery.data( this[0], key );
1663
- data = dataAttr( this[0], key, data );
1664
- }
1665
-
1666
- return data === undefined && parts[1] ?
1667
- this.data( parts[0] ) :
1668
- data;
1669
-
1670
- } else {
1671
- return this.each(function() {
1672
- var $this = jQuery( this ),
1673
- args = [ parts[0], value ];
1674
-
1675
- $this.triggerHandler( "setData" + parts[1] + "!", args );
1676
- jQuery.data( this, key, value );
1677
- $this.triggerHandler( "changeData" + parts[1] + "!", args );
1678
- });
1679
- }
1680
- },
1681
-
1682
- removeData: function( key ) {
1683
- return this.each(function() {
1684
- jQuery.removeData( this, key );
1685
- });
1686
- }
1687
- });
1688
-
1689
- function dataAttr( elem, key, data ) {
1690
- // If nothing was found internally, try to fetch any
1691
- // data from the HTML5 data-* attribute
1692
- if ( data === undefined && elem.nodeType === 1 ) {
1693
- var name = "data-" + key.replace( rmultiDash, "$1-$2" ).toLowerCase();
1694
-
1695
- data = elem.getAttribute( name );
1696
-
1697
- if ( typeof data === "string" ) {
1698
- try {
1699
- data = data === "true" ? true :
1700
- data === "false" ? false :
1701
- data === "null" ? null :
1702
- !jQuery.isNaN( data ) ? parseFloat( data ) :
1703
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
1704
- data;
1705
- } catch( e ) {}
1706
-
1707
- // Make sure we set the data so it isn't changed later
1708
- jQuery.data( elem, key, data );
1709
-
1710
- } else {
1711
- data = undefined;
1712
- }
1713
- }
1714
-
1715
- return data;
1716
- }
1717
-
1718
- // TODO: This is a hack for 1.5 ONLY to allow objects with a single toJSON
1719
- // property to be considered empty objects; this property always exists in
1720
- // order to make sure JSON.stringify does not expose internal metadata
1721
- function isEmptyDataObject( obj ) {
1722
- for ( var name in obj ) {
1723
- if ( name !== "toJSON" ) {
1724
- return false;
1725
- }
1726
- }
1727
-
1728
- return true;
1729
- }
1730
-
1731
-
1732
-
1733
-
1734
- function handleQueueMarkDefer( elem, type, src ) {
1735
- var deferDataKey = type + "defer",
1736
- queueDataKey = type + "queue",
1737
- markDataKey = type + "mark",
1738
- defer = jQuery.data( elem, deferDataKey, undefined, true );
1739
- if ( defer &&
1740
- ( src === "queue" || !jQuery.data( elem, queueDataKey, undefined, true ) ) &&
1741
- ( src === "mark" || !jQuery.data( elem, markDataKey, undefined, true ) ) ) {
1742
- // Give room for hard-coded callbacks to fire first
1743
- // and eventually mark/queue something else on the element
1744
- setTimeout( function() {
1745
- if ( !jQuery.data( elem, queueDataKey, undefined, true ) &&
1746
- !jQuery.data( elem, markDataKey, undefined, true ) ) {
1747
- jQuery.removeData( elem, deferDataKey, true );
1748
- defer.resolve();
1749
- }
1750
- }, 0 );
1751
- }
1752
- }
1753
-
1754
- jQuery.extend({
1755
-
1756
- _mark: function( elem, type ) {
1757
- if ( elem ) {
1758
- type = (type || "fx") + "mark";
1759
- jQuery.data( elem, type, (jQuery.data(elem,type,undefined,true) || 0) + 1, true );
1760
- }
1761
- },
1762
-
1763
- _unmark: function( force, elem, type ) {
1764
- if ( force !== true ) {
1765
- type = elem;
1766
- elem = force;
1767
- force = false;
1768
- }
1769
- if ( elem ) {
1770
- type = type || "fx";
1771
- var key = type + "mark",
1772
- count = force ? 0 : ( (jQuery.data( elem, key, undefined, true) || 1 ) - 1 );
1773
- if ( count ) {
1774
- jQuery.data( elem, key, count, true );
1775
- } else {
1776
- jQuery.removeData( elem, key, true );
1777
- handleQueueMarkDefer( elem, type, "mark" );
1778
- }
1779
- }
1780
- },
1781
-
1782
- queue: function( elem, type, data ) {
1783
- if ( elem ) {
1784
- type = (type || "fx") + "queue";
1785
- var q = jQuery.data( elem, type, undefined, true );
1786
- // Speed up dequeue by getting out quickly if this is just a lookup
1787
- if ( data ) {
1788
- if ( !q || jQuery.isArray(data) ) {
1789
- q = jQuery.data( elem, type, jQuery.makeArray(data), true );
1790
- } else {
1791
- q.push( data );
1792
- }
1793
- }
1794
- return q || [];
1795
- }
1796
- },
1797
-
1798
- dequeue: function( elem, type ) {
1799
- type = type || "fx";
1800
-
1801
- var queue = jQuery.queue( elem, type ),
1802
- fn = queue.shift(),
1803
- defer;
1804
-
1805
- // If the fx queue is dequeued, always remove the progress sentinel
1806
- if ( fn === "inprogress" ) {
1807
- fn = queue.shift();
1808
- }
1809
-
1810
- if ( fn ) {
1811
- // Add a progress sentinel to prevent the fx queue from being
1812
- // automatically dequeued
1813
- if ( type === "fx" ) {
1814
- queue.unshift("inprogress");
1815
- }
1816
-
1817
- fn.call(elem, function() {
1818
- jQuery.dequeue(elem, type);
1819
- });
1820
- }
1821
-
1822
- if ( !queue.length ) {
1823
- jQuery.removeData( elem, type + "queue", true );
1824
- handleQueueMarkDefer( elem, type, "queue" );
1825
- }
1826
- }
1827
- });
1828
-
1829
- jQuery.fn.extend({
1830
- queue: function( type, data ) {
1831
- if ( typeof type !== "string" ) {
1832
- data = type;
1833
- type = "fx";
1834
- }
1835
-
1836
- if ( data === undefined ) {
1837
- return jQuery.queue( this[0], type );
1838
- }
1839
- return this.each(function() {
1840
- var queue = jQuery.queue( this, type, data );
1841
-
1842
- if ( type === "fx" && queue[0] !== "inprogress" ) {
1843
- jQuery.dequeue( this, type );
1844
- }
1845
- });
1846
- },
1847
- dequeue: function( type ) {
1848
- return this.each(function() {
1849
- jQuery.dequeue( this, type );
1850
- });
1851
- },
1852
- // Based off of the plugin by Clint Helfers, with permission.
1853
- // http://blindsignals.com/index.php/2009/07/jquery-delay/
1854
- delay: function( time, type ) {
1855
- time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
1856
- type = type || "fx";
1857
-
1858
- return this.queue( type, function() {
1859
- var elem = this;
1860
- setTimeout(function() {
1861
- jQuery.dequeue( elem, type );
1862
- }, time );
1863
- });
1864
- },
1865
- clearQueue: function( type ) {
1866
- return this.queue( type || "fx", [] );
1867
- },
1868
- // Get a promise resolved when queues of a certain type
1869
- // are emptied (fx is the type by default)
1870
- promise: function( type, object ) {
1871
- if ( typeof type !== "string" ) {
1872
- object = type;
1873
- type = undefined;
1874
- }
1875
- type = type || "fx";
1876
- var defer = jQuery.Deferred(),
1877
- elements = this,
1878
- i = elements.length,
1879
- count = 1,
1880
- deferDataKey = type + "defer",
1881
- queueDataKey = type + "queue",
1882
- markDataKey = type + "mark",
1883
- tmp;
1884
- function resolve() {
1885
- if ( !( --count ) ) {
1886
- defer.resolveWith( elements, [ elements ] );
1887
- }
1888
- }
1889
- while( i-- ) {
1890
- if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
1891
- ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
1892
- jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
1893
- jQuery.data( elements[ i ], deferDataKey, jQuery._Deferred(), true ) )) {
1894
- count++;
1895
- tmp.done( resolve );
1896
- }
1897
- }
1898
- resolve();
1899
- return defer.promise();
1900
- }
1901
- });
1902
-
1903
-
1904
-
1905
-
1906
- var rclass = /[\n\t\r]/g,
1907
- rspace = /\s+/,
1908
- rreturn = /\r/g,
1909
- rtype = /^(?:button|input)$/i,
1910
- rfocusable = /^(?:button|input|object|select|textarea)$/i,
1911
- rclickable = /^a(?:rea)?$/i,
1912
- rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
1913
- rinvalidChar = /\:|^on/,
1914
- formHook, boolHook;
1915
-
1916
- jQuery.fn.extend({
1917
- attr: function( name, value ) {
1918
- return jQuery.access( this, name, value, true, jQuery.attr );
1919
- },
1920
-
1921
- removeAttr: function( name ) {
1922
- return this.each(function() {
1923
- jQuery.removeAttr( this, name );
1924
- });
1925
- },
1926
-
1927
- prop: function( name, value ) {
1928
- return jQuery.access( this, name, value, true, jQuery.prop );
1929
- },
1930
-
1931
- removeProp: function( name ) {
1932
- name = jQuery.propFix[ name ] || name;
1933
- return this.each(function() {
1934
- // try/catch handles cases where IE balks (such as removing a property on window)
1935
- try {
1936
- this[ name ] = undefined;
1937
- delete this[ name ];
1938
- } catch( e ) {}
1939
- });
1940
- },
1941
-
1942
- addClass: function( value ) {
1943
- var classNames, i, l, elem, setClass, c, cl;
1944
-
1945
- if ( jQuery.isFunction( value ) ) {
1946
- return this.each(function( j ) {
1947
- var self = jQuery( this );
1948
- self.addClass( value.call(this, j, self.attr("class") || "") );
1949
- });
1950
- }
1951
-
1952
- if ( value && typeof value === "string" ) {
1953
- classNames = value.split( rspace );
1954
-
1955
- for ( i = 0, l = this.length; i < l; i++ ) {
1956
- elem = this[ i ];
1957
-
1958
- if ( elem.nodeType === 1 ) {
1959
- if ( !elem.className && classNames.length === 1 ) {
1960
- elem.className = value;
1961
-
1962
- } else {
1963
- setClass = elem.className;
1964
-
1965
- for ( c = 0, cl = classNames.length; c < cl; c++ ) {
1966
- if ( !~setClass.indexOf(classNames[ c ]) ) {
1967
- setClass += " " + classNames[ c ];
1968
- }
1969
- }
1970
- elem.className = jQuery.trim( setClass );
1971
- }
1972
- }
1973
- }
1974
- }
1975
-
1976
- return this;
1977
- },
1978
-
1979
- removeClass: function( value ) {
1980
- var classNames, i, l, elem, className, c, cl;
1981
-
1982
- if ( jQuery.isFunction( value ) ) {
1983
- return this.each(function( j ) {
1984
- var self = jQuery( this );
1985
- self.removeClass( value.call(this, j, self.attr("class")) );
1986
- });
1987
- }
1988
-
1989
- if ( (value && typeof value === "string") || value === undefined ) {
1990
- classNames = (value || "").split( rspace );
1991
-
1992
- for ( i = 0, l = this.length; i < l; i++ ) {
1993
- elem = this[ i ];
1994
-
1995
- if ( elem.nodeType === 1 && elem.className ) {
1996
- if ( value ) {
1997
- className = (" " + elem.className + " ").replace( rclass, " " );
1998
- for ( c = 0, cl = classNames.length; c < cl; c++ ) {
1999
- className = className.replace(" " + classNames[ c ] + " ", " ");
2000
- }
2001
- elem.className = jQuery.trim( className );
2002
-
2003
- } else {
2004
- elem.className = "";
2005
- }
2006
- }
2007
- }
2008
- }
2009
-
2010
- return this;
2011
- },
2012
-
2013
- toggleClass: function( value, stateVal ) {
2014
- var type = typeof value,
2015
- isBool = typeof stateVal === "boolean";
2016
-
2017
- if ( jQuery.isFunction( value ) ) {
2018
- return this.each(function(i) {
2019
- var self = jQuery(this);
2020
- self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal );
2021
- });
2022
- }
2023
-
2024
- return this.each(function() {
2025
- if ( type === "string" ) {
2026
- // toggle individual class names
2027
- var className,
2028
- i = 0,
2029
- self = jQuery( this ),
2030
- state = stateVal,
2031
- classNames = value.split( rspace );
2032
-
2033
- while ( (className = classNames[ i++ ]) ) {
2034
- // check each className given, space seperated list
2035
- state = isBool ? state : !self.hasClass( className );
2036
- self[ state ? "addClass" : "removeClass" ]( className );
2037
- }
2038
-
2039
- } else if ( type === "undefined" || type === "boolean" ) {
2040
- if ( this.className ) {
2041
- // store className if set
2042
- jQuery._data( this, "__className__", this.className );
2043
- }
2044
-
2045
- // toggle whole className
2046
- this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
2047
- }
2048
- });
2049
- },
2050
-
2051
- hasClass: function( selector ) {
2052
- var className = " " + selector + " ";
2053
- for ( var i = 0, l = this.length; i < l; i++ ) {
2054
- if ( (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
2055
- return true;
2056
- }
2057
- }
2058
-
2059
- return false;
2060
- },
2061
-
2062
- val: function( value ) {
2063
- var hooks, ret,
2064
- elem = this[0];
2065
-
2066
- if ( !arguments.length ) {
2067
- if ( elem ) {
2068
- hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ];
2069
-
2070
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
2071
- return ret;
2072
- }
2073
-
2074
- ret = elem.value;
2075
-
2076
- return typeof ret === "string" ?
2077
- // handle most common string cases
2078
- ret.replace(rreturn, "") :
2079
- // handle cases where value is null/undef or number
2080
- ret == null ? "" : ret;
2081
- }
2082
-
2083
- return undefined;
2084
- }
2085
-
2086
- var isFunction = jQuery.isFunction( value );
2087
-
2088
- return this.each(function( i ) {
2089
- var self = jQuery(this), val;
2090
-
2091
- if ( this.nodeType !== 1 ) {
2092
- return;
2093
- }
2094
-
2095
- if ( isFunction ) {
2096
- val = value.call( this, i, self.val() );
2097
- } else {
2098
- val = value;
2099
- }
2100
-
2101
- // Treat null/undefined as ""; convert numbers to string
2102
- if ( val == null ) {
2103
- val = "";
2104
- } else if ( typeof val === "number" ) {
2105
- val += "";
2106
- } else if ( jQuery.isArray( val ) ) {
2107
- val = jQuery.map(val, function ( value ) {
2108
- return value == null ? "" : value + "";
2109
- });
2110
- }
2111
-
2112
- hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ];
2113
-
2114
- // If set returns undefined, fall back to normal setting
2115
- if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
2116
- this.value = val;
2117
- }
2118
- });
2119
- }
2120
- });
2121
-
2122
- jQuery.extend({
2123
- valHooks: {
2124
- option: {
2125
- get: function( elem ) {
2126
- // attributes.value is undefined in Blackberry 4.7 but
2127
- // uses .value. See #6932
2128
- var val = elem.attributes.value;
2129
- return !val || val.specified ? elem.value : elem.text;
2130
- }
2131
- },
2132
- select: {
2133
- get: function( elem ) {
2134
- var value,
2135
- index = elem.selectedIndex,
2136
- values = [],
2137
- options = elem.options,
2138
- one = elem.type === "select-one";
2139
-
2140
- // Nothing was selected
2141
- if ( index < 0 ) {
2142
- return null;
2143
- }
2144
-
2145
- // Loop through all the selected options
2146
- for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
2147
- var option = options[ i ];
2148
-
2149
- // Don't return options that are disabled or in a disabled optgroup
2150
- if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
2151
- (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
2152
-
2153
- // Get the specific value for the option
2154
- value = jQuery( option ).val();
2155
-
2156
- // We don't need an array for one selects
2157
- if ( one ) {
2158
- return value;
2159
- }
2160
-
2161
- // Multi-Selects return an array
2162
- values.push( value );
2163
- }
2164
- }
2165
-
2166
- // Fixes Bug #2551 -- select.val() broken in IE after form.reset()
2167
- if ( one && !values.length && options.length ) {
2168
- return jQuery( options[ index ] ).val();
2169
- }
2170
-
2171
- return values;
2172
- },
2173
-
2174
- set: function( elem, value ) {
2175
- var values = jQuery.makeArray( value );
2176
-
2177
- jQuery(elem).find("option").each(function() {
2178
- this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
2179
- });
2180
-
2181
- if ( !values.length ) {
2182
- elem.selectedIndex = -1;
2183
- }
2184
- return values;
2185
- }
2186
- }
2187
- },
2188
-
2189
- attrFn: {
2190
- val: true,
2191
- css: true,
2192
- html: true,
2193
- text: true,
2194
- data: true,
2195
- width: true,
2196
- height: true,
2197
- offset: true
2198
- },
2199
-
2200
- attrFix: {
2201
- // Always normalize to ensure hook usage
2202
- tabindex: "tabIndex"
2203
- },
2204
-
2205
- attr: function( elem, name, value, pass ) {
2206
- var nType = elem.nodeType;
2207
-
2208
- // don't get/set attributes on text, comment and attribute nodes
2209
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
2210
- return undefined;
2211
- }
2212
-
2213
- if ( pass && name in jQuery.attrFn ) {
2214
- return jQuery( elem )[ name ]( value );
2215
- }
2216
-
2217
- // Fallback to prop when attributes are not supported
2218
- if ( !("getAttribute" in elem) ) {
2219
- return jQuery.prop( elem, name, value );
2220
- }
2221
-
2222
- var ret, hooks,
2223
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
2224
-
2225
- // Normalize the name if needed
2226
- if ( notxml ) {
2227
- name = jQuery.attrFix[ name ] || name;
2228
-
2229
- hooks = jQuery.attrHooks[ name ];
2230
-
2231
- if ( !hooks ) {
2232
- // Use boolHook for boolean attributes
2233
- if ( rboolean.test( name ) ) {
2234
-
2235
- hooks = boolHook;
2236
-
2237
- // Use formHook for forms and if the name contains certain characters
2238
- } else if ( formHook && name !== "className" &&
2239
- (jQuery.nodeName( elem, "form" ) || rinvalidChar.test( name )) ) {
2240
-
2241
- hooks = formHook;
2242
- }
2243
- }
2244
- }
2245
-
2246
- if ( value !== undefined ) {
2247
-
2248
- if ( value === null ) {
2249
- jQuery.removeAttr( elem, name );
2250
- return undefined;
2251
-
2252
- } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
2253
- return ret;
2254
-
2255
- } else {
2256
- elem.setAttribute( name, "" + value );
2257
- return value;
2258
- }
2259
-
2260
- } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
2261
- return ret;
2262
-
2263
- } else {
2264
-
2265
- ret = elem.getAttribute( name );
2266
-
2267
- // Non-existent attributes return null, we normalize to undefined
2268
- return ret === null ?
2269
- undefined :
2270
- ret;
2271
- }
2272
- },
2273
-
2274
- removeAttr: function( elem, name ) {
2275
- var propName;
2276
- if ( elem.nodeType === 1 ) {
2277
- name = jQuery.attrFix[ name ] || name;
2278
-
2279
- if ( jQuery.support.getSetAttribute ) {
2280
- // Use removeAttribute in browsers that support it
2281
- elem.removeAttribute( name );
2282
- } else {
2283
- jQuery.attr( elem, name, "" );
2284
- elem.removeAttributeNode( elem.getAttributeNode( name ) );
2285
- }
2286
-
2287
- // Set corresponding property to false for boolean attributes
2288
- if ( rboolean.test( name ) && (propName = jQuery.propFix[ name ] || name) in elem ) {
2289
- elem[ propName ] = false;
2290
- }
2291
- }
2292
- },
2293
-
2294
- attrHooks: {
2295
- type: {
2296
- set: function( elem, value ) {
2297
- // We can't allow the type property to be changed (since it causes problems in IE)
2298
- if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
2299
- jQuery.error( "type property can't be changed" );
2300
- } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
2301
- // Setting the type on a radio button after the value resets the value in IE6-9
2302
- // Reset value to it's default in case type is set after value
2303
- // This is for element creation
2304
- var val = elem.value;
2305
- elem.setAttribute( "type", value );
2306
- if ( val ) {
2307
- elem.value = val;
2308
- }
2309
- return value;
2310
- }
2311
- }
2312
- },
2313
- tabIndex: {
2314
- get: function( elem ) {
2315
- // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
2316
- // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
2317
- var attributeNode = elem.getAttributeNode("tabIndex");
2318
-
2319
- return attributeNode && attributeNode.specified ?
2320
- parseInt( attributeNode.value, 10 ) :
2321
- rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
2322
- 0 :
2323
- undefined;
2324
- }
2325
- },
2326
- // Use the value property for back compat
2327
- // Use the formHook for button elements in IE6/7 (#1954)
2328
- value: {
2329
- get: function( elem, name ) {
2330
- if ( formHook && jQuery.nodeName( elem, "button" ) ) {
2331
- return formHook.get( elem, name );
2332
- }
2333
- return name in elem ?
2334
- elem.value :
2335
- null;
2336
- },
2337
- set: function( elem, value, name ) {
2338
- if ( formHook && jQuery.nodeName( elem, "button" ) ) {
2339
- return formHook.set( elem, value, name );
2340
- }
2341
- // Does not return so that setAttribute is also used
2342
- elem.value = value;
2343
- }
2344
- }
2345
- },
2346
-
2347
- propFix: {
2348
- tabindex: "tabIndex",
2349
- readonly: "readOnly",
2350
- "for": "htmlFor",
2351
- "class": "className",
2352
- maxlength: "maxLength",
2353
- cellspacing: "cellSpacing",
2354
- cellpadding: "cellPadding",
2355
- rowspan: "rowSpan",
2356
- colspan: "colSpan",
2357
- usemap: "useMap",
2358
- frameborder: "frameBorder",
2359
- contenteditable: "contentEditable"
2360
- },
2361
-
2362
- prop: function( elem, name, value ) {
2363
- var nType = elem.nodeType;
2364
-
2365
- // don't get/set properties on text, comment and attribute nodes
2366
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
2367
- return undefined;
2368
- }
2369
-
2370
- var ret, hooks,
2371
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
2372
-
2373
- if ( notxml ) {
2374
- // Fix name and attach hooks
2375
- name = jQuery.propFix[ name ] || name;
2376
- hooks = jQuery.propHooks[ name ];
2377
- }
2378
-
2379
- if ( value !== undefined ) {
2380
- if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
2381
- return ret;
2382
-
2383
- } else {
2384
- return (elem[ name ] = value);
2385
- }
2386
-
2387
- } else {
2388
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== undefined ) {
2389
- return ret;
2390
-
2391
- } else {
2392
- return elem[ name ];
2393
- }
2394
- }
2395
- },
2396
-
2397
- propHooks: {}
2398
- });
2399
-
2400
- // Hook for boolean attributes
2401
- boolHook = {
2402
- get: function( elem, name ) {
2403
- // Align boolean attributes with corresponding properties
2404
- return jQuery.prop( elem, name ) ?
2405
- name.toLowerCase() :
2406
- undefined;
2407
- },
2408
- set: function( elem, value, name ) {
2409
- var propName;
2410
- if ( value === false ) {
2411
- // Remove boolean attributes when set to false
2412
- jQuery.removeAttr( elem, name );
2413
- } else {
2414
- // value is true since we know at this point it's type boolean and not false
2415
- // Set boolean attributes to the same name and set the DOM property
2416
- propName = jQuery.propFix[ name ] || name;
2417
- if ( propName in elem ) {
2418
- // Only set the IDL specifically if it already exists on the element
2419
- elem[ propName ] = true;
2420
- }
2421
-
2422
- elem.setAttribute( name, name.toLowerCase() );
2423
- }
2424
- return name;
2425
- }
2426
- };
2427
-
2428
- // IE6/7 do not support getting/setting some attributes with get/setAttribute
2429
- if ( !jQuery.support.getSetAttribute ) {
2430
-
2431
- // propFix is more comprehensive and contains all fixes
2432
- jQuery.attrFix = jQuery.propFix;
2433
-
2434
- // Use this for any attribute on a form in IE6/7
2435
- formHook = jQuery.attrHooks.name = jQuery.attrHooks.title = jQuery.valHooks.button = {
2436
- get: function( elem, name ) {
2437
- var ret;
2438
- ret = elem.getAttributeNode( name );
2439
- // Return undefined if nodeValue is empty string
2440
- return ret && ret.nodeValue !== "" ?
2441
- ret.nodeValue :
2442
- undefined;
2443
- },
2444
- set: function( elem, value, name ) {
2445
- // Check form objects in IE (multiple bugs related)
2446
- // Only use nodeValue if the attribute node exists on the form
2447
- var ret = elem.getAttributeNode( name );
2448
- if ( ret ) {
2449
- ret.nodeValue = value;
2450
- return value;
2451
- }
2452
- }
2453
- };
2454
-
2455
- // Set width and height to auto instead of 0 on empty string( Bug #8150 )
2456
- // This is for removals
2457
- jQuery.each([ "width", "height" ], function( i, name ) {
2458
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
2459
- set: function( elem, value ) {
2460
- if ( value === "" ) {
2461
- elem.setAttribute( name, "auto" );
2462
- return value;
2463
- }
2464
- }
2465
- });
2466
- });
2467
- }
2468
-
2469
-
2470
- // Some attributes require a special call on IE
2471
- if ( !jQuery.support.hrefNormalized ) {
2472
- jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
2473
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
2474
- get: function( elem ) {
2475
- var ret = elem.getAttribute( name, 2 );
2476
- return ret === null ? undefined : ret;
2477
- }
2478
- });
2479
- });
2480
- }
2481
-
2482
- if ( !jQuery.support.style ) {
2483
- jQuery.attrHooks.style = {
2484
- get: function( elem ) {
2485
- // Return undefined in the case of empty string
2486
- // Normalize to lowercase since IE uppercases css property names
2487
- return elem.style.cssText.toLowerCase() || undefined;
2488
- },
2489
- set: function( elem, value ) {
2490
- return (elem.style.cssText = "" + value);
2491
- }
2492
- };
2493
- }
2494
-
2495
- // Safari mis-reports the default selected property of an option
2496
- // Accessing the parent's selectedIndex property fixes it
2497
- if ( !jQuery.support.optSelected ) {
2498
- jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
2499
- get: function( elem ) {
2500
- var parent = elem.parentNode;
2501
-
2502
- if ( parent ) {
2503
- parent.selectedIndex;
2504
-
2505
- // Make sure that it also works with optgroups, see #5701
2506
- if ( parent.parentNode ) {
2507
- parent.parentNode.selectedIndex;
2508
- }
2509
- }
2510
- }
2511
- });
2512
- }
2513
-
2514
- // Radios and checkboxes getter/setter
2515
- if ( !jQuery.support.checkOn ) {
2516
- jQuery.each([ "radio", "checkbox" ], function() {
2517
- jQuery.valHooks[ this ] = {
2518
- get: function( elem ) {
2519
- // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
2520
- return elem.getAttribute("value") === null ? "on" : elem.value;
2521
- }
2522
- };
2523
- });
2524
- }
2525
- jQuery.each([ "radio", "checkbox" ], function() {
2526
- jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
2527
- set: function( elem, value ) {
2528
- if ( jQuery.isArray( value ) ) {
2529
- return (elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0);
2530
- }
2531
- }
2532
- });
2533
- });
2534
-
2535
-
2536
-
2537
-
2538
- var rnamespaces = /\.(.*)$/,
2539
- rformElems = /^(?:textarea|input|select)$/i,
2540
- rperiod = /\./g,
2541
- rspaces = / /g,
2542
- rescape = /[^\w\s.|`]/g,
2543
- fcleanup = function( nm ) {
2544
- return nm.replace(rescape, "\\$&");
2545
- };
2546
-
2547
- /*
2548
- * A number of helper functions used for managing events.
2549
- * Many of the ideas behind this code originated from
2550
- * Dean Edwards' addEvent library.
2551
- */
2552
- jQuery.event = {
2553
-
2554
- // Bind an event to an element
2555
- // Original by Dean Edwards
2556
- add: function( elem, types, handler, data ) {
2557
- if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
2558
- return;
2559
- }
2560
-
2561
- if ( handler === false ) {
2562
- handler = returnFalse;
2563
- } else if ( !handler ) {
2564
- // Fixes bug #7229. Fix recommended by jdalton
2565
- return;
2566
- }
2567
-
2568
- var handleObjIn, handleObj;
2569
-
2570
- if ( handler.handler ) {
2571
- handleObjIn = handler;
2572
- handler = handleObjIn.handler;
2573
- }
2574
-
2575
- // Make sure that the function being executed has a unique ID
2576
- if ( !handler.guid ) {
2577
- handler.guid = jQuery.guid++;
2578
- }
2579
-
2580
- // Init the element's event structure
2581
- var elemData = jQuery._data( elem );
2582
-
2583
- // If no elemData is found then we must be trying to bind to one of the
2584
- // banned noData elements
2585
- if ( !elemData ) {
2586
- return;
2587
- }
2588
-
2589
- var events = elemData.events,
2590
- eventHandle = elemData.handle;
2591
-
2592
- if ( !events ) {
2593
- elemData.events = events = {};
2594
- }
2595
-
2596
- if ( !eventHandle ) {
2597
- elemData.handle = eventHandle = function( e ) {
2598
- // Discard the second event of a jQuery.event.trigger() and
2599
- // when an event is called after a page has unloaded
2600
- return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
2601
- jQuery.event.handle.apply( eventHandle.elem, arguments ) :
2602
- undefined;
2603
- };
2604
- }
2605
-
2606
- // Add elem as a property of the handle function
2607
- // This is to prevent a memory leak with non-native events in IE.
2608
- eventHandle.elem = elem;
2609
-
2610
- // Handle multiple events separated by a space
2611
- // jQuery(...).bind("mouseover mouseout", fn);
2612
- types = types.split(" ");
2613
-
2614
- var type, i = 0, namespaces;
2615
-
2616
- while ( (type = types[ i++ ]) ) {
2617
- handleObj = handleObjIn ?
2618
- jQuery.extend({}, handleObjIn) :
2619
- { handler: handler, data: data };
2620
-
2621
- // Namespaced event handlers
2622
- if ( type.indexOf(".") > -1 ) {
2623
- namespaces = type.split(".");
2624
- type = namespaces.shift();
2625
- handleObj.namespace = namespaces.slice(0).sort().join(".");
2626
-
2627
- } else {
2628
- namespaces = [];
2629
- handleObj.namespace = "";
2630
- }
2631
-
2632
- handleObj.type = type;
2633
- if ( !handleObj.guid ) {
2634
- handleObj.guid = handler.guid;
2635
- }
2636
-
2637
- // Get the current list of functions bound to this event
2638
- var handlers = events[ type ],
2639
- special = jQuery.event.special[ type ] || {};
2640
-
2641
- // Init the event handler queue
2642
- if ( !handlers ) {
2643
- handlers = events[ type ] = [];
2644
-
2645
- // Check for a special event handler
2646
- // Only use addEventListener/attachEvent if the special
2647
- // events handler returns false
2648
- if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
2649
- // Bind the global event handler to the element
2650
- if ( elem.addEventListener ) {
2651
- elem.addEventListener( type, eventHandle, false );
2652
-
2653
- } else if ( elem.attachEvent ) {
2654
- elem.attachEvent( "on" + type, eventHandle );
2655
- }
2656
- }
2657
- }
2658
-
2659
- if ( special.add ) {
2660
- special.add.call( elem, handleObj );
2661
-
2662
- if ( !handleObj.handler.guid ) {
2663
- handleObj.handler.guid = handler.guid;
2664
- }
2665
- }
2666
-
2667
- // Add the function to the element's handler list
2668
- handlers.push( handleObj );
2669
-
2670
- // Keep track of which events have been used, for event optimization
2671
- jQuery.event.global[ type ] = true;
2672
- }
2673
-
2674
- // Nullify elem to prevent memory leaks in IE
2675
- elem = null;
2676
- },
2677
-
2678
- global: {},
2679
-
2680
- // Detach an event or set of events from an element
2681
- remove: function( elem, types, handler, pos ) {
2682
- // don't do events on text and comment nodes
2683
- if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
2684
- return;
2685
- }
2686
-
2687
- if ( handler === false ) {
2688
- handler = returnFalse;
2689
- }
2690
-
2691
- var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType,
2692
- elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
2693
- events = elemData && elemData.events;
2694
-
2695
- if ( !elemData || !events ) {
2696
- return;
2697
- }
2698
-
2699
- // types is actually an event object here
2700
- if ( types && types.type ) {
2701
- handler = types.handler;
2702
- types = types.type;
2703
- }
2704
-
2705
- // Unbind all events for the element
2706
- if ( !types || typeof types === "string" && types.charAt(0) === "." ) {
2707
- types = types || "";
2708
-
2709
- for ( type in events ) {
2710
- jQuery.event.remove( elem, type + types );
2711
- }
2712
-
2713
- return;
2714
- }
2715
-
2716
- // Handle multiple events separated by a space
2717
- // jQuery(...).unbind("mouseover mouseout", fn);
2718
- types = types.split(" ");
2719
-
2720
- while ( (type = types[ i++ ]) ) {
2721
- origType = type;
2722
- handleObj = null;
2723
- all = type.indexOf(".") < 0;
2724
- namespaces = [];
2725
-
2726
- if ( !all ) {
2727
- // Namespaced event handlers
2728
- namespaces = type.split(".");
2729
- type = namespaces.shift();
2730
-
2731
- namespace = new RegExp("(^|\\.)" +
2732
- jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)");
2733
- }
2734
-
2735
- eventType = events[ type ];
2736
-
2737
- if ( !eventType ) {
2738
- continue;
2739
- }
2740
-
2741
- if ( !handler ) {
2742
- for ( j = 0; j < eventType.length; j++ ) {
2743
- handleObj = eventType[ j ];
2744
-
2745
- if ( all || namespace.test( handleObj.namespace ) ) {
2746
- jQuery.event.remove( elem, origType, handleObj.handler, j );
2747
- eventType.splice( j--, 1 );
2748
- }
2749
- }
2750
-
2751
- continue;
2752
- }
2753
-
2754
- special = jQuery.event.special[ type ] || {};
2755
-
2756
- for ( j = pos || 0; j < eventType.length; j++ ) {
2757
- handleObj = eventType[ j ];
2758
-
2759
- if ( handler.guid === handleObj.guid ) {
2760
- // remove the given handler for the given type
2761
- if ( all || namespace.test( handleObj.namespace ) ) {
2762
- if ( pos == null ) {
2763
- eventType.splice( j--, 1 );
2764
- }
2765
-
2766
- if ( special.remove ) {
2767
- special.remove.call( elem, handleObj );
2768
- }
2769
- }
2770
-
2771
- if ( pos != null ) {
2772
- break;
2773
- }
2774
- }
2775
- }
2776
-
2777
- // remove generic event handler if no more handlers exist
2778
- if ( eventType.length === 0 || pos != null && eventType.length === 1 ) {
2779
- if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
2780
- jQuery.removeEvent( elem, type, elemData.handle );
2781
- }
2782
-
2783
- ret = null;
2784
- delete events[ type ];
2785
- }
2786
- }
2787
-
2788
- // Remove the expando if it's no longer used
2789
- if ( jQuery.isEmptyObject( events ) ) {
2790
- var handle = elemData.handle;
2791
- if ( handle ) {
2792
- handle.elem = null;
2793
- }
2794
-
2795
- delete elemData.events;
2796
- delete elemData.handle;
2797
-
2798
- if ( jQuery.isEmptyObject( elemData ) ) {
2799
- jQuery.removeData( elem, undefined, true );
2800
- }
2801
- }
2802
- },
2803
-
2804
- // Events that are safe to short-circuit if no handlers are attached.
2805
- // Native DOM events should not be added, they may have inline handlers.
2806
- customEvent: {
2807
- "getData": true,
2808
- "setData": true,
2809
- "changeData": true
2810
- },
2811
-
2812
- trigger: function( event, data, elem, onlyHandlers ) {
2813
- // Event object or event type
2814
- var type = event.type || event,
2815
- namespaces = [],
2816
- exclusive;
2817
-
2818
- if ( type.indexOf("!") >= 0 ) {
2819
- // Exclusive events trigger only for the exact event (no namespaces)
2820
- type = type.slice(0, -1);
2821
- exclusive = true;
2822
- }
2823
-
2824
- if ( type.indexOf(".") >= 0 ) {
2825
- // Namespaced trigger; create a regexp to match event type in handle()
2826
- namespaces = type.split(".");
2827
- type = namespaces.shift();
2828
- namespaces.sort();
2829
- }
2830
-
2831
- if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
2832
- // No jQuery handlers for this event type, and it can't have inline handlers
2833
- return;
2834
- }
2835
-
2836
- // Caller can pass in an Event, Object, or just an event type string
2837
- event = typeof event === "object" ?
2838
- // jQuery.Event object
2839
- event[ jQuery.expando ] ? event :
2840
- // Object literal
2841
- new jQuery.Event( type, event ) :
2842
- // Just the event type (string)
2843
- new jQuery.Event( type );
2844
-
2845
- event.type = type;
2846
- event.exclusive = exclusive;
2847
- event.namespace = namespaces.join(".");
2848
- event.namespace_re = new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)");
2849
-
2850
- // triggerHandler() and global events don't bubble or run the default action
2851
- if ( onlyHandlers || !elem ) {
2852
- event.preventDefault();
2853
- event.stopPropagation();
2854
- }
2855
-
2856
- // Handle a global trigger
2857
- if ( !elem ) {
2858
- // TODO: Stop taunting the data cache; remove global events and always attach to document
2859
- jQuery.each( jQuery.cache, function() {
2860
- // internalKey variable is just used to make it easier to find
2861
- // and potentially change this stuff later; currently it just
2862
- // points to jQuery.expando
2863
- var internalKey = jQuery.expando,
2864
- internalCache = this[ internalKey ];
2865
- if ( internalCache && internalCache.events && internalCache.events[ type ] ) {
2866
- jQuery.event.trigger( event, data, internalCache.handle.elem );
2867
- }
2868
- });
2869
- return;
2870
- }
2871
-
2872
- // Don't do events on text and comment nodes
2873
- if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
2874
- return;
2875
- }
2876
-
2877
- // Clean up the event in case it is being reused
2878
- event.result = undefined;
2879
- event.target = elem;
2880
-
2881
- // Clone any incoming data and prepend the event, creating the handler arg list
2882
- data = data != null ? jQuery.makeArray( data ) : [];
2883
- data.unshift( event );
2884
-
2885
- var cur = elem,
2886
- // IE doesn't like method names with a colon (#3533, #8272)
2887
- ontype = type.indexOf(":") < 0 ? "on" + type : "";
2888
-
2889
- // Fire event on the current element, then bubble up the DOM tree
2890
- do {
2891
- var handle = jQuery._data( cur, "handle" );
2892
-
2893
- event.currentTarget = cur;
2894
- if ( handle ) {
2895
- handle.apply( cur, data );
2896
- }
2897
-
2898
- // Trigger an inline bound script
2899
- if ( ontype && jQuery.acceptData( cur ) && cur[ ontype ] && cur[ ontype ].apply( cur, data ) === false ) {
2900
- event.result = false;
2901
- event.preventDefault();
2902
- }
2903
-
2904
- // Bubble up to document, then to window
2905
- cur = cur.parentNode || cur.ownerDocument || cur === event.target.ownerDocument && window;
2906
- } while ( cur && !event.isPropagationStopped() );
2907
-
2908
- // If nobody prevented the default action, do it now
2909
- if ( !event.isDefaultPrevented() ) {
2910
- var old,
2911
- special = jQuery.event.special[ type ] || {};
2912
-
2913
- if ( (!special._default || special._default.call( elem.ownerDocument, event ) === false) &&
2914
- !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
2915
-
2916
- // Call a native DOM method on the target with the same name name as the event.
2917
- // Can't use an .isFunction)() check here because IE6/7 fails that test.
2918
- // IE<9 dies on focus to hidden element (#1486), may want to revisit a try/catch.
2919
- try {
2920
- if ( ontype && elem[ type ] ) {
2921
- // Don't re-trigger an onFOO event when we call its FOO() method
2922
- old = elem[ ontype ];
2923
-
2924
- if ( old ) {
2925
- elem[ ontype ] = null;
2926
- }
2927
-
2928
- jQuery.event.triggered = type;
2929
- elem[ type ]();
2930
- }
2931
- } catch ( ieError ) {}
2932
-
2933
- if ( old ) {
2934
- elem[ ontype ] = old;
2935
- }
2936
-
2937
- jQuery.event.triggered = undefined;
2938
- }
2939
- }
2940
-
2941
- return event.result;
2942
- },
2943
-
2944
- handle: function( event ) {
2945
- event = jQuery.event.fix( event || window.event );
2946
- // Snapshot the handlers list since a called handler may add/remove events.
2947
- var handlers = ((jQuery._data( this, "events" ) || {})[ event.type ] || []).slice(0),
2948
- run_all = !event.exclusive && !event.namespace,
2949
- args = Array.prototype.slice.call( arguments, 0 );
2950
-
2951
- // Use the fix-ed Event rather than the (read-only) native event
2952
- args[0] = event;
2953
- event.currentTarget = this;
2954
-
2955
- for ( var j = 0, l = handlers.length; j < l; j++ ) {
2956
- var handleObj = handlers[ j ];
2957
-
2958
- // Triggered event must 1) be non-exclusive and have no namespace, or
2959
- // 2) have namespace(s) a subset or equal to those in the bound event.
2960
- if ( run_all || event.namespace_re.test( handleObj.namespace ) ) {
2961
- // Pass in a reference to the handler function itself
2962
- // So that we can later remove it
2963
- event.handler = handleObj.handler;
2964
- event.data = handleObj.data;
2965
- event.handleObj = handleObj;
2966
-
2967
- var ret = handleObj.handler.apply( this, args );
2968
-
2969
- if ( ret !== undefined ) {
2970
- event.result = ret;
2971
- if ( ret === false ) {
2972
- event.preventDefault();
2973
- event.stopPropagation();
2974
- }
2975
- }
2976
-
2977
- if ( event.isImmediatePropagationStopped() ) {
2978
- break;
2979
- }
2980
- }
2981
- }
2982
- return event.result;
2983
- },
2984
-
2985
- props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
2986
-
2987
- fix: function( event ) {
2988
- if ( event[ jQuery.expando ] ) {
2989
- return event;
2990
- }
2991
-
2992
- // store a copy of the original event object
2993
- // and "clone" to set read-only properties
2994
- var originalEvent = event;
2995
- event = jQuery.Event( originalEvent );
2996
-
2997
- for ( var i = this.props.length, prop; i; ) {
2998
- prop = this.props[ --i ];
2999
- event[ prop ] = originalEvent[ prop ];
3000
- }
3001
-
3002
- // Fix target property, if necessary
3003
- if ( !event.target ) {
3004
- // Fixes #1925 where srcElement might not be defined either
3005
- event.target = event.srcElement || document;
3006
- }
3007
-
3008
- // check if target is a textnode (safari)
3009
- if ( event.target.nodeType === 3 ) {
3010
- event.target = event.target.parentNode;
3011
- }
3012
-
3013
- // Add relatedTarget, if necessary
3014
- if ( !event.relatedTarget && event.fromElement ) {
3015
- event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;
3016
- }
3017
-
3018
- // Calculate pageX/Y if missing and clientX/Y available
3019
- if ( event.pageX == null && event.clientX != null ) {
3020
- var eventDocument = event.target.ownerDocument || document,
3021
- doc = eventDocument.documentElement,
3022
- body = eventDocument.body;
3023
-
3024
- event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
3025
- event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
3026
- }
3027
-
3028
- // Add which for key events
3029
- if ( event.which == null && (event.charCode != null || event.keyCode != null) ) {
3030
- event.which = event.charCode != null ? event.charCode : event.keyCode;
3031
- }
3032
-
3033
- // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
3034
- if ( !event.metaKey && event.ctrlKey ) {
3035
- event.metaKey = event.ctrlKey;
3036
- }
3037
-
3038
- // Add which for click: 1 === left; 2 === middle; 3 === right
3039
- // Note: button is not normalized, so don't use it
3040
- if ( !event.which && event.button !== undefined ) {
3041
- event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
3042
- }
3043
-
3044
- return event;
3045
- },
3046
-
3047
- // Deprecated, use jQuery.guid instead
3048
- guid: 1E8,
3049
-
3050
- // Deprecated, use jQuery.proxy instead
3051
- proxy: jQuery.proxy,
3052
-
3053
- special: {
3054
- ready: {
3055
- // Make sure the ready event is setup
3056
- setup: jQuery.bindReady,
3057
- teardown: jQuery.noop
3058
- },
3059
-
3060
- live: {
3061
- add: function( handleObj ) {
3062
- jQuery.event.add( this,
3063
- liveConvert( handleObj.origType, handleObj.selector ),
3064
- jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) );
3065
- },
3066
-
3067
- remove: function( handleObj ) {
3068
- jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj );
3069
- }
3070
- },
3071
-
3072
- beforeunload: {
3073
- setup: function( data, namespaces, eventHandle ) {
3074
- // We only want to do this special case on windows
3075
- if ( jQuery.isWindow( this ) ) {
3076
- this.onbeforeunload = eventHandle;
3077
- }
3078
- },
3079
-
3080
- teardown: function( namespaces, eventHandle ) {
3081
- if ( this.onbeforeunload === eventHandle ) {
3082
- this.onbeforeunload = null;
3083
- }
3084
- }
3085
- }
3086
- }
3087
- };
3088
-
3089
- jQuery.removeEvent = document.removeEventListener ?
3090
- function( elem, type, handle ) {
3091
- if ( elem.removeEventListener ) {
3092
- elem.removeEventListener( type, handle, false );
3093
- }
3094
- } :
3095
- function( elem, type, handle ) {
3096
- if ( elem.detachEvent ) {
3097
- elem.detachEvent( "on" + type, handle );
3098
- }
3099
- };
3100
-
3101
- jQuery.Event = function( src, props ) {
3102
- // Allow instantiation without the 'new' keyword
3103
- if ( !this.preventDefault ) {
3104
- return new jQuery.Event( src, props );
3105
- }
3106
-
3107
- // Event object
3108
- if ( src && src.type ) {
3109
- this.originalEvent = src;
3110
- this.type = src.type;
3111
-
3112
- // Events bubbling up the document may have been marked as prevented
3113
- // by a handler lower down the tree; reflect the correct value.
3114
- this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false ||
3115
- src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse;
3116
-
3117
- // Event type
3118
- } else {
3119
- this.type = src;
3120
- }
3121
-
3122
- // Put explicitly provided properties onto the event object
3123
- if ( props ) {
3124
- jQuery.extend( this, props );
3125
- }
3126
-
3127
- // timeStamp is buggy for some events on Firefox(#3843)
3128
- // So we won't rely on the native value
3129
- this.timeStamp = jQuery.now();
3130
-
3131
- // Mark it as fixed
3132
- this[ jQuery.expando ] = true;
3133
- };
3134
-
3135
- function returnFalse() {
3136
- return false;
3137
- }
3138
- function returnTrue() {
3139
- return true;
3140
- }
3141
-
3142
- // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
3143
- // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
3144
- jQuery.Event.prototype = {
3145
- preventDefault: function() {
3146
- this.isDefaultPrevented = returnTrue;
3147
-
3148
- var e = this.originalEvent;
3149
- if ( !e ) {
3150
- return;
3151
- }
3152
-
3153
- // if preventDefault exists run it on the original event
3154
- if ( e.preventDefault ) {
3155
- e.preventDefault();
3156
-
3157
- // otherwise set the returnValue property of the original event to false (IE)
3158
- } else {
3159
- e.returnValue = false;
3160
- }
3161
- },
3162
- stopPropagation: function() {
3163
- this.isPropagationStopped = returnTrue;
3164
-
3165
- var e = this.originalEvent;
3166
- if ( !e ) {
3167
- return;
3168
- }
3169
- // if stopPropagation exists run it on the original event
3170
- if ( e.stopPropagation ) {
3171
- e.stopPropagation();
3172
- }
3173
- // otherwise set the cancelBubble property of the original event to true (IE)
3174
- e.cancelBubble = true;
3175
- },
3176
- stopImmediatePropagation: function() {
3177
- this.isImmediatePropagationStopped = returnTrue;
3178
- this.stopPropagation();
3179
- },
3180
- isDefaultPrevented: returnFalse,
3181
- isPropagationStopped: returnFalse,
3182
- isImmediatePropagationStopped: returnFalse
3183
- };
3184
-
3185
- // Checks if an event happened on an element within another element
3186
- // Used in jQuery.event.special.mouseenter and mouseleave handlers
3187
- var withinElement = function( event ) {
3188
-
3189
- // Check if mouse(over|out) are still within the same parent element
3190
- var related = event.relatedTarget,
3191
- inside = false,
3192
- eventType = event.type;
3193
-
3194
- event.type = event.data;
3195
-
3196
- if ( related !== this ) {
3197
-
3198
- if ( related ) {
3199
- inside = jQuery.contains( this, related );
3200
- }
3201
-
3202
- if ( !inside ) {
3203
-
3204
- jQuery.event.handle.apply( this, arguments );
3205
-
3206
- event.type = eventType;
3207
- }
3208
- }
3209
- },
3210
-
3211
- // In case of event delegation, we only need to rename the event.type,
3212
- // liveHandler will take care of the rest.
3213
- delegate = function( event ) {
3214
- event.type = event.data;
3215
- jQuery.event.handle.apply( this, arguments );
3216
- };
3217
-
3218
- // Create mouseenter and mouseleave events
3219
- jQuery.each({
3220
- mouseenter: "mouseover",
3221
- mouseleave: "mouseout"
3222
- }, function( orig, fix ) {
3223
- jQuery.event.special[ orig ] = {
3224
- setup: function( data ) {
3225
- jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig );
3226
- },
3227
- teardown: function( data ) {
3228
- jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement );
3229
- }
3230
- };
3231
- });
3232
-
3233
- // submit delegation
3234
- if ( !jQuery.support.submitBubbles ) {
3235
-
3236
- jQuery.event.special.submit = {
3237
- setup: function( data, namespaces ) {
3238
- if ( !jQuery.nodeName( this, "form" ) ) {
3239
- jQuery.event.add(this, "click.specialSubmit", function( e ) {
3240
- var elem = e.target,
3241
- type = elem.type;
3242
-
3243
- if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
3244
- trigger( "submit", this, arguments );
3245
- }
3246
- });
3247
-
3248
- jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
3249
- var elem = e.target,
3250
- type = elem.type;
3251
-
3252
- if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
3253
- trigger( "submit", this, arguments );
3254
- }
3255
- });
3256
-
3257
- } else {
3258
- return false;
3259
- }
3260
- },
3261
-
3262
- teardown: function( namespaces ) {
3263
- jQuery.event.remove( this, ".specialSubmit" );
3264
- }
3265
- };
3266
-
3267
- }
3268
-
3269
- // change delegation, happens here so we have bind.
3270
- if ( !jQuery.support.changeBubbles ) {
3271
-
3272
- var changeFilters,
3273
-
3274
- getVal = function( elem ) {
3275
- var type = elem.type, val = elem.value;
3276
-
3277
- if ( type === "radio" || type === "checkbox" ) {
3278
- val = elem.checked;
3279
-
3280
- } else if ( type === "select-multiple" ) {
3281
- val = elem.selectedIndex > -1 ?
3282
- jQuery.map( elem.options, function( elem ) {
3283
- return elem.selected;
3284
- }).join("-") :
3285
- "";
3286
-
3287
- } else if ( jQuery.nodeName( elem, "select" ) ) {
3288
- val = elem.selectedIndex;
3289
- }
3290
-
3291
- return val;
3292
- },
3293
-
3294
- testChange = function testChange( e ) {
3295
- var elem = e.target, data, val;
3296
-
3297
- if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) {
3298
- return;
3299
- }
3300
-
3301
- data = jQuery._data( elem, "_change_data" );
3302
- val = getVal(elem);
3303
-
3304
- // the current data will be also retrieved by beforeactivate
3305
- if ( e.type !== "focusout" || elem.type !== "radio" ) {
3306
- jQuery._data( elem, "_change_data", val );
3307
- }
3308
-
3309
- if ( data === undefined || val === data ) {
3310
- return;
3311
- }
3312
-
3313
- if ( data != null || val ) {
3314
- e.type = "change";
3315
- e.liveFired = undefined;
3316
- jQuery.event.trigger( e, arguments[1], elem );
3317
- }
3318
- };
3319
-
3320
- jQuery.event.special.change = {
3321
- filters: {
3322
- focusout: testChange,
3323
-
3324
- beforedeactivate: testChange,
3325
-
3326
- click: function( e ) {
3327
- var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
3328
-
3329
- if ( type === "radio" || type === "checkbox" || jQuery.nodeName( elem, "select" ) ) {
3330
- testChange.call( this, e );
3331
- }
3332
- },
3333
-
3334
- // Change has to be called before submit
3335
- // Keydown will be called before keypress, which is used in submit-event delegation
3336
- keydown: function( e ) {
3337
- var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
3338
-
3339
- if ( (e.keyCode === 13 && !jQuery.nodeName( elem, "textarea" ) ) ||
3340
- (e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
3341
- type === "select-multiple" ) {
3342
- testChange.call( this, e );
3343
- }
3344
- },
3345
-
3346
- // Beforeactivate happens also before the previous element is blurred
3347
- // with this event you can't trigger a change event, but you can store
3348
- // information
3349
- beforeactivate: function( e ) {
3350
- var elem = e.target;
3351
- jQuery._data( elem, "_change_data", getVal(elem) );
3352
- }
3353
- },
3354
-
3355
- setup: function( data, namespaces ) {
3356
- if ( this.type === "file" ) {
3357
- return false;
3358
- }
3359
-
3360
- for ( var type in changeFilters ) {
3361
- jQuery.event.add( this, type + ".specialChange", changeFilters[type] );
3362
- }
3363
-
3364
- return rformElems.test( this.nodeName );
3365
- },
3366
-
3367
- teardown: function( namespaces ) {
3368
- jQuery.event.remove( this, ".specialChange" );
3369
-
3370
- return rformElems.test( this.nodeName );
3371
- }
3372
- };
3373
-
3374
- changeFilters = jQuery.event.special.change.filters;
3375
-
3376
- // Handle when the input is .focus()'d
3377
- changeFilters.focus = changeFilters.beforeactivate;
3378
- }
3379
-
3380
- function trigger( type, elem, args ) {
3381
- // Piggyback on a donor event to simulate a different one.
3382
- // Fake originalEvent to avoid donor's stopPropagation, but if the
3383
- // simulated event prevents default then we do the same on the donor.
3384
- // Don't pass args or remember liveFired; they apply to the donor event.
3385
- var event = jQuery.extend( {}, args[ 0 ] );
3386
- event.type = type;
3387
- event.originalEvent = {};
3388
- event.liveFired = undefined;
3389
- jQuery.event.handle.call( elem, event );
3390
- if ( event.isDefaultPrevented() ) {
3391
- args[ 0 ].preventDefault();
3392
- }
3393
- }
3394
-
3395
- // Create "bubbling" focus and blur events
3396
- if ( !jQuery.support.focusinBubbles ) {
3397
- jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
3398
-
3399
- // Attach a single capturing handler while someone wants focusin/focusout
3400
- var attaches = 0;
3401
-
3402
- jQuery.event.special[ fix ] = {
3403
- setup: function() {
3404
- if ( attaches++ === 0 ) {
3405
- document.addEventListener( orig, handler, true );
3406
- }
3407
- },
3408
- teardown: function() {
3409
- if ( --attaches === 0 ) {
3410
- document.removeEventListener( orig, handler, true );
3411
- }
3412
- }
3413
- };
3414
-
3415
- function handler( donor ) {
3416
- // Donor event is always a native one; fix it and switch its type.
3417
- // Let focusin/out handler cancel the donor focus/blur event.
3418
- var e = jQuery.event.fix( donor );
3419
- e.type = fix;
3420
- e.originalEvent = {};
3421
- jQuery.event.trigger( e, null, e.target );
3422
- if ( e.isDefaultPrevented() ) {
3423
- donor.preventDefault();
3424
- }
3425
- }
3426
- });
3427
- }
3428
-
3429
- jQuery.each(["bind", "one"], function( i, name ) {
3430
- jQuery.fn[ name ] = function( type, data, fn ) {
3431
- var handler;
3432
-
3433
- // Handle object literals
3434
- if ( typeof type === "object" ) {
3435
- for ( var key in type ) {
3436
- this[ name ](key, data, type[key], fn);
3437
- }
3438
- return this;
3439
- }
3440
-
3441
- if ( arguments.length === 2 || data === false ) {
3442
- fn = data;
3443
- data = undefined;
3444
- }
3445
-
3446
- if ( name === "one" ) {
3447
- handler = function( event ) {
3448
- jQuery( this ).unbind( event, handler );
3449
- return fn.apply( this, arguments );
3450
- };
3451
- handler.guid = fn.guid || jQuery.guid++;
3452
- } else {
3453
- handler = fn;
3454
- }
3455
-
3456
- if ( type === "unload" && name !== "one" ) {
3457
- this.one( type, data, fn );
3458
-
3459
- } else {
3460
- for ( var i = 0, l = this.length; i < l; i++ ) {
3461
- jQuery.event.add( this[i], type, handler, data );
3462
- }
3463
- }
3464
-
3465
- return this;
3466
- };
3467
- });
3468
-
3469
- jQuery.fn.extend({
3470
- unbind: function( type, fn ) {
3471
- // Handle object literals
3472
- if ( typeof type === "object" && !type.preventDefault ) {
3473
- for ( var key in type ) {
3474
- this.unbind(key, type[key]);
3475
- }
3476
-
3477
- } else {
3478
- for ( var i = 0, l = this.length; i < l; i++ ) {
3479
- jQuery.event.remove( this[i], type, fn );
3480
- }
3481
- }
3482
-
3483
- return this;
3484
- },
3485
-
3486
- delegate: function( selector, types, data, fn ) {
3487
- return this.live( types, data, fn, selector );
3488
- },
3489
-
3490
- undelegate: function( selector, types, fn ) {
3491
- if ( arguments.length === 0 ) {
3492
- return this.unbind( "live" );
3493
-
3494
- } else {
3495
- return this.die( types, null, fn, selector );
3496
- }
3497
- },
3498
-
3499
- trigger: function( type, data ) {
3500
- return this.each(function() {
3501
- jQuery.event.trigger( type, data, this );
3502
- });
3503
- },
3504
-
3505
- triggerHandler: function( type, data ) {
3506
- if ( this[0] ) {
3507
- return jQuery.event.trigger( type, data, this[0], true );
3508
- }
3509
- },
3510
-
3511
- toggle: function( fn ) {
3512
- // Save reference to arguments for access in closure
3513
- var args = arguments,
3514
- guid = fn.guid || jQuery.guid++,
3515
- i = 0,
3516
- toggler = function( event ) {
3517
- // Figure out which function to execute
3518
- var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i;
3519
- jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 );
3520
-
3521
- // Make sure that clicks stop
3522
- event.preventDefault();
3523
-
3524
- // and execute the function
3525
- return args[ lastToggle ].apply( this, arguments ) || false;
3526
- };
3527
-
3528
- // link all the functions, so any of them can unbind this click handler
3529
- toggler.guid = guid;
3530
- while ( i < args.length ) {
3531
- args[ i++ ].guid = guid;
3532
- }
3533
-
3534
- return this.click( toggler );
3535
- },
3536
-
3537
- hover: function( fnOver, fnOut ) {
3538
- return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
3539
- }
3540
- });
3541
-
3542
- var liveMap = {
3543
- focus: "focusin",
3544
- blur: "focusout",
3545
- mouseenter: "mouseover",
3546
- mouseleave: "mouseout"
3547
- };
3548
-
3549
- jQuery.each(["live", "die"], function( i, name ) {
3550
- jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) {
3551
- var type, i = 0, match, namespaces, preType,
3552
- selector = origSelector || this.selector,
3553
- context = origSelector ? this : jQuery( this.context );
3554
-
3555
- if ( typeof types === "object" && !types.preventDefault ) {
3556
- for ( var key in types ) {
3557
- context[ name ]( key, data, types[key], selector );
3558
- }
3559
-
3560
- return this;
3561
- }
3562
-
3563
- if ( name === "die" && !types &&
3564
- origSelector && origSelector.charAt(0) === "." ) {
3565
-
3566
- context.unbind( origSelector );
3567
-
3568
- return this;
3569
- }
3570
-
3571
- if ( data === false || jQuery.isFunction( data ) ) {
3572
- fn = data || returnFalse;
3573
- data = undefined;
3574
- }
3575
-
3576
- types = (types || "").split(" ");
3577
-
3578
- while ( (type = types[ i++ ]) != null ) {
3579
- match = rnamespaces.exec( type );
3580
- namespaces = "";
3581
-
3582
- if ( match ) {
3583
- namespaces = match[0];
3584
- type = type.replace( rnamespaces, "" );
3585
- }
3586
-
3587
- if ( type === "hover" ) {
3588
- types.push( "mouseenter" + namespaces, "mouseleave" + namespaces );
3589
- continue;
3590
- }
3591
-
3592
- preType = type;
3593
-
3594
- if ( liveMap[ type ] ) {
3595
- types.push( liveMap[ type ] + namespaces );
3596
- type = type + namespaces;
3597
-
3598
- } else {
3599
- type = (liveMap[ type ] || type) + namespaces;
3600
- }
3601
-
3602
- if ( name === "live" ) {
3603
- // bind live handler
3604
- for ( var j = 0, l = context.length; j < l; j++ ) {
3605
- jQuery.event.add( context[j], "live." + liveConvert( type, selector ),
3606
- { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } );
3607
- }
3608
-
3609
- } else {
3610
- // unbind live handler
3611
- context.unbind( "live." + liveConvert( type, selector ), fn );
3612
- }
3613
- }
3614
-
3615
- return this;
3616
- };
3617
- });
3618
-
3619
- function liveHandler( event ) {
3620
- var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret,
3621
- elems = [],
3622
- selectors = [],
3623
- events = jQuery._data( this, "events" );
3624
-
3625
- // Make sure we avoid non-left-click bubbling in Firefox (#3861) and disabled elements in IE (#6911)
3626
- if ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === "click" ) {
3627
- return;
3628
- }
3629
-
3630
- if ( event.namespace ) {
3631
- namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)");
3632
- }
3633
-
3634
- event.liveFired = this;
3635
-
3636
- var live = events.live.slice(0);
3637
-
3638
- for ( j = 0; j < live.length; j++ ) {
3639
- handleObj = live[j];
3640
-
3641
- if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) {
3642
- selectors.push( handleObj.selector );
3643
-
3644
- } else {
3645
- live.splice( j--, 1 );
3646
- }
3647
- }
3648
-
3649
- match = jQuery( event.target ).closest( selectors, event.currentTarget );
3650
-
3651
- for ( i = 0, l = match.length; i < l; i++ ) {
3652
- close = match[i];
3653
-
3654
- for ( j = 0; j < live.length; j++ ) {
3655
- handleObj = live[j];
3656
-
3657
- if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) && !close.elem.disabled ) {
3658
- elem = close.elem;
3659
- related = null;
3660
-
3661
- // Those two events require additional checking
3662
- if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) {
3663
- event.type = handleObj.preType;
3664
- related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0];
3665
-
3666
- // Make sure not to accidentally match a child element with the same selector
3667
- if ( related && jQuery.contains( elem, related ) ) {
3668
- related = elem;
3669
- }
3670
- }
3671
-
3672
- if ( !related || related !== elem ) {
3673
- elems.push({ elem: elem, handleObj: handleObj, level: close.level });
3674
- }
3675
- }
3676
- }
3677
- }
3678
-
3679
- for ( i = 0, l = elems.length; i < l; i++ ) {
3680
- match = elems[i];
3681
-
3682
- if ( maxLevel && match.level > maxLevel ) {
3683
- break;
3684
- }
3685
-
3686
- event.currentTarget = match.elem;
3687
- event.data = match.handleObj.data;
3688
- event.handleObj = match.handleObj;
3689
-
3690
- ret = match.handleObj.origHandler.apply( match.elem, arguments );
3691
-
3692
- if ( ret === false || event.isPropagationStopped() ) {
3693
- maxLevel = match.level;
3694
-
3695
- if ( ret === false ) {
3696
- stop = false;
3697
- }
3698
- if ( event.isImmediatePropagationStopped() ) {
3699
- break;
3700
- }
3701
- }
3702
- }
3703
-
3704
- return stop;
3705
- }
3706
-
3707
- function liveConvert( type, selector ) {
3708
- return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspaces, "&");
3709
- }
3710
-
3711
- jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
3712
- "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
3713
- "change select submit keydown keypress keyup error").split(" "), function( i, name ) {
3714
-
3715
- // Handle event binding
3716
- jQuery.fn[ name ] = function( data, fn ) {
3717
- if ( fn == null ) {
3718
- fn = data;
3719
- data = null;
3720
- }
3721
-
3722
- return arguments.length > 0 ?
3723
- this.bind( name, data, fn ) :
3724
- this.trigger( name );
3725
- };
3726
-
3727
- if ( jQuery.attrFn ) {
3728
- jQuery.attrFn[ name ] = true;
3729
- }
3730
- });
3731
-
3732
-
3733
-
3734
- /*!
3735
- * Sizzle CSS Selector Engine
3736
- * Copyright 2011, The Dojo Foundation
3737
- * Released under the MIT, BSD, and GPL Licenses.
3738
- * More information: http://sizzlejs.com/
3739
- */
3740
- (function(){
3741
-
3742
- var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
3743
- done = 0,
3744
- toString = Object.prototype.toString,
3745
- hasDuplicate = false,
3746
- baseHasDuplicate = true,
3747
- rBackslash = /\\/g,
3748
- rNonWord = /\W/;
3749
-
3750
- // Here we check if the JavaScript engine is using some sort of
3751
- // optimization where it does not always call our comparision
3752
- // function. If that is the case, discard the hasDuplicate value.
3753
- // Thus far that includes Google Chrome.
3754
- [0, 0].sort(function() {
3755
- baseHasDuplicate = false;
3756
- return 0;
3757
- });
3758
-
3759
- var Sizzle = function( selector, context, results, seed ) {
3760
- results = results || [];
3761
- context = context || document;
3762
-
3763
- var origContext = context;
3764
-
3765
- if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
3766
- return [];
3767
- }
3768
-
3769
- if ( !selector || typeof selector !== "string" ) {
3770
- return results;
3771
- }
3772
-
3773
- var m, set, checkSet, extra, ret, cur, pop, i,
3774
- prune = true,
3775
- contextXML = Sizzle.isXML( context ),
3776
- parts = [],
3777
- soFar = selector;
3778
-
3779
- // Reset the position of the chunker regexp (start from head)
3780
- do {
3781
- chunker.exec( "" );
3782
- m = chunker.exec( soFar );
3783
-
3784
- if ( m ) {
3785
- soFar = m[3];
3786
-
3787
- parts.push( m[1] );
3788
-
3789
- if ( m[2] ) {
3790
- extra = m[3];
3791
- break;
3792
- }
3793
- }
3794
- } while ( m );
3795
-
3796
- if ( parts.length > 1 && origPOS.exec( selector ) ) {
3797
-
3798
- if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
3799
- set = posProcess( parts[0] + parts[1], context );
3800
-
3801
- } else {
3802
- set = Expr.relative[ parts[0] ] ?
3803
- [ context ] :
3804
- Sizzle( parts.shift(), context );
3805
-
3806
- while ( parts.length ) {
3807
- selector = parts.shift();
3808
-
3809
- if ( Expr.relative[ selector ] ) {
3810
- selector += parts.shift();
3811
- }
3812
-
3813
- set = posProcess( selector, set );
3814
- }
3815
- }
3816
-
3817
- } else {
3818
- // Take a shortcut and set the context if the root selector is an ID
3819
- // (but not if it'll be faster if the inner selector is an ID)
3820
- if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
3821
- Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
3822
-
3823
- ret = Sizzle.find( parts.shift(), context, contextXML );
3824
- context = ret.expr ?
3825
- Sizzle.filter( ret.expr, ret.set )[0] :
3826
- ret.set[0];
3827
- }
3828
-
3829
- if ( context ) {
3830
- ret = seed ?
3831
- { expr: parts.pop(), set: makeArray(seed) } :
3832
- Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
3833
-
3834
- set = ret.expr ?
3835
- Sizzle.filter( ret.expr, ret.set ) :
3836
- ret.set;
3837
-
3838
- if ( parts.length > 0 ) {
3839
- checkSet = makeArray( set );
3840
-
3841
- } else {
3842
- prune = false;
3843
- }
3844
-
3845
- while ( parts.length ) {
3846
- cur = parts.pop();
3847
- pop = cur;
3848
-
3849
- if ( !Expr.relative[ cur ] ) {
3850
- cur = "";
3851
- } else {
3852
- pop = parts.pop();
3853
- }
3854
-
3855
- if ( pop == null ) {
3856
- pop = context;
3857
- }
3858
-
3859
- Expr.relative[ cur ]( checkSet, pop, contextXML );
3860
- }
3861
-
3862
- } else {
3863
- checkSet = parts = [];
3864
- }
3865
- }
3866
-
3867
- if ( !checkSet ) {
3868
- checkSet = set;
3869
- }
3870
-
3871
- if ( !checkSet ) {
3872
- Sizzle.error( cur || selector );
3873
- }
3874
-
3875
- if ( toString.call(checkSet) === "[object Array]" ) {
3876
- if ( !prune ) {
3877
- results.push.apply( results, checkSet );
3878
-
3879
- } else if ( context && context.nodeType === 1 ) {
3880
- for ( i = 0; checkSet[i] != null; i++ ) {
3881
- if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
3882
- results.push( set[i] );
3883
- }
3884
- }
3885
-
3886
- } else {
3887
- for ( i = 0; checkSet[i] != null; i++ ) {
3888
- if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
3889
- results.push( set[i] );
3890
- }
3891
- }
3892
- }
3893
-
3894
- } else {
3895
- makeArray( checkSet, results );
3896
- }
3897
-
3898
- if ( extra ) {
3899
- Sizzle( extra, origContext, results, seed );
3900
- Sizzle.uniqueSort( results );
3901
- }
3902
-
3903
- return results;
3904
- };
3905
-
3906
- Sizzle.uniqueSort = function( results ) {
3907
- if ( sortOrder ) {
3908
- hasDuplicate = baseHasDuplicate;
3909
- results.sort( sortOrder );
3910
-
3911
- if ( hasDuplicate ) {
3912
- for ( var i = 1; i < results.length; i++ ) {
3913
- if ( results[i] === results[ i - 1 ] ) {
3914
- results.splice( i--, 1 );
3915
- }
3916
- }
3917
- }
3918
- }
3919
-
3920
- return results;
3921
- };
3922
-
3923
- Sizzle.matches = function( expr, set ) {
3924
- return Sizzle( expr, null, null, set );
3925
- };
3926
-
3927
- Sizzle.matchesSelector = function( node, expr ) {
3928
- return Sizzle( expr, null, null, [node] ).length > 0;
3929
- };
3930
-
3931
- Sizzle.find = function( expr, context, isXML ) {
3932
- var set;
3933
-
3934
- if ( !expr ) {
3935
- return [];
3936
- }
3937
-
3938
- for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
3939
- var match,
3940
- type = Expr.order[i];
3941
-
3942
- if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
3943
- var left = match[1];
3944
- match.splice( 1, 1 );
3945
-
3946
- if ( left.substr( left.length - 1 ) !== "\\" ) {
3947
- match[1] = (match[1] || "").replace( rBackslash, "" );
3948
- set = Expr.find[ type ]( match, context, isXML );
3949
-
3950
- if ( set != null ) {
3951
- expr = expr.replace( Expr.match[ type ], "" );
3952
- break;
3953
- }
3954
- }
3955
- }
3956
- }
3957
-
3958
- if ( !set ) {
3959
- set = typeof context.getElementsByTagName !== "undefined" ?
3960
- context.getElementsByTagName( "*" ) :
3961
- [];
3962
- }
3963
-
3964
- return { set: set, expr: expr };
3965
- };
3966
-
3967
- Sizzle.filter = function( expr, set, inplace, not ) {
3968
- var match, anyFound,
3969
- old = expr,
3970
- result = [],
3971
- curLoop = set,
3972
- isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
3973
-
3974
- while ( expr && set.length ) {
3975
- for ( var type in Expr.filter ) {
3976
- if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
3977
- var found, item,
3978
- filter = Expr.filter[ type ],
3979
- left = match[1];
3980
-
3981
- anyFound = false;
3982
-
3983
- match.splice(1,1);
3984
-
3985
- if ( left.substr( left.length - 1 ) === "\\" ) {
3986
- continue;
3987
- }
3988
-
3989
- if ( curLoop === result ) {
3990
- result = [];
3991
- }
3992
-
3993
- if ( Expr.preFilter[ type ] ) {
3994
- match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
3995
-
3996
- if ( !match ) {
3997
- anyFound = found = true;
3998
-
3999
- } else if ( match === true ) {
4000
- continue;
4001
- }
4002
- }
4003
-
4004
- if ( match ) {
4005
- for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
4006
- if ( item ) {
4007
- found = filter( item, match, i, curLoop );
4008
- var pass = not ^ !!found;
4009
-
4010
- if ( inplace && found != null ) {
4011
- if ( pass ) {
4012
- anyFound = true;
4013
-
4014
- } else {
4015
- curLoop[i] = false;
4016
- }
4017
-
4018
- } else if ( pass ) {
4019
- result.push( item );
4020
- anyFound = true;
4021
- }
4022
- }
4023
- }
4024
- }
4025
-
4026
- if ( found !== undefined ) {
4027
- if ( !inplace ) {
4028
- curLoop = result;
4029
- }
4030
-
4031
- expr = expr.replace( Expr.match[ type ], "" );
4032
-
4033
- if ( !anyFound ) {
4034
- return [];
4035
- }
4036
-
4037
- break;
4038
- }
4039
- }
4040
- }
4041
-
4042
- // Improper expression
4043
- if ( expr === old ) {
4044
- if ( anyFound == null ) {
4045
- Sizzle.error( expr );
4046
-
4047
- } else {
4048
- break;
4049
- }
4050
- }
4051
-
4052
- old = expr;
4053
- }
4054
-
4055
- return curLoop;
4056
- };
4057
-
4058
- Sizzle.error = function( msg ) {
4059
- throw "Syntax error, unrecognized expression: " + msg;
4060
- };
4061
-
4062
- var Expr = Sizzle.selectors = {
4063
- order: [ "ID", "NAME", "TAG" ],
4064
-
4065
- match: {
4066
- ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
4067
- CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
4068
- NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
4069
- ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
4070
- TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
4071
- CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
4072
- POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
4073
- PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
4074
- },
4075
-
4076
- leftMatch: {},
4077
-
4078
- attrMap: {
4079
- "class": "className",
4080
- "for": "htmlFor"
4081
- },
4082
-
4083
- attrHandle: {
4084
- href: function( elem ) {
4085
- return elem.getAttribute( "href" );
4086
- },
4087
- type: function( elem ) {
4088
- return elem.getAttribute( "type" );
4089
- }
4090
- },
4091
-
4092
- relative: {
4093
- "+": function(checkSet, part){
4094
- var isPartStr = typeof part === "string",
4095
- isTag = isPartStr && !rNonWord.test( part ),
4096
- isPartStrNotTag = isPartStr && !isTag;
4097
-
4098
- if ( isTag ) {
4099
- part = part.toLowerCase();
4100
- }
4101
-
4102
- for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
4103
- if ( (elem = checkSet[i]) ) {
4104
- while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
4105
-
4106
- checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
4107
- elem || false :
4108
- elem === part;
4109
- }
4110
- }
4111
-
4112
- if ( isPartStrNotTag ) {
4113
- Sizzle.filter( part, checkSet, true );
4114
- }
4115
- },
4116
-
4117
- ">": function( checkSet, part ) {
4118
- var elem,
4119
- isPartStr = typeof part === "string",
4120
- i = 0,
4121
- l = checkSet.length;
4122
-
4123
- if ( isPartStr && !rNonWord.test( part ) ) {
4124
- part = part.toLowerCase();
4125
-
4126
- for ( ; i < l; i++ ) {
4127
- elem = checkSet[i];
4128
-
4129
- if ( elem ) {
4130
- var parent = elem.parentNode;
4131
- checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
4132
- }
4133
- }
4134
-
4135
- } else {
4136
- for ( ; i < l; i++ ) {
4137
- elem = checkSet[i];
4138
-
4139
- if ( elem ) {
4140
- checkSet[i] = isPartStr ?
4141
- elem.parentNode :
4142
- elem.parentNode === part;
4143
- }
4144
- }
4145
-
4146
- if ( isPartStr ) {
4147
- Sizzle.filter( part, checkSet, true );
4148
- }
4149
- }
4150
- },
4151
-
4152
- "": function(checkSet, part, isXML){
4153
- var nodeCheck,
4154
- doneName = done++,
4155
- checkFn = dirCheck;
4156
-
4157
- if ( typeof part === "string" && !rNonWord.test( part ) ) {
4158
- part = part.toLowerCase();
4159
- nodeCheck = part;
4160
- checkFn = dirNodeCheck;
4161
- }
4162
-
4163
- checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
4164
- },
4165
-
4166
- "~": function( checkSet, part, isXML ) {
4167
- var nodeCheck,
4168
- doneName = done++,
4169
- checkFn = dirCheck;
4170
-
4171
- if ( typeof part === "string" && !rNonWord.test( part ) ) {
4172
- part = part.toLowerCase();
4173
- nodeCheck = part;
4174
- checkFn = dirNodeCheck;
4175
- }
4176
-
4177
- checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
4178
- }
4179
- },
4180
-
4181
- find: {
4182
- ID: function( match, context, isXML ) {
4183
- if ( typeof context.getElementById !== "undefined" && !isXML ) {
4184
- var m = context.getElementById(match[1]);
4185
- // Check parentNode to catch when Blackberry 4.6 returns
4186
- // nodes that are no longer in the document #6963
4187
- return m && m.parentNode ? [m] : [];
4188
- }
4189
- },
4190
-
4191
- NAME: function( match, context ) {
4192
- if ( typeof context.getElementsByName !== "undefined" ) {
4193
- var ret = [],
4194
- results = context.getElementsByName( match[1] );
4195
-
4196
- for ( var i = 0, l = results.length; i < l; i++ ) {
4197
- if ( results[i].getAttribute("name") === match[1] ) {
4198
- ret.push( results[i] );
4199
- }
4200
- }
4201
-
4202
- return ret.length === 0 ? null : ret;
4203
- }
4204
- },
4205
-
4206
- TAG: function( match, context ) {
4207
- if ( typeof context.getElementsByTagName !== "undefined" ) {
4208
- return context.getElementsByTagName( match[1] );
4209
- }
4210
- }
4211
- },
4212
- preFilter: {
4213
- CLASS: function( match, curLoop, inplace, result, not, isXML ) {
4214
- match = " " + match[1].replace( rBackslash, "" ) + " ";
4215
-
4216
- if ( isXML ) {
4217
- return match;
4218
- }
4219
-
4220
- for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
4221
- if ( elem ) {
4222
- if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) {
4223
- if ( !inplace ) {
4224
- result.push( elem );
4225
- }
4226
-
4227
- } else if ( inplace ) {
4228
- curLoop[i] = false;
4229
- }
4230
- }
4231
- }
4232
-
4233
- return false;
4234
- },
4235
-
4236
- ID: function( match ) {
4237
- return match[1].replace( rBackslash, "" );
4238
- },
4239
-
4240
- TAG: function( match, curLoop ) {
4241
- return match[1].replace( rBackslash, "" ).toLowerCase();
4242
- },
4243
-
4244
- CHILD: function( match ) {
4245
- if ( match[1] === "nth" ) {
4246
- if ( !match[2] ) {
4247
- Sizzle.error( match[0] );
4248
- }
4249
-
4250
- match[2] = match[2].replace(/^\+|\s*/g, '');
4251
-
4252
- // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
4253
- var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(
4254
- match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
4255
- !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
4256
-
4257
- // calculate the numbers (first)n+(last) including if they are negative
4258
- match[2] = (test[1] + (test[2] || 1)) - 0;
4259
- match[3] = test[3] - 0;
4260
- }
4261
- else if ( match[2] ) {
4262
- Sizzle.error( match[0] );
4263
- }
4264
-
4265
- // TODO: Move to normal caching system
4266
- match[0] = done++;
4267
-
4268
- return match;
4269
- },
4270
-
4271
- ATTR: function( match, curLoop, inplace, result, not, isXML ) {
4272
- var name = match[1] = match[1].replace( rBackslash, "" );
4273
-
4274
- if ( !isXML && Expr.attrMap[name] ) {
4275
- match[1] = Expr.attrMap[name];
4276
- }
4277
-
4278
- // Handle if an un-quoted value was used
4279
- match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" );
4280
-
4281
- if ( match[2] === "~=" ) {
4282
- match[4] = " " + match[4] + " ";
4283
- }
4284
-
4285
- return match;
4286
- },
4287
-
4288
- PSEUDO: function( match, curLoop, inplace, result, not ) {
4289
- if ( match[1] === "not" ) {
4290
- // If we're dealing with a complex expression, or a simple one
4291
- if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
4292
- match[3] = Sizzle(match[3], null, null, curLoop);
4293
-
4294
- } else {
4295
- var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
4296
-
4297
- if ( !inplace ) {
4298
- result.push.apply( result, ret );
4299
- }
4300
-
4301
- return false;
4302
- }
4303
-
4304
- } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
4305
- return true;
4306
- }
4307
-
4308
- return match;
4309
- },
4310
-
4311
- POS: function( match ) {
4312
- match.unshift( true );
4313
-
4314
- return match;
4315
- }
4316
- },
4317
-
4318
- filters: {
4319
- enabled: function( elem ) {
4320
- return elem.disabled === false && elem.type !== "hidden";
4321
- },
4322
-
4323
- disabled: function( elem ) {
4324
- return elem.disabled === true;
4325
- },
4326
-
4327
- checked: function( elem ) {
4328
- return elem.checked === true;
4329
- },
4330
-
4331
- selected: function( elem ) {
4332
- // Accessing this property makes selected-by-default
4333
- // options in Safari work properly
4334
- if ( elem.parentNode ) {
4335
- elem.parentNode.selectedIndex;
4336
- }
4337
-
4338
- return elem.selected === true;
4339
- },
4340
-
4341
- parent: function( elem ) {
4342
- return !!elem.firstChild;
4343
- },
4344
-
4345
- empty: function( elem ) {
4346
- return !elem.firstChild;
4347
- },
4348
-
4349
- has: function( elem, i, match ) {
4350
- return !!Sizzle( match[3], elem ).length;
4351
- },
4352
-
4353
- header: function( elem ) {
4354
- return (/h\d/i).test( elem.nodeName );
4355
- },
4356
-
4357
- text: function( elem ) {
4358
- var attr = elem.getAttribute( "type" ), type = elem.type;
4359
- // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
4360
- // use getAttribute instead to test this case
4361
- return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
4362
- },
4363
-
4364
- radio: function( elem ) {
4365
- return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type;
4366
- },
4367
-
4368
- checkbox: function( elem ) {
4369
- return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type;
4370
- },
4371
-
4372
- file: function( elem ) {
4373
- return elem.nodeName.toLowerCase() === "input" && "file" === elem.type;
4374
- },
4375
-
4376
- password: function( elem ) {
4377
- return elem.nodeName.toLowerCase() === "input" && "password" === elem.type;
4378
- },
4379
-
4380
- submit: function( elem ) {
4381
- var name = elem.nodeName.toLowerCase();
4382
- return (name === "input" || name === "button") && "submit" === elem.type;
4383
- },
4384
-
4385
- image: function( elem ) {
4386
- return elem.nodeName.toLowerCase() === "input" && "image" === elem.type;
4387
- },
4388
-
4389
- reset: function( elem ) {
4390
- var name = elem.nodeName.toLowerCase();
4391
- return (name === "input" || name === "button") && "reset" === elem.type;
4392
- },
4393
-
4394
- button: function( elem ) {
4395
- var name = elem.nodeName.toLowerCase();
4396
- return name === "input" && "button" === elem.type || name === "button";
4397
- },
4398
-
4399
- input: function( elem ) {
4400
- return (/input|select|textarea|button/i).test( elem.nodeName );
4401
- },
4402
-
4403
- focus: function( elem ) {
4404
- return elem === elem.ownerDocument.activeElement;
4405
- }
4406
- },
4407
- setFilters: {
4408
- first: function( elem, i ) {
4409
- return i === 0;
4410
- },
4411
-
4412
- last: function( elem, i, match, array ) {
4413
- return i === array.length - 1;
4414
- },
4415
-
4416
- even: function( elem, i ) {
4417
- return i % 2 === 0;
4418
- },
4419
-
4420
- odd: function( elem, i ) {
4421
- return i % 2 === 1;
4422
- },
4423
-
4424
- lt: function( elem, i, match ) {
4425
- return i < match[3] - 0;
4426
- },
4427
-
4428
- gt: function( elem, i, match ) {
4429
- return i > match[3] - 0;
4430
- },
4431
-
4432
- nth: function( elem, i, match ) {
4433
- return match[3] - 0 === i;
4434
- },
4435
-
4436
- eq: function( elem, i, match ) {
4437
- return match[3] - 0 === i;
4438
- }
4439
- },
4440
- filter: {
4441
- PSEUDO: function( elem, match, i, array ) {
4442
- var name = match[1],
4443
- filter = Expr.filters[ name ];
4444
-
4445
- if ( filter ) {
4446
- return filter( elem, i, match, array );
4447
-
4448
- } else if ( name === "contains" ) {
4449
- return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0;
4450
-
4451
- } else if ( name === "not" ) {
4452
- var not = match[3];
4453
-
4454
- for ( var j = 0, l = not.length; j < l; j++ ) {
4455
- if ( not[j] === elem ) {
4456
- return false;
4457
- }
4458
- }
4459
-
4460
- return true;
4461
-
4462
- } else {
4463
- Sizzle.error( name );
4464
- }
4465
- },
4466
-
4467
- CHILD: function( elem, match ) {
4468
- var type = match[1],
4469
- node = elem;
4470
-
4471
- switch ( type ) {
4472
- case "only":
4473
- case "first":
4474
- while ( (node = node.previousSibling) ) {
4475
- if ( node.nodeType === 1 ) {
4476
- return false;
4477
- }
4478
- }
4479
-
4480
- if ( type === "first" ) {
4481
- return true;
4482
- }
4483
-
4484
- node = elem;
4485
-
4486
- case "last":
4487
- while ( (node = node.nextSibling) ) {
4488
- if ( node.nodeType === 1 ) {
4489
- return false;
4490
- }
4491
- }
4492
-
4493
- return true;
4494
-
4495
- case "nth":
4496
- var first = match[2],
4497
- last = match[3];
4498
-
4499
- if ( first === 1 && last === 0 ) {
4500
- return true;
4501
- }
4502
-
4503
- var doneName = match[0],
4504
- parent = elem.parentNode;
4505
-
4506
- if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
4507
- var count = 0;
4508
-
4509
- for ( node = parent.firstChild; node; node = node.nextSibling ) {
4510
- if ( node.nodeType === 1 ) {
4511
- node.nodeIndex = ++count;
4512
- }
4513
- }
4514
-
4515
- parent.sizcache = doneName;
4516
- }
4517
-
4518
- var diff = elem.nodeIndex - last;
4519
-
4520
- if ( first === 0 ) {
4521
- return diff === 0;
4522
-
4523
- } else {
4524
- return ( diff % first === 0 && diff / first >= 0 );
4525
- }
4526
- }
4527
- },
4528
-
4529
- ID: function( elem, match ) {
4530
- return elem.nodeType === 1 && elem.getAttribute("id") === match;
4531
- },
4532
-
4533
- TAG: function( elem, match ) {
4534
- return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match;
4535
- },
4536
-
4537
- CLASS: function( elem, match ) {
4538
- return (" " + (elem.className || elem.getAttribute("class")) + " ")
4539
- .indexOf( match ) > -1;
4540
- },
4541
-
4542
- ATTR: function( elem, match ) {
4543
- var name = match[1],
4544
- result = Expr.attrHandle[ name ] ?
4545
- Expr.attrHandle[ name ]( elem ) :
4546
- elem[ name ] != null ?
4547
- elem[ name ] :
4548
- elem.getAttribute( name ),
4549
- value = result + "",
4550
- type = match[2],
4551
- check = match[4];
4552
-
4553
- return result == null ?
4554
- type === "!=" :
4555
- type === "=" ?
4556
- value === check :
4557
- type === "*=" ?
4558
- value.indexOf(check) >= 0 :
4559
- type === "~=" ?
4560
- (" " + value + " ").indexOf(check) >= 0 :
4561
- !check ?
4562
- value && result !== false :
4563
- type === "!=" ?
4564
- value !== check :
4565
- type === "^=" ?
4566
- value.indexOf(check) === 0 :
4567
- type === "$=" ?
4568
- value.substr(value.length - check.length) === check :
4569
- type === "|=" ?
4570
- value === check || value.substr(0, check.length + 1) === check + "-" :
4571
- false;
4572
- },
4573
-
4574
- POS: function( elem, match, i, array ) {
4575
- var name = match[2],
4576
- filter = Expr.setFilters[ name ];
4577
-
4578
- if ( filter ) {
4579
- return filter( elem, i, match, array );
4580
- }
4581
- }
4582
- }
4583
- };
4584
-
4585
- var origPOS = Expr.match.POS,
4586
- fescape = function(all, num){
4587
- return "\\" + (num - 0 + 1);
4588
- };
4589
-
4590
- for ( var type in Expr.match ) {
4591
- Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
4592
- Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
4593
- }
4594
-
4595
- var makeArray = function( array, results ) {
4596
- array = Array.prototype.slice.call( array, 0 );
4597
-
4598
- if ( results ) {
4599
- results.push.apply( results, array );
4600
- return results;
4601
- }
4602
-
4603
- return array;
4604
- };
4605
-
4606
- // Perform a simple check to determine if the browser is capable of
4607
- // converting a NodeList to an array using builtin methods.
4608
- // Also verifies that the returned array holds DOM nodes
4609
- // (which is not the case in the Blackberry browser)
4610
- try {
4611
- Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
4612
-
4613
- // Provide a fallback method if it does not work
4614
- } catch( e ) {
4615
- makeArray = function( array, results ) {
4616
- var i = 0,
4617
- ret = results || [];
4618
-
4619
- if ( toString.call(array) === "[object Array]" ) {
4620
- Array.prototype.push.apply( ret, array );
4621
-
4622
- } else {
4623
- if ( typeof array.length === "number" ) {
4624
- for ( var l = array.length; i < l; i++ ) {
4625
- ret.push( array[i] );
4626
- }
4627
-
4628
- } else {
4629
- for ( ; array[i]; i++ ) {
4630
- ret.push( array[i] );
4631
- }
4632
- }
4633
- }
4634
-
4635
- return ret;
4636
- };
4637
- }
4638
-
4639
- var sortOrder, siblingCheck;
4640
-
4641
- if ( document.documentElement.compareDocumentPosition ) {
4642
- sortOrder = function( a, b ) {
4643
- if ( a === b ) {
4644
- hasDuplicate = true;
4645
- return 0;
4646
- }
4647
-
4648
- if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
4649
- return a.compareDocumentPosition ? -1 : 1;
4650
- }
4651
-
4652
- return a.compareDocumentPosition(b) & 4 ? -1 : 1;
4653
- };
4654
-
4655
- } else {
4656
- sortOrder = function( a, b ) {
4657
- // The nodes are identical, we can exit early
4658
- if ( a === b ) {
4659
- hasDuplicate = true;
4660
- return 0;
4661
-
4662
- // Fallback to using sourceIndex (in IE) if it's available on both nodes
4663
- } else if ( a.sourceIndex && b.sourceIndex ) {
4664
- return a.sourceIndex - b.sourceIndex;
4665
- }
4666
-
4667
- var al, bl,
4668
- ap = [],
4669
- bp = [],
4670
- aup = a.parentNode,
4671
- bup = b.parentNode,
4672
- cur = aup;
4673
-
4674
- // If the nodes are siblings (or identical) we can do a quick check
4675
- if ( aup === bup ) {
4676
- return siblingCheck( a, b );
4677
-
4678
- // If no parents were found then the nodes are disconnected
4679
- } else if ( !aup ) {
4680
- return -1;
4681
-
4682
- } else if ( !bup ) {
4683
- return 1;
4684
- }
4685
-
4686
- // Otherwise they're somewhere else in the tree so we need
4687
- // to build up a full list of the parentNodes for comparison
4688
- while ( cur ) {
4689
- ap.unshift( cur );
4690
- cur = cur.parentNode;
4691
- }
4692
-
4693
- cur = bup;
4694
-
4695
- while ( cur ) {
4696
- bp.unshift( cur );
4697
- cur = cur.parentNode;
4698
- }
4699
-
4700
- al = ap.length;
4701
- bl = bp.length;
4702
-
4703
- // Start walking down the tree looking for a discrepancy
4704
- for ( var i = 0; i < al && i < bl; i++ ) {
4705
- if ( ap[i] !== bp[i] ) {
4706
- return siblingCheck( ap[i], bp[i] );
4707
- }
4708
- }
4709
-
4710
- // We ended someplace up the tree so do a sibling check
4711
- return i === al ?
4712
- siblingCheck( a, bp[i], -1 ) :
4713
- siblingCheck( ap[i], b, 1 );
4714
- };
4715
-
4716
- siblingCheck = function( a, b, ret ) {
4717
- if ( a === b ) {
4718
- return ret;
4719
- }
4720
-
4721
- var cur = a.nextSibling;
4722
-
4723
- while ( cur ) {
4724
- if ( cur === b ) {
4725
- return -1;
4726
- }
4727
-
4728
- cur = cur.nextSibling;
4729
- }
4730
-
4731
- return 1;
4732
- };
4733
- }
4734
-
4735
- // Utility function for retreiving the text value of an array of DOM nodes
4736
- Sizzle.getText = function( elems ) {
4737
- var ret = "", elem;
4738
-
4739
- for ( var i = 0; elems[i]; i++ ) {
4740
- elem = elems[i];
4741
-
4742
- // Get the text from text nodes and CDATA nodes
4743
- if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
4744
- ret += elem.nodeValue;
4745
-
4746
- // Traverse everything else, except comment nodes
4747
- } else if ( elem.nodeType !== 8 ) {
4748
- ret += Sizzle.getText( elem.childNodes );
4749
- }
4750
- }
4751
-
4752
- return ret;
4753
- };
4754
-
4755
- // Check to see if the browser returns elements by name when
4756
- // querying by getElementById (and provide a workaround)
4757
- (function(){
4758
- // We're going to inject a fake input element with a specified name
4759
- var form = document.createElement("div"),
4760
- id = "script" + (new Date()).getTime(),
4761
- root = document.documentElement;
4762
-
4763
- form.innerHTML = "<a name='" + id + "'/>";
4764
-
4765
- // Inject it into the root element, check its status, and remove it quickly
4766
- root.insertBefore( form, root.firstChild );
4767
-
4768
- // The workaround has to do additional checks after a getElementById
4769
- // Which slows things down for other browsers (hence the branching)
4770
- if ( document.getElementById( id ) ) {
4771
- Expr.find.ID = function( match, context, isXML ) {
4772
- if ( typeof context.getElementById !== "undefined" && !isXML ) {
4773
- var m = context.getElementById(match[1]);
4774
-
4775
- return m ?
4776
- m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
4777
- [m] :
4778
- undefined :
4779
- [];
4780
- }
4781
- };
4782
-
4783
- Expr.filter.ID = function( elem, match ) {
4784
- var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
4785
-
4786
- return elem.nodeType === 1 && node && node.nodeValue === match;
4787
- };
4788
- }
4789
-
4790
- root.removeChild( form );
4791
-
4792
- // release memory in IE
4793
- root = form = null;
4794
- })();
4795
-
4796
- (function(){
4797
- // Check to see if the browser returns only elements
4798
- // when doing getElementsByTagName("*")
4799
-
4800
- // Create a fake element
4801
- var div = document.createElement("div");
4802
- div.appendChild( document.createComment("") );
4803
-
4804
- // Make sure no comments are found
4805
- if ( div.getElementsByTagName("*").length > 0 ) {
4806
- Expr.find.TAG = function( match, context ) {
4807
- var results = context.getElementsByTagName( match[1] );
4808
-
4809
- // Filter out possible comments
4810
- if ( match[1] === "*" ) {
4811
- var tmp = [];
4812
-
4813
- for ( var i = 0; results[i]; i++ ) {
4814
- if ( results[i].nodeType === 1 ) {
4815
- tmp.push( results[i] );
4816
- }
4817
- }
4818
-
4819
- results = tmp;
4820
- }
4821
-
4822
- return results;
4823
- };
4824
- }
4825
-
4826
- // Check to see if an attribute returns normalized href attributes
4827
- div.innerHTML = "<a href='#'></a>";
4828
-
4829
- if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
4830
- div.firstChild.getAttribute("href") !== "#" ) {
4831
-
4832
- Expr.attrHandle.href = function( elem ) {
4833
- return elem.getAttribute( "href", 2 );
4834
- };
4835
- }
4836
-
4837
- // release memory in IE
4838
- div = null;
4839
- })();
4840
-
4841
- if ( document.querySelectorAll ) {
4842
- (function(){
4843
- var oldSizzle = Sizzle,
4844
- div = document.createElement("div"),
4845
- id = "__sizzle__";
4846
-
4847
- div.innerHTML = "<p class='TEST'></p>";
4848
-
4849
- // Safari can't handle uppercase or unicode characters when
4850
- // in quirks mode.
4851
- if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
4852
- return;
4853
- }
4854
-
4855
- Sizzle = function( query, context, extra, seed ) {
4856
- context = context || document;
4857
-
4858
- // Only use querySelectorAll on non-XML documents
4859
- // (ID selectors don't work in non-HTML documents)
4860
- if ( !seed && !Sizzle.isXML(context) ) {
4861
- // See if we find a selector to speed up
4862
- var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
4863
-
4864
- if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
4865
- // Speed-up: Sizzle("TAG")
4866
- if ( match[1] ) {
4867
- return makeArray( context.getElementsByTagName( query ), extra );
4868
-
4869
- // Speed-up: Sizzle(".CLASS")
4870
- } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
4871
- return makeArray( context.getElementsByClassName( match[2] ), extra );
4872
- }
4873
- }
4874
-
4875
- if ( context.nodeType === 9 ) {
4876
- // Speed-up: Sizzle("body")
4877
- // The body element only exists once, optimize finding it
4878
- if ( query === "body" && context.body ) {
4879
- return makeArray( [ context.body ], extra );
4880
-
4881
- // Speed-up: Sizzle("#ID")
4882
- } else if ( match && match[3] ) {
4883
- var elem = context.getElementById( match[3] );
4884
-
4885
- // Check parentNode to catch when Blackberry 4.6 returns
4886
- // nodes that are no longer in the document #6963
4887
- if ( elem && elem.parentNode ) {
4888
- // Handle the case where IE and Opera return items
4889
- // by name instead of ID
4890
- if ( elem.id === match[3] ) {
4891
- return makeArray( [ elem ], extra );
4892
- }
4893
-
4894
- } else {
4895
- return makeArray( [], extra );
4896
- }
4897
- }
4898
-
4899
- try {
4900
- return makeArray( context.querySelectorAll(query), extra );
4901
- } catch(qsaError) {}
4902
-
4903
- // qSA works strangely on Element-rooted queries
4904
- // We can work around this by specifying an extra ID on the root
4905
- // and working up from there (Thanks to Andrew Dupont for the technique)
4906
- // IE 8 doesn't work on object elements
4907
- } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
4908
- var oldContext = context,
4909
- old = context.getAttribute( "id" ),
4910
- nid = old || id,
4911
- hasParent = context.parentNode,
4912
- relativeHierarchySelector = /^\s*[+~]/.test( query );
4913
-
4914
- if ( !old ) {
4915
- context.setAttribute( "id", nid );
4916
- } else {
4917
- nid = nid.replace( /'/g, "\\$&" );
4918
- }
4919
- if ( relativeHierarchySelector && hasParent ) {
4920
- context = context.parentNode;
4921
- }
4922
-
4923
- try {
4924
- if ( !relativeHierarchySelector || hasParent ) {
4925
- return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
4926
- }
4927
-
4928
- } catch(pseudoError) {
4929
- } finally {
4930
- if ( !old ) {
4931
- oldContext.removeAttribute( "id" );
4932
- }
4933
- }
4934
- }
4935
- }
4936
-
4937
- return oldSizzle(query, context, extra, seed);
4938
- };
4939
-
4940
- for ( var prop in oldSizzle ) {
4941
- Sizzle[ prop ] = oldSizzle[ prop ];
4942
- }
4943
-
4944
- // release memory in IE
4945
- div = null;
4946
- })();
4947
- }
4948
-
4949
- (function(){
4950
- var html = document.documentElement,
4951
- matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;
4952
-
4953
- if ( matches ) {
4954
- // Check to see if it's possible to do matchesSelector
4955
- // on a disconnected node (IE 9 fails this)
4956
- var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ),
4957
- pseudoWorks = false;
4958
-
4959
- try {
4960
- // This should fail with an exception
4961
- // Gecko does not error, returns false instead
4962
- matches.call( document.documentElement, "[test!='']:sizzle" );
4963
-
4964
- } catch( pseudoError ) {
4965
- pseudoWorks = true;
4966
- }
4967
-
4968
- Sizzle.matchesSelector = function( node, expr ) {
4969
- // Make sure that attribute selectors are quoted
4970
- expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
4971
-
4972
- if ( !Sizzle.isXML( node ) ) {
4973
- try {
4974
- if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
4975
- var ret = matches.call( node, expr );
4976
-
4977
- // IE 9's matchesSelector returns false on disconnected nodes
4978
- if ( ret || !disconnectedMatch ||
4979
- // As well, disconnected nodes are said to be in a document
4980
- // fragment in IE 9, so check for that
4981
- node.document && node.document.nodeType !== 11 ) {
4982
- return ret;
4983
- }
4984
- }
4985
- } catch(e) {}
4986
- }
4987
-
4988
- return Sizzle(expr, null, null, [node]).length > 0;
4989
- };
4990
- }
4991
- })();
4992
-
4993
- (function(){
4994
- var div = document.createElement("div");
4995
-
4996
- div.innerHTML = "<div class='test e'></div><div class='test'></div>";
4997
-
4998
- // Opera can't find a second classname (in 9.6)
4999
- // Also, make sure that getElementsByClassName actually exists
5000
- if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
5001
- return;
5002
- }
5003
-
5004
- // Safari caches class attributes, doesn't catch changes (in 3.2)
5005
- div.lastChild.className = "e";
5006
-
5007
- if ( div.getElementsByClassName("e").length === 1 ) {
5008
- return;
5009
- }
5010
-
5011
- Expr.order.splice(1, 0, "CLASS");
5012
- Expr.find.CLASS = function( match, context, isXML ) {
5013
- if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
5014
- return context.getElementsByClassName(match[1]);
5015
- }
5016
- };
5017
-
5018
- // release memory in IE
5019
- div = null;
5020
- })();
5021
-
5022
- function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
5023
- for ( var i = 0, l = checkSet.length; i < l; i++ ) {
5024
- var elem = checkSet[i];
5025
-
5026
- if ( elem ) {
5027
- var match = false;
5028
-
5029
- elem = elem[dir];
5030
-
5031
- while ( elem ) {
5032
- if ( elem.sizcache === doneName ) {
5033
- match = checkSet[elem.sizset];
5034
- break;
5035
- }
5036
-
5037
- if ( elem.nodeType === 1 && !isXML ){
5038
- elem.sizcache = doneName;
5039
- elem.sizset = i;
5040
- }
5041
-
5042
- if ( elem.nodeName.toLowerCase() === cur ) {
5043
- match = elem;
5044
- break;
5045
- }
5046
-
5047
- elem = elem[dir];
5048
- }
5049
-
5050
- checkSet[i] = match;
5051
- }
5052
- }
5053
- }
5054
-
5055
- function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
5056
- for ( var i = 0, l = checkSet.length; i < l; i++ ) {
5057
- var elem = checkSet[i];
5058
-
5059
- if ( elem ) {
5060
- var match = false;
5061
-
5062
- elem = elem[dir];
5063
-
5064
- while ( elem ) {
5065
- if ( elem.sizcache === doneName ) {
5066
- match = checkSet[elem.sizset];
5067
- break;
5068
- }
5069
-
5070
- if ( elem.nodeType === 1 ) {
5071
- if ( !isXML ) {
5072
- elem.sizcache = doneName;
5073
- elem.sizset = i;
5074
- }
5075
-
5076
- if ( typeof cur !== "string" ) {
5077
- if ( elem === cur ) {
5078
- match = true;
5079
- break;
5080
- }
5081
-
5082
- } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
5083
- match = elem;
5084
- break;
5085
- }
5086
- }
5087
-
5088
- elem = elem[dir];
5089
- }
5090
-
5091
- checkSet[i] = match;
5092
- }
5093
- }
5094
- }
5095
-
5096
- if ( document.documentElement.contains ) {
5097
- Sizzle.contains = function( a, b ) {
5098
- return a !== b && (a.contains ? a.contains(b) : true);
5099
- };
5100
-
5101
- } else if ( document.documentElement.compareDocumentPosition ) {
5102
- Sizzle.contains = function( a, b ) {
5103
- return !!(a.compareDocumentPosition(b) & 16);
5104
- };
5105
-
5106
- } else {
5107
- Sizzle.contains = function() {
5108
- return false;
5109
- };
5110
- }
5111
-
5112
- Sizzle.isXML = function( elem ) {
5113
- // documentElement is verified for cases where it doesn't yet exist
5114
- // (such as loading iframes in IE - #4833)
5115
- var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
5116
-
5117
- return documentElement ? documentElement.nodeName !== "HTML" : false;
5118
- };
5119
-
5120
- var posProcess = function( selector, context ) {
5121
- var match,
5122
- tmpSet = [],
5123
- later = "",
5124
- root = context.nodeType ? [context] : context;
5125
-
5126
- // Position selectors must be done after the filter
5127
- // And so must :not(positional) so we move all PSEUDOs to the end
5128
- while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
5129
- later += match[0];
5130
- selector = selector.replace( Expr.match.PSEUDO, "" );
5131
- }
5132
-
5133
- selector = Expr.relative[selector] ? selector + "*" : selector;
5134
-
5135
- for ( var i = 0, l = root.length; i < l; i++ ) {
5136
- Sizzle( selector, root[i], tmpSet );
5137
- }
5138
-
5139
- return Sizzle.filter( later, tmpSet );
5140
- };
5141
-
5142
- // EXPOSE
5143
- jQuery.find = Sizzle;
5144
- jQuery.expr = Sizzle.selectors;
5145
- jQuery.expr[":"] = jQuery.expr.filters;
5146
- jQuery.unique = Sizzle.uniqueSort;
5147
- jQuery.text = Sizzle.getText;
5148
- jQuery.isXMLDoc = Sizzle.isXML;
5149
- jQuery.contains = Sizzle.contains;
5150
-
5151
-
5152
- })();
5153
-
5154
-
5155
- var runtil = /Until$/,
5156
- rparentsprev = /^(?:parents|prevUntil|prevAll)/,
5157
- // Note: This RegExp should be improved, or likely pulled from Sizzle
5158
- rmultiselector = /,/,
5159
- isSimple = /^.[^:#\[\.,]*$/,
5160
- slice = Array.prototype.slice,
5161
- POS = jQuery.expr.match.POS,
5162
- // methods guaranteed to produce a unique set when starting from a unique set
5163
- guaranteedUnique = {
5164
- children: true,
5165
- contents: true,
5166
- next: true,
5167
- prev: true
5168
- };
5169
-
5170
- jQuery.fn.extend({
5171
- find: function( selector ) {
5172
- var self = this,
5173
- i, l;
5174
-
5175
- if ( typeof selector !== "string" ) {
5176
- return jQuery( selector ).filter(function() {
5177
- for ( i = 0, l = self.length; i < l; i++ ) {
5178
- if ( jQuery.contains( self[ i ], this ) ) {
5179
- return true;
5180
- }
5181
- }
5182
- });
5183
- }
5184
-
5185
- var ret = this.pushStack( "", "find", selector ),
5186
- length, n, r;
5187
-
5188
- for ( i = 0, l = this.length; i < l; i++ ) {
5189
- length = ret.length;
5190
- jQuery.find( selector, this[i], ret );
5191
-
5192
- if ( i > 0 ) {
5193
- // Make sure that the results are unique
5194
- for ( n = length; n < ret.length; n++ ) {
5195
- for ( r = 0; r < length; r++ ) {
5196
- if ( ret[r] === ret[n] ) {
5197
- ret.splice(n--, 1);
5198
- break;
5199
- }
5200
- }
5201
- }
5202
- }
5203
- }
5204
-
5205
- return ret;
5206
- },
5207
-
5208
- has: function( target ) {
5209
- var targets = jQuery( target );
5210
- return this.filter(function() {
5211
- for ( var i = 0, l = targets.length; i < l; i++ ) {
5212
- if ( jQuery.contains( this, targets[i] ) ) {
5213
- return true;
5214
- }
5215
- }
5216
- });
5217
- },
5218
-
5219
- not: function( selector ) {
5220
- return this.pushStack( winnow(this, selector, false), "not", selector);
5221
- },
5222
-
5223
- filter: function( selector ) {
5224
- return this.pushStack( winnow(this, selector, true), "filter", selector );
5225
- },
5226
-
5227
- is: function( selector ) {
5228
- return !!selector && ( typeof selector === "string" ?
5229
- jQuery.filter( selector, this ).length > 0 :
5230
- this.filter( selector ).length > 0 );
5231
- },
5232
-
5233
- closest: function( selectors, context ) {
5234
- var ret = [], i, l, cur = this[0];
5235
-
5236
- // Array
5237
- if ( jQuery.isArray( selectors ) ) {
5238
- var match, selector,
5239
- matches = {},
5240
- level = 1;
5241
-
5242
- if ( cur && selectors.length ) {
5243
- for ( i = 0, l = selectors.length; i < l; i++ ) {
5244
- selector = selectors[i];
5245
-
5246
- if ( !matches[ selector ] ) {
5247
- matches[ selector ] = POS.test( selector ) ?
5248
- jQuery( selector, context || this.context ) :
5249
- selector;
5250
- }
5251
- }
5252
-
5253
- while ( cur && cur.ownerDocument && cur !== context ) {
5254
- for ( selector in matches ) {
5255
- match = matches[ selector ];
5256
-
5257
- if ( match.jquery ? match.index( cur ) > -1 : jQuery( cur ).is( match ) ) {
5258
- ret.push({ selector: selector, elem: cur, level: level });
5259
- }
5260
- }
5261
-
5262
- cur = cur.parentNode;
5263
- level++;
5264
- }
5265
- }
5266
-
5267
- return ret;
5268
- }
5269
-
5270
- // String
5271
- var pos = POS.test( selectors ) || typeof selectors !== "string" ?
5272
- jQuery( selectors, context || this.context ) :
5273
- 0;
5274
-
5275
- for ( i = 0, l = this.length; i < l; i++ ) {
5276
- cur = this[i];
5277
-
5278
- while ( cur ) {
5279
- if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
5280
- ret.push( cur );
5281
- break;
5282
-
5283
- } else {
5284
- cur = cur.parentNode;
5285
- if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) {
5286
- break;
5287
- }
5288
- }
5289
- }
5290
- }
5291
-
5292
- ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
5293
-
5294
- return this.pushStack( ret, "closest", selectors );
5295
- },
5296
-
5297
- // Determine the position of an element within
5298
- // the matched set of elements
5299
- index: function( elem ) {
5300
- if ( !elem || typeof elem === "string" ) {
5301
- return jQuery.inArray( this[0],
5302
- // If it receives a string, the selector is used
5303
- // If it receives nothing, the siblings are used
5304
- elem ? jQuery( elem ) : this.parent().children() );
5305
- }
5306
- // Locate the position of the desired element
5307
- return jQuery.inArray(
5308
- // If it receives a jQuery object, the first element is used
5309
- elem.jquery ? elem[0] : elem, this );
5310
- },
5311
-
5312
- add: function( selector, context ) {
5313
- var set = typeof selector === "string" ?
5314
- jQuery( selector, context ) :
5315
- jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
5316
- all = jQuery.merge( this.get(), set );
5317
-
5318
- return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
5319
- all :
5320
- jQuery.unique( all ) );
5321
- },
5322
-
5323
- andSelf: function() {
5324
- return this.add( this.prevObject );
5325
- }
5326
- });
5327
-
5328
- // A painfully simple check to see if an element is disconnected
5329
- // from a document (should be improved, where feasible).
5330
- function isDisconnected( node ) {
5331
- return !node || !node.parentNode || node.parentNode.nodeType === 11;
5332
- }
5333
-
5334
- jQuery.each({
5335
- parent: function( elem ) {
5336
- var parent = elem.parentNode;
5337
- return parent && parent.nodeType !== 11 ? parent : null;
5338
- },
5339
- parents: function( elem ) {
5340
- return jQuery.dir( elem, "parentNode" );
5341
- },
5342
- parentsUntil: function( elem, i, until ) {
5343
- return jQuery.dir( elem, "parentNode", until );
5344
- },
5345
- next: function( elem ) {
5346
- return jQuery.nth( elem, 2, "nextSibling" );
5347
- },
5348
- prev: function( elem ) {
5349
- return jQuery.nth( elem, 2, "previousSibling" );
5350
- },
5351
- nextAll: function( elem ) {
5352
- return jQuery.dir( elem, "nextSibling" );
5353
- },
5354
- prevAll: function( elem ) {
5355
- return jQuery.dir( elem, "previousSibling" );
5356
- },
5357
- nextUntil: function( elem, i, until ) {
5358
- return jQuery.dir( elem, "nextSibling", until );
5359
- },
5360
- prevUntil: function( elem, i, until ) {
5361
- return jQuery.dir( elem, "previousSibling", until );
5362
- },
5363
- siblings: function( elem ) {
5364
- return jQuery.sibling( elem.parentNode.firstChild, elem );
5365
- },
5366
- children: function( elem ) {
5367
- return jQuery.sibling( elem.firstChild );
5368
- },
5369
- contents: function( elem ) {
5370
- return jQuery.nodeName( elem, "iframe" ) ?
5371
- elem.contentDocument || elem.contentWindow.document :
5372
- jQuery.makeArray( elem.childNodes );
5373
- }
5374
- }, function( name, fn ) {
5375
- jQuery.fn[ name ] = function( until, selector ) {
5376
- var ret = jQuery.map( this, fn, until ),
5377
- // The variable 'args' was introduced in
5378
- // https://github.com/jquery/jquery/commit/52a0238
5379
- // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
5380
- // http://code.google.com/p/v8/issues/detail?id=1050
5381
- args = slice.call(arguments);
5382
-
5383
- if ( !runtil.test( name ) ) {
5384
- selector = until;
5385
- }
5386
-
5387
- if ( selector && typeof selector === "string" ) {
5388
- ret = jQuery.filter( selector, ret );
5389
- }
5390
-
5391
- ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
5392
-
5393
- if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
5394
- ret = ret.reverse();
5395
- }
5396
-
5397
- return this.pushStack( ret, name, args.join(",") );
5398
- };
5399
- });
5400
-
5401
- jQuery.extend({
5402
- filter: function( expr, elems, not ) {
5403
- if ( not ) {
5404
- expr = ":not(" + expr + ")";
5405
- }
5406
-
5407
- return elems.length === 1 ?
5408
- jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
5409
- jQuery.find.matches(expr, elems);
5410
- },
5411
-
5412
- dir: function( elem, dir, until ) {
5413
- var matched = [],
5414
- cur = elem[ dir ];
5415
-
5416
- while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
5417
- if ( cur.nodeType === 1 ) {
5418
- matched.push( cur );
5419
- }
5420
- cur = cur[dir];
5421
- }
5422
- return matched;
5423
- },
5424
-
5425
- nth: function( cur, result, dir, elem ) {
5426
- result = result || 1;
5427
- var num = 0;
5428
-
5429
- for ( ; cur; cur = cur[dir] ) {
5430
- if ( cur.nodeType === 1 && ++num === result ) {
5431
- break;
5432
- }
5433
- }
5434
-
5435
- return cur;
5436
- },
5437
-
5438
- sibling: function( n, elem ) {
5439
- var r = [];
5440
-
5441
- for ( ; n; n = n.nextSibling ) {
5442
- if ( n.nodeType === 1 && n !== elem ) {
5443
- r.push( n );
5444
- }
5445
- }
5446
-
5447
- return r;
5448
- }
5449
- });
5450
-
5451
- // Implement the identical functionality for filter and not
5452
- function winnow( elements, qualifier, keep ) {
5453
-
5454
- // Can't pass null or undefined to indexOf in Firefox 4
5455
- // Set to 0 to skip string check
5456
- qualifier = qualifier || 0;
5457
-
5458
- if ( jQuery.isFunction( qualifier ) ) {
5459
- return jQuery.grep(elements, function( elem, i ) {
5460
- var retVal = !!qualifier.call( elem, i, elem );
5461
- return retVal === keep;
5462
- });
5463
-
5464
- } else if ( qualifier.nodeType ) {
5465
- return jQuery.grep(elements, function( elem, i ) {
5466
- return (elem === qualifier) === keep;
5467
- });
5468
-
5469
- } else if ( typeof qualifier === "string" ) {
5470
- var filtered = jQuery.grep(elements, function( elem ) {
5471
- return elem.nodeType === 1;
5472
- });
5473
-
5474
- if ( isSimple.test( qualifier ) ) {
5475
- return jQuery.filter(qualifier, filtered, !keep);
5476
- } else {
5477
- qualifier = jQuery.filter( qualifier, filtered );
5478
- }
5479
- }
5480
-
5481
- return jQuery.grep(elements, function( elem, i ) {
5482
- return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
5483
- });
5484
- }
5485
-
5486
-
5487
-
5488
-
5489
- var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
5490
- rleadingWhitespace = /^\s+/,
5491
- rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
5492
- rtagName = /<([\w:]+)/,
5493
- rtbody = /<tbody/i,
5494
- rhtml = /<|&#?\w+;/,
5495
- rnocache = /<(?:script|object|embed|option|style)/i,
5496
- // checked="checked" or checked
5497
- rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
5498
- rscriptType = /\/(java|ecma)script/i,
5499
- rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
5500
- wrapMap = {
5501
- option: [ 1, "<select multiple='multiple'>", "</select>" ],
5502
- legend: [ 1, "<fieldset>", "</fieldset>" ],
5503
- thead: [ 1, "<table>", "</table>" ],
5504
- tr: [ 2, "<table><tbody>", "</tbody></table>" ],
5505
- td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
5506
- col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
5507
- area: [ 1, "<map>", "</map>" ],
5508
- _default: [ 0, "", "" ]
5509
- };
5510
-
5511
- wrapMap.optgroup = wrapMap.option;
5512
- wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
5513
- wrapMap.th = wrapMap.td;
5514
-
5515
- // IE can't serialize <link> and <script> tags normally
5516
- if ( !jQuery.support.htmlSerialize ) {
5517
- wrapMap._default = [ 1, "div<div>", "</div>" ];
5518
- }
5519
-
5520
- jQuery.fn.extend({
5521
- text: function( text ) {
5522
- if ( jQuery.isFunction(text) ) {
5523
- return this.each(function(i) {
5524
- var self = jQuery( this );
5525
-
5526
- self.text( text.call(this, i, self.text()) );
5527
- });
5528
- }
5529
-
5530
- if ( typeof text !== "object" && text !== undefined ) {
5531
- return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
5532
- }
5533
-
5534
- return jQuery.text( this );
5535
- },
5536
-
5537
- wrapAll: function( html ) {
5538
- if ( jQuery.isFunction( html ) ) {
5539
- return this.each(function(i) {
5540
- jQuery(this).wrapAll( html.call(this, i) );
5541
- });
5542
- }
5543
-
5544
- if ( this[0] ) {
5545
- // The elements to wrap the target around
5546
- var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
5547
-
5548
- if ( this[0].parentNode ) {
5549
- wrap.insertBefore( this[0] );
5550
- }
5551
-
5552
- wrap.map(function() {
5553
- var elem = this;
5554
-
5555
- while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
5556
- elem = elem.firstChild;
5557
- }
5558
-
5559
- return elem;
5560
- }).append( this );
5561
- }
5562
-
5563
- return this;
5564
- },
5565
-
5566
- wrapInner: function( html ) {
5567
- if ( jQuery.isFunction( html ) ) {
5568
- return this.each(function(i) {
5569
- jQuery(this).wrapInner( html.call(this, i) );
5570
- });
5571
- }
5572
-
5573
- return this.each(function() {
5574
- var self = jQuery( this ),
5575
- contents = self.contents();
5576
-
5577
- if ( contents.length ) {
5578
- contents.wrapAll( html );
5579
-
5580
- } else {
5581
- self.append( html );
5582
- }
5583
- });
5584
- },
5585
-
5586
- wrap: function( html ) {
5587
- return this.each(function() {
5588
- jQuery( this ).wrapAll( html );
5589
- });
5590
- },
5591
-
5592
- unwrap: function() {
5593
- return this.parent().each(function() {
5594
- if ( !jQuery.nodeName( this, "body" ) ) {
5595
- jQuery( this ).replaceWith( this.childNodes );
5596
- }
5597
- }).end();
5598
- },
5599
-
5600
- append: function() {
5601
- return this.domManip(arguments, true, function( elem ) {
5602
- if ( this.nodeType === 1 ) {
5603
- this.appendChild( elem );
5604
- }
5605
- });
5606
- },
5607
-
5608
- prepend: function() {
5609
- return this.domManip(arguments, true, function( elem ) {
5610
- if ( this.nodeType === 1 ) {
5611
- this.insertBefore( elem, this.firstChild );
5612
- }
5613
- });
5614
- },
5615
-
5616
- before: function() {
5617
- if ( this[0] && this[0].parentNode ) {
5618
- return this.domManip(arguments, false, function( elem ) {
5619
- this.parentNode.insertBefore( elem, this );
5620
- });
5621
- } else if ( arguments.length ) {
5622
- var set = jQuery(arguments[0]);
5623
- set.push.apply( set, this.toArray() );
5624
- return this.pushStack( set, "before", arguments );
5625
- }
5626
- },
5627
-
5628
- after: function() {
5629
- if ( this[0] && this[0].parentNode ) {
5630
- return this.domManip(arguments, false, function( elem ) {
5631
- this.parentNode.insertBefore( elem, this.nextSibling );
5632
- });
5633
- } else if ( arguments.length ) {
5634
- var set = this.pushStack( this, "after", arguments );
5635
- set.push.apply( set, jQuery(arguments[0]).toArray() );
5636
- return set;
5637
- }
5638
- },
5639
-
5640
- // keepData is for internal use only--do not document
5641
- remove: function( selector, keepData ) {
5642
- for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
5643
- if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
5644
- if ( !keepData && elem.nodeType === 1 ) {
5645
- jQuery.cleanData( elem.getElementsByTagName("*") );
5646
- jQuery.cleanData( [ elem ] );
5647
- }
5648
-
5649
- if ( elem.parentNode ) {
5650
- elem.parentNode.removeChild( elem );
5651
- }
5652
- }
5653
- }
5654
-
5655
- return this;
5656
- },
5657
-
5658
- empty: function() {
5659
- for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
5660
- // Remove element nodes and prevent memory leaks
5661
- if ( elem.nodeType === 1 ) {
5662
- jQuery.cleanData( elem.getElementsByTagName("*") );
5663
- }
5664
-
5665
- // Remove any remaining nodes
5666
- while ( elem.firstChild ) {
5667
- elem.removeChild( elem.firstChild );
5668
- }
5669
- }
5670
-
5671
- return this;
5672
- },
5673
-
5674
- clone: function( dataAndEvents, deepDataAndEvents ) {
5675
- dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
5676
- deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
5677
-
5678
- return this.map( function () {
5679
- return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
5680
- });
5681
- },
5682
-
5683
- html: function( value ) {
5684
- if ( value === undefined ) {
5685
- return this[0] && this[0].nodeType === 1 ?
5686
- this[0].innerHTML.replace(rinlinejQuery, "") :
5687
- null;
5688
-
5689
- // See if we can take a shortcut and just use innerHTML
5690
- } else if ( typeof value === "string" && !rnocache.test( value ) &&
5691
- (jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
5692
- !wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
5693
-
5694
- value = value.replace(rxhtmlTag, "<$1></$2>");
5695
-
5696
- try {
5697
- for ( var i = 0, l = this.length; i < l; i++ ) {
5698
- // Remove element nodes and prevent memory leaks
5699
- if ( this[i].nodeType === 1 ) {
5700
- jQuery.cleanData( this[i].getElementsByTagName("*") );
5701
- this[i].innerHTML = value;
5702
- }
5703
- }
5704
-
5705
- // If using innerHTML throws an exception, use the fallback method
5706
- } catch(e) {
5707
- this.empty().append( value );
5708
- }
5709
-
5710
- } else if ( jQuery.isFunction( value ) ) {
5711
- this.each(function(i){
5712
- var self = jQuery( this );
5713
-
5714
- self.html( value.call(this, i, self.html()) );
5715
- });
5716
-
5717
- } else {
5718
- this.empty().append( value );
5719
- }
5720
-
5721
- return this;
5722
- },
5723
-
5724
- replaceWith: function( value ) {
5725
- if ( this[0] && this[0].parentNode ) {
5726
- // Make sure that the elements are removed from the DOM before they are inserted
5727
- // this can help fix replacing a parent with child elements
5728
- if ( jQuery.isFunction( value ) ) {
5729
- return this.each(function(i) {
5730
- var self = jQuery(this), old = self.html();
5731
- self.replaceWith( value.call( this, i, old ) );
5732
- });
5733
- }
5734
-
5735
- if ( typeof value !== "string" ) {
5736
- value = jQuery( value ).detach();
5737
- }
5738
-
5739
- return this.each(function() {
5740
- var next = this.nextSibling,
5741
- parent = this.parentNode;
5742
-
5743
- jQuery( this ).remove();
5744
-
5745
- if ( next ) {
5746
- jQuery(next).before( value );
5747
- } else {
5748
- jQuery(parent).append( value );
5749
- }
5750
- });
5751
- } else {
5752
- return this.length ?
5753
- this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) :
5754
- this;
5755
- }
5756
- },
5757
-
5758
- detach: function( selector ) {
5759
- return this.remove( selector, true );
5760
- },
5761
-
5762
- domManip: function( args, table, callback ) {
5763
- var results, first, fragment, parent,
5764
- value = args[0],
5765
- scripts = [];
5766
-
5767
- // We can't cloneNode fragments that contain checked, in WebKit
5768
- if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
5769
- return this.each(function() {
5770
- jQuery(this).domManip( args, table, callback, true );
5771
- });
5772
- }
5773
-
5774
- if ( jQuery.isFunction(value) ) {
5775
- return this.each(function(i) {
5776
- var self = jQuery(this);
5777
- args[0] = value.call(this, i, table ? self.html() : undefined);
5778
- self.domManip( args, table, callback );
5779
- });
5780
- }
5781
-
5782
- if ( this[0] ) {
5783
- parent = value && value.parentNode;
5784
-
5785
- // If we're in a fragment, just use that instead of building a new one
5786
- if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
5787
- results = { fragment: parent };
5788
-
5789
- } else {
5790
- results = jQuery.buildFragment( args, this, scripts );
5791
- }
5792
-
5793
- fragment = results.fragment;
5794
-
5795
- if ( fragment.childNodes.length === 1 ) {
5796
- first = fragment = fragment.firstChild;
5797
- } else {
5798
- first = fragment.firstChild;
5799
- }
5800
-
5801
- if ( first ) {
5802
- table = table && jQuery.nodeName( first, "tr" );
5803
-
5804
- for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) {
5805
- callback.call(
5806
- table ?
5807
- root(this[i], first) :
5808
- this[i],
5809
- // Make sure that we do not leak memory by inadvertently discarding
5810
- // the original fragment (which might have attached data) instead of
5811
- // using it; in addition, use the original fragment object for the last
5812
- // item instead of first because it can end up being emptied incorrectly
5813
- // in certain situations (Bug #8070).
5814
- // Fragments from the fragment cache must always be cloned and never used
5815
- // in place.
5816
- results.cacheable || (l > 1 && i < lastIndex) ?
5817
- jQuery.clone( fragment, true, true ) :
5818
- fragment
5819
- );
5820
- }
5821
- }
5822
-
5823
- if ( scripts.length ) {
5824
- jQuery.each( scripts, evalScript );
5825
- }
5826
- }
5827
-
5828
- return this;
5829
- }
5830
- });
5831
-
5832
- function root( elem, cur ) {
5833
- return jQuery.nodeName(elem, "table") ?
5834
- (elem.getElementsByTagName("tbody")[0] ||
5835
- elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
5836
- elem;
5837
- }
5838
-
5839
- function cloneCopyEvent( src, dest ) {
5840
-
5841
- if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
5842
- return;
5843
- }
5844
-
5845
- var internalKey = jQuery.expando,
5846
- oldData = jQuery.data( src ),
5847
- curData = jQuery.data( dest, oldData );
5848
-
5849
- // Switch to use the internal data object, if it exists, for the next
5850
- // stage of data copying
5851
- if ( (oldData = oldData[ internalKey ]) ) {
5852
- var events = oldData.events;
5853
- curData = curData[ internalKey ] = jQuery.extend({}, oldData);
5854
-
5855
- if ( events ) {
5856
- delete curData.handle;
5857
- curData.events = {};
5858
-
5859
- for ( var type in events ) {
5860
- for ( var i = 0, l = events[ type ].length; i < l; i++ ) {
5861
- jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data );
5862
- }
5863
- }
5864
- }
5865
- }
5866
- }
5867
-
5868
- function cloneFixAttributes( src, dest ) {
5869
- var nodeName;
5870
-
5871
- // We do not need to do anything for non-Elements
5872
- if ( dest.nodeType !== 1 ) {
5873
- return;
5874
- }
5875
-
5876
- // clearAttributes removes the attributes, which we don't want,
5877
- // but also removes the attachEvent events, which we *do* want
5878
- if ( dest.clearAttributes ) {
5879
- dest.clearAttributes();
5880
- }
5881
-
5882
- // mergeAttributes, in contrast, only merges back on the
5883
- // original attributes, not the events
5884
- if ( dest.mergeAttributes ) {
5885
- dest.mergeAttributes( src );
5886
- }
5887
-
5888
- nodeName = dest.nodeName.toLowerCase();
5889
-
5890
- // IE6-8 fail to clone children inside object elements that use
5891
- // the proprietary classid attribute value (rather than the type
5892
- // attribute) to identify the type of content to display
5893
- if ( nodeName === "object" ) {
5894
- dest.outerHTML = src.outerHTML;
5895
-
5896
- } else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) {
5897
- // IE6-8 fails to persist the checked state of a cloned checkbox
5898
- // or radio button. Worse, IE6-7 fail to give the cloned element
5899
- // a checked appearance if the defaultChecked value isn't also set
5900
- if ( src.checked ) {
5901
- dest.defaultChecked = dest.checked = src.checked;
5902
- }
5903
-
5904
- // IE6-7 get confused and end up setting the value of a cloned
5905
- // checkbox/radio button to an empty string instead of "on"
5906
- if ( dest.value !== src.value ) {
5907
- dest.value = src.value;
5908
- }
5909
-
5910
- // IE6-8 fails to return the selected option to the default selected
5911
- // state when cloning options
5912
- } else if ( nodeName === "option" ) {
5913
- dest.selected = src.defaultSelected;
5914
-
5915
- // IE6-8 fails to set the defaultValue to the correct value when
5916
- // cloning other types of input fields
5917
- } else if ( nodeName === "input" || nodeName === "textarea" ) {
5918
- dest.defaultValue = src.defaultValue;
5919
- }
5920
-
5921
- // Event data gets referenced instead of copied if the expando
5922
- // gets copied too
5923
- dest.removeAttribute( jQuery.expando );
5924
- }
5925
-
5926
- jQuery.buildFragment = function( args, nodes, scripts ) {
5927
- var fragment, cacheable, cacheresults, doc;
5928
-
5929
- // nodes may contain either an explicit document object,
5930
- // a jQuery collection or context object.
5931
- // If nodes[0] contains a valid object to assign to doc
5932
- if ( nodes && nodes[0] ) {
5933
- doc = nodes[0].ownerDocument || nodes[0];
5934
- }
5935
-
5936
- // Ensure that an attr object doesn't incorrectly stand in as a document object
5937
- // Chrome and Firefox seem to allow this to occur and will throw exception
5938
- // Fixes #8950
5939
- if ( !doc.createDocumentFragment ) {
5940
- doc = document;
5941
- }
5942
-
5943
- // Only cache "small" (1/2 KB) HTML strings that are associated with the main document
5944
- // Cloning options loses the selected state, so don't cache them
5945
- // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
5946
- // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
5947
- if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && doc === document &&
5948
- args[0].charAt(0) === "<" && !rnocache.test( args[0] ) && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) {
5949
-
5950
- cacheable = true;
5951
-
5952
- cacheresults = jQuery.fragments[ args[0] ];
5953
- if ( cacheresults && cacheresults !== 1 ) {
5954
- fragment = cacheresults;
5955
- }
5956
- }
5957
-
5958
- if ( !fragment ) {
5959
- fragment = doc.createDocumentFragment();
5960
- jQuery.clean( args, doc, fragment, scripts );
5961
- }
5962
-
5963
- if ( cacheable ) {
5964
- jQuery.fragments[ args[0] ] = cacheresults ? fragment : 1;
5965
- }
5966
-
5967
- return { fragment: fragment, cacheable: cacheable };
5968
- };
5969
-
5970
- jQuery.fragments = {};
5971
-
5972
- jQuery.each({
5973
- appendTo: "append",
5974
- prependTo: "prepend",
5975
- insertBefore: "before",
5976
- insertAfter: "after",
5977
- replaceAll: "replaceWith"
5978
- }, function( name, original ) {
5979
- jQuery.fn[ name ] = function( selector ) {
5980
- var ret = [],
5981
- insert = jQuery( selector ),
5982
- parent = this.length === 1 && this[0].parentNode;
5983
-
5984
- if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
5985
- insert[ original ]( this[0] );
5986
- return this;
5987
-
5988
- } else {
5989
- for ( var i = 0, l = insert.length; i < l; i++ ) {
5990
- var elems = (i > 0 ? this.clone(true) : this).get();
5991
- jQuery( insert[i] )[ original ]( elems );
5992
- ret = ret.concat( elems );
5993
- }
5994
-
5995
- return this.pushStack( ret, name, insert.selector );
5996
- }
5997
- };
5998
- });
5999
-
6000
- function getAll( elem ) {
6001
- if ( "getElementsByTagName" in elem ) {
6002
- return elem.getElementsByTagName( "*" );
6003
-
6004
- } else if ( "querySelectorAll" in elem ) {
6005
- return elem.querySelectorAll( "*" );
6006
-
6007
- } else {
6008
- return [];
6009
- }
6010
- }
6011
-
6012
- // Used in clean, fixes the defaultChecked property
6013
- function fixDefaultChecked( elem ) {
6014
- if ( elem.type === "checkbox" || elem.type === "radio" ) {
6015
- elem.defaultChecked = elem.checked;
6016
- }
6017
- }
6018
- // Finds all inputs and passes them to fixDefaultChecked
6019
- function findInputs( elem ) {
6020
- if ( jQuery.nodeName( elem, "input" ) ) {
6021
- fixDefaultChecked( elem );
6022
- } else if ( "getElementsByTagName" in elem ) {
6023
- jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
6024
- }
6025
- }
6026
-
6027
- jQuery.extend({
6028
- clone: function( elem, dataAndEvents, deepDataAndEvents ) {
6029
- var clone = elem.cloneNode(true),
6030
- srcElements,
6031
- destElements,
6032
- i;
6033
-
6034
- if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
6035
- (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
6036
- // IE copies events bound via attachEvent when using cloneNode.
6037
- // Calling detachEvent on the clone will also remove the events
6038
- // from the original. In order to get around this, we use some
6039
- // proprietary methods to clear the events. Thanks to MooTools
6040
- // guys for this hotness.
6041
-
6042
- cloneFixAttributes( elem, clone );
6043
-
6044
- // Using Sizzle here is crazy slow, so we use getElementsByTagName
6045
- // instead
6046
- srcElements = getAll( elem );
6047
- destElements = getAll( clone );
6048
-
6049
- // Weird iteration because IE will replace the length property
6050
- // with an element if you are cloning the body and one of the
6051
- // elements on the page has a name or id of "length"
6052
- for ( i = 0; srcElements[i]; ++i ) {
6053
- cloneFixAttributes( srcElements[i], destElements[i] );
6054
- }
6055
- }
6056
-
6057
- // Copy the events from the original to the clone
6058
- if ( dataAndEvents ) {
6059
- cloneCopyEvent( elem, clone );
6060
-
6061
- if ( deepDataAndEvents ) {
6062
- srcElements = getAll( elem );
6063
- destElements = getAll( clone );
6064
-
6065
- for ( i = 0; srcElements[i]; ++i ) {
6066
- cloneCopyEvent( srcElements[i], destElements[i] );
6067
- }
6068
- }
6069
- }
6070
-
6071
- srcElements = destElements = null;
6072
-
6073
- // Return the cloned set
6074
- return clone;
6075
- },
6076
-
6077
- clean: function( elems, context, fragment, scripts ) {
6078
- var checkScriptType;
6079
-
6080
- context = context || document;
6081
-
6082
- // !context.createElement fails in IE with an error but returns typeof 'object'
6083
- if ( typeof context.createElement === "undefined" ) {
6084
- context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
6085
- }
6086
-
6087
- var ret = [], j;
6088
-
6089
- for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
6090
- if ( typeof elem === "number" ) {
6091
- elem += "";
6092
- }
6093
-
6094
- if ( !elem ) {
6095
- continue;
6096
- }
6097
-
6098
- // Convert html string into DOM nodes
6099
- if ( typeof elem === "string" ) {
6100
- if ( !rhtml.test( elem ) ) {
6101
- elem = context.createTextNode( elem );
6102
- } else {
6103
- // Fix "XHTML"-style tags in all browsers
6104
- elem = elem.replace(rxhtmlTag, "<$1></$2>");
6105
-
6106
- // Trim whitespace, otherwise indexOf won't work as expected
6107
- var tag = (rtagName.exec( elem ) || ["", ""])[1].toLowerCase(),
6108
- wrap = wrapMap[ tag ] || wrapMap._default,
6109
- depth = wrap[0],
6110
- div = context.createElement("div");
6111
-
6112
- // Go to html and back, then peel off extra wrappers
6113
- div.innerHTML = wrap[1] + elem + wrap[2];
6114
-
6115
- // Move to the right depth
6116
- while ( depth-- ) {
6117
- div = div.lastChild;
6118
- }
6119
-
6120
- // Remove IE's autoinserted <tbody> from table fragments
6121
- if ( !jQuery.support.tbody ) {
6122
-
6123
- // String was a <table>, *may* have spurious <tbody>
6124
- var hasBody = rtbody.test(elem),
6125
- tbody = tag === "table" && !hasBody ?
6126
- div.firstChild && div.firstChild.childNodes :
6127
-
6128
- // String was a bare <thead> or <tfoot>
6129
- wrap[1] === "<table>" && !hasBody ?
6130
- div.childNodes :
6131
- [];
6132
-
6133
- for ( j = tbody.length - 1; j >= 0 ; --j ) {
6134
- if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
6135
- tbody[ j ].parentNode.removeChild( tbody[ j ] );
6136
- }
6137
- }
6138
- }
6139
-
6140
- // IE completely kills leading whitespace when innerHTML is used
6141
- if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
6142
- div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
6143
- }
6144
-
6145
- elem = div.childNodes;
6146
- }
6147
- }
6148
-
6149
- // Resets defaultChecked for any radios and checkboxes
6150
- // about to be appended to the DOM in IE 6/7 (#8060)
6151
- var len;
6152
- if ( !jQuery.support.appendChecked ) {
6153
- if ( elem[0] && typeof (len = elem.length) === "number" ) {
6154
- for ( j = 0; j < len; j++ ) {
6155
- findInputs( elem[j] );
6156
- }
6157
- } else {
6158
- findInputs( elem );
6159
- }
6160
- }
6161
-
6162
- if ( elem.nodeType ) {
6163
- ret.push( elem );
6164
- } else {
6165
- ret = jQuery.merge( ret, elem );
6166
- }
6167
- }
6168
-
6169
- if ( fragment ) {
6170
- checkScriptType = function( elem ) {
6171
- return !elem.type || rscriptType.test( elem.type );
6172
- };
6173
- for ( i = 0; ret[i]; i++ ) {
6174
- if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
6175
- scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
6176
-
6177
- } else {
6178
- if ( ret[i].nodeType === 1 ) {
6179
- var jsTags = jQuery.grep( ret[i].getElementsByTagName( "script" ), checkScriptType );
6180
-
6181
- ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
6182
- }
6183
- fragment.appendChild( ret[i] );
6184
- }
6185
- }
6186
- }
6187
-
6188
- return ret;
6189
- },
6190
-
6191
- cleanData: function( elems ) {
6192
- var data, id, cache = jQuery.cache, internalKey = jQuery.expando, special = jQuery.event.special,
6193
- deleteExpando = jQuery.support.deleteExpando;
6194
-
6195
- for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
6196
- if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
6197
- continue;
6198
- }
6199
-
6200
- id = elem[ jQuery.expando ];
6201
-
6202
- if ( id ) {
6203
- data = cache[ id ] && cache[ id ][ internalKey ];
6204
-
6205
- if ( data && data.events ) {
6206
- for ( var type in data.events ) {
6207
- if ( special[ type ] ) {
6208
- jQuery.event.remove( elem, type );
6209
-
6210
- // This is a shortcut to avoid jQuery.event.remove's overhead
6211
- } else {
6212
- jQuery.removeEvent( elem, type, data.handle );
6213
- }
6214
- }
6215
-
6216
- // Null the DOM reference to avoid IE6/7/8 leak (#7054)
6217
- if ( data.handle ) {
6218
- data.handle.elem = null;
6219
- }
6220
- }
6221
-
6222
- if ( deleteExpando ) {
6223
- delete elem[ jQuery.expando ];
6224
-
6225
- } else if ( elem.removeAttribute ) {
6226
- elem.removeAttribute( jQuery.expando );
6227
- }
6228
-
6229
- delete cache[ id ];
6230
- }
6231
- }
6232
- }
6233
- });
6234
-
6235
- function evalScript( i, elem ) {
6236
- if ( elem.src ) {
6237
- jQuery.ajax({
6238
- url: elem.src,
6239
- async: false,
6240
- dataType: "script"
6241
- });
6242
- } else {
6243
- jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) );
6244
- }
6245
-
6246
- if ( elem.parentNode ) {
6247
- elem.parentNode.removeChild( elem );
6248
- }
6249
- }
6250
-
6251
-
6252
-
6253
- var ralpha = /alpha\([^)]*\)/i,
6254
- ropacity = /opacity=([^)]*)/,
6255
- // fixed for IE9, see #8346
6256
- rupper = /([A-Z]|^ms)/g,
6257
- rnumpx = /^-?\d+(?:px)?$/i,
6258
- rnum = /^-?\d/,
6259
- rrelNum = /^[+\-]=/,
6260
- rrelNumFilter = /[^+\-\.\de]+/g,
6261
-
6262
- cssShow = { position: "absolute", visibility: "hidden", display: "block" },
6263
- cssWidth = [ "Left", "Right" ],
6264
- cssHeight = [ "Top", "Bottom" ],
6265
- curCSS,
6266
-
6267
- getComputedStyle,
6268
- currentStyle;
6269
-
6270
- jQuery.fn.css = function( name, value ) {
6271
- // Setting 'undefined' is a no-op
6272
- if ( arguments.length === 2 && value === undefined ) {
6273
- return this;
6274
- }
6275
-
6276
- return jQuery.access( this, name, value, true, function( elem, name, value ) {
6277
- return value !== undefined ?
6278
- jQuery.style( elem, name, value ) :
6279
- jQuery.css( elem, name );
6280
- });
6281
- };
6282
-
6283
- jQuery.extend({
6284
- // Add in style property hooks for overriding the default
6285
- // behavior of getting and setting a style property
6286
- cssHooks: {
6287
- opacity: {
6288
- get: function( elem, computed ) {
6289
- if ( computed ) {
6290
- // We should always get a number back from opacity
6291
- var ret = curCSS( elem, "opacity", "opacity" );
6292
- return ret === "" ? "1" : ret;
6293
-
6294
- } else {
6295
- return elem.style.opacity;
6296
- }
6297
- }
6298
- }
6299
- },
6300
-
6301
- // Exclude the following css properties to add px
6302
- cssNumber: {
6303
- "fillOpacity": true,
6304
- "fontWeight": true,
6305
- "lineHeight": true,
6306
- "opacity": true,
6307
- "orphans": true,
6308
- "widows": true,
6309
- "zIndex": true,
6310
- "zoom": true
6311
- },
6312
-
6313
- // Add in properties whose names you wish to fix before
6314
- // setting or getting the value
6315
- cssProps: {
6316
- // normalize float css property
6317
- "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
6318
- },
6319
-
6320
- // Get and set the style property on a DOM Node
6321
- style: function( elem, name, value, extra ) {
6322
- // Don't set styles on text and comment nodes
6323
- if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
6324
- return;
6325
- }
6326
-
6327
- // Make sure that we're working with the right name
6328
- var ret, type, origName = jQuery.camelCase( name ),
6329
- style = elem.style, hooks = jQuery.cssHooks[ origName ];
6330
-
6331
- name = jQuery.cssProps[ origName ] || origName;
6332
-
6333
- // Check if we're setting a value
6334
- if ( value !== undefined ) {
6335
- type = typeof value;
6336
-
6337
- // Make sure that NaN and null values aren't set. See: #7116
6338
- if ( type === "number" && isNaN( value ) || value == null ) {
6339
- return;
6340
- }
6341
-
6342
- // convert relative number strings (+= or -=) to relative numbers. #7345
6343
- if ( type === "string" && rrelNum.test( value ) ) {
6344
- value = +value.replace( rrelNumFilter, "" ) + parseFloat( jQuery.css( elem, name ) );
6345
- // Fixes bug #9237
6346
- type = "number";
6347
- }
6348
-
6349
- // If a number was passed in, add 'px' to the (except for certain CSS properties)
6350
- if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
6351
- value += "px";
6352
- }
6353
-
6354
- // If a hook was provided, use that value, otherwise just set the specified value
6355
- if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
6356
- // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
6357
- // Fixes bug #5509
6358
- try {
6359
- style[ name ] = value;
6360
- } catch(e) {}
6361
- }
6362
-
6363
- } else {
6364
- // If a hook was provided get the non-computed value from there
6365
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
6366
- return ret;
6367
- }
6368
-
6369
- // Otherwise just get the value from the style object
6370
- return style[ name ];
6371
- }
6372
- },
6373
-
6374
- css: function( elem, name, extra ) {
6375
- var ret, hooks;
6376
-
6377
- // Make sure that we're working with the right name
6378
- name = jQuery.camelCase( name );
6379
- hooks = jQuery.cssHooks[ name ];
6380
- name = jQuery.cssProps[ name ] || name;
6381
-
6382
- // cssFloat needs a special treatment
6383
- if ( name === "cssFloat" ) {
6384
- name = "float";
6385
- }
6386
-
6387
- // If a hook was provided get the computed value from there
6388
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
6389
- return ret;
6390
-
6391
- // Otherwise, if a way to get the computed value exists, use that
6392
- } else if ( curCSS ) {
6393
- return curCSS( elem, name );
6394
- }
6395
- },
6396
-
6397
- // A method for quickly swapping in/out CSS properties to get correct calculations
6398
- swap: function( elem, options, callback ) {
6399
- var old = {};
6400
-
6401
- // Remember the old values, and insert the new ones
6402
- for ( var name in options ) {
6403
- old[ name ] = elem.style[ name ];
6404
- elem.style[ name ] = options[ name ];
6405
- }
6406
-
6407
- callback.call( elem );
6408
-
6409
- // Revert the old values
6410
- for ( name in options ) {
6411
- elem.style[ name ] = old[ name ];
6412
- }
6413
- }
6414
- });
6415
-
6416
- // DEPRECATED, Use jQuery.css() instead
6417
- jQuery.curCSS = jQuery.css;
6418
-
6419
- jQuery.each(["height", "width"], function( i, name ) {
6420
- jQuery.cssHooks[ name ] = {
6421
- get: function( elem, computed, extra ) {
6422
- var val;
6423
-
6424
- if ( computed ) {
6425
- if ( elem.offsetWidth !== 0 ) {
6426
- return getWH( elem, name, extra );
6427
- } else {
6428
- jQuery.swap( elem, cssShow, function() {
6429
- val = getWH( elem, name, extra );
6430
- });
6431
- }
6432
-
6433
- return val;
6434
- }
6435
- },
6436
-
6437
- set: function( elem, value ) {
6438
- if ( rnumpx.test( value ) ) {
6439
- // ignore negative width and height values #1599
6440
- value = parseFloat( value );
6441
-
6442
- if ( value >= 0 ) {
6443
- return value + "px";
6444
- }
6445
-
6446
- } else {
6447
- return value;
6448
- }
6449
- }
6450
- };
6451
- });
6452
-
6453
- if ( !jQuery.support.opacity ) {
6454
- jQuery.cssHooks.opacity = {
6455
- get: function( elem, computed ) {
6456
- // IE uses filters for opacity
6457
- return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
6458
- ( parseFloat( RegExp.$1 ) / 100 ) + "" :
6459
- computed ? "1" : "";
6460
- },
6461
-
6462
- set: function( elem, value ) {
6463
- var style = elem.style,
6464
- currentStyle = elem.currentStyle;
6465
-
6466
- // IE has trouble with opacity if it does not have layout
6467
- // Force it by setting the zoom level
6468
- style.zoom = 1;
6469
-
6470
- // Set the alpha filter to set the opacity
6471
- var opacity = jQuery.isNaN( value ) ?
6472
- "" :
6473
- "alpha(opacity=" + value * 100 + ")",
6474
- filter = currentStyle && currentStyle.filter || style.filter || "";
6475
-
6476
- style.filter = ralpha.test( filter ) ?
6477
- filter.replace( ralpha, opacity ) :
6478
- filter + " " + opacity;
6479
- }
6480
- };
6481
- }
6482
-
6483
- jQuery(function() {
6484
- // This hook cannot be added until DOM ready because the support test
6485
- // for it is not run until after DOM ready
6486
- if ( !jQuery.support.reliableMarginRight ) {
6487
- jQuery.cssHooks.marginRight = {
6488
- get: function( elem, computed ) {
6489
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
6490
- // Work around by temporarily setting element display to inline-block
6491
- var ret;
6492
- jQuery.swap( elem, { "display": "inline-block" }, function() {
6493
- if ( computed ) {
6494
- ret = curCSS( elem, "margin-right", "marginRight" );
6495
- } else {
6496
- ret = elem.style.marginRight;
6497
- }
6498
- });
6499
- return ret;
6500
- }
6501
- };
6502
- }
6503
- });
6504
-
6505
- if ( document.defaultView && document.defaultView.getComputedStyle ) {
6506
- getComputedStyle = function( elem, name ) {
6507
- var ret, defaultView, computedStyle;
6508
-
6509
- name = name.replace( rupper, "-$1" ).toLowerCase();
6510
-
6511
- if ( !(defaultView = elem.ownerDocument.defaultView) ) {
6512
- return undefined;
6513
- }
6514
-
6515
- if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
6516
- ret = computedStyle.getPropertyValue( name );
6517
- if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
6518
- ret = jQuery.style( elem, name );
6519
- }
6520
- }
6521
-
6522
- return ret;
6523
- };
6524
- }
6525
-
6526
- if ( document.documentElement.currentStyle ) {
6527
- currentStyle = function( elem, name ) {
6528
- var left,
6529
- ret = elem.currentStyle && elem.currentStyle[ name ],
6530
- rsLeft = elem.runtimeStyle && elem.runtimeStyle[ name ],
6531
- style = elem.style;
6532
-
6533
- // From the awesome hack by Dean Edwards
6534
- // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
6535
-
6536
- // If we're not dealing with a regular pixel number
6537
- // but a number that has a weird ending, we need to convert it to pixels
6538
- if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
6539
- // Remember the original values
6540
- left = style.left;
6541
-
6542
- // Put in the new values to get a computed value out
6543
- if ( rsLeft ) {
6544
- elem.runtimeStyle.left = elem.currentStyle.left;
6545
- }
6546
- style.left = name === "fontSize" ? "1em" : (ret || 0);
6547
- ret = style.pixelLeft + "px";
6548
-
6549
- // Revert the changed values
6550
- style.left = left;
6551
- if ( rsLeft ) {
6552
- elem.runtimeStyle.left = rsLeft;
6553
- }
6554
- }
6555
-
6556
- return ret === "" ? "auto" : ret;
6557
- };
6558
- }
6559
-
6560
- curCSS = getComputedStyle || currentStyle;
6561
-
6562
- function getWH( elem, name, extra ) {
6563
-
6564
- // Start with offset property
6565
- var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
6566
- which = name === "width" ? cssWidth : cssHeight;
6567
-
6568
- if ( extra !== "margin" && extra !== "border" ) {
6569
- jQuery.each( which, function() {
6570
- val -= parseFloat( jQuery.css( elem, "border" + this + "Width" ) ) || 0;
6571
- if ( !extra ) {
6572
- val -= parseFloat( jQuery.css( elem, "padding" + this ) ) || 0;
6573
- }
6574
- });
6575
- }
6576
-
6577
- if ( val > 0 ) {
6578
- if ( extra === "margin" ) {
6579
- jQuery.each( which, function() {
6580
- val += parseFloat( jQuery.css( elem, extra + this ) ) || 0;
6581
- });
6582
- }
6583
- return val + "px";
6584
- }
6585
-
6586
- // Fall back to computed then uncomputed css if necessary
6587
- val = curCSS( elem, name, name );
6588
- if ( val < 0 || val == null ) {
6589
- val = elem.style[ name ] || 0;
6590
- }
6591
- // Normalize "", auto, and prepare for extra
6592
- val = parseFloat( val ) || 0;
6593
-
6594
- // Add padding, border, margin
6595
- if ( extra ) {
6596
- jQuery.each( which, function() {
6597
- val += parseFloat( jQuery.css( elem, "padding" + this ) ) || 0;
6598
- if ( extra !== "padding" ) {
6599
- val += parseFloat( jQuery.css( elem, "border" + this + "Width" ) ) || 0;
6600
- }
6601
- if ( extra === "margin" ) {
6602
- val += parseFloat( jQuery.css( elem, extra + this ) ) || 0;
6603
- }
6604
- });
6605
- }
6606
-
6607
- return val + "px";
6608
- }
6609
-
6610
- if ( jQuery.expr && jQuery.expr.filters ) {
6611
- jQuery.expr.filters.hidden = function( elem ) {
6612
- var width = elem.offsetWidth,
6613
- height = elem.offsetHeight;
6614
-
6615
- return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && (elem.style.display || jQuery.css( elem, "display" )) === "none");
6616
- };
6617
-
6618
- jQuery.expr.filters.visible = function( elem ) {
6619
- return !jQuery.expr.filters.hidden( elem );
6620
- };
6621
- }
6622
-
6623
-
6624
-
6625
-
6626
- var r20 = /%20/g,
6627
- rbracket = /\[\]$/,
6628
- rCRLF = /\r?\n/g,
6629
- rhash = /#.*$/,
6630
- rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
6631
- rinput = /^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
6632
- // #7653, #8125, #8152: local protocol detection
6633
- rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|widget):$/,
6634
- rnoContent = /^(?:GET|HEAD)$/,
6635
- rprotocol = /^\/\//,
6636
- rquery = /\?/,
6637
- rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
6638
- rselectTextarea = /^(?:select|textarea)/i,
6639
- rspacesAjax = /\s+/,
6640
- rts = /([?&])_=[^&]*/,
6641
- rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
6642
-
6643
- // Keep a copy of the old load method
6644
- _load = jQuery.fn.load,
6645
-
6646
- /* Prefilters
6647
- * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
6648
- * 2) These are called:
6649
- * - BEFORE asking for a transport
6650
- * - AFTER param serialization (s.data is a string if s.processData is true)
6651
- * 3) key is the dataType
6652
- * 4) the catchall symbol "*" can be used
6653
- * 5) execution will start with transport dataType and THEN continue down to "*" if needed
6654
- */
6655
- prefilters = {},
6656
-
6657
- /* Transports bindings
6658
- * 1) key is the dataType
6659
- * 2) the catchall symbol "*" can be used
6660
- * 3) selection will start with transport dataType and THEN go to "*" if needed
6661
- */
6662
- transports = {},
6663
-
6664
- // Document location
6665
- ajaxLocation,
6666
-
6667
- // Document location segments
6668
- ajaxLocParts;
6669
-
6670
- // #8138, IE may throw an exception when accessing
6671
- // a field from window.location if document.domain has been set
6672
- try {
6673
- ajaxLocation = location.href;
6674
- } catch( e ) {
6675
- // Use the href attribute of an A element
6676
- // since IE will modify it given document.location
6677
- ajaxLocation = document.createElement( "a" );
6678
- ajaxLocation.href = "";
6679
- ajaxLocation = ajaxLocation.href;
6680
- }
6681
-
6682
- // Segment location into parts
6683
- ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
6684
-
6685
- // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
6686
- function addToPrefiltersOrTransports( structure ) {
6687
-
6688
- // dataTypeExpression is optional and defaults to "*"
6689
- return function( dataTypeExpression, func ) {
6690
-
6691
- if ( typeof dataTypeExpression !== "string" ) {
6692
- func = dataTypeExpression;
6693
- dataTypeExpression = "*";
6694
- }
6695
-
6696
- if ( jQuery.isFunction( func ) ) {
6697
- var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
6698
- i = 0,
6699
- length = dataTypes.length,
6700
- dataType,
6701
- list,
6702
- placeBefore;
6703
-
6704
- // For each dataType in the dataTypeExpression
6705
- for(; i < length; i++ ) {
6706
- dataType = dataTypes[ i ];
6707
- // We control if we're asked to add before
6708
- // any existing element
6709
- placeBefore = /^\+/.test( dataType );
6710
- if ( placeBefore ) {
6711
- dataType = dataType.substr( 1 ) || "*";
6712
- }
6713
- list = structure[ dataType ] = structure[ dataType ] || [];
6714
- // then we add to the structure accordingly
6715
- list[ placeBefore ? "unshift" : "push" ]( func );
6716
- }
6717
- }
6718
- };
6719
- }
6720
-
6721
- // Base inspection function for prefilters and transports
6722
- function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
6723
- dataType /* internal */, inspected /* internal */ ) {
6724
-
6725
- dataType = dataType || options.dataTypes[ 0 ];
6726
- inspected = inspected || {};
6727
-
6728
- inspected[ dataType ] = true;
6729
-
6730
- var list = structure[ dataType ],
6731
- i = 0,
6732
- length = list ? list.length : 0,
6733
- executeOnly = ( structure === prefilters ),
6734
- selection;
6735
-
6736
- for(; i < length && ( executeOnly || !selection ); i++ ) {
6737
- selection = list[ i ]( options, originalOptions, jqXHR );
6738
- // If we got redirected to another dataType
6739
- // we try there if executing only and not done already
6740
- if ( typeof selection === "string" ) {
6741
- if ( !executeOnly || inspected[ selection ] ) {
6742
- selection = undefined;
6743
- } else {
6744
- options.dataTypes.unshift( selection );
6745
- selection = inspectPrefiltersOrTransports(
6746
- structure, options, originalOptions, jqXHR, selection, inspected );
6747
- }
6748
- }
6749
- }
6750
- // If we're only executing or nothing was selected
6751
- // we try the catchall dataType if not done already
6752
- if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
6753
- selection = inspectPrefiltersOrTransports(
6754
- structure, options, originalOptions, jqXHR, "*", inspected );
6755
- }
6756
- // unnecessary when only executing (prefilters)
6757
- // but it'll be ignored by the caller in that case
6758
- return selection;
6759
- }
6760
-
6761
- jQuery.fn.extend({
6762
- load: function( url, params, callback ) {
6763
- if ( typeof url !== "string" && _load ) {
6764
- return _load.apply( this, arguments );
6765
-
6766
- // Don't do a request if no elements are being requested
6767
- } else if ( !this.length ) {
6768
- return this;
6769
- }
6770
-
6771
- var off = url.indexOf( " " );
6772
- if ( off >= 0 ) {
6773
- var selector = url.slice( off, url.length );
6774
- url = url.slice( 0, off );
6775
- }
6776
-
6777
- // Default to a GET request
6778
- var type = "GET";
6779
-
6780
- // If the second parameter was provided
6781
- if ( params ) {
6782
- // If it's a function
6783
- if ( jQuery.isFunction( params ) ) {
6784
- // We assume that it's the callback
6785
- callback = params;
6786
- params = undefined;
6787
-
6788
- // Otherwise, build a param string
6789
- } else if ( typeof params === "object" ) {
6790
- params = jQuery.param( params, jQuery.ajaxSettings.traditional );
6791
- type = "POST";
6792
- }
6793
- }
6794
-
6795
- var self = this;
6796
-
6797
- // Request the remote document
6798
- jQuery.ajax({
6799
- url: url,
6800
- type: type,
6801
- dataType: "html",
6802
- data: params,
6803
- // Complete callback (responseText is used internally)
6804
- complete: function( jqXHR, status, responseText ) {
6805
- // Store the response as specified by the jqXHR object
6806
- responseText = jqXHR.responseText;
6807
- // If successful, inject the HTML into all the matched elements
6808
- if ( jqXHR.isResolved() ) {
6809
- // #4825: Get the actual response in case
6810
- // a dataFilter is present in ajaxSettings
6811
- jqXHR.done(function( r ) {
6812
- responseText = r;
6813
- });
6814
- // See if a selector was specified
6815
- self.html( selector ?
6816
- // Create a dummy div to hold the results
6817
- jQuery("<div>")
6818
- // inject the contents of the document in, removing the scripts
6819
- // to avoid any 'Permission Denied' errors in IE
6820
- .append(responseText.replace(rscript, ""))
6821
-
6822
- // Locate the specified elements
6823
- .find(selector) :
6824
-
6825
- // If not, just inject the full result
6826
- responseText );
6827
- }
6828
-
6829
- if ( callback ) {
6830
- self.each( callback, [ responseText, status, jqXHR ] );
6831
- }
6832
- }
6833
- });
6834
-
6835
- return this;
6836
- },
6837
-
6838
- serialize: function() {
6839
- return jQuery.param( this.serializeArray() );
6840
- },
6841
-
6842
- serializeArray: function() {
6843
- return this.map(function(){
6844
- return this.elements ? jQuery.makeArray( this.elements ) : this;
6845
- })
6846
- .filter(function(){
6847
- return this.name && !this.disabled &&
6848
- ( this.checked || rselectTextarea.test( this.nodeName ) ||
6849
- rinput.test( this.type ) );
6850
- })
6851
- .map(function( i, elem ){
6852
- var val = jQuery( this ).val();
6853
-
6854
- return val == null ?
6855
- null :
6856
- jQuery.isArray( val ) ?
6857
- jQuery.map( val, function( val, i ){
6858
- return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
6859
- }) :
6860
- { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
6861
- }).get();
6862
- }
6863
- });
6864
-
6865
- // Attach a bunch of functions for handling common AJAX events
6866
- jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
6867
- jQuery.fn[ o ] = function( f ){
6868
- return this.bind( o, f );
6869
- };
6870
- });
6871
-
6872
- jQuery.each( [ "get", "post" ], function( i, method ) {
6873
- jQuery[ method ] = function( url, data, callback, type ) {
6874
- // shift arguments if data argument was omitted
6875
- if ( jQuery.isFunction( data ) ) {
6876
- type = type || callback;
6877
- callback = data;
6878
- data = undefined;
6879
- }
6880
-
6881
- return jQuery.ajax({
6882
- type: method,
6883
- url: url,
6884
- data: data,
6885
- success: callback,
6886
- dataType: type
6887
- });
6888
- };
6889
- });
6890
-
6891
- jQuery.extend({
6892
-
6893
- getScript: function( url, callback ) {
6894
- return jQuery.get( url, undefined, callback, "script" );
6895
- },
6896
-
6897
- getJSON: function( url, data, callback ) {
6898
- return jQuery.get( url, data, callback, "json" );
6899
- },
6900
-
6901
- // Creates a full fledged settings object into target
6902
- // with both ajaxSettings and settings fields.
6903
- // If target is omitted, writes into ajaxSettings.
6904
- ajaxSetup: function ( target, settings ) {
6905
- if ( !settings ) {
6906
- // Only one parameter, we extend ajaxSettings
6907
- settings = target;
6908
- target = jQuery.extend( true, jQuery.ajaxSettings, settings );
6909
- } else {
6910
- // target was provided, we extend into it
6911
- jQuery.extend( true, target, jQuery.ajaxSettings, settings );
6912
- }
6913
- // Flatten fields we don't want deep extended
6914
- for( var field in { context: 1, url: 1 } ) {
6915
- if ( field in settings ) {
6916
- target[ field ] = settings[ field ];
6917
- } else if( field in jQuery.ajaxSettings ) {
6918
- target[ field ] = jQuery.ajaxSettings[ field ];
6919
- }
6920
- }
6921
- return target;
6922
- },
6923
-
6924
- ajaxSettings: {
6925
- url: ajaxLocation,
6926
- isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
6927
- global: true,
6928
- type: "GET",
6929
- contentType: "application/x-www-form-urlencoded",
6930
- processData: true,
6931
- async: true,
6932
- /*
6933
- timeout: 0,
6934
- data: null,
6935
- dataType: null,
6936
- username: null,
6937
- password: null,
6938
- cache: null,
6939
- traditional: false,
6940
- headers: {},
6941
- */
6942
-
6943
- accepts: {
6944
- xml: "application/xml, text/xml",
6945
- html: "text/html",
6946
- text: "text/plain",
6947
- json: "application/json, text/javascript",
6948
- "*": "*/*"
6949
- },
6950
-
6951
- contents: {
6952
- xml: /xml/,
6953
- html: /html/,
6954
- json: /json/
6955
- },
6956
-
6957
- responseFields: {
6958
- xml: "responseXML",
6959
- text: "responseText"
6960
- },
6961
-
6962
- // List of data converters
6963
- // 1) key format is "source_type destination_type" (a single space in-between)
6964
- // 2) the catchall symbol "*" can be used for source_type
6965
- converters: {
6966
-
6967
- // Convert anything to text
6968
- "* text": window.String,
6969
-
6970
- // Text to html (true = no transformation)
6971
- "text html": true,
6972
-
6973
- // Evaluate text as a json expression
6974
- "text json": jQuery.parseJSON,
6975
-
6976
- // Parse text as xml
6977
- "text xml": jQuery.parseXML
6978
- }
6979
- },
6980
-
6981
- ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
6982
- ajaxTransport: addToPrefiltersOrTransports( transports ),
6983
-
6984
- // Main method
6985
- ajax: function( url, options ) {
6986
-
6987
- // If url is an object, simulate pre-1.5 signature
6988
- if ( typeof url === "object" ) {
6989
- options = url;
6990
- url = undefined;
6991
- }
6992
-
6993
- // Force options to be an object
6994
- options = options || {};
6995
-
6996
- var // Create the final options object
6997
- s = jQuery.ajaxSetup( {}, options ),
6998
- // Callbacks context
6999
- callbackContext = s.context || s,
7000
- // Context for global events
7001
- // It's the callbackContext if one was provided in the options
7002
- // and if it's a DOM node or a jQuery collection
7003
- globalEventContext = callbackContext !== s &&
7004
- ( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
7005
- jQuery( callbackContext ) : jQuery.event,
7006
- // Deferreds
7007
- deferred = jQuery.Deferred(),
7008
- completeDeferred = jQuery._Deferred(),
7009
- // Status-dependent callbacks
7010
- statusCode = s.statusCode || {},
7011
- // ifModified key
7012
- ifModifiedKey,
7013
- // Headers (they are sent all at once)
7014
- requestHeaders = {},
7015
- requestHeadersNames = {},
7016
- // Response headers
7017
- responseHeadersString,
7018
- responseHeaders,
7019
- // transport
7020
- transport,
7021
- // timeout handle
7022
- timeoutTimer,
7023
- // Cross-domain detection vars
7024
- parts,
7025
- // The jqXHR state
7026
- state = 0,
7027
- // To know if global events are to be dispatched
7028
- fireGlobals,
7029
- // Loop variable
7030
- i,
7031
- // Fake xhr
7032
- jqXHR = {
7033
-
7034
- readyState: 0,
7035
-
7036
- // Caches the header
7037
- setRequestHeader: function( name, value ) {
7038
- if ( !state ) {
7039
- var lname = name.toLowerCase();
7040
- name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
7041
- requestHeaders[ name ] = value;
7042
- }
7043
- return this;
7044
- },
7045
-
7046
- // Raw string
7047
- getAllResponseHeaders: function() {
7048
- return state === 2 ? responseHeadersString : null;
7049
- },
7050
-
7051
- // Builds headers hashtable if needed
7052
- getResponseHeader: function( key ) {
7053
- var match;
7054
- if ( state === 2 ) {
7055
- if ( !responseHeaders ) {
7056
- responseHeaders = {};
7057
- while( ( match = rheaders.exec( responseHeadersString ) ) ) {
7058
- responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
7059
- }
7060
- }
7061
- match = responseHeaders[ key.toLowerCase() ];
7062
- }
7063
- return match === undefined ? null : match;
7064
- },
7065
-
7066
- // Overrides response content-type header
7067
- overrideMimeType: function( type ) {
7068
- if ( !state ) {
7069
- s.mimeType = type;
7070
- }
7071
- return this;
7072
- },
7073
-
7074
- // Cancel the request
7075
- abort: function( statusText ) {
7076
- statusText = statusText || "abort";
7077
- if ( transport ) {
7078
- transport.abort( statusText );
7079
- }
7080
- done( 0, statusText );
7081
- return this;
7082
- }
7083
- };
7084
-
7085
- // Callback for when everything is done
7086
- // It is defined here because jslint complains if it is declared
7087
- // at the end of the function (which would be more logical and readable)
7088
- function done( status, statusText, responses, headers ) {
7089
-
7090
- // Called once
7091
- if ( state === 2 ) {
7092
- return;
7093
- }
7094
-
7095
- // State is "done" now
7096
- state = 2;
7097
-
7098
- // Clear timeout if it exists
7099
- if ( timeoutTimer ) {
7100
- clearTimeout( timeoutTimer );
7101
- }
7102
-
7103
- // Dereference transport for early garbage collection
7104
- // (no matter how long the jqXHR object will be used)
7105
- transport = undefined;
7106
-
7107
- // Cache response headers
7108
- responseHeadersString = headers || "";
7109
-
7110
- // Set readyState
7111
- jqXHR.readyState = status ? 4 : 0;
7112
-
7113
- var isSuccess,
7114
- success,
7115
- error,
7116
- response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,
7117
- lastModified,
7118
- etag;
7119
-
7120
- // If successful, handle type chaining
7121
- if ( status >= 200 && status < 300 || status === 304 ) {
7122
-
7123
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
7124
- if ( s.ifModified ) {
7125
-
7126
- if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) {
7127
- jQuery.lastModified[ ifModifiedKey ] = lastModified;
7128
- }
7129
- if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) {
7130
- jQuery.etag[ ifModifiedKey ] = etag;
7131
- }
7132
- }
7133
-
7134
- // If not modified
7135
- if ( status === 304 ) {
7136
-
7137
- statusText = "notmodified";
7138
- isSuccess = true;
7139
-
7140
- // If we have data
7141
- } else {
7142
-
7143
- try {
7144
- success = ajaxConvert( s, response );
7145
- statusText = "success";
7146
- isSuccess = true;
7147
- } catch(e) {
7148
- // We have a parsererror
7149
- statusText = "parsererror";
7150
- error = e;
7151
- }
7152
- }
7153
- } else {
7154
- // We extract error from statusText
7155
- // then normalize statusText and status for non-aborts
7156
- error = statusText;
7157
- if( !statusText || status ) {
7158
- statusText = "error";
7159
- if ( status < 0 ) {
7160
- status = 0;
7161
- }
7162
- }
7163
- }
7164
-
7165
- // Set data for the fake xhr object
7166
- jqXHR.status = status;
7167
- jqXHR.statusText = statusText;
7168
-
7169
- // Success/Error
7170
- if ( isSuccess ) {
7171
- deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
7172
- } else {
7173
- deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
7174
- }
7175
-
7176
- // Status-dependent callbacks
7177
- jqXHR.statusCode( statusCode );
7178
- statusCode = undefined;
7179
-
7180
- if ( fireGlobals ) {
7181
- globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
7182
- [ jqXHR, s, isSuccess ? success : error ] );
7183
- }
7184
-
7185
- // Complete
7186
- completeDeferred.resolveWith( callbackContext, [ jqXHR, statusText ] );
7187
-
7188
- if ( fireGlobals ) {
7189
- globalEventContext.trigger( "ajaxComplete", [ jqXHR, s] );
7190
- // Handle the global AJAX counter
7191
- if ( !( --jQuery.active ) ) {
7192
- jQuery.event.trigger( "ajaxStop" );
7193
- }
7194
- }
7195
- }
7196
-
7197
- // Attach deferreds
7198
- deferred.promise( jqXHR );
7199
- jqXHR.success = jqXHR.done;
7200
- jqXHR.error = jqXHR.fail;
7201
- jqXHR.complete = completeDeferred.done;
7202
-
7203
- // Status-dependent callbacks
7204
- jqXHR.statusCode = function( map ) {
7205
- if ( map ) {
7206
- var tmp;
7207
- if ( state < 2 ) {
7208
- for( tmp in map ) {
7209
- statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
7210
- }
7211
- } else {
7212
- tmp = map[ jqXHR.status ];
7213
- jqXHR.then( tmp, tmp );
7214
- }
7215
- }
7216
- return this;
7217
- };
7218
-
7219
- // Remove hash character (#7531: and string promotion)
7220
- // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
7221
- // We also use the url parameter if available
7222
- s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
7223
-
7224
- // Extract dataTypes list
7225
- s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
7226
-
7227
- // Determine if a cross-domain request is in order
7228
- if ( s.crossDomain == null ) {
7229
- parts = rurl.exec( s.url.toLowerCase() );
7230
- s.crossDomain = !!( parts &&
7231
- ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||
7232
- ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
7233
- ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
7234
- );
7235
- }
7236
-
7237
- // Convert data if not already a string
7238
- if ( s.data && s.processData && typeof s.data !== "string" ) {
7239
- s.data = jQuery.param( s.data, s.traditional );
7240
- }
7241
-
7242
- // Apply prefilters
7243
- inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
7244
-
7245
- // If request was aborted inside a prefiler, stop there
7246
- if ( state === 2 ) {
7247
- return false;
7248
- }
7249
-
7250
- // We can fire global events as of now if asked to
7251
- fireGlobals = s.global;
7252
-
7253
- // Uppercase the type
7254
- s.type = s.type.toUpperCase();
7255
-
7256
- // Determine if request has content
7257
- s.hasContent = !rnoContent.test( s.type );
7258
-
7259
- // Watch for a new set of requests
7260
- if ( fireGlobals && jQuery.active++ === 0 ) {
7261
- jQuery.event.trigger( "ajaxStart" );
7262
- }
7263
-
7264
- // More options handling for requests with no content
7265
- if ( !s.hasContent ) {
7266
-
7267
- // If data is available, append data to url
7268
- if ( s.data ) {
7269
- s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
7270
- }
7271
-
7272
- // Get ifModifiedKey before adding the anti-cache parameter
7273
- ifModifiedKey = s.url;
7274
-
7275
- // Add anti-cache in url if needed
7276
- if ( s.cache === false ) {
7277
-
7278
- var ts = jQuery.now(),
7279
- // try replacing _= if it is there
7280
- ret = s.url.replace( rts, "$1_=" + ts );
7281
-
7282
- // if nothing was replaced, add timestamp to the end
7283
- s.url = ret + ( (ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
7284
- }
7285
- }
7286
-
7287
- // Set the correct header, if data is being sent
7288
- if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
7289
- jqXHR.setRequestHeader( "Content-Type", s.contentType );
7290
- }
7291
-
7292
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
7293
- if ( s.ifModified ) {
7294
- ifModifiedKey = ifModifiedKey || s.url;
7295
- if ( jQuery.lastModified[ ifModifiedKey ] ) {
7296
- jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
7297
- }
7298
- if ( jQuery.etag[ ifModifiedKey ] ) {
7299
- jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );
7300
- }
7301
- }
7302
-
7303
- // Set the Accepts header for the server, depending on the dataType
7304
- jqXHR.setRequestHeader(
7305
- "Accept",
7306
- s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
7307
- s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", */*; q=0.01" : "" ) :
7308
- s.accepts[ "*" ]
7309
- );
7310
-
7311
- // Check for headers option
7312
- for ( i in s.headers ) {
7313
- jqXHR.setRequestHeader( i, s.headers[ i ] );
7314
- }
7315
-
7316
- // Allow custom headers/mimetypes and early abort
7317
- if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
7318
- // Abort if not done already
7319
- jqXHR.abort();
7320
- return false;
7321
-
7322
- }
7323
-
7324
- // Install callbacks on deferreds
7325
- for ( i in { success: 1, error: 1, complete: 1 } ) {
7326
- jqXHR[ i ]( s[ i ] );
7327
- }
7328
-
7329
- // Get transport
7330
- transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
7331
-
7332
- // If no transport, we auto-abort
7333
- if ( !transport ) {
7334
- done( -1, "No Transport" );
7335
- } else {
7336
- jqXHR.readyState = 1;
7337
- // Send global event
7338
- if ( fireGlobals ) {
7339
- globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
7340
- }
7341
- // Timeout
7342
- if ( s.async && s.timeout > 0 ) {
7343
- timeoutTimer = setTimeout( function(){
7344
- jqXHR.abort( "timeout" );
7345
- }, s.timeout );
7346
- }
7347
-
7348
- try {
7349
- state = 1;
7350
- transport.send( requestHeaders, done );
7351
- } catch (e) {
7352
- // Propagate exception as error if not done
7353
- if ( status < 2 ) {
7354
- done( -1, e );
7355
- // Simply rethrow otherwise
7356
- } else {
7357
- jQuery.error( e );
7358
- }
7359
- }
7360
- }
7361
-
7362
- return jqXHR;
7363
- },
7364
-
7365
- // Serialize an array of form elements or a set of
7366
- // key/values into a query string
7367
- param: function( a, traditional ) {
7368
- var s = [],
7369
- add = function( key, value ) {
7370
- // If value is a function, invoke it and return its value
7371
- value = jQuery.isFunction( value ) ? value() : value;
7372
- s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
7373
- };
7374
-
7375
- // Set traditional to true for jQuery <= 1.3.2 behavior.
7376
- if ( traditional === undefined ) {
7377
- traditional = jQuery.ajaxSettings.traditional;
7378
- }
7379
-
7380
- // If an array was passed in, assume that it is an array of form elements.
7381
- if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
7382
- // Serialize the form elements
7383
- jQuery.each( a, function() {
7384
- add( this.name, this.value );
7385
- });
7386
-
7387
- } else {
7388
- // If traditional, encode the "old" way (the way 1.3.2 or older
7389
- // did it), otherwise encode params recursively.
7390
- for ( var prefix in a ) {
7391
- buildParams( prefix, a[ prefix ], traditional, add );
7392
- }
7393
- }
7394
-
7395
- // Return the resulting serialization
7396
- return s.join( "&" ).replace( r20, "+" );
7397
- }
7398
- });
7399
-
7400
- function buildParams( prefix, obj, traditional, add ) {
7401
- if ( jQuery.isArray( obj ) ) {
7402
- // Serialize array item.
7403
- jQuery.each( obj, function( i, v ) {
7404
- if ( traditional || rbracket.test( prefix ) ) {
7405
- // Treat each array item as a scalar.
7406
- add( prefix, v );
7407
-
7408
- } else {
7409
- // If array item is non-scalar (array or object), encode its
7410
- // numeric index to resolve deserialization ambiguity issues.
7411
- // Note that rack (as of 1.0.0) can't currently deserialize
7412
- // nested arrays properly, and attempting to do so may cause
7413
- // a server error. Possible fixes are to modify rack's
7414
- // deserialization algorithm or to provide an option or flag
7415
- // to force array serialization to be shallow.
7416
- buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add );
7417
- }
7418
- });
7419
-
7420
- } else if ( !traditional && obj != null && typeof obj === "object" ) {
7421
- // Serialize object item.
7422
- for ( var name in obj ) {
7423
- buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
7424
- }
7425
-
7426
- } else {
7427
- // Serialize scalar item.
7428
- add( prefix, obj );
7429
- }
7430
- }
7431
-
7432
- // This is still on the jQuery object... for now
7433
- // Want to move this to jQuery.ajax some day
7434
- jQuery.extend({
7435
-
7436
- // Counter for holding the number of active queries
7437
- active: 0,
7438
-
7439
- // Last-Modified header cache for next request
7440
- lastModified: {},
7441
- etag: {}
7442
-
7443
- });
7444
-
7445
- /* Handles responses to an ajax request:
7446
- * - sets all responseXXX fields accordingly
7447
- * - finds the right dataType (mediates between content-type and expected dataType)
7448
- * - returns the corresponding response
7449
- */
7450
- function ajaxHandleResponses( s, jqXHR, responses ) {
7451
-
7452
- var contents = s.contents,
7453
- dataTypes = s.dataTypes,
7454
- responseFields = s.responseFields,
7455
- ct,
7456
- type,
7457
- finalDataType,
7458
- firstDataType;
7459
-
7460
- // Fill responseXXX fields
7461
- for( type in responseFields ) {
7462
- if ( type in responses ) {
7463
- jqXHR[ responseFields[type] ] = responses[ type ];
7464
- }
7465
- }
7466
-
7467
- // Remove auto dataType and get content-type in the process
7468
- while( dataTypes[ 0 ] === "*" ) {
7469
- dataTypes.shift();
7470
- if ( ct === undefined ) {
7471
- ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
7472
- }
7473
- }
7474
-
7475
- // Check if we're dealing with a known content-type
7476
- if ( ct ) {
7477
- for ( type in contents ) {
7478
- if ( contents[ type ] && contents[ type ].test( ct ) ) {
7479
- dataTypes.unshift( type );
7480
- break;
7481
- }
7482
- }
7483
- }
7484
-
7485
- // Check to see if we have a response for the expected dataType
7486
- if ( dataTypes[ 0 ] in responses ) {
7487
- finalDataType = dataTypes[ 0 ];
7488
- } else {
7489
- // Try convertible dataTypes
7490
- for ( type in responses ) {
7491
- if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
7492
- finalDataType = type;
7493
- break;
7494
- }
7495
- if ( !firstDataType ) {
7496
- firstDataType = type;
7497
- }
7498
- }
7499
- // Or just use first one
7500
- finalDataType = finalDataType || firstDataType;
7501
- }
7502
-
7503
- // If we found a dataType
7504
- // We add the dataType to the list if needed
7505
- // and return the corresponding response
7506
- if ( finalDataType ) {
7507
- if ( finalDataType !== dataTypes[ 0 ] ) {
7508
- dataTypes.unshift( finalDataType );
7509
- }
7510
- return responses[ finalDataType ];
7511
- }
7512
- }
7513
-
7514
- // Chain conversions given the request and the original response
7515
- function ajaxConvert( s, response ) {
7516
-
7517
- // Apply the dataFilter if provided
7518
- if ( s.dataFilter ) {
7519
- response = s.dataFilter( response, s.dataType );
7520
- }
7521
-
7522
- var dataTypes = s.dataTypes,
7523
- converters = {},
7524
- i,
7525
- key,
7526
- length = dataTypes.length,
7527
- tmp,
7528
- // Current and previous dataTypes
7529
- current = dataTypes[ 0 ],
7530
- prev,
7531
- // Conversion expression
7532
- conversion,
7533
- // Conversion function
7534
- conv,
7535
- // Conversion functions (transitive conversion)
7536
- conv1,
7537
- conv2;
7538
-
7539
- // For each dataType in the chain
7540
- for( i = 1; i < length; i++ ) {
7541
-
7542
- // Create converters map
7543
- // with lowercased keys
7544
- if ( i === 1 ) {
7545
- for( key in s.converters ) {
7546
- if( typeof key === "string" ) {
7547
- converters[ key.toLowerCase() ] = s.converters[ key ];
7548
- }
7549
- }
7550
- }
7551
-
7552
- // Get the dataTypes
7553
- prev = current;
7554
- current = dataTypes[ i ];
7555
-
7556
- // If current is auto dataType, update it to prev
7557
- if( current === "*" ) {
7558
- current = prev;
7559
- // If no auto and dataTypes are actually different
7560
- } else if ( prev !== "*" && prev !== current ) {
7561
-
7562
- // Get the converter
7563
- conversion = prev + " " + current;
7564
- conv = converters[ conversion ] || converters[ "* " + current ];
7565
-
7566
- // If there is no direct converter, search transitively
7567
- if ( !conv ) {
7568
- conv2 = undefined;
7569
- for( conv1 in converters ) {
7570
- tmp = conv1.split( " " );
7571
- if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) {
7572
- conv2 = converters[ tmp[1] + " " + current ];
7573
- if ( conv2 ) {
7574
- conv1 = converters[ conv1 ];
7575
- if ( conv1 === true ) {
7576
- conv = conv2;
7577
- } else if ( conv2 === true ) {
7578
- conv = conv1;
7579
- }
7580
- break;
7581
- }
7582
- }
7583
- }
7584
- }
7585
- // If we found no converter, dispatch an error
7586
- if ( !( conv || conv2 ) ) {
7587
- jQuery.error( "No conversion from " + conversion.replace(" "," to ") );
7588
- }
7589
- // If found converter is not an equivalence
7590
- if ( conv !== true ) {
7591
- // Convert with 1 or 2 converters accordingly
7592
- response = conv ? conv( response ) : conv2( conv1(response) );
7593
- }
7594
- }
7595
- }
7596
- return response;
7597
- }
7598
-
7599
-
7600
-
7601
-
7602
- var jsc = jQuery.now(),
7603
- jsre = /(\=)\?(&|$)|\?\?/i;
7604
-
7605
- // Default jsonp settings
7606
- jQuery.ajaxSetup({
7607
- jsonp: "callback",
7608
- jsonpCallback: function() {
7609
- return jQuery.expando + "_" + ( jsc++ );
7610
- }
7611
- });
7612
-
7613
- // Detect, normalize options and install callbacks for jsonp requests
7614
- jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
7615
-
7616
- var inspectData = s.contentType === "application/x-www-form-urlencoded" &&
7617
- ( typeof s.data === "string" );
7618
-
7619
- if ( s.dataTypes[ 0 ] === "jsonp" ||
7620
- s.jsonp !== false && ( jsre.test( s.url ) ||
7621
- inspectData && jsre.test( s.data ) ) ) {
7622
-
7623
- var responseContainer,
7624
- jsonpCallback = s.jsonpCallback =
7625
- jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback,
7626
- previous = window[ jsonpCallback ],
7627
- url = s.url,
7628
- data = s.data,
7629
- replace = "$1" + jsonpCallback + "$2";
7630
-
7631
- if ( s.jsonp !== false ) {
7632
- url = url.replace( jsre, replace );
7633
- if ( s.url === url ) {
7634
- if ( inspectData ) {
7635
- data = data.replace( jsre, replace );
7636
- }
7637
- if ( s.data === data ) {
7638
- // Add callback manually
7639
- url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback;
7640
- }
7641
- }
7642
- }
7643
-
7644
- s.url = url;
7645
- s.data = data;
7646
-
7647
- // Install callback
7648
- window[ jsonpCallback ] = function( response ) {
7649
- responseContainer = [ response ];
7650
- };
7651
-
7652
- // Clean-up function
7653
- jqXHR.always(function() {
7654
- // Set callback back to previous value
7655
- window[ jsonpCallback ] = previous;
7656
- // Call if it was a function and we have a response
7657
- if ( responseContainer && jQuery.isFunction( previous ) ) {
7658
- window[ jsonpCallback ]( responseContainer[ 0 ] );
7659
- }
7660
- });
7661
-
7662
- // Use data converter to retrieve json after script execution
7663
- s.converters["script json"] = function() {
7664
- if ( !responseContainer ) {
7665
- jQuery.error( jsonpCallback + " was not called" );
7666
- }
7667
- return responseContainer[ 0 ];
7668
- };
7669
-
7670
- // force json dataType
7671
- s.dataTypes[ 0 ] = "json";
7672
-
7673
- // Delegate to script
7674
- return "script";
7675
- }
7676
- });
7677
-
7678
-
7679
-
7680
-
7681
- // Install script dataType
7682
- jQuery.ajaxSetup({
7683
- accepts: {
7684
- script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
7685
- },
7686
- contents: {
7687
- script: /javascript|ecmascript/
7688
- },
7689
- converters: {
7690
- "text script": function( text ) {
7691
- jQuery.globalEval( text );
7692
- return text;
7693
- }
7694
- }
7695
- });
7696
-
7697
- // Handle cache's special case and global
7698
- jQuery.ajaxPrefilter( "script", function( s ) {
7699
- if ( s.cache === undefined ) {
7700
- s.cache = false;
7701
- }
7702
- if ( s.crossDomain ) {
7703
- s.type = "GET";
7704
- s.global = false;
7705
- }
7706
- });
7707
-
7708
- // Bind script tag hack transport
7709
- jQuery.ajaxTransport( "script", function(s) {
7710
-
7711
- // This transport only deals with cross domain requests
7712
- if ( s.crossDomain ) {
7713
-
7714
- var script,
7715
- head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement;
7716
-
7717
- return {
7718
-
7719
- send: function( _, callback ) {
7720
-
7721
- script = document.createElement( "script" );
7722
-
7723
- script.async = "async";
7724
-
7725
- if ( s.scriptCharset ) {
7726
- script.charset = s.scriptCharset;
7727
- }
7728
-
7729
- script.src = s.url;
7730
-
7731
- // Attach handlers for all browsers
7732
- script.onload = script.onreadystatechange = function( _, isAbort ) {
7733
-
7734
- if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
7735
-
7736
- // Handle memory leak in IE
7737
- script.onload = script.onreadystatechange = null;
7738
-
7739
- // Remove the script
7740
- if ( head && script.parentNode ) {
7741
- head.removeChild( script );
7742
- }
7743
-
7744
- // Dereference the script
7745
- script = undefined;
7746
-
7747
- // Callback if not abort
7748
- if ( !isAbort ) {
7749
- callback( 200, "success" );
7750
- }
7751
- }
7752
- };
7753
- // Use insertBefore instead of appendChild to circumvent an IE6 bug.
7754
- // This arises when a base node is used (#2709 and #4378).
7755
- head.insertBefore( script, head.firstChild );
7756
- },
7757
-
7758
- abort: function() {
7759
- if ( script ) {
7760
- script.onload( 0, 1 );
7761
- }
7762
- }
7763
- };
7764
- }
7765
- });
7766
-
7767
-
7768
-
7769
-
7770
- var // #5280: Internet Explorer will keep connections alive if we don't abort on unload
7771
- xhrOnUnloadAbort = window.ActiveXObject ? function() {
7772
- // Abort all pending requests
7773
- for ( var key in xhrCallbacks ) {
7774
- xhrCallbacks[ key ]( 0, 1 );
7775
- }
7776
- } : false,
7777
- xhrId = 0,
7778
- xhrCallbacks;
7779
-
7780
- // Functions to create xhrs
7781
- function createStandardXHR() {
7782
- try {
7783
- return new window.XMLHttpRequest();
7784
- } catch( e ) {}
7785
- }
7786
-
7787
- function createActiveXHR() {
7788
- try {
7789
- return new window.ActiveXObject( "Microsoft.XMLHTTP" );
7790
- } catch( e ) {}
7791
- }
7792
-
7793
- // Create the request object
7794
- // (This is still attached to ajaxSettings for backward compatibility)
7795
- jQuery.ajaxSettings.xhr = window.ActiveXObject ?
7796
- /* Microsoft failed to properly
7797
- * implement the XMLHttpRequest in IE7 (can't request local files),
7798
- * so we use the ActiveXObject when it is available
7799
- * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
7800
- * we need a fallback.
7801
- */
7802
- function() {
7803
- return !this.isLocal && createStandardXHR() || createActiveXHR();
7804
- } :
7805
- // For all other browsers, use the standard XMLHttpRequest object
7806
- createStandardXHR;
7807
-
7808
- // Determine support properties
7809
- (function( xhr ) {
7810
- jQuery.extend( jQuery.support, {
7811
- ajax: !!xhr,
7812
- cors: !!xhr && ( "withCredentials" in xhr )
7813
- });
7814
- })( jQuery.ajaxSettings.xhr() );
7815
-
7816
- // Create transport if the browser can provide an xhr
7817
- if ( jQuery.support.ajax ) {
7818
-
7819
- jQuery.ajaxTransport(function( s ) {
7820
- // Cross domain only allowed if supported through XMLHttpRequest
7821
- if ( !s.crossDomain || jQuery.support.cors ) {
7822
-
7823
- var callback;
7824
-
7825
- return {
7826
- send: function( headers, complete ) {
7827
-
7828
- // Get a new xhr
7829
- var xhr = s.xhr(),
7830
- handle,
7831
- i;
7832
-
7833
- // Open the socket
7834
- // Passing null username, generates a login popup on Opera (#2865)
7835
- if ( s.username ) {
7836
- xhr.open( s.type, s.url, s.async, s.username, s.password );
7837
- } else {
7838
- xhr.open( s.type, s.url, s.async );
7839
- }
7840
-
7841
- // Apply custom fields if provided
7842
- if ( s.xhrFields ) {
7843
- for ( i in s.xhrFields ) {
7844
- xhr[ i ] = s.xhrFields[ i ];
7845
- }
7846
- }
7847
-
7848
- // Override mime type if needed
7849
- if ( s.mimeType && xhr.overrideMimeType ) {
7850
- xhr.overrideMimeType( s.mimeType );
7851
- }
7852
-
7853
- // X-Requested-With header
7854
- // For cross-domain requests, seeing as conditions for a preflight are
7855
- // akin to a jigsaw puzzle, we simply never set it to be sure.
7856
- // (it can always be set on a per-request basis or even using ajaxSetup)
7857
- // For same-domain requests, won't change header if already provided.
7858
- if ( !s.crossDomain && !headers["X-Requested-With"] ) {
7859
- headers[ "X-Requested-With" ] = "XMLHttpRequest";
7860
- }
7861
-
7862
- // Need an extra try/catch for cross domain requests in Firefox 3
7863
- try {
7864
- for ( i in headers ) {
7865
- xhr.setRequestHeader( i, headers[ i ] );
7866
- }
7867
- } catch( _ ) {}
7868
-
7869
- // Do send the request
7870
- // This may raise an exception which is actually
7871
- // handled in jQuery.ajax (so no try/catch here)
7872
- xhr.send( ( s.hasContent && s.data ) || null );
7873
-
7874
- // Listener
7875
- callback = function( _, isAbort ) {
7876
-
7877
- var status,
7878
- statusText,
7879
- responseHeaders,
7880
- responses,
7881
- xml;
7882
-
7883
- // Firefox throws exceptions when accessing properties
7884
- // of an xhr when a network error occured
7885
- // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
7886
- try {
7887
-
7888
- // Was never called and is aborted or complete
7889
- if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
7890
-
7891
- // Only called once
7892
- callback = undefined;
7893
-
7894
- // Do not keep as active anymore
7895
- if ( handle ) {
7896
- xhr.onreadystatechange = jQuery.noop;
7897
- if ( xhrOnUnloadAbort ) {
7898
- delete xhrCallbacks[ handle ];
7899
- }
7900
- }
7901
-
7902
- // If it's an abort
7903
- if ( isAbort ) {
7904
- // Abort it manually if needed
7905
- if ( xhr.readyState !== 4 ) {
7906
- xhr.abort();
7907
- }
7908
- } else {
7909
- status = xhr.status;
7910
- responseHeaders = xhr.getAllResponseHeaders();
7911
- responses = {};
7912
- xml = xhr.responseXML;
7913
-
7914
- // Construct response list
7915
- if ( xml && xml.documentElement /* #4958 */ ) {
7916
- responses.xml = xml;
7917
- }
7918
- responses.text = xhr.responseText;
7919
-
7920
- // Firefox throws an exception when accessing
7921
- // statusText for faulty cross-domain requests
7922
- try {
7923
- statusText = xhr.statusText;
7924
- } catch( e ) {
7925
- // We normalize with Webkit giving an empty statusText
7926
- statusText = "";
7927
- }
7928
-
7929
- // Filter status for non standard behaviors
7930
-
7931
- // If the request is local and we have data: assume a success
7932
- // (success with no data won't get notified, that's the best we
7933
- // can do given current implementations)
7934
- if ( !status && s.isLocal && !s.crossDomain ) {
7935
- status = responses.text ? 200 : 404;
7936
- // IE - #1450: sometimes returns 1223 when it should be 204
7937
- } else if ( status === 1223 ) {
7938
- status = 204;
7939
- }
7940
- }
7941
- }
7942
- } catch( firefoxAccessException ) {
7943
- if ( !isAbort ) {
7944
- complete( -1, firefoxAccessException );
7945
- }
7946
- }
7947
-
7948
- // Call complete if needed
7949
- if ( responses ) {
7950
- complete( status, statusText, responses, responseHeaders );
7951
- }
7952
- };
7953
-
7954
- // if we're in sync mode or it's in cache
7955
- // and has been retrieved directly (IE6 & IE7)
7956
- // we need to manually fire the callback
7957
- if ( !s.async || xhr.readyState === 4 ) {
7958
- callback();
7959
- } else {
7960
- handle = ++xhrId;
7961
- if ( xhrOnUnloadAbort ) {
7962
- // Create the active xhrs callbacks list if needed
7963
- // and attach the unload handler
7964
- if ( !xhrCallbacks ) {
7965
- xhrCallbacks = {};
7966
- jQuery( window ).unload( xhrOnUnloadAbort );
7967
- }
7968
- // Add to list of active xhrs callbacks
7969
- xhrCallbacks[ handle ] = callback;
7970
- }
7971
- xhr.onreadystatechange = callback;
7972
- }
7973
- },
7974
-
7975
- abort: function() {
7976
- if ( callback ) {
7977
- callback(0,1);
7978
- }
7979
- }
7980
- };
7981
- }
7982
- });
7983
- }
7984
-
7985
-
7986
-
7987
-
7988
- var elemdisplay = {},
7989
- iframe, iframeDoc,
7990
- rfxtypes = /^(?:toggle|show|hide)$/,
7991
- rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
7992
- timerId,
7993
- fxAttrs = [
7994
- // height animations
7995
- [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
7996
- // width animations
7997
- [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
7998
- // opacity animations
7999
- [ "opacity" ]
8000
- ],
8001
- fxNow,
8002
- requestAnimationFrame = window.webkitRequestAnimationFrame ||
8003
- window.mozRequestAnimationFrame ||
8004
- window.oRequestAnimationFrame;
8005
-
8006
- jQuery.fn.extend({
8007
- show: function( speed, easing, callback ) {
8008
- var elem, display;
8009
-
8010
- if ( speed || speed === 0 ) {
8011
- return this.animate( genFx("show", 3), speed, easing, callback);
8012
-
8013
- } else {
8014
- for ( var i = 0, j = this.length; i < j; i++ ) {
8015
- elem = this[i];
8016
-
8017
- if ( elem.style ) {
8018
- display = elem.style.display;
8019
-
8020
- // Reset the inline display of this element to learn if it is
8021
- // being hidden by cascaded rules or not
8022
- if ( !jQuery._data(elem, "olddisplay") && display === "none" ) {
8023
- display = elem.style.display = "";
8024
- }
8025
-
8026
- // Set elements which have been overridden with display: none
8027
- // in a stylesheet to whatever the default browser style is
8028
- // for such an element
8029
- if ( display === "" && jQuery.css( elem, "display" ) === "none" ) {
8030
- jQuery._data(elem, "olddisplay", defaultDisplay(elem.nodeName));
8031
- }
8032
- }
8033
- }
8034
-
8035
- // Set the display of most of the elements in a second loop
8036
- // to avoid the constant reflow
8037
- for ( i = 0; i < j; i++ ) {
8038
- elem = this[i];
8039
-
8040
- if ( elem.style ) {
8041
- display = elem.style.display;
8042
-
8043
- if ( display === "" || display === "none" ) {
8044
- elem.style.display = jQuery._data(elem, "olddisplay") || "";
8045
- }
8046
- }
8047
- }
8048
-
8049
- return this;
8050
- }
8051
- },
8052
-
8053
- hide: function( speed, easing, callback ) {
8054
- if ( speed || speed === 0 ) {
8055
- return this.animate( genFx("hide", 3), speed, easing, callback);
8056
-
8057
- } else {
8058
- for ( var i = 0, j = this.length; i < j; i++ ) {
8059
- if ( this[i].style ) {
8060
- var display = jQuery.css( this[i], "display" );
8061
-
8062
- if ( display !== "none" && !jQuery._data( this[i], "olddisplay" ) ) {
8063
- jQuery._data( this[i], "olddisplay", display );
8064
- }
8065
- }
8066
- }
8067
-
8068
- // Set the display of the elements in a second loop
8069
- // to avoid the constant reflow
8070
- for ( i = 0; i < j; i++ ) {
8071
- if ( this[i].style ) {
8072
- this[i].style.display = "none";
8073
- }
8074
- }
8075
-
8076
- return this;
8077
- }
8078
- },
8079
-
8080
- // Save the old toggle function
8081
- _toggle: jQuery.fn.toggle,
8082
-
8083
- toggle: function( fn, fn2, callback ) {
8084
- var bool = typeof fn === "boolean";
8085
-
8086
- if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {
8087
- this._toggle.apply( this, arguments );
8088
-
8089
- } else if ( fn == null || bool ) {
8090
- this.each(function() {
8091
- var state = bool ? fn : jQuery(this).is(":hidden");
8092
- jQuery(this)[ state ? "show" : "hide" ]();
8093
- });
8094
-
8095
- } else {
8096
- this.animate(genFx("toggle", 3), fn, fn2, callback);
8097
- }
8098
-
8099
- return this;
8100
- },
8101
-
8102
- fadeTo: function( speed, to, easing, callback ) {
8103
- return this.filter(":hidden").css("opacity", 0).show().end()
8104
- .animate({opacity: to}, speed, easing, callback);
8105
- },
8106
-
8107
- animate: function( prop, speed, easing, callback ) {
8108
- var optall = jQuery.speed(speed, easing, callback);
8109
-
8110
- if ( jQuery.isEmptyObject( prop ) ) {
8111
- return this.each( optall.complete, [ false ] );
8112
- }
8113
-
8114
- // Do not change referenced properties as per-property easing will be lost
8115
- prop = jQuery.extend( {}, prop );
8116
-
8117
- return this[ optall.queue === false ? "each" : "queue" ](function() {
8118
- // XXX 'this' does not always have a nodeName when running the
8119
- // test suite
8120
-
8121
- if ( optall.queue === false ) {
8122
- jQuery._mark( this );
8123
- }
8124
-
8125
- var opt = jQuery.extend( {}, optall ),
8126
- isElement = this.nodeType === 1,
8127
- hidden = isElement && jQuery(this).is(":hidden"),
8128
- name, val, p,
8129
- display, e,
8130
- parts, start, end, unit;
8131
-
8132
- // will store per property easing and be used to determine when an animation is complete
8133
- opt.animatedProperties = {};
8134
-
8135
- for ( p in prop ) {
8136
-
8137
- // property name normalization
8138
- name = jQuery.camelCase( p );
8139
- if ( p !== name ) {
8140
- prop[ name ] = prop[ p ];
8141
- delete prop[ p ];
8142
- }
8143
-
8144
- val = prop[ name ];
8145
-
8146
- // easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
8147
- if ( jQuery.isArray( val ) ) {
8148
- opt.animatedProperties[ name ] = val[ 1 ];
8149
- val = prop[ name ] = val[ 0 ];
8150
- } else {
8151
- opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing';
8152
- }
8153
-
8154
- if ( val === "hide" && hidden || val === "show" && !hidden ) {
8155
- return opt.complete.call( this );
8156
- }
8157
-
8158
- if ( isElement && ( name === "height" || name === "width" ) ) {
8159
- // Make sure that nothing sneaks out
8160
- // Record all 3 overflow attributes because IE does not
8161
- // change the overflow attribute when overflowX and
8162
- // overflowY are set to the same value
8163
- opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];
8164
-
8165
- // Set display property to inline-block for height/width
8166
- // animations on inline elements that are having width/height
8167
- // animated
8168
- if ( jQuery.css( this, "display" ) === "inline" &&
8169
- jQuery.css( this, "float" ) === "none" ) {
8170
- if ( !jQuery.support.inlineBlockNeedsLayout ) {
8171
- this.style.display = "inline-block";
8172
-
8173
- } else {
8174
- display = defaultDisplay( this.nodeName );
8175
-
8176
- // inline-level elements accept inline-block;
8177
- // block-level elements need to be inline with layout
8178
- if ( display === "inline" ) {
8179
- this.style.display = "inline-block";
8180
-
8181
- } else {
8182
- this.style.display = "inline";
8183
- this.style.zoom = 1;
8184
- }
8185
- }
8186
- }
8187
- }
8188
- }
8189
-
8190
- if ( opt.overflow != null ) {
8191
- this.style.overflow = "hidden";
8192
- }
8193
-
8194
- for ( p in prop ) {
8195
- e = new jQuery.fx( this, opt, p );
8196
- val = prop[ p ];
8197
-
8198
- if ( rfxtypes.test(val) ) {
8199
- e[ val === "toggle" ? hidden ? "show" : "hide" : val ]();
8200
-
8201
- } else {
8202
- parts = rfxnum.exec( val );
8203
- start = e.cur();
8204
-
8205
- if ( parts ) {
8206
- end = parseFloat( parts[2] );
8207
- unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" );
8208
-
8209
- // We need to compute starting value
8210
- if ( unit !== "px" ) {
8211
- jQuery.style( this, p, (end || 1) + unit);
8212
- start = ((end || 1) / e.cur()) * start;
8213
- jQuery.style( this, p, start + unit);
8214
- }
8215
-
8216
- // If a +=/-= token was provided, we're doing a relative animation
8217
- if ( parts[1] ) {
8218
- end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start;
8219
- }
8220
-
8221
- e.custom( start, end, unit );
8222
-
8223
- } else {
8224
- e.custom( start, val, "" );
8225
- }
8226
- }
8227
- }
8228
-
8229
- // For JS strict compliance
8230
- return true;
8231
- });
8232
- },
8233
-
8234
- stop: function( clearQueue, gotoEnd ) {
8235
- if ( clearQueue ) {
8236
- this.queue([]);
8237
- }
8238
-
8239
- this.each(function() {
8240
- var timers = jQuery.timers,
8241
- i = timers.length;
8242
- // clear marker counters if we know they won't be
8243
- if ( !gotoEnd ) {
8244
- jQuery._unmark( true, this );
8245
- }
8246
- while ( i-- ) {
8247
- if ( timers[i].elem === this ) {
8248
- if (gotoEnd) {
8249
- // force the next step to be the last
8250
- timers[i](true);
8251
- }
8252
-
8253
- timers.splice(i, 1);
8254
- }
8255
- }
8256
- });
8257
-
8258
- // start the next in the queue if the last step wasn't forced
8259
- if ( !gotoEnd ) {
8260
- this.dequeue();
8261
- }
8262
-
8263
- return this;
8264
- }
8265
-
8266
- });
8267
-
8268
- // Animations created synchronously will run synchronously
8269
- function createFxNow() {
8270
- setTimeout( clearFxNow, 0 );
8271
- return ( fxNow = jQuery.now() );
8272
- }
8273
-
8274
- function clearFxNow() {
8275
- fxNow = undefined;
8276
- }
8277
-
8278
- // Generate parameters to create a standard animation
8279
- function genFx( type, num ) {
8280
- var obj = {};
8281
-
8282
- jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() {
8283
- obj[ this ] = type;
8284
- });
8285
-
8286
- return obj;
8287
- }
8288
-
8289
- // Generate shortcuts for custom animations
8290
- jQuery.each({
8291
- slideDown: genFx("show", 1),
8292
- slideUp: genFx("hide", 1),
8293
- slideToggle: genFx("toggle", 1),
8294
- fadeIn: { opacity: "show" },
8295
- fadeOut: { opacity: "hide" },
8296
- fadeToggle: { opacity: "toggle" }
8297
- }, function( name, props ) {
8298
- jQuery.fn[ name ] = function( speed, easing, callback ) {
8299
- return this.animate( props, speed, easing, callback );
8300
- };
8301
- });
8302
-
8303
- jQuery.extend({
8304
- speed: function( speed, easing, fn ) {
8305
- var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
8306
- complete: fn || !fn && easing ||
8307
- jQuery.isFunction( speed ) && speed,
8308
- duration: speed,
8309
- easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
8310
- };
8311
-
8312
- opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
8313
- opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default;
8314
-
8315
- // Queueing
8316
- opt.old = opt.complete;
8317
- opt.complete = function( noUnmark ) {
8318
- if ( jQuery.isFunction( opt.old ) ) {
8319
- opt.old.call( this );
8320
- }
8321
-
8322
- if ( opt.queue !== false ) {
8323
- jQuery.dequeue( this );
8324
- } else if ( noUnmark !== false ) {
8325
- jQuery._unmark( this );
8326
- }
8327
- };
8328
-
8329
- return opt;
8330
- },
8331
-
8332
- easing: {
8333
- linear: function( p, n, firstNum, diff ) {
8334
- return firstNum + diff * p;
8335
- },
8336
- swing: function( p, n, firstNum, diff ) {
8337
- return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
8338
- }
8339
- },
8340
-
8341
- timers: [],
8342
-
8343
- fx: function( elem, options, prop ) {
8344
- this.options = options;
8345
- this.elem = elem;
8346
- this.prop = prop;
8347
-
8348
- options.orig = options.orig || {};
8349
- }
8350
-
8351
- });
8352
-
8353
- jQuery.fx.prototype = {
8354
- // Simple function for setting a style value
8355
- update: function() {
8356
- if ( this.options.step ) {
8357
- this.options.step.call( this.elem, this.now, this );
8358
- }
8359
-
8360
- (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
8361
- },
8362
-
8363
- // Get the current size
8364
- cur: function() {
8365
- if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
8366
- return this.elem[ this.prop ];
8367
- }
8368
-
8369
- var parsed,
8370
- r = jQuery.css( this.elem, this.prop );
8371
- // Empty strings, null, undefined and "auto" are converted to 0,
8372
- // complex values such as "rotate(1rad)" are returned as is,
8373
- // simple values such as "10px" are parsed to Float.
8374
- return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed;
8375
- },
8376
-
8377
- // Start an animation from one number to another
8378
- custom: function( from, to, unit ) {
8379
- var self = this,
8380
- fx = jQuery.fx,
8381
- raf;
8382
-
8383
- this.startTime = fxNow || createFxNow();
8384
- this.start = from;
8385
- this.end = to;
8386
- this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" );
8387
- this.now = this.start;
8388
- this.pos = this.state = 0;
8389
-
8390
- function t( gotoEnd ) {
8391
- return self.step(gotoEnd);
8392
- }
8393
-
8394
- t.elem = this.elem;
8395
-
8396
- if ( t() && jQuery.timers.push(t) && !timerId ) {
8397
- // Use requestAnimationFrame instead of setInterval if available
8398
- if ( requestAnimationFrame ) {
8399
- timerId = 1;
8400
- raf = function() {
8401
- // When timerId gets set to null at any point, this stops
8402
- if ( timerId ) {
8403
- requestAnimationFrame( raf );
8404
- fx.tick();
8405
- }
8406
- };
8407
- requestAnimationFrame( raf );
8408
- } else {
8409
- timerId = setInterval( fx.tick, fx.interval );
8410
- }
8411
- }
8412
- },
8413
-
8414
- // Simple 'show' function
8415
- show: function() {
8416
- // Remember where we started, so that we can go back to it later
8417
- this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
8418
- this.options.show = true;
8419
-
8420
- // Begin the animation
8421
- // Make sure that we start at a small width/height to avoid any
8422
- // flash of content
8423
- this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur());
8424
-
8425
- // Start by showing the element
8426
- jQuery( this.elem ).show();
8427
- },
8428
-
8429
- // Simple 'hide' function
8430
- hide: function() {
8431
- // Remember where we started, so that we can go back to it later
8432
- this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
8433
- this.options.hide = true;
8434
-
8435
- // Begin the animation
8436
- this.custom(this.cur(), 0);
8437
- },
8438
-
8439
- // Each step of an animation
8440
- step: function( gotoEnd ) {
8441
- var t = fxNow || createFxNow(),
8442
- done = true,
8443
- elem = this.elem,
8444
- options = this.options,
8445
- i, n;
8446
-
8447
- if ( gotoEnd || t >= options.duration + this.startTime ) {
8448
- this.now = this.end;
8449
- this.pos = this.state = 1;
8450
- this.update();
8451
-
8452
- options.animatedProperties[ this.prop ] = true;
8453
-
8454
- for ( i in options.animatedProperties ) {
8455
- if ( options.animatedProperties[i] !== true ) {
8456
- done = false;
8457
- }
8458
- }
8459
-
8460
- if ( done ) {
8461
- // Reset the overflow
8462
- if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
8463
-
8464
- jQuery.each( [ "", "X", "Y" ], function (index, value) {
8465
- elem.style[ "overflow" + value ] = options.overflow[index];
8466
- });
8467
- }
8468
-
8469
- // Hide the element if the "hide" operation was done
8470
- if ( options.hide ) {
8471
- jQuery(elem).hide();
8472
- }
8473
-
8474
- // Reset the properties, if the item has been hidden or shown
8475
- if ( options.hide || options.show ) {
8476
- for ( var p in options.animatedProperties ) {
8477
- jQuery.style( elem, p, options.orig[p] );
8478
- }
8479
- }
8480
-
8481
- // Execute the complete function
8482
- options.complete.call( elem );
8483
- }
8484
-
8485
- return false;
8486
-
8487
- } else {
8488
- // classical easing cannot be used with an Infinity duration
8489
- if ( options.duration == Infinity ) {
8490
- this.now = t;
8491
- } else {
8492
- n = t - this.startTime;
8493
- this.state = n / options.duration;
8494
-
8495
- // Perform the easing function, defaults to swing
8496
- this.pos = jQuery.easing[ options.animatedProperties[ this.prop ] ]( this.state, n, 0, 1, options.duration );
8497
- this.now = this.start + ((this.end - this.start) * this.pos);
8498
- }
8499
- // Perform the next step of the animation
8500
- this.update();
8501
- }
8502
-
8503
- return true;
8504
- }
8505
- };
8506
-
8507
- jQuery.extend( jQuery.fx, {
8508
- tick: function() {
8509
- for ( var timers = jQuery.timers, i = 0 ; i < timers.length ; ++i ) {
8510
- if ( !timers[i]() ) {
8511
- timers.splice(i--, 1);
8512
- }
8513
- }
8514
-
8515
- if ( !timers.length ) {
8516
- jQuery.fx.stop();
8517
- }
8518
- },
8519
-
8520
- interval: 13,
8521
-
8522
- stop: function() {
8523
- clearInterval( timerId );
8524
- timerId = null;
8525
- },
8526
-
8527
- speeds: {
8528
- slow: 600,
8529
- fast: 200,
8530
- // Default speed
8531
- _default: 400
8532
- },
8533
-
8534
- step: {
8535
- opacity: function( fx ) {
8536
- jQuery.style( fx.elem, "opacity", fx.now );
8537
- },
8538
-
8539
- _default: function( fx ) {
8540
- if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
8541
- fx.elem.style[ fx.prop ] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit;
8542
- } else {
8543
- fx.elem[ fx.prop ] = fx.now;
8544
- }
8545
- }
8546
- }
8547
- });
8548
-
8549
- if ( jQuery.expr && jQuery.expr.filters ) {
8550
- jQuery.expr.filters.animated = function( elem ) {
8551
- return jQuery.grep(jQuery.timers, function( fn ) {
8552
- return elem === fn.elem;
8553
- }).length;
8554
- };
8555
- }
8556
-
8557
- // Try to restore the default display value of an element
8558
- function defaultDisplay( nodeName ) {
8559
-
8560
- if ( !elemdisplay[ nodeName ] ) {
8561
-
8562
- var body = document.body,
8563
- elem = jQuery( "<" + nodeName + ">" ).appendTo( body ),
8564
- display = elem.css( "display" );
8565
-
8566
- elem.remove();
8567
-
8568
- // If the simple way fails,
8569
- // get element's real default display by attaching it to a temp iframe
8570
- if ( display === "none" || display === "" ) {
8571
- // No iframe to use yet, so create it
8572
- if ( !iframe ) {
8573
- iframe = document.createElement( "iframe" );
8574
- iframe.frameBorder = iframe.width = iframe.height = 0;
8575
- }
8576
-
8577
- body.appendChild( iframe );
8578
-
8579
- // Create a cacheable copy of the iframe document on first call.
8580
- // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
8581
- // document to it; WebKit & Firefox won't allow reusing the iframe document.
8582
- if ( !iframeDoc || !iframe.createElement ) {
8583
- iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
8584
- iframeDoc.write( ( document.compatMode === "CSS1Compat" ? "<!doctype html>" : "" ) + "<html><body>" );
8585
- iframeDoc.close();
8586
- }
8587
-
8588
- elem = iframeDoc.createElement( nodeName );
8589
-
8590
- iframeDoc.body.appendChild( elem );
8591
-
8592
- display = jQuery.css( elem, "display" );
8593
-
8594
- body.removeChild( iframe );
8595
- }
8596
-
8597
- // Store the correct default display
8598
- elemdisplay[ nodeName ] = display;
8599
- }
8600
-
8601
- return elemdisplay[ nodeName ];
8602
- }
8603
-
8604
-
8605
-
8606
-
8607
- var rtable = /^t(?:able|d|h)$/i,
8608
- rroot = /^(?:body|html)$/i;
8609
-
8610
- if ( "getBoundingClientRect" in document.documentElement ) {
8611
- jQuery.fn.offset = function( options ) {
8612
- var elem = this[0], box;
8613
-
8614
- if ( options ) {
8615
- return this.each(function( i ) {
8616
- jQuery.offset.setOffset( this, options, i );
8617
- });
8618
- }
8619
-
8620
- if ( !elem || !elem.ownerDocument ) {
8621
- return null;
8622
- }
8623
-
8624
- if ( elem === elem.ownerDocument.body ) {
8625
- return jQuery.offset.bodyOffset( elem );
8626
- }
8627
-
8628
- try {
8629
- box = elem.getBoundingClientRect();
8630
- } catch(e) {}
8631
-
8632
- var doc = elem.ownerDocument,
8633
- docElem = doc.documentElement;
8634
-
8635
- // Make sure we're not dealing with a disconnected DOM node
8636
- if ( !box || !jQuery.contains( docElem, elem ) ) {
8637
- return box ? { top: box.top, left: box.left } : { top: 0, left: 0 };
8638
- }
8639
-
8640
- var body = doc.body,
8641
- win = getWindow(doc),
8642
- clientTop = docElem.clientTop || body.clientTop || 0,
8643
- clientLeft = docElem.clientLeft || body.clientLeft || 0,
8644
- scrollTop = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop,
8645
- scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft,
8646
- top = box.top + scrollTop - clientTop,
8647
- left = box.left + scrollLeft - clientLeft;
8648
-
8649
- return { top: top, left: left };
8650
- };
8651
-
8652
- } else {
8653
- jQuery.fn.offset = function( options ) {
8654
- var elem = this[0];
8655
-
8656
- if ( options ) {
8657
- return this.each(function( i ) {
8658
- jQuery.offset.setOffset( this, options, i );
8659
- });
8660
- }
8661
-
8662
- if ( !elem || !elem.ownerDocument ) {
8663
- return null;
8664
- }
8665
-
8666
- if ( elem === elem.ownerDocument.body ) {
8667
- return jQuery.offset.bodyOffset( elem );
8668
- }
8669
-
8670
- jQuery.offset.initialize();
8671
-
8672
- var computedStyle,
8673
- offsetParent = elem.offsetParent,
8674
- prevOffsetParent = elem,
8675
- doc = elem.ownerDocument,
8676
- docElem = doc.documentElement,
8677
- body = doc.body,
8678
- defaultView = doc.defaultView,
8679
- prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
8680
- top = elem.offsetTop,
8681
- left = elem.offsetLeft;
8682
-
8683
- while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
8684
- if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
8685
- break;
8686
- }
8687
-
8688
- computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;
8689
- top -= elem.scrollTop;
8690
- left -= elem.scrollLeft;
8691
-
8692
- if ( elem === offsetParent ) {
8693
- top += elem.offsetTop;
8694
- left += elem.offsetLeft;
8695
-
8696
- if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
8697
- top += parseFloat( computedStyle.borderTopWidth ) || 0;
8698
- left += parseFloat( computedStyle.borderLeftWidth ) || 0;
8699
- }
8700
-
8701
- prevOffsetParent = offsetParent;
8702
- offsetParent = elem.offsetParent;
8703
- }
8704
-
8705
- if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
8706
- top += parseFloat( computedStyle.borderTopWidth ) || 0;
8707
- left += parseFloat( computedStyle.borderLeftWidth ) || 0;
8708
- }
8709
-
8710
- prevComputedStyle = computedStyle;
8711
- }
8712
-
8713
- if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) {
8714
- top += body.offsetTop;
8715
- left += body.offsetLeft;
8716
- }
8717
-
8718
- if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
8719
- top += Math.max( docElem.scrollTop, body.scrollTop );
8720
- left += Math.max( docElem.scrollLeft, body.scrollLeft );
8721
- }
8722
-
8723
- return { top: top, left: left };
8724
- };
8725
- }
8726
-
8727
- jQuery.offset = {
8728
- initialize: function() {
8729
- var body = document.body, container = document.createElement("div"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.css(body, "marginTop") ) || 0,
8730
- html = "<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
8731
-
8732
- jQuery.extend( container.style, { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" } );
8733
-
8734
- container.innerHTML = html;
8735
- body.insertBefore( container, body.firstChild );
8736
- innerDiv = container.firstChild;
8737
- checkDiv = innerDiv.firstChild;
8738
- td = innerDiv.nextSibling.firstChild.firstChild;
8739
-
8740
- this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
8741
- this.doesAddBorderForTableAndCells = (td.offsetTop === 5);
8742
-
8743
- checkDiv.style.position = "fixed";
8744
- checkDiv.style.top = "20px";
8745
-
8746
- // safari subtracts parent border width here which is 5px
8747
- this.supportsFixedPosition = (checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15);
8748
- checkDiv.style.position = checkDiv.style.top = "";
8749
-
8750
- innerDiv.style.overflow = "hidden";
8751
- innerDiv.style.position = "relative";
8752
-
8753
- this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);
8754
-
8755
- this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);
8756
-
8757
- body.removeChild( container );
8758
- jQuery.offset.initialize = jQuery.noop;
8759
- },
8760
-
8761
- bodyOffset: function( body ) {
8762
- var top = body.offsetTop,
8763
- left = body.offsetLeft;
8764
-
8765
- jQuery.offset.initialize();
8766
-
8767
- if ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) {
8768
- top += parseFloat( jQuery.css(body, "marginTop") ) || 0;
8769
- left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
8770
- }
8771
-
8772
- return { top: top, left: left };
8773
- },
8774
-
8775
- setOffset: function( elem, options, i ) {
8776
- var position = jQuery.css( elem, "position" );
8777
-
8778
- // set position first, in-case top/left are set even on static elem
8779
- if ( position === "static" ) {
8780
- elem.style.position = "relative";
8781
- }
8782
-
8783
- var curElem = jQuery( elem ),
8784
- curOffset = curElem.offset(),
8785
- curCSSTop = jQuery.css( elem, "top" ),
8786
- curCSSLeft = jQuery.css( elem, "left" ),
8787
- calculatePosition = (position === "absolute" || position === "fixed") && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
8788
- props = {}, curPosition = {}, curTop, curLeft;
8789
-
8790
- // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
8791
- if ( calculatePosition ) {
8792
- curPosition = curElem.position();
8793
- curTop = curPosition.top;
8794
- curLeft = curPosition.left;
8795
- } else {
8796
- curTop = parseFloat( curCSSTop ) || 0;
8797
- curLeft = parseFloat( curCSSLeft ) || 0;
8798
- }
8799
-
8800
- if ( jQuery.isFunction( options ) ) {
8801
- options = options.call( elem, i, curOffset );
8802
- }
8803
-
8804
- if (options.top != null) {
8805
- props.top = (options.top - curOffset.top) + curTop;
8806
- }
8807
- if (options.left != null) {
8808
- props.left = (options.left - curOffset.left) + curLeft;
8809
- }
8810
-
8811
- if ( "using" in options ) {
8812
- options.using.call( elem, props );
8813
- } else {
8814
- curElem.css( props );
8815
- }
8816
- }
8817
- };
8818
-
8819
-
8820
- jQuery.fn.extend({
8821
- position: function() {
8822
- if ( !this[0] ) {
8823
- return null;
8824
- }
8825
-
8826
- var elem = this[0],
8827
-
8828
- // Get *real* offsetParent
8829
- offsetParent = this.offsetParent(),
8830
-
8831
- // Get correct offsets
8832
- offset = this.offset(),
8833
- parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
8834
-
8835
- // Subtract element margins
8836
- // note: when an element has margin: auto the offsetLeft and marginLeft
8837
- // are the same in Safari causing offset.left to incorrectly be 0
8838
- offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
8839
- offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
8840
-
8841
- // Add offsetParent borders
8842
- parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
8843
- parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
8844
-
8845
- // Subtract the two offsets
8846
- return {
8847
- top: offset.top - parentOffset.top,
8848
- left: offset.left - parentOffset.left
8849
- };
8850
- },
8851
-
8852
- offsetParent: function() {
8853
- return this.map(function() {
8854
- var offsetParent = this.offsetParent || document.body;
8855
- while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
8856
- offsetParent = offsetParent.offsetParent;
8857
- }
8858
- return offsetParent;
8859
- });
8860
- }
8861
- });
8862
-
8863
-
8864
- // Create scrollLeft and scrollTop methods
8865
- jQuery.each( ["Left", "Top"], function( i, name ) {
8866
- var method = "scroll" + name;
8867
-
8868
- jQuery.fn[ method ] = function( val ) {
8869
- var elem, win;
8870
-
8871
- if ( val === undefined ) {
8872
- elem = this[ 0 ];
8873
-
8874
- if ( !elem ) {
8875
- return null;
8876
- }
8877
-
8878
- win = getWindow( elem );
8879
-
8880
- // Return the scroll offset
8881
- return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] :
8882
- jQuery.support.boxModel && win.document.documentElement[ method ] ||
8883
- win.document.body[ method ] :
8884
- elem[ method ];
8885
- }
8886
-
8887
- // Set the scroll offset
8888
- return this.each(function() {
8889
- win = getWindow( this );
8890
-
8891
- if ( win ) {
8892
- win.scrollTo(
8893
- !i ? val : jQuery( win ).scrollLeft(),
8894
- i ? val : jQuery( win ).scrollTop()
8895
- );
8896
-
8897
- } else {
8898
- this[ method ] = val;
8899
- }
8900
- });
8901
- };
8902
- });
8903
-
8904
- function getWindow( elem ) {
8905
- return jQuery.isWindow( elem ) ?
8906
- elem :
8907
- elem.nodeType === 9 ?
8908
- elem.defaultView || elem.parentWindow :
8909
- false;
8910
- }
8911
-
8912
-
8913
-
8914
-
8915
- // Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods
8916
- jQuery.each([ "Height", "Width" ], function( i, name ) {
8917
-
8918
- var type = name.toLowerCase();
8919
-
8920
- // innerHeight and innerWidth
8921
- jQuery.fn[ "inner" + name ] = function() {
8922
- var elem = this[0];
8923
- return elem && elem.style ?
8924
- parseFloat( jQuery.css( elem, type, "padding" ) ) :
8925
- null;
8926
- };
8927
-
8928
- // outerHeight and outerWidth
8929
- jQuery.fn[ "outer" + name ] = function( margin ) {
8930
- var elem = this[0];
8931
- return elem && elem.style ?
8932
- parseFloat( jQuery.css( elem, type, margin ? "margin" : "border" ) ) :
8933
- null;
8934
- };
8935
-
8936
- jQuery.fn[ type ] = function( size ) {
8937
- // Get window width or height
8938
- var elem = this[0];
8939
- if ( !elem ) {
8940
- return size == null ? null : this;
8941
- }
8942
-
8943
- if ( jQuery.isFunction( size ) ) {
8944
- return this.each(function( i ) {
8945
- var self = jQuery( this );
8946
- self[ type ]( size.call( this, i, self[ type ]() ) );
8947
- });
8948
- }
8949
-
8950
- if ( jQuery.isWindow( elem ) ) {
8951
- // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
8952
- // 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
8953
- var docElemProp = elem.document.documentElement[ "client" + name ];
8954
- return elem.document.compatMode === "CSS1Compat" && docElemProp ||
8955
- elem.document.body[ "client" + name ] || docElemProp;
8956
-
8957
- // Get document width or height
8958
- } else if ( elem.nodeType === 9 ) {
8959
- // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
8960
- return Math.max(
8961
- elem.documentElement["client" + name],
8962
- elem.body["scroll" + name], elem.documentElement["scroll" + name],
8963
- elem.body["offset" + name], elem.documentElement["offset" + name]
8964
- );
8965
-
8966
- // Get or set width or height on the element
8967
- } else if ( size === undefined ) {
8968
- var orig = jQuery.css( elem, type ),
8969
- ret = parseFloat( orig );
8970
-
8971
- return jQuery.isNaN( ret ) ? orig : ret;
8972
-
8973
- // Set the width or height on the element (default to pixels if value is unitless)
8974
- } else {
8975
- return this.css( type, typeof size === "string" ? size : size + "px" );
8976
- }
8977
- };
8978
-
8979
- });
8980
-
8981
-
8982
- // Expose jQuery to the global object
8983
- window.jQuery = window.$ = jQuery;
8984
- })(window);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: ramoonus
3
  Donate link: http://www.ramoonus.nl
4
  Tags: jquery
5
  Requires at least: 3.0.0
6
- Tested up to: 3.2
7
- Stable tag: 1.6.1.1.1
8
 
9
  This plugin should only be used for development purposes, this plugin updates jQuery to the latest (stable) version.
10
 
@@ -25,6 +25,9 @@ Its recommended to flush the cache after upgrading.
25
  Not relevant.
26
 
27
  == Changelog ==
 
 
 
28
  = 1.6.1.1.1 =
29
  * Promise: less numbers when 1.6.2 comes out
30
  * Updated jQuery to 1.6.2 rc 1 (
3
  Donate link: http://www.ramoonus.nl
4
  Tags: jquery
5
  Requires at least: 3.0.0
6
+ Tested up to: 3.2.0
7
+ Stable tag: 1.6.2
8
 
9
  This plugin should only be used for development purposes, this plugin updates jQuery to the latest (stable) version.
10
 
25
  Not relevant.
26
 
27
  == Changelog ==
28
+ = 1.6.2 =
29
+ * Updated jQuery to 1.6.2 (minified)
30
+
31
  = 1.6.1.1.1 =
32
  * Promise: less numbers when 1.6.2 comes out
33
  * Updated jQuery to 1.6.2 rc 1 (