jQuery Updater - Version 1.7.1

Version Description

  • Updated jQuery to 1.7.1 releasenotes
  • Minor code optimalisation
  • Readme update
Download this release

Release Info

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

Code changes from version 1.7 to 1.7.1

jquery-updater.php CHANGED
@@ -3,21 +3,16 @@
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.7
7
  Author: Ramoonus
8
  Author URI: http://www.ramoonus.nl/
9
  License: GPL2
10
  */
11
 
12
- // Update jQuery
13
  function rw_jquery_update() {
14
- // deregister wordpress` jQuery
15
  wp_deregister_script('jquery');
16
- // register new jQuery and load it
17
- wp_enqueue_script('jquery', plugins_url('/js/jquery-1.7.min.js', __FILE__), false, '1.7');
18
-
19
  //return;
20
  }
21
- // load
22
  add_action('init', 'rw_jquery_update');
23
  ?>
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.7.1
7
  Author: Ramoonus
8
  Author URI: http://www.ramoonus.nl/
9
  License: GPL2
10
  */
11
 
 
12
  function rw_jquery_update() {
 
13
  wp_deregister_script('jquery');
14
+ wp_enqueue_script('jquery', plugins_url('/js/jquery-1.7.1.min.js', __FILE__), false, '1.7.1');
 
 
15
  //return;
16
  }
 
17
  add_action('init', 'rw_jquery_update');
18
  ?>
js/jquery-1.6.3.min.js DELETED
@@ -1,4 +0,0 @@
1
- /*! jQuery v1.6.3 http://jquery.com/ | http://jquery.org/license */
2
- (function(a,b){function cu(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cr(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 cq(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cp(){cn=b}function co(){setTimeout(cp,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||bA.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){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bW(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===bP,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=bW(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bW(a,c,d,e,"*",g));return l}function bV(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bL),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 by(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bt:bu;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=bv(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 bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bd,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(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 bg(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 bf(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function V(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(Q.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 U(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function M(a,b){return(a&&a!=="*"?a+".":"")+b.replace(y,"`").replace(z,"&")}function L(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(w,"")===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 J(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 D(){return!0}function C(){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 K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,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]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};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.3",length:0,size:function(){return this.length},toArray:function(){return G.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)?F.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(),B.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(G.apply(this,arguments),"slice",G.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:F,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;B.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},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):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},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(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},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(x,"ms-").replace(w,y)},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:H?function(a){return a==null?"":H.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)?F.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(!b)return-1;if(I)return I.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=G.call(arguments,2),g=function(){return a.apply(c,f.concat(G.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){J["[object "+b+"]"]=b.toLowerCase()}),A=e.uaMatch(z),A.browser&&(e.browser[A.browser]=!0,e.browser.version=A.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?C=function(){c.removeEventListener("DOMContentLoaded",C,!1),e.ready()}:c.attachEvent&&(C=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",C),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+"With"](this===b?d:this,[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,background:"none"},m&&f.extend(p,{position:"absolute",left:"-1000px",top:"-1000px"});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,h,i=f.expando,j=typeof c=="string",k=a.nodeType,l=k?f.cache:a,m=k?a[f.expando]:a[f.expando]&&f.expando;if((!m||e&&m&&l[m]&&!l[m][i])&&j&&d===b)return;m||(k?a[f.expando]=m=++f.uuid:m=f.expando),l[m]||(l[m]={},k||(l[m].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?l[m][i]=f.extend(l[m][i],c):l[m]=f.extend(l[m],c);g=l[m],e&&(g[i]||(g[i]={}),g=g[i]),d!==b&&(g[f.camelCase(c)]=d);if(c==="events"&&!g[c])return g[i]&&g[i].events;j?(h=g[c],h==null&&(h=g[f.camelCase(c)])):h=g;return h}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e=f.expando,g=a.nodeType,h=g?f.cache:a,i=g?a[f.expando]:f.expando;if(!h[i])return;if(b){d=c?h[i][e]:h[i];if(d){d[b]||(b=f.camelCase(b)),delete d[b];if(!l(d))return}}if(c){delete h[i][e];if(!l(h[i]))return}var j=h[i][e];f.support.deleteExpando||!h.setInterval?delete h[i]:h[i]=null,j?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=j):g&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[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;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].nodeType===1&&(" "+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=v:u&&(i=u)));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.attr(a,b,""),a.removeAttribute(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}}},value:{get:function(a,b){if(u&&f.nodeName(a,"button"))return u.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(u&&f.nodeName(a,"button"))return u.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))!==null?g:a[c]},propHooks:{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}}}}),f.attrHooks.tabIndex=f.propHooks.tabIndex,v={get:function(a,c){var d;return f.prop(a,c)===!0||(d=a.getAttributeNode(c))&&d.nodeValue!==!1?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||(u=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=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);return null}})),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 w=/\.(.*)$/,x=/^(?:textarea|input|select)$/i,y=/\./g,z=/ /g,A=/[^\w\s.|`]/g,B=function(a){return a.replace(A,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=C;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=C);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(),B).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
3
- ,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)});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,M(a.origType,a.selector),f.extend({},a,{handler:L,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,M(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()?D:C):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=D;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=D;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=D,this.stopPropagation()},isDefaultPrevented:C,isPropagationStopped:C,isImmediatePropagationStopped:C};var E=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))},F=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?F:E,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?F:E)}}}),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=f.nodeName(b,"input")?b.type:"";(c==="submit"||c==="image")&&f(b).closest("form").length&&J("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&J("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var G,H=function(a){var b=f.nodeName(a,"input")?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},I=function(c){var d=c.target,e,g;if(!!x.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=H(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:I,beforedeactivate:I,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&I.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")&&I.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",H(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in G)f.event.add(this,c+".specialChange",G[c]);return x.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return x.test(this.nodeName)}},G=f.event.special.change.filters,G.focus=G.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 K={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||C,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=w.exec(h),k="",j&&(k=j[0],h=h.replace(w,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,K[h]?(a.push(K[h]+k),h=h+k):h=(K[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+M(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+M(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 N=/Until$/,O=/^(?:parents|prevUntil|prevAll)/,P=/,/,Q=/^.[^:#\[\.,]*$/,R=Array.prototype.slice,S=f.expr.match.POS,T={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(V(this,a,!1),"not",a)},filter:function(a){return this.pushStack(V(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]=S.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=S.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)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));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(U(c[0])||U(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=R.call(arguments);N.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!T[a]?f.unique(e):e,(this.length>1||P.test(d))&&O.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 W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|object|embed|option|style)/i,bb=/checked\s*(?:[^=]|=\s*.checked.)/i,bc=/\/(java|ecma)script/i,bd=/^\s*<!(?:\[CDATA\[|\-\-)/,be={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,"",""]};be.optgroup=be.option,be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,f.support.htmlSerialize||(be._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(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!be[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$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"&&bb.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?bf(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bl)}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)==="<"&&!ba.test(a[0])&&(f.support.checkClone||!bb.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);
4
- 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)){bh(a,d),e=bi(a),g=bi(d);for(h=0;e[h];++h)g[h]&&bh(e[h],g[h])}if(b){bg(a,d);if(c){e=bi(a),g=bi(d);for(h=0;e[h];++h)bg(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(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=be[l]||be._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&&X.test(k)&&o.insertBefore(b.createTextNode(X.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++)bk(k[i]);else bk(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bc.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 bm=/alpha\([^)]*\)/i,bn=/opacity=([^)]*)/,bo=/([A-Z]|^ms)/g,bp=/^-?\d+(?:px)?$/i,bq=/^-?\d/,br=/^([\-+])=([\-+.\de]+)/,bs={position:"absolute",visibility:"hidden",display:"block"},bt=["Left","Right"],bu=["Top","Bottom"],bv,bw,bx;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=bv(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,h==="string"&&(g=br.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;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(bv)return bv(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 by(a,b,d);f.swap(a,bs,function(){e=by(a,b,d)});return e}},set:function(a,b){if(!bp.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bn.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,e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bm,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bm.test(g)?g.replace(bm,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=bv(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bw=function(a,c){var d,e,g;c=c.replace(bo,"-$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&&(bx=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bp.test(d)&&bq.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}),bv=bw||bx,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 bz=/%20/g,bA=/\[\]$/,bB=/\r?\n/g,bC=/#.*$/,bD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bE=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bF=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bG=/^(?:GET|HEAD)$/,bH=/^\/\//,bI=/\?/,bJ=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bK=/^(?:select|textarea)/i,bL=/\s+/,bM=/([?&])_=[^&]*/,bN=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bO=f.fn.load,bP={},bQ={},bR,bS,bT=["*/"]+["*"];try{bR=e.href}catch(bU){bR=c.createElement("a"),bR.href="",bR=bR.href}bS=bN.exec(bR.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bO)return bO.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(bJ,"")).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||bK.test(this.nodeName)||bE.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(bB,"\r\n")}}):{name:b.name,value:c.replace(bB,"\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?bX(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),bX(a,b);return a},ajaxSettings:{url:bR,isLocal:bF.test(bS[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","*":bT},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},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bV(bP),ajaxTransport:bV(bQ),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>0?4:0;var o,r,u,w=c,x=l?bZ(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=b$(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,w]),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=bD.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(bC,"").replace(bH,bS[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bL),d.crossDomain==null&&(r=bN.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bS[1]&&r[2]==bS[2]&&(r[3]||(r[1]==="http:"?80:443))==(bS[3]||(bS[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bW(bP,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bG.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bI.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bM,"$1_="+x);d.url=y+(y===d.url?(bI.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]!=="*"?", "+bT+"; 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=bW(bQ,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){s<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(bz,"+")}}),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;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cq("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",cr(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(cq("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(cq("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=cr(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:cq("show",1),slideUp:cq("hide",1),slideToggle:cq("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 g(a){return d.step(a)}var d=this,e=f.fx;this.startTime=cn||co(),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,g.elem=this.elem,g()&&f.timers.push(g)&&!cl&&(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||co(),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 cs=/^t(?:able|d|h)$/i,ct=/^(?: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=cu(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||!cs.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=ct.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&&!ct.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=cu(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=cu(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],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["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 i=f.css(e,d),j=parseFloat(i);return f.isNaN(j)?i:j}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);
 
 
 
 
js/jquery-1.6.3rc1.js DELETED
@@ -1,9043 +0,0 @@
1
- /*!
2
- * jQuery JavaScript Library v1.6.3rc1
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: Mon Aug 29 12:32:23 2011 -0400
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
- // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
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]|[0-9])/ig,
70
- rmsPrefix = /^-ms-/,
71
-
72
- // Used by jQuery.camelCase as callback to replace()
73
- fcamelCase = function( all, letter ) {
74
- return ( letter + "" ).toUpperCase();
75
- },
76
-
77
- // Keep a UserAgent string for use with jQuery.browser
78
- userAgent = navigator.userAgent,
79
-
80
- // For matching the engine and version of the browser
81
- browserMatch,
82
-
83
- // The deferred used on DOM ready
84
- readyList,
85
-
86
- // The ready event handler
87
- DOMContentLoaded,
88
-
89
- // Save a reference to some core methods
90
- toString = Object.prototype.toString,
91
- hasOwn = Object.prototype.hasOwnProperty,
92
- push = Array.prototype.push,
93
- slice = Array.prototype.slice,
94
- trim = String.prototype.trim,
95
- indexOf = Array.prototype.indexOf,
96
-
97
- // [[Class]] -> type pairs
98
- class2type = {};
99
-
100
- jQuery.fn = jQuery.prototype = {
101
- constructor: jQuery,
102
- init: function( selector, context, rootjQuery ) {
103
- var match, elem, ret, doc;
104
-
105
- // Handle $(""), $(null), or $(undefined)
106
- if ( !selector ) {
107
- return this;
108
- }
109
-
110
- // Handle $(DOMElement)
111
- if ( selector.nodeType ) {
112
- this.context = this[0] = selector;
113
- this.length = 1;
114
- return this;
115
- }
116
-
117
- // The body element only exists once, optimize finding it
118
- if ( selector === "body" && !context && document.body ) {
119
- this.context = document;
120
- this[0] = document.body;
121
- this.selector = selector;
122
- this.length = 1;
123
- return this;
124
- }
125
-
126
- // Handle HTML strings
127
- if ( typeof selector === "string" ) {
128
- // Are we dealing with HTML string or an ID?
129
- if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
130
- // Assume that strings that start and end with <> are HTML and skip the regex check
131
- match = [ null, selector, null ];
132
-
133
- } else {
134
- match = quickExpr.exec( selector );
135
- }
136
-
137
- // Verify a match, and that no context was specified for #id
138
- if ( match && (match[1] || !context) ) {
139
-
140
- // HANDLE: $(html) -> $(array)
141
- if ( match[1] ) {
142
- context = context instanceof jQuery ? context[0] : context;
143
- doc = (context ? context.ownerDocument || context : document);
144
-
145
- // If a single string is passed in and it's a single tag
146
- // just do a createElement and skip the rest
147
- ret = rsingleTag.exec( selector );
148
-
149
- if ( ret ) {
150
- if ( jQuery.isPlainObject( context ) ) {
151
- selector = [ document.createElement( ret[1] ) ];
152
- jQuery.fn.attr.call( selector, context, true );
153
-
154
- } else {
155
- selector = [ doc.createElement( ret[1] ) ];
156
- }
157
-
158
- } else {
159
- ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
160
- selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes;
161
- }
162
-
163
- return jQuery.merge( this, selector );
164
-
165
- // HANDLE: $("#id")
166
- } else {
167
- elem = document.getElementById( match[2] );
168
-
169
- // Check parentNode to catch when Blackberry 4.6 returns
170
- // nodes that are no longer in the document #6963
171
- if ( elem && elem.parentNode ) {
172
- // Handle the case where IE and Opera return items
173
- // by name instead of ID
174
- if ( elem.id !== match[2] ) {
175
- return rootjQuery.find( selector );
176
- }
177
-
178
- // Otherwise, we inject the element directly into the jQuery object
179
- this.length = 1;
180
- this[0] = elem;
181
- }
182
-
183
- this.context = document;
184
- this.selector = selector;
185
- return this;
186
- }
187
-
188
- // HANDLE: $(expr, $(...))
189
- } else if ( !context || context.jquery ) {
190
- return (context || rootjQuery).find( selector );
191
-
192
- // HANDLE: $(expr, context)
193
- // (which is just equivalent to: $(context).find(expr)
194
- } else {
195
- return this.constructor( context ).find( selector );
196
- }
197
-
198
- // HANDLE: $(function)
199
- // Shortcut for document ready
200
- } else if ( jQuery.isFunction( selector ) ) {
201
- return rootjQuery.ready( selector );
202
- }
203
-
204
- if (selector.selector !== undefined) {
205
- this.selector = selector.selector;
206
- this.context = selector.context;
207
- }
208
-
209
- return jQuery.makeArray( selector, this );
210
- },
211
-
212
- // Start with an empty selector
213
- selector: "",
214
-
215
- // The current version of jQuery being used
216
- jquery: "1.6.3rc1",
217
-
218
- // The default length of a jQuery object is 0
219
- length: 0,
220
-
221
- // The number of elements contained in the matched element set
222
- size: function() {
223
- return this.length;
224
- },
225
-
226
- toArray: function() {
227
- return slice.call( this, 0 );
228
- },
229
-
230
- // Get the Nth element in the matched element set OR
231
- // Get the whole matched element set as a clean array
232
- get: function( num ) {
233
- return num == null ?
234
-
235
- // Return a 'clean' array
236
- this.toArray() :
237
-
238
- // Return just the object
239
- ( num < 0 ? this[ this.length + num ] : this[ num ] );
240
- },
241
-
242
- // Take an array of elements and push it onto the stack
243
- // (returning the new matched element set)
244
- pushStack: function( elems, name, selector ) {
245
- // Build a new jQuery matched element set
246
- var ret = this.constructor();
247
-
248
- if ( jQuery.isArray( elems ) ) {
249
- push.apply( ret, elems );
250
-
251
- } else {
252
- jQuery.merge( ret, elems );
253
- }
254
-
255
- // Add the old object onto the stack (as a reference)
256
- ret.prevObject = this;
257
-
258
- ret.context = this.context;
259
-
260
- if ( name === "find" ) {
261
- ret.selector = this.selector + (this.selector ? " " : "") + selector;
262
- } else if ( name ) {
263
- ret.selector = this.selector + "." + name + "(" + selector + ")";
264
- }
265
-
266
- // Return the newly-formed element set
267
- return ret;
268
- },
269
-
270
- // Execute a callback for every element in the matched set.
271
- // (You can seed the arguments with an array of args, but this is
272
- // only used internally.)
273
- each: function( callback, args ) {
274
- return jQuery.each( this, callback, args );
275
- },
276
-
277
- ready: function( fn ) {
278
- // Attach the listeners
279
- jQuery.bindReady();
280
-
281
- // Add the callback
282
- readyList.done( fn );
283
-
284
- return this;
285
- },
286
-
287
- eq: function( i ) {
288
- return i === -1 ?
289
- this.slice( i ) :
290
- this.slice( i, +i + 1 );
291
- },
292
-
293
- first: function() {
294
- return this.eq( 0 );
295
- },
296
-
297
- last: function() {
298
- return this.eq( -1 );
299
- },
300
-
301
- slice: function() {
302
- return this.pushStack( slice.apply( this, arguments ),
303
- "slice", slice.call(arguments).join(",") );
304
- },
305
-
306
- map: function( callback ) {
307
- return this.pushStack( jQuery.map(this, function( elem, i ) {
308
- return callback.call( elem, i, elem );
309
- }));
310
- },
311
-
312
- end: function() {
313
- return this.prevObject || this.constructor(null);
314
- },
315
-
316
- // For internal use only.
317
- // Behaves like an Array's method, not like a jQuery method.
318
- push: push,
319
- sort: [].sort,
320
- splice: [].splice
321
- };
322
-
323
- // Give the init function the jQuery prototype for later instantiation
324
- jQuery.fn.init.prototype = jQuery.fn;
325
-
326
- jQuery.extend = jQuery.fn.extend = function() {
327
- var options, name, src, copy, copyIsArray, clone,
328
- target = arguments[0] || {},
329
- i = 1,
330
- length = arguments.length,
331
- deep = false;
332
-
333
- // Handle a deep copy situation
334
- if ( typeof target === "boolean" ) {
335
- deep = target;
336
- target = arguments[1] || {};
337
- // skip the boolean and the target
338
- i = 2;
339
- }
340
-
341
- // Handle case when target is a string or something (possible in deep copy)
342
- if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
343
- target = {};
344
- }
345
-
346
- // extend jQuery itself if only one argument is passed
347
- if ( length === i ) {
348
- target = this;
349
- --i;
350
- }
351
-
352
- for ( ; i < length; i++ ) {
353
- // Only deal with non-null/undefined values
354
- if ( (options = arguments[ i ]) != null ) {
355
- // Extend the base object
356
- for ( name in options ) {
357
- src = target[ name ];
358
- copy = options[ name ];
359
-
360
- // Prevent never-ending loop
361
- if ( target === copy ) {
362
- continue;
363
- }
364
-
365
- // Recurse if we're merging plain objects or arrays
366
- if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
367
- if ( copyIsArray ) {
368
- copyIsArray = false;
369
- clone = src && jQuery.isArray(src) ? src : [];
370
-
371
- } else {
372
- clone = src && jQuery.isPlainObject(src) ? src : {};
373
- }
374
-
375
- // Never move original objects, clone them
376
- target[ name ] = jQuery.extend( deep, clone, copy );
377
-
378
- // Don't bring in undefined values
379
- } else if ( copy !== undefined ) {
380
- target[ name ] = copy;
381
- }
382
- }
383
- }
384
- }
385
-
386
- // Return the modified object
387
- return target;
388
- };
389
-
390
- jQuery.extend({
391
- noConflict: function( deep ) {
392
- if ( window.$ === jQuery ) {
393
- window.$ = _$;
394
- }
395
-
396
- if ( deep && window.jQuery === jQuery ) {
397
- window.jQuery = _jQuery;
398
- }
399
-
400
- return jQuery;
401
- },
402
-
403
- // Is the DOM ready to be used? Set to true once it occurs.
404
- isReady: false,
405
-
406
- // A counter to track how many items to wait for before
407
- // the ready event fires. See #6781
408
- readyWait: 1,
409
-
410
- // Hold (or release) the ready event
411
- holdReady: function( hold ) {
412
- if ( hold ) {
413
- jQuery.readyWait++;
414
- } else {
415
- jQuery.ready( true );
416
- }
417
- },
418
-
419
- // Handle when the DOM is ready
420
- ready: function( wait ) {
421
- // Either a released hold or an DOMready/load event and not yet ready
422
- if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
423
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
424
- if ( !document.body ) {
425
- return setTimeout( jQuery.ready, 1 );
426
- }
427
-
428
- // Remember that the DOM is ready
429
- jQuery.isReady = true;
430
-
431
- // If a normal DOM Ready event fired, decrement, and wait if need be
432
- if ( wait !== true && --jQuery.readyWait > 0 ) {
433
- return;
434
- }
435
-
436
- // If there are functions bound, to execute
437
- readyList.resolveWith( document, [ jQuery ] );
438
-
439
- // Trigger any bound ready events
440
- if ( jQuery.fn.trigger ) {
441
- jQuery( document ).trigger( "ready" ).unbind( "ready" );
442
- }
443
- }
444
- },
445
-
446
- bindReady: function() {
447
- if ( readyList ) {
448
- return;
449
- }
450
-
451
- readyList = jQuery._Deferred();
452
-
453
- // Catch cases where $(document).ready() is called after the
454
- // browser event has already occurred.
455
- if ( document.readyState === "complete" ) {
456
- // Handle it asynchronously to allow scripts the opportunity to delay ready
457
- return setTimeout( jQuery.ready, 1 );
458
- }
459
-
460
- // Mozilla, Opera and webkit nightlies currently support this event
461
- if ( document.addEventListener ) {
462
- // Use the handy event callback
463
- document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
464
-
465
- // A fallback to window.onload, that will always work
466
- window.addEventListener( "load", jQuery.ready, false );
467
-
468
- // If IE event model is used
469
- } else if ( document.attachEvent ) {
470
- // ensure firing before onload,
471
- // maybe late but safe also for iframes
472
- document.attachEvent( "onreadystatechange", DOMContentLoaded );
473
-
474
- // A fallback to window.onload, that will always work
475
- window.attachEvent( "onload", jQuery.ready );
476
-
477
- // If IE and not a frame
478
- // continually check to see if the document is ready
479
- var toplevel = false;
480
-
481
- try {
482
- toplevel = window.frameElement == null;
483
- } catch(e) {}
484
-
485
- if ( document.documentElement.doScroll && toplevel ) {
486
- doScrollCheck();
487
- }
488
- }
489
- },
490
-
491
- // See test/unit/core.js for details concerning isFunction.
492
- // Since version 1.3, DOM methods and functions like alert
493
- // aren't supported. They return false on IE (#2968).
494
- isFunction: function( obj ) {
495
- return jQuery.type(obj) === "function";
496
- },
497
-
498
- isArray: Array.isArray || function( obj ) {
499
- return jQuery.type(obj) === "array";
500
- },
501
-
502
- // A crude way of determining if an object is a window
503
- isWindow: function( obj ) {
504
- return obj && typeof obj === "object" && "setInterval" in obj;
505
- },
506
-
507
- isNaN: function( obj ) {
508
- return obj == null || !rdigit.test( obj ) || isNaN( obj );
509
- },
510
-
511
- type: function( obj ) {
512
- return obj == null ?
513
- String( obj ) :
514
- class2type[ toString.call(obj) ] || "object";
515
- },
516
-
517
- isPlainObject: function( obj ) {
518
- // Must be an Object.
519
- // Because of IE, we also have to check the presence of the constructor property.
520
- // Make sure that DOM nodes and window objects don't pass through, as well
521
- if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
522
- return false;
523
- }
524
-
525
- try {
526
- // Not own constructor property must be Object
527
- if ( obj.constructor &&
528
- !hasOwn.call(obj, "constructor") &&
529
- !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
530
- return false;
531
- }
532
- } catch ( e ) {
533
- // IE8,9 Will throw exceptions on certain host objects #9897
534
- return false;
535
- }
536
-
537
- // Own properties are enumerated firstly, so to speed up,
538
- // if last one is own, then all properties are own.
539
-
540
- var key;
541
- for ( key in obj ) {}
542
-
543
- return key === undefined || hasOwn.call( obj, key );
544
- },
545
-
546
- isEmptyObject: function( obj ) {
547
- for ( var name in obj ) {
548
- return false;
549
- }
550
- return true;
551
- },
552
-
553
- error: function( msg ) {
554
- throw msg;
555
- },
556
-
557
- parseJSON: function( data ) {
558
- if ( typeof data !== "string" || !data ) {
559
- return null;
560
- }
561
-
562
- // Make sure leading/trailing whitespace is removed (IE can't handle it)
563
- data = jQuery.trim( data );
564
-
565
- // Attempt to parse using the native JSON parser first
566
- if ( window.JSON && window.JSON.parse ) {
567
- return window.JSON.parse( data );
568
- }
569
-
570
- // Make sure the incoming data is actual JSON
571
- // Logic borrowed from http://json.org/json2.js
572
- if ( rvalidchars.test( data.replace( rvalidescape, "@" )
573
- .replace( rvalidtokens, "]" )
574
- .replace( rvalidbraces, "")) ) {
575
-
576
- return (new Function( "return " + data ))();
577
-
578
- }
579
- jQuery.error( "Invalid JSON: " + data );
580
- },
581
-
582
- // Cross-browser xml parsing
583
- parseXML: function( data ) {
584
- var xml, tmp;
585
- try {
586
- if ( window.DOMParser ) { // Standard
587
- tmp = new DOMParser();
588
- xml = tmp.parseFromString( data , "text/xml" );
589
- } else { // IE
590
- xml = new ActiveXObject( "Microsoft.XMLDOM" );
591
- xml.async = "false";
592
- xml.loadXML( data );
593
- }
594
- } catch( e ) {
595
- xml = undefined;
596
- }
597
- if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
598
- jQuery.error( "Invalid XML: " + data );
599
- }
600
- return xml;
601
- },
602
-
603
- noop: function() {},
604
-
605
- // Evaluates a script in a global context
606
- // Workarounds based on findings by Jim Driscoll
607
- // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
608
- globalEval: function( data ) {
609
- if ( data && rnotwhite.test( data ) ) {
610
- // We use execScript on Internet Explorer
611
- // We use an anonymous function so that context is window
612
- // rather than jQuery in Firefox
613
- ( window.execScript || function( data ) {
614
- window[ "eval" ].call( window, data );
615
- } )( data );
616
- }
617
- },
618
-
619
- // Convert dashed to camelCase; used by the css and data modules
620
- // Microsoft forgot to hump their vendor prefix (#9572)
621
- camelCase: function( string ) {
622
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
623
- },
624
-
625
- nodeName: function( elem, name ) {
626
- return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
627
- },
628
-
629
- // args is for internal usage only
630
- each: function( object, callback, args ) {
631
- var name, i = 0,
632
- length = object.length,
633
- isObj = length === undefined || jQuery.isFunction( object );
634
-
635
- if ( args ) {
636
- if ( isObj ) {
637
- for ( name in object ) {
638
- if ( callback.apply( object[ name ], args ) === false ) {
639
- break;
640
- }
641
- }
642
- } else {
643
- for ( ; i < length; ) {
644
- if ( callback.apply( object[ i++ ], args ) === false ) {
645
- break;
646
- }
647
- }
648
- }
649
-
650
- // A special, fast, case for the most common use of each
651
- } else {
652
- if ( isObj ) {
653
- for ( name in object ) {
654
- if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
655
- break;
656
- }
657
- }
658
- } else {
659
- for ( ; i < length; ) {
660
- if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
661
- break;
662
- }
663
- }
664
- }
665
- }
666
-
667
- return object;
668
- },
669
-
670
- // Use native String.trim function wherever possible
671
- trim: trim ?
672
- function( text ) {
673
- return text == null ?
674
- "" :
675
- trim.call( text );
676
- } :
677
-
678
- // Otherwise use our own trimming functionality
679
- function( text ) {
680
- return text == null ?
681
- "" :
682
- text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
683
- },
684
-
685
- // results is for internal usage only
686
- makeArray: function( array, results ) {
687
- var ret = results || [];
688
-
689
- if ( array != null ) {
690
- // The window, strings (and functions) also have 'length'
691
- // The extra typeof function check is to prevent crashes
692
- // in Safari 2 (See: #3039)
693
- // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
694
- var type = jQuery.type( array );
695
-
696
- if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
697
- push.call( ret, array );
698
- } else {
699
- jQuery.merge( ret, array );
700
- }
701
- }
702
-
703
- return ret;
704
- },
705
-
706
- inArray: function( elem, array ) {
707
- if ( !array ) {
708
- return -1;
709
- }
710
-
711
- if ( indexOf ) {
712
- return indexOf.call( array, elem );
713
- }
714
-
715
- for ( var i = 0, length = array.length; i < length; i++ ) {
716
- if ( array[ i ] === elem ) {
717
- return i;
718
- }
719
- }
720
-
721
- return -1;
722
- },
723
-
724
- merge: function( first, second ) {
725
- var i = first.length,
726
- j = 0;
727
-
728
- if ( typeof second.length === "number" ) {
729
- for ( var l = second.length; j < l; j++ ) {
730
- first[ i++ ] = second[ j ];
731
- }
732
-
733
- } else {
734
- while ( second[j] !== undefined ) {
735
- first[ i++ ] = second[ j++ ];
736
- }
737
- }
738
-
739
- first.length = i;
740
-
741
- return first;
742
- },
743
-
744
- grep: function( elems, callback, inv ) {
745
- var ret = [], retVal;
746
- inv = !!inv;
747
-
748
- // Go through the array, only saving the items
749
- // that pass the validator function
750
- for ( var i = 0, length = elems.length; i < length; i++ ) {
751
- retVal = !!callback( elems[ i ], i );
752
- if ( inv !== retVal ) {
753
- ret.push( elems[ i ] );
754
- }
755
- }
756
-
757
- return ret;
758
- },
759
-
760
- // arg is for internal usage only
761
- map: function( elems, callback, arg ) {
762
- var value, key, ret = [],
763
- i = 0,
764
- length = elems.length,
765
- // jquery objects are treated as arrays
766
- isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
767
-
768
- // Go through the array, translating each of the items to their
769
- if ( isArray ) {
770
- for ( ; i < length; i++ ) {
771
- value = callback( elems[ i ], i, arg );
772
-
773
- if ( value != null ) {
774
- ret[ ret.length ] = value;
775
- }
776
- }
777
-
778
- // Go through every key on the object,
779
- } else {
780
- for ( key in elems ) {
781
- value = callback( elems[ key ], key, arg );
782
-
783
- if ( value != null ) {
784
- ret[ ret.length ] = value;
785
- }
786
- }
787
- }
788
-
789
- // Flatten any nested arrays
790
- return ret.concat.apply( [], ret );
791
- },
792
-
793
- // A global GUID counter for objects
794
- guid: 1,
795
-
796
- // Bind a function to a context, optionally partially applying any
797
- // arguments.
798
- proxy: function( fn, context ) {
799
- if ( typeof context === "string" ) {
800
- var tmp = fn[ context ];
801
- context = fn;
802
- fn = tmp;
803
- }
804
-
805
- // Quick check to determine if target is callable, in the spec
806
- // this throws a TypeError, but we will just return undefined.
807
- if ( !jQuery.isFunction( fn ) ) {
808
- return undefined;
809
- }
810
-
811
- // Simulated bind
812
- var args = slice.call( arguments, 2 ),
813
- proxy = function() {
814
- return fn.apply( context, args.concat( slice.call( arguments ) ) );
815
- };
816
-
817
- // Set the guid of unique handler to the same of original handler, so it can be removed
818
- proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
819
-
820
- return proxy;
821
- },
822
-
823
- // Mutifunctional method to get and set values to a collection
824
- // The value/s can optionally be executed if it's a function
825
- access: function( elems, key, value, exec, fn, pass ) {
826
- var length = elems.length;
827
-
828
- // Setting many attributes
829
- if ( typeof key === "object" ) {
830
- for ( var k in key ) {
831
- jQuery.access( elems, k, key[k], exec, fn, value );
832
- }
833
- return elems;
834
- }
835
-
836
- // Setting one attribute
837
- if ( value !== undefined ) {
838
- // Optionally, function values get executed if exec is true
839
- exec = !pass && exec && jQuery.isFunction(value);
840
-
841
- for ( var i = 0; i < length; i++ ) {
842
- fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
843
- }
844
-
845
- return elems;
846
- }
847
-
848
- // Getting an attribute
849
- return length ? fn( elems[0], key ) : undefined;
850
- },
851
-
852
- now: function() {
853
- return (new Date()).getTime();
854
- },
855
-
856
- // Use of jQuery.browser is frowned upon.
857
- // More details: http://docs.jquery.com/Utilities/jQuery.browser
858
- uaMatch: function( ua ) {
859
- ua = ua.toLowerCase();
860
-
861
- var match = rwebkit.exec( ua ) ||
862
- ropera.exec( ua ) ||
863
- rmsie.exec( ua ) ||
864
- ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
865
- [];
866
-
867
- return { browser: match[1] || "", version: match[2] || "0" };
868
- },
869
-
870
- sub: function() {
871
- function jQuerySub( selector, context ) {
872
- return new jQuerySub.fn.init( selector, context );
873
- }
874
- jQuery.extend( true, jQuerySub, this );
875
- jQuerySub.superclass = this;
876
- jQuerySub.fn = jQuerySub.prototype = this();
877
- jQuerySub.fn.constructor = jQuerySub;
878
- jQuerySub.sub = this.sub;
879
- jQuerySub.fn.init = function init( selector, context ) {
880
- if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
881
- context = jQuerySub( context );
882
- }
883
-
884
- return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
885
- };
886
- jQuerySub.fn.init.prototype = jQuerySub.fn;
887
- var rootjQuerySub = jQuerySub(document);
888
- return jQuerySub;
889
- },
890
-
891
- browser: {}
892
- });
893
-
894
- // Populate the class2type map
895
- jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
896
- class2type[ "[object " + name + "]" ] = name.toLowerCase();
897
- });
898
-
899
- browserMatch = jQuery.uaMatch( userAgent );
900
- if ( browserMatch.browser ) {
901
- jQuery.browser[ browserMatch.browser ] = true;
902
- jQuery.browser.version = browserMatch.version;
903
- }
904
-
905
- // Deprecated, use jQuery.browser.webkit instead
906
- if ( jQuery.browser.webkit ) {
907
- jQuery.browser.safari = true;
908
- }
909
-
910
- // IE doesn't match non-breaking spaces with \s
911
- if ( rnotwhite.test( "\xA0" ) ) {
912
- trimLeft = /^[\s\xA0]+/;
913
- trimRight = /[\s\xA0]+$/;
914
- }
915
-
916
- // All jQuery objects should point back to these
917
- rootjQuery = jQuery(document);
918
-
919
- // Cleanup functions for the document ready method
920
- if ( document.addEventListener ) {
921
- DOMContentLoaded = function() {
922
- document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
923
- jQuery.ready();
924
- };
925
-
926
- } else if ( document.attachEvent ) {
927
- DOMContentLoaded = function() {
928
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
929
- if ( document.readyState === "complete" ) {
930
- document.detachEvent( "onreadystatechange", DOMContentLoaded );
931
- jQuery.ready();
932
- }
933
- };
934
- }
935
-
936
- // The DOM ready check for Internet Explorer
937
- function doScrollCheck() {
938
- if ( jQuery.isReady ) {
939
- return;
940
- }
941
-
942
- try {
943
- // If IE is used, use the trick by Diego Perini
944
- // http://javascript.nwbox.com/IEContentLoaded/
945
- document.documentElement.doScroll("left");
946
- } catch(e) {
947
- setTimeout( doScrollCheck, 1 );
948
- return;
949
- }
950
-
951
- // and execute any waiting functions
952
- jQuery.ready();
953
- }
954
-
955
- return jQuery;
956
-
957
- })();
958
-
959
-
960
- var // Promise methods
961
- promiseMethods = "done fail isResolved isRejected promise then always pipe".split( " " ),
962
- // Static reference to slice
963
- sliceDeferred = [].slice;
964
-
965
- jQuery.extend({
966
- // Create a simple deferred (one callbacks list)
967
- _Deferred: function() {
968
- var // callbacks list
969
- callbacks = [],
970
- // stored [ context , args ]
971
- fired,
972
- // to avoid firing when already doing so
973
- firing,
974
- // flag to know if the deferred has been cancelled
975
- cancelled,
976
- // the deferred itself
977
- deferred = {
978
-
979
- // done( f1, f2, ...)
980
- done: function() {
981
- if ( !cancelled ) {
982
- var args = arguments,
983
- i,
984
- length,
985
- elem,
986
- type,
987
- _fired;
988
- if ( fired ) {
989
- _fired = fired;
990
- fired = 0;
991
- }
992
- for ( i = 0, length = args.length; i < length; i++ ) {
993
- elem = args[ i ];
994
- type = jQuery.type( elem );
995
- if ( type === "array" ) {
996
- deferred.done.apply( deferred, elem );
997
- } else if ( type === "function" ) {
998
- callbacks.push( elem );
999
- }
1000
- }
1001
- if ( _fired ) {
1002
- deferred.resolveWith( _fired[ 0 ], _fired[ 1 ] );
1003
- }
1004
- }
1005
- return this;
1006
- },
1007
-
1008
- // resolve with given context and args
1009
- resolveWith: function( context, args ) {
1010
- if ( !cancelled && !fired && !firing ) {
1011
- // make sure args are available (#8421)
1012
- args = args || [];
1013
- firing = 1;
1014
- try {
1015
- while( callbacks[ 0 ] ) {
1016
- callbacks.shift().apply( context, args );
1017
- }
1018
- }
1019
- finally {
1020
- fired = [ context, args ];
1021
- firing = 0;
1022
- }
1023
- }
1024
- return this;
1025
- },
1026
-
1027
- // resolve with this as context and given arguments
1028
- resolve: function() {
1029
- deferred.resolveWith( this, arguments );
1030
- return this;
1031
- },
1032
-
1033
- // Has this deferred been resolved?
1034
- isResolved: function() {
1035
- return !!( firing || fired );
1036
- },
1037
-
1038
- // Cancel
1039
- cancel: function() {
1040
- cancelled = 1;
1041
- callbacks = [];
1042
- return this;
1043
- }
1044
- };
1045
-
1046
- return deferred;
1047
- },
1048
-
1049
- // Full fledged deferred (two callbacks list)
1050
- Deferred: function( func ) {
1051
- var deferred = jQuery._Deferred(),
1052
- failDeferred = jQuery._Deferred(),
1053
- promise;
1054
- // Add errorDeferred methods, then and promise
1055
- jQuery.extend( deferred, {
1056
- then: function( doneCallbacks, failCallbacks ) {
1057
- deferred.done( doneCallbacks ).fail( failCallbacks );
1058
- return this;
1059
- },
1060
- always: function() {
1061
- return deferred.done.apply( deferred, arguments ).fail.apply( this, arguments );
1062
- },
1063
- fail: failDeferred.done,
1064
- rejectWith: failDeferred.resolveWith,
1065
- reject: failDeferred.resolve,
1066
- isRejected: failDeferred.isResolved,
1067
- pipe: function( fnDone, fnFail ) {
1068
- return jQuery.Deferred(function( newDefer ) {
1069
- jQuery.each( {
1070
- done: [ fnDone, "resolve" ],
1071
- fail: [ fnFail, "reject" ]
1072
- }, function( handler, data ) {
1073
- var fn = data[ 0 ],
1074
- action = data[ 1 ],
1075
- returned;
1076
- if ( jQuery.isFunction( fn ) ) {
1077
- deferred[ handler ](function() {
1078
- returned = fn.apply( this, arguments );
1079
- if ( returned && jQuery.isFunction( returned.promise ) ) {
1080
- returned.promise().then( newDefer.resolve, newDefer.reject );
1081
- } else {
1082
- newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
1083
- }
1084
- });
1085
- } else {
1086
- deferred[ handler ]( newDefer[ action ] );
1087
- }
1088
- });
1089
- }).promise();
1090
- },
1091
- // Get a promise for this deferred
1092
- // If obj is provided, the promise aspect is added to the object
1093
- promise: function( obj ) {
1094
- if ( obj == null ) {
1095
- if ( promise ) {
1096
- return promise;
1097
- }
1098
- promise = obj = {};
1099
- }
1100
- var i = promiseMethods.length;
1101
- while( i-- ) {
1102
- obj[ promiseMethods[i] ] = deferred[ promiseMethods[i] ];
1103
- }
1104
- return obj;
1105
- }
1106
- });
1107
- // Make sure only one callback list will be used
1108
- deferred.done( failDeferred.cancel ).fail( deferred.cancel );
1109
- // Unexpose cancel
1110
- delete deferred.cancel;
1111
- // Call given func if any
1112
- if ( func ) {
1113
- func.call( deferred, deferred );
1114
- }
1115
- return deferred;
1116
- },
1117
-
1118
- // Deferred helper
1119
- when: function( firstParam ) {
1120
- var args = arguments,
1121
- i = 0,
1122
- length = args.length,
1123
- count = length,
1124
- deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?
1125
- firstParam :
1126
- jQuery.Deferred();
1127
- function resolveFunc( i ) {
1128
- return function( value ) {
1129
- args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
1130
- if ( !( --count ) ) {
1131
- // Strange bug in FF4:
1132
- // Values changed onto the arguments object sometimes end up as undefined values
1133
- // outside the $.when method. Cloning the object into a fresh array solves the issue
1134
- deferred.resolveWith( deferred, sliceDeferred.call( args, 0 ) );
1135
- }
1136
- };
1137
- }
1138
- if ( length > 1 ) {
1139
- for( ; i < length; i++ ) {
1140
- if ( args[ i ] && jQuery.isFunction( args[ i ].promise ) ) {
1141
- args[ i ].promise().then( resolveFunc(i), deferred.reject );
1142
- } else {
1143
- --count;
1144
- }
1145
- }
1146
- if ( !count ) {
1147
- deferred.resolveWith( deferred, args );
1148
- }
1149
- } else if ( deferred !== firstParam ) {
1150
- deferred.resolveWith( deferred, length ? [ firstParam ] : [] );
1151
- }
1152
- return deferred.promise();
1153
- }
1154
- });
1155
-
1156
-
1157
-
1158
- jQuery.support = (function() {
1159
-
1160
- var div = document.createElement( "div" ),
1161
- documentElement = document.documentElement,
1162
- all,
1163
- a,
1164
- select,
1165
- opt,
1166
- input,
1167
- marginDiv,
1168
- support,
1169
- fragment,
1170
- body,
1171
- testElementParent,
1172
- testElement,
1173
- testElementStyle,
1174
- tds,
1175
- events,
1176
- eventName,
1177
- i,
1178
- isSupported;
1179
-
1180
- // Preliminary tests
1181
- div.setAttribute("className", "t");
1182
- div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
1183
-
1184
- all = div.getElementsByTagName( "*" );
1185
- a = div.getElementsByTagName( "a" )[ 0 ];
1186
-
1187
- // Can't get basic test support
1188
- if ( !all || !all.length || !a ) {
1189
- return {};
1190
- }
1191
-
1192
- // First batch of supports tests
1193
- select = document.createElement( "select" );
1194
- opt = select.appendChild( document.createElement("option") );
1195
- input = div.getElementsByTagName( "input" )[ 0 ];
1196
-
1197
- support = {
1198
- // IE strips leading whitespace when .innerHTML is used
1199
- leadingWhitespace: ( div.firstChild.nodeType === 3 ),
1200
-
1201
- // Make sure that tbody elements aren't automatically inserted
1202
- // IE will insert them into empty tables
1203
- tbody: !div.getElementsByTagName( "tbody" ).length,
1204
-
1205
- // Make sure that link elements get serialized correctly by innerHTML
1206
- // This requires a wrapper element in IE
1207
- htmlSerialize: !!div.getElementsByTagName( "link" ).length,
1208
-
1209
- // Get the style information from getAttribute
1210
- // (IE uses .cssText instead)
1211
- style: /top/.test( a.getAttribute("style") ),
1212
-
1213
- // Make sure that URLs aren't manipulated
1214
- // (IE normalizes it by default)
1215
- hrefNormalized: ( a.getAttribute( "href" ) === "/a" ),
1216
-
1217
- // Make sure that element opacity exists
1218
- // (IE uses filter instead)
1219
- // Use a regex to work around a WebKit issue. See #5145
1220
- opacity: /^0.55$/.test( a.style.opacity ),
1221
-
1222
- // Verify style float existence
1223
- // (IE uses styleFloat instead of cssFloat)
1224
- cssFloat: !!a.style.cssFloat,
1225
-
1226
- // Make sure that if no value is specified for a checkbox
1227
- // that it defaults to "on".
1228
- // (WebKit defaults to "" instead)
1229
- checkOn: ( input.value === "on" ),
1230
-
1231
- // Make sure that a selected-by-default option has a working selected property.
1232
- // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
1233
- optSelected: opt.selected,
1234
-
1235
- // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
1236
- getSetAttribute: div.className !== "t",
1237
-
1238
- // Will be defined later
1239
- submitBubbles: true,
1240
- changeBubbles: true,
1241
- focusinBubbles: false,
1242
- deleteExpando: true,
1243
- noCloneEvent: true,
1244
- inlineBlockNeedsLayout: false,
1245
- shrinkWrapBlocks: false,
1246
- reliableMarginRight: true
1247
- };
1248
-
1249
- // Make sure checked status is properly cloned
1250
- input.checked = true;
1251
- support.noCloneChecked = input.cloneNode( true ).checked;
1252
-
1253
- // Make sure that the options inside disabled selects aren't marked as disabled
1254
- // (WebKit marks them as disabled)
1255
- select.disabled = true;
1256
- support.optDisabled = !opt.disabled;
1257
-
1258
- // Test to see if it's possible to delete an expando from an element
1259
- // Fails in Internet Explorer
1260
- try {
1261
- delete div.test;
1262
- } catch( e ) {
1263
- support.deleteExpando = false;
1264
- }
1265
-
1266
- if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
1267
- div.attachEvent( "onclick", function() {
1268
- // Cloning a node shouldn't copy over any
1269
- // bound event handlers (IE does this)
1270
- support.noCloneEvent = false;
1271
- });
1272
- div.cloneNode( true ).fireEvent( "onclick" );
1273
- }
1274
-
1275
- // Check if a radio maintains it's value
1276
- // after being appended to the DOM
1277
- input = document.createElement("input");
1278
- input.value = "t";
1279
- input.setAttribute("type", "radio");
1280
- support.radioValue = input.value === "t";
1281
-
1282
- input.setAttribute("checked", "checked");
1283
- div.appendChild( input );
1284
- fragment = document.createDocumentFragment();
1285
- fragment.appendChild( div.firstChild );
1286
-
1287
- // WebKit doesn't clone checked state correctly in fragments
1288
- support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
1289
-
1290
- div.innerHTML = "";
1291
-
1292
- // Figure out if the W3C box model works as expected
1293
- div.style.width = div.style.paddingLeft = "1px";
1294
-
1295
- body = document.getElementsByTagName( "body" )[ 0 ];
1296
- // We use our own, invisible, body unless the body is already present
1297
- // in which case we use a div (#9239)
1298
- testElement = document.createElement( body ? "div" : "body" );
1299
- testElementStyle = {
1300
- visibility: "hidden",
1301
- width: 0,
1302
- height: 0,
1303
- border: 0,
1304
- margin: 0,
1305
- background: "none"
1306
- };
1307
- if ( body ) {
1308
- jQuery.extend( testElementStyle, {
1309
- position: "absolute",
1310
- left: -1000,
1311
- top: -1000
1312
- });
1313
- }
1314
- for ( i in testElementStyle ) {
1315
- testElement.style[ i ] = testElementStyle[ i ];
1316
- }
1317
- testElement.appendChild( div );
1318
- testElementParent = body || documentElement;
1319
- testElementParent.insertBefore( testElement, testElementParent.firstChild );
1320
-
1321
- // Check if a disconnected checkbox will retain its checked
1322
- // value of true after appended to the DOM (IE6/7)
1323
- support.appendChecked = input.checked;
1324
-
1325
- support.boxModel = div.offsetWidth === 2;
1326
-
1327
- if ( "zoom" in div.style ) {
1328
- // Check if natively block-level elements act like inline-block
1329
- // elements when setting their display to 'inline' and giving
1330
- // them layout
1331
- // (IE < 8 does this)
1332
- div.style.display = "inline";
1333
- div.style.zoom = 1;
1334
- support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 );
1335
-
1336
- // Check if elements with layout shrink-wrap their children
1337
- // (IE 6 does this)
1338
- div.style.display = "";
1339
- div.innerHTML = "<div style='width:4px;'></div>";
1340
- support.shrinkWrapBlocks = ( div.offsetWidth !== 2 );
1341
- }
1342
-
1343
- div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>&nbsp;</td></tr></table>";
1344
- tds = div.getElementsByTagName( "td" );
1345
-
1346
- // Check if table cells still have offsetWidth/Height when they are set
1347
- // to display:none and there are still other visible table cells in a
1348
- // table row; if so, offsetWidth/Height are not reliable for use when
1349
- // determining if an element has been hidden directly using
1350
- // display:none (it is still safe to use offsets if a parent element is
1351
- // hidden; don safety goggles and see bug #4512 for more information).
1352
- // (only IE 8 fails this test)
1353
- isSupported = ( tds[ 0 ].offsetHeight === 0 );
1354
-
1355
- tds[ 0 ].style.display = "";
1356
- tds[ 1 ].style.display = "none";
1357
-
1358
- // Check if empty table cells still have offsetWidth/Height
1359
- // (IE < 8 fail this test)
1360
- support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
1361
- div.innerHTML = "";
1362
-
1363
- // Check if div with explicit width and no margin-right incorrectly
1364
- // gets computed margin-right based on width of container. For more
1365
- // info see bug #3333
1366
- // Fails in WebKit before Feb 2011 nightlies
1367
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
1368
- if ( document.defaultView && document.defaultView.getComputedStyle ) {
1369
- marginDiv = document.createElement( "div" );
1370
- marginDiv.style.width = "0";
1371
- marginDiv.style.marginRight = "0";
1372
- div.appendChild( marginDiv );
1373
- support.reliableMarginRight =
1374
- ( parseInt( ( document.defaultView.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
1375
- }
1376
-
1377
- // Remove the body element we added
1378
- testElement.innerHTML = "";
1379
- testElementParent.removeChild( testElement );
1380
-
1381
- // Technique from Juriy Zaytsev
1382
- // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
1383
- // We only care about the case where non-standard event systems
1384
- // are used, namely in IE. Short-circuiting here helps us to
1385
- // avoid an eval call (in setAttribute) which can cause CSP
1386
- // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
1387
- if ( div.attachEvent ) {
1388
- for( i in {
1389
- submit: 1,
1390
- change: 1,
1391
- focusin: 1
1392
- } ) {
1393
- eventName = "on" + i;
1394
- isSupported = ( eventName in div );
1395
- if ( !isSupported ) {
1396
- div.setAttribute( eventName, "return;" );
1397
- isSupported = ( typeof div[ eventName ] === "function" );
1398
- }
1399
- support[ i + "Bubbles" ] = isSupported;
1400
- }
1401
- }
1402
-
1403
- // Null connected elements to avoid leaks in IE
1404
- testElement = fragment = select = opt = body = marginDiv = div = input = null;
1405
-
1406
- return support;
1407
- })();
1408
-
1409
- // Keep track of boxModel
1410
- jQuery.boxModel = jQuery.support.boxModel;
1411
-
1412
-
1413
-
1414
-
1415
- var rbrace = /^(?:\{.*\}|\[.*\])$/,
1416
- rmultiDash = /([a-z])([A-Z])/g;
1417
-
1418
- jQuery.extend({
1419
- cache: {},
1420
-
1421
- // Please use with caution
1422
- uuid: 0,
1423
-
1424
- // Unique for each copy of jQuery on the page
1425
- // Non-digits removed to match rinlinejQuery
1426
- expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
1427
-
1428
- // The following elements throw uncatchable exceptions if you
1429
- // attempt to add expando properties to them.
1430
- noData: {
1431
- "embed": true,
1432
- // Ban all objects except for Flash (which handle expandos)
1433
- "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
1434
- "applet": true
1435
- },
1436
-
1437
- hasData: function( elem ) {
1438
- elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
1439
-
1440
- return !!elem && !isEmptyDataObject( elem );
1441
- },
1442
-
1443
- data: function( elem, name, data, pvt /* Internal Use Only */ ) {
1444
- if ( !jQuery.acceptData( elem ) ) {
1445
- return;
1446
- }
1447
-
1448
- var thisCache, ret,
1449
- internalKey = jQuery.expando,
1450
- getByName = typeof name === "string",
1451
-
1452
- // We have to handle DOM nodes and JS objects differently because IE6-7
1453
- // can't GC object references properly across the DOM-JS boundary
1454
- isNode = elem.nodeType,
1455
-
1456
- // Only DOM nodes need the global jQuery cache; JS object data is
1457
- // attached directly to the object so GC can occur automatically
1458
- cache = isNode ? jQuery.cache : elem,
1459
-
1460
- // Only defining an ID for JS objects if its cache already exists allows
1461
- // the code to shortcut on the same path as a DOM node with no cache
1462
- id = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando;
1463
-
1464
- // Avoid doing any more work than we need to when trying to get data on an
1465
- // object that has no data at all
1466
- if ( (!id || (pvt && id && (cache[ id ] && !cache[ id ][ internalKey ]))) && getByName && data === undefined ) {
1467
- return;
1468
- }
1469
-
1470
- if ( !id ) {
1471
- // Only DOM nodes need a new unique ID for each element since their data
1472
- // ends up in the global cache
1473
- if ( isNode ) {
1474
- elem[ jQuery.expando ] = id = ++jQuery.uuid;
1475
- } else {
1476
- id = jQuery.expando;
1477
- }
1478
- }
1479
-
1480
- if ( !cache[ id ] ) {
1481
- cache[ id ] = {};
1482
-
1483
- // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery
1484
- // metadata on plain JS objects when the object is serialized using
1485
- // JSON.stringify
1486
- if ( !isNode ) {
1487
- cache[ id ].toJSON = jQuery.noop;
1488
- }
1489
- }
1490
-
1491
- // An object can be passed to jQuery.data instead of a key/value pair; this gets
1492
- // shallow copied over onto the existing cache
1493
- if ( typeof name === "object" || typeof name === "function" ) {
1494
- if ( pvt ) {
1495
- cache[ id ][ internalKey ] = jQuery.extend(cache[ id ][ internalKey ], name);
1496
- } else {
1497
- cache[ id ] = jQuery.extend(cache[ id ], name);
1498
- }
1499
- }
1500
-
1501
- thisCache = cache[ id ];
1502
-
1503
- // Internal jQuery data is stored in a separate object inside the object's data
1504
- // cache in order to avoid key collisions between internal data and user-defined
1505
- // data
1506
- if ( pvt ) {
1507
- if ( !thisCache[ internalKey ] ) {
1508
- thisCache[ internalKey ] = {};
1509
- }
1510
-
1511
- thisCache = thisCache[ internalKey ];
1512
- }
1513
-
1514
- if ( data !== undefined ) {
1515
- thisCache[ jQuery.camelCase( name ) ] = data;
1516
- }
1517
-
1518
- // TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should
1519
- // not attempt to inspect the internal events object using jQuery.data, as this
1520
- // internal data object is undocumented and subject to change.
1521
- if ( name === "events" && !thisCache[name] ) {
1522
- return thisCache[ internalKey ] && thisCache[ internalKey ].events;
1523
- }
1524
-
1525
- // Check for both converted-to-camel and non-converted data property names
1526
- // If a data property was specified
1527
- if ( getByName ) {
1528
-
1529
- // First Try to find as-is property data
1530
- ret = thisCache[ name ];
1531
-
1532
- // Test for null|undefined property data
1533
- if ( ret == null ) {
1534
-
1535
- // Try to find the camelCased property
1536
- ret = thisCache[ jQuery.camelCase( name ) ];
1537
- }
1538
- } else {
1539
- ret = thisCache;
1540
- }
1541
-
1542
- return ret;
1543
- },
1544
-
1545
- removeData: function( elem, name, pvt /* Internal Use Only */ ) {
1546
- if ( !jQuery.acceptData( elem ) ) {
1547
- return;
1548
- }
1549
-
1550
- var thisCache,
1551
-
1552
- // Reference to internal data cache key
1553
- internalKey = jQuery.expando,
1554
-
1555
- isNode = elem.nodeType,
1556
-
1557
- // See jQuery.data for more information
1558
- cache = isNode ? jQuery.cache : elem,
1559
-
1560
- // See jQuery.data for more information
1561
- id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
1562
-
1563
- // If there is already no cache entry for this object, there is no
1564
- // purpose in continuing
1565
- if ( !cache[ id ] ) {
1566
- return;
1567
- }
1568
-
1569
- if ( name ) {
1570
-
1571
- thisCache = pvt ? cache[ id ][ internalKey ] : cache[ id ];
1572
-
1573
- if ( thisCache ) {
1574
-
1575
- // Support interoperable removal of hyphenated or camelcased keys
1576
- if ( !thisCache[ name ] ) {
1577
- name = jQuery.camelCase( name );
1578
- }
1579
-
1580
- delete thisCache[ name ];
1581
-
1582
- // If there is no data left in the cache, we want to continue
1583
- // and let the cache object itself get destroyed
1584
- if ( !isEmptyDataObject(thisCache) ) {
1585
- return;
1586
- }
1587
- }
1588
- }
1589
-
1590
- // See jQuery.data for more information
1591
- if ( pvt ) {
1592
- delete cache[ id ][ internalKey ];
1593
-
1594
- // Don't destroy the parent cache unless the internal data object
1595
- // had been the only thing left in it
1596
- if ( !isEmptyDataObject(cache[ id ]) ) {
1597
- return;
1598
- }
1599
- }
1600
-
1601
- var internalCache = cache[ id ][ internalKey ];
1602
-
1603
- // Browsers that fail expando deletion also refuse to delete expandos on
1604
- // the window, but it will allow it on all other JS objects; other browsers
1605
- // don't care
1606
- // Ensure that `cache` is not a window object #10080
1607
- if ( jQuery.support.deleteExpando || !cache.setInterval ) {
1608
- delete cache[ id ];
1609
- } else {
1610
- cache[ id ] = null;
1611
- }
1612
-
1613
- // We destroyed the entire user cache at once because it's faster than
1614
- // iterating through each key, but we need to continue to persist internal
1615
- // data if it existed
1616
- if ( internalCache ) {
1617
- cache[ id ] = {};
1618
- // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery
1619
- // metadata on plain JS objects when the object is serialized using
1620
- // JSON.stringify
1621
- if ( !isNode ) {
1622
- cache[ id ].toJSON = jQuery.noop;
1623
- }
1624
-
1625
- cache[ id ][ internalKey ] = internalCache;
1626
-
1627
- // Otherwise, we need to eliminate the expando on the node to avoid
1628
- // false lookups in the cache for entries that no longer exist
1629
- } else if ( isNode ) {
1630
- // IE does not allow us to delete expando properties from nodes,
1631
- // nor does it have a removeAttribute function on Document nodes;
1632
- // we must handle all of these cases
1633
- if ( jQuery.support.deleteExpando ) {
1634
- delete elem[ jQuery.expando ];
1635
- } else if ( elem.removeAttribute ) {
1636
- elem.removeAttribute( jQuery.expando );
1637
- } else {
1638
- elem[ jQuery.expando ] = null;
1639
- }
1640
- }
1641
- },
1642
-
1643
- // For internal use only.
1644
- _data: function( elem, name, data ) {
1645
- return jQuery.data( elem, name, data, true );
1646
- },
1647
-
1648
- // A method for determining if a DOM node can handle the data expando
1649
- acceptData: function( elem ) {
1650
- if ( elem.nodeName ) {
1651
- var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
1652
-
1653
- if ( match ) {
1654
- return !(match === true || elem.getAttribute("classid") !== match);
1655
- }
1656
- }
1657
-
1658
- return true;
1659
- }
1660
- });
1661
-
1662
- jQuery.fn.extend({
1663
- data: function( key, value ) {
1664
- var data = null;
1665
-
1666
- if ( typeof key === "undefined" ) {
1667
- if ( this.length ) {
1668
- data = jQuery.data( this[0] );
1669
-
1670
- if ( this[0].nodeType === 1 ) {
1671
- var attr = this[0].attributes, name;
1672
- for ( var i = 0, l = attr.length; i < l; i++ ) {
1673
- name = attr[i].name;
1674
-
1675
- if ( name.indexOf( "data-" ) === 0 ) {
1676
- name = jQuery.camelCase( name.substring(5) );
1677
-
1678
- dataAttr( this[0], name, data[ name ] );
1679
- }
1680
- }
1681
- }
1682
- }
1683
-
1684
- return data;
1685
-
1686
- } else if ( typeof key === "object" ) {
1687
- return this.each(function() {
1688
- jQuery.data( this, key );
1689
- });
1690
- }
1691
-
1692
- var parts = key.split(".");
1693
- parts[1] = parts[1] ? "." + parts[1] : "";
1694
-
1695
- if ( value === undefined ) {
1696
- data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
1697
-
1698
- // Try to fetch any internally stored data first
1699
- if ( data === undefined && this.length ) {
1700
- data = jQuery.data( this[0], key );
1701
- data = dataAttr( this[0], key, data );
1702
- }
1703
-
1704
- return data === undefined && parts[1] ?
1705
- this.data( parts[0] ) :
1706
- data;
1707
-
1708
- } else {
1709
- return this.each(function() {
1710
- var $this = jQuery( this ),
1711
- args = [ parts[0], value ];
1712
-
1713
- $this.triggerHandler( "setData" + parts[1] + "!", args );
1714
- jQuery.data( this, key, value );
1715
- $this.triggerHandler( "changeData" + parts[1] + "!", args );
1716
- });
1717
- }
1718
- },
1719
-
1720
- removeData: function( key ) {
1721
- return this.each(function() {
1722
- jQuery.removeData( this, key );
1723
- });
1724
- }
1725
- });
1726
-
1727
- function dataAttr( elem, key, data ) {
1728
- // If nothing was found internally, try to fetch any
1729
- // data from the HTML5 data-* attribute
1730
- if ( data === undefined && elem.nodeType === 1 ) {
1731
- var name = "data-" + key.replace( rmultiDash, "$1-$2" ).toLowerCase();
1732
-
1733
- data = elem.getAttribute( name );
1734
-
1735
- if ( typeof data === "string" ) {
1736
- try {
1737
- data = data === "true" ? true :
1738
- data === "false" ? false :
1739
- data === "null" ? null :
1740
- !jQuery.isNaN( data ) ? parseFloat( data ) :
1741
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
1742
- data;
1743
- } catch( e ) {}
1744
-
1745
- // Make sure we set the data so it isn't changed later
1746
- jQuery.data( elem, key, data );
1747
-
1748
- } else {
1749
- data = undefined;
1750
- }
1751
- }
1752
-
1753
- return data;
1754
- }
1755
-
1756
- // TODO: This is a hack for 1.5 ONLY to allow objects with a single toJSON
1757
- // property to be considered empty objects; this property always exists in
1758
- // order to make sure JSON.stringify does not expose internal metadata
1759
- function isEmptyDataObject( obj ) {
1760
- for ( var name in obj ) {
1761
- if ( name !== "toJSON" ) {
1762
- return false;
1763
- }
1764
- }
1765
-
1766
- return true;
1767
- }
1768
-
1769
-
1770
-
1771
-
1772
- function handleQueueMarkDefer( elem, type, src ) {
1773
- var deferDataKey = type + "defer",
1774
- queueDataKey = type + "queue",
1775
- markDataKey = type + "mark",
1776
- defer = jQuery.data( elem, deferDataKey, undefined, true );
1777
- if ( defer &&
1778
- ( src === "queue" || !jQuery.data( elem, queueDataKey, undefined, true ) ) &&
1779
- ( src === "mark" || !jQuery.data( elem, markDataKey, undefined, true ) ) ) {
1780
- // Give room for hard-coded callbacks to fire first
1781
- // and eventually mark/queue something else on the element
1782
- setTimeout( function() {
1783
- if ( !jQuery.data( elem, queueDataKey, undefined, true ) &&
1784
- !jQuery.data( elem, markDataKey, undefined, true ) ) {
1785
- jQuery.removeData( elem, deferDataKey, true );
1786
- defer.resolve();
1787
- }
1788
- }, 0 );
1789
- }
1790
- }
1791
-
1792
- jQuery.extend({
1793
-
1794
- _mark: function( elem, type ) {
1795
- if ( elem ) {
1796
- type = (type || "fx") + "mark";
1797
- jQuery.data( elem, type, (jQuery.data(elem,type,undefined,true) || 0) + 1, true );
1798
- }
1799
- },
1800
-
1801
- _unmark: function( force, elem, type ) {
1802
- if ( force !== true ) {
1803
- type = elem;
1804
- elem = force;
1805
- force = false;
1806
- }
1807
- if ( elem ) {
1808
- type = type || "fx";
1809
- var key = type + "mark",
1810
- count = force ? 0 : ( (jQuery.data( elem, key, undefined, true) || 1 ) - 1 );
1811
- if ( count ) {
1812
- jQuery.data( elem, key, count, true );
1813
- } else {
1814
- jQuery.removeData( elem, key, true );
1815
- handleQueueMarkDefer( elem, type, "mark" );
1816
- }
1817
- }
1818
- },
1819
-
1820
- queue: function( elem, type, data ) {
1821
- if ( elem ) {
1822
- type = (type || "fx") + "queue";
1823
- var q = jQuery.data( elem, type, undefined, true );
1824
- // Speed up dequeue by getting out quickly if this is just a lookup
1825
- if ( data ) {
1826
- if ( !q || jQuery.isArray(data) ) {
1827
- q = jQuery.data( elem, type, jQuery.makeArray(data), true );
1828
- } else {
1829
- q.push( data );
1830
- }
1831
- }
1832
- return q || [];
1833
- }
1834
- },
1835
-
1836
- dequeue: function( elem, type ) {
1837
- type = type || "fx";
1838
-
1839
- var queue = jQuery.queue( elem, type ),
1840
- fn = queue.shift(),
1841
- defer;
1842
-
1843
- // If the fx queue is dequeued, always remove the progress sentinel
1844
- if ( fn === "inprogress" ) {
1845
- fn = queue.shift();
1846
- }
1847
-
1848
- if ( fn ) {
1849
- // Add a progress sentinel to prevent the fx queue from being
1850
- // automatically dequeued
1851
- if ( type === "fx" ) {
1852
- queue.unshift("inprogress");
1853
- }
1854
-
1855
- fn.call(elem, function() {
1856
- jQuery.dequeue(elem, type);
1857
- });
1858
- }
1859
-
1860
- if ( !queue.length ) {
1861
- jQuery.removeData( elem, type + "queue", true );
1862
- handleQueueMarkDefer( elem, type, "queue" );
1863
- }
1864
- }
1865
- });
1866
-
1867
- jQuery.fn.extend({
1868
- queue: function( type, data ) {
1869
- if ( typeof type !== "string" ) {
1870
- data = type;
1871
- type = "fx";
1872
- }
1873
-
1874
- if ( data === undefined ) {
1875
- return jQuery.queue( this[0], type );
1876
- }
1877
- return this.each(function() {
1878
- var queue = jQuery.queue( this, type, data );
1879
-
1880
- if ( type === "fx" && queue[0] !== "inprogress" ) {
1881
- jQuery.dequeue( this, type );
1882
- }
1883
- });
1884
- },
1885
- dequeue: function( type ) {
1886
- return this.each(function() {
1887
- jQuery.dequeue( this, type );
1888
- });
1889
- },
1890
- // Based off of the plugin by Clint Helfers, with permission.
1891
- // http://blindsignals.com/index.php/2009/07/jquery-delay/
1892
- delay: function( time, type ) {
1893
- time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
1894
- type = type || "fx";
1895
-
1896
- return this.queue( type, function() {
1897
- var elem = this;
1898
- setTimeout(function() {
1899
- jQuery.dequeue( elem, type );
1900
- }, time );
1901
- });
1902
- },
1903
- clearQueue: function( type ) {
1904
- return this.queue( type || "fx", [] );
1905
- },
1906
- // Get a promise resolved when queues of a certain type
1907
- // are emptied (fx is the type by default)
1908
- promise: function( type, object ) {
1909
- if ( typeof type !== "string" ) {
1910
- object = type;
1911
- type = undefined;
1912
- }
1913
- type = type || "fx";
1914
- var defer = jQuery.Deferred(),
1915
- elements = this,
1916
- i = elements.length,
1917
- count = 1,
1918
- deferDataKey = type + "defer",
1919
- queueDataKey = type + "queue",
1920
- markDataKey = type + "mark",
1921
- tmp;
1922
- function resolve() {
1923
- if ( !( --count ) ) {
1924
- defer.resolveWith( elements, [ elements ] );
1925
- }
1926
- }
1927
- while( i-- ) {
1928
- if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
1929
- ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
1930
- jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
1931
- jQuery.data( elements[ i ], deferDataKey, jQuery._Deferred(), true ) )) {
1932
- count++;
1933
- tmp.done( resolve );
1934
- }
1935
- }
1936
- resolve();
1937
- return defer.promise();
1938
- }
1939
- });
1940
-
1941
-
1942
-
1943
-
1944
- var rclass = /[\n\t\r]/g,
1945
- rspace = /\s+/,
1946
- rreturn = /\r/g,
1947
- rtype = /^(?:button|input)$/i,
1948
- rfocusable = /^(?:button|input|object|select|textarea)$/i,
1949
- rclickable = /^a(?:rea)?$/i,
1950
- rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
1951
- nodeHook, boolHook;
1952
-
1953
- jQuery.fn.extend({
1954
- attr: function( name, value ) {
1955
- return jQuery.access( this, name, value, true, jQuery.attr );
1956
- },
1957
-
1958
- removeAttr: function( name ) {
1959
- return this.each(function() {
1960
- jQuery.removeAttr( this, name );
1961
- });
1962
- },
1963
-
1964
- prop: function( name, value ) {
1965
- return jQuery.access( this, name, value, true, jQuery.prop );
1966
- },
1967
-
1968
- removeProp: function( name ) {
1969
- name = jQuery.propFix[ name ] || name;
1970
- return this.each(function() {
1971
- // try/catch handles cases where IE balks (such as removing a property on window)
1972
- try {
1973
- this[ name ] = undefined;
1974
- delete this[ name ];
1975
- } catch( e ) {}
1976
- });
1977
- },
1978
-
1979
- addClass: function( value ) {
1980
- var classNames, i, l, elem,
1981
- setClass, c, cl;
1982
-
1983
- if ( jQuery.isFunction( value ) ) {
1984
- return this.each(function( j ) {
1985
- jQuery( this ).addClass( value.call(this, j, this.className) );
1986
- });
1987
- }
1988
-
1989
- if ( value && typeof value === "string" ) {
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 ) {
1996
- if ( !elem.className && classNames.length === 1 ) {
1997
- elem.className = value;
1998
-
1999
- } else {
2000
- setClass = " " + elem.className + " ";
2001
-
2002
- for ( c = 0, cl = classNames.length; c < cl; c++ ) {
2003
- if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) {
2004
- setClass += classNames[ c ] + " ";
2005
- }
2006
- }
2007
- elem.className = jQuery.trim( setClass );
2008
- }
2009
- }
2010
- }
2011
- }
2012
-
2013
- return this;
2014
- },
2015
-
2016
- removeClass: function( value ) {
2017
- var classNames, i, l, elem, className, c, cl;
2018
-
2019
- if ( jQuery.isFunction( value ) ) {
2020
- return this.each(function( j ) {
2021
- jQuery( this ).removeClass( value.call(this, j, this.className) );
2022
- });
2023
- }
2024
-
2025
- if ( (value && typeof value === "string") || value === undefined ) {
2026
- classNames = (value || "").split( rspace );
2027
-
2028
- for ( i = 0, l = this.length; i < l; i++ ) {
2029
- elem = this[ i ];
2030
-
2031
- if ( elem.nodeType === 1 && elem.className ) {
2032
- if ( value ) {
2033
- className = (" " + elem.className + " ").replace( rclass, " " );
2034
- for ( c = 0, cl = classNames.length; c < cl; c++ ) {
2035
- className = className.replace(" " + classNames[ c ] + " ", " ");
2036
- }
2037
- elem.className = jQuery.trim( className );
2038
-
2039
- } else {
2040
- elem.className = "";
2041
- }
2042
- }
2043
- }
2044
- }
2045
-
2046
- return this;
2047
- },
2048
-
2049
- toggleClass: function( value, stateVal ) {
2050
- var type = typeof value,
2051
- isBool = typeof stateVal === "boolean";
2052
-
2053
- if ( jQuery.isFunction( value ) ) {
2054
- return this.each(function( i ) {
2055
- jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
2056
- });
2057
- }
2058
-
2059
- return this.each(function() {
2060
- if ( type === "string" ) {
2061
- // toggle individual class names
2062
- var className,
2063
- i = 0,
2064
- self = jQuery( this ),
2065
- state = stateVal,
2066
- classNames = value.split( rspace );
2067
-
2068
- while ( (className = classNames[ i++ ]) ) {
2069
- // check each className given, space seperated list
2070
- state = isBool ? state : !self.hasClass( className );
2071
- self[ state ? "addClass" : "removeClass" ]( className );
2072
- }
2073
-
2074
- } else if ( type === "undefined" || type === "boolean" ) {
2075
- if ( this.className ) {
2076
- // store className if set
2077
- jQuery._data( this, "__className__", this.className );
2078
- }
2079
-
2080
- // toggle whole className
2081
- this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
2082
- }
2083
- });
2084
- },
2085
-
2086
- hasClass: function( selector ) {
2087
- var className = " " + selector + " ";
2088
- for ( var i = 0, l = this.length; i < l; i++ ) {
2089
- if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
2090
- return true;
2091
- }
2092
- }
2093
-
2094
- return false;
2095
- },
2096
-
2097
- val: function( value ) {
2098
- var hooks, ret,
2099
- elem = this[0];
2100
-
2101
- if ( !arguments.length ) {
2102
- if ( elem ) {
2103
- hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ];
2104
-
2105
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
2106
- return ret;
2107
- }
2108
-
2109
- ret = elem.value;
2110
-
2111
- return typeof ret === "string" ?
2112
- // handle most common string cases
2113
- ret.replace(rreturn, "") :
2114
- // handle cases where value is null/undef or number
2115
- ret == null ? "" : ret;
2116
- }
2117
-
2118
- return undefined;
2119
- }
2120
-
2121
- var isFunction = jQuery.isFunction( value );
2122
-
2123
- return this.each(function( i ) {
2124
- var self = jQuery(this), val;
2125
-
2126
- if ( this.nodeType !== 1 ) {
2127
- return;
2128
- }
2129
-
2130
- if ( isFunction ) {
2131
- val = value.call( this, i, self.val() );
2132
- } else {
2133
- val = value;
2134
- }
2135
-
2136
- // Treat null/undefined as ""; convert numbers to string
2137
- if ( val == null ) {
2138
- val = "";
2139
- } else if ( typeof val === "number" ) {
2140
- val += "";
2141
- } else if ( jQuery.isArray( val ) ) {
2142
- val = jQuery.map(val, function ( value ) {
2143
- return value == null ? "" : value + "";
2144
- });
2145
- }
2146
-
2147
- hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ];
2148
-
2149
- // If set returns undefined, fall back to normal setting
2150
- if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
2151
- this.value = val;
2152
- }
2153
- });
2154
- }
2155
- });
2156
-
2157
- jQuery.extend({
2158
- valHooks: {
2159
- option: {
2160
- get: function( elem ) {
2161
- // attributes.value is undefined in Blackberry 4.7 but
2162
- // uses .value. See #6932
2163
- var val = elem.attributes.value;
2164
- return !val || val.specified ? elem.value : elem.text;
2165
- }
2166
- },
2167
- select: {
2168
- get: function( elem ) {
2169
- var value,
2170
- index = elem.selectedIndex,
2171
- values = [],
2172
- options = elem.options,
2173
- one = elem.type === "select-one";
2174
-
2175
- // Nothing was selected
2176
- if ( index < 0 ) {
2177
- return null;
2178
- }
2179
-
2180
- // Loop through all the selected options
2181
- for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
2182
- var option = options[ i ];
2183
-
2184
- // Don't return options that are disabled or in a disabled optgroup
2185
- if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
2186
- (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
2187
-
2188
- // Get the specific value for the option
2189
- value = jQuery( option ).val();
2190
-
2191
- // We don't need an array for one selects
2192
- if ( one ) {
2193
- return value;
2194
- }
2195
-
2196
- // Multi-Selects return an array
2197
- values.push( value );
2198
- }
2199
- }
2200
-
2201
- // Fixes Bug #2551 -- select.val() broken in IE after form.reset()
2202
- if ( one && !values.length && options.length ) {
2203
- return jQuery( options[ index ] ).val();
2204
- }
2205
-
2206
- return values;
2207
- },
2208
-
2209
- set: function( elem, value ) {
2210
- var values = jQuery.makeArray( value );
2211
-
2212
- jQuery(elem).find("option").each(function() {
2213
- this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
2214
- });
2215
-
2216
- if ( !values.length ) {
2217
- elem.selectedIndex = -1;
2218
- }
2219
- return values;
2220
- }
2221
- }
2222
- },
2223
-
2224
- attrFn: {
2225
- val: true,
2226
- css: true,
2227
- html: true,
2228
- text: true,
2229
- data: true,
2230
- width: true,
2231
- height: true,
2232
- offset: true
2233
- },
2234
-
2235
- attrFix: {
2236
- // Always normalize to ensure hook usage
2237
- tabindex: "tabIndex"
2238
- },
2239
-
2240
- attr: function( elem, name, value, pass ) {
2241
- var nType = elem.nodeType;
2242
-
2243
- // don't get/set attributes on text, comment and attribute nodes
2244
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
2245
- return undefined;
2246
- }
2247
-
2248
- if ( pass && name in jQuery.attrFn ) {
2249
- return jQuery( elem )[ name ]( value );
2250
- }
2251
-
2252
- // Fallback to prop when attributes are not supported
2253
- if ( !("getAttribute" in elem) ) {
2254
- return jQuery.prop( elem, name, value );
2255
- }
2256
-
2257
- var ret, hooks,
2258
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
2259
-
2260
- // Normalize the name if needed
2261
- if ( notxml ) {
2262
- name = jQuery.attrFix[ name ] || name;
2263
-
2264
- hooks = jQuery.attrHooks[ name ];
2265
-
2266
- if ( !hooks ) {
2267
- // Use boolHook for boolean attributes
2268
- if ( rboolean.test( name ) ) {
2269
- hooks = boolHook;
2270
-
2271
- // Use nodeHook if available( IE6/7 )
2272
- } else if ( nodeHook ) {
2273
- hooks = nodeHook;
2274
- }
2275
- }
2276
- }
2277
-
2278
- if ( value !== undefined ) {
2279
-
2280
- if ( value === null ) {
2281
- jQuery.removeAttr( elem, name );
2282
- return undefined;
2283
-
2284
- } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
2285
- return ret;
2286
-
2287
- } else {
2288
- elem.setAttribute( name, "" + value );
2289
- return value;
2290
- }
2291
-
2292
- } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
2293
- return ret;
2294
-
2295
- } else {
2296
-
2297
- ret = elem.getAttribute( name );
2298
-
2299
- // Non-existent attributes return null, we normalize to undefined
2300
- return ret === null ?
2301
- undefined :
2302
- ret;
2303
- }
2304
- },
2305
-
2306
- removeAttr: function( elem, name ) {
2307
- var propName;
2308
- if ( elem.nodeType === 1 ) {
2309
- name = jQuery.attrFix[ name ] || name;
2310
-
2311
- jQuery.attr( elem, name, "" );
2312
- elem.removeAttribute( name );
2313
-
2314
- // Set corresponding property to false for boolean attributes
2315
- if ( rboolean.test( name ) && (propName = jQuery.propFix[ name ] || name) in elem ) {
2316
- elem[ propName ] = false;
2317
- }
2318
- }
2319
- },
2320
-
2321
- attrHooks: {
2322
- type: {
2323
- set: function( elem, value ) {
2324
- // We can't allow the type property to be changed (since it causes problems in IE)
2325
- if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
2326
- jQuery.error( "type property can't be changed" );
2327
- } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
2328
- // Setting the type on a radio button after the value resets the value in IE6-9
2329
- // Reset value to it's default in case type is set after value
2330
- // This is for element creation
2331
- var val = elem.value;
2332
- elem.setAttribute( "type", value );
2333
- if ( val ) {
2334
- elem.value = val;
2335
- }
2336
- return value;
2337
- }
2338
- }
2339
- },
2340
- // Use the value property for back compat
2341
- // Use the nodeHook for button elements in IE6/7 (#1954)
2342
- value: {
2343
- get: function( elem, name ) {
2344
- if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
2345
- return nodeHook.get( elem, name );
2346
- }
2347
- return name in elem ?
2348
- elem.value :
2349
- null;
2350
- },
2351
- set: function( elem, value, name ) {
2352
- if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
2353
- return nodeHook.set( elem, value, name );
2354
- }
2355
- // Does not return so that setAttribute is also used
2356
- elem.value = value;
2357
- }
2358
- }
2359
- },
2360
-
2361
- propFix: {
2362
- tabindex: "tabIndex",
2363
- readonly: "readOnly",
2364
- "for": "htmlFor",
2365
- "class": "className",
2366
- maxlength: "maxLength",
2367
- cellspacing: "cellSpacing",
2368
- cellpadding: "cellPadding",
2369
- rowspan: "rowSpan",
2370
- colspan: "colSpan",
2371
- usemap: "useMap",
2372
- frameborder: "frameBorder",
2373
- contenteditable: "contentEditable"
2374
- },
2375
-
2376
- prop: function( elem, name, value ) {
2377
- var nType = elem.nodeType;
2378
-
2379
- // don't get/set properties on text, comment and attribute nodes
2380
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
2381
- return undefined;
2382
- }
2383
-
2384
- var ret, hooks,
2385
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
2386
-
2387
- if ( notxml ) {
2388
- // Fix name and attach hooks
2389
- name = jQuery.propFix[ name ] || name;
2390
- hooks = jQuery.propHooks[ name ];
2391
- }
2392
-
2393
- if ( value !== undefined ) {
2394
- if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
2395
- return ret;
2396
-
2397
- } else {
2398
- return (elem[ name ] = value);
2399
- }
2400
-
2401
- } else {
2402
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
2403
- return ret;
2404
-
2405
- } else {
2406
- return elem[ name ];
2407
- }
2408
- }
2409
- },
2410
-
2411
- propHooks: {
2412
- tabIndex: {
2413
- get: function( elem ) {
2414
- // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
2415
- // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
2416
- var attributeNode = elem.getAttributeNode("tabindex");
2417
-
2418
- return attributeNode && attributeNode.specified ?
2419
- parseInt( attributeNode.value, 10 ) :
2420
- rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
2421
- 0 :
2422
- undefined;
2423
- }
2424
- }
2425
- }
2426
- });
2427
-
2428
- // Add the tabindex propHook to attrHooks for back-compat
2429
- jQuery.attrHooks.tabIndex = jQuery.propHooks.tabIndex;
2430
-
2431
- // Hook for boolean attributes
2432
- boolHook = {
2433
- get: function( elem, name ) {
2434
- // Align boolean attributes with corresponding properties
2435
- // Fall back to attribute presence where some booleans are not supported
2436
- var attrNode;
2437
- return jQuery.prop( elem, name ) === true || ( attrNode = elem.getAttributeNode( name ) ) && attrNode.nodeValue !== false ?
2438
- name.toLowerCase() :
2439
- undefined;
2440
- },
2441
- set: function( elem, value, name ) {
2442
- var propName;
2443
- if ( value === false ) {
2444
- // Remove boolean attributes when set to false
2445
- jQuery.removeAttr( elem, name );
2446
- } else {
2447
- // value is true since we know at this point it's type boolean and not false
2448
- // Set boolean attributes to the same name and set the DOM property
2449
- propName = jQuery.propFix[ name ] || name;
2450
- if ( propName in elem ) {
2451
- // Only set the IDL specifically if it already exists on the element
2452
- elem[ propName ] = true;
2453
- }
2454
-
2455
- elem.setAttribute( name, name.toLowerCase() );
2456
- }
2457
- return name;
2458
- }
2459
- };
2460
-
2461
- // IE6/7 do not support getting/setting some attributes with get/setAttribute
2462
- if ( !jQuery.support.getSetAttribute ) {
2463
-
2464
- // Use this for any attribute in IE6/7
2465
- // This fixes almost every IE6/7 issue
2466
- nodeHook = jQuery.valHooks.button = {
2467
- get: function( elem, name ) {
2468
- var ret;
2469
- ret = elem.getAttributeNode( name );
2470
- // Return undefined if nodeValue is empty string
2471
- return ret && ret.nodeValue !== "" ?
2472
- ret.nodeValue :
2473
- undefined;
2474
- },
2475
- set: function( elem, value, name ) {
2476
- // Set the existing or create a new attribute node
2477
- var ret = elem.getAttributeNode( name );
2478
- if ( !ret ) {
2479
- ret = document.createAttribute( name );
2480
- elem.setAttributeNode( ret );
2481
- }
2482
- return (ret.nodeValue = value + "");
2483
- }
2484
- };
2485
-
2486
- // Set width and height to auto instead of 0 on empty string( Bug #8150 )
2487
- // This is for removals
2488
- jQuery.each([ "width", "height" ], function( i, name ) {
2489
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
2490
- set: function( elem, value ) {
2491
- if ( value === "" ) {
2492
- elem.setAttribute( name, "auto" );
2493
- return value;
2494
- }
2495
- }
2496
- });
2497
- });
2498
- }
2499
-
2500
-
2501
- // Some attributes require a special call on IE
2502
- if ( !jQuery.support.hrefNormalized ) {
2503
- jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
2504
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
2505
- get: function( elem ) {
2506
- var ret = elem.getAttribute( name, 2 );
2507
- return ret === null ? undefined : ret;
2508
- }
2509
- });
2510
- });
2511
- }
2512
-
2513
- if ( !jQuery.support.style ) {
2514
- jQuery.attrHooks.style = {
2515
- get: function( elem ) {
2516
- // Return undefined in the case of empty string
2517
- // Normalize to lowercase since IE uppercases css property names
2518
- return elem.style.cssText.toLowerCase() || undefined;
2519
- },
2520
- set: function( elem, value ) {
2521
- return (elem.style.cssText = "" + value);
2522
- }
2523
- };
2524
- }
2525
-
2526
- // Safari mis-reports the default selected property of an option
2527
- // Accessing the parent's selectedIndex property fixes it
2528
- if ( !jQuery.support.optSelected ) {
2529
- jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
2530
- get: function( elem ) {
2531
- var parent = elem.parentNode;
2532
-
2533
- if ( parent ) {
2534
- parent.selectedIndex;
2535
-
2536
- // Make sure that it also works with optgroups, see #5701
2537
- if ( parent.parentNode ) {
2538
- parent.parentNode.selectedIndex;
2539
- }
2540
- }
2541
- return null;
2542
- }
2543
- });
2544
- }
2545
-
2546
- // Radios and checkboxes getter/setter
2547
- if ( !jQuery.support.checkOn ) {
2548
- jQuery.each([ "radio", "checkbox" ], function() {
2549
- jQuery.valHooks[ this ] = {
2550
- get: function( elem ) {
2551
- // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
2552
- return elem.getAttribute("value") === null ? "on" : elem.value;
2553
- }
2554
- };
2555
- });
2556
- }
2557
- jQuery.each([ "radio", "checkbox" ], function() {
2558
- jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
2559
- set: function( elem, value ) {
2560
- if ( jQuery.isArray( value ) ) {
2561
- return (elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0);
2562
- }
2563
- }
2564
- });
2565
- });
2566
-
2567
-
2568
-
2569
-
2570
- var rnamespaces = /\.(.*)$/,
2571
- rformElems = /^(?:textarea|input|select)$/i,
2572
- rperiod = /\./g,
2573
- rspaces = / /g,
2574
- rescape = /[^\w\s.|`]/g,
2575
- fcleanup = function( nm ) {
2576
- return nm.replace(rescape, "\\$&");
2577
- };
2578
-
2579
- /*
2580
- * A number of helper functions used for managing events.
2581
- * Many of the ideas behind this code originated from
2582
- * Dean Edwards' addEvent library.
2583
- */
2584
- jQuery.event = {
2585
-
2586
- // Bind an event to an element
2587
- // Original by Dean Edwards
2588
- add: function( elem, types, handler, data ) {
2589
- if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
2590
- return;
2591
- }
2592
-
2593
- if ( handler === false ) {
2594
- handler = returnFalse;
2595
- } else if ( !handler ) {
2596
- // Fixes bug #7229. Fix recommended by jdalton
2597
- return;
2598
- }
2599
-
2600
- var handleObjIn, handleObj;
2601
-
2602
- if ( handler.handler ) {
2603
- handleObjIn = handler;
2604
- handler = handleObjIn.handler;
2605
- }
2606
-
2607
- // Make sure that the function being executed has a unique ID
2608
- if ( !handler.guid ) {
2609
- handler.guid = jQuery.guid++;
2610
- }
2611
-
2612
- // Init the element's event structure
2613
- var elemData = jQuery._data( elem );
2614
-
2615
- // If no elemData is found then we must be trying to bind to one of the
2616
- // banned noData elements
2617
- if ( !elemData ) {
2618
- return;
2619
- }
2620
-
2621
- var events = elemData.events,
2622
- eventHandle = elemData.handle;
2623
-
2624
- if ( !events ) {
2625
- elemData.events = events = {};
2626
- }
2627
-
2628
- if ( !eventHandle ) {
2629
- elemData.handle = eventHandle = function( e ) {
2630
- // Discard the second event of a jQuery.event.trigger() and
2631
- // when an event is called after a page has unloaded
2632
- return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
2633
- jQuery.event.handle.apply( eventHandle.elem, arguments ) :
2634
- undefined;
2635
- };
2636
- }
2637
-
2638
- // Add elem as a property of the handle function
2639
- // This is to prevent a memory leak with non-native events in IE.
2640
- eventHandle.elem = elem;
2641
-
2642
- // Handle multiple events separated by a space
2643
- // jQuery(...).bind("mouseover mouseout", fn);
2644
- types = types.split(" ");
2645
-
2646
- var type, i = 0, namespaces;
2647
-
2648
- while ( (type = types[ i++ ]) ) {
2649
- handleObj = handleObjIn ?
2650
- jQuery.extend({}, handleObjIn) :
2651
- { handler: handler, data: data };
2652
-
2653
- // Namespaced event handlers
2654
- if ( type.indexOf(".") > -1 ) {
2655
- namespaces = type.split(".");
2656
- type = namespaces.shift();
2657
- handleObj.namespace = namespaces.slice(0).sort().join(".");
2658
-
2659
- } else {
2660
- namespaces = [];
2661
- handleObj.namespace = "";
2662
- }
2663
-
2664
- handleObj.type = type;
2665
- if ( !handleObj.guid ) {
2666
- handleObj.guid = handler.guid;
2667
- }
2668
-
2669
- // Get the current list of functions bound to this event
2670
- var handlers = events[ type ],
2671
- special = jQuery.event.special[ type ] || {};
2672
-
2673
- // Init the event handler queue
2674
- if ( !handlers ) {
2675
- handlers = events[ type ] = [];
2676
-
2677
- // Check for a special event handler
2678
- // Only use addEventListener/attachEvent if the special
2679
- // events handler returns false
2680
- if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
2681
- // Bind the global event handler to the element
2682
- if ( elem.addEventListener ) {
2683
- elem.addEventListener( type, eventHandle, false );
2684
-
2685
- } else if ( elem.attachEvent ) {
2686
- elem.attachEvent( "on" + type, eventHandle );
2687
- }
2688
- }
2689
- }
2690
-
2691
- if ( special.add ) {
2692
- special.add.call( elem, handleObj );
2693
-
2694
- if ( !handleObj.handler.guid ) {
2695
- handleObj.handler.guid = handler.guid;
2696
- }
2697
- }
2698
-
2699
- // Add the function to the element's handler list
2700
- handlers.push( handleObj );
2701
-
2702
- // Keep track of which events have been used, for event optimization
2703
- jQuery.event.global[ type ] = true;
2704
- }
2705
-
2706
- // Nullify elem to prevent memory leaks in IE
2707
- elem = null;
2708
- },
2709
-
2710
- global: {},
2711
-
2712
- // Detach an event or set of events from an element
2713
- remove: function( elem, types, handler, pos ) {
2714
- // don't do events on text and comment nodes
2715
- if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
2716
- return;
2717
- }
2718
-
2719
- if ( handler === false ) {
2720
- handler = returnFalse;
2721
- }
2722
-
2723
- var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType,
2724
- elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
2725
- events = elemData && elemData.events;
2726
-
2727
- if ( !elemData || !events ) {
2728
- return;
2729
- }
2730
-
2731
- // types is actually an event object here
2732
- if ( types && types.type ) {
2733
- handler = types.handler;
2734
- types = types.type;
2735
- }
2736
-
2737
- // Unbind all events for the element
2738
- if ( !types || typeof types === "string" && types.charAt(0) === "." ) {
2739
- types = types || "";
2740
-
2741
- for ( type in events ) {
2742
- jQuery.event.remove( elem, type + types );
2743
- }
2744
-
2745
- return;
2746
- }
2747
-
2748
- // Handle multiple events separated by a space
2749
- // jQuery(...).unbind("mouseover mouseout", fn);
2750
- types = types.split(" ");
2751
-
2752
- while ( (type = types[ i++ ]) ) {
2753
- origType = type;
2754
- handleObj = null;
2755
- all = type.indexOf(".") < 0;
2756
- namespaces = [];
2757
-
2758
- if ( !all ) {
2759
- // Namespaced event handlers
2760
- namespaces = type.split(".");
2761
- type = namespaces.shift();
2762
-
2763
- namespace = new RegExp("(^|\\.)" +
2764
- jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)");
2765
- }
2766
-
2767
- eventType = events[ type ];
2768
-
2769
- if ( !eventType ) {
2770
- continue;
2771
- }
2772
-
2773
- if ( !handler ) {
2774
- for ( j = 0; j < eventType.length; j++ ) {
2775
- handleObj = eventType[ j ];
2776
-
2777
- if ( all || namespace.test( handleObj.namespace ) ) {
2778
- jQuery.event.remove( elem, origType, handleObj.handler, j );
2779
- eventType.splice( j--, 1 );
2780
- }
2781
- }
2782
-
2783
- continue;
2784
- }
2785
-
2786
- special = jQuery.event.special[ type ] || {};
2787
-
2788
- for ( j = pos || 0; j < eventType.length; j++ ) {
2789
- handleObj = eventType[ j ];
2790
-
2791
- if ( handler.guid === handleObj.guid ) {
2792
- // remove the given handler for the given type
2793
- if ( all || namespace.test( handleObj.namespace ) ) {
2794
- if ( pos == null ) {
2795
- eventType.splice( j--, 1 );
2796
- }
2797
-
2798
- if ( special.remove ) {
2799
- special.remove.call( elem, handleObj );
2800
- }
2801
- }
2802
-
2803
- if ( pos != null ) {
2804
- break;
2805
- }
2806
- }
2807
- }
2808
-
2809
- // remove generic event handler if no more handlers exist
2810
- if ( eventType.length === 0 || pos != null && eventType.length === 1 ) {
2811
- if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
2812
- jQuery.removeEvent( elem, type, elemData.handle );
2813
- }
2814
-
2815
- ret = null;
2816
- delete events[ type ];
2817
- }
2818
- }
2819
-
2820
- // Remove the expando if it's no longer used
2821
- if ( jQuery.isEmptyObject( events ) ) {
2822
- var handle = elemData.handle;
2823
- if ( handle ) {
2824
- handle.elem = null;
2825
- }
2826
-
2827
- delete elemData.events;
2828
- delete elemData.handle;
2829
-
2830
- if ( jQuery.isEmptyObject( elemData ) ) {
2831
- jQuery.removeData( elem, undefined, true );
2832
- }
2833
- }
2834
- },
2835
-
2836
- // Events that are safe to short-circuit if no handlers are attached.
2837
- // Native DOM events should not be added, they may have inline handlers.
2838
- customEvent: {
2839
- "getData": true,
2840
- "setData": true,
2841
- "changeData": true
2842
- },
2843
-
2844
- trigger: function( event, data, elem, onlyHandlers ) {
2845
- // Event object or event type
2846
- var type = event.type || event,
2847
- namespaces = [],
2848
- exclusive;
2849
-
2850
- if ( type.indexOf("!") >= 0 ) {
2851
- // Exclusive events trigger only for the exact event (no namespaces)
2852
- type = type.slice(0, -1);
2853
- exclusive = true;
2854
- }
2855
-
2856
- if ( type.indexOf(".") >= 0 ) {
2857
- // Namespaced trigger; create a regexp to match event type in handle()
2858
- namespaces = type.split(".");
2859
- type = namespaces.shift();
2860
- namespaces.sort();
2861
- }
2862
-
2863
- if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
2864
- // No jQuery handlers for this event type, and it can't have inline handlers
2865
- return;
2866
- }
2867
-
2868
- // Caller can pass in an Event, Object, or just an event type string
2869
- event = typeof event === "object" ?
2870
- // jQuery.Event object
2871
- event[ jQuery.expando ] ? event :
2872
- // Object literal
2873
- new jQuery.Event( type, event ) :
2874
- // Just the event type (string)
2875
- new jQuery.Event( type );
2876
-
2877
- event.type = type;
2878
- event.exclusive = exclusive;
2879
- event.namespace = namespaces.join(".");
2880
- event.namespace_re = new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)");
2881
-
2882
- // triggerHandler() and global events don't bubble or run the default action
2883
- if ( onlyHandlers || !elem ) {
2884
- event.preventDefault();
2885
- event.stopPropagation();
2886
- }
2887
-
2888
- // Handle a global trigger
2889
- if ( !elem ) {
2890
- // TODO: Stop taunting the data cache; remove global events and always attach to document
2891
- jQuery.each( jQuery.cache, function() {
2892
- // internalKey variable is just used to make it easier to find
2893
- // and potentially change this stuff later; currently it just
2894
- // points to jQuery.expando
2895
- var internalKey = jQuery.expando,
2896
- internalCache = this[ internalKey ];
2897
- if ( internalCache && internalCache.events && internalCache.events[ type ] ) {
2898
- jQuery.event.trigger( event, data, internalCache.handle.elem );
2899
- }
2900
- });
2901
- return;
2902
- }
2903
-
2904
- // Don't do events on text and comment nodes
2905
- if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
2906
- return;
2907
- }
2908
-
2909
- // Clean up the event in case it is being reused
2910
- event.result = undefined;
2911
- event.target = elem;
2912
-
2913
- // Clone any incoming data and prepend the event, creating the handler arg list
2914
- data = data != null ? jQuery.makeArray( data ) : [];
2915
- data.unshift( event );
2916
-
2917
- var cur = elem,
2918
- // IE doesn't like method names with a colon (#3533, #8272)
2919
- ontype = type.indexOf(":") < 0 ? "on" + type : "";
2920
-
2921
- // Fire event on the current element, then bubble up the DOM tree
2922
- do {
2923
- var handle = jQuery._data( cur, "handle" );
2924
-
2925
- event.currentTarget = cur;
2926
- if ( handle ) {
2927
- handle.apply( cur, data );
2928
- }
2929
-
2930
- // Trigger an inline bound script
2931
- if ( ontype && jQuery.acceptData( cur ) && cur[ ontype ] && cur[ ontype ].apply( cur, data ) === false ) {
2932
- event.result = false;
2933
- event.preventDefault();
2934
- }
2935
-
2936
- // Bubble up to document, then to window
2937
- cur = cur.parentNode || cur.ownerDocument || cur === event.target.ownerDocument && window;
2938
- } while ( cur && !event.isPropagationStopped() );
2939
-
2940
- // If nobody prevented the default action, do it now
2941
- if ( !event.isDefaultPrevented() ) {
2942
- var old,
2943
- special = jQuery.event.special[ type ] || {};
2944
-
2945
- if ( (!special._default || special._default.call( elem.ownerDocument, event ) === false) &&
2946
- !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
2947
-
2948
- // Call a native DOM method on the target with the same name name as the event.
2949
- // Can't use an .isFunction)() check here because IE6/7 fails that test.
2950
- // IE<9 dies on focus to hidden element (#1486), may want to revisit a try/catch.
2951
- try {
2952
- if ( ontype && elem[ type ] ) {
2953
- // Don't re-trigger an onFOO event when we call its FOO() method
2954
- old = elem[ ontype ];
2955
-
2956
- if ( old ) {
2957
- elem[ ontype ] = null;
2958
- }
2959
-
2960
- jQuery.event.triggered = type;
2961
- elem[ type ]();
2962
- }
2963
- } catch ( ieError ) {}
2964
-
2965
- if ( old ) {
2966
- elem[ ontype ] = old;
2967
- }
2968
-
2969
- jQuery.event.triggered = undefined;
2970
- }
2971
- }
2972
-
2973
- return event.result;
2974
- },
2975
-
2976
- handle: function( event ) {
2977
- event = jQuery.event.fix( event || window.event );
2978
- // Snapshot the handlers list since a called handler may add/remove events.
2979
- var handlers = ((jQuery._data( this, "events" ) || {})[ event.type ] || []).slice(0),
2980
- run_all = !event.exclusive && !event.namespace,
2981
- args = Array.prototype.slice.call( arguments, 0 );
2982
-
2983
- // Use the fix-ed Event rather than the (read-only) native event
2984
- args[0] = event;
2985
- event.currentTarget = this;
2986
-
2987
- for ( var j = 0, l = handlers.length; j < l; j++ ) {
2988
- var handleObj = handlers[ j ];
2989
-
2990
- // Triggered event must 1) be non-exclusive and have no namespace, or
2991
- // 2) have namespace(s) a subset or equal to those in the bound event.
2992
- if ( run_all || event.namespace_re.test( handleObj.namespace ) ) {
2993
- // Pass in a reference to the handler function itself
2994
- // So that we can later remove it
2995
- event.handler = handleObj.handler;
2996
- event.data = handleObj.data;
2997
- event.handleObj = handleObj;
2998
-
2999
- var ret = handleObj.handler.apply( this, args );
3000
-
3001
- if ( ret !== undefined ) {
3002
- event.result = ret;
3003
- if ( ret === false ) {
3004
- event.preventDefault();
3005
- event.stopPropagation();
3006
- }
3007
- }
3008
-
3009
- if ( event.isImmediatePropagationStopped() ) {
3010
- break;
3011
- }
3012
- }
3013
- }
3014
- return event.result;
3015
- },
3016
-
3017
- 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(" "),
3018
-
3019
- fix: function( event ) {
3020
- if ( event[ jQuery.expando ] ) {
3021
- return event;
3022
- }
3023
-
3024
- // store a copy of the original event object
3025
- // and "clone" to set read-only properties
3026
- var originalEvent = event;
3027
- event = jQuery.Event( originalEvent );
3028
-
3029
- for ( var i = this.props.length, prop; i; ) {
3030
- prop = this.props[ --i ];
3031
- event[ prop ] = originalEvent[ prop ];
3032
- }
3033
-
3034
- // Fix target property, if necessary
3035
- if ( !event.target ) {
3036
- // Fixes #1925 where srcElement might not be defined either
3037
- event.target = event.srcElement || document;
3038
- }
3039
-
3040
- // check if target is a textnode (safari)
3041
- if ( event.target.nodeType === 3 ) {
3042
- event.target = event.target.parentNode;
3043
- }
3044
-
3045
- // Add relatedTarget, if necessary
3046
- if ( !event.relatedTarget && event.fromElement ) {
3047
- event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;
3048
- }
3049
-
3050
- // Calculate pageX/Y if missing and clientX/Y available
3051
- if ( event.pageX == null && event.clientX != null ) {
3052
- var eventDocument = event.target.ownerDocument || document,
3053
- doc = eventDocument.documentElement,
3054
- body = eventDocument.body;
3055
-
3056
- event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
3057
- event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
3058
- }
3059
-
3060
- // Add which for key events
3061
- if ( event.which == null && (event.charCode != null || event.keyCode != null) ) {
3062
- event.which = event.charCode != null ? event.charCode : event.keyCode;
3063
- }
3064
-
3065
- // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
3066
- if ( !event.metaKey && event.ctrlKey ) {
3067
- event.metaKey = event.ctrlKey;
3068
- }
3069
-
3070
- // Add which for click: 1 === left; 2 === middle; 3 === right
3071
- // Note: button is not normalized, so don't use it
3072
- if ( !event.which && event.button !== undefined ) {
3073
- event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
3074
- }
3075
-
3076
- return event;
3077
- },
3078
-
3079
- // Deprecated, use jQuery.guid instead
3080
- guid: 1E8,
3081
-
3082
- // Deprecated, use jQuery.proxy instead
3083
- proxy: jQuery.proxy,
3084
-
3085
- special: {
3086
- ready: {
3087
- // Make sure the ready event is setup
3088
- setup: jQuery.bindReady,
3089
- teardown: jQuery.noop
3090
- },
3091
-
3092
- live: {
3093
- add: function( handleObj ) {
3094
- jQuery.event.add( this,
3095
- liveConvert( handleObj.origType, handleObj.selector ),
3096
- jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) );
3097
- },
3098
-
3099
- remove: function( handleObj ) {
3100
- jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj );
3101
- }
3102
- },
3103
-
3104
- beforeunload: {
3105
- setup: function( data, namespaces, eventHandle ) {
3106
- // We only want to do this special case on windows
3107
- if ( jQuery.isWindow( this ) ) {
3108
- this.onbeforeunload = eventHandle;
3109
- }
3110
- },
3111
-
3112
- teardown: function( namespaces, eventHandle ) {
3113
- if ( this.onbeforeunload === eventHandle ) {
3114
- this.onbeforeunload = null;
3115
- }
3116
- }
3117
- }
3118
- }
3119
- };
3120
-
3121
- jQuery.removeEvent = document.removeEventListener ?
3122
- function( elem, type, handle ) {
3123
- if ( elem.removeEventListener ) {
3124
- elem.removeEventListener( type, handle, false );
3125
- }
3126
- } :
3127
- function( elem, type, handle ) {
3128
- if ( elem.detachEvent ) {
3129
- elem.detachEvent( "on" + type, handle );
3130
- }
3131
- };
3132
-
3133
- jQuery.Event = function( src, props ) {
3134
- // Allow instantiation without the 'new' keyword
3135
- if ( !this.preventDefault ) {
3136
- return new jQuery.Event( src, props );
3137
- }
3138
-
3139
- // Event object
3140
- if ( src && src.type ) {
3141
- this.originalEvent = src;
3142
- this.type = src.type;
3143
-
3144
- // Events bubbling up the document may have been marked as prevented
3145
- // by a handler lower down the tree; reflect the correct value.
3146
- this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false ||
3147
- src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse;
3148
-
3149
- // Event type
3150
- } else {
3151
- this.type = src;
3152
- }
3153
-
3154
- // Put explicitly provided properties onto the event object
3155
- if ( props ) {
3156
- jQuery.extend( this, props );
3157
- }
3158
-
3159
- // timeStamp is buggy for some events on Firefox(#3843)
3160
- // So we won't rely on the native value
3161
- this.timeStamp = jQuery.now();
3162
-
3163
- // Mark it as fixed
3164
- this[ jQuery.expando ] = true;
3165
- };
3166
-
3167
- function returnFalse() {
3168
- return false;
3169
- }
3170
- function returnTrue() {
3171
- return true;
3172
- }
3173
-
3174
- // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
3175
- // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
3176
- jQuery.Event.prototype = {
3177
- preventDefault: function() {
3178
- this.isDefaultPrevented = returnTrue;
3179
-
3180
- var e = this.originalEvent;
3181
- if ( !e ) {
3182
- return;
3183
- }
3184
-
3185
- // if preventDefault exists run it on the original event
3186
- if ( e.preventDefault ) {
3187
- e.preventDefault();
3188
-
3189
- // otherwise set the returnValue property of the original event to false (IE)
3190
- } else {
3191
- e.returnValue = false;
3192
- }
3193
- },
3194
- stopPropagation: function() {
3195
- this.isPropagationStopped = returnTrue;
3196
-
3197
- var e = this.originalEvent;
3198
- if ( !e ) {
3199
- return;
3200
- }
3201
- // if stopPropagation exists run it on the original event
3202
- if ( e.stopPropagation ) {
3203
- e.stopPropagation();
3204
- }
3205
- // otherwise set the cancelBubble property of the original event to true (IE)
3206
- e.cancelBubble = true;
3207
- },
3208
- stopImmediatePropagation: function() {
3209
- this.isImmediatePropagationStopped = returnTrue;
3210
- this.stopPropagation();
3211
- },
3212
- isDefaultPrevented: returnFalse,
3213
- isPropagationStopped: returnFalse,
3214
- isImmediatePropagationStopped: returnFalse
3215
- };
3216
-
3217
- // Checks if an event happened on an element within another element
3218
- // Used in jQuery.event.special.mouseenter and mouseleave handlers
3219
- var withinElement = function( event ) {
3220
-
3221
- // Check if mouse(over|out) are still within the same parent element
3222
- var related = event.relatedTarget,
3223
- inside = false,
3224
- eventType = event.type;
3225
-
3226
- event.type = event.data;
3227
-
3228
- if ( related !== this ) {
3229
-
3230
- if ( related ) {
3231
- inside = jQuery.contains( this, related );
3232
- }
3233
-
3234
- if ( !inside ) {
3235
-
3236
- jQuery.event.handle.apply( this, arguments );
3237
-
3238
- event.type = eventType;
3239
- }
3240
- }
3241
- },
3242
-
3243
- // In case of event delegation, we only need to rename the event.type,
3244
- // liveHandler will take care of the rest.
3245
- delegate = function( event ) {
3246
- event.type = event.data;
3247
- jQuery.event.handle.apply( this, arguments );
3248
- };
3249
-
3250
- // Create mouseenter and mouseleave events
3251
- jQuery.each({
3252
- mouseenter: "mouseover",
3253
- mouseleave: "mouseout"
3254
- }, function( orig, fix ) {
3255
- jQuery.event.special[ orig ] = {
3256
- setup: function( data ) {
3257
- jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig );
3258
- },
3259
- teardown: function( data ) {
3260
- jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement );
3261
- }
3262
- };
3263
- });
3264
-
3265
- // submit delegation
3266
- if ( !jQuery.support.submitBubbles ) {
3267
-
3268
- jQuery.event.special.submit = {
3269
- setup: function( data, namespaces ) {
3270
- if ( !jQuery.nodeName( this, "form" ) ) {
3271
- jQuery.event.add(this, "click.specialSubmit", function( e ) {
3272
- var elem = e.target,
3273
- type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
3274
-
3275
- if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
3276
- trigger( "submit", this, arguments );
3277
- }
3278
- });
3279
-
3280
- jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
3281
- var elem = e.target,
3282
- type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
3283
-
3284
- if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
3285
- trigger( "submit", this, arguments );
3286
- }
3287
- });
3288
-
3289
- } else {
3290
- return false;
3291
- }
3292
- },
3293
-
3294
- teardown: function( namespaces ) {
3295
- jQuery.event.remove( this, ".specialSubmit" );
3296
- }
3297
- };
3298
-
3299
- }
3300
-
3301
- // change delegation, happens here so we have bind.
3302
- if ( !jQuery.support.changeBubbles ) {
3303
-
3304
- var changeFilters,
3305
-
3306
- getVal = function( elem ) {
3307
- var type = jQuery.nodeName( elem, "input" ) ? elem.type : "",
3308
- val = elem.value;
3309
-
3310
- if ( type === "radio" || type === "checkbox" ) {
3311
- val = elem.checked;
3312
-
3313
- } else if ( type === "select-multiple" ) {
3314
- val = elem.selectedIndex > -1 ?
3315
- jQuery.map( elem.options, function( elem ) {
3316
- return elem.selected;
3317
- }).join("-") :
3318
- "";
3319
-
3320
- } else if ( jQuery.nodeName( elem, "select" ) ) {
3321
- val = elem.selectedIndex;
3322
- }
3323
-
3324
- return val;
3325
- },
3326
-
3327
- testChange = function testChange( e ) {
3328
- var elem = e.target, data, val;
3329
-
3330
- if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) {
3331
- return;
3332
- }
3333
-
3334
- data = jQuery._data( elem, "_change_data" );
3335
- val = getVal(elem);
3336
-
3337
- // the current data will be also retrieved by beforeactivate
3338
- if ( e.type !== "focusout" || elem.type !== "radio" ) {
3339
- jQuery._data( elem, "_change_data", val );
3340
- }
3341
-
3342
- if ( data === undefined || val === data ) {
3343
- return;
3344
- }
3345
-
3346
- if ( data != null || val ) {
3347
- e.type = "change";
3348
- e.liveFired = undefined;
3349
- jQuery.event.trigger( e, arguments[1], elem );
3350
- }
3351
- };
3352
-
3353
- jQuery.event.special.change = {
3354
- filters: {
3355
- focusout: testChange,
3356
-
3357
- beforedeactivate: testChange,
3358
-
3359
- click: function( e ) {
3360
- var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
3361
-
3362
- if ( type === "radio" || type === "checkbox" || jQuery.nodeName( elem, "select" ) ) {
3363
- testChange.call( this, e );
3364
- }
3365
- },
3366
-
3367
- // Change has to be called before submit
3368
- // Keydown will be called before keypress, which is used in submit-event delegation
3369
- keydown: function( e ) {
3370
- var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
3371
-
3372
- if ( (e.keyCode === 13 && !jQuery.nodeName( elem, "textarea" ) ) ||
3373
- (e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
3374
- type === "select-multiple" ) {
3375
- testChange.call( this, e );
3376
- }
3377
- },
3378
-
3379
- // Beforeactivate happens also before the previous element is blurred
3380
- // with this event you can't trigger a change event, but you can store
3381
- // information
3382
- beforeactivate: function( e ) {
3383
- var elem = e.target;
3384
- jQuery._data( elem, "_change_data", getVal(elem) );
3385
- }
3386
- },
3387
-
3388
- setup: function( data, namespaces ) {
3389
- if ( this.type === "file" ) {
3390
- return false;
3391
- }
3392
-
3393
- for ( var type in changeFilters ) {
3394
- jQuery.event.add( this, type + ".specialChange", changeFilters[type] );
3395
- }
3396
-
3397
- return rformElems.test( this.nodeName );
3398
- },
3399
-
3400
- teardown: function( namespaces ) {
3401
- jQuery.event.remove( this, ".specialChange" );
3402
-
3403
- return rformElems.test( this.nodeName );
3404
- }
3405
- };
3406
-
3407
- changeFilters = jQuery.event.special.change.filters;
3408
-
3409
- // Handle when the input is .focus()'d
3410
- changeFilters.focus = changeFilters.beforeactivate;
3411
- }
3412
-
3413
- function trigger( type, elem, args ) {
3414
- // Piggyback on a donor event to simulate a different one.
3415
- // Fake originalEvent to avoid donor's stopPropagation, but if the
3416
- // simulated event prevents default then we do the same on the donor.
3417
- // Don't pass args or remember liveFired; they apply to the donor event.
3418
- var event = jQuery.extend( {}, args[ 0 ] );
3419
- event.type = type;
3420
- event.originalEvent = {};
3421
- event.liveFired = undefined;
3422
- jQuery.event.handle.call( elem, event );
3423
- if ( event.isDefaultPrevented() ) {
3424
- args[ 0 ].preventDefault();
3425
- }
3426
- }
3427
-
3428
- // Create "bubbling" focus and blur events
3429
- if ( !jQuery.support.focusinBubbles ) {
3430
- jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
3431
-
3432
- // Attach a single capturing handler while someone wants focusin/focusout
3433
- var attaches = 0;
3434
-
3435
- jQuery.event.special[ fix ] = {
3436
- setup: function() {
3437
- if ( attaches++ === 0 ) {
3438
- document.addEventListener( orig, handler, true );
3439
- }
3440
- },
3441
- teardown: function() {
3442
- if ( --attaches === 0 ) {
3443
- document.removeEventListener( orig, handler, true );
3444
- }
3445
- }
3446
- };
3447
-
3448
- function handler( donor ) {
3449
- // Donor event is always a native one; fix it and switch its type.
3450
- // Let focusin/out handler cancel the donor focus/blur event.
3451
- var e = jQuery.event.fix( donor );
3452
- e.type = fix;
3453
- e.originalEvent = {};
3454
- jQuery.event.trigger( e, null, e.target );
3455
- if ( e.isDefaultPrevented() ) {
3456
- donor.preventDefault();
3457
- }
3458
- }
3459
- });
3460
- }
3461
-
3462
- jQuery.each(["bind", "one"], function( i, name ) {
3463
- jQuery.fn[ name ] = function( type, data, fn ) {
3464
- var handler;
3465
-
3466
- // Handle object literals
3467
- if ( typeof type === "object" ) {
3468
- for ( var key in type ) {
3469
- this[ name ](key, data, type[key], fn);
3470
- }
3471
- return this;
3472
- }
3473
-
3474
- if ( arguments.length === 2 || data === false ) {
3475
- fn = data;
3476
- data = undefined;
3477
- }
3478
-
3479
- if ( name === "one" ) {
3480
- handler = function( event ) {
3481
- jQuery( this ).unbind( event, handler );
3482
- return fn.apply( this, arguments );
3483
- };
3484
- handler.guid = fn.guid || jQuery.guid++;
3485
- } else {
3486
- handler = fn;
3487
- }
3488
-
3489
- if ( type === "unload" && name !== "one" ) {
3490
- this.one( type, data, fn );
3491
-
3492
- } else {
3493
- for ( var i = 0, l = this.length; i < l; i++ ) {
3494
- jQuery.event.add( this[i], type, handler, data );
3495
- }
3496
- }
3497
-
3498
- return this;
3499
- };
3500
- });
3501
-
3502
- jQuery.fn.extend({
3503
- unbind: function( type, fn ) {
3504
- // Handle object literals
3505
- if ( typeof type === "object" && !type.preventDefault ) {
3506
- for ( var key in type ) {
3507
- this.unbind(key, type[key]);
3508
- }
3509
-
3510
- } else {
3511
- for ( var i = 0, l = this.length; i < l; i++ ) {
3512
- jQuery.event.remove( this[i], type, fn );
3513
- }
3514
- }
3515
-
3516
- return this;
3517
- },
3518
-
3519
- delegate: function( selector, types, data, fn ) {
3520
- return this.live( types, data, fn, selector );
3521
- },
3522
-
3523
- undelegate: function( selector, types, fn ) {
3524
- if ( arguments.length === 0 ) {
3525
- return this.unbind( "live" );
3526
-
3527
- } else {
3528
- return this.die( types, null, fn, selector );
3529
- }
3530
- },
3531
-
3532
- trigger: function( type, data ) {
3533
- return this.each(function() {
3534
- jQuery.event.trigger( type, data, this );
3535
- });
3536
- },
3537
-
3538
- triggerHandler: function( type, data ) {
3539
- if ( this[0] ) {
3540
- return jQuery.event.trigger( type, data, this[0], true );
3541
- }
3542
- },
3543
-
3544
- toggle: function( fn ) {
3545
- // Save reference to arguments for access in closure
3546
- var args = arguments,
3547
- guid = fn.guid || jQuery.guid++,
3548
- i = 0,
3549
- toggler = function( event ) {
3550
- // Figure out which function to execute
3551
- var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i;
3552
- jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 );
3553
-
3554
- // Make sure that clicks stop
3555
- event.preventDefault();
3556
-
3557
- // and execute the function
3558
- return args[ lastToggle ].apply( this, arguments ) || false;
3559
- };
3560
-
3561
- // link all the functions, so any of them can unbind this click handler
3562
- toggler.guid = guid;
3563
- while ( i < args.length ) {
3564
- args[ i++ ].guid = guid;
3565
- }
3566
-
3567
- return this.click( toggler );
3568
- },
3569
-
3570
- hover: function( fnOver, fnOut ) {
3571
- return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
3572
- }
3573
- });
3574
-
3575
- var liveMap = {
3576
- focus: "focusin",
3577
- blur: "focusout",
3578
- mouseenter: "mouseover",
3579
- mouseleave: "mouseout"
3580
- };
3581
-
3582
- jQuery.each(["live", "die"], function( i, name ) {
3583
- jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) {
3584
- var type, i = 0, match, namespaces, preType,
3585
- selector = origSelector || this.selector,
3586
- context = origSelector ? this : jQuery( this.context );
3587
-
3588
- if ( typeof types === "object" && !types.preventDefault ) {
3589
- for ( var key in types ) {
3590
- context[ name ]( key, data, types[key], selector );
3591
- }
3592
-
3593
- return this;
3594
- }
3595
-
3596
- if ( name === "die" && !types &&
3597
- origSelector && origSelector.charAt(0) === "." ) {
3598
-
3599
- context.unbind( origSelector );
3600
-
3601
- return this;
3602
- }
3603
-
3604
- if ( data === false || jQuery.isFunction( data ) ) {
3605
- fn = data || returnFalse;
3606
- data = undefined;
3607
- }
3608
-
3609
- types = (types || "").split(" ");
3610
-
3611
- while ( (type = types[ i++ ]) != null ) {
3612
- match = rnamespaces.exec( type );
3613
- namespaces = "";
3614
-
3615
- if ( match ) {
3616
- namespaces = match[0];
3617
- type = type.replace( rnamespaces, "" );
3618
- }
3619
-
3620
- if ( type === "hover" ) {
3621
- types.push( "mouseenter" + namespaces, "mouseleave" + namespaces );
3622
- continue;
3623
- }
3624
-
3625
- preType = type;
3626
-
3627
- if ( liveMap[ type ] ) {
3628
- types.push( liveMap[ type ] + namespaces );
3629
- type = type + namespaces;
3630
-
3631
- } else {
3632
- type = (liveMap[ type ] || type) + namespaces;
3633
- }
3634
-
3635
- if ( name === "live" ) {
3636
- // bind live handler
3637
- for ( var j = 0, l = context.length; j < l; j++ ) {
3638
- jQuery.event.add( context[j], "live." + liveConvert( type, selector ),
3639
- { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } );
3640
- }
3641
-
3642
- } else {
3643
- // unbind live handler
3644
- context.unbind( "live." + liveConvert( type, selector ), fn );
3645
- }
3646
- }
3647
-
3648
- return this;
3649
- };
3650
- });
3651
-
3652
- function liveHandler( event ) {
3653
- var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret,
3654
- elems = [],
3655
- selectors = [],
3656
- events = jQuery._data( this, "events" );
3657
-
3658
- // Make sure we avoid non-left-click bubbling in Firefox (#3861) and disabled elements in IE (#6911)
3659
- if ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === "click" ) {
3660
- return;
3661
- }
3662
-
3663
- if ( event.namespace ) {
3664
- namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)");
3665
- }
3666
-
3667
- event.liveFired = this;
3668
-
3669
- var live = events.live.slice(0);
3670
-
3671
- for ( j = 0; j < live.length; j++ ) {
3672
- handleObj = live[j];
3673
-
3674
- if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) {
3675
- selectors.push( handleObj.selector );
3676
-
3677
- } else {
3678
- live.splice( j--, 1 );
3679
- }
3680
- }
3681
-
3682
- match = jQuery( event.target ).closest( selectors, event.currentTarget );
3683
-
3684
- for ( i = 0, l = match.length; i < l; i++ ) {
3685
- close = match[i];
3686
-
3687
- for ( j = 0; j < live.length; j++ ) {
3688
- handleObj = live[j];
3689
-
3690
- if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) && !close.elem.disabled ) {
3691
- elem = close.elem;
3692
- related = null;
3693
-
3694
- // Those two events require additional checking
3695
- if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) {
3696
- event.type = handleObj.preType;
3697
- related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0];
3698
-
3699
- // Make sure not to accidentally match a child element with the same selector
3700
- if ( related && jQuery.contains( elem, related ) ) {
3701
- related = elem;
3702
- }
3703
- }
3704
-
3705
- if ( !related || related !== elem ) {
3706
- elems.push({ elem: elem, handleObj: handleObj, level: close.level });
3707
- }
3708
- }
3709
- }
3710
- }
3711
-
3712
- for ( i = 0, l = elems.length; i < l; i++ ) {
3713
- match = elems[i];
3714
-
3715
- if ( maxLevel && match.level > maxLevel ) {
3716
- break;
3717
- }
3718
-
3719
- event.currentTarget = match.elem;
3720
- event.data = match.handleObj.data;
3721
- event.handleObj = match.handleObj;
3722
-
3723
- ret = match.handleObj.origHandler.apply( match.elem, arguments );
3724
-
3725
- if ( ret === false || event.isPropagationStopped() ) {
3726
- maxLevel = match.level;
3727
-
3728
- if ( ret === false ) {
3729
- stop = false;
3730
- }
3731
- if ( event.isImmediatePropagationStopped() ) {
3732
- break;
3733
- }
3734
- }
3735
- }
3736
-
3737
- return stop;
3738
- }
3739
-
3740
- function liveConvert( type, selector ) {
3741
- return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspaces, "&");
3742
- }
3743
-
3744
- jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
3745
- "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
3746
- "change select submit keydown keypress keyup error").split(" "), function( i, name ) {
3747
-
3748
- // Handle event binding
3749
- jQuery.fn[ name ] = function( data, fn ) {
3750
- if ( fn == null ) {
3751
- fn = data;
3752
- data = null;
3753
- }
3754
-
3755
- return arguments.length > 0 ?
3756
- this.bind( name, data, fn ) :
3757
- this.trigger( name );
3758
- };
3759
-
3760
- if ( jQuery.attrFn ) {
3761
- jQuery.attrFn[ name ] = true;
3762
- }
3763
- });
3764
-
3765
-
3766
-
3767
- /*!
3768
- * Sizzle CSS Selector Engine
3769
- * Copyright 2011, The Dojo Foundation
3770
- * Released under the MIT, BSD, and GPL Licenses.
3771
- * More information: http://sizzlejs.com/
3772
- */
3773
- (function(){
3774
-
3775
- var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
3776
- done = 0,
3777
- toString = Object.prototype.toString,
3778
- hasDuplicate = false,
3779
- baseHasDuplicate = true,
3780
- rBackslash = /\\/g,
3781
- rNonWord = /\W/;
3782
-
3783
- // Here we check if the JavaScript engine is using some sort of
3784
- // optimization where it does not always call our comparision
3785
- // function. If that is the case, discard the hasDuplicate value.
3786
- // Thus far that includes Google Chrome.
3787
- [0, 0].sort(function() {
3788
- baseHasDuplicate = false;
3789
- return 0;
3790
- });
3791
-
3792
- var Sizzle = function( selector, context, results, seed ) {
3793
- results = results || [];
3794
- context = context || document;
3795
-
3796
- var origContext = context;
3797
-
3798
- if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
3799
- return [];
3800
- }
3801
-
3802
- if ( !selector || typeof selector !== "string" ) {
3803
- return results;
3804
- }
3805
-
3806
- var m, set, checkSet, extra, ret, cur, pop, i,
3807
- prune = true,
3808
- contextXML = Sizzle.isXML( context ),
3809
- parts = [],
3810
- soFar = selector;
3811
-
3812
- // Reset the position of the chunker regexp (start from head)
3813
- do {
3814
- chunker.exec( "" );
3815
- m = chunker.exec( soFar );
3816
-
3817
- if ( m ) {
3818
- soFar = m[3];
3819
-
3820
- parts.push( m[1] );
3821
-
3822
- if ( m[2] ) {
3823
- extra = m[3];
3824
- break;
3825
- }
3826
- }
3827
- } while ( m );
3828
-
3829
- if ( parts.length > 1 && origPOS.exec( selector ) ) {
3830
-
3831
- if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
3832
- set = posProcess( parts[0] + parts[1], context );
3833
-
3834
- } else {
3835
- set = Expr.relative[ parts[0] ] ?
3836
- [ context ] :
3837
- Sizzle( parts.shift(), context );
3838
-
3839
- while ( parts.length ) {
3840
- selector = parts.shift();
3841
-
3842
- if ( Expr.relative[ selector ] ) {
3843
- selector += parts.shift();
3844
- }
3845
-
3846
- set = posProcess( selector, set );
3847
- }
3848
- }
3849
-
3850
- } else {
3851
- // Take a shortcut and set the context if the root selector is an ID
3852
- // (but not if it'll be faster if the inner selector is an ID)
3853
- if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
3854
- Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
3855
-
3856
- ret = Sizzle.find( parts.shift(), context, contextXML );
3857
- context = ret.expr ?
3858
- Sizzle.filter( ret.expr, ret.set )[0] :
3859
- ret.set[0];
3860
- }
3861
-
3862
- if ( context ) {
3863
- ret = seed ?
3864
- { expr: parts.pop(), set: makeArray(seed) } :
3865
- Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
3866
-
3867
- set = ret.expr ?
3868
- Sizzle.filter( ret.expr, ret.set ) :
3869
- ret.set;
3870
-
3871
- if ( parts.length > 0 ) {
3872
- checkSet = makeArray( set );
3873
-
3874
- } else {
3875
- prune = false;
3876
- }
3877
-
3878
- while ( parts.length ) {
3879
- cur = parts.pop();
3880
- pop = cur;
3881
-
3882
- if ( !Expr.relative[ cur ] ) {
3883
- cur = "";
3884
- } else {
3885
- pop = parts.pop();
3886
- }
3887
-
3888
- if ( pop == null ) {
3889
- pop = context;
3890
- }
3891
-
3892
- Expr.relative[ cur ]( checkSet, pop, contextXML );
3893
- }
3894
-
3895
- } else {
3896
- checkSet = parts = [];
3897
- }
3898
- }
3899
-
3900
- if ( !checkSet ) {
3901
- checkSet = set;
3902
- }
3903
-
3904
- if ( !checkSet ) {
3905
- Sizzle.error( cur || selector );
3906
- }
3907
-
3908
- if ( toString.call(checkSet) === "[object Array]" ) {
3909
- if ( !prune ) {
3910
- results.push.apply( results, checkSet );
3911
-
3912
- } else if ( context && context.nodeType === 1 ) {
3913
- for ( i = 0; checkSet[i] != null; i++ ) {
3914
- if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
3915
- results.push( set[i] );
3916
- }
3917
- }
3918
-
3919
- } else {
3920
- for ( i = 0; checkSet[i] != null; i++ ) {
3921
- if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
3922
- results.push( set[i] );
3923
- }
3924
- }
3925
- }
3926
-
3927
- } else {
3928
- makeArray( checkSet, results );
3929
- }
3930
-
3931
- if ( extra ) {
3932
- Sizzle( extra, origContext, results, seed );
3933
- Sizzle.uniqueSort( results );
3934
- }
3935
-
3936
- return results;
3937
- };
3938
-
3939
- Sizzle.uniqueSort = function( results ) {
3940
- if ( sortOrder ) {
3941
- hasDuplicate = baseHasDuplicate;
3942
- results.sort( sortOrder );
3943
-
3944
- if ( hasDuplicate ) {
3945
- for ( var i = 1; i < results.length; i++ ) {
3946
- if ( results[i] === results[ i - 1 ] ) {
3947
- results.splice( i--, 1 );
3948
- }
3949
- }
3950
- }
3951
- }
3952
-
3953
- return results;
3954
- };
3955
-
3956
- Sizzle.matches = function( expr, set ) {
3957
- return Sizzle( expr, null, null, set );
3958
- };
3959
-
3960
- Sizzle.matchesSelector = function( node, expr ) {
3961
- return Sizzle( expr, null, null, [node] ).length > 0;
3962
- };
3963
-
3964
- Sizzle.find = function( expr, context, isXML ) {
3965
- var set;
3966
-
3967
- if ( !expr ) {
3968
- return [];
3969
- }
3970
-
3971
- for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
3972
- var match,
3973
- type = Expr.order[i];
3974
-
3975
- if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
3976
- var left = match[1];
3977
- match.splice( 1, 1 );
3978
-
3979
- if ( left.substr( left.length - 1 ) !== "\\" ) {
3980
- match[1] = (match[1] || "").replace( rBackslash, "" );
3981
- set = Expr.find[ type ]( match, context, isXML );
3982
-
3983
- if ( set != null ) {
3984
- expr = expr.replace( Expr.match[ type ], "" );
3985
- break;
3986
- }
3987
- }
3988
- }
3989
- }
3990
-
3991
- if ( !set ) {
3992
- set = typeof context.getElementsByTagName !== "undefined" ?
3993
- context.getElementsByTagName( "*" ) :
3994
- [];
3995
- }
3996
-
3997
- return { set: set, expr: expr };
3998
- };
3999
-
4000
- Sizzle.filter = function( expr, set, inplace, not ) {
4001
- var match, anyFound,
4002
- old = expr,
4003
- result = [],
4004
- curLoop = set,
4005
- isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
4006
-
4007
- while ( expr && set.length ) {
4008
- for ( var type in Expr.filter ) {
4009
- if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
4010
- var found, item,
4011
- filter = Expr.filter[ type ],
4012
- left = match[1];
4013
-
4014
- anyFound = false;
4015
-
4016
- match.splice(1,1);
4017
-
4018
- if ( left.substr( left.length - 1 ) === "\\" ) {
4019
- continue;
4020
- }
4021
-
4022
- if ( curLoop === result ) {
4023
- result = [];
4024
- }
4025
-
4026
- if ( Expr.preFilter[ type ] ) {
4027
- match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
4028
-
4029
- if ( !match ) {
4030
- anyFound = found = true;
4031
-
4032
- } else if ( match === true ) {
4033
- continue;
4034
- }
4035
- }
4036
-
4037
- if ( match ) {
4038
- for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
4039
- if ( item ) {
4040
- found = filter( item, match, i, curLoop );
4041
- var pass = not ^ !!found;
4042
-
4043
- if ( inplace && found != null ) {
4044
- if ( pass ) {
4045
- anyFound = true;
4046
-
4047
- } else {
4048
- curLoop[i] = false;
4049
- }
4050
-
4051
- } else if ( pass ) {
4052
- result.push( item );
4053
- anyFound = true;
4054
- }
4055
- }
4056
- }
4057
- }
4058
-
4059
- if ( found !== undefined ) {
4060
- if ( !inplace ) {
4061
- curLoop = result;
4062
- }
4063
-
4064
- expr = expr.replace( Expr.match[ type ], "" );
4065
-
4066
- if ( !anyFound ) {
4067
- return [];
4068
- }
4069
-
4070
- break;
4071
- }
4072
- }
4073
- }
4074
-
4075
- // Improper expression
4076
- if ( expr === old ) {
4077
- if ( anyFound == null ) {
4078
- Sizzle.error( expr );
4079
-
4080
- } else {
4081
- break;
4082
- }
4083
- }
4084
-
4085
- old = expr;
4086
- }
4087
-
4088
- return curLoop;
4089
- };
4090
-
4091
- Sizzle.error = function( msg ) {
4092
- throw "Syntax error, unrecognized expression: " + msg;
4093
- };
4094
-
4095
- var Expr = Sizzle.selectors = {
4096
- order: [ "ID", "NAME", "TAG" ],
4097
-
4098
- match: {
4099
- ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
4100
- CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
4101
- NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
4102
- ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
4103
- TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
4104
- CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
4105
- POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
4106
- PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
4107
- },
4108
-
4109
- leftMatch: {},
4110
-
4111
- attrMap: {
4112
- "class": "className",
4113
- "for": "htmlFor"
4114
- },
4115
-
4116
- attrHandle: {
4117
- href: function( elem ) {
4118
- return elem.getAttribute( "href" );
4119
- },
4120
- type: function( elem ) {
4121
- return elem.getAttribute( "type" );
4122
- }
4123
- },
4124
-
4125
- relative: {
4126
- "+": function(checkSet, part){
4127
- var isPartStr = typeof part === "string",
4128
- isTag = isPartStr && !rNonWord.test( part ),
4129
- isPartStrNotTag = isPartStr && !isTag;
4130
-
4131
- if ( isTag ) {
4132
- part = part.toLowerCase();
4133
- }
4134
-
4135
- for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
4136
- if ( (elem = checkSet[i]) ) {
4137
- while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
4138
-
4139
- checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
4140
- elem || false :
4141
- elem === part;
4142
- }
4143
- }
4144
-
4145
- if ( isPartStrNotTag ) {
4146
- Sizzle.filter( part, checkSet, true );
4147
- }
4148
- },
4149
-
4150
- ">": function( checkSet, part ) {
4151
- var elem,
4152
- isPartStr = typeof part === "string",
4153
- i = 0,
4154
- l = checkSet.length;
4155
-
4156
- if ( isPartStr && !rNonWord.test( part ) ) {
4157
- part = part.toLowerCase();
4158
-
4159
- for ( ; i < l; i++ ) {
4160
- elem = checkSet[i];
4161
-
4162
- if ( elem ) {
4163
- var parent = elem.parentNode;
4164
- checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
4165
- }
4166
- }
4167
-
4168
- } else {
4169
- for ( ; i < l; i++ ) {
4170
- elem = checkSet[i];
4171
-
4172
- if ( elem ) {
4173
- checkSet[i] = isPartStr ?
4174
- elem.parentNode :
4175
- elem.parentNode === part;
4176
- }
4177
- }
4178
-
4179
- if ( isPartStr ) {
4180
- Sizzle.filter( part, checkSet, true );
4181
- }
4182
- }
4183
- },
4184
-
4185
- "": function(checkSet, part, isXML){
4186
- var nodeCheck,
4187
- doneName = done++,
4188
- checkFn = dirCheck;
4189
-
4190
- if ( typeof part === "string" && !rNonWord.test( part ) ) {
4191
- part = part.toLowerCase();
4192
- nodeCheck = part;
4193
- checkFn = dirNodeCheck;
4194
- }
4195
-
4196
- checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
4197
- },
4198
-
4199
- "~": function( checkSet, part, isXML ) {
4200
- var nodeCheck,
4201
- doneName = done++,
4202
- checkFn = dirCheck;
4203
-
4204
- if ( typeof part === "string" && !rNonWord.test( part ) ) {
4205
- part = part.toLowerCase();
4206
- nodeCheck = part;
4207
- checkFn = dirNodeCheck;
4208
- }
4209
-
4210
- checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
4211
- }
4212
- },
4213
-
4214
- find: {
4215
- ID: function( match, context, isXML ) {
4216
- if ( typeof context.getElementById !== "undefined" && !isXML ) {
4217
- var m = context.getElementById(match[1]);
4218
- // Check parentNode to catch when Blackberry 4.6 returns
4219
- // nodes that are no longer in the document #6963
4220
- return m && m.parentNode ? [m] : [];
4221
- }
4222
- },
4223
-
4224
- NAME: function( match, context ) {
4225
- if ( typeof context.getElementsByName !== "undefined" ) {
4226
- var ret = [],
4227
- results = context.getElementsByName( match[1] );
4228
-
4229
- for ( var i = 0, l = results.length; i < l; i++ ) {
4230
- if ( results[i].getAttribute("name") === match[1] ) {
4231
- ret.push( results[i] );
4232
- }
4233
- }
4234
-
4235
- return ret.length === 0 ? null : ret;
4236
- }
4237
- },
4238
-
4239
- TAG: function( match, context ) {
4240
- if ( typeof context.getElementsByTagName !== "undefined" ) {
4241
- return context.getElementsByTagName( match[1] );
4242
- }
4243
- }
4244
- },
4245
- preFilter: {
4246
- CLASS: function( match, curLoop, inplace, result, not, isXML ) {
4247
- match = " " + match[1].replace( rBackslash, "" ) + " ";
4248
-
4249
- if ( isXML ) {
4250
- return match;
4251
- }
4252
-
4253
- for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
4254
- if ( elem ) {
4255
- if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) {
4256
- if ( !inplace ) {
4257
- result.push( elem );
4258
- }
4259
-
4260
- } else if ( inplace ) {
4261
- curLoop[i] = false;
4262
- }
4263
- }
4264
- }
4265
-
4266
- return false;
4267
- },
4268
-
4269
- ID: function( match ) {
4270
- return match[1].replace( rBackslash, "" );
4271
- },
4272
-
4273
- TAG: function( match, curLoop ) {
4274
- return match[1].replace( rBackslash, "" ).toLowerCase();
4275
- },
4276
-
4277
- CHILD: function( match ) {
4278
- if ( match[1] === "nth" ) {
4279
- if ( !match[2] ) {
4280
- Sizzle.error( match[0] );
4281
- }
4282
-
4283
- match[2] = match[2].replace(/^\+|\s*/g, '');
4284
-
4285
- // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
4286
- var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(
4287
- match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
4288
- !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
4289
-
4290
- // calculate the numbers (first)n+(last) including if they are negative
4291
- match[2] = (test[1] + (test[2] || 1)) - 0;
4292
- match[3] = test[3] - 0;
4293
- }
4294
- else if ( match[2] ) {
4295
- Sizzle.error( match[0] );
4296
- }
4297
-
4298
- // TODO: Move to normal caching system
4299
- match[0] = done++;
4300
-
4301
- return match;
4302
- },
4303
-
4304
- ATTR: function( match, curLoop, inplace, result, not, isXML ) {
4305
- var name = match[1] = match[1].replace( rBackslash, "" );
4306
-
4307
- if ( !isXML && Expr.attrMap[name] ) {
4308
- match[1] = Expr.attrMap[name];
4309
- }
4310
-
4311
- // Handle if an un-quoted value was used
4312
- match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" );
4313
-
4314
- if ( match[2] === "~=" ) {
4315
- match[4] = " " + match[4] + " ";
4316
- }
4317
-
4318
- return match;
4319
- },
4320
-
4321
- PSEUDO: function( match, curLoop, inplace, result, not ) {
4322
- if ( match[1] === "not" ) {
4323
- // If we're dealing with a complex expression, or a simple one
4324
- if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
4325
- match[3] = Sizzle(match[3], null, null, curLoop);
4326
-
4327
- } else {
4328
- var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
4329
-
4330
- if ( !inplace ) {
4331
- result.push.apply( result, ret );
4332
- }
4333
-
4334
- return false;
4335
- }
4336
-
4337
- } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
4338
- return true;
4339
- }
4340
-
4341
- return match;
4342
- },
4343
-
4344
- POS: function( match ) {
4345
- match.unshift( true );
4346
-
4347
- return match;
4348
- }
4349
- },
4350
-
4351
- filters: {
4352
- enabled: function( elem ) {
4353
- return elem.disabled === false && elem.type !== "hidden";
4354
- },
4355
-
4356
- disabled: function( elem ) {
4357
- return elem.disabled === true;
4358
- },
4359
-
4360
- checked: function( elem ) {
4361
- return elem.checked === true;
4362
- },
4363
-
4364
- selected: function( elem ) {
4365
- // Accessing this property makes selected-by-default
4366
- // options in Safari work properly
4367
- if ( elem.parentNode ) {
4368
- elem.parentNode.selectedIndex;
4369
- }
4370
-
4371
- return elem.selected === true;
4372
- },
4373
-
4374
- parent: function( elem ) {
4375
- return !!elem.firstChild;
4376
- },
4377
-
4378
- empty: function( elem ) {
4379
- return !elem.firstChild;
4380
- },
4381
-
4382
- has: function( elem, i, match ) {
4383
- return !!Sizzle( match[3], elem ).length;
4384
- },
4385
-
4386
- header: function( elem ) {
4387
- return (/h\d/i).test( elem.nodeName );
4388
- },
4389
-
4390
- text: function( elem ) {
4391
- var attr = elem.getAttribute( "type" ), type = elem.type;
4392
- // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
4393
- // use getAttribute instead to test this case
4394
- return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
4395
- },
4396
-
4397
- radio: function( elem ) {
4398
- return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type;
4399
- },
4400
-
4401
- checkbox: function( elem ) {
4402
- return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type;
4403
- },
4404
-
4405
- file: function( elem ) {
4406
- return elem.nodeName.toLowerCase() === "input" && "file" === elem.type;
4407
- },
4408
-
4409
- password: function( elem ) {
4410
- return elem.nodeName.toLowerCase() === "input" && "password" === elem.type;
4411
- },
4412
-
4413
- submit: function( elem ) {
4414
- var name = elem.nodeName.toLowerCase();
4415
- return (name === "input" || name === "button") && "submit" === elem.type;
4416
- },
4417
-
4418
- image: function( elem ) {
4419
- return elem.nodeName.toLowerCase() === "input" && "image" === elem.type;
4420
- },
4421
-
4422
- reset: function( elem ) {
4423
- var name = elem.nodeName.toLowerCase();
4424
- return (name === "input" || name === "button") && "reset" === elem.type;
4425
- },
4426
-
4427
- button: function( elem ) {
4428
- var name = elem.nodeName.toLowerCase();
4429
- return name === "input" && "button" === elem.type || name === "button";
4430
- },
4431
-
4432
- input: function( elem ) {
4433
- return (/input|select|textarea|button/i).test( elem.nodeName );
4434
- },
4435
-
4436
- focus: function( elem ) {
4437
- return elem === elem.ownerDocument.activeElement;
4438
- }
4439
- },
4440
- setFilters: {
4441
- first: function( elem, i ) {
4442
- return i === 0;
4443
- },
4444
-
4445
- last: function( elem, i, match, array ) {
4446
- return i === array.length - 1;
4447
- },
4448
-
4449
- even: function( elem, i ) {
4450
- return i % 2 === 0;
4451
- },
4452
-
4453
- odd: function( elem, i ) {
4454
- return i % 2 === 1;
4455
- },
4456
-
4457
- lt: function( elem, i, match ) {
4458
- return i < match[3] - 0;
4459
- },
4460
-
4461
- gt: function( elem, i, match ) {
4462
- return i > match[3] - 0;
4463
- },
4464
-
4465
- nth: function( elem, i, match ) {
4466
- return match[3] - 0 === i;
4467
- },
4468
-
4469
- eq: function( elem, i, match ) {
4470
- return match[3] - 0 === i;
4471
- }
4472
- },
4473
- filter: {
4474
- PSEUDO: function( elem, match, i, array ) {
4475
- var name = match[1],
4476
- filter = Expr.filters[ name ];
4477
-
4478
- if ( filter ) {
4479
- return filter( elem, i, match, array );
4480
-
4481
- } else if ( name === "contains" ) {
4482
- return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0;
4483
-
4484
- } else if ( name === "not" ) {
4485
- var not = match[3];
4486
-
4487
- for ( var j = 0, l = not.length; j < l; j++ ) {
4488
- if ( not[j] === elem ) {
4489
- return false;
4490
- }
4491
- }
4492
-
4493
- return true;
4494
-
4495
- } else {
4496
- Sizzle.error( name );
4497
- }
4498
- },
4499
-
4500
- CHILD: function( elem, match ) {
4501
- var type = match[1],
4502
- node = elem;
4503
-
4504
- switch ( type ) {
4505
- case "only":
4506
- case "first":
4507
- while ( (node = node.previousSibling) ) {
4508
- if ( node.nodeType === 1 ) {
4509
- return false;
4510
- }
4511
- }
4512
-
4513
- if ( type === "first" ) {
4514
- return true;
4515
- }
4516
-
4517
- node = elem;
4518
-
4519
- case "last":
4520
- while ( (node = node.nextSibling) ) {
4521
- if ( node.nodeType === 1 ) {
4522
- return false;
4523
- }
4524
- }
4525
-
4526
- return true;
4527
-
4528
- case "nth":
4529
- var first = match[2],
4530
- last = match[3];
4531
-
4532
- if ( first === 1 && last === 0 ) {
4533
- return true;
4534
- }
4535
-
4536
- var doneName = match[0],
4537
- parent = elem.parentNode;
4538
-
4539
- if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
4540
- var count = 0;
4541
-
4542
- for ( node = parent.firstChild; node; node = node.nextSibling ) {
4543
- if ( node.nodeType === 1 ) {
4544
- node.nodeIndex = ++count;
4545
- }
4546
- }
4547
-
4548
- parent.sizcache = doneName;
4549
- }
4550
-
4551
- var diff = elem.nodeIndex - last;
4552
-
4553
- if ( first === 0 ) {
4554
- return diff === 0;
4555
-
4556
- } else {
4557
- return ( diff % first === 0 && diff / first >= 0 );
4558
- }
4559
- }
4560
- },
4561
-
4562
- ID: function( elem, match ) {
4563
- return elem.nodeType === 1 && elem.getAttribute("id") === match;
4564
- },
4565
-
4566
- TAG: function( elem, match ) {
4567
- return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match;
4568
- },
4569
-
4570
- CLASS: function( elem, match ) {
4571
- return (" " + (elem.className || elem.getAttribute("class")) + " ")
4572
- .indexOf( match ) > -1;
4573
- },
4574
-
4575
- ATTR: function( elem, match ) {
4576
- var name = match[1],
4577
- result = Expr.attrHandle[ name ] ?
4578
- Expr.attrHandle[ name ]( elem ) :
4579
- elem[ name ] != null ?
4580
- elem[ name ] :
4581
- elem.getAttribute( name ),
4582
- value = result + "",
4583
- type = match[2],
4584
- check = match[4];
4585
-
4586
- return result == null ?
4587
- type === "!=" :
4588
- type === "=" ?
4589
- value === check :
4590
- type === "*=" ?
4591
- value.indexOf(check) >= 0 :
4592
- type === "~=" ?
4593
- (" " + value + " ").indexOf(check) >= 0 :
4594
- !check ?
4595
- value && result !== false :
4596
- type === "!=" ?
4597
- value !== check :
4598
- type === "^=" ?
4599
- value.indexOf(check) === 0 :
4600
- type === "$=" ?
4601
- value.substr(value.length - check.length) === check :
4602
- type === "|=" ?
4603
- value === check || value.substr(0, check.length + 1) === check + "-" :
4604
- false;
4605
- },
4606
-
4607
- POS: function( elem, match, i, array ) {
4608
- var name = match[2],
4609
- filter = Expr.setFilters[ name ];
4610
-
4611
- if ( filter ) {
4612
- return filter( elem, i, match, array );
4613
- }
4614
- }
4615
- }
4616
- };
4617
-
4618
- var origPOS = Expr.match.POS,
4619
- fescape = function(all, num){
4620
- return "\\" + (num - 0 + 1);
4621
- };
4622
-
4623
- for ( var type in Expr.match ) {
4624
- Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
4625
- Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
4626
- }
4627
-
4628
- var makeArray = function( array, results ) {
4629
- array = Array.prototype.slice.call( array, 0 );
4630
-
4631
- if ( results ) {
4632
- results.push.apply( results, array );
4633
- return results;
4634
- }
4635
-
4636
- return array;
4637
- };
4638
-
4639
- // Perform a simple check to determine if the browser is capable of
4640
- // converting a NodeList to an array using builtin methods.
4641
- // Also verifies that the returned array holds DOM nodes
4642
- // (which is not the case in the Blackberry browser)
4643
- try {
4644
- Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
4645
-
4646
- // Provide a fallback method if it does not work
4647
- } catch( e ) {
4648
- makeArray = function( array, results ) {
4649
- var i = 0,
4650
- ret = results || [];
4651
-
4652
- if ( toString.call(array) === "[object Array]" ) {
4653
- Array.prototype.push.apply( ret, array );
4654
-
4655
- } else {
4656
- if ( typeof array.length === "number" ) {
4657
- for ( var l = array.length; i < l; i++ ) {
4658
- ret.push( array[i] );
4659
- }
4660
-
4661
- } else {
4662
- for ( ; array[i]; i++ ) {
4663
- ret.push( array[i] );
4664
- }
4665
- }
4666
- }
4667
-
4668
- return ret;
4669
- };
4670
- }
4671
-
4672
- var sortOrder, siblingCheck;
4673
-
4674
- if ( document.documentElement.compareDocumentPosition ) {
4675
- sortOrder = function( a, b ) {
4676
- if ( a === b ) {
4677
- hasDuplicate = true;
4678
- return 0;
4679
- }
4680
-
4681
- if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
4682
- return a.compareDocumentPosition ? -1 : 1;
4683
- }
4684
-
4685
- return a.compareDocumentPosition(b) & 4 ? -1 : 1;
4686
- };
4687
-
4688
- } else {
4689
- sortOrder = function( a, b ) {
4690
- // The nodes are identical, we can exit early
4691
- if ( a === b ) {
4692
- hasDuplicate = true;
4693
- return 0;
4694
-
4695
- // Fallback to using sourceIndex (in IE) if it's available on both nodes
4696
- } else if ( a.sourceIndex && b.sourceIndex ) {
4697
- return a.sourceIndex - b.sourceIndex;
4698
- }
4699
-
4700
- var al, bl,
4701
- ap = [],
4702
- bp = [],
4703
- aup = a.parentNode,
4704
- bup = b.parentNode,
4705
- cur = aup;
4706
-
4707
- // If the nodes are siblings (or identical) we can do a quick check
4708
- if ( aup === bup ) {
4709
- return siblingCheck( a, b );
4710
-
4711
- // If no parents were found then the nodes are disconnected
4712
- } else if ( !aup ) {
4713
- return -1;
4714
-
4715
- } else if ( !bup ) {
4716
- return 1;
4717
- }
4718
-
4719
- // Otherwise they're somewhere else in the tree so we need
4720
- // to build up a full list of the parentNodes for comparison
4721
- while ( cur ) {
4722
- ap.unshift( cur );
4723
- cur = cur.parentNode;
4724
- }
4725
-
4726
- cur = bup;
4727
-
4728
- while ( cur ) {
4729
- bp.unshift( cur );
4730
- cur = cur.parentNode;
4731
- }
4732
-
4733
- al = ap.length;
4734
- bl = bp.length;
4735
-
4736
- // Start walking down the tree looking for a discrepancy
4737
- for ( var i = 0; i < al && i < bl; i++ ) {
4738
- if ( ap[i] !== bp[i] ) {
4739
- return siblingCheck( ap[i], bp[i] );
4740
- }
4741
- }
4742
-
4743
- // We ended someplace up the tree so do a sibling check
4744
- return i === al ?
4745
- siblingCheck( a, bp[i], -1 ) :
4746
- siblingCheck( ap[i], b, 1 );
4747
- };
4748
-
4749
- siblingCheck = function( a, b, ret ) {
4750
- if ( a === b ) {
4751
- return ret;
4752
- }
4753
-
4754
- var cur = a.nextSibling;
4755
-
4756
- while ( cur ) {
4757
- if ( cur === b ) {
4758
- return -1;
4759
- }
4760
-
4761
- cur = cur.nextSibling;
4762
- }
4763
-
4764
- return 1;
4765
- };
4766
- }
4767
-
4768
- // Utility function for retreiving the text value of an array of DOM nodes
4769
- Sizzle.getText = function( elems ) {
4770
- var ret = "", elem;
4771
-
4772
- for ( var i = 0; elems[i]; i++ ) {
4773
- elem = elems[i];
4774
-
4775
- // Get the text from text nodes and CDATA nodes
4776
- if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
4777
- ret += elem.nodeValue;
4778
-
4779
- // Traverse everything else, except comment nodes
4780
- } else if ( elem.nodeType !== 8 ) {
4781
- ret += Sizzle.getText( elem.childNodes );
4782
- }
4783
- }
4784
-
4785
- return ret;
4786
- };
4787
-
4788
- // Check to see if the browser returns elements by name when
4789
- // querying by getElementById (and provide a workaround)
4790
- (function(){
4791
- // We're going to inject a fake input element with a specified name
4792
- var form = document.createElement("div"),
4793
- id = "script" + (new Date()).getTime(),
4794
- root = document.documentElement;
4795
-
4796
- form.innerHTML = "<a name='" + id + "'/>";
4797
-
4798
- // Inject it into the root element, check its status, and remove it quickly
4799
- root.insertBefore( form, root.firstChild );
4800
-
4801
- // The workaround has to do additional checks after a getElementById
4802
- // Which slows things down for other browsers (hence the branching)
4803
- if ( document.getElementById( id ) ) {
4804
- Expr.find.ID = function( match, context, isXML ) {
4805
- if ( typeof context.getElementById !== "undefined" && !isXML ) {
4806
- var m = context.getElementById(match[1]);
4807
-
4808
- return m ?
4809
- m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
4810
- [m] :
4811
- undefined :
4812
- [];
4813
- }
4814
- };
4815
-
4816
- Expr.filter.ID = function( elem, match ) {
4817
- var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
4818
-
4819
- return elem.nodeType === 1 && node && node.nodeValue === match;
4820
- };
4821
- }
4822
-
4823
- root.removeChild( form );
4824
-
4825
- // release memory in IE
4826
- root = form = null;
4827
- })();
4828
-
4829
- (function(){
4830
- // Check to see if the browser returns only elements
4831
- // when doing getElementsByTagName("*")
4832
-
4833
- // Create a fake element
4834
- var div = document.createElement("div");
4835
- div.appendChild( document.createComment("") );
4836
-
4837
- // Make sure no comments are found
4838
- if ( div.getElementsByTagName("*").length > 0 ) {
4839
- Expr.find.TAG = function( match, context ) {
4840
- var results = context.getElementsByTagName( match[1] );
4841
-
4842
- // Filter out possible comments
4843
- if ( match[1] === "*" ) {
4844
- var tmp = [];
4845
-
4846
- for ( var i = 0; results[i]; i++ ) {
4847
- if ( results[i].nodeType === 1 ) {
4848
- tmp.push( results[i] );
4849
- }
4850
- }
4851
-
4852
- results = tmp;
4853
- }
4854
-
4855
- return results;
4856
- };
4857
- }
4858
-
4859
- // Check to see if an attribute returns normalized href attributes
4860
- div.innerHTML = "<a href='#'></a>";
4861
-
4862
- if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
4863
- div.firstChild.getAttribute("href") !== "#" ) {
4864
-
4865
- Expr.attrHandle.href = function( elem ) {
4866
- return elem.getAttribute( "href", 2 );
4867
- };
4868
- }
4869
-
4870
- // release memory in IE
4871
- div = null;
4872
- })();
4873
-
4874
- if ( document.querySelectorAll ) {
4875
- (function(){
4876
- var oldSizzle = Sizzle,
4877
- div = document.createElement("div"),
4878
- id = "__sizzle__";
4879
-
4880
- div.innerHTML = "<p class='TEST'></p>";
4881
-
4882
- // Safari can't handle uppercase or unicode characters when
4883
- // in quirks mode.
4884
- if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
4885
- return;
4886
- }
4887
-
4888
- Sizzle = function( query, context, extra, seed ) {
4889
- context = context || document;
4890
-
4891
- // Only use querySelectorAll on non-XML documents
4892
- // (ID selectors don't work in non-HTML documents)
4893
- if ( !seed && !Sizzle.isXML(context) ) {
4894
- // See if we find a selector to speed up
4895
- var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
4896
-
4897
- if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
4898
- // Speed-up: Sizzle("TAG")
4899
- if ( match[1] ) {
4900
- return makeArray( context.getElementsByTagName( query ), extra );
4901
-
4902
- // Speed-up: Sizzle(".CLASS")
4903
- } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
4904
- return makeArray( context.getElementsByClassName( match[2] ), extra );
4905
- }
4906
- }
4907
-
4908
- if ( context.nodeType === 9 ) {
4909
- // Speed-up: Sizzle("body")
4910
- // The body element only exists once, optimize finding it
4911
- if ( query === "body" && context.body ) {
4912
- return makeArray( [ context.body ], extra );
4913
-
4914
- // Speed-up: Sizzle("#ID")
4915
- } else if ( match && match[3] ) {
4916
- var elem = context.getElementById( match[3] );
4917
-
4918
- // Check parentNode to catch when Blackberry 4.6 returns
4919
- // nodes that are no longer in the document #6963
4920
- if ( elem && elem.parentNode ) {
4921
- // Handle the case where IE and Opera return items
4922
- // by name instead of ID
4923
- if ( elem.id === match[3] ) {
4924
- return makeArray( [ elem ], extra );
4925
- }
4926
-
4927
- } else {
4928
- return makeArray( [], extra );
4929
- }
4930
- }
4931
-
4932
- try {
4933
- return makeArray( context.querySelectorAll(query), extra );
4934
- } catch(qsaError) {}
4935
-
4936
- // qSA works strangely on Element-rooted queries
4937
- // We can work around this by specifying an extra ID on the root
4938
- // and working up from there (Thanks to Andrew Dupont for the technique)
4939
- // IE 8 doesn't work on object elements
4940
- } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
4941
- var oldContext = context,
4942
- old = context.getAttribute( "id" ),
4943
- nid = old || id,
4944
- hasParent = context.parentNode,
4945
- relativeHierarchySelector = /^\s*[+~]/.test( query );
4946
-
4947
- if ( !old ) {
4948
- context.setAttribute( "id", nid );
4949
- } else {
4950
- nid = nid.replace( /'/g, "\\$&" );
4951
- }
4952
- if ( relativeHierarchySelector && hasParent ) {
4953
- context = context.parentNode;
4954
- }
4955
-
4956
- try {
4957
- if ( !relativeHierarchySelector || hasParent ) {
4958
- return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
4959
- }
4960
-
4961
- } catch(pseudoError) {
4962
- } finally {
4963
- if ( !old ) {
4964
- oldContext.removeAttribute( "id" );
4965
- }
4966
- }
4967
- }
4968
- }
4969
-
4970
- return oldSizzle(query, context, extra, seed);
4971
- };
4972
-
4973
- for ( var prop in oldSizzle ) {
4974
- Sizzle[ prop ] = oldSizzle[ prop ];
4975
- }
4976
-
4977
- // release memory in IE
4978
- div = null;
4979
- })();
4980
- }
4981
-
4982
- (function(){
4983
- var html = document.documentElement,
4984
- matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;
4985
-
4986
- if ( matches ) {
4987
- // Check to see if it's possible to do matchesSelector
4988
- // on a disconnected node (IE 9 fails this)
4989
- var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ),
4990
- pseudoWorks = false;
4991
-
4992
- try {
4993
- // This should fail with an exception
4994
- // Gecko does not error, returns false instead
4995
- matches.call( document.documentElement, "[test!='']:sizzle" );
4996
-
4997
- } catch( pseudoError ) {
4998
- pseudoWorks = true;
4999
- }
5000
-
5001
- Sizzle.matchesSelector = function( node, expr ) {
5002
- // Make sure that attribute selectors are quoted
5003
- expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
5004
-
5005
- if ( !Sizzle.isXML( node ) ) {
5006
- try {
5007
- if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
5008
- var ret = matches.call( node, expr );
5009
-
5010
- // IE 9's matchesSelector returns false on disconnected nodes
5011
- if ( ret || !disconnectedMatch ||
5012
- // As well, disconnected nodes are said to be in a document
5013
- // fragment in IE 9, so check for that
5014
- node.document && node.document.nodeType !== 11 ) {
5015
- return ret;
5016
- }
5017
- }
5018
- } catch(e) {}
5019
- }
5020
-
5021
- return Sizzle(expr, null, null, [node]).length > 0;
5022
- };
5023
- }
5024
- })();
5025
-
5026
- (function(){
5027
- var div = document.createElement("div");
5028
-
5029
- div.innerHTML = "<div class='test e'></div><div class='test'></div>";
5030
-
5031
- // Opera can't find a second classname (in 9.6)
5032
- // Also, make sure that getElementsByClassName actually exists
5033
- if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
5034
- return;
5035
- }
5036
-
5037
- // Safari caches class attributes, doesn't catch changes (in 3.2)
5038
- div.lastChild.className = "e";
5039
-
5040
- if ( div.getElementsByClassName("e").length === 1 ) {
5041
- return;
5042
- }
5043
-
5044
- Expr.order.splice(1, 0, "CLASS");
5045
- Expr.find.CLASS = function( match, context, isXML ) {
5046
- if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
5047
- return context.getElementsByClassName(match[1]);
5048
- }
5049
- };
5050
-
5051
- // release memory in IE
5052
- div = null;
5053
- })();
5054
-
5055
- function dirNodeCheck( 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 && !isXML ){
5071
- elem.sizcache = doneName;
5072
- elem.sizset = i;
5073
- }
5074
-
5075
- if ( elem.nodeName.toLowerCase() === cur ) {
5076
- match = elem;
5077
- break;
5078
- }
5079
-
5080
- elem = elem[dir];
5081
- }
5082
-
5083
- checkSet[i] = match;
5084
- }
5085
- }
5086
- }
5087
-
5088
- function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
5089
- for ( var i = 0, l = checkSet.length; i < l; i++ ) {
5090
- var elem = checkSet[i];
5091
-
5092
- if ( elem ) {
5093
- var match = false;
5094
-
5095
- elem = elem[dir];
5096
-
5097
- while ( elem ) {
5098
- if ( elem.sizcache === doneName ) {
5099
- match = checkSet[elem.sizset];
5100
- break;
5101
- }
5102
-
5103
- if ( elem.nodeType === 1 ) {
5104
- if ( !isXML ) {
5105
- elem.sizcache = doneName;
5106
- elem.sizset = i;
5107
- }
5108
-
5109
- if ( typeof cur !== "string" ) {
5110
- if ( elem === cur ) {
5111
- match = true;
5112
- break;
5113
- }
5114
-
5115
- } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
5116
- match = elem;
5117
- break;
5118
- }
5119
- }
5120
-
5121
- elem = elem[dir];
5122
- }
5123
-
5124
- checkSet[i] = match;
5125
- }
5126
- }
5127
- }
5128
-
5129
- if ( document.documentElement.contains ) {
5130
- Sizzle.contains = function( a, b ) {
5131
- return a !== b && (a.contains ? a.contains(b) : true);
5132
- };
5133
-
5134
- } else if ( document.documentElement.compareDocumentPosition ) {
5135
- Sizzle.contains = function( a, b ) {
5136
- return !!(a.compareDocumentPosition(b) & 16);
5137
- };
5138
-
5139
- } else {
5140
- Sizzle.contains = function() {
5141
- return false;
5142
- };
5143
- }
5144
-
5145
- Sizzle.isXML = function( elem ) {
5146
- // documentElement is verified for cases where it doesn't yet exist
5147
- // (such as loading iframes in IE - #4833)
5148
- var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
5149
-
5150
- return documentElement ? documentElement.nodeName !== "HTML" : false;
5151
- };
5152
-
5153
- var posProcess = function( selector, context ) {
5154
- var match,
5155
- tmpSet = [],
5156
- later = "",
5157
- root = context.nodeType ? [context] : context;
5158
-
5159
- // Position selectors must be done after the filter
5160
- // And so must :not(positional) so we move all PSEUDOs to the end
5161
- while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
5162
- later += match[0];
5163
- selector = selector.replace( Expr.match.PSEUDO, "" );
5164
- }
5165
-
5166
- selector = Expr.relative[selector] ? selector + "*" : selector;
5167
-
5168
- for ( var i = 0, l = root.length; i < l; i++ ) {
5169
- Sizzle( selector, root[i], tmpSet );
5170
- }
5171
-
5172
- return Sizzle.filter( later, tmpSet );
5173
- };
5174
-
5175
- // EXPOSE
5176
- jQuery.find = Sizzle;
5177
- jQuery.expr = Sizzle.selectors;
5178
- jQuery.expr[":"] = jQuery.expr.filters;
5179
- jQuery.unique = Sizzle.uniqueSort;
5180
- jQuery.text = Sizzle.getText;
5181
- jQuery.isXMLDoc = Sizzle.isXML;
5182
- jQuery.contains = Sizzle.contains;
5183
-
5184
-
5185
- })();
5186
-
5187
-
5188
- var runtil = /Until$/,
5189
- rparentsprev = /^(?:parents|prevUntil|prevAll)/,
5190
- // Note: This RegExp should be improved, or likely pulled from Sizzle
5191
- rmultiselector = /,/,
5192
- isSimple = /^.[^:#\[\.,]*$/,
5193
- slice = Array.prototype.slice,
5194
- POS = jQuery.expr.match.POS,
5195
- // methods guaranteed to produce a unique set when starting from a unique set
5196
- guaranteedUnique = {
5197
- children: true,
5198
- contents: true,
5199
- next: true,
5200
- prev: true
5201
- };
5202
-
5203
- jQuery.fn.extend({
5204
- find: function( selector ) {
5205
- var self = this,
5206
- i, l;
5207
-
5208
- if ( typeof selector !== "string" ) {
5209
- return jQuery( selector ).filter(function() {
5210
- for ( i = 0, l = self.length; i < l; i++ ) {
5211
- if ( jQuery.contains( self[ i ], this ) ) {
5212
- return true;
5213
- }
5214
- }
5215
- });
5216
- }
5217
-
5218
- var ret = this.pushStack( "", "find", selector ),
5219
- length, n, r;
5220
-
5221
- for ( i = 0, l = this.length; i < l; i++ ) {
5222
- length = ret.length;
5223
- jQuery.find( selector, this[i], ret );
5224
-
5225
- if ( i > 0 ) {
5226
- // Make sure that the results are unique
5227
- for ( n = length; n < ret.length; n++ ) {
5228
- for ( r = 0; r < length; r++ ) {
5229
- if ( ret[r] === ret[n] ) {
5230
- ret.splice(n--, 1);
5231
- break;
5232
- }
5233
- }
5234
- }
5235
- }
5236
- }
5237
-
5238
- return ret;
5239
- },
5240
-
5241
- has: function( target ) {
5242
- var targets = jQuery( target );
5243
- return this.filter(function() {
5244
- for ( var i = 0, l = targets.length; i < l; i++ ) {
5245
- if ( jQuery.contains( this, targets[i] ) ) {
5246
- return true;
5247
- }
5248
- }
5249
- });
5250
- },
5251
-
5252
- not: function( selector ) {
5253
- return this.pushStack( winnow(this, selector, false), "not", selector);
5254
- },
5255
-
5256
- filter: function( selector ) {
5257
- return this.pushStack( winnow(this, selector, true), "filter", selector );
5258
- },
5259
-
5260
- is: function( selector ) {
5261
- return !!selector && ( typeof selector === "string" ?
5262
- jQuery.filter( selector, this ).length > 0 :
5263
- this.filter( selector ).length > 0 );
5264
- },
5265
-
5266
- closest: function( selectors, context ) {
5267
- var ret = [], i, l, cur = this[0];
5268
-
5269
- // Array
5270
- if ( jQuery.isArray( selectors ) ) {
5271
- var match, selector,
5272
- matches = {},
5273
- level = 1;
5274
-
5275
- if ( cur && selectors.length ) {
5276
- for ( i = 0, l = selectors.length; i < l; i++ ) {
5277
- selector = selectors[i];
5278
-
5279
- if ( !matches[ selector ] ) {
5280
- matches[ selector ] = POS.test( selector ) ?
5281
- jQuery( selector, context || this.context ) :
5282
- selector;
5283
- }
5284
- }
5285
-
5286
- while ( cur && cur.ownerDocument && cur !== context ) {
5287
- for ( selector in matches ) {
5288
- match = matches[ selector ];
5289
-
5290
- if ( match.jquery ? match.index( cur ) > -1 : jQuery( cur ).is( match ) ) {
5291
- ret.push({ selector: selector, elem: cur, level: level });
5292
- }
5293
- }
5294
-
5295
- cur = cur.parentNode;
5296
- level++;
5297
- }
5298
- }
5299
-
5300
- return ret;
5301
- }
5302
-
5303
- // String
5304
- var pos = POS.test( selectors ) || typeof selectors !== "string" ?
5305
- jQuery( selectors, context || this.context ) :
5306
- 0;
5307
-
5308
- for ( i = 0, l = this.length; i < l; i++ ) {
5309
- cur = this[i];
5310
-
5311
- while ( cur ) {
5312
- if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
5313
- ret.push( cur );
5314
- break;
5315
-
5316
- } else {
5317
- cur = cur.parentNode;
5318
- if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) {
5319
- break;
5320
- }
5321
- }
5322
- }
5323
- }
5324
-
5325
- ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
5326
-
5327
- return this.pushStack( ret, "closest", selectors );
5328
- },
5329
-
5330
- // Determine the position of an element within
5331
- // the matched set of elements
5332
- index: function( elem ) {
5333
-
5334
- // No argument, return index in parent
5335
- if ( !elem ) {
5336
- return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;
5337
- }
5338
-
5339
- // index in selector
5340
- if ( typeof elem === "string" ) {
5341
- return jQuery.inArray( this[0], jQuery( elem ) );
5342
- }
5343
-
5344
- // Locate the position of the desired element
5345
- return jQuery.inArray(
5346
- // If it receives a jQuery object, the first element is used
5347
- elem.jquery ? elem[0] : elem, this );
5348
- },
5349
-
5350
- add: function( selector, context ) {
5351
- var set = typeof selector === "string" ?
5352
- jQuery( selector, context ) :
5353
- jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
5354
- all = jQuery.merge( this.get(), set );
5355
-
5356
- return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
5357
- all :
5358
- jQuery.unique( all ) );
5359
- },
5360
-
5361
- andSelf: function() {
5362
- return this.add( this.prevObject );
5363
- }
5364
- });
5365
-
5366
- // A painfully simple check to see if an element is disconnected
5367
- // from a document (should be improved, where feasible).
5368
- function isDisconnected( node ) {
5369
- return !node || !node.parentNode || node.parentNode.nodeType === 11;
5370
- }
5371
-
5372
- jQuery.each({
5373
- parent: function( elem ) {
5374
- var parent = elem.parentNode;
5375
- return parent && parent.nodeType !== 11 ? parent : null;
5376
- },
5377
- parents: function( elem ) {
5378
- return jQuery.dir( elem, "parentNode" );
5379
- },
5380
- parentsUntil: function( elem, i, until ) {
5381
- return jQuery.dir( elem, "parentNode", until );
5382
- },
5383
- next: function( elem ) {
5384
- return jQuery.nth( elem, 2, "nextSibling" );
5385
- },
5386
- prev: function( elem ) {
5387
- return jQuery.nth( elem, 2, "previousSibling" );
5388
- },
5389
- nextAll: function( elem ) {
5390
- return jQuery.dir( elem, "nextSibling" );
5391
- },
5392
- prevAll: function( elem ) {
5393
- return jQuery.dir( elem, "previousSibling" );
5394
- },
5395
- nextUntil: function( elem, i, until ) {
5396
- return jQuery.dir( elem, "nextSibling", until );
5397
- },
5398
- prevUntil: function( elem, i, until ) {
5399
- return jQuery.dir( elem, "previousSibling", until );
5400
- },
5401
- siblings: function( elem ) {
5402
- return jQuery.sibling( elem.parentNode.firstChild, elem );
5403
- },
5404
- children: function( elem ) {
5405
- return jQuery.sibling( elem.firstChild );
5406
- },
5407
- contents: function( elem ) {
5408
- return jQuery.nodeName( elem, "iframe" ) ?
5409
- elem.contentDocument || elem.contentWindow.document :
5410
- jQuery.makeArray( elem.childNodes );
5411
- }
5412
- }, function( name, fn ) {
5413
- jQuery.fn[ name ] = function( until, selector ) {
5414
- var ret = jQuery.map( this, fn, until ),
5415
- // The variable 'args' was introduced in
5416
- // https://github.com/jquery/jquery/commit/52a0238
5417
- // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
5418
- // http://code.google.com/p/v8/issues/detail?id=1050
5419
- args = slice.call(arguments);
5420
-
5421
- if ( !runtil.test( name ) ) {
5422
- selector = until;
5423
- }
5424
-
5425
- if ( selector && typeof selector === "string" ) {
5426
- ret = jQuery.filter( selector, ret );
5427
- }
5428
-
5429
- ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
5430
-
5431
- if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
5432
- ret = ret.reverse();
5433
- }
5434
-
5435
- return this.pushStack( ret, name, args.join(",") );
5436
- };
5437
- });
5438
-
5439
- jQuery.extend({
5440
- filter: function( expr, elems, not ) {
5441
- if ( not ) {
5442
- expr = ":not(" + expr + ")";
5443
- }
5444
-
5445
- return elems.length === 1 ?
5446
- jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
5447
- jQuery.find.matches(expr, elems);
5448
- },
5449
-
5450
- dir: function( elem, dir, until ) {
5451
- var matched = [],
5452
- cur = elem[ dir ];
5453
-
5454
- while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
5455
- if ( cur.nodeType === 1 ) {
5456
- matched.push( cur );
5457
- }
5458
- cur = cur[dir];
5459
- }
5460
- return matched;
5461
- },
5462
-
5463
- nth: function( cur, result, dir, elem ) {
5464
- result = result || 1;
5465
- var num = 0;
5466
-
5467
- for ( ; cur; cur = cur[dir] ) {
5468
- if ( cur.nodeType === 1 && ++num === result ) {
5469
- break;
5470
- }
5471
- }
5472
-
5473
- return cur;
5474
- },
5475
-
5476
- sibling: function( n, elem ) {
5477
- var r = [];
5478
-
5479
- for ( ; n; n = n.nextSibling ) {
5480
- if ( n.nodeType === 1 && n !== elem ) {
5481
- r.push( n );
5482
- }
5483
- }
5484
-
5485
- return r;
5486
- }
5487
- });
5488
-
5489
- // Implement the identical functionality for filter and not
5490
- function winnow( elements, qualifier, keep ) {
5491
-
5492
- // Can't pass null or undefined to indexOf in Firefox 4
5493
- // Set to 0 to skip string check
5494
- qualifier = qualifier || 0;
5495
-
5496
- if ( jQuery.isFunction( qualifier ) ) {
5497
- return jQuery.grep(elements, function( elem, i ) {
5498
- var retVal = !!qualifier.call( elem, i, elem );
5499
- return retVal === keep;
5500
- });
5501
-
5502
- } else if ( qualifier.nodeType ) {
5503
- return jQuery.grep(elements, function( elem, i ) {
5504
- return (elem === qualifier) === keep;
5505
- });
5506
-
5507
- } else if ( typeof qualifier === "string" ) {
5508
- var filtered = jQuery.grep(elements, function( elem ) {
5509
- return elem.nodeType === 1;
5510
- });
5511
-
5512
- if ( isSimple.test( qualifier ) ) {
5513
- return jQuery.filter(qualifier, filtered, !keep);
5514
- } else {
5515
- qualifier = jQuery.filter( qualifier, filtered );
5516
- }
5517
- }
5518
-
5519
- return jQuery.grep(elements, function( elem, i ) {
5520
- return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
5521
- });
5522
- }
5523
-
5524
-
5525
-
5526
-
5527
- var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
5528
- rleadingWhitespace = /^\s+/,
5529
- rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
5530
- rtagName = /<([\w:]+)/,
5531
- rtbody = /<tbody/i,
5532
- rhtml = /<|&#?\w+;/,
5533
- rnocache = /<(?:script|object|embed|option|style)/i,
5534
- // checked="checked" or checked
5535
- rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
5536
- rscriptType = /\/(java|ecma)script/i,
5537
- rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
5538
- wrapMap = {
5539
- option: [ 1, "<select multiple='multiple'>", "</select>" ],
5540
- legend: [ 1, "<fieldset>", "</fieldset>" ],
5541
- thead: [ 1, "<table>", "</table>" ],
5542
- tr: [ 2, "<table><tbody>", "</tbody></table>" ],
5543
- td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
5544
- col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
5545
- area: [ 1, "<map>", "</map>" ],
5546
- _default: [ 0, "", "" ]
5547
- };
5548
-
5549
- wrapMap.optgroup = wrapMap.option;
5550
- wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
5551
- wrapMap.th = wrapMap.td;
5552
-
5553
- // IE can't serialize <link> and <script> tags normally
5554
- if ( !jQuery.support.htmlSerialize ) {
5555
- wrapMap._default = [ 1, "div<div>", "</div>" ];
5556
- }
5557
-
5558
- jQuery.fn.extend({
5559
- text: function( text ) {
5560
- if ( jQuery.isFunction(text) ) {
5561
- return this.each(function(i) {
5562
- var self = jQuery( this );
5563
-
5564
- self.text( text.call(this, i, self.text()) );
5565
- });
5566
- }
5567
-
5568
- if ( typeof text !== "object" && text !== undefined ) {
5569
- return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
5570
- }
5571
-
5572
- return jQuery.text( this );
5573
- },
5574
-
5575
- wrapAll: function( html ) {
5576
- if ( jQuery.isFunction( html ) ) {
5577
- return this.each(function(i) {
5578
- jQuery(this).wrapAll( html.call(this, i) );
5579
- });
5580
- }
5581
-
5582
- if ( this[0] ) {
5583
- // The elements to wrap the target around
5584
- var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
5585
-
5586
- if ( this[0].parentNode ) {
5587
- wrap.insertBefore( this[0] );
5588
- }
5589
-
5590
- wrap.map(function() {
5591
- var elem = this;
5592
-
5593
- while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
5594
- elem = elem.firstChild;
5595
- }
5596
-
5597
- return elem;
5598
- }).append( this );
5599
- }
5600
-
5601
- return this;
5602
- },
5603
-
5604
- wrapInner: function( html ) {
5605
- if ( jQuery.isFunction( html ) ) {
5606
- return this.each(function(i) {
5607
- jQuery(this).wrapInner( html.call(this, i) );
5608
- });
5609
- }
5610
-
5611
- return this.each(function() {
5612
- var self = jQuery( this ),
5613
- contents = self.contents();
5614
-
5615
- if ( contents.length ) {
5616
- contents.wrapAll( html );
5617
-
5618
- } else {
5619
- self.append( html );
5620
- }
5621
- });
5622
- },
5623
-
5624
- wrap: function( html ) {
5625
- return this.each(function() {
5626
- jQuery( this ).wrapAll( html );
5627
- });
5628
- },
5629
-
5630
- unwrap: function() {
5631
- return this.parent().each(function() {
5632
- if ( !jQuery.nodeName( this, "body" ) ) {
5633
- jQuery( this ).replaceWith( this.childNodes );
5634
- }
5635
- }).end();
5636
- },
5637
-
5638
- append: function() {
5639
- return this.domManip(arguments, true, function( elem ) {
5640
- if ( this.nodeType === 1 ) {
5641
- this.appendChild( elem );
5642
- }
5643
- });
5644
- },
5645
-
5646
- prepend: function() {
5647
- return this.domManip(arguments, true, function( elem ) {
5648
- if ( this.nodeType === 1 ) {
5649
- this.insertBefore( elem, this.firstChild );
5650
- }
5651
- });
5652
- },
5653
-
5654
- before: function() {
5655
- if ( this[0] && this[0].parentNode ) {
5656
- return this.domManip(arguments, false, function( elem ) {
5657
- this.parentNode.insertBefore( elem, this );
5658
- });
5659
- } else if ( arguments.length ) {
5660
- var set = jQuery(arguments[0]);
5661
- set.push.apply( set, this.toArray() );
5662
- return this.pushStack( set, "before", arguments );
5663
- }
5664
- },
5665
-
5666
- after: function() {
5667
- if ( this[0] && this[0].parentNode ) {
5668
- return this.domManip(arguments, false, function( elem ) {
5669
- this.parentNode.insertBefore( elem, this.nextSibling );
5670
- });
5671
- } else if ( arguments.length ) {
5672
- var set = this.pushStack( this, "after", arguments );
5673
- set.push.apply( set, jQuery(arguments[0]).toArray() );
5674
- return set;
5675
- }
5676
- },
5677
-
5678
- // keepData is for internal use only--do not document
5679
- remove: function( selector, keepData ) {
5680
- for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
5681
- if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
5682
- if ( !keepData && elem.nodeType === 1 ) {
5683
- jQuery.cleanData( elem.getElementsByTagName("*") );
5684
- jQuery.cleanData( [ elem ] );
5685
- }
5686
-
5687
- if ( elem.parentNode ) {
5688
- elem.parentNode.removeChild( elem );
5689
- }
5690
- }
5691
- }
5692
-
5693
- return this;
5694
- },
5695
-
5696
- empty: function() {
5697
- for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
5698
- // Remove element nodes and prevent memory leaks
5699
- if ( elem.nodeType === 1 ) {
5700
- jQuery.cleanData( elem.getElementsByTagName("*") );
5701
- }
5702
-
5703
- // Remove any remaining nodes
5704
- while ( elem.firstChild ) {
5705
- elem.removeChild( elem.firstChild );
5706
- }
5707
- }
5708
-
5709
- return this;
5710
- },
5711
-
5712
- clone: function( dataAndEvents, deepDataAndEvents ) {
5713
- dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
5714
- deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
5715
-
5716
- return this.map( function () {
5717
- return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
5718
- });
5719
- },
5720
-
5721
- html: function( value ) {
5722
- if ( value === undefined ) {
5723
- return this[0] && this[0].nodeType === 1 ?
5724
- this[0].innerHTML.replace(rinlinejQuery, "") :
5725
- null;
5726
-
5727
- // See if we can take a shortcut and just use innerHTML
5728
- } else if ( typeof value === "string" && !rnocache.test( value ) &&
5729
- (jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
5730
- !wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
5731
-
5732
- value = value.replace(rxhtmlTag, "<$1></$2>");
5733
-
5734
- try {
5735
- for ( var i = 0, l = this.length; i < l; i++ ) {
5736
- // Remove element nodes and prevent memory leaks
5737
- if ( this[i].nodeType === 1 ) {
5738
- jQuery.cleanData( this[i].getElementsByTagName("*") );
5739
- this[i].innerHTML = value;
5740
- }
5741
- }
5742
-
5743
- // If using innerHTML throws an exception, use the fallback method
5744
- } catch(e) {
5745
- this.empty().append( value );
5746
- }
5747
-
5748
- } else if ( jQuery.isFunction( value ) ) {
5749
- this.each(function(i){
5750
- var self = jQuery( this );
5751
-
5752
- self.html( value.call(this, i, self.html()) );
5753
- });
5754
-
5755
- } else {
5756
- this.empty().append( value );
5757
- }
5758
-
5759
- return this;
5760
- },
5761
-
5762
- replaceWith: function( value ) {
5763
- if ( this[0] && this[0].parentNode ) {
5764
- // Make sure that the elements are removed from the DOM before they are inserted
5765
- // this can help fix replacing a parent with child elements
5766
- if ( jQuery.isFunction( value ) ) {
5767
- return this.each(function(i) {
5768
- var self = jQuery(this), old = self.html();
5769
- self.replaceWith( value.call( this, i, old ) );
5770
- });
5771
- }
5772
-
5773
- if ( typeof value !== "string" ) {
5774
- value = jQuery( value ).detach();
5775
- }
5776
-
5777
- return this.each(function() {
5778
- var next = this.nextSibling,
5779
- parent = this.parentNode;
5780
-
5781
- jQuery( this ).remove();
5782
-
5783
- if ( next ) {
5784
- jQuery(next).before( value );
5785
- } else {
5786
- jQuery(parent).append( value );
5787
- }
5788
- });
5789
- } else {
5790
- return this.length ?
5791
- this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) :
5792
- this;
5793
- }
5794
- },
5795
-
5796
- detach: function( selector ) {
5797
- return this.remove( selector, true );
5798
- },
5799
-
5800
- domManip: function( args, table, callback ) {
5801
- var results, first, fragment, parent,
5802
- value = args[0],
5803
- scripts = [];
5804
-
5805
- // We can't cloneNode fragments that contain checked, in WebKit
5806
- if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
5807
- return this.each(function() {
5808
- jQuery(this).domManip( args, table, callback, true );
5809
- });
5810
- }
5811
-
5812
- if ( jQuery.isFunction(value) ) {
5813
- return this.each(function(i) {
5814
- var self = jQuery(this);
5815
- args[0] = value.call(this, i, table ? self.html() : undefined);
5816
- self.domManip( args, table, callback );
5817
- });
5818
- }
5819
-
5820
- if ( this[0] ) {
5821
- parent = value && value.parentNode;
5822
-
5823
- // If we're in a fragment, just use that instead of building a new one
5824
- if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
5825
- results = { fragment: parent };
5826
-
5827
- } else {
5828
- results = jQuery.buildFragment( args, this, scripts );
5829
- }
5830
-
5831
- fragment = results.fragment;
5832
-
5833
- if ( fragment.childNodes.length === 1 ) {
5834
- first = fragment = fragment.firstChild;
5835
- } else {
5836
- first = fragment.firstChild;
5837
- }
5838
-
5839
- if ( first ) {
5840
- table = table && jQuery.nodeName( first, "tr" );
5841
-
5842
- for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) {
5843
- callback.call(
5844
- table ?
5845
- root(this[i], first) :
5846
- this[i],
5847
- // Make sure that we do not leak memory by inadvertently discarding
5848
- // the original fragment (which might have attached data) instead of
5849
- // using it; in addition, use the original fragment object for the last
5850
- // item instead of first because it can end up being emptied incorrectly
5851
- // in certain situations (Bug #8070).
5852
- // Fragments from the fragment cache must always be cloned and never used
5853
- // in place.
5854
- results.cacheable || (l > 1 && i < lastIndex) ?
5855
- jQuery.clone( fragment, true, true ) :
5856
- fragment
5857
- );
5858
- }
5859
- }
5860
-
5861
- if ( scripts.length ) {
5862
- jQuery.each( scripts, evalScript );
5863
- }
5864
- }
5865
-
5866
- return this;
5867
- }
5868
- });
5869
-
5870
- function root( elem, cur ) {
5871
- return jQuery.nodeName(elem, "table") ?
5872
- (elem.getElementsByTagName("tbody")[0] ||
5873
- elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
5874
- elem;
5875
- }
5876
-
5877
- function cloneCopyEvent( src, dest ) {
5878
-
5879
- if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
5880
- return;
5881
- }
5882
-
5883
- var internalKey = jQuery.expando,
5884
- oldData = jQuery.data( src ),
5885
- curData = jQuery.data( dest, oldData );
5886
-
5887
- // Switch to use the internal data object, if it exists, for the next
5888
- // stage of data copying
5889
- if ( (oldData = oldData[ internalKey ]) ) {
5890
- var events = oldData.events;
5891
- curData = curData[ internalKey ] = jQuery.extend({}, oldData);
5892
-
5893
- if ( events ) {
5894
- delete curData.handle;
5895
- curData.events = {};
5896
-
5897
- for ( var type in events ) {
5898
- for ( var i = 0, l = events[ type ].length; i < l; i++ ) {
5899
- jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data );
5900
- }
5901
- }
5902
- }
5903
- }
5904
- }
5905
-
5906
- function cloneFixAttributes( src, dest ) {
5907
- var nodeName;
5908
-
5909
- // We do not need to do anything for non-Elements
5910
- if ( dest.nodeType !== 1 ) {
5911
- return;
5912
- }
5913
-
5914
- // clearAttributes removes the attributes, which we don't want,
5915
- // but also removes the attachEvent events, which we *do* want
5916
- if ( dest.clearAttributes ) {
5917
- dest.clearAttributes();
5918
- }
5919
-
5920
- // mergeAttributes, in contrast, only merges back on the
5921
- // original attributes, not the events
5922
- if ( dest.mergeAttributes ) {
5923
- dest.mergeAttributes( src );
5924
- }
5925
-
5926
- nodeName = dest.nodeName.toLowerCase();
5927
-
5928
- // IE6-8 fail to clone children inside object elements that use
5929
- // the proprietary classid attribute value (rather than the type
5930
- // attribute) to identify the type of content to display
5931
- if ( nodeName === "object" ) {
5932
- dest.outerHTML = src.outerHTML;
5933
-
5934
- } else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) {
5935
- // IE6-8 fails to persist the checked state of a cloned checkbox
5936
- // or radio button. Worse, IE6-7 fail to give the cloned element
5937
- // a checked appearance if the defaultChecked value isn't also set
5938
- if ( src.checked ) {
5939
- dest.defaultChecked = dest.checked = src.checked;
5940
- }
5941
-
5942
- // IE6-7 get confused and end up setting the value of a cloned
5943
- // checkbox/radio button to an empty string instead of "on"
5944
- if ( dest.value !== src.value ) {
5945
- dest.value = src.value;
5946
- }
5947
-
5948
- // IE6-8 fails to return the selected option to the default selected
5949
- // state when cloning options
5950
- } else if ( nodeName === "option" ) {
5951
- dest.selected = src.defaultSelected;
5952
-
5953
- // IE6-8 fails to set the defaultValue to the correct value when
5954
- // cloning other types of input fields
5955
- } else if ( nodeName === "input" || nodeName === "textarea" ) {
5956
- dest.defaultValue = src.defaultValue;
5957
- }
5958
-
5959
- // Event data gets referenced instead of copied if the expando
5960
- // gets copied too
5961
- dest.removeAttribute( jQuery.expando );
5962
- }
5963
-
5964
- jQuery.buildFragment = function( args, nodes, scripts ) {
5965
- var fragment, cacheable, cacheresults, doc;
5966
-
5967
- // nodes may contain either an explicit document object,
5968
- // a jQuery collection or context object.
5969
- // If nodes[0] contains a valid object to assign to doc
5970
- if ( nodes && nodes[0] ) {
5971
- doc = nodes[0].ownerDocument || nodes[0];
5972
- }
5973
-
5974
- // Ensure that an attr object doesn't incorrectly stand in as a document object
5975
- // Chrome and Firefox seem to allow this to occur and will throw exception
5976
- // Fixes #8950
5977
- if ( !doc.createDocumentFragment ) {
5978
- doc = document;
5979
- }
5980
-
5981
- // Only cache "small" (1/2 KB) HTML strings that are associated with the main document
5982
- // Cloning options loses the selected state, so don't cache them
5983
- // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
5984
- // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
5985
- if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && doc === document &&
5986
- args[0].charAt(0) === "<" && !rnocache.test( args[0] ) && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) {
5987
-
5988
- cacheable = true;
5989
-
5990
- cacheresults = jQuery.fragments[ args[0] ];
5991
- if ( cacheresults && cacheresults !== 1 ) {
5992
- fragment = cacheresults;
5993
- }
5994
- }
5995
-
5996
- if ( !fragment ) {
5997
- fragment = doc.createDocumentFragment();
5998
- jQuery.clean( args, doc, fragment, scripts );
5999
- }
6000
-
6001
- if ( cacheable ) {
6002
- jQuery.fragments[ args[0] ] = cacheresults ? fragment : 1;
6003
- }
6004
-
6005
- return { fragment: fragment, cacheable: cacheable };
6006
- };
6007
-
6008
- jQuery.fragments = {};
6009
-
6010
- jQuery.each({
6011
- appendTo: "append",
6012
- prependTo: "prepend",
6013
- insertBefore: "before",
6014
- insertAfter: "after",
6015
- replaceAll: "replaceWith"
6016
- }, function( name, original ) {
6017
- jQuery.fn[ name ] = function( selector ) {
6018
- var ret = [],
6019
- insert = jQuery( selector ),
6020
- parent = this.length === 1 && this[0].parentNode;
6021
-
6022
- if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
6023
- insert[ original ]( this[0] );
6024
- return this;
6025
-
6026
- } else {
6027
- for ( var i = 0, l = insert.length; i < l; i++ ) {
6028
- var elems = (i > 0 ? this.clone(true) : this).get();
6029
- jQuery( insert[i] )[ original ]( elems );
6030
- ret = ret.concat( elems );
6031
- }
6032
-
6033
- return this.pushStack( ret, name, insert.selector );
6034
- }
6035
- };
6036
- });
6037
-
6038
- function getAll( elem ) {
6039
- if ( "getElementsByTagName" in elem ) {
6040
- return elem.getElementsByTagName( "*" );
6041
-
6042
- } else if ( "querySelectorAll" in elem ) {
6043
- return elem.querySelectorAll( "*" );
6044
-
6045
- } else {
6046
- return [];
6047
- }
6048
- }
6049
-
6050
- // Used in clean, fixes the defaultChecked property
6051
- function fixDefaultChecked( elem ) {
6052
- if ( elem.type === "checkbox" || elem.type === "radio" ) {
6053
- elem.defaultChecked = elem.checked;
6054
- }
6055
- }
6056
- // Finds all inputs and passes them to fixDefaultChecked
6057
- function findInputs( elem ) {
6058
- if ( jQuery.nodeName( elem, "input" ) ) {
6059
- fixDefaultChecked( elem );
6060
- } else if ( "getElementsByTagName" in elem ) {
6061
- jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
6062
- }
6063
- }
6064
-
6065
- jQuery.extend({
6066
- clone: function( elem, dataAndEvents, deepDataAndEvents ) {
6067
- var clone = elem.cloneNode(true),
6068
- srcElements,
6069
- destElements,
6070
- i;
6071
-
6072
- if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
6073
- (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
6074
- // IE copies events bound via attachEvent when using cloneNode.
6075
- // Calling detachEvent on the clone will also remove the events
6076
- // from the original. In order to get around this, we use some
6077
- // proprietary methods to clear the events. Thanks to MooTools
6078
- // guys for this hotness.
6079
-
6080
- cloneFixAttributes( elem, clone );
6081
-
6082
- // Using Sizzle here is crazy slow, so we use getElementsByTagName
6083
- // instead
6084
- srcElements = getAll( elem );
6085
- destElements = getAll( clone );
6086
-
6087
- // Weird iteration because IE will replace the length property
6088
- // with an element if you are cloning the body and one of the
6089
- // elements on the page has a name or id of "length"
6090
- for ( i = 0; srcElements[i]; ++i ) {
6091
- // Ensure that the destination node is not null; Fixes #9587
6092
- if ( destElements[i] ) {
6093
- cloneFixAttributes( srcElements[i], destElements[i] );
6094
- }
6095
- }
6096
- }
6097
-
6098
- // Copy the events from the original to the clone
6099
- if ( dataAndEvents ) {
6100
- cloneCopyEvent( elem, clone );
6101
-
6102
- if ( deepDataAndEvents ) {
6103
- srcElements = getAll( elem );
6104
- destElements = getAll( clone );
6105
-
6106
- for ( i = 0; srcElements[i]; ++i ) {
6107
- cloneCopyEvent( srcElements[i], destElements[i] );
6108
- }
6109
- }
6110
- }
6111
-
6112
- srcElements = destElements = null;
6113
-
6114
- // Return the cloned set
6115
- return clone;
6116
- },
6117
-
6118
- clean: function( elems, context, fragment, scripts ) {
6119
- var checkScriptType;
6120
-
6121
- context = context || document;
6122
-
6123
- // !context.createElement fails in IE with an error but returns typeof 'object'
6124
- if ( typeof context.createElement === "undefined" ) {
6125
- context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
6126
- }
6127
-
6128
- var ret = [], j;
6129
-
6130
- for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
6131
- if ( typeof elem === "number" ) {
6132
- elem += "";
6133
- }
6134
-
6135
- if ( !elem ) {
6136
- continue;
6137
- }
6138
-
6139
- // Convert html string into DOM nodes
6140
- if ( typeof elem === "string" ) {
6141
- if ( !rhtml.test( elem ) ) {
6142
- elem = context.createTextNode( elem );
6143
- } else {
6144
- // Fix "XHTML"-style tags in all browsers
6145
- elem = elem.replace(rxhtmlTag, "<$1></$2>");
6146
-
6147
- // Trim whitespace, otherwise indexOf won't work as expected
6148
- var tag = (rtagName.exec( elem ) || ["", ""])[1].toLowerCase(),
6149
- wrap = wrapMap[ tag ] || wrapMap._default,
6150
- depth = wrap[0],
6151
- div = context.createElement("div");
6152
-
6153
- // Go to html and back, then peel off extra wrappers
6154
- div.innerHTML = wrap[1] + elem + wrap[2];
6155
-
6156
- // Move to the right depth
6157
- while ( depth-- ) {
6158
- div = div.lastChild;
6159
- }
6160
-
6161
- // Remove IE's autoinserted <tbody> from table fragments
6162
- if ( !jQuery.support.tbody ) {
6163
-
6164
- // String was a <table>, *may* have spurious <tbody>
6165
- var hasBody = rtbody.test(elem),
6166
- tbody = tag === "table" && !hasBody ?
6167
- div.firstChild && div.firstChild.childNodes :
6168
-
6169
- // String was a bare <thead> or <tfoot>
6170
- wrap[1] === "<table>" && !hasBody ?
6171
- div.childNodes :
6172
- [];
6173
-
6174
- for ( j = tbody.length - 1; j >= 0 ; --j ) {
6175
- if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
6176
- tbody[ j ].parentNode.removeChild( tbody[ j ] );
6177
- }
6178
- }
6179
- }
6180
-
6181
- // IE completely kills leading whitespace when innerHTML is used
6182
- if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
6183
- div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
6184
- }
6185
-
6186
- elem = div.childNodes;
6187
- }
6188
- }
6189
-
6190
- // Resets defaultChecked for any radios and checkboxes
6191
- // about to be appended to the DOM in IE 6/7 (#8060)
6192
- var len;
6193
- if ( !jQuery.support.appendChecked ) {
6194
- if ( elem[0] && typeof (len = elem.length) === "number" ) {
6195
- for ( j = 0; j < len; j++ ) {
6196
- findInputs( elem[j] );
6197
- }
6198
- } else {
6199
- findInputs( elem );
6200
- }
6201
- }
6202
-
6203
- if ( elem.nodeType ) {
6204
- ret.push( elem );
6205
- } else {
6206
- ret = jQuery.merge( ret, elem );
6207
- }
6208
- }
6209
-
6210
- if ( fragment ) {
6211
- checkScriptType = function( elem ) {
6212
- return !elem.type || rscriptType.test( elem.type );
6213
- };
6214
- for ( i = 0; ret[i]; i++ ) {
6215
- if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
6216
- scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
6217
-
6218
- } else {
6219
- if ( ret[i].nodeType === 1 ) {
6220
- var jsTags = jQuery.grep( ret[i].getElementsByTagName( "script" ), checkScriptType );
6221
-
6222
- ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
6223
- }
6224
- fragment.appendChild( ret[i] );
6225
- }
6226
- }
6227
- }
6228
-
6229
- return ret;
6230
- },
6231
-
6232
- cleanData: function( elems ) {
6233
- var data, id, cache = jQuery.cache, internalKey = jQuery.expando, special = jQuery.event.special,
6234
- deleteExpando = jQuery.support.deleteExpando;
6235
-
6236
- for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
6237
- if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
6238
- continue;
6239
- }
6240
-
6241
- id = elem[ jQuery.expando ];
6242
-
6243
- if ( id ) {
6244
- data = cache[ id ] && cache[ id ][ internalKey ];
6245
-
6246
- if ( data && data.events ) {
6247
- for ( var type in data.events ) {
6248
- if ( special[ type ] ) {
6249
- jQuery.event.remove( elem, type );
6250
-
6251
- // This is a shortcut to avoid jQuery.event.remove's overhead
6252
- } else {
6253
- jQuery.removeEvent( elem, type, data.handle );
6254
- }
6255
- }
6256
-
6257
- // Null the DOM reference to avoid IE6/7/8 leak (#7054)
6258
- if ( data.handle ) {
6259
- data.handle.elem = null;
6260
- }
6261
- }
6262
-
6263
- if ( deleteExpando ) {
6264
- delete elem[ jQuery.expando ];
6265
-
6266
- } else if ( elem.removeAttribute ) {
6267
- elem.removeAttribute( jQuery.expando );
6268
- }
6269
-
6270
- delete cache[ id ];
6271
- }
6272
- }
6273
- }
6274
- });
6275
-
6276
- function evalScript( i, elem ) {
6277
- if ( elem.src ) {
6278
- jQuery.ajax({
6279
- url: elem.src,
6280
- async: false,
6281
- dataType: "script"
6282
- });
6283
- } else {
6284
- jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) );
6285
- }
6286
-
6287
- if ( elem.parentNode ) {
6288
- elem.parentNode.removeChild( elem );
6289
- }
6290
- }
6291
-
6292
-
6293
-
6294
-
6295
- var ralpha = /alpha\([^)]*\)/i,
6296
- ropacity = /opacity=([^)]*)/,
6297
- // fixed for IE9, see #8346
6298
- rupper = /([A-Z]|^ms)/g,
6299
- rnumpx = /^-?\d+(?:px)?$/i,
6300
- rnum = /^-?\d/,
6301
- rrelNum = /^([\-+])=([\-+.\de]+)/,
6302
-
6303
- cssShow = { position: "absolute", visibility: "hidden", display: "block" },
6304
- cssWidth = [ "Left", "Right" ],
6305
- cssHeight = [ "Top", "Bottom" ],
6306
- curCSS,
6307
-
6308
- getComputedStyle,
6309
- currentStyle;
6310
-
6311
- jQuery.fn.css = function( name, value ) {
6312
- // Setting 'undefined' is a no-op
6313
- if ( arguments.length === 2 && value === undefined ) {
6314
- return this;
6315
- }
6316
-
6317
- return jQuery.access( this, name, value, true, function( elem, name, value ) {
6318
- return value !== undefined ?
6319
- jQuery.style( elem, name, value ) :
6320
- jQuery.css( elem, name );
6321
- });
6322
- };
6323
-
6324
- jQuery.extend({
6325
- // Add in style property hooks for overriding the default
6326
- // behavior of getting and setting a style property
6327
- cssHooks: {
6328
- opacity: {
6329
- get: function( elem, computed ) {
6330
- if ( computed ) {
6331
- // We should always get a number back from opacity
6332
- var ret = curCSS( elem, "opacity", "opacity" );
6333
- return ret === "" ? "1" : ret;
6334
-
6335
- } else {
6336
- return elem.style.opacity;
6337
- }
6338
- }
6339
- }
6340
- },
6341
-
6342
- // Exclude the following css properties to add px
6343
- cssNumber: {
6344
- "fillOpacity": true,
6345
- "fontWeight": true,
6346
- "lineHeight": true,
6347
- "opacity": true,
6348
- "orphans": true,
6349
- "widows": true,
6350
- "zIndex": true,
6351
- "zoom": true
6352
- },
6353
-
6354
- // Add in properties whose names you wish to fix before
6355
- // setting or getting the value
6356
- cssProps: {
6357
- // normalize float css property
6358
- "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
6359
- },
6360
-
6361
- // Get and set the style property on a DOM Node
6362
- style: function( elem, name, value, extra ) {
6363
- // Don't set styles on text and comment nodes
6364
- if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
6365
- return;
6366
- }
6367
-
6368
- // Make sure that we're working with the right name
6369
- var ret, type, origName = jQuery.camelCase( name ),
6370
- style = elem.style, hooks = jQuery.cssHooks[ origName ];
6371
-
6372
- name = jQuery.cssProps[ origName ] || origName;
6373
-
6374
- // Check if we're setting a value
6375
- if ( value !== undefined ) {
6376
- type = typeof value;
6377
-
6378
- // convert relative number strings (+= or -=) to relative numbers. #7345
6379
- if ( type === "string" && (ret = rrelNum.exec( value )) ) {
6380
- value = ( +( ret[1] + 1) * +ret[2] ) + parseFloat( jQuery.css( elem, name ) );
6381
- // Fixes bug #9237
6382
- type = "number";
6383
- }
6384
-
6385
- // Make sure that NaN and null values aren't set. See: #7116
6386
- if ( value == null || type === "number" && isNaN( value ) ) {
6387
- return;
6388
- }
6389
-
6390
- // If a number was passed in, add 'px' to the (except for certain CSS properties)
6391
- if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
6392
- value += "px";
6393
- }
6394
-
6395
- // If a hook was provided, use that value, otherwise just set the specified value
6396
- if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
6397
- // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
6398
- // Fixes bug #5509
6399
- try {
6400
- style[ name ] = value;
6401
- } catch(e) {}
6402
- }
6403
-
6404
- } else {
6405
- // If a hook was provided get the non-computed value from there
6406
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
6407
- return ret;
6408
- }
6409
-
6410
- // Otherwise just get the value from the style object
6411
- return style[ name ];
6412
- }
6413
- },
6414
-
6415
- css: function( elem, name, extra ) {
6416
- var ret, hooks;
6417
-
6418
- // Make sure that we're working with the right name
6419
- name = jQuery.camelCase( name );
6420
- hooks = jQuery.cssHooks[ name ];
6421
- name = jQuery.cssProps[ name ] || name;
6422
-
6423
- // cssFloat needs a special treatment
6424
- if ( name === "cssFloat" ) {
6425
- name = "float";
6426
- }
6427
-
6428
- // If a hook was provided get the computed value from there
6429
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
6430
- return ret;
6431
-
6432
- // Otherwise, if a way to get the computed value exists, use that
6433
- } else if ( curCSS ) {
6434
- return curCSS( elem, name );
6435
- }
6436
- },
6437
-
6438
- // A method for quickly swapping in/out CSS properties to get correct calculations
6439
- swap: function( elem, options, callback ) {
6440
- var old = {};
6441
-
6442
- // Remember the old values, and insert the new ones
6443
- for ( var name in options ) {
6444
- old[ name ] = elem.style[ name ];
6445
- elem.style[ name ] = options[ name ];
6446
- }
6447
-
6448
- callback.call( elem );
6449
-
6450
- // Revert the old values
6451
- for ( name in options ) {
6452
- elem.style[ name ] = old[ name ];
6453
- }
6454
- }
6455
- });
6456
-
6457
- // DEPRECATED, Use jQuery.css() instead
6458
- jQuery.curCSS = jQuery.css;
6459
-
6460
- jQuery.each(["height", "width"], function( i, name ) {
6461
- jQuery.cssHooks[ name ] = {
6462
- get: function( elem, computed, extra ) {
6463
- var val;
6464
-
6465
- if ( computed ) {
6466
- if ( elem.offsetWidth !== 0 ) {
6467
- return getWH( elem, name, extra );
6468
- } else {
6469
- jQuery.swap( elem, cssShow, function() {
6470
- val = getWH( elem, name, extra );
6471
- });
6472
- }
6473
-
6474
- return val;
6475
- }
6476
- },
6477
-
6478
- set: function( elem, value ) {
6479
- if ( rnumpx.test( value ) ) {
6480
- // ignore negative width and height values #1599
6481
- value = parseFloat( value );
6482
-
6483
- if ( value >= 0 ) {
6484
- return value + "px";
6485
- }
6486
-
6487
- } else {
6488
- return value;
6489
- }
6490
- }
6491
- };
6492
- });
6493
-
6494
- if ( !jQuery.support.opacity ) {
6495
- jQuery.cssHooks.opacity = {
6496
- get: function( elem, computed ) {
6497
- // IE uses filters for opacity
6498
- return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
6499
- ( parseFloat( RegExp.$1 ) / 100 ) + "" :
6500
- computed ? "1" : "";
6501
- },
6502
-
6503
- set: function( elem, value ) {
6504
- var style = elem.style,
6505
- currentStyle = elem.currentStyle,
6506
- opacity = jQuery.isNaN( value ) ? "" : "alpha(opacity=" + value * 100 + ")",
6507
- filter = currentStyle && currentStyle.filter || style.filter || "";
6508
-
6509
- // IE has trouble with opacity if it does not have layout
6510
- // Force it by setting the zoom level
6511
- style.zoom = 1;
6512
-
6513
- // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
6514
- if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" ) {
6515
-
6516
- // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
6517
- // if "filter:" is present at all, clearType is disabled, we want to avoid this
6518
- // style.removeAttribute is IE Only, but so apparently is this code path...
6519
- style.removeAttribute( "filter" );
6520
-
6521
- // if there there is no filter style applied in a css rule, we are done
6522
- if ( currentStyle && !currentStyle.filter ) {
6523
- return;
6524
- }
6525
- }
6526
-
6527
- // otherwise, set new filter values
6528
- style.filter = ralpha.test( filter ) ?
6529
- filter.replace( ralpha, opacity ) :
6530
- filter + " " + opacity;
6531
- }
6532
- };
6533
- }
6534
-
6535
- jQuery(function() {
6536
- // This hook cannot be added until DOM ready because the support test
6537
- // for it is not run until after DOM ready
6538
- if ( !jQuery.support.reliableMarginRight ) {
6539
- jQuery.cssHooks.marginRight = {
6540
- get: function( elem, computed ) {
6541
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
6542
- // Work around by temporarily setting element display to inline-block
6543
- var ret;
6544
- jQuery.swap( elem, { "display": "inline-block" }, function() {
6545
- if ( computed ) {
6546
- ret = curCSS( elem, "margin-right", "marginRight" );
6547
- } else {
6548
- ret = elem.style.marginRight;
6549
- }
6550
- });
6551
- return ret;
6552
- }
6553
- };
6554
- }
6555
- });
6556
-
6557
- if ( document.defaultView && document.defaultView.getComputedStyle ) {
6558
- getComputedStyle = function( elem, name ) {
6559
- var ret, defaultView, computedStyle;
6560
-
6561
- name = name.replace( rupper, "-$1" ).toLowerCase();
6562
-
6563
- if ( !(defaultView = elem.ownerDocument.defaultView) ) {
6564
- return undefined;
6565
- }
6566
-
6567
- if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
6568
- ret = computedStyle.getPropertyValue( name );
6569
- if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
6570
- ret = jQuery.style( elem, name );
6571
- }
6572
- }
6573
-
6574
- return ret;
6575
- };
6576
- }
6577
-
6578
- if ( document.documentElement.currentStyle ) {
6579
- currentStyle = function( elem, name ) {
6580
- var left,
6581
- ret = elem.currentStyle && elem.currentStyle[ name ],
6582
- rsLeft = elem.runtimeStyle && elem.runtimeStyle[ name ],
6583
- style = elem.style;
6584
-
6585
- // From the awesome hack by Dean Edwards
6586
- // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
6587
-
6588
- // If we're not dealing with a regular pixel number
6589
- // but a number that has a weird ending, we need to convert it to pixels
6590
- if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
6591
- // Remember the original values
6592
- left = style.left;
6593
-
6594
- // Put in the new values to get a computed value out
6595
- if ( rsLeft ) {
6596
- elem.runtimeStyle.left = elem.currentStyle.left;
6597
- }
6598
- style.left = name === "fontSize" ? "1em" : (ret || 0);
6599
- ret = style.pixelLeft + "px";
6600
-
6601
- // Revert the changed values
6602
- style.left = left;
6603
- if ( rsLeft ) {
6604
- elem.runtimeStyle.left = rsLeft;
6605
- }
6606
- }
6607
-
6608
- return ret === "" ? "auto" : ret;
6609
- };
6610
- }
6611
-
6612
- curCSS = getComputedStyle || currentStyle;
6613
-
6614
- function getWH( elem, name, extra ) {
6615
-
6616
- // Start with offset property
6617
- var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
6618
- which = name === "width" ? cssWidth : cssHeight;
6619
-
6620
- if ( val > 0 ) {
6621
- if ( extra !== "border" ) {
6622
- jQuery.each( which, function() {
6623
- if ( !extra ) {
6624
- val -= parseFloat( jQuery.css( elem, "padding" + this ) ) || 0;
6625
- }
6626
- if ( extra === "margin" ) {
6627
- val += parseFloat( jQuery.css( elem, extra + this ) ) || 0;
6628
- } else {
6629
- val -= parseFloat( jQuery.css( elem, "border" + this + "Width" ) ) || 0;
6630
- }
6631
- });
6632
- }
6633
-
6634
- return val + "px";
6635
- }
6636
-
6637
- // Fall back to computed then uncomputed css if necessary
6638
- val = curCSS( elem, name, name );
6639
- if ( val < 0 || val == null ) {
6640
- val = elem.style[ name ] || 0;
6641
- }
6642
- // Normalize "", auto, and prepare for extra
6643
- val = parseFloat( val ) || 0;
6644
-
6645
- // Add padding, border, margin
6646
- if ( extra ) {
6647
- jQuery.each( which, function() {
6648
- val += parseFloat( jQuery.css( elem, "padding" + this ) ) || 0;
6649
- if ( extra !== "padding" ) {
6650
- val += parseFloat( jQuery.css( elem, "border" + this + "Width" ) ) || 0;
6651
- }
6652
- if ( extra === "margin" ) {
6653
- val += parseFloat( jQuery.css( elem, extra + this ) ) || 0;
6654
- }
6655
- });
6656
- }
6657
-
6658
- return val + "px";
6659
- }
6660
-
6661
- if ( jQuery.expr && jQuery.expr.filters ) {
6662
- jQuery.expr.filters.hidden = function( elem ) {
6663
- var width = elem.offsetWidth,
6664
- height = elem.offsetHeight;
6665
-
6666
- return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && (elem.style.display || jQuery.css( elem, "display" )) === "none");
6667
- };
6668
-
6669
- jQuery.expr.filters.visible = function( elem ) {
6670
- return !jQuery.expr.filters.hidden( elem );
6671
- };
6672
- }
6673
-
6674
-
6675
-
6676
-
6677
- var r20 = /%20/g,
6678
- rbracket = /\[\]$/,
6679
- rCRLF = /\r?\n/g,
6680
- rhash = /#.*$/,
6681
- rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
6682
- rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
6683
- // #7653, #8125, #8152: local protocol detection
6684
- rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
6685
- rnoContent = /^(?:GET|HEAD)$/,
6686
- rprotocol = /^\/\//,
6687
- rquery = /\?/,
6688
- rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
6689
- rselectTextarea = /^(?:select|textarea)/i,
6690
- rspacesAjax = /\s+/,
6691
- rts = /([?&])_=[^&]*/,
6692
- rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
6693
-
6694
- // Keep a copy of the old load method
6695
- _load = jQuery.fn.load,
6696
-
6697
- /* Prefilters
6698
- * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
6699
- * 2) These are called:
6700
- * - BEFORE asking for a transport
6701
- * - AFTER param serialization (s.data is a string if s.processData is true)
6702
- * 3) key is the dataType
6703
- * 4) the catchall symbol "*" can be used
6704
- * 5) execution will start with transport dataType and THEN continue down to "*" if needed
6705
- */
6706
- prefilters = {},
6707
-
6708
- /* Transports bindings
6709
- * 1) key is the dataType
6710
- * 2) the catchall symbol "*" can be used
6711
- * 3) selection will start with transport dataType and THEN go to "*" if needed
6712
- */
6713
- transports = {},
6714
-
6715
- // Document location
6716
- ajaxLocation,
6717
-
6718
- // Document location segments
6719
- ajaxLocParts,
6720
-
6721
- // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
6722
- allTypes = ["*/"] + ["*"];
6723
-
6724
- // #8138, IE may throw an exception when accessing
6725
- // a field from window.location if document.domain has been set
6726
- try {
6727
- ajaxLocation = location.href;
6728
- } catch( e ) {
6729
- // Use the href attribute of an A element
6730
- // since IE will modify it given document.location
6731
- ajaxLocation = document.createElement( "a" );
6732
- ajaxLocation.href = "";
6733
- ajaxLocation = ajaxLocation.href;
6734
- }
6735
-
6736
- // Segment location into parts
6737
- ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
6738
-
6739
- // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
6740
- function addToPrefiltersOrTransports( structure ) {
6741
-
6742
- // dataTypeExpression is optional and defaults to "*"
6743
- return function( dataTypeExpression, func ) {
6744
-
6745
- if ( typeof dataTypeExpression !== "string" ) {
6746
- func = dataTypeExpression;
6747
- dataTypeExpression = "*";
6748
- }
6749
-
6750
- if ( jQuery.isFunction( func ) ) {
6751
- var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
6752
- i = 0,
6753
- length = dataTypes.length,
6754
- dataType,
6755
- list,
6756
- placeBefore;
6757
-
6758
- // For each dataType in the dataTypeExpression
6759
- for(; i < length; i++ ) {
6760
- dataType = dataTypes[ i ];
6761
- // We control if we're asked to add before
6762
- // any existing element
6763
- placeBefore = /^\+/.test( dataType );
6764
- if ( placeBefore ) {
6765
- dataType = dataType.substr( 1 ) || "*";
6766
- }
6767
- list = structure[ dataType ] = structure[ dataType ] || [];
6768
- // then we add to the structure accordingly
6769
- list[ placeBefore ? "unshift" : "push" ]( func );
6770
- }
6771
- }
6772
- };
6773
- }
6774
-
6775
- // Base inspection function for prefilters and transports
6776
- function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
6777
- dataType /* internal */, inspected /* internal */ ) {
6778
-
6779
- dataType = dataType || options.dataTypes[ 0 ];
6780
- inspected = inspected || {};
6781
-
6782
- inspected[ dataType ] = true;
6783
-
6784
- var list = structure[ dataType ],
6785
- i = 0,
6786
- length = list ? list.length : 0,
6787
- executeOnly = ( structure === prefilters ),
6788
- selection;
6789
-
6790
- for(; i < length && ( executeOnly || !selection ); i++ ) {
6791
- selection = list[ i ]( options, originalOptions, jqXHR );
6792
- // If we got redirected to another dataType
6793
- // we try there if executing only and not done already
6794
- if ( typeof selection === "string" ) {
6795
- if ( !executeOnly || inspected[ selection ] ) {
6796
- selection = undefined;
6797
- } else {
6798
- options.dataTypes.unshift( selection );
6799
- selection = inspectPrefiltersOrTransports(
6800
- structure, options, originalOptions, jqXHR, selection, inspected );
6801
- }
6802
- }
6803
- }
6804
- // If we're only executing or nothing was selected
6805
- // we try the catchall dataType if not done already
6806
- if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
6807
- selection = inspectPrefiltersOrTransports(
6808
- structure, options, originalOptions, jqXHR, "*", inspected );
6809
- }
6810
- // unnecessary when only executing (prefilters)
6811
- // but it'll be ignored by the caller in that case
6812
- return selection;
6813
- }
6814
-
6815
- // A special extend for ajax options
6816
- // that takes "flat" options (not to be deep extended)
6817
- // Fixes #9887
6818
- function ajaxExtend( target, src ) {
6819
- var key, deep,
6820
- flatOptions = jQuery.ajaxSettings.flatOptions || {};
6821
- for( key in src ) {
6822
- if ( src[ key ] !== undefined ) {
6823
- ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
6824
- }
6825
- }
6826
- if ( deep ) {
6827
- jQuery.extend( true, target, deep );
6828
- }
6829
- }
6830
-
6831
- jQuery.fn.extend({
6832
- load: function( url, params, callback ) {
6833
- if ( typeof url !== "string" && _load ) {
6834
- return _load.apply( this, arguments );
6835
-
6836
- // Don't do a request if no elements are being requested
6837
- } else if ( !this.length ) {
6838
- return this;
6839
- }
6840
-
6841
- var off = url.indexOf( " " );
6842
- if ( off >= 0 ) {
6843
- var selector = url.slice( off, url.length );
6844
- url = url.slice( 0, off );
6845
- }
6846
-
6847
- // Default to a GET request
6848
- var type = "GET";
6849
-
6850
- // If the second parameter was provided
6851
- if ( params ) {
6852
- // If it's a function
6853
- if ( jQuery.isFunction( params ) ) {
6854
- // We assume that it's the callback
6855
- callback = params;
6856
- params = undefined;
6857
-
6858
- // Otherwise, build a param string
6859
- } else if ( typeof params === "object" ) {
6860
- params = jQuery.param( params, jQuery.ajaxSettings.traditional );
6861
- type = "POST";
6862
- }
6863
- }
6864
-
6865
- var self = this;
6866
-
6867
- // Request the remote document
6868
- jQuery.ajax({
6869
- url: url,
6870
- type: type,
6871
- dataType: "html",
6872
- data: params,
6873
- // Complete callback (responseText is used internally)
6874
- complete: function( jqXHR, status, responseText ) {
6875
- // Store the response as specified by the jqXHR object
6876
- responseText = jqXHR.responseText;
6877
- // If successful, inject the HTML into all the matched elements
6878
- if ( jqXHR.isResolved() ) {
6879
- // #4825: Get the actual response in case
6880
- // a dataFilter is present in ajaxSettings
6881
- jqXHR.done(function( r ) {
6882
- responseText = r;
6883
- });
6884
- // See if a selector was specified
6885
- self.html( selector ?
6886
- // Create a dummy div to hold the results
6887
- jQuery("<div>")
6888
- // inject the contents of the document in, removing the scripts
6889
- // to avoid any 'Permission Denied' errors in IE
6890
- .append(responseText.replace(rscript, ""))
6891
-
6892
- // Locate the specified elements
6893
- .find(selector) :
6894
-
6895
- // If not, just inject the full result
6896
- responseText );
6897
- }
6898
-
6899
- if ( callback ) {
6900
- self.each( callback, [ responseText, status, jqXHR ] );
6901
- }
6902
- }
6903
- });
6904
-
6905
- return this;
6906
- },
6907
-
6908
- serialize: function() {
6909
- return jQuery.param( this.serializeArray() );
6910
- },
6911
-
6912
- serializeArray: function() {
6913
- return this.map(function(){
6914
- return this.elements ? jQuery.makeArray( this.elements ) : this;
6915
- })
6916
- .filter(function(){
6917
- return this.name && !this.disabled &&
6918
- ( this.checked || rselectTextarea.test( this.nodeName ) ||
6919
- rinput.test( this.type ) );
6920
- })
6921
- .map(function( i, elem ){
6922
- var val = jQuery( this ).val();
6923
-
6924
- return val == null ?
6925
- null :
6926
- jQuery.isArray( val ) ?
6927
- jQuery.map( val, function( val, i ){
6928
- return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
6929
- }) :
6930
- { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
6931
- }).get();
6932
- }
6933
- });
6934
-
6935
- // Attach a bunch of functions for handling common AJAX events
6936
- jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
6937
- jQuery.fn[ o ] = function( f ){
6938
- return this.bind( o, f );
6939
- };
6940
- });
6941
-
6942
- jQuery.each( [ "get", "post" ], function( i, method ) {
6943
- jQuery[ method ] = function( url, data, callback, type ) {
6944
- // shift arguments if data argument was omitted
6945
- if ( jQuery.isFunction( data ) ) {
6946
- type = type || callback;
6947
- callback = data;
6948
- data = undefined;
6949
- }
6950
-
6951
- return jQuery.ajax({
6952
- type: method,
6953
- url: url,
6954
- data: data,
6955
- success: callback,
6956
- dataType: type
6957
- });
6958
- };
6959
- });
6960
-
6961
- jQuery.extend({
6962
-
6963
- getScript: function( url, callback ) {
6964
- return jQuery.get( url, undefined, callback, "script" );
6965
- },
6966
-
6967
- getJSON: function( url, data, callback ) {
6968
- return jQuery.get( url, data, callback, "json" );
6969
- },
6970
-
6971
- // Creates a full fledged settings object into target
6972
- // with both ajaxSettings and settings fields.
6973
- // If target is omitted, writes into ajaxSettings.
6974
- ajaxSetup: function( target, settings ) {
6975
- if ( settings ) {
6976
- // Building a settings object
6977
- ajaxExtend( target, jQuery.ajaxSettings );
6978
- } else {
6979
- // Extending ajaxSettings
6980
- settings = target;
6981
- target = jQuery.ajaxSettings;
6982
- }
6983
- ajaxExtend( target, settings );
6984
- return target;
6985
- },
6986
-
6987
- ajaxSettings: {
6988
- url: ajaxLocation,
6989
- isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
6990
- global: true,
6991
- type: "GET",
6992
- contentType: "application/x-www-form-urlencoded",
6993
- processData: true,
6994
- async: true,
6995
- /*
6996
- timeout: 0,
6997
- data: null,
6998
- dataType: null,
6999
- username: null,
7000
- password: null,
7001
- cache: null,
7002
- traditional: false,
7003
- headers: {},
7004
- */
7005
-
7006
- accepts: {
7007
- xml: "application/xml, text/xml",
7008
- html: "text/html",
7009
- text: "text/plain",
7010
- json: "application/json, text/javascript",
7011
- "*": allTypes
7012
- },
7013
-
7014
- contents: {
7015
- xml: /xml/,
7016
- html: /html/,
7017
- json: /json/
7018
- },
7019
-
7020
- responseFields: {
7021
- xml: "responseXML",
7022
- text: "responseText"
7023
- },
7024
-
7025
- // List of data converters
7026
- // 1) key format is "source_type destination_type" (a single space in-between)
7027
- // 2) the catchall symbol "*" can be used for source_type
7028
- converters: {
7029
-
7030
- // Convert anything to text
7031
- "* text": window.String,
7032
-
7033
- // Text to html (true = no transformation)
7034
- "text html": true,
7035
-
7036
- // Evaluate text as a json expression
7037
- "text json": jQuery.parseJSON,
7038
-
7039
- // Parse text as xml
7040
- "text xml": jQuery.parseXML
7041
- },
7042
-
7043
- // For options that shouldn't be deep extended:
7044
- // you can add your own custom options here if
7045
- // and when you create one that shouldn't be
7046
- // deep extended (see ajaxExtend)
7047
- flatOptions: {
7048
- context: true,
7049
- url: true
7050
- }
7051
- },
7052
-
7053
- ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
7054
- ajaxTransport: addToPrefiltersOrTransports( transports ),
7055
-
7056
- // Main method
7057
- ajax: function( url, options ) {
7058
-
7059
- // If url is an object, simulate pre-1.5 signature
7060
- if ( typeof url === "object" ) {
7061
- options = url;
7062
- url = undefined;
7063
- }
7064
-
7065
- // Force options to be an object
7066
- options = options || {};
7067
-
7068
- var // Create the final options object
7069
- s = jQuery.ajaxSetup( {}, options ),
7070
- // Callbacks context
7071
- callbackContext = s.context || s,
7072
- // Context for global events
7073
- // It's the callbackContext if one was provided in the options
7074
- // and if it's a DOM node or a jQuery collection
7075
- globalEventContext = callbackContext !== s &&
7076
- ( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
7077
- jQuery( callbackContext ) : jQuery.event,
7078
- // Deferreds
7079
- deferred = jQuery.Deferred(),
7080
- completeDeferred = jQuery._Deferred(),
7081
- // Status-dependent callbacks
7082
- statusCode = s.statusCode || {},
7083
- // ifModified key
7084
- ifModifiedKey,
7085
- // Headers (they are sent all at once)
7086
- requestHeaders = {},
7087
- requestHeadersNames = {},
7088
- // Response headers
7089
- responseHeadersString,
7090
- responseHeaders,
7091
- // transport
7092
- transport,
7093
- // timeout handle
7094
- timeoutTimer,
7095
- // Cross-domain detection vars
7096
- parts,
7097
- // The jqXHR state
7098
- state = 0,
7099
- // To know if global events are to be dispatched
7100
- fireGlobals,
7101
- // Loop variable
7102
- i,
7103
- // Fake xhr
7104
- jqXHR = {
7105
-
7106
- readyState: 0,
7107
-
7108
- // Caches the header
7109
- setRequestHeader: function( name, value ) {
7110
- if ( !state ) {
7111
- var lname = name.toLowerCase();
7112
- name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
7113
- requestHeaders[ name ] = value;
7114
- }
7115
- return this;
7116
- },
7117
-
7118
- // Raw string
7119
- getAllResponseHeaders: function() {
7120
- return state === 2 ? responseHeadersString : null;
7121
- },
7122
-
7123
- // Builds headers hashtable if needed
7124
- getResponseHeader: function( key ) {
7125
- var match;
7126
- if ( state === 2 ) {
7127
- if ( !responseHeaders ) {
7128
- responseHeaders = {};
7129
- while( ( match = rheaders.exec( responseHeadersString ) ) ) {
7130
- responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
7131
- }
7132
- }
7133
- match = responseHeaders[ key.toLowerCase() ];
7134
- }
7135
- return match === undefined ? null : match;
7136
- },
7137
-
7138
- // Overrides response content-type header
7139
- overrideMimeType: function( type ) {
7140
- if ( !state ) {
7141
- s.mimeType = type;
7142
- }
7143
- return this;
7144
- },
7145
-
7146
- // Cancel the request
7147
- abort: function( statusText ) {
7148
- statusText = statusText || "abort";
7149
- if ( transport ) {
7150
- transport.abort( statusText );
7151
- }
7152
- done( 0, statusText );
7153
- return this;
7154
- }
7155
- };
7156
-
7157
- // Callback for when everything is done
7158
- // It is defined here because jslint complains if it is declared
7159
- // at the end of the function (which would be more logical and readable)
7160
- function done( status, nativeStatusText, responses, headers ) {
7161
-
7162
- // Called once
7163
- if ( state === 2 ) {
7164
- return;
7165
- }
7166
-
7167
- // State is "done" now
7168
- state = 2;
7169
-
7170
- // Clear timeout if it exists
7171
- if ( timeoutTimer ) {
7172
- clearTimeout( timeoutTimer );
7173
- }
7174
-
7175
- // Dereference transport for early garbage collection
7176
- // (no matter how long the jqXHR object will be used)
7177
- transport = undefined;
7178
-
7179
- // Cache response headers
7180
- responseHeadersString = headers || "";
7181
-
7182
- // Set readyState
7183
- jqXHR.readyState = status > 0 ? 4 : 0;
7184
-
7185
- var isSuccess,
7186
- success,
7187
- error,
7188
- statusText = nativeStatusText,
7189
- response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,
7190
- lastModified,
7191
- etag;
7192
-
7193
- // If successful, handle type chaining
7194
- if ( status >= 200 && status < 300 || status === 304 ) {
7195
-
7196
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
7197
- if ( s.ifModified ) {
7198
-
7199
- if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) {
7200
- jQuery.lastModified[ ifModifiedKey ] = lastModified;
7201
- }
7202
- if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) {
7203
- jQuery.etag[ ifModifiedKey ] = etag;
7204
- }
7205
- }
7206
-
7207
- // If not modified
7208
- if ( status === 304 ) {
7209
-
7210
- statusText = "notmodified";
7211
- isSuccess = true;
7212
-
7213
- // If we have data
7214
- } else {
7215
-
7216
- try {
7217
- success = ajaxConvert( s, response );
7218
- statusText = "success";
7219
- isSuccess = true;
7220
- } catch(e) {
7221
- // We have a parsererror
7222
- statusText = "parsererror";
7223
- error = e;
7224
- }
7225
- }
7226
- } else {
7227
- // We extract error from statusText
7228
- // then normalize statusText and status for non-aborts
7229
- error = statusText;
7230
- if( !statusText || status ) {
7231
- statusText = "error";
7232
- if ( status < 0 ) {
7233
- status = 0;
7234
- }
7235
- }
7236
- }
7237
-
7238
- // Set data for the fake xhr object
7239
- jqXHR.status = status;
7240
- jqXHR.statusText = "" + ( nativeStatusText || statusText );
7241
-
7242
- // Success/Error
7243
- if ( isSuccess ) {
7244
- deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
7245
- } else {
7246
- deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
7247
- }
7248
-
7249
- // Status-dependent callbacks
7250
- jqXHR.statusCode( statusCode );
7251
- statusCode = undefined;
7252
-
7253
- if ( fireGlobals ) {
7254
- globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
7255
- [ jqXHR, s, isSuccess ? success : error ] );
7256
- }
7257
-
7258
- // Complete
7259
- completeDeferred.resolveWith( callbackContext, [ jqXHR, statusText ] );
7260
-
7261
- if ( fireGlobals ) {
7262
- globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
7263
- // Handle the global AJAX counter
7264
- if ( !( --jQuery.active ) ) {
7265
- jQuery.event.trigger( "ajaxStop" );
7266
- }
7267
- }
7268
- }
7269
-
7270
- // Attach deferreds
7271
- deferred.promise( jqXHR );
7272
- jqXHR.success = jqXHR.done;
7273
- jqXHR.error = jqXHR.fail;
7274
- jqXHR.complete = completeDeferred.done;
7275
-
7276
- // Status-dependent callbacks
7277
- jqXHR.statusCode = function( map ) {
7278
- if ( map ) {
7279
- var tmp;
7280
- if ( state < 2 ) {
7281
- for( tmp in map ) {
7282
- statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
7283
- }
7284
- } else {
7285
- tmp = map[ jqXHR.status ];
7286
- jqXHR.then( tmp, tmp );
7287
- }
7288
- }
7289
- return this;
7290
- };
7291
-
7292
- // Remove hash character (#7531: and string promotion)
7293
- // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
7294
- // We also use the url parameter if available
7295
- s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
7296
-
7297
- // Extract dataTypes list
7298
- s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
7299
-
7300
- // Determine if a cross-domain request is in order
7301
- if ( s.crossDomain == null ) {
7302
- parts = rurl.exec( s.url.toLowerCase() );
7303
- s.crossDomain = !!( parts &&
7304
- ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||
7305
- ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
7306
- ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
7307
- );
7308
- }
7309
-
7310
- // Convert data if not already a string
7311
- if ( s.data && s.processData && typeof s.data !== "string" ) {
7312
- s.data = jQuery.param( s.data, s.traditional );
7313
- }
7314
-
7315
- // Apply prefilters
7316
- inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
7317
-
7318
- // If request was aborted inside a prefiler, stop there
7319
- if ( state === 2 ) {
7320
- return false;
7321
- }
7322
-
7323
- // We can fire global events as of now if asked to
7324
- fireGlobals = s.global;
7325
-
7326
- // Uppercase the type
7327
- s.type = s.type.toUpperCase();
7328
-
7329
- // Determine if request has content
7330
- s.hasContent = !rnoContent.test( s.type );
7331
-
7332
- // Watch for a new set of requests
7333
- if ( fireGlobals && jQuery.active++ === 0 ) {
7334
- jQuery.event.trigger( "ajaxStart" );
7335
- }
7336
-
7337
- // More options handling for requests with no content
7338
- if ( !s.hasContent ) {
7339
-
7340
- // If data is available, append data to url
7341
- if ( s.data ) {
7342
- s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
7343
- // #9682: remove data so that it's not used in an eventual retry
7344
- delete s.data;
7345
- }
7346
-
7347
- // Get ifModifiedKey before adding the anti-cache parameter
7348
- ifModifiedKey = s.url;
7349
-
7350
- // Add anti-cache in url if needed
7351
- if ( s.cache === false ) {
7352
-
7353
- var ts = jQuery.now(),
7354
- // try replacing _= if it is there
7355
- ret = s.url.replace( rts, "$1_=" + ts );
7356
-
7357
- // if nothing was replaced, add timestamp to the end
7358
- s.url = ret + ( (ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
7359
- }
7360
- }
7361
-
7362
- // Set the correct header, if data is being sent
7363
- if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
7364
- jqXHR.setRequestHeader( "Content-Type", s.contentType );
7365
- }
7366
-
7367
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
7368
- if ( s.ifModified ) {
7369
- ifModifiedKey = ifModifiedKey || s.url;
7370
- if ( jQuery.lastModified[ ifModifiedKey ] ) {
7371
- jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
7372
- }
7373
- if ( jQuery.etag[ ifModifiedKey ] ) {
7374
- jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );
7375
- }
7376
- }
7377
-
7378
- // Set the Accepts header for the server, depending on the dataType
7379
- jqXHR.setRequestHeader(
7380
- "Accept",
7381
- s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
7382
- s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
7383
- s.accepts[ "*" ]
7384
- );
7385
-
7386
- // Check for headers option
7387
- for ( i in s.headers ) {
7388
- jqXHR.setRequestHeader( i, s.headers[ i ] );
7389
- }
7390
-
7391
- // Allow custom headers/mimetypes and early abort
7392
- if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
7393
- // Abort if not done already
7394
- jqXHR.abort();
7395
- return false;
7396
-
7397
- }
7398
-
7399
- // Install callbacks on deferreds
7400
- for ( i in { success: 1, error: 1, complete: 1 } ) {
7401
- jqXHR[ i ]( s[ i ] );
7402
- }
7403
-
7404
- // Get transport
7405
- transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
7406
-
7407
- // If no transport, we auto-abort
7408
- if ( !transport ) {
7409
- done( -1, "No Transport" );
7410
- } else {
7411
- jqXHR.readyState = 1;
7412
- // Send global event
7413
- if ( fireGlobals ) {
7414
- globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
7415
- }
7416
- // Timeout
7417
- if ( s.async && s.timeout > 0 ) {
7418
- timeoutTimer = setTimeout( function(){
7419
- jqXHR.abort( "timeout" );
7420
- }, s.timeout );
7421
- }
7422
-
7423
- try {
7424
- state = 1;
7425
- transport.send( requestHeaders, done );
7426
- } catch (e) {
7427
- // Propagate exception as error if not done
7428
- if ( state < 2 ) {
7429
- done( -1, e );
7430
- // Simply rethrow otherwise
7431
- } else {
7432
- jQuery.error( e );
7433
- }
7434
- }
7435
- }
7436
-
7437
- return jqXHR;
7438
- },
7439
-
7440
- // Serialize an array of form elements or a set of
7441
- // key/values into a query string
7442
- param: function( a, traditional ) {
7443
- var s = [],
7444
- add = function( key, value ) {
7445
- // If value is a function, invoke it and return its value
7446
- value = jQuery.isFunction( value ) ? value() : value;
7447
- s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
7448
- };
7449
-
7450
- // Set traditional to true for jQuery <= 1.3.2 behavior.
7451
- if ( traditional === undefined ) {
7452
- traditional = jQuery.ajaxSettings.traditional;
7453
- }
7454
-
7455
- // If an array was passed in, assume that it is an array of form elements.
7456
- if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
7457
- // Serialize the form elements
7458
- jQuery.each( a, function() {
7459
- add( this.name, this.value );
7460
- });
7461
-
7462
- } else {
7463
- // If traditional, encode the "old" way (the way 1.3.2 or older
7464
- // did it), otherwise encode params recursively.
7465
- for ( var prefix in a ) {
7466
- buildParams( prefix, a[ prefix ], traditional, add );
7467
- }
7468
- }
7469
-
7470
- // Return the resulting serialization
7471
- return s.join( "&" ).replace( r20, "+" );
7472
- }
7473
- });
7474
-
7475
- function buildParams( prefix, obj, traditional, add ) {
7476
- if ( jQuery.isArray( obj ) ) {
7477
- // Serialize array item.
7478
- jQuery.each( obj, function( i, v ) {
7479
- if ( traditional || rbracket.test( prefix ) ) {
7480
- // Treat each array item as a scalar.
7481
- add( prefix, v );
7482
-
7483
- } else {
7484
- // If array item is non-scalar (array or object), encode its
7485
- // numeric index to resolve deserialization ambiguity issues.
7486
- // Note that rack (as of 1.0.0) can't currently deserialize
7487
- // nested arrays properly, and attempting to do so may cause
7488
- // a server error. Possible fixes are to modify rack's
7489
- // deserialization algorithm or to provide an option or flag
7490
- // to force array serialization to be shallow.
7491
- buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add );
7492
- }
7493
- });
7494
-
7495
- } else if ( !traditional && obj != null && typeof obj === "object" ) {
7496
- // Serialize object item.
7497
- for ( var name in obj ) {
7498
- buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
7499
- }
7500
-
7501
- } else {
7502
- // Serialize scalar item.
7503
- add( prefix, obj );
7504
- }
7505
- }
7506
-
7507
- // This is still on the jQuery object... for now
7508
- // Want to move this to jQuery.ajax some day
7509
- jQuery.extend({
7510
-
7511
- // Counter for holding the number of active queries
7512
- active: 0,
7513
-
7514
- // Last-Modified header cache for next request
7515
- lastModified: {},
7516
- etag: {}
7517
-
7518
- });
7519
-
7520
- /* Handles responses to an ajax request:
7521
- * - sets all responseXXX fields accordingly
7522
- * - finds the right dataType (mediates between content-type and expected dataType)
7523
- * - returns the corresponding response
7524
- */
7525
- function ajaxHandleResponses( s, jqXHR, responses ) {
7526
-
7527
- var contents = s.contents,
7528
- dataTypes = s.dataTypes,
7529
- responseFields = s.responseFields,
7530
- ct,
7531
- type,
7532
- finalDataType,
7533
- firstDataType;
7534
-
7535
- // Fill responseXXX fields
7536
- for( type in responseFields ) {
7537
- if ( type in responses ) {
7538
- jqXHR[ responseFields[type] ] = responses[ type ];
7539
- }
7540
- }
7541
-
7542
- // Remove auto dataType and get content-type in the process
7543
- while( dataTypes[ 0 ] === "*" ) {
7544
- dataTypes.shift();
7545
- if ( ct === undefined ) {
7546
- ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
7547
- }
7548
- }
7549
-
7550
- // Check if we're dealing with a known content-type
7551
- if ( ct ) {
7552
- for ( type in contents ) {
7553
- if ( contents[ type ] && contents[ type ].test( ct ) ) {
7554
- dataTypes.unshift( type );
7555
- break;
7556
- }
7557
- }
7558
- }
7559
-
7560
- // Check to see if we have a response for the expected dataType
7561
- if ( dataTypes[ 0 ] in responses ) {
7562
- finalDataType = dataTypes[ 0 ];
7563
- } else {
7564
- // Try convertible dataTypes
7565
- for ( type in responses ) {
7566
- if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
7567
- finalDataType = type;
7568
- break;
7569
- }
7570
- if ( !firstDataType ) {
7571
- firstDataType = type;
7572
- }
7573
- }
7574
- // Or just use first one
7575
- finalDataType = finalDataType || firstDataType;
7576
- }
7577
-
7578
- // If we found a dataType
7579
- // We add the dataType to the list if needed
7580
- // and return the corresponding response
7581
- if ( finalDataType ) {
7582
- if ( finalDataType !== dataTypes[ 0 ] ) {
7583
- dataTypes.unshift( finalDataType );
7584
- }
7585
- return responses[ finalDataType ];
7586
- }
7587
- }
7588
-
7589
- // Chain conversions given the request and the original response
7590
- function ajaxConvert( s, response ) {
7591
-
7592
- // Apply the dataFilter if provided
7593
- if ( s.dataFilter ) {
7594
- response = s.dataFilter( response, s.dataType );
7595
- }
7596
-
7597
- var dataTypes = s.dataTypes,
7598
- converters = {},
7599
- i,
7600
- key,
7601
- length = dataTypes.length,
7602
- tmp,
7603
- // Current and previous dataTypes
7604
- current = dataTypes[ 0 ],
7605
- prev,
7606
- // Conversion expression
7607
- conversion,
7608
- // Conversion function
7609
- conv,
7610
- // Conversion functions (transitive conversion)
7611
- conv1,
7612
- conv2;
7613
-
7614
- // For each dataType in the chain
7615
- for( i = 1; i < length; i++ ) {
7616
-
7617
- // Create converters map
7618
- // with lowercased keys
7619
- if ( i === 1 ) {
7620
- for( key in s.converters ) {
7621
- if( typeof key === "string" ) {
7622
- converters[ key.toLowerCase() ] = s.converters[ key ];
7623
- }
7624
- }
7625
- }
7626
-
7627
- // Get the dataTypes
7628
- prev = current;
7629
- current = dataTypes[ i ];
7630
-
7631
- // If current is auto dataType, update it to prev
7632
- if( current === "*" ) {
7633
- current = prev;
7634
- // If no auto and dataTypes are actually different
7635
- } else if ( prev !== "*" && prev !== current ) {
7636
-
7637
- // Get the converter
7638
- conversion = prev + " " + current;
7639
- conv = converters[ conversion ] || converters[ "* " + current ];
7640
-
7641
- // If there is no direct converter, search transitively
7642
- if ( !conv ) {
7643
- conv2 = undefined;
7644
- for( conv1 in converters ) {
7645
- tmp = conv1.split( " " );
7646
- if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) {
7647
- conv2 = converters[ tmp[1] + " " + current ];
7648
- if ( conv2 ) {
7649
- conv1 = converters[ conv1 ];
7650
- if ( conv1 === true ) {
7651
- conv = conv2;
7652
- } else if ( conv2 === true ) {
7653
- conv = conv1;
7654
- }
7655
- break;
7656
- }
7657
- }
7658
- }
7659
- }
7660
- // If we found no converter, dispatch an error
7661
- if ( !( conv || conv2 ) ) {
7662
- jQuery.error( "No conversion from " + conversion.replace(" "," to ") );
7663
- }
7664
- // If found converter is not an equivalence
7665
- if ( conv !== true ) {
7666
- // Convert with 1 or 2 converters accordingly
7667
- response = conv ? conv( response ) : conv2( conv1(response) );
7668
- }
7669
- }
7670
- }
7671
- return response;
7672
- }
7673
-
7674
-
7675
-
7676
-
7677
- var jsc = jQuery.now(),
7678
- jsre = /(\=)\?(&|$)|\?\?/i;
7679
-
7680
- // Default jsonp settings
7681
- jQuery.ajaxSetup({
7682
- jsonp: "callback",
7683
- jsonpCallback: function() {
7684
- return jQuery.expando + "_" + ( jsc++ );
7685
- }
7686
- });
7687
-
7688
- // Detect, normalize options and install callbacks for jsonp requests
7689
- jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
7690
-
7691
- var inspectData = s.contentType === "application/x-www-form-urlencoded" &&
7692
- ( typeof s.data === "string" );
7693
-
7694
- if ( s.dataTypes[ 0 ] === "jsonp" ||
7695
- s.jsonp !== false && ( jsre.test( s.url ) ||
7696
- inspectData && jsre.test( s.data ) ) ) {
7697
-
7698
- var responseContainer,
7699
- jsonpCallback = s.jsonpCallback =
7700
- jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback,
7701
- previous = window[ jsonpCallback ],
7702
- url = s.url,
7703
- data = s.data,
7704
- replace = "$1" + jsonpCallback + "$2";
7705
-
7706
- if ( s.jsonp !== false ) {
7707
- url = url.replace( jsre, replace );
7708
- if ( s.url === url ) {
7709
- if ( inspectData ) {
7710
- data = data.replace( jsre, replace );
7711
- }
7712
- if ( s.data === data ) {
7713
- // Add callback manually
7714
- url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback;
7715
- }
7716
- }
7717
- }
7718
-
7719
- s.url = url;
7720
- s.data = data;
7721
-
7722
- // Install callback
7723
- window[ jsonpCallback ] = function( response ) {
7724
- responseContainer = [ response ];
7725
- };
7726
-
7727
- // Clean-up function
7728
- jqXHR.always(function() {
7729
- // Set callback back to previous value
7730
- window[ jsonpCallback ] = previous;
7731
- // Call if it was a function and we have a response
7732
- if ( responseContainer && jQuery.isFunction( previous ) ) {
7733
- window[ jsonpCallback ]( responseContainer[ 0 ] );
7734
- }
7735
- });
7736
-
7737
- // Use data converter to retrieve json after script execution
7738
- s.converters["script json"] = function() {
7739
- if ( !responseContainer ) {
7740
- jQuery.error( jsonpCallback + " was not called" );
7741
- }
7742
- return responseContainer[ 0 ];
7743
- };
7744
-
7745
- // force json dataType
7746
- s.dataTypes[ 0 ] = "json";
7747
-
7748
- // Delegate to script
7749
- return "script";
7750
- }
7751
- });
7752
-
7753
-
7754
-
7755
-
7756
- // Install script dataType
7757
- jQuery.ajaxSetup({
7758
- accepts: {
7759
- script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
7760
- },
7761
- contents: {
7762
- script: /javascript|ecmascript/
7763
- },
7764
- converters: {
7765
- "text script": function( text ) {
7766
- jQuery.globalEval( text );
7767
- return text;
7768
- }
7769
- }
7770
- });
7771
-
7772
- // Handle cache's special case and global
7773
- jQuery.ajaxPrefilter( "script", function( s ) {
7774
- if ( s.cache === undefined ) {
7775
- s.cache = false;
7776
- }
7777
- if ( s.crossDomain ) {
7778
- s.type = "GET";
7779
- s.global = false;
7780
- }
7781
- });
7782
-
7783
- // Bind script tag hack transport
7784
- jQuery.ajaxTransport( "script", function(s) {
7785
-
7786
- // This transport only deals with cross domain requests
7787
- if ( s.crossDomain ) {
7788
-
7789
- var script,
7790
- head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement;
7791
-
7792
- return {
7793
-
7794
- send: function( _, callback ) {
7795
-
7796
- script = document.createElement( "script" );
7797
-
7798
- script.async = "async";
7799
-
7800
- if ( s.scriptCharset ) {
7801
- script.charset = s.scriptCharset;
7802
- }
7803
-
7804
- script.src = s.url;
7805
-
7806
- // Attach handlers for all browsers
7807
- script.onload = script.onreadystatechange = function( _, isAbort ) {
7808
-
7809
- if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
7810
-
7811
- // Handle memory leak in IE
7812
- script.onload = script.onreadystatechange = null;
7813
-
7814
- // Remove the script
7815
- if ( head && script.parentNode ) {
7816
- head.removeChild( script );
7817
- }
7818
-
7819
- // Dereference the script
7820
- script = undefined;
7821
-
7822
- // Callback if not abort
7823
- if ( !isAbort ) {
7824
- callback( 200, "success" );
7825
- }
7826
- }
7827
- };
7828
- // Use insertBefore instead of appendChild to circumvent an IE6 bug.
7829
- // This arises when a base node is used (#2709 and #4378).
7830
- head.insertBefore( script, head.firstChild );
7831
- },
7832
-
7833
- abort: function() {
7834
- if ( script ) {
7835
- script.onload( 0, 1 );
7836
- }
7837
- }
7838
- };
7839
- }
7840
- });
7841
-
7842
-
7843
-
7844
-
7845
- var // #5280: Internet Explorer will keep connections alive if we don't abort on unload
7846
- xhrOnUnloadAbort = window.ActiveXObject ? function() {
7847
- // Abort all pending requests
7848
- for ( var key in xhrCallbacks ) {
7849
- xhrCallbacks[ key ]( 0, 1 );
7850
- }
7851
- } : false,
7852
- xhrId = 0,
7853
- xhrCallbacks;
7854
-
7855
- // Functions to create xhrs
7856
- function createStandardXHR() {
7857
- try {
7858
- return new window.XMLHttpRequest();
7859
- } catch( e ) {}
7860
- }
7861
-
7862
- function createActiveXHR() {
7863
- try {
7864
- return new window.ActiveXObject( "Microsoft.XMLHTTP" );
7865
- } catch( e ) {}
7866
- }
7867
-
7868
- // Create the request object
7869
- // (This is still attached to ajaxSettings for backward compatibility)
7870
- jQuery.ajaxSettings.xhr = window.ActiveXObject ?
7871
- /* Microsoft failed to properly
7872
- * implement the XMLHttpRequest in IE7 (can't request local files),
7873
- * so we use the ActiveXObject when it is available
7874
- * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
7875
- * we need a fallback.
7876
- */
7877
- function() {
7878
- return !this.isLocal && createStandardXHR() || createActiveXHR();
7879
- } :
7880
- // For all other browsers, use the standard XMLHttpRequest object
7881
- createStandardXHR;
7882
-
7883
- // Determine support properties
7884
- (function( xhr ) {
7885
- jQuery.extend( jQuery.support, {
7886
- ajax: !!xhr,
7887
- cors: !!xhr && ( "withCredentials" in xhr )
7888
- });
7889
- })( jQuery.ajaxSettings.xhr() );
7890
-
7891
- // Create transport if the browser can provide an xhr
7892
- if ( jQuery.support.ajax ) {
7893
-
7894
- jQuery.ajaxTransport(function( s ) {
7895
- // Cross domain only allowed if supported through XMLHttpRequest
7896
- if ( !s.crossDomain || jQuery.support.cors ) {
7897
-
7898
- var callback;
7899
-
7900
- return {
7901
- send: function( headers, complete ) {
7902
-
7903
- // Get a new xhr
7904
- var xhr = s.xhr(),
7905
- handle,
7906
- i;
7907
-
7908
- // Open the socket
7909
- // Passing null username, generates a login popup on Opera (#2865)
7910
- if ( s.username ) {
7911
- xhr.open( s.type, s.url, s.async, s.username, s.password );
7912
- } else {
7913
- xhr.open( s.type, s.url, s.async );
7914
- }
7915
-
7916
- // Apply custom fields if provided
7917
- if ( s.xhrFields ) {
7918
- for ( i in s.xhrFields ) {
7919
- xhr[ i ] = s.xhrFields[ i ];
7920
- }
7921
- }
7922
-
7923
- // Override mime type if needed
7924
- if ( s.mimeType && xhr.overrideMimeType ) {
7925
- xhr.overrideMimeType( s.mimeType );
7926
- }
7927
-
7928
- // X-Requested-With header
7929
- // For cross-domain requests, seeing as conditions for a preflight are
7930
- // akin to a jigsaw puzzle, we simply never set it to be sure.
7931
- // (it can always be set on a per-request basis or even using ajaxSetup)
7932
- // For same-domain requests, won't change header if already provided.
7933
- if ( !s.crossDomain && !headers["X-Requested-With"] ) {
7934
- headers[ "X-Requested-With" ] = "XMLHttpRequest";
7935
- }
7936
-
7937
- // Need an extra try/catch for cross domain requests in Firefox 3
7938
- try {
7939
- for ( i in headers ) {
7940
- xhr.setRequestHeader( i, headers[ i ] );
7941
- }
7942
- } catch( _ ) {}
7943
-
7944
- // Do send the request
7945
- // This may raise an exception which is actually
7946
- // handled in jQuery.ajax (so no try/catch here)
7947
- xhr.send( ( s.hasContent && s.data ) || null );
7948
-
7949
- // Listener
7950
- callback = function( _, isAbort ) {
7951
-
7952
- var status,
7953
- statusText,
7954
- responseHeaders,
7955
- responses,
7956
- xml;
7957
-
7958
- // Firefox throws exceptions when accessing properties
7959
- // of an xhr when a network error occured
7960
- // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
7961
- try {
7962
-
7963
- // Was never called and is aborted or complete
7964
- if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
7965
-
7966
- // Only called once
7967
- callback = undefined;
7968
-
7969
- // Do not keep as active anymore
7970
- if ( handle ) {
7971
- xhr.onreadystatechange = jQuery.noop;
7972
- if ( xhrOnUnloadAbort ) {
7973
- delete xhrCallbacks[ handle ];
7974
- }
7975
- }
7976
-
7977
- // If it's an abort
7978
- if ( isAbort ) {
7979
- // Abort it manually if needed
7980
- if ( xhr.readyState !== 4 ) {
7981
- xhr.abort();
7982
- }
7983
- } else {
7984
- status = xhr.status;
7985
- responseHeaders = xhr.getAllResponseHeaders();
7986
- responses = {};
7987
- xml = xhr.responseXML;
7988
-
7989
- // Construct response list
7990
- if ( xml && xml.documentElement /* #4958 */ ) {
7991
- responses.xml = xml;
7992
- }
7993
- responses.text = xhr.responseText;
7994
-
7995
- // Firefox throws an exception when accessing
7996
- // statusText for faulty cross-domain requests
7997
- try {
7998
- statusText = xhr.statusText;
7999
- } catch( e ) {
8000
- // We normalize with Webkit giving an empty statusText
8001
- statusText = "";
8002
- }
8003
-
8004
- // Filter status for non standard behaviors
8005
-
8006
- // If the request is local and we have data: assume a success
8007
- // (success with no data won't get notified, that's the best we
8008
- // can do given current implementations)
8009
- if ( !status && s.isLocal && !s.crossDomain ) {
8010
- status = responses.text ? 200 : 404;
8011
- // IE - #1450: sometimes returns 1223 when it should be 204
8012
- } else if ( status === 1223 ) {
8013
- status = 204;
8014
- }
8015
- }
8016
- }
8017
- } catch( firefoxAccessException ) {
8018
- if ( !isAbort ) {
8019
- complete( -1, firefoxAccessException );
8020
- }
8021
- }
8022
-
8023
- // Call complete if needed
8024
- if ( responses ) {
8025
- complete( status, statusText, responses, responseHeaders );
8026
- }
8027
- };
8028
-
8029
- // if we're in sync mode or it's in cache
8030
- // and has been retrieved directly (IE6 & IE7)
8031
- // we need to manually fire the callback
8032
- if ( !s.async || xhr.readyState === 4 ) {
8033
- callback();
8034
- } else {
8035
- handle = ++xhrId;
8036
- if ( xhrOnUnloadAbort ) {
8037
- // Create the active xhrs callbacks list if needed
8038
- // and attach the unload handler
8039
- if ( !xhrCallbacks ) {
8040
- xhrCallbacks = {};
8041
- jQuery( window ).unload( xhrOnUnloadAbort );
8042
- }
8043
- // Add to list of active xhrs callbacks
8044
- xhrCallbacks[ handle ] = callback;
8045
- }
8046
- xhr.onreadystatechange = callback;
8047
- }
8048
- },
8049
-
8050
- abort: function() {
8051
- if ( callback ) {
8052
- callback(0,1);
8053
- }
8054
- }
8055
- };
8056
- }
8057
- });
8058
- }
8059
-
8060
-
8061
-
8062
-
8063
- var elemdisplay = {},
8064
- iframe, iframeDoc,
8065
- rfxtypes = /^(?:toggle|show|hide)$/,
8066
- rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
8067
- timerId,
8068
- fxAttrs = [
8069
- // height animations
8070
- [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
8071
- // width animations
8072
- [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
8073
- // opacity animations
8074
- [ "opacity" ]
8075
- ],
8076
- fxNow;
8077
-
8078
- jQuery.fn.extend({
8079
- show: function( speed, easing, callback ) {
8080
- var elem, display;
8081
-
8082
- if ( speed || speed === 0 ) {
8083
- return this.animate( genFx("show", 3), speed, easing, callback);
8084
-
8085
- } else {
8086
- for ( var i = 0, j = this.length; i < j; i++ ) {
8087
- elem = this[i];
8088
-
8089
- if ( elem.style ) {
8090
- display = elem.style.display;
8091
-
8092
- // Reset the inline display of this element to learn if it is
8093
- // being hidden by cascaded rules or not
8094
- if ( !jQuery._data(elem, "olddisplay") && display === "none" ) {
8095
- display = elem.style.display = "";
8096
- }
8097
-
8098
- // Set elements which have been overridden with display: none
8099
- // in a stylesheet to whatever the default browser style is
8100
- // for such an element
8101
- if ( display === "" && jQuery.css( elem, "display" ) === "none" ) {
8102
- jQuery._data(elem, "olddisplay", defaultDisplay(elem.nodeName));
8103
- }
8104
- }
8105
- }
8106
-
8107
- // Set the display of most of the elements in a second loop
8108
- // to avoid the constant reflow
8109
- for ( i = 0; i < j; i++ ) {
8110
- elem = this[i];
8111
-
8112
- if ( elem.style ) {
8113
- display = elem.style.display;
8114
-
8115
- if ( display === "" || display === "none" ) {
8116
- elem.style.display = jQuery._data(elem, "olddisplay") || "";
8117
- }
8118
- }
8119
- }
8120
-
8121
- return this;
8122
- }
8123
- },
8124
-
8125
- hide: function( speed, easing, callback ) {
8126
- if ( speed || speed === 0 ) {
8127
- return this.animate( genFx("hide", 3), speed, easing, callback);
8128
-
8129
- } else {
8130
- for ( var i = 0, j = this.length; i < j; i++ ) {
8131
- if ( this[i].style ) {
8132
- var display = jQuery.css( this[i], "display" );
8133
-
8134
- if ( display !== "none" && !jQuery._data( this[i], "olddisplay" ) ) {
8135
- jQuery._data( this[i], "olddisplay", display );
8136
- }
8137
- }
8138
- }
8139
-
8140
- // Set the display of the elements in a second loop
8141
- // to avoid the constant reflow
8142
- for ( i = 0; i < j; i++ ) {
8143
- if ( this[i].style ) {
8144
- this[i].style.display = "none";
8145
- }
8146
- }
8147
-
8148
- return this;
8149
- }
8150
- },
8151
-
8152
- // Save the old toggle function
8153
- _toggle: jQuery.fn.toggle,
8154
-
8155
- toggle: function( fn, fn2, callback ) {
8156
- var bool = typeof fn === "boolean";
8157
-
8158
- if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {
8159
- this._toggle.apply( this, arguments );
8160
-
8161
- } else if ( fn == null || bool ) {
8162
- this.each(function() {
8163
- var state = bool ? fn : jQuery(this).is(":hidden");
8164
- jQuery(this)[ state ? "show" : "hide" ]();
8165
- });
8166
-
8167
- } else {
8168
- this.animate(genFx("toggle", 3), fn, fn2, callback);
8169
- }
8170
-
8171
- return this;
8172
- },
8173
-
8174
- fadeTo: function( speed, to, easing, callback ) {
8175
- return this.filter(":hidden").css("opacity", 0).show().end()
8176
- .animate({opacity: to}, speed, easing, callback);
8177
- },
8178
-
8179
- animate: function( prop, speed, easing, callback ) {
8180
- var optall = jQuery.speed(speed, easing, callback);
8181
-
8182
- if ( jQuery.isEmptyObject( prop ) ) {
8183
- return this.each( optall.complete, [ false ] );
8184
- }
8185
-
8186
- // Do not change referenced properties as per-property easing will be lost
8187
- prop = jQuery.extend( {}, prop );
8188
-
8189
- return this[ optall.queue === false ? "each" : "queue" ](function() {
8190
- // XXX 'this' does not always have a nodeName when running the
8191
- // test suite
8192
-
8193
- if ( optall.queue === false ) {
8194
- jQuery._mark( this );
8195
- }
8196
-
8197
- var opt = jQuery.extend( {}, optall ),
8198
- isElement = this.nodeType === 1,
8199
- hidden = isElement && jQuery(this).is(":hidden"),
8200
- name, val, p,
8201
- display, e,
8202
- parts, start, end, unit;
8203
-
8204
- // will store per property easing and be used to determine when an animation is complete
8205
- opt.animatedProperties = {};
8206
-
8207
- for ( p in prop ) {
8208
-
8209
- // property name normalization
8210
- name = jQuery.camelCase( p );
8211
- if ( p !== name ) {
8212
- prop[ name ] = prop[ p ];
8213
- delete prop[ p ];
8214
- }
8215
-
8216
- val = prop[ name ];
8217
-
8218
- // easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
8219
- if ( jQuery.isArray( val ) ) {
8220
- opt.animatedProperties[ name ] = val[ 1 ];
8221
- val = prop[ name ] = val[ 0 ];
8222
- } else {
8223
- opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing';
8224
- }
8225
-
8226
- if ( val === "hide" && hidden || val === "show" && !hidden ) {
8227
- return opt.complete.call( this );
8228
- }
8229
-
8230
- if ( isElement && ( name === "height" || name === "width" ) ) {
8231
- // Make sure that nothing sneaks out
8232
- // Record all 3 overflow attributes because IE does not
8233
- // change the overflow attribute when overflowX and
8234
- // overflowY are set to the same value
8235
- opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];
8236
-
8237
- // Set display property to inline-block for height/width
8238
- // animations on inline elements that are having width/height
8239
- // animated
8240
- if ( jQuery.css( this, "display" ) === "inline" &&
8241
- jQuery.css( this, "float" ) === "none" ) {
8242
- if ( !jQuery.support.inlineBlockNeedsLayout ) {
8243
- this.style.display = "inline-block";
8244
-
8245
- } else {
8246
- display = defaultDisplay( this.nodeName );
8247
-
8248
- // inline-level elements accept inline-block;
8249
- // block-level elements need to be inline with layout
8250
- if ( display === "inline" ) {
8251
- this.style.display = "inline-block";
8252
-
8253
- } else {
8254
- this.style.display = "inline";
8255
- this.style.zoom = 1;
8256
- }
8257
- }
8258
- }
8259
- }
8260
- }
8261
-
8262
- if ( opt.overflow != null ) {
8263
- this.style.overflow = "hidden";
8264
- }
8265
-
8266
- for ( p in prop ) {
8267
- e = new jQuery.fx( this, opt, p );
8268
- val = prop[ p ];
8269
-
8270
- if ( rfxtypes.test(val) ) {
8271
- e[ val === "toggle" ? hidden ? "show" : "hide" : val ]();
8272
-
8273
- } else {
8274
- parts = rfxnum.exec( val );
8275
- start = e.cur();
8276
-
8277
- if ( parts ) {
8278
- end = parseFloat( parts[2] );
8279
- unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" );
8280
-
8281
- // We need to compute starting value
8282
- if ( unit !== "px" ) {
8283
- jQuery.style( this, p, (end || 1) + unit);
8284
- start = ((end || 1) / e.cur()) * start;
8285
- jQuery.style( this, p, start + unit);
8286
- }
8287
-
8288
- // If a +=/-= token was provided, we're doing a relative animation
8289
- if ( parts[1] ) {
8290
- end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start;
8291
- }
8292
-
8293
- e.custom( start, end, unit );
8294
-
8295
- } else {
8296
- e.custom( start, val, "" );
8297
- }
8298
- }
8299
- }
8300
-
8301
- // For JS strict compliance
8302
- return true;
8303
- });
8304
- },
8305
-
8306
- stop: function( clearQueue, gotoEnd ) {
8307
- if ( clearQueue ) {
8308
- this.queue([]);
8309
- }
8310
-
8311
- this.each(function() {
8312
- var timers = jQuery.timers,
8313
- i = timers.length;
8314
- // clear marker counters if we know they won't be
8315
- if ( !gotoEnd ) {
8316
- jQuery._unmark( true, this );
8317
- }
8318
- while ( i-- ) {
8319
- if ( timers[i].elem === this ) {
8320
- if (gotoEnd) {
8321
- // force the next step to be the last
8322
- timers[i](true);
8323
- }
8324
-
8325
- timers.splice(i, 1);
8326
- }
8327
- }
8328
- });
8329
-
8330
- // start the next in the queue if the last step wasn't forced
8331
- if ( !gotoEnd ) {
8332
- this.dequeue();
8333
- }
8334
-
8335
- return this;
8336
- }
8337
-
8338
- });
8339
-
8340
- // Animations created synchronously will run synchronously
8341
- function createFxNow() {
8342
- setTimeout( clearFxNow, 0 );
8343
- return ( fxNow = jQuery.now() );
8344
- }
8345
-
8346
- function clearFxNow() {
8347
- fxNow = undefined;
8348
- }
8349
-
8350
- // Generate parameters to create a standard animation
8351
- function genFx( type, num ) {
8352
- var obj = {};
8353
-
8354
- jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() {
8355
- obj[ this ] = type;
8356
- });
8357
-
8358
- return obj;
8359
- }
8360
-
8361
- // Generate shortcuts for custom animations
8362
- jQuery.each({
8363
- slideDown: genFx("show", 1),
8364
- slideUp: genFx("hide", 1),
8365
- slideToggle: genFx("toggle", 1),
8366
- fadeIn: { opacity: "show" },
8367
- fadeOut: { opacity: "hide" },
8368
- fadeToggle: { opacity: "toggle" }
8369
- }, function( name, props ) {
8370
- jQuery.fn[ name ] = function( speed, easing, callback ) {
8371
- return this.animate( props, speed, easing, callback );
8372
- };
8373
- });
8374
-
8375
- jQuery.extend({
8376
- speed: function( speed, easing, fn ) {
8377
- var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
8378
- complete: fn || !fn && easing ||
8379
- jQuery.isFunction( speed ) && speed,
8380
- duration: speed,
8381
- easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
8382
- };
8383
-
8384
- opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
8385
- opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default;
8386
-
8387
- // Queueing
8388
- opt.old = opt.complete;
8389
- opt.complete = function( noUnmark ) {
8390
- if ( jQuery.isFunction( opt.old ) ) {
8391
- opt.old.call( this );
8392
- }
8393
-
8394
- if ( opt.queue !== false ) {
8395
- jQuery.dequeue( this );
8396
- } else if ( noUnmark !== false ) {
8397
- jQuery._unmark( this );
8398
- }
8399
- };
8400
-
8401
- return opt;
8402
- },
8403
-
8404
- easing: {
8405
- linear: function( p, n, firstNum, diff ) {
8406
- return firstNum + diff * p;
8407
- },
8408
- swing: function( p, n, firstNum, diff ) {
8409
- return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
8410
- }
8411
- },
8412
-
8413
- timers: [],
8414
-
8415
- fx: function( elem, options, prop ) {
8416
- this.options = options;
8417
- this.elem = elem;
8418
- this.prop = prop;
8419
-
8420
- options.orig = options.orig || {};
8421
- }
8422
-
8423
- });
8424
-
8425
- jQuery.fx.prototype = {
8426
- // Simple function for setting a style value
8427
- update: function() {
8428
- if ( this.options.step ) {
8429
- this.options.step.call( this.elem, this.now, this );
8430
- }
8431
-
8432
- (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
8433
- },
8434
-
8435
- // Get the current size
8436
- cur: function() {
8437
- if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
8438
- return this.elem[ this.prop ];
8439
- }
8440
-
8441
- var parsed,
8442
- r = jQuery.css( this.elem, this.prop );
8443
- // Empty strings, null, undefined and "auto" are converted to 0,
8444
- // complex values such as "rotate(1rad)" are returned as is,
8445
- // simple values such as "10px" are parsed to Float.
8446
- return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed;
8447
- },
8448
-
8449
- // Start an animation from one number to another
8450
- custom: function( from, to, unit ) {
8451
- var self = this,
8452
- fx = jQuery.fx;
8453
-
8454
- this.startTime = fxNow || createFxNow();
8455
- this.start = from;
8456
- this.end = to;
8457
- this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" );
8458
- this.now = this.start;
8459
- this.pos = this.state = 0;
8460
-
8461
- function t( gotoEnd ) {
8462
- return self.step(gotoEnd);
8463
- }
8464
-
8465
- t.elem = this.elem;
8466
-
8467
- if ( t() && jQuery.timers.push(t) && !timerId ) {
8468
- timerId = setInterval( fx.tick, fx.interval );
8469
- }
8470
- },
8471
-
8472
- // Simple 'show' function
8473
- show: function() {
8474
- // Remember where we started, so that we can go back to it later
8475
- this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
8476
- this.options.show = true;
8477
-
8478
- // Begin the animation
8479
- // Make sure that we start at a small width/height to avoid any
8480
- // flash of content
8481
- this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur());
8482
-
8483
- // Start by showing the element
8484
- jQuery( this.elem ).show();
8485
- },
8486
-
8487
- // Simple 'hide' function
8488
- hide: function() {
8489
- // Remember where we started, so that we can go back to it later
8490
- this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
8491
- this.options.hide = true;
8492
-
8493
- // Begin the animation
8494
- this.custom(this.cur(), 0);
8495
- },
8496
-
8497
- // Each step of an animation
8498
- step: function( gotoEnd ) {
8499
- var t = fxNow || createFxNow(),
8500
- done = true,
8501
- elem = this.elem,
8502
- options = this.options,
8503
- i, n;
8504
-
8505
- if ( gotoEnd || t >= options.duration + this.startTime ) {
8506
- this.now = this.end;
8507
- this.pos = this.state = 1;
8508
- this.update();
8509
-
8510
- options.animatedProperties[ this.prop ] = true;
8511
-
8512
- for ( i in options.animatedProperties ) {
8513
- if ( options.animatedProperties[i] !== true ) {
8514
- done = false;
8515
- }
8516
- }
8517
-
8518
- if ( done ) {
8519
- // Reset the overflow
8520
- if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
8521
-
8522
- jQuery.each( [ "", "X", "Y" ], function (index, value) {
8523
- elem.style[ "overflow" + value ] = options.overflow[index];
8524
- });
8525
- }
8526
-
8527
- // Hide the element if the "hide" operation was done
8528
- if ( options.hide ) {
8529
- jQuery(elem).hide();
8530
- }
8531
-
8532
- // Reset the properties, if the item has been hidden or shown
8533
- if ( options.hide || options.show ) {
8534
- for ( var p in options.animatedProperties ) {
8535
- jQuery.style( elem, p, options.orig[p] );
8536
- }
8537
- }
8538
-
8539
- // Execute the complete function
8540
- options.complete.call( elem );
8541
- }
8542
-
8543
- return false;
8544
-
8545
- } else {
8546
- // classical easing cannot be used with an Infinity duration
8547
- if ( options.duration == Infinity ) {
8548
- this.now = t;
8549
- } else {
8550
- n = t - this.startTime;
8551
- this.state = n / options.duration;
8552
-
8553
- // Perform the easing function, defaults to swing
8554
- this.pos = jQuery.easing[ options.animatedProperties[ this.prop ] ]( this.state, n, 0, 1, options.duration );
8555
- this.now = this.start + ((this.end - this.start) * this.pos);
8556
- }
8557
- // Perform the next step of the animation
8558
- this.update();
8559
- }
8560
-
8561
- return true;
8562
- }
8563
- };
8564
-
8565
- jQuery.extend( jQuery.fx, {
8566
- tick: function() {
8567
- for ( var timers = jQuery.timers, i = 0 ; i < timers.length ; ++i ) {
8568
- if ( !timers[i]() ) {
8569
- timers.splice(i--, 1);
8570
- }
8571
- }
8572
-
8573
- if ( !timers.length ) {
8574
- jQuery.fx.stop();
8575
- }
8576
- },
8577
-
8578
- interval: 13,
8579
-
8580
- stop: function() {
8581
- clearInterval( timerId );
8582
- timerId = null;
8583
- },
8584
-
8585
- speeds: {
8586
- slow: 600,
8587
- fast: 200,
8588
- // Default speed
8589
- _default: 400
8590
- },
8591
-
8592
- step: {
8593
- opacity: function( fx ) {
8594
- jQuery.style( fx.elem, "opacity", fx.now );
8595
- },
8596
-
8597
- _default: function( fx ) {
8598
- if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
8599
- fx.elem.style[ fx.prop ] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit;
8600
- } else {
8601
- fx.elem[ fx.prop ] = fx.now;
8602
- }
8603
- }
8604
- }
8605
- });
8606
-
8607
- if ( jQuery.expr && jQuery.expr.filters ) {
8608
- jQuery.expr.filters.animated = function( elem ) {
8609
- return jQuery.grep(jQuery.timers, function( fn ) {
8610
- return elem === fn.elem;
8611
- }).length;
8612
- };
8613
- }
8614
-
8615
- // Try to restore the default display value of an element
8616
- function defaultDisplay( nodeName ) {
8617
-
8618
- if ( !elemdisplay[ nodeName ] ) {
8619
-
8620
- var body = document.body,
8621
- elem = jQuery( "<" + nodeName + ">" ).appendTo( body ),
8622
- display = elem.css( "display" );
8623
-
8624
- elem.remove();
8625
-
8626
- // If the simple way fails,
8627
- // get element's real default display by attaching it to a temp iframe
8628
- if ( display === "none" || display === "" ) {
8629
- // No iframe to use yet, so create it
8630
- if ( !iframe ) {
8631
- iframe = document.createElement( "iframe" );
8632
- iframe.frameBorder = iframe.width = iframe.height = 0;
8633
- }
8634
-
8635
- body.appendChild( iframe );
8636
-
8637
- // Create a cacheable copy of the iframe document on first call.
8638
- // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
8639
- // document to it; WebKit & Firefox won't allow reusing the iframe document.
8640
- if ( !iframeDoc || !iframe.createElement ) {
8641
- iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
8642
- iframeDoc.write( ( document.compatMode === "CSS1Compat" ? "<!doctype html>" : "" ) + "<html><body>" );
8643
- iframeDoc.close();
8644
- }
8645
-
8646
- elem = iframeDoc.createElement( nodeName );
8647
-
8648
- iframeDoc.body.appendChild( elem );
8649
-
8650
- display = jQuery.css( elem, "display" );
8651
-
8652
- body.removeChild( iframe );
8653
- }
8654
-
8655
- // Store the correct default display
8656
- elemdisplay[ nodeName ] = display;
8657
- }
8658
-
8659
- return elemdisplay[ nodeName ];
8660
- }
8661
-
8662
-
8663
-
8664
-
8665
- var rtable = /^t(?:able|d|h)$/i,
8666
- rroot = /^(?:body|html)$/i;
8667
-
8668
- if ( "getBoundingClientRect" in document.documentElement ) {
8669
- jQuery.fn.offset = function( options ) {
8670
- var elem = this[0], box;
8671
-
8672
- if ( options ) {
8673
- return this.each(function( i ) {
8674
- jQuery.offset.setOffset( this, options, i );
8675
- });
8676
- }
8677
-
8678
- if ( !elem || !elem.ownerDocument ) {
8679
- return null;
8680
- }
8681
-
8682
- if ( elem === elem.ownerDocument.body ) {
8683
- return jQuery.offset.bodyOffset( elem );
8684
- }
8685
-
8686
- try {
8687
- box = elem.getBoundingClientRect();
8688
- } catch(e) {}
8689
-
8690
- var doc = elem.ownerDocument,
8691
- docElem = doc.documentElement;
8692
-
8693
- // Make sure we're not dealing with a disconnected DOM node
8694
- if ( !box || !jQuery.contains( docElem, elem ) ) {
8695
- return box ? { top: box.top, left: box.left } : { top: 0, left: 0 };
8696
- }
8697
-
8698
- var body = doc.body,
8699
- win = getWindow(doc),
8700
- clientTop = docElem.clientTop || body.clientTop || 0,
8701
- clientLeft = docElem.clientLeft || body.clientLeft || 0,
8702
- scrollTop = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop,
8703
- scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft,
8704
- top = box.top + scrollTop - clientTop,
8705
- left = box.left + scrollLeft - clientLeft;
8706
-
8707
- return { top: top, left: left };
8708
- };
8709
-
8710
- } else {
8711
- jQuery.fn.offset = function( options ) {
8712
- var elem = this[0];
8713
-
8714
- if ( options ) {
8715
- return this.each(function( i ) {
8716
- jQuery.offset.setOffset( this, options, i );
8717
- });
8718
- }
8719
-
8720
- if ( !elem || !elem.ownerDocument ) {
8721
- return null;
8722
- }
8723
-
8724
- if ( elem === elem.ownerDocument.body ) {
8725
- return jQuery.offset.bodyOffset( elem );
8726
- }
8727
-
8728
- jQuery.offset.initialize();
8729
-
8730
- var computedStyle,
8731
- offsetParent = elem.offsetParent,
8732
- prevOffsetParent = elem,
8733
- doc = elem.ownerDocument,
8734
- docElem = doc.documentElement,
8735
- body = doc.body,
8736
- defaultView = doc.defaultView,
8737
- prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
8738
- top = elem.offsetTop,
8739
- left = elem.offsetLeft;
8740
-
8741
- while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
8742
- if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
8743
- break;
8744
- }
8745
-
8746
- computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;
8747
- top -= elem.scrollTop;
8748
- left -= elem.scrollLeft;
8749
-
8750
- if ( elem === offsetParent ) {
8751
- top += elem.offsetTop;
8752
- left += elem.offsetLeft;
8753
-
8754
- if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
8755
- top += parseFloat( computedStyle.borderTopWidth ) || 0;
8756
- left += parseFloat( computedStyle.borderLeftWidth ) || 0;
8757
- }
8758
-
8759
- prevOffsetParent = offsetParent;
8760
- offsetParent = elem.offsetParent;
8761
- }
8762
-
8763
- if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
8764
- top += parseFloat( computedStyle.borderTopWidth ) || 0;
8765
- left += parseFloat( computedStyle.borderLeftWidth ) || 0;
8766
- }
8767
-
8768
- prevComputedStyle = computedStyle;
8769
- }
8770
-
8771
- if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) {
8772
- top += body.offsetTop;
8773
- left += body.offsetLeft;
8774
- }
8775
-
8776
- if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
8777
- top += Math.max( docElem.scrollTop, body.scrollTop );
8778
- left += Math.max( docElem.scrollLeft, body.scrollLeft );
8779
- }
8780
-
8781
- return { top: top, left: left };
8782
- };
8783
- }
8784
-
8785
- jQuery.offset = {
8786
- initialize: function() {
8787
- var body = document.body, container = document.createElement("div"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.css(body, "marginTop") ) || 0,
8788
- 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>";
8789
-
8790
- jQuery.extend( container.style, { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" } );
8791
-
8792
- container.innerHTML = html;
8793
- body.insertBefore( container, body.firstChild );
8794
- innerDiv = container.firstChild;
8795
- checkDiv = innerDiv.firstChild;
8796
- td = innerDiv.nextSibling.firstChild.firstChild;
8797
-
8798
- this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
8799
- this.doesAddBorderForTableAndCells = (td.offsetTop === 5);
8800
-
8801
- checkDiv.style.position = "fixed";
8802
- checkDiv.style.top = "20px";
8803
-
8804
- // safari subtracts parent border width here which is 5px
8805
- this.supportsFixedPosition = (checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15);
8806
- checkDiv.style.position = checkDiv.style.top = "";
8807
-
8808
- innerDiv.style.overflow = "hidden";
8809
- innerDiv.style.position = "relative";
8810
-
8811
- this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);
8812
-
8813
- this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);
8814
-
8815
- body.removeChild( container );
8816
- jQuery.offset.initialize = jQuery.noop;
8817
- },
8818
-
8819
- bodyOffset: function( body ) {
8820
- var top = body.offsetTop,
8821
- left = body.offsetLeft;
8822
-
8823
- jQuery.offset.initialize();
8824
-
8825
- if ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) {
8826
- top += parseFloat( jQuery.css(body, "marginTop") ) || 0;
8827
- left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
8828
- }
8829
-
8830
- return { top: top, left: left };
8831
- },
8832
-
8833
- setOffset: function( elem, options, i ) {
8834
- var position = jQuery.css( elem, "position" );
8835
-
8836
- // set position first, in-case top/left are set even on static elem
8837
- if ( position === "static" ) {
8838
- elem.style.position = "relative";
8839
- }
8840
-
8841
- var curElem = jQuery( elem ),
8842
- curOffset = curElem.offset(),
8843
- curCSSTop = jQuery.css( elem, "top" ),
8844
- curCSSLeft = jQuery.css( elem, "left" ),
8845
- calculatePosition = (position === "absolute" || position === "fixed") && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
8846
- props = {}, curPosition = {}, curTop, curLeft;
8847
-
8848
- // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
8849
- if ( calculatePosition ) {
8850
- curPosition = curElem.position();
8851
- curTop = curPosition.top;
8852
- curLeft = curPosition.left;
8853
- } else {
8854
- curTop = parseFloat( curCSSTop ) || 0;
8855
- curLeft = parseFloat( curCSSLeft ) || 0;
8856
- }
8857
-
8858
- if ( jQuery.isFunction( options ) ) {
8859
- options = options.call( elem, i, curOffset );
8860
- }
8861
-
8862
- if (options.top != null) {
8863
- props.top = (options.top - curOffset.top) + curTop;
8864
- }
8865
- if (options.left != null) {
8866
- props.left = (options.left - curOffset.left) + curLeft;
8867
- }
8868
-
8869
- if ( "using" in options ) {
8870
- options.using.call( elem, props );
8871
- } else {
8872
- curElem.css( props );
8873
- }
8874
- }
8875
- };
8876
-
8877
-
8878
- jQuery.fn.extend({
8879
- position: function() {
8880
- if ( !this[0] ) {
8881
- return null;
8882
- }
8883
-
8884
- var elem = this[0],
8885
-
8886
- // Get *real* offsetParent
8887
- offsetParent = this.offsetParent(),
8888
-
8889
- // Get correct offsets
8890
- offset = this.offset(),
8891
- parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
8892
-
8893
- // Subtract element margins
8894
- // note: when an element has margin: auto the offsetLeft and marginLeft
8895
- // are the same in Safari causing offset.left to incorrectly be 0
8896
- offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
8897
- offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
8898
-
8899
- // Add offsetParent borders
8900
- parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
8901
- parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
8902
-
8903
- // Subtract the two offsets
8904
- return {
8905
- top: offset.top - parentOffset.top,
8906
- left: offset.left - parentOffset.left
8907
- };
8908
- },
8909
-
8910
- offsetParent: function() {
8911
- return this.map(function() {
8912
- var offsetParent = this.offsetParent || document.body;
8913
- while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
8914
- offsetParent = offsetParent.offsetParent;
8915
- }
8916
- return offsetParent;
8917
- });
8918
- }
8919
- });
8920
-
8921
-
8922
- // Create scrollLeft and scrollTop methods
8923
- jQuery.each( ["Left", "Top"], function( i, name ) {
8924
- var method = "scroll" + name;
8925
-
8926
- jQuery.fn[ method ] = function( val ) {
8927
- var elem, win;
8928
-
8929
- if ( val === undefined ) {
8930
- elem = this[ 0 ];
8931
-
8932
- if ( !elem ) {
8933
- return null;
8934
- }
8935
-
8936
- win = getWindow( elem );
8937
-
8938
- // Return the scroll offset
8939
- return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] :
8940
- jQuery.support.boxModel && win.document.documentElement[ method ] ||
8941
- win.document.body[ method ] :
8942
- elem[ method ];
8943
- }
8944
-
8945
- // Set the scroll offset
8946
- return this.each(function() {
8947
- win = getWindow( this );
8948
-
8949
- if ( win ) {
8950
- win.scrollTo(
8951
- !i ? val : jQuery( win ).scrollLeft(),
8952
- i ? val : jQuery( win ).scrollTop()
8953
- );
8954
-
8955
- } else {
8956
- this[ method ] = val;
8957
- }
8958
- });
8959
- };
8960
- });
8961
-
8962
- function getWindow( elem ) {
8963
- return jQuery.isWindow( elem ) ?
8964
- elem :
8965
- elem.nodeType === 9 ?
8966
- elem.defaultView || elem.parentWindow :
8967
- false;
8968
- }
8969
-
8970
-
8971
-
8972
-
8973
- // Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods
8974
- jQuery.each([ "Height", "Width" ], function( i, name ) {
8975
-
8976
- var type = name.toLowerCase();
8977
-
8978
- // innerHeight and innerWidth
8979
- jQuery.fn[ "inner" + name ] = function() {
8980
- var elem = this[0];
8981
- return elem && elem.style ?
8982
- parseFloat( jQuery.css( elem, type, "padding" ) ) :
8983
- null;
8984
- };
8985
-
8986
- // outerHeight and outerWidth
8987
- jQuery.fn[ "outer" + name ] = function( margin ) {
8988
- var elem = this[0];
8989
- return elem && elem.style ?
8990
- parseFloat( jQuery.css( elem, type, margin ? "margin" : "border" ) ) :
8991
- null;
8992
- };
8993
-
8994
- jQuery.fn[ type ] = function( size ) {
8995
- // Get window width or height
8996
- var elem = this[0];
8997
- if ( !elem ) {
8998
- return size == null ? null : this;
8999
- }
9000
-
9001
- if ( jQuery.isFunction( size ) ) {
9002
- return this.each(function( i ) {
9003
- var self = jQuery( this );
9004
- self[ type ]( size.call( this, i, self[ type ]() ) );
9005
- });
9006
- }
9007
-
9008
- if ( jQuery.isWindow( elem ) ) {
9009
- // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
9010
- // 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
9011
- var docElemProp = elem.document.documentElement[ "client" + name ],
9012
- body = elem.document.body;
9013
- return elem.document.compatMode === "CSS1Compat" && docElemProp ||
9014
- body && body[ "client" + name ] || docElemProp;
9015
-
9016
- // Get document width or height
9017
- } else if ( elem.nodeType === 9 ) {
9018
- // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
9019
- return Math.max(
9020
- elem.documentElement["client" + name],
9021
- elem.body["scroll" + name], elem.documentElement["scroll" + name],
9022
- elem.body["offset" + name], elem.documentElement["offset" + name]
9023
- );
9024
-
9025
- // Get or set width or height on the element
9026
- } else if ( size === undefined ) {
9027
- var orig = jQuery.css( elem, type ),
9028
- ret = parseFloat( orig );
9029
-
9030
- return jQuery.isNaN( ret ) ? orig : ret;
9031
-
9032
- // Set the width or height on the element (default to pixels if value is unitless)
9033
- } else {
9034
- return this.css( type, typeof size === "string" ? size : size + "px" );
9035
- }
9036
- };
9037
-
9038
- });
9039
-
9040
-
9041
- // Expose jQuery to the global object
9042
- window.jQuery = window.$ = jQuery;
9043
- })(window);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jquery-1.6.3rc1.min.js DELETED
@@ -1,4 +0,0 @@
1
- /*! jQuery v1.6.3rc1 http://jquery.com/ | http://jquery.org/license */
2
- (function(a,b){function cu(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cr(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 cq(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cp(){cn=b}function co(){setTimeout(cp,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||bA.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){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bW(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===bP,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=bW(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bW(a,c,d,e,"*",g));return l}function bV(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bL),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 by(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bt:bu;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=bv(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 bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bd,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(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 bg(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 bf(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function V(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(Q.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 U(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function M(a,b){return(a&&a!=="*"?a+".":"")+b.replace(y,"`").replace(z,"&")}function L(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(w,"")===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 J(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 D(){return!0}function C(){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 K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,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]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};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.3rc1",length:0,size:function(){return this.length},toArray:function(){return G.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)?F.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(),B.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(G.apply(this,arguments),"slice",G.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:F,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;B.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},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):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},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(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},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(x,"ms-").replace(w,y)},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:H?function(a){return a==null?"":H.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)?F.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(!b)return-1;if(I)return I.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=G.call(arguments,2),g=function(){return a.apply(c,f.concat(G.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){J["[object "+b+"]"]=b.toLowerCase()}),A=e.uaMatch(z),A.browser&&(e.browser[A.browser]=!0,e.browser.version=A.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?C=function(){c.removeEventListener("DOMContentLoaded",C,!1),e.ready()}:c.attachEvent&&(C=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",C),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+"With"](this===b?d:this,[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,background:"none"},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>&nbsp;</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,h,i=f.expando,j=typeof c=="string",k=a.nodeType,l=k?f.cache:a,m=k?a[f.expando]:a[f.expando]&&f.expando;if((!m||e&&m&&l[m]&&!l[m][i])&&j&&d===b)return;m||(k?a[f.expando]=m=++f.uuid:m=f.expando),l[m]||(l[m]={},k||(l[m].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?l[m][i]=f.extend(l[m][i],c):l[m]=f.extend(l[m],c);g=l[m],e&&(g[i]||(g[i]={}),g=g[i]),d!==b&&(g[f.camelCase(c)]=d);if(c==="events"&&!g[c])return g[i]&&g[i].events;j?(h=g[c],h==null&&(h=g[f.camelCase(c)])):h=g;return h}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e=f.expando,g=a.nodeType,h=g?f.cache:a,i=g?a[f.expando]:f.expando;if(!h[i])return;if(b){d=c?h[i][e]:h[i];if(d){d[b]||(b=f.camelCase(b)),delete d[b];if(!l(d))return}}if(c){delete h[i][e];if(!l(h[i]))return}var j=h[i][e];f.support.deleteExpando||!h.setInterval?delete h[i]:h[i]=null,j?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=j):g&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[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;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].nodeType===1&&(" "+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=v:u&&(i=u)));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.attr(a,b,""),a.removeAttribute(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}}},value:{get:function(a,b){if(u&&f.nodeName(a,"button"))return u.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(u&&f.nodeName(a,"button"))return u.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))!==null?g:a[c]},propHooks:{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}}}}),f.attrHooks.tabIndex=f.propHooks.tabIndex,v={get:function(a,c){var d;return f.prop(a,c)===!0||(d=a.getAttributeNode(c))&&d.nodeValue!==!1?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||(u=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=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);return null}})),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 w=/\.(.*)$/,x=/^(?:textarea|input|select)$/i,y=/\./g,z=/ /g,A=/[^\w\s.|`]/g,B=function(a){return a.replace(A,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=C;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=C);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(),B).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)
3
- ,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)});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,M(a.origType,a.selector),f.extend({},a,{handler:L,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,M(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()?D:C):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=D;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=D;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=D,this.stopPropagation()},isDefaultPrevented:C,isPropagationStopped:C,isImmediatePropagationStopped:C};var E=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))},F=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?F:E,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?F:E)}}}),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=f.nodeName(b,"input")?b.type:"";(c==="submit"||c==="image")&&f(b).closest("form").length&&J("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&J("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var G,H=function(a){var b=f.nodeName(a,"input")?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},I=function(c){var d=c.target,e,g;if(!!x.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=H(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:I,beforedeactivate:I,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&I.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")&&I.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",H(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in G)f.event.add(this,c+".specialChange",G[c]);return x.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return x.test(this.nodeName)}},G=f.event.special.change.filters,G.focus=G.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 K={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||C,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=w.exec(h),k="",j&&(k=j[0],h=h.replace(w,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,K[h]?(a.push(K[h]+k),h=h+k):h=(K[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+M(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+M(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 N=/Until$/,O=/^(?:parents|prevUntil|prevAll)/,P=/,/,Q=/^.[^:#\[\.,]*$/,R=Array.prototype.slice,S=f.expr.match.POS,T={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(V(this,a,!1),"not",a)},filter:function(a){return this.pushStack(V(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]=S.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=S.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)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));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(U(c[0])||U(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=R.call(arguments);N.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!T[a]?f.unique(e):e,(this.length>1||P.test(d))&&O.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 W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|object|embed|option|style)/i,bb=/checked\s*(?:[^=]|=\s*.checked.)/i,bc=/\/(java|ecma)script/i,bd=/^\s*<!(?:\[CDATA\[|\-\-)/,be={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,"",""]};be.optgroup=be.option,be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,f.support.htmlSerialize||(be._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(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!be[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$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"&&bb.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?bf(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bl)}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)==="<"&&!ba.test(a[0])&&(f.support.checkClone||!bb.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]]=
4
- 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)){bh(a,d),e=bi(a),g=bi(d);for(h=0;e[h];++h)g[h]&&bh(e[h],g[h])}if(b){bg(a,d);if(c){e=bi(a),g=bi(d);for(h=0;e[h];++h)bg(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(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=be[l]||be._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&&X.test(k)&&o.insertBefore(b.createTextNode(X.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++)bk(k[i]);else bk(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bc.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 bm=/alpha\([^)]*\)/i,bn=/opacity=([^)]*)/,bo=/([A-Z]|^ms)/g,bp=/^-?\d+(?:px)?$/i,bq=/^-?\d/,br=/^([\-+])=([\-+.\de]+)/,bs={position:"absolute",visibility:"hidden",display:"block"},bt=["Left","Right"],bu=["Top","Bottom"],bv,bw,bx;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=bv(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,h==="string"&&(g=br.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;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(bv)return bv(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 by(a,b,d);f.swap(a,bs,function(){e=by(a,b,d)});return e}},set:function(a,b){if(!bp.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bn.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,e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bm,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bm.test(g)?g.replace(bm,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=bv(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bw=function(a,c){var d,e,g;c=c.replace(bo,"-$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&&(bx=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bp.test(d)&&bq.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}),bv=bw||bx,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 bz=/%20/g,bA=/\[\]$/,bB=/\r?\n/g,bC=/#.*$/,bD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bE=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bF=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bG=/^(?:GET|HEAD)$/,bH=/^\/\//,bI=/\?/,bJ=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bK=/^(?:select|textarea)/i,bL=/\s+/,bM=/([?&])_=[^&]*/,bN=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bO=f.fn.load,bP={},bQ={},bR,bS,bT=["*/"]+["*"];try{bR=e.href}catch(bU){bR=c.createElement("a"),bR.href="",bR=bR.href}bS=bN.exec(bR.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bO)return bO.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(bJ,"")).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||bK.test(this.nodeName)||bE.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(bB,"\r\n")}}):{name:b.name,value:c.replace(bB,"\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?bX(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),bX(a,b);return a},ajaxSettings:{url:bR,isLocal:bF.test(bS[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","*":bT},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},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bV(bP),ajaxTransport:bV(bQ),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>0?4:0;var o,r,u,w=c,x=l?bZ(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=b$(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,w]),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=bD.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(bC,"").replace(bH,bS[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bL),d.crossDomain==null&&(r=bN.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bS[1]&&r[2]==bS[2]&&(r[3]||(r[1]==="http:"?80:443))==(bS[3]||(bS[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bW(bP,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bG.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bI.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bM,"$1_="+x);d.url=y+(y===d.url?(bI.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]!=="*"?", "+bT+"; 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=bW(bQ,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){s<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(bz,"+")}}),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;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cq("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",cr(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(cq("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(cq("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=cr(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:cq("show",1),slideUp:cq("hide",1),slideToggle:cq("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 g(a){return d.step(a)}var d=this,e=f.fx;this.startTime=cn||co(),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,g.elem=this.elem,g()&&f.timers.push(g)&&!cl&&(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||co(),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 cs=/^t(?:able|d|h)$/i,ct=/^(?: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=cu(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||!cs.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=ct.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&&!ct.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=cu(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=cu(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],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["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 i=f.css(e,d),j=parseFloat(i);return f.isNaN(j)?i:j}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);
 
 
 
 
js/jquery-1.6.4.js DELETED
@@ -1,9046 +0,0 @@
1
- /*!
2
- * jQuery JavaScript Library v1.6.4
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: Mon Sep 12 18:54:48 2011 -0400
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
- // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
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]|[0-9])/ig,
70
- rmsPrefix = /^-ms-/,
71
-
72
- // Used by jQuery.camelCase as callback to replace()
73
- fcamelCase = function( all, letter ) {
74
- return ( letter + "" ).toUpperCase();
75
- },
76
-
77
- // Keep a UserAgent string for use with jQuery.browser
78
- userAgent = navigator.userAgent,
79
-
80
- // For matching the engine and version of the browser
81
- browserMatch,
82
-
83
- // The deferred used on DOM ready
84
- readyList,
85
-
86
- // The ready event handler
87
- DOMContentLoaded,
88
-
89
- // Save a reference to some core methods
90
- toString = Object.prototype.toString,
91
- hasOwn = Object.prototype.hasOwnProperty,
92
- push = Array.prototype.push,
93
- slice = Array.prototype.slice,
94
- trim = String.prototype.trim,
95
- indexOf = Array.prototype.indexOf,
96
-
97
- // [[Class]] -> type pairs
98
- class2type = {};
99
-
100
- jQuery.fn = jQuery.prototype = {
101
- constructor: jQuery,
102
- init: function( selector, context, rootjQuery ) {
103
- var match, elem, ret, doc;
104
-
105
- // Handle $(""), $(null), or $(undefined)
106
- if ( !selector ) {
107
- return this;
108
- }
109
-
110
- // Handle $(DOMElement)
111
- if ( selector.nodeType ) {
112
- this.context = this[0] = selector;
113
- this.length = 1;
114
- return this;
115
- }
116
-
117
- // The body element only exists once, optimize finding it
118
- if ( selector === "body" && !context && document.body ) {
119
- this.context = document;
120
- this[0] = document.body;
121
- this.selector = selector;
122
- this.length = 1;
123
- return this;
124
- }
125
-
126
- // Handle HTML strings
127
- if ( typeof selector === "string" ) {
128
- // Are we dealing with HTML string or an ID?
129
- if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
130
- // Assume that strings that start and end with <> are HTML and skip the regex check
131
- match = [ null, selector, null ];
132
-
133
- } else {
134
- match = quickExpr.exec( selector );
135
- }
136
-
137
- // Verify a match, and that no context was specified for #id
138
- if ( match && (match[1] || !context) ) {
139
-
140
- // HANDLE: $(html) -> $(array)
141
- if ( match[1] ) {
142
- context = context instanceof jQuery ? context[0] : context;
143
- doc = (context ? context.ownerDocument || context : document);
144
-
145
- // If a single string is passed in and it's a single tag
146
- // just do a createElement and skip the rest
147
- ret = rsingleTag.exec( selector );
148
-
149
- if ( ret ) {
150
- if ( jQuery.isPlainObject( context ) ) {
151
- selector = [ document.createElement( ret[1] ) ];
152
- jQuery.fn.attr.call( selector, context, true );
153
-
154
- } else {
155
- selector = [ doc.createElement( ret[1] ) ];
156
- }
157
-
158
- } else {
159
- ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
160
- selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes;
161
- }
162
-
163
- return jQuery.merge( this, selector );
164
-
165
- // HANDLE: $("#id")
166
- } else {
167
- elem = document.getElementById( match[2] );
168
-
169
- // Check parentNode to catch when Blackberry 4.6 returns
170
- // nodes that are no longer in the document #6963
171
- if ( elem && elem.parentNode ) {
172
- // Handle the case where IE and Opera return items
173
- // by name instead of ID
174
- if ( elem.id !== match[2] ) {
175
- return rootjQuery.find( selector );
176
- }
177
-
178
- // Otherwise, we inject the element directly into the jQuery object
179
- this.length = 1;
180
- this[0] = elem;
181
- }
182
-
183
- this.context = document;
184
- this.selector = selector;
185
- return this;
186
- }
187
-
188
- // HANDLE: $(expr, $(...))
189
- } else if ( !context || context.jquery ) {
190
- return (context || rootjQuery).find( selector );
191
-
192
- // HANDLE: $(expr, context)
193
- // (which is just equivalent to: $(context).find(expr)
194
- } else {
195
- return this.constructor( context ).find( selector );
196
- }
197
-
198
- // HANDLE: $(function)
199
- // Shortcut for document ready
200
- } else if ( jQuery.isFunction( selector ) ) {
201
- return rootjQuery.ready( selector );
202
- }
203
-
204
- if (selector.selector !== undefined) {
205
- this.selector = selector.selector;
206
- this.context = selector.context;
207
- }
208
-
209
- return jQuery.makeArray( selector, this );
210
- },
211
-
212
- // Start with an empty selector
213
- selector: "",
214
-
215
- // The current version of jQuery being used
216
- jquery: "1.6.4",
217
-
218
- // The default length of a jQuery object is 0
219
- length: 0,
220
-
221
- // The number of elements contained in the matched element set
222
- size: function() {
223
- return this.length;
224
- },
225
-
226
- toArray: function() {
227
- return slice.call( this, 0 );
228
- },
229
-
230
- // Get the Nth element in the matched element set OR
231
- // Get the whole matched element set as a clean array
232
- get: function( num ) {
233
- return num == null ?
234
-
235
- // Return a 'clean' array
236
- this.toArray() :
237
-
238
- // Return just the object
239
- ( num < 0 ? this[ this.length + num ] : this[ num ] );
240
- },
241
-
242
- // Take an array of elements and push it onto the stack
243
- // (returning the new matched element set)
244
- pushStack: function( elems, name, selector ) {
245
- // Build a new jQuery matched element set
246
- var ret = this.constructor();
247
-
248
- if ( jQuery.isArray( elems ) ) {
249
- push.apply( ret, elems );
250
-
251
- } else {
252
- jQuery.merge( ret, elems );
253
- }
254
-
255
- // Add the old object onto the stack (as a reference)
256
- ret.prevObject = this;
257
-
258
- ret.context = this.context;
259
-
260
- if ( name === "find" ) {
261
- ret.selector = this.selector + (this.selector ? " " : "") + selector;
262
- } else if ( name ) {
263
- ret.selector = this.selector + "." + name + "(" + selector + ")";
264
- }
265
-
266
- // Return the newly-formed element set
267
- return ret;
268
- },
269
-
270
- // Execute a callback for every element in the matched set.
271
- // (You can seed the arguments with an array of args, but this is
272
- // only used internally.)
273
- each: function( callback, args ) {
274
- return jQuery.each( this, callback, args );
275
- },
276
-
277
- ready: function( fn ) {
278
- // Attach the listeners
279
- jQuery.bindReady();
280
-
281
- // Add the callback
282
- readyList.done( fn );
283
-
284
- return this;
285
- },
286
-
287
- eq: function( i ) {
288
- return i === -1 ?
289
- this.slice( i ) :
290
- this.slice( i, +i + 1 );
291
- },
292
-
293
- first: function() {
294
- return this.eq( 0 );
295
- },
296
-
297
- last: function() {
298
- return this.eq( -1 );
299
- },
300
-
301
- slice: function() {
302
- return this.pushStack( slice.apply( this, arguments ),
303
- "slice", slice.call(arguments).join(",") );
304
- },
305
-
306
- map: function( callback ) {
307
- return this.pushStack( jQuery.map(this, function( elem, i ) {
308
- return callback.call( elem, i, elem );
309
- }));
310
- },
311
-
312
- end: function() {
313
- return this.prevObject || this.constructor(null);
314
- },
315
-
316
- // For internal use only.
317
- // Behaves like an Array's method, not like a jQuery method.
318
- push: push,
319
- sort: [].sort,
320
- splice: [].splice
321
- };
322
-
323
- // Give the init function the jQuery prototype for later instantiation
324
- jQuery.fn.init.prototype = jQuery.fn;
325
-
326
- jQuery.extend = jQuery.fn.extend = function() {
327
- var options, name, src, copy, copyIsArray, clone,
328
- target = arguments[0] || {},
329
- i = 1,
330
- length = arguments.length,
331
- deep = false;
332
-
333
- // Handle a deep copy situation
334
- if ( typeof target === "boolean" ) {
335
- deep = target;
336
- target = arguments[1] || {};
337
- // skip the boolean and the target
338
- i = 2;
339
- }
340
-
341
- // Handle case when target is a string or something (possible in deep copy)
342
- if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
343
- target = {};
344
- }
345
-
346
- // extend jQuery itself if only one argument is passed
347
- if ( length === i ) {
348
- target = this;
349
- --i;
350
- }
351
-
352
- for ( ; i < length; i++ ) {
353
- // Only deal with non-null/undefined values
354
- if ( (options = arguments[ i ]) != null ) {
355
- // Extend the base object
356
- for ( name in options ) {
357
- src = target[ name ];
358
- copy = options[ name ];
359
-
360
- // Prevent never-ending loop
361
- if ( target === copy ) {
362
- continue;
363
- }
364
-
365
- // Recurse if we're merging plain objects or arrays
366
- if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
367
- if ( copyIsArray ) {
368
- copyIsArray = false;
369
- clone = src && jQuery.isArray(src) ? src : [];
370
-
371
- } else {
372
- clone = src && jQuery.isPlainObject(src) ? src : {};
373
- }
374
-
375
- // Never move original objects, clone them
376
- target[ name ] = jQuery.extend( deep, clone, copy );
377
-
378
- // Don't bring in undefined values
379
- } else if ( copy !== undefined ) {
380
- target[ name ] = copy;
381
- }
382
- }
383
- }
384
- }
385
-
386
- // Return the modified object
387
- return target;
388
- };
389
-
390
- jQuery.extend({
391
- noConflict: function( deep ) {
392
- if ( window.$ === jQuery ) {
393
- window.$ = _$;
394
- }
395
-
396
- if ( deep && window.jQuery === jQuery ) {
397
- window.jQuery = _jQuery;
398
- }
399
-
400
- return jQuery;
401
- },
402
-
403
- // Is the DOM ready to be used? Set to true once it occurs.
404
- isReady: false,
405
-
406
- // A counter to track how many items to wait for before
407
- // the ready event fires. See #6781
408
- readyWait: 1,
409
-
410
- // Hold (or release) the ready event
411
- holdReady: function( hold ) {
412
- if ( hold ) {
413
- jQuery.readyWait++;
414
- } else {
415
- jQuery.ready( true );
416
- }
417
- },
418
-
419
- // Handle when the DOM is ready
420
- ready: function( wait ) {
421
- // Either a released hold or an DOMready/load event and not yet ready
422
- if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
423
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
424
- if ( !document.body ) {
425
- return setTimeout( jQuery.ready, 1 );
426
- }
427
-
428
- // Remember that the DOM is ready
429
- jQuery.isReady = true;
430
-
431
- // If a normal DOM Ready event fired, decrement, and wait if need be
432
- if ( wait !== true && --jQuery.readyWait > 0 ) {
433
- return;
434
- }
435
-
436
- // If there are functions bound, to execute
437
- readyList.resolveWith( document, [ jQuery ] );
438
-
439
- // Trigger any bound ready events
440
- if ( jQuery.fn.trigger ) {
441
- jQuery( document ).trigger( "ready" ).unbind( "ready" );
442
- }
443
- }
444
- },
445
-
446
- bindReady: function() {
447
- if ( readyList ) {
448
- return;
449
- }
450
-
451
- readyList = jQuery._Deferred();
452
-
453
- // Catch cases where $(document).ready() is called after the
454
- // browser event has already occurred.
455
- if ( document.readyState === "complete" ) {
456
- // Handle it asynchronously to allow scripts the opportunity to delay ready
457
- return setTimeout( jQuery.ready, 1 );
458
- }
459
-
460
- // Mozilla, Opera and webkit nightlies currently support this event
461
- if ( document.addEventListener ) {
462
- // Use the handy event callback
463
- document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
464
-
465
- // A fallback to window.onload, that will always work
466
- window.addEventListener( "load", jQuery.ready, false );
467
-
468
- // If IE event model is used
469
- } else if ( document.attachEvent ) {
470
- // ensure firing before onload,
471
- // maybe late but safe also for iframes
472
- document.attachEvent( "onreadystatechange", DOMContentLoaded );
473
-
474
- // A fallback to window.onload, that will always work
475
- window.attachEvent( "onload", jQuery.ready );
476
-
477
- // If IE and not a frame
478
- // continually check to see if the document is ready
479
- var toplevel = false;
480
-
481
- try {
482
- toplevel = window.frameElement == null;
483
- } catch(e) {}
484
-
485
- if ( document.documentElement.doScroll && toplevel ) {
486
- doScrollCheck();
487
- }
488
- }
489
- },
490
-
491
- // See test/unit/core.js for details concerning isFunction.
492
- // Since version 1.3, DOM methods and functions like alert
493
- // aren't supported. They return false on IE (#2968).
494
- isFunction: function( obj ) {
495
- return jQuery.type(obj) === "function";
496
- },
497
-
498
- isArray: Array.isArray || function( obj ) {
499
- return jQuery.type(obj) === "array";
500
- },
501
-
502
- // A crude way of determining if an object is a window
503
- isWindow: function( obj ) {
504
- return obj && typeof obj === "object" && "setInterval" in obj;
505
- },
506
-
507
- isNaN: function( obj ) {
508
- return obj == null || !rdigit.test( obj ) || isNaN( obj );
509
- },
510
-
511
- type: function( obj ) {
512
- return obj == null ?
513
- String( obj ) :
514
- class2type[ toString.call(obj) ] || "object";
515
- },
516
-
517
- isPlainObject: function( obj ) {
518
- // Must be an Object.
519
- // Because of IE, we also have to check the presence of the constructor property.
520
- // Make sure that DOM nodes and window objects don't pass through, as well
521
- if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
522
- return false;
523
- }
524
-
525
- try {
526
- // Not own constructor property must be Object
527
- if ( obj.constructor &&
528
- !hasOwn.call(obj, "constructor") &&
529
- !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
530
- return false;
531
- }
532
- } catch ( e ) {
533
- // IE8,9 Will throw exceptions on certain host objects #9897
534
- return false;
535
- }
536
-
537
- // Own properties are enumerated firstly, so to speed up,
538
- // if last one is own, then all properties are own.
539
-
540
- var key;
541
- for ( key in obj ) {}
542
-
543
- return key === undefined || hasOwn.call( obj, key );
544
- },
545
-
546
- isEmptyObject: function( obj ) {
547
- for ( var name in obj ) {
548
- return false;
549
- }
550
- return true;
551
- },
552
-
553
- error: function( msg ) {
554
- throw msg;
555
- },
556
-
557
- parseJSON: function( data ) {
558
- if ( typeof data !== "string" || !data ) {
559
- return null;
560
- }
561
-
562
- // Make sure leading/trailing whitespace is removed (IE can't handle it)
563
- data = jQuery.trim( data );
564
-
565
- // Attempt to parse using the native JSON parser first
566
- if ( window.JSON && window.JSON.parse ) {
567
- return window.JSON.parse( data );
568
- }
569
-
570
- // Make sure the incoming data is actual JSON
571
- // Logic borrowed from http://json.org/json2.js
572
- if ( rvalidchars.test( data.replace( rvalidescape, "@" )
573
- .replace( rvalidtokens, "]" )
574
- .replace( rvalidbraces, "")) ) {
575
-
576
- return (new Function( "return " + data ))();
577
-
578
- }
579
- jQuery.error( "Invalid JSON: " + data );
580
- },
581
-
582
- // Cross-browser xml parsing
583
- parseXML: function( data ) {
584
- var xml, tmp;
585
- try {
586
- if ( window.DOMParser ) { // Standard
587
- tmp = new DOMParser();
588
- xml = tmp.parseFromString( data , "text/xml" );
589
- } else { // IE
590
- xml = new ActiveXObject( "Microsoft.XMLDOM" );
591
- xml.async = "false";
592
- xml.loadXML( data );
593
- }
594
- } catch( e ) {
595
- xml = undefined;
596
- }
597
- if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
598
- jQuery.error( "Invalid XML: " + data );
599
- }
600
- return xml;
601
- },
602
-
603
- noop: function() {},
604
-
605
- // Evaluates a script in a global context
606
- // Workarounds based on findings by Jim Driscoll
607
- // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
608
- globalEval: function( data ) {
609
- if ( data && rnotwhite.test( data ) ) {
610
- // We use execScript on Internet Explorer
611
- // We use an anonymous function so that context is window
612
- // rather than jQuery in Firefox
613
- ( window.execScript || function( data ) {
614
- window[ "eval" ].call( window, data );
615
- } )( data );
616
- }
617
- },
618
-
619
- // Convert dashed to camelCase; used by the css and data modules
620
- // Microsoft forgot to hump their vendor prefix (#9572)
621
- camelCase: function( string ) {
622
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
623
- },
624
-
625
- nodeName: function( elem, name ) {
626
- return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
627
- },
628
-
629
- // args is for internal usage only
630
- each: function( object, callback, args ) {
631
- var name, i = 0,
632
- length = object.length,
633
- isObj = length === undefined || jQuery.isFunction( object );
634
-
635
- if ( args ) {
636
- if ( isObj ) {
637
- for ( name in object ) {
638
- if ( callback.apply( object[ name ], args ) === false ) {
639
- break;
640
- }
641
- }
642
- } else {
643
- for ( ; i < length; ) {
644
- if ( callback.apply( object[ i++ ], args ) === false ) {
645
- break;
646
- }
647
- }
648
- }
649
-
650
- // A special, fast, case for the most common use of each
651
- } else {
652
- if ( isObj ) {
653
- for ( name in object ) {
654
- if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
655
- break;
656
- }
657
- }
658
- } else {
659
- for ( ; i < length; ) {
660
- if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
661
- break;
662
- }
663
- }
664
- }
665
- }
666
-
667
- return object;
668
- },
669
-
670
- // Use native String.trim function wherever possible
671
- trim: trim ?
672
- function( text ) {
673
- return text == null ?
674
- "" :
675
- trim.call( text );
676
- } :
677
-
678
- // Otherwise use our own trimming functionality
679
- function( text ) {
680
- return text == null ?
681
- "" :
682
- text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
683
- },
684
-
685
- // results is for internal usage only
686
- makeArray: function( array, results ) {
687
- var ret = results || [];
688
-
689
- if ( array != null ) {
690
- // The window, strings (and functions) also have 'length'
691
- // The extra typeof function check is to prevent crashes
692
- // in Safari 2 (See: #3039)
693
- // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
694
- var type = jQuery.type( array );
695
-
696
- if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
697
- push.call( ret, array );
698
- } else {
699
- jQuery.merge( ret, array );
700
- }
701
- }
702
-
703
- return ret;
704
- },
705
-
706
- inArray: function( elem, array ) {
707
- if ( !array ) {
708
- return -1;
709
- }
710
-
711
- if ( indexOf ) {
712
- return indexOf.call( array, elem );
713
- }
714
-
715
- for ( var i = 0, length = array.length; i < length; i++ ) {
716
- if ( array[ i ] === elem ) {
717
- return i;
718
- }
719
- }
720
-
721
- return -1;
722
- },
723
-
724
- merge: function( first, second ) {
725
- var i = first.length,
726
- j = 0;
727
-
728
- if ( typeof second.length === "number" ) {
729
- for ( var l = second.length; j < l; j++ ) {
730
- first[ i++ ] = second[ j ];
731
- }
732
-
733
- } else {
734
- while ( second[j] !== undefined ) {
735
- first[ i++ ] = second[ j++ ];
736
- }
737
- }
738
-
739
- first.length = i;
740
-
741
- return first;
742
- },
743
-
744
- grep: function( elems, callback, inv ) {
745
- var ret = [], retVal;
746
- inv = !!inv;
747
-
748
- // Go through the array, only saving the items
749
- // that pass the validator function
750
- for ( var i = 0, length = elems.length; i < length; i++ ) {
751
- retVal = !!callback( elems[ i ], i );
752
- if ( inv !== retVal ) {
753
- ret.push( elems[ i ] );
754
- }
755
- }
756
-
757
- return ret;
758
- },
759
-
760
- // arg is for internal usage only
761
- map: function( elems, callback, arg ) {
762
- var value, key, ret = [],
763
- i = 0,
764
- length = elems.length,
765
- // jquery objects are treated as arrays
766
- isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
767
-
768
- // Go through the array, translating each of the items to their
769
- if ( isArray ) {
770
- for ( ; i < length; i++ ) {
771
- value = callback( elems[ i ], i, arg );
772
-
773
- if ( value != null ) {
774
- ret[ ret.length ] = value;
775
- }
776
- }
777
-
778
- // Go through every key on the object,
779
- } else {
780
- for ( key in elems ) {
781
- value = callback( elems[ key ], key, arg );
782
-
783
- if ( value != null ) {
784
- ret[ ret.length ] = value;
785
- }
786
- }
787
- }
788
-
789
- // Flatten any nested arrays
790
- return ret.concat.apply( [], ret );
791
- },
792
-
793
- // A global GUID counter for objects
794
- guid: 1,
795
-
796
- // Bind a function to a context, optionally partially applying any
797
- // arguments.
798
- proxy: function( fn, context ) {
799
- if ( typeof context === "string" ) {
800
- var tmp = fn[ context ];
801
- context = fn;
802
- fn = tmp;
803
- }
804
-
805
- // Quick check to determine if target is callable, in the spec
806
- // this throws a TypeError, but we will just return undefined.
807
- if ( !jQuery.isFunction( fn ) ) {
808
- return undefined;
809
- }
810
-
811
- // Simulated bind
812
- var args = slice.call( arguments, 2 ),
813
- proxy = function() {
814
- return fn.apply( context, args.concat( slice.call( arguments ) ) );
815
- };
816
-
817
- // Set the guid of unique handler to the same of original handler, so it can be removed
818
- proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
819
-
820
- return proxy;
821
- },
822
-
823
- // Mutifunctional method to get and set values to a collection
824
- // The value/s can optionally be executed if it's a function
825
- access: function( elems, key, value, exec, fn, pass ) {
826
- var length = elems.length;
827
-
828
- // Setting many attributes
829
- if ( typeof key === "object" ) {
830
- for ( var k in key ) {
831
- jQuery.access( elems, k, key[k], exec, fn, value );
832
- }
833
- return elems;
834
- }
835
-
836
- // Setting one attribute
837
- if ( value !== undefined ) {
838
- // Optionally, function values get executed if exec is true
839
- exec = !pass && exec && jQuery.isFunction(value);
840
-
841
- for ( var i = 0; i < length; i++ ) {
842
- fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
843
- }
844
-
845
- return elems;
846
- }
847
-
848
- // Getting an attribute
849
- return length ? fn( elems[0], key ) : undefined;
850
- },
851
-
852
- now: function() {
853
- return (new Date()).getTime();
854
- },
855
-
856
- // Use of jQuery.browser is frowned upon.
857
- // More details: http://docs.jquery.com/Utilities/jQuery.browser
858
- uaMatch: function( ua ) {
859
- ua = ua.toLowerCase();
860
-
861
- var match = rwebkit.exec( ua ) ||
862
- ropera.exec( ua ) ||
863
- rmsie.exec( ua ) ||
864
- ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
865
- [];
866
-
867
- return { browser: match[1] || "", version: match[2] || "0" };
868
- },
869
-
870
- sub: function() {
871
- function jQuerySub( selector, context ) {
872
- return new jQuerySub.fn.init( selector, context );
873
- }
874
- jQuery.extend( true, jQuerySub, this );
875
- jQuerySub.superclass = this;
876
- jQuerySub.fn = jQuerySub.prototype = this();
877
- jQuerySub.fn.constructor = jQuerySub;
878
- jQuerySub.sub = this.sub;
879
- jQuerySub.fn.init = function init( selector, context ) {
880
- if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
881
- context = jQuerySub( context );
882
- }
883
-
884
- return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
885
- };
886
- jQuerySub.fn.init.prototype = jQuerySub.fn;
887
- var rootjQuerySub = jQuerySub(document);
888
- return jQuerySub;
889
- },
890
-
891
- browser: {}
892
- });
893
-
894
- // Populate the class2type map
895
- jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
896
- class2type[ "[object " + name + "]" ] = name.toLowerCase();
897
- });
898
-
899
- browserMatch = jQuery.uaMatch( userAgent );
900
- if ( browserMatch.browser ) {
901
- jQuery.browser[ browserMatch.browser ] = true;
902
- jQuery.browser.version = browserMatch.version;
903
- }
904
-
905
- // Deprecated, use jQuery.browser.webkit instead
906
- if ( jQuery.browser.webkit ) {
907
- jQuery.browser.safari = true;
908
- }
909
-
910
- // IE doesn't match non-breaking spaces with \s
911
- if ( rnotwhite.test( "\xA0" ) ) {
912
- trimLeft = /^[\s\xA0]+/;
913
- trimRight = /[\s\xA0]+$/;
914
- }
915
-
916
- // All jQuery objects should point back to these
917
- rootjQuery = jQuery(document);
918
-
919
- // Cleanup functions for the document ready method
920
- if ( document.addEventListener ) {
921
- DOMContentLoaded = function() {
922
- document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
923
- jQuery.ready();
924
- };
925
-
926
- } else if ( document.attachEvent ) {
927
- DOMContentLoaded = function() {
928
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
929
- if ( document.readyState === "complete" ) {
930
- document.detachEvent( "onreadystatechange", DOMContentLoaded );
931
- jQuery.ready();
932
- }
933
- };
934
- }
935
-
936
- // The DOM ready check for Internet Explorer
937
- function doScrollCheck() {
938
- if ( jQuery.isReady ) {
939
- return;
940
- }
941
-
942
- try {
943
- // If IE is used, use the trick by Diego Perini
944
- // http://javascript.nwbox.com/IEContentLoaded/
945
- document.documentElement.doScroll("left");
946
- } catch(e) {
947
- setTimeout( doScrollCheck, 1 );
948
- return;
949
- }
950
-
951
- // and execute any waiting functions
952
- jQuery.ready();
953
- }
954
-
955
- return jQuery;
956
-
957
- })();
958
-
959
-
960
- var // Promise methods
961
- promiseMethods = "done fail isResolved isRejected promise then always pipe".split( " " ),
962
- // Static reference to slice
963
- sliceDeferred = [].slice;
964
-
965
- jQuery.extend({
966
- // Create a simple deferred (one callbacks list)
967
- _Deferred: function() {
968
- var // callbacks list
969
- callbacks = [],
970
- // stored [ context , args ]
971
- fired,
972
- // to avoid firing when already doing so
973
- firing,
974
- // flag to know if the deferred has been cancelled
975
- cancelled,
976
- // the deferred itself
977
- deferred = {
978
-
979
- // done( f1, f2, ...)
980
- done: function() {
981
- if ( !cancelled ) {
982
- var args = arguments,
983
- i,
984
- length,
985
- elem,
986
- type,
987
- _fired;
988
- if ( fired ) {
989
- _fired = fired;
990
- fired = 0;
991
- }
992
- for ( i = 0, length = args.length; i < length; i++ ) {
993
- elem = args[ i ];
994
- type = jQuery.type( elem );
995
- if ( type === "array" ) {
996
- deferred.done.apply( deferred, elem );
997
- } else if ( type === "function" ) {
998
- callbacks.push( elem );
999
- }
1000
- }
1001
- if ( _fired ) {
1002
- deferred.resolveWith( _fired[ 0 ], _fired[ 1 ] );
1003
- }
1004
- }
1005
- return this;
1006
- },
1007
-
1008
- // resolve with given context and args
1009
- resolveWith: function( context, args ) {
1010
- if ( !cancelled && !fired && !firing ) {
1011
- // make sure args are available (#8421)
1012
- args = args || [];
1013
- firing = 1;
1014
- try {
1015
- while( callbacks[ 0 ] ) {
1016
- callbacks.shift().apply( context, args );
1017
- }
1018
- }
1019
- finally {
1020
- fired = [ context, args ];
1021
- firing = 0;
1022
- }
1023
- }
1024
- return this;
1025
- },
1026
-
1027
- // resolve with this as context and given arguments
1028
- resolve: function() {
1029
- deferred.resolveWith( this, arguments );
1030
- return this;
1031
- },
1032
-
1033
- // Has this deferred been resolved?
1034
- isResolved: function() {
1035
- return !!( firing || fired );
1036
- },
1037
-
1038
- // Cancel
1039
- cancel: function() {
1040
- cancelled = 1;
1041
- callbacks = [];
1042
- return this;
1043
- }
1044
- };
1045
-
1046
- return deferred;
1047
- },
1048
-
1049
- // Full fledged deferred (two callbacks list)
1050
- Deferred: function( func ) {
1051
- var deferred = jQuery._Deferred(),
1052
- failDeferred = jQuery._Deferred(),
1053
- promise;
1054
- // Add errorDeferred methods, then and promise
1055
- jQuery.extend( deferred, {
1056
- then: function( doneCallbacks, failCallbacks ) {
1057
- deferred.done( doneCallbacks ).fail( failCallbacks );
1058
- return this;
1059
- },
1060
- always: function() {
1061
- return deferred.done.apply( deferred, arguments ).fail.apply( this, arguments );
1062
- },
1063
- fail: failDeferred.done,
1064
- rejectWith: failDeferred.resolveWith,
1065
- reject: failDeferred.resolve,
1066
- isRejected: failDeferred.isResolved,
1067
- pipe: function( fnDone, fnFail ) {
1068
- return jQuery.Deferred(function( newDefer ) {
1069
- jQuery.each( {
1070
- done: [ fnDone, "resolve" ],
1071
- fail: [ fnFail, "reject" ]
1072
- }, function( handler, data ) {
1073
- var fn = data[ 0 ],
1074
- action = data[ 1 ],
1075
- returned;
1076
- if ( jQuery.isFunction( fn ) ) {
1077
- deferred[ handler ](function() {
1078
- returned = fn.apply( this, arguments );
1079
- if ( returned && jQuery.isFunction( returned.promise ) ) {
1080
- returned.promise().then( newDefer.resolve, newDefer.reject );
1081
- } else {
1082
- newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
1083
- }
1084
- });
1085
- } else {
1086
- deferred[ handler ]( newDefer[ action ] );
1087
- }
1088
- });
1089
- }).promise();
1090
- },
1091
- // Get a promise for this deferred
1092
- // If obj is provided, the promise aspect is added to the object
1093
- promise: function( obj ) {
1094
- if ( obj == null ) {
1095
- if ( promise ) {
1096
- return promise;
1097
- }
1098
- promise = obj = {};
1099
- }
1100
- var i = promiseMethods.length;
1101
- while( i-- ) {
1102
- obj[ promiseMethods[i] ] = deferred[ promiseMethods[i] ];
1103
- }
1104
- return obj;
1105
- }
1106
- });
1107
- // Make sure only one callback list will be used
1108
- deferred.done( failDeferred.cancel ).fail( deferred.cancel );
1109
- // Unexpose cancel
1110
- delete deferred.cancel;
1111
- // Call given func if any
1112
- if ( func ) {
1113
- func.call( deferred, deferred );
1114
- }
1115
- return deferred;
1116
- },
1117
-
1118
- // Deferred helper
1119
- when: function( firstParam ) {
1120
- var args = arguments,
1121
- i = 0,
1122
- length = args.length,
1123
- count = length,
1124
- deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?
1125
- firstParam :
1126
- jQuery.Deferred();
1127
- function resolveFunc( i ) {
1128
- return function( value ) {
1129
- args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
1130
- if ( !( --count ) ) {
1131
- // Strange bug in FF4:
1132
- // Values changed onto the arguments object sometimes end up as undefined values
1133
- // outside the $.when method. Cloning the object into a fresh array solves the issue
1134
- deferred.resolveWith( deferred, sliceDeferred.call( args, 0 ) );
1135
- }
1136
- };
1137
- }
1138
- if ( length > 1 ) {
1139
- for( ; i < length; i++ ) {
1140
- if ( args[ i ] && jQuery.isFunction( args[ i ].promise ) ) {
1141
- args[ i ].promise().then( resolveFunc(i), deferred.reject );
1142
- } else {
1143
- --count;
1144
- }
1145
- }
1146
- if ( !count ) {
1147
- deferred.resolveWith( deferred, args );
1148
- }
1149
- } else if ( deferred !== firstParam ) {
1150
- deferred.resolveWith( deferred, length ? [ firstParam ] : [] );
1151
- }
1152
- return deferred.promise();
1153
- }
1154
- });
1155
-
1156
-
1157
-
1158
- jQuery.support = (function() {
1159
-
1160
- var div = document.createElement( "div" ),
1161
- documentElement = document.documentElement,
1162
- all,
1163
- a,
1164
- select,
1165
- opt,
1166
- input,
1167
- marginDiv,
1168
- support,
1169
- fragment,
1170
- body,
1171
- testElementParent,
1172
- testElement,
1173
- testElementStyle,
1174
- tds,
1175
- events,
1176
- eventName,
1177
- i,
1178
- isSupported;
1179
-
1180
- // Preliminary tests
1181
- div.setAttribute("className", "t");
1182
- div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
1183
-
1184
-
1185
- all = div.getElementsByTagName( "*" );
1186
- a = div.getElementsByTagName( "a" )[ 0 ];
1187
-
1188
- // Can't get basic test support
1189
- if ( !all || !all.length || !a ) {
1190
- return {};
1191
- }
1192
-
1193
- // First batch of supports tests
1194
- select = document.createElement( "select" );
1195
- opt = select.appendChild( document.createElement("option") );
1196
- input = div.getElementsByTagName( "input" )[ 0 ];
1197
-
1198
- support = {
1199
- // IE strips leading whitespace when .innerHTML is used
1200
- leadingWhitespace: ( div.firstChild.nodeType === 3 ),
1201
-
1202
- // Make sure that tbody elements aren't automatically inserted
1203
- // IE will insert them into empty tables
1204
- tbody: !div.getElementsByTagName( "tbody" ).length,
1205
-
1206
- // Make sure that link elements get serialized correctly by innerHTML
1207
- // This requires a wrapper element in IE
1208
- htmlSerialize: !!div.getElementsByTagName( "link" ).length,
1209
-
1210
- // Get the style information from getAttribute
1211
- // (IE uses .cssText instead)
1212
- style: /top/.test( a.getAttribute("style") ),
1213
-
1214
- // Make sure that URLs aren't manipulated
1215
- // (IE normalizes it by default)
1216
- hrefNormalized: ( a.getAttribute( "href" ) === "/a" ),
1217
-
1218
- // Make sure that element opacity exists
1219
- // (IE uses filter instead)
1220
- // Use a regex to work around a WebKit issue. See #5145
1221
- opacity: /^0.55$/.test( a.style.opacity ),
1222
-
1223
- // Verify style float existence
1224
- // (IE uses styleFloat instead of cssFloat)
1225
- cssFloat: !!a.style.cssFloat,
1226
-
1227
- // Make sure that if no value is specified for a checkbox
1228
- // that it defaults to "on".
1229
- // (WebKit defaults to "" instead)
1230
- checkOn: ( input.value === "on" ),
1231
-
1232
- // Make sure that a selected-by-default option has a working selected property.
1233
- // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
1234
- optSelected: opt.selected,
1235
-
1236
- // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
1237
- getSetAttribute: div.className !== "t",
1238
-
1239
- // Will be defined later
1240
- submitBubbles: true,
1241
- changeBubbles: true,
1242
- focusinBubbles: false,
1243
- deleteExpando: true,
1244
- noCloneEvent: true,
1245
- inlineBlockNeedsLayout: false,
1246
- shrinkWrapBlocks: false,
1247
- reliableMarginRight: true
1248
- };
1249
-
1250
- // Make sure checked status is properly cloned
1251
- input.checked = true;
1252
- support.noCloneChecked = input.cloneNode( true ).checked;
1253
-
1254
- // Make sure that the options inside disabled selects aren't marked as disabled
1255
- // (WebKit marks them as disabled)
1256
- select.disabled = true;
1257
- support.optDisabled = !opt.disabled;
1258
-
1259
- // Test to see if it's possible to delete an expando from an element
1260
- // Fails in Internet Explorer
1261
- try {
1262
- delete div.test;
1263
- } catch( e ) {
1264
- support.deleteExpando = false;
1265
- }
1266
-
1267
- if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
1268
- div.attachEvent( "onclick", function() {
1269
- // Cloning a node shouldn't copy over any
1270
- // bound event handlers (IE does this)
1271
- support.noCloneEvent = false;
1272
- });
1273
- div.cloneNode( true ).fireEvent( "onclick" );
1274
- }
1275
-
1276
- // Check if a radio maintains it's value
1277
- // after being appended to the DOM
1278
- input = document.createElement("input");
1279
- input.value = "t";
1280
- input.setAttribute("type", "radio");
1281
- support.radioValue = input.value === "t";
1282
-
1283
- input.setAttribute("checked", "checked");
1284
- div.appendChild( input );
1285
- fragment = document.createDocumentFragment();
1286
- fragment.appendChild( div.firstChild );
1287
-
1288
- // WebKit doesn't clone checked state correctly in fragments
1289
- support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
1290
-
1291
- div.innerHTML = "";
1292
-
1293
- // Figure out if the W3C box model works as expected
1294
- div.style.width = div.style.paddingLeft = "1px";
1295
-
1296
- body = document.getElementsByTagName( "body" )[ 0 ];
1297
- // We use our own, invisible, body unless the body is already present
1298
- // in which case we use a div (#9239)
1299
- testElement = document.createElement( body ? "div" : "body" );
1300
- testElementStyle = {
1301
- visibility: "hidden",
1302
- width: 0,
1303
- height: 0,
1304
- border: 0,
1305
- margin: 0,
1306
- background: "none"
1307
- };
1308
- if ( body ) {
1309
- jQuery.extend( testElementStyle, {
1310
- position: "absolute",
1311
- left: "-1000px",
1312
- top: "-1000px"
1313
- });
1314
- }
1315
- for ( i in testElementStyle ) {
1316
- testElement.style[ i ] = testElementStyle[ i ];
1317
- }
1318
- testElement.appendChild( div );
1319
- testElementParent = body || documentElement;
1320
- testElementParent.insertBefore( testElement, testElementParent.firstChild );
1321
-
1322
- // Check if a disconnected checkbox will retain its checked
1323
- // value of true after appended to the DOM (IE6/7)
1324
- support.appendChecked = input.checked;
1325
-
1326
- support.boxModel = div.offsetWidth === 2;
1327
-
1328
- if ( "zoom" in div.style ) {
1329
- // Check if natively block-level elements act like inline-block
1330
- // elements when setting their display to 'inline' and giving
1331
- // them layout
1332
- // (IE < 8 does this)
1333
- div.style.display = "inline";
1334
- div.style.zoom = 1;
1335
- support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 );
1336
-
1337
- // Check if elements with layout shrink-wrap their children
1338
- // (IE 6 does this)
1339
- div.style.display = "";
1340
- div.innerHTML = "<div style='width:4px;'></div>";
1341
- support.shrinkWrapBlocks = ( div.offsetWidth !== 2 );
1342
- }
1343
-
1344
- div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
1345
- tds = div.getElementsByTagName( "td" );
1346
-
1347
- // Check if table cells still have offsetWidth/Height when they are set
1348
- // to display:none and there are still other visible table cells in a
1349
- // table row; if so, offsetWidth/Height are not reliable for use when
1350
- // determining if an element has been hidden directly using
1351
- // display:none (it is still safe to use offsets if a parent element is
1352
- // hidden; don safety goggles and see bug #4512 for more information).
1353
- // (only IE 8 fails this test)
1354
- isSupported = ( tds[ 0 ].offsetHeight === 0 );
1355
-
1356
- tds[ 0 ].style.display = "";
1357
- tds[ 1 ].style.display = "none";
1358
-
1359
- // Check if empty table cells still have offsetWidth/Height
1360
- // (IE < 8 fail this test)
1361
- support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
1362
- div.innerHTML = "";
1363
-
1364
- // Check if div with explicit width and no margin-right incorrectly
1365
- // gets computed margin-right based on width of container. For more
1366
- // info see bug #3333
1367
- // Fails in WebKit before Feb 2011 nightlies
1368
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
1369
- if ( document.defaultView && document.defaultView.getComputedStyle ) {
1370
- marginDiv = document.createElement( "div" );
1371
- marginDiv.style.width = "0";
1372
- marginDiv.style.marginRight = "0";
1373
- div.appendChild( marginDiv );
1374
- support.reliableMarginRight =
1375
- ( parseInt( ( document.defaultView.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
1376
- }
1377
-
1378
- // Remove the body element we added
1379
- testElement.innerHTML = "";
1380
- testElementParent.removeChild( testElement );
1381
-
1382
- // Technique from Juriy Zaytsev
1383
- // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
1384
- // We only care about the case where non-standard event systems
1385
- // are used, namely in IE. Short-circuiting here helps us to
1386
- // avoid an eval call (in setAttribute) which can cause CSP
1387
- // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
1388
- if ( div.attachEvent ) {
1389
- for( i in {
1390
- submit: 1,
1391
- change: 1,
1392
- focusin: 1
1393
- } ) {
1394
- eventName = "on" + i;
1395
- isSupported = ( eventName in div );
1396
- if ( !isSupported ) {
1397
- div.setAttribute( eventName, "return;" );
1398
- isSupported = ( typeof div[ eventName ] === "function" );
1399
- }
1400
- support[ i + "Bubbles" ] = isSupported;
1401
- }
1402
- }
1403
-
1404
- // Null connected elements to avoid leaks in IE
1405
- testElement = fragment = select = opt = body = marginDiv = div = input = null;
1406
-
1407
- return support;
1408
- })();
1409
-
1410
- // Keep track of boxModel
1411
- jQuery.boxModel = jQuery.support.boxModel;
1412
-
1413
-
1414
-
1415
-
1416
- var rbrace = /^(?:\{.*\}|\[.*\])$/,
1417
- rmultiDash = /([A-Z])/g;
1418
-
1419
- jQuery.extend({
1420
- cache: {},
1421
-
1422
- // Please use with caution
1423
- uuid: 0,
1424
-
1425
- // Unique for each copy of jQuery on the page
1426
- // Non-digits removed to match rinlinejQuery
1427
- expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
1428
-
1429
- // The following elements throw uncatchable exceptions if you
1430
- // attempt to add expando properties to them.
1431
- noData: {
1432
- "embed": true,
1433
- // Ban all objects except for Flash (which handle expandos)
1434
- "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
1435
- "applet": true
1436
- },
1437
-
1438
- hasData: function( elem ) {
1439
- elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
1440
-
1441
- return !!elem && !isEmptyDataObject( elem );
1442
- },
1443
-
1444
- data: function( elem, name, data, pvt /* Internal Use Only */ ) {
1445
- if ( !jQuery.acceptData( elem ) ) {
1446
- return;
1447
- }
1448
-
1449
- var thisCache, ret,
1450
- internalKey = jQuery.expando,
1451
- getByName = typeof name === "string",
1452
-
1453
- // We have to handle DOM nodes and JS objects differently because IE6-7
1454
- // can't GC object references properly across the DOM-JS boundary
1455
- isNode = elem.nodeType,
1456
-
1457
- // Only DOM nodes need the global jQuery cache; JS object data is
1458
- // attached directly to the object so GC can occur automatically
1459
- cache = isNode ? jQuery.cache : elem,
1460
-
1461
- // Only defining an ID for JS objects if its cache already exists allows
1462
- // the code to shortcut on the same path as a DOM node with no cache
1463
- id = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando;
1464
-
1465
- // Avoid doing any more work than we need to when trying to get data on an
1466
- // object that has no data at all
1467
- if ( (!id || (pvt && id && (cache[ id ] && !cache[ id ][ internalKey ]))) && getByName && data === undefined ) {
1468
- return;
1469
- }
1470
-
1471
- if ( !id ) {
1472
- // Only DOM nodes need a new unique ID for each element since their data
1473
- // ends up in the global cache
1474
- if ( isNode ) {
1475
- elem[ jQuery.expando ] = id = ++jQuery.uuid;
1476
- } else {
1477
- id = jQuery.expando;
1478
- }
1479
- }
1480
-
1481
- if ( !cache[ id ] ) {
1482
- cache[ id ] = {};
1483
-
1484
- // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery
1485
- // metadata on plain JS objects when the object is serialized using
1486
- // JSON.stringify
1487
- if ( !isNode ) {
1488
- cache[ id ].toJSON = jQuery.noop;
1489
- }
1490
- }
1491
-
1492
- // An object can be passed to jQuery.data instead of a key/value pair; this gets
1493
- // shallow copied over onto the existing cache
1494
- if ( typeof name === "object" || typeof name === "function" ) {
1495
- if ( pvt ) {
1496
- cache[ id ][ internalKey ] = jQuery.extend(cache[ id ][ internalKey ], name);
1497
- } else {
1498
- cache[ id ] = jQuery.extend(cache[ id ], name);
1499
- }
1500
- }
1501
-
1502
- thisCache = cache[ id ];
1503
-
1504
- // Internal jQuery data is stored in a separate object inside the object's data
1505
- // cache in order to avoid key collisions between internal data and user-defined
1506
- // data
1507
- if ( pvt ) {
1508
- if ( !thisCache[ internalKey ] ) {
1509
- thisCache[ internalKey ] = {};
1510
- }
1511
-
1512
- thisCache = thisCache[ internalKey ];
1513
- }
1514
-
1515
- if ( data !== undefined ) {
1516
- thisCache[ jQuery.camelCase( name ) ] = data;
1517
- }
1518
-
1519
- // TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should
1520
- // not attempt to inspect the internal events object using jQuery.data, as this
1521
- // internal data object is undocumented and subject to change.
1522
- if ( name === "events" && !thisCache[name] ) {
1523
- return thisCache[ internalKey ] && thisCache[ internalKey ].events;
1524
- }
1525
-
1526
- // Check for both converted-to-camel and non-converted data property names
1527
- // If a data property was specified
1528
- if ( getByName ) {
1529
-
1530
- // First Try to find as-is property data
1531
- ret = thisCache[ name ];
1532
-
1533
- // Test for null|undefined property data
1534
- if ( ret == null ) {
1535
-
1536
- // Try to find the camelCased property
1537
- ret = thisCache[ jQuery.camelCase( name ) ];
1538
- }
1539
- } else {
1540
- ret = thisCache;
1541
- }
1542
-
1543
- return ret;
1544
- },
1545
-
1546
- removeData: function( elem, name, pvt /* Internal Use Only */ ) {
1547
- if ( !jQuery.acceptData( elem ) ) {
1548
- return;
1549
- }
1550
-
1551
- var thisCache,
1552
-
1553
- // Reference to internal data cache key
1554
- internalKey = jQuery.expando,
1555
-
1556
- isNode = elem.nodeType,
1557
-
1558
- // See jQuery.data for more information
1559
- cache = isNode ? jQuery.cache : elem,
1560
-
1561
- // See jQuery.data for more information
1562
- id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
1563
-
1564
- // If there is already no cache entry for this object, there is no
1565
- // purpose in continuing
1566
- if ( !cache[ id ] ) {
1567
- return;
1568
- }
1569
-
1570
- if ( name ) {
1571
-
1572
- thisCache = pvt ? cache[ id ][ internalKey ] : cache[ id ];
1573
-
1574
- if ( thisCache ) {
1575
-
1576
- // Support interoperable removal of hyphenated or camelcased keys
1577
- if ( !thisCache[ name ] ) {
1578
- name = jQuery.camelCase( name );
1579
- }
1580
-
1581
- delete thisCache[ name ];
1582
-
1583
- // If there is no data left in the cache, we want to continue
1584
- // and let the cache object itself get destroyed
1585
- if ( !isEmptyDataObject(thisCache) ) {
1586
- return;
1587
- }
1588
- }
1589
- }
1590
-
1591
- // See jQuery.data for more information
1592
- if ( pvt ) {
1593
- delete cache[ id ][ internalKey ];
1594
-
1595
- // Don't destroy the parent cache unless the internal data object
1596
- // had been the only thing left in it
1597
- if ( !isEmptyDataObject(cache[ id ]) ) {
1598
- return;
1599
- }
1600
- }
1601
-
1602
- var internalCache = cache[ id ][ internalKey ];
1603
-
1604
- // Browsers that fail expando deletion also refuse to delete expandos on
1605
- // the window, but it will allow it on all other JS objects; other browsers
1606
- // don't care
1607
- // Ensure that `cache` is not a window object #10080
1608
- if ( jQuery.support.deleteExpando || !cache.setInterval ) {
1609
- delete cache[ id ];
1610
- } else {
1611
- cache[ id ] = null;
1612
- }
1613
-
1614
- // We destroyed the entire user cache at once because it's faster than
1615
- // iterating through each key, but we need to continue to persist internal
1616
- // data if it existed
1617
- if ( internalCache ) {
1618
- cache[ id ] = {};
1619
- // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery
1620
- // metadata on plain JS objects when the object is serialized using
1621
- // JSON.stringify
1622
- if ( !isNode ) {
1623
- cache[ id ].toJSON = jQuery.noop;
1624
- }
1625
-
1626
- cache[ id ][ internalKey ] = internalCache;
1627
-
1628
- // Otherwise, we need to eliminate the expando on the node to avoid
1629
- // false lookups in the cache for entries that no longer exist
1630
- } else if ( isNode ) {
1631
- // IE does not allow us to delete expando properties from nodes,
1632
- // nor does it have a removeAttribute function on Document nodes;
1633
- // we must handle all of these cases
1634
- if ( jQuery.support.deleteExpando ) {
1635
- delete elem[ jQuery.expando ];
1636
- } else if ( elem.removeAttribute ) {
1637
- elem.removeAttribute( jQuery.expando );
1638
- } else {
1639
- elem[ jQuery.expando ] = null;
1640
- }
1641
- }
1642
- },
1643
-
1644
- // For internal use only.
1645
- _data: function( elem, name, data ) {
1646
- return jQuery.data( elem, name, data, true );
1647
- },
1648
-
1649
- // A method for determining if a DOM node can handle the data expando
1650
- acceptData: function( elem ) {
1651
- if ( elem.nodeName ) {
1652
- var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
1653
-
1654
- if ( match ) {
1655
- return !(match === true || elem.getAttribute("classid") !== match);
1656
- }
1657
- }
1658
-
1659
- return true;
1660
- }
1661
- });
1662
-
1663
- jQuery.fn.extend({
1664
- data: function( key, value ) {
1665
- var data = null;
1666
-
1667
- if ( typeof key === "undefined" ) {
1668
- if ( this.length ) {
1669
- data = jQuery.data( this[0] );
1670
-
1671
- if ( this[0].nodeType === 1 ) {
1672
- var attr = this[0].attributes, name;
1673
- for ( var i = 0, l = attr.length; i < l; i++ ) {
1674
- name = attr[i].name;
1675
-
1676
- if ( name.indexOf( "data-" ) === 0 ) {
1677
- name = jQuery.camelCase( name.substring(5) );
1678
-
1679
- dataAttr( this[0], name, data[ name ] );
1680
- }
1681
- }
1682
- }
1683
- }
1684
-
1685
- return data;
1686
-
1687
- } else if ( typeof key === "object" ) {
1688
- return this.each(function() {
1689
- jQuery.data( this, key );
1690
- });
1691
- }
1692
-
1693
- var parts = key.split(".");
1694
- parts[1] = parts[1] ? "." + parts[1] : "";
1695
-
1696
- if ( value === undefined ) {
1697
- data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
1698
-
1699
- // Try to fetch any internally stored data first
1700
- if ( data === undefined && this.length ) {
1701
- data = jQuery.data( this[0], key );
1702
- data = dataAttr( this[0], key, data );
1703
- }
1704
-
1705
- return data === undefined && parts[1] ?
1706
- this.data( parts[0] ) :
1707
- data;
1708
-
1709
- } else {
1710
- return this.each(function() {
1711
- var $this = jQuery( this ),
1712
- args = [ parts[0], value ];
1713
-
1714
- $this.triggerHandler( "setData" + parts[1] + "!", args );
1715
- jQuery.data( this, key, value );
1716
- $this.triggerHandler( "changeData" + parts[1] + "!", args );
1717
- });
1718
- }
1719
- },
1720
-
1721
- removeData: function( key ) {
1722
- return this.each(function() {
1723
- jQuery.removeData( this, key );
1724
- });
1725
- }
1726
- });
1727
-
1728
- function dataAttr( elem, key, data ) {
1729
- // If nothing was found internally, try to fetch any
1730
- // data from the HTML5 data-* attribute
1731
- if ( data === undefined && elem.nodeType === 1 ) {
1732
-
1733
- var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
1734
-
1735
- data = elem.getAttribute( name );
1736
-
1737
- if ( typeof data === "string" ) {
1738
- try {
1739
- data = data === "true" ? true :
1740
- data === "false" ? false :
1741
- data === "null" ? null :
1742
- !jQuery.isNaN( data ) ? parseFloat( data ) :
1743
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
1744
- data;
1745
- } catch( e ) {}
1746
-
1747
- // Make sure we set the data so it isn't changed later
1748
- jQuery.data( elem, key, data );
1749
-
1750
- } else {
1751
- data = undefined;
1752
- }
1753
- }
1754
-
1755
- return data;
1756
- }
1757
-
1758
- // TODO: This is a hack for 1.5 ONLY to allow objects with a single toJSON
1759
- // property to be considered empty objects; this property always exists in
1760
- // order to make sure JSON.stringify does not expose internal metadata
1761
- function isEmptyDataObject( obj ) {
1762
- for ( var name in obj ) {
1763
- if ( name !== "toJSON" ) {
1764
- return false;
1765
- }
1766
- }
1767
-
1768
- return true;
1769
- }
1770
-
1771
-
1772
-
1773
-
1774
- function handleQueueMarkDefer( elem, type, src ) {
1775
- var deferDataKey = type + "defer",
1776
- queueDataKey = type + "queue",
1777
- markDataKey = type + "mark",
1778
- defer = jQuery.data( elem, deferDataKey, undefined, true );
1779
- if ( defer &&
1780
- ( src === "queue" || !jQuery.data( elem, queueDataKey, undefined, true ) ) &&
1781
- ( src === "mark" || !jQuery.data( elem, markDataKey, undefined, true ) ) ) {
1782
- // Give room for hard-coded callbacks to fire first
1783
- // and eventually mark/queue something else on the element
1784
- setTimeout( function() {
1785
- if ( !jQuery.data( elem, queueDataKey, undefined, true ) &&
1786
- !jQuery.data( elem, markDataKey, undefined, true ) ) {
1787
- jQuery.removeData( elem, deferDataKey, true );
1788
- defer.resolve();
1789
- }
1790
- }, 0 );
1791
- }
1792
- }
1793
-
1794
- jQuery.extend({
1795
-
1796
- _mark: function( elem, type ) {
1797
- if ( elem ) {
1798
- type = (type || "fx") + "mark";
1799
- jQuery.data( elem, type, (jQuery.data(elem,type,undefined,true) || 0) + 1, true );
1800
- }
1801
- },
1802
-
1803
- _unmark: function( force, elem, type ) {
1804
- if ( force !== true ) {
1805
- type = elem;
1806
- elem = force;
1807
- force = false;
1808
- }
1809
- if ( elem ) {
1810
- type = type || "fx";
1811
- var key = type + "mark",
1812
- count = force ? 0 : ( (jQuery.data( elem, key, undefined, true) || 1 ) - 1 );
1813
- if ( count ) {
1814
- jQuery.data( elem, key, count, true );
1815
- } else {
1816
- jQuery.removeData( elem, key, true );
1817
- handleQueueMarkDefer( elem, type, "mark" );
1818
- }
1819
- }
1820
- },
1821
-
1822
- queue: function( elem, type, data ) {
1823
- if ( elem ) {
1824
- type = (type || "fx") + "queue";
1825
- var q = jQuery.data( elem, type, undefined, true );
1826
- // Speed up dequeue by getting out quickly if this is just a lookup
1827
- if ( data ) {
1828
- if ( !q || jQuery.isArray(data) ) {
1829
- q = jQuery.data( elem, type, jQuery.makeArray(data), true );
1830
- } else {
1831
- q.push( data );
1832
- }
1833
- }
1834
- return q || [];
1835
- }
1836
- },
1837
-
1838
- dequeue: function( elem, type ) {
1839
- type = type || "fx";
1840
-
1841
- var queue = jQuery.queue( elem, type ),
1842
- fn = queue.shift(),
1843
- defer;
1844
-
1845
- // If the fx queue is dequeued, always remove the progress sentinel
1846
- if ( fn === "inprogress" ) {
1847
- fn = queue.shift();
1848
- }
1849
-
1850
- if ( fn ) {
1851
- // Add a progress sentinel to prevent the fx queue from being
1852
- // automatically dequeued
1853
- if ( type === "fx" ) {
1854
- queue.unshift("inprogress");
1855
- }
1856
-
1857
- fn.call(elem, function() {
1858
- jQuery.dequeue(elem, type);
1859
- });
1860
- }
1861
-
1862
- if ( !queue.length ) {
1863
- jQuery.removeData( elem, type + "queue", true );
1864
- handleQueueMarkDefer( elem, type, "queue" );
1865
- }
1866
- }
1867
- });
1868
-
1869
- jQuery.fn.extend({
1870
- queue: function( type, data ) {
1871
- if ( typeof type !== "string" ) {
1872
- data = type;
1873
- type = "fx";
1874
- }
1875
-
1876
- if ( data === undefined ) {
1877
- return jQuery.queue( this[0], type );
1878
- }
1879
- return this.each(function() {
1880
- var queue = jQuery.queue( this, type, data );
1881
-
1882
- if ( type === "fx" && queue[0] !== "inprogress" ) {
1883
- jQuery.dequeue( this, type );
1884
- }
1885
- });
1886
- },
1887
- dequeue: function( type ) {
1888
- return this.each(function() {
1889
- jQuery.dequeue( this, type );
1890
- });
1891
- },
1892
- // Based off of the plugin by Clint Helfers, with permission.
1893
- // http://blindsignals.com/index.php/2009/07/jquery-delay/
1894
- delay: function( time, type ) {
1895
- time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
1896
- type = type || "fx";
1897
-
1898
- return this.queue( type, function() {
1899
- var elem = this;
1900
- setTimeout(function() {
1901
- jQuery.dequeue( elem, type );
1902
- }, time );
1903
- });
1904
- },
1905
- clearQueue: function( type ) {
1906
- return this.queue( type || "fx", [] );
1907
- },
1908
- // Get a promise resolved when queues of a certain type
1909
- // are emptied (fx is the type by default)
1910
- promise: function( type, object ) {
1911
- if ( typeof type !== "string" ) {
1912
- object = type;
1913
- type = undefined;
1914
- }
1915
- type = type || "fx";
1916
- var defer = jQuery.Deferred(),
1917
- elements = this,
1918
- i = elements.length,
1919
- count = 1,
1920
- deferDataKey = type + "defer",
1921
- queueDataKey = type + "queue",
1922
- markDataKey = type + "mark",
1923
- tmp;
1924
- function resolve() {
1925
- if ( !( --count ) ) {
1926
- defer.resolveWith( elements, [ elements ] );
1927
- }
1928
- }
1929
- while( i-- ) {
1930
- if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
1931
- ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
1932
- jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
1933
- jQuery.data( elements[ i ], deferDataKey, jQuery._Deferred(), true ) )) {
1934
- count++;
1935
- tmp.done( resolve );
1936
- }
1937
- }
1938
- resolve();
1939
- return defer.promise();
1940
- }
1941
- });
1942
-
1943
-
1944
-
1945
-
1946
- var rclass = /[\n\t\r]/g,
1947
- rspace = /\s+/,
1948
- rreturn = /\r/g,
1949
- rtype = /^(?:button|input)$/i,
1950
- rfocusable = /^(?:button|input|object|select|textarea)$/i,
1951
- rclickable = /^a(?:rea)?$/i,
1952
- rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
1953
- nodeHook, boolHook;
1954
-
1955
- jQuery.fn.extend({
1956
- attr: function( name, value ) {
1957
- return jQuery.access( this, name, value, true, jQuery.attr );
1958
- },
1959
-
1960
- removeAttr: function( name ) {
1961
- return this.each(function() {
1962
- jQuery.removeAttr( this, name );
1963
- });
1964
- },
1965
-
1966
- prop: function( name, value ) {
1967
- return jQuery.access( this, name, value, true, jQuery.prop );
1968
- },
1969
-
1970
- removeProp: function( name ) {
1971
- name = jQuery.propFix[ name ] || name;
1972
- return this.each(function() {
1973
- // try/catch handles cases where IE balks (such as removing a property on window)
1974
- try {
1975
- this[ name ] = undefined;
1976
- delete this[ name ];
1977
- } catch( e ) {}
1978
- });
1979
- },
1980
-
1981
- addClass: function( value ) {
1982
- var classNames, i, l, elem,
1983
- setClass, c, cl;
1984
-
1985
- if ( jQuery.isFunction( value ) ) {
1986
- return this.each(function( j ) {
1987
- jQuery( this ).addClass( value.call(this, j, this.className) );
1988
- });
1989
- }
1990
-
1991
- if ( value && typeof value === "string" ) {
1992
- classNames = value.split( rspace );
1993
-
1994
- for ( i = 0, l = this.length; i < l; i++ ) {
1995
- elem = this[ i ];
1996
-
1997
- if ( elem.nodeType === 1 ) {
1998
- if ( !elem.className && classNames.length === 1 ) {
1999
- elem.className = value;
2000
-
2001
- } else {
2002
- setClass = " " + elem.className + " ";
2003
-
2004
- for ( c = 0, cl = classNames.length; c < cl; c++ ) {
2005
- if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) {
2006
- setClass += classNames[ c ] + " ";
2007
- }
2008
- }
2009
- elem.className = jQuery.trim( setClass );
2010
- }
2011
- }
2012
- }
2013
- }
2014
-
2015
- return this;
2016
- },
2017
-
2018
- removeClass: function( value ) {
2019
- var classNames, i, l, elem, className, c, cl;
2020
-
2021
- if ( jQuery.isFunction( value ) ) {
2022
- return this.each(function( j ) {
2023
- jQuery( this ).removeClass( value.call(this, j, this.className) );
2024
- });
2025
- }
2026
-
2027
- if ( (value && typeof value === "string") || value === undefined ) {
2028
- classNames = (value || "").split( rspace );
2029
-
2030
- for ( i = 0, l = this.length; i < l; i++ ) {
2031
- elem = this[ i ];
2032
-
2033
- if ( elem.nodeType === 1 && elem.className ) {
2034
- if ( value ) {
2035
- className = (" " + elem.className + " ").replace( rclass, " " );
2036
- for ( c = 0, cl = classNames.length; c < cl; c++ ) {
2037
- className = className.replace(" " + classNames[ c ] + " ", " ");
2038
- }
2039
- elem.className = jQuery.trim( className );
2040
-
2041
- } else {
2042
- elem.className = "";
2043
- }
2044
- }
2045
- }
2046
- }
2047
-
2048
- return this;
2049
- },
2050
-
2051
- toggleClass: function( value, stateVal ) {
2052
- var type = typeof value,
2053
- isBool = typeof stateVal === "boolean";
2054
-
2055
- if ( jQuery.isFunction( value ) ) {
2056
- return this.each(function( i ) {
2057
- jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
2058
- });
2059
- }
2060
-
2061
- return this.each(function() {
2062
- if ( type === "string" ) {
2063
- // toggle individual class names
2064
- var className,
2065
- i = 0,
2066
- self = jQuery( this ),
2067
- state = stateVal,
2068
- classNames = value.split( rspace );
2069
-
2070
- while ( (className = classNames[ i++ ]) ) {
2071
- // check each className given, space seperated list
2072
- state = isBool ? state : !self.hasClass( className );
2073
- self[ state ? "addClass" : "removeClass" ]( className );
2074
- }
2075
-
2076
- } else if ( type === "undefined" || type === "boolean" ) {
2077
- if ( this.className ) {
2078
- // store className if set
2079
- jQuery._data( this, "__className__", this.className );
2080
- }
2081
-
2082
- // toggle whole className
2083
- this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
2084
- }
2085
- });
2086
- },
2087
-
2088
- hasClass: function( selector ) {
2089
- var className = " " + selector + " ";
2090
- for ( var i = 0, l = this.length; i < l; i++ ) {
2091
- if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
2092
- return true;
2093
- }
2094
- }
2095
-
2096
- return false;
2097
- },
2098
-
2099
- val: function( value ) {
2100
- var hooks, ret,
2101
- elem = this[0];
2102
-
2103
- if ( !arguments.length ) {
2104
- if ( elem ) {
2105
- hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ];
2106
-
2107
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
2108
- return ret;
2109
- }
2110
-
2111
- ret = elem.value;
2112
-
2113
- return typeof ret === "string" ?
2114
- // handle most common string cases
2115
- ret.replace(rreturn, "") :
2116
- // handle cases where value is null/undef or number
2117
- ret == null ? "" : ret;
2118
- }
2119
-
2120
- return undefined;
2121
- }
2122
-
2123
- var isFunction = jQuery.isFunction( value );
2124
-
2125
- return this.each(function( i ) {
2126
- var self = jQuery(this), val;
2127
-
2128
- if ( this.nodeType !== 1 ) {
2129
- return;
2130
- }
2131
-
2132
- if ( isFunction ) {
2133
- val = value.call( this, i, self.val() );
2134
- } else {
2135
- val = value;
2136
- }
2137
-
2138
- // Treat null/undefined as ""; convert numbers to string
2139
- if ( val == null ) {
2140
- val = "";
2141
- } else if ( typeof val === "number" ) {
2142
- val += "";
2143
- } else if ( jQuery.isArray( val ) ) {
2144
- val = jQuery.map(val, function ( value ) {
2145
- return value == null ? "" : value + "";
2146
- });
2147
- }
2148
-
2149
- hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ];
2150
-
2151
- // If set returns undefined, fall back to normal setting
2152
- if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
2153
- this.value = val;
2154
- }
2155
- });
2156
- }
2157
- });
2158
-
2159
- jQuery.extend({
2160
- valHooks: {
2161
- option: {
2162
- get: function( elem ) {
2163
- // attributes.value is undefined in Blackberry 4.7 but
2164
- // uses .value. See #6932
2165
- var val = elem.attributes.value;
2166
- return !val || val.specified ? elem.value : elem.text;
2167
- }
2168
- },
2169
- select: {
2170
- get: function( elem ) {
2171
- var value,
2172
- index = elem.selectedIndex,
2173
- values = [],
2174
- options = elem.options,
2175
- one = elem.type === "select-one";
2176
-
2177
- // Nothing was selected
2178
- if ( index < 0 ) {
2179
- return null;
2180
- }
2181
-
2182
- // Loop through all the selected options
2183
- for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
2184
- var option = options[ i ];
2185
-
2186
- // Don't return options that are disabled or in a disabled optgroup
2187
- if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
2188
- (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
2189
-
2190
- // Get the specific value for the option
2191
- value = jQuery( option ).val();
2192
-
2193
- // We don't need an array for one selects
2194
- if ( one ) {
2195
- return value;
2196
- }
2197
-
2198
- // Multi-Selects return an array
2199
- values.push( value );
2200
- }
2201
- }
2202
-
2203
- // Fixes Bug #2551 -- select.val() broken in IE after form.reset()
2204
- if ( one && !values.length && options.length ) {
2205
- return jQuery( options[ index ] ).val();
2206
- }
2207
-
2208
- return values;
2209
- },
2210
-
2211
- set: function( elem, value ) {
2212
- var values = jQuery.makeArray( value );
2213
-
2214
- jQuery(elem).find("option").each(function() {
2215
- this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
2216
- });
2217
-
2218
- if ( !values.length ) {
2219
- elem.selectedIndex = -1;
2220
- }
2221
- return values;
2222
- }
2223
- }
2224
- },
2225
-
2226
- attrFn: {
2227
- val: true,
2228
- css: true,
2229
- html: true,
2230
- text: true,
2231
- data: true,
2232
- width: true,
2233
- height: true,
2234
- offset: true
2235
- },
2236
-
2237
- attrFix: {
2238
- // Always normalize to ensure hook usage
2239
- tabindex: "tabIndex"
2240
- },
2241
-
2242
- attr: function( elem, name, value, pass ) {
2243
- var nType = elem.nodeType;
2244
-
2245
- // don't get/set attributes on text, comment and attribute nodes
2246
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
2247
- return undefined;
2248
- }
2249
-
2250
- if ( pass && name in jQuery.attrFn ) {
2251
- return jQuery( elem )[ name ]( value );
2252
- }
2253
-
2254
- // Fallback to prop when attributes are not supported
2255
- if ( !("getAttribute" in elem) ) {
2256
- return jQuery.prop( elem, name, value );
2257
- }
2258
-
2259
- var ret, hooks,
2260
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
2261
-
2262
- // Normalize the name if needed
2263
- if ( notxml ) {
2264
- name = jQuery.attrFix[ name ] || name;
2265
-
2266
- hooks = jQuery.attrHooks[ name ];
2267
-
2268
- if ( !hooks ) {
2269
- // Use boolHook for boolean attributes
2270
- if ( rboolean.test( name ) ) {
2271
- hooks = boolHook;
2272
-
2273
- // Use nodeHook if available( IE6/7 )
2274
- } else if ( nodeHook ) {
2275
- hooks = nodeHook;
2276
- }
2277
- }
2278
- }
2279
-
2280
- if ( value !== undefined ) {
2281
-
2282
- if ( value === null ) {
2283
- jQuery.removeAttr( elem, name );
2284
- return undefined;
2285
-
2286
- } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
2287
- return ret;
2288
-
2289
- } else {
2290
- elem.setAttribute( name, "" + value );
2291
- return value;
2292
- }
2293
-
2294
- } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
2295
- return ret;
2296
-
2297
- } else {
2298
-
2299
- ret = elem.getAttribute( name );
2300
-
2301
- // Non-existent attributes return null, we normalize to undefined
2302
- return ret === null ?
2303
- undefined :
2304
- ret;
2305
- }
2306
- },
2307
-
2308
- removeAttr: function( elem, name ) {
2309
- var propName;
2310
- if ( elem.nodeType === 1 ) {
2311
- name = jQuery.attrFix[ name ] || name;
2312
-
2313
- jQuery.attr( elem, name, "" );
2314
- elem.removeAttribute( name );
2315
-
2316
- // Set corresponding property to false for boolean attributes
2317
- if ( rboolean.test( name ) && (propName = jQuery.propFix[ name ] || name) in elem ) {
2318
- elem[ propName ] = false;
2319
- }
2320
- }
2321
- },
2322
-
2323
- attrHooks: {
2324
- type: {
2325
- set: function( elem, value ) {
2326
- // We can't allow the type property to be changed (since it causes problems in IE)
2327
- if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
2328
- jQuery.error( "type property can't be changed" );
2329
- } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
2330
- // Setting the type on a radio button after the value resets the value in IE6-9
2331
- // Reset value to it's default in case type is set after value
2332
- // This is for element creation
2333
- var val = elem.value;
2334
- elem.setAttribute( "type", value );
2335
- if ( val ) {
2336
- elem.value = val;
2337
- }
2338
- return value;
2339
- }
2340
- }
2341
- },
2342
- // Use the value property for back compat
2343
- // Use the nodeHook for button elements in IE6/7 (#1954)
2344
- value: {
2345
- get: function( elem, name ) {
2346
- if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
2347
- return nodeHook.get( elem, name );
2348
- }
2349
- return name in elem ?
2350
- elem.value :
2351
- null;
2352
- },
2353
- set: function( elem, value, name ) {
2354
- if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
2355
- return nodeHook.set( elem, value, name );
2356
- }
2357
- // Does not return so that setAttribute is also used
2358
- elem.value = value;
2359
- }
2360
- }
2361
- },
2362
-
2363
- propFix: {
2364
- tabindex: "tabIndex",
2365
- readonly: "readOnly",
2366
- "for": "htmlFor",
2367
- "class": "className",
2368
- maxlength: "maxLength",
2369
- cellspacing: "cellSpacing",
2370
- cellpadding: "cellPadding",
2371
- rowspan: "rowSpan",
2372
- colspan: "colSpan",
2373
- usemap: "useMap",
2374
- frameborder: "frameBorder",
2375
- contenteditable: "contentEditable"
2376
- },
2377
-
2378
- prop: function( elem, name, value ) {
2379
- var nType = elem.nodeType;
2380
-
2381
- // don't get/set properties on text, comment and attribute nodes
2382
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
2383
- return undefined;
2384
- }
2385
-
2386
- var ret, hooks,
2387
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
2388
-
2389
- if ( notxml ) {
2390
- // Fix name and attach hooks
2391
- name = jQuery.propFix[ name ] || name;
2392
- hooks = jQuery.propHooks[ name ];
2393
- }
2394
-
2395
- if ( value !== undefined ) {
2396
- if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
2397
- return ret;
2398
-
2399
- } else {
2400
- return (elem[ name ] = value);
2401
- }
2402
-
2403
- } else {
2404
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
2405
- return ret;
2406
-
2407
- } else {
2408
- return elem[ name ];
2409
- }
2410
- }
2411
- },
2412
-
2413
- propHooks: {
2414
- tabIndex: {
2415
- get: function( elem ) {
2416
- // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
2417
- // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
2418
- var attributeNode = elem.getAttributeNode("tabindex");
2419
-
2420
- return attributeNode && attributeNode.specified ?
2421
- parseInt( attributeNode.value, 10 ) :
2422
- rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
2423
- 0 :
2424
- undefined;
2425
- }
2426
- }
2427
- }
2428
- });
2429
-
2430
- // Add the tabindex propHook to attrHooks for back-compat
2431
- jQuery.attrHooks.tabIndex = jQuery.propHooks.tabIndex;
2432
-
2433
- // Hook for boolean attributes
2434
- boolHook = {
2435
- get: function( elem, name ) {
2436
- // Align boolean attributes with corresponding properties
2437
- // Fall back to attribute presence where some booleans are not supported
2438
- var attrNode;
2439
- return jQuery.prop( elem, name ) === true || ( attrNode = elem.getAttributeNode( name ) ) && attrNode.nodeValue !== false ?
2440
- name.toLowerCase() :
2441
- undefined;
2442
- },
2443
- set: function( elem, value, name ) {
2444
- var propName;
2445
- if ( value === false ) {
2446
- // Remove boolean attributes when set to false
2447
- jQuery.removeAttr( elem, name );
2448
- } else {
2449
- // value is true since we know at this point it's type boolean and not false
2450
- // Set boolean attributes to the same name and set the DOM property
2451
- propName = jQuery.propFix[ name ] || name;
2452
- if ( propName in elem ) {
2453
- // Only set the IDL specifically if it already exists on the element
2454
- elem[ propName ] = true;
2455
- }
2456
-
2457
- elem.setAttribute( name, name.toLowerCase() );
2458
- }
2459
- return name;
2460
- }
2461
- };
2462
-
2463
- // IE6/7 do not support getting/setting some attributes with get/setAttribute
2464
- if ( !jQuery.support.getSetAttribute ) {
2465
-
2466
- // Use this for any attribute in IE6/7
2467
- // This fixes almost every IE6/7 issue
2468
- nodeHook = jQuery.valHooks.button = {
2469
- get: function( elem, name ) {
2470
- var ret;
2471
- ret = elem.getAttributeNode( name );
2472
- // Return undefined if nodeValue is empty string
2473
- return ret && ret.nodeValue !== "" ?
2474
- ret.nodeValue :
2475
- undefined;
2476
- },
2477
- set: function( elem, value, name ) {
2478
- // Set the existing or create a new attribute node
2479
- var ret = elem.getAttributeNode( name );
2480
- if ( !ret ) {
2481
- ret = document.createAttribute( name );
2482
- elem.setAttributeNode( ret );
2483
- }
2484
- return (ret.nodeValue = value + "");
2485
- }
2486
- };
2487
-
2488
- // Set width and height to auto instead of 0 on empty string( Bug #8150 )
2489
- // This is for removals
2490
- jQuery.each([ "width", "height" ], function( i, name ) {
2491
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
2492
- set: function( elem, value ) {
2493
- if ( value === "" ) {
2494
- elem.setAttribute( name, "auto" );
2495
- return value;
2496
- }
2497
- }
2498
- });
2499
- });
2500
- }
2501
-
2502
-
2503
- // Some attributes require a special call on IE
2504
- if ( !jQuery.support.hrefNormalized ) {
2505
- jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
2506
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
2507
- get: function( elem ) {
2508
- var ret = elem.getAttribute( name, 2 );
2509
- return ret === null ? undefined : ret;
2510
- }
2511
- });
2512
- });
2513
- }
2514
-
2515
- if ( !jQuery.support.style ) {
2516
- jQuery.attrHooks.style = {
2517
- get: function( elem ) {
2518
- // Return undefined in the case of empty string
2519
- // Normalize to lowercase since IE uppercases css property names
2520
- return elem.style.cssText.toLowerCase() || undefined;
2521
- },
2522
- set: function( elem, value ) {
2523
- return (elem.style.cssText = "" + value);
2524
- }
2525
- };
2526
- }
2527
-
2528
- // Safari mis-reports the default selected property of an option
2529
- // Accessing the parent's selectedIndex property fixes it
2530
- if ( !jQuery.support.optSelected ) {
2531
- jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
2532
- get: function( elem ) {
2533
- var parent = elem.parentNode;
2534
-
2535
- if ( parent ) {
2536
- parent.selectedIndex;
2537
-
2538
- // Make sure that it also works with optgroups, see #5701
2539
- if ( parent.parentNode ) {
2540
- parent.parentNode.selectedIndex;
2541
- }
2542
- }
2543
- return null;
2544
- }
2545
- });
2546
- }
2547
-
2548
- // Radios and checkboxes getter/setter
2549
- if ( !jQuery.support.checkOn ) {
2550
- jQuery.each([ "radio", "checkbox" ], function() {
2551
- jQuery.valHooks[ this ] = {
2552
- get: function( elem ) {
2553
- // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
2554
- return elem.getAttribute("value") === null ? "on" : elem.value;
2555
- }
2556
- };
2557
- });
2558
- }
2559
- jQuery.each([ "radio", "checkbox" ], function() {
2560
- jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
2561
- set: function( elem, value ) {
2562
- if ( jQuery.isArray( value ) ) {
2563
- return (elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0);
2564
- }
2565
- }
2566
- });
2567
- });
2568
-
2569
-
2570
-
2571
-
2572
- var rnamespaces = /\.(.*)$/,
2573
- rformElems = /^(?:textarea|input|select)$/i,
2574
- rperiod = /\./g,
2575
- rspaces = / /g,
2576
- rescape = /[^\w\s.|`]/g,
2577
- fcleanup = function( nm ) {
2578
- return nm.replace(rescape, "\\$&");
2579
- };
2580
-
2581
- /*
2582
- * A number of helper functions used for managing events.
2583
- * Many of the ideas behind this code originated from
2584
- * Dean Edwards' addEvent library.
2585
- */
2586
- jQuery.event = {
2587
-
2588
- // Bind an event to an element
2589
- // Original by Dean Edwards
2590
- add: function( elem, types, handler, data ) {
2591
- if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
2592
- return;
2593
- }
2594
-
2595
- if ( handler === false ) {
2596
- handler = returnFalse;
2597
- } else if ( !handler ) {
2598
- // Fixes bug #7229. Fix recommended by jdalton
2599
- return;
2600
- }
2601
-
2602
- var handleObjIn, handleObj;
2603
-
2604
- if ( handler.handler ) {
2605
- handleObjIn = handler;
2606
- handler = handleObjIn.handler;
2607
- }
2608
-
2609
- // Make sure that the function being executed has a unique ID
2610
- if ( !handler.guid ) {
2611
- handler.guid = jQuery.guid++;
2612
- }
2613
-
2614
- // Init the element's event structure
2615
- var elemData = jQuery._data( elem );
2616
-
2617
- // If no elemData is found then we must be trying to bind to one of the
2618
- // banned noData elements
2619
- if ( !elemData ) {
2620
- return;
2621
- }
2622
-
2623
- var events = elemData.events,
2624
- eventHandle = elemData.handle;
2625
-
2626
- if ( !events ) {
2627
- elemData.events = events = {};
2628
- }
2629
-
2630
- if ( !eventHandle ) {
2631
- elemData.handle = eventHandle = function( e ) {
2632
- // Discard the second event of a jQuery.event.trigger() and
2633
- // when an event is called after a page has unloaded
2634
- return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
2635
- jQuery.event.handle.apply( eventHandle.elem, arguments ) :
2636
- undefined;
2637
- };
2638
- }
2639
-
2640
- // Add elem as a property of the handle function
2641
- // This is to prevent a memory leak with non-native events in IE.
2642
- eventHandle.elem = elem;
2643
-
2644
- // Handle multiple events separated by a space
2645
- // jQuery(...).bind("mouseover mouseout", fn);
2646
- types = types.split(" ");
2647
-
2648
- var type, i = 0, namespaces;
2649
-
2650
- while ( (type = types[ i++ ]) ) {
2651
- handleObj = handleObjIn ?
2652
- jQuery.extend({}, handleObjIn) :
2653
- { handler: handler, data: data };
2654
-
2655
- // Namespaced event handlers
2656
- if ( type.indexOf(".") > -1 ) {
2657
- namespaces = type.split(".");
2658
- type = namespaces.shift();
2659
- handleObj.namespace = namespaces.slice(0).sort().join(".");
2660
-
2661
- } else {
2662
- namespaces = [];
2663
- handleObj.namespace = "";
2664
- }
2665
-
2666
- handleObj.type = type;
2667
- if ( !handleObj.guid ) {
2668
- handleObj.guid = handler.guid;
2669
- }
2670
-
2671
- // Get the current list of functions bound to this event
2672
- var handlers = events[ type ],
2673
- special = jQuery.event.special[ type ] || {};
2674
-
2675
- // Init the event handler queue
2676
- if ( !handlers ) {
2677
- handlers = events[ type ] = [];
2678
-
2679
- // Check for a special event handler
2680
- // Only use addEventListener/attachEvent if the special
2681
- // events handler returns false
2682
- if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
2683
- // Bind the global event handler to the element
2684
- if ( elem.addEventListener ) {
2685
- elem.addEventListener( type, eventHandle, false );
2686
-
2687
- } else if ( elem.attachEvent ) {
2688
- elem.attachEvent( "on" + type, eventHandle );
2689
- }
2690
- }
2691
- }
2692
-
2693
- if ( special.add ) {
2694
- special.add.call( elem, handleObj );
2695
-
2696
- if ( !handleObj.handler.guid ) {
2697
- handleObj.handler.guid = handler.guid;
2698
- }
2699
- }
2700
-
2701
- // Add the function to the element's handler list
2702
- handlers.push( handleObj );
2703
-
2704
- // Keep track of which events have been used, for event optimization
2705
- jQuery.event.global[ type ] = true;
2706
- }
2707
-
2708
- // Nullify elem to prevent memory leaks in IE
2709
- elem = null;
2710
- },
2711
-
2712
- global: {},
2713
-
2714
- // Detach an event or set of events from an element
2715
- remove: function( elem, types, handler, pos ) {
2716
- // don't do events on text and comment nodes
2717
- if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
2718
- return;
2719
- }
2720
-
2721
- if ( handler === false ) {
2722
- handler = returnFalse;
2723
- }
2724
-
2725
- var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType,
2726
- elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
2727
- events = elemData && elemData.events;
2728
-
2729
- if ( !elemData || !events ) {
2730
- return;
2731
- }
2732
-
2733
- // types is actually an event object here
2734
- if ( types && types.type ) {
2735
- handler = types.handler;
2736
- types = types.type;
2737
- }
2738
-
2739
- // Unbind all events for the element
2740
- if ( !types || typeof types === "string" && types.charAt(0) === "." ) {
2741
- types = types || "";
2742
-
2743
- for ( type in events ) {
2744
- jQuery.event.remove( elem, type + types );
2745
- }
2746
-
2747
- return;
2748
- }
2749
-
2750
- // Handle multiple events separated by a space
2751
- // jQuery(...).unbind("mouseover mouseout", fn);
2752
- types = types.split(" ");
2753
-
2754
- while ( (type = types[ i++ ]) ) {
2755
- origType = type;
2756
- handleObj = null;
2757
- all = type.indexOf(".") < 0;
2758
- namespaces = [];
2759
-
2760
- if ( !all ) {
2761
- // Namespaced event handlers
2762
- namespaces = type.split(".");
2763
- type = namespaces.shift();
2764
-
2765
- namespace = new RegExp("(^|\\.)" +
2766
- jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)");
2767
- }
2768
-
2769
- eventType = events[ type ];
2770
-
2771
- if ( !eventType ) {
2772
- continue;
2773
- }
2774
-
2775
- if ( !handler ) {
2776
- for ( j = 0; j < eventType.length; j++ ) {
2777
- handleObj = eventType[ j ];
2778
-
2779
- if ( all || namespace.test( handleObj.namespace ) ) {
2780
- jQuery.event.remove( elem, origType, handleObj.handler, j );
2781
- eventType.splice( j--, 1 );
2782
- }
2783
- }
2784
-
2785
- continue;
2786
- }
2787
-
2788
- special = jQuery.event.special[ type ] || {};
2789
-
2790
- for ( j = pos || 0; j < eventType.length; j++ ) {
2791
- handleObj = eventType[ j ];
2792
-
2793
- if ( handler.guid === handleObj.guid ) {
2794
- // remove the given handler for the given type
2795
- if ( all || namespace.test( handleObj.namespace ) ) {
2796
- if ( pos == null ) {
2797
- eventType.splice( j--, 1 );
2798
- }
2799
-
2800
- if ( special.remove ) {
2801
- special.remove.call( elem, handleObj );
2802
- }
2803
- }
2804
-
2805
- if ( pos != null ) {
2806
- break;
2807
- }
2808
- }
2809
- }
2810
-
2811
- // remove generic event handler if no more handlers exist
2812
- if ( eventType.length === 0 || pos != null && eventType.length === 1 ) {
2813
- if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
2814
- jQuery.removeEvent( elem, type, elemData.handle );
2815
- }
2816
-
2817
- ret = null;
2818
- delete events[ type ];
2819
- }
2820
- }
2821
-
2822
- // Remove the expando if it's no longer used
2823
- if ( jQuery.isEmptyObject( events ) ) {
2824
- var handle = elemData.handle;
2825
- if ( handle ) {
2826
- handle.elem = null;
2827
- }
2828
-
2829
- delete elemData.events;
2830
- delete elemData.handle;
2831
-
2832
- if ( jQuery.isEmptyObject( elemData ) ) {
2833
- jQuery.removeData( elem, undefined, true );
2834
- }
2835
- }
2836
- },
2837
-
2838
- // Events that are safe to short-circuit if no handlers are attached.
2839
- // Native DOM events should not be added, they may have inline handlers.
2840
- customEvent: {
2841
- "getData": true,
2842
- "setData": true,
2843
- "changeData": true
2844
- },
2845
-
2846
- trigger: function( event, data, elem, onlyHandlers ) {
2847
- // Event object or event type
2848
- var type = event.type || event,
2849
- namespaces = [],
2850
- exclusive;
2851
-
2852
- if ( type.indexOf("!") >= 0 ) {
2853
- // Exclusive events trigger only for the exact event (no namespaces)
2854
- type = type.slice(0, -1);
2855
- exclusive = true;
2856
- }
2857
-
2858
- if ( type.indexOf(".") >= 0 ) {
2859
- // Namespaced trigger; create a regexp to match event type in handle()
2860
- namespaces = type.split(".");
2861
- type = namespaces.shift();
2862
- namespaces.sort();
2863
- }
2864
-
2865
- if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
2866
- // No jQuery handlers for this event type, and it can't have inline handlers
2867
- return;
2868
- }
2869
-
2870
- // Caller can pass in an Event, Object, or just an event type string
2871
- event = typeof event === "object" ?
2872
- // jQuery.Event object
2873
- event[ jQuery.expando ] ? event :
2874
- // Object literal
2875
- new jQuery.Event( type, event ) :
2876
- // Just the event type (string)
2877
- new jQuery.Event( type );
2878
-
2879
- event.type = type;
2880
- event.exclusive = exclusive;
2881
- event.namespace = namespaces.join(".");
2882
- event.namespace_re = new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)");
2883
-
2884
- // triggerHandler() and global events don't bubble or run the default action
2885
- if ( onlyHandlers || !elem ) {
2886
- event.preventDefault();
2887
- event.stopPropagation();
2888
- }
2889
-
2890
- // Handle a global trigger
2891
- if ( !elem ) {
2892
- // TODO: Stop taunting the data cache; remove global events and always attach to document
2893
- jQuery.each( jQuery.cache, function() {
2894
- // internalKey variable is just used to make it easier to find
2895
- // and potentially change this stuff later; currently it just
2896
- // points to jQuery.expando
2897
- var internalKey = jQuery.expando,
2898
- internalCache = this[ internalKey ];
2899
- if ( internalCache && internalCache.events && internalCache.events[ type ] ) {
2900
- jQuery.event.trigger( event, data, internalCache.handle.elem );
2901
- }
2902
- });
2903
- return;
2904
- }
2905
-
2906
- // Don't do events on text and comment nodes
2907
- if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
2908
- return;
2909
- }
2910
-
2911
- // Clean up the event in case it is being reused
2912
- event.result = undefined;
2913
- event.target = elem;
2914
-
2915
- // Clone any incoming data and prepend the event, creating the handler arg list
2916
- data = data != null ? jQuery.makeArray( data ) : [];
2917
- data.unshift( event );
2918
-
2919
- var cur = elem,
2920
- // IE doesn't like method names with a colon (#3533, #8272)
2921
- ontype = type.indexOf(":") < 0 ? "on" + type : "";
2922
-
2923
- // Fire event on the current element, then bubble up the DOM tree
2924
- do {
2925
- var handle = jQuery._data( cur, "handle" );
2926
-
2927
- event.currentTarget = cur;
2928
- if ( handle ) {
2929
- handle.apply( cur, data );
2930
- }
2931
-
2932
- // Trigger an inline bound script
2933
- if ( ontype && jQuery.acceptData( cur ) && cur[ ontype ] && cur[ ontype ].apply( cur, data ) === false ) {
2934
- event.result = false;
2935
- event.preventDefault();
2936
- }
2937
-
2938
- // Bubble up to document, then to window
2939
- cur = cur.parentNode || cur.ownerDocument || cur === event.target.ownerDocument && window;
2940
- } while ( cur && !event.isPropagationStopped() );
2941
-
2942
- // If nobody prevented the default action, do it now
2943
- if ( !event.isDefaultPrevented() ) {
2944
- var old,
2945
- special = jQuery.event.special[ type ] || {};
2946
-
2947
- if ( (!special._default || special._default.call( elem.ownerDocument, event ) === false) &&
2948
- !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
2949
-
2950
- // Call a native DOM method on the target with the same name name as the event.
2951
- // Can't use an .isFunction)() check here because IE6/7 fails that test.
2952
- // IE<9 dies on focus to hidden element (#1486), may want to revisit a try/catch.
2953
- try {
2954
- if ( ontype && elem[ type ] ) {
2955
- // Don't re-trigger an onFOO event when we call its FOO() method
2956
- old = elem[ ontype ];
2957
-
2958
- if ( old ) {
2959
- elem[ ontype ] = null;
2960
- }
2961
-
2962
- jQuery.event.triggered = type;
2963
- elem[ type ]();
2964
- }
2965
- } catch ( ieError ) {}
2966
-
2967
- if ( old ) {
2968
- elem[ ontype ] = old;
2969
- }
2970
-
2971
- jQuery.event.triggered = undefined;
2972
- }
2973
- }
2974
-
2975
- return event.result;
2976
- },
2977
-
2978
- handle: function( event ) {
2979
- event = jQuery.event.fix( event || window.event );
2980
- // Snapshot the handlers list since a called handler may add/remove events.
2981
- var handlers = ((jQuery._data( this, "events" ) || {})[ event.type ] || []).slice(0),
2982
- run_all = !event.exclusive && !event.namespace,
2983
- args = Array.prototype.slice.call( arguments, 0 );
2984
-
2985
- // Use the fix-ed Event rather than the (read-only) native event
2986
- args[0] = event;
2987
- event.currentTarget = this;
2988
-
2989
- for ( var j = 0, l = handlers.length; j < l; j++ ) {
2990
- var handleObj = handlers[ j ];
2991
-
2992
- // Triggered event must 1) be non-exclusive and have no namespace, or
2993
- // 2) have namespace(s) a subset or equal to those in the bound event.
2994
- if ( run_all || event.namespace_re.test( handleObj.namespace ) ) {
2995
- // Pass in a reference to the handler function itself
2996
- // So that we can later remove it
2997
- event.handler = handleObj.handler;
2998
- event.data = handleObj.data;
2999
- event.handleObj = handleObj;
3000
-
3001
- var ret = handleObj.handler.apply( this, args );
3002
-
3003
- if ( ret !== undefined ) {
3004
- event.result = ret;
3005
- if ( ret === false ) {
3006
- event.preventDefault();
3007
- event.stopPropagation();
3008
- }
3009
- }
3010
-
3011
- if ( event.isImmediatePropagationStopped() ) {
3012
- break;
3013
- }
3014
- }
3015
- }
3016
- return event.result;
3017
- },
3018
-
3019
- 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(" "),
3020
-
3021
- fix: function( event ) {
3022
- if ( event[ jQuery.expando ] ) {
3023
- return event;
3024
- }
3025
-
3026
- // store a copy of the original event object
3027
- // and "clone" to set read-only properties
3028
- var originalEvent = event;
3029
- event = jQuery.Event( originalEvent );
3030
-
3031
- for ( var i = this.props.length, prop; i; ) {
3032
- prop = this.props[ --i ];
3033
- event[ prop ] = originalEvent[ prop ];
3034
- }
3035
-
3036
- // Fix target property, if necessary
3037
- if ( !event.target ) {
3038
- // Fixes #1925 where srcElement might not be defined either
3039
- event.target = event.srcElement || document;
3040
- }
3041
-
3042
- // check if target is a textnode (safari)
3043
- if ( event.target.nodeType === 3 ) {
3044
- event.target = event.target.parentNode;
3045
- }
3046
-
3047
- // Add relatedTarget, if necessary
3048
- if ( !event.relatedTarget && event.fromElement ) {
3049
- event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;
3050
- }
3051
-
3052
- // Calculate pageX/Y if missing and clientX/Y available
3053
- if ( event.pageX == null && event.clientX != null ) {
3054
- var eventDocument = event.target.ownerDocument || document,
3055
- doc = eventDocument.documentElement,
3056
- body = eventDocument.body;
3057
-
3058
- event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
3059
- event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
3060
- }
3061
-
3062
- // Add which for key events
3063
- if ( event.which == null && (event.charCode != null || event.keyCode != null) ) {
3064
- event.which = event.charCode != null ? event.charCode : event.keyCode;
3065
- }
3066
-
3067
- // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
3068
- if ( !event.metaKey && event.ctrlKey ) {
3069
- event.metaKey = event.ctrlKey;
3070
- }
3071
-
3072
- // Add which for click: 1 === left; 2 === middle; 3 === right
3073
- // Note: button is not normalized, so don't use it
3074
- if ( !event.which && event.button !== undefined ) {
3075
- event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
3076
- }
3077
-
3078
- return event;
3079
- },
3080
-
3081
- // Deprecated, use jQuery.guid instead
3082
- guid: 1E8,
3083
-
3084
- // Deprecated, use jQuery.proxy instead
3085
- proxy: jQuery.proxy,
3086
-
3087
- special: {
3088
- ready: {
3089
- // Make sure the ready event is setup
3090
- setup: jQuery.bindReady,
3091
- teardown: jQuery.noop
3092
- },
3093
-
3094
- live: {
3095
- add: function( handleObj ) {
3096
- jQuery.event.add( this,
3097
- liveConvert( handleObj.origType, handleObj.selector ),
3098
- jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) );
3099
- },
3100
-
3101
- remove: function( handleObj ) {
3102
- jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj );
3103
- }
3104
- },
3105
-
3106
- beforeunload: {
3107
- setup: function( data, namespaces, eventHandle ) {
3108
- // We only want to do this special case on windows
3109
- if ( jQuery.isWindow( this ) ) {
3110
- this.onbeforeunload = eventHandle;
3111
- }
3112
- },
3113
-
3114
- teardown: function( namespaces, eventHandle ) {
3115
- if ( this.onbeforeunload === eventHandle ) {
3116
- this.onbeforeunload = null;
3117
- }
3118
- }
3119
- }
3120
- }
3121
- };
3122
-
3123
- jQuery.removeEvent = document.removeEventListener ?
3124
- function( elem, type, handle ) {
3125
- if ( elem.removeEventListener ) {
3126
- elem.removeEventListener( type, handle, false );
3127
- }
3128
- } :
3129
- function( elem, type, handle ) {
3130
- if ( elem.detachEvent ) {
3131
- elem.detachEvent( "on" + type, handle );
3132
- }
3133
- };
3134
-
3135
- jQuery.Event = function( src, props ) {
3136
- // Allow instantiation without the 'new' keyword
3137
- if ( !this.preventDefault ) {
3138
- return new jQuery.Event( src, props );
3139
- }
3140
-
3141
- // Event object
3142
- if ( src && src.type ) {
3143
- this.originalEvent = src;
3144
- this.type = src.type;
3145
-
3146
- // Events bubbling up the document may have been marked as prevented
3147
- // by a handler lower down the tree; reflect the correct value.
3148
- this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false ||
3149
- src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse;
3150
-
3151
- // Event type
3152
- } else {
3153
- this.type = src;
3154
- }
3155
-
3156
- // Put explicitly provided properties onto the event object
3157
- if ( props ) {
3158
- jQuery.extend( this, props );
3159
- }
3160
-
3161
- // timeStamp is buggy for some events on Firefox(#3843)
3162
- // So we won't rely on the native value
3163
- this.timeStamp = jQuery.now();
3164
-
3165
- // Mark it as fixed
3166
- this[ jQuery.expando ] = true;
3167
- };
3168
-
3169
- function returnFalse() {
3170
- return false;
3171
- }
3172
- function returnTrue() {
3173
- return true;
3174
- }
3175
-
3176
- // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
3177
- // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
3178
- jQuery.Event.prototype = {
3179
- preventDefault: function() {
3180
- this.isDefaultPrevented = returnTrue;
3181
-
3182
- var e = this.originalEvent;
3183
- if ( !e ) {
3184
- return;
3185
- }
3186
-
3187
- // if preventDefault exists run it on the original event
3188
- if ( e.preventDefault ) {
3189
- e.preventDefault();
3190
-
3191
- // otherwise set the returnValue property of the original event to false (IE)
3192
- } else {
3193
- e.returnValue = false;
3194
- }
3195
- },
3196
- stopPropagation: function() {
3197
- this.isPropagationStopped = returnTrue;
3198
-
3199
- var e = this.originalEvent;
3200
- if ( !e ) {
3201
- return;
3202
- }
3203
- // if stopPropagation exists run it on the original event
3204
- if ( e.stopPropagation ) {
3205
- e.stopPropagation();
3206
- }
3207
- // otherwise set the cancelBubble property of the original event to true (IE)
3208
- e.cancelBubble = true;
3209
- },
3210
- stopImmediatePropagation: function() {
3211
- this.isImmediatePropagationStopped = returnTrue;
3212
- this.stopPropagation();
3213
- },
3214
- isDefaultPrevented: returnFalse,
3215
- isPropagationStopped: returnFalse,
3216
- isImmediatePropagationStopped: returnFalse
3217
- };
3218
-
3219
- // Checks if an event happened on an element within another element
3220
- // Used in jQuery.event.special.mouseenter and mouseleave handlers
3221
- var withinElement = function( event ) {
3222
-
3223
- // Check if mouse(over|out) are still within the same parent element
3224
- var related = event.relatedTarget,
3225
- inside = false,
3226
- eventType = event.type;
3227
-
3228
- event.type = event.data;
3229
-
3230
- if ( related !== this ) {
3231
-
3232
- if ( related ) {
3233
- inside = jQuery.contains( this, related );
3234
- }
3235
-
3236
- if ( !inside ) {
3237
-
3238
- jQuery.event.handle.apply( this, arguments );
3239
-
3240
- event.type = eventType;
3241
- }
3242
- }
3243
- },
3244
-
3245
- // In case of event delegation, we only need to rename the event.type,
3246
- // liveHandler will take care of the rest.
3247
- delegate = function( event ) {
3248
- event.type = event.data;
3249
- jQuery.event.handle.apply( this, arguments );
3250
- };
3251
-
3252
- // Create mouseenter and mouseleave events
3253
- jQuery.each({
3254
- mouseenter: "mouseover",
3255
- mouseleave: "mouseout"
3256
- }, function( orig, fix ) {
3257
- jQuery.event.special[ orig ] = {
3258
- setup: function( data ) {
3259
- jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig );
3260
- },
3261
- teardown: function( data ) {
3262
- jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement );
3263
- }
3264
- };
3265
- });
3266
-
3267
- // submit delegation
3268
- if ( !jQuery.support.submitBubbles ) {
3269
-
3270
- jQuery.event.special.submit = {
3271
- setup: function( data, namespaces ) {
3272
- if ( !jQuery.nodeName( this, "form" ) ) {
3273
- jQuery.event.add(this, "click.specialSubmit", function( e ) {
3274
- // Avoid triggering error on non-existent type attribute in IE VML (#7071)
3275
- var elem = e.target,
3276
- type = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.type : "";
3277
-
3278
- if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
3279
- trigger( "submit", this, arguments );
3280
- }
3281
- });
3282
-
3283
- jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
3284
- var elem = e.target,
3285
- type = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.type : "";
3286
-
3287
- if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
3288
- trigger( "submit", this, arguments );
3289
- }
3290
- });
3291
-
3292
- } else {
3293
- return false;
3294
- }
3295
- },
3296
-
3297
- teardown: function( namespaces ) {
3298
- jQuery.event.remove( this, ".specialSubmit" );
3299
- }
3300
- };
3301
-
3302
- }
3303
-
3304
- // change delegation, happens here so we have bind.
3305
- if ( !jQuery.support.changeBubbles ) {
3306
-
3307
- var changeFilters,
3308
-
3309
- getVal = function( elem ) {
3310
- var type = jQuery.nodeName( elem, "input" ) ? elem.type : "",
3311
- val = elem.value;
3312
-
3313
- if ( type === "radio" || type === "checkbox" ) {
3314
- val = elem.checked;
3315
-
3316
- } else if ( type === "select-multiple" ) {
3317
- val = elem.selectedIndex > -1 ?
3318
- jQuery.map( elem.options, function( elem ) {
3319
- return elem.selected;
3320
- }).join("-") :
3321
- "";
3322
-
3323
- } else if ( jQuery.nodeName( elem, "select" ) ) {
3324
- val = elem.selectedIndex;
3325
- }
3326
-
3327
- return val;
3328
- },
3329
-
3330
- testChange = function testChange( e ) {
3331
- var elem = e.target, data, val;
3332
-
3333
- if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) {
3334
- return;
3335
- }
3336
-
3337
- data = jQuery._data( elem, "_change_data" );
3338
- val = getVal(elem);
3339
-
3340
- // the current data will be also retrieved by beforeactivate
3341
- if ( e.type !== "focusout" || elem.type !== "radio" ) {
3342
- jQuery._data( elem, "_change_data", val );
3343
- }
3344
-
3345
- if ( data === undefined || val === data ) {
3346
- return;
3347
- }
3348
-
3349
- if ( data != null || val ) {
3350
- e.type = "change";
3351
- e.liveFired = undefined;
3352
- jQuery.event.trigger( e, arguments[1], elem );
3353
- }
3354
- };
3355
-
3356
- jQuery.event.special.change = {
3357
- filters: {
3358
- focusout: testChange,
3359
-
3360
- beforedeactivate: testChange,
3361
-
3362
- click: function( e ) {
3363
- var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
3364
-
3365
- if ( type === "radio" || type === "checkbox" || jQuery.nodeName( elem, "select" ) ) {
3366
- testChange.call( this, e );
3367
- }
3368
- },
3369
-
3370
- // Change has to be called before submit
3371
- // Keydown will be called before keypress, which is used in submit-event delegation
3372
- keydown: function( e ) {
3373
- var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
3374
-
3375
- if ( (e.keyCode === 13 && !jQuery.nodeName( elem, "textarea" ) ) ||
3376
- (e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
3377
- type === "select-multiple" ) {
3378
- testChange.call( this, e );
3379
- }
3380
- },
3381
-
3382
- // Beforeactivate happens also before the previous element is blurred
3383
- // with this event you can't trigger a change event, but you can store
3384
- // information
3385
- beforeactivate: function( e ) {
3386
- var elem = e.target;
3387
- jQuery._data( elem, "_change_data", getVal(elem) );
3388
- }
3389
- },
3390
-
3391
- setup: function( data, namespaces ) {
3392
- if ( this.type === "file" ) {
3393
- return false;
3394
- }
3395
-
3396
- for ( var type in changeFilters ) {
3397
- jQuery.event.add( this, type + ".specialChange", changeFilters[type] );
3398
- }
3399
-
3400
- return rformElems.test( this.nodeName );
3401
- },
3402
-
3403
- teardown: function( namespaces ) {
3404
- jQuery.event.remove( this, ".specialChange" );
3405
-
3406
- return rformElems.test( this.nodeName );
3407
- }
3408
- };
3409
-
3410
- changeFilters = jQuery.event.special.change.filters;
3411
-
3412
- // Handle when the input is .focus()'d
3413
- changeFilters.focus = changeFilters.beforeactivate;
3414
- }
3415
-
3416
- function trigger( type, elem, args ) {
3417
- // Piggyback on a donor event to simulate a different one.
3418
- // Fake originalEvent to avoid donor's stopPropagation, but if the
3419
- // simulated event prevents default then we do the same on the donor.
3420
- // Don't pass args or remember liveFired; they apply to the donor event.
3421
- var event = jQuery.extend( {}, args[ 0 ] );
3422
- event.type = type;
3423
- event.originalEvent = {};
3424
- event.liveFired = undefined;
3425
- jQuery.event.handle.call( elem, event );
3426
- if ( event.isDefaultPrevented() ) {
3427
- args[ 0 ].preventDefault();
3428
- }
3429
- }
3430
-
3431
- // Create "bubbling" focus and blur events
3432
- if ( !jQuery.support.focusinBubbles ) {
3433
- jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
3434
-
3435
- // Attach a single capturing handler while someone wants focusin/focusout
3436
- var attaches = 0;
3437
-
3438
- jQuery.event.special[ fix ] = {
3439
- setup: function() {
3440
- if ( attaches++ === 0 ) {
3441
- document.addEventListener( orig, handler, true );
3442
- }
3443
- },
3444
- teardown: function() {
3445
- if ( --attaches === 0 ) {
3446
- document.removeEventListener( orig, handler, true );
3447
- }
3448
- }
3449
- };
3450
-
3451
- function handler( donor ) {
3452
- // Donor event is always a native one; fix it and switch its type.
3453
- // Let focusin/out handler cancel the donor focus/blur event.
3454
- var e = jQuery.event.fix( donor );
3455
- e.type = fix;
3456
- e.originalEvent = {};
3457
- jQuery.event.trigger( e, null, e.target );
3458
- if ( e.isDefaultPrevented() ) {
3459
- donor.preventDefault();
3460
- }
3461
- }
3462
- });
3463
- }
3464
-
3465
- jQuery.each(["bind", "one"], function( i, name ) {
3466
- jQuery.fn[ name ] = function( type, data, fn ) {
3467
- var handler;
3468
-
3469
- // Handle object literals
3470
- if ( typeof type === "object" ) {
3471
- for ( var key in type ) {
3472
- this[ name ](key, data, type[key], fn);
3473
- }
3474
- return this;
3475
- }
3476
-
3477
- if ( arguments.length === 2 || data === false ) {
3478
- fn = data;
3479
- data = undefined;
3480
- }
3481
-
3482
- if ( name === "one" ) {
3483
- handler = function( event ) {
3484
- jQuery( this ).unbind( event, handler );
3485
- return fn.apply( this, arguments );
3486
- };
3487
- handler.guid = fn.guid || jQuery.guid++;
3488
- } else {
3489
- handler = fn;
3490
- }
3491
-
3492
- if ( type === "unload" && name !== "one" ) {
3493
- this.one( type, data, fn );
3494
-
3495
- } else {
3496
- for ( var i = 0, l = this.length; i < l; i++ ) {
3497
- jQuery.event.add( this[i], type, handler, data );
3498
- }
3499
- }
3500
-
3501
- return this;
3502
- };
3503
- });
3504
-
3505
- jQuery.fn.extend({
3506
- unbind: function( type, fn ) {
3507
- // Handle object literals
3508
- if ( typeof type === "object" && !type.preventDefault ) {
3509
- for ( var key in type ) {
3510
- this.unbind(key, type[key]);
3511
- }
3512
-
3513
- } else {
3514
- for ( var i = 0, l = this.length; i < l; i++ ) {
3515
- jQuery.event.remove( this[i], type, fn );
3516
- }
3517
- }
3518
-
3519
- return this;
3520
- },
3521
-
3522
- delegate: function( selector, types, data, fn ) {
3523
- return this.live( types, data, fn, selector );
3524
- },
3525
-
3526
- undelegate: function( selector, types, fn ) {
3527
- if ( arguments.length === 0 ) {
3528
- return this.unbind( "live" );
3529
-
3530
- } else {
3531
- return this.die( types, null, fn, selector );
3532
- }
3533
- },
3534
-
3535
- trigger: function( type, data ) {
3536
- return this.each(function() {
3537
- jQuery.event.trigger( type, data, this );
3538
- });
3539
- },
3540
-
3541
- triggerHandler: function( type, data ) {
3542
- if ( this[0] ) {
3543
- return jQuery.event.trigger( type, data, this[0], true );
3544
- }
3545
- },
3546
-
3547
- toggle: function( fn ) {
3548
- // Save reference to arguments for access in closure
3549
- var args = arguments,
3550
- guid = fn.guid || jQuery.guid++,
3551
- i = 0,
3552
- toggler = function( event ) {
3553
- // Figure out which function to execute
3554
- var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i;
3555
- jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 );
3556
-
3557
- // Make sure that clicks stop
3558
- event.preventDefault();
3559
-
3560
- // and execute the function
3561
- return args[ lastToggle ].apply( this, arguments ) || false;
3562
- };
3563
-
3564
- // link all the functions, so any of them can unbind this click handler
3565
- toggler.guid = guid;
3566
- while ( i < args.length ) {
3567
- args[ i++ ].guid = guid;
3568
- }
3569
-
3570
- return this.click( toggler );
3571
- },
3572
-
3573
- hover: function( fnOver, fnOut ) {
3574
- return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
3575
- }
3576
- });
3577
-
3578
- var liveMap = {
3579
- focus: "focusin",
3580
- blur: "focusout",
3581
- mouseenter: "mouseover",
3582
- mouseleave: "mouseout"
3583
- };
3584
-
3585
- jQuery.each(["live", "die"], function( i, name ) {
3586
- jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) {
3587
- var type, i = 0, match, namespaces, preType,
3588
- selector = origSelector || this.selector,
3589
- context = origSelector ? this : jQuery( this.context );
3590
-
3591
- if ( typeof types === "object" && !types.preventDefault ) {
3592
- for ( var key in types ) {
3593
- context[ name ]( key, data, types[key], selector );
3594
- }
3595
-
3596
- return this;
3597
- }
3598
-
3599
- if ( name === "die" && !types &&
3600
- origSelector && origSelector.charAt(0) === "." ) {
3601
-
3602
- context.unbind( origSelector );
3603
-
3604
- return this;
3605
- }
3606
-
3607
- if ( data === false || jQuery.isFunction( data ) ) {
3608
- fn = data || returnFalse;
3609
- data = undefined;
3610
- }
3611
-
3612
- types = (types || "").split(" ");
3613
-
3614
- while ( (type = types[ i++ ]) != null ) {
3615
- match = rnamespaces.exec( type );
3616
- namespaces = "";
3617
-
3618
- if ( match ) {
3619
- namespaces = match[0];
3620
- type = type.replace( rnamespaces, "" );
3621
- }
3622
-
3623
- if ( type === "hover" ) {
3624
- types.push( "mouseenter" + namespaces, "mouseleave" + namespaces );
3625
- continue;
3626
- }
3627
-
3628
- preType = type;
3629
-
3630
- if ( liveMap[ type ] ) {
3631
- types.push( liveMap[ type ] + namespaces );
3632
- type = type + namespaces;
3633
-
3634
- } else {
3635
- type = (liveMap[ type ] || type) + namespaces;
3636
- }
3637
-
3638
- if ( name === "live" ) {
3639
- // bind live handler
3640
- for ( var j = 0, l = context.length; j < l; j++ ) {
3641
- jQuery.event.add( context[j], "live." + liveConvert( type, selector ),
3642
- { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } );
3643
- }
3644
-
3645
- } else {
3646
- // unbind live handler
3647
- context.unbind( "live." + liveConvert( type, selector ), fn );
3648
- }
3649
- }
3650
-
3651
- return this;
3652
- };
3653
- });
3654
-
3655
- function liveHandler( event ) {
3656
- var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret,
3657
- elems = [],
3658
- selectors = [],
3659
- events = jQuery._data( this, "events" );
3660
-
3661
- // Make sure we avoid non-left-click bubbling in Firefox (#3861) and disabled elements in IE (#6911)
3662
- if ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === "click" ) {
3663
- return;
3664
- }
3665
-
3666
- if ( event.namespace ) {
3667
- namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)");
3668
- }
3669
-
3670
- event.liveFired = this;
3671
-
3672
- var live = events.live.slice(0);
3673
-
3674
- for ( j = 0; j < live.length; j++ ) {
3675
- handleObj = live[j];
3676
-
3677
- if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) {
3678
- selectors.push( handleObj.selector );
3679
-
3680
- } else {
3681
- live.splice( j--, 1 );
3682
- }
3683
- }
3684
-
3685
- match = jQuery( event.target ).closest( selectors, event.currentTarget );
3686
-
3687
- for ( i = 0, l = match.length; i < l; i++ ) {
3688
- close = match[i];
3689
-
3690
- for ( j = 0; j < live.length; j++ ) {
3691
- handleObj = live[j];
3692
-
3693
- if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) && !close.elem.disabled ) {
3694
- elem = close.elem;
3695
- related = null;
3696
-
3697
- // Those two events require additional checking
3698
- if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) {
3699
- event.type = handleObj.preType;
3700
- related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0];
3701
-
3702
- // Make sure not to accidentally match a child element with the same selector
3703
- if ( related && jQuery.contains( elem, related ) ) {
3704
- related = elem;
3705
- }
3706
- }
3707
-
3708
- if ( !related || related !== elem ) {
3709
- elems.push({ elem: elem, handleObj: handleObj, level: close.level });
3710
- }
3711
- }
3712
- }
3713
- }
3714
-
3715
- for ( i = 0, l = elems.length; i < l; i++ ) {
3716
- match = elems[i];
3717
-
3718
- if ( maxLevel && match.level > maxLevel ) {
3719
- break;
3720
- }
3721
-
3722
- event.currentTarget = match.elem;
3723
- event.data = match.handleObj.data;
3724
- event.handleObj = match.handleObj;
3725
-
3726
- ret = match.handleObj.origHandler.apply( match.elem, arguments );
3727
-
3728
- if ( ret === false || event.isPropagationStopped() ) {
3729
- maxLevel = match.level;
3730
-
3731
- if ( ret === false ) {
3732
- stop = false;
3733
- }
3734
- if ( event.isImmediatePropagationStopped() ) {
3735
- break;
3736
- }
3737
- }
3738
- }
3739
-
3740
- return stop;
3741
- }
3742
-
3743
- function liveConvert( type, selector ) {
3744
- return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspaces, "&");
3745
- }
3746
-
3747
- jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
3748
- "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
3749
- "change select submit keydown keypress keyup error").split(" "), function( i, name ) {
3750
-
3751
- // Handle event binding
3752
- jQuery.fn[ name ] = function( data, fn ) {
3753
- if ( fn == null ) {
3754
- fn = data;
3755
- data = null;
3756
- }
3757
-
3758
- return arguments.length > 0 ?
3759
- this.bind( name, data, fn ) :
3760
- this.trigger( name );
3761
- };
3762
-
3763
- if ( jQuery.attrFn ) {
3764
- jQuery.attrFn[ name ] = true;
3765
- }
3766
- });
3767
-
3768
-
3769
-
3770
- /*!
3771
- * Sizzle CSS Selector Engine
3772
- * Copyright 2011, The Dojo Foundation
3773
- * Released under the MIT, BSD, and GPL Licenses.
3774
- * More information: http://sizzlejs.com/
3775
- */
3776
- (function(){
3777
-
3778
- var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
3779
- done = 0,
3780
- toString = Object.prototype.toString,
3781
- hasDuplicate = false,
3782
- baseHasDuplicate = true,
3783
- rBackslash = /\\/g,
3784
- rNonWord = /\W/;
3785
-
3786
- // Here we check if the JavaScript engine is using some sort of
3787
- // optimization where it does not always call our comparision
3788
- // function. If that is the case, discard the hasDuplicate value.
3789
- // Thus far that includes Google Chrome.
3790
- [0, 0].sort(function() {
3791
- baseHasDuplicate = false;
3792
- return 0;
3793
- });
3794
-
3795
- var Sizzle = function( selector, context, results, seed ) {
3796
- results = results || [];
3797
- context = context || document;
3798
-
3799
- var origContext = context;
3800
-
3801
- if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
3802
- return [];
3803
- }
3804
-
3805
- if ( !selector || typeof selector !== "string" ) {
3806
- return results;
3807
- }
3808
-
3809
- var m, set, checkSet, extra, ret, cur, pop, i,
3810
- prune = true,
3811
- contextXML = Sizzle.isXML( context ),
3812
- parts = [],
3813
- soFar = selector;
3814
-
3815
- // Reset the position of the chunker regexp (start from head)
3816
- do {
3817
- chunker.exec( "" );
3818
- m = chunker.exec( soFar );
3819
-
3820
- if ( m ) {
3821
- soFar = m[3];
3822
-
3823
- parts.push( m[1] );
3824
-
3825
- if ( m[2] ) {
3826
- extra = m[3];
3827
- break;
3828
- }
3829
- }
3830
- } while ( m );
3831
-
3832
- if ( parts.length > 1 && origPOS.exec( selector ) ) {
3833
-
3834
- if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
3835
- set = posProcess( parts[0] + parts[1], context );
3836
-
3837
- } else {
3838
- set = Expr.relative[ parts[0] ] ?
3839
- [ context ] :
3840
- Sizzle( parts.shift(), context );
3841
-
3842
- while ( parts.length ) {
3843
- selector = parts.shift();
3844
-
3845
- if ( Expr.relative[ selector ] ) {
3846
- selector += parts.shift();
3847
- }
3848
-
3849
- set = posProcess( selector, set );
3850
- }
3851
- }
3852
-
3853
- } else {
3854
- // Take a shortcut and set the context if the root selector is an ID
3855
- // (but not if it'll be faster if the inner selector is an ID)
3856
- if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
3857
- Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
3858
-
3859
- ret = Sizzle.find( parts.shift(), context, contextXML );
3860
- context = ret.expr ?
3861
- Sizzle.filter( ret.expr, ret.set )[0] :
3862
- ret.set[0];
3863
- }
3864
-
3865
- if ( context ) {
3866
- ret = seed ?
3867
- { expr: parts.pop(), set: makeArray(seed) } :
3868
- Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
3869
-
3870
- set = ret.expr ?
3871
- Sizzle.filter( ret.expr, ret.set ) :
3872
- ret.set;
3873
-
3874
- if ( parts.length > 0 ) {
3875
- checkSet = makeArray( set );
3876
-
3877
- } else {
3878
- prune = false;
3879
- }
3880
-
3881
- while ( parts.length ) {
3882
- cur = parts.pop();
3883
- pop = cur;
3884
-
3885
- if ( !Expr.relative[ cur ] ) {
3886
- cur = "";
3887
- } else {
3888
- pop = parts.pop();
3889
- }
3890
-
3891
- if ( pop == null ) {
3892
- pop = context;
3893
- }
3894
-
3895
- Expr.relative[ cur ]( checkSet, pop, contextXML );
3896
- }
3897
-
3898
- } else {
3899
- checkSet = parts = [];
3900
- }
3901
- }
3902
-
3903
- if ( !checkSet ) {
3904
- checkSet = set;
3905
- }
3906
-
3907
- if ( !checkSet ) {
3908
- Sizzle.error( cur || selector );
3909
- }
3910
-
3911
- if ( toString.call(checkSet) === "[object Array]" ) {
3912
- if ( !prune ) {
3913
- results.push.apply( results, checkSet );
3914
-
3915
- } else if ( context && context.nodeType === 1 ) {
3916
- for ( i = 0; checkSet[i] != null; i++ ) {
3917
- if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
3918
- results.push( set[i] );
3919
- }
3920
- }
3921
-
3922
- } else {
3923
- for ( i = 0; checkSet[i] != null; i++ ) {
3924
- if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
3925
- results.push( set[i] );
3926
- }
3927
- }
3928
- }
3929
-
3930
- } else {
3931
- makeArray( checkSet, results );
3932
- }
3933
-
3934
- if ( extra ) {
3935
- Sizzle( extra, origContext, results, seed );
3936
- Sizzle.uniqueSort( results );
3937
- }
3938
-
3939
- return results;
3940
- };
3941
-
3942
- Sizzle.uniqueSort = function( results ) {
3943
- if ( sortOrder ) {
3944
- hasDuplicate = baseHasDuplicate;
3945
- results.sort( sortOrder );
3946
-
3947
- if ( hasDuplicate ) {
3948
- for ( var i = 1; i < results.length; i++ ) {
3949
- if ( results[i] === results[ i - 1 ] ) {
3950
- results.splice( i--, 1 );
3951
- }
3952
- }
3953
- }
3954
- }
3955
-
3956
- return results;
3957
- };
3958
-
3959
- Sizzle.matches = function( expr, set ) {
3960
- return Sizzle( expr, null, null, set );
3961
- };
3962
-
3963
- Sizzle.matchesSelector = function( node, expr ) {
3964
- return Sizzle( expr, null, null, [node] ).length > 0;
3965
- };
3966
-
3967
- Sizzle.find = function( expr, context, isXML ) {
3968
- var set;
3969
-
3970
- if ( !expr ) {
3971
- return [];
3972
- }
3973
-
3974
- for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
3975
- var match,
3976
- type = Expr.order[i];
3977
-
3978
- if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
3979
- var left = match[1];
3980
- match.splice( 1, 1 );
3981
-
3982
- if ( left.substr( left.length - 1 ) !== "\\" ) {
3983
- match[1] = (match[1] || "").replace( rBackslash, "" );
3984
- set = Expr.find[ type ]( match, context, isXML );
3985
-
3986
- if ( set != null ) {
3987
- expr = expr.replace( Expr.match[ type ], "" );
3988
- break;
3989
- }
3990
- }
3991
- }
3992
- }
3993
-
3994
- if ( !set ) {
3995
- set = typeof context.getElementsByTagName !== "undefined" ?
3996
- context.getElementsByTagName( "*" ) :
3997
- [];
3998
- }
3999
-
4000
- return { set: set, expr: expr };
4001
- };
4002
-
4003
- Sizzle.filter = function( expr, set, inplace, not ) {
4004
- var match, anyFound,
4005
- old = expr,
4006
- result = [],
4007
- curLoop = set,
4008
- isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
4009
-
4010
- while ( expr && set.length ) {
4011
- for ( var type in Expr.filter ) {
4012
- if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
4013
- var found, item,
4014
- filter = Expr.filter[ type ],
4015
- left = match[1];
4016
-
4017
- anyFound = false;
4018
-
4019
- match.splice(1,1);
4020
-
4021
- if ( left.substr( left.length - 1 ) === "\\" ) {
4022
- continue;
4023
- }
4024
-
4025
- if ( curLoop === result ) {
4026
- result = [];
4027
- }
4028
-
4029
- if ( Expr.preFilter[ type ] ) {
4030
- match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
4031
-
4032
- if ( !match ) {
4033
- anyFound = found = true;
4034
-
4035
- } else if ( match === true ) {
4036
- continue;
4037
- }
4038
- }
4039
-
4040
- if ( match ) {
4041
- for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
4042
- if ( item ) {
4043
- found = filter( item, match, i, curLoop );
4044
- var pass = not ^ !!found;
4045
-
4046
- if ( inplace && found != null ) {
4047
- if ( pass ) {
4048
- anyFound = true;
4049
-
4050
- } else {
4051
- curLoop[i] = false;
4052
- }
4053
-
4054
- } else if ( pass ) {
4055
- result.push( item );
4056
- anyFound = true;
4057
- }
4058
- }
4059
- }
4060
- }
4061
-
4062
- if ( found !== undefined ) {
4063
- if ( !inplace ) {
4064
- curLoop = result;
4065
- }
4066
-
4067
- expr = expr.replace( Expr.match[ type ], "" );
4068
-
4069
- if ( !anyFound ) {
4070
- return [];
4071
- }
4072
-
4073
- break;
4074
- }
4075
- }
4076
- }
4077
-
4078
- // Improper expression
4079
- if ( expr === old ) {
4080
- if ( anyFound == null ) {
4081
- Sizzle.error( expr );
4082
-
4083
- } else {
4084
- break;
4085
- }
4086
- }
4087
-
4088
- old = expr;
4089
- }
4090
-
4091
- return curLoop;
4092
- };
4093
-
4094
- Sizzle.error = function( msg ) {
4095
- throw "Syntax error, unrecognized expression: " + msg;
4096
- };
4097
-
4098
- var Expr = Sizzle.selectors = {
4099
- order: [ "ID", "NAME", "TAG" ],
4100
-
4101
- match: {
4102
- ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
4103
- CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
4104
- NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
4105
- ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
4106
- TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
4107
- CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
4108
- POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
4109
- PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
4110
- },
4111
-
4112
- leftMatch: {},
4113
-
4114
- attrMap: {
4115
- "class": "className",
4116
- "for": "htmlFor"
4117
- },
4118
-
4119
- attrHandle: {
4120
- href: function( elem ) {
4121
- return elem.getAttribute( "href" );
4122
- },
4123
- type: function( elem ) {
4124
- return elem.getAttribute( "type" );
4125
- }
4126
- },
4127
-
4128
- relative: {
4129
- "+": function(checkSet, part){
4130
- var isPartStr = typeof part === "string",
4131
- isTag = isPartStr && !rNonWord.test( part ),
4132
- isPartStrNotTag = isPartStr && !isTag;
4133
-
4134
- if ( isTag ) {
4135
- part = part.toLowerCase();
4136
- }
4137
-
4138
- for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
4139
- if ( (elem = checkSet[i]) ) {
4140
- while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
4141
-
4142
- checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
4143
- elem || false :
4144
- elem === part;
4145
- }
4146
- }
4147
-
4148
- if ( isPartStrNotTag ) {
4149
- Sizzle.filter( part, checkSet, true );
4150
- }
4151
- },
4152
-
4153
- ">": function( checkSet, part ) {
4154
- var elem,
4155
- isPartStr = typeof part === "string",
4156
- i = 0,
4157
- l = checkSet.length;
4158
-
4159
- if ( isPartStr && !rNonWord.test( part ) ) {
4160
- part = part.toLowerCase();
4161
-
4162
- for ( ; i < l; i++ ) {
4163
- elem = checkSet[i];
4164
-
4165
- if ( elem ) {
4166
- var parent = elem.parentNode;
4167
- checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
4168
- }
4169
- }
4170
-
4171
- } else {
4172
- for ( ; i < l; i++ ) {
4173
- elem = checkSet[i];
4174
-
4175
- if ( elem ) {
4176
- checkSet[i] = isPartStr ?
4177
- elem.parentNode :
4178
- elem.parentNode === part;
4179
- }
4180
- }
4181
-
4182
- if ( isPartStr ) {
4183
- Sizzle.filter( part, checkSet, true );
4184
- }
4185
- }
4186
- },
4187
-
4188
- "": function(checkSet, part, isXML){
4189
- var nodeCheck,
4190
- doneName = done++,
4191
- checkFn = dirCheck;
4192
-
4193
- if ( typeof part === "string" && !rNonWord.test( part ) ) {
4194
- part = part.toLowerCase();
4195
- nodeCheck = part;
4196
- checkFn = dirNodeCheck;
4197
- }
4198
-
4199
- checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
4200
- },
4201
-
4202
- "~": function( checkSet, part, isXML ) {
4203
- var nodeCheck,
4204
- doneName = done++,
4205
- checkFn = dirCheck;
4206
-
4207
- if ( typeof part === "string" && !rNonWord.test( part ) ) {
4208
- part = part.toLowerCase();
4209
- nodeCheck = part;
4210
- checkFn = dirNodeCheck;
4211
- }
4212
-
4213
- checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
4214
- }
4215
- },
4216
-
4217
- find: {
4218
- ID: function( match, context, isXML ) {
4219
- if ( typeof context.getElementById !== "undefined" && !isXML ) {
4220
- var m = context.getElementById(match[1]);
4221
- // Check parentNode to catch when Blackberry 4.6 returns
4222
- // nodes that are no longer in the document #6963
4223
- return m && m.parentNode ? [m] : [];
4224
- }
4225
- },
4226
-
4227
- NAME: function( match, context ) {
4228
- if ( typeof context.getElementsByName !== "undefined" ) {
4229
- var ret = [],
4230
- results = context.getElementsByName( match[1] );
4231
-
4232
- for ( var i = 0, l = results.length; i < l; i++ ) {
4233
- if ( results[i].getAttribute("name") === match[1] ) {
4234
- ret.push( results[i] );
4235
- }
4236
- }
4237
-
4238
- return ret.length === 0 ? null : ret;
4239
- }
4240
- },
4241
-
4242
- TAG: function( match, context ) {
4243
- if ( typeof context.getElementsByTagName !== "undefined" ) {
4244
- return context.getElementsByTagName( match[1] );
4245
- }
4246
- }
4247
- },
4248
- preFilter: {
4249
- CLASS: function( match, curLoop, inplace, result, not, isXML ) {
4250
- match = " " + match[1].replace( rBackslash, "" ) + " ";
4251
-
4252
- if ( isXML ) {
4253
- return match;
4254
- }
4255
-
4256
- for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
4257
- if ( elem ) {
4258
- if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) {
4259
- if ( !inplace ) {
4260
- result.push( elem );
4261
- }
4262
-
4263
- } else if ( inplace ) {
4264
- curLoop[i] = false;
4265
- }
4266
- }
4267
- }
4268
-
4269
- return false;
4270
- },
4271
-
4272
- ID: function( match ) {
4273
- return match[1].replace( rBackslash, "" );
4274
- },
4275
-
4276
- TAG: function( match, curLoop ) {
4277
- return match[1].replace( rBackslash, "" ).toLowerCase();
4278
- },
4279
-
4280
- CHILD: function( match ) {
4281
- if ( match[1] === "nth" ) {
4282
- if ( !match[2] ) {
4283
- Sizzle.error( match[0] );
4284
- }
4285
-
4286
- match[2] = match[2].replace(/^\+|\s*/g, '');
4287
-
4288
- // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
4289
- var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(
4290
- match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
4291
- !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
4292
-
4293
- // calculate the numbers (first)n+(last) including if they are negative
4294
- match[2] = (test[1] + (test[2] || 1)) - 0;
4295
- match[3] = test[3] - 0;
4296
- }
4297
- else if ( match[2] ) {
4298
- Sizzle.error( match[0] );
4299
- }
4300
-
4301
- // TODO: Move to normal caching system
4302
- match[0] = done++;
4303
-
4304
- return match;
4305
- },
4306
-
4307
- ATTR: function( match, curLoop, inplace, result, not, isXML ) {
4308
- var name = match[1] = match[1].replace( rBackslash, "" );
4309
-
4310
- if ( !isXML && Expr.attrMap[name] ) {
4311
- match[1] = Expr.attrMap[name];
4312
- }
4313
-
4314
- // Handle if an un-quoted value was used
4315
- match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" );
4316
-
4317
- if ( match[2] === "~=" ) {
4318
- match[4] = " " + match[4] + " ";
4319
- }
4320
-
4321
- return match;
4322
- },
4323
-
4324
- PSEUDO: function( match, curLoop, inplace, result, not ) {
4325
- if ( match[1] === "not" ) {
4326
- // If we're dealing with a complex expression, or a simple one
4327
- if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
4328
- match[3] = Sizzle(match[3], null, null, curLoop);
4329
-
4330
- } else {
4331
- var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
4332
-
4333
- if ( !inplace ) {
4334
- result.push.apply( result, ret );
4335
- }
4336
-
4337
- return false;
4338
- }
4339
-
4340
- } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
4341
- return true;
4342
- }
4343
-
4344
- return match;
4345
- },
4346
-
4347
- POS: function( match ) {
4348
- match.unshift( true );
4349
-
4350
- return match;
4351
- }
4352
- },
4353
-
4354
- filters: {
4355
- enabled: function( elem ) {
4356
- return elem.disabled === false && elem.type !== "hidden";
4357
- },
4358
-
4359
- disabled: function( elem ) {
4360
- return elem.disabled === true;
4361
- },
4362
-
4363
- checked: function( elem ) {
4364
- return elem.checked === true;
4365
- },
4366
-
4367
- selected: function( elem ) {
4368
- // Accessing this property makes selected-by-default
4369
- // options in Safari work properly
4370
- if ( elem.parentNode ) {
4371
- elem.parentNode.selectedIndex;
4372
- }
4373
-
4374
- return elem.selected === true;
4375
- },
4376
-
4377
- parent: function( elem ) {
4378
- return !!elem.firstChild;
4379
- },
4380
-
4381
- empty: function( elem ) {
4382
- return !elem.firstChild;
4383
- },
4384
-
4385
- has: function( elem, i, match ) {
4386
- return !!Sizzle( match[3], elem ).length;
4387
- },
4388
-
4389
- header: function( elem ) {
4390
- return (/h\d/i).test( elem.nodeName );
4391
- },
4392
-
4393
- text: function( elem ) {
4394
- var attr = elem.getAttribute( "type" ), type = elem.type;
4395
- // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
4396
- // use getAttribute instead to test this case
4397
- return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
4398
- },
4399
-
4400
- radio: function( elem ) {
4401
- return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type;
4402
- },
4403
-
4404
- checkbox: function( elem ) {
4405
- return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type;
4406
- },
4407
-
4408
- file: function( elem ) {
4409
- return elem.nodeName.toLowerCase() === "input" && "file" === elem.type;
4410
- },
4411
-
4412
- password: function( elem ) {
4413
- return elem.nodeName.toLowerCase() === "input" && "password" === elem.type;
4414
- },
4415
-
4416
- submit: function( elem ) {
4417
- var name = elem.nodeName.toLowerCase();
4418
- return (name === "input" || name === "button") && "submit" === elem.type;
4419
- },
4420
-
4421
- image: function( elem ) {
4422
- return elem.nodeName.toLowerCase() === "input" && "image" === elem.type;
4423
- },
4424
-
4425
- reset: function( elem ) {
4426
- var name = elem.nodeName.toLowerCase();
4427
- return (name === "input" || name === "button") && "reset" === elem.type;
4428
- },
4429
-
4430
- button: function( elem ) {
4431
- var name = elem.nodeName.toLowerCase();
4432
- return name === "input" && "button" === elem.type || name === "button";
4433
- },
4434
-
4435
- input: function( elem ) {
4436
- return (/input|select|textarea|button/i).test( elem.nodeName );
4437
- },
4438
-
4439
- focus: function( elem ) {
4440
- return elem === elem.ownerDocument.activeElement;
4441
- }
4442
- },
4443
- setFilters: {
4444
- first: function( elem, i ) {
4445
- return i === 0;
4446
- },
4447
-
4448
- last: function( elem, i, match, array ) {
4449
- return i === array.length - 1;
4450
- },
4451
-
4452
- even: function( elem, i ) {
4453
- return i % 2 === 0;
4454
- },
4455
-
4456
- odd: function( elem, i ) {
4457
- return i % 2 === 1;
4458
- },
4459
-
4460
- lt: function( elem, i, match ) {
4461
- return i < match[3] - 0;
4462
- },
4463
-
4464
- gt: function( elem, i, match ) {
4465
- return i > match[3] - 0;
4466
- },
4467
-
4468
- nth: function( elem, i, match ) {
4469
- return match[3] - 0 === i;
4470
- },
4471
-
4472
- eq: function( elem, i, match ) {
4473
- return match[3] - 0 === i;
4474
- }
4475
- },
4476
- filter: {
4477
- PSEUDO: function( elem, match, i, array ) {
4478
- var name = match[1],
4479
- filter = Expr.filters[ name ];
4480
-
4481
- if ( filter ) {
4482
- return filter( elem, i, match, array );
4483
-
4484
- } else if ( name === "contains" ) {
4485
- return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0;
4486
-
4487
- } else if ( name === "not" ) {
4488
- var not = match[3];
4489
-
4490
- for ( var j = 0, l = not.length; j < l; j++ ) {
4491
- if ( not[j] === elem ) {
4492
- return false;
4493
- }
4494
- }
4495
-
4496
- return true;
4497
-
4498
- } else {
4499
- Sizzle.error( name );
4500
- }
4501
- },
4502
-
4503
- CHILD: function( elem, match ) {
4504
- var type = match[1],
4505
- node = elem;
4506
-
4507
- switch ( type ) {
4508
- case "only":
4509
- case "first":
4510
- while ( (node = node.previousSibling) ) {
4511
- if ( node.nodeType === 1 ) {
4512
- return false;
4513
- }
4514
- }
4515
-
4516
- if ( type === "first" ) {
4517
- return true;
4518
- }
4519
-
4520
- node = elem;
4521
-
4522
- case "last":
4523
- while ( (node = node.nextSibling) ) {
4524
- if ( node.nodeType === 1 ) {
4525
- return false;
4526
- }
4527
- }
4528
-
4529
- return true;
4530
-
4531
- case "nth":
4532
- var first = match[2],
4533
- last = match[3];
4534
-
4535
- if ( first === 1 && last === 0 ) {
4536
- return true;
4537
- }
4538
-
4539
- var doneName = match[0],
4540
- parent = elem.parentNode;
4541
-
4542
- if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
4543
- var count = 0;
4544
-
4545
- for ( node = parent.firstChild; node; node = node.nextSibling ) {
4546
- if ( node.nodeType === 1 ) {
4547
- node.nodeIndex = ++count;
4548
- }
4549
- }
4550
-
4551
- parent.sizcache = doneName;
4552
- }
4553
-
4554
- var diff = elem.nodeIndex - last;
4555
-
4556
- if ( first === 0 ) {
4557
- return diff === 0;
4558
-
4559
- } else {
4560
- return ( diff % first === 0 && diff / first >= 0 );
4561
- }
4562
- }
4563
- },
4564
-
4565
- ID: function( elem, match ) {
4566
- return elem.nodeType === 1 && elem.getAttribute("id") === match;
4567
- },
4568
-
4569
- TAG: function( elem, match ) {
4570
- return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match;
4571
- },
4572
-
4573
- CLASS: function( elem, match ) {
4574
- return (" " + (elem.className || elem.getAttribute("class")) + " ")
4575
- .indexOf( match ) > -1;
4576
- },
4577
-
4578
- ATTR: function( elem, match ) {
4579
- var name = match[1],
4580
- result = Expr.attrHandle[ name ] ?
4581
- Expr.attrHandle[ name ]( elem ) :
4582
- elem[ name ] != null ?
4583
- elem[ name ] :
4584
- elem.getAttribute( name ),
4585
- value = result + "",
4586
- type = match[2],
4587
- check = match[4];
4588
-
4589
- return result == null ?
4590
- type === "!=" :
4591
- type === "=" ?
4592
- value === check :
4593
- type === "*=" ?
4594
- value.indexOf(check) >= 0 :
4595
- type === "~=" ?
4596
- (" " + value + " ").indexOf(check) >= 0 :
4597
- !check ?
4598
- value && result !== false :
4599
- type === "!=" ?
4600
- value !== check :
4601
- type === "^=" ?
4602
- value.indexOf(check) === 0 :
4603
- type === "$=" ?
4604
- value.substr(value.length - check.length) === check :
4605
- type === "|=" ?
4606
- value === check || value.substr(0, check.length + 1) === check + "-" :
4607
- false;
4608
- },
4609
-
4610
- POS: function( elem, match, i, array ) {
4611
- var name = match[2],
4612
- filter = Expr.setFilters[ name ];
4613
-
4614
- if ( filter ) {
4615
- return filter( elem, i, match, array );
4616
- }
4617
- }
4618
- }
4619
- };
4620
-
4621
- var origPOS = Expr.match.POS,
4622
- fescape = function(all, num){
4623
- return "\\" + (num - 0 + 1);
4624
- };
4625
-
4626
- for ( var type in Expr.match ) {
4627
- Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
4628
- Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
4629
- }
4630
-
4631
- var makeArray = function( array, results ) {
4632
- array = Array.prototype.slice.call( array, 0 );
4633
-
4634
- if ( results ) {
4635
- results.push.apply( results, array );
4636
- return results;
4637
- }
4638
-
4639
- return array;
4640
- };
4641
-
4642
- // Perform a simple check to determine if the browser is capable of
4643
- // converting a NodeList to an array using builtin methods.
4644
- // Also verifies that the returned array holds DOM nodes
4645
- // (which is not the case in the Blackberry browser)
4646
- try {
4647
- Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
4648
-
4649
- // Provide a fallback method if it does not work
4650
- } catch( e ) {
4651
- makeArray = function( array, results ) {
4652
- var i = 0,
4653
- ret = results || [];
4654
-
4655
- if ( toString.call(array) === "[object Array]" ) {
4656
- Array.prototype.push.apply( ret, array );
4657
-
4658
- } else {
4659
- if ( typeof array.length === "number" ) {
4660
- for ( var l = array.length; i < l; i++ ) {
4661
- ret.push( array[i] );
4662
- }
4663
-
4664
- } else {
4665
- for ( ; array[i]; i++ ) {
4666
- ret.push( array[i] );
4667
- }
4668
- }
4669
- }
4670
-
4671
- return ret;
4672
- };
4673
- }
4674
-
4675
- var sortOrder, siblingCheck;
4676
-
4677
- if ( document.documentElement.compareDocumentPosition ) {
4678
- sortOrder = function( a, b ) {
4679
- if ( a === b ) {
4680
- hasDuplicate = true;
4681
- return 0;
4682
- }
4683
-
4684
- if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
4685
- return a.compareDocumentPosition ? -1 : 1;
4686
- }
4687
-
4688
- return a.compareDocumentPosition(b) & 4 ? -1 : 1;
4689
- };
4690
-
4691
- } else {
4692
- sortOrder = function( a, b ) {
4693
- // The nodes are identical, we can exit early
4694
- if ( a === b ) {
4695
- hasDuplicate = true;
4696
- return 0;
4697
-
4698
- // Fallback to using sourceIndex (in IE) if it's available on both nodes
4699
- } else if ( a.sourceIndex && b.sourceIndex ) {
4700
- return a.sourceIndex - b.sourceIndex;
4701
- }
4702
-
4703
- var al, bl,
4704
- ap = [],
4705
- bp = [],
4706
- aup = a.parentNode,
4707
- bup = b.parentNode,
4708
- cur = aup;
4709
-
4710
- // If the nodes are siblings (or identical) we can do a quick check
4711
- if ( aup === bup ) {
4712
- return siblingCheck( a, b );
4713
-
4714
- // If no parents were found then the nodes are disconnected
4715
- } else if ( !aup ) {
4716
- return -1;
4717
-
4718
- } else if ( !bup ) {
4719
- return 1;
4720
- }
4721
-
4722
- // Otherwise they're somewhere else in the tree so we need
4723
- // to build up a full list of the parentNodes for comparison
4724
- while ( cur ) {
4725
- ap.unshift( cur );
4726
- cur = cur.parentNode;
4727
- }
4728
-
4729
- cur = bup;
4730
-
4731
- while ( cur ) {
4732
- bp.unshift( cur );
4733
- cur = cur.parentNode;
4734
- }
4735
-
4736
- al = ap.length;
4737
- bl = bp.length;
4738
-
4739
- // Start walking down the tree looking for a discrepancy
4740
- for ( var i = 0; i < al && i < bl; i++ ) {
4741
- if ( ap[i] !== bp[i] ) {
4742
- return siblingCheck( ap[i], bp[i] );
4743
- }
4744
- }
4745
-
4746
- // We ended someplace up the tree so do a sibling check
4747
- return i === al ?
4748
- siblingCheck( a, bp[i], -1 ) :
4749
- siblingCheck( ap[i], b, 1 );
4750
- };
4751
-
4752
- siblingCheck = function( a, b, ret ) {
4753
- if ( a === b ) {
4754
- return ret;
4755
- }
4756
-
4757
- var cur = a.nextSibling;
4758
-
4759
- while ( cur ) {
4760
- if ( cur === b ) {
4761
- return -1;
4762
- }
4763
-
4764
- cur = cur.nextSibling;
4765
- }
4766
-
4767
- return 1;
4768
- };
4769
- }
4770
-
4771
- // Utility function for retreiving the text value of an array of DOM nodes
4772
- Sizzle.getText = function( elems ) {
4773
- var ret = "", elem;
4774
-
4775
- for ( var i = 0; elems[i]; i++ ) {
4776
- elem = elems[i];
4777
-
4778
- // Get the text from text nodes and CDATA nodes
4779
- if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
4780
- ret += elem.nodeValue;
4781
-
4782
- // Traverse everything else, except comment nodes
4783
- } else if ( elem.nodeType !== 8 ) {
4784
- ret += Sizzle.getText( elem.childNodes );
4785
- }
4786
- }
4787
-
4788
- return ret;
4789
- };
4790
-
4791
- // Check to see if the browser returns elements by name when
4792
- // querying by getElementById (and provide a workaround)
4793
- (function(){
4794
- // We're going to inject a fake input element with a specified name
4795
- var form = document.createElement("div"),
4796
- id = "script" + (new Date()).getTime(),
4797
- root = document.documentElement;
4798
-
4799
- form.innerHTML = "<a name='" + id + "'/>";
4800
-
4801
- // Inject it into the root element, check its status, and remove it quickly
4802
- root.insertBefore( form, root.firstChild );
4803
-
4804
- // The workaround has to do additional checks after a getElementById
4805
- // Which slows things down for other browsers (hence the branching)
4806
- if ( document.getElementById( id ) ) {
4807
- Expr.find.ID = function( match, context, isXML ) {
4808
- if ( typeof context.getElementById !== "undefined" && !isXML ) {
4809
- var m = context.getElementById(match[1]);
4810
-
4811
- return m ?
4812
- m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
4813
- [m] :
4814
- undefined :
4815
- [];
4816
- }
4817
- };
4818
-
4819
- Expr.filter.ID = function( elem, match ) {
4820
- var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
4821
-
4822
- return elem.nodeType === 1 && node && node.nodeValue === match;
4823
- };
4824
- }
4825
-
4826
- root.removeChild( form );
4827
-
4828
- // release memory in IE
4829
- root = form = null;
4830
- })();
4831
-
4832
- (function(){
4833
- // Check to see if the browser returns only elements
4834
- // when doing getElementsByTagName("*")
4835
-
4836
- // Create a fake element
4837
- var div = document.createElement("div");
4838
- div.appendChild( document.createComment("") );
4839
-
4840
- // Make sure no comments are found
4841
- if ( div.getElementsByTagName("*").length > 0 ) {
4842
- Expr.find.TAG = function( match, context ) {
4843
- var results = context.getElementsByTagName( match[1] );
4844
-
4845
- // Filter out possible comments
4846
- if ( match[1] === "*" ) {
4847
- var tmp = [];
4848
-
4849
- for ( var i = 0; results[i]; i++ ) {
4850
- if ( results[i].nodeType === 1 ) {
4851
- tmp.push( results[i] );
4852
- }
4853
- }
4854
-
4855
- results = tmp;
4856
- }
4857
-
4858
- return results;
4859
- };
4860
- }
4861
-
4862
- // Check to see if an attribute returns normalized href attributes
4863
- div.innerHTML = "<a href='#'></a>";
4864
-
4865
- if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
4866
- div.firstChild.getAttribute("href") !== "#" ) {
4867
-
4868
- Expr.attrHandle.href = function( elem ) {
4869
- return elem.getAttribute( "href", 2 );
4870
- };
4871
- }
4872
-
4873
- // release memory in IE
4874
- div = null;
4875
- })();
4876
-
4877
- if ( document.querySelectorAll ) {
4878
- (function(){
4879
- var oldSizzle = Sizzle,
4880
- div = document.createElement("div"),
4881
- id = "__sizzle__";
4882
-
4883
- div.innerHTML = "<p class='TEST'></p>";
4884
-
4885
- // Safari can't handle uppercase or unicode characters when
4886
- // in quirks mode.
4887
- if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
4888
- return;
4889
- }
4890
-
4891
- Sizzle = function( query, context, extra, seed ) {
4892
- context = context || document;
4893
-
4894
- // Only use querySelectorAll on non-XML documents
4895
- // (ID selectors don't work in non-HTML documents)
4896
- if ( !seed && !Sizzle.isXML(context) ) {
4897
- // See if we find a selector to speed up
4898
- var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
4899
-
4900
- if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
4901
- // Speed-up: Sizzle("TAG")
4902
- if ( match[1] ) {
4903
- return makeArray( context.getElementsByTagName( query ), extra );
4904
-
4905
- // Speed-up: Sizzle(".CLASS")
4906
- } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
4907
- return makeArray( context.getElementsByClassName( match[2] ), extra );
4908
- }
4909
- }
4910
-
4911
- if ( context.nodeType === 9 ) {
4912
- // Speed-up: Sizzle("body")
4913
- // The body element only exists once, optimize finding it
4914
- if ( query === "body" && context.body ) {
4915
- return makeArray( [ context.body ], extra );
4916
-
4917
- // Speed-up: Sizzle("#ID")
4918
- } else if ( match && match[3] ) {
4919
- var elem = context.getElementById( match[3] );
4920
-
4921
- // Check parentNode to catch when Blackberry 4.6 returns
4922
- // nodes that are no longer in the document #6963
4923
- if ( elem && elem.parentNode ) {
4924
- // Handle the case where IE and Opera return items
4925
- // by name instead of ID
4926
- if ( elem.id === match[3] ) {
4927
- return makeArray( [ elem ], extra );
4928
- }
4929
-
4930
- } else {
4931
- return makeArray( [], extra );
4932
- }
4933
- }
4934
-
4935
- try {
4936
- return makeArray( context.querySelectorAll(query), extra );
4937
- } catch(qsaError) {}
4938
-
4939
- // qSA works strangely on Element-rooted queries
4940
- // We can work around this by specifying an extra ID on the root
4941
- // and working up from there (Thanks to Andrew Dupont for the technique)
4942
- // IE 8 doesn't work on object elements
4943
- } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
4944
- var oldContext = context,
4945
- old = context.getAttribute( "id" ),
4946
- nid = old || id,
4947
- hasParent = context.parentNode,
4948
- relativeHierarchySelector = /^\s*[+~]/.test( query );
4949
-
4950
- if ( !old ) {
4951
- context.setAttribute( "id", nid );
4952
- } else {
4953
- nid = nid.replace( /'/g, "\\$&" );
4954
- }
4955
- if ( relativeHierarchySelector && hasParent ) {
4956
- context = context.parentNode;
4957
- }
4958
-
4959
- try {
4960
- if ( !relativeHierarchySelector || hasParent ) {
4961
- return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
4962
- }
4963
-
4964
- } catch(pseudoError) {
4965
- } finally {
4966
- if ( !old ) {
4967
- oldContext.removeAttribute( "id" );
4968
- }
4969
- }
4970
- }
4971
- }
4972
-
4973
- return oldSizzle(query, context, extra, seed);
4974
- };
4975
-
4976
- for ( var prop in oldSizzle ) {
4977
- Sizzle[ prop ] = oldSizzle[ prop ];
4978
- }
4979
-
4980
- // release memory in IE
4981
- div = null;
4982
- })();
4983
- }
4984
-
4985
- (function(){
4986
- var html = document.documentElement,
4987
- matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;
4988
-
4989
- if ( matches ) {
4990
- // Check to see if it's possible to do matchesSelector
4991
- // on a disconnected node (IE 9 fails this)
4992
- var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ),
4993
- pseudoWorks = false;
4994
-
4995
- try {
4996
- // This should fail with an exception
4997
- // Gecko does not error, returns false instead
4998
- matches.call( document.documentElement, "[test!='']:sizzle" );
4999
-
5000
- } catch( pseudoError ) {
5001
- pseudoWorks = true;
5002
- }
5003
-
5004
- Sizzle.matchesSelector = function( node, expr ) {
5005
- // Make sure that attribute selectors are quoted
5006
- expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
5007
-
5008
- if ( !Sizzle.isXML( node ) ) {
5009
- try {
5010
- if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
5011
- var ret = matches.call( node, expr );
5012
-
5013
- // IE 9's matchesSelector returns false on disconnected nodes
5014
- if ( ret || !disconnectedMatch ||
5015
- // As well, disconnected nodes are said to be in a document
5016
- // fragment in IE 9, so check for that
5017
- node.document && node.document.nodeType !== 11 ) {
5018
- return ret;
5019
- }
5020
- }
5021
- } catch(e) {}
5022
- }
5023
-
5024
- return Sizzle(expr, null, null, [node]).length > 0;
5025
- };
5026
- }
5027
- })();
5028
-
5029
- (function(){
5030
- var div = document.createElement("div");
5031
-
5032
- div.innerHTML = "<div class='test e'></div><div class='test'></div>";
5033
-
5034
- // Opera can't find a second classname (in 9.6)
5035
- // Also, make sure that getElementsByClassName actually exists
5036
- if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
5037
- return;
5038
- }
5039
-
5040
- // Safari caches class attributes, doesn't catch changes (in 3.2)
5041
- div.lastChild.className = "e";
5042
-
5043
- if ( div.getElementsByClassName("e").length === 1 ) {
5044
- return;
5045
- }
5046
-
5047
- Expr.order.splice(1, 0, "CLASS");
5048
- Expr.find.CLASS = function( match, context, isXML ) {
5049
- if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
5050
- return context.getElementsByClassName(match[1]);
5051
- }
5052
- };
5053
-
5054
- // release memory in IE
5055
- div = null;
5056
- })();
5057
-
5058
- function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
5059
- for ( var i = 0, l = checkSet.length; i < l; i++ ) {
5060
- var elem = checkSet[i];
5061
-
5062
- if ( elem ) {
5063
- var match = false;
5064
-
5065
- elem = elem[dir];
5066
-
5067
- while ( elem ) {
5068
- if ( elem.sizcache === doneName ) {
5069
- match = checkSet[elem.sizset];
5070
- break;
5071
- }
5072
-
5073
- if ( elem.nodeType === 1 && !isXML ){
5074
- elem.sizcache = doneName;
5075
- elem.sizset = i;
5076
- }
5077
-
5078
- if ( elem.nodeName.toLowerCase() === cur ) {
5079
- match = elem;
5080
- break;
5081
- }
5082
-
5083
- elem = elem[dir];
5084
- }
5085
-
5086
- checkSet[i] = match;
5087
- }
5088
- }
5089
- }
5090
-
5091
- function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
5092
- for ( var i = 0, l = checkSet.length; i < l; i++ ) {
5093
- var elem = checkSet[i];
5094
-
5095
- if ( elem ) {
5096
- var match = false;
5097
-
5098
- elem = elem[dir];
5099
-
5100
- while ( elem ) {
5101
- if ( elem.sizcache === doneName ) {
5102
- match = checkSet[elem.sizset];
5103
- break;
5104
- }
5105
-
5106
- if ( elem.nodeType === 1 ) {
5107
- if ( !isXML ) {
5108
- elem.sizcache = doneName;
5109
- elem.sizset = i;
5110
- }
5111
-
5112
- if ( typeof cur !== "string" ) {
5113
- if ( elem === cur ) {
5114
- match = true;
5115
- break;
5116
- }
5117
-
5118
- } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
5119
- match = elem;
5120
- break;
5121
- }
5122
- }
5123
-
5124
- elem = elem[dir];
5125
- }
5126
-
5127
- checkSet[i] = match;
5128
- }
5129
- }
5130
- }
5131
-
5132
- if ( document.documentElement.contains ) {
5133
- Sizzle.contains = function( a, b ) {
5134
- return a !== b && (a.contains ? a.contains(b) : true);
5135
- };
5136
-
5137
- } else if ( document.documentElement.compareDocumentPosition ) {
5138
- Sizzle.contains = function( a, b ) {
5139
- return !!(a.compareDocumentPosition(b) & 16);
5140
- };
5141
-
5142
- } else {
5143
- Sizzle.contains = function() {
5144
- return false;
5145
- };
5146
- }
5147
-
5148
- Sizzle.isXML = function( elem ) {
5149
- // documentElement is verified for cases where it doesn't yet exist
5150
- // (such as loading iframes in IE - #4833)
5151
- var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
5152
-
5153
- return documentElement ? documentElement.nodeName !== "HTML" : false;
5154
- };
5155
-
5156
- var posProcess = function( selector, context ) {
5157
- var match,
5158
- tmpSet = [],
5159
- later = "",
5160
- root = context.nodeType ? [context] : context;
5161
-
5162
- // Position selectors must be done after the filter
5163
- // And so must :not(positional) so we move all PSEUDOs to the end
5164
- while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
5165
- later += match[0];
5166
- selector = selector.replace( Expr.match.PSEUDO, "" );
5167
- }
5168
-
5169
- selector = Expr.relative[selector] ? selector + "*" : selector;
5170
-
5171
- for ( var i = 0, l = root.length; i < l; i++ ) {
5172
- Sizzle( selector, root[i], tmpSet );
5173
- }
5174
-
5175
- return Sizzle.filter( later, tmpSet );
5176
- };
5177
-
5178
- // EXPOSE
5179
- jQuery.find = Sizzle;
5180
- jQuery.expr = Sizzle.selectors;
5181
- jQuery.expr[":"] = jQuery.expr.filters;
5182
- jQuery.unique = Sizzle.uniqueSort;
5183
- jQuery.text = Sizzle.getText;
5184
- jQuery.isXMLDoc = Sizzle.isXML;
5185
- jQuery.contains = Sizzle.contains;
5186
-
5187
-
5188
- })();
5189
-
5190
-
5191
- var runtil = /Until$/,
5192
- rparentsprev = /^(?:parents|prevUntil|prevAll)/,
5193
- // Note: This RegExp should be improved, or likely pulled from Sizzle
5194
- rmultiselector = /,/,
5195
- isSimple = /^.[^:#\[\.,]*$/,
5196
- slice = Array.prototype.slice,
5197
- POS = jQuery.expr.match.POS,
5198
- // methods guaranteed to produce a unique set when starting from a unique set
5199
- guaranteedUnique = {
5200
- children: true,
5201
- contents: true,
5202
- next: true,
5203
- prev: true
5204
- };
5205
-
5206
- jQuery.fn.extend({
5207
- find: function( selector ) {
5208
- var self = this,
5209
- i, l;
5210
-
5211
- if ( typeof selector !== "string" ) {
5212
- return jQuery( selector ).filter(function() {
5213
- for ( i = 0, l = self.length; i < l; i++ ) {
5214
- if ( jQuery.contains( self[ i ], this ) ) {
5215
- return true;
5216
- }
5217
- }
5218
- });
5219
- }
5220
-
5221
- var ret = this.pushStack( "", "find", selector ),
5222
- length, n, r;
5223
-
5224
- for ( i = 0, l = this.length; i < l; i++ ) {
5225
- length = ret.length;
5226
- jQuery.find( selector, this[i], ret );
5227
-
5228
- if ( i > 0 ) {
5229
- // Make sure that the results are unique
5230
- for ( n = length; n < ret.length; n++ ) {
5231
- for ( r = 0; r < length; r++ ) {
5232
- if ( ret[r] === ret[n] ) {
5233
- ret.splice(n--, 1);
5234
- break;
5235
- }
5236
- }
5237
- }
5238
- }
5239
- }
5240
-
5241
- return ret;
5242
- },
5243
-
5244
- has: function( target ) {
5245
- var targets = jQuery( target );
5246
- return this.filter(function() {
5247
- for ( var i = 0, l = targets.length; i < l; i++ ) {
5248
- if ( jQuery.contains( this, targets[i] ) ) {
5249
- return true;
5250
- }
5251
- }
5252
- });
5253
- },
5254
-
5255
- not: function( selector ) {
5256
- return this.pushStack( winnow(this, selector, false), "not", selector);
5257
- },
5258
-
5259
- filter: function( selector ) {
5260
- return this.pushStack( winnow(this, selector, true), "filter", selector );
5261
- },
5262
-
5263
- is: function( selector ) {
5264
- return !!selector && ( typeof selector === "string" ?
5265
- jQuery.filter( selector, this ).length > 0 :
5266
- this.filter( selector ).length > 0 );
5267
- },
5268
-
5269
- closest: function( selectors, context ) {
5270
- var ret = [], i, l, cur = this[0];
5271
-
5272
- // Array
5273
- if ( jQuery.isArray( selectors ) ) {
5274
- var match, selector,
5275
- matches = {},
5276
- level = 1;
5277
-
5278
- if ( cur && selectors.length ) {
5279
- for ( i = 0, l = selectors.length; i < l; i++ ) {
5280
- selector = selectors[i];
5281
-
5282
- if ( !matches[ selector ] ) {
5283
- matches[ selector ] = POS.test( selector ) ?
5284
- jQuery( selector, context || this.context ) :
5285
- selector;
5286
- }
5287
- }
5288
-
5289
- while ( cur && cur.ownerDocument && cur !== context ) {
5290
- for ( selector in matches ) {
5291
- match = matches[ selector ];
5292
-
5293
- if ( match.jquery ? match.index( cur ) > -1 : jQuery( cur ).is( match ) ) {
5294
- ret.push({ selector: selector, elem: cur, level: level });
5295
- }
5296
- }
5297
-
5298
- cur = cur.parentNode;
5299
- level++;
5300
- }
5301
- }
5302
-
5303
- return ret;
5304
- }
5305
-
5306
- // String
5307
- var pos = POS.test( selectors ) || typeof selectors !== "string" ?
5308
- jQuery( selectors, context || this.context ) :
5309
- 0;
5310
-
5311
- for ( i = 0, l = this.length; i < l; i++ ) {
5312
- cur = this[i];
5313
-
5314
- while ( cur ) {
5315
- if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
5316
- ret.push( cur );
5317
- break;
5318
-
5319
- } else {
5320
- cur = cur.parentNode;
5321
- if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) {
5322
- break;
5323
- }
5324
- }
5325
- }
5326
- }
5327
-
5328
- ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
5329
-
5330
- return this.pushStack( ret, "closest", selectors );
5331
- },
5332
-
5333
- // Determine the position of an element within
5334
- // the matched set of elements
5335
- index: function( elem ) {
5336
-
5337
- // No argument, return index in parent
5338
- if ( !elem ) {
5339
- return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;
5340
- }
5341
-
5342
- // index in selector
5343
- if ( typeof elem === "string" ) {
5344
- return jQuery.inArray( this[0], jQuery( elem ) );
5345
- }
5346
-
5347
- // Locate the position of the desired element
5348
- return jQuery.inArray(
5349
- // If it receives a jQuery object, the first element is used
5350
- elem.jquery ? elem[0] : elem, this );
5351
- },
5352
-
5353
- add: function( selector, context ) {
5354
- var set = typeof selector === "string" ?
5355
- jQuery( selector, context ) :
5356
- jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
5357
- all = jQuery.merge( this.get(), set );
5358
-
5359
- return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
5360
- all :
5361
- jQuery.unique( all ) );
5362
- },
5363
-
5364
- andSelf: function() {
5365
- return this.add( this.prevObject );
5366
- }
5367
- });
5368
-
5369
- // A painfully simple check to see if an element is disconnected
5370
- // from a document (should be improved, where feasible).
5371
- function isDisconnected( node ) {
5372
- return !node || !node.parentNode || node.parentNode.nodeType === 11;
5373
- }
5374
-
5375
- jQuery.each({
5376
- parent: function( elem ) {
5377
- var parent = elem.parentNode;
5378
- return parent && parent.nodeType !== 11 ? parent : null;
5379
- },
5380
- parents: function( elem ) {
5381
- return jQuery.dir( elem, "parentNode" );
5382
- },
5383
- parentsUntil: function( elem, i, until ) {
5384
- return jQuery.dir( elem, "parentNode", until );
5385
- },
5386
- next: function( elem ) {
5387
- return jQuery.nth( elem, 2, "nextSibling" );
5388
- },
5389
- prev: function( elem ) {
5390
- return jQuery.nth( elem, 2, "previousSibling" );
5391
- },
5392
- nextAll: function( elem ) {
5393
- return jQuery.dir( elem, "nextSibling" );
5394
- },
5395
- prevAll: function( elem ) {
5396
- return jQuery.dir( elem, "previousSibling" );
5397
- },
5398
- nextUntil: function( elem, i, until ) {
5399
- return jQuery.dir( elem, "nextSibling", until );
5400
- },
5401
- prevUntil: function( elem, i, until ) {
5402
- return jQuery.dir( elem, "previousSibling", until );
5403
- },
5404
- siblings: function( elem ) {
5405
- return jQuery.sibling( elem.parentNode.firstChild, elem );
5406
- },
5407
- children: function( elem ) {
5408
- return jQuery.sibling( elem.firstChild );
5409
- },
5410
- contents: function( elem ) {
5411
- return jQuery.nodeName( elem, "iframe" ) ?
5412
- elem.contentDocument || elem.contentWindow.document :
5413
- jQuery.makeArray( elem.childNodes );
5414
- }
5415
- }, function( name, fn ) {
5416
- jQuery.fn[ name ] = function( until, selector ) {
5417
- var ret = jQuery.map( this, fn, until ),
5418
- // The variable 'args' was introduced in
5419
- // https://github.com/jquery/jquery/commit/52a0238
5420
- // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
5421
- // http://code.google.com/p/v8/issues/detail?id=1050
5422
- args = slice.call(arguments);
5423
-
5424
- if ( !runtil.test( name ) ) {
5425
- selector = until;
5426
- }
5427
-
5428
- if ( selector && typeof selector === "string" ) {
5429
- ret = jQuery.filter( selector, ret );
5430
- }
5431
-
5432
- ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
5433
-
5434
- if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
5435
- ret = ret.reverse();
5436
- }
5437
-
5438
- return this.pushStack( ret, name, args.join(",") );
5439
- };
5440
- });
5441
-
5442
- jQuery.extend({
5443
- filter: function( expr, elems, not ) {
5444
- if ( not ) {
5445
- expr = ":not(" + expr + ")";
5446
- }
5447
-
5448
- return elems.length === 1 ?
5449
- jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
5450
- jQuery.find.matches(expr, elems);
5451
- },
5452
-
5453
- dir: function( elem, dir, until ) {
5454
- var matched = [],
5455
- cur = elem[ dir ];
5456
-
5457
- while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
5458
- if ( cur.nodeType === 1 ) {
5459
- matched.push( cur );
5460
- }
5461
- cur = cur[dir];
5462
- }
5463
- return matched;
5464
- },
5465
-
5466
- nth: function( cur, result, dir, elem ) {
5467
- result = result || 1;
5468
- var num = 0;
5469
-
5470
- for ( ; cur; cur = cur[dir] ) {
5471
- if ( cur.nodeType === 1 && ++num === result ) {
5472
- break;
5473
- }
5474
- }
5475
-
5476
- return cur;
5477
- },
5478
-
5479
- sibling: function( n, elem ) {
5480
- var r = [];
5481
-
5482
- for ( ; n; n = n.nextSibling ) {
5483
- if ( n.nodeType === 1 && n !== elem ) {
5484
- r.push( n );
5485
- }
5486
- }
5487
-
5488
- return r;
5489
- }
5490
- });
5491
-
5492
- // Implement the identical functionality for filter and not
5493
- function winnow( elements, qualifier, keep ) {
5494
-
5495
- // Can't pass null or undefined to indexOf in Firefox 4
5496
- // Set to 0 to skip string check
5497
- qualifier = qualifier || 0;
5498
-
5499
- if ( jQuery.isFunction( qualifier ) ) {
5500
- return jQuery.grep(elements, function( elem, i ) {
5501
- var retVal = !!qualifier.call( elem, i, elem );
5502
- return retVal === keep;
5503
- });
5504
-
5505
- } else if ( qualifier.nodeType ) {
5506
- return jQuery.grep(elements, function( elem, i ) {
5507
- return (elem === qualifier) === keep;
5508
- });
5509
-
5510
- } else if ( typeof qualifier === "string" ) {
5511
- var filtered = jQuery.grep(elements, function( elem ) {
5512
- return elem.nodeType === 1;
5513
- });
5514
-
5515
- if ( isSimple.test( qualifier ) ) {
5516
- return jQuery.filter(qualifier, filtered, !keep);
5517
- } else {
5518
- qualifier = jQuery.filter( qualifier, filtered );
5519
- }
5520
- }
5521
-
5522
- return jQuery.grep(elements, function( elem, i ) {
5523
- return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
5524
- });
5525
- }
5526
-
5527
-
5528
-
5529
-
5530
- var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
5531
- rleadingWhitespace = /^\s+/,
5532
- rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
5533
- rtagName = /<([\w:]+)/,
5534
- rtbody = /<tbody/i,
5535
- rhtml = /<|&#?\w+;/,
5536
- rnocache = /<(?:script|object|embed|option|style)/i,
5537
- // checked="checked" or checked
5538
- rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
5539
- rscriptType = /\/(java|ecma)script/i,
5540
- rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
5541
- wrapMap = {
5542
- option: [ 1, "<select multiple='multiple'>", "</select>" ],
5543
- legend: [ 1, "<fieldset>", "</fieldset>" ],
5544
- thead: [ 1, "<table>", "</table>" ],
5545
- tr: [ 2, "<table><tbody>", "</tbody></table>" ],
5546
- td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
5547
- col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
5548
- area: [ 1, "<map>", "</map>" ],
5549
- _default: [ 0, "", "" ]
5550
- };
5551
-
5552
- wrapMap.optgroup = wrapMap.option;
5553
- wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
5554
- wrapMap.th = wrapMap.td;
5555
-
5556
- // IE can't serialize <link> and <script> tags normally
5557
- if ( !jQuery.support.htmlSerialize ) {
5558
- wrapMap._default = [ 1, "div<div>", "</div>" ];
5559
- }
5560
-
5561
- jQuery.fn.extend({
5562
- text: function( text ) {
5563
- if ( jQuery.isFunction(text) ) {
5564
- return this.each(function(i) {
5565
- var self = jQuery( this );
5566
-
5567
- self.text( text.call(this, i, self.text()) );
5568
- });
5569
- }
5570
-
5571
- if ( typeof text !== "object" && text !== undefined ) {
5572
- return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
5573
- }
5574
-
5575
- return jQuery.text( this );
5576
- },
5577
-
5578
- wrapAll: function( html ) {
5579
- if ( jQuery.isFunction( html ) ) {
5580
- return this.each(function(i) {
5581
- jQuery(this).wrapAll( html.call(this, i) );
5582
- });
5583
- }
5584
-
5585
- if ( this[0] ) {
5586
- // The elements to wrap the target around
5587
- var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
5588
-
5589
- if ( this[0].parentNode ) {
5590
- wrap.insertBefore( this[0] );
5591
- }
5592
-
5593
- wrap.map(function() {
5594
- var elem = this;
5595
-
5596
- while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
5597
- elem = elem.firstChild;
5598
- }
5599
-
5600
- return elem;
5601
- }).append( this );
5602
- }
5603
-
5604
- return this;
5605
- },
5606
-
5607
- wrapInner: function( html ) {
5608
- if ( jQuery.isFunction( html ) ) {
5609
- return this.each(function(i) {
5610
- jQuery(this).wrapInner( html.call(this, i) );
5611
- });
5612
- }
5613
-
5614
- return this.each(function() {
5615
- var self = jQuery( this ),
5616
- contents = self.contents();
5617
-
5618
- if ( contents.length ) {
5619
- contents.wrapAll( html );
5620
-
5621
- } else {
5622
- self.append( html );
5623
- }
5624
- });
5625
- },
5626
-
5627
- wrap: function( html ) {
5628
- return this.each(function() {
5629
- jQuery( this ).wrapAll( html );
5630
- });
5631
- },
5632
-
5633
- unwrap: function() {
5634
- return this.parent().each(function() {
5635
- if ( !jQuery.nodeName( this, "body" ) ) {
5636
- jQuery( this ).replaceWith( this.childNodes );
5637
- }
5638
- }).end();
5639
- },
5640
-
5641
- append: function() {
5642
- return this.domManip(arguments, true, function( elem ) {
5643
- if ( this.nodeType === 1 ) {
5644
- this.appendChild( elem );
5645
- }
5646
- });
5647
- },
5648
-
5649
- prepend: function() {
5650
- return this.domManip(arguments, true, function( elem ) {
5651
- if ( this.nodeType === 1 ) {
5652
- this.insertBefore( elem, this.firstChild );
5653
- }
5654
- });
5655
- },
5656
-
5657
- before: function() {
5658
- if ( this[0] && this[0].parentNode ) {
5659
- return this.domManip(arguments, false, function( elem ) {
5660
- this.parentNode.insertBefore( elem, this );
5661
- });
5662
- } else if ( arguments.length ) {
5663
- var set = jQuery(arguments[0]);
5664
- set.push.apply( set, this.toArray() );
5665
- return this.pushStack( set, "before", arguments );
5666
- }
5667
- },
5668
-
5669
- after: function() {
5670
- if ( this[0] && this[0].parentNode ) {
5671
- return this.domManip(arguments, false, function( elem ) {
5672
- this.parentNode.insertBefore( elem, this.nextSibling );
5673
- });
5674
- } else if ( arguments.length ) {
5675
- var set = this.pushStack( this, "after", arguments );
5676
- set.push.apply( set, jQuery(arguments[0]).toArray() );
5677
- return set;
5678
- }
5679
- },
5680
-
5681
- // keepData is for internal use only--do not document
5682
- remove: function( selector, keepData ) {
5683
- for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
5684
- if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
5685
- if ( !keepData && elem.nodeType === 1 ) {
5686
- jQuery.cleanData( elem.getElementsByTagName("*") );
5687
- jQuery.cleanData( [ elem ] );
5688
- }
5689
-
5690
- if ( elem.parentNode ) {
5691
- elem.parentNode.removeChild( elem );
5692
- }
5693
- }
5694
- }
5695
-
5696
- return this;
5697
- },
5698
-
5699
- empty: function() {
5700
- for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
5701
- // Remove element nodes and prevent memory leaks
5702
- if ( elem.nodeType === 1 ) {
5703
- jQuery.cleanData( elem.getElementsByTagName("*") );
5704
- }
5705
-
5706
- // Remove any remaining nodes
5707
- while ( elem.firstChild ) {
5708
- elem.removeChild( elem.firstChild );
5709
- }
5710
- }
5711
-
5712
- return this;
5713
- },
5714
-
5715
- clone: function( dataAndEvents, deepDataAndEvents ) {
5716
- dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
5717
- deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
5718
-
5719
- return this.map( function () {
5720
- return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
5721
- });
5722
- },
5723
-
5724
- html: function( value ) {
5725
- if ( value === undefined ) {
5726
- return this[0] && this[0].nodeType === 1 ?
5727
- this[0].innerHTML.replace(rinlinejQuery, "") :
5728
- null;
5729
-
5730
- // See if we can take a shortcut and just use innerHTML
5731
- } else if ( typeof value === "string" && !rnocache.test( value ) &&
5732
- (jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
5733
- !wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
5734
-
5735
- value = value.replace(rxhtmlTag, "<$1></$2>");
5736
-
5737
- try {
5738
- for ( var i = 0, l = this.length; i < l; i++ ) {
5739
- // Remove element nodes and prevent memory leaks
5740
- if ( this[i].nodeType === 1 ) {
5741
- jQuery.cleanData( this[i].getElementsByTagName("*") );
5742
- this[i].innerHTML = value;
5743
- }
5744
- }
5745
-
5746
- // If using innerHTML throws an exception, use the fallback method
5747
- } catch(e) {
5748
- this.empty().append( value );
5749
- }
5750
-
5751
- } else if ( jQuery.isFunction( value ) ) {
5752
- this.each(function(i){
5753
- var self = jQuery( this );
5754
-
5755
- self.html( value.call(this, i, self.html()) );
5756
- });
5757
-
5758
- } else {
5759
- this.empty().append( value );
5760
- }
5761
-
5762
- return this;
5763
- },
5764
-
5765
- replaceWith: function( value ) {
5766
- if ( this[0] && this[0].parentNode ) {
5767
- // Make sure that the elements are removed from the DOM before they are inserted
5768
- // this can help fix replacing a parent with child elements
5769
- if ( jQuery.isFunction( value ) ) {
5770
- return this.each(function(i) {
5771
- var self = jQuery(this), old = self.html();
5772
- self.replaceWith( value.call( this, i, old ) );
5773
- });
5774
- }
5775
-
5776
- if ( typeof value !== "string" ) {
5777
- value = jQuery( value ).detach();
5778
- }
5779
-
5780
- return this.each(function() {
5781
- var next = this.nextSibling,
5782
- parent = this.parentNode;
5783
-
5784
- jQuery( this ).remove();
5785
-
5786
- if ( next ) {
5787
- jQuery(next).before( value );
5788
- } else {
5789
- jQuery(parent).append( value );
5790
- }
5791
- });
5792
- } else {
5793
- return this.length ?
5794
- this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) :
5795
- this;
5796
- }
5797
- },
5798
-
5799
- detach: function( selector ) {
5800
- return this.remove( selector, true );
5801
- },
5802
-
5803
- domManip: function( args, table, callback ) {
5804
- var results, first, fragment, parent,
5805
- value = args[0],
5806
- scripts = [];
5807
-
5808
- // We can't cloneNode fragments that contain checked, in WebKit
5809
- if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
5810
- return this.each(function() {
5811
- jQuery(this).domManip( args, table, callback, true );
5812
- });
5813
- }
5814
-
5815
- if ( jQuery.isFunction(value) ) {
5816
- return this.each(function(i) {
5817
- var self = jQuery(this);
5818
- args[0] = value.call(this, i, table ? self.html() : undefined);
5819
- self.domManip( args, table, callback );
5820
- });
5821
- }
5822
-
5823
- if ( this[0] ) {
5824
- parent = value && value.parentNode;
5825
-
5826
- // If we're in a fragment, just use that instead of building a new one
5827
- if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
5828
- results = { fragment: parent };
5829
-
5830
- } else {
5831
- results = jQuery.buildFragment( args, this, scripts );
5832
- }
5833
-
5834
- fragment = results.fragment;
5835
-
5836
- if ( fragment.childNodes.length === 1 ) {
5837
- first = fragment = fragment.firstChild;
5838
- } else {
5839
- first = fragment.firstChild;
5840
- }
5841
-
5842
- if ( first ) {
5843
- table = table && jQuery.nodeName( first, "tr" );
5844
-
5845
- for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) {
5846
- callback.call(
5847
- table ?
5848
- root(this[i], first) :
5849
- this[i],
5850
- // Make sure that we do not leak memory by inadvertently discarding
5851
- // the original fragment (which might have attached data) instead of
5852
- // using it; in addition, use the original fragment object for the last
5853
- // item instead of first because it can end up being emptied incorrectly
5854
- // in certain situations (Bug #8070).
5855
- // Fragments from the fragment cache must always be cloned and never used
5856
- // in place.
5857
- results.cacheable || (l > 1 && i < lastIndex) ?
5858
- jQuery.clone( fragment, true, true ) :
5859
- fragment
5860
- );
5861
- }
5862
- }
5863
-
5864
- if ( scripts.length ) {
5865
- jQuery.each( scripts, evalScript );
5866
- }
5867
- }
5868
-
5869
- return this;
5870
- }
5871
- });
5872
-
5873
- function root( elem, cur ) {
5874
- return jQuery.nodeName(elem, "table") ?
5875
- (elem.getElementsByTagName("tbody")[0] ||
5876
- elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
5877
- elem;
5878
- }
5879
-
5880
- function cloneCopyEvent( src, dest ) {
5881
-
5882
- if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
5883
- return;
5884
- }
5885
-
5886
- var internalKey = jQuery.expando,
5887
- oldData = jQuery.data( src ),
5888
- curData = jQuery.data( dest, oldData );
5889
-
5890
- // Switch to use the internal data object, if it exists, for the next
5891
- // stage of data copying
5892
- if ( (oldData = oldData[ internalKey ]) ) {
5893
- var events = oldData.events;
5894
- curData = curData[ internalKey ] = jQuery.extend({}, oldData);
5895
-
5896
- if ( events ) {
5897
- delete curData.handle;
5898
- curData.events = {};
5899
-
5900
- for ( var type in events ) {
5901
- for ( var i = 0, l = events[ type ].length; i < l; i++ ) {
5902
- jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data );
5903
- }
5904
- }
5905
- }
5906
- }
5907
- }
5908
-
5909
- function cloneFixAttributes( src, dest ) {
5910
- var nodeName;
5911
-
5912
- // We do not need to do anything for non-Elements
5913
- if ( dest.nodeType !== 1 ) {
5914
- return;
5915
- }
5916
-
5917
- // clearAttributes removes the attributes, which we don't want,
5918
- // but also removes the attachEvent events, which we *do* want
5919
- if ( dest.clearAttributes ) {
5920
- dest.clearAttributes();
5921
- }
5922
-
5923
- // mergeAttributes, in contrast, only merges back on the
5924
- // original attributes, not the events
5925
- if ( dest.mergeAttributes ) {
5926
- dest.mergeAttributes( src );
5927
- }
5928
-
5929
- nodeName = dest.nodeName.toLowerCase();
5930
-
5931
- // IE6-8 fail to clone children inside object elements that use
5932
- // the proprietary classid attribute value (rather than the type
5933
- // attribute) to identify the type of content to display
5934
- if ( nodeName === "object" ) {
5935
- dest.outerHTML = src.outerHTML;
5936
-
5937
- } else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) {
5938
- // IE6-8 fails to persist the checked state of a cloned checkbox
5939
- // or radio button. Worse, IE6-7 fail to give the cloned element
5940
- // a checked appearance if the defaultChecked value isn't also set
5941
- if ( src.checked ) {
5942
- dest.defaultChecked = dest.checked = src.checked;
5943
- }
5944
-
5945
- // IE6-7 get confused and end up setting the value of a cloned
5946
- // checkbox/radio button to an empty string instead of "on"
5947
- if ( dest.value !== src.value ) {
5948
- dest.value = src.value;
5949
- }
5950
-
5951
- // IE6-8 fails to return the selected option to the default selected
5952
- // state when cloning options
5953
- } else if ( nodeName === "option" ) {
5954
- dest.selected = src.defaultSelected;
5955
-
5956
- // IE6-8 fails to set the defaultValue to the correct value when
5957
- // cloning other types of input fields
5958
- } else if ( nodeName === "input" || nodeName === "textarea" ) {
5959
- dest.defaultValue = src.defaultValue;
5960
- }
5961
-
5962
- // Event data gets referenced instead of copied if the expando
5963
- // gets copied too
5964
- dest.removeAttribute( jQuery.expando );
5965
- }
5966
-
5967
- jQuery.buildFragment = function( args, nodes, scripts ) {
5968
- var fragment, cacheable, cacheresults, doc;
5969
-
5970
- // nodes may contain either an explicit document object,
5971
- // a jQuery collection or context object.
5972
- // If nodes[0] contains a valid object to assign to doc
5973
- if ( nodes && nodes[0] ) {
5974
- doc = nodes[0].ownerDocument || nodes[0];
5975
- }
5976
-
5977
- // Ensure that an attr object doesn't incorrectly stand in as a document object
5978
- // Chrome and Firefox seem to allow this to occur and will throw exception
5979
- // Fixes #8950
5980
- if ( !doc.createDocumentFragment ) {
5981
- doc = document;
5982
- }
5983
-
5984
- // Only cache "small" (1/2 KB) HTML strings that are associated with the main document
5985
- // Cloning options loses the selected state, so don't cache them
5986
- // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
5987
- // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
5988
- if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && doc === document &&
5989
- args[0].charAt(0) === "<" && !rnocache.test( args[0] ) && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) {
5990
-
5991
- cacheable = true;
5992
-
5993
- cacheresults = jQuery.fragments[ args[0] ];
5994
- if ( cacheresults && cacheresults !== 1 ) {
5995
- fragment = cacheresults;
5996
- }
5997
- }
5998
-
5999
- if ( !fragment ) {
6000
- fragment = doc.createDocumentFragment();
6001
- jQuery.clean( args, doc, fragment, scripts );
6002
- }
6003
-
6004
- if ( cacheable ) {
6005
- jQuery.fragments[ args[0] ] = cacheresults ? fragment : 1;
6006
- }
6007
-
6008
- return { fragment: fragment, cacheable: cacheable };
6009
- };
6010
-
6011
- jQuery.fragments = {};
6012
-
6013
- jQuery.each({
6014
- appendTo: "append",
6015
- prependTo: "prepend",
6016
- insertBefore: "before",
6017
- insertAfter: "after",
6018
- replaceAll: "replaceWith"
6019
- }, function( name, original ) {
6020
- jQuery.fn[ name ] = function( selector ) {
6021
- var ret = [],
6022
- insert = jQuery( selector ),
6023
- parent = this.length === 1 && this[0].parentNode;
6024
-
6025
- if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
6026
- insert[ original ]( this[0] );
6027
- return this;
6028
-
6029
- } else {
6030
- for ( var i = 0, l = insert.length; i < l; i++ ) {
6031
- var elems = (i > 0 ? this.clone(true) : this).get();
6032
- jQuery( insert[i] )[ original ]( elems );
6033
- ret = ret.concat( elems );
6034
- }
6035
-
6036
- return this.pushStack( ret, name, insert.selector );
6037
- }
6038
- };
6039
- });
6040
-
6041
- function getAll( elem ) {
6042
- if ( "getElementsByTagName" in elem ) {
6043
- return elem.getElementsByTagName( "*" );
6044
-
6045
- } else if ( "querySelectorAll" in elem ) {
6046
- return elem.querySelectorAll( "*" );
6047
-
6048
- } else {
6049
- return [];
6050
- }
6051
- }
6052
-
6053
- // Used in clean, fixes the defaultChecked property
6054
- function fixDefaultChecked( elem ) {
6055
- if ( elem.type === "checkbox" || elem.type === "radio" ) {
6056
- elem.defaultChecked = elem.checked;
6057
- }
6058
- }
6059
- // Finds all inputs and passes them to fixDefaultChecked
6060
- function findInputs( elem ) {
6061
- if ( jQuery.nodeName( elem, "input" ) ) {
6062
- fixDefaultChecked( elem );
6063
- } else if ( "getElementsByTagName" in elem ) {
6064
- jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
6065
- }
6066
- }
6067
-
6068
- jQuery.extend({
6069
- clone: function( elem, dataAndEvents, deepDataAndEvents ) {
6070
- var clone = elem.cloneNode(true),
6071
- srcElements,
6072
- destElements,
6073
- i;
6074
-
6075
- if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
6076
- (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
6077
- // IE copies events bound via attachEvent when using cloneNode.
6078
- // Calling detachEvent on the clone will also remove the events
6079
- // from the original. In order to get around this, we use some
6080
- // proprietary methods to clear the events. Thanks to MooTools
6081
- // guys for this hotness.
6082
-
6083
- cloneFixAttributes( elem, clone );
6084
-
6085
- // Using Sizzle here is crazy slow, so we use getElementsByTagName
6086
- // instead
6087
- srcElements = getAll( elem );
6088
- destElements = getAll( clone );
6089
-
6090
- // Weird iteration because IE will replace the length property
6091
- // with an element if you are cloning the body and one of the
6092
- // elements on the page has a name or id of "length"
6093
- for ( i = 0; srcElements[i]; ++i ) {
6094
- // Ensure that the destination node is not null; Fixes #9587
6095
- if ( destElements[i] ) {
6096
- cloneFixAttributes( srcElements[i], destElements[i] );
6097
- }
6098
- }
6099
- }
6100
-
6101
- // Copy the events from the original to the clone
6102
- if ( dataAndEvents ) {
6103
- cloneCopyEvent( elem, clone );
6104
-
6105
- if ( deepDataAndEvents ) {
6106
- srcElements = getAll( elem );
6107
- destElements = getAll( clone );
6108
-
6109
- for ( i = 0; srcElements[i]; ++i ) {
6110
- cloneCopyEvent( srcElements[i], destElements[i] );
6111
- }
6112
- }
6113
- }
6114
-
6115
- srcElements = destElements = null;
6116
-
6117
- // Return the cloned set
6118
- return clone;
6119
- },
6120
-
6121
- clean: function( elems, context, fragment, scripts ) {
6122
- var checkScriptType;
6123
-
6124
- context = context || document;
6125
-
6126
- // !context.createElement fails in IE with an error but returns typeof 'object'
6127
- if ( typeof context.createElement === "undefined" ) {
6128
- context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
6129
- }
6130
-
6131
- var ret = [], j;
6132
-
6133
- for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
6134
- if ( typeof elem === "number" ) {
6135
- elem += "";
6136
- }
6137
-
6138
- if ( !elem ) {
6139
- continue;
6140
- }
6141
-
6142
- // Convert html string into DOM nodes
6143
- if ( typeof elem === "string" ) {
6144
- if ( !rhtml.test( elem ) ) {
6145
- elem = context.createTextNode( elem );
6146
- } else {
6147
- // Fix "XHTML"-style tags in all browsers
6148
- elem = elem.replace(rxhtmlTag, "<$1></$2>");
6149
-
6150
- // Trim whitespace, otherwise indexOf won't work as expected
6151
- var tag = (rtagName.exec( elem ) || ["", ""])[1].toLowerCase(),
6152
- wrap = wrapMap[ tag ] || wrapMap._default,
6153
- depth = wrap[0],
6154
- div = context.createElement("div");
6155
-
6156
- // Go to html and back, then peel off extra wrappers
6157
- div.innerHTML = wrap[1] + elem + wrap[2];
6158
-
6159
- // Move to the right depth
6160
- while ( depth-- ) {
6161
- div = div.lastChild;
6162
- }
6163
-
6164
- // Remove IE's autoinserted <tbody> from table fragments
6165
- if ( !jQuery.support.tbody ) {
6166
-
6167
- // String was a <table>, *may* have spurious <tbody>
6168
- var hasBody = rtbody.test(elem),
6169
- tbody = tag === "table" && !hasBody ?
6170
- div.firstChild && div.firstChild.childNodes :
6171
-
6172
- // String was a bare <thead> or <tfoot>
6173
- wrap[1] === "<table>" && !hasBody ?
6174
- div.childNodes :
6175
- [];
6176
-
6177
- for ( j = tbody.length - 1; j >= 0 ; --j ) {
6178
- if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
6179
- tbody[ j ].parentNode.removeChild( tbody[ j ] );
6180
- }
6181
- }
6182
- }
6183
-
6184
- // IE completely kills leading whitespace when innerHTML is used
6185
- if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
6186
- div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
6187
- }
6188
-
6189
- elem = div.childNodes;
6190
- }
6191
- }
6192
-
6193
- // Resets defaultChecked for any radios and checkboxes
6194
- // about to be appended to the DOM in IE 6/7 (#8060)
6195
- var len;
6196
- if ( !jQuery.support.appendChecked ) {
6197
- if ( elem[0] && typeof (len = elem.length) === "number" ) {
6198
- for ( j = 0; j < len; j++ ) {
6199
- findInputs( elem[j] );
6200
- }
6201
- } else {
6202
- findInputs( elem );
6203
- }
6204
- }
6205
-
6206
- if ( elem.nodeType ) {
6207
- ret.push( elem );
6208
- } else {
6209
- ret = jQuery.merge( ret, elem );
6210
- }
6211
- }
6212
-
6213
- if ( fragment ) {
6214
- checkScriptType = function( elem ) {
6215
- return !elem.type || rscriptType.test( elem.type );
6216
- };
6217
- for ( i = 0; ret[i]; i++ ) {
6218
- if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
6219
- scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
6220
-
6221
- } else {
6222
- if ( ret[i].nodeType === 1 ) {
6223
- var jsTags = jQuery.grep( ret[i].getElementsByTagName( "script" ), checkScriptType );
6224
-
6225
- ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
6226
- }
6227
- fragment.appendChild( ret[i] );
6228
- }
6229
- }
6230
- }
6231
-
6232
- return ret;
6233
- },
6234
-
6235
- cleanData: function( elems ) {
6236
- var data, id, cache = jQuery.cache, internalKey = jQuery.expando, special = jQuery.event.special,
6237
- deleteExpando = jQuery.support.deleteExpando;
6238
-
6239
- for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
6240
- if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
6241
- continue;
6242
- }
6243
-
6244
- id = elem[ jQuery.expando ];
6245
-
6246
- if ( id ) {
6247
- data = cache[ id ] && cache[ id ][ internalKey ];
6248
-
6249
- if ( data && data.events ) {
6250
- for ( var type in data.events ) {
6251
- if ( special[ type ] ) {
6252
- jQuery.event.remove( elem, type );
6253
-
6254
- // This is a shortcut to avoid jQuery.event.remove's overhead
6255
- } else {
6256
- jQuery.removeEvent( elem, type, data.handle );
6257
- }
6258
- }
6259
-
6260
- // Null the DOM reference to avoid IE6/7/8 leak (#7054)
6261
- if ( data.handle ) {
6262
- data.handle.elem = null;
6263
- }
6264
- }
6265
-
6266
- if ( deleteExpando ) {
6267
- delete elem[ jQuery.expando ];
6268
-
6269
- } else if ( elem.removeAttribute ) {
6270
- elem.removeAttribute( jQuery.expando );
6271
- }
6272
-
6273
- delete cache[ id ];
6274
- }
6275
- }
6276
- }
6277
- });
6278
-
6279
- function evalScript( i, elem ) {
6280
- if ( elem.src ) {
6281
- jQuery.ajax({
6282
- url: elem.src,
6283
- async: false,
6284
- dataType: "script"
6285
- });
6286
- } else {
6287
- jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) );
6288
- }
6289
-
6290
- if ( elem.parentNode ) {
6291
- elem.parentNode.removeChild( elem );
6292
- }
6293
- }
6294
-
6295
-
6296
-
6297
-
6298
- var ralpha = /alpha\([^)]*\)/i,
6299
- ropacity = /opacity=([^)]*)/,
6300
- // fixed for IE9, see #8346
6301
- rupper = /([A-Z]|^ms)/g,
6302
- rnumpx = /^-?\d+(?:px)?$/i,
6303
- rnum = /^-?\d/,
6304
- rrelNum = /^([\-+])=([\-+.\de]+)/,
6305
-
6306
- cssShow = { position: "absolute", visibility: "hidden", display: "block" },
6307
- cssWidth = [ "Left", "Right" ],
6308
- cssHeight = [ "Top", "Bottom" ],
6309
- curCSS,
6310
-
6311
- getComputedStyle,
6312
- currentStyle;
6313
-
6314
- jQuery.fn.css = function( name, value ) {
6315
- // Setting 'undefined' is a no-op
6316
- if ( arguments.length === 2 && value === undefined ) {
6317
- return this;
6318
- }
6319
-
6320
- return jQuery.access( this, name, value, true, function( elem, name, value ) {
6321
- return value !== undefined ?
6322
- jQuery.style( elem, name, value ) :
6323
- jQuery.css( elem, name );
6324
- });
6325
- };
6326
-
6327
- jQuery.extend({
6328
- // Add in style property hooks for overriding the default
6329
- // behavior of getting and setting a style property
6330
- cssHooks: {
6331
- opacity: {
6332
- get: function( elem, computed ) {
6333
- if ( computed ) {
6334
- // We should always get a number back from opacity
6335
- var ret = curCSS( elem, "opacity", "opacity" );
6336
- return ret === "" ? "1" : ret;
6337
-
6338
- } else {
6339
- return elem.style.opacity;
6340
- }
6341
- }
6342
- }
6343
- },
6344
-
6345
- // Exclude the following css properties to add px
6346
- cssNumber: {
6347
- "fillOpacity": true,
6348
- "fontWeight": true,
6349
- "lineHeight": true,
6350
- "opacity": true,
6351
- "orphans": true,
6352
- "widows": true,
6353
- "zIndex": true,
6354
- "zoom": true
6355
- },
6356
-
6357
- // Add in properties whose names you wish to fix before
6358
- // setting or getting the value
6359
- cssProps: {
6360
- // normalize float css property
6361
- "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
6362
- },
6363
-
6364
- // Get and set the style property on a DOM Node
6365
- style: function( elem, name, value, extra ) {
6366
- // Don't set styles on text and comment nodes
6367
- if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
6368
- return;
6369
- }
6370
-
6371
- // Make sure that we're working with the right name
6372
- var ret, type, origName = jQuery.camelCase( name ),
6373
- style = elem.style, hooks = jQuery.cssHooks[ origName ];
6374
-
6375
- name = jQuery.cssProps[ origName ] || origName;
6376
-
6377
- // Check if we're setting a value
6378
- if ( value !== undefined ) {
6379
- type = typeof value;
6380
-
6381
- // convert relative number strings (+= or -=) to relative numbers. #7345
6382
- if ( type === "string" && (ret = rrelNum.exec( value )) ) {
6383
- value = ( +( ret[1] + 1) * +ret[2] ) + parseFloat( jQuery.css( elem, name ) );
6384
- // Fixes bug #9237
6385
- type = "number";
6386
- }
6387
-
6388
- // Make sure that NaN and null values aren't set. See: #7116
6389
- if ( value == null || type === "number" && isNaN( value ) ) {
6390
- return;
6391
- }
6392
-
6393
- // If a number was passed in, add 'px' to the (except for certain CSS properties)
6394
- if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
6395
- value += "px";
6396
- }
6397
-
6398
- // If a hook was provided, use that value, otherwise just set the specified value
6399
- if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
6400
- // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
6401
- // Fixes bug #5509
6402
- try {
6403
- style[ name ] = value;
6404
- } catch(e) {}
6405
- }
6406
-
6407
- } else {
6408
- // If a hook was provided get the non-computed value from there
6409
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
6410
- return ret;
6411
- }
6412
-
6413
- // Otherwise just get the value from the style object
6414
- return style[ name ];
6415
- }
6416
- },
6417
-
6418
- css: function( elem, name, extra ) {
6419
- var ret, hooks;
6420
-
6421
- // Make sure that we're working with the right name
6422
- name = jQuery.camelCase( name );
6423
- hooks = jQuery.cssHooks[ name ];
6424
- name = jQuery.cssProps[ name ] || name;
6425
-
6426
- // cssFloat needs a special treatment
6427
- if ( name === "cssFloat" ) {
6428
- name = "float";
6429
- }
6430
-
6431
- // If a hook was provided get the computed value from there
6432
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
6433
- return ret;
6434
-
6435
- // Otherwise, if a way to get the computed value exists, use that
6436
- } else if ( curCSS ) {
6437
- return curCSS( elem, name );
6438
- }
6439
- },
6440
-
6441
- // A method for quickly swapping in/out CSS properties to get correct calculations
6442
- swap: function( elem, options, callback ) {
6443
- var old = {};
6444
-
6445
- // Remember the old values, and insert the new ones
6446
- for ( var name in options ) {
6447
- old[ name ] = elem.style[ name ];
6448
- elem.style[ name ] = options[ name ];
6449
- }
6450
-
6451
- callback.call( elem );
6452
-
6453
- // Revert the old values
6454
- for ( name in options ) {
6455
- elem.style[ name ] = old[ name ];
6456
- }
6457
- }
6458
- });
6459
-
6460
- // DEPRECATED, Use jQuery.css() instead
6461
- jQuery.curCSS = jQuery.css;
6462
-
6463
- jQuery.each(["height", "width"], function( i, name ) {
6464
- jQuery.cssHooks[ name ] = {
6465
- get: function( elem, computed, extra ) {
6466
- var val;
6467
-
6468
- if ( computed ) {
6469
- if ( elem.offsetWidth !== 0 ) {
6470
- return getWH( elem, name, extra );
6471
- } else {
6472
- jQuery.swap( elem, cssShow, function() {
6473
- val = getWH( elem, name, extra );
6474
- });
6475
- }
6476
-
6477
- return val;
6478
- }
6479
- },
6480
-
6481
- set: function( elem, value ) {
6482
- if ( rnumpx.test( value ) ) {
6483
- // ignore negative width and height values #1599
6484
- value = parseFloat( value );
6485
-
6486
- if ( value >= 0 ) {
6487
- return value + "px";
6488
- }
6489
-
6490
- } else {
6491
- return value;
6492
- }
6493
- }
6494
- };
6495
- });
6496
-
6497
- if ( !jQuery.support.opacity ) {
6498
- jQuery.cssHooks.opacity = {
6499
- get: function( elem, computed ) {
6500
- // IE uses filters for opacity
6501
- return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
6502
- ( parseFloat( RegExp.$1 ) / 100 ) + "" :
6503
- computed ? "1" : "";
6504
- },
6505
-
6506
- set: function( elem, value ) {
6507
- var style = elem.style,
6508
- currentStyle = elem.currentStyle,
6509
- opacity = jQuery.isNaN( value ) ? "" : "alpha(opacity=" + value * 100 + ")",
6510
- filter = currentStyle && currentStyle.filter || style.filter || "";
6511
-
6512
- // IE has trouble with opacity if it does not have layout
6513
- // Force it by setting the zoom level
6514
- style.zoom = 1;
6515
-
6516
- // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
6517
- if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" ) {
6518
-
6519
- // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
6520
- // if "filter:" is present at all, clearType is disabled, we want to avoid this
6521
- // style.removeAttribute is IE Only, but so apparently is this code path...
6522
- style.removeAttribute( "filter" );
6523
-
6524
- // if there there is no filter style applied in a css rule, we are done
6525
- if ( currentStyle && !currentStyle.filter ) {
6526
- return;
6527
- }
6528
- }
6529
-
6530
- // otherwise, set new filter values
6531
- style.filter = ralpha.test( filter ) ?
6532
- filter.replace( ralpha, opacity ) :
6533
- filter + " " + opacity;
6534
- }
6535
- };
6536
- }
6537
-
6538
- jQuery(function() {
6539
- // This hook cannot be added until DOM ready because the support test
6540
- // for it is not run until after DOM ready
6541
- if ( !jQuery.support.reliableMarginRight ) {
6542
- jQuery.cssHooks.marginRight = {
6543
- get: function( elem, computed ) {
6544
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
6545
- // Work around by temporarily setting element display to inline-block
6546
- var ret;
6547
- jQuery.swap( elem, { "display": "inline-block" }, function() {
6548
- if ( computed ) {
6549
- ret = curCSS( elem, "margin-right", "marginRight" );
6550
- } else {
6551
- ret = elem.style.marginRight;
6552
- }
6553
- });
6554
- return ret;
6555
- }
6556
- };
6557
- }
6558
- });
6559
-
6560
- if ( document.defaultView && document.defaultView.getComputedStyle ) {
6561
- getComputedStyle = function( elem, name ) {
6562
- var ret, defaultView, computedStyle;
6563
-
6564
- name = name.replace( rupper, "-$1" ).toLowerCase();
6565
-
6566
- if ( !(defaultView = elem.ownerDocument.defaultView) ) {
6567
- return undefined;
6568
- }
6569
-
6570
- if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
6571
- ret = computedStyle.getPropertyValue( name );
6572
- if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
6573
- ret = jQuery.style( elem, name );
6574
- }
6575
- }
6576
-
6577
- return ret;
6578
- };
6579
- }
6580
-
6581
- if ( document.documentElement.currentStyle ) {
6582
- currentStyle = function( elem, name ) {
6583
- var left,
6584
- ret = elem.currentStyle && elem.currentStyle[ name ],
6585
- rsLeft = elem.runtimeStyle && elem.runtimeStyle[ name ],
6586
- style = elem.style;
6587
-
6588
- // From the awesome hack by Dean Edwards
6589
- // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
6590
-
6591
- // If we're not dealing with a regular pixel number
6592
- // but a number that has a weird ending, we need to convert it to pixels
6593
- if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
6594
- // Remember the original values
6595
- left = style.left;
6596
-
6597
- // Put in the new values to get a computed value out
6598
- if ( rsLeft ) {
6599
- elem.runtimeStyle.left = elem.currentStyle.left;
6600
- }
6601
- style.left = name === "fontSize" ? "1em" : (ret || 0);
6602
- ret = style.pixelLeft + "px";
6603
-
6604
- // Revert the changed values
6605
- style.left = left;
6606
- if ( rsLeft ) {
6607
- elem.runtimeStyle.left = rsLeft;
6608
- }
6609
- }
6610
-
6611
- return ret === "" ? "auto" : ret;
6612
- };
6613
- }
6614
-
6615
- curCSS = getComputedStyle || currentStyle;
6616
-
6617
- function getWH( elem, name, extra ) {
6618
-
6619
- // Start with offset property
6620
- var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
6621
- which = name === "width" ? cssWidth : cssHeight;
6622
-
6623
- if ( val > 0 ) {
6624
- if ( extra !== "border" ) {
6625
- jQuery.each( which, function() {
6626
- if ( !extra ) {
6627
- val -= parseFloat( jQuery.css( elem, "padding" + this ) ) || 0;
6628
- }
6629
- if ( extra === "margin" ) {
6630
- val += parseFloat( jQuery.css( elem, extra + this ) ) || 0;
6631
- } else {
6632
- val -= parseFloat( jQuery.css( elem, "border" + this + "Width" ) ) || 0;
6633
- }
6634
- });
6635
- }
6636
-
6637
- return val + "px";
6638
- }
6639
-
6640
- // Fall back to computed then uncomputed css if necessary
6641
- val = curCSS( elem, name, name );
6642
- if ( val < 0 || val == null ) {
6643
- val = elem.style[ name ] || 0;
6644
- }
6645
- // Normalize "", auto, and prepare for extra
6646
- val = parseFloat( val ) || 0;
6647
-
6648
- // Add padding, border, margin
6649
- if ( extra ) {
6650
- jQuery.each( which, function() {
6651
- val += parseFloat( jQuery.css( elem, "padding" + this ) ) || 0;
6652
- if ( extra !== "padding" ) {
6653
- val += parseFloat( jQuery.css( elem, "border" + this + "Width" ) ) || 0;
6654
- }
6655
- if ( extra === "margin" ) {
6656
- val += parseFloat( jQuery.css( elem, extra + this ) ) || 0;
6657
- }
6658
- });
6659
- }
6660
-
6661
- return val + "px";
6662
- }
6663
-
6664
- if ( jQuery.expr && jQuery.expr.filters ) {
6665
- jQuery.expr.filters.hidden = function( elem ) {
6666
- var width = elem.offsetWidth,
6667
- height = elem.offsetHeight;
6668
-
6669
- return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && (elem.style.display || jQuery.css( elem, "display" )) === "none");
6670
- };
6671
-
6672
- jQuery.expr.filters.visible = function( elem ) {
6673
- return !jQuery.expr.filters.hidden( elem );
6674
- };
6675
- }
6676
-
6677
-
6678
-
6679
-
6680
- var r20 = /%20/g,
6681
- rbracket = /\[\]$/,
6682
- rCRLF = /\r?\n/g,
6683
- rhash = /#.*$/,
6684
- rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
6685
- rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
6686
- // #7653, #8125, #8152: local protocol detection
6687
- rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
6688
- rnoContent = /^(?:GET|HEAD)$/,
6689
- rprotocol = /^\/\//,
6690
- rquery = /\?/,
6691
- rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
6692
- rselectTextarea = /^(?:select|textarea)/i,
6693
- rspacesAjax = /\s+/,
6694
- rts = /([?&])_=[^&]*/,
6695
- rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
6696
-
6697
- // Keep a copy of the old load method
6698
- _load = jQuery.fn.load,
6699
-
6700
- /* Prefilters
6701
- * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
6702
- * 2) These are called:
6703
- * - BEFORE asking for a transport
6704
- * - AFTER param serialization (s.data is a string if s.processData is true)
6705
- * 3) key is the dataType
6706
- * 4) the catchall symbol "*" can be used
6707
- * 5) execution will start with transport dataType and THEN continue down to "*" if needed
6708
- */
6709
- prefilters = {},
6710
-
6711
- /* Transports bindings
6712
- * 1) key is the dataType
6713
- * 2) the catchall symbol "*" can be used
6714
- * 3) selection will start with transport dataType and THEN go to "*" if needed
6715
- */
6716
- transports = {},
6717
-
6718
- // Document location
6719
- ajaxLocation,
6720
-
6721
- // Document location segments
6722
- ajaxLocParts,
6723
-
6724
- // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
6725
- allTypes = ["*/"] + ["*"];
6726
-
6727
- // #8138, IE may throw an exception when accessing
6728
- // a field from window.location if document.domain has been set
6729
- try {
6730
- ajaxLocation = location.href;
6731
- } catch( e ) {
6732
- // Use the href attribute of an A element
6733
- // since IE will modify it given document.location
6734
- ajaxLocation = document.createElement( "a" );
6735
- ajaxLocation.href = "";
6736
- ajaxLocation = ajaxLocation.href;
6737
- }
6738
-
6739
- // Segment location into parts
6740
- ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
6741
-
6742
- // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
6743
- function addToPrefiltersOrTransports( structure ) {
6744
-
6745
- // dataTypeExpression is optional and defaults to "*"
6746
- return function( dataTypeExpression, func ) {
6747
-
6748
- if ( typeof dataTypeExpression !== "string" ) {
6749
- func = dataTypeExpression;
6750
- dataTypeExpression = "*";
6751
- }
6752
-
6753
- if ( jQuery.isFunction( func ) ) {
6754
- var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
6755
- i = 0,
6756
- length = dataTypes.length,
6757
- dataType,
6758
- list,
6759
- placeBefore;
6760
-
6761
- // For each dataType in the dataTypeExpression
6762
- for(; i < length; i++ ) {
6763
- dataType = dataTypes[ i ];
6764
- // We control if we're asked to add before
6765
- // any existing element
6766
- placeBefore = /^\+/.test( dataType );
6767
- if ( placeBefore ) {
6768
- dataType = dataType.substr( 1 ) || "*";
6769
- }
6770
- list = structure[ dataType ] = structure[ dataType ] || [];
6771
- // then we add to the structure accordingly
6772
- list[ placeBefore ? "unshift" : "push" ]( func );
6773
- }
6774
- }
6775
- };
6776
- }
6777
-
6778
- // Base inspection function for prefilters and transports
6779
- function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
6780
- dataType /* internal */, inspected /* internal */ ) {
6781
-
6782
- dataType = dataType || options.dataTypes[ 0 ];
6783
- inspected = inspected || {};
6784
-
6785
- inspected[ dataType ] = true;
6786
-
6787
- var list = structure[ dataType ],
6788
- i = 0,
6789
- length = list ? list.length : 0,
6790
- executeOnly = ( structure === prefilters ),
6791
- selection;
6792
-
6793
- for(; i < length && ( executeOnly || !selection ); i++ ) {
6794
- selection = list[ i ]( options, originalOptions, jqXHR );
6795
- // If we got redirected to another dataType
6796
- // we try there if executing only and not done already
6797
- if ( typeof selection === "string" ) {
6798
- if ( !executeOnly || inspected[ selection ] ) {
6799
- selection = undefined;
6800
- } else {
6801
- options.dataTypes.unshift( selection );
6802
- selection = inspectPrefiltersOrTransports(
6803
- structure, options, originalOptions, jqXHR, selection, inspected );
6804
- }
6805
- }
6806
- }
6807
- // If we're only executing or nothing was selected
6808
- // we try the catchall dataType if not done already
6809
- if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
6810
- selection = inspectPrefiltersOrTransports(
6811
- structure, options, originalOptions, jqXHR, "*", inspected );
6812
- }
6813
- // unnecessary when only executing (prefilters)
6814
- // but it'll be ignored by the caller in that case
6815
- return selection;
6816
- }
6817
-
6818
- // A special extend for ajax options
6819
- // that takes "flat" options (not to be deep extended)
6820
- // Fixes #9887
6821
- function ajaxExtend( target, src ) {
6822
- var key, deep,
6823
- flatOptions = jQuery.ajaxSettings.flatOptions || {};
6824
- for( key in src ) {
6825
- if ( src[ key ] !== undefined ) {
6826
- ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
6827
- }
6828
- }
6829
- if ( deep ) {
6830
- jQuery.extend( true, target, deep );
6831
- }
6832
- }
6833
-
6834
- jQuery.fn.extend({
6835
- load: function( url, params, callback ) {
6836
- if ( typeof url !== "string" && _load ) {
6837
- return _load.apply( this, arguments );
6838
-
6839
- // Don't do a request if no elements are being requested
6840
- } else if ( !this.length ) {
6841
- return this;
6842
- }
6843
-
6844
- var off = url.indexOf( " " );
6845
- if ( off >= 0 ) {
6846
- var selector = url.slice( off, url.length );
6847
- url = url.slice( 0, off );
6848
- }
6849
-
6850
- // Default to a GET request
6851
- var type = "GET";
6852
-
6853
- // If the second parameter was provided
6854
- if ( params ) {
6855
- // If it's a function
6856
- if ( jQuery.isFunction( params ) ) {
6857
- // We assume that it's the callback
6858
- callback = params;
6859
- params = undefined;
6860
-
6861
- // Otherwise, build a param string
6862
- } else if ( typeof params === "object" ) {
6863
- params = jQuery.param( params, jQuery.ajaxSettings.traditional );
6864
- type = "POST";
6865
- }
6866
- }
6867
-
6868
- var self = this;
6869
-
6870
- // Request the remote document
6871
- jQuery.ajax({
6872
- url: url,
6873
- type: type,
6874
- dataType: "html",
6875
- data: params,
6876
- // Complete callback (responseText is used internally)
6877
- complete: function( jqXHR, status, responseText ) {
6878
- // Store the response as specified by the jqXHR object
6879
- responseText = jqXHR.responseText;
6880
- // If successful, inject the HTML into all the matched elements
6881
- if ( jqXHR.isResolved() ) {
6882
- // #4825: Get the actual response in case
6883
- // a dataFilter is present in ajaxSettings
6884
- jqXHR.done(function( r ) {
6885
- responseText = r;
6886
- });
6887
- // See if a selector was specified
6888
- self.html( selector ?
6889
- // Create a dummy div to hold the results
6890
- jQuery("<div>")
6891
- // inject the contents of the document in, removing the scripts
6892
- // to avoid any 'Permission Denied' errors in IE
6893
- .append(responseText.replace(rscript, ""))
6894
-
6895
- // Locate the specified elements
6896
- .find(selector) :
6897
-
6898
- // If not, just inject the full result
6899
- responseText );
6900
- }
6901
-
6902
- if ( callback ) {
6903
- self.each( callback, [ responseText, status, jqXHR ] );
6904
- }
6905
- }
6906
- });
6907
-
6908
- return this;
6909
- },
6910
-
6911
- serialize: function() {
6912
- return jQuery.param( this.serializeArray() );
6913
- },
6914
-
6915
- serializeArray: function() {
6916
- return this.map(function(){
6917
- return this.elements ? jQuery.makeArray( this.elements ) : this;
6918
- })
6919
- .filter(function(){
6920
- return this.name && !this.disabled &&
6921
- ( this.checked || rselectTextarea.test( this.nodeName ) ||
6922
- rinput.test( this.type ) );
6923
- })
6924
- .map(function( i, elem ){
6925
- var val = jQuery( this ).val();
6926
-
6927
- return val == null ?
6928
- null :
6929
- jQuery.isArray( val ) ?
6930
- jQuery.map( val, function( val, i ){
6931
- return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
6932
- }) :
6933
- { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
6934
- }).get();
6935
- }
6936
- });
6937
-
6938
- // Attach a bunch of functions for handling common AJAX events
6939
- jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
6940
- jQuery.fn[ o ] = function( f ){
6941
- return this.bind( o, f );
6942
- };
6943
- });
6944
-
6945
- jQuery.each( [ "get", "post" ], function( i, method ) {
6946
- jQuery[ method ] = function( url, data, callback, type ) {
6947
- // shift arguments if data argument was omitted
6948
- if ( jQuery.isFunction( data ) ) {
6949
- type = type || callback;
6950
- callback = data;
6951
- data = undefined;
6952
- }
6953
-
6954
- return jQuery.ajax({
6955
- type: method,
6956
- url: url,
6957
- data: data,
6958
- success: callback,
6959
- dataType: type
6960
- });
6961
- };
6962
- });
6963
-
6964
- jQuery.extend({
6965
-
6966
- getScript: function( url, callback ) {
6967
- return jQuery.get( url, undefined, callback, "script" );
6968
- },
6969
-
6970
- getJSON: function( url, data, callback ) {
6971
- return jQuery.get( url, data, callback, "json" );
6972
- },
6973
-
6974
- // Creates a full fledged settings object into target
6975
- // with both ajaxSettings and settings fields.
6976
- // If target is omitted, writes into ajaxSettings.
6977
- ajaxSetup: function( target, settings ) {
6978
- if ( settings ) {
6979
- // Building a settings object
6980
- ajaxExtend( target, jQuery.ajaxSettings );
6981
- } else {
6982
- // Extending ajaxSettings
6983
- settings = target;
6984
- target = jQuery.ajaxSettings;
6985
- }
6986
- ajaxExtend( target, settings );
6987
- return target;
6988
- },
6989
-
6990
- ajaxSettings: {
6991
- url: ajaxLocation,
6992
- isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
6993
- global: true,
6994
- type: "GET",
6995
- contentType: "application/x-www-form-urlencoded",
6996
- processData: true,
6997
- async: true,
6998
- /*
6999
- timeout: 0,
7000
- data: null,
7001
- dataType: null,
7002
- username: null,
7003
- password: null,
7004
- cache: null,
7005
- traditional: false,
7006
- headers: {},
7007
- */
7008
-
7009
- accepts: {
7010
- xml: "application/xml, text/xml",
7011
- html: "text/html",
7012
- text: "text/plain",
7013
- json: "application/json, text/javascript",
7014
- "*": allTypes
7015
- },
7016
-
7017
- contents: {
7018
- xml: /xml/,
7019
- html: /html/,
7020
- json: /json/
7021
- },
7022
-
7023
- responseFields: {
7024
- xml: "responseXML",
7025
- text: "responseText"
7026
- },
7027
-
7028
- // List of data converters
7029
- // 1) key format is "source_type destination_type" (a single space in-between)
7030
- // 2) the catchall symbol "*" can be used for source_type
7031
- converters: {
7032
-
7033
- // Convert anything to text
7034
- "* text": window.String,
7035
-
7036
- // Text to html (true = no transformation)
7037
- "text html": true,
7038
-
7039
- // Evaluate text as a json expression
7040
- "text json": jQuery.parseJSON,
7041
-
7042
- // Parse text as xml
7043
- "text xml": jQuery.parseXML
7044
- },
7045
-
7046
- // For options that shouldn't be deep extended:
7047
- // you can add your own custom options here if
7048
- // and when you create one that shouldn't be
7049
- // deep extended (see ajaxExtend)
7050
- flatOptions: {
7051
- context: true,
7052
- url: true
7053
- }
7054
- },
7055
-
7056
- ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
7057
- ajaxTransport: addToPrefiltersOrTransports( transports ),
7058
-
7059
- // Main method
7060
- ajax: function( url, options ) {
7061
-
7062
- // If url is an object, simulate pre-1.5 signature
7063
- if ( typeof url === "object" ) {
7064
- options = url;
7065
- url = undefined;
7066
- }
7067
-
7068
- // Force options to be an object
7069
- options = options || {};
7070
-
7071
- var // Create the final options object
7072
- s = jQuery.ajaxSetup( {}, options ),
7073
- // Callbacks context
7074
- callbackContext = s.context || s,
7075
- // Context for global events
7076
- // It's the callbackContext if one was provided in the options
7077
- // and if it's a DOM node or a jQuery collection
7078
- globalEventContext = callbackContext !== s &&
7079
- ( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
7080
- jQuery( callbackContext ) : jQuery.event,
7081
- // Deferreds
7082
- deferred = jQuery.Deferred(),
7083
- completeDeferred = jQuery._Deferred(),
7084
- // Status-dependent callbacks
7085
- statusCode = s.statusCode || {},
7086
- // ifModified key
7087
- ifModifiedKey,
7088
- // Headers (they are sent all at once)
7089
- requestHeaders = {},
7090
- requestHeadersNames = {},
7091
- // Response headers
7092
- responseHeadersString,
7093
- responseHeaders,
7094
- // transport
7095
- transport,
7096
- // timeout handle
7097
- timeoutTimer,
7098
- // Cross-domain detection vars
7099
- parts,
7100
- // The jqXHR state
7101
- state = 0,
7102
- // To know if global events are to be dispatched
7103
- fireGlobals,
7104
- // Loop variable
7105
- i,
7106
- // Fake xhr
7107
- jqXHR = {
7108
-
7109
- readyState: 0,
7110
-
7111
- // Caches the header
7112
- setRequestHeader: function( name, value ) {
7113
- if ( !state ) {
7114
- var lname = name.toLowerCase();
7115
- name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
7116
- requestHeaders[ name ] = value;
7117
- }
7118
- return this;
7119
- },
7120
-
7121
- // Raw string
7122
- getAllResponseHeaders: function() {
7123
- return state === 2 ? responseHeadersString : null;
7124
- },
7125
-
7126
- // Builds headers hashtable if needed
7127
- getResponseHeader: function( key ) {
7128
- var match;
7129
- if ( state === 2 ) {
7130
- if ( !responseHeaders ) {
7131
- responseHeaders = {};
7132
- while( ( match = rheaders.exec( responseHeadersString ) ) ) {
7133
- responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
7134
- }
7135
- }
7136
- match = responseHeaders[ key.toLowerCase() ];
7137
- }
7138
- return match === undefined ? null : match;
7139
- },
7140
-
7141
- // Overrides response content-type header
7142
- overrideMimeType: function( type ) {
7143
- if ( !state ) {
7144
- s.mimeType = type;
7145
- }
7146
- return this;
7147
- },
7148
-
7149
- // Cancel the request
7150
- abort: function( statusText ) {
7151
- statusText = statusText || "abort";
7152
- if ( transport ) {
7153
- transport.abort( statusText );
7154
- }
7155
- done( 0, statusText );
7156
- return this;
7157
- }
7158
- };
7159
-
7160
- // Callback for when everything is done
7161
- // It is defined here because jslint complains if it is declared
7162
- // at the end of the function (which would be more logical and readable)
7163
- function done( status, nativeStatusText, responses, headers ) {
7164
-
7165
- // Called once
7166
- if ( state === 2 ) {
7167
- return;
7168
- }
7169
-
7170
- // State is "done" now
7171
- state = 2;
7172
-
7173
- // Clear timeout if it exists
7174
- if ( timeoutTimer ) {
7175
- clearTimeout( timeoutTimer );
7176
- }
7177
-
7178
- // Dereference transport for early garbage collection
7179
- // (no matter how long the jqXHR object will be used)
7180
- transport = undefined;
7181
-
7182
- // Cache response headers
7183
- responseHeadersString = headers || "";
7184
-
7185
- // Set readyState
7186
- jqXHR.readyState = status > 0 ? 4 : 0;
7187
-
7188
- var isSuccess,
7189
- success,
7190
- error,
7191
- statusText = nativeStatusText,
7192
- response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,
7193
- lastModified,
7194
- etag;
7195
-
7196
- // If successful, handle type chaining
7197
- if ( status >= 200 && status < 300 || status === 304 ) {
7198
-
7199
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
7200
- if ( s.ifModified ) {
7201
-
7202
- if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) {
7203
- jQuery.lastModified[ ifModifiedKey ] = lastModified;
7204
- }
7205
- if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) {
7206
- jQuery.etag[ ifModifiedKey ] = etag;
7207
- }
7208
- }
7209
-
7210
- // If not modified
7211
- if ( status === 304 ) {
7212
-
7213
- statusText = "notmodified";
7214
- isSuccess = true;
7215
-
7216
- // If we have data
7217
- } else {
7218
-
7219
- try {
7220
- success = ajaxConvert( s, response );
7221
- statusText = "success";
7222
- isSuccess = true;
7223
- } catch(e) {
7224
- // We have a parsererror
7225
- statusText = "parsererror";
7226
- error = e;
7227
- }
7228
- }
7229
- } else {
7230
- // We extract error from statusText
7231
- // then normalize statusText and status for non-aborts
7232
- error = statusText;
7233
- if( !statusText || status ) {
7234
- statusText = "error";
7235
- if ( status < 0 ) {
7236
- status = 0;
7237
- }
7238
- }
7239
- }
7240
-
7241
- // Set data for the fake xhr object
7242
- jqXHR.status = status;
7243
- jqXHR.statusText = "" + ( nativeStatusText || statusText );
7244
-
7245
- // Success/Error
7246
- if ( isSuccess ) {
7247
- deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
7248
- } else {
7249
- deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
7250
- }
7251
-
7252
- // Status-dependent callbacks
7253
- jqXHR.statusCode( statusCode );
7254
- statusCode = undefined;
7255
-
7256
- if ( fireGlobals ) {
7257
- globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
7258
- [ jqXHR, s, isSuccess ? success : error ] );
7259
- }
7260
-
7261
- // Complete
7262
- completeDeferred.resolveWith( callbackContext, [ jqXHR, statusText ] );
7263
-
7264
- if ( fireGlobals ) {
7265
- globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
7266
- // Handle the global AJAX counter
7267
- if ( !( --jQuery.active ) ) {
7268
- jQuery.event.trigger( "ajaxStop" );
7269
- }
7270
- }
7271
- }
7272
-
7273
- // Attach deferreds
7274
- deferred.promise( jqXHR );
7275
- jqXHR.success = jqXHR.done;
7276
- jqXHR.error = jqXHR.fail;
7277
- jqXHR.complete = completeDeferred.done;
7278
-
7279
- // Status-dependent callbacks
7280
- jqXHR.statusCode = function( map ) {
7281
- if ( map ) {
7282
- var tmp;
7283
- if ( state < 2 ) {
7284
- for( tmp in map ) {
7285
- statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
7286
- }
7287
- } else {
7288
- tmp = map[ jqXHR.status ];
7289
- jqXHR.then( tmp, tmp );
7290
- }
7291
- }
7292
- return this;
7293
- };
7294
-
7295
- // Remove hash character (#7531: and string promotion)
7296
- // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
7297
- // We also use the url parameter if available
7298
- s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
7299
-
7300
- // Extract dataTypes list
7301
- s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
7302
-
7303
- // Determine if a cross-domain request is in order
7304
- if ( s.crossDomain == null ) {
7305
- parts = rurl.exec( s.url.toLowerCase() );
7306
- s.crossDomain = !!( parts &&
7307
- ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||
7308
- ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
7309
- ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
7310
- );
7311
- }
7312
-
7313
- // Convert data if not already a string
7314
- if ( s.data && s.processData && typeof s.data !== "string" ) {
7315
- s.data = jQuery.param( s.data, s.traditional );
7316
- }
7317
-
7318
- // Apply prefilters
7319
- inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
7320
-
7321
- // If request was aborted inside a prefiler, stop there
7322
- if ( state === 2 ) {
7323
- return false;
7324
- }
7325
-
7326
- // We can fire global events as of now if asked to
7327
- fireGlobals = s.global;
7328
-
7329
- // Uppercase the type
7330
- s.type = s.type.toUpperCase();
7331
-
7332
- // Determine if request has content
7333
- s.hasContent = !rnoContent.test( s.type );
7334
-
7335
- // Watch for a new set of requests
7336
- if ( fireGlobals && jQuery.active++ === 0 ) {
7337
- jQuery.event.trigger( "ajaxStart" );
7338
- }
7339
-
7340
- // More options handling for requests with no content
7341
- if ( !s.hasContent ) {
7342
-
7343
- // If data is available, append data to url
7344
- if ( s.data ) {
7345
- s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
7346
- // #9682: remove data so that it's not used in an eventual retry
7347
- delete s.data;
7348
- }
7349
-
7350
- // Get ifModifiedKey before adding the anti-cache parameter
7351
- ifModifiedKey = s.url;
7352
-
7353
- // Add anti-cache in url if needed
7354
- if ( s.cache === false ) {
7355
-
7356
- var ts = jQuery.now(),
7357
- // try replacing _= if it is there
7358
- ret = s.url.replace( rts, "$1_=" + ts );
7359
-
7360
- // if nothing was replaced, add timestamp to the end
7361
- s.url = ret + ( (ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
7362
- }
7363
- }
7364
-
7365
- // Set the correct header, if data is being sent
7366
- if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
7367
- jqXHR.setRequestHeader( "Content-Type", s.contentType );
7368
- }
7369
-
7370
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
7371
- if ( s.ifModified ) {
7372
- ifModifiedKey = ifModifiedKey || s.url;
7373
- if ( jQuery.lastModified[ ifModifiedKey ] ) {
7374
- jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
7375
- }
7376
- if ( jQuery.etag[ ifModifiedKey ] ) {
7377
- jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );
7378
- }
7379
- }
7380
-
7381
- // Set the Accepts header for the server, depending on the dataType
7382
- jqXHR.setRequestHeader(
7383
- "Accept",
7384
- s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
7385
- s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
7386
- s.accepts[ "*" ]
7387
- );
7388
-
7389
- // Check for headers option
7390
- for ( i in s.headers ) {
7391
- jqXHR.setRequestHeader( i, s.headers[ i ] );
7392
- }
7393
-
7394
- // Allow custom headers/mimetypes and early abort
7395
- if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
7396
- // Abort if not done already
7397
- jqXHR.abort();
7398
- return false;
7399
-
7400
- }
7401
-
7402
- // Install callbacks on deferreds
7403
- for ( i in { success: 1, error: 1, complete: 1 } ) {
7404
- jqXHR[ i ]( s[ i ] );
7405
- }
7406
-
7407
- // Get transport
7408
- transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
7409
-
7410
- // If no transport, we auto-abort
7411
- if ( !transport ) {
7412
- done( -1, "No Transport" );
7413
- } else {
7414
- jqXHR.readyState = 1;
7415
- // Send global event
7416
- if ( fireGlobals ) {
7417
- globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
7418
- }
7419
- // Timeout
7420
- if ( s.async && s.timeout > 0 ) {
7421
- timeoutTimer = setTimeout( function(){
7422
- jqXHR.abort( "timeout" );
7423
- }, s.timeout );
7424
- }
7425
-
7426
- try {
7427
- state = 1;
7428
- transport.send( requestHeaders, done );
7429
- } catch (e) {
7430
- // Propagate exception as error if not done
7431
- if ( state < 2 ) {
7432
- done( -1, e );
7433
- // Simply rethrow otherwise
7434
- } else {
7435
- jQuery.error( e );
7436
- }
7437
- }
7438
- }
7439
-
7440
- return jqXHR;
7441
- },
7442
-
7443
- // Serialize an array of form elements or a set of
7444
- // key/values into a query string
7445
- param: function( a, traditional ) {
7446
- var s = [],
7447
- add = function( key, value ) {
7448
- // If value is a function, invoke it and return its value
7449
- value = jQuery.isFunction( value ) ? value() : value;
7450
- s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
7451
- };
7452
-
7453
- // Set traditional to true for jQuery <= 1.3.2 behavior.
7454
- if ( traditional === undefined ) {
7455
- traditional = jQuery.ajaxSettings.traditional;
7456
- }
7457
-
7458
- // If an array was passed in, assume that it is an array of form elements.
7459
- if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
7460
- // Serialize the form elements
7461
- jQuery.each( a, function() {
7462
- add( this.name, this.value );
7463
- });
7464
-
7465
- } else {
7466
- // If traditional, encode the "old" way (the way 1.3.2 or older
7467
- // did it), otherwise encode params recursively.
7468
- for ( var prefix in a ) {
7469
- buildParams( prefix, a[ prefix ], traditional, add );
7470
- }
7471
- }
7472
-
7473
- // Return the resulting serialization
7474
- return s.join( "&" ).replace( r20, "+" );
7475
- }
7476
- });
7477
-
7478
- function buildParams( prefix, obj, traditional, add ) {
7479
- if ( jQuery.isArray( obj ) ) {
7480
- // Serialize array item.
7481
- jQuery.each( obj, function( i, v ) {
7482
- if ( traditional || rbracket.test( prefix ) ) {
7483
- // Treat each array item as a scalar.
7484
- add( prefix, v );
7485
-
7486
- } else {
7487
- // If array item is non-scalar (array or object), encode its
7488
- // numeric index to resolve deserialization ambiguity issues.
7489
- // Note that rack (as of 1.0.0) can't currently deserialize
7490
- // nested arrays properly, and attempting to do so may cause
7491
- // a server error. Possible fixes are to modify rack's
7492
- // deserialization algorithm or to provide an option or flag
7493
- // to force array serialization to be shallow.
7494
- buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add );
7495
- }
7496
- });
7497
-
7498
- } else if ( !traditional && obj != null && typeof obj === "object" ) {
7499
- // Serialize object item.
7500
- for ( var name in obj ) {
7501
- buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
7502
- }
7503
-
7504
- } else {
7505
- // Serialize scalar item.
7506
- add( prefix, obj );
7507
- }
7508
- }
7509
-
7510
- // This is still on the jQuery object... for now
7511
- // Want to move this to jQuery.ajax some day
7512
- jQuery.extend({
7513
-
7514
- // Counter for holding the number of active queries
7515
- active: 0,
7516
-
7517
- // Last-Modified header cache for next request
7518
- lastModified: {},
7519
- etag: {}
7520
-
7521
- });
7522
-
7523
- /* Handles responses to an ajax request:
7524
- * - sets all responseXXX fields accordingly
7525
- * - finds the right dataType (mediates between content-type and expected dataType)
7526
- * - returns the corresponding response
7527
- */
7528
- function ajaxHandleResponses( s, jqXHR, responses ) {
7529
-
7530
- var contents = s.contents,
7531
- dataTypes = s.dataTypes,
7532
- responseFields = s.responseFields,
7533
- ct,
7534
- type,
7535
- finalDataType,
7536
- firstDataType;
7537
-
7538
- // Fill responseXXX fields
7539
- for( type in responseFields ) {
7540
- if ( type in responses ) {
7541
- jqXHR[ responseFields[type] ] = responses[ type ];
7542
- }
7543
- }
7544
-
7545
- // Remove auto dataType and get content-type in the process
7546
- while( dataTypes[ 0 ] === "*" ) {
7547
- dataTypes.shift();
7548
- if ( ct === undefined ) {
7549
- ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
7550
- }
7551
- }
7552
-
7553
- // Check if we're dealing with a known content-type
7554
- if ( ct ) {
7555
- for ( type in contents ) {
7556
- if ( contents[ type ] && contents[ type ].test( ct ) ) {
7557
- dataTypes.unshift( type );
7558
- break;
7559
- }
7560
- }
7561
- }
7562
-
7563
- // Check to see if we have a response for the expected dataType
7564
- if ( dataTypes[ 0 ] in responses ) {
7565
- finalDataType = dataTypes[ 0 ];
7566
- } else {
7567
- // Try convertible dataTypes
7568
- for ( type in responses ) {
7569
- if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
7570
- finalDataType = type;
7571
- break;
7572
- }
7573
- if ( !firstDataType ) {
7574
- firstDataType = type;
7575
- }
7576
- }
7577
- // Or just use first one
7578
- finalDataType = finalDataType || firstDataType;
7579
- }
7580
-
7581
- // If we found a dataType
7582
- // We add the dataType to the list if needed
7583
- // and return the corresponding response
7584
- if ( finalDataType ) {
7585
- if ( finalDataType !== dataTypes[ 0 ] ) {
7586
- dataTypes.unshift( finalDataType );
7587
- }
7588
- return responses[ finalDataType ];
7589
- }
7590
- }
7591
-
7592
- // Chain conversions given the request and the original response
7593
- function ajaxConvert( s, response ) {
7594
-
7595
- // Apply the dataFilter if provided
7596
- if ( s.dataFilter ) {
7597
- response = s.dataFilter( response, s.dataType );
7598
- }
7599
-
7600
- var dataTypes = s.dataTypes,
7601
- converters = {},
7602
- i,
7603
- key,
7604
- length = dataTypes.length,
7605
- tmp,
7606
- // Current and previous dataTypes
7607
- current = dataTypes[ 0 ],
7608
- prev,
7609
- // Conversion expression
7610
- conversion,
7611
- // Conversion function
7612
- conv,
7613
- // Conversion functions (transitive conversion)
7614
- conv1,
7615
- conv2;
7616
-
7617
- // For each dataType in the chain
7618
- for( i = 1; i < length; i++ ) {
7619
-
7620
- // Create converters map
7621
- // with lowercased keys
7622
- if ( i === 1 ) {
7623
- for( key in s.converters ) {
7624
- if( typeof key === "string" ) {
7625
- converters[ key.toLowerCase() ] = s.converters[ key ];
7626
- }
7627
- }
7628
- }
7629
-
7630
- // Get the dataTypes
7631
- prev = current;
7632
- current = dataTypes[ i ];
7633
-
7634
- // If current is auto dataType, update it to prev
7635
- if( current === "*" ) {
7636
- current = prev;
7637
- // If no auto and dataTypes are actually different
7638
- } else if ( prev !== "*" && prev !== current ) {
7639
-
7640
- // Get the converter
7641
- conversion = prev + " " + current;
7642
- conv = converters[ conversion ] || converters[ "* " + current ];
7643
-
7644
- // If there is no direct converter, search transitively
7645
- if ( !conv ) {
7646
- conv2 = undefined;
7647
- for( conv1 in converters ) {
7648
- tmp = conv1.split( " " );
7649
- if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) {
7650
- conv2 = converters[ tmp[1] + " " + current ];
7651
- if ( conv2 ) {
7652
- conv1 = converters[ conv1 ];
7653
- if ( conv1 === true ) {
7654
- conv = conv2;
7655
- } else if ( conv2 === true ) {
7656
- conv = conv1;
7657
- }
7658
- break;
7659
- }
7660
- }
7661
- }
7662
- }
7663
- // If we found no converter, dispatch an error
7664
- if ( !( conv || conv2 ) ) {
7665
- jQuery.error( "No conversion from " + conversion.replace(" "," to ") );
7666
- }
7667
- // If found converter is not an equivalence
7668
- if ( conv !== true ) {
7669
- // Convert with 1 or 2 converters accordingly
7670
- response = conv ? conv( response ) : conv2( conv1(response) );
7671
- }
7672
- }
7673
- }
7674
- return response;
7675
- }
7676
-
7677
-
7678
-
7679
-
7680
- var jsc = jQuery.now(),
7681
- jsre = /(\=)\?(&|$)|\?\?/i;
7682
-
7683
- // Default jsonp settings
7684
- jQuery.ajaxSetup({
7685
- jsonp: "callback",
7686
- jsonpCallback: function() {
7687
- return jQuery.expando + "_" + ( jsc++ );
7688
- }
7689
- });
7690
-
7691
- // Detect, normalize options and install callbacks for jsonp requests
7692
- jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
7693
-
7694
- var inspectData = s.contentType === "application/x-www-form-urlencoded" &&
7695
- ( typeof s.data === "string" );
7696
-
7697
- if ( s.dataTypes[ 0 ] === "jsonp" ||
7698
- s.jsonp !== false && ( jsre.test( s.url ) ||
7699
- inspectData && jsre.test( s.data ) ) ) {
7700
-
7701
- var responseContainer,
7702
- jsonpCallback = s.jsonpCallback =
7703
- jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback,
7704
- previous = window[ jsonpCallback ],
7705
- url = s.url,
7706
- data = s.data,
7707
- replace = "$1" + jsonpCallback + "$2";
7708
-
7709
- if ( s.jsonp !== false ) {
7710
- url = url.replace( jsre, replace );
7711
- if ( s.url === url ) {
7712
- if ( inspectData ) {
7713
- data = data.replace( jsre, replace );
7714
- }
7715
- if ( s.data === data ) {
7716
- // Add callback manually
7717
- url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback;
7718
- }
7719
- }
7720
- }
7721
-
7722
- s.url = url;
7723
- s.data = data;
7724
-
7725
- // Install callback
7726
- window[ jsonpCallback ] = function( response ) {
7727
- responseContainer = [ response ];
7728
- };
7729
-
7730
- // Clean-up function
7731
- jqXHR.always(function() {
7732
- // Set callback back to previous value
7733
- window[ jsonpCallback ] = previous;
7734
- // Call if it was a function and we have a response
7735
- if ( responseContainer && jQuery.isFunction( previous ) ) {
7736
- window[ jsonpCallback ]( responseContainer[ 0 ] );
7737
- }
7738
- });
7739
-
7740
- // Use data converter to retrieve json after script execution
7741
- s.converters["script json"] = function() {
7742
- if ( !responseContainer ) {
7743
- jQuery.error( jsonpCallback + " was not called" );
7744
- }
7745
- return responseContainer[ 0 ];
7746
- };
7747
-
7748
- // force json dataType
7749
- s.dataTypes[ 0 ] = "json";
7750
-
7751
- // Delegate to script
7752
- return "script";
7753
- }
7754
- });
7755
-
7756
-
7757
-
7758
-
7759
- // Install script dataType
7760
- jQuery.ajaxSetup({
7761
- accepts: {
7762
- script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
7763
- },
7764
- contents: {
7765
- script: /javascript|ecmascript/
7766
- },
7767
- converters: {
7768
- "text script": function( text ) {
7769
- jQuery.globalEval( text );
7770
- return text;
7771
- }
7772
- }
7773
- });
7774
-
7775
- // Handle cache's special case and global
7776
- jQuery.ajaxPrefilter( "script", function( s ) {
7777
- if ( s.cache === undefined ) {
7778
- s.cache = false;
7779
- }
7780
- if ( s.crossDomain ) {
7781
- s.type = "GET";
7782
- s.global = false;
7783
- }
7784
- });
7785
-
7786
- // Bind script tag hack transport
7787
- jQuery.ajaxTransport( "script", function(s) {
7788
-
7789
- // This transport only deals with cross domain requests
7790
- if ( s.crossDomain ) {
7791
-
7792
- var script,
7793
- head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement;
7794
-
7795
- return {
7796
-
7797
- send: function( _, callback ) {
7798
-
7799
- script = document.createElement( "script" );
7800
-
7801
- script.async = "async";
7802
-
7803
- if ( s.scriptCharset ) {
7804
- script.charset = s.scriptCharset;
7805
- }
7806
-
7807
- script.src = s.url;
7808
-
7809
- // Attach handlers for all browsers
7810
- script.onload = script.onreadystatechange = function( _, isAbort ) {
7811
-
7812
- if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
7813
-
7814
- // Handle memory leak in IE
7815
- script.onload = script.onreadystatechange = null;
7816
-
7817
- // Remove the script
7818
- if ( head && script.parentNode ) {
7819
- head.removeChild( script );
7820
- }
7821
-
7822
- // Dereference the script
7823
- script = undefined;
7824
-
7825
- // Callback if not abort
7826
- if ( !isAbort ) {
7827
- callback( 200, "success" );
7828
- }
7829
- }
7830
- };
7831
- // Use insertBefore instead of appendChild to circumvent an IE6 bug.
7832
- // This arises when a base node is used (#2709 and #4378).
7833
- head.insertBefore( script, head.firstChild );
7834
- },
7835
-
7836
- abort: function() {
7837
- if ( script ) {
7838
- script.onload( 0, 1 );
7839
- }
7840
- }
7841
- };
7842
- }
7843
- });
7844
-
7845
-
7846
-
7847
-
7848
- var // #5280: Internet Explorer will keep connections alive if we don't abort on unload
7849
- xhrOnUnloadAbort = window.ActiveXObject ? function() {
7850
- // Abort all pending requests
7851
- for ( var key in xhrCallbacks ) {
7852
- xhrCallbacks[ key ]( 0, 1 );
7853
- }
7854
- } : false,
7855
- xhrId = 0,
7856
- xhrCallbacks;
7857
-
7858
- // Functions to create xhrs
7859
- function createStandardXHR() {
7860
- try {
7861
- return new window.XMLHttpRequest();
7862
- } catch( e ) {}
7863
- }
7864
-
7865
- function createActiveXHR() {
7866
- try {
7867
- return new window.ActiveXObject( "Microsoft.XMLHTTP" );
7868
- } catch( e ) {}
7869
- }
7870
-
7871
- // Create the request object
7872
- // (This is still attached to ajaxSettings for backward compatibility)
7873
- jQuery.ajaxSettings.xhr = window.ActiveXObject ?
7874
- /* Microsoft failed to properly
7875
- * implement the XMLHttpRequest in IE7 (can't request local files),
7876
- * so we use the ActiveXObject when it is available
7877
- * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
7878
- * we need a fallback.
7879
- */
7880
- function() {
7881
- return !this.isLocal && createStandardXHR() || createActiveXHR();
7882
- } :
7883
- // For all other browsers, use the standard XMLHttpRequest object
7884
- createStandardXHR;
7885
-
7886
- // Determine support properties
7887
- (function( xhr ) {
7888
- jQuery.extend( jQuery.support, {
7889
- ajax: !!xhr,
7890
- cors: !!xhr && ( "withCredentials" in xhr )
7891
- });
7892
- })( jQuery.ajaxSettings.xhr() );
7893
-
7894
- // Create transport if the browser can provide an xhr
7895
- if ( jQuery.support.ajax ) {
7896
-
7897
- jQuery.ajaxTransport(function( s ) {
7898
- // Cross domain only allowed if supported through XMLHttpRequest
7899
- if ( !s.crossDomain || jQuery.support.cors ) {
7900
-
7901
- var callback;
7902
-
7903
- return {
7904
- send: function( headers, complete ) {
7905
-
7906
- // Get a new xhr
7907
- var xhr = s.xhr(),
7908
- handle,
7909
- i;
7910
-
7911
- // Open the socket
7912
- // Passing null username, generates a login popup on Opera (#2865)
7913
- if ( s.username ) {
7914
- xhr.open( s.type, s.url, s.async, s.username, s.password );
7915
- } else {
7916
- xhr.open( s.type, s.url, s.async );
7917
- }
7918
-
7919
- // Apply custom fields if provided
7920
- if ( s.xhrFields ) {
7921
- for ( i in s.xhrFields ) {
7922
- xhr[ i ] = s.xhrFields[ i ];
7923
- }
7924
- }
7925
-
7926
- // Override mime type if needed
7927
- if ( s.mimeType && xhr.overrideMimeType ) {
7928
- xhr.overrideMimeType( s.mimeType );
7929
- }
7930
-
7931
- // X-Requested-With header
7932
- // For cross-domain requests, seeing as conditions for a preflight are
7933
- // akin to a jigsaw puzzle, we simply never set it to be sure.
7934
- // (it can always be set on a per-request basis or even using ajaxSetup)
7935
- // For same-domain requests, won't change header if already provided.
7936
- if ( !s.crossDomain && !headers["X-Requested-With"] ) {
7937
- headers[ "X-Requested-With" ] = "XMLHttpRequest";
7938
- }
7939
-
7940
- // Need an extra try/catch for cross domain requests in Firefox 3
7941
- try {
7942
- for ( i in headers ) {
7943
- xhr.setRequestHeader( i, headers[ i ] );
7944
- }
7945
- } catch( _ ) {}
7946
-
7947
- // Do send the request
7948
- // This may raise an exception which is actually
7949
- // handled in jQuery.ajax (so no try/catch here)
7950
- xhr.send( ( s.hasContent && s.data ) || null );
7951
-
7952
- // Listener
7953
- callback = function( _, isAbort ) {
7954
-
7955
- var status,
7956
- statusText,
7957
- responseHeaders,
7958
- responses,
7959
- xml;
7960
-
7961
- // Firefox throws exceptions when accessing properties
7962
- // of an xhr when a network error occured
7963
- // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
7964
- try {
7965
-
7966
- // Was never called and is aborted or complete
7967
- if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
7968
-
7969
- // Only called once
7970
- callback = undefined;
7971
-
7972
- // Do not keep as active anymore
7973
- if ( handle ) {
7974
- xhr.onreadystatechange = jQuery.noop;
7975
- if ( xhrOnUnloadAbort ) {
7976
- delete xhrCallbacks[ handle ];
7977
- }
7978
- }
7979
-
7980
- // If it's an abort
7981
- if ( isAbort ) {
7982
- // Abort it manually if needed
7983
- if ( xhr.readyState !== 4 ) {
7984
- xhr.abort();
7985
- }
7986
- } else {
7987
- status = xhr.status;
7988
- responseHeaders = xhr.getAllResponseHeaders();
7989
- responses = {};
7990
- xml = xhr.responseXML;
7991
-
7992
- // Construct response list
7993
- if ( xml && xml.documentElement /* #4958 */ ) {
7994
- responses.xml = xml;
7995
- }
7996
- responses.text = xhr.responseText;
7997
-
7998
- // Firefox throws an exception when accessing
7999
- // statusText for faulty cross-domain requests
8000
- try {
8001
- statusText = xhr.statusText;
8002
- } catch( e ) {
8003
- // We normalize with Webkit giving an empty statusText
8004
- statusText = "";
8005
- }
8006
-
8007
- // Filter status for non standard behaviors
8008
-
8009
- // If the request is local and we have data: assume a success
8010
- // (success with no data won't get notified, that's the best we
8011
- // can do given current implementations)
8012
- if ( !status && s.isLocal && !s.crossDomain ) {
8013
- status = responses.text ? 200 : 404;
8014
- // IE - #1450: sometimes returns 1223 when it should be 204
8015
- } else if ( status === 1223 ) {
8016
- status = 204;
8017
- }
8018
- }
8019
- }
8020
- } catch( firefoxAccessException ) {
8021
- if ( !isAbort ) {
8022
- complete( -1, firefoxAccessException );
8023
- }
8024
- }
8025
-
8026
- // Call complete if needed
8027
- if ( responses ) {
8028
- complete( status, statusText, responses, responseHeaders );
8029
- }
8030
- };
8031
-
8032
- // if we're in sync mode or it's in cache
8033
- // and has been retrieved directly (IE6 & IE7)
8034
- // we need to manually fire the callback
8035
- if ( !s.async || xhr.readyState === 4 ) {
8036
- callback();
8037
- } else {
8038
- handle = ++xhrId;
8039
- if ( xhrOnUnloadAbort ) {
8040
- // Create the active xhrs callbacks list if needed
8041
- // and attach the unload handler
8042
- if ( !xhrCallbacks ) {
8043
- xhrCallbacks = {};
8044
- jQuery( window ).unload( xhrOnUnloadAbort );
8045
- }
8046
- // Add to list of active xhrs callbacks
8047
- xhrCallbacks[ handle ] = callback;
8048
- }
8049
- xhr.onreadystatechange = callback;
8050
- }
8051
- },
8052
-
8053
- abort: function() {
8054
- if ( callback ) {
8055
- callback(0,1);
8056
- }
8057
- }
8058
- };
8059
- }
8060
- });
8061
- }
8062
-
8063
-
8064
-
8065
-
8066
- var elemdisplay = {},
8067
- iframe, iframeDoc,
8068
- rfxtypes = /^(?:toggle|show|hide)$/,
8069
- rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
8070
- timerId,
8071
- fxAttrs = [
8072
- // height animations
8073
- [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
8074
- // width animations
8075
- [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
8076
- // opacity animations
8077
- [ "opacity" ]
8078
- ],
8079
- fxNow;
8080
-
8081
- jQuery.fn.extend({
8082
- show: function( speed, easing, callback ) {
8083
- var elem, display;
8084
-
8085
- if ( speed || speed === 0 ) {
8086
- return this.animate( genFx("show", 3), speed, easing, callback);
8087
-
8088
- } else {
8089
- for ( var i = 0, j = this.length; i < j; i++ ) {
8090
- elem = this[i];
8091
-
8092
- if ( elem.style ) {
8093
- display = elem.style.display;
8094
-
8095
- // Reset the inline display of this element to learn if it is
8096
- // being hidden by cascaded rules or not
8097
- if ( !jQuery._data(elem, "olddisplay") && display === "none" ) {
8098
- display = elem.style.display = "";
8099
- }
8100
-
8101
- // Set elements which have been overridden with display: none
8102
- // in a stylesheet to whatever the default browser style is
8103
- // for such an element
8104
- if ( display === "" && jQuery.css( elem, "display" ) === "none" ) {
8105
- jQuery._data(elem, "olddisplay", defaultDisplay(elem.nodeName));
8106
- }
8107
- }
8108
- }
8109
-
8110
- // Set the display of most of the elements in a second loop
8111
- // to avoid the constant reflow
8112
- for ( i = 0; i < j; i++ ) {
8113
- elem = this[i];
8114
-
8115
- if ( elem.style ) {
8116
- display = elem.style.display;
8117
-
8118
- if ( display === "" || display === "none" ) {
8119
- elem.style.display = jQuery._data(elem, "olddisplay") || "";
8120
- }
8121
- }
8122
- }
8123
-
8124
- return this;
8125
- }
8126
- },
8127
-
8128
- hide: function( speed, easing, callback ) {
8129
- if ( speed || speed === 0 ) {
8130
- return this.animate( genFx("hide", 3), speed, easing, callback);
8131
-
8132
- } else {
8133
- for ( var i = 0, j = this.length; i < j; i++ ) {
8134
- if ( this[i].style ) {
8135
- var display = jQuery.css( this[i], "display" );
8136
-
8137
- if ( display !== "none" && !jQuery._data( this[i], "olddisplay" ) ) {
8138
- jQuery._data( this[i], "olddisplay", display );
8139
- }
8140
- }
8141
- }
8142
-
8143
- // Set the display of the elements in a second loop
8144
- // to avoid the constant reflow
8145
- for ( i = 0; i < j; i++ ) {
8146
- if ( this[i].style ) {
8147
- this[i].style.display = "none";
8148
- }
8149
- }
8150
-
8151
- return this;
8152
- }
8153
- },
8154
-
8155
- // Save the old toggle function
8156
- _toggle: jQuery.fn.toggle,
8157
-
8158
- toggle: function( fn, fn2, callback ) {
8159
- var bool = typeof fn === "boolean";
8160
-
8161
- if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {
8162
- this._toggle.apply( this, arguments );
8163
-
8164
- } else if ( fn == null || bool ) {
8165
- this.each(function() {
8166
- var state = bool ? fn : jQuery(this).is(":hidden");
8167
- jQuery(this)[ state ? "show" : "hide" ]();
8168
- });
8169
-
8170
- } else {
8171
- this.animate(genFx("toggle", 3), fn, fn2, callback);
8172
- }
8173
-
8174
- return this;
8175
- },
8176
-
8177
- fadeTo: function( speed, to, easing, callback ) {
8178
- return this.filter(":hidden").css("opacity", 0).show().end()
8179
- .animate({opacity: to}, speed, easing, callback);
8180
- },
8181
-
8182
- animate: function( prop, speed, easing, callback ) {
8183
- var optall = jQuery.speed(speed, easing, callback);
8184
-
8185
- if ( jQuery.isEmptyObject( prop ) ) {
8186
- return this.each( optall.complete, [ false ] );
8187
- }
8188
-
8189
- // Do not change referenced properties as per-property easing will be lost
8190
- prop = jQuery.extend( {}, prop );
8191
-
8192
- return this[ optall.queue === false ? "each" : "queue" ](function() {
8193
- // XXX 'this' does not always have a nodeName when running the
8194
- // test suite
8195
-
8196
- if ( optall.queue === false ) {
8197
- jQuery._mark( this );
8198
- }
8199
-
8200
- var opt = jQuery.extend( {}, optall ),
8201
- isElement = this.nodeType === 1,
8202
- hidden = isElement && jQuery(this).is(":hidden"),
8203
- name, val, p,
8204
- display, e,
8205
- parts, start, end, unit;
8206
-
8207
- // will store per property easing and be used to determine when an animation is complete
8208
- opt.animatedProperties = {};
8209
-
8210
- for ( p in prop ) {
8211
-
8212
- // property name normalization
8213
- name = jQuery.camelCase( p );
8214
- if ( p !== name ) {
8215
- prop[ name ] = prop[ p ];
8216
- delete prop[ p ];
8217
- }
8218
-
8219
- val = prop[ name ];
8220
-
8221
- // easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
8222
- if ( jQuery.isArray( val ) ) {
8223
- opt.animatedProperties[ name ] = val[ 1 ];
8224
- val = prop[ name ] = val[ 0 ];
8225
- } else {
8226
- opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing';
8227
- }
8228
-
8229
- if ( val === "hide" && hidden || val === "show" && !hidden ) {
8230
- return opt.complete.call( this );
8231
- }
8232
-
8233
- if ( isElement && ( name === "height" || name === "width" ) ) {
8234
- // Make sure that nothing sneaks out
8235
- // Record all 3 overflow attributes because IE does not
8236
- // change the overflow attribute when overflowX and
8237
- // overflowY are set to the same value
8238
- opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];
8239
-
8240
- // Set display property to inline-block for height/width
8241
- // animations on inline elements that are having width/height
8242
- // animated
8243
- if ( jQuery.css( this, "display" ) === "inline" &&
8244
- jQuery.css( this, "float" ) === "none" ) {
8245
- if ( !jQuery.support.inlineBlockNeedsLayout ) {
8246
- this.style.display = "inline-block";
8247
-
8248
- } else {
8249
- display = defaultDisplay( this.nodeName );
8250
-
8251
- // inline-level elements accept inline-block;
8252
- // block-level elements need to be inline with layout
8253
- if ( display === "inline" ) {
8254
- this.style.display = "inline-block";
8255
-
8256
- } else {
8257
- this.style.display = "inline";
8258
- this.style.zoom = 1;
8259
- }
8260
- }
8261
- }
8262
- }
8263
- }
8264
-
8265
- if ( opt.overflow != null ) {
8266
- this.style.overflow = "hidden";
8267
- }
8268
-
8269
- for ( p in prop ) {
8270
- e = new jQuery.fx( this, opt, p );
8271
- val = prop[ p ];
8272
-
8273
- if ( rfxtypes.test(val) ) {
8274
- e[ val === "toggle" ? hidden ? "show" : "hide" : val ]();
8275
-
8276
- } else {
8277
- parts = rfxnum.exec( val );
8278
- start = e.cur();
8279
-
8280
- if ( parts ) {
8281
- end = parseFloat( parts[2] );
8282
- unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" );
8283
-
8284
- // We need to compute starting value
8285
- if ( unit !== "px" ) {
8286
- jQuery.style( this, p, (end || 1) + unit);
8287
- start = ((end || 1) / e.cur()) * start;
8288
- jQuery.style( this, p, start + unit);
8289
- }
8290
-
8291
- // If a +=/-= token was provided, we're doing a relative animation
8292
- if ( parts[1] ) {
8293
- end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start;
8294
- }
8295
-
8296
- e.custom( start, end, unit );
8297
-
8298
- } else {
8299
- e.custom( start, val, "" );
8300
- }
8301
- }
8302
- }
8303
-
8304
- // For JS strict compliance
8305
- return true;
8306
- });
8307
- },
8308
-
8309
- stop: function( clearQueue, gotoEnd ) {
8310
- if ( clearQueue ) {
8311
- this.queue([]);
8312
- }
8313
-
8314
- this.each(function() {
8315
- var timers = jQuery.timers,
8316
- i = timers.length;
8317
- // clear marker counters if we know they won't be
8318
- if ( !gotoEnd ) {
8319
- jQuery._unmark( true, this );
8320
- }
8321
- while ( i-- ) {
8322
- if ( timers[i].elem === this ) {
8323
- if (gotoEnd) {
8324
- // force the next step to be the last
8325
- timers[i](true);
8326
- }
8327
-
8328
- timers.splice(i, 1);
8329
- }
8330
- }
8331
- });
8332
-
8333
- // start the next in the queue if the last step wasn't forced
8334
- if ( !gotoEnd ) {
8335
- this.dequeue();
8336
- }
8337
-
8338
- return this;
8339
- }
8340
-
8341
- });
8342
-
8343
- // Animations created synchronously will run synchronously
8344
- function createFxNow() {
8345
- setTimeout( clearFxNow, 0 );
8346
- return ( fxNow = jQuery.now() );
8347
- }
8348
-
8349
- function clearFxNow() {
8350
- fxNow = undefined;
8351
- }
8352
-
8353
- // Generate parameters to create a standard animation
8354
- function genFx( type, num ) {
8355
- var obj = {};
8356
-
8357
- jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() {
8358
- obj[ this ] = type;
8359
- });
8360
-
8361
- return obj;
8362
- }
8363
-
8364
- // Generate shortcuts for custom animations
8365
- jQuery.each({
8366
- slideDown: genFx("show", 1),
8367
- slideUp: genFx("hide", 1),
8368
- slideToggle: genFx("toggle", 1),
8369
- fadeIn: { opacity: "show" },
8370
- fadeOut: { opacity: "hide" },
8371
- fadeToggle: { opacity: "toggle" }
8372
- }, function( name, props ) {
8373
- jQuery.fn[ name ] = function( speed, easing, callback ) {
8374
- return this.animate( props, speed, easing, callback );
8375
- };
8376
- });
8377
-
8378
- jQuery.extend({
8379
- speed: function( speed, easing, fn ) {
8380
- var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
8381
- complete: fn || !fn && easing ||
8382
- jQuery.isFunction( speed ) && speed,
8383
- duration: speed,
8384
- easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
8385
- };
8386
-
8387
- opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
8388
- opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default;
8389
-
8390
- // Queueing
8391
- opt.old = opt.complete;
8392
- opt.complete = function( noUnmark ) {
8393
- if ( jQuery.isFunction( opt.old ) ) {
8394
- opt.old.call( this );
8395
- }
8396
-
8397
- if ( opt.queue !== false ) {
8398
- jQuery.dequeue( this );
8399
- } else if ( noUnmark !== false ) {
8400
- jQuery._unmark( this );
8401
- }
8402
- };
8403
-
8404
- return opt;
8405
- },
8406
-
8407
- easing: {
8408
- linear: function( p, n, firstNum, diff ) {
8409
- return firstNum + diff * p;
8410
- },
8411
- swing: function( p, n, firstNum, diff ) {
8412
- return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
8413
- }
8414
- },
8415
-
8416
- timers: [],
8417
-
8418
- fx: function( elem, options, prop ) {
8419
- this.options = options;
8420
- this.elem = elem;
8421
- this.prop = prop;
8422
-
8423
- options.orig = options.orig || {};
8424
- }
8425
-
8426
- });
8427
-
8428
- jQuery.fx.prototype = {
8429
- // Simple function for setting a style value
8430
- update: function() {
8431
- if ( this.options.step ) {
8432
- this.options.step.call( this.elem, this.now, this );
8433
- }
8434
-
8435
- (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
8436
- },
8437
-
8438
- // Get the current size
8439
- cur: function() {
8440
- if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
8441
- return this.elem[ this.prop ];
8442
- }
8443
-
8444
- var parsed,
8445
- r = jQuery.css( this.elem, this.prop );
8446
- // Empty strings, null, undefined and "auto" are converted to 0,
8447
- // complex values such as "rotate(1rad)" are returned as is,
8448
- // simple values such as "10px" are parsed to Float.
8449
- return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed;
8450
- },
8451
-
8452
- // Start an animation from one number to another
8453
- custom: function( from, to, unit ) {
8454
- var self = this,
8455
- fx = jQuery.fx;
8456
-
8457
- this.startTime = fxNow || createFxNow();
8458
- this.start = from;
8459
- this.end = to;
8460
- this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" );
8461
- this.now = this.start;
8462
- this.pos = this.state = 0;
8463
-
8464
- function t( gotoEnd ) {
8465
- return self.step(gotoEnd);
8466
- }
8467
-
8468
- t.elem = this.elem;
8469
-
8470
- if ( t() && jQuery.timers.push(t) && !timerId ) {
8471
- timerId = setInterval( fx.tick, fx.interval );
8472
- }
8473
- },
8474
-
8475
- // Simple 'show' function
8476
- show: function() {
8477
- // Remember where we started, so that we can go back to it later
8478
- this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
8479
- this.options.show = true;
8480
-
8481
- // Begin the animation
8482
- // Make sure that we start at a small width/height to avoid any
8483
- // flash of content
8484
- this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur());
8485
-
8486
- // Start by showing the element
8487
- jQuery( this.elem ).show();
8488
- },
8489
-
8490
- // Simple 'hide' function
8491
- hide: function() {
8492
- // Remember where we started, so that we can go back to it later
8493
- this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
8494
- this.options.hide = true;
8495
-
8496
- // Begin the animation
8497
- this.custom(this.cur(), 0);
8498
- },
8499
-
8500
- // Each step of an animation
8501
- step: function( gotoEnd ) {
8502
- var t = fxNow || createFxNow(),
8503
- done = true,
8504
- elem = this.elem,
8505
- options = this.options,
8506
- i, n;
8507
-
8508
- if ( gotoEnd || t >= options.duration + this.startTime ) {
8509
- this.now = this.end;
8510
- this.pos = this.state = 1;
8511
- this.update();
8512
-
8513
- options.animatedProperties[ this.prop ] = true;
8514
-
8515
- for ( i in options.animatedProperties ) {
8516
- if ( options.animatedProperties[i] !== true ) {
8517
- done = false;
8518
- }
8519
- }
8520
-
8521
- if ( done ) {
8522
- // Reset the overflow
8523
- if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
8524
-
8525
- jQuery.each( [ "", "X", "Y" ], function (index, value) {
8526
- elem.style[ "overflow" + value ] = options.overflow[index];
8527
- });
8528
- }
8529
-
8530
- // Hide the element if the "hide" operation was done
8531
- if ( options.hide ) {
8532
- jQuery(elem).hide();
8533
- }
8534
-
8535
- // Reset the properties, if the item has been hidden or shown
8536
- if ( options.hide || options.show ) {
8537
- for ( var p in options.animatedProperties ) {
8538
- jQuery.style( elem, p, options.orig[p] );
8539
- }
8540
- }
8541
-
8542
- // Execute the complete function
8543
- options.complete.call( elem );
8544
- }
8545
-
8546
- return false;
8547
-
8548
- } else {
8549
- // classical easing cannot be used with an Infinity duration
8550
- if ( options.duration == Infinity ) {
8551
- this.now = t;
8552
- } else {
8553
- n = t - this.startTime;
8554
- this.state = n / options.duration;
8555
-
8556
- // Perform the easing function, defaults to swing
8557
- this.pos = jQuery.easing[ options.animatedProperties[ this.prop ] ]( this.state, n, 0, 1, options.duration );
8558
- this.now = this.start + ((this.end - this.start) * this.pos);
8559
- }
8560
- // Perform the next step of the animation
8561
- this.update();
8562
- }
8563
-
8564
- return true;
8565
- }
8566
- };
8567
-
8568
- jQuery.extend( jQuery.fx, {
8569
- tick: function() {
8570
- for ( var timers = jQuery.timers, i = 0 ; i < timers.length ; ++i ) {
8571
- if ( !timers[i]() ) {
8572
- timers.splice(i--, 1);
8573
- }
8574
- }
8575
-
8576
- if ( !timers.length ) {
8577
- jQuery.fx.stop();
8578
- }
8579
- },
8580
-
8581
- interval: 13,
8582
-
8583
- stop: function() {
8584
- clearInterval( timerId );
8585
- timerId = null;
8586
- },
8587
-
8588
- speeds: {
8589
- slow: 600,
8590
- fast: 200,
8591
- // Default speed
8592
- _default: 400
8593
- },
8594
-
8595
- step: {
8596
- opacity: function( fx ) {
8597
- jQuery.style( fx.elem, "opacity", fx.now );
8598
- },
8599
-
8600
- _default: function( fx ) {
8601
- if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
8602
- fx.elem.style[ fx.prop ] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit;
8603
- } else {
8604
- fx.elem[ fx.prop ] = fx.now;
8605
- }
8606
- }
8607
- }
8608
- });
8609
-
8610
- if ( jQuery.expr && jQuery.expr.filters ) {
8611
- jQuery.expr.filters.animated = function( elem ) {
8612
- return jQuery.grep(jQuery.timers, function( fn ) {
8613
- return elem === fn.elem;
8614
- }).length;
8615
- };
8616
- }
8617
-
8618
- // Try to restore the default display value of an element
8619
- function defaultDisplay( nodeName ) {
8620
-
8621
- if ( !elemdisplay[ nodeName ] ) {
8622
-
8623
- var body = document.body,
8624
- elem = jQuery( "<" + nodeName + ">" ).appendTo( body ),
8625
- display = elem.css( "display" );
8626
-
8627
- elem.remove();
8628
-
8629
- // If the simple way fails,
8630
- // get element's real default display by attaching it to a temp iframe
8631
- if ( display === "none" || display === "" ) {
8632
- // No iframe to use yet, so create it
8633
- if ( !iframe ) {
8634
- iframe = document.createElement( "iframe" );
8635
- iframe.frameBorder = iframe.width = iframe.height = 0;
8636
- }
8637
-
8638
- body.appendChild( iframe );
8639
-
8640
- // Create a cacheable copy of the iframe document on first call.
8641
- // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
8642
- // document to it; WebKit & Firefox won't allow reusing the iframe document.
8643
- if ( !iframeDoc || !iframe.createElement ) {
8644
- iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
8645
- iframeDoc.write( ( document.compatMode === "CSS1Compat" ? "<!doctype html>" : "" ) + "<html><body>" );
8646
- iframeDoc.close();
8647
- }
8648
-
8649
- elem = iframeDoc.createElement( nodeName );
8650
-
8651
- iframeDoc.body.appendChild( elem );
8652
-
8653
- display = jQuery.css( elem, "display" );
8654
-
8655
- body.removeChild( iframe );
8656
- }
8657
-
8658
- // Store the correct default display
8659
- elemdisplay[ nodeName ] = display;
8660
- }
8661
-
8662
- return elemdisplay[ nodeName ];
8663
- }
8664
-
8665
-
8666
-
8667
-
8668
- var rtable = /^t(?:able|d|h)$/i,
8669
- rroot = /^(?:body|html)$/i;
8670
-
8671
- if ( "getBoundingClientRect" in document.documentElement ) {
8672
- jQuery.fn.offset = function( options ) {
8673
- var elem = this[0], box;
8674
-
8675
- if ( options ) {
8676
- return this.each(function( i ) {
8677
- jQuery.offset.setOffset( this, options, i );
8678
- });
8679
- }
8680
-
8681
- if ( !elem || !elem.ownerDocument ) {
8682
- return null;
8683
- }
8684
-
8685
- if ( elem === elem.ownerDocument.body ) {
8686
- return jQuery.offset.bodyOffset( elem );
8687
- }
8688
-
8689
- try {
8690
- box = elem.getBoundingClientRect();
8691
- } catch(e) {}
8692
-
8693
- var doc = elem.ownerDocument,
8694
- docElem = doc.documentElement;
8695
-
8696
- // Make sure we're not dealing with a disconnected DOM node
8697
- if ( !box || !jQuery.contains( docElem, elem ) ) {
8698
- return box ? { top: box.top, left: box.left } : { top: 0, left: 0 };
8699
- }
8700
-
8701
- var body = doc.body,
8702
- win = getWindow(doc),
8703
- clientTop = docElem.clientTop || body.clientTop || 0,
8704
- clientLeft = docElem.clientLeft || body.clientLeft || 0,
8705
- scrollTop = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop,
8706
- scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft,
8707
- top = box.top + scrollTop - clientTop,
8708
- left = box.left + scrollLeft - clientLeft;
8709
-
8710
- return { top: top, left: left };
8711
- };
8712
-
8713
- } else {
8714
- jQuery.fn.offset = function( options ) {
8715
- var elem = this[0];
8716
-
8717
- if ( options ) {
8718
- return this.each(function( i ) {
8719
- jQuery.offset.setOffset( this, options, i );
8720
- });
8721
- }
8722
-
8723
- if ( !elem || !elem.ownerDocument ) {
8724
- return null;
8725
- }
8726
-
8727
- if ( elem === elem.ownerDocument.body ) {
8728
- return jQuery.offset.bodyOffset( elem );
8729
- }
8730
-
8731
- jQuery.offset.initialize();
8732
-
8733
- var computedStyle,
8734
- offsetParent = elem.offsetParent,
8735
- prevOffsetParent = elem,
8736
- doc = elem.ownerDocument,
8737
- docElem = doc.documentElement,
8738
- body = doc.body,
8739
- defaultView = doc.defaultView,
8740
- prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
8741
- top = elem.offsetTop,
8742
- left = elem.offsetLeft;
8743
-
8744
- while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
8745
- if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
8746
- break;
8747
- }
8748
-
8749
- computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;
8750
- top -= elem.scrollTop;
8751
- left -= elem.scrollLeft;
8752
-
8753
- if ( elem === offsetParent ) {
8754
- top += elem.offsetTop;
8755
- left += elem.offsetLeft;
8756
-
8757
- if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
8758
- top += parseFloat( computedStyle.borderTopWidth ) || 0;
8759
- left += parseFloat( computedStyle.borderLeftWidth ) || 0;
8760
- }
8761
-
8762
- prevOffsetParent = offsetParent;
8763
- offsetParent = elem.offsetParent;
8764
- }
8765
-
8766
- if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
8767
- top += parseFloat( computedStyle.borderTopWidth ) || 0;
8768
- left += parseFloat( computedStyle.borderLeftWidth ) || 0;
8769
- }
8770
-
8771
- prevComputedStyle = computedStyle;
8772
- }
8773
-
8774
- if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) {
8775
- top += body.offsetTop;
8776
- left += body.offsetLeft;
8777
- }
8778
-
8779
- if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
8780
- top += Math.max( docElem.scrollTop, body.scrollTop );
8781
- left += Math.max( docElem.scrollLeft, body.scrollLeft );
8782
- }
8783
-
8784
- return { top: top, left: left };
8785
- };
8786
- }
8787
-
8788
- jQuery.offset = {
8789
- initialize: function() {
8790
- var body = document.body, container = document.createElement("div"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.css(body, "marginTop") ) || 0,
8791
- 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>";
8792
-
8793
- jQuery.extend( container.style, { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" } );
8794
-
8795
- container.innerHTML = html;
8796
- body.insertBefore( container, body.firstChild );
8797
- innerDiv = container.firstChild;
8798
- checkDiv = innerDiv.firstChild;
8799
- td = innerDiv.nextSibling.firstChild.firstChild;
8800
-
8801
- this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
8802
- this.doesAddBorderForTableAndCells = (td.offsetTop === 5);
8803
-
8804
- checkDiv.style.position = "fixed";
8805
- checkDiv.style.top = "20px";
8806
-
8807
- // safari subtracts parent border width here which is 5px
8808
- this.supportsFixedPosition = (checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15);
8809
- checkDiv.style.position = checkDiv.style.top = "";
8810
-
8811
- innerDiv.style.overflow = "hidden";
8812
- innerDiv.style.position = "relative";
8813
-
8814
- this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);
8815
-
8816
- this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);
8817
-
8818
- body.removeChild( container );
8819
- jQuery.offset.initialize = jQuery.noop;
8820
- },
8821
-
8822
- bodyOffset: function( body ) {
8823
- var top = body.offsetTop,
8824
- left = body.offsetLeft;
8825
-
8826
- jQuery.offset.initialize();
8827
-
8828
- if ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) {
8829
- top += parseFloat( jQuery.css(body, "marginTop") ) || 0;
8830
- left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
8831
- }
8832
-
8833
- return { top: top, left: left };
8834
- },
8835
-
8836
- setOffset: function( elem, options, i ) {
8837
- var position = jQuery.css( elem, "position" );
8838
-
8839
- // set position first, in-case top/left are set even on static elem
8840
- if ( position === "static" ) {
8841
- elem.style.position = "relative";
8842
- }
8843
-
8844
- var curElem = jQuery( elem ),
8845
- curOffset = curElem.offset(),
8846
- curCSSTop = jQuery.css( elem, "top" ),
8847
- curCSSLeft = jQuery.css( elem, "left" ),
8848
- calculatePosition = (position === "absolute" || position === "fixed") && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
8849
- props = {}, curPosition = {}, curTop, curLeft;
8850
-
8851
- // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
8852
- if ( calculatePosition ) {
8853
- curPosition = curElem.position();
8854
- curTop = curPosition.top;
8855
- curLeft = curPosition.left;
8856
- } else {
8857
- curTop = parseFloat( curCSSTop ) || 0;
8858
- curLeft = parseFloat( curCSSLeft ) || 0;
8859
- }
8860
-
8861
- if ( jQuery.isFunction( options ) ) {
8862
- options = options.call( elem, i, curOffset );
8863
- }
8864
-
8865
- if (options.top != null) {
8866
- props.top = (options.top - curOffset.top) + curTop;
8867
- }
8868
- if (options.left != null) {
8869
- props.left = (options.left - curOffset.left) + curLeft;
8870
- }
8871
-
8872
- if ( "using" in options ) {
8873
- options.using.call( elem, props );
8874
- } else {
8875
- curElem.css( props );
8876
- }
8877
- }
8878
- };
8879
-
8880
-
8881
- jQuery.fn.extend({
8882
- position: function() {
8883
- if ( !this[0] ) {
8884
- return null;
8885
- }
8886
-
8887
- var elem = this[0],
8888
-
8889
- // Get *real* offsetParent
8890
- offsetParent = this.offsetParent(),
8891
-
8892
- // Get correct offsets
8893
- offset = this.offset(),
8894
- parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
8895
-
8896
- // Subtract element margins
8897
- // note: when an element has margin: auto the offsetLeft and marginLeft
8898
- // are the same in Safari causing offset.left to incorrectly be 0
8899
- offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
8900
- offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
8901
-
8902
- // Add offsetParent borders
8903
- parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
8904
- parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
8905
-
8906
- // Subtract the two offsets
8907
- return {
8908
- top: offset.top - parentOffset.top,
8909
- left: offset.left - parentOffset.left
8910
- };
8911
- },
8912
-
8913
- offsetParent: function() {
8914
- return this.map(function() {
8915
- var offsetParent = this.offsetParent || document.body;
8916
- while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
8917
- offsetParent = offsetParent.offsetParent;
8918
- }
8919
- return offsetParent;
8920
- });
8921
- }
8922
- });
8923
-
8924
-
8925
- // Create scrollLeft and scrollTop methods
8926
- jQuery.each( ["Left", "Top"], function( i, name ) {
8927
- var method = "scroll" + name;
8928
-
8929
- jQuery.fn[ method ] = function( val ) {
8930
- var elem, win;
8931
-
8932
- if ( val === undefined ) {
8933
- elem = this[ 0 ];
8934
-
8935
- if ( !elem ) {
8936
- return null;
8937
- }
8938
-
8939
- win = getWindow( elem );
8940
-
8941
- // Return the scroll offset
8942
- return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] :
8943
- jQuery.support.boxModel && win.document.documentElement[ method ] ||
8944
- win.document.body[ method ] :
8945
- elem[ method ];
8946
- }
8947
-
8948
- // Set the scroll offset
8949
- return this.each(function() {
8950
- win = getWindow( this );
8951
-
8952
- if ( win ) {
8953
- win.scrollTo(
8954
- !i ? val : jQuery( win ).scrollLeft(),
8955
- i ? val : jQuery( win ).scrollTop()
8956
- );
8957
-
8958
- } else {
8959
- this[ method ] = val;
8960
- }
8961
- });
8962
- };
8963
- });
8964
-
8965
- function getWindow( elem ) {
8966
- return jQuery.isWindow( elem ) ?
8967
- elem :
8968
- elem.nodeType === 9 ?
8969
- elem.defaultView || elem.parentWindow :
8970
- false;
8971
- }
8972
-
8973
-
8974
-
8975
-
8976
- // Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods
8977
- jQuery.each([ "Height", "Width" ], function( i, name ) {
8978
-
8979
- var type = name.toLowerCase();
8980
-
8981
- // innerHeight and innerWidth
8982
- jQuery.fn[ "inner" + name ] = function() {
8983
- var elem = this[0];
8984
- return elem && elem.style ?
8985
- parseFloat( jQuery.css( elem, type, "padding" ) ) :
8986
- null;
8987
- };
8988
-
8989
- // outerHeight and outerWidth
8990
- jQuery.fn[ "outer" + name ] = function( margin ) {
8991
- var elem = this[0];
8992
- return elem && elem.style ?
8993
- parseFloat( jQuery.css( elem, type, margin ? "margin" : "border" ) ) :
8994
- null;
8995
- };
8996
-
8997
- jQuery.fn[ type ] = function( size ) {
8998
- // Get window width or height
8999
- var elem = this[0];
9000
- if ( !elem ) {
9001
- return size == null ? null : this;
9002
- }
9003
-
9004
- if ( jQuery.isFunction( size ) ) {
9005
- return this.each(function( i ) {
9006
- var self = jQuery( this );
9007
- self[ type ]( size.call( this, i, self[ type ]() ) );
9008
- });
9009
- }
9010
-
9011
- if ( jQuery.isWindow( elem ) ) {
9012
- // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
9013
- // 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
9014
- var docElemProp = elem.document.documentElement[ "client" + name ],
9015
- body = elem.document.body;
9016
- return elem.document.compatMode === "CSS1Compat" && docElemProp ||
9017
- body && body[ "client" + name ] || docElemProp;
9018
-
9019
- // Get document width or height
9020
- } else if ( elem.nodeType === 9 ) {
9021
- // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
9022
- return Math.max(
9023
- elem.documentElement["client" + name],
9024
- elem.body["scroll" + name], elem.documentElement["scroll" + name],
9025
- elem.body["offset" + name], elem.documentElement["offset" + name]
9026
- );
9027
-
9028
- // Get or set width or height on the element
9029
- } else if ( size === undefined ) {
9030
- var orig = jQuery.css( elem, type ),
9031
- ret = parseFloat( orig );
9032
-
9033
- return jQuery.isNaN( ret ) ? orig : ret;
9034
-
9035
- // Set the width or height on the element (default to pixels if value is unitless)
9036
- } else {
9037
- return this.css( type, typeof size === "string" ? size : size + "px" );
9038
- }
9039
- };
9040
-
9041
- });
9042
-
9043
-
9044
- // Expose jQuery to the global object
9045
- window.jQuery = window.$ = jQuery;
9046
- })(window);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jquery-1.6.4.min.js DELETED
@@ -1,4 +0,0 @@
1
- /*! jQuery v1.6.4 http://jquery.com/ | http://jquery.org/license */
2
- (function(a,b){function cu(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cr(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 cq(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cp(){cn=b}function co(){setTimeout(cp,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||bA.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){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bW(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===bP,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=bW(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bW(a,c,d,e,"*",g));return l}function bV(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bL),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 by(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bt:bu;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=bv(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 bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bd,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(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 bg(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 bf(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function V(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(Q.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 U(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function M(a,b){return(a&&a!=="*"?a+".":"")+b.replace(y,"`").replace(z,"&")}function L(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(w,"")===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 J(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 D(){return!0}function C(){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").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 K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,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]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};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.4",length:0,size:function(){return this.length},toArray:function(){return G.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)?F.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(),B.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(G.apply(this,arguments),"slice",G.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:F,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;B.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},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):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},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(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},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(x,"ms-").replace(w,y)},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:H?function(a){return a==null?"":H.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)?F.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(!b)return-1;if(I)return I.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=G.call(arguments,2),g=function(){return a.apply(c,f.concat(G.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){J["[object "+b+"]"]=b.toLowerCase()}),A=e.uaMatch(z),A.browser&&(e.browser[A.browser]=!0,e.browser.version=A.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?C=function(){c.removeEventListener("DOMContentLoaded",C,!1),e.ready()}:c.attachEvent&&(C=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",C),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+"With"](this===b?d:this,[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,background:"none"},m&&f.extend(p,{position:"absolute",left:"-1000px",top:"-1000px"});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])/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,h,i=f.expando,j=typeof c=="string",k=a.nodeType,l=k?f.cache:a,m=k?a[f.expando]:a[f.expando]&&f.expando;if((!m||e&&m&&l[m]&&!l[m][i])&&j&&d===b)return;m||(k?a[f.expando]=m=++f.uuid:m=f.expando),l[m]||(l[m]={},k||(l[m].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?l[m][i]=f.extend(l[m][i],c):l[m]=f.extend(l[m],c);g=l[m],e&&(g[i]||(g[i]={}),g=g[i]),d!==b&&(g[f.camelCase(c)]=d);if(c==="events"&&!g[c])return g[i]&&g[i].events;j?(h=g[c],h==null&&(h=g[f.camelCase(c)])):h=g;return h}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e=f.expando,g=a.nodeType,h=g?f.cache:a,i=g?a[f.expando]:f.expando;if(!h[i])return;if(b){d=c?h[i][e]:h[i];if(d){d[b]||(b=f.camelCase(b)),delete d[b];if(!l(d))return}}if(c){delete h[i][e];if(!l(h[i]))return}var j=h[i][e];f.support.deleteExpando||!h.setInterval?delete h[i]:h[i]=null,j?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=j):g&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[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;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].nodeType===1&&(" "+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=v:u&&(i=u)));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.attr(a,b,""),a.removeAttribute(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}}},value:{get:function(a,b){if(u&&f.nodeName(a,"button"))return u.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(u&&f.nodeName(a,"button"))return u.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))!==null?g:a[c]},propHooks:{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}}}}),f.attrHooks.tabIndex=f.propHooks.tabIndex,v={get:function(a,c){var d;return f.prop(a,c)===!0||(d=a.getAttributeNode(c))&&d.nodeValue!==!1?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||(u=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=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);return null}})),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 w=/\.(.*)$/,x=/^(?:textarea|input|select)$/i,y=/\./g,z=/ /g,A=/[^\w\s.|`]/g,B=function(a){return a.replace(A,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=C;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=C);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(),B).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
3
- 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)});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,M(a.origType,a.selector),f.extend({},a,{handler:L,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,M(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()?D:C):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=D;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=D;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=D,this.stopPropagation()},isDefaultPrevented:C,isPropagationStopped:C,isImmediatePropagationStopped:C};var E=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))},F=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?F:E,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?F:E)}}}),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=f.nodeName(b,"input")||f.nodeName(b,"button")?b.type:"";(c==="submit"||c==="image")&&f(b).closest("form").length&&J("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=f.nodeName(b,"input")||f.nodeName(b,"button")?b.type:"";(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&J("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var G,H=function(a){var b=f.nodeName(a,"input")?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},I=function(c){var d=c.target,e,g;if(!!x.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=H(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:I,beforedeactivate:I,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&I.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")&&I.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",H(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in G)f.event.add(this,c+".specialChange",G[c]);return x.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return x.test(this.nodeName)}},G=f.event.special.change.filters,G.focus=G.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 K={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||C,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=w.exec(h),k="",j&&(k=j[0],h=h.replace(w,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,K[h]?(a.push(K[h]+k),h=h+k):h=(K[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+M(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+M(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 N=/Until$/,O=/^(?:parents|prevUntil|prevAll)/,P=/,/,Q=/^.[^:#\[\.,]*$/,R=Array.prototype.slice,S=f.expr.match.POS,T={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(V(this,a,!1),"not",a)},filter:function(a){return this.pushStack(V(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]=S.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=S.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)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));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(U(c[0])||U(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=R.call(arguments);N.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!T[a]?f.unique(e):e,(this.length>1||P.test(d))&&O.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 W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|object|embed|option|style)/i,bb=/checked\s*(?:[^=]|=\s*.checked.)/i,bc=/\/(java|ecma)script/i,bd=/^\s*<!(?:\[CDATA\[|\-\-)/,be={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,"",""]};be.optgroup=be.option,be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,f.support.htmlSerialize||(be._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(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!be[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$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"&&bb.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?bf(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bl)}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)==="<"&&!ba.test(a[0])&&(f.support.checkClone||!bb.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean
4
- (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)){bh(a,d),e=bi(a),g=bi(d);for(h=0;e[h];++h)g[h]&&bh(e[h],g[h])}if(b){bg(a,d);if(c){e=bi(a),g=bi(d);for(h=0;e[h];++h)bg(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(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=be[l]||be._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&&X.test(k)&&o.insertBefore(b.createTextNode(X.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++)bk(k[i]);else bk(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bc.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 bm=/alpha\([^)]*\)/i,bn=/opacity=([^)]*)/,bo=/([A-Z]|^ms)/g,bp=/^-?\d+(?:px)?$/i,bq=/^-?\d/,br=/^([\-+])=([\-+.\de]+)/,bs={position:"absolute",visibility:"hidden",display:"block"},bt=["Left","Right"],bu=["Top","Bottom"],bv,bw,bx;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=bv(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,h==="string"&&(g=br.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;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(bv)return bv(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 by(a,b,d);f.swap(a,bs,function(){e=by(a,b,d)});return e}},set:function(a,b){if(!bp.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bn.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,e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bm,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bm.test(g)?g.replace(bm,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=bv(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bw=function(a,c){var d,e,g;c=c.replace(bo,"-$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&&(bx=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bp.test(d)&&bq.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}),bv=bw||bx,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 bz=/%20/g,bA=/\[\]$/,bB=/\r?\n/g,bC=/#.*$/,bD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bE=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bF=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bG=/^(?:GET|HEAD)$/,bH=/^\/\//,bI=/\?/,bJ=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bK=/^(?:select|textarea)/i,bL=/\s+/,bM=/([?&])_=[^&]*/,bN=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bO=f.fn.load,bP={},bQ={},bR,bS,bT=["*/"]+["*"];try{bR=e.href}catch(bU){bR=c.createElement("a"),bR.href="",bR=bR.href}bS=bN.exec(bR.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bO)return bO.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(bJ,"")).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||bK.test(this.nodeName)||bE.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(bB,"\r\n")}}):{name:b.name,value:c.replace(bB,"\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?bX(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),bX(a,b);return a},ajaxSettings:{url:bR,isLocal:bF.test(bS[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","*":bT},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},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bV(bP),ajaxTransport:bV(bQ),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>0?4:0;var o,r,u,w=c,x=l?bZ(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=b$(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,w]),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=bD.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(bC,"").replace(bH,bS[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bL),d.crossDomain==null&&(r=bN.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bS[1]&&r[2]==bS[2]&&(r[3]||(r[1]==="http:"?80:443))==(bS[3]||(bS[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bW(bP,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bG.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bI.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bM,"$1_="+x);d.url=y+(y===d.url?(bI.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]!=="*"?", "+bT+"; 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=bW(bQ,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){s<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(bz,"+")}}),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;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cq("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",cr(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(cq("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(cq("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=cr(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:cq("show",1),slideUp:cq("hide",1),slideToggle:cq("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 g(a){return d.step(a)}var d=this,e=f.fx;this.startTime=cn||co(),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,g.elem=this.elem,g()&&f.timers.push(g)&&!cl&&(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||co(),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 cs=/^t(?:able|d|h)$/i,ct=/^(?: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=cu(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||!cs.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=ct.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&&!ct.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=cu(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=cu(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],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["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 i=f.css(e,d),j=parseFloat(i);return f.isNaN(j)?i:j}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);
 
 
 
 
js/jquery-1.7.1.min.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ /*! jQuery v1.7.1 jquery.com | jquery.org/license */
2
+ (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(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 cb(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 ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}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===bT,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(bP),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 bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bp(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 bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(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 bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(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(O.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 S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}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=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,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=m.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.7.1",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.add(a);return this},eq:function(a){a=+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.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");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},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(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;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(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(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},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,"ms-").replace(v,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,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&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=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.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={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.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:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([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&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=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,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},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"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(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(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},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.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;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(p);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(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");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(p);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+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.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}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),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,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},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},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.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}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.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,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?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}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,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.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,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);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),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 z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};
3
+ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,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 instanceof f.Event))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()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},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)}}),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 contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.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&&!l.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&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.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&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,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(j,"")+" ";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(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.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]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),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]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.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!!m(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=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([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}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&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=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null: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=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=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(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)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 v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=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}),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)&&(o.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:[]}},o.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&&(o.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")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[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}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.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 m(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;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={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(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0: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=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.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(i?i.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)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));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(S(c[0])||S(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);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).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 V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","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,"",""]},bh=U(c);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){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):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.clean(arguments);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.clean(arguments));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()
4
+ {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(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$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?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=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,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},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(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),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&&X.test(k)&&o.insertBefore(b.createTextNode(X.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++)bn(k[i]);else bn(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.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;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:{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,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;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]}}),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 bC(a,b,d);f.swap(a,bw,function(){e=bC(a,b,d)});return e}},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.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,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,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,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),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&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.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(bN,"")).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||bO.test(this.nodeName)||bI.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(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(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?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[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","*":bX},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},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),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>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),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.Callbacks("once memory"),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=bH.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.add,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(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.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]!=="*"?", "+bX+"; 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$(bU,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){if(s<2)w(-1,z);else throw 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)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),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&&(ce.test(b.url)||e&&ce.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(ce,l),b.url===j&&(e&&(k=k.replace(ce,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 cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,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,cf&&delete ch[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=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;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);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].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){function g(){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||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),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;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):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,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=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.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),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);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.support.fixedPosition&&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.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.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.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.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(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():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],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["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 i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Plugin Name ===
2
  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.1
7
- Stable tag: 1.7
8
 
9
  This plugin should only be used for development purposes, this plugin updates jQuery to the latest (stable) version.
10
 
@@ -27,6 +27,11 @@ Its recommended to flush the cache after upgrading.
27
  Not relevant.
28
 
29
  == Changelog ==
 
 
 
 
 
30
  = 1.7.0 =
31
  * Updated jQuery to 1.7 [releasenotes](http://blog.jquery.com/2011/11/03/jquery-1-7-released/)
32
  * Readme update
1
  === Plugin Name ===
2
  Contributors: Ramoonus
3
  Donate link: http://www.ramoonus.nl
4
+ Tags: jquery,
5
+ Requires at least: 3.0
6
+ Tested up to: 3.3
7
+ Stable tag: 1.7.1
8
 
9
  This plugin should only be used for development purposes, this plugin updates jQuery to the latest (stable) version.
10
 
27
  Not relevant.
28
 
29
  == Changelog ==
30
+ = 1.7.1 =
31
+ * Updated jQuery to 1.7.1 [releasenotes](http://blog.jquery.com/2011/11/21/jquery-1-7-1-released/)
32
+ * Minor code optimalisation
33
+ * Readme update
34
+
35
  = 1.7.0 =
36
  * Updated jQuery to 1.7 [releasenotes](http://blog.jquery.com/2011/11/03/jquery-1-7-released/)
37
  * Readme update