aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/themes/default/template/header.tpl2
-rw-r--r--admin/themes/default/template/include/autosize.inc.tpl2
-rw-r--r--admin/themes/default/template/include/datepicker.inc.tpl2
-rw-r--r--admin/themes/default/template/include/dbselect.inc.tpl2
-rw-r--r--admin/themes/default/template/include/resize.inc.tpl2
-rw-r--r--admin/themes/default/template/install.tpl2
-rw-r--r--include/template.class.php6
-rw-r--r--themes/default/js/jquery.js4003
-rw-r--r--themes/default/js/jquery.min.js167
-rw-r--r--themes/default/js/jquery.packed.js1
-rw-r--r--themes/default/template/include/autosize.inc.tpl2
-rw-r--r--themes/default/template/include/datepicker.inc.tpl2
-rw-r--r--themes/default/template/include/resize.inc.tpl2
13 files changed, 2734 insertions, 1461 deletions
diff --git a/admin/themes/default/template/header.tpl b/admin/themes/default/template/header.tpl
index 4da026cf3..a64fcbf17 100644
--- a/admin/themes/default/template/header.tpl
+++ b/admin/themes/default/template/header.tpl
@@ -25,7 +25,7 @@
{get_combined_scripts load='header'}
<!-- END get_combined_scripts -->
-{combine_script id='jquery' path='themes/default/js/jquery.packed.js'}
+{combine_script id='jquery' path='themes/default/js/jquery.min.js'}
<!--[if lt IE 7]>
<script type="text/javascript" src="{$ROOT_URL}themes/default/js/pngfix.js"></script>
diff --git a/admin/themes/default/template/include/autosize.inc.tpl b/admin/themes/default/template/include/autosize.inc.tpl
index ea18e6d3a..e21162f9e 100644
--- a/admin/themes/default/template/include/autosize.inc.tpl
+++ b/admin/themes/default/template/include/autosize.inc.tpl
@@ -1,4 +1,4 @@
-{combine_script id='jquery' load='async' path='themes/default/js/jquery.packed.js'}
+{combine_script id='jquery' load='async' path='themes/default/js/jquery.min.js'}
{combine_script id='jquery.autogrow' load='async' require='jquery' path='themes/default/js/plugins/jquery.autogrow-textarea.js'}
{* Auto size and auto grow textarea *}
{footer_script require='jquery.autogrow'}{literal}
diff --git a/admin/themes/default/template/include/datepicker.inc.tpl b/admin/themes/default/template/include/datepicker.inc.tpl
index 9ed13e3fe..71ce3ae18 100644
--- a/admin/themes/default/template/include/datepicker.inc.tpl
+++ b/admin/themes/default/template/include/datepicker.inc.tpl
@@ -1,4 +1,4 @@
-{combine_script id='jquery' load='footer' path='themes/default/js/jquery.packed.js'}
+{combine_script id='jquery' load='footer' path='themes/default/js/jquery.min.js'}
{combine_script id='jquery.ui' load='footer' require='jquery' path='themes/default/js/ui/packed/ui.core.packed.js'}
{combine_script id='jquery.ui.datepicker' load='footer' require='jquery.ui' path='themes/default/js/ui/packed/ui.datepicker.packed.js'}
{combine_script id='datepicker.js' load='footer' require='jquery.ui.datepicker' path='themes/default/js/datepicker.js'}
diff --git a/admin/themes/default/template/include/dbselect.inc.tpl b/admin/themes/default/template/include/dbselect.inc.tpl
index 297cff01a..6b8cc96d7 100644
--- a/admin/themes/default/template/include/dbselect.inc.tpl
+++ b/admin/themes/default/template/include/dbselect.inc.tpl
@@ -1,4 +1,4 @@
-{combine_script id='jquery' load='async' path='themes/default/js/jquery.packed.js'}
+{combine_script id='jquery' load='async' path='themes/default/js/jquery.min.js'}
{combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/ui/packed/ui.core.packed.js' }
{combine_script id='jquery.ui.resizable' load='async' require='jquery.ui' path='themes/default/js/ui/packed/ui.resizable.packed.js' }
{footer_script require='jquery.ui.resizable'}{literal}
diff --git a/admin/themes/default/template/include/resize.inc.tpl b/admin/themes/default/template/include/resize.inc.tpl
index b7076a752..de66ac16a 100644
--- a/admin/themes/default/template/include/resize.inc.tpl
+++ b/admin/themes/default/template/include/resize.inc.tpl
@@ -1,4 +1,4 @@
-{combine_script id='jquery' load='async' path='themes/default/js/jquery.packed.js'}
+{combine_script id='jquery' load='async' path='themes/default/js/jquery.min.js'}
{combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/ui/packed/ui.core.packed.js'}
{combine_script id='jquery.ui.resizable' load='async' require='jquery.ui' path='themes/default/js/ui/packed/ui.resizable.packed.js'}
diff --git a/admin/themes/default/template/install.tpl b/admin/themes/default/template/install.tpl
index 1c0a1042a..d31e6132f 100644
--- a/admin/themes/default/template/install.tpl
+++ b/admin/themes/default/template/install.tpl
@@ -12,7 +12,7 @@
<link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/themes/{$theme.id}/theme.css">
{/foreach}
-<script type="text/javascript" src="themes/default/js/jquery.packed.js"></script>
+<script type="text/javascript" src="themes/default/js/jquery.min.js"></script>
{literal}
<script type="text/javascript">
$(function() {
diff --git a/include/template.class.php b/include/template.class.php
index 6cba4984f..666f913b7 100644
--- a/include/template.class.php
+++ b/include/template.class.php
@@ -523,6 +523,12 @@ class Template {
return;
}
$id = $params['id'];
+ trigger_error("known_script is deprecated $id ".@$params['src'], E_USER_WARNING);
+ if ('jquery'==$id)
+ {
+ $this->scriptLoader->add($id, 0, array(), null);
+ return;
+ }
if (! isset( $this->known_scripts[$id] ) )
{
if (!isset($params['src']))
diff --git a/themes/default/js/jquery.js b/themes/default/js/jquery.js
index 109701084..a4f114586 100644
--- a/themes/default/js/jquery.js
+++ b/themes/default/js/jquery.js
@@ -1,5 +1,5 @@
/*!
- * jQuery JavaScript Library v1.4.1
+ * jQuery JavaScript Library v1.4.4
* http://jquery.com/
*
* Copyright 2010, John Resig
@@ -11,10 +11,14 @@
* Copyright 2010, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
- * Date: Mon Jan 25 19:43:33 2010 -0500
+ * Date: Thu Nov 11 19:04:53 2010 -0500
*/
(function( window, undefined ) {
+// Use the correct document accordingly with window argument (sandbox)
+var document = window.document;
+var jQuery = (function() {
+
// Define a local copy of jQuery
var jQuery = function( selector, context ) {
// The jQuery object is actually just the init constructor 'enhanced'
@@ -27,28 +31,45 @@ var jQuery = function( selector, context ) {
// Map over the $ in case of overwrite
_$ = window.$,
- // Use the correct document accordingly with window argument (sandbox)
- document = window.document,
-
// A central reference to the root jQuery(document)
rootjQuery,
// A simple way to check for HTML strings or ID strings
// (both of which we optimize for)
- quickExpr = /^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,
+ quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,
// Is it a simple selector
isSimple = /^.[^:#\[\.,]*$/,
// Check if a string has a non-whitespace character in it
rnotwhite = /\S/,
+ rwhite = /\s/,
// Used for trimming whitespace
- rtrim = /^(\s|\u00A0)+|(\s|\u00A0)+$/g,
+ trimLeft = /^\s+/,
+ trimRight = /\s+$/,
+
+ // Check for non-word characters
+ rnonword = /\W/,
+
+ // Check for digits
+ rdigit = /\d/,
// Match a standalone tag
rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+ // JSON RegExp
+ rvalidchars = /^[\],:{}\s]*$/,
+ rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
+ rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
+ rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+
+ // Useragent RegExp
+ rwebkit = /(webkit)[ \/]([\w.]+)/,
+ ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
+ rmsie = /(msie) ([\w.]+)/,
+ rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
+
// Keep a UserAgent string for use with jQuery.browser
userAgent = navigator.userAgent,
@@ -66,10 +87,14 @@ var jQuery = function( selector, context ) {
// Save a reference to some core methods
toString = Object.prototype.toString,
- hasOwnProperty = Object.prototype.hasOwnProperty,
+ hasOwn = Object.prototype.hasOwnProperty,
push = Array.prototype.push,
slice = Array.prototype.slice,
- indexOf = Array.prototype.indexOf;
+ trim = String.prototype.trim,
+ indexOf = Array.prototype.indexOf,
+
+ // [[Class]] -> type pairs
+ class2type = {};
jQuery.fn = jQuery.prototype = {
init: function( selector, context ) {
@@ -86,6 +111,15 @@ jQuery.fn = jQuery.prototype = {
this.length = 1;
return this;
}
+
+ // The body element only exists once, optimize finding it
+ if ( selector === "body" && !context && document.body ) {
+ this.context = document;
+ this[0] = document.body;
+ this.selector = "body";
+ this.length = 1;
+ return this;
+ }
// Handle HTML strings
if ( typeof selector === "string" ) {
@@ -113,15 +147,19 @@ jQuery.fn = jQuery.prototype = {
}
} else {
- ret = buildFragment( [ match[1] ], [ doc ] );
+ ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes;
}
-
+
+ return jQuery.merge( this, selector );
+
// HANDLE: $("#id")
} else {
elem = document.getElementById( match[2] );
- if ( elem ) {
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
// Handle the case where IE and Opera return items
// by name instead of ID
if ( elem.id !== match[2] ) {
@@ -139,10 +177,11 @@ jQuery.fn = jQuery.prototype = {
}
// HANDLE: $("TAG")
- } else if ( !context && /^\w+$/.test( selector ) ) {
+ } else if ( !context && !rnonword.test( selector ) ) {
this.selector = selector;
this.context = document;
selector = document.getElementsByTagName( selector );
+ return jQuery.merge( this, selector );
// HANDLE: $(expr, $(...))
} else if ( !context || context.jquery ) {
@@ -165,16 +204,14 @@ jQuery.fn = jQuery.prototype = {
this.context = selector.context;
}
- return jQuery.isArray( selector ) ?
- this.setArray( selector ) :
- jQuery.makeArray( selector, this );
+ return jQuery.makeArray( selector, this );
},
// Start with an empty selector
selector: "",
// The current version of jQuery being used
- jquery: "1.4.1",
+ jquery: "1.4.4",
// The default length of a jQuery object is 0
length: 0,
@@ -204,7 +241,14 @@ jQuery.fn = jQuery.prototype = {
// (returning the new matched element set)
pushStack: function( elems, name, selector ) {
// Build a new jQuery matched element set
- var ret = jQuery( elems || null );
+ var ret = jQuery();
+
+ if ( jQuery.isArray( elems ) ) {
+ push.apply( ret, elems );
+
+ } else {
+ jQuery.merge( ret, elems );
+ }
// Add the old object onto the stack (as a reference)
ret.prevObject = this;
@@ -221,18 +265,6 @@ jQuery.fn = jQuery.prototype = {
return ret;
},
- // Force the current matched set of elements to become
- // the specified array of elements (destroying the stack in the process)
- // You should use pushStack() in order to do this, but maintain the stack
- setArray: function( elems ) {
- // Resetting the length to 0, then using the native Array push
- // is a super-fast way to populate an object with array-like properties
- this.length = 0;
- push.apply( this, elems );
-
- return this;
- },
-
// Execute a callback for every element in the matched set.
// (You can seed the arguments with an array of args, but this is
// only used internally.)
@@ -298,8 +330,11 @@ jQuery.fn = jQuery.prototype = {
jQuery.fn.init.prototype = jQuery.fn;
jQuery.extend = jQuery.fn.extend = function() {
- // copy reference to target object
- var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options, name, src, copy;
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
// Handle a deep copy situation
if ( typeof target === "boolean" ) {
@@ -333,10 +368,15 @@ jQuery.extend = jQuery.fn.extend = function() {
continue;
}
- // Recurse if we're merging object literal values or arrays
- if ( deep && copy && ( jQuery.isPlainObject(copy) || jQuery.isArray(copy) ) ) {
- var clone = src && ( jQuery.isPlainObject(src) || jQuery.isArray(src) ) ? src
- : jQuery.isArray(copy) ? [] : {};
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray(src) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject(src) ? src : {};
+ }
// Never move original objects, clone them
target[ name ] = jQuery.extend( deep, clone, copy );
@@ -366,34 +406,51 @@ jQuery.extend({
// Is the DOM ready to be used? Set to true once it occurs.
isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See #6781
+ readyWait: 1,
// Handle when the DOM is ready
- ready: function() {
+ ready: function( wait ) {
+ // A third-party is pushing the ready event forwards
+ if ( wait === true ) {
+ jQuery.readyWait--;
+ }
+
// Make sure that the DOM is not already loaded
- if ( !jQuery.isReady ) {
+ if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) {
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
if ( !document.body ) {
- return setTimeout( jQuery.ready, 13 );
+ return setTimeout( jQuery.ready, 1 );
}
// Remember that the DOM is ready
jQuery.isReady = true;
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
// If there are functions bound, to execute
if ( readyList ) {
// Execute all of them
- var fn, i = 0;
- while ( (fn = readyList[ i++ ]) ) {
- fn.call( document, jQuery );
- }
+ var fn,
+ i = 0,
+ ready = readyList;
// Reset the list of functions
readyList = null;
- }
- // Trigger any bound ready events
- if ( jQuery.fn.triggerHandler ) {
- jQuery( document ).triggerHandler( "ready" );
+ while ( (fn = ready[ i++ ]) ) {
+ fn.call( document, jQuery );
+ }
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.trigger ) {
+ jQuery( document ).trigger( "ready" ).unbind( "ready" );
+ }
}
}
},
@@ -408,7 +465,8 @@ jQuery.extend({
// Catch cases where $(document).ready() is called after the
// browser event has already occurred.
if ( document.readyState === "complete" ) {
- return jQuery.ready();
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ return setTimeout( jQuery.ready, 1 );
}
// Mozilla, Opera and webkit nightlies currently support this event
@@ -446,25 +504,40 @@ jQuery.extend({
// Since version 1.3, DOM methods and functions like alert
// aren't supported. They return false on IE (#2968).
isFunction: function( obj ) {
- return toString.call(obj) === "[object Function]";
+ return jQuery.type(obj) === "function";
},
- isArray: function( obj ) {
- return toString.call(obj) === "[object Array]";
+ isArray: Array.isArray || function( obj ) {
+ return jQuery.type(obj) === "array";
+ },
+
+ // A crude way of determining if an object is a window
+ isWindow: function( obj ) {
+ return obj && typeof obj === "object" && "setInterval" in obj;
+ },
+
+ isNaN: function( obj ) {
+ return obj == null || !rdigit.test( obj ) || isNaN( obj );
+ },
+
+ type: function( obj ) {
+ return obj == null ?
+ String( obj ) :
+ class2type[ toString.call(obj) ] || "object";
},
isPlainObject: function( obj ) {
// Must be an Object.
// Because of IE, we also have to check the presence of the constructor property.
// Make sure that DOM nodes and window objects don't pass through, as well
- if ( !obj || toString.call(obj) !== "[object Object]" || obj.nodeType || obj.setInterval ) {
+ if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
return false;
}
// Not own constructor property must be Object
- if ( obj.constructor
- && !hasOwnProperty.call(obj, "constructor")
- && !hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf") ) {
+ if ( obj.constructor &&
+ !hasOwn.call(obj, "constructor") &&
+ !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
return false;
}
@@ -474,7 +547,7 @@ jQuery.extend({
var key;
for ( key in obj ) {}
- return key === undefined || hasOwnProperty.call( obj, key );
+ return key === undefined || hasOwn.call( obj, key );
},
isEmptyObject: function( obj ) {
@@ -492,12 +565,15 @@ jQuery.extend({
if ( typeof data !== "string" || !data ) {
return null;
}
+
+ // Make sure leading/trailing whitespace is removed (IE can't handle it)
+ data = jQuery.trim( data );
// Make sure the incoming data is actual JSON
// Logic borrowed from http://json.org/json2.js
- if ( /^[\],:{}\s]*$/.test(data.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@")
- .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]")
- .replace(/(?:^|:|,)(?:\s*\[)+/g, "")) ) {
+ if ( rvalidchars.test(data.replace(rvalidescape, "@")
+ .replace(rvalidtokens, "]")
+ .replace(rvalidbraces, "")) ) {
// Try to use the native JSON parser first
return window.JSON && window.JSON.parse ?
@@ -576,9 +652,20 @@ jQuery.extend({
return object;
},
- trim: function( text ) {
- return (text || "").replace( rtrim, "" );
- },
+ // Use native String.trim function wherever possible
+ trim: trim ?
+ function( text ) {
+ return text == null ?
+ "" :
+ trim.call( text );
+ } :
+
+ // Otherwise use our own trimming functionality
+ function( text ) {
+ return text == null ?
+ "" :
+ text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
+ },
// results is for internal usage only
makeArray: function( array, results ) {
@@ -588,7 +675,10 @@ jQuery.extend({
// The window, strings (and functions) also have 'length'
// The extra typeof function check is to prevent crashes
// in Safari 2 (See: #3039)
- if ( array.length == null || typeof array === "string" || jQuery.isFunction(array) || (typeof array !== "function" && array.setInterval) ) {
+ // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+ var type = jQuery.type(array);
+
+ if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
push.call( ret, array );
} else {
jQuery.merge( ret, array );
@@ -613,12 +703,14 @@ jQuery.extend({
},
merge: function( first, second ) {
- var i = first.length, j = 0;
+ var i = first.length,
+ j = 0;
if ( typeof second.length === "number" ) {
for ( var l = second.length; j < l; j++ ) {
first[ i++ ] = second[ j ];
}
+
} else {
while ( second[j] !== undefined ) {
first[ i++ ] = second[ j++ ];
@@ -631,12 +723,14 @@ jQuery.extend({
},
grep: function( elems, callback, inv ) {
- var ret = [];
+ var ret = [], retVal;
+ inv = !!inv;
// Go through the array, only saving the items
// that pass the validator function
for ( var i = 0, length = elems.length; i < length; i++ ) {
- if ( !inv !== !callback( elems[ i ], i ) ) {
+ retVal = !!callback( elems[ i ], i );
+ if ( inv !== retVal ) {
ret.push( elems[ i ] );
}
}
@@ -692,16 +786,49 @@ jQuery.extend({
return proxy;
},
+ // Mutifunctional method to get and set values to a collection
+ // The value/s can be optionally by executed if its a function
+ access: function( elems, key, value, exec, fn, pass ) {
+ var length = elems.length;
+
+ // Setting many attributes
+ if ( typeof key === "object" ) {
+ for ( var k in key ) {
+ jQuery.access( elems, k, key[k], exec, fn, value );
+ }
+ return elems;
+ }
+
+ // Setting one attribute
+ if ( value !== undefined ) {
+ // Optionally, function values get executed if exec is true
+ exec = !pass && exec && jQuery.isFunction(value);
+
+ for ( var i = 0; i < length; i++ ) {
+ fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
+ }
+
+ return elems;
+ }
+
+ // Getting an attribute
+ return length ? fn( elems[0], key ) : undefined;
+ },
+
+ now: function() {
+ return (new Date()).getTime();
+ },
+
// Use of jQuery.browser is frowned upon.
// More details: http://docs.jquery.com/Utilities/jQuery.browser
uaMatch: function( ua ) {
ua = ua.toLowerCase();
- var match = /(webkit)[ \/]([\w.]+)/.exec( ua ) ||
- /(opera)(?:.*version)?[ \/]([\w.]+)/.exec( ua ) ||
- /(msie) ([\w.]+)/.exec( ua ) ||
- !/compatible/.test( ua ) && /(mozilla)(?:.*? rv:([\w.]+))?/.exec( ua ) ||
- [];
+ var match = rwebkit.exec( ua ) ||
+ ropera.exec( ua ) ||
+ rmsie.exec( ua ) ||
+ ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
+ [];
return { browser: match[1] || "", version: match[2] || "0" };
},
@@ -709,6 +836,11 @@ jQuery.extend({
browser: {}
});
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
browserMatch = jQuery.uaMatch( userAgent );
if ( browserMatch.browser ) {
jQuery.browser[ browserMatch.browser ] = true;
@@ -726,6 +858,13 @@ if ( indexOf ) {
};
}
+// Verify that \s matches non-breaking spaces
+// (IE fails on this test)
+if ( !rwhite.test( "\xA0" ) ) {
+ trimLeft = /^[\s\xA0]+/;
+ trimRight = /[\s\xA0]+$/;
+}
+
// All jQuery objects should point back to these
rootjQuery = jQuery(document);
@@ -756,7 +895,7 @@ function doScrollCheck() {
// If IE is used, use the trick by Diego Perini
// http://javascript.nwbox.com/IEContentLoaded/
document.documentElement.doScroll("left");
- } catch( error ) {
+ } catch(e) {
setTimeout( doScrollCheck, 1 );
return;
}
@@ -765,54 +904,12 @@ function doScrollCheck() {
jQuery.ready();
}
-function evalScript( i, elem ) {
- if ( elem.src ) {
- jQuery.ajax({
- url: elem.src,
- async: false,
- dataType: "script"
- });
- } else {
- jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
- }
+// Expose jQuery to the global object
+return (window.jQuery = window.$ = jQuery);
- if ( elem.parentNode ) {
- elem.parentNode.removeChild( elem );
- }
-}
+})();
-// Mutifunctional method to get and set values to a collection
-// The value/s can be optionally by executed if its a function
-function access( elems, key, value, exec, fn, pass ) {
- var length = elems.length;
-
- // Setting many attributes
- if ( typeof key === "object" ) {
- for ( var k in key ) {
- access( elems, k, key[k], exec, fn, value );
- }
- return elems;
- }
-
- // Setting one attribute
- if ( value !== undefined ) {
- // Optionally, function values get executed if exec is true
- exec = !pass && exec && jQuery.isFunction(value);
-
- for ( var i = 0; i < length; i++ ) {
- fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
- }
-
- return elems;
- }
-
- // Getting an attribute
- return length ? fn( elems[0], key ) : null;
-}
-function now() {
- return (new Date).getTime();
-}
(function() {
jQuery.support = {};
@@ -820,13 +917,15 @@ function now() {
var root = document.documentElement,
script = document.createElement("script"),
div = document.createElement("div"),
- id = "script" + now();
+ id = "script" + jQuery.now();
div.style.display = "none";
div.innerHTML = " <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
var all = div.getElementsByTagName("*"),
- a = div.getElementsByTagName("a")[0];
+ a = div.getElementsByTagName("a")[0],
+ select = document.createElement("select"),
+ opt = select.appendChild( document.createElement("option") );
// Can't get basic test support
if ( !all || !all.length || !a ) {
@@ -869,15 +968,25 @@ function now() {
// Make sure that a selected-by-default option has a working selected property.
// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
- optSelected: document.createElement("select").appendChild( document.createElement("option") ).selected,
+ optSelected: opt.selected,
// Will be defined later
+ deleteExpando: true,
+ optDisabled: false,
checkClone: false,
scriptEval: false,
noCloneEvent: true,
- boxModel: null
+ boxModel: null,
+ inlineBlockNeedsLayout: false,
+ shrinkWrapBlocks: false,
+ reliableHiddenOffsets: true
};
+ // Make sure that the options inside disabled selects aren't marked as disabled
+ // (WebKit marks them as diabled)
+ select.disabled = true;
+ jQuery.support.optDisabled = !opt.disabled;
+
script.type = "text/javascript";
try {
script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
@@ -893,6 +1002,15 @@ function now() {
delete window[ id ];
}
+ // Test to see if it's possible to delete an expando from an element
+ // Fails in Internet Explorer
+ try {
+ delete script.test;
+
+ } catch(e) {
+ jQuery.support.deleteExpando = false;
+ }
+
root.removeChild( script );
if ( div.attachEvent && div.fireEvent ) {
@@ -922,26 +1040,63 @@ function now() {
document.body.appendChild( div );
jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
- document.body.removeChild( div ).style.display = 'none';
- div = null;
+
+ if ( "zoom" in div.style ) {
+ // Check if natively block-level elements act like inline-block
+ // elements when setting their display to 'inline' and giving
+ // them layout
+ // (IE < 8 does this)
+ div.style.display = "inline";
+ div.style.zoom = 1;
+ jQuery.support.inlineBlockNeedsLayout = div.offsetWidth === 2;
+
+ // Check if elements with layout shrink-wrap their children
+ // (IE 6 does this)
+ div.style.display = "";
+ div.innerHTML = "<div style='width:4px;'></div>";
+ jQuery.support.shrinkWrapBlocks = div.offsetWidth !== 2;
+ }
+
+ div.innerHTML = "<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";
+ var tds = div.getElementsByTagName("td");
+
+ // Check if table cells still have offsetWidth/Height when they are set
+ // to display:none and there are still other visible table cells in a
+ // table row; if so, offsetWidth/Height are not reliable for use when
+ // determining if an element has been hidden directly using
+ // display:none (it is still safe to use offsets if a parent element is
+ // hidden; don safety goggles and see bug #4512 for more information).
+ // (only IE 8 fails this test)
+ jQuery.support.reliableHiddenOffsets = tds[0].offsetHeight === 0;
+
+ tds[0].style.display = "";
+ tds[1].style.display = "none";
+
+ // Check if empty table cells still have offsetWidth/Height
+ // (IE < 8 fail this test)
+ jQuery.support.reliableHiddenOffsets = jQuery.support.reliableHiddenOffsets && tds[0].offsetHeight === 0;
+ div.innerHTML = "";
+
+ document.body.removeChild( div ).style.display = "none";
+ div = tds = null;
});
// Technique from Juriy Zaytsev
// http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
- var eventSupported = function( eventName ) {
- var el = document.createElement("div");
- eventName = "on" + eventName;
-
- var isSupported = (eventName in el);
- if ( !isSupported ) {
- el.setAttribute(eventName, "return;");
- isSupported = typeof el[eventName] === "function";
- }
- el = null;
-
- return isSupported;
+ var eventSupported = function( eventName ) {
+ var el = document.createElement("div");
+ eventName = "on" + eventName;
+
+ var isSupported = (eventName in el);
+ if ( !isSupported ) {
+ el.setAttribute(eventName, "return;");
+ isSupported = typeof el[eventName] === "function";
+ }
+ el = null;
+
+ return isSupported;
};
-
+
jQuery.support.submitBubbles = eventSupported("submit");
jQuery.support.changeBubbles = eventSupported("change");
@@ -949,36 +1104,31 @@ function now() {
root = script = div = all = a = null;
})();
-jQuery.props = {
- "for": "htmlFor",
- "class": "className",
- readonly: "readOnly",
- maxlength: "maxLength",
- cellspacing: "cellSpacing",
- rowspan: "rowSpan",
- colspan: "colSpan",
- tabindex: "tabIndex",
- usemap: "useMap",
- frameborder: "frameBorder"
-};
-var expando = "jQuery" + now(), uuid = 0, windowData = {};
-var emptyObject = {};
+
+
+var windowData = {},
+ rbrace = /^(?:\{.*\}|\[.*\])$/;
jQuery.extend({
cache: {},
-
- expando:expando,
+
+ // Please use with caution
+ uuid: 0,
+
+ // Unique for each copy of jQuery on the page
+ expando: "jQuery" + jQuery.now(),
// The following elements throw uncatchable exceptions if you
// attempt to add expando properties to them.
noData: {
"embed": true,
- "object": true,
+ // Ban all objects except for Flash (which handle expandos)
+ "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
"applet": true
},
data: function( elem, name, data ) {
- if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
+ if ( !jQuery.acceptData( elem ) ) {
return;
}
@@ -986,34 +1136,41 @@ jQuery.extend({
windowData :
elem;
- var id = elem[ expando ], cache = jQuery.cache, thisCache;
+ var isNode = elem.nodeType,
+ id = isNode ? elem[ jQuery.expando ] : null,
+ cache = jQuery.cache, thisCache;
- // Handle the case where there's no name immediately
- if ( !name && !id ) {
- return null;
+ if ( isNode && !id && typeof name === "string" && data === undefined ) {
+ return;
}
+ // Get the data from the object directly
+ if ( !isNode ) {
+ cache = elem;
+
// Compute a unique ID for the element
- if ( !id ) {
- id = ++uuid;
+ } else if ( !id ) {
+ elem[ jQuery.expando ] = id = ++jQuery.uuid;
}
// Avoid generating a new cache unless none exists and we
// want to manipulate it.
if ( typeof name === "object" ) {
- elem[ expando ] = id;
- thisCache = cache[ id ] = jQuery.extend(true, {}, name);
- } else if ( cache[ id ] ) {
- thisCache = cache[ id ];
- } else if ( typeof data === "undefined" ) {
- thisCache = emptyObject;
- } else {
- thisCache = cache[ id ] = {};
+ if ( isNode ) {
+ cache[ id ] = jQuery.extend(cache[ id ], name);
+
+ } else {
+ jQuery.extend( cache, name );
+ }
+
+ } else if ( isNode && !cache[ id ] ) {
+ cache[ id ] = {};
}
+ thisCache = isNode ? cache[ id ] : cache;
+
// Prevent overriding the named cache with undefined values
if ( data !== undefined ) {
- elem[ expando ] = id;
thisCache[ name ] = data;
}
@@ -1021,7 +1178,7 @@ jQuery.extend({
},
removeData: function( elem, name ) {
- if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
+ if ( !jQuery.acceptData( elem ) ) {
return;
}
@@ -1029,7 +1186,10 @@ jQuery.extend({
windowData :
elem;
- var id = elem[ expando ], cache = jQuery.cache, thisCache = cache[ id ];
+ var isNode = elem.nodeType,
+ id = isNode ? elem[ jQuery.expando ] : elem,
+ cache = jQuery.cache,
+ thisCache = isNode ? cache[ id ] : id;
// If we want to remove a specific section of the element's data
if ( name ) {
@@ -1038,34 +1198,66 @@ jQuery.extend({
delete thisCache[ name ];
// If we've removed all the data, remove the element's cache
- if ( jQuery.isEmptyObject(thisCache) ) {
+ if ( isNode && jQuery.isEmptyObject(thisCache) ) {
jQuery.removeData( elem );
}
}
// Otherwise, we want to remove all of the element's data
} else {
- // Clean up the element expando
- try {
- delete elem[ expando ];
- } catch( e ) {
- // IE has trouble directly removing the expando
- // but it's ok with using removeAttribute
- if ( elem.removeAttribute ) {
- elem.removeAttribute( expando );
+ if ( isNode && jQuery.support.deleteExpando ) {
+ delete elem[ jQuery.expando ];
+
+ } else if ( elem.removeAttribute ) {
+ elem.removeAttribute( jQuery.expando );
+
+ // Completely remove the data cache
+ } else if ( isNode ) {
+ delete cache[ id ];
+
+ // Remove all fields from the object
+ } else {
+ for ( var n in elem ) {
+ delete elem[ n ];
}
}
+ }
+ },
- // Completely remove the data cache
- delete cache[ id ];
+ // A method for determining if a DOM node can handle the data expando
+ acceptData: function( elem ) {
+ if ( elem.nodeName ) {
+ var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+ if ( match ) {
+ return !(match === true || elem.getAttribute("classid") !== match);
+ }
}
+
+ return true;
}
});
jQuery.fn.extend({
data: function( key, value ) {
- if ( typeof key === "undefined" && this.length ) {
- return jQuery.data( this[0] );
+ var data = null;
+
+ if ( typeof key === "undefined" ) {
+ if ( this.length ) {
+ var attr = this[0].attributes, name;
+ data = jQuery.data( this[0] );
+
+ for ( var i = 0, l = attr.length; i < l; i++ ) {
+ name = attr[i].name;
+
+ if ( name.indexOf( "data-" ) === 0 ) {
+ name = name.substr( 5 );
+ dataAttr( this[0], name, data[ name ] );
+ }
+ }
+ }
+
+ return data;
} else if ( typeof key === "object" ) {
return this.each(function() {
@@ -1077,17 +1269,26 @@ jQuery.fn.extend({
parts[1] = parts[1] ? "." + parts[1] : "";
if ( value === undefined ) {
- var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
+ data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
+ // Try to fetch any internally stored data first
if ( data === undefined && this.length ) {
data = jQuery.data( this[0], key );
+ data = dataAttr( this[0], key, data );
}
+
return data === undefined && parts[1] ?
this.data( parts[0] ) :
data;
+
} else {
- return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function() {
+ return this.each(function() {
+ var $this = jQuery( this ),
+ args = [ parts[0], value ];
+
+ $this.triggerHandler( "setData" + parts[1] + "!", args );
jQuery.data( this, key, value );
+ $this.triggerHandler( "changeData" + parts[1] + "!", args );
});
}
},
@@ -1098,6 +1299,37 @@ jQuery.fn.extend({
});
}
});
+
+function dataAttr( elem, key, data ) {
+ // If nothing was found internally, try to fetch any
+ // data from the HTML5 data-* attribute
+ if ( data === undefined && elem.nodeType === 1 ) {
+ data = elem.getAttribute( "data-" + key );
+
+ if ( typeof data === "string" ) {
+ try {
+ data = data === "true" ? true :
+ data === "false" ? false :
+ data === "null" ? null :
+ !jQuery.isNaN( data ) ? parseFloat( data ) :
+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
+ data;
+ } catch( e ) {}
+
+ // Make sure we set the data so it isn't changed later
+ jQuery.data( elem, key, data );
+
+ } else {
+ data = undefined;
+ }
+ }
+
+ return data;
+}
+
+
+
+
jQuery.extend({
queue: function( elem, type, data ) {
if ( !elem ) {
@@ -1125,7 +1357,8 @@ jQuery.extend({
dequeue: function( elem, type ) {
type = type || "fx";
- var queue = jQuery.queue( elem, type ), fn = queue.shift();
+ var queue = jQuery.queue( elem, type ),
+ fn = queue.shift();
// If the fx queue is dequeued, always remove the progress sentinel
if ( fn === "inprogress" ) {
@@ -1156,7 +1389,7 @@ jQuery.fn.extend({
if ( data === undefined ) {
return jQuery.queue( this[0], type );
}
- return this.each(function( i, elem ) {
+ return this.each(function( i ) {
var queue = jQuery.queue( this, type, data );
if ( type === "fx" && queue[0] !== "inprogress" ) {
@@ -1188,18 +1421,35 @@ jQuery.fn.extend({
return this.queue( type || "fx", [] );
}
});
+
+
+
+
var rclass = /[\n\t]/g,
- rspace = /\s+/,
+ rspaces = /\s+/,
rreturn = /\r/g,
- rspecialurl = /href|src|style/,
- rtype = /(button|input)/i,
- rfocusable = /(button|input|object|select|textarea)/i,
- rclickable = /^(a|area)$/i,
- rradiocheck = /radio|checkbox/;
+ rspecialurl = /^(?:href|src|style)$/,
+ rtype = /^(?:button|input)$/i,
+ rfocusable = /^(?:button|input|object|select|textarea)$/i,
+ rclickable = /^a(?:rea)?$/i,
+ rradiocheck = /^(?:radio|checkbox)$/i;
+
+jQuery.props = {
+ "for": "htmlFor",
+ "class": "className",
+ readonly: "readOnly",
+ maxlength: "maxLength",
+ cellspacing: "cellSpacing",
+ rowspan: "rowSpan",
+ colspan: "colSpan",
+ tabindex: "tabIndex",
+ usemap: "useMap",
+ frameborder: "frameBorder"
+};
jQuery.fn.extend({
attr: function( name, value ) {
- return access( this, name, value, true, jQuery.attr );
+ return jQuery.access( this, name, value, true, jQuery.attr );
},
removeAttr: function( name, fn ) {
@@ -1220,7 +1470,7 @@ jQuery.fn.extend({
}
if ( value && typeof value === "string" ) {
- var classNames = (value || "").split( rspace );
+ var classNames = (value || "").split( rspaces );
for ( var i = 0, l = this.length; i < l; i++ ) {
var elem = this[i];
@@ -1230,12 +1480,15 @@ jQuery.fn.extend({
elem.className = value;
} else {
- var className = " " + elem.className + " ";
+ var className = " " + elem.className + " ",
+ setClass = elem.className;
+
for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) {
- elem.className += " " + classNames[c];
+ setClass += " " + classNames[c];
}
}
+ elem.className = jQuery.trim( setClass );
}
}
}
@@ -1253,7 +1506,7 @@ jQuery.fn.extend({
}
if ( (value && typeof value === "string") || value === undefined ) {
- var classNames = (value || "").split(rspace);
+ var classNames = (value || "").split( rspaces );
for ( var i = 0, l = this.length; i < l; i++ ) {
var elem = this[i];
@@ -1264,7 +1517,7 @@ jQuery.fn.extend({
for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
className = className.replace(" " + classNames[c] + " ", " ");
}
- elem.className = className.substring(1, className.length - 1);
+ elem.className = jQuery.trim( className );
} else {
elem.className = "";
@@ -1277,7 +1530,8 @@ jQuery.fn.extend({
},
toggleClass: function( value, stateVal ) {
- var type = typeof value, isBool = typeof stateVal === "boolean";
+ var type = typeof value,
+ isBool = typeof stateVal === "boolean";
if ( jQuery.isFunction( value ) ) {
return this.each(function(i) {
@@ -1289,9 +1543,11 @@ jQuery.fn.extend({
return this.each(function() {
if ( type === "string" ) {
// toggle individual class names
- var className, i = 0, self = jQuery(this),
+ var className,
+ i = 0,
+ self = jQuery( this ),
state = stateVal,
- classNames = value.split( rspace );
+ classNames = value.split( rspaces );
while ( (className = classNames[ i++ ]) ) {
// check each className given, space seperated list
@@ -1323,12 +1579,15 @@ jQuery.fn.extend({
},
val: function( value ) {
- if ( value === undefined ) {
+ if ( !arguments.length ) {
var elem = this[0];
if ( elem ) {
if ( jQuery.nodeName( elem, "option" ) ) {
- return (elem.attributes.value || {}).specified ? elem.value : elem.text;
+ // attributes.value is undefined in Blackberry 4.7 but
+ // uses .value. See #6932
+ var val = elem.attributes.value;
+ return !val || val.specified ? elem.value : elem.text;
}
// We need to handle select boxes special
@@ -1347,8 +1606,11 @@ jQuery.fn.extend({
for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
var option = options[ i ];
- if ( option.selected ) {
- // Get the specifc value for the option
+ // Don't return options that are disabled or in a disabled optgroup
+ if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
+ (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
+
+ // Get the specific value for the option
value = jQuery(option).val();
// We don't need an array for one selects
@@ -1391,10 +1653,15 @@ jQuery.fn.extend({
val = value.call(this, i, self.val());
}
- // Typecast each time if the value is a Function and the appended
- // value is therefore different each time.
- if ( typeof val === "number" ) {
+ // Treat null/undefined as ""; convert numbers to string
+ if ( val == null ) {
+ val = "";
+ } else if ( typeof val === "number" ) {
val += "";
+ } else if ( jQuery.isArray(val) ) {
+ val = jQuery.map(val, function (value) {
+ return value == null ? "" : value + "";
+ });
}
if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) {
@@ -1447,88 +1714,103 @@ jQuery.extend({
// Try to normalize/fix the name
name = notxml && jQuery.props[ name ] || name;
- // Only do all the following if this is a node (faster for style)
- if ( elem.nodeType === 1 ) {
- // These attributes require special treatment
- var special = rspecialurl.test( name );
-
- // Safari mis-reports the default selected property of an option
- // Accessing the parent's selectedIndex property fixes it
- if ( name === "selected" && !jQuery.support.optSelected ) {
- var parent = elem.parentNode;
- if ( parent ) {
- parent.selectedIndex;
-
- // Make sure that it also works with optgroups, see #5701
- if ( parent.parentNode ) {
- parent.parentNode.selectedIndex;
- }
- }
- }
+ // These attributes require special treatment
+ var special = rspecialurl.test( name );
- // If applicable, access the attribute via the DOM 0 way
- if ( name in elem && notxml && !special ) {
- if ( set ) {
- // We can't allow the type property to be changed (since it causes problems in IE)
- if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) {
- jQuery.error( "type property can't be changed" );
- }
+ // Safari mis-reports the default selected property of an option
+ // Accessing the parent's selectedIndex property fixes it
+ if ( name === "selected" && !jQuery.support.optSelected ) {
+ var parent = elem.parentNode;
+ if ( parent ) {
+ parent.selectedIndex;
- elem[ name ] = value;
+ // Make sure that it also works with optgroups, see #5701
+ if ( parent.parentNode ) {
+ parent.parentNode.selectedIndex;
}
+ }
+ }
- // browsers index elements by id/name on forms, give priority to attributes.
- if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) {
- return elem.getAttributeNode( name ).nodeValue;
+ // If applicable, access the attribute via the DOM 0 way
+ // 'in' checks fail in Blackberry 4.7 #6931
+ if ( (name in elem || elem[ name ] !== undefined) && notxml && !special ) {
+ if ( set ) {
+ // We can't allow the type property to be changed (since it causes problems in IE)
+ if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) {
+ jQuery.error( "type property can't be changed" );
}
- // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
- // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
- if ( name === "tabIndex" ) {
- var attributeNode = elem.getAttributeNode( "tabIndex" );
+ if ( value === null ) {
+ if ( elem.nodeType === 1 ) {
+ elem.removeAttribute( name );
+ }
- return attributeNode && attributeNode.specified ?
- attributeNode.value :
- rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
- 0 :
- undefined;
+ } else {
+ elem[ name ] = value;
}
+ }
- return elem[ name ];
+ // browsers index elements by id/name on forms, give priority to attributes.
+ if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) {
+ return elem.getAttributeNode( name ).nodeValue;
}
- if ( !jQuery.support.style && notxml && name === "style" ) {
- if ( set ) {
- elem.style.cssText = "" + value;
- }
+ // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+ // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+ if ( name === "tabIndex" ) {
+ var attributeNode = elem.getAttributeNode( "tabIndex" );
- return elem.style.cssText;
+ return attributeNode && attributeNode.specified ?
+ attributeNode.value :
+ rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+ 0 :
+ undefined;
}
+ return elem[ name ];
+ }
+
+ if ( !jQuery.support.style && notxml && name === "style" ) {
if ( set ) {
- // convert the value to a string (all browsers do this but IE) see #1070
- elem.setAttribute( name, "" + value );
+ elem.style.cssText = "" + value;
}
- var attr = !jQuery.support.hrefNormalized && notxml && special ?
- // Some attributes require a special call on IE
- elem.getAttribute( name, 2 ) :
- elem.getAttribute( name );
+ return elem.style.cssText;
+ }
- // Non-existent attributes return null, we normalize to undefined
- return attr === null ? undefined : attr;
+ if ( set ) {
+ // convert the value to a string (all browsers do this but IE) see #1070
+ elem.setAttribute( name, "" + value );
}
- // elem is actually elem.style ... set the style
- // Using attr for specific style information is now deprecated. Use style insead.
- return jQuery.style( elem, name, value );
+ // Ensure that missing attributes return undefined
+ // Blackberry 4.7 returns "" from getAttribute #6938
+ if ( !elem.attributes[ name ] && (elem.hasAttribute && !elem.hasAttribute( name )) ) {
+ return undefined;
+ }
+
+ var attr = !jQuery.support.hrefNormalized && notxml && special ?
+ // Some attributes require a special call on IE
+ elem.getAttribute( name, 2 ) :
+ elem.getAttribute( name );
+
+ // Non-existent attributes return null, we normalize to undefined
+ return attr === null ? undefined : attr;
}
});
-var fcleanup = function( nm ) {
- return nm.replace(/[^\w\s\.\|`]/g, function( ch ) {
- return "\\" + ch;
- });
-};
+
+
+
+
+var rnamespaces = /\.(.*)$/,
+ rformElems = /^(?:textarea|input|select)$/i,
+ rperiod = /\./g,
+ rspace = / /g,
+ rescape = /[^\w\s.|`]/g,
+ fcleanup = function( nm ) {
+ return nm.replace(rescape, "\\$&");
+ },
+ focusCounts = { focusin: 0, focusout: 0 };
/*
* A number of helper functions used for managing events.
@@ -1546,111 +1828,137 @@ jQuery.event = {
// For whatever reason, IE has trouble passing the window object
// around, causing it to be cloned in the process
- if ( elem.setInterval && ( elem !== window && !elem.frameElement ) ) {
+ if ( jQuery.isWindow( elem ) && ( elem !== window && !elem.frameElement ) ) {
elem = window;
}
+ if ( handler === false ) {
+ handler = returnFalse;
+ } else if ( !handler ) {
+ // Fixes bug #7229. Fix recommended by jdalton
+ return;
+ }
+
+ var handleObjIn, handleObj;
+
+ if ( handler.handler ) {
+ handleObjIn = handler;
+ handler = handleObjIn.handler;
+ }
+
// Make sure that the function being executed has a unique ID
if ( !handler.guid ) {
handler.guid = jQuery.guid++;
}
- // if data is passed, bind to handler
- if ( data !== undefined ) {
- // Create temporary function pointer to original handler
- var fn = handler;
-
- // Create unique handler function, wrapped around original handler
- handler = jQuery.proxy( fn );
+ // Init the element's event structure
+ var elemData = jQuery.data( elem );
- // Store data in unique handler
- handler.data = data;
+ // If no elemData is found then we must be trying to bind to one of the
+ // banned noData elements
+ if ( !elemData ) {
+ return;
}
- // Init the element's event structure
- var events = jQuery.data( elem, "events" ) || jQuery.data( elem, "events", {} ),
- handle = jQuery.data( elem, "handle" ), eventHandle;
+ // Use a key less likely to result in collisions for plain JS objects.
+ // Fixes bug #7150.
+ var eventKey = elem.nodeType ? "events" : "__events__",
+ events = elemData[ eventKey ],
+ eventHandle = elemData.handle;
+
+ if ( typeof events === "function" ) {
+ // On plain objects events is a fn that holds the the data
+ // which prevents this data from being JSON serialized
+ // the function does not need to be called, it just contains the data
+ eventHandle = events.handle;
+ events = events.events;
+
+ } else if ( !events ) {
+ if ( !elem.nodeType ) {
+ // On plain objects, create a fn that acts as the holder
+ // of the values to avoid JSON serialization of event data
+ elemData[ eventKey ] = elemData = function(){};
+ }
- if ( !handle ) {
- eventHandle = function() {
+ elemData.events = events = {};
+ }
+
+ if ( !eventHandle ) {
+ elemData.handle = eventHandle = function() {
// Handle the second event of a trigger and when
// an event is called after a page has unloaded
return typeof jQuery !== "undefined" && !jQuery.event.triggered ?
jQuery.event.handle.apply( eventHandle.elem, arguments ) :
undefined;
};
-
- handle = jQuery.data( elem, "handle", eventHandle );
- }
-
- // If no handle is found then we must be trying to bind to one of the
- // banned noData elements
- if ( !handle ) {
- return;
}
// Add elem as a property of the handle function
- // This is to prevent a memory leak with non-native
- // event in IE.
- handle.elem = elem;
+ // This is to prevent a memory leak with non-native events in IE.
+ eventHandle.elem = elem;
// Handle multiple events separated by a space
// jQuery(...).bind("mouseover mouseout", fn);
- types = types.split( /\s+/ );
+ types = types.split(" ");
- var type, i = 0;
+ var type, i = 0, namespaces;
while ( (type = types[ i++ ]) ) {
- // Namespaced event handlers
- var namespaces = type.split(".");
- type = namespaces.shift();
+ handleObj = handleObjIn ?
+ jQuery.extend({}, handleObjIn) :
+ { handler: handler, data: data };
- if ( i > 1 ) {
- handler = jQuery.proxy( handler );
+ // Namespaced event handlers
+ if ( type.indexOf(".") > -1 ) {
+ namespaces = type.split(".");
+ type = namespaces.shift();
+ handleObj.namespace = namespaces.slice(0).sort().join(".");
- if ( data !== undefined ) {
- handler.data = data;
- }
+ } else {
+ namespaces = [];
+ handleObj.namespace = "";
}
- handler.type = namespaces.slice(0).sort().join(".");
+ handleObj.type = type;
+ if ( !handleObj.guid ) {
+ handleObj.guid = handler.guid;
+ }
// Get the current list of functions bound to this event
var handlers = events[ type ],
- special = this.special[ type ] || {};
+ special = jQuery.event.special[ type ] || {};
// Init the event handler queue
if ( !handlers ) {
- handlers = events[ type ] = {};
+ handlers = events[ type ] = [];
// Check for a special event handler
// Only use addEventListener/attachEvent if the special
// events handler returns false
- if ( !special.setup || special.setup.call( elem, data, namespaces, handler) === false ) {
+ if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
// Bind the global event handler to the element
if ( elem.addEventListener ) {
- elem.addEventListener( type, handle, false );
+ elem.addEventListener( type, eventHandle, false );
+
} else if ( elem.attachEvent ) {
- elem.attachEvent( "on" + type, handle );
+ elem.attachEvent( "on" + type, eventHandle );
}
}
}
if ( special.add ) {
- var modifiedHandler = special.add.call( elem, handler, data, namespaces, handlers );
- if ( modifiedHandler && jQuery.isFunction( modifiedHandler ) ) {
- modifiedHandler.guid = modifiedHandler.guid || handler.guid;
- modifiedHandler.data = modifiedHandler.data || handler.data;
- modifiedHandler.type = modifiedHandler.type || handler.type;
- handler = modifiedHandler;
- }
- }
-
+ special.add.call( elem, handleObj );
+
+ if ( !handleObj.handler.guid ) {
+ handleObj.handler.guid = handler.guid;
+ }
+ }
+
// Add the function to the element's handler list
- handlers[ handler.guid ] = handler;
+ handlers.push( handleObj );
// Keep track of which events have been used, for global triggering
- this.global[ type ] = true;
+ jQuery.event.global[ type ] = true;
}
// Nullify elem to prevent memory leaks in IE
@@ -1660,90 +1968,134 @@ jQuery.event = {
global: {},
// Detach an event or set of events from an element
- remove: function( elem, types, handler ) {
+ remove: function( elem, types, handler, pos ) {
// don't do events on text and comment nodes
if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
return;
}
- var events = jQuery.data( elem, "events" ), ret, type, fn;
+ if ( handler === false ) {
+ handler = returnFalse;
+ }
- if ( events ) {
- // Unbind all events for the element
- if ( types === undefined || (typeof types === "string" && types.charAt(0) === ".") ) {
- for ( type in events ) {
- this.remove( elem, type + (types || "") );
- }
- } else {
- // types is actually an event object here
- if ( types.type ) {
- handler = types.handler;
- types = types.type;
+ var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType,
+ eventKey = elem.nodeType ? "events" : "__events__",
+ elemData = jQuery.data( elem ),
+ events = elemData && elemData[ eventKey ];
+
+ if ( !elemData || !events ) {
+ return;
+ }
+
+ if ( typeof events === "function" ) {
+ elemData = events;
+ events = events.events;
+ }
+
+ // types is actually an event object here
+ if ( types && types.type ) {
+ handler = types.handler;
+ types = types.type;
+ }
+
+ // Unbind all events for the element
+ if ( !types || typeof types === "string" && types.charAt(0) === "." ) {
+ types = types || "";
+
+ for ( type in events ) {
+ jQuery.event.remove( elem, type + types );
+ }
+
+ return;
+ }
+
+ // Handle multiple events separated by a space
+ // jQuery(...).unbind("mouseover mouseout", fn);
+ types = types.split(" ");
+
+ while ( (type = types[ i++ ]) ) {
+ origType = type;
+ handleObj = null;
+ all = type.indexOf(".") < 0;
+ namespaces = [];
+
+ if ( !all ) {
+ // Namespaced event handlers
+ namespaces = type.split(".");
+ type = namespaces.shift();
+
+ namespace = new RegExp("(^|\\.)" +
+ jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)");
+ }
+
+ eventType = events[ type ];
+
+ if ( !eventType ) {
+ continue;
+ }
+
+ if ( !handler ) {
+ for ( j = 0; j < eventType.length; j++ ) {
+ handleObj = eventType[ j ];
+
+ if ( all || namespace.test( handleObj.namespace ) ) {
+ jQuery.event.remove( elem, origType, handleObj.handler, j );
+ eventType.splice( j--, 1 );
+ }
}
- // Handle multiple events separated by a space
- // jQuery(...).unbind("mouseover mouseout", fn);
- types = types.split(/\s+/);
- var i = 0;
- while ( (type = types[ i++ ]) ) {
- // Namespaced event handlers
- var namespaces = type.split(".");
- type = namespaces.shift();
- var all = !namespaces.length,
- cleaned = jQuery.map( namespaces.slice(0).sort(), fcleanup ),
- namespace = new RegExp("(^|\\.)" + cleaned.join("\\.(?:.*\\.)?") + "(\\.|$)"),
- special = this.special[ type ] || {};
-
- if ( events[ type ] ) {
- // remove the given handler for the given type
- if ( handler ) {
- fn = events[ type ][ handler.guid ];
- delete events[ type ][ handler.guid ];
-
- // remove all handlers for the given type
- } else {
- for ( var handle in events[ type ] ) {
- // Handle the removal of namespaced events
- if ( all || namespace.test( events[ type ][ handle ].type ) ) {
- delete events[ type ][ handle ];
- }
- }
+ continue;
+ }
+
+ special = jQuery.event.special[ type ] || {};
+
+ for ( j = pos || 0; j < eventType.length; j++ ) {
+ handleObj = eventType[ j ];
+
+ if ( handler.guid === handleObj.guid ) {
+ // remove the given handler for the given type
+ if ( all || namespace.test( handleObj.namespace ) ) {
+ if ( pos == null ) {
+ eventType.splice( j--, 1 );
}
if ( special.remove ) {
- special.remove.call( elem, namespaces, fn);
+ special.remove.call( elem, handleObj );
}
+ }
- // remove generic event handler if no more handlers exist
- for ( ret in events[ type ] ) {
- break;
- }
- if ( !ret ) {
- if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
- if ( elem.removeEventListener ) {
- elem.removeEventListener( type, jQuery.data( elem, "handle" ), false );
- } else if ( elem.detachEvent ) {
- elem.detachEvent( "on" + type, jQuery.data( elem, "handle" ) );
- }
- }
- ret = null;
- delete events[ type ];
- }
+ if ( pos != null ) {
+ break;
}
}
}
- // Remove the expando if it's no longer used
- for ( ret in events ) {
- break;
- }
- if ( !ret ) {
- var handle = jQuery.data( elem, "handle" );
- if ( handle ) {
- handle.elem = null;
+ // remove generic event handler if no more handlers exist
+ if ( eventType.length === 0 || pos != null && eventType.length === 1 ) {
+ if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
+ jQuery.removeEvent( elem, type, elemData.handle );
}
- jQuery.removeData( elem, "events" );
- jQuery.removeData( elem, "handle" );
+
+ ret = null;
+ delete events[ type ];
+ }
+ }
+
+ // Remove the expando if it's no longer used
+ if ( jQuery.isEmptyObject( events ) ) {
+ var handle = elemData.handle;
+ if ( handle ) {
+ handle.elem = null;
+ }
+
+ delete elemData.events;
+ delete elemData.handle;
+
+ if ( typeof elemData === "function" ) {
+ jQuery.removeData( elem, eventKey );
+
+ } else if ( jQuery.isEmptyObject( elemData ) ) {
+ jQuery.removeData( elem );
}
}
},
@@ -1757,7 +2109,7 @@ jQuery.event = {
if ( !bubbling ) {
event = typeof event === "object" ?
// jQuery.Event object
- event[expando] ? event :
+ event[ jQuery.expando ] ? event :
// Object literal
jQuery.extend( jQuery.Event(type), event ) :
// Just the event type (string)
@@ -1774,7 +2126,7 @@ jQuery.event = {
event.stopPropagation();
// Only trigger if we've ever bound an event for it
- if ( this.global[ type ] ) {
+ if ( jQuery.event.global[ type ] ) {
jQuery.each( jQuery.cache, function() {
if ( this.events && this.events[type] ) {
jQuery.event.trigger( event, data, this.handle.elem );
@@ -1802,7 +2154,10 @@ jQuery.event = {
event.currentTarget = elem;
// Trigger the event, it is assumed that "handle" is a function
- var handle = jQuery.data( elem, "handle" );
+ var handle = elem.nodeType ?
+ jQuery.data( elem, "handle" ) :
+ (jQuery.data( elem, "__events__" ) || {}).handle;
+
if ( handle ) {
handle.apply( elem, data );
}
@@ -1814,97 +2169,118 @@ jQuery.event = {
if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) {
if ( elem[ "on" + type ] && elem[ "on" + type ].apply( elem, data ) === false ) {
event.result = false;
+ event.preventDefault();
}
}
// prevent IE from throwing an error for some elements with some event types, see #3533
- } catch (e) {}
+ } catch (inlineError) {}
if ( !event.isPropagationStopped() && parent ) {
jQuery.event.trigger( event, data, parent, true );
} else if ( !event.isDefaultPrevented() ) {
- var target = event.target, old,
- isClick = jQuery.nodeName(target, "a") && type === "click";
+ var old,
+ target = event.target,
+ targetType = type.replace( rnamespaces, "" ),
+ isClick = jQuery.nodeName( target, "a" ) && targetType === "click",
+ special = jQuery.event.special[ targetType ] || {};
+
+ if ( (!special._default || special._default.call( elem, event ) === false) &&
+ !isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) {
- if ( !isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) {
try {
- if ( target[ type ] ) {
+ if ( target[ targetType ] ) {
// Make sure that we don't accidentally re-trigger the onFOO events
- old = target[ "on" + type ];
+ old = target[ "on" + targetType ];
if ( old ) {
- target[ "on" + type ] = null;
+ target[ "on" + targetType ] = null;
}
- this.triggered = true;
- target[ type ]();
+ jQuery.event.triggered = true;
+ target[ targetType ]();
}
// prevent IE from throwing an error for some elements with some event types, see #3533
- } catch (e) {}
+ } catch (triggerError) {}
if ( old ) {
- target[ "on" + type ] = old;
+ target[ "on" + targetType ] = old;
}
- this.triggered = false;
+ jQuery.event.triggered = false;
}
}
},
handle: function( event ) {
- // returned undefined or false
- var all, handlers;
+ var all, handlers, namespaces, namespace_re, events,
+ namespace_sort = [],
+ args = jQuery.makeArray( arguments );
- event = arguments[0] = jQuery.event.fix( event || window.event );
+ event = args[0] = jQuery.event.fix( event || window.event );
event.currentTarget = this;
// Namespaced event handlers
- var namespaces = event.type.split(".");
- event.type = namespaces.shift();
+ all = event.type.indexOf(".") < 0 && !event.exclusive;
+
+ if ( !all ) {
+ namespaces = event.type.split(".");
+ event.type = namespaces.shift();
+ namespace_sort = namespaces.slice(0).sort();
+ namespace_re = new RegExp("(^|\\.)" + namespace_sort.join("\\.(?:.*\\.)?") + "(\\.|$)");
+ }
+
+ event.namespace = event.namespace || namespace_sort.join(".");
- // Cache this now, all = true means, any handler
- all = !namespaces.length && !event.exclusive;
+ events = jQuery.data(this, this.nodeType ? "events" : "__events__");
- var namespace = new RegExp("(^|\\.)" + namespaces.slice(0).sort().join("\\.(?:.*\\.)?") + "(\\.|$)");
+ if ( typeof events === "function" ) {
+ events = events.events;
+ }
- handlers = ( jQuery.data(this, "events") || {} )[ event.type ];
+ handlers = (events || {})[ event.type ];
- for ( var j in handlers ) {
- var handler = handlers[ j ];
+ if ( events && handlers ) {
+ // Clone the handlers to prevent manipulation
+ handlers = handlers.slice(0);
- // Filter the functions by class
- if ( all || namespace.test(handler.type) ) {
- // Pass in a reference to the handler function itself
- // So that we can later remove it
- event.handler = handler;
- event.data = handler.data;
+ for ( var j = 0, l = handlers.length; j < l; j++ ) {
+ var handleObj = handlers[ j ];
- var ret = handler.apply( this, arguments );
+ // Filter the functions by class
+ if ( all || namespace_re.test( handleObj.namespace ) ) {
+ // Pass in a reference to the handler function itself
+ // So that we can later remove it
+ event.handler = handleObj.handler;
+ event.data = handleObj.data;
+ event.handleObj = handleObj;
+
+ var ret = handleObj.handler.apply( this, args );
- if ( ret !== undefined ) {
- event.result = ret;
- if ( ret === false ) {
- event.preventDefault();
- event.stopPropagation();
+ if ( ret !== undefined ) {
+ event.result = ret;
+ if ( ret === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
}
- }
- if ( event.isImmediatePropagationStopped() ) {
- break;
+ if ( event.isImmediatePropagationStopped() ) {
+ break;
+ }
}
-
}
}
return event.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 originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
+ 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( event ) {
- if ( event[ expando ] ) {
+ if ( event[ jQuery.expando ] ) {
return event;
}
@@ -1920,7 +2296,8 @@ jQuery.event = {
// Fix target property, if necessary
if ( !event.target ) {
- event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either
+ // Fixes #1925 where srcElement might not be defined either
+ event.target = event.srcElement || document;
}
// check if target is a textnode (safari)
@@ -1935,14 +2312,16 @@ jQuery.event = {
// Calculate pageX/Y if missing and clientX/Y available
if ( event.pageX == null && event.clientX != null ) {
- var doc = document.documentElement, body = document.body;
+ var doc = document.documentElement,
+ body = document.body;
+
event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
}
// Add which for key events
- if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) ) {
- event.which = event.charCode || event.keyCode;
+ if ( event.which == null && (event.charCode != null || event.keyCode != null) ) {
+ event.which = event.charCode != null ? event.charCode : event.keyCode;
}
// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
@@ -1973,44 +2352,27 @@ jQuery.event = {
},
live: {
- add: function( proxy, data, namespaces, live ) {
- jQuery.extend( proxy, data || {} );
-
- proxy.guid += data.selector + data.live;
- data.liveProxy = proxy;
-
- jQuery.event.add( this, data.live, liveHandler, data );
-
+ add: function( handleObj ) {
+ jQuery.event.add( this,
+ liveConvert( handleObj.origType, handleObj.selector ),
+ jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) );
},
- remove: function( namespaces ) {
- if ( namespaces.length ) {
- var remove = 0, name = new RegExp("(^|\\.)" + namespaces[0] + "(\\.|$)");
-
- jQuery.each( (jQuery.data(this, "events").live || {}), function() {
- if ( name.test(this.type) ) {
- remove++;
- }
- });
-
- if ( remove < 1 ) {
- jQuery.event.remove( this, namespaces[0], liveHandler );
- }
- }
- },
- special: {}
+ remove: function( handleObj ) {
+ jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj );
+ }
},
+
beforeunload: {
- setup: function( data, namespaces, fn ) {
+ setup: function( data, namespaces, eventHandle ) {
// We only want to do this special case on windows
- if ( this.setInterval ) {
- this.onbeforeunload = fn;
+ if ( jQuery.isWindow( this ) ) {
+ this.onbeforeunload = eventHandle;
}
-
- return false;
},
- teardown: function( namespaces, fn ) {
- if ( this.onbeforeunload === fn ) {
+
+ teardown: function( namespaces, eventHandle ) {
+ if ( this.onbeforeunload === eventHandle ) {
this.onbeforeunload = null;
}
}
@@ -2018,6 +2380,18 @@ jQuery.event = {
}
};
+jQuery.removeEvent = document.removeEventListener ?
+ function( elem, type, handle ) {
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, handle, false );
+ }
+ } :
+ function( elem, type, handle ) {
+ if ( elem.detachEvent ) {
+ elem.detachEvent( "on" + type, handle );
+ }
+ };
+
jQuery.Event = function( src ) {
// Allow instantiation without the 'new' keyword
if ( !this.preventDefault ) {
@@ -2035,10 +2409,10 @@ jQuery.Event = function( src ) {
// timeStamp is buggy for some events on Firefox(#3843)
// So we won't rely on the native value
- this.timeStamp = now();
+ this.timeStamp = jQuery.now();
// Mark it as fixed
- this[ expando ] = true;
+ this[ jQuery.expando ] = true;
};
function returnFalse() {
@@ -2062,9 +2436,11 @@ jQuery.Event.prototype = {
// if preventDefault exists run it on the original event
if ( e.preventDefault ) {
e.preventDefault();
- }
+
// otherwise set the returnValue property of the original event to false (IE)
- e.returnValue = false;
+ } else {
+ e.returnValue = false;
+ }
},
stopPropagation: function() {
this.isPropagationStopped = returnTrue;
@@ -2095,27 +2471,24 @@ var withinElement = function( event ) {
// Check if mouse(over|out) are still within the same parent element
var parent = event.relatedTarget;
- // Traverse up the tree
- while ( parent && parent !== this ) {
- // Firefox sometimes assigns relatedTarget a XUL element
- // which we cannot access the parentNode property of
- try {
+ // Firefox sometimes assigns relatedTarget a XUL element
+ // which we cannot access the parentNode property of
+ try {
+ // Traverse up the tree
+ while ( parent && parent !== this ) {
parent = parent.parentNode;
-
- // assuming we've left the element since we most likely mousedover a xul element
- } catch(e) {
- break;
}
- }
- if ( parent !== this ) {
- // set the correct event type
- event.type = event.data;
+ if ( parent !== this ) {
+ // set the correct event type
+ event.type = event.data;
- // handle event if we actually just moused on to a non sub-element
- jQuery.event.handle.apply( this, arguments );
- }
+ // handle event if we actually just moused on to a non sub-element
+ jQuery.event.handle.apply( this, arguments );
+ }
+ // assuming we've left the element since we most likely mousedover a xul element
+ } catch(e) { }
},
// In case of event delegation, we only need to rename the event.type,
@@ -2143,67 +2516,70 @@ jQuery.each({
// submit delegation
if ( !jQuery.support.submitBubbles ) {
-jQuery.event.special.submit = {
- setup: function( data, namespaces, fn ) {
- if ( this.nodeName.toLowerCase() !== "form" ) {
- jQuery.event.add(this, "click.specialSubmit." + fn.guid, function( e ) {
- var elem = e.target, type = elem.type;
+ jQuery.event.special.submit = {
+ setup: function( data, namespaces ) {
+ if ( this.nodeName.toLowerCase() !== "form" ) {
+ jQuery.event.add(this, "click.specialSubmit", function( e ) {
+ var elem = e.target,
+ type = elem.type;
- if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
- return trigger( "submit", this, arguments );
- }
- });
+ if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
+ e.liveFired = undefined;
+ return trigger( "submit", this, arguments );
+ }
+ });
- jQuery.event.add(this, "keypress.specialSubmit." + fn.guid, function( e ) {
- var elem = e.target, type = elem.type;
+ jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
+ var elem = e.target,
+ type = elem.type;
- if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
- return trigger( "submit", this, arguments );
- }
- });
+ if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
+ e.liveFired = undefined;
+ return trigger( "submit", this, arguments );
+ }
+ });
- } else {
- return false;
- }
- },
+ } else {
+ return false;
+ }
+ },
- remove: function( namespaces, fn ) {
- jQuery.event.remove( this, "click.specialSubmit" + (fn ? "."+fn.guid : "") );
- jQuery.event.remove( this, "keypress.specialSubmit" + (fn ? "."+fn.guid : "") );
- }
-};
+ teardown: function( namespaces ) {
+ jQuery.event.remove( this, ".specialSubmit" );
+ }
+ };
}
// change delegation, happens here so we have bind.
if ( !jQuery.support.changeBubbles ) {
-var formElems = /textarea|input|select/i;
+ var changeFilters,
-function getVal( elem ) {
- var type = elem.type, val = elem.value;
+ getVal = function( elem ) {
+ var type = elem.type, val = elem.value;
- if ( type === "radio" || type === "checkbox" ) {
- val = elem.checked;
+ if ( type === "radio" || type === "checkbox" ) {
+ val = elem.checked;
- } else if ( type === "select-multiple" ) {
- val = elem.selectedIndex > -1 ?
- jQuery.map( elem.options, function( elem ) {
- return elem.selected;
- }).join("-") :
- "";
+ } else if ( type === "select-multiple" ) {
+ val = elem.selectedIndex > -1 ?
+ jQuery.map( elem.options, function( elem ) {
+ return elem.selected;
+ }).join("-") :
+ "";
- } else if ( elem.nodeName.toLowerCase() === "select" ) {
- val = elem.selectedIndex;
- }
+ } else if ( elem.nodeName.toLowerCase() === "select" ) {
+ val = elem.selectedIndex;
+ }
- return val;
-}
+ return val;
+ },
-function testChange( e ) {
+ testChange = function testChange( e ) {
var elem = e.target, data, val;
- if ( !formElems.test( elem.nodeName ) || elem.readOnly ) {
+ if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) {
return;
}
@@ -2221,63 +2597,69 @@ function testChange( e ) {
if ( data != null || val ) {
e.type = "change";
+ e.liveFired = undefined;
return jQuery.event.trigger( e, arguments[1], elem );
}
-}
+ };
-jQuery.event.special.change = {
- filters: {
- focusout: testChange,
+ jQuery.event.special.change = {
+ filters: {
+ focusout: testChange,
- click: function( e ) {
- var elem = e.target, type = elem.type;
+ beforedeactivate: testChange,
- if ( type === "radio" || type === "checkbox" || elem.nodeName.toLowerCase() === "select" ) {
- return testChange.call( this, e );
- }
- },
+ click: function( e ) {
+ var elem = e.target, type = elem.type;
- // Change has to be called before submit
- // Keydown will be called before keypress, which is used in submit-event delegation
- keydown: function( e ) {
- var elem = e.target, type = elem.type;
+ if ( type === "radio" || type === "checkbox" || elem.nodeName.toLowerCase() === "select" ) {
+ return testChange.call( this, e );
+ }
+ },
+
+ // Change has to be called before submit
+ // Keydown will be called before keypress, which is used in submit-event delegation
+ keydown: function( e ) {
+ var elem = e.target, type = elem.type;
+
+ if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") ||
+ (e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
+ type === "select-multiple" ) {
+ return testChange.call( this, e );
+ }
+ },
- if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") ||
- (e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
- type === "select-multiple" ) {
- return testChange.call( this, e );
+ // Beforeactivate happens also before the previous element is blurred
+ // with this event you can't trigger a change event, but you can store
+ // information
+ beforeactivate: function( e ) {
+ var elem = e.target;
+ jQuery.data( elem, "_change_data", getVal(elem) );
}
},
- // Beforeactivate happens also before the previous element is blurred
- // with this event you can't trigger a change event, but you can store
- // information/focus[in] is not needed anymore
- beforeactivate: function( e ) {
- var elem = e.target;
+ setup: function( data, namespaces ) {
+ if ( this.type === "file" ) {
+ return false;
+ }
- if ( elem.nodeName.toLowerCase() === "input" && elem.type === "radio" ) {
- jQuery.data( elem, "_change_data", getVal(elem) );
+ for ( var type in changeFilters ) {
+ jQuery.event.add( this, type + ".specialChange", changeFilters[type] );
}
- }
- },
- setup: function( data, namespaces, fn ) {
- for ( var type in changeFilters ) {
- jQuery.event.add( this, type + ".specialChange." + fn.guid, changeFilters[type] );
- }
- return formElems.test( this.nodeName );
- },
- remove: function( namespaces, fn ) {
- for ( var type in changeFilters ) {
- jQuery.event.remove( this, type + ".specialChange" + (fn ? "."+fn.guid : ""), changeFilters[type] );
- }
+ return rformElems.test( this.nodeName );
+ },
- return formElems.test( this.nodeName );
- }
-};
+ teardown: function( namespaces ) {
+ jQuery.event.remove( this, ".specialChange" );
-var changeFilters = jQuery.event.special.change.filters;
+ return rformElems.test( this.nodeName );
+ }
+ };
+
+ changeFilters = jQuery.event.special.change.filters;
+ // Handle when the input is .focus()'d
+ changeFilters.focus = changeFilters.beforeactivate;
}
function trigger( type, elem, args ) {
@@ -2290,17 +2672,21 @@ if ( document.addEventListener ) {
jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
jQuery.event.special[ fix ] = {
setup: function() {
- this.addEventListener( orig, handler, true );
+ if ( focusCounts[fix]++ === 0 ) {
+ document.addEventListener( orig, handler, true );
+ }
},
teardown: function() {
- this.removeEventListener( orig, handler, true );
+ if ( --focusCounts[fix] === 0 ) {
+ document.removeEventListener( orig, handler, true );
+ }
}
};
function handler( e ) {
e = jQuery.event.fix( e );
e.type = fix;
- return jQuery.event.handle.call( this, e );
+ return jQuery.event.trigger( e, null, e.target );
}
});
}
@@ -2315,7 +2701,7 @@ jQuery.each(["bind", "one"], function( i, name ) {
return this;
}
- if ( jQuery.isFunction( data ) ) {
+ if ( jQuery.isFunction( data ) || data === false ) {
fn = data;
data = undefined;
}
@@ -2325,11 +2711,16 @@ jQuery.each(["bind", "one"], function( i, name ) {
return fn.apply( this, arguments );
}) : fn;
- return type === "unload" && name !== "one" ?
- this.one( type, data, fn ) :
- this.each(function() {
- jQuery.event.add( this, type, handler, data );
- });
+ if ( type === "unload" && name !== "one" ) {
+ this.one( type, data, fn );
+
+ } else {
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ jQuery.event.add( this[i], type, handler, data );
+ }
+ }
+
+ return this;
};
});
@@ -2340,13 +2731,29 @@ jQuery.fn.extend({
for ( var key in type ) {
this.unbind(key, type[key]);
}
- return this;
+
+ } else {
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ jQuery.event.remove( this[i], type, fn );
+ }
}
- return this.each(function() {
- jQuery.event.remove( this, type, fn );
- });
+ return this;
+ },
+
+ delegate: function( selector, types, data, fn ) {
+ return this.live( types, data, fn, selector );
+ },
+
+ undelegate: function( selector, types, fn ) {
+ if ( arguments.length === 0 ) {
+ return this.unbind( "live" );
+
+ } else {
+ return this.die( types, null, fn, selector );
+ }
},
+
trigger: function( type, data ) {
return this.each(function() {
jQuery.event.trigger( type, data, this );
@@ -2365,7 +2772,8 @@ jQuery.fn.extend({
toggle: function( fn ) {
// Save reference to arguments for access in closure
- var args = arguments, i = 1;
+ var args = arguments,
+ i = 1;
// link all the functions, so any of them can unbind this click handler
while ( i < args.length ) {
@@ -2390,80 +2798,129 @@ jQuery.fn.extend({
}
});
+var liveMap = {
+ focus: "focusin",
+ blur: "focusout",
+ mouseenter: "mouseover",
+ mouseleave: "mouseout"
+};
+
jQuery.each(["live", "die"], function( i, name ) {
- jQuery.fn[ name ] = function( types, data, fn ) {
- var type, i = 0;
+ jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) {
+ var type, i = 0, match, namespaces, preType,
+ selector = origSelector || this.selector,
+ context = origSelector ? this : jQuery( this.context );
+
+ if ( typeof types === "object" && !types.preventDefault ) {
+ for ( var key in types ) {
+ context[ name ]( key, data, types[key], selector );
+ }
+
+ return this;
+ }
if ( jQuery.isFunction( data ) ) {
fn = data;
data = undefined;
}
- types = (types || "").split( /\s+/ );
+ types = (types || "").split(" ");
while ( (type = types[ i++ ]) != null ) {
- type = type === "focus" ? "focusin" : // focus --> focusin
- type === "blur" ? "focusout" : // blur --> focusout
- type === "hover" ? types.push("mouseleave") && "mouseenter" : // hover support
- type;
-
+ match = rnamespaces.exec( type );
+ namespaces = "";
+
+ if ( match ) {
+ namespaces = match[0];
+ type = type.replace( rnamespaces, "" );
+ }
+
+ if ( type === "hover" ) {
+ types.push( "mouseenter" + namespaces, "mouseleave" + namespaces );
+ continue;
+ }
+
+ preType = type;
+
+ if ( type === "focus" || type === "blur" ) {
+ types.push( liveMap[ type ] + namespaces );
+ type = type + namespaces;
+
+ } else {
+ type = (liveMap[ type ] || type) + namespaces;
+ }
+
if ( name === "live" ) {
// bind live handler
- jQuery( this.context ).bind( liveConvert( type, this.selector ), {
- data: data, selector: this.selector, live: type
- }, fn );
+ for ( var j = 0, l = context.length; j < l; j++ ) {
+ jQuery.event.add( context[j], "live." + liveConvert( type, selector ),
+ { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } );
+ }
} else {
// unbind live handler
- jQuery( this.context ).unbind( liveConvert( type, this.selector ), fn ? { guid: fn.guid + this.selector + type } : null );
+ context.unbind( "live." + liveConvert( type, selector ), fn );
}
}
return this;
- }
+ };
});
function liveHandler( event ) {
- var stop, elems = [], selectors = [], args = arguments,
- related, match, fn, elem, j, i, l, data,
- live = jQuery.extend({}, jQuery.data( this, "events" ).live);
+ var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret,
+ elems = [],
+ selectors = [],
+ events = jQuery.data( this, this.nodeType ? "events" : "__events__" );
+
+ if ( typeof events === "function" ) {
+ events = events.events;
+ }
// Make sure we avoid non-left-click bubbling in Firefox (#3861)
- if ( event.button && event.type === "click" ) {
+ if ( event.liveFired === this || !events || !events.live || event.button && event.type === "click" ) {
return;
}
+
+ if ( event.namespace ) {
+ namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)");
+ }
- for ( j in live ) {
- fn = live[j];
- if ( fn.live === event.type ||
- fn.altLive && jQuery.inArray(event.type, fn.altLive) > -1 ) {
+ event.liveFired = this;
+
+ var live = events.live.slice(0);
+
+ for ( j = 0; j < live.length; j++ ) {
+ handleObj = live[j];
+
+ if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) {
+ selectors.push( handleObj.selector );
- data = fn.data;
- if ( !(data.beforeFilter && data.beforeFilter[event.type] &&
- !data.beforeFilter[event.type](event)) ) {
- selectors.push( fn.selector );
- }
} else {
- delete live[j];
+ live.splice( j--, 1 );
}
}
match = jQuery( event.target ).closest( selectors, event.currentTarget );
for ( i = 0, l = match.length; i < l; i++ ) {
- for ( j in live ) {
- fn = live[j];
- elem = match[i].elem;
- related = null;
+ close = match[i];
+
+ for ( j = 0; j < live.length; j++ ) {
+ handleObj = live[j];
+
+ if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) ) {
+ elem = close.elem;
+ related = null;
- if ( match[i].selector === fn.selector ) {
// Those two events require additional checking
- if ( fn.live === "mouseenter" || fn.live === "mouseleave" ) {
- related = jQuery( event.relatedTarget ).closest( fn.selector )[0];
+ if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) {
+ event.type = handleObj.preType;
+ related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0];
}
if ( !related || related !== elem ) {
- elems.push({ elem: elem, fn: fn });
+ elems.push({ elem: elem, handleObj: handleObj, level: close.level });
}
}
}
@@ -2471,19 +2928,34 @@ function liveHandler( event ) {
for ( i = 0, l = elems.length; i < l; i++ ) {
match = elems[i];
- event.currentTarget = match.elem;
- event.data = match.fn.data;
- if ( match.fn.apply( match.elem, args ) === false ) {
- stop = false;
+
+ if ( maxLevel && match.level > maxLevel ) {
break;
}
+
+ event.currentTarget = match.elem;
+ event.data = match.handleObj.data;
+ event.handleObj = match.handleObj;
+
+ ret = match.handleObj.origHandler.apply( match.elem, arguments );
+
+ if ( ret === false || event.isPropagationStopped() ) {
+ maxLevel = match.level;
+
+ if ( ret === false ) {
+ stop = false;
+ }
+ if ( event.isImmediatePropagationStopped() ) {
+ break;
+ }
+ }
}
return stop;
}
function liveConvert( type, selector ) {
- return "live." + (type ? type + "." : "") + selector.replace(/\./g, "`").replace(/ /g, "&");
+ return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspace, "&");
}
jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
@@ -2491,8 +2963,15 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
"change select submit keydown keypress keyup error").split(" "), function( i, name ) {
// Handle event binding
- jQuery.fn[ name ] = function( fn ) {
- return fn ? this.bind( name, fn ) : this.trigger( name );
+ jQuery.fn[ name ] = function( data, fn ) {
+ if ( fn == null ) {
+ fn = data;
+ data = null;
+ }
+
+ return arguments.length > 0 ?
+ this.bind( name, data, fn ) :
+ this.trigger( name );
};
if ( jQuery.attrFn ) {
@@ -2505,7 +2984,7 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
// More info:
// - http://isaacschlueter.com/2006/10/msie-memory-leaks/
if ( window.attachEvent && !window.addEventListener ) {
- window.attachEvent("onunload", function() {
+ jQuery(window).bind("unload", function() {
for ( var id in jQuery.cache ) {
if ( jQuery.cache[ id ].handle ) {
// Try/Catch is to handle iframes being unloaded, see #4280
@@ -2516,6 +2995,8 @@ if ( window.attachEvent && !window.addEventListener ) {
}
});
}
+
+
/*!
* Sizzle CSS Selector Engine - v1.0
* Copyright 2009, The Dojo Foundation
@@ -2524,7 +3005,7 @@ if ( window.attachEvent && !window.addEventListener ) {
*/
(function(){
-var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
done = 0,
toString = Object.prototype.toString,
hasDuplicate = false,
@@ -2534,14 +3015,16 @@ var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^
// optimization where it does not always call our comparision
// function. If that is the case, discard the hasDuplicate value.
// Thus far that includes Google Chrome.
-[0, 0].sort(function(){
+[0, 0].sort(function() {
baseHasDuplicate = false;
return 0;
});
-var Sizzle = function(selector, context, results, seed) {
+var Sizzle = function( selector, context, results, seed ) {
results = results || [];
- var origContext = context = context || document;
+ context = context || document;
+
+ var origContext = context;
if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
return [];
@@ -2551,24 +3034,34 @@ var Sizzle = function(selector, context, results, seed) {
return results;
}
- var parts = [], m, set, checkSet, extra, prune = true, contextXML = isXML(context),
+ var m, set, checkSet, extra, ret, cur, pop, i,
+ prune = true,
+ contextXML = Sizzle.isXML( context ),
+ parts = [],
soFar = selector;
// Reset the position of the chunker regexp (start from head)
- while ( (chunker.exec(""), m = chunker.exec(soFar)) !== null ) {
- soFar = m[3];
+ do {
+ chunker.exec( "" );
+ m = chunker.exec( soFar );
+
+ if ( m ) {
+ soFar = m[3];
- parts.push( m[1] );
+ parts.push( m[1] );
- if ( m[2] ) {
- extra = m[3];
- break;
+ if ( m[2] ) {
+ extra = m[3];
+ break;
+ }
}
- }
+ } while ( m );
if ( parts.length > 1 && origPOS.exec( selector ) ) {
+
if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
set = posProcess( parts[0] + parts[1], context );
+
} else {
set = Expr.relative[ parts[0] ] ?
[ context ] :
@@ -2584,29 +3077,38 @@ var Sizzle = function(selector, context, results, seed) {
set = posProcess( selector, set );
}
}
+
} else {
// Take a shortcut and set the context if the root selector is an ID
// (but not if it'll be faster if the inner selector is an ID)
if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
- var ret = Sizzle.find( parts.shift(), context, contextXML );
- context = ret.expr ? Sizzle.filter( ret.expr, ret.set )[0] : ret.set[0];
+
+ ret = Sizzle.find( parts.shift(), context, contextXML );
+ context = ret.expr ?
+ Sizzle.filter( ret.expr, ret.set )[0] :
+ ret.set[0];
}
if ( context ) {
- var ret = seed ?
+ ret = seed ?
{ expr: parts.pop(), set: makeArray(seed) } :
Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
- set = ret.expr ? Sizzle.filter( ret.expr, ret.set ) : ret.set;
+
+ set = ret.expr ?
+ Sizzle.filter( ret.expr, ret.set ) :
+ ret.set;
if ( parts.length > 0 ) {
- checkSet = makeArray(set);
+ checkSet = makeArray( set );
+
} else {
prune = false;
}
while ( parts.length ) {
- var cur = parts.pop(), pop = cur;
+ cur = parts.pop();
+ pop = cur;
if ( !Expr.relative[ cur ] ) {
cur = "";
@@ -2620,6 +3122,7 @@ var Sizzle = function(selector, context, results, seed) {
Expr.relative[ cur ]( checkSet, pop, contextXML );
}
+
} else {
checkSet = parts = [];
}
@@ -2636,19 +3139,22 @@ var Sizzle = function(selector, context, results, seed) {
if ( toString.call(checkSet) === "[object Array]" ) {
if ( !prune ) {
results.push.apply( results, checkSet );
+
} else if ( context && context.nodeType === 1 ) {
- for ( var i = 0; checkSet[i] != null; i++ ) {
- if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && contains(context, checkSet[i])) ) {
+ for ( i = 0; checkSet[i] != null; i++ ) {
+ if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
results.push( set[i] );
}
}
+
} else {
- for ( var i = 0; checkSet[i] != null; i++ ) {
+ for ( i = 0; checkSet[i] != null; i++ ) {
if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
results.push( set[i] );
}
}
}
+
} else {
makeArray( checkSet, results );
}
@@ -2661,15 +3167,15 @@ var Sizzle = function(selector, context, results, seed) {
return results;
};
-Sizzle.uniqueSort = function(results){
+Sizzle.uniqueSort = function( results ) {
if ( sortOrder ) {
hasDuplicate = baseHasDuplicate;
- results.sort(sortOrder);
+ results.sort( sortOrder );
if ( hasDuplicate ) {
for ( var i = 1; i < results.length; i++ ) {
- if ( results[i] === results[i-1] ) {
- results.splice(i--, 1);
+ if ( results[i] === results[ i - 1 ] ) {
+ results.splice( i--, 1 );
}
}
}
@@ -2678,27 +3184,33 @@ Sizzle.uniqueSort = function(results){
return results;
};
-Sizzle.matches = function(expr, set){
- return Sizzle(expr, null, null, set);
+Sizzle.matches = function( expr, set ) {
+ return Sizzle( expr, null, null, set );
};
-Sizzle.find = function(expr, context, isXML){
- var set, match;
+Sizzle.matchesSelector = function( node, expr ) {
+ return Sizzle( expr, null, null, [node] ).length > 0;
+};
+
+Sizzle.find = function( expr, context, isXML ) {
+ var set;
if ( !expr ) {
return [];
}
for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
- var type = Expr.order[i], match;
+ var match,
+ type = Expr.order[i];
if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
var left = match[1];
- match.splice(1,1);
+ match.splice( 1, 1 );
if ( left.substr( left.length - 1 ) !== "\\" ) {
match[1] = (match[1] || "").replace(/\\/g, "");
set = Expr.find[ type ]( match, context, isXML );
+
if ( set != null ) {
expr = expr.replace( Expr.match[ type ], "" );
break;
@@ -2708,20 +3220,26 @@ Sizzle.find = function(expr, context, isXML){
}
if ( !set ) {
- set = context.getElementsByTagName("*");
+ set = context.getElementsByTagName( "*" );
}
- return {set: set, expr: expr};
+ return { set: set, expr: expr };
};
-Sizzle.filter = function(expr, set, inplace, not){
- var old = expr, result = [], curLoop = set, match, anyFound,
- isXMLFilter = set && set[0] && isXML(set[0]);
+Sizzle.filter = function( expr, set, inplace, not ) {
+ var match, anyFound,
+ old = expr,
+ result = [],
+ curLoop = set,
+ isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
while ( expr && set.length ) {
for ( var type in Expr.filter ) {
if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
- var filter = Expr.filter[ type ], found, item, left = match[1];
+ var found, item,
+ filter = Expr.filter[ type ],
+ left = match[1];
+
anyFound = false;
match.splice(1,1);
@@ -2739,6 +3257,7 @@ Sizzle.filter = function(expr, set, inplace, not){
if ( !match ) {
anyFound = found = true;
+
} else if ( match === true ) {
continue;
}
@@ -2753,9 +3272,11 @@ Sizzle.filter = function(expr, set, inplace, not){
if ( inplace && found != null ) {
if ( pass ) {
anyFound = true;
+
} else {
curLoop[i] = false;
}
+
} else if ( pass ) {
result.push( item );
anyFound = true;
@@ -2784,6 +3305,7 @@ Sizzle.filter = function(expr, set, inplace, not){
if ( expr === old ) {
if ( anyFound == null ) {
Sizzle.error( expr );
+
} else {
break;
}
@@ -2801,30 +3323,35 @@ Sizzle.error = function( msg ) {
var Expr = Sizzle.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|)\s*\]/,
- TAG: /^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,
- CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,
- POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,
- PSEUDO: /:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
+ ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+ CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+ NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
+ ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
+ TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
+ CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,
+ POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
+ PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
},
+
leftMatch: {},
+
attrMap: {
"class": "className",
"for": "htmlFor"
},
+
attrHandle: {
- href: function(elem){
- return elem.getAttribute("href");
+ href: function( elem ) {
+ return elem.getAttribute( "href" );
}
},
+
relative: {
"+": function(checkSet, part){
var isPartStr = typeof part === "string",
- isTag = isPartStr && !/\W/.test(part),
+ isTag = isPartStr && !/\W/.test( part ),
isPartStrNotTag = isPartStr && !isTag;
if ( isTag ) {
@@ -2845,22 +3372,29 @@ var Expr = Sizzle.selectors = {
Sizzle.filter( part, checkSet, true );
}
},
- ">": function(checkSet, part){
- var isPartStr = typeof part === "string";
- if ( isPartStr && !/\W/.test(part) ) {
+ ">": function( checkSet, part ) {
+ var elem,
+ isPartStr = typeof part === "string",
+ i = 0,
+ l = checkSet.length;
+
+ if ( isPartStr && !/\W/.test( part ) ) {
part = part.toLowerCase();
- for ( var i = 0, l = checkSet.length; i < l; i++ ) {
- var elem = checkSet[i];
+ for ( ; i < l; i++ ) {
+ elem = checkSet[i];
+
if ( elem ) {
var parent = elem.parentNode;
checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
}
}
+
} else {
- for ( var i = 0, l = checkSet.length; i < l; i++ ) {
- var elem = checkSet[i];
+ for ( ; i < l; i++ ) {
+ elem = checkSet[i];
+
if ( elem ) {
checkSet[i] = isPartStr ?
elem.parentNode :
@@ -2873,37 +3407,50 @@ var Expr = Sizzle.selectors = {
}
}
},
+
"": function(checkSet, part, isXML){
- var doneName = done++, checkFn = dirCheck;
+ var nodeCheck,
+ doneName = done++,
+ checkFn = dirCheck;
if ( typeof part === "string" && !/\W/.test(part) ) {
- var nodeCheck = part = part.toLowerCase();
+ part = part.toLowerCase();
+ nodeCheck = part;
checkFn = dirNodeCheck;
}
- checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML);
+ checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
},
- "~": function(checkSet, part, isXML){
- var doneName = done++, checkFn = dirCheck;
- if ( typeof part === "string" && !/\W/.test(part) ) {
- var nodeCheck = part = part.toLowerCase();
+ "~": function( checkSet, part, isXML ) {
+ var nodeCheck,
+ doneName = done++,
+ checkFn = dirCheck;
+
+ if ( typeof part === "string" && !/\W/.test( part ) ) {
+ part = part.toLowerCase();
+ nodeCheck = part;
checkFn = dirNodeCheck;
}
- checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML);
+ checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
}
},
+
find: {
- ID: function(match, context, isXML){
+ ID: function( match, context, isXML ) {
if ( typeof context.getElementById !== "undefined" && !isXML ) {
var m = context.getElementById(match[1]);
- return m ? [m] : [];
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ return m && m.parentNode ? [m] : [];
}
},
- NAME: function(match, context){
+
+ NAME: function( match, context ) {
if ( typeof context.getElementsByName !== "undefined" ) {
- var ret = [], results = context.getElementsByName(match[1]);
+ var ret = [],
+ results = context.getElementsByName( match[1] );
for ( var i = 0, l = results.length; i < l; i++ ) {
if ( results[i].getAttribute("name") === match[1] ) {
@@ -2914,12 +3461,13 @@ var Expr = Sizzle.selectors = {
return ret.length === 0 ? null : ret;
}
},
- TAG: function(match, context){
- return context.getElementsByTagName(match[1]);
+
+ TAG: function( match, context ) {
+ return context.getElementsByTagName( match[1] );
}
},
preFilter: {
- CLASS: function(match, curLoop, inplace, result, not, isXML){
+ CLASS: function( match, curLoop, inplace, result, not, isXML ) {
match = " " + match[1].replace(/\\/g, "") + " ";
if ( isXML ) {
@@ -2932,6 +3480,7 @@ var Expr = Sizzle.selectors = {
if ( !inplace ) {
result.push( elem );
}
+
} else if ( inplace ) {
curLoop[i] = false;
}
@@ -2940,13 +3489,16 @@ var Expr = Sizzle.selectors = {
return false;
},
- ID: function(match){
+
+ ID: function( match ) {
return match[1].replace(/\\/g, "");
},
- TAG: function(match, curLoop){
+
+ TAG: function( match, curLoop ) {
return match[1].toLowerCase();
},
- CHILD: function(match){
+
+ CHILD: function( match ) {
if ( match[1] === "nth" ) {
// parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
@@ -2963,7 +3515,8 @@ var Expr = Sizzle.selectors = {
return match;
},
- ATTR: function(match, curLoop, inplace, result, not, isXML){
+
+ ATTR: function( match, curLoop, inplace, result, not, isXML ) {
var name = match[1].replace(/\\/g, "");
if ( !isXML && Expr.attrMap[name] ) {
@@ -2976,159 +3529,203 @@ var Expr = Sizzle.selectors = {
return match;
},
- PSEUDO: function(match, curLoop, inplace, result, not){
+
+ PSEUDO: function( match, curLoop, inplace, result, not ) {
if ( match[1] === "not" ) {
// If we're dealing with a complex expression, or a simple one
if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
match[3] = Sizzle(match[3], null, null, curLoop);
+
} else {
var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
+
if ( !inplace ) {
result.push.apply( result, ret );
}
+
return false;
}
+
} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
return true;
}
return match;
},
- POS: function(match){
+
+ POS: function( match ) {
match.unshift( true );
+
return match;
}
},
+
filters: {
- enabled: function(elem){
+ enabled: function( elem ) {
return elem.disabled === false && elem.type !== "hidden";
},
- disabled: function(elem){
+
+ disabled: function( elem ) {
return elem.disabled === true;
},
- checked: function(elem){
+
+ checked: function( elem ) {
return elem.checked === true;
},
- selected: function(elem){
+
+ selected: function( elem ) {
// Accessing this property makes selected-by-default
// options in Safari work properly
elem.parentNode.selectedIndex;
+
return elem.selected === true;
},
- parent: function(elem){
+
+ parent: function( elem ) {
return !!elem.firstChild;
},
- empty: function(elem){
+
+ empty: function( elem ) {
return !elem.firstChild;
},
- has: function(elem, i, match){
+
+ has: function( elem, i, match ) {
return !!Sizzle( match[3], elem ).length;
},
- header: function(elem){
- return /h\d/i.test( elem.nodeName );
+
+ header: function( elem ) {
+ return (/h\d/i).test( elem.nodeName );
},
- text: function(elem){
+
+ text: function( elem ) {
return "text" === elem.type;
},
- radio: function(elem){
+ radio: function( elem ) {
return "radio" === elem.type;
},
- checkbox: function(elem){
+
+ checkbox: function( elem ) {
return "checkbox" === elem.type;
},
- file: function(elem){
+
+ file: function( elem ) {
return "file" === elem.type;
},
- password: function(elem){
+ password: function( elem ) {
return "password" === elem.type;
},
- submit: function(elem){
+
+ submit: function( elem ) {
return "submit" === elem.type;
},
- image: function(elem){
+
+ image: function( elem ) {
return "image" === elem.type;
},
- reset: function(elem){
+
+ reset: function( elem ) {
return "reset" === elem.type;
},
- button: function(elem){
+
+ button: function( elem ) {
return "button" === elem.type || elem.nodeName.toLowerCase() === "button";
},
- input: function(elem){
- return /input|select|textarea|button/i.test(elem.nodeName);
+
+ input: function( elem ) {
+ return (/input|select|textarea|button/i).test( elem.nodeName );
}
},
setFilters: {
- first: function(elem, i){
+ first: function( elem, i ) {
return i === 0;
},
- last: function(elem, i, match, array){
+
+ last: function( elem, i, match, array ) {
return i === array.length - 1;
},
- even: function(elem, i){
+
+ even: function( elem, i ) {
return i % 2 === 0;
},
- odd: function(elem, i){
+
+ odd: function( elem, i ) {
return i % 2 === 1;
},
- lt: function(elem, i, match){
+
+ lt: function( elem, i, match ) {
return i < match[3] - 0;
},
- gt: function(elem, i, match){
+
+ gt: function( elem, i, match ) {
return i > match[3] - 0;
},
- nth: function(elem, i, match){
+
+ nth: function( elem, i, match ) {
return match[3] - 0 === i;
},
- eq: function(elem, i, match){
+
+ eq: function( elem, i, match ) {
return match[3] - 0 === i;
}
},
filter: {
- PSEUDO: function(elem, match, i, array){
- var name = match[1], filter = Expr.filters[ name ];
+ PSEUDO: function( elem, match, i, array ) {
+ var name = match[1],
+ filter = Expr.filters[ name ];
if ( filter ) {
return filter( elem, i, match, array );
+
} else if ( name === "contains" ) {
- return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0;
+ return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0;
+
} else if ( name === "not" ) {
var not = match[3];
- for ( var i = 0, l = not.length; i < l; i++ ) {
- if ( not[i] === elem ) {
+ for ( var j = 0, l = not.length; j < l; j++ ) {
+ if ( not[j] === elem ) {
return false;
}
}
return true;
+
} else {
Sizzle.error( "Syntax error, unrecognized expression: " + name );
}
},
- CHILD: function(elem, match){
- var type = match[1], node = elem;
- switch (type) {
- case 'only':
- case 'first':
+
+ CHILD: function( elem, match ) {
+ var type = match[1],
+ node = elem;
+
+ switch ( type ) {
+ case "only":
+ case "first":
while ( (node = node.previousSibling) ) {
if ( node.nodeType === 1 ) {
return false;
}
}
+
if ( type === "first" ) {
return true;
}
+
node = elem;
- case 'last':
+
+ case "last":
while ( (node = node.nextSibling) ) {
if ( node.nodeType === 1 ) {
return false;
}
}
+
return true;
- case 'nth':
- var first = match[2], last = match[3];
+
+ case "nth":
+ var first = match[2],
+ last = match[3];
if ( first === 1 && last === 0 ) {
return true;
@@ -3139,33 +3736,41 @@ var Expr = Sizzle.selectors = {
if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
var count = 0;
+
for ( node = parent.firstChild; node; node = node.nextSibling ) {
if ( node.nodeType === 1 ) {
node.nodeIndex = ++count;
}
}
+
parent.sizcache = doneName;
}
var diff = elem.nodeIndex - last;
+
if ( first === 0 ) {
return diff === 0;
+
} else {
return ( diff % first === 0 && diff / first >= 0 );
}
}
},
- ID: function(elem, match){
+
+ ID: function( elem, match ) {
return elem.nodeType === 1 && elem.getAttribute("id") === match;
},
- TAG: function(elem, match){
+
+ TAG: function( elem, match ) {
return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match;
},
- CLASS: function(elem, match){
+
+ CLASS: function( elem, match ) {
return (" " + (elem.className || elem.getAttribute("class")) + " ")
.indexOf( match ) > -1;
},
- ATTR: function(elem, match){
+
+ ATTR: function( elem, match ) {
var name = match[1],
result = Expr.attrHandle[ name ] ?
Expr.attrHandle[ name ]( elem ) :
@@ -3196,8 +3801,10 @@ var Expr = Sizzle.selectors = {
value === check || value.substr(0, check.length + 1) === check + "-" :
false;
},
- POS: function(elem, match, i, array){
- var name = match[2], filter = Expr.setFilters[ name ];
+
+ POS: function( elem, match, i, array ) {
+ var name = match[2],
+ filter = Expr.setFilters[ name ];
if ( filter ) {
return filter( elem, i, match, array );
@@ -3206,16 +3813,17 @@ var Expr = Sizzle.selectors = {
}
};
-var origPOS = Expr.match.POS;
+var origPOS = Expr.match.POS,
+ fescape = function(all, num){
+ return "\\" + (num - 0 + 1);
+ };
for ( var type in Expr.match ) {
- Expr.match[ type ] = new RegExp( Expr.match[ type ].source + /(?![^\[]*\])(?![^\(]*\))/.source );
- Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, function(all, num){
- return "\\" + (num - 0 + 1);
- }));
+ Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
+ Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
}
-var makeArray = function(array, results) {
+var makeArray = function( array, results ) {
array = Array.prototype.slice.call( array, 0 );
if ( results ) {
@@ -3228,23 +3836,28 @@ var makeArray = function(array, results) {
// Perform a simple check to determine if the browser is capable of
// converting a NodeList to an array using builtin methods.
+// Also verifies that the returned array holds DOM nodes
+// (which is not the case in the Blackberry browser)
try {
- Array.prototype.slice.call( document.documentElement.childNodes, 0 );
+ Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
// Provide a fallback method if it does not work
-} catch(e){
- makeArray = function(array, results) {
- var ret = results || [];
+} catch( e ) {
+ makeArray = function( array, results ) {
+ var i = 0,
+ ret = results || [];
if ( toString.call(array) === "[object Array]" ) {
Array.prototype.push.apply( ret, array );
+
} else {
if ( typeof array.length === "number" ) {
- for ( var i = 0, l = array.length; i < l; i++ ) {
+ for ( var l = array.length; i < l; i++ ) {
ret.push( array[i] );
}
+
} else {
- for ( var i = 0; array[i]; i++ ) {
+ for ( ; array[i]; i++ ) {
ret.push( array[i] );
}
}
@@ -3254,62 +3867,99 @@ try {
};
}
-var sortOrder;
+var sortOrder, siblingCheck;
if ( document.documentElement.compareDocumentPosition ) {
sortOrder = function( a, b ) {
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
- if ( a == b ) {
- hasDuplicate = true;
- }
return a.compareDocumentPosition ? -1 : 1;
}
- var ret = a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1;
- if ( ret === 0 ) {
- hasDuplicate = true;
- }
- return ret;
+ return a.compareDocumentPosition(b) & 4 ? -1 : 1;
};
-} else if ( "sourceIndex" in document.documentElement ) {
+
+} else {
sortOrder = function( a, b ) {
- if ( !a.sourceIndex || !b.sourceIndex ) {
- if ( a == b ) {
- hasDuplicate = true;
- }
- return a.sourceIndex ? -1 : 1;
+ var al, bl,
+ ap = [],
+ bp = [],
+ aup = a.parentNode,
+ bup = b.parentNode,
+ cur = aup;
+
+ // The nodes are identical, we can exit early
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+
+ // If the nodes are siblings (or identical) we can do a quick check
+ } else if ( aup === bup ) {
+ return siblingCheck( a, b );
+
+ // If no parents were found then the nodes are disconnected
+ } else if ( !aup ) {
+ return -1;
+
+ } else if ( !bup ) {
+ return 1;
}
- var ret = a.sourceIndex - b.sourceIndex;
- if ( ret === 0 ) {
- hasDuplicate = true;
+ // Otherwise they're somewhere else in the tree so we need
+ // to build up a full list of the parentNodes for comparison
+ while ( cur ) {
+ ap.unshift( cur );
+ cur = cur.parentNode;
}
- return ret;
- };
-} else if ( document.createRange ) {
- sortOrder = function( a, b ) {
- if ( !a.ownerDocument || !b.ownerDocument ) {
- if ( a == b ) {
- hasDuplicate = true;
+
+ cur = bup;
+
+ while ( cur ) {
+ bp.unshift( cur );
+ cur = cur.parentNode;
+ }
+
+ al = ap.length;
+ bl = bp.length;
+
+ // Start walking down the tree looking for a discrepancy
+ for ( var i = 0; i < al && i < bl; i++ ) {
+ if ( ap[i] !== bp[i] ) {
+ return siblingCheck( ap[i], bp[i] );
}
- return a.ownerDocument ? -1 : 1;
}
- var aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange();
- aRange.setStart(a, 0);
- aRange.setEnd(a, 0);
- bRange.setStart(b, 0);
- bRange.setEnd(b, 0);
- var ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange);
- if ( ret === 0 ) {
- hasDuplicate = true;
+ // We ended someplace up the tree so do a sibling check
+ return i === al ?
+ siblingCheck( a, bp[i], -1 ) :
+ siblingCheck( ap[i], b, 1 );
+ };
+
+ siblingCheck = function( a, b, ret ) {
+ if ( a === b ) {
+ return ret;
}
- return ret;
+
+ var cur = a.nextSibling;
+
+ while ( cur ) {
+ if ( cur === b ) {
+ return -1;
+ }
+
+ cur = cur.nextSibling;
+ }
+
+ return 1;
};
}
// Utility function for retreiving the text value of an array of DOM nodes
-function getText( elems ) {
+Sizzle.getText = function( elems ) {
var ret = "", elem;
for ( var i = 0; elems[i]; i++ ) {
@@ -3321,43 +3971,52 @@ function getText( elems ) {
// Traverse everything else, except comment nodes
} else if ( elem.nodeType !== 8 ) {
- ret += getText( elem.childNodes );
+ ret += Sizzle.getText( elem.childNodes );
}
}
return ret;
-}
+};
// Check to see if the browser returns elements by name when
// querying by getElementById (and provide a workaround)
(function(){
// We're going to inject a fake input element with a specified name
var form = document.createElement("div"),
- id = "script" + (new Date).getTime();
+ id = "script" + (new Date()).getTime(),
+ root = document.documentElement;
+
form.innerHTML = "<a name='" + id + "'/>";
// Inject it into the root element, check its status, and remove it quickly
- var root = document.documentElement;
root.insertBefore( form, root.firstChild );
// The workaround has to do additional checks after a getElementById
// Which slows things down for other browsers (hence the branching)
if ( document.getElementById( id ) ) {
- Expr.find.ID = function(match, context, isXML){
+ Expr.find.ID = function( match, context, isXML ) {
if ( typeof context.getElementById !== "undefined" && !isXML ) {
var m = context.getElementById(match[1]);
- return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : [];
+
+ return m ?
+ m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
+ [m] :
+ undefined :
+ [];
}
};
- Expr.filter.ID = function(elem, match){
+ Expr.filter.ID = function( elem, match ) {
var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
+
return elem.nodeType === 1 && node && node.nodeValue === match;
};
}
root.removeChild( form );
- root = form = null; // release memory in IE
+
+ // release memory in IE
+ root = form = null;
})();
(function(){
@@ -3370,8 +4029,8 @@ function getText( elems ) {
// Make sure no comments are found
if ( div.getElementsByTagName("*").length > 0 ) {
- Expr.find.TAG = function(match, context){
- var results = context.getElementsByTagName(match[1]);
+ Expr.find.TAG = function( match, context ) {
+ var results = context.getElementsByTagName( match[1] );
// Filter out possible comments
if ( match[1] === "*" ) {
@@ -3392,19 +4051,25 @@ function getText( elems ) {
// Check to see if an attribute returns normalized href attributes
div.innerHTML = "<a href='#'></a>";
+
if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
div.firstChild.getAttribute("href") !== "#" ) {
- Expr.attrHandle.href = function(elem){
- return elem.getAttribute("href", 2);
+
+ Expr.attrHandle.href = function( elem ) {
+ return elem.getAttribute( "href", 2 );
};
}
- div = null; // release memory in IE
+ // release memory in IE
+ div = null;
})();
if ( document.querySelectorAll ) {
(function(){
- var oldSizzle = Sizzle, div = document.createElement("div");
+ var oldSizzle = Sizzle,
+ div = document.createElement("div"),
+ id = "__sizzle__";
+
div.innerHTML = "<p class='TEST'></p>";
// Safari can't handle uppercase or unicode characters when
@@ -3413,15 +4078,42 @@ if ( document.querySelectorAll ) {
return;
}
- Sizzle = function(query, context, extra, seed){
+ Sizzle = function( query, context, extra, seed ) {
context = context || document;
+ // Make sure that attribute selectors are quoted
+ query = query.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
+
// Only use querySelectorAll on non-XML documents
// (ID selectors don't work in non-HTML documents)
- if ( !seed && context.nodeType === 9 && !isXML(context) ) {
- try {
- return makeArray( context.querySelectorAll(query), extra );
- } catch(e){}
+ if ( !seed && !Sizzle.isXML(context) ) {
+ if ( context.nodeType === 9 ) {
+ try {
+ return makeArray( context.querySelectorAll(query), extra );
+ } catch(qsaError) {}
+
+ // qSA works strangely on Element-rooted queries
+ // We can work around this by specifying an extra ID on the root
+ // and working up from there (Thanks to Andrew Dupont for the technique)
+ // IE 8 doesn't work on object elements
+ } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+ var old = context.getAttribute( "id" ),
+ nid = old || id;
+
+ if ( !old ) {
+ context.setAttribute( "id", nid );
+ }
+
+ try {
+ return makeArray( context.querySelectorAll( "#" + nid + " " + query ), extra );
+
+ } catch(pseudoError) {
+ } finally {
+ if ( !old ) {
+ context.removeAttribute( "id" );
+ }
+ }
+ }
}
return oldSizzle(query, context, extra, seed);
@@ -3431,11 +4123,44 @@ if ( document.querySelectorAll ) {
Sizzle[ prop ] = oldSizzle[ prop ];
}
- div = null; // release memory in IE
+ // release memory in IE
+ div = null;
})();
}
(function(){
+ var html = document.documentElement,
+ matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector,
+ pseudoWorks = false;
+
+ try {
+ // This should fail with an exception
+ // Gecko does not error, returns false instead
+ matches.call( document.documentElement, "[test!='']:sizzle" );
+
+ } catch( pseudoError ) {
+ pseudoWorks = true;
+ }
+
+ if ( matches ) {
+ Sizzle.matchesSelector = function( node, expr ) {
+ // Make sure that attribute selectors are quoted
+ expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
+
+ if ( !Sizzle.isXML( node ) ) {
+ try {
+ if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
+ return matches.call( node, expr );
+ }
+ } catch(e) {}
+ }
+
+ return Sizzle(expr, null, null, [node]).length > 0;
+ };
+ }
+})();
+
+(function(){
var div = document.createElement("div");
div.innerHTML = "<div class='test e'></div><div class='test'></div>";
@@ -3454,22 +4179,25 @@ if ( document.querySelectorAll ) {
}
Expr.order.splice(1, 0, "CLASS");
- Expr.find.CLASS = function(match, context, isXML) {
+ Expr.find.CLASS = function( match, context, isXML ) {
if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
return context.getElementsByClassName(match[1]);
}
};
- div = null; // release memory in IE
+ // release memory in IE
+ div = null;
})();
function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
for ( var i = 0, l = checkSet.length; i < l; i++ ) {
var elem = checkSet[i];
+
if ( elem ) {
- elem = elem[dir];
var match = false;
+ elem = elem[dir];
+
while ( elem ) {
if ( elem.sizcache === doneName ) {
match = checkSet[elem.sizset];
@@ -3497,9 +4225,11 @@ function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
for ( var i = 0, l = checkSet.length; i < l; i++ ) {
var elem = checkSet[i];
+
if ( elem ) {
- elem = elem[dir];
var match = false;
+
+ elem = elem[dir];
while ( elem ) {
if ( elem.sizcache === doneName ) {
@@ -3512,6 +4242,7 @@ function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
elem.sizcache = doneName;
elem.sizset = i;
}
+
if ( typeof cur !== "string" ) {
if ( elem === cur ) {
match = true;
@@ -3532,21 +4263,34 @@ function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
}
}
-var contains = document.compareDocumentPosition ? function(a, b){
- return a.compareDocumentPosition(b) & 16;
-} : function(a, b){
- return a !== b && (a.contains ? a.contains(b) : true);
-};
+if ( document.documentElement.contains ) {
+ Sizzle.contains = function( a, b ) {
+ return a !== b && (a.contains ? a.contains(b) : true);
+ };
+
+} else if ( document.documentElement.compareDocumentPosition ) {
+ Sizzle.contains = function( a, b ) {
+ return !!(a.compareDocumentPosition(b) & 16);
+ };
-var isXML = function(elem){
+} else {
+ Sizzle.contains = function() {
+ return false;
+ };
+}
+
+Sizzle.isXML = function( elem ) {
// documentElement is verified for cases where it doesn't yet exist
// (such as loading iframes in IE - #4833)
var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
+
return documentElement ? documentElement.nodeName !== "HTML" : false;
};
-var posProcess = function(selector, context){
- var tmpSet = [], later = "", match,
+var posProcess = function( selector, context ) {
+ var match,
+ tmpSet = [],
+ later = "",
root = context.nodeType ? [context] : context;
// Position selectors must be done after the filter
@@ -3570,53 +4314,26 @@ jQuery.find = Sizzle;
jQuery.expr = Sizzle.selectors;
jQuery.expr[":"] = jQuery.expr.filters;
jQuery.unique = Sizzle.uniqueSort;
-jQuery.getText = getText;
-jQuery.isXMLDoc = isXML;
-jQuery.contains = contains;
-
-return;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
-window.Sizzle = Sizzle;
})();
+
+
var runtil = /Until$/,
rparentsprev = /^(?:parents|prevUntil|prevAll)/,
// Note: This RegExp should be improved, or likely pulled from Sizzle
rmultiselector = /,/,
- slice = Array.prototype.slice;
-
-// Implement the identical functionality for filter and not
-var winnow = function( elements, qualifier, keep ) {
- if ( jQuery.isFunction( qualifier ) ) {
- return jQuery.grep(elements, function( elem, i ) {
- return !!qualifier.call( elem, i, elem ) === keep;
- });
-
- } else if ( qualifier.nodeType ) {
- return jQuery.grep(elements, function( elem, i ) {
- return (elem === qualifier) === keep;
- });
-
- } else if ( typeof qualifier === "string" ) {
- var filtered = jQuery.grep(elements, function( elem ) {
- return elem.nodeType === 1;
- });
-
- if ( isSimple.test( qualifier ) ) {
- return jQuery.filter(qualifier, filtered, !keep);
- } else {
- qualifier = jQuery.filter( qualifier, filtered );
- }
- }
-
- return jQuery.grep(elements, function( elem, i ) {
- return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
- });
-};
+ isSimple = /^.[^:#\[\.,]*$/,
+ slice = Array.prototype.slice,
+ POS = jQuery.expr.match.POS;
jQuery.fn.extend({
find: function( selector ) {
- var ret = this.pushStack( "", "find", selector ), length = 0;
+ var ret = this.pushStack( "", "find", selector ),
+ length = 0;
for ( var i = 0, l = this.length; i < l; i++ ) {
length = ret.length;
@@ -3662,11 +4379,15 @@ jQuery.fn.extend({
},
closest: function( selectors, context ) {
+ var ret = [], i, l, cur = this[0];
+
if ( jQuery.isArray( selectors ) ) {
- var ret = [], cur = this[0], match, matches = {}, selector;
+ var match, selector,
+ matches = {},
+ level = 1;
if ( cur && selectors.length ) {
- for ( var i = 0, l = selectors.length; i < l; i++ ) {
+ for ( i = 0, l = selectors.length; i < l; i++ ) {
selector = selectors[i];
if ( !matches[selector] ) {
@@ -3681,29 +4402,41 @@ jQuery.fn.extend({
match = matches[selector];
if ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) {
- ret.push({ selector: selector, elem: cur });
- delete matches[selector];
+ ret.push({ selector: selector, elem: cur, level: level });
}
}
+
cur = cur.parentNode;
+ level++;
}
}
return ret;
}
- var pos = jQuery.expr.match.POS.test( selectors ) ?
+ var pos = POS.test( selectors ) ?
jQuery( selectors, context || this.context ) : null;
- return this.map(function( i, cur ) {
- while ( cur && cur.ownerDocument && cur !== context ) {
- if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selectors) ) {
- return cur;
+ for ( i = 0, l = this.length; i < l; i++ ) {
+ cur = this[i];
+
+ while ( cur ) {
+ if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
+ ret.push( cur );
+ break;
+
+ } else {
+ cur = cur.parentNode;
+ if ( !cur || !cur.ownerDocument || cur === context ) {
+ break;
+ }
}
- cur = cur.parentNode;
}
- return null;
- });
+ }
+
+ ret = ret.length > 1 ? jQuery.unique(ret) : ret;
+
+ return this.pushStack( ret, "closest", selectors );
},
// Determine the position of an element within
@@ -3811,11 +4544,15 @@ jQuery.extend({
expr = ":not(" + expr + ")";
}
- return jQuery.find.matches(expr, elems);
+ return elems.length === 1 ?
+ jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
+ jQuery.find.matches(expr, elems);
},
dir: function( elem, dir, until ) {
- var matched = [], cur = elem[dir];
+ var matched = [],
+ cur = elem[ dir ];
+
while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
if ( cur.nodeType === 1 ) {
matched.push( cur );
@@ -3850,19 +4587,50 @@ jQuery.extend({
return r;
}
});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, keep ) {
+ if ( jQuery.isFunction( qualifier ) ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ var retVal = !!qualifier.call( elem, i, elem );
+ return retVal === keep;
+ });
+
+ } else if ( qualifier.nodeType ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ return (elem === qualifier) === keep;
+ });
+
+ } else if ( typeof qualifier === "string" ) {
+ var filtered = jQuery.grep(elements, function( elem ) {
+ return elem.nodeType === 1;
+ });
+
+ if ( isSimple.test( qualifier ) ) {
+ return jQuery.filter(qualifier, filtered, !keep);
+ } else {
+ qualifier = jQuery.filter( qualifier, filtered );
+ }
+ }
+
+ return jQuery.grep(elements, function( elem, i ) {
+ return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
+ });
+}
+
+
+
+
var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
rleadingWhitespace = /^\s+/,
- rxhtmlTag = /(<([\w:]+)[^>]*?)\/>/g,
- rselfClosing = /^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
rtagName = /<([\w:]+)/,
rtbody = /<tbody/i,
- rhtml = /<|&\w+;/,
- rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, // checked="checked" or checked (html5)
- fcloseTag = function( all, front, tag ) {
- return rselfClosing.test( tag ) ?
- all :
- front + "></" + tag + ">";
- },
+ rhtml = /<|&#?\w+;/,
+ rnocache = /<(?:script|object|embed|option|style)/i,
+ // checked="checked" or checked (html5)
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+ raction = /\=([^="'>\s]+\/)>/g,
wrapMap = {
option: [ 1, "<select multiple='multiple'>", "</select>" ],
legend: [ 1, "<fieldset>", "</fieldset>" ],
@@ -3887,7 +4655,8 @@ jQuery.fn.extend({
text: function( text ) {
if ( jQuery.isFunction(text) ) {
return this.each(function(i) {
- var self = jQuery(this);
+ var self = jQuery( this );
+
self.text( text.call(this, i, self.text()) );
});
}
@@ -3896,7 +4665,7 @@ jQuery.fn.extend({
return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
}
- return jQuery.getText( this );
+ return jQuery.text( this );
},
wrapAll: function( html ) {
@@ -3936,7 +4705,8 @@ jQuery.fn.extend({
}
return this.each(function() {
- var self = jQuery( this ), contents = self.contents();
+ var self = jQuery( this ),
+ contents = self.contents();
if ( contents.length ) {
contents.wrapAll( html );
@@ -4000,6 +4770,40 @@ jQuery.fn.extend({
return set;
}
},
+
+ // keepData is for internal use only--do not document
+ remove: function( selector, keepData ) {
+ for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
+ if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
+ if ( !keepData && elem.nodeType === 1 ) {
+ jQuery.cleanData( elem.getElementsByTagName("*") );
+ jQuery.cleanData( [ elem ] );
+ }
+
+ if ( elem.parentNode ) {
+ elem.parentNode.removeChild( elem );
+ }
+ }
+ }
+
+ return this;
+ },
+
+ empty: function() {
+ for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
+ // Remove element nodes and prevent memory leaks
+ if ( elem.nodeType === 1 ) {
+ jQuery.cleanData( elem.getElementsByTagName("*") );
+ }
+
+ // Remove any remaining nodes
+ while ( elem.firstChild ) {
+ elem.removeChild( elem.firstChild );
+ }
+ }
+
+ return this;
+ },
clone: function( events ) {
// Do the clone
@@ -4013,7 +4817,9 @@ jQuery.fn.extend({
// attributes in IE that are actually only stored
// as properties will not be copied (such as the
// the name attribute on an input).
- var html = this.outerHTML, ownerDocument = this.ownerDocument;
+ var html = this.outerHTML,
+ ownerDocument = this.ownerDocument;
+
if ( !html ) {
var div = ownerDocument.createElement("div");
div.appendChild( this.cloneNode(true) );
@@ -4021,6 +4827,8 @@ jQuery.fn.extend({
}
return jQuery.clean([html.replace(rinlinejQuery, "")
+ // Handle the case in IE 8 where action=/test/> self-closes a tag
+ .replace(raction, '="$1">')
.replace(rleadingWhitespace, "")], ownerDocument)[0];
} else {
return this.cloneNode(true);
@@ -4044,11 +4852,11 @@ jQuery.fn.extend({
null;
// See if we can take a shortcut and just use innerHTML
- } else if ( typeof value === "string" && !/<script/i.test( value ) &&
+ } else if ( typeof value === "string" && !rnocache.test( value ) &&
(jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
!wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
- value = value.replace(rxhtmlTag, fcloseTag);
+ value = value.replace(rxhtmlTag, "<$1></$2>");
try {
for ( var i = 0, l = this.length; i < l; i++ ) {
@@ -4066,10 +4874,9 @@ jQuery.fn.extend({
} else if ( jQuery.isFunction( value ) ) {
this.each(function(i){
- var self = jQuery(this), old = self.html();
- self.empty().append(function(){
- return value.call( this, i, old );
- });
+ var self = jQuery( this );
+
+ self.html( value.call(this, i, self.html()) );
});
} else {
@@ -4083,20 +4890,22 @@ jQuery.fn.extend({
if ( this[0] && this[0].parentNode ) {
// Make sure that the elements are removed from the DOM before they are inserted
// this can help fix replacing a parent with child elements
- if ( !jQuery.isFunction( value ) ) {
- value = jQuery( value ).detach();
-
- } else {
+ if ( jQuery.isFunction( value ) ) {
return this.each(function(i) {
var self = jQuery(this), old = self.html();
self.replaceWith( value.call( this, i, old ) );
});
}
+ if ( typeof value !== "string" ) {
+ value = jQuery( value ).detach();
+ }
+
return this.each(function() {
- var next = this.nextSibling, parent = this.parentNode;
+ var next = this.nextSibling,
+ parent = this.parentNode;
- jQuery(this).remove();
+ jQuery( this ).remove();
if ( next ) {
jQuery(next).before( value );
@@ -4114,7 +4923,9 @@ jQuery.fn.extend({
},
domManip: function( args, table, callback ) {
- var results, first, value = args[0], scripts = [];
+ var results, first, fragment, parent,
+ value = args[0],
+ scripts = [];
// We can't cloneNode fragments that contain checked, in WebKit
if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
@@ -4132,14 +4943,23 @@ jQuery.fn.extend({
}
if ( this[0] ) {
+ parent = value && value.parentNode;
+
// If we're in a fragment, just use that instead of building a new one
- if ( args[0] && args[0].parentNode && args[0].parentNode.nodeType === 11 ) {
- results = { fragment: args[0].parentNode };
+ if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
+ results = { fragment: parent };
+
} else {
- results = buildFragment( args, this, scripts );
+ results = jQuery.buildFragment( args, this, scripts );
+ }
+
+ fragment = results.fragment;
+
+ if ( fragment.childNodes.length === 1 ) {
+ first = fragment = fragment.firstChild;
+ } else {
+ first = fragment.firstChild;
}
-
- first = results.fragment.firstChild;
if ( first ) {
table = table && jQuery.nodeName( first, "tr" );
@@ -4149,29 +4969,29 @@ jQuery.fn.extend({
table ?
root(this[i], first) :
this[i],
- results.cacheable || this.length > 1 || i > 0 ?
- results.fragment.cloneNode(true) :
- results.fragment
+ i > 0 || results.cacheable || this.length > 1 ?
+ fragment.cloneNode(true) :
+ fragment
);
}
}
- if ( scripts ) {
+ if ( scripts.length ) {
jQuery.each( scripts, evalScript );
}
}
return this;
-
- function root( elem, cur ) {
- return jQuery.nodeName(elem, "table") ?
- (elem.getElementsByTagName("tbody")[0] ||
- elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
- elem;
- }
}
});
+function root( elem, cur ) {
+ return jQuery.nodeName(elem, "table") ?
+ (elem.getElementsByTagName("tbody")[0] ||
+ elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
+ elem;
+}
+
function cloneCopyEvent(orig, ret) {
var i = 0;
@@ -4180,7 +5000,9 @@ function cloneCopyEvent(orig, ret) {
return;
}
- var oldData = jQuery.data( orig[i++] ), curData = jQuery.data( this, oldData ), events = oldData && oldData.events;
+ var oldData = jQuery.data( orig[i++] ),
+ curData = jQuery.data( this, oldData ),
+ events = oldData && oldData.events;
if ( events ) {
delete curData.handle;
@@ -4195,11 +5017,17 @@ function cloneCopyEvent(orig, ret) {
});
}
-function buildFragment( args, nodes, scripts ) {
- var fragment, cacheable, cacheresults, doc;
+jQuery.buildFragment = function( args, nodes, scripts ) {
+ var fragment, cacheable, cacheresults,
+ doc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document);
+
+ // Only cache "small" (1/2 KB) strings that are associated with the main document
+ // Cloning options loses the selected state, so don't cache them
+ // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
+ // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
+ if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && doc === document &&
+ !rnocache.test( args[0] ) && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) {
- // webkit does not clone 'checked' attribute of radio inputs on cloneNode, so don't cache if string has a checked
- if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && args[0].indexOf("<option") < 0 && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) {
cacheable = true;
cacheresults = jQuery.fragments[ args[0] ];
if ( cacheresults ) {
@@ -4210,7 +5038,6 @@ function buildFragment( args, nodes, scripts ) {
}
if ( !fragment ) {
- doc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document);
fragment = doc.createDocumentFragment();
jQuery.clean( args, doc, fragment, scripts );
}
@@ -4220,7 +5047,7 @@ function buildFragment( args, nodes, scripts ) {
}
return { fragment: fragment, cacheable: cacheable };
-}
+};
jQuery.fragments = {};
@@ -4232,46 +5059,23 @@ jQuery.each({
replaceAll: "replaceWith"
}, function( name, original ) {
jQuery.fn[ name ] = function( selector ) {
- var ret = [], insert = jQuery( selector );
-
- for ( var i = 0, l = insert.length; i < l; i++ ) {
- var elems = (i > 0 ? this.clone(true) : this).get();
- jQuery.fn[ original ].apply( jQuery(insert[i]), elems );
- ret = ret.concat( elems );
- }
- return this.pushStack( ret, name, insert.selector );
- };
-});
-
-jQuery.each({
- // keepData is for internal use only--do not document
- remove: function( selector, keepData ) {
- if ( !selector || jQuery.filter( selector, [ this ] ).length ) {
- if ( !keepData && this.nodeType === 1 ) {
- jQuery.cleanData( this.getElementsByTagName("*") );
- jQuery.cleanData( [ this ] );
- }
-
- if ( this.parentNode ) {
- this.parentNode.removeChild( this );
+ var ret = [],
+ insert = jQuery( selector ),
+ parent = this.length === 1 && this[0].parentNode;
+
+ if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
+ insert[ original ]( this[0] );
+ return this;
+
+ } else {
+ for ( var i = 0, l = insert.length; i < l; i++ ) {
+ var elems = (i > 0 ? this.clone(true) : this).get();
+ jQuery( insert[i] )[ original ]( elems );
+ ret = ret.concat( elems );
}
+
+ return this.pushStack( ret, name, insert.selector );
}
- },
-
- empty: function() {
- // Remove element nodes and prevent memory leaks
- if ( this.nodeType === 1 ) {
- jQuery.cleanData( this.getElementsByTagName("*") );
- }
-
- // Remove any remaining nodes
- while ( this.firstChild ) {
- this.removeChild( this.firstChild );
- }
- }
-}, function( name, fn ) {
- jQuery.fn[ name ] = function() {
- return this.each( fn, arguments );
};
});
@@ -4286,13 +5090,13 @@ jQuery.extend({
var ret = [];
- jQuery.each(elems, function( i, elem ) {
+ for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
if ( typeof elem === "number" ) {
elem += "";
}
if ( !elem ) {
- return;
+ continue;
}
// Convert html string into DOM nodes
@@ -4301,7 +5105,7 @@ jQuery.extend({
} else if ( typeof elem === "string" ) {
// Fix "XHTML"-style tags in all browsers
- elem = elem.replace(rxhtmlTag, fcloseTag);
+ elem = elem.replace(rxhtmlTag, "<$1></$2>");
// Trim whitespace, otherwise indexOf won't work as expected
var tag = (rtagName.exec( elem ) || ["", ""])[1].toLowerCase(),
@@ -4343,7 +5147,7 @@ jQuery.extend({
div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
}
- elem = jQuery.makeArray( div.childNodes );
+ elem = div.childNodes;
}
if ( elem.nodeType ) {
@@ -4351,13 +5155,13 @@ jQuery.extend({
} else {
ret = jQuery.merge( ret, elem );
}
-
- });
+ }
if ( fragment ) {
- for ( var i = 0; ret[i]; i++ ) {
+ for ( i = 0; ret[i]; i++ ) {
if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
+
} else {
if ( ret[i].nodeType === 1 ) {
ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) );
@@ -4371,258 +5175,416 @@ jQuery.extend({
},
cleanData: function( elems ) {
- for ( var i = 0, elem, id; (elem = elems[i]) != null; i++ ) {
- jQuery.event.remove( elem );
- jQuery.removeData( elem );
+ var data, id, cache = jQuery.cache,
+ special = jQuery.event.special,
+ deleteExpando = jQuery.support.deleteExpando;
+
+ for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+ if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
+ continue;
+ }
+
+ id = elem[ jQuery.expando ];
+
+ if ( id ) {
+ data = cache[ id ];
+
+ if ( data && data.events ) {
+ for ( var type in data.events ) {
+ if ( special[ type ] ) {
+ jQuery.event.remove( elem, type );
+
+ } else {
+ jQuery.removeEvent( elem, type, data.handle );
+ }
+ }
+ }
+
+ if ( deleteExpando ) {
+ delete elem[ jQuery.expando ];
+
+ } else if ( elem.removeAttribute ) {
+ elem.removeAttribute( jQuery.expando );
+ }
+
+ delete cache[ id ];
+ }
}
}
});
-// exclude the following css properties to add px
-var rexclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,
- ralpha = /alpha\([^)]*\)/,
+
+function evalScript( i, elem ) {
+ if ( elem.src ) {
+ jQuery.ajax({
+ url: elem.src,
+ async: false,
+ dataType: "script"
+ });
+ } else {
+ jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
+ }
+
+ if ( elem.parentNode ) {
+ elem.parentNode.removeChild( elem );
+ }
+}
+
+
+
+
+var ralpha = /alpha\([^)]*\)/i,
ropacity = /opacity=([^)]*)/,
- rfloat = /float/i,
rdashAlpha = /-([a-z])/ig,
rupper = /([A-Z])/g,
rnumpx = /^-?\d+(?:px)?$/i,
rnum = /^-?\d/,
- cssShow = { position: "absolute", visibility: "hidden", display:"block" },
+ cssShow = { position: "absolute", visibility: "hidden", display: "block" },
cssWidth = [ "Left", "Right" ],
cssHeight = [ "Top", "Bottom" ],
+ curCSS,
+
+ getComputedStyle,
+ currentStyle,
- // cache check for defaultView.getComputedStyle
- getComputedStyle = document.defaultView && document.defaultView.getComputedStyle,
- // normalize float css property
- styleFloat = jQuery.support.cssFloat ? "cssFloat" : "styleFloat",
fcamelCase = function( all, letter ) {
return letter.toUpperCase();
};
jQuery.fn.css = function( name, value ) {
- return access( this, name, value, true, function( elem, name, value ) {
- if ( value === undefined ) {
- return jQuery.curCSS( elem, name );
- }
-
- if ( typeof value === "number" && !rexclude.test(name) ) {
- value += "px";
- }
+ // Setting 'undefined' is a no-op
+ if ( arguments.length === 2 && value === undefined ) {
+ return this;
+ }
- jQuery.style( elem, name, value );
+ return jQuery.access( this, name, value, true, function( elem, name, value ) {
+ return value !== undefined ?
+ jQuery.style( elem, name, value ) :
+ jQuery.css( elem, name );
});
};
jQuery.extend({
- style: function( elem, name, value ) {
- // don't set styles on text and comment nodes
- if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
- return undefined;
+ // Add in style property hooks for overriding the default
+ // behavior of getting and setting a style property
+ cssHooks: {
+ opacity: {
+ get: function( elem, computed ) {
+ if ( computed ) {
+ // We should always get a number back from opacity
+ var ret = curCSS( elem, "opacity", "opacity" );
+ return ret === "" ? "1" : ret;
+
+ } else {
+ return elem.style.opacity;
+ }
+ }
}
+ },
+
+ // Exclude the following css properties to add px
+ cssNumber: {
+ "zIndex": true,
+ "fontWeight": true,
+ "opacity": true,
+ "zoom": true,
+ "lineHeight": true
+ },
- // ignore negative width and height values #1599
- if ( (name === "width" || name === "height") && parseFloat(value) < 0 ) {
- value = undefined;
+ // Add in properties whose names you wish to fix before
+ // setting or getting the value
+ cssProps: {
+ // normalize float css property
+ "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
+ },
+
+ // Get and set the style property on a DOM Node
+ style: function( elem, name, value, extra ) {
+ // Don't set styles on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+ return;
}
- var style = elem.style || elem, set = value !== undefined;
+ // Make sure that we're working with the right name
+ var ret, origName = jQuery.camelCase( name ),
+ style = elem.style, hooks = jQuery.cssHooks[ origName ];
- // IE uses filters for opacity
- if ( !jQuery.support.opacity && name === "opacity" ) {
- if ( set ) {
- // IE has trouble with opacity if it does not have layout
- // Force it by setting the zoom level
- style.zoom = 1;
+ name = jQuery.cssProps[ origName ] || origName;
- // Set the alpha filter to set the opacity
- var opacity = parseInt( value, 10 ) + "" === "NaN" ? "" : "alpha(opacity=" + value * 100 + ")";
- var filter = style.filter || jQuery.curCSS( elem, "filter" ) || "";
- style.filter = ralpha.test(filter) ? filter.replace(ralpha, opacity) : opacity;
+ // Check if we're setting a value
+ if ( value !== undefined ) {
+ // Make sure that NaN and null values aren't set. See: #7116
+ if ( typeof value === "number" && isNaN( value ) || value == null ) {
+ return;
}
- return style.filter && style.filter.indexOf("opacity=") >= 0 ?
- (parseFloat( ropacity.exec(style.filter)[1] ) / 100) + "":
- "";
+ // If a number was passed in, add 'px' to the (except for certain CSS properties)
+ if ( typeof value === "number" && !jQuery.cssNumber[ origName ] ) {
+ value += "px";
+ }
+
+ // If a hook was provided, use that value, otherwise just set the specified value
+ if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
+ // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
+ // Fixes bug #5509
+ try {
+ style[ name ] = value;
+ } catch(e) {}
+ }
+
+ } else {
+ // If a hook was provided get the non-computed value from there
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+ return ret;
+ }
+
+ // Otherwise just get the value from the style object
+ return style[ name ];
}
+ },
+
+ css: function( elem, name, extra ) {
+ // Make sure that we're working with the right name
+ var ret, origName = jQuery.camelCase( name ),
+ hooks = jQuery.cssHooks[ origName ];
- // Make sure we're using the right name for getting the float value
- if ( rfloat.test( name ) ) {
- name = styleFloat;
+ name = jQuery.cssProps[ origName ] || origName;
+
+ // If a hook was provided get the computed value from there
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
+ return ret;
+
+ // Otherwise, if a way to get the computed value exists, use that
+ } else if ( curCSS ) {
+ return curCSS( elem, name, origName );
}
+ },
- name = name.replace(rdashAlpha, fcamelCase);
+ // A method for quickly swapping in/out CSS properties to get correct calculations
+ swap: function( elem, options, callback ) {
+ var old = {};
- if ( set ) {
- style[ name ] = value;
+ // Remember the old values, and insert the new ones
+ for ( var name in options ) {
+ old[ name ] = elem.style[ name ];
+ elem.style[ name ] = options[ name ];
}
- return style[ name ];
+ callback.call( elem );
+
+ // Revert the old values
+ for ( name in options ) {
+ elem.style[ name ] = old[ name ];
+ }
},
- css: function( elem, name, force, extra ) {
- if ( name === "width" || name === "height" ) {
- var val, props = cssShow, which = name === "width" ? cssWidth : cssHeight;
+ camelCase: function( string ) {
+ return string.replace( rdashAlpha, fcamelCase );
+ }
+});
+
+// DEPRECATED, Use jQuery.css() instead
+jQuery.curCSS = jQuery.css;
+
+jQuery.each(["height", "width"], function( i, name ) {
+ jQuery.cssHooks[ name ] = {
+ get: function( elem, computed, extra ) {
+ var val;
- function getWH() {
- val = name === "width" ? elem.offsetWidth : elem.offsetHeight;
+ if ( computed ) {
+ if ( elem.offsetWidth !== 0 ) {
+ val = getWH( elem, name, extra );
- if ( extra === "border" ) {
- return;
+ } else {
+ jQuery.swap( elem, cssShow, function() {
+ val = getWH( elem, name, extra );
+ });
}
- jQuery.each( which, function() {
- if ( !extra ) {
- val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0;
- }
+ if ( val <= 0 ) {
+ val = curCSS( elem, name, name );
- if ( extra === "margin" ) {
- val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0;
- } else {
- val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0;
+ if ( val === "0px" && currentStyle ) {
+ val = currentStyle( elem, name, name );
}
- });
- }
- if ( elem.offsetWidth !== 0 ) {
- getWH();
- } else {
- jQuery.swap( elem, props, getWH );
- }
+ if ( val != null ) {
+ // Should return "auto" instead of 0, use 0 for
+ // temporary backwards-compat
+ return val === "" || val === "auto" ? "0px" : val;
+ }
+ }
- return Math.max(0, Math.round(val));
- }
+ if ( val < 0 || val == null ) {
+ val = elem.style[ name ];
- return jQuery.curCSS( elem, name, force );
- },
+ // Should return "auto" instead of 0, use 0 for
+ // temporary backwards-compat
+ return val === "" || val === "auto" ? "0px" : val;
+ }
- curCSS: function( elem, name, force ) {
- var ret, style = elem.style, filter;
+ return typeof val === "string" ? val : val + "px";
+ }
+ },
- // IE uses filters for opacity
- if ( !jQuery.support.opacity && name === "opacity" && elem.currentStyle ) {
- ret = ropacity.test(elem.currentStyle.filter || "") ?
- (parseFloat(RegExp.$1) / 100) + "" :
- "";
+ set: function( elem, value ) {
+ if ( rnumpx.test( value ) ) {
+ // ignore negative width and height values #1599
+ value = parseFloat(value);
- return ret === "" ?
- "1" :
- ret;
- }
+ if ( value >= 0 ) {
+ return value + "px";
+ }
- // Make sure we're using the right name for getting the float value
- if ( rfloat.test( name ) ) {
- name = styleFloat;
+ } else {
+ return value;
+ }
}
+ };
+});
- if ( !force && style && style[ name ] ) {
- ret = style[ name ];
+if ( !jQuery.support.opacity ) {
+ jQuery.cssHooks.opacity = {
+ get: function( elem, computed ) {
+ // IE uses filters for opacity
+ return ropacity.test((computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "") ?
+ (parseFloat(RegExp.$1) / 100) + "" :
+ computed ? "1" : "";
+ },
- } else if ( getComputedStyle ) {
+ set: function( elem, value ) {
+ var style = elem.style;
- // Only "float" is needed here
- if ( rfloat.test( name ) ) {
- name = "float";
- }
+ // IE has trouble with opacity if it does not have layout
+ // Force it by setting the zoom level
+ style.zoom = 1;
- name = name.replace( rupper, "-$1" ).toLowerCase();
+ // Set the alpha filter to set the opacity
+ var opacity = jQuery.isNaN(value) ?
+ "" :
+ "alpha(opacity=" + value * 100 + ")",
+ filter = style.filter || "";
- var defaultView = elem.ownerDocument.defaultView;
+ style.filter = ralpha.test(filter) ?
+ filter.replace(ralpha, opacity) :
+ style.filter + ' ' + opacity;
+ }
+ };
+}
- if ( !defaultView ) {
- return null;
- }
+if ( document.defaultView && document.defaultView.getComputedStyle ) {
+ getComputedStyle = function( elem, newName, name ) {
+ var ret, defaultView, computedStyle;
- var computedStyle = defaultView.getComputedStyle( elem, null );
+ name = name.replace( rupper, "-$1" ).toLowerCase();
- if ( computedStyle ) {
- ret = computedStyle.getPropertyValue( name );
- }
+ if ( !(defaultView = elem.ownerDocument.defaultView) ) {
+ return undefined;
+ }
- // We should always get a number back from opacity
- if ( name === "opacity" && ret === "" ) {
- ret = "1";
+ if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
+ ret = computedStyle.getPropertyValue( name );
+ if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
+ ret = jQuery.style( elem, name );
}
+ }
- } else if ( elem.currentStyle ) {
- var camelCase = name.replace(rdashAlpha, fcamelCase);
+ return ret;
+ };
+}
- ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];
+if ( document.documentElement.currentStyle ) {
+ currentStyle = function( elem, name ) {
+ var left, rsLeft,
+ ret = elem.currentStyle && elem.currentStyle[ name ],
+ style = elem.style;
- // From the awesome hack by Dean Edwards
- // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+ // From the awesome hack by Dean Edwards
+ // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
- // If we're not dealing with a regular pixel number
- // but a number that has a weird ending, we need to convert it to pixels
- if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
- // Remember the original values
- var left = style.left, rsLeft = elem.runtimeStyle.left;
+ // If we're not dealing with a regular pixel number
+ // but a number that has a weird ending, we need to convert it to pixels
+ if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
+ // Remember the original values
+ left = style.left;
+ rsLeft = elem.runtimeStyle.left;
- // Put in the new values to get a computed value out
- elem.runtimeStyle.left = elem.currentStyle.left;
- style.left = camelCase === "fontSize" ? "1em" : (ret || 0);
- ret = style.pixelLeft + "px";
+ // Put in the new values to get a computed value out
+ elem.runtimeStyle.left = elem.currentStyle.left;
+ style.left = name === "fontSize" ? "1em" : (ret || 0);
+ ret = style.pixelLeft + "px";
- // Revert the changed values
- style.left = left;
- elem.runtimeStyle.left = rsLeft;
- }
+ // Revert the changed values
+ style.left = left;
+ elem.runtimeStyle.left = rsLeft;
}
- return ret;
- },
+ return ret === "" ? "auto" : ret;
+ };
+}
- // A method for quickly swapping in/out CSS properties to get correct calculations
- swap: function( elem, options, callback ) {
- var old = {};
+curCSS = getComputedStyle || currentStyle;
- // Remember the old values, and insert the new ones
- for ( var name in options ) {
- old[ name ] = elem.style[ name ];
- elem.style[ name ] = options[ name ];
+function getWH( elem, name, extra ) {
+ var which = name === "width" ? cssWidth : cssHeight,
+ val = name === "width" ? elem.offsetWidth : elem.offsetHeight;
+
+ if ( extra === "border" ) {
+ return val;
+ }
+
+ jQuery.each( which, function() {
+ if ( !extra ) {
+ val -= parseFloat(jQuery.css( elem, "padding" + this )) || 0;
}
- callback.call( elem );
+ if ( extra === "margin" ) {
+ val += parseFloat(jQuery.css( elem, "margin" + this )) || 0;
- // Revert the old values
- for ( var name in options ) {
- elem.style[ name ] = old[ name ];
+ } else {
+ val -= parseFloat(jQuery.css( elem, "border" + this + "Width" )) || 0;
}
- }
-});
+ });
+
+ return val;
+}
if ( jQuery.expr && jQuery.expr.filters ) {
jQuery.expr.filters.hidden = function( elem ) {
- var width = elem.offsetWidth, height = elem.offsetHeight,
- skip = elem.nodeName.toLowerCase() === "tr";
-
- return width === 0 && height === 0 && !skip ?
- true :
- width > 0 && height > 0 && !skip ?
- false :
- jQuery.curCSS(elem, "display") === "none";
+ var width = elem.offsetWidth,
+ height = elem.offsetHeight;
+
+ return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && (elem.style.display || jQuery.css( elem, "display" )) === "none");
};
jQuery.expr.filters.visible = function( elem ) {
return !jQuery.expr.filters.hidden( elem );
};
}
-var jsc = now(),
- rscript = /<script(.|\s)*?\/script>/gi,
- rselectTextarea = /select|textarea/i,
- rinput = /color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,
- jsre = /=\?(&|$)/,
+
+
+
+
+var jsc = jQuery.now(),
+ rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
+ rselectTextarea = /^(?:select|textarea)/i,
+ rinput = /^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
+ rnoContent = /^(?:GET|HEAD)$/,
+ rbracket = /\[\]$/,
+ jsre = /\=\?(&|$)/,
rquery = /\?/,
- rts = /(\?|&)_=.*?(&|$)/,
+ rts = /([?&])_=[^&]*/,
rurl = /^(\w+:)?\/\/([^\/?#]+)/,
- r20 = /%20/g;
+ r20 = /%20/g,
+ rhash = /#.*$/,
-jQuery.fn.extend({
- // Keep a copy of the old load
- _load: jQuery.fn.load,
+ // Keep a copy of the old load method
+ _load = jQuery.fn.load;
+jQuery.fn.extend({
load: function( url, params, callback ) {
- if ( typeof url !== "string" ) {
- return this._load( url );
+ if ( typeof url !== "string" && _load ) {
+ return _load.apply( this, arguments );
// Don't do a request if no elements are being requested
} else if ( !this.length ) {
@@ -4667,7 +5629,7 @@ jQuery.fn.extend({
// See if a selector was specified
self.html( selector ?
// Create a dummy div to hold the results
- jQuery("<div />")
+ jQuery("<div>")
// inject the contents of the document in, removing the scripts
// to avoid any 'Permission Denied' errors in IE
.append(res.responseText.replace(rscript, ""))
@@ -4691,6 +5653,7 @@ jQuery.fn.extend({
serialize: function() {
return jQuery.param(this.serializeArray());
},
+
serializeArray: function() {
return this.map(function() {
return this.elements ? jQuery.makeArray(this.elements) : this;
@@ -4722,7 +5685,6 @@ jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".sp
});
jQuery.extend({
-
get: function( url, data, callback, type ) {
// shift arguments if data argument was omited
if ( jQuery.isFunction( data ) ) {
@@ -4783,19 +5745,10 @@ jQuery.extend({
password: null,
traditional: false,
*/
- // Create the request object; Microsoft failed to properly
- // implement the XMLHttpRequest in IE7 (can't request local files),
- // so we use the ActiveXObject when it is available
// This function can be overriden by calling jQuery.ajaxSetup
- xhr: window.XMLHttpRequest && (window.location.protocol !== "file:" || !window.ActiveXObject) ?
- function() {
- return new window.XMLHttpRequest();
- } :
- function() {
- try {
- return new window.ActiveXObject("Microsoft.XMLHTTP");
- } catch(e) {}
- },
+ xhr: function() {
+ return new window.XMLHttpRequest();
+ },
accepts: {
xml: "application/xml, text/xml",
html: "text/html",
@@ -4806,16 +5759,14 @@ jQuery.extend({
}
},
- // Last-Modified header cache for next request
- lastModified: {},
- etag: {},
-
ajax: function( origSettings ) {
- var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings);
-
- var jsonp, status, data,
- callbackContext = origSettings && origSettings.context || s,
- type = s.type.toUpperCase();
+ var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings),
+ jsonp, status, data, type = s.type.toUpperCase(), noContent = rnoContent.test(type);
+
+ s.url = s.url.replace( rhash, "" );
+
+ // Use original (not extended) context object if it was provided
+ s.context = origSettings && origSettings.context != null ? origSettings.context : s;
// convert data if not already a string
if ( s.data && s.processData && typeof s.data !== "string" ) {
@@ -4850,17 +5801,25 @@ jQuery.extend({
s.dataType = "script";
// Handle JSONP-style loading
- window[ jsonp ] = window[ jsonp ] || function( tmp ) {
- data = tmp;
- success();
- complete();
- // Garbage collect
- window[ jsonp ] = undefined;
+ var customJsonp = window[ jsonp ];
- try {
- delete window[ jsonp ];
- } catch(e) {}
+ window[ jsonp ] = function( tmp ) {
+ if ( jQuery.isFunction( customJsonp ) ) {
+ customJsonp( tmp );
+
+ } else {
+ // Garbage collect
+ window[ jsonp ] = undefined;
+
+ try {
+ delete window[ jsonp ];
+ } catch( jsonpError ) {}
+ }
+ data = tmp;
+ jQuery.handleSuccess( s, xhr, status, data );
+ jQuery.handleComplete( s, xhr, status, data );
+
if ( head ) {
head.removeChild( script );
}
@@ -4871,39 +5830,39 @@ jQuery.extend({
s.cache = false;
}
- if ( s.cache === false && type === "GET" ) {
- var ts = now();
+ if ( s.cache === false && noContent ) {
+ var ts = jQuery.now();
// try replacing _= if it is there
- var ret = s.url.replace(rts, "$1_=" + ts + "$2");
+ var ret = s.url.replace(rts, "$1_=" + ts);
// if nothing was replaced, add timestamp to the end
s.url = ret + ((ret === s.url) ? (rquery.test(s.url) ? "&" : "?") + "_=" + ts : "");
}
- // If data is available, append data to url for get requests
- if ( s.data && type === "GET" ) {
+ // If data is available, append data to url for GET/HEAD requests
+ if ( s.data && noContent ) {
s.url += (rquery.test(s.url) ? "&" : "?") + s.data;
}
// Watch for a new set of requests
- if ( s.global && ! jQuery.active++ ) {
+ if ( s.global && jQuery.active++ === 0 ) {
jQuery.event.trigger( "ajaxStart" );
}
// Matches an absolute URL, and saves the domain
var parts = rurl.exec( s.url ),
- remote = parts && (parts[1] && parts[1] !== location.protocol || parts[2] !== location.host);
+ remote = parts && (parts[1] && parts[1].toLowerCase() !== location.protocol || parts[2].toLowerCase() !== location.host);
// If we're requesting a remote document
// and trying to load JSON or Script with a GET
if ( s.dataType === "script" && type === "GET" && remote ) {
var head = document.getElementsByTagName("head")[0] || document.documentElement;
var script = document.createElement("script");
- script.src = s.url;
if ( s.scriptCharset ) {
script.charset = s.scriptCharset;
}
+ script.src = s.url;
// Handle Script loading
if ( !jsonp ) {
@@ -4914,8 +5873,8 @@ jQuery.extend({
if ( !done && (!this.readyState ||
this.readyState === "loaded" || this.readyState === "complete") ) {
done = true;
- success();
- complete();
+ jQuery.handleSuccess( s, xhr, status, data );
+ jQuery.handleComplete( s, xhr, status, data );
// Handle memory leak in IE
script.onload = script.onreadystatechange = null;
@@ -4953,8 +5912,8 @@ jQuery.extend({
// Need an extra try/catch for cross domain requests in Firefox 3
try {
- // Set the correct header, if data is being sent
- if ( s.data || origSettings && origSettings.contentType ) {
+ // Set content-type if data specified and content-body is valid for this type
+ if ( (s.data != null && !noContent) || (origSettings && origSettings.contentType) ) {
xhr.setRequestHeader("Content-Type", s.contentType);
}
@@ -4977,14 +5936,14 @@ jQuery.extend({
// Set the Accepts header for the server, depending on the dataType
xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ?
- s.accepts[ s.dataType ] + ", */*" :
+ s.accepts[ s.dataType ] + ", */*; q=0.01" :
s.accepts._default );
- } catch(e) {}
+ } catch( headerError ) {}
// Allow custom headers/mimetypes and early abort
- if ( s.beforeSend && s.beforeSend.call(callbackContext, xhr, s) === false ) {
+ if ( s.beforeSend && s.beforeSend.call(s.context, xhr, s) === false ) {
// Handle the global AJAX counter
- if ( s.global && ! --jQuery.active ) {
+ if ( s.global && jQuery.active-- === 1 ) {
jQuery.event.trigger( "ajaxStop" );
}
@@ -4994,7 +5953,7 @@ jQuery.extend({
}
if ( s.global ) {
- trigger("ajaxSend", [xhr, s]);
+ jQuery.triggerGlobal( s, "ajaxSend", [xhr, s] );
}
// Wait for a response to come back
@@ -5004,7 +5963,7 @@ jQuery.extend({
// Opera doesn't call onreadystatechange before this point
// so we simulate the call
if ( !requestDone ) {
- complete();
+ jQuery.handleComplete( s, xhr, status, data );
}
requestDone = true;
@@ -5032,9 +5991,9 @@ jQuery.extend({
try {
// process the data (runs the xml through httpData regardless of callback)
data = jQuery.httpData( xhr, s.dataType, s );
- } catch(err) {
+ } catch( parserError ) {
status = "parsererror";
- errMsg = err;
+ errMsg = parserError;
}
}
@@ -5042,14 +6001,16 @@ jQuery.extend({
if ( status === "success" || status === "notmodified" ) {
// JSONP handles its own success callback
if ( !jsonp ) {
- success();
+ jQuery.handleSuccess( s, xhr, status, data );
}
} else {
- jQuery.handleError(s, xhr, status, errMsg);
+ jQuery.handleError( s, xhr, status, errMsg );
}
// Fire the complete handlers
- complete();
+ if ( !jsonp ) {
+ jQuery.handleComplete( s, xhr, status, data );
+ }
if ( isTimeout === "timeout" ) {
xhr.abort();
@@ -5062,18 +6023,21 @@ jQuery.extend({
}
};
- // Override the abort handler, if we can (IE doesn't allow it, but that's OK)
+ // Override the abort handler, if we can (IE 6 doesn't allow it, but that's OK)
// Opera doesn't fire onreadystatechange at all on abort
try {
var oldAbort = xhr.abort;
xhr.abort = function() {
if ( xhr ) {
- oldAbort.call( xhr );
+ // oldAbort has no call property in IE7 so
+ // just do it this way, which works in all
+ // browsers
+ Function.prototype.call.call( oldAbort, xhr );
}
onreadystatechange( "abort" );
};
- } catch(e) { }
+ } catch( abortError ) {}
// Timeout checker
if ( s.async && s.timeout > 0 ) {
@@ -5087,11 +6051,13 @@ jQuery.extend({
// Send the data
try {
- xhr.send( type === "POST" || type === "PUT" || type === "DELETE" ? s.data : null );
- } catch(e) {
- jQuery.handleError(s, xhr, null, e);
+ xhr.send( noContent || s.data == null ? null : s.data );
+
+ } catch( sendError ) {
+ jQuery.handleError( s, xhr, null, sendError );
+
// Fire the complete handlers
- complete();
+ jQuery.handleComplete( s, xhr, status, data );
}
// firefox 1.5 doesn't fire statechange for sync requests
@@ -5099,66 +6065,145 @@ jQuery.extend({
onreadystatechange();
}
- function success() {
- // If a local callback was specified, fire it and pass it the data
- if ( s.success ) {
- s.success.call( callbackContext, data, status, xhr );
- }
+ // return XMLHttpRequest to allow aborting the request etc.
+ return xhr;
+ },
- // Fire the global callback
- if ( s.global ) {
- trigger( "ajaxSuccess", [xhr, s] );
+ // Serialize an array of form elements or a set of
+ // key/values into a query string
+ param: function( a, traditional ) {
+ var s = [],
+ add = function( key, value ) {
+ // If value is a function, invoke it and return its value
+ value = jQuery.isFunction(value) ? value() : value;
+ s[ s.length ] = encodeURIComponent(key) + "=" + encodeURIComponent(value);
+ };
+
+ // Set traditional to true for jQuery <= 1.3.2 behavior.
+ if ( traditional === undefined ) {
+ traditional = jQuery.ajaxSettings.traditional;
+ }
+
+ // If an array was passed in, assume that it is an array of form elements.
+ if ( jQuery.isArray(a) || a.jquery ) {
+ // Serialize the form elements
+ jQuery.each( a, function() {
+ add( this.name, this.value );
+ });
+
+ } else {
+ // If traditional, encode the "old" way (the way 1.3.2 or older
+ // did it), otherwise encode params recursively.
+ for ( var prefix in a ) {
+ buildParams( prefix, a[prefix], traditional, add );
}
}
- function complete() {
- // Process result
- if ( s.complete ) {
- s.complete.call( callbackContext, xhr, status);
- }
+ // Return the resulting serialization
+ return s.join("&").replace(r20, "+");
+ }
+});
- // The request was completed
- if ( s.global ) {
- trigger( "ajaxComplete", [xhr, s] );
- }
+function buildParams( prefix, obj, traditional, add ) {
+ if ( jQuery.isArray(obj) && obj.length ) {
+ // Serialize array item.
+ jQuery.each( obj, function( i, v ) {
+ if ( traditional || rbracket.test( prefix ) ) {
+ // Treat each array item as a scalar.
+ add( prefix, v );
- // Handle the global AJAX counter
- if ( s.global && ! --jQuery.active ) {
- jQuery.event.trigger( "ajaxStop" );
+ } else {
+ // If array item is non-scalar (array or object), encode its
+ // numeric index to resolve deserialization ambiguity issues.
+ // Note that rack (as of 1.0.0) can't currently deserialize
+ // nested arrays properly, and attempting to do so may cause
+ // a server error. Possible fixes are to modify rack's
+ // deserialization algorithm or to provide an option or flag
+ // to force array serialization to be shallow.
+ buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add );
}
+ });
+
+ } else if ( !traditional && obj != null && typeof obj === "object" ) {
+ if ( jQuery.isEmptyObject( obj ) ) {
+ add( prefix, "" );
+
+ // Serialize object item.
+ } else {
+ jQuery.each( obj, function( k, v ) {
+ buildParams( prefix + "[" + k + "]", v, traditional, add );
+ });
}
-
- function trigger(type, args) {
- (s.context ? jQuery(s.context) : jQuery.event).trigger(type, args);
- }
+
+ } else {
+ // Serialize scalar item.
+ add( prefix, obj );
+ }
+}
- // return XMLHttpRequest to allow aborting the request etc.
- return xhr;
- },
+// This is still on the jQuery object... for now
+// Want to move this to jQuery.ajax some day
+jQuery.extend({
+
+ // Counter for holding the number of active queries
+ active: 0,
+
+ // Last-Modified header cache for next request
+ lastModified: {},
+ etag: {},
handleError: function( s, xhr, status, e ) {
// If a local callback was specified, fire it
if ( s.error ) {
- s.error.call( s.context || s, xhr, status, e );
+ s.error.call( s.context, xhr, status, e );
}
// Fire the global callback
if ( s.global ) {
- (s.context ? jQuery(s.context) : jQuery.event).trigger( "ajaxError", [xhr, s, e] );
+ jQuery.triggerGlobal( s, "ajaxError", [xhr, s, e] );
}
},
- // Counter for holding the number of active queries
- active: 0,
+ handleSuccess: function( s, xhr, status, data ) {
+ // If a local callback was specified, fire it and pass it the data
+ if ( s.success ) {
+ s.success.call( s.context, data, status, xhr );
+ }
+
+ // Fire the global callback
+ if ( s.global ) {
+ jQuery.triggerGlobal( s, "ajaxSuccess", [xhr, s] );
+ }
+ },
+
+ handleComplete: function( s, xhr, status ) {
+ // Process result
+ if ( s.complete ) {
+ s.complete.call( s.context, xhr, status );
+ }
+
+ // The request was completed
+ if ( s.global ) {
+ jQuery.triggerGlobal( s, "ajaxComplete", [xhr, s] );
+ }
+
+ // Handle the global AJAX counter
+ if ( s.global && jQuery.active-- === 1 ) {
+ jQuery.event.trigger( "ajaxStop" );
+ }
+ },
+
+ triggerGlobal: function( s, type, args ) {
+ (s.context && s.context.url == null ? jQuery(s.context) : jQuery.event).trigger(type, args);
+ },
// Determines if an XMLHttpRequest was successful or not
httpSuccess: function( xhr ) {
try {
// IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450
return !xhr.status && location.protocol === "file:" ||
- // Opera returns 0 when status is 304
- ( xhr.status >= 200 && xhr.status < 300 ) ||
- xhr.status === 304 || xhr.status === 1223 || xhr.status === 0;
+ xhr.status >= 200 && xhr.status < 300 ||
+ xhr.status === 304 || xhr.status === 1223;
} catch(e) {}
return false;
@@ -5177,8 +6222,7 @@ jQuery.extend({
jQuery.etag[url] = etag;
}
- // Opera returns 0 when status is 304
- return xhr.status === 304 || xhr.status === 0;
+ return xhr.status === 304;
},
httpData: function( xhr, type, s ) {
@@ -5209,77 +6253,40 @@ jQuery.extend({
}
return data;
- },
+ }
- // Serialize an array of form elements or a set of
- // key/values into a query string
- param: function( a, traditional ) {
- var s = [];
-
- // Set traditional to true for jQuery <= 1.3.2 behavior.
- if ( traditional === undefined ) {
- traditional = jQuery.ajaxSettings.traditional;
- }
-
- // If an array was passed in, assume that it is an array of form elements.
- if ( jQuery.isArray(a) || a.jquery ) {
- // Serialize the form elements
- jQuery.each( a, function() {
- add( this.name, this.value );
- });
-
- } else {
- // If traditional, encode the "old" way (the way 1.3.2 or older
- // did it), otherwise encode params recursively.
- for ( var prefix in a ) {
- buildParams( prefix, a[prefix] );
- }
+});
+
+/*
+ * Create the request object; Microsoft failed to properly
+ * implement the XMLHttpRequest in IE7 (can't request local files),
+ * so we use the ActiveXObject when it is available
+ * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
+ * we need a fallback.
+ */
+if ( window.ActiveXObject ) {
+ jQuery.ajaxSettings.xhr = function() {
+ if ( window.location.protocol !== "file:" ) {
+ try {
+ return new window.XMLHttpRequest();
+ } catch(xhrError) {}
}
- // Return the resulting serialization
- return s.join("&").replace(r20, "+");
+ try {
+ return new window.ActiveXObject("Microsoft.XMLHTTP");
+ } catch(activeError) {}
+ };
+}
+
+// Does this browser support XHR requests?
+jQuery.support.ajax = !!jQuery.ajaxSettings.xhr();
+
+
- function buildParams( prefix, obj ) {
- if ( jQuery.isArray(obj) ) {
- // Serialize array item.
- jQuery.each( obj, function( i, v ) {
- if ( traditional ) {
- // Treat each array item as a scalar.
- add( prefix, v );
- } else {
- // If array item is non-scalar (array or object), encode its
- // numeric index to resolve deserialization ambiguity issues.
- // Note that rack (as of 1.0.0) can't currently deserialize
- // nested arrays properly, and attempting to do so may cause
- // a server error. Possible fixes are to modify rack's
- // deserialization algorithm or to provide an option or flag
- // to force array serialization to be shallow.
- buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v );
- }
- });
-
- } else if ( !traditional && obj != null && typeof obj === "object" ) {
- // Serialize object item.
- jQuery.each( obj, function( k, v ) {
- buildParams( prefix + "[" + k + "]", v );
- });
-
- } else {
- // Serialize scalar item.
- add( prefix, obj );
- }
- }
- function add( key, value ) {
- // If value is a function, invoke it and return its value
- value = jQuery.isFunction(value) ? value() : value;
- s[ s.length ] = encodeURIComponent(key) + "=" + encodeURIComponent(value);
- }
- }
-});
var elemdisplay = {},
- rfxtypes = /toggle|show|hide/,
- rfxnum = /^([+-]=)?([\d+-.]+)(.*)$/,
+ rfxtypes = /^(?:toggle|show|hide)$/,
+ rfxnum = /^([+\-]=)?([\d+.\-]+)(.*)$/,
timerId,
fxAttrs = [
// height animations
@@ -5291,66 +6298,63 @@ var elemdisplay = {},
];
jQuery.fn.extend({
- show: function( speed, callback ) {
- if ( speed || speed === 0) {
- return this.animate( genFx("show", 3), speed, callback);
-
- } else {
- for ( var i = 0, l = this.length; i < l; i++ ) {
- var old = jQuery.data(this[i], "olddisplay");
-
- this[i].style.display = old || "";
-
- if ( jQuery.css(this[i], "display") === "none" ) {
- var nodeName = this[i].nodeName, display;
+ show: function( speed, easing, callback ) {
+ var elem, display;
- if ( elemdisplay[ nodeName ] ) {
- display = elemdisplay[ nodeName ];
-
- } else {
- var elem = jQuery("<" + nodeName + " />").appendTo("body");
-
- display = elem.css("display");
-
- if ( display === "none" ) {
- display = "block";
- }
-
- elem.remove();
+ if ( speed || speed === 0 ) {
+ return this.animate( genFx("show", 3), speed, easing, callback);
- elemdisplay[ nodeName ] = display;
- }
+ } else {
+ for ( var i = 0, j = this.length; i < j; i++ ) {
+ elem = this[i];
+ display = elem.style.display;
+
+ // Reset the inline display of this element to learn if it is
+ // being hidden by cascaded rules or not
+ if ( !jQuery.data(elem, "olddisplay") && display === "none" ) {
+ display = elem.style.display = "";
+ }
- jQuery.data(this[i], "olddisplay", display);
+ // Set elements which have been overridden with display: none
+ // in a stylesheet to whatever the default browser style is
+ // for such an element
+ if ( display === "" && jQuery.css( elem, "display" ) === "none" ) {
+ jQuery.data(elem, "olddisplay", defaultDisplay(elem.nodeName));
}
}
- // Set the display of the elements in a second loop
+ // Set the display of most of the elements in a second loop
// to avoid the constant reflow
- for ( var j = 0, k = this.length; j < k; j++ ) {
- this[j].style.display = jQuery.data(this[j], "olddisplay") || "";
+ for ( i = 0; i < j; i++ ) {
+ elem = this[i];
+ display = elem.style.display;
+
+ if ( display === "" || display === "none" ) {
+ elem.style.display = jQuery.data(elem, "olddisplay") || "";
+ }
}
return this;
}
},
- hide: function( speed, callback ) {
+ hide: function( speed, easing, callback ) {
if ( speed || speed === 0 ) {
- return this.animate( genFx("hide", 3), speed, callback);
+ return this.animate( genFx("hide", 3), speed, easing, callback);
} else {
- for ( var i = 0, l = this.length; i < l; i++ ) {
- var old = jQuery.data(this[i], "olddisplay");
- if ( !old && old !== "none" ) {
- jQuery.data(this[i], "olddisplay", jQuery.css(this[i], "display"));
+ for ( var i = 0, j = this.length; i < j; i++ ) {
+ var display = jQuery.css( this[i], "display" );
+
+ if ( display !== "none" ) {
+ jQuery.data( this[i], "olddisplay", display );
}
}
// Set the display of the elements in a second loop
// to avoid the constant reflow
- for ( var j = 0, k = this.length; j < k; j++ ) {
- this[j].style.display = "none";
+ for ( i = 0; i < j; i++ ) {
+ this[i].style.display = "none";
}
return this;
@@ -5360,7 +6364,7 @@ jQuery.fn.extend({
// Save the old toggle function
_toggle: jQuery.fn.toggle,
- toggle: function( fn, fn2 ) {
+ toggle: function( fn, fn2, callback ) {
var bool = typeof fn === "boolean";
if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {
@@ -5373,15 +6377,15 @@ jQuery.fn.extend({
});
} else {
- this.animate(genFx("toggle", 3), fn, fn2);
+ this.animate(genFx("toggle", 3), fn, fn2, callback);
}
return this;
},
- fadeTo: function( speed, to, callback ) {
+ fadeTo: function( speed, to, easing, callback ) {
return this.filter(":hidden").css("opacity", 0).show().end()
- .animate({opacity: to}, speed, callback);
+ .animate({opacity: to}, speed, easing, callback);
},
animate: function( prop, speed, easing, callback ) {
@@ -5392,12 +6396,16 @@ jQuery.fn.extend({
}
return this[ optall.queue === false ? "each" : "queue" ](function() {
+ // XXX 'this' does not always have a nodeName when running the
+ // test suite
+
var opt = jQuery.extend({}, optall), p,
- hidden = this.nodeType === 1 && jQuery(this).is(":hidden"),
+ isElement = this.nodeType === 1,
+ hidden = isElement && jQuery(this).is(":hidden"),
self = this;
for ( p in prop ) {
- var name = p.replace(rdashAlpha, fcamelCase);
+ var name = jQuery.camelCase( p );
if ( p !== name ) {
prop[ name ] = prop[ p ];
@@ -5409,12 +6417,35 @@ jQuery.fn.extend({
return opt.complete.call(this);
}
- if ( ( p === "height" || p === "width" ) && this.style ) {
- // Store display property
- opt.display = jQuery.css(this, "display");
-
+ if ( isElement && ( p === "height" || p === "width" ) ) {
// Make sure that nothing sneaks out
- opt.overflow = this.style.overflow;
+ // Record all 3 overflow attributes because IE does not
+ // change the overflow attribute when overflowX and
+ // overflowY are set to the same value
+ opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];
+
+ // Set display property to inline-block for height/width
+ // animations on inline elements that are having width/height
+ // animated
+ if ( jQuery.css( this, "display" ) === "inline" &&
+ jQuery.css( this, "float" ) === "none" ) {
+ if ( !jQuery.support.inlineBlockNeedsLayout ) {
+ this.style.display = "inline-block";
+
+ } else {
+ var display = defaultDisplay(this.nodeName);
+
+ // inline-level elements accept inline-block;
+ // block-level elements need to be inline with layout
+ if ( display === "inline" ) {
+ this.style.display = "inline-block";
+
+ } else {
+ this.style.display = "inline";
+ this.style.zoom = 1;
+ }
+ }
+ }
}
if ( jQuery.isArray( prop[p] ) ) {
@@ -5438,7 +6469,7 @@ jQuery.fn.extend({
} else {
var parts = rfxnum.exec(val),
- start = e.cur(true) || 0;
+ start = e.cur() || 0;
if ( parts ) {
var end = parseFloat( parts[2] ),
@@ -5446,9 +6477,9 @@ jQuery.fn.extend({
// We need to compute starting value
if ( unit !== "px" ) {
- self.style[ name ] = (end || 1) + unit;
- start = ((end || 1) / e.cur(true)) * start;
- self.style[ name ] = start + unit;
+ jQuery.style( self, name, (end || 1) + unit);
+ start = ((end || 1) / e.cur()) * start;
+ jQuery.style( self, name, start + unit);
}
// If a +=/-= token was provided, we're doing a relative animation
@@ -5500,22 +6531,33 @@ jQuery.fn.extend({
});
+function genFx( type, num ) {
+ var obj = {};
+
+ jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() {
+ obj[ this ] = type;
+ });
+
+ return obj;
+}
+
// Generate shortcuts for custom animations
jQuery.each({
slideDown: genFx("show", 1),
slideUp: genFx("hide", 1),
slideToggle: genFx("toggle", 1),
fadeIn: { opacity: "show" },
- fadeOut: { opacity: "hide" }
+ fadeOut: { opacity: "hide" },
+ fadeToggle: { opacity: "toggle" }
}, function( name, props ) {
- jQuery.fn[ name ] = function( speed, callback ) {
- return this.animate( props, speed, callback );
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
+ return this.animate( props, speed, easing, callback );
};
});
jQuery.extend({
speed: function( speed, easing, fn ) {
- var opt = speed && typeof speed === "object" ? speed : {
+ var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
complete: fn || !fn && easing ||
jQuery.isFunction( speed ) && speed,
duration: speed,
@@ -5523,7 +6565,7 @@ jQuery.extend({
};
opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
- jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default;
+ opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default;
// Queueing
opt.old = opt.complete;
@@ -5570,33 +6612,30 @@ jQuery.fx.prototype = {
}
(jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
-
- // Set display property to block for height/width animations
- if ( ( this.prop === "height" || this.prop === "width" ) && this.elem.style ) {
- this.elem.style.display = "block";
- }
},
// Get the current size
- cur: function( force ) {
+ cur: function() {
if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
return this.elem[ this.prop ];
}
- var r = parseFloat(jQuery.css(this.elem, this.prop, force));
- return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0;
+ var r = parseFloat( jQuery.css( this.elem, this.prop ) );
+ return r && r > -10000 ? r : 0;
},
// Start an animation from one number to another
custom: function( from, to, unit ) {
- this.startTime = now();
+ var self = this,
+ fx = jQuery.fx;
+
+ this.startTime = jQuery.now();
this.start = from;
this.end = to;
this.unit = unit || this.unit || "px";
this.now = this.start;
this.pos = this.state = 0;
- var self = this;
function t( gotoEnd ) {
return self.step(gotoEnd);
}
@@ -5604,7 +6643,7 @@ jQuery.fx.prototype = {
t.elem = this.elem;
if ( t() && jQuery.timers.push(t) && !timerId ) {
- timerId = setInterval(jQuery.fx.tick, 13);
+ timerId = setInterval(fx.tick, fx.interval);
}
},
@@ -5635,7 +6674,7 @@ jQuery.fx.prototype = {
// Each step of an animation
step: function( gotoEnd ) {
- var t = now(), done = true;
+ var t = jQuery.now(), done = true;
if ( gotoEnd || t >= this.options.duration + this.startTime ) {
this.now = this.end;
@@ -5651,17 +6690,14 @@ jQuery.fx.prototype = {
}
if ( done ) {
- if ( this.options.display != null ) {
- // Reset the overflow
- this.elem.style.overflow = this.options.overflow;
-
- // Reset the display
- var old = jQuery.data(this.elem, "olddisplay");
- this.elem.style.display = old ? old : this.options.display;
-
- if ( jQuery.css(this.elem, "display") === "none" ) {
- this.elem.style.display = "block";
- }
+ // Reset the overflow
+ if ( this.options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
+ var elem = this.elem,
+ options = this.options;
+
+ jQuery.each( [ "", "X", "Y" ], function (index, value) {
+ elem.style[ "overflow" + value ] = options.overflow[index];
+ } );
}
// Hide the element if the "hide" operation was done
@@ -5672,7 +6708,7 @@ jQuery.fx.prototype = {
// Reset the properties, if the item has been hidden or shown
if ( this.options.hide || this.options.show ) {
for ( var p in this.options.curAnim ) {
- jQuery.style(this.elem, p, this.options.orig[p]);
+ jQuery.style( this.elem, p, this.options.orig[p] );
}
}
@@ -5714,22 +6750,24 @@ jQuery.extend( jQuery.fx, {
jQuery.fx.stop();
}
},
-
+
+ interval: 13,
+
stop: function() {
clearInterval( timerId );
timerId = null;
},
-
+
speeds: {
slow: 600,
- fast: 200,
- // Default speed
- _default: 400
+ fast: 200,
+ // Default speed
+ _default: 400
},
step: {
opacity: function( fx ) {
- jQuery.style(fx.elem, "opacity", fx.now);
+ jQuery.style( fx.elem, "opacity", fx.now );
},
_default: function( fx ) {
@@ -5750,18 +6788,32 @@ if ( jQuery.expr && jQuery.expr.filters ) {
};
}
-function genFx( type, num ) {
- var obj = {};
+function defaultDisplay( nodeName ) {
+ if ( !elemdisplay[ nodeName ] ) {
+ var elem = jQuery("<" + nodeName + ">").appendTo("body"),
+ display = elem.css("display");
- jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() {
- obj[ this ] = type;
- });
+ elem.remove();
- return obj;
+ if ( display === "none" || display === "" ) {
+ display = "block";
+ }
+
+ elemdisplay[ nodeName ] = display;
+ }
+
+ return elemdisplay[ nodeName ];
}
+
+
+
+
+var rtable = /^t(?:able|d|h)$/i,
+ rroot = /^(?:body|html)$/i;
+
if ( "getBoundingClientRect" in document.documentElement ) {
jQuery.fn.offset = function( options ) {
- var elem = this[0];
+ var elem = this[0], box;
if ( options ) {
return this.each(function( i ) {
@@ -5777,10 +6829,26 @@ if ( "getBoundingClientRect" in document.documentElement ) {
return jQuery.offset.bodyOffset( elem );
}
- var box = elem.getBoundingClientRect(), doc = elem.ownerDocument, body = doc.body, docElem = doc.documentElement,
- clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0,
- top = box.top + (self.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop ) - clientTop,
- left = box.left + (self.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft;
+ try {
+ box = elem.getBoundingClientRect();
+ } catch(e) {}
+
+ var doc = elem.ownerDocument,
+ docElem = doc.documentElement;
+
+ // Make sure we're not dealing with a disconnected DOM node
+ if ( !box || !jQuery.contains( docElem, elem ) ) {
+ return box || { top: 0, left: 0 };
+ }
+
+ var body = doc.body,
+ win = getWindow(doc),
+ clientTop = docElem.clientTop || body.clientTop || 0,
+ clientLeft = docElem.clientLeft || body.clientLeft || 0,
+ scrollTop = (win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop ),
+ scrollLeft = (win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft),
+ top = box.top + scrollTop - clientTop,
+ left = box.left + scrollLeft - clientLeft;
return { top: top, left: left };
};
@@ -5805,11 +6873,16 @@ if ( "getBoundingClientRect" in document.documentElement ) {
jQuery.offset.initialize();
- var offsetParent = elem.offsetParent, prevOffsetParent = elem,
- doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement,
- body = doc.body, defaultView = doc.defaultView,
+ var computedStyle,
+ offsetParent = elem.offsetParent,
+ prevOffsetParent = elem,
+ doc = elem.ownerDocument,
+ docElem = doc.documentElement,
+ body = doc.body,
+ defaultView = doc.defaultView,
prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
- top = elem.offsetTop, left = elem.offsetLeft;
+ top = elem.offsetTop,
+ left = elem.offsetLeft;
while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
@@ -5824,12 +6897,13 @@ if ( "getBoundingClientRect" in document.documentElement ) {
top += elem.offsetTop;
left += elem.offsetLeft;
- if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(elem.nodeName)) ) {
+ if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
top += parseFloat( computedStyle.borderTopWidth ) || 0;
left += parseFloat( computedStyle.borderLeftWidth ) || 0;
}
- prevOffsetParent = offsetParent, offsetParent = elem.offsetParent;
+ prevOffsetParent = offsetParent;
+ offsetParent = elem.offsetParent;
}
if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
@@ -5856,7 +6930,7 @@ if ( "getBoundingClientRect" in document.documentElement ) {
jQuery.offset = {
initialize: function() {
- var body = document.body, container = document.createElement("div"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.curCSS(body, "marginTop", true) ) || 0,
+ var body = document.body, container = document.createElement("div"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.css(body, "marginTop") ) || 0,
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>";
jQuery.extend( container.style, { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" } );
@@ -5870,12 +6944,16 @@ jQuery.offset = {
this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
this.doesAddBorderForTableAndCells = (td.offsetTop === 5);
- checkDiv.style.position = "fixed", checkDiv.style.top = "20px";
+ checkDiv.style.position = "fixed";
+ checkDiv.style.top = "20px";
+
// safari subtracts parent border width here which is 5px
this.supportsFixedPosition = (checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15);
checkDiv.style.position = checkDiv.style.top = "";
- innerDiv.style.overflow = "hidden", innerDiv.style.position = "relative";
+ innerDiv.style.overflow = "hidden";
+ innerDiv.style.position = "relative";
+
this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);
this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);
@@ -5886,36 +6964,52 @@ jQuery.offset = {
},
bodyOffset: function( body ) {
- var top = body.offsetTop, left = body.offsetLeft;
+ var top = body.offsetTop,
+ left = body.offsetLeft;
jQuery.offset.initialize();
if ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) {
- top += parseFloat( jQuery.curCSS(body, "marginTop", true) ) || 0;
- left += parseFloat( jQuery.curCSS(body, "marginLeft", true) ) || 0;
+ top += parseFloat( jQuery.css(body, "marginTop") ) || 0;
+ left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
}
return { top: top, left: left };
},
setOffset: function( elem, options, i ) {
+ var position = jQuery.css( elem, "position" );
+
// set position first, in-case top/left are set even on static elem
- if ( /static/.test( jQuery.curCSS( elem, "position" ) ) ) {
+ if ( position === "static" ) {
elem.style.position = "relative";
}
- var curElem = jQuery( elem ),
+
+ var curElem = jQuery( elem ),
curOffset = curElem.offset(),
- curTop = parseInt( jQuery.curCSS( elem, "top", true ), 10 ) || 0,
- curLeft = parseInt( jQuery.curCSS( elem, "left", true ), 10 ) || 0;
+ curCSSTop = jQuery.css( elem, "top" ),
+ curCSSLeft = jQuery.css( elem, "left" ),
+ calculatePosition = (position === "absolute" && jQuery.inArray('auto', [curCSSTop, curCSSLeft]) > -1),
+ props = {}, curPosition = {}, curTop, curLeft;
+
+ // need to be able to calculate position if either top or left is auto and position is absolute
+ if ( calculatePosition ) {
+ curPosition = curElem.position();
+ }
+
+ curTop = calculatePosition ? curPosition.top : parseInt( curCSSTop, 10 ) || 0;
+ curLeft = calculatePosition ? curPosition.left : parseInt( curCSSLeft, 10 ) || 0;
if ( jQuery.isFunction( options ) ) {
options = options.call( elem, i, curOffset );
}
- var props = {
- top: (options.top - curOffset.top) + curTop,
- left: (options.left - curOffset.left) + curLeft
- };
+ if (options.top != null) {
+ props.top = (options.top - curOffset.top) + curTop;
+ }
+ if (options.left != null) {
+ props.left = (options.left - curOffset.left) + curLeft;
+ }
if ( "using" in options ) {
options.using.call( elem, props );
@@ -5939,17 +7033,17 @@ jQuery.fn.extend({
// Get correct offsets
offset = this.offset(),
- parentOffset = /^body|html$/i.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
+ parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
// Subtract element margins
// note: when an element has margin: auto the offsetLeft and marginLeft
// are the same in Safari causing offset.left to incorrectly be 0
- offset.top -= parseFloat( jQuery.curCSS(elem, "marginTop", true) ) || 0;
- offset.left -= parseFloat( jQuery.curCSS(elem, "marginLeft", true) ) || 0;
+ offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
+ offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
// Add offsetParent borders
- parentOffset.top += parseFloat( jQuery.curCSS(offsetParent[0], "borderTopWidth", true) ) || 0;
- parentOffset.left += parseFloat( jQuery.curCSS(offsetParent[0], "borderLeftWidth", true) ) || 0;
+ parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
+ parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
// Subtract the two offsets
return {
@@ -5961,7 +7055,7 @@ jQuery.fn.extend({
offsetParent: function() {
return this.map(function() {
var offsetParent = this.offsetParent || document.body;
- while ( offsetParent && (!/^body|html$/i.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
+ while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
offsetParent = offsetParent.offsetParent;
}
return offsetParent;
@@ -6009,12 +7103,16 @@ jQuery.each( ["Left", "Top"], function( i, name ) {
});
function getWindow( elem ) {
- return ("scrollTo" in elem && elem.document) ?
+ return jQuery.isWindow( elem ) ?
elem :
elem.nodeType === 9 ?
elem.defaultView || elem.parentWindow :
false;
}
+
+
+
+
// Create innerHeight, innerWidth, outerHeight and outerWidth methods
jQuery.each([ "Height", "Width" ], function( i, name ) {
@@ -6023,14 +7121,14 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
// innerHeight and innerWidth
jQuery.fn["inner" + name] = function() {
return this[0] ?
- jQuery.css( this[0], type, false, "padding" ) :
+ parseFloat( jQuery.css( this[0], type, "padding" ) ) :
null;
};
// outerHeight and outerWidth
jQuery.fn["outer" + name] = function( margin ) {
return this[0] ?
- jQuery.css( this[0], type, false, margin ? "margin" : "border" ) :
+ parseFloat( jQuery.css( this[0], type, margin ? "margin" : "border" ) ) :
null;
};
@@ -6048,31 +7146,34 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
});
}
- return ("scrollTo" in elem && elem.document) ? // does it walk and quack like a window?
+ if ( jQuery.isWindow( elem ) ) {
// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
- elem.document.compatMode === "CSS1Compat" && elem.document.documentElement[ "client" + name ] ||
- elem.document.body[ "client" + name ] :
-
- // Get document width or height
- (elem.nodeType === 9) ? // is it a document
- // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
- Math.max(
- elem.documentElement["client" + name],
- elem.body["scroll" + name], elem.documentElement["scroll" + name],
- elem.body["offset" + name], elem.documentElement["offset" + name]
- ) :
-
- // Get or set width or height on the element
- size === undefined ?
- // Get width or height on the element
- jQuery.css( elem, type ) :
-
- // Set the width or height on the element (default to pixels if value is unitless)
- this.css( type, typeof size === "string" ? size : size + "px" );
+ return elem.document.compatMode === "CSS1Compat" && elem.document.documentElement[ "client" + name ] ||
+ elem.document.body[ "client" + name ];
+
+ // Get document width or height
+ } else if ( elem.nodeType === 9 ) {
+ // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
+ return Math.max(
+ elem.documentElement["client" + name],
+ elem.body["scroll" + name], elem.documentElement["scroll" + name],
+ elem.body["offset" + name], elem.documentElement["offset" + name]
+ );
+
+ // Get or set width or height on the element
+ } else if ( size === undefined ) {
+ var orig = jQuery.css( elem, type ),
+ ret = parseFloat( orig );
+
+ return jQuery.isNaN( ret ) ? orig : ret;
+
+ // Set the width or height on the element (default to pixels if value is unitless)
+ } else {
+ return this.css( type, typeof size === "string" ? size : size + "px" );
+ }
};
});
-// Expose jQuery to the global object
-window.jQuery = window.$ = jQuery;
+
})(window);
diff --git a/themes/default/js/jquery.min.js b/themes/default/js/jquery.min.js
new file mode 100644
index 000000000..8f3ca2e2d
--- /dev/null
+++ b/themes/default/js/jquery.min.js
@@ -0,0 +1,167 @@
+/*!
+ * jQuery JavaScript Library v1.4.4
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Thu Nov 11 19:04:53 2010 -0500
+ */
+(function(E,B){function ka(a,b,d){if(d===B&&a.nodeType===1){d=a.getAttribute("data-"+b);if(typeof d==="string"){try{d=d==="true"?true:d==="false"?false:d==="null"?null:!c.isNaN(d)?parseFloat(d):Ja.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=B}return d}function U(){return false}function ca(){return true}function la(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ka(a){var b,d,e,f,h,l,k,o,x,r,A,C=[];f=[];h=c.data(this,this.nodeType?"events":"__events__");if(typeof h==="function")h=
+h.events;if(!(a.liveFired===this||!h||!h.live||a.button&&a.type==="click")){if(a.namespace)A=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var J=h.live.slice(0);for(k=0;k<J.length;k++){h=J[k];h.origType.replace(X,"")===a.type?f.push(h.selector):J.splice(k--,1)}f=c(a.target).closest(f,a.currentTarget);o=0;for(x=f.length;o<x;o++){r=f[o];for(k=0;k<J.length;k++){h=J[k];if(r.selector===h.selector&&(!A||A.test(h.namespace))){l=r.elem;e=null;if(h.preType==="mouseenter"||
+h.preType==="mouseleave"){a.type=h.preType;e=c(a.relatedTarget).closest(h.selector)[0]}if(!e||e!==l)C.push({elem:l,handleObj:h,level:r.level})}}}o=0;for(x=C.length;o<x;o++){f=C[o];if(d&&f.level>d)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;A=f.handleObj.origHandler.apply(f.elem,arguments);if(A===false||a.isPropagationStopped()){d=f.level;if(A===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(La,
+"`").replace(Ma,"&")}function ma(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Na.test(b))return c.filter(b,e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function na(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this,
+e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var l in e[h])c.event.add(this,h,e[h][l],e[h][l].data)}}})}function Oa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function oa(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?Pa:Qa,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a,
+"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function da(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Ra.test(a)?e(a,h):da(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?e(a,""):c.each(b,function(f,h){da(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(pa.concat.apply([],pa.slice(0,b)),function(){d[this]=a});return d}function qa(a){if(!ea[a]){var b=c("<"+
+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+C=/^[\],:{}\s]*$/,J=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,I=/(?:^|:|,)(?:\s*\[)+/g,L=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,n=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,q=[],u,y=Object.prototype.toString,F=Object.prototype.hasOwnProperty,M=Array.prototype.push,N=Array.prototype.slice,O=String.prototype.trim,D=Array.prototype.indexOf,R={};b.fn=b.prototype={init:function(j,
+s){var v,z,H;if(!j)return this;if(j.nodeType){this.context=this[0]=j;this.length=1;return this}if(j==="body"&&!s&&t.body){this.context=t;this[0]=t.body;this.selector="body";this.length=1;return this}if(typeof j==="string")if((v=h.exec(j))&&(v[1]||!s))if(v[1]){H=s?s.ownerDocument||s:t;if(z=A.exec(j))if(b.isPlainObject(s)){j=[t.createElement(z[1])];b.fn.attr.call(j,s,true)}else j=[H.createElement(z[1])];else{z=b.buildFragment([v[1]],[H]);j=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this,
+j)}else{if((z=t.getElementById(v[2]))&&z.parentNode){if(z.id!==v[2])return f.find(j);this.length=1;this[0]=z}this.context=t;this.selector=j;return this}else if(!s&&!x.test(j)){this.selector=j;this.context=t;j=t.getElementsByTagName(j);return b.merge(this,j)}else return!s||s.jquery?(s||f).find(j):b(s).find(j);else if(b.isFunction(j))return f.ready(j);if(j.selector!==B){this.selector=j.selector;this.context=j.context}return b.makeArray(j,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length},
+toArray:function(){return N.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,s,v){var z=b();b.isArray(j)?M.apply(z,j):b.merge(z,j);z.prevObject=this;z.context=this.context;if(s==="find")z.selector=this.selector+(this.selector?" ":"")+v;else if(s)z.selector=this.selector+"."+s+"("+v+")";return z},each:function(j,s){return b.each(this,j,s)},ready:function(j){b.bindReady();if(b.isReady)j.call(t,b);else q&&q.push(j);return this},eq:function(j){return j===
+-1?this.slice(j):this.slice(j,+j+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(j){return this.pushStack(b.map(this,function(s,v){return j.call(s,v,s)}))},end:function(){return this.prevObject||b(null)},push:M,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var j,s,v,z,H,G=arguments[0]||{},K=1,Q=arguments.length,ga=false;
+if(typeof G==="boolean"){ga=G;G=arguments[1]||{};K=2}if(typeof G!=="object"&&!b.isFunction(G))G={};if(Q===K){G=this;--K}for(;K<Q;K++)if((j=arguments[K])!=null)for(s in j){v=G[s];z=j[s];if(G!==z)if(ga&&z&&(b.isPlainObject(z)||(H=b.isArray(z)))){if(H){H=false;v=v&&b.isArray(v)?v:[]}else v=v&&b.isPlainObject(v)?v:{};G[s]=b.extend(ga,v,z)}else if(z!==B)G[s]=z}return G};b.extend({noConflict:function(j){E.$=e;if(j)E.jQuery=d;return b},isReady:false,readyWait:1,ready:function(j){j===true&&b.readyWait--;
+if(!b.readyWait||j!==true&&!b.isReady){if(!t.body)return setTimeout(b.ready,1);b.isReady=true;if(!(j!==true&&--b.readyWait>0))if(q){var s=0,v=q;for(q=null;j=v[s++];)j.call(t,b);b.fn.trigger&&b(t).trigger("ready").unbind("ready")}}},bindReady:function(){if(!p){p=true;if(t.readyState==="complete")return setTimeout(b.ready,1);if(t.addEventListener){t.addEventListener("DOMContentLoaded",u,false);E.addEventListener("load",b.ready,false)}else if(t.attachEvent){t.attachEvent("onreadystatechange",u);E.attachEvent("onload",
+b.ready);var j=false;try{j=E.frameElement==null}catch(s){}t.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof j==="object"&&"setInterval"in j},isNaN:function(j){return j==null||!r.test(j)||isNaN(j)},type:function(j){return j==null?String(j):R[y.call(j)]||"object"},isPlainObject:function(j){if(!j||b.type(j)!=="object"||j.nodeType||b.isWindow(j))return false;if(j.constructor&&
+!F.call(j,"constructor")&&!F.call(j.constructor.prototype,"isPrototypeOf"))return false;for(var s in j);return s===B||F.call(j,s)},isEmptyObject:function(j){for(var s in j)return false;return true},error:function(j){throw j;},parseJSON:function(j){if(typeof j!=="string"||!j)return null;j=b.trim(j);if(C.test(j.replace(J,"@").replace(w,"]").replace(I,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(j):(new Function("return "+j))();else b.error("Invalid JSON: "+j)},noop:function(){},globalEval:function(j){if(j&&
+l.test(j)){var s=t.getElementsByTagName("head")[0]||t.documentElement,v=t.createElement("script");v.type="text/javascript";if(b.support.scriptEval)v.appendChild(t.createTextNode(j));else v.text=j;s.insertBefore(v,s.firstChild);s.removeChild(v)}},nodeName:function(j,s){return j.nodeName&&j.nodeName.toUpperCase()===s.toUpperCase()},each:function(j,s,v){var z,H=0,G=j.length,K=G===B||b.isFunction(j);if(v)if(K)for(z in j){if(s.apply(j[z],v)===false)break}else for(;H<G;){if(s.apply(j[H++],v)===false)break}else if(K)for(z in j){if(s.call(j[z],
+z,j[z])===false)break}else for(v=j[0];H<G&&s.call(v,H,v)!==false;v=j[++H]);return j},trim:O?function(j){return j==null?"":O.call(j)}:function(j){return j==null?"":j.toString().replace(k,"").replace(o,"")},makeArray:function(j,s){var v=s||[];if(j!=null){var z=b.type(j);j.length==null||z==="string"||z==="function"||z==="regexp"||b.isWindow(j)?M.call(v,j):b.merge(v,j)}return v},inArray:function(j,s){if(s.indexOf)return s.indexOf(j);for(var v=0,z=s.length;v<z;v++)if(s[v]===j)return v;return-1},merge:function(j,
+s){var v=j.length,z=0;if(typeof s.length==="number")for(var H=s.length;z<H;z++)j[v++]=s[z];else for(;s[z]!==B;)j[v++]=s[z++];j.length=v;return j},grep:function(j,s,v){var z=[],H;v=!!v;for(var G=0,K=j.length;G<K;G++){H=!!s(j[G],G);v!==H&&z.push(j[G])}return z},map:function(j,s,v){for(var z=[],H,G=0,K=j.length;G<K;G++){H=s(j[G],G,v);if(H!=null)z[z.length]=H}return z.concat.apply([],z)},guid:1,proxy:function(j,s,v){if(arguments.length===2)if(typeof s==="string"){v=j;j=v[s];s=B}else if(s&&!b.isFunction(s)){v=
+s;s=B}if(!s&&j)s=function(){return j.apply(v||this,arguments)};if(j)s.guid=j.guid=j.guid||s.guid||b.guid++;return s},access:function(j,s,v,z,H,G){var K=j.length;if(typeof s==="object"){for(var Q in s)b.access(j,Q,s[Q],z,H,v);return j}if(v!==B){z=!G&&z&&b.isFunction(v);for(Q=0;Q<K;Q++)H(j[Q],s,z?v.call(j[Q],Q,H(j[Q],s)):v,G);return j}return K?H(j[0],s):B},now:function(){return(new Date).getTime()},uaMatch:function(j){j=j.toLowerCase();j=L.exec(j)||g.exec(j)||i.exec(j)||j.indexOf("compatible")<0&&n.exec(j)||
+[];return{browser:j[1]||"",version:j[2]||"0"}},browser:{}});b.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(j,s){R["[object "+s+"]"]=s.toLowerCase()});m=b.uaMatch(m);if(m.browser){b.browser[m.browser]=true;b.browser.version=m.version}if(b.browser.webkit)b.browser.safari=true;if(D)b.inArray=function(j,s){return D.call(s,j)};if(!/\s/.test("\u00a0")){k=/^[\s\xA0]+/;o=/[\s\xA0]+$/}f=b(t);if(t.addEventListener)u=function(){t.removeEventListener("DOMContentLoaded",u,
+false);b.ready()};else if(t.attachEvent)u=function(){if(t.readyState==="complete"){t.detachEvent("onreadystatechange",u);b.ready()}};return E.jQuery=E.$=b}();(function(){c.support={};var a=t.documentElement,b=t.createElement("script"),d=t.createElement("div"),e="script"+c.now();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],l=t.createElement("select"),
+k=l.appendChild(t.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:k.selected,deleteExpando:true,optDisabled:false,checkClone:false,
+scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};l.disabled=true;c.support.optDisabled=!k.disabled;b.type="text/javascript";try{b.appendChild(t.createTextNode("window."+e+"=1;"))}catch(o){}a.insertBefore(b,a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}try{delete b.test}catch(x){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function r(){c.support.noCloneEvent=
+false;d.detachEvent("onclick",r)});d.cloneNode(true).fireEvent("onclick")}d=t.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=t.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var r=t.createElement("div");r.style.width=r.style.paddingLeft="1px";t.body.appendChild(r);c.boxModel=c.support.boxModel=r.offsetWidth===2;if("zoom"in r.style){r.style.display="inline";r.style.zoom=
+1;c.support.inlineBlockNeedsLayout=r.offsetWidth===2;r.style.display="";r.innerHTML="<div style='width:4px;'></div>";c.support.shrinkWrapBlocks=r.offsetWidth!==2}r.innerHTML="<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";var A=r.getElementsByTagName("td");c.support.reliableHiddenOffsets=A[0].offsetHeight===0;A[0].style.display="";A[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&A[0].offsetHeight===0;r.innerHTML="";t.body.removeChild(r).style.display=
+"none"});a=function(r){var A=t.createElement("div");r="on"+r;var C=r in A;if(!C){A.setAttribute(r,"return;");C=typeof A[r]==="function"}return C};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var ra={},Ja=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?ra:a;var e=a.nodeType,f=e?a[c.expando]:null,h=
+c.cache;if(!(e&&!f&&typeof b==="string"&&d===B)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==B)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?ra:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando);
+else if(d)delete f[e];else for(var l in a)delete a[l]}},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){var d=null;if(typeof a==="undefined"){if(this.length){var e=this[0].attributes,f;d=c.data(this[0]);for(var h=0,l=e.length;h<l;h++){f=e[h].name;if(f.indexOf("data-")===0){f=f.substr(5);ka(this[0],f,d[f])}}}return d}else if(typeof a==="object")return this.each(function(){c.data(this,
+a)});var k=a.split(".");k[1]=k[1]?"."+k[1]:"";if(b===B){d=this.triggerHandler("getData"+k[1]+"!",[k[0]]);if(d===B&&this.length){d=c.data(this[0],a);d=ka(this[0],a,d)}return d===B&&k[1]?this.data(k[0]):d}else return this.each(function(){var o=c(this),x=[k[0],b];o.triggerHandler("setData"+k[1]+"!",x);c.data(this,a,b);o.triggerHandler("changeData"+k[1]+"!",x)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var e=
+c.data(a,b);if(!d)return e||[];if(!e||c.isArray(d))e=c.data(a,b,c.makeArray(d));else e.push(d);return e}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),e=d.shift();if(e==="inprogress")e=d.shift();if(e){b==="fx"&&d.unshift("inprogress");e.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===B)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,
+a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var sa=/[\n\t]/g,ha=/\s+/,Sa=/\r/g,Ta=/^(?:href|src|style)$/,Ua=/^(?:button|input)$/i,Va=/^(?:button|input|object|select|textarea)$/i,Wa=/^a(?:rea)?$/i,ta=/^(?:radio|checkbox)$/i;c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",
+colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};c.fn.extend({attr:function(a,b){return c.access(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(x){var r=c(this);r.addClass(a.call(this,x,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===
+1)if(f.className){for(var h=" "+f.className+" ",l=f.className,k=0,o=b.length;k<o;k++)if(h.indexOf(" "+b[k]+" ")<0)l+=" "+b[k];f.className=c.trim(l)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(o){var x=c(this);x.removeClass(a.call(this,o,x.attr("class")))});if(a&&typeof a==="string"||a===B)for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1&&f.className)if(a){for(var h=(" "+f.className+" ").replace(sa," "),
+l=0,k=b.length;l<k;l++)h=h.replace(" "+b[l]+" "," ");f.className=c.trim(h)}else f.className=""}return this},toggleClass:function(a,b){var d=typeof a,e=typeof b==="boolean";if(c.isFunction(a))return this.each(function(f){var h=c(this);h.toggleClass(a.call(this,f,h.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var f,h=0,l=c(this),k=b,o=a.split(ha);f=o[h++];){k=e?k:!l.hasClass(f);l[k?"addClass":"removeClass"](f)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,
+"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(sa," ").indexOf(a)>-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";
+if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var l=f[h];if(l.selected&&(c.support.optDisabled?!l.disabled:l.getAttribute("disabled")===null)&&(!l.parentNode.disabled||!c.nodeName(l.parentNode,"optgroup"))){a=c(l).val();if(b)return a;d.push(a)}}return d}if(ta.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Sa,"")}return B}var k=c.isFunction(a);return this.each(function(o){var x=c(this),r=a;if(this.nodeType===1){if(k)r=
+a.call(this,o,x.val());if(r==null)r="";else if(typeof r==="number")r+="";else if(c.isArray(r))r=c.map(r,function(C){return C==null?"":C+""});if(c.isArray(r)&&ta.test(this.type))this.checked=c.inArray(x.val(),r)>=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},
+attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return B;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==B;b=e&&c.props[b]||b;var h=Ta.test(b);if((b in a||a[b]!==B)&&e&&!h){if(f){b==="type"&&Ua.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&
+b.specified?b.value:Va.test(a.nodeName)||Wa.test(a.nodeName)&&a.href?0:B;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return B;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?B:a}});var X=/\.(.*)$/,ia=/^(?:textarea|input|select)$/i,La=/\./g,Ma=/ /g,Xa=/[^\w\s.|`]/g,Ya=function(a){return a.replace(Xa,"\\$&")},ua={focusin:0,focusout:0};
+c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;else if(!d)return;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var l=a.nodeType?"events":"__events__",k=h[l],o=h.handle;if(typeof k==="function"){o=k.handle;k=k.events}else if(!k){a.nodeType||(h[l]=h=function(){});h.events=k={}}if(!o)h.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,
+arguments):B};o.elem=a;b=b.split(" ");for(var x=0,r;l=b[x++];){h=f?c.extend({},f):{handler:d,data:e};if(l.indexOf(".")>-1){r=l.split(".");l=r.shift();h.namespace=r.slice(0).sort().join(".")}else{r=[];h.namespace=""}h.type=l;if(!h.guid)h.guid=d.guid;var A=k[l],C=c.event.special[l]||{};if(!A){A=k[l]=[];if(!C.setup||C.setup.call(a,e,r,o)===false)if(a.addEventListener)a.addEventListener(l,o,false);else a.attachEvent&&a.attachEvent("on"+l,o)}if(C.add){C.add.call(a,h);if(!h.handler.guid)h.handler.guid=
+d.guid}A.push(h);c.event.global[l]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,l=0,k,o,x,r,A,C,J=a.nodeType?"events":"__events__",w=c.data(a),I=w&&w[J];if(w&&I){if(typeof I==="function"){w=I;I=I.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in I)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[l++];){r=f;k=f.indexOf(".")<0;o=[];if(!k){o=f.split(".");f=o.shift();x=RegExp("(^|\\.)"+
+c.map(o.slice(0).sort(),Ya).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(A=I[f])if(d){r=c.event.special[f]||{};for(h=e||0;h<A.length;h++){C=A[h];if(d.guid===C.guid){if(k||x.test(C.namespace)){e==null&&A.splice(h--,1);r.remove&&r.remove.call(a,C)}if(e!=null)break}}if(A.length===0||e!=null&&A.length===1){if(!r.teardown||r.teardown.call(a,o)===false)c.removeEvent(a,f,w.handle);delete I[f]}}else for(h=0;h<A.length;h++){C=A[h];if(k||x.test(C.namespace)){c.event.remove(a,r,C.handler,h);A.splice(h--,1)}}}if(c.isEmptyObject(I)){if(b=
+w.handle)b.elem=null;delete w.events;delete w.handle;if(typeof w==="function")c.removeData(a,J);else c.isEmptyObject(w)&&c.removeData(a)}}}}},trigger:function(a,b,d,e){var f=a.type||a;if(!e){a=typeof a==="object"?a[c.expando]?a:c.extend(c.Event(f),a):c.Event(f);if(f.indexOf("!")>=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===
+8)return B;a.result=B;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){var l;e=a.target;var k=f.replace(X,""),o=c.nodeName(e,"a")&&k===
+"click",x=c.event.special[k]||{};if((!x._default||x._default.call(d,a)===false)&&!o&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[k]){if(l=e["on"+k])e["on"+k]=null;c.event.triggered=true;e[k]()}}catch(r){}if(l)e["on"+k]=l;c.event.triggered=false}}},handle:function(a){var b,d,e,f;d=[];var h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+
+d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var l=d.length;f<l;f++){var k=d[f];if(b||e.test(k.namespace)){a.handler=k.handler;a.data=k.data;a.handleObj=k;k=k.handler.apply(this,h);if(k!==B){a.result=k;if(k===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.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[c.expando])return a;var b=a;a=c.Event(b);for(var d=this.props.length,e;d;){e=this.props[--d];a[e]=b[e]}if(!a.target)a.target=a.srcElement||t;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=t.documentElement;d=t.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
+d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(a.which==null&&(a.charCode!=null||a.keyCode!=null))a.which=a.charCode!=null?a.charCode:a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!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:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,Y(a.origType,a.selector),c.extend({},a,{handler:Ka,guid:a.handler.guid}))},remove:function(a){c.event.remove(this,
+Y(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,d){if(c.isWindow(this))this.onbeforeunload=d},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.removeEvent=t.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent&&a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=
+c.now();this[c.expando]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ca;var a=this.originalEvent;if(a)if(a.preventDefault)a.preventDefault();else a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=ca;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ca;this.stopPropagation()},isDefaultPrevented:U,isPropagationStopped:U,isImmediatePropagationStopped:U};
+var va=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},wa=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?wa:va,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?wa:va)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!==
+"form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length){a.liveFired=B;return la("submit",this,arguments)}});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13){a.liveFired=B;return la("submit",this,arguments)}})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var V,
+xa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ia.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=xa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===B||f===e))if(e!=null||f){a.type="change";a.liveFired=
+B;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",xa(a))}},setup:function(){if(this.type===
+"file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ia.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ia.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}t.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){ua[b]++===0&&t.addEventListener(a,d,true)},teardown:function(){--ua[b]===
+0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h<k;h++)c.event.add(this[h],d,l,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,
+a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d=
+1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(e){var f=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,f+1);e.preventDefault();return b[f].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var ya={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,e,f,h){var l,k=0,o,x,r=h||this.selector;h=h?this:c(this.context);if(typeof d===
+"object"&&!d.preventDefault){for(l in d)h[b](l,e,d[l],r);return this}if(c.isFunction(e)){f=e;e=B}for(d=(d||"").split(" ");(l=d[k++])!=null;){o=X.exec(l);x="";if(o){x=o[0];l=l.replace(X,"")}if(l==="hover")d.push("mouseenter"+x,"mouseleave"+x);else{o=l;if(l==="focus"||l==="blur"){d.push(ya[l]+x);l+=x}else l=(ya[l]||l)+x;if(b==="live"){x=0;for(var A=h.length;x<A;x++)c.event.add(h[x],"live."+Y(l,r),{data:e,selector:r,handler:f,origType:l,origHandler:f,preType:o})}else h.unbind("live."+Y(l,r),f)}}return this}});
+c.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){c.fn[b]=function(d,e){if(e==null){e=d;d=null}return arguments.length>0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});
+(function(){function a(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1&&!q){y.sizcache=n;y.sizset=p}if(y.nodeName.toLowerCase()===i){F=y;break}y=y[g]}m[p]=F}}}function b(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1){if(!q){y.sizcache=n;y.sizset=p}if(typeof i!=="string"){if(y===i){F=true;break}}else if(k.filter(i,
+[y]).length>0){F=y;break}}y=y[g]}m[p]=F}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,l=true;[0,0].sort(function(){l=false;return 0});var k=function(g,i,n,m){n=n||[];var p=i=i||t;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!g||typeof g!=="string")return n;var q,u,y,F,M,N=true,O=k.isXML(i),D=[],R=g;do{d.exec("");if(q=d.exec(R)){R=q[3];D.push(q[1]);if(q[2]){F=q[3];
+break}}}while(q);if(D.length>1&&x.exec(g))if(D.length===2&&o.relative[D[0]])u=L(D[0]+D[1],i);else for(u=o.relative[D[0]]?[i]:k(D.shift(),i);D.length;){g=D.shift();if(o.relative[g])g+=D.shift();u=L(g,u)}else{if(!m&&D.length>1&&i.nodeType===9&&!O&&o.match.ID.test(D[0])&&!o.match.ID.test(D[D.length-1])){q=k.find(D.shift(),i,O);i=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]}if(i){q=m?{expr:D.pop(),set:C(m)}:k.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&i.parentNode?i.parentNode:i,O);u=q.expr?k.filter(q.expr,
+q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h=
+l;g.sort(w);if(h)for(var i=1;i<g.length;i++)g[i]===g[i-1]&&g.splice(i--,1)}return g};k.matches=function(g,i){return k(g,null,null,i)};k.matchesSelector=function(g,i){return k(i,null,null,[g]).length>0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p<q;p++){var u,y=o.order[p];if(u=o.leftMatch[y].exec(g)){var F=u[1];u.splice(1,1);if(F.substr(F.length-1)!=="\\"){u[1]=(u[1]||"").replace(/\\/g,"");m=o.find[y](u,i,n);if(m!=null){g=g.replace(o.match[y],"");break}}}}m||(m=i.getElementsByTagName("*"));
+return{set:m,expr:g}};k.filter=function(g,i,n,m){for(var p,q,u=g,y=[],F=i,M=i&&i[0]&&k.isXML(i[0]);g&&i.length;){for(var N in o.filter)if((p=o.leftMatch[N].exec(g))!=null&&p[2]){var O,D,R=o.filter[N];D=p[1];q=false;p.splice(1,1);if(D.substr(D.length-1)!=="\\"){if(F===y)y=[];if(o.preFilter[N])if(p=o.preFilter[N](p,F,n,y,m,M)){if(p===true)continue}else q=O=true;if(p)for(var j=0;(D=F[j])!=null;j++)if(D){O=R(D,p,j,F);var s=m^!!O;if(n&&O!=null)if(s)q=true;else F[j]=false;else if(s){y.push(D);q=true}}if(O!==
+B){n||(F=y);g=g.replace(o.match[N],"");if(!q)return[];break}}}if(g===u)if(q==null)k.error(g);else break;u=g}return F};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var o=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|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,
+POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,i){var n=typeof i==="string",m=n&&!/\W/.test(i);n=n&&!m;if(m)i=i.toLowerCase();m=0;for(var p=g.length,q;m<p;m++)if(q=g[m]){for(;(q=q.previousSibling)&&q.nodeType!==1;);g[m]=n||q&&q.nodeName.toLowerCase()===
+i?q||false:q===i}n&&k.filter(i,g,true)},">":function(g,i){var n,m=typeof i==="string",p=0,q=g.length;if(m&&!/\W/.test(i))for(i=i.toLowerCase();p<q;p++){if(n=g[p]){n=n.parentNode;g[p]=n.nodeName.toLowerCase()===i?n:false}}else{for(;p<q;p++)if(n=g[p])g[p]=m?n.parentNode:n.parentNode===i;m&&k.filter(i,g,true)}},"":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m=i=i.toLowerCase();q=a}q("parentNode",i,p,g,m,n)},"~":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m=
+i=i.toLowerCase();q=a}q("previousSibling",i,p,g,m,n)}},find:{ID:function(g,i,n){if(typeof i.getElementById!=="undefined"&&!n)return(g=i.getElementById(g[1]))&&g.parentNode?[g]:[]},NAME:function(g,i){if(typeof i.getElementsByName!=="undefined"){for(var n=[],m=i.getElementsByName(g[1]),p=0,q=m.length;p<q;p++)m[p].getAttribute("name")===g[1]&&n.push(m[p]);return n.length===0?null:n}},TAG:function(g,i){return i.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,i,n,m,p,q){g=" "+g[1].replace(/\\/g,
+"")+" ";if(q)return g;q=0;for(var u;(u=i[q])!=null;q++)if(u)if(p^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))n||m.push(u);else if(n)i[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=i[1]+(i[2]||1)-0;g[3]=i[3]-0}g[0]=e++;return g},ATTR:function(g,i,n,
+m,p,q){i=g[1].replace(/\\/g,"");if(!q&&o.attrMap[i])g[1]=o.attrMap[i];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,i,n,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,i);else{g=k.filter(g[3],i,n,true^p);n||m.push.apply(m,g);return false}else if(o.match.POS.test(g[0])||o.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===
+true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,i,n){return!!k(n[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===
+g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,i){return i===0},last:function(g,i,n,m){return i===m.length-1},even:function(g,i){return i%2===0},odd:function(g,i){return i%2===1},lt:function(g,i,n){return i<n[3]-0},gt:function(g,i,n){return i>n[3]-0},nth:function(g,i,n){return n[3]-
+0===i},eq:function(g,i,n){return n[3]-0===i}},filter:{PSEUDO:function(g,i,n,m){var p=i[1],q=o.filters[p];if(q)return q(g,n,i,m);else if(p==="contains")return(g.textContent||g.innerText||k.getText([g])||"").indexOf(i[3])>=0;else if(p==="not"){i=i[3];n=0;for(m=i.length;n<m;n++)if(i[n]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+p)},CHILD:function(g,i){var n=i[1],m=g;switch(n){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(n===
+"first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":n=i[2];var p=i[3];if(n===1&&p===0)return true;var q=i[0],u=g.parentNode;if(u&&(u.sizcache!==q||!g.nodeIndex)){var y=0;for(m=u.firstChild;m;m=m.nextSibling)if(m.nodeType===1)m.nodeIndex=++y;u.sizcache=q}m=g.nodeIndex-p;return n===0?m===0:m%n===0&&m/n>=0}},ID:function(g,i){return g.nodeType===1&&g.getAttribute("id")===i},TAG:function(g,i){return i==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===
+i},CLASS:function(g,i){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(i)>-1},ATTR:function(g,i){var n=i[1];n=o.attrHandle[n]?o.attrHandle[n](g):g[n]!=null?g[n]:g.getAttribute(n);var m=n+"",p=i[2],q=i[4];return n==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&n!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,i,n,m){var p=o.setFilters[i[2]];
+if(p)return p(g,n,i,m)}}},x=o.match.POS,r=function(g,i){return"\\"+(i-0+1)},A;for(A in o.match){o.match[A]=RegExp(o.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source);o.leftMatch[A]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[A].source.replace(/\\(\d+)/g,r))}var C=function(g,i){g=Array.prototype.slice.call(g,0);if(i){i.push.apply(i,g);return i}return g};try{Array.prototype.slice.call(t.documentElement.childNodes,0)}catch(J){C=function(g,i){var n=0,m=i||[];if(f.call(g)==="[object Array]")Array.prototype.push.apply(m,
+g);else if(typeof g.length==="number")for(var p=g.length;n<p;n++)m.push(g[n]);else for(;g[n];n++)m.push(g[n]);return m}}var w,I;if(t.documentElement.compareDocumentPosition)w=function(g,i){if(g===i){h=true;return 0}if(!g.compareDocumentPosition||!i.compareDocumentPosition)return g.compareDocumentPosition?-1:1;return g.compareDocumentPosition(i)&4?-1:1};else{w=function(g,i){var n,m,p=[],q=[];n=g.parentNode;m=i.parentNode;var u=n;if(g===i){h=true;return 0}else if(n===m)return I(g,i);else if(n){if(!m)return 1}else return-1;
+for(;u;){p.unshift(u);u=u.parentNode}for(u=m;u;){q.unshift(u);u=u.parentNode}n=p.length;m=q.length;for(u=0;u<n&&u<m;u++)if(p[u]!==q[u])return I(p[u],q[u]);return u===n?I(g,q[u],-1):I(p[u],i,1)};I=function(g,i,n){if(g===i)return n;for(g=g.nextSibling;g;){if(g===i)return-1;g=g.nextSibling}return 1}}k.getText=function(g){for(var i="",n,m=0;g[m];m++){n=g[m];if(n.nodeType===3||n.nodeType===4)i+=n.nodeValue;else if(n.nodeType!==8)i+=k.getText(n.childNodes)}return i};(function(){var g=t.createElement("div"),
+i="script"+(new Date).getTime(),n=t.documentElement;g.innerHTML="<a name='"+i+"'/>";n.insertBefore(g,n.firstChild);if(t.getElementById(i)){o.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:B:[]};o.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}n.removeChild(g);
+n=g=null})();(function(){var g=t.createElement("div");g.appendChild(t.createComment(""));if(g.getElementsByTagName("*").length>0)o.find.TAG=function(i,n){var m=n.getElementsByTagName(i[1]);if(i[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();t.querySelectorAll&&
+function(){var g=k,i=t.createElement("div");i.innerHTML="<p class='TEST'></p>";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){k=function(m,p,q,u){p=p||t;m=m.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!u&&!k.isXML(p))if(p.nodeType===9)try{return C(p.querySelectorAll(m),q)}catch(y){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var F=p.getAttribute("id"),M=F||"__sizzle__";F||p.setAttribute("id",M);try{return C(p.querySelectorAll("#"+M+" "+m),q)}catch(N){}finally{F||
+p.removeAttribute("id")}}return g(m,p,q,u)};for(var n in g)k[n]=g[n];i=null}}();(function(){var g=t.documentElement,i=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,n=false;try{i.call(t.documentElement,"[test!='']:sizzle")}catch(m){n=true}if(i)k.matchesSelector=function(p,q){q=q.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(p))try{if(n||!o.match.PSEUDO.test(q)&&!/!=/.test(q))return i.call(p,q)}catch(u){}return k(q,null,null,[p]).length>0}})();(function(){var g=
+t.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){o.order.splice(1,0,"CLASS");o.find.CLASS=function(i,n,m){if(typeof n.getElementsByClassName!=="undefined"&&!m)return n.getElementsByClassName(i[1])};g=null}}})();k.contains=t.documentElement.contains?function(g,i){return g!==i&&(g.contains?g.contains(i):true)}:t.documentElement.compareDocumentPosition?
+function(g,i){return!!(g.compareDocumentPosition(i)&16)}:function(){return false};k.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var L=function(g,i){for(var n,m=[],p="",q=i.nodeType?[i]:i;n=o.match.PSEUDO.exec(g);){p+=n[0];g=g.replace(o.match.PSEUDO,"")}g=o.relative[g]?g+"*":g;n=0;for(var u=q.length;n<u;n++)k(g,q[n],m);return k.filter(p,m)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=k.getText;c.isXMLDoc=k.isXML;
+c.contains=k.contains})();var Za=/Until$/,$a=/^(?:parents|prevUntil|prevAll)/,ab=/,/,Na=/^.[^:#\[\.,]*$/,bb=Array.prototype.slice,cb=c.expr.match.POS;c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,e=0,f=this.length;e<f;e++){d=b.length;c.find(a,this[e],b);if(e>0)for(var h=d;h<b.length;h++)for(var l=0;l<d;l++)if(b[l]===b[h]){b.splice(h--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,e=b.length;d<e;d++)if(c.contains(this,b[d]))return true})},
+not:function(a){return this.pushStack(ma(this,a,false),"not",a)},filter:function(a){return this.pushStack(ma(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var l,k={},o=1;if(h&&a.length){e=0;for(f=a.length;e<f;e++){l=a[e];k[l]||(k[l]=c.expr.match.POS.test(l)?c(l,b||this.context):l)}for(;h&&h.ownerDocument&&h!==b;){for(l in k){e=k[l];if(e.jquery?e.index(h)>-1:c(h).is(e))d.push({selector:l,elem:h,level:o})}h=
+h.parentNode;o++}}return d}l=cb.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e<f;e++)for(h=this[e];h;)if(l?l.index(h)>-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context):
+c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,
+2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,
+b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Za.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||ab.test(e))&&$a.test(a))f=f.reverse();return this.pushStack(f,a,bb.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===B||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&
+e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var za=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,Aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ba=/<([\w:]+)/,db=/<tbody/i,eb=/<|&#?\w+;/,Ca=/<(?:script|object|embed|option|style)/i,Da=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/\=([^="'>\s]+\/)>/g,P={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,"",""]};P.optgroup=P.option;P.tbody=P.tfoot=P.colgroup=P.caption=P.thead;P.th=P.td;if(!c.support.htmlSerialize)P._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
+c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
+wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
+prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(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,false,function(b){this.parentNode.insertBefore(b,
+this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
+return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(za,"").replace(fb,'="$1">').replace($,"")],e)[0]}else return this.cloneNode(true)});if(a===true){na(this,b);na(this.find("*"),b.find("*"))}return b},html:function(a){if(a===B)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(za,""):null;
+else if(typeof a==="string"&&!Ca.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!P[(Ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Aa,"<$1></$2>");try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(e){this.empty().append(a)}}else c.isFunction(a)?this.each(function(f){var h=c(this);h.html(a.call(this,f,h.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=
+c(this),e=d.html();d.replaceWith(a.call(this,b,e))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){var e,f,h,l=a[0],k=[];if(!c.support.checkClone&&arguments.length===3&&typeof l==="string"&&Da.test(l))return this.each(function(){c(this).domManip(a,
+b,d,true)});if(c.isFunction(l))return this.each(function(x){var r=c(this);a[0]=l.call(this,x,b?r.html():B);r.domManip(a,b,d)});if(this[0]){e=l&&l.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:c.buildFragment(a,this,k);h=e.fragment;if(f=h.childNodes.length===1?h=h.firstChild:h.firstChild){b=b&&c.nodeName(f,"tr");f=0;for(var o=this.length;f<o;f++)d.call(b?c.nodeName(this[f],"table")?this[f].getElementsByTagName("tbody")[0]||this[f].appendChild(this[f].ownerDocument.createElement("tbody")):
+this[f]:this[f],f>0||e.cacheable||this.length>1?h.cloneNode(true):h)}k.length&&c.each(k,Oa)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:t;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===t&&!Ca.test(a[0])&&(c.support.checkClone||!Da.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append",
+prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=d.length;f<h;f++){var l=(f>0?this.clone(true):this).get();c(d[f])[b](l);e=e.concat(l)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||t;if(typeof b.createElement==="undefined")b=b.ownerDocument||
+b[0]&&b[0].ownerDocument||t;for(var f=[],h=0,l;(l=a[h])!=null;h++){if(typeof l==="number")l+="";if(l){if(typeof l==="string"&&!eb.test(l))l=b.createTextNode(l);else if(typeof l==="string"){l=l.replace(Aa,"<$1></$2>");var k=(Ba.exec(l)||["",""])[1].toLowerCase(),o=P[k]||P._default,x=o[0],r=b.createElement("div");for(r.innerHTML=o[1]+l+o[2];x--;)r=r.lastChild;if(!c.support.tbody){x=db.test(l);k=k==="table"&&!x?r.firstChild&&r.firstChild.childNodes:o[1]==="<table>"&&!x?r.childNodes:[];for(o=k.length-
+1;o>=0;--o)c.nodeName(k[o],"tbody")&&!k[o].childNodes.length&&k[o].parentNode.removeChild(k[o])}!c.support.leadingWhitespace&&$.test(l)&&r.insertBefore(b.createTextNode($.exec(l)[0]),r.firstChild);l=r.childNodes}if(l.nodeType)f.push(l);else f=c.merge(f,l)}}if(d)for(h=0;f[h];h++)if(e&&c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script"))));
+d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,l=0,k;(k=a[l])!=null;l++)if(!(k.nodeName&&c.noData[k.nodeName.toLowerCase()]))if(d=k[c.expando]){if((b=e[d])&&b.events)for(var o in b.events)f[o]?c.event.remove(k,o):c.removeEvent(k,o,b.handle);if(h)delete k[c.expando];else k.removeAttribute&&k.removeAttribute(c.expando);delete e[d]}}});var Ea=/alpha\([^)]*\)/i,gb=/opacity=([^)]*)/,hb=/-([a-z])/ig,ib=/([A-Z])/g,Fa=/^-?\d+(?:px)?$/i,
+jb=/^-?\d/,kb={position:"absolute",visibility:"hidden",display:"block"},Pa=["Left","Right"],Qa=["Top","Bottom"],W,Ga,aa,lb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===B)return this;return c.access(this,a,b,true,function(d,e,f){return f!==B?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,
+zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),l=a.style,k=c.cssHooks[h];b=c.cssProps[h]||h;if(d!==B){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!k||!("set"in k)||(d=k.set(a,d))!==B)try{l[b]=d}catch(o){}}}else{if(k&&"get"in k&&(f=k.get(a,false,e))!==B)return f;return l[b]}}},css:function(a,b,d){var e,f=c.camelCase(b),
+h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==B)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=e[f]},camelCase:function(a){return a.replace(hb,lb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=oa(d,b,f);else c.swap(d,kb,function(){h=oa(d,b,f)});if(h<=0){h=W(d,b,b);if(h==="0px"&&aa)h=aa(d,b,b);
+if(h!=null)return h===""||h==="auto"?"0px":h}if(h<0||h==null){h=d.style[b];return h===""||h==="auto"?"0px":h}return typeof h==="string"?h:h+"px"}},set:function(d,e){if(Fa.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return gb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f=
+d.filter||"";d.filter=Ea.test(f)?f.replace(Ea,e):d.filter+" "+e}};if(t.defaultView&&t.defaultView.getComputedStyle)Ga=function(a,b,d){var e;d=d.replace(ib,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return B;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};if(t.documentElement.currentStyle)aa=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],h=a.style;if(!Fa.test(f)&&jb.test(f)){d=h.left;
+e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f===""?"auto":f};W=Ga||aa;if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var mb=c.now(),nb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
+ob=/^(?:select|textarea)/i,pb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,qb=/^(?:GET|HEAD)$/,Ra=/\[\]$/,T=/\=\?(&|$)/,ja=/\?/,rb=/([?&])_=[^&]*/,sb=/^(\w+:)?\/\/([^\/?#]+)/,tb=/%20/g,ub=/#.*$/,Ha=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ha)return Ha.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b===
+"object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(l,k){if(k==="success"||k==="notmodified")h.html(f?c("<div>").append(l.responseText.replace(nb,"")).find(f):l.responseText);d&&h.each(d,[l.responseText,k,l])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&
+!this.disabled&&(this.checked||ob.test(this.nodeName)||pb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})},
+getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html",
+script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),l=qb.test(h);b.url=b.url.replace(ub,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ja.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data||
+!T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+mb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var k=E[d];E[d]=function(m){if(c.isFunction(k))k(m);else{E[d]=B;try{delete E[d]}catch(p){}}f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);r&&r.removeChild(A)}}if(b.dataType==="script"&&b.cache===null)b.cache=
+false;if(b.cache===false&&l){var o=c.now(),x=b.url.replace(rb,"$1_="+o);b.url=x+(x===b.url?(ja.test(b.url)?"&":"?")+"_="+o:"")}if(b.data&&l)b.url+=(ja.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");o=(o=sb.exec(b.url))&&(o[1]&&o[1].toLowerCase()!==location.protocol||o[2].toLowerCase()!==location.host);if(b.dataType==="script"&&h==="GET"&&o){var r=t.getElementsByTagName("head")[0]||t.documentElement,A=t.createElement("script");if(b.scriptCharset)A.charset=b.scriptCharset;
+A.src=b.url;if(!d){var C=false;A.onload=A.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);A.onload=A.onreadystatechange=null;r&&A.parentNode&&r.removeChild(A)}}}r.insertBefore(A,r.firstChild);return B}var J=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!l||a&&a.contentType)w.setRequestHeader("Content-Type",
+b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}o||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(I){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&&
+c.triggerGlobal(b,"ajaxSend",[w,b]);var L=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){J||c.handleComplete(b,w,e,f);J=true;if(w)w.onreadystatechange=c.noop}else if(!J&&w&&(w.readyState===4||m==="timeout")){J=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d||
+c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&Function.prototype.call.call(g,w);L("abort")}}catch(i){}b.async&&b.timeout>0&&setTimeout(function(){w&&!J&&L("timeout")},b.timeout);try{w.send(l||b.data==null?null:b.data)}catch(n){c.handleError(b,w,null,n);c.handleComplete(b,w,e,f)}b.async||L();return w}},param:function(a,b){var d=[],e=function(h,l){l=c.isFunction(l)?l():l;d[d.length]=
+encodeURIComponent(h)+"="+encodeURIComponent(l)};if(b===B)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)da(f,a[f],b,e);return d.join("&").replace(tb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess",
+[b,a])},handleComplete:function(a,b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),
+e=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}});
+if(E.ActiveXObject)c.ajaxSettings.xhr=function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var ea={},vb=/^(?:toggle|show|hide)$/,wb=/^([+\-]=)?([\d+.\-]+)(.*)$/,ba,pa=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show",
+3),a,b,d);else{d=0;for(var e=this.length;d<e;d++){a=this[d];b=a.style.display;if(!c.data(a,"olddisplay")&&b==="none")b=a.style.display="";b===""&&c.css(a,"display")==="none"&&c.data(a,"olddisplay",qa(a.nodeName))}for(d=0;d<e;d++){a=this[d];b=a.style.display;if(b===""||b==="none")a.style.display=c.data(a,"olddisplay")||""}return this}},hide:function(a,b,d){if(a||a===0)return this.animate(S("hide",3),a,b,d);else{a=0;for(b=this.length;a<b;a++){d=c.css(this[a],"display");d!=="none"&&c.data(this[a],"olddisplay",
+d)}for(a=0;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b,d){var e=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||e?this.each(function(){var f=e?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(S("toggle",3),a,b,d);return this},fadeTo:function(a,b,d,e){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d,e)},animate:function(a,b,d,e){var f=c.speed(b,
+d,e);if(c.isEmptyObject(a))return this.each(f.complete);return this[f.queue===false?"each":"queue"](function(){var h=c.extend({},f),l,k=this.nodeType===1,o=k&&c(this).is(":hidden"),x=this;for(l in a){var r=c.camelCase(l);if(l!==r){a[r]=a[l];delete a[l];l=r}if(a[l]==="hide"&&o||a[l]==="show"&&!o)return h.complete.call(this);if(k&&(l==="height"||l==="width")){h.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(c.css(this,"display")==="inline"&&c.css(this,"float")==="none")if(c.support.inlineBlockNeedsLayout)if(qa(this.nodeName)===
+"inline")this.style.display="inline-block";else{this.style.display="inline";this.style.zoom=1}else this.style.display="inline-block"}if(c.isArray(a[l])){(h.specialEasing=h.specialEasing||{})[l]=a[l][1];a[l]=a[l][0]}}if(h.overflow!=null)this.style.overflow="hidden";h.curAnim=c.extend({},a);c.each(a,function(A,C){var J=new c.fx(x,h,A);if(vb.test(C))J[C==="toggle"?o?"show":"hide":C](a);else{var w=wb.exec(C),I=J.cur()||0;if(w){var L=parseFloat(w[2]),g=w[3]||"px";if(g!=="px"){c.style(x,A,(L||1)+g);I=(L||
+1)/J.cur()*I;c.style(x,A,I+g)}if(w[1])L=(w[1]==="-="?-1:1)*L+I;J.custom(I,L,g)}else J.custom(I,C,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var e=d.length-1;e>=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b,
+d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a*
+Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.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=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(l){return f.step(l)}
+var f=this,h=c.fx;this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;e.elem=this.elem;if(e()&&c.timers.push(e)&&!ba)ba=setInterval(h.tick,h.interval)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;
+this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(k,o){f.style["overflow"+o]=h.overflow[k]})}this.options.hide&&c(this.elem).hide();if(this.options.hide||
+this.options.show)for(var l in this.options.curAnim)c.style(this.elem,l,this.options.orig[l]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=
+c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},interval:13,stop:function(){clearInterval(ba);ba=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(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;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===
+b.elem}).length};var xb=/^t(?:able|d|h)$/i,Ia=/^(?:body|html)$/i;c.fn.offset="getBoundingClientRect"in t.documentElement?function(a){var b=this[0],d;if(a)return this.each(function(l){c.offset.setOffset(this,a,l)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);try{d=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,h=f.documentElement;if(!d||!c.contains(h,b))return d||{top:0,left:0};b=f.body;f=fa(f);return{top:d.top+(f.pageYOffset||c.support.boxModel&&
+h.scrollTop||b.scrollTop)-(h.clientTop||b.clientTop||0),left:d.left+(f.pageXOffset||c.support.boxModel&&h.scrollLeft||b.scrollLeft)-(h.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(x){c.offset.setOffset(this,a,x)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d,e=b.offsetParent,f=b.ownerDocument,h=f.documentElement,l=f.body;d=(f=f.defaultView)?f.getComputedStyle(b,null):b.currentStyle;
+for(var k=b.offsetTop,o=b.offsetLeft;(b=b.parentNode)&&b!==l&&b!==h;){if(c.offset.supportsFixedPosition&&d.position==="fixed")break;d=f?f.getComputedStyle(b,null):b.currentStyle;k-=b.scrollTop;o-=b.scrollLeft;if(b===e){k+=b.offsetTop;o+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&xb.test(b.nodeName))){k+=parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}e=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"){k+=
+parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}d=d}if(d.position==="relative"||d.position==="static"){k+=l.offsetTop;o+=l.offsetLeft}if(c.offset.supportsFixedPosition&&d.position==="fixed"){k+=Math.max(h.scrollTop,l.scrollTop);o+=Math.max(h.scrollLeft,l.scrollLeft)}return{top:k,left:o}};c.offset={initialize:function(){var a=t.body,b=t.createElement("div"),d,e,f,h=parseFloat(c.css(a,"marginTop"))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",
+height:"1px",visibility:"hidden"});b.innerHTML="<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>";a.insertBefore(b,a.firstChild);d=b.firstChild;e=d.firstChild;f=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=e.offsetTop!==5;this.doesAddBorderForTableAndCells=
+f.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!==h;a.removeChild(b);c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.css(a,
+"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),l=c.css(a,"top"),k=c.css(a,"left"),o=e==="absolute"&&c.inArray("auto",[l,k])>-1;e={};var x={};if(o)x=f.position();l=o?x.top:parseInt(l,10)||0;k=o?x.left:parseInt(k,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+l;if(b.left!=null)e.left=b.left-h.left+k;"using"in b?b.using.call(a,
+e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Ia.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!Ia.test(a.nodeName)&&
+c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(e){var f=this[0],h;if(!f)return null;if(e!==B)return this.each(function(){if(h=fa(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=fa(f))?"pageXOffset"in h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();
+c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(l){var k=c(this);k[d](e.call(this,l,k[d]()))});if(c.isWindow(f))return f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b];else if(f.nodeType===9)return Math.max(f.documentElement["client"+
+b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]);else if(e===B){f=c.css(f,d);var h=parseFloat(f);return c.isNaN(h)?f:h}else return this.css(d,typeof e==="string"?e:e+"px")}})})(window);
diff --git a/themes/default/js/jquery.packed.js b/themes/default/js/jquery.packed.js
deleted file mode 100644
index f99269ee9..000000000
--- a/themes/default/js/jquery.packed.js
+++ /dev/null
@@ -1 +0,0 @@
-eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(C(1B,1d){G y=C(P,T){E 3g y.fn.8Z(P,T)},ay=1B.y,84$=1B.$,12=1B.12,6E,aD=/^[^<]*(<[\\w\\W]+>)[^>]*$|^#([\\w-]+)$/,cO=/^.[^:#\\[\\.,]*$/,aJ=/\\S/,at=/^(\\s|\\aC)+|(\\s|\\aC)+$/g,aB=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>)?$/,9q=eh.9q,6T,91=14,5X=[],42,4a=7x.2T.4a,6U=7x.2T.6U,1K=3X.2T.1K,2k=3X.2T.2k,2r=3X.2T.2r;y.fn=y.2T={8Z:C(P,T){G K,6,M,2e;7(!P){E B}7(P.19){B.T=B[0]=P;B.O=1;E B}7(1a P==="1R"){K=aD.29(P);7(K&&(K[1]||!T)){7(K[1]){2e=(T?T.1Z||T:12);M=aB.29(P);7(M){7(y.87(T)){P=[12.2x(M[1])];y.fn.3x.1f(P,T,R)}Q{P=[2e.2x(M[1])]}}Q{M=8B([K[1]],[2e]);P=(M.5c?M.2v.5k(R):M.2v).47}}Q{6=12.5z(K[2]);7(6){7(6.1T!==K[2]){E 6E.2y(P)}B.O=1;B[0]=6}B.T=12;B.P=P;E B}}Q 7(!T&&/^\\w+$/.17(P)){B.P=P;B.T=12;P=12.2N(P)}Q 7(!T||T.6j){E(T||6E).2y(P)}Q{E y(T).2y(P)}}Q 7(y.1G(P)){E 6E.3l(P)}7(P.P!==1d){B.P=P.P;B.T=P.T}E y.3f(P)?B.ax(P):y.2P(P,B)},P:"",6j:"1.4.1",O:0,4j:C(){E B.O},7b:C(){E 2k.1f(B,0)},54:C(3B){E 3B==U?B.7b():(3B<0?B.2k(3B)[0]:B[3B])},3s:C(1C,J,P){G M=y(1C||U);M.9k=B;M.T=B.T;7(J==="2y"){M.P=B.P+(B.P?" ":"")+P}Q 7(J){M.P=B.P+"."+J+"("+P+")"}E M},ax:C(1C){B.O=0;1K.27(B,1C);E B},1b:C(1o,1D){E y.1b(B,1o,1D)},3l:C(fn){y.9E();7(y.6O){fn.1f(12,y)}Q 7(5X){5X.1K(fn)}E B},eq:C(i){E i===-1?B.2k(i):B.2k(i,+i+1)},2j:C(){E B.eq(0)},4o:C(){E B.eq(-1)},2k:C(){E B.3s(2k.27(B,1F),"2k",2k.1f(1F).4R(","))},2Y:C(1o){E B.3s(y.2Y(B,C(6,i){E 1o.1f(6,i,6)}))},3o:C(){E B.9k||y(U)},1K:1K,4Z:[].4Z,3S:[].3S};y.fn.8Z.2T=y.fn;y.1Q=y.fn.1Q=C(){G 1w=1F[0]||{},i=1,O=1F.O,5P=14,1e,J,2L,3R;7(1a 1w==="7S"){5P=1w;1w=1F[1]||{};i=2}7(1a 1w!=="1P"&&!y.1G(1w)){1w={}}7(O===i){1w=B;--i}V(;i<O;i++){7((1e=1F[i])!=U){V(J 1A 1e){2L=1w[J];3R=1e[J];7(1w===3R){9F}7(5P&&3R&&(y.87(3R)||y.3f(3R))){G 6z=2L&&(y.87(2L)||y.3f(2L))?2L:y.3f(3R)?[]:{};1w[J]=y.1Q(5P,6z,3R)}Q 7(3R!==1d){1w[J]=3R}}}}E 1w};y.1Q({ed:C(5P){1B.$=84$;7(5P){1B.y=ay}E y},6O:14,3l:C(){7(!y.6O){7(!12.1i){E 7N(y.3l,13)}y.6O=R;7(5X){G fn,i=0;23((fn=5X[i++])){fn.1f(12,y)}5X=U}7(y.fn.7G){y(12).7G("3l")}}},9E:C(){7(91){E}91=R;7(12.5h==="2H"){E y.3l()}7(12.4b){12.4b("42",42,14);1B.4b("76",y.3l,14)}Q 7(12.3L){12.3L("3E",42);1B.3L("9P",y.3l);G 95=14;2E{95=1B.b1==U}2G(e){}7(12.2i.bk&&95){99()}}},1G:C(25){E 4a.1f(25)==="[1P aN]"},3f:C(25){E 4a.1f(25)==="[1P 3X]"},87:C(25){7(!25||4a.1f(25)!=="[1P 7x]"||25.19||25.6A){E 14}7(25.8W&&!6U.1f(25,"8W")&&!6U.1f(25.8W.2T,"eo")){E 14}G 1X;V(1X 1A 25){}E 1X===1d||6U.1f(25,1X)},9n:C(25){V(G J 1A 25){E 14}E R},2W:C(7e){bd 7e},c3:C(I){7(1a I!=="1R"||!I){E U}7(/^[\\],:{}\\s]*$/.17(I.1H(/\\\\(?:["\\\\\\/em]|u[0-9a-fA-F]{4})/g,"@").1H(/"[^"\\\\\\n\\r]*"|R|14|U|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g,"]").1H(/(?:^|:|,)(?:\\s*\\[)+/g,""))){E 1B.83&&1B.83.aG?1B.83.aG(I):(3g aN("E "+I))()}Q{y.2W("en 83: "+I)}},6y:C(){},9e:C(I){7(I&&aJ.17(I)){G 3e=12.2N("3e")[0]||12.2i,1x=12.2x("1x");1x.H="1U/4S";7(y.1Y.9g){1x.3N(12.6x(I))}Q{1x.1U=I}3e.3C(1x,3e.1S);3e.3u(1x)}},1g:C(6,J){E 6.1g&&6.1g.8c()===J.8c()},1b:C(1P,1o,1D){G J,i=0,O=1P.O,9m=O===1d||y.1G(1P);7(1D){7(9m){V(J 1A 1P){7(1o.27(1P[J],1D)===14){2z}}}Q{V(;i<O;){7(1o.27(1P[i++],1D)===14){2z}}}}Q{7(9m){V(J 1A 1P){7(1o.1f(1P[J],J,1P[J])===14){2z}}}Q{V(G N=1P[0];i<O&&1o.1f(N,i,N)!==14;N=1P[++i]){}}}E 1P},eb:C(1U){E(1U||"").1H(at,"")},2P:C(1E,1q){G M=1q||[];7(1E!=U){7(1E.O==U||1a 1E==="1R"||y.1G(1E)||(1a 1E!=="C"&&1E.6A)){1K.1f(M,1E)}Q{y.7p(M,1E)}}E M},4s:C(6,1E){7(1E.2r){E 1E.2r(6)}V(G i=0,O=1E.O;i<O;i++){7(1E[i]===6){E i}}E-1},7p:C(2j,66){G i=2j.O,j=0;7(1a 66.O==="5m"){V(G l=66.O;j<l;j++){2j[i++]=66[j]}}Q{23(66[j]!==1d){2j[i++]=66[j++]}}2j.O=i;E 2j},5Y:C(1C,1o,ar){G M=[];V(G i=0,O=1C.O;i<O;i++){7(!ar!==!1o(1C[i],i)){M.1K(1C[i])}}E M},2Y:C(1C,1o,aM){G M=[],N;V(G i=0,O=1C.O;i<O;i++){N=1o(1C[i],i,aM);7(N!=U){M[M.O]=N}}E M.7V.27([],M)},21:1,2a:C(fn,2a,6K){7(1F.O===2){7(1a 2a==="1R"){6K=fn;fn=6K[2a];2a=1d}Q 7(2a&&!y.1G(2a)){6K=2a;2a=1d}}7(!2a&&fn){2a=C(){E fn.27(6K||B,1F)}}7(fn){2a.21=fn.21=fn.21||2a.21||y.21++}E 2a},bI:C(4n){4n=4n.28();G K=/(bp)[ \\/]([\\w.]+)/.29(4n)||/(e1)(?:.*81)?[ \\/]([\\w.]+)/.29(4n)||/(e2) ([\\w.]+)/.29(4n)||!/e0/.17(4n)&&/(dZ)(?:.*? dX:([\\w.]+))?/.29(4n)||[];E{4G:K[1]||"",81:K[2]||"0"}},4G:{}});6T=y.bI(9q);7(6T.4G){y.4G[6T.4G]=R;y.4G.81=6T.81}7(y.4G.bp){y.4G.ea=R}7(2r){y.4s=C(6,1E){E 2r.1f(1E,6)}}6E=y(12);7(12.4b){42=C(){12.6X("42",42,14);y.3l()}}Q 7(12.3L){42=C(){7(12.5h==="2H"){12.7Q("3E",42);y.3l()}}}C 99(){7(y.6O){E}2E{12.2i.bk("1m")}2G(2W){7N(99,1);E}y.3l()}C c1(i,6){7(6.2L){y.6a({1n:6.2L,4W:14,36:"1x"})}Q{y.9e(6.1U||6.bA||6.3p||"")}7(6.1v){6.1v.3u(6)}}C 7t(1C,1X,N,29,fn,4m){G O=1C.O;7(1a 1X==="1P"){V(G k 1A 1X){7t(1C,k,1X[k],29,fn,N)}E 1C}7(N!==1d){29=!4m&&29&&y.1G(N);V(G i=0;i<O;i++){fn(1C[i],1X,29?N.1f(1C[i],i,fn(1C[i],1X)):N,4m)}E 1C}E O?fn(1C[0],1X):U}C 2Q(){E(3g aP).aH()}(C(){y.1Y={};G 2Z=12.2i,1x=12.2x("1x"),Y=12.2x("Y"),1T="1x"+2Q();Y.18.2c="4q";Y.3p=" <9f/><2f></2f><a 3A=\'/a\' 18=\'c0:bn;9H:1m;2o:.55;\'>a</a><3O H=\'4V\'/>";G 2K=Y.2N("*"),a=Y.2N("a")[0];7(!2K||!2K.O||!a){E}y.1Y={ak:Y.1S.19===3,2A:!Y.2N("2A").O,da:!!Y.2N("9f").O,18:/bn/.17(a.3a("18")),aW:a.3a("3A")==="/a",2o:/^0.55$/.17(a.18.2o),7y:!!a.18.7y,b7:Y.2N("3O")[0].N==="3J",b5:12.2x("33").3N(12.2x("44")).4Q,7l:14,9g:14,8j:R,5B:U};1x.H="1U/4S";2E{1x.3N(12.6x("1B."+1T+"=1;"))}2G(e){}2Z.3C(1x,2Z.1S);7(1B[1T]){y.1Y.9g=R;3q 1B[1T]}2Z.3u(1x);7(Y.3L&&Y.bG){Y.3L("9t",C 4c(){y.1Y.8j=14;Y.7Q("9t",4c)});Y.5k(R).bG("9t")}Y=12.2x("Y");Y.3p="<3O H=\'4f\' J=\'e7\' 3Q=\'3Q\'/>";G 2v=12.c9();2v.3N(Y.1S);y.1Y.7l=2v.5k(R).5k(R).an.3Q;y(C(){G Y=12.2x("Y");Y.18.2O=Y.18.dj="5g";12.1i.3N(Y);y.5B=y.1Y.5B=Y.7F===2;12.1i.3u(Y).18.2c=\'4q\';Y=U});G 8l=C(63){G el=12.2x("Y");63="3J"+63;G 7W=(63 1A el);7(!7W){el.aS(63,"E;");7W=1a el[63]==="C"}el=U;E 7W};y.1Y.aA=8l("4t");y.1Y.bg=8l("6p");2Z=1x=Y=2K=a=U})();y.3j={"V":"b9","43":"1N",e6:"aE",es:"et",bR:"eO",eP:"eN",eM:"eK",eL:"ap",eQ:"eR",eW:"eV"};G 3v="y"+2Q(),aZ=0,8k={};G b0={};y.1Q({2I:{},3v:3v,6g:{"cK":R,"1P":R,"eU":R},I:C(6,J,I){7(6.1g&&y.6g[6.1g.28()]){E}6=6==1B?8k:6;G 1T=6[3v],2I=y.2I,3r;7(!J&&!1T){E U}7(!1T){1T=++aZ}7(1a J==="1P"){6[3v]=1T;3r=2I[1T]=y.1Q(R,{},J)}Q 7(2I[1T]){3r=2I[1T]}Q 7(1a I==="1d"){3r=b0}Q{3r=2I[1T]={}}7(I!==1d){6[3v]=1T;3r[J]=I}E 1a J==="1R"?3r[J]:3r},50:C(6,J){7(6.1g&&y.6g[6.1g.28()]){E}6=6==1B?8k:6;G 1T=6[3v],2I=y.2I,3r=2I[1T];7(J){7(3r){3q 3r[J];7(y.9n(3r)){y.50(6)}}}Q{2E{3q 6[3v]}2G(e){7(6.8G){6.8G(3v)}}3q 2I[1T]}}});y.fn.1Q({I:C(1X,N){7(1a 1X==="1d"&&B.O){E y.I(B[0])}Q 7(1a 1X==="1P"){E B.1b(C(){y.I(B,1X)})}G 1k=1X.3d(".");1k[1]=1k[1]?"."+1k[1]:"";7(N===1d){G I=B.7G("eJ"+1k[1]+"!",[1k[0]]);7(I===1d&&B.O){I=y.I(B[0],1X)}E I===1d&&1k[1]?B.I(1k[0]):I}Q{E B.2q("eI"+1k[1]+"!",[1k[0],N]).1b(C(){y.I(B,1X,N)})}},50:C(1X){E B.1b(C(){y.50(B,1X)})}});y.1Q({2D:C(6,H,I){7(!6){E}H=(H||"fx")+"2D";G q=y.I(6,H);7(!I){E q||[]}7(!q||y.3f(I)){q=y.I(6,H,y.2P(I))}Q{q.1K(I)}E q},4K:C(6,H){H=H||"fx";G 2D=y.2D(6,H),fn=2D.4d();7(fn==="8F"){fn=2D.4d()}7(fn){7(H==="fx"){2D.8I("8F")}fn.1f(6,C(){y.4K(6,H)})}}});y.fn.1Q({2D:C(H,I){7(1a H!=="1R"){I=H;H="fx"}7(I===1d){E y.2D(B[0],H)}E B.1b(C(i,6){G 2D=y.2D(B,H,I);7(H==="fx"&&2D[0]!=="8F"){y.4K(B,H)}})},4K:C(H){E B.1b(C(){y.4K(B,H)})},ez:C(56,H){56=y.fx?y.fx.82[56]||56:56;H=H||"fx";E B.2D(H,C(){G 6=B;7N(C(){y.4K(6,H)},56)})},94:C(H){E B.2D(H||"fx",[])}});G 8E=/[\\n\\t]/g,7K=/\\s+/,bl=/\\r/g,b8=/3A|2L|18/,bb=/(3n|3O)/i,aV=/(3n|3O|1P|33|6n)/i,aU=/^(a|8n)$/i,aa=/4f|4V/;y.fn.1Q({3x:C(J,N){E 7t(B,J,N,R,y.3x)},ex:C(J,fn){E B.1b(C(){y.3x(B,J,"");7(B.19===1){B.8G(J)}})},8A:C(N){7(y.1G(N)){E B.1b(C(i){G 1s=y(B);1s.8A(N.1f(B,i,1s.3x("43")))})}7(N&&1a N==="1R"){G 41=(N||"").3d(7K);V(G i=0,l=B.O;i<l;i++){G 6=B[i];7(6.19===1){7(!6.1N){6.1N=N}Q{G 1N=" "+6.1N+" ";V(G c=0,cl=41.O;c<cl;c++){7(1N.2r(" "+41[c]+" ")<0){6.1N+=" "+41[c]}}}}}}E B},9u:C(N){7(y.1G(N)){E B.1b(C(i){G 1s=y(B);1s.9u(N.1f(B,i,1s.3x("43")))})}7((N&&1a N==="1R")||N===1d){G 41=(N||"").3d(7K);V(G i=0,l=B.O;i<l;i++){G 6=B[i];7(6.19===1&&6.1N){7(N){G 1N=(" "+6.1N+" ").1H(8E," ");V(G c=0,cl=41.O;c<cl;c++){1N=1N.1H(" "+41[c]+" "," ")}6.1N=1N.ew(1,1N.O-1)}Q{6.1N=""}}}}E B},aR:C(N,6P){G H=1a N,b4=1a 6P==="7S";7(y.1G(N)){E B.1b(C(i){G 1s=y(B);1s.aR(N.1f(B,i,1s.3x("43"),6P),6P)})}E B.1b(C(){7(H==="1R"){G 1N,i=0,1s=y(B),3K=6P,41=N.3d(7K);23((1N=41[i++])){3K=b4?3K:!1s.b6(1N);1s[3K?"8A":"9u"](1N)}}Q 7(H==="1d"||H==="7S"){7(B.1N){y.I(B,"ba",B.1N)}B.1N=B.1N||N===14?"":y.I(B,"ba")||""}})},b6:C(P){G 1N=" "+P+" ";V(G i=0,l=B.O;i<l;i++){7((" "+B[i].1N+" ").1H(8E," ").2r(1N)>-1){E R}}E 14},1j:C(N){7(N===1d){G 6=B[0];7(6){7(y.1g(6,"44")){E(6.eF.N||{}).bc?6.N:6.1U}7(y.1g(6,"33")){G 4p=6.5j,5D=[],1e=6.1e,4g=6.H==="33-4g";7(4p<0){E U}V(G i=4g?4p:0,58=4g?4p+1:1e.O;i<58;i++){G 44=1e[i];7(44.4Q){N=y(44).1j();7(4g){E N}5D.1K(N)}}E 5D}7(aa.17(6.H)&&!y.1Y.b7){E 6.3a("N")===U?"3J":6.N}E(6.N||"").1H(bl,"")}E 1d}G 1G=y.1G(N);E B.1b(C(i){G 1s=y(B),1j=N;7(B.19!==1){E}7(1G){1j=N.1f(B,i,1s.1j())}7(1a 1j==="5m"){1j+=""}7(y.3f(1j)&&aa.17(B.H)){B.3Q=y.4s(1s.1j(),1j)>=0}Q 7(y.1g(B,"33")){G 5D=y.2P(1j);y("44",B).1b(C(){B.4Q=y.4s(y(B).1j(),5D)>=0});7(!5D.O){B.5j=-1}}Q{B.N=1j}})}});y.1Q({7s:{1j:R,2R:R,1V:R,1U:R,I:R,2O:R,30:R,22:R},3x:C(6,J,N,4m){7(!6||6.19===3||6.19===8){E 1d}7(4m&&J 1A y.7s){E y(6)[J](N)}G 6b=6.19!==1||!y.8p(6),1l=N!==1d;J=6b&&y.3j[J]||J;7(6.19===1){G 2m=b8.17(J);7(J==="4Q"&&!y.1Y.b5){G 1M=6.1v;7(1M){1M.5j;7(1M.1v){1M.1v.5j}}}7(J 1A 6&&6b&&!2m){7(1l){7(J==="H"&&bb.17(6.1g)&&6.1v){y.2W("H dx dv\'t be ds")}6[J]=N}7(y.1g(6,"3P")&&6.5l(J)){E 6.5l(J).7n}7(J==="ap"){G 7L=6.5l("ap");E 7L&&7L.bc?7L.N:aV.17(6.1g)||aU.17(6.1g)&&6.3A?0:1d}E 6[J]}7(!y.1Y.18&&6b&&J==="18"){7(1l){6.18.aT=""+N}E 6.18.aT}7(1l){6.aS(J,""+N)}G 3x=!y.1Y.aW&&6b&&2m?6.3a(J,2):6.3a(J);E 3x===U?1d:3x}E y.18(6,J,N)}});G bi=C(aX){E aX.1H(/[^\\w\\s\\.\\|`]/g,C(ch){E"\\\\"+ch})};y.L={2M:C(6,2u,1y,I){7(6.19===3||6.19===8){E}7(6.6A&&(6!==1B&&!6.b1)){6=1B}7(!1y.21){1y.21=y.21++}7(I!==1d){G fn=1y;1y=y.2a(fn);1y.I=I}G 1I=y.I(6,"1I")||y.I(6,"1I",{}),1L=y.I(6,"1L"),7T;7(!1L){7T=C(){E 1a y!=="1d"&&!y.L.9x?y.L.1L.27(7T.6,1F):1d};1L=y.I(6,"1L",7T)}7(!1L){E}1L.6=6;2u=2u.3d(/\\s+/);G H,i=0;23((H=2u[i++])){G 24=H.3d(".");H=24.4d();7(i>1){1y=y.2a(1y);7(I!==1d){1y.I=I}}1y.H=24.2k(0).4Z().4R(".");G 40=1I[H],2m=B.2m[H]||{};7(!40){40=1I[H]={};7(!2m.4D||2m.4D.1f(6,I,24,1y)===14){7(6.4b){6.4b(H,1L,14)}Q 7(6.3L){6.3L("3J"+H,1L)}}}7(2m.2M){G 3W=2m.2M.1f(6,1y,I,24,40);7(3W&&y.1G(3W)){3W.21=3W.21||1y.21;3W.I=3W.I||1y.I;3W.H=3W.H||1y.H;1y=3W}}40[1y.21]=1y;B.3F[H]=R}6=U},3F:{},2p:C(6,2u,1y){7(6.19===3||6.19===8){E}G 1I=y.I(6,"1I"),M,H,fn;7(1I){7(2u===1d||(1a 2u==="1R"&&2u.dK(0)===".")){V(H 1A 1I){B.2p(6,H+(2u||""))}}Q{7(2u.H){1y=2u.1y;2u=2u.H}2u=2u.3d(/\\s+/);G i=0;23((H=2u[i++])){G 24=H.3d(".");H=24.4d();G 2K=!24.O,bC=y.2Y(24.2k(0).4Z(),bi),7Z=3g 5V("(^|\\\\.)"+bC.4R("\\\\.(?:.*\\\\.)?")+"(\\\\.|$)"),2m=B.2m[H]||{};7(1I[H]){7(1y){fn=1I[H][1y.21];3q 1I[H][1y.21]}Q{V(G 1L 1A 1I[H]){7(2K||7Z.17(1I[H][1L].H)){3q 1I[H][1L]}}}7(2m.2p){2m.2p.1f(6,24,fn)}V(M 1A 1I[H]){2z}7(!M){7(!2m.5M||2m.5M.1f(6,24)===14){7(6.6X){6.6X(H,y.I(6,"1L"),14)}Q 7(6.7Q){6.7Q("3J"+H,y.I(6,"1L"))}}M=U;3q 1I[H]}}}}V(M 1A 1I){2z}7(!M){G 1L=y.I(6,"1L");7(1L){1L.6=U}y.50(6,"1I");y.50(6,"1L")}}},2q:C(L,I,6){G H=L.H||L,bD=1F[3];7(!bD){L=1a L==="1P"?L[3v]?L:y.1Q(y.57(H),L):y.57(H);7(H.2r("!")>=0){L.H=H=H.2k(0,-1);L.bo=R}7(!6){L.52();7(B.3F[H]){y.1b(y.2I,C(){7(B.1I&&B.1I[H]){y.L.2q(L,I,B.1L.6)}})}}7(!6||6.19===3||6.19===8){E 1d}L.2b=1d;L.1w=6;I=y.2P(I);I.8I(L)}L.6Q=6;G 1L=y.I(6,"1L");7(1L){1L.27(6,I)}G 1M=6.1v||6.1Z;2E{7(!(6&&6.1g&&y.6g[6.1g.28()])){7(6["3J"+H]&&6["3J"+H].27(6,I)===14){L.2b=14}}}2G(e){}7(!L.ai()&&1M){y.L.2q(L,I,1M,R)}Q 7(!L.ag()){G 1w=L.1w,26,bw=y.1g(1w,"a")&&H==="4c";7(!bw&&!(1w&&1w.1g&&y.6g[1w.1g.28()])){2E{7(1w[H]){26=1w["3J"+H];7(26){1w["3J"+H]=U}B.9x=R;1w[H]()}}2G(e){}7(26){1w["3J"+H]=26}B.9x=14}}},1L:C(L){G 2K,40;L=1F[0]=y.L.3Z(L||1B.L);L.6Q=B;G 24=L.H.3d(".");L.H=24.4d();2K=!24.O&&!L.bo;G 7Z=3g 5V("(^|\\\\.)"+24.2k(0).4Z().4R("\\\\.(?:.*\\\\.)?")+"(\\\\.|$)");40=(y.I(B,"1I")||{})[L.H];V(G j 1A 40){G 1y=40[j];7(2K||7Z.17(1y.H)){L.1y=1y;L.I=1y.I;G M=1y.27(B,1F);7(M!==1d){L.2b=M;7(M===14){L.4M();L.52()}}7(L.aj()){2z}}}E L.2b},3j:"dJ dF dA dD 3n dL 6w 9W aw 9C 6Q I dS dR 7J 1y 5S dN dO 9w dP dV dt do 9X aO dq du 6u dr dw ey av 1w as f9 g9 4Y".3d(" "),3Z:C(L){7(L[3v]){E L}G 5L=L;L=y.57(5L);V(G i=B.3j.O,1p;i;){1p=B.3j[--i];L[1p]=5L[1p]}7(!L.1w){L.1w=L.av||12}7(L.1w.19===3){L.1w=L.1w.1v}7(!L.6u&&L.7J){L.6u=L.7J===L.1w?L.as:L.7J}7(L.9X==U&&L.9W!=U){G 2e=12.2i,1i=12.1i;L.9X=L.9W+(2e&&2e.4v||1i&&1i.4v||0)-(2e&&2e.5K||1i&&1i.5K||0);L.aO=L.aw+(2e&&2e.4z||1i&&1i.4z||0)-(2e&&2e.5Q||1i&&1i.5Q||0)}7(!L.4Y&&((L.6w||L.6w===0)?L.6w:L.5S)){L.4Y=L.6w||L.5S}7(!L.9w&&L.9C){L.9w=L.9C}7(!L.4Y&&L.3n!==1d){L.4Y=(L.3n&1?1:(L.3n&2?3:(L.3n&4?2:0)))}E L},21:gb,2a:y.2a,2m:{3l:{4D:y.9E,5M:y.6y},2B:{2M:C(2a,I,24,2B){y.1Q(2a,I||{});2a.21+=I.P+I.2B;I.gd=2a;y.L.2M(B,I.2B,9M,I)},2p:C(24){7(24.O){G 2p=0,J=3g 5V("(^|\\\\.)"+24[0]+"(\\\\.|$)");y.1b((y.I(B,"1I").2B||{}),C(){7(J.17(B.H)){2p++}});7(2p<1){y.L.2p(B,24[0],9M)}}},2m:{}},gc:{4D:C(I,24,fn){7(B.6A){B.9Z=fn}E 14},5M:C(24,fn){7(B.9Z===fn){B.9Z=U}}}}};y.57=C(2L){7(!B.4M){E 3g y.57(2L)}7(2L&&2L.H){B.5L=2L;B.H=2L.H}Q{B.H=2L}B.eY=2Q();B[3v]=R};C 8d(){E 14}C 89(){E R}y.57.2T={4M:C(){B.ag=89;G e=B.5L;7(!e){E}7(e.4M){e.4M()}e.g3=14},52:C(){B.ai=89;G e=B.5L;7(!e){E}7(e.52){e.52()}e.fV=R},fU:C(){B.aj=89;B.52()},ag:8d,ai:8d,aj:8d};G a1=C(L){G 1M=L.6u;23(1M&&1M!==B){2E{1M=1M.1v}2G(e){2z}}7(1M!==B){L.H=L.I;y.L.1L.27(B,1F)}},am=C(L){L.H=L.I;y.L.1L.27(B,1F)};y.1b({6h:"bm",6M:"bv"},C(2U,3Z){y.L.2m[2U]={4D:C(I){y.L.2M(B,3Z,I&&I.P?am:a1,2U)},5M:C(I){y.L.2p(B,3Z,I&&I.P?am:a1)}}});7(!y.1Y.aA){y.L.2m.4t={4D:C(I,24,fn){7(B.1g.28()!=="3P"){y.L.2M(B,"4c.8f."+fn.21,C(e){G 6=e.1w,H=6.H;7((H==="4t"||H==="8r")&&y(6).6v("3P").O){E 2q("4t",B,1F)}});y.L.2M(B,"9L.8f."+fn.21,C(e){G 6=e.1w,H=6.H;7((H==="1U"||H==="6o")&&y(6).6v("3P").O&&e.5S===13){E 2q("4t",B,1F)}})}Q{E 14}},2p:C(24,fn){y.L.2p(B,"4c.8f"+(fn?"."+fn.21:""));y.L.2p(B,"9L.8f"+(fn?"."+fn.21:""))}}}7(!y.1Y.bg){G 6Y=/6n|3O|33/i;C a5(6){G H=6.H,1j=6.N;7(H==="4f"||H==="4V"){1j=6.3Q}Q 7(H==="33-7D"){1j=6.5j>-1?y.2Y(6.1e,C(6){E 6.4Q}).4R("-"):""}Q 7(6.1g.28()==="33"){1j=6.5j}E 1j}C 6Z(e){G 6=e.1w,I,1j;7(!6Y.17(6.1g)||6.aE){E}I=y.I(6,"a2");1j=a5(6);7(e.H!=="6R"||6.H!=="4f"){y.I(6,"a2",1j)}7(I===1d||1j===I){E}7(I!=U||1j){e.H="6p";E y.L.2q(e,1F[1],6)}}y.L.2m.6p={3H:{6R:6Z,4c:C(e){G 6=e.1w,H=6.H;7(H==="4f"||H==="4V"||6.1g.28()==="33"){E 6Z.1f(B,e)}},bF:C(e){G 6=e.1w,H=6.H;7((e.5S===13&&6.1g.28()!=="6n")||(e.5S===32&&(H==="4V"||H==="4f"))||H==="33-7D"){E 6Z.1f(B,e)}},fZ:C(e){G 6=e.1w;7(6.1g.28()==="3O"&&6.H==="4f"){y.I(6,"a2",a5(6))}}},4D:C(I,24,fn){V(G H 1A 6I){y.L.2M(B,H+".az."+fn.21,6I[H])}E 6Y.17(B.1g)},2p:C(24,fn){V(G H 1A 6I){y.L.2p(B,H+".az"+(fn?"."+fn.21:""),6I[H])}E 6Y.17(B.1g)}};G 6I=y.L.2m.6p.3H}C 2q(H,6,1D){1D[0].H=H;E y.L.1L.27(6,1D)}7(12.4b){y.1b({9v:"a6",9A:"6R"},C(2U,3Z){y.L.2m[3Z]={4D:C(){B.4b(2U,1y,R)},5M:C(){B.6X(2U,1y,R)}};C 1y(e){e=y.L.3Z(e);e.H=3Z;E y.L.1L.1f(B,e)}})}y.1b(["8a","4g"],C(i,J){y.fn[J]=C(H,I,fn){7(1a H==="1P"){V(G 1X 1A H){B[J](1X,I,H[1X],fn)}E B}7(y.1G(I)){fn=I;I=1d}G 1y=J==="4g"?y.2a(fn,C(L){y(B).6W(L,1y);E fn.27(B,1F)}):fn;E H==="bj"&&J!=="4g"?B.4g(H,I,fn):B.1b(C(){y.L.2M(B,H,1y,I)})}});y.fn.1Q({6W:C(H,fn){7(1a H==="1P"&&!H.4M){V(G 1X 1A H){B.6W(1X,H[1X])}E B}E B.1b(C(){y.L.2p(B,H,fn)})},2q:C(H,I){E B.1b(C(){y.L.2q(H,I,B)})},7G:C(H,I){7(B[0]){G L=y.57(H);L.4M();L.52();y.L.2q(L,I,B[0]);E L.2b}},5r:C(fn){G 1D=1F,i=1;23(i<1D.O){y.2a(fn,1D[i++])}E B.4c(y.2a(fn,C(L){G 6q=(y.I(B,"6q"+fn.21)||0)%i;y.I(B,"6q"+fn.21,6q+1);L.4M();E 1D[6q].27(B,1F)||14}))},aK:C(9K,aL){E B.6h(9K).6M(aL||9K)}});y.1b(["2B","gs"],C(i,J){y.fn[J]=C(2u,I,fn){G H,i=0;7(y.1G(I)){fn=I;I=1d}2u=(2u||"").3d(/\\s+/);23((H=2u[i++])!=U){H=H==="9v"?"a6":H==="9A"?"6R":H==="aK"?2u.1K("6M")&&"6h":H;7(J==="2B"){y(B.T).8a(9U(H,B.P),{I:I,P:B.P,2B:H},fn)}Q{y(B.T).6W(9U(H,B.P),fn?{21:fn.21+B.P+H}:U)}}E B}});C 9M(L){G 62,1C=[],3h=[],1D=1F,6e,K,fn,6,j,i,l,I,2B=y.1Q({},y.I(B,"1I").2B);7(L.3n&&L.H==="4c"){E}V(j 1A 2B){fn=2B[j];7(fn.2B===L.H||fn.aI&&y.4s(L.H,fn.aI)>-1){I=fn.I;7(!(I.9O&&I.9O[L.H]&&!I.9O[L.H](L))){3h.1K(fn.P)}}Q{3q 2B[j]}}K=y(L.1w).6v(3h,L.6Q);V(i=0,l=K.O;i<l;i++){V(j 1A 2B){fn=2B[j];6=K[i].6;6e=U;7(K[i].P===fn.P){7(fn.2B==="6h"||fn.2B==="6M"){6e=y(L.6u).6v(fn.P)[0]}7(!6e||6e!==6){1C.1K({6:6,fn:fn})}}}}V(i=0,l=1C.O;i<l;i++){K=1C[i];L.6Q=K.6;L.I=K.fn.I;7(K.fn.27(K.6,1D)===14){62=14;2z}}E 62}C 9U(H,P){E"2B."+(H?H+".":"")+P.1H(/\\./g,"`").1H(/ /g,"&")}y.1b(("9A 9v a6 6R 76 fh 7Y bj 4c fi "+"fm fl fk bm bv 6h 6M "+"6p 33 4t bF 9L fb 2W").3d(" "),C(i,J){y.fn[J]=C(fn){E fn?B.8a(J,fn):B.2q(J)};7(y.7s){y.7s[J]=R}});7(1B.3L&&!1B.4b){1B.3L("f2",C(){V(G 1T 1A y.2I){7(y.2I[1T].1L){2E{y.L.2p(y.2I[1T].1L.6)}2G(e){}}}})}(C(){G 7k=/((?:\\((?:\\([^()]+\\)|[^()]+)+\\)|\\[(?:\\[[^[\\]]*\\]|[\'"][^\'"]*[\'"]|[^[\\]\'"]+)+\\]|\\\\.|[^ >+~,(\\[\\\\]+)+|[>+~])(\\s*,\\s*)?((?:.|\\r|\\n)*)/g,3Y=0,4a=7x.2T.4a,49=14,9B=R;[0,0].4Z(C(){9B=14;E 0});G 1J=C(P,T,1q,4E){1q=1q||[];G aY=T=T||12;7(T.19!==1&&T.19!==9){E[]}7(!P||1a P!=="1R"){E 1q}G 1k=[],m,1l,1r,3I,9y=R,6t=2d(T),9J=P;23((7k.29(""),m=7k.29(9J))!==U){9J=m[3];1k.1K(m[1]);7(m[2]){3I=m[3];2z}}7(1k.O>1&&bs.29(P)){7(1k.O===2&&1t.3V[1k[0]]){1l=8V(1k[0]+1k[1],T)}Q{1l=1t.3V[1k[0]]?[T]:1J(1k.4d(),T);23(1k.O){P=1k.4d();7(1t.3V[P]){P+=1k.4d()}1l=8V(P,1l)}}}Q{7(!4E&&1k.O>1&&T.19===9&&!6t&&1t.K.45.17(1k[0])&&!1t.K.45.17(1k[1k.O-1])){G M=1J.2y(1k.4d(),T,6t);T=M.1z?1J.1u(M.1z,M.1l)[0]:M.1l[0]}7(T){G M=4E?{1z:1k.4e(),1l:2P(4E)}:1J.2y(1k.4e(),1k.O===1&&(1k[0]==="~"||1k[0]==="+")&&T.1v?T.1v:T,6t);1l=M.1z?1J.1u(M.1z,M.1l):M.1l;7(1k.O>0){1r=2P(1l)}Q{9y=14}23(1k.O){G 1h=1k.4e(),4e=1h;7(!1t.3V[1h]){1h=""}Q{4e=1k.4e()}7(4e==U){4e=T}1t.3V[1h](1r,4e,6t)}}Q{1r=1k=[]}}7(!1r){1r=1l}7(!1r){1J.2W(1h||P)}7(4a.1f(1r)==="[1P 3X]"){7(!9y){1q.1K.27(1q,1r)}Q 7(T&&T.19===1){V(G i=0;1r[i]!=U;i++){7(1r[i]&&(1r[i]===R||1r[i].19===1&&4r(T,1r[i]))){1q.1K(1l[i])}}}Q{V(G i=0;1r[i]!=U;i++){7(1r[i]&&1r[i].19===1){1q.1K(1l[i])}}}}Q{2P(1r,1q)}7(3I){1J(3I,aY,1q,4E);1J.8N(1q)}E 1q};1J.8N=C(1q){7(64){49=9B;1q.4Z(64);7(49){V(G i=1;i<1q.O;i++){7(1q[i]===1q[i-1]){1q.3S(i--,1)}}}}E 1q};1J.4u=C(1z,1l){E 1J(1z,U,U,1l)};1J.2y=C(1z,T,2d){G 1l,K;7(!1z){E[]}V(G i=0,l=1t.78.O;i<l;i++){G H=1t.78[i],K;7((K=1t.77[H].29(1z))){G 1m=K[1];K.3S(1,1);7(1m.73(1m.O-1)!=="\\\\"){K[1]=(K[1]||"").1H(/\\\\/g,"");1l=1t.2y[H](K,T,2d);7(1l!=U){1z=1z.1H(1t.K[H],"");2z}}}}7(!1l){1l=T.2N("*")}E{1l:1l,1z:1z}};1J.1u=C(1z,1l,3y,2F){G 26=1z,2b=[],2S=1l,K,5e,b2=1l&&1l[0]&&2d(1l[0]);23(1z&&1l.O){V(G H 1A 1t.1u){7((K=1t.77[H].29(1z))!=U&&K[2]){G 1u=1t.1u[H],5w,6f,1m=K[1];5e=14;K.3S(1,1);7(1m.73(1m.O-1)==="\\\\"){9F}7(2S===2b){2b=[]}7(1t.8u[H]){K=1t.8u[H](K,2S,3y,2b,2F,b2);7(!K){5e=5w=R}Q 7(K===R){9F}}7(K){V(G i=0;(6f=2S[i])!=U;i++){7(6f){5w=1u(6f,K,i,2S);G 4m=2F^!!5w;7(3y&&5w!=U){7(4m){5e=R}Q{2S[i]=14}}Q 7(4m){2b.1K(6f);5e=R}}}}7(5w!==1d){7(!3y){2S=2b}1z=1z.1H(1t.K[H],"");7(!5e){E[]}2z}}}7(1z===26){7(5e==U){1J.2W(1z)}Q{2z}}26=1z}E 2S};1J.2W=C(7e){bd"bz 2W, bx by: "+7e};G 1t=1J.3h={78:["45","8C","5E"],K:{45:/#((?:[\\w\\5u-\\5y-]|\\\\.)+)/,6i:/\\.((?:[\\w\\5u-\\5y-]|\\\\.)+)/,8C:/\\[J=[\'"]*((?:[\\w\\5u-\\5y-]|\\\\.)+)[\'"]*\\]/,9d:/\\[\\s*((?:[\\w\\5u-\\5y-]|\\\\.)+)\\s*(?:(\\S?=)\\s*([\'"]*)(.*?)\\3|)\\s*\\]/,5E:/^((?:[\\w\\5u-\\5y\\*-]|\\\\.)+)/,79:/:(bH|4H|4o|2j)-fJ(?:\\((7q|7E|[\\dn+-]*)\\))?/,5p:/:(4H|eq|gt|bB|2j|4o|7q|7E)(?:\\((\\d*)\\))?(?=[^-]|$)/,6N:/:((?:[\\w\\5u-\\5y-]|\\\\.)+)(?:\\(([\'"]?)((?:\\([^\\)]+\\)|[^\\(\\)]*)+)\\2\\))?/},77:{},8z:{"43":"1N","V":"b9"},7f:{3A:C(6){E 6.3a("3A")}},3V:{"+":C(1r,1W){G 5a=1a 1W==="1R",9c=5a&&!/\\W/.17(1W),8g=5a&&!9c;7(9c){1W=1W.28()}V(G i=0,l=1r.O,6;i<l;i++){7((6=1r[i])){23((6=6.65)&&6.19!==1){}1r[i]=8g||6&&6.1g.28()===1W?6||14:6===1W}}7(8g){1J.1u(1W,1r,R)}},">":C(1r,1W){G 5a=1a 1W==="1R";7(5a&&!/\\W/.17(1W)){1W=1W.28();V(G i=0,l=1r.O;i<l;i++){G 6=1r[i];7(6){G 1M=6.1v;1r[i]=1M.1g.28()===1W?1M:14}}}Q{V(G i=0,l=1r.O;i<l;i++){G 6=1r[i];7(6){1r[i]=5a?6.1v:6.1v===1W}}7(5a){1J.1u(1W,1r,R)}}},"":C(1r,1W,2d){G 39=3Y++,5C=8X;7(1a 1W==="1R"&&!/\\W/.17(1W)){G 5H=1W=1W.28();5C=8Y}5C("1v",1W,39,1r,5H,2d)},"~":C(1r,1W,2d){G 39=3Y++,5C=8X;7(1a 1W==="1R"&&!/\\W/.17(1W)){G 5H=1W=1W.28();5C=8Y}5C("65",1W,39,1r,5H,2d)}},2y:{45:C(K,T,2d){7(1a T.5z!=="1d"&&!2d){G m=T.5z(K[1]);E m?[m]:[]}},8C:C(K,T){7(1a T.bf!=="1d"){G M=[],1q=T.bf(K[1]);V(G i=0,l=1q.O;i<l;i++){7(1q[i].3a("J")===K[1]){M.1K(1q[i])}}E M.O===0?U:M}},5E:C(K,T){E T.2N(K[1])}},8u:{6i:C(K,2S,3y,2b,2F,2d){K=" "+K[1].1H(/\\\\/g,"")+" ";7(2d){E K}V(G i=0,6;(6=2S[i])!=U;i++){7(6){7(2F^(6.1N&&(" "+6.1N+" ").1H(/[\\t\\n]/g," ").2r(K)>=0)){7(!3y){2b.1K(6)}}Q 7(3y){2S[i]=14}}}E 14},45:C(K){E K[1].1H(/\\\\/g,"")},5E:C(K,2S){E K[1].28()},79:C(K){7(K[1]==="4H"){G 17=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.29(K[2]==="7q"&&"2n"||K[2]==="7E"&&"2n+1"||!/\\D/.17(K[2])&&"fM+"+K[2]||K[2]);K[2]=(17[1]+(17[2]||1))-0;K[3]=17[3]-0}K[0]=3Y++;E K},9d:C(K,2S,3y,2b,2F,2d){G J=K[1].1H(/\\\\/g,"");7(!2d&&1t.8z[J]){K[1]=1t.8z[J]}7(K[2]==="~="){K[4]=" "+K[4]+" "}E K},6N:C(K,2S,3y,2b,2F){7(K[1]==="2F"){7((7k.29(K[3])||"").O>1||/^\\w/.17(K[3])){K[3]=1J(K[3],U,U,2S)}Q{G M=1J.1u(K[3],2S,3y,R^2F);7(!3y){2b.1K.27(2b,M)}E 14}}Q 7(1t.K.5p.17(K[0])||1t.K.79.17(K[0])){E R}E K},5p:C(K){K.8I(R);E K}},3H:{fu:C(6){E 6.71===14&&6.H!=="2X"},71:C(6){E 6.71===R},3Q:C(6){E 6.3Q===R},4Q:C(6){6.1v.5j;E 6.4Q===R},1M:C(6){E!!6.1S},5G:C(6){E!6.1S},cN:C(6,i,K){E!!1J(K[3],6).O},fq:C(6){E/h\\d/i.17(6.1g)},1U:C(6){E"1U"===6.H},4f:C(6){E"4f"===6.H},4V:C(6){E"4V"===6.H},7P:C(6){E"7P"===6.H},6o:C(6){E"6o"===6.H},4t:C(6){E"4t"===6.H},8r:C(6){E"8r"===6.H},bh:C(6){E"bh"===6.H},3n:C(6){E"3n"===6.H||6.1g.28()==="3n"},3O:C(6){E/3O|33|6n|3n/i.17(6.1g)}},bt:{2j:C(6,i){E i===0},4o:C(6,i,K,1E){E i===1E.O-1},7q:C(6,i){E i%2===0},7E:C(6,i){E i%2===1},bB:C(6,i,K){E i<K[3]-0},gt:C(6,i,K){E i>K[3]-0},4H:C(6,i,K){E K[3]-0===i},eq:C(6,i,K){E K[3]-0===i}},1u:{6N:C(6,K,i,1E){G J=K[1],1u=1t.3H[J];7(1u){E 1u(6,i,K,1E)}Q 7(J==="4r"){E(6.bA||6.fC||5Z([6])||"").2r(K[3])>=0}Q 7(J==="2F"){G 2F=K[3];V(G i=0,l=2F.O;i<l;i++){7(2F[i]===6){E 14}}E R}Q{1J.2W("bz 2W, bx by: "+J)}},79:C(6,K){G H=K[1],2t=6;fs(H){7r\'bH\':7r\'2j\':23((2t=2t.65)){7(2t.19===1){E 14}}7(H==="2j"){E R}2t=6;7r\'4o\':23((2t=2t.4i)){7(2t.19===1){E 14}}E R;7r\'4H\':G 2j=K[2],4o=K[3];7(2j===1&&4o===0){E R}G 39=K[0],1M=6.1v;7(1M&&(1M.5F!==39||!6.9h)){G bE=0;V(2t=1M.1S;2t;2t=2t.4i){7(2t.19===1){2t.9h=++bE}}1M.5F=39}G 4B=6.9h-4o;7(2j===0){E 4B===0}Q{E(4B%2j===0&&4B/2j>=0)}}},45:C(6,K){E 6.19===1&&6.3a("1T")===K},5E:C(6,K){E(K==="*"&&6.19===1)||6.1g.28()===K},6i:C(6,K){E(" "+(6.1N||6.3a("43"))+" ").2r(K)>-1},9d:C(6,K){G J=K[1],2b=1t.7f[J]?1t.7f[J](6):6[J]!=U?6[J]:6.3a(J),N=2b+"",H=K[2],3t=K[4];E 2b==U?H==="!=":H==="="?N===3t:H==="*="?N.2r(3t)>=0:H==="~="?(" "+N+" ").2r(3t)>=0:!3t?N&&2b!==14:H==="!="?N!==3t:H==="^="?N.2r(3t)===0:H==="$="?N.73(N.O-3t.O)===3t:H==="|="?N===3t||N.73(0,3t.O+1)===3t+"-":14},5p:C(6,K,i,1E){G J=K[2],1u=1t.bt[J];7(1u){E 1u(6,i,K,1E)}}}};G bs=1t.K.5p;V(G H 1A 1t.K){1t.K[H]=3g 5V(1t.K[H].74+/(?![^\\[]*\\])(?![^\\(]*\\))/.74);1t.77[H]=3g 5V(/(^(?:.|\\r|\\n)*?)/.74+1t.K[H].74.1H(/\\\\(\\d+)/g,C(2K,3B){E"\\\\"+(3B-0+1)}))}G 2P=C(1E,1q){1E=3X.2T.2k.1f(1E,0);7(1q){1q.1K.27(1q,1E);E 1q}E 1E};2E{3X.2T.2k.1f(12.2i.47,0)}2G(e){2P=C(1E,1q){G M=1q||[];7(4a.1f(1E)==="[1P 3X]"){3X.2T.1K.27(M,1E)}Q{7(1a 1E.O==="5m"){V(G i=0,l=1E.O;i<l;i++){M.1K(1E[i])}}Q{V(G i=0;1E[i];i++){M.1K(1E[i])}}}E M}}G 64;7(12.2i.5s){64=C(a,b){7(!a.5s||!b.5s){7(a==b){49=R}E a.5s?-1:1}G M=a.5s(b)&4?-1:a===b?0:1;7(M===0){49=R}E M}}Q 7("61"1A 12.2i){64=C(a,b){7(!a.61||!b.61){7(a==b){49=R}E a.61?-1:1}G M=a.61-b.61;7(M===0){49=R}E M}}Q 7(12.9s){64=C(a,b){7(!a.1Z||!b.1Z){7(a==b){49=R}E a.1Z?-1:1}G 7C=a.1Z.9s(),7g=b.1Z.9s();7C.au(a,0);7C.aq(a,0);7g.au(b,0);7g.aq(b,0);G M=7C.gv(gy.gz,7g);7(M===0){49=R}E M}}C 5Z(1C){G M="",6;V(G i=0;1C[i];i++){6=1C[i];7(6.19===3||6.19===4){M+=6.7n}Q 7(6.19!==8){M+=5Z(6.47)}}E M}(C(){G 3P=12.2x("Y"),1T="1x"+(3g aP).aH();3P.3p="<a J=\'"+1T+"\'/>";G 2Z=12.2i;2Z.3C(3P,2Z.1S);7(12.5z(1T)){1t.2y.45=C(K,T,2d){7(1a T.5z!=="1d"&&!2d){G m=T.5z(K[1]);E m?m.1T===K[1]||1a m.5l!=="1d"&&m.5l("1T").7n===K[1]?[m]:1d:[]}};1t.1u.45=C(6,K){G 2t=1a 6.5l!=="1d"&&6.5l("1T");E 6.19===1&&2t&&2t.7n===K}}2Z.3u(3P);2Z=3P=U})();(C(){G Y=12.2x("Y");Y.3N(12.g1(""));7(Y.2N("*").O>0){1t.2y.5E=C(K,T){G 1q=T.2N(K[1]);7(K[1]==="*"){G 6l=[];V(G i=0;1q[i];i++){7(1q[i].19===1){6l.1K(1q[i])}}1q=6l}E 1q}}Y.3p="<a 3A=\'#\'></a>";7(Y.1S&&1a Y.1S.3a!=="1d"&&Y.1S.3a("3A")!=="#"){1t.7f.3A=C(6){E 6.3a("3A",2)}}Y=U})();7(12.7A){(C(){G 70=1J,Y=12.2x("Y");Y.3p="<p 43=\'aF\'></p>";7(Y.7A&&Y.7A(".aF").O===0){E}1J=C(9G,T,3I,4E){T=T||12;7(!4E&&T.19===9&&!2d(T)){2E{E 2P(T.7A(9G),3I)}2G(e){}}E 70(9G,T,3I,4E)};V(G 1p 1A 70){1J[1p]=70[1p]}Y=U})()}(C(){G Y=12.2x("Y");Y.3p="<Y 43=\'17 e\'></Y><Y 43=\'17\'></Y>";7(!Y.6d||Y.6d("e").O===0){E}Y.an.1N="e";7(Y.6d("e").O===1){E}1t.78.3S(1,0,"6i");1t.2y.6i=C(K,T,2d){7(1a T.6d!=="1d"&&!2d){E T.6d(K[1])}};Y=U})();C 8Y(2J,1h,39,1r,5H,2d){V(G i=0,l=1r.O;i<l;i++){G 6=1r[i];7(6){6=6[2J];G K=14;23(6){7(6.5F===39){K=1r[6.7B];2z}7(6.19===1&&!2d){6.5F=39;6.7B=i}7(6.1g.28()===1h){K=6;2z}6=6[2J]}1r[i]=K}}}C 8X(2J,1h,39,1r,5H,2d){V(G i=0,l=1r.O;i<l;i++){G 6=1r[i];7(6){6=6[2J];G K=14;23(6){7(6.5F===39){K=1r[6.7B];2z}7(6.19===1){7(!2d){6.5F=39;6.7B=i}7(1a 1h!=="1R"){7(6===1h){K=R;2z}}Q 7(1J.1u(1h,[6]).O>0){K=6;2z}}6=6[2J]}1r[i]=K}}}G 4r=12.5s?C(a,b){E a.5s(b)&16}:C(a,b){E a!==b&&(a.4r?a.4r(b):R)};G 2d=C(6){G 2i=(6?6.1Z||6:0).2i;E 2i?2i.1g!=="g2":14};G 8V=C(P,T){G 8O=[],8P="",K,2Z=T.19?[T]:T;23((K=1t.K.6N.29(P))){8P+=K[0];P=P.1H(1t.K.6N,"")}P=1t.3V[P]?P+"*":P;V(G i=0,l=2Z.O;i<l;i++){1J(P,2Z[i],8O)}E 1J.1u(8P,8O)};y.2y=1J;y.1z=1J.3h;y.1z[":"]=y.1z.3H;y.9j=1J.8N;y.5Z=5Z;y.8p=2d;y.4r=4r;E;1B.1J=1J})();G d3=/g0$/,cU=/^(?:d4|bJ|cX)/,d1=/,/,2k=3X.2T.2k;G 97=C(53,3G,6k){7(y.1G(3G)){E y.5Y(53,C(6,i){E!!3G.1f(6,i,6)===6k})}Q 7(3G.19){E y.5Y(53,C(6,i){E(6===3G)===6k})}Q 7(1a 3G==="1R"){G 8U=y.5Y(53,C(6){E 6.19===1});7(cO.17(3G)){E y.1u(3G,8U,!6k)}Q{3G=y.1u(3G,8U)}}E y.5Y(53,C(6,i){E(y.4s(6,3G)>=0)===6k})};y.fn.1Q({2y:C(P){G M=B.3s("","2y",P),O=0;V(G i=0,l=B.O;i<l;i++){O=M.O;y.2y(P,B[i],M);7(i>0){V(G n=O;n<M.O;n++){V(G r=0;r<O;r++){7(M[r]===M[n]){M.3S(n--,1);2z}}}}}E M},cN:C(1w){G 96=y(1w);E B.1u(C(){V(G i=0,l=96.O;i<l;i++){7(y.4r(B,96[i])){E R}}})},2F:C(P){E B.3s(97(B,P,14),"2F",P)},1u:C(P){E B.3s(97(B,P,R),"1u",P)},67:C(P){E!!P&&y.1u(P,B).O>0},6v:C(3h,T){7(y.3f(3h)){G M=[],1h=B[0],K,4u={},P;7(1h&&3h.O){V(G i=0,l=3h.O;i<l;i++){P=3h[i];7(!4u[P]){4u[P]=y.1z.K.5p.17(P)?y(P,T||B.T):P}}23(1h&&1h.1Z&&1h!==T){V(P 1A 4u){K=4u[P];7(K.6j?K.4p(1h)>-1:y(1h).67(K)){M.1K({P:P,6:1h});3q 4u[P]}}1h=1h.1v}}E M}G 5q=y.1z.K.5p.17(3h)?y(3h,T||B.T):U;E B.2Y(C(i,1h){23(1h&&1h.1Z&&1h!==T){7(5q?5q.4p(1h)>-1:y(1h).67(3h)){E 1h}1h=1h.1v}E U})},4p:C(6){7(!6||1a 6==="1R"){E y.4s(B[0],6?y(6):B.1M().cZ())}E y.4s(6.6j?6[0]:6,B)},2M:C(P,T){G 1l=1a P==="1R"?y(P,T||B.T):y.2P(P),2K=y.7p(B.54(),1l);E B.3s(9o(1l[0])||9o(2K[0])?2K:y.9j(2K))},gx:C(){E B.2M(B.9k)}});C 9o(2t){E!2t||!2t.1v||2t.1v.19===11}y.1b({1M:C(6){G 1M=6.1v;E 1M&&1M.19!==11?1M:U},d4:C(6){E y.2J(6,"1v")},gn:C(6,i,3m){E y.2J(6,"1v",3m)},7m:C(6){E y.4H(6,2,"4i")},gq:C(6){E y.4H(6,2,"65")},f0:C(6){E y.2J(6,"4i")},cX:C(6){E y.2J(6,"65")},f4:C(6,i,3m){E y.2J(6,"4i",3m)},bJ:C(6,i,3m){E y.2J(6,"65",3m)},fp:C(6){E y.98(6.1v.1S,6)},cZ:C(6){E y.98(6.1S)},6V:C(6){E y.1g(6,"fF")?6.fP||6.fO.12:y.2P(6.47)}},C(J,fn){y.fn[J]=C(3m,P){G M=y.2Y(B,fn,3m);7(!d3.17(J)){P=3m}7(P&&1a P==="1R"){M=y.1u(P,M)}M=B.O>1?y.9j(M):M;7((B.O>1||d1.17(P))&&cU.17(J)){M=M.fN()}E B.3s(M,J,2k.1f(1F).4R(","))}});y.1Q({1u:C(1z,1C,2F){7(2F){1z=":2F("+1z+")"}E y.2y.4u(1z,1C)},2J:C(6,2J,3m){G 9b=[],1h=6[2J];23(1h&&1h.19!==9&&(3m===1d||1h.19!==1||!y(1h).67(3m))){7(1h.19===1){9b.1K(1h)}1h=1h[2J]}E 9b},4H:C(1h,2b,2J,6){2b=2b||1;G 3B=0;V(;1h;1h=1h[2J]){7(1h.19===1&&++3B===2b){2z}}E 1h},98:C(n,6){G r=[];V(;n;n=n.4i){7(n.19===1&&n!==6){r.1K(n)}}E r}});G 8t=/ y\\d+="(?:\\d+|U)"/g,6J=/^\\s+/,a0=/(<([\\w:]+)[^>]*?)\\/>/g,cQ=/^(?:8n|br|d7|cK|fE|fD|3O|9f|ft|6s)$/i,a4=/<([\\w:]+)/,bK=/<2A/i,bX=/<|&\\w+;/,8J=/3Q\\s*(?:[^=]|=\\s*.3Q.)/i,a3=C(2K,d6,5x){E cQ.17(5x)?2K:d6+"></"+5x+">"},34={44:[1,"<33 7D=\'7D\'>","</33>"],fr:[1,"<d5>","</d5>"],d8:[1,"<2f>","</2f>"],59:[2,"<2f><2A>","</2A></2f>"],4I:[3,"<2f><2A><59>","</59></2A></2f>"],d7:[2,"<2f><2A></2A><8m>","</8m></2f>"],8n:[1,"<2Y>","</2Y>"],4k:[0,"",""]};34.fe=34.44;34.2A=34.fy=34.8m=34.fz=34.d8;34.fB=34.4I;7(!y.1Y.da){34.4k=[1,"Y<Y>","</Y>"]}y.fn.1Q({1U:C(1U){7(y.1G(1U)){E B.1b(C(i){G 1s=y(B);1s.1U(1U.1f(B,i,1s.1U()))})}7(1a 1U!=="1P"&&1U!==1d){E B.5G().3U((B[0]&&B[0].1Z||12).6x(1U))}E y.5Z(B)},7d:C(1V){7(y.1G(1V)){E B.1b(C(i){y(B).7d(1V.1f(B,i))})}7(B[0]){G 46=y(1V,B[0].1Z).eq(0).6z(R);7(B[0].1v){46.3C(B[0])}46.2Y(C(){G 6=B;23(6.1S&&6.1S.19===1){6=6.1S}E 6}).3U(B)}E B},dd:C(1V){7(y.1G(1V)){E B.1b(C(i){y(B).dd(1V.1f(B,i))})}E B.1b(C(){G 1s=y(B),6V=1s.6V();7(6V.O){6V.7d(1V)}Q{1s.3U(1V)}})},46:C(1V){E B.1b(C(){y(B).7d(1V)})},fw:C(){E B.1M().1b(C(){7(!y.1g(B,"1i")){y(B).6D(B.47)}}).3o()},3U:C(){E B.5d(1F,R,C(6){7(B.19===1){B.3N(6)}})},c6:C(){E B.5d(1F,R,C(6){7(B.19===1){B.3C(6,B.1S)}})},7h:C(){7(B[0]&&B[0].1v){E B.5d(1F,14,C(6){B.1v.3C(6,B)})}Q 7(1F.O){G 1l=y(1F[0]);1l.1K.27(1l,B.7b());E B.3s(1l,"7h",1F)}},8q:C(){7(B[0]&&B[0].1v){E B.5d(1F,14,C(6){B.1v.3C(6,B.4i)})}Q 7(1F.O){G 1l=B.3s(B,"8q",1F);1l.1K.27(1l,y(1F[0]).7b());E 1l}},6z:C(1I){G M=B.2Y(C(){7(!y.1Y.8j&&!y.8p(B)){G 1V=B.fv,1Z=B.1Z;7(!1V){G Y=1Z.2x("Y");Y.3N(B.5k(R));1V=Y.3p}E y.ac([1V.1H(8t,"").1H(6J,"")],1Z)[0]}Q{E B.5k(R)}});7(1I===R){8y(B,M);8y(B.2y("*"),M.2y("*"))}E M},1V:C(N){7(N===1d){E B[0]&&B[0].19===1?B[0].3p.1H(8t,""):U}Q 7(1a N==="1R"&&!/<1x/i.17(N)&&(y.1Y.ak||!6J.17(N))&&!34[(a4.29(N)||["",""])[1].28()]){N=N.1H(a0,a3);2E{V(G i=0,l=B.O;i<l;i++){7(B[i].19===1){y.69(B[i].2N("*"));B[i].3p=N}}}2G(e){B.5G().3U(N)}}Q 7(y.1G(N)){B.1b(C(i){G 1s=y(B),26=1s.1V();1s.5G().3U(C(){E N.1f(B,i,26)})})}Q{B.5G().3U(N)}E B},6D:C(N){7(B[0]&&B[0].1v){7(!y.1G(N)){N=y(N).cT()}Q{E B.1b(C(i){G 1s=y(B),26=1s.1V();1s.6D(N.1f(B,i,26))})}E B.1b(C(){G 7m=B.4i,1M=B.1v;y(B).2p();7(7m){y(7m).7h(N)}Q{y(1M).3U(N)}})}Q{E B.3s(y(y.1G(N)?N():N),"6D",N)}},cT:C(P){E B.2p(P,R)},5d:C(1D,2f,1o){G 1q,2j,N=1D[0],4h=[];7(!y.1Y.7l&&1F.O===3&&1a N==="1R"&&8J.17(N)){E B.1b(C(){y(B).5d(1D,2f,1o,R)})}7(y.1G(N)){E B.1b(C(i){G 1s=y(B);1D[0]=N.1f(B,i,2f?1s.1V():1d);1s.5d(1D,2f,1o)})}7(B[0]){7(1D[0]&&1D[0].1v&&1D[0].1v.19===11){1q={2v:1D[0].1v}}Q{1q=8B(1D,B,4h)}2j=1q.2v.1S;7(2j){2f=2f&&y.1g(2j,"59");V(G i=0,l=B.O;i<l;i++){1o.1f(2f?2Z(B[i],2j):B[i],1q.5c||B.O>1||i>0?1q.2v.5k(R):1q.2v)}}7(4h){y.1b(4h,c1)}}E B;C 2Z(6,1h){E y.1g(6,"2f")?(6.2N("2A")[0]||6.3N(6.1Z.2x("2A"))):6}}});C 8y(2U,M){G i=0;M.1b(C(){7(B.1g!==(2U[i]&&2U[i].1g)){E}G 7j=y.I(2U[i++]),8D=y.I(B,7j),1I=7j&&7j.1I;7(1I){3q 8D.1L;8D.1I={};V(G H 1A 1I){V(G 1y 1A 1I[H]){y.L.2M(B,H,1I[H][1y],1I[H][1y].I)}}}})}C 8B(1D,6G,4h){G 2v,5c,5A,2e;7(1D.O===1&&1a 1D[0]==="1R"&&1D[0].O<fL&&1D[0].2r("<44")<0&&(y.1Y.7l||!8J.17(1D[0]))){5c=R;5A=y.8K[1D[0]];7(5A){7(5A!==1){2v=5A}}}7(!2v){2e=(6G&&6G[0]?6G[0].1Z||6G[0]:12);2v=2e.c9();y.ac(1D,2e,2v,4h)}7(5c){y.8K[1D[0]]=5A?2v:1}E{2v:2v,5c:5c}}y.8K={};y.1b({dh:"3U",fG:"c6",3C:"7h",fH:"8q",fI:"6D"},C(J,c7){y.fn[J]=C(P){G M=[],7c=y(P);V(G i=0,l=7c.O;i<l;i++){G 1C=(i>0?B.6z(R):B).54();y.fn[c7].27(y(7c[i]),1C);M=M.7V(1C)}E B.3s(M,J,7c.P)}});y.1b({2p:C(P,bY){7(!P||y.1u(P,[B]).O){7(!bY&&B.19===1){y.69(B.2N("*"));y.69([B])}7(B.1v){B.1v.3u(B)}}},5G:C(){7(B.19===1){y.69(B.2N("*"))}23(B.1S){B.3u(B.1S)}}},C(J,fn){y.fn[J]=C(){E B.1b(fn,1F)}});y.1Q({ac:C(1C,T,2v,4h){T=T||12;7(1a T.2x==="1d"){T=T.1Z||T[0]&&T[0].1Z||12}G M=[];y.1b(1C,C(i,6){7(1a 6==="5m"){6+=""}7(!6){E}7(1a 6==="1R"&&!bX.17(6)){6=T.6x(6)}Q 7(1a 6==="1R"){6=6.1H(a0,a3);G 5x=(a4.29(6)||["",""])[1].28(),46=34[5x]||34.4k,bM=46[0],Y=T.2x("Y");Y.3p=46[1]+6+46[2];23(bM--){Y=Y.an}7(!y.1Y.2A){G ao=bK.17(6),2A=5x==="2f"&&!ao?Y.1S&&Y.1S.47:46[1]==="<2f>"&&!ao?Y.47:[];V(G j=2A.O-1;j>=0;--j){7(y.1g(2A[j],"2A")&&!2A[j].47.O){2A[j].1v.3u(2A[j])}}}7(!y.1Y.ak&&6J.17(6)){Y.3C(T.6x(6J.29(6)[0]),Y.1S)}6=y.2P(Y.47)}7(6.19){M.1K(6)}Q{M=y.7p(M,6)}});7(2v){V(G i=0;M[i];i++){7(4h&&y.1g(M[i],"1x")&&(!M[i].H||M[i].H.28()==="1U/4S")){4h.1K(M[i].1v?M[i].1v.3u(M[i]):M[i])}Q{7(M[i].19===1){M.3S.27(M,[i+1,0].7V(y.2P(M[i].2N("1x"))))}2v.3N(M[i])}}}E M},69:C(1C){V(G i=0,6,1T;(6=1C[i])!=U;i++){y.L.2p(6);y.50(6)}}});G cw=/z-?4p|f6-?f7|2o|cB|f8-?30/i,9Y=/cF\\([^)]*\\)/,a7=/2o=([^)]*)/,7v=/9H/i,7M=/-([a-z])/f5,cd=/([A-Z])/g,ck=/^-?\\d+(?:5n)?$/i,cm=/^-?\\d/,cC={31:"7z",bQ:"2X",2c:"86"},ci=["bq","eZ"],cj=["bu","f1"],5I=12.37&&12.37.5I,7w=y.1Y.7y?"7y":"7w",7O=C(2K,cx){E cx.8c()};y.fn.2R=C(J,N){E 7t(B,J,N,R,C(6,J,N){7(N===1d){E y.2C(6,J)}7(1a N==="5m"&&!cw.17(J)){N+="5n"}y.18(6,J,N)})};y.1Q({18:C(6,J,N){7(!6||6.19===3||6.19===8){E 1d}7((J==="2O"||J==="30")&&2w(N)<0){N=1d}G 18=6.18||6,1l=N!==1d;7(!y.1Y.2o&&J==="2o"){7(1l){18.cB=1;G 2o=8T(N,10)+""==="fj"?"":"cF(2o="+N*a9+")";G 1u=18.1u||y.2C(6,"1u")||"";18.1u=9Y.17(1u)?1u.1H(9Y,2o):2o}E 18.1u&&18.1u.2r("2o=")>=0?(2w(a7.29(18.1u)[1])/a9)+"":""}7(7v.17(J)){J=7w}J=J.1H(7M,7O);7(1l){18[J]=N}E 18[J]},2R:C(6,J,5N,3I){7(J==="2O"||J==="30"){G 1j,3j=cC,4Y=J==="2O"?ci:cj;C ah(){1j=J==="2O"?6.7F:6.co;7(3I==="5J"){E}y.1b(4Y,C(){7(!3I){1j-=2w(y.2C(6,"75"+B,R))||0}7(3I==="4L"){1j+=2w(y.2C(6,"4L"+B,R))||0}Q{1j-=2w(y.2C(6,"5J"+B+"aQ",R))||0}})}7(6.7F!==0){ah()}Q{y.cn(6,3j,ah)}E 4x.58(0,4x.fd(1j))}E y.2C(6,J,5N)},2C:C(6,J,5N){G M,18=6.18,1u;7(!y.1Y.2o&&J==="2o"&&6.4C){M=a7.17(6.4C.1u||"")?(2w(5V.$1)/a9)+"":"";E M===""?"1":M}7(7v.17(J)){J=7w}7(!5N&&18&&18[J]){M=18[J]}Q 7(5I){7(7v.17(J)){J="9H"}J=J.1H(cd,"-$1").28();G 37=6.1Z.37;7(!37){E U}G 3D=37.5I(6,U);7(3D){M=3D.fc(J)}7(J==="2o"&&M===""){M="1"}}Q 7(6.4C){G 9N=J.1H(7M,7O);M=6.4C[J]||6.4C[9N];7(!ck.17(M)&&cm.17(M)){G 1m=18.1m,cp=6.9Q.1m;6.9Q.1m=6.4C.1m;18.1m=9N==="ff"?"fg":(M||0);M=18.fQ+"5n";18.1m=1m;6.9Q.1m=cp}}E M},cn:C(6,1e,1o){G 26={};V(G J 1A 1e){26[J]=6.18[J];6.18[J]=1e[J]}1o.1f(6);V(G J 1A 1e){6.18[J]=26[J]}}});7(y.1z&&y.1z.3H){y.1z.3H.2X=C(6){G 2O=6.7F,30=6.co,9S=6.1g.28()==="59";E 2O===0&&30===0&&!9S?R:2O>0&&30>0&&!9S?14:y.2C(6,"2c")==="4q"};y.1z.3H.bT=C(6){E!y.1z.3H.2X(6)}}G d2=2Q(),bV=/<1x(.|\\s)*?\\/1x>/gi,c8=/33|6n/i,ca=/c0|gu|gp|go|2X|gk|5m|6o|gj|gl|gm|1U|56|1n|gw/i,51=/=\\?(&|$)/,7I=/\\?/,cP=/(\\?|&)84=.*?(&|$)/,df=/^(\\w+:)?\\/\\/([^\\/?#]+)/,dk=/%20/g;y.fn.1Q({cb:y.fn.76,76:C(1n,48,1o){7(1a 1n!=="1R"){E B.cb(1n)}Q 7(!B.O){E B}G 6H=1n.2r(" ");7(6H>=0){G P=1n.2k(6H,1n.O);1n=1n.2k(0,6H)}G H="4X";7(48){7(y.1G(48)){1o=48;48=U}Q 7(1a 48==="1P"){48=y.6s(48,y.6r.4J);H="ae"}}G 1s=B;y.6a({1n:1n,H:H,36:"1V",I:48,2H:C(6F,2h){7(2h==="3i"||2h==="af"){1s.1V(P?y("<Y />").3U(6F.7U.1H(bV,"")).2y(P):6F.7U)}7(1o){1s.1b(1o,[6F.7U,2h,6F])}}});E B},gg:C(){E y.6s(B.bO())},bO:C(){E B.2Y(C(){E B.53?y.2P(B.53):B}).1u(C(){E B.J&&!B.71&&(B.3Q||c8.17(B.1g)||ca.17(B.H))}).2Y(C(i,6){G 1j=y(B).1j();E 1j==U?U:y.3f(1j)?y.2Y(1j,C(1j,i){E{J:6.J,N:1j}}):{J:6.J,N:1j}}).54()}});y.1b("dl 8h cr cg cq cv".3d(" "),C(i,o){y.fn[o]=C(f){E B.8a(o,f)}});y.1Q({54:C(1n,I,1o,H){7(y.1G(I)){H=H||1o;1o=I;I=U}E y.6a({H:"4X",1n:1n,I:I,3i:1o,36:H})},fY:C(1n,1o){E y.54(1n,U,1o,"1x")},fX:C(1n,I,1o){E y.54(1n,I,1o,"4U")},fT:C(1n,I,1o,H){7(y.1G(I)){H=H||1o;1o=I;I={}}E y.6a({H:"ae",1n:1n,I:I,3i:1o,36:H})},fS:C(db){y.1Q(y.6r,db)},6r:{1n:6c.3A,3F:R,H:"4X",9T:"8b/x-fW-3P-g4",cV:R,4W:R,1c:1B.9D&&(1B.6c.8x!=="7P:"||!1B.cS)?C(){E 3g 1B.9D()}:C(){2E{E 3g 1B.cS("ge.ga")}2G(e){}},7R:{4w:"8b/4w, 1U/4w",1V:"1U/1V",1x:"1U/4S, 8b/4S",4U:"8b/4U, 1U/4S",1U:"1U/g6",4k:"*/*"}},4N:{},4O:{},6a:C(5W){G s=y.1Q(R,{},y.6r,5W);G 35,2h,I,8e=5W&&5W.T||s,H=s.H.8c();7(s.I&&s.cV&&1a s.I!=="1R"){s.I=y.6s(s.I,s.4J)}7(s.36==="35"){7(H==="4X"){7(!51.17(s.1n)){s.1n+=(7I.17(s.1n)?"&":"?")+(s.35||"1o")+"=?"}}Q 7(!s.I||!51.17(s.I)){s.I=(s.I?s.I+"&":"")+(s.35||"1o")+"=?"}s.36="4U"}7(s.36==="4U"&&(s.I&&51.17(s.I)||51.17(s.1n))){35=s.g5||("35"+d2++);7(s.I){s.I=(s.I+"").1H(51,"="+35+"$1")}s.1n=s.1n.1H(51,"="+35+"$1");s.36="1x";1B[35]=1B[35]||C(6l){I=6l;3i();2H();1B[35]=1d;2E{3q 1B[35]}2G(e){}7(3e){3e.3u(1x)}}}7(s.36==="1x"&&s.2I===U){s.2I=14}7(s.2I===14&&H==="4X"){G 9R=2Q();G M=s.1n.1H(cP,"$g7="+9R+"$2");s.1n=M+((M===s.1n)?(7I.17(s.1n)?"&":"?")+"84="+9R:"")}7(s.I&&H==="4X"){s.1n+=(7I.17(s.1n)?"&":"?")+s.I}7(s.3F&&!y.88++){y.L.2q("dl")}G 1k=df.29(s.1n),9I=1k&&(1k[1]&&1k[1]!==6c.8x||1k[2]!==6c.g8);7(s.36==="1x"&&H==="4X"&&9I){G 3e=12.2N("3e")[0]||12.2i;G 1x=12.2x("1x");1x.2L=s.1n;7(s.cI){1x.dH=s.cI}7(!35){G 3Y=14;1x.9P=1x.3E=C(){7(!3Y&&(!B.5h||B.5h==="dI"||B.5h==="2H")){3Y=R;3i();2H();1x.9P=1x.3E=U;7(3e&&1x.1v){3e.3u(1x)}}}}3e.3C(1x,3e.1S);E 1d}G 5t=14;G 1c=s.1c();7(!1c){E}7(s.c4){1c.c5(H,s.1n,s.4W,s.c4,s.6o)}Q{1c.c5(H,s.1n,s.4W)}2E{7(s.I||5W&&5W.9T){1c.68("dE-dB",s.9T)}7(s.cG){7(y.4N[s.1n]){1c.68("bP-cz-dC",y.4N[s.1n])}7(y.4O[s.1n]){1c.68("bP-dT-dU",y.4O[s.1n])}}7(!9I){1c.68("X-dz-dQ","9D")}1c.68("dM",s.36&&s.7R[s.36]?s.7R[s.36]+", */*":s.7R.4k)}2G(e){}7(s.cy&&s.cy.1f(8e,1c,s)===14){7(s.3F&&!--y.88){y.L.2q("8h")}1c.5v();E 14}7(s.3F){2q("cv",[1c,s])}G 3E=1c.3E=C(6L){7(!1c||1c.5h===0||6L==="5v"){7(!5t){2H()}5t=R;7(1c){1c.3E=y.6y}}Q 7(!5t&&1c&&(1c.5h===4||6L==="5f")){5t=R;1c.3E=y.6y;2h=6L==="5f"?"5f":!y.cs(1c)?"2W":s.cG&&y.cA(1c,s.1n)?"af":"3i";G al;7(2h==="3i"){2E{I=y.bU(1c,s.36,s)}2G(cD){2h="8o";al=cD}}7(2h==="3i"||2h==="af"){7(!35){3i()}}Q{y.8i(s,1c,2h,al)}2H();7(6L==="5f"){1c.5v()}7(s.4W){1c=U}}};2E{G cu=1c.5v;1c.5v=C(){7(1c){cu.1f(1c)}3E("5v")}}2G(e){}7(s.4W&&s.5f>0){7N(C(){7(1c&&!5t){3E("5f")}},s.5f)}2E{1c.dy(H==="ae"||H==="dp"||H==="eX"?s.I:U)}2G(e){y.8i(s,1c,U,e);2H()}7(!s.4W){3E()}C 3i(){7(s.3i){s.3i.1f(8e,I,2h,1c)}7(s.3F){2q("cq",[1c,s])}}C 2H(){7(s.2H){s.2H.1f(8e,1c,2h)}7(s.3F){2q("cr",[1c,s])}7(s.3F&&!--y.88){y.L.2q("8h")}}C 2q(H,1D){(s.T?y(s.T):y.L).2q(H,1D)}E 1c},8i:C(s,1c,2h,e){7(s.2W){s.2W.1f(s.T||s,1c,2h,e)}7(s.3F){(s.T?y(s.T):y.L).2q("cg",[1c,s,e])}},88:0,cs:C(1c){2E{E!1c.2h&&6c.8x==="7P:"||(1c.2h>=ce&&1c.2h<eB)||1c.2h===bS||1c.2h===eA||1c.2h===0}2G(e){}E 14},cA:C(1c,1n){G 4N=1c.8s("eu-cz"),4O=1c.8s("dW");7(4N){y.4N[1n]=4N}7(4O){y.4O[1n]=4O}E 1c.2h===bS||1c.2h===0},bU:C(1c,H,s){G ct=1c.8s("eT-H")||"",4w=H==="4w"||!H&&ct.2r("4w")>=0,I=4w?1c.eS:1c.7U;7(4w&&I.2i.1g==="8o"){y.2W("8o")}7(s&&s.bZ){I=s.bZ(I,H)}7(1a I==="1R"){7(H==="4U"||!H&&ct.2r("4U")>=0){I=y.c3(I)}Q 7(H==="1x"||!H&&ct.2r("4S")>=0){y.9e(I)}}E I},6s:C(a,4J){G s=[];7(4J===1d){4J=y.6r.4J}7(y.3f(a)||a.6j){y.1b(a,C(){2M(B.J,B.N)})}Q{V(G 4A 1A a){7X(4A,a[4A])}}E s.4R("&").1H(dk,"+");C 7X(4A,25){7(y.3f(25)){y.1b(25,C(i,v){7(4J){2M(4A,v)}Q{7X(4A+"["+(1a v==="1P"||y.3f(v)?i:"")+"]",v)}})}Q 7(!4J&&25!=U&&1a 25==="1P"){y.1b(25,C(k,v){7X(4A+"["+k+"]",v)})}Q{2M(4A,25)}}C 2M(1X,N){N=y.1G(N)?N():N;s[s.O]=dg(1X)+"="+dg(N)}}});G 80={},cW=/5r|3b|38/,cY=/^([+-]=)?([\\d+-.]+)(.*)$/,6C,ab=[["30","72","e8","e9","e4"],["2O","90","e3","dj","dY"],["2o"]];y.fn.1Q({3b:C(2g,1o){7(2g||2g===0){E B.5R(5i("3b",3),2g,1o)}Q{V(G i=0,l=B.O;i<l;i++){G 26=y.I(B[i],"5T");B[i].18.2c=26||"";7(y.2R(B[i],"2c")==="4q"){G 1g=B[i].1g,2c;7(80[1g]){2c=80[1g]}Q{G 6=y("<"+1g+" />").dh("1i");2c=6.2R("2c");7(2c==="4q"){2c="86"}6.2p();80[1g]=2c}y.I(B[i],"5T",2c)}}V(G j=0,k=B.O;j<k;j++){B[j].18.2c=y.I(B[j],"5T")||""}E B}},38:C(2g,1o){7(2g||2g===0){E B.5R(5i("38",3),2g,1o)}Q{V(G i=0,l=B.O;i<l;i++){G 26=y.I(B[i],"5T");7(!26&&26!=="4q"){y.I(B[i],"5T",y.2R(B[i],"2c"))}}V(G j=0,k=B.O;j<k;j++){B[j].18.2c="4q"}E B}},cL:y.fn.5r,5r:C(fn,9l){G 9p=1a fn==="7S";7(y.1G(fn)&&y.1G(9l)){B.cL.27(B,1F)}Q 7(fn==U||9p){B.1b(C(){G 3K=9p?fn:y(B).67(":2X");y(B)[3K?"3b":"38"]()})}Q{B.5R(5i("5r",3),fn,9l)}E B},ec:C(2g,7u,1o){E B.1u(":2X").2R("2o",0).3b().3o().5R({2o:7u},2g,1o)},5R:C(1p,2g,3c,1o){G 7H=y.2g(2g,3c,1o);7(y.9n(1p)){E B.1b(7H.2H)}E B[7H.2D===14?"1b":"2D"](C(){G 2s=y.1Q({},7H),p,2X=B.19===1&&y(B).67(":2X"),1s=B;V(p 1A 1p){G J=p.1H(7M,7O);7(p!==J){1p[J]=1p[p];3q 1p[p];p=J}7(1p[p]==="38"&&2X||1p[p]==="3b"&&!2X){E 2s.2H.1f(B)}7((p==="30"||p==="2O")&&B.18){2s.2c=y.2R(B,"2c");2s.4y=B.18.4y}7(y.3f(1p[p])){(2s.60=2s.60||{})[p]=1p[p][1];1p[p]=1p[p][0]}}7(2s.4y!=U){B.18.4y="2X"}2s.6S=y.1Q({},1p);y.1b(1p,C(J,1j){G e=3g y.fx(1s,2s,J);7(cW.17(1j)){e[1j==="5r"?2X?"3b":"38":1j](1p)}Q{G 1k=cY.29(1j),3w=e.1h(R)||0;7(1k){G 3o=2w(1k[2]),3M=1k[3]||"5n";7(3M!=="5n"){1s.18[J]=(3o||1)+3M;3w=((3o||1)/e.1h(R))*3w;1s.18[J]=3w+3M}7(1k[1]){3o=((1k[1]==="-="?-1:1)*3o)+3w}e.6m(3w,3o,3M)}Q{e.6m(3w,1j,"")}}});E R})},62:C(94,5o){G 2V=y.2V;7(94){B.2D([])}B.1b(C(){V(G i=2V.O-1;i>=0;i--){7(2V[i].6===B){7(5o){2V[i](R)}2V.3S(i,1)}}});7(!5o){B.4K()}E B}});y.1b({ep:5i("3b",1),er:5i("38",1),ek:5i("5r",1),ej:{2o:"3b"},ee:{2o:"38"}},C(J,3j){y.fn[J]=C(2g,1o){E B.5R(3j,2g,1o)}});y.1Q({2g:C(2g,3c,fn){G 2s=2g&&1a 2g==="1P"?2g:{2H:fn||!fn&&3c||y.1G(2g)&&2g,4F:2g,3c:fn&&3c||3c&&!y.1G(3c)&&3c};2s.4F=y.fx.6H?0:1a 2s.4F==="5m"?2s.4F:y.fx.82[2s.4F]||y.fx.82.4k;2s.26=2s.2H;2s.2H=C(){7(2s.2D!==14){y(B).4K()}7(y.1G(2s.26)){2s.26.1f(B)}};E 2s},3c:{d0:C(p,n,85,4B){E 85+4B*p},8R:C(p,n,85,4B){E((-4x.ef(p*4x.eg)/2)+0.5)*4B+85}},2V:[],fx:C(6,1e,1p){B.1e=1e;B.6=6;B.1p=1p;7(!1e.2U){1e.2U={}}}});y.fx.2T={8L:C(){7(B.1e.5b){B.1e.5b.1f(B.6,B.2Q,B)}(y.fx.5b[B.1p]||y.fx.5b.4k)(B);7((B.1p==="30"||B.1p==="2O")&&B.6.18){B.6.18.2c="86"}},1h:C(5N){7(B.6[B.1p]!=U&&(!B.6.18||B.6.18[B.1p]==U)){E B.6[B.1p]}G r=2w(y.2R(B.6,B.1p,5N));E r&&r>-ei?r:2w(y.2C(B.6,B.1p))||0},6m:C(dc,7u,3M){B.8M=2Q();B.3w=dc;B.3o=7u;B.3M=3M||B.3M||"5n";B.2Q=B.3w;B.5q=B.3K=0;G 1s=B;C t(5o){E 1s.5b(5o)}t.6=B.6;7(t()&&y.2V.1K(t)&&!6C){6C=6A(y.fx.cH,13)}},3b:C(){B.1e.2U[B.1p]=y.18(B.6,B.1p);B.1e.3b=R;B.6m(B.1p==="2O"||B.1p==="30"?1:0,B.1h());y(B.6).3b()},38:C(){B.1e.2U[B.1p]=y.18(B.6,B.1p);B.1e.38=R;B.6m(B.1h(),0)},5b:C(5o){G t=2Q(),3Y=R;7(5o||t>=B.1e.4F+B.8M){B.2Q=B.3o;B.5q=B.3K=1;B.8L();B.1e.6S[B.1p]=R;V(G i 1A B.1e.6S){7(B.1e.6S[i]!==R){3Y=14}}7(3Y){7(B.1e.2c!=U){B.6.18.4y=B.1e.4y;G 26=y.I(B.6,"5T");B.6.18.2c=26?26:B.1e.2c;7(y.2R(B.6,"2c")==="4q"){B.6.18.2c="86"}}7(B.1e.38){y(B.6).38()}7(B.1e.38||B.1e.3b){V(G p 1A B.1e.6S){y.18(B.6,p,B.1e.2U[p])}}B.1e.2H.1f(B.6)}E 14}Q{G n=t-B.8M;B.3K=n/B.1e.4F;G 60=B.1e.60&&B.1e.60[B.1p];G cM=B.1e.3c||(y.3c.8R?"8R":"d0");B.5q=y.3c[60||cM](B.3K,n,0,1,B.1e.4F);B.2Q=B.3w+((B.3o-B.3w)*B.5q);B.8L()}E R}};y.1Q(y.fx,{cH:C(){G 2V=y.2V;V(G i=0;i<2V.O;i++){7(!2V[i]()){2V.3S(i--,1)}}7(!2V.O){y.fx.62()}},62:C(){e5(6C);6C=U},82:{ev:eH,eG:ce,4k:eC},5b:{2o:C(fx){y.18(fx.6,"2o",fx.2Q)},4k:C(fx){7(fx.6.18&&fx.6.18[fx.1p]!=U){fx.6.18[fx.1p]=(fx.1p==="2O"||fx.1p==="30"?4x.58(0,fx.2Q):fx.2Q)+fx.3M}Q{fx.6[fx.1p]=fx.2Q}}}});7(y.1z&&y.1z.3H){y.1z.3H.eD=C(6){E y.5Y(y.2V,C(fn){E 6===fn.6}).O}}C 5i(H,3B){G 25={};y.1b(ab.7V.27([],ab.2k(0,3B)),C(){25[B]=H});E 25}7("de"1A 12.2i){y.fn.22=C(1e){G 6=B[0];7(1e){E B.1b(C(i){y.22.8S(B,1e,i)})}7(!6||!6.1Z){E U}7(6===6.1Z.1i){E y.22.9i(6)}G 9V=6.de(),2e=6.1Z,1i=2e.1i,4l=2e.2i,5Q=4l.5Q||1i.5Q||0,5K=4l.5K||1i.5K||0,1O=9V.1O+(1s.b3||y.1Y.5B&&4l.4z||1i.4z)-5Q,1m=9V.1m+(1s.8w||y.1Y.5B&&4l.4v||1i.4v)-5K;E{1O:1O,1m:1m}}}Q{y.fn.22=C(1e){G 6=B[0];7(1e){E B.1b(C(i){y.22.8S(B,1e,i)})}7(!6||!6.1Z){E U}7(6===6.1Z.1i){E y.22.9i(6)}y.22.7o();G 2l=6.2l,bW=6,2e=6.1Z,3D,4l=2e.2i,1i=2e.1i,37=2e.37,5O=37?37.5I(6,U):6.4C,1O=6.3T,1m=6.7a;23((6=6.1v)&&6!==1i&&6!==4l){7(y.22.8v&&5O.31==="a8"){2z}3D=37?37.5I(6,U):6.4C;1O-=6.4z;1m-=6.4v;7(6===2l){1O+=6.3T;1m+=6.7a;7(y.22.bL&&!(y.22.bN&&/^t(gh|d|h)$/i.17(6.1g))){1O+=2w(3D.93)||0;1m+=2w(3D.8Q)||0}bW=2l,2l=6.2l}7(y.22.c2&&3D.4y!=="bT"){1O+=2w(3D.93)||0;1m+=2w(3D.8Q)||0}5O=3D}7(5O.31==="3V"||5O.31==="9r"){1O+=1i.3T;1m+=1i.7a}7(y.22.8v&&5O.31==="a8"){1O+=4x.58(4l.4z,1i.4z);1m+=4x.58(4l.4v,1i.4v)}E{1O:1O,1m:1m}}}y.22={7o:C(){G 1i=12.1i,4T=12.2x("Y"),4P,3z,2f,4I,di=2w(y.2C(1i,"72",R))||0,1V="<Y 18=\'31:7z;1O:0;1m:0;4L:0;5J:cf cE #cc;75:0;2O:5g;30:5g;\'><Y></Y></Y><2f 18=\'31:7z;1O:0;1m:0;4L:0;5J:cf cE #cc;75:0;2O:5g;30:5g;\' fo=\'0\' bR=\'0\'><59><4I></4I></59></2f>";y.1Q(4T.18,{31:"7z",1O:0,1m:0,4L:0,5J:0,2O:"5g",30:"5g",bQ:"2X"});4T.3p=1V;1i.3C(4T,1i.1S);4P=4T.1S;3z=4P.1S;4I=4P.4i.1S.1S;B.bL=(3z.3T!==5);B.bN=(4I.3T===5);3z.18.31="a8",3z.18.1O="fK";B.8v=(3z.3T===20||3z.3T===15);3z.18.31=3z.18.1O="";4P.18.4y="2X",4P.18.31="3V";B.c2=(3z.3T===-5);B.cJ=(1i.3T!==di);1i.3u(4T);1i=4T=4P=3z=2f=4I=U;y.22.7o=y.6y},9i:C(1i){G 1O=1i.3T,1m=1i.7a;y.22.7o();7(y.22.cJ){1O+=2w(y.2C(1i,"72",R))||0;1m+=2w(y.2C(1i,"90",R))||0}E{1O:1O,1m:1m}},8S:C(6,1e,i){7(/9r/.17(y.2C(6,"31"))){6.18.31="3V"}G 92=y(6),7i=92.22(),dm=8T(y.2C(6,"1O",R),10)||0,d9=8T(y.2C(6,"1m",R),10)||0;7(y.1G(1e)){1e=1e.1f(6,i,7i)}G 3j={1O:(1e.1O-7i.1O)+dm,1m:(1e.1m-7i.1m)+d9};7("cR"1A 1e){1e.cR.1f(6,3j)}Q{92.2R(3j)}}};y.fn.1Q({31:C(){7(!B[0]){E U}G 6=B[0],2l=B.2l(),22=B.22(),6B=/^1i|1V$/i.17(2l[0].1g)?{1O:0,1m:0}:2l.22();22.1O-=2w(y.2C(6,"72",R))||0;22.1m-=2w(y.2C(6,"90",R))||0;6B.1O+=2w(y.2C(2l[0],"93",R))||0;6B.1m+=2w(y.2C(2l[0],"8Q",R))||0;E{1O:22.1O-6B.1O,1m:22.1m-6B.1m}},2l:C(){E B.2Y(C(){G 2l=B.2l||12.1i;23(2l&&(!/^1i|1V$/i.17(2l.1g)&&y.2R(2l,"31")==="9r")){2l=2l.2l}E 2l})}});y.1b(["bq","bu"],C(i,J){G 5U="7Y"+J;y.fn[5U]=C(1j){G 6=B[0],3k;7(!6){E U}7(1j!==1d){E B.1b(C(){3k=9z(B);7(3k){3k.ad(!i?1j:y(3k).4v(),i?1j:y(3k).4z())}Q{B[5U]=1j}})}Q{3k=9z(6);E 3k?("8w"1A 3k)?3k[i?"b3":"8w"]:y.1Y.5B&&3k.12.2i[5U]||3k.12.1i[5U]:6[5U]}}});C 9z(6){E("ad"1A 6&&6.12)?6:6.19===9?6.37||6.f3:14}y.1b(["fa","aQ"],C(i,J){G H=J.28();y.fn["fR"+J]=C(){E B[0]?y.2R(B[0],H,14,"75"):U};y.fn["gr"+J]=C(4L){E B[0]?y.2R(B[0],H,14,4L?"4L":"5J"):U};y.fn[H]=C(4j){G 6=B[0];7(!6){E 4j==U?U:B}7(y.1G(4j)){E B.1b(C(i){G 1s=y(B);1s[H](4j.1f(B,i,1s[H]()))})}E("ad"1A 6&&6.12)?6.12.gf==="dG"&&6.12.2i["8H"+J]||6.12.1i["8H"+J]:(6.19===9)?4x.58(6.2i["8H"+J],6.1i["7Y"+J],6.2i["7Y"+J],6.1i["22"+J],6.2i["22"+J]):4j===1d?y.2R(6,H):B.2R(H,1a 4j==="1R"?4j:4j+"5n")}});1B.y=1B.$=y})(1B);',62,1028,'||||||elem|if|||||||||||||||||||||||||||jQuery|||this|function||return||var|type|data|name|match|event|ret|value|length|selector|else|true||context|null|for|||div||||document||false|||test|style|nodeType|typeof|each|xhr|undefined|options|call|nodeName|cur|body|val|parts|set|left|url|callback|prop|results|checkSet|self|Expr|filter|parentNode|target|script|handler|expr|in|window|elems|args|array|arguments|isFunction|replace|events|Sizzle|push|handle|parent|className|top|object|extend|string|firstChild|id|text|html|part|key|support|ownerDocument||guid|offset|while|namespaces|obj|old|apply|toLowerCase|exec|proxy|result|display|isXML|doc|table|speed|status|documentElement|first|slice|offsetParent|special||opacity|remove|trigger|indexOf|opt|node|types|fragment|parseFloat|createElement|find|break|tbody|live|curCSS|queue|try|not|catch|complete|cache|dir|all|src|add|getElementsByTagName|width|makeArray|now|css|curLoop|prototype|orig|timers|error|hidden|map|root|height|position||select|wrapMap|jsonp|dataType|defaultView|hide|doneName|getAttribute|show|easing|split|head|isArray|new|selectors|success|props|win|ready|until|button|end|innerHTML|delete|thisCache|pushStack|check|removeChild|expando|start|attr|inplace|checkDiv|href|num|insertBefore|computedStyle|onreadystatechange|global|qualifier|filters|extra|on|state|attachEvent|unit|appendChild|input|form|checked|copy|splice|offsetTop|append|relative|modifiedHandler|Array|done|fix|handlers|classNames|DOMContentLoaded|class|option|ID|wrap|childNodes|params|hasDuplicate|toString|addEventListener|click|shift|pop|radio|one|scripts|nextSibling|size|_default|docElem|pass|ua|last|index|none|contains|inArray|submit|matches|scrollLeft|xml|Math|overflow|scrollTop|prefix|diff|currentStyle|setup|seed|duration|browser|nth|td|traditional|dequeue|margin|preventDefault|lastModified|etag|innerDiv|selected|join|javascript|container|json|checkbox|async|GET|which|sort|removeData|jsre|stopPropagation|elements|get||time|Event|max|tr|isPartStr|step|cacheable|domManip|anyFound|timeout|1px|readyState|genFx|selectedIndex|cloneNode|getAttributeNode|number|px|gotoEnd|POS|pos|toggle|compareDocumentPosition|requestDone|u00c0|abort|found|tag|uFFFF|getElementById|cacheresults|boxModel|checkFn|values|TAG|sizcache|empty|nodeCheck|getComputedStyle|border|clientLeft|originalEvent|teardown|force|prevComputedStyle|deep|clientTop|animate|keyCode|olddisplay|method|RegExp|origSettings|readyList|grep|getText|specialEasing|sourceIndex|stop|eventName|sortOrder|previousSibling|second|is|setRequestHeader|cleanData|ajax|notxml|location|getElementsByClassName|related|item|noData|mouseenter|CLASS|jquery|keep|tmp|custom|textarea|password|change|lastToggle|ajaxSettings|param|contextXML|relatedTarget|closest|charCode|createTextNode|noop|clone|setInterval|parentOffset|timerId|replaceWith|rootjQuery|res|nodes|off|changeFilters|rleadingWhitespace|thisObject|isTimeout|mouseleave|PSEUDO|isReady|stateVal|currentTarget|focusout|curAnim|browserMatch|hasOwnProperty|contents|unbind|removeEventListener|formElems|testChange|oldSizzle|disabled|marginTop|substr|source|padding|load|leftMatch|order|CHILD|offsetLeft|toArray|insert|wrapAll|msg|attrHandle|bRange|before|curOffset|oldData|chunker|checkClone|next|nodeValue|initialize|merge|even|case|attrFn|access|to|rfloat|styleFloat|Object|cssFloat|absolute|querySelectorAll|sizset|aRange|multiple|odd|offsetWidth|triggerHandler|optall|rquery|fromElement|rspace|attributeNode|rdashAlpha|setTimeout|fcamelCase|file|detachEvent|accepts|boolean|eventHandle|responseText|concat|isSupported|buildParams|scroll|namespace|elemdisplay|version|speeds|JSON|_|firstNum|block|isPlainObject|active|returnTrue|bind|application|toUpperCase|returnFalse|callbackContext|specialSubmit|isPartStrNotTag|ajaxStop|handleError|noCloneEvent|windowData|eventSupported|colgroup|area|parsererror|isXMLDoc|after|image|getResponseHeader|rinlinejQuery|preFilter|supportsFixedPosition|pageXOffset|protocol|cloneCopyEvent|attrMap|addClass|buildFragment|NAME|curData|rclass|inprogress|removeAttribute|client|unshift|rchecked|fragments|update|startTime|uniqueSort|tmpSet|later|borderLeftWidth|swing|setOffset|parseInt|filtered|posProcess|constructor|dirCheck|dirNodeCheck|init|marginLeft|readyBound|curElem|borderTopWidth|clearQueue|toplevel|targets|winnow|sibling|doScrollCheck||matched|isTag|ATTR|globalEval|link|scriptEval|nodeIndex|bodyOffset|unique|prevObject|fn2|isObj|isEmptyObject|isDisconnected|bool|userAgent|static|createRange|onclick|removeClass|focus|metaKey|triggered|prune|getWindow|blur|baseHasDuplicate|ctrlKey|XMLHttpRequest|bindReady|continue|query|float|remote|soFar|fnOver|keypress|liveHandler|camelCase|beforeFilter|onload|runtimeStyle|ts|skip|contentType|liveConvert|box|clientX|pageX|ralpha|onbeforeunload|rxhtmlTag|withinElement|_change_data|fcloseTag|rtagName|getVal|focusin|ropacity|fixed|100|rradiocheck|fxAttrs|clean|scrollTo|POST|notmodified|isDefaultPrevented|getWH|isPropagationStopped|isImmediatePropagationStopped|leadingWhitespace|errMsg|delegate|lastChild|hasBody|tabIndex|setEnd|inv|toElement|rtrim|setStart|srcElement|clientY|setArray|_jQuery|specialChange|submitBubbles|rsingleTag|u00A0|quickExpr|readOnly|TEST|parse|getTime|altLive|rnotwhite|hover|fnOut|arg|Function|pageY|Date|Width|toggleClass|setAttribute|cssText|rclickable|rfocusable|hrefNormalized|nm|origContext|uuid|emptyObject|frameElement|isXMLFilter|pageYOffset|isBool|optSelected|hasClass|checkOn|rspecialurl|htmlFor|__className__|rtype|specified|throw||getElementsByName|changeBubbles|reset|fcleanup|unload|doScroll|rreturn|mouseover|red|exclusive|webkit|Left||origPOS|setFilters|Top|mouseout|isClick|unrecognized|expression|Syntax|textContent|lt|cleaned|bubbling|count|keydown|fireEvent|only|uaMatch|prevUntil|rtbody|doesNotAddBorder|depth|doesAddBorderForTableAndCells|serializeArray|If|visibility|cellspacing|304|visible|httpData|rscript|prevOffsetParent|rhtml|keepData|dataFilter|color|evalScript|subtractsBorderForOverflowNotVisible|parseJSON|username|open|prepend|original|rselectTextarea|createDocumentFragment|rinput|_load|000|rupper|200|5px|ajaxError||cssWidth|cssHeight|rnumpx||rnum|swap|offsetHeight|rsLeft|ajaxSuccess|ajaxComplete|httpSuccess||oldAbort|ajaxSend|rexclude|letter|beforeSend|Modified|httpNotModified|zoom|cssShow|err|solid|alpha|ifModified|tick|scriptCharset|doesNotIncludeMarginInBodyOffset|embed|_toggle|defaultEasing|has|isSimple|rts|rselfClosing|using|ActiveXObject|detach|rparentsprev|processData|rfxtypes|prevAll|rfxnum|children|linear|rmultiselector|jsc|runtil|parents|fieldset|front|col|thead|curLeft|htmlSerialize|settings|from|wrapInner|getBoundingClientRect|rurl|encodeURIComponent|appendTo|bodyMarginTop|paddingLeft|r20|ajaxStart|curTop||originalTarget|PUT|prevValue|screenX|changed|offsetY|relatedNode|can|screenY|property|send|Requested|attrName|Type|Since|bubbles|Content|attrChange|CSS1Compat|charset|loaded|altKey|charAt|cancelable|Accept|layerX|layerY|newValue|With|eventPhase|detail|None|Match|offsetX|Etag|rv|paddingRight|mozilla|compatible|opera|msie|marginRight|paddingBottom|clearInterval|readonly|radiotest|marginBottom|paddingTop|safari|trim|fadeTo|noConflict|fadeOut|cos|PI|navigator|10000|fadeIn|slideToggle||bfnrt|Invalid|isPrototypeOf|slideDown||slideUp|maxlength|maxLength|Last|slow|substring|removeAttr|shiftKey|delay|1223|300|400|animated||attributes|fast|600|setData|getData|colSpan|tabindex|colspan|rowSpan|cellSpacing|rowspan|usemap|useMap|responseXML|content|applet|frameBorder|frameborder|DELETE|timeStamp|Right|nextAll|Bottom|onunload|parentWindow|nextUntil|ig|font|weight|line|view|Height|keyup|getPropertyValue|round|optgroup|fontSize|1em|resize|dblclick|NaN|mousemove|mouseup|mousedown||cellpadding|siblings|header|legend|switch|meta|enabled|outerHTML|unwrap||tfoot|caption||th|innerText|img|hr|iframe|prependTo|insertAfter|replaceAll|child|20px|512|0n|reverse|contentWindow|contentDocument|pixelLeft|inner|ajaxSetup|post|stopImmediatePropagation|cancelBubble|www|getJSON|getScript|beforeactivate|Until|createComment|HTML|returnValue|urlencoded|jsonpCallback|plain|1_|host|wheelDelta|XMLHTTP|1E8|beforeunload|liveProxy|Microsoft|compatMode|serialize|able||range|month|search|tel|parentsUntil|email|datetime|prev|outer|die||date|compareBoundaryPoints|week|andSelf|Range|START_TO_END'.split('|'),0,{}))
diff --git a/themes/default/template/include/autosize.inc.tpl b/themes/default/template/include/autosize.inc.tpl
index ea18e6d3a..e21162f9e 100644
--- a/themes/default/template/include/autosize.inc.tpl
+++ b/themes/default/template/include/autosize.inc.tpl
@@ -1,4 +1,4 @@
-{combine_script id='jquery' load='async' path='themes/default/js/jquery.packed.js'}
+{combine_script id='jquery' load='async' path='themes/default/js/jquery.min.js'}
{combine_script id='jquery.autogrow' load='async' require='jquery' path='themes/default/js/plugins/jquery.autogrow-textarea.js'}
{* Auto size and auto grow textarea *}
{footer_script require='jquery.autogrow'}{literal}
diff --git a/themes/default/template/include/datepicker.inc.tpl b/themes/default/template/include/datepicker.inc.tpl
index 636b6b9cb..e477e2825 100644
--- a/themes/default/template/include/datepicker.inc.tpl
+++ b/themes/default/template/include/datepicker.inc.tpl
@@ -1,5 +1,5 @@
-{combine_script id='jquery' load='footer' path='themes/default/js/jquery.packed.js'}
+{combine_script id='jquery' load='footer' path='themes/default/js/jquery.min.js'}
{combine_script id='jquery.ui' load='footer' require='jquery' path='themes/default/js/ui/packed/ui.core.packed.js'}
{combine_script id='jquery.ui.datepicker' load='footer' require='jquery.ui' path='themes/default/js/ui/packed/ui.datepicker.packed.js'}
{combine_script id='datepicker.js' load='footer' require='jquery.ui.datepicker' path='themes/default/js/datepicker.js'}
diff --git a/themes/default/template/include/resize.inc.tpl b/themes/default/template/include/resize.inc.tpl
index b7076a752..de66ac16a 100644
--- a/themes/default/template/include/resize.inc.tpl
+++ b/themes/default/template/include/resize.inc.tpl
@@ -1,4 +1,4 @@
-{combine_script id='jquery' load='async' path='themes/default/js/jquery.packed.js'}
+{combine_script id='jquery' load='async' path='themes/default/js/jquery.min.js'}
{combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/ui/packed/ui.core.packed.js'}
{combine_script id='jquery.ui.resizable' load='async' require='jquery.ui' path='themes/default/js/ui/packed/ui.resizable.packed.js'}