33 location =
window.location,
34 document =
window.document,
35 docElem = document.documentElement,
49 core_version =
"1.10.2",
52 core_concat = core_deletedIds.concat,
53 core_push = core_deletedIds.push,
54 core_slice = core_deletedIds.slice,
55 core_indexOf = core_deletedIds.indexOf,
56 core_toString = class2type.toString,
57 core_hasOwn = class2type.hasOwnProperty,
58 core_trim = core_version.trim,
61 jQuery =
function( selector, context ) {
63 return new jQuery.fn.init( selector, context, rootjQuery );
67 core_pnum = /[+-]?(?:
\d*\.|)\
d+(?:[eE][+-]?\
d+|)/.source,
70 core_rnotwhite = /\S+/
g,
73 rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/
g,
78 rquickExpr = /^(?:
\s*(<[
\w\W]+>)[^>]*|#([\
w-]*))$/,
81 rsingleTag = /^<(\
w+)
\s*\/?>(?:<\/\1>|)$/,
84 rvalidchars = /^[\],:{}
\s]*$/,
85 rvalidbraces = /(?:^|:|,)(?:\
s*\[)+/
g,
86 rvalidescape = /\\(?:[
"\\\/bfnrt]|u[\da-fA-F]{4})/g, 87 rvalidtokens = /"[^
"\\\r\n]*"|
true|
false|null|-?(?:
\d+\.|)\
d+(?:[eE][+-]?\
d+|)/
g,
91 rdashAlpha = /-([\da-
z])/gi,
94 fcamelCase =
function( all, letter ) {
95 return letter.toUpperCase();
99 completed =
function( event ) {
102 if ( document.addEventListener || event.type ===
"load" || document.readyState ===
"complete" ) {
108 detach =
function() {
109 if ( document.addEventListener ) {
110 document.removeEventListener(
"DOMContentLoaded", completed,
false );
111 window.removeEventListener(
"load", completed,
false );
114 document.detachEvent(
"onreadystatechange", completed );
115 window.detachEvent(
"onload", completed );
121 jquery: core_version,
124 init:
function( selector, context, rootjQuery ) {
133 if ( typeof selector ===
"string" ) {
134 if ( selector.charAt(0) ===
"<" && selector.charAt( selector.length - 1 ) ===
">" && selector.length >= 3 ) {
136 match = [ null, selector, null ];
139 match = rquickExpr.exec( selector );
143 if ( match && (match[1] || !context) ) {
147 context = context instanceof
jQuery ? context[0] : context;
152 context && context.nodeType ? context.ownerDocument || context : document,
157 if ( rsingleTag.test( match[1] ) &&
jQuery.isPlainObject( context ) ) {
158 for ( match in context ) {
160 if (
jQuery.isFunction(
this[ match ] ) ) {
161 this[ match ]( context[ match ] );
165 this.attr( match, context[ match ] );
174 elem = document.getElementById( match[2] );
178 if ( elem && elem.parentNode ) {
181 if ( elem.id !== match[2] ) {
182 return rootjQuery.find( selector );
190 this.context = document;
191 this.selector = selector;
196 }
else if ( !context || context.jquery ) {
197 return ( context || rootjQuery ).find( selector );
202 return this.constructor( context ).find( selector );
206 }
else if ( selector.nodeType ) {
207 this.context =
this[0] = selector;
213 }
else if (
jQuery.isFunction( selector ) ) {
214 return rootjQuery.ready( selector );
217 if ( selector.selector !== undefined ) {
218 this.selector = selector.selector;
219 this.context = selector.context;
222 return jQuery.makeArray( selector,
this );
231 toArray:
function() {
232 return core_slice.call(
this );
237 get:
function( num ) {
244 ( num < 0 ?
this[ this.length + num ] :
this[ num ] );
249 pushStack:
function( elems ) {
252 var ret =
jQuery.merge( this.constructor(), elems );
255 ret.prevObject =
this;
256 ret.context = this.context;
265 each:
function( callback, args ) {
266 return jQuery.each(
this, callback, args );
269 ready:
function( fn ) {
271 jQuery.ready.promise().done( fn );
277 return this.pushStack( core_slice.apply(
this, arguments ) );
285 return this.eq( -1 );
289 var len = this.length,
290 j = +i + ( i < 0 ? len : 0 );
291 return this.pushStack( j >= 0 && j < len ? [
this[j] ] : [] );
294 map:
function( callback ) {
295 return this.pushStack(
jQuery.map(
this,
function( elem, i ) {
296 return callback.call( elem, i, elem );
301 return this.prevObject || this.constructor(null);
315 var src, copyIsArray, copy,
name, options, clone,
316 target = arguments[0] || {},
318 length = arguments.length,
322 if ( typeof target ===
"boolean" ) {
324 target = arguments[1] || {};
330 if ( typeof target !==
"object" && !
jQuery.isFunction(target) ) {
335 if ( length === i ) {
340 for ( ; i < length; i++ ) {
342 if ( (options = arguments[ i ]) != null ) {
344 for ( name in options ) {
345 src = target[
name ];
346 copy = options[
name ];
349 if ( target === copy ) {
354 if ( deep && copy && (
jQuery.isPlainObject(copy) || (copyIsArray =
jQuery.isArray(copy)) ) ) {
357 clone = src &&
jQuery.isArray(src) ? src : [];
360 clone = src &&
jQuery.isPlainObject(src) ? src : {};
364 target[
name ] =
jQuery.extend( deep, clone, copy );
367 }
else if ( copy !== undefined ) {
368 target[
name ] = copy;
381 expando:
"jQuery" + ( core_version + Math.random() ).replace( /\D/
g,
"" ),
383 noConflict:
function( deep ) {
403 holdReady:
function( hold ) {
412 ready:
function( wait ) {
415 if ( wait ===
true ? --
jQuery.readyWait :
jQuery.isReady ) {
420 if ( !document.body ) {
421 return setTimeout(
jQuery.ready );
428 if ( wait !==
true && --
jQuery.readyWait > 0 ) {
433 readyList.resolveWith( document, [
jQuery ] );
436 if (
jQuery.fn.trigger ) {
437 jQuery( document ).trigger(
"ready").off(
"ready");
444 isFunction:
function( obj ) {
445 return jQuery.type(obj) ===
"function";
448 isArray: Array.isArray ||
function( obj ) {
449 return jQuery.type(obj) ===
"array";
452 isWindow:
function( obj ) {
454 return obj != null && obj == obj.window;
457 isNumeric:
function( obj ) {
458 return !isNaN( parseFloat(obj) ) && isFinite( obj );
461 type:
function( obj ) {
463 return String( obj );
465 return typeof obj ===
"object" || typeof obj ===
"function" ?
466 class2type[ core_toString.call(obj) ] ||
"object" :
470 isPlainObject:
function( obj ) {
476 if ( !obj ||
jQuery.type(obj) !==
"object" || obj.nodeType ||
jQuery.isWindow( obj ) ) {
482 if ( obj.constructor &&
483 !core_hasOwn.call(obj,
"constructor") &&
484 !core_hasOwn.call(obj.constructor.prototype,
"isPrototypeOf") ) {
494 if (
jQuery.support.ownLast ) {
496 return core_hasOwn.call( obj, key );
502 for ( key in obj ) {}
504 return key === undefined || core_hasOwn.call( obj, key );
507 isEmptyObject:
function( obj ) {
509 for ( name in obj ) {
515 error:
function( msg ) {
516 throw new Error( msg );
522 parseHTML:
function( data, context, keepScripts ) {
523 if ( !data || typeof data !==
"string" ) {
526 if ( typeof context ===
"boolean" ) {
527 keepScripts = context;
530 context = context || document;
532 var parsed = rsingleTag.exec( data ),
533 scripts = !keepScripts && [];
537 return [ context.createElement( parsed[1] ) ];
540 parsed =
jQuery.buildFragment( [ data ], context, scripts );
542 jQuery( scripts ).remove();
544 return jQuery.merge( [], parsed.childNodes );
547 parseJSON:
function( data ) {
550 return window.JSON.parse( data );
553 if ( data === null ) {
557 if ( typeof data ===
"string" ) {
560 data =
jQuery.trim( data );
565 if ( rvalidchars.test( data.replace( rvalidescape,
"@" )
566 .replace( rvalidtokens,
"]" )
567 .replace( rvalidbraces,
"")) ) {
569 return (
new Function(
"return " + data ) )();
574 jQuery.error(
"Invalid JSON: " + data );
578 parseXML:
function( data ) {
580 if ( !data || typeof data !==
"string" ) {
585 tmp =
new DOMParser();
586 xml = tmp.parseFromString( data ,
"text/xml" );
588 xml =
new ActiveXObject(
"Microsoft.XMLDOM" );
595 if ( !xml || !xml.documentElement || xml.getElementsByTagName(
"parsererror" ).length ) {
596 jQuery.error(
"Invalid XML: " + data );
606 globalEval:
function( data ) {
607 if ( data &&
jQuery.trim( data ) ) {
611 (
window.execScript ||
function( data ) {
619 camelCase:
function( string ) {
620 return string.replace( rmsPrefix,
"ms-" ).replace( rdashAlpha, fcamelCase );
623 nodeName:
function( elem,
name ) {
624 return elem.nodeName && elem.nodeName.toLowerCase() ===
name.toLowerCase();
628 each:
function( obj, callback, args ) {
632 isArray = isArraylike( obj );
636 for ( ; i < length; i++ ) {
637 value = callback.apply( obj[ i ], args );
639 if ( value ===
false ) {
645 value = callback.apply( obj[ i ], args );
647 if ( value ===
false ) {
656 for ( ; i < length; i++ ) {
657 value = callback.call( obj[ i ], i, obj[ i ] );
659 if ( value ===
false ) {
665 value = callback.call( obj[ i ], i, obj[ i ] );
667 if ( value ===
false ) {
678 trim: core_trim && !core_trim.call(
"\uFEFF\xA0") ?
680 return text == null ?
682 core_trim.call( text );
687 return text == null ?
689 ( text +
"" ).replace( rtrim,
"" );
693 makeArray:
function( arr, results ) {
694 var ret = results || [];
697 if ( isArraylike( Object(arr) ) ) {
699 typeof arr ===
"string" ?
703 core_push.call( ret, arr );
710 inArray:
function( elem, arr, i ) {
714 if ( core_indexOf ) {
715 return core_indexOf.call( arr, elem, i );
719 i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
721 for ( ; i < len; i++ ) {
723 if ( i in arr && arr[ i ] === elem ) {
732 merge:
function( first, second ) {
733 var l = second.length,
737 if ( typeof l ===
"number" ) {
738 for ( ; j < l; j++ ) {
739 first[ i++ ] = second[ j ];
742 while ( second[j] !== undefined ) {
743 first[ i++ ] = second[ j++ ];
752 grep:
function( elems, callback, inv ) {
756 length = elems.length;
761 for ( ; i < length; i++ ) {
762 retVal = !!callback( elems[ i ], i );
763 if ( inv !== retVal ) {
764 ret.push( elems[ i ] );
772 map:
function( elems, callback, arg ) {
775 length = elems.length,
776 isArray = isArraylike( elems ),
781 for ( ; i < length; i++ ) {
782 value = callback( elems[ i ], i, arg );
784 if ( value != null ) {
785 ret[ ret.length ] = value;
792 value = callback( elems[ i ], i, arg );
794 if ( value != null ) {
795 ret[ ret.length ] = value;
801 return core_concat.apply( [], ret );
809 proxy:
function( fn, context ) {
810 var args, proxy, tmp;
812 if ( typeof context ===
"string" ) {
820 if ( !
jQuery.isFunction( fn ) ) {
825 args = core_slice.call( arguments, 2 );
827 return fn.apply( context ||
this, args.concat( core_slice.call( arguments ) ) );
831 proxy.guid = fn.guid = fn.guid ||
jQuery.guid++;
838 access:
function( elems, fn, key, value, chainable, emptyGet, raw ) {
840 length = elems.length,
844 if (
jQuery.type( key ) ===
"object" ) {
847 jQuery.access( elems, fn, i, key[i],
true, emptyGet, raw );
851 }
else if ( value !== undefined ) {
854 if ( !
jQuery.isFunction( value ) ) {
861 fn.call( elems, value );
867 fn =
function( elem, key, value ) {
868 return bulk.call(
jQuery( elem ), value );
874 for ( ; i < length; i++ ) {
875 fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
886 length ? fn( elems[0], key ) : emptyGet;
890 return (
new Date() ).getTime();
896 swap:
function( elem, options, callback, args ) {
901 for ( name in options ) {
903 elem.style[
name ] = options[
name ];
906 ret = callback.apply( elem, args || [] );
909 for ( name in options ) {
917 jQuery.ready.promise =
function( obj ) {
920 readyList =
jQuery.Deferred();
925 if ( document.readyState ===
"complete" ) {
927 setTimeout(
jQuery.ready );
930 }
else if ( document.addEventListener ) {
932 document.addEventListener(
"DOMContentLoaded", completed,
false );
935 window.addEventListener(
"load", completed,
false );
940 document.attachEvent(
"onreadystatechange", completed );
943 window.attachEvent(
"onload", completed );
950 top =
window.frameElement == null && document.documentElement;
953 if ( top && top.doScroll ) {
954 (
function doScrollCheck() {
960 top.doScroll(
"left");
962 return setTimeout( doScrollCheck, 50 );
975 return readyList.promise( obj );
979 jQuery.each(
"Boolean Number String Function Array Date RegExp Object Error".split(
" "),
function(i,
name) {
980 class2type[
"[object " +
name +
"]" ] =
name.toLowerCase();
983 function isArraylike( obj ) {
984 var length = obj.length,
985 type =
jQuery.type( obj );
987 if (
jQuery.isWindow( obj ) ) {
991 if ( obj.nodeType === 1 && length ) {
995 return type ===
"array" || type !==
"function" &&
997 typeof length ===
"number" && length > 0 && ( length - 1 ) in obj );
1001 rootjQuery =
jQuery(document);
1035 expando =
"sizzle" + -(
new Date()),
1036 preferredDoc =
window.document,
1039 classCache = createCache(),
1040 tokenCache = createCache(),
1041 compilerCache = createCache(),
1042 hasDuplicate =
false,
1043 sortOrder =
function( a, b ) {
1045 hasDuplicate =
true;
1053 MAX_NEGATIVE = 1 << 31,
1056 hasOwn = ({}).hasOwnProperty,
1059 push_native = arr.push,
1063 indexOf = arr.indexOf ||
function( elem ) {
1066 for ( ; i < len; i++ ) {
1067 if (
this[i] === elem ) {
1074 booleans =
"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
1079 whitespace =
"[\\x20\\t\\r\\n\\f]",
1081 characterEncoding =
"(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
1086 identifier = characterEncoding.replace(
"w",
"w#" ),
1089 attributes =
"\\[" + whitespace +
"*(" + characterEncoding +
")" + whitespace +
1090 "*(?:([*^$|!~]?=)" + whitespace +
"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier +
")|)|)" + whitespace +
"*\\]",
1098 pseudos =
":(" + characterEncoding +
")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) +
")*)|.*)\\)|)",
1101 rtrim =
new RegExp(
"^" + whitespace +
"+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace +
"+$",
"g" ),
1103 rcomma =
new RegExp(
"^" + whitespace +
"*," + whitespace +
"*" ),
1104 rcombinators =
new RegExp(
"^" + whitespace +
"*([>+~]|" + whitespace +
")" + whitespace +
"*" ),
1106 rsibling =
new RegExp( whitespace +
"*[+~]" ),
1107 rattributeQuotes =
new RegExp(
"=" + whitespace +
"*([^\\]'\"]*)" + whitespace +
"*\\]",
"g" ),
1109 rpseudo =
new RegExp( pseudos ),
1110 ridentifier =
new RegExp(
"^" + identifier +
"$" ),
1113 "ID":
new RegExp(
"^#(" + characterEncoding +
")" ),
1114 "CLASS":
new RegExp(
"^\\.(" + characterEncoding +
")" ),
1115 "TAG":
new RegExp(
"^(" + characterEncoding.replace(
"w",
"w*" ) +
")" ),
1116 "ATTR":
new RegExp(
"^" + attributes ),
1117 "PSEUDO":
new RegExp(
"^" + pseudos ),
1118 "CHILD":
new RegExp(
"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
1119 "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace +
"*(?:([+-]|)" + whitespace +
1120 "*(\\d+)|))" + whitespace +
"*\\)|)",
"i" ),
1121 "bool":
new RegExp(
"^(?:" + booleans +
")$",
"i" ),
1124 "needsContext":
new RegExp(
"^" + whitespace +
"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
1125 whitespace +
"*((?:-\\d)?\\d*)" + whitespace +
"*\\)|)(?=[^-]|$)",
"i" )
1131 rquickExpr = /^(?:#([
\w-]+)|(\
w+)|\.([
\w-]+))$/,
1133 rinputs = /^(?:input|select|textarea|button)$/i,
1138 // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters 1139 runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), 1140 funescape = function( _, escaped, escapedWhitespace ) { 1141 var high = "0x" + escaped - 0x10000; 1142 // NaN means non-codepoint 1144 // Workaround erroneous numeric interpretation of +"0x" 1145 return high !== high || escapedWhitespace ? 1149 String.fromCharCode( high + 0x10000 ) : 1150 // Supplemental Plane codepoint (surrogate pair) 1151 String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); 1154 // Optimize for push.apply( _, NodeList ) 1157 (arr = slice.call( preferredDoc.childNodes )), 1158 preferredDoc.childNodes 1160 // Support: Android<4.0 1161 // Detect silently failing push.apply 1162 arr[ preferredDoc.childNodes.length ].nodeType; 1164 push = { apply: arr.length ? 1166 // Leverage slice if possible 1167 function( target, els ) { 1168 push_native.apply( target, slice.call(els) ); 1172 // Otherwise append directly 1173 function( target, els ) { 1174 var j = target.length, 1176 // Can't trust NodeList.length
1177 while ( (target[j++] = els[i++]) ) {}
1178 target.length = j - 1;
1183 function Sizzle( selector, context, results, seed ) {
1184 var match, elem, m, nodeType,
1186 i, groups, old, nid, newContext, newSelector;
1188 if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
1189 setDocument( context );
1192 context = context || document;
1193 results = results || [];
1195 if ( !selector || typeof selector !==
"string" ) {
1199 if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
1203 if ( documentIsHTML && !seed ) {
1206 if ( (match = rquickExpr.exec( selector )) ) {
1208 if ( (m = match[1]) ) {
1209 if ( nodeType === 9 ) {
1210 elem = context.getElementById( m );
1213 if ( elem && elem.parentNode ) {
1216 if ( elem.id === m ) {
1217 results.push( elem );
1225 if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
1226 contains( context, elem ) && elem.id === m ) {
1227 results.push( elem );
1233 }
else if ( match[2] ) {
1234 push.apply( results, context.getElementsByTagName( selector ) );
1238 }
else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
1239 push.apply( results, context.getElementsByClassName( m ) );
1245 if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
1246 nid = old = expando;
1247 newContext = context;
1248 newSelector = nodeType === 9 && selector;
1254 if ( nodeType === 1 && context.nodeName.toLowerCase() !==
"object" ) {
1255 groups = tokenize( selector );
1257 if ( (old = context.getAttribute(
"id")) ) {
1258 nid = old.replace( rescape,
"\\$&" );
1260 context.setAttribute(
"id", nid );
1262 nid =
"[id='" + nid +
"'] ";
1266 groups[i] = nid + toSelector( groups[i] );
1268 newContext = rsibling.test( selector ) && context.parentNode || context;
1269 newSelector = groups.join(
",");
1272 if ( newSelector ) {
1274 push.apply( results,
1275 newContext.querySelectorAll( newSelector )
1281 context.removeAttribute(
"id");
1289 return select( selector.replace( rtrim,
"$1" ), context, results, seed );
1298 function createCache() {
1301 function cache( key, value ) {
1303 if ( keys.push( key +=
" " ) > Expr.cacheLength ) {
1305 delete cache[ keys.shift() ];
1307 return (cache[ key ] = value);
1316 function markFunction( fn ) {
1317 fn[ expando ] =
true;
1325 function assert( fn ) {
1326 var div = document.createElement(
"div");
1334 if ( div.parentNode ) {
1335 div.parentNode.removeChild( div );
1347 function addHandle( attrs, handler ) {
1348 var arr = attrs.split(
"|"),
1352 Expr.attrHandle[ arr[i] ] = handler;
1362 function siblingCheck( a, b ) {
1364 diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
1365 ( ~b.sourceIndex || MAX_NEGATIVE ) -
1366 ( ~a.sourceIndex || MAX_NEGATIVE );
1375 while ( (cur = cur.nextSibling) ) {
1389 function createInputPseudo( type ) {
1390 return function( elem ) {
1391 var
name = elem.nodeName.toLowerCase();
1392 return name ===
"input" && elem.type === type;
1400 function createButtonPseudo( type ) {
1401 return function( elem ) {
1402 var
name = elem.nodeName.toLowerCase();
1403 return (name ===
"input" || name ===
"button") && elem.type === type;
1411 function createPositionalPseudo( fn ) {
1412 return markFunction(
function( argument ) {
1413 argument = +argument;
1414 return markFunction(
function( seed, matches ) {
1416 matchIndexes = fn( [], seed.length, argument ),
1417 i = matchIndexes.length;
1421 if ( seed[ (j = matchIndexes[i]) ] ) {
1422 seed[j] = !(matches[j] = seed[j]);
1433 isXML = Sizzle.isXML =
function( elem ) {
1436 var documentElement = elem && (elem.ownerDocument || elem).documentElement;
1437 return documentElement ? documentElement.nodeName !==
"HTML" :
false;
1441 support = Sizzle.support = {};
1448 setDocument = Sizzle.setDocument =
function( node ) {
1449 var doc = node ? node.ownerDocument || node : preferredDoc,
1450 parent = doc.defaultView;
1453 if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
1459 docElem = doc.documentElement;
1462 documentIsHTML = !isXML( doc );
1468 if ( parent && parent.attachEvent && parent !== parent.top ) {
1469 parent.attachEvent(
"onbeforeunload",
function() {
1479 support.attributes = assert(
function( div ) {
1480 div.className =
"i";
1481 return !div.getAttribute(
"className");
1488 support.getElementsByTagName = assert(
function( div ) {
1489 div.appendChild( doc.createComment(
"") );
1490 return !div.getElementsByTagName(
"*").length;
1494 support.getElementsByClassName = assert(
function( div ) {
1495 div.innerHTML =
"<div class='a'></div><div class='a i'></div>";
1499 div.firstChild.className =
"i";
1502 return div.getElementsByClassName(
"i").length === 2;
1509 support.getById = assert(
function( div ) {
1510 docElem.appendChild( div ).id = expando;
1511 return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
1515 if ( support.getById ) {
1516 Expr.find[
"ID"] =
function( id, context ) {
1517 if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
1518 var m = context.getElementById(
id );
1521 return m && m.parentNode ? [m] : [];
1524 Expr.filter[
"ID"] =
function( id ) {
1525 var attrId =
id.replace( runescape, funescape );
1526 return function( elem ) {
1527 return elem.getAttribute(
"id") === attrId;
1533 delete Expr.find[
"ID"];
1535 Expr.filter[
"ID"] =
function( id ) {
1536 var attrId =
id.replace( runescape, funescape );
1537 return function( elem ) {
1538 var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode(
"id");
1539 return node && node.value === attrId;
1545 Expr.find[
"TAG"] = support.getElementsByTagName ?
1546 function( tag, context ) {
1547 if ( typeof context.getElementsByTagName !== strundefined ) {
1548 return context.getElementsByTagName( tag );
1551 function( tag, context ) {
1555 results = context.getElementsByTagName( tag );
1558 if ( tag ===
"*" ) {
1559 while ( (elem = results[i++]) ) {
1560 if ( elem.nodeType === 1 ) {
1571 Expr.find[
"CLASS"] = support.getElementsByClassName &&
function( className, context ) {
1572 if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {
1573 return context.getElementsByClassName( className );
1592 if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
1595 assert(
function( div ) {
1601 div.innerHTML =
"<select><option selected=''></option></select>";
1605 if ( !div.querySelectorAll(
"[selected]").length ) {
1606 rbuggyQSA.push(
"\\[" + whitespace +
"*(?:value|" + booleans +
")" );
1612 if ( !div.querySelectorAll(
":checked").length ) {
1613 rbuggyQSA.push(
":checked");
1617 assert(
function( div ) {
1624 var input = doc.createElement(
"input");
1625 input.setAttribute(
"type",
"hidden" );
1626 div.appendChild( input ).setAttribute(
"t",
"" );
1628 if ( div.querySelectorAll(
"[t^='']").length ) {
1629 rbuggyQSA.push(
"[*^$]=" + whitespace +
"*(?:''|\"\")" );
1634 if ( !div.querySelectorAll(
":enabled").length ) {
1635 rbuggyQSA.push(
":enabled",
":disabled" );
1639 div.querySelectorAll(
"*,:x");
1640 rbuggyQSA.push(
",.*:");
1644 if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector ||
1645 docElem.mozMatchesSelector ||
1646 docElem.oMatchesSelector ||
1647 docElem.msMatchesSelector) )) ) {
1649 assert(
function( div ) {
1652 support.disconnectedMatch = matches.call( div,
"div" );
1656 matches.call( div,
"[s!='']:x" );
1657 rbuggyMatches.push(
"!=", pseudos );
1661 rbuggyQSA = rbuggyQSA.length &&
new RegExp( rbuggyQSA.join(
"|") );
1662 rbuggyMatches = rbuggyMatches.length &&
new RegExp( rbuggyMatches.join(
"|") );
1670 contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ?
1672 var adown = a.nodeType === 9 ? a.documentElement : a,
1673 bup = b && b.parentNode;
1674 return a === bup || !!( bup && bup.nodeType === 1 && (
1676 adown.contains( bup ) :
1677 a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
1682 while ( (b = b.parentNode) ) {
1695 sortOrder = docElem.compareDocumentPosition ?
1700 hasDuplicate =
true;
1704 var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );
1709 (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
1712 if ( a === doc || contains(preferredDoc, a) ) {
1715 if ( b === doc || contains(preferredDoc, b) ) {
1721 ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
1725 return compare & 4 ? -1 : 1;
1729 return a.compareDocumentPosition ? -1 : 1;
1741 hasDuplicate =
true;
1745 }
else if ( !aup || !bup ) {
1746 return a === doc ? -1 :
1751 ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
1755 }
else if ( aup === bup ) {
1756 return siblingCheck( a, b );
1761 while ( (cur = cur.parentNode) ) {
1765 while ( (cur = cur.parentNode) ) {
1770 while ( ap[i] === bp[i] ) {
1776 siblingCheck( ap[i], bp[i] ) :
1779 ap[i] === preferredDoc ? -1 :
1780 bp[i] === preferredDoc ? 1 :
1787 Sizzle.matches =
function( expr, elements ) {
1788 return Sizzle( expr, null, null, elements );
1791 Sizzle.matchesSelector =
function( elem, expr ) {
1793 if ( ( elem.ownerDocument || elem ) !== document ) {
1794 setDocument( elem );
1798 expr = expr.replace( rattributeQuotes,
"='$1']" );
1800 if ( support.matchesSelector && documentIsHTML &&
1801 ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
1802 ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
1805 var ret = matches.call( elem, expr );
1808 if ( ret || support.disconnectedMatch ||
1811 elem.document && elem.document.nodeType !== 11 ) {
1817 return Sizzle( expr, document, null, [elem] ).length > 0;
1820 Sizzle.contains =
function( context, elem ) {
1822 if ( ( context.ownerDocument || context ) !== document ) {
1823 setDocument( context );
1825 return contains( context, elem );
1828 Sizzle.attr =
function( elem,
name ) {
1830 if ( ( elem.ownerDocument || elem ) !== document ) {
1831 setDocument( elem );
1834 var fn = Expr.attrHandle[
name.toLowerCase() ],
1836 val = fn && hasOwn.call( Expr.attrHandle,
name.toLowerCase() ) ?
1837 fn( elem,
name, !documentIsHTML ) :
1840 return val === undefined ?
1841 support.attributes || !documentIsHTML ?
1842 elem.getAttribute(
name ) :
1843 (val = elem.getAttributeNode(
name)) && val.specified ?
1849 Sizzle.error =
function( msg ) {
1850 throw new Error(
"Syntax error, unrecognized expression: " + msg );
1857 Sizzle.uniqueSort =
function( results ) {
1864 hasDuplicate = !support.detectDuplicates;
1865 sortInput = !support.sortStable && results.slice( 0 );
1866 results.sort( sortOrder );
1868 if ( hasDuplicate ) {
1869 while ( (elem = results[i++]) ) {
1870 if ( elem === results[ i ] ) {
1871 j = duplicates.push( i );
1875 results.splice( duplicates[ j ], 1 );
1886 getText = Sizzle.getText =
function( elem ) {
1890 nodeType = elem.nodeType;
1894 for ( ; (node = elem[i]); i++ ) {
1896 ret += getText( node );
1898 }
else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
1901 if ( typeof elem.textContent ===
"string" ) {
1902 return elem.textContent;
1905 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
1906 ret += getText( elem );
1909 }
else if ( nodeType === 3 || nodeType === 4 ) {
1910 return elem.nodeValue;
1917 Expr = Sizzle.selectors = {
1922 createPseudo: markFunction,
1931 ">": { dir:
"parentNode", first:
true },
1932 " ": { dir:
"parentNode" },
1933 "+": { dir:
"previousSibling", first:
true },
1934 "~": { dir:
"previousSibling" }
1938 "ATTR":
function( match ) {
1939 match[1] = match[1].replace( runescape, funescape );
1942 match[3] = ( match[4] || match[5] ||
"" ).replace( runescape, funescape );
1944 if ( match[2] ===
"~=" ) {
1945 match[3] =
" " + match[3] +
" ";
1948 return match.slice( 0, 4 );
1951 "CHILD":
function( match ) {
1962 match[1] = match[1].toLowerCase();
1964 if ( match[1].slice( 0, 3 ) ===
"nth" ) {
1967 Sizzle.error( match[0] );
1972 match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] ===
"even" || match[3] ===
"odd" ) );
1973 match[5] = +( ( match[7] + match[8] ) || match[3] ===
"odd" );
1976 }
else if ( match[3] ) {
1977 Sizzle.error( match[0] );
1983 "PSEUDO":
function( match ) {
1985 unquoted = !match[5] && match[2];
1987 if ( matchExpr[
"CHILD"].test( match[0] ) ) {
1992 if ( match[3] && match[4] !== undefined ) {
1993 match[2] = match[4];
1996 }
else if ( unquoted && rpseudo.test( unquoted ) &&
1998 (excess = tokenize( unquoted,
true )) &&
2000 (excess = unquoted.indexOf(
")", unquoted.length - excess ) - unquoted.length) ) {
2003 match[0] = match[0].slice( 0, excess );
2004 match[2] = unquoted.slice( 0, excess );
2008 return match.slice( 0, 3 );
2014 "TAG":
function( nodeNameSelector ) {
2015 var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
2016 return nodeNameSelector ===
"*" ?
2017 function() {
return true; } :
2019 return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
2023 "CLASS":
function( className ) {
2024 var pattern = classCache[ className +
" " ];
2027 (pattern =
new RegExp(
"(^|" + whitespace +
")" + className +
"(" + whitespace +
"|$)" )) &&
2028 classCache( className,
function( elem ) {
2029 return pattern.test( typeof elem.className ===
"string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute(
"class") ||
"" );
2033 "ATTR":
function(
name,
operator, check ) {
2034 return function( elem ) {
2035 var result = Sizzle.attr( elem,
name );
2037 if ( result == null ) {
2038 return operator ===
"!=";
2046 return operator ===
"=" ? result === check :
2047 operator ===
"!=" ? result !== check :
2048 operator ===
"^=" ? check && result.indexOf( check ) === 0 :
2049 operator ===
"*=" ? check && result.indexOf( check ) > -1 :
2050 operator ===
"$=" ? check && result.slice( -check.length ) === check :
2051 operator === "~=" ? (
" " + result +
" " ).indexOf( check ) > -1 :
2052 operator ===
"|=" ? result === check || result.slice( 0, check.length + 1 ) === check +
"-" :
2057 "CHILD":
function( type, what, argument, first, last ) {
2058 var simple = type.slice( 0, 3 ) !==
"nth",
2059 forward = type.slice( -4 ) !==
"last",
2060 ofType = what ===
"of-type";
2062 return first === 1 && last === 0 ?
2066 return !!elem.parentNode;
2069 function( elem, context, xml ) {
2070 var cache, outerCache, node, diff, nodeIndex,
start,
2071 dir = simple !== forward ?
"nextSibling" :
"previousSibling",
2072 parent = elem.parentNode,
2073 name = ofType && elem.nodeName.toLowerCase(),
2074 useCache = !xml && !ofType;
2082 while ( (node = node[ dir ]) ) {
2083 if ( ofType ? node.nodeName.toLowerCase() ===
name : node.nodeType === 1 ) {
2088 start = dir = type ===
"only" && !start &&
"nextSibling";
2093 start = [ forward ? parent.firstChild : parent.lastChild ];
2096 if ( forward && useCache ) {
2098 outerCache = parent[ expando ] || (parent[ expando ] = {});
2099 cache = outerCache[ type ] || [];
2100 nodeIndex = cache[0] === dirruns && cache[1];
2101 diff = cache[0] === dirruns && cache[2];
2102 node = nodeIndex && parent.childNodes[ nodeIndex ];
2104 while ( (node = ++nodeIndex && node && node[ dir ] ||
2107 (diff = nodeIndex = 0) || start.pop()) ) {
2110 if ( node.nodeType === 1 && ++diff && node === elem ) {
2111 outerCache[ type ] = [ dirruns, nodeIndex, diff ];
2117 }
else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
2123 while ( (node = ++nodeIndex && node && node[ dir ] ||
2124 (diff = nodeIndex = 0) || start.pop()) ) {
2126 if ( ( ofType ? node.nodeName.toLowerCase() ===
name : node.nodeType === 1 ) && ++diff ) {
2129 (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
2132 if ( node === elem ) {
2141 return diff === first || ( diff % first === 0 && diff / first >= 0 );
2146 "PSEUDO":
function( pseudo, argument ) {
2152 fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
2153 Sizzle.error(
"unsupported pseudo: " + pseudo );
2158 if ( fn[ expando ] ) {
2159 return fn( argument );
2163 if ( fn.length > 1 ) {
2164 args = [ pseudo, pseudo,
"", argument ];
2165 return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
2166 markFunction(
function( seed, matches ) {
2168 matched = fn( seed, argument ),
2171 idx = indexOf.call( seed, matched[i] );
2172 seed[ idx ] = !( matches[ idx ] = matched[i] );
2176 return fn( elem, 0, args );
2186 "not": markFunction(
function( selector ) {
2192 matcher = compile( selector.replace( rtrim,
"$1" ) );
2194 return matcher[ expando ] ?
2195 markFunction(
function( seed, matches, context, xml ) {
2197 unmatched = matcher( seed, null, xml, [] ),
2202 if ( (elem = unmatched[i]) ) {
2203 seed[i] = !(matches[i] = elem);
2207 function( elem, context, xml ) {
2209 matcher( input, null, xml, results );
2210 return !results.pop();
2214 "has": markFunction(
function( selector ) {
2215 return function( elem ) {
2216 return Sizzle( selector, elem ).length > 0;
2220 "contains": markFunction(
function( text ) {
2221 return function( elem ) {
2222 return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
2233 "lang": markFunction(
function( lang ) {
2235 if ( !ridentifier.test(lang ||
"") ) {
2236 Sizzle.error(
"unsupported lang: " + lang );
2238 lang = lang.replace( runescape, funescape ).toLowerCase();
2239 return function( elem ) {
2242 if ( (elemLang = documentIsHTML ?
2244 elem.getAttribute(
"xml:lang") || elem.getAttribute(
"lang")) ) {
2246 elemLang = elemLang.toLowerCase();
2247 return elemLang === lang || elemLang.indexOf( lang +
"-" ) === 0;
2249 }
while ( (elem = elem.parentNode) && elem.nodeType === 1 );
2255 "target":
function( elem ) {
2257 return hash && hash.slice( 1 ) === elem.id;
2260 "root":
function( elem ) {
2261 return elem === docElem;
2264 "focus":
function( elem ) {
2265 return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
2269 "enabled":
function( elem ) {
2270 return elem.disabled ===
false;
2273 "disabled":
function( elem ) {
2274 return elem.disabled ===
true;
2277 "checked":
function( elem ) {
2280 var nodeName = elem.nodeName.toLowerCase();
2281 return (nodeName ===
"input" && !!elem.checked) || (nodeName ===
"option" && !!elem.selected);
2284 "selected":
function( elem ) {
2287 if ( elem.parentNode ) {
2288 elem.parentNode.selectedIndex;
2291 return elem.selected ===
true;
2295 "empty":
function( elem ) {
2301 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
2302 if ( elem.nodeName >
"@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
2309 "parent":
function( elem ) {
2310 return !Expr.pseudos[
"empty"]( elem );
2314 "header":
function( elem ) {
2315 return rheader.test( elem.nodeName );
2318 "input":
function( elem ) {
2319 return rinputs.test( elem.nodeName );
2322 "button":
function( elem ) {
2323 var
name = elem.nodeName.toLowerCase();
2324 return name ===
"input" && elem.type ===
"button" || name ===
"button";
2327 "text":
function( elem ) {
2331 return elem.nodeName.toLowerCase() ===
"input" &&
2332 elem.type ===
"text" &&
2333 ( (attr = elem.getAttribute(
"type")) == null || attr.toLowerCase() === elem.type );
2337 "first": createPositionalPseudo(
function() {
2341 "last": createPositionalPseudo(
function( matchIndexes, length ) {
2342 return [ length - 1 ];
2345 "eq": createPositionalPseudo(
function( matchIndexes, length, argument ) {
2346 return [ argument < 0 ? argument + length : argument ];
2349 "even": createPositionalPseudo(
function( matchIndexes, length ) {
2351 for ( ; i < length; i += 2 ) {
2352 matchIndexes.push( i );
2354 return matchIndexes;
2357 "odd": createPositionalPseudo(
function( matchIndexes, length ) {
2359 for ( ; i < length; i += 2 ) {
2360 matchIndexes.push( i );
2362 return matchIndexes;
2365 "lt": createPositionalPseudo(
function( matchIndexes, length, argument ) {
2366 var i = argument < 0 ? argument + length : argument;
2367 for ( ; --i >= 0; ) {
2368 matchIndexes.push( i );
2370 return matchIndexes;
2373 "gt": createPositionalPseudo(
function( matchIndexes, length, argument ) {
2374 var i = argument < 0 ? argument + length : argument;
2375 for ( ; ++i < length; ) {
2376 matchIndexes.push( i );
2378 return matchIndexes;
2383 Expr.pseudos[
"nth"] = Expr.pseudos[
"eq"];
2386 for ( i in { radio:
true, checkbox:
true, file:
true, password:
true, image:
true } ) {
2387 Expr.pseudos[ i ] = createInputPseudo( i );
2389 for ( i in { submit:
true, reset:
true } ) {
2390 Expr.pseudos[ i ] = createButtonPseudo( i );
2394 function setFilters() {}
2395 setFilters.prototype = Expr.filters = Expr.pseudos;
2396 Expr.setFilters =
new setFilters();
2398 function tokenize( selector, parseOnly ) {
2399 var matched, match, tokens, type,
2400 soFar, groups, preFilters,
2401 cached = tokenCache[ selector +
" " ];
2404 return parseOnly ? 0 : cached.slice( 0 );
2409 preFilters = Expr.preFilter;
2414 if ( !matched || (match = rcomma.exec( soFar )) ) {
2417 soFar = soFar.slice( match[0].length ) || soFar;
2419 groups.push( tokens = [] );
2425 if ( (match = rcombinators.exec( soFar )) ) {
2426 matched = match.shift();
2430 type: match[0].replace( rtrim,
" " )
2432 soFar = soFar.slice( matched.length );
2436 for ( type in Expr.filter ) {
2437 if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
2438 (match = preFilters[ type ]( match ))) ) {
2439 matched = match.shift();
2445 soFar = soFar.slice( matched.length );
2460 Sizzle.error( selector ) :
2462 tokenCache( selector, groups ).slice( 0 );
2465 function toSelector( tokens ) {
2467 len = tokens.length,
2469 for ( ; i < len; i++ ) {
2470 selector += tokens[i].value;
2475 function addCombinator( matcher, combinator, base ) {
2476 var dir = combinator.dir,
2477 checkNonElements = base && dir ===
"parentNode",
2480 return combinator.first ?
2482 function( elem, context, xml ) {
2483 while ( (elem = elem[ dir ]) ) {
2484 if ( elem.nodeType === 1 || checkNonElements ) {
2485 return matcher( elem, context, xml );
2491 function( elem, context, xml ) {
2492 var data, cache, outerCache,
2493 dirkey = dirruns +
" " + doneName;
2497 while ( (elem = elem[ dir ]) ) {
2498 if ( elem.nodeType === 1 || checkNonElements ) {
2499 if ( matcher( elem, context, xml ) ) {
2505 while ( (elem = elem[ dir ]) ) {
2506 if ( elem.nodeType === 1 || checkNonElements ) {
2507 outerCache = elem[ expando ] || (elem[ expando ] = {});
2508 if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
2509 if ( (data = cache[1]) ===
true || data === cachedruns ) {
2510 return data ===
true;
2513 cache = outerCache[ dir ] = [ dirkey ];
2514 cache[1] = matcher( elem, context, xml ) || cachedruns;
2515 if ( cache[1] ===
true ) {
2525 function elementMatcher( matchers ) {
2526 return matchers.length > 1 ?
2527 function( elem, context, xml ) {
2528 var i = matchers.length;
2530 if ( !matchers[i]( elem, context, xml ) ) {
2539 function condense( unmatched, map, filter, context, xml ) {
2543 len = unmatched.length,
2544 mapped = map != null;
2546 for ( ; i < len; i++ ) {
2547 if ( (elem = unmatched[i]) ) {
2548 if ( !filter || filter( elem, context, xml ) ) {
2549 newUnmatched.push( elem );
2557 return newUnmatched;
2560 function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
2561 if ( postFilter && !postFilter[ expando ] ) {
2562 postFilter = setMatcher( postFilter );
2564 if ( postFinder && !postFinder[ expando ] ) {
2565 postFinder = setMatcher( postFinder, postSelector );
2567 return markFunction(
function( seed, results, context, xml ) {
2571 preexisting = results.length,
2574 elems = seed || multipleContexts( selector ||
"*", context.nodeType ? [ context ] : context, [] ),
2577 matcherIn = preFilter && ( seed || !selector ) ?
2578 condense( elems, preMap, preFilter, context, xml ) :
2581 matcherOut = matcher ?
2583 postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
2594 matcher( matcherIn, matcherOut, context, xml );
2599 temp = condense( matcherOut, postMap );
2600 postFilter( temp, [], context, xml );
2605 if ( (elem = temp[i]) ) {
2606 matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
2612 if ( postFinder || preFilter ) {
2616 i = matcherOut.length;
2618 if ( (elem = matcherOut[i]) ) {
2620 temp.push( (matcherIn[i] = elem) );
2623 postFinder( null, (matcherOut = []), temp, xml );
2627 i = matcherOut.length;
2629 if ( (elem = matcherOut[i]) &&
2630 (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
2632 seed[temp] = !(results[temp] = elem);
2639 matcherOut = condense(
2640 matcherOut === results ?
2641 matcherOut.splice( preexisting, matcherOut.length ) :
2645 postFinder( null, results, matcherOut, xml );
2647 push.apply( results, matcherOut );
2653 function matcherFromTokens( tokens ) {
2654 var checkContext, matcher, j,
2655 len = tokens.length,
2656 leadingRelative = Expr.relative[ tokens[0].type ],
2657 implicitRelative = leadingRelative || Expr.relative[
" "],
2658 i = leadingRelative ? 1 : 0,
2661 matchContext = addCombinator(
function( elem ) {
2662 return elem === checkContext;
2663 }, implicitRelative, true ),
2664 matchAnyContext = addCombinator(
function( elem ) {
2665 return indexOf.call( checkContext, elem ) > -1;
2666 }, implicitRelative, true ),
2667 matchers = [
function( elem, context, xml ) {
2668 return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
2669 (checkContext = context).nodeType ?
2670 matchContext( elem, context, xml ) :
2671 matchAnyContext( elem, context, xml ) );
2674 for ( ; i < len; i++ ) {
2675 if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
2676 matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
2678 matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
2681 if ( matcher[ expando ] ) {
2684 for ( ; j < len; j++ ) {
2685 if ( Expr.relative[ tokens[j].type ] ) {
2690 i > 1 && elementMatcher( matchers ),
2691 i > 1 && toSelector(
2693 tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type ===
" " ?
"*" :
"" })
2694 ).replace( rtrim,
"$1" ),
2696 i < j && matcherFromTokens( tokens.slice( i, j ) ),
2697 j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
2698 j < len && toSelector( tokens )
2701 matchers.push( matcher );
2705 return elementMatcher( matchers );
2708 function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
2710 var matcherCachedRuns = 0,
2711 bySet = setMatchers.length > 0,
2712 byElement = elementMatchers.length > 0,
2713 superMatcher =
function( seed, context, xml, results, expandContext ) {
2714 var elem, j, matcher,
2718 unmatched = seed && [],
2719 outermost = expandContext != null,
2720 contextBackup = outermostContext,
2722 elems = seed || byElement && Expr.find[
"TAG"](
"*", expandContext && context.parentNode || context ),
2724 dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);
2727 outermostContext = context !== document && context;
2728 cachedruns = matcherCachedRuns;
2733 for ( ; (elem = elems[i]) != null; i++ ) {
2734 if ( byElement && elem ) {
2736 while ( (matcher = elementMatchers[j++]) ) {
2737 if ( matcher( elem, context, xml ) ) {
2738 results.push( elem );
2743 dirruns = dirrunsUnique;
2744 cachedruns = ++matcherCachedRuns;
2751 if ( (elem = !matcher && elem) ) {
2757 unmatched.push( elem );
2764 if ( bySet && i !== matchedCount ) {
2766 while ( (matcher = setMatchers[j++]) ) {
2767 matcher( unmatched, setMatched, context, xml );
2772 if ( matchedCount > 0 ) {
2774 if ( !(unmatched[i] || setMatched[i]) ) {
2775 setMatched[i] = pop.call( results );
2781 setMatched = condense( setMatched );
2785 push.apply( results, setMatched );
2788 if ( outermost && !seed && setMatched.length > 0 &&
2789 ( matchedCount + setMatchers.length ) > 1 ) {
2791 Sizzle.uniqueSort( results );
2797 dirruns = dirrunsUnique;
2798 outermostContext = contextBackup;
2805 markFunction( superMatcher ) :
2809 compile = Sizzle.compile =
function( selector, group ) {
2812 elementMatchers = [],
2813 cached = compilerCache[ selector +
" " ];
2818 group = tokenize( selector );
2822 cached = matcherFromTokens( group[i] );
2823 if ( cached[ expando ] ) {
2824 setMatchers.push( cached );
2826 elementMatchers.push( cached );
2831 cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
2836 function multipleContexts( selector, contexts, results ) {
2838 len = contexts.length;
2839 for ( ; i < len; i++ ) {
2840 Sizzle( selector, contexts[i], results );
2845 function select( selector, context, results, seed ) {
2846 var i, tokens, token, type, find,
2847 match = tokenize( selector );
2851 if ( match.length === 1 ) {
2854 tokens = match[0] = match[0].slice( 0 );
2855 if ( tokens.length > 2 && (token = tokens[0]).type ===
"ID" &&
2856 support.getById && context.nodeType === 9 && documentIsHTML &&
2857 Expr.relative[ tokens[1].type ] ) {
2859 context = ( Expr.find[
"ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
2863 selector = selector.slice( tokens.shift().value.length );
2867 i = matchExpr[
"needsContext"].test( selector ) ? 0 : tokens.length;
2872 if ( Expr.relative[ (type = token.type) ] ) {
2875 if ( (find = Expr.find[ type ]) ) {
2878 token.matches[0].replace( runescape, funescape ),
2879 rsibling.test( tokens[0].type ) && context.parentNode || context
2883 tokens.splice( i, 1 );
2884 selector = seed.length && toSelector( tokens );
2886 push.apply( results, seed );
2899 compile( selector, match )(
2904 rsibling.test( selector )
2912 support.sortStable = expando.split(
"").sort( sortOrder ).join(
"") === expando;
2916 support.detectDuplicates = hasDuplicate;
2923 support.sortDetached = assert(
function( div1 ) {
2925 return div1.compareDocumentPosition( document.createElement(
"div") ) & 1;
2931 if ( !assert(
function( div ) {
2932 div.innerHTML =
"<a href='#'></a>";
2933 return div.firstChild.getAttribute(
"href") ===
"#" ;
2935 addHandle(
"type|href|height|width",
function( elem,
name, isXML ) {
2937 return elem.getAttribute(
name,
name.toLowerCase() ===
"type" ? 1 : 2 );
2944 if ( !support.attributes || !assert(
function( div ) {
2945 div.innerHTML =
"<input/>";
2946 div.firstChild.setAttribute(
"value",
"" );
2947 return div.firstChild.getAttribute(
"value" ) ===
"";
2949 addHandle(
"value",
function( elem,
name, isXML ) {
2950 if ( !isXML && elem.nodeName.toLowerCase() ===
"input" ) {
2951 return elem.defaultValue;
2958 if ( !assert(
function( div ) {
2959 return div.getAttribute(
"disabled") == null;
2961 addHandle( booleans,
function( elem,
name, isXML ) {
2964 return (val = elem.getAttributeNode(
name )) && val.specified ?
2966 elem[
name ] ===
true ?
name.toLowerCase() : null;
2972 jQuery.expr = Sizzle.selectors;
2974 jQuery.unique = Sizzle.uniqueSort;
2975 jQuery.text = Sizzle.getText;
2976 jQuery.isXMLDoc = Sizzle.isXML;
2977 jQuery.contains = Sizzle.contains;
2982 var optionsCache = {};
2985 function createOptions( options ) {
2986 var
object = optionsCache[ options ] = {};
2987 jQuery.each( options.match( core_rnotwhite ) || [],
function( _, flag ) {
2988 object[ flag ] =
true;
3015 jQuery.Callbacks =
function( options ) {
3019 options = typeof options ===
"string" ?
3020 ( optionsCache[ options ] || createOptions( options ) ) :
3021 jQuery.extend( {}, options );
3038 stack = !options.once && [],
3040 fire =
function( data ) {
3041 memory = options.memory && data;
3043 firingIndex = firingStart || 0;
3045 firingLength = list.length;
3047 for ( ; list && firingIndex < firingLength; firingIndex++ ) {
3048 if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) ===
false && options.stopOnFalse ) {
3056 if ( stack.length ) {
3057 fire( stack.shift() );
3059 }
else if ( memory ) {
3072 var
start = list.length;
3073 (
function add( args ) {
3074 jQuery.each( args,
function( _, arg ) {
3075 var type =
jQuery.type( arg );
3076 if ( type ===
"function" ) {
3077 if ( !options.unique || !
self.has( arg ) ) {
3080 }
else if ( arg && arg.length && type !==
"string" ) {
3089 firingLength = list.length;
3092 }
else if ( memory ) {
3093 firingStart =
start;
3100 remove:
function() {
3102 jQuery.each( arguments,
function( _, arg ) {
3104 while( ( index =
jQuery.inArray( arg, list, index ) ) > -1 ) {
3105 list.splice( index, 1 );
3108 if ( index <= firingLength ) {
3111 if ( index <= firingIndex ) {
3122 has:
function( fn ) {
3123 return fn ?
jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
3132 disable:
function() {
3137 disabled:
function() {
3149 locked:
function() {
3153 fireWith:
function( context, args ) {
3154 if ( list && ( !fired || stack ) ) {
3156 args = [ context, args.slice ? args.slice() : args ];
3167 self.fireWith(
this, arguments );
3180 Deferred:
function( func ) {
3183 [
"resolve",
"done",
jQuery.Callbacks(
"once memory"),
"resolved" ],
3184 [
"reject",
"fail",
jQuery.Callbacks(
"once memory"),
"rejected" ],
3185 [
"notify",
"progress",
jQuery.Callbacks(
"memory") ]
3192 always:
function() {
3193 deferred.done( arguments ).fail( arguments );
3197 var fns = arguments;
3198 return jQuery.Deferred(
function( newDefer ) {
3199 jQuery.each( tuples,
function( i, tuple ) {
3200 var action = tuple[ 0 ],
3201 fn =
jQuery.isFunction( fns[ i ] ) && fns[ i ];
3203 deferred[ tuple[1] ](
function() {
3204 var returned = fn && fn.apply(
this, arguments );
3205 if ( returned &&
jQuery.isFunction( returned.promise ) ) {
3207 .done( newDefer.resolve )
3208 .fail( newDefer.reject )
3209 .progress( newDefer.notify );
3211 newDefer[ action +
"With" ](
this === promise ? newDefer.promise() :
this, fn ? [ returned ] : arguments );
3220 promise:
function( obj ) {
3221 return obj != null ?
jQuery.extend( obj, promise ) : promise;
3227 promise.pipe = promise.then;
3230 jQuery.each( tuples,
function( i, tuple ) {
3231 var list = tuple[ 2 ],
3232 stateString = tuple[ 3 ];
3235 promise[ tuple[1] ] = list.add;
3238 if ( stateString ) {
3239 list.add(
function() {
3241 state = stateString;
3244 }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
3248 deferred[ tuple[0] ] =
function() {
3249 deferred[ tuple[0] +
"With" ](
this === deferred ? promise :
this, arguments );
3252 deferred[ tuple[0] +
"With" ] = list.fireWith;
3256 promise.promise( deferred );
3260 func.call( deferred, deferred );
3268 when:
function( subordinate ) {
3270 resolveValues = core_slice.call( arguments ),
3271 length = resolveValues.length,
3274 remaining = length !== 1 || ( subordinate &&
jQuery.isFunction( subordinate.promise ) ) ? length : 0,
3277 deferred = remaining === 1 ? subordinate :
jQuery.Deferred(),
3280 updateFunc =
function( i, contexts, values ) {
3281 return function( value ) {
3282 contexts[ i ] =
this;
3283 values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
3284 if( values === progressValues ) {
3285 deferred.notifyWith( contexts, values );
3286 }
else if ( !( --remaining ) ) {
3287 deferred.resolveWith( contexts, values );
3292 progressValues, progressContexts, resolveContexts;
3296 progressValues =
new Array( length );
3297 progressContexts =
new Array( length );
3298 resolveContexts =
new Array( length );
3299 for ( ; i < length; i++ ) {
3300 if ( resolveValues[ i ] &&
jQuery.isFunction( resolveValues[ i ].promise ) ) {
3301 resolveValues[ i ].promise()
3302 .done( updateFunc( i, resolveContexts, resolveValues ) )
3303 .fail( deferred.reject )
3304 .progress( updateFunc( i, progressContexts, progressValues ) );
3313 deferred.resolveWith( resolveContexts, resolveValues );
3316 return deferred.promise();
3319 jQuery.support = (
function( support ) {
3321 var all, a, input, select, fragment, opt, eventName, isSupported, i,
3322 div = document.createElement(
"div");
3325 div.setAttribute(
"className",
"t" );
3326 div.innerHTML =
" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
3329 all = div.getElementsByTagName(
"*") || [];
3330 a = div.getElementsByTagName(
"a")[ 0 ];
3331 if ( !a || !a.style || !all.length ) {
3336 select = document.createElement(
"select");
3337 opt = select.appendChild( document.createElement(
"option") );
3338 input = div.getElementsByTagName(
"input")[ 0 ];
3340 a.style.cssText =
"top:1px;float:left;opacity:.5";
3343 support.getSetAttribute = div.className !==
"t";
3346 support.leadingWhitespace = div.firstChild.nodeType === 3;
3350 support.tbody = !div.getElementsByTagName(
"tbody").length;
3354 support.htmlSerialize = !!div.getElementsByTagName(
"link").length;
3358 support.style = /top/.test( a.getAttribute(
"style") );
3362 support.hrefNormalized = a.getAttribute(
"href") ===
"/a";
3367 support.opacity = /^0.5/.test( a.style.opacity );
3371 support.cssFloat = !!a.style.cssFloat;
3374 support.checkOn = !!input.value;
3378 support.optSelected = opt.selected;
3381 support.enctype = !!document.createElement(
"form").enctype;
3385 support.html5Clone = document.createElement(
"nav").cloneNode(
true ).outerHTML !==
"<:nav></:nav>";
3388 support.inlineBlockNeedsLayout =
false;
3389 support.shrinkWrapBlocks =
false;
3390 support.pixelPosition =
false;
3391 support.deleteExpando =
true;
3392 support.noCloneEvent =
true;
3393 support.reliableMarginRight =
true;
3394 support.boxSizingReliable =
true;
3397 input.checked =
true;
3398 support.noCloneChecked = input.cloneNode(
true ).checked;
3402 select.disabled =
true;
3403 support.optDisabled = !opt.disabled;
3409 support.deleteExpando =
false;
3413 input = document.createElement(
"input");
3414 input.setAttribute(
"value",
"" );
3415 support.input = input.getAttribute(
"value" ) ===
"";
3419 input.setAttribute(
"type",
"radio" );
3420 support.radioValue = input.value ===
"t";
3423 input.setAttribute(
"checked",
"t" );
3424 input.setAttribute(
"name",
"t" );
3426 fragment = document.createDocumentFragment();
3427 fragment.appendChild( input );
3431 support.appendChecked = input.checked;
3434 support.checkClone = fragment.cloneNode(
true ).cloneNode(
true ).lastChild.checked;
3439 if ( div.attachEvent ) {
3440 div.attachEvent(
"onclick",
function() {
3441 support.noCloneEvent =
false;
3444 div.cloneNode(
true ).click();
3449 for ( i in { submit:
true, change:
true, focusin:
true }) {
3450 div.setAttribute( eventName =
"on" + i,
"t" );
3452 support[ i +
"Bubbles" ] = eventName in
window || div.attributes[ eventName ].expando ===
false;
3455 div.style.backgroundClip =
"content-box";
3456 div.cloneNode(
true ).style.backgroundClip =
"";
3457 support.clearCloneStyle = div.style.backgroundClip ===
"content-box";
3461 for ( i in
jQuery( support ) ) {
3464 support.ownLast = i !==
"0";
3468 var container, marginDiv, tds,
3469 divReset =
"padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
3470 body = document.getElementsByTagName(
"body")[0];
3477 container = document.createElement(
"div");
3478 container.style.cssText =
"border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
3480 body.appendChild( container ).appendChild( div );
3489 div.innerHTML =
"<table><tr><td></td><td>t</td></tr></table>";
3490 tds = div.getElementsByTagName(
"td");
3491 tds[ 0 ].style.cssText =
"padding:0;margin:0;border:0;display:none";
3492 isSupported = ( tds[ 0 ].offsetHeight === 0 );
3494 tds[ 0 ].style.display =
"";
3495 tds[ 1 ].style.display =
"none";
3499 support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
3503 div.style.cssText =
"box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
3507 jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {},
function() {
3508 support.boxSizing = div.offsetWidth === 4;
3512 if (
window.getComputedStyle ) {
3513 support.pixelPosition = (
window.getComputedStyle( div, null ) || {} ).top !==
"1%";
3514 support.boxSizingReliable = (
window.getComputedStyle( div, null ) || {
width:
"4px" } ).
width ===
"4px";
3520 marginDiv = div.appendChild( document.createElement(
"div") );
3521 marginDiv.style.cssText = div.style.cssText = divReset;
3522 marginDiv.style.marginRight = marginDiv.style.width =
"0";
3523 div.style.width =
"1px";
3525 support.reliableMarginRight =
3526 !parseFloat( (
window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
3529 if ( typeof div.style.zoom !== core_strundefined ) {
3535 div.style.cssText = divReset +
"width:1px;padding:1px;display:inline;zoom:1";
3536 support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
3540 div.style.display =
"block";
3541 div.innerHTML =
"<div></div>";
3542 div.firstChild.style.width =
"5px";
3543 support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
3545 if ( support.inlineBlockNeedsLayout ) {
3549 body.style.zoom = 1;
3553 body.removeChild( container );
3556 container = div = tds = marginDiv = null;
3560 all = select = fragment = opt = a = input = null;
3565 var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
3566 rmultiDash = /([A-Z])/
g;
3568 function internalData( elem,
name, data, pvt ){
3569 if ( !
jQuery.acceptData( elem ) ) {
3574 internalKey =
jQuery.expando,
3578 isNode = elem.nodeType,
3582 cache = isNode ?
jQuery.cache : elem,
3586 id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
3590 if ( (!
id || !cache[
id] || (!pvt && !cache[
id].data)) && data ===
undefined && typeof
name ===
"string" ) {
3598 id = elem[ internalKey ] = core_deletedIds.pop() ||
jQuery.guid++;
3604 if ( !cache[
id ] ) {
3607 cache[ id ] = isNode ? {} : { toJSON:
jQuery.noop };
3612 if ( typeof name ===
"object" || typeof name ===
"function" ) {
3614 cache[ id ] =
jQuery.extend( cache[
id ], name );
3616 cache[ id ].data =
jQuery.extend( cache[
id ].data, name );
3620 thisCache = cache[ id ];
3626 if ( !thisCache.data ) {
3627 thisCache.data = {};
3630 thisCache = thisCache.data;
3634 thisCache[
jQuery.camelCase( name ) ] = data;
3639 if ( typeof name ===
"string" ) {
3642 ret = thisCache[
name ];
3645 if ( ret == null ) {
3648 ret = thisCache[
jQuery.camelCase( name ) ];
3657 function internalRemoveData( elem,
name, pvt ) {
3658 if ( !
jQuery.acceptData( elem ) ) {
3663 isNode = elem.nodeType,
3666 cache = isNode ?
jQuery.cache : elem,
3671 if ( !cache[
id ] ) {
3677 thisCache = pvt ? cache[ id ] : cache[ id ].data;
3685 if (
name in thisCache ) {
3691 if (
name in thisCache ) {
3709 delete thisCache[
name[i] ];
3714 if ( pvt ? !isEmptyDataObject(thisCache) : !
jQuery.isEmptyObject(thisCache) ) {
3722 delete cache[ id ].data;
3726 if ( !isEmptyDataObject( cache[
id ] ) ) {
3733 jQuery.cleanData( [ elem ],
true );
3737 }
else if (
jQuery.support.deleteExpando || cache != cache.window ) {
3756 "object":
"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 3759 hasData:
function( elem ) {
3760 elem = elem.nodeType ?
jQuery.cache[ elem[
jQuery.expando] ] : elem[
jQuery.expando ];
3761 return !!elem && !isEmptyDataObject( elem );
3764 data:
function( elem,
name, data ) {
3765 return internalData( elem, name, data );
3768 removeData:
function( elem,
name ) {
3769 return internalRemoveData( elem, name );
3773 _data:
function( elem,
name, data ) {
3774 return internalData( elem, name, data,
true );
3777 _removeData:
function( elem,
name ) {
3778 return internalRemoveData( elem, name,
true );
3782 acceptData:
function( elem ) {
3784 if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {
3788 var noData = elem.nodeName &&
jQuery.noData[ elem.nodeName.toLowerCase() ];
3791 return !noData || noData !==
true && elem.getAttribute(
"classid") === noData;
3796 data:
function( key, value ) {
3807 if ( this.length ) {
3808 data =
jQuery.data( elem );
3810 if ( elem.nodeType === 1 && !
jQuery._data( elem,
"parsedAttrs" ) ) {
3811 attrs = elem.attributes;
3812 for ( ; i < attrs.length; i++ ) {
3813 name = attrs[i].name;
3815 if ( name.indexOf(
"data-") === 0 ) {
3816 name =
jQuery.camelCase( name.slice(5) );
3818 dataAttr( elem, name, data[ name ] );
3821 jQuery._data( elem,
"parsedAttrs",
true );
3829 if ( typeof key ===
"object" ) {
3830 return this.
each(
function() {
3831 jQuery.data(
this, key );
3835 return arguments.length > 1 ?
3838 this.
each(
function() {
3839 jQuery.data(
this, key, value );
3844 elem ? dataAttr( elem, key,
jQuery.data( elem, key ) ) : null;
3847 removeData:
function( key ) {
3848 return this.
each(
function() {
3849 jQuery.removeData(
this, key );
3854 function dataAttr( elem, key, data ) {
3857 if ( data ===
undefined && elem.nodeType === 1 ) {
3859 var
name =
"data-" + key.replace( rmultiDash,
"-$1" ).toLowerCase();
3861 data = elem.getAttribute( name );
3863 if ( typeof data ===
"string" ) {
3865 data = data ===
"true" ?
true :
3866 data ===
"false" ?
false :
3867 data ===
"null" ? null :
3869 +data +
"" === data ? +data :
3870 rbrace.test( data ) ?
jQuery.parseJSON( data ) :
3875 jQuery.data( elem, key, data );
3886 function isEmptyDataObject( obj ) {
3888 for ( name in obj ) {
3891 if ( name ===
"data" &&
jQuery.isEmptyObject( obj[name] ) ) {
3894 if ( name !==
"toJSON" ) {
3902 queue:
function( elem, type, data ) {
3906 type = ( type ||
"fx" ) +
"queue";
3907 queue =
jQuery._data( elem, type );
3911 if ( !queue ||
jQuery.isArray(data) ) {
3912 queue =
jQuery._data( elem, type,
jQuery.makeArray(data) );
3921 dequeue:
function( elem, type ) {
3922 type = type ||
"fx";
3924 var queue =
jQuery.queue( elem, type ),
3925 startLength = queue.length,
3927 hooks =
jQuery._queueHooks( elem, type ),
3929 jQuery.dequeue( elem, type );
3933 if ( fn ===
"inprogress" ) {
3942 if ( type ===
"fx" ) {
3943 queue.unshift(
"inprogress" );
3948 fn.call( elem, next, hooks );
3951 if ( !startLength && hooks ) {
3957 _queueHooks:
function( elem, type ) {
3958 var key = type +
"queueHooks";
3959 return jQuery._data( elem, key ) ||
jQuery._data( elem, key, {
3960 empty:
jQuery.Callbacks(
"once memory").add(
function() {
3961 jQuery._removeData( elem, type +
"queue" );
3962 jQuery._removeData( elem, key );
3969 queue:
function( type, data ) {
3972 if ( typeof type !==
"string" ) {
3978 if ( arguments.length < setter ) {
3979 return jQuery.queue(
this[0], type );
3984 this.
each(
function() {
3985 var queue =
jQuery.queue(
this, type, data );
3988 jQuery._queueHooks(
this, type );
3990 if ( type ===
"fx" && queue[0] !==
"inprogress" ) {
3991 jQuery.dequeue(
this, type );
3995 dequeue:
function( type ) {
3996 return this.
each(
function() {
3997 jQuery.dequeue(
this, type );
4002 delay:
function( time, type ) {
4003 time =
jQuery.fx ?
jQuery.fx.speeds[ time ] || time : time;
4004 type = type ||
"fx";
4006 return this.queue( type,
function( next, hooks ) {
4007 var timeout = setTimeout( next, time );
4008 hooks.stop =
function() {
4009 clearTimeout( timeout );
4013 clearQueue:
function( type ) {
4014 return this.queue( type ||
"fx", [] );
4018 promise:
function( type, obj ) {
4021 defer =
jQuery.Deferred(),
4024 resolve =
function() {
4025 if ( !( --count ) ) {
4026 defer.resolveWith( elements, [ elements ] );
4030 if ( typeof type !==
"string" ) {
4034 type = type ||
"fx";
4037 tmp =
jQuery._data( elements[ i ], type +
"queueHooks" );
4038 if ( tmp && tmp.empty ) {
4040 tmp.empty.add( resolve );
4044 return defer.promise( obj );
4047 var nodeHook, boolHook,
4050 rfocusable = /^(?:input|select|textarea|button|
object)$/i,
4051 rclickable = /^(?:a|area)$/i,
4052 ruseDefault = /^(?:checked|selected)$/i,
4053 getSetAttribute =
jQuery.support.getSetAttribute,
4054 getSetInput =
jQuery.support.input;
4057 attr: function( name, value ) {
4058 return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
4061 removeAttr:
function(
name ) {
4062 return this.each(function() {
4063 jQuery.removeAttr( this, name );
4067 prop:
function(
name, value ) {
4068 return jQuery.access(
this,
jQuery.prop,
name, value, arguments.length > 1 );
4071 removeProp:
function(
name ) {
4073 return this.
each(
function() {
4077 delete this[
name ];
4083 var classes, elem, cur, clazz, j,
4086 proceed = typeof value ===
"string" && value;
4088 if (
jQuery.isFunction( value ) ) {
4089 return this.
each(
function( j ) {
4090 jQuery(
this ).addClass( value.call(
this, j,
this.className ) );
4096 classes = ( value ||
"" ).match( core_rnotwhite ) || [];
4098 for ( ; i < len; i++ ) {
4100 cur = elem.nodeType === 1 && ( elem.className ?
4101 (
" " + elem.className +
" " ).replace( rclass,
" " ) :
4107 while ( (clazz = classes[j++]) ) {
4108 if ( cur.indexOf(
" " + clazz +
" " ) < 0 ) {
4112 elem.className =
jQuery.trim( cur );
4121 removeClass:
function( value ) {
4122 var classes, elem, cur, clazz, j,
4125 proceed = arguments.length === 0 || typeof value ===
"string" && value;
4127 if (
jQuery.isFunction( value ) ) {
4128 return this.
each(
function( j ) {
4129 jQuery(
this ).removeClass( value.call(
this, j,
this.className ) );
4133 classes = ( value ||
"" ).match( core_rnotwhite ) || [];
4135 for ( ; i < len; i++ ) {
4138 cur = elem.nodeType === 1 && ( elem.className ?
4139 (
" " + elem.className +
" " ).replace( rclass,
" " ) :
4145 while ( (clazz = classes[j++]) ) {
4147 while ( cur.indexOf(
" " + clazz +
" " ) >= 0 ) {
4148 cur = cur.replace(
" " + clazz +
" ",
" " );
4151 elem.className = value ?
jQuery.trim( cur ) :
"";
4159 toggleClass:
function( value, stateVal ) {
4160 var type = typeof value;
4162 if ( typeof stateVal ===
"boolean" && type ===
"string" ) {
4163 return stateVal ? this.
addClass( value ) : this.removeClass( value );
4166 if (
jQuery.isFunction( value ) ) {
4167 return this.
each(
function( i ) {
4168 jQuery(
this ).toggleClass( value.call(
this, i,
this.className, stateVal), stateVal );
4172 return this.
each(
function() {
4173 if ( type ===
"string" ) {
4178 classNames = value.match( core_rnotwhite ) || [];
4180 while ( (className = classNames[ i++ ]) ) {
4182 if (
self.hasClass( className ) ) {
4183 self.removeClass( className );
4185 self.addClass( className );
4190 }
else if ( type === core_strundefined || type ===
"boolean" ) {
4191 if ( this.className ) {
4193 jQuery._data(
this,
"__className__", this.className );
4200 this.className = this.className || value ===
false ?
"" :
jQuery._data(
this,
"__className__" ) ||
"";
4205 hasClass:
function( selector ) {
4206 var className =
" " + selector +
" ",
4209 for ( ; i < l; i++ ) {
4210 if (
this[i].nodeType === 1 && (
" " +
this[i].className +
" ").replace(rclass,
" ").indexOf( className ) >= 0 ) {
4218 val:
function( value ) {
4219 var ret, hooks, isFunction,
4222 if ( !arguments.length ) {
4224 hooks =
jQuery.valHooks[ elem.type ] ||
jQuery.valHooks[ elem.nodeName.toLowerCase() ];
4226 if ( hooks &&
"get" in hooks && (ret = hooks.get( elem,
"value" )) !==
undefined ) {
4232 return typeof ret ===
"string" ?
4234 ret.replace(rreturn,
"") :
4236 ret == null ?
"" : ret;
4242 isFunction =
jQuery.isFunction( value );
4244 return this.
each(
function( i ) {
4247 if ( this.nodeType !== 1 ) {
4252 val = value.call(
this, i,
jQuery(
this ).val() );
4258 if ( val == null ) {
4260 }
else if ( typeof val ===
"number" ) {
4262 }
else if (
jQuery.isArray( val ) ) {
4263 val =
jQuery.map(val,
function ( value ) {
4264 return value == null ?
"" : value +
"";
4268 hooks =
jQuery.valHooks[ this.type ] ||
jQuery.valHooks[ this.nodeName.toLowerCase() ];
4271 if ( !hooks || !(
"set" in hooks) || hooks.set(
this, val,
"value" ) ===
undefined ) {
4281 get:
function( elem ) {
4283 var val =
jQuery.find.attr( elem,
"value" );
4284 return val != null ?
4290 get:
function( elem ) {
4292 options = elem.options,
4293 index = elem.selectedIndex,
4294 one = elem.type ===
"select-one" || index < 0,
4295 values = one ? null : [],
4296 max = one ? index + 1 : options.length,
4302 for ( ; i < max; i++ ) {
4303 option = options[ i ];
4306 if ( ( option.selected || i === index ) &&
4308 (
jQuery.support.optDisabled ? !option.disabled : option.getAttribute(
"disabled") === null ) &&
4309 ( !option.parentNode.disabled || !
jQuery.nodeName( option.parentNode,
"optgroup" ) ) ) {
4312 value =
jQuery( option ).val();
4320 values.push( value );
4327 set:
function( elem, value ) {
4328 var optionSet, option,
4329 options = elem.options,
4330 values =
jQuery.makeArray( value ),
4334 option = options[ i ];
4335 if ( (option.selected =
jQuery.inArray(
jQuery(option).val(), values ) >= 0) ) {
4342 elem.selectedIndex = -1;
4349 attr:
function( elem,
name, value ) {
4351 nType = elem.nodeType;
4354 if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
4359 if ( typeof elem.getAttribute === core_strundefined ) {
4360 return jQuery.prop( elem, name, value );
4365 if ( nType !== 1 || !
jQuery.isXMLDoc( elem ) ) {
4366 name = name.toLowerCase();
4368 (
jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
4373 if ( value === null ) {
4374 jQuery.removeAttr( elem, name );
4376 }
else if ( hooks &&
"set" in hooks && (ret = hooks.set( elem, value, name )) !==
undefined ) {
4380 elem.setAttribute( name, value +
"" );
4384 }
else if ( hooks &&
"get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
4388 ret =
jQuery.find.attr( elem, name );
4391 return ret == null ?
4397 removeAttr:
function( elem, value ) {
4400 attrNames = value && value.match( core_rnotwhite );
4402 if ( attrNames && elem.nodeType === 1 ) {
4403 while ( (name = attrNames[i++]) ) {
4407 if (
jQuery.expr.match.bool.test( name ) ) {
4409 if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
4410 elem[ propName ] =
false;
4414 elem[
jQuery.camelCase(
"default-" + name ) ] =
4415 elem[ propName ] =
false;
4420 jQuery.attr( elem, name,
"" );
4423 elem.removeAttribute( getSetAttribute ? name : propName );
4430 set:
function( elem, value ) {
4431 if ( !
jQuery.support.radioValue && value ===
"radio" &&
jQuery.nodeName(elem,
"input") ) {
4434 var val = elem.value;
4435 elem.setAttribute(
"type", value );
4447 "class":
"className" 4450 prop:
function( elem,
name, value ) {
4451 var ret, hooks, notxml,
4452 nType = elem.nodeType;
4455 if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
4459 notxml = nType !== 1 || !
jQuery.isXMLDoc( elem );
4468 return hooks &&
"set" in hooks && (ret = hooks.set( elem, value, name )) !==
undefined ?
4470 ( elem[ name ] = value );
4473 return hooks &&
"get" in hooks && (ret = hooks.get( elem, name )) !== null ?
4481 get:
function( elem ) {
4485 var tabindex =
jQuery.find.attr( elem,
"tabindex" );
4488 parseInt( tabindex, 10 ) :
4489 rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
4499 set:
function( elem, value,
name ) {
4500 if ( value ===
false ) {
4503 }
else if ( getSetInput && getSetAttribute || !ruseDefault.test(
name ) ) {
4509 elem[
jQuery.camelCase(
"default-" +
name ) ] = elem[
name ] =
true;
4518 jQuery.expr.attrHandle[
name ] = getSetInput && getSetAttribute || !ruseDefault.test(
name ) ?
4519 function( elem,
name, isXML ) {
4525 getter( elem, name, isXML ) ?
4527 name.toLowerCase() :
4532 function( elem,
name, isXML ) {
4535 elem[
jQuery.camelCase(
"default-" + name ) ] ?
4536 name.toLowerCase() :
4542 if ( !getSetInput || !getSetAttribute ) {
4543 jQuery.attrHooks.value = {
4544 set:
function( elem, value,
name ) {
4545 if (
jQuery.nodeName( elem,
"input" ) ) {
4547 elem.defaultValue = value;
4550 return nodeHook && nodeHook.set( elem, value,
name );
4557 if ( !getSetAttribute ) {
4562 set:
function( elem, value,
name ) {
4564 var ret = elem.getAttributeNode(
name );
4566 elem.setAttributeNode(
4567 (ret = elem.ownerDocument.createAttribute(
name ))
4571 ret.value = value +=
"";
4574 return name ===
"value" || value === elem.getAttribute(
name ) ?
4579 jQuery.expr.attrHandle.id =
jQuery.expr.attrHandle.name =
jQuery.expr.attrHandle.coords =
4581 function( elem,
name, isXML ) {
4585 (ret = elem.getAttributeNode( name )) && ret.value !==
"" ?
4589 jQuery.valHooks.button = {
4590 get:
function( elem,
name ) {
4591 var ret = elem.getAttributeNode( name );
4592 return ret && ret.specified ?
4601 jQuery.attrHooks.contenteditable = {
4602 set:
function( elem, value,
name ) {
4603 nodeHook.set( elem, value ===
"" ?
false : value, name );
4609 jQuery.each([
"width",
"height" ],
function( i, name ) {
4611 set:
function( elem, value ) {
4612 if ( value ===
"" ) {
4613 elem.setAttribute( name,
"auto" );
4624 if ( !
jQuery.support.hrefNormalized ) {
4626 jQuery.each([
"href",
"src" ],
function( i,
name ) {
4628 get:
function( elem ) {
4629 return elem.getAttribute(
name, 4 );
4635 if ( !
jQuery.support.style ) {
4636 jQuery.attrHooks.style = {
4637 get:
function( elem ) {
4643 set:
function( elem, value ) {
4644 return ( elem.style.cssText = value +
"" );
4651 if ( !
jQuery.support.optSelected ) {
4652 jQuery.propHooks.selected = {
4653 get:
function( elem ) {
4654 var parent = elem.parentNode;
4657 parent.selectedIndex;
4660 if ( parent.parentNode ) {
4661 parent.parentNode.selectedIndex;
4681 jQuery.propFix[ this.toLowerCase() ] =
this;
4685 if ( !
jQuery.support.enctype ) {
4686 jQuery.propFix.enctype =
"encoding";
4690 jQuery.each([
"radio",
"checkbox" ],
function() {
4691 jQuery.valHooks[ this ] = {
4692 set:
function( elem, value ) {
4693 if (
jQuery.isArray( value ) ) {
4694 return ( elem.checked =
jQuery.inArray(
jQuery(elem).val(), value ) >= 0 );
4698 if ( !
jQuery.support.checkOn ) {
4699 jQuery.valHooks[ this ].get =
function( elem ) {
4702 return elem.getAttribute(
"value") === null ?
"on" : elem.value;
4706 var rformElems = /^(?:input|select|textarea)$/i,
4708 rmouseEvent = /^(?:mouse|contextmenu)|click/,
4709 rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
4710 rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
4712 function returnTrue() {
4716 function returnFalse() {
4720 function safeActiveElement() {
4722 return document.activeElement;
4734 add:
function( elem, types, handler, data, selector ) {
4735 var tmp, events, t, handleObjIn,
4736 special, eventHandle, handleObj,
4737 handlers, type, namespaces, origType,
4738 elemData =
jQuery._data( elem );
4746 if ( handler.handler ) {
4747 handleObjIn = handler;
4748 handler = handleObjIn.handler;
4749 selector = handleObjIn.selector;
4753 if ( !handler.guid ) {
4754 handler.guid =
jQuery.guid++;
4758 if ( !(events = elemData.events) ) {
4759 events = elemData.events = {};
4761 if ( !(eventHandle = elemData.handle) ) {
4762 eventHandle = elemData.handle =
function(
e ) {
4765 return typeof
jQuery !== core_strundefined && (!
e ||
jQuery.event.triggered !==
e.type) ?
4766 jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
4770 eventHandle.elem = elem;
4774 types = ( types ||
"" ).match( core_rnotwhite ) || [
""];
4777 tmp = rtypenamespace.exec( types[t] ) || [];
4778 type = origType = tmp[1];
4779 namespaces = ( tmp[2] ||
"" ).split(
"." ).sort();
4787 special =
jQuery.event.special[ type ] || {};
4790 type = ( selector ? special.delegateType : special.bindType ) || type;
4793 special =
jQuery.event.special[ type ] || {};
4796 handleObj =
jQuery.extend({
4803 needsContext: selector &&
jQuery.expr.match.needsContext.test( selector ),
4804 namespace: namespaces.join(
".")
4808 if ( !(handlers = events[ type ]) ) {
4809 handlers = events[ type ] = [];
4810 handlers.delegateCount = 0;
4813 if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
4815 if ( elem.addEventListener ) {
4816 elem.addEventListener( type, eventHandle,
false );
4818 }
else if ( elem.attachEvent ) {
4819 elem.attachEvent(
"on" + type, eventHandle );
4824 if ( special.add ) {
4825 special.add.call( elem, handleObj );
4827 if ( !handleObj.handler.guid ) {
4828 handleObj.handler.guid = handler.guid;
4834 handlers.splice( handlers.delegateCount++, 0, handleObj );
4836 handlers.push( handleObj );
4840 jQuery.event.global[ type ] =
true;
4848 remove:
function( elem, types, handler, selector, mappedTypes ) {
4849 var j, handleObj, tmp,
4850 origCount, t, events,
4851 special, handlers, type,
4852 namespaces, origType,
4853 elemData =
jQuery.hasData( elem ) &&
jQuery._data( elem );
4855 if ( !elemData || !(events = elemData.events) ) {
4860 types = ( types ||
"" ).match( core_rnotwhite ) || [
""];
4863 tmp = rtypenamespace.exec( types[t] ) || [];
4864 type = origType = tmp[1];
4865 namespaces = ( tmp[2] ||
"" ).split(
"." ).sort();
4869 for ( type in events ) {
4870 jQuery.event.remove( elem, type + types[ t ], handler, selector,
true );
4875 special =
jQuery.event.special[ type ] || {};
4876 type = ( selector ? special.delegateType : special.bindType ) || type;
4877 handlers = events[ type ] || [];
4878 tmp = tmp[2] &&
new RegExp(
"(^|\\.)" + namespaces.join(
"\\.(?:.*\\.|)") +
"(\\.|$)" );
4881 origCount = j = handlers.length;
4883 handleObj = handlers[ j ];
4885 if ( ( mappedTypes || origType === handleObj.origType ) &&
4886 ( !handler || handler.guid === handleObj.guid ) &&
4887 ( !tmp || tmp.test( handleObj.namespace ) ) &&
4888 ( !selector || selector === handleObj.selector || selector ===
"**" && handleObj.selector ) ) {
4889 handlers.splice( j, 1 );
4891 if ( handleObj.selector ) {
4892 handlers.delegateCount--;
4894 if ( special.remove ) {
4895 special.remove.call( elem, handleObj );
4902 if ( origCount && !handlers.length ) {
4903 if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
4904 jQuery.removeEvent( elem, type, elemData.handle );
4907 delete events[ type ];
4912 if (
jQuery.isEmptyObject( events ) ) {
4913 delete elemData.handle;
4917 jQuery._removeData( elem,
"events" );
4921 trigger:
function( event, data, elem, onlyHandlers ) {
4922 var handle, ontype, cur,
4923 bubbleType, special, tmp, i,
4924 eventPath = [ elem || document ],
4925 type = core_hasOwn.call( event,
"type" ) ?
event.type : event,
4926 namespaces = core_hasOwn.call( event,
"namespace" ) ?
event.namespace.split(
".") : [];
4928 cur = tmp = elem = elem || document;
4931 if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
4936 if ( rfocusMorph.test( type +
jQuery.event.triggered ) ) {
4940 if ( type.indexOf(
".") >= 0 ) {
4942 namespaces = type.split(
".");
4943 type = namespaces.shift();
4946 ontype = type.indexOf(
":") < 0 &&
"on" + type;
4949 event =
event[
jQuery.expando ] ?
4951 new jQuery.Event( type, typeof event ===
"object" && event );
4954 event.isTrigger = onlyHandlers ? 2 : 3;
4955 event.namespace = namespaces.join(
".");
4956 event.namespace_re =
event.namespace ?
4957 new RegExp(
"(^|\\.)" + namespaces.join(
"\\.(?:.*\\.|)") +
"(\\.|$)" ) :
4962 if ( !event.target ) {
4963 event.target = elem;
4967 data = data == null ?
4969 jQuery.makeArray( data, [ event ] );
4972 special =
jQuery.event.special[ type ] || {};
4973 if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
4979 if ( !onlyHandlers && !special.noBubble && !
jQuery.isWindow( elem ) ) {
4981 bubbleType = special.delegateType || type;
4982 if ( !rfocusMorph.test( bubbleType + type ) ) {
4983 cur = cur.parentNode;
4985 for ( ; cur; cur = cur.parentNode ) {
4986 eventPath.push( cur );
4991 if ( tmp === (elem.ownerDocument || document) ) {
4992 eventPath.push( tmp.defaultView || tmp.parentWindow ||
window );
4998 while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
5000 event.type = i > 1 ?
5002 special.bindType || type;
5005 handle = (
jQuery._data( cur,
"events" ) || {} )[ event.type ] &&
jQuery._data( cur,
"handle" );
5007 handle.apply( cur, data );
5011 handle = ontype && cur[ ontype ];
5012 if ( handle &&
jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
5013 event.preventDefault();
5019 if ( !onlyHandlers && !event.isDefaultPrevented() ) {
5021 if ( (!special._default || special._default.apply( eventPath.pop(), data ) ===
false) &&
5022 jQuery.acceptData( elem ) ) {
5027 if ( ontype && elem[ type ] && !
jQuery.isWindow( elem ) ) {
5030 tmp = elem[ ontype ];
5033 elem[ ontype ] = null;
5037 jQuery.event.triggered = type;
5047 elem[ ontype ] = tmp;
5053 return event.result;
5056 dispatch:
function( event ) {
5059 event =
jQuery.event.fix( event );
5061 var i, ret, handleObj, matched, j,
5063 args = core_slice.call( arguments ),
5064 handlers = (
jQuery._data(
this,
"events" ) || {} )[ event.type ] || [],
5065 special =
jQuery.event.special[ event.type ] || {};
5069 event.delegateTarget =
this;
5072 if ( special.preDispatch && special.preDispatch.call(
this, event ) === false ) {
5077 handlerQueue =
jQuery.event.handlers.call(
this, event, handlers );
5081 while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
5082 event.currentTarget = matched.elem;
5085 while ( (handleObj = matched.handlers[ j++ ]) && !
event.isImmediatePropagationStopped() ) {
5089 if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
5091 event.handleObj = handleObj;
5092 event.data = handleObj.data;
5094 ret = ( (
jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
5095 .apply( matched.elem, args );
5098 if ( (event.result = ret) ===
false ) {
5099 event.preventDefault();
5100 event.stopPropagation();
5108 if ( special.postDispatch ) {
5109 special.postDispatch.call(
this, event );
5112 return event.result;
5115 handlers:
function( event, handlers ) {
5116 var sel, handleObj, matches, i,
5118 delegateCount = handlers.delegateCount,
5124 if ( delegateCount && cur.nodeType && (!event.button || event.type !==
"click") ) {
5127 for ( ; cur !=
this; cur = cur.parentNode || this ) {
5132 if ( cur.nodeType === 1 && (cur.disabled !==
true || event.type !==
"click") ) {
5134 for ( i = 0; i < delegateCount; i++ ) {
5135 handleObj = handlers[ i ];
5138 sel = handleObj.selector +
" ";
5141 matches[ sel ] = handleObj.needsContext ?
5142 jQuery( sel,
this ).index( cur ) >= 0 :
5143 jQuery.find( sel,
this, null, [ cur ] ).length;
5145 if ( matches[ sel ] ) {
5146 matches.push( handleObj );
5149 if ( matches.length ) {
5150 handlerQueue.push({ elem: cur, handlers: matches });
5157 if ( delegateCount < handlers.length ) {
5158 handlerQueue.push({ elem:
this, handlers: handlers.slice( delegateCount ) });
5161 return handlerQueue;
5164 fix:
function( event ) {
5165 if ( event[
jQuery.expando ] ) {
5172 originalEvent = event,
5173 fixHook = this.fixHooks[ type ];
5176 this.fixHooks[ type ] = fixHook =
5177 rmouseEvent.test( type ) ? this.mouseHooks :
5178 rkeyEvent.test( type ) ? this.keyHooks :
5181 copy = fixHook.props ? this.
props.concat( fixHook.props ) : this.
props;
5183 event =
new jQuery.Event( originalEvent );
5188 event[ prop ] = originalEvent[ prop ];
5193 if ( !event.target ) {
5194 event.target = originalEvent.srcElement || document;
5199 if ( event.target.nodeType === 3 ) {
5200 event.target =
event.target.parentNode;
5205 event.metaKey = !!
event.metaKey;
5207 return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
5211 props:
"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(
" "),
5216 props:
"char charCode key keyCode".split(
" "),
5217 filter:
function( event, original ) {
5220 if ( event.which == null ) {
5221 event.which = original.charCode != null ? original.charCode : original.keyCode;
5229 props:
"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(
" "),
5230 filter:
function( event, original ) {
5231 var body, eventDoc, doc,
5232 button = original.button,
5233 fromElement = original.fromElement;
5236 if ( event.pageX == null && original.clientX != null ) {
5237 eventDoc =
event.target.ownerDocument || document;
5238 doc = eventDoc.documentElement;
5239 body = eventDoc.body;
5241 event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
5242 event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
5246 if ( !event.relatedTarget && fromElement ) {
5247 event.relatedTarget = fromElement ===
event.target ? original.toElement : fromElement;
5252 if ( !event.which && button !==
undefined ) {
5253 event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
5267 trigger:
function() {
5268 if (
this !== safeActiveElement() && this.focus ) {
5279 delegateType:
"focusin" 5282 trigger:
function() {
5283 if (
this === safeActiveElement() && this.blur ) {
5288 delegateType:
"focusout" 5292 trigger:
function() {
5293 if (
jQuery.nodeName(
this,
"input" ) && this.type ===
"checkbox" && this.click ) {
5300 _default:
function( event ) {
5301 return jQuery.nodeName( event.target,
"a" );
5306 postDispatch:
function( event ) {
5310 event.originalEvent.returnValue =
event.result;
5316 simulate:
function( type, elem, event, bubble ) {
5330 jQuery.event.trigger( e, null, elem );
5332 jQuery.event.dispatch.call( elem, e );
5334 if ( e.isDefaultPrevented() ) {
5335 event.preventDefault();
5340 jQuery.removeEvent = document.removeEventListener ?
5341 function( elem, type, handle ) {
5342 if ( elem.removeEventListener ) {
5343 elem.removeEventListener( type, handle,
false );
5346 function( elem, type, handle ) {
5347 var
name =
"on" + type;
5349 if ( elem.detachEvent ) {
5353 if ( typeof elem[ name ] === core_strundefined ) {
5354 elem[
name ] = null;
5357 elem.detachEvent( name, handle );
5363 if ( !(
this instanceof
jQuery.Event) ) {
5368 if ( src && src.type ) {
5369 this.originalEvent = src;
5370 this.type = src.type;
5374 this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue ===
false ||
5375 src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
5388 this.timeStamp = src && src.timeStamp ||
jQuery.now();
5391 this[
jQuery.expando ] =
true;
5396 jQuery.Event.prototype = {
5397 isDefaultPrevented: returnFalse,
5398 isPropagationStopped: returnFalse,
5399 isImmediatePropagationStopped: returnFalse,
5401 preventDefault:
function() {
5402 var
e = this.originalEvent;
5404 this.isDefaultPrevented = returnTrue;
5410 if ( e.preventDefault ) {
5416 e.returnValue =
false;
5419 stopPropagation:
function() {
5420 var
e = this.originalEvent;
5422 this.isPropagationStopped = returnTrue;
5427 if ( e.stopPropagation ) {
5428 e.stopPropagation();
5433 e.cancelBubble =
true;
5435 stopImmediatePropagation:
function() {
5436 this.isImmediatePropagationStopped = returnTrue;
5437 this.stopPropagation();
5443 mouseenter:
"mouseover",
5444 mouseleave:
"mouseout" 5445 },
function( orig, fix ) {
5446 jQuery.event.special[ orig ] = {
5450 handle:
function( event ) {
5453 related =
event.relatedTarget,
5454 handleObj =
event.handleObj;
5458 if ( !related || (related !== target && !
jQuery.contains( target, related )) ) {
5459 event.type = handleObj.origType;
5460 ret = handleObj.handler.apply(
this, arguments );
5469 if ( !
jQuery.support.submitBubbles ) {
5471 jQuery.event.special.submit = {
5474 if (
jQuery.nodeName(
this,
"form" ) ) {
5479 jQuery.event.add(
this,
"click._submit keypress._submit",
function(
e ) {
5481 var elem =
e.target,
5482 form =
jQuery.nodeName( elem,
"input" ) ||
jQuery.nodeName( elem,
"button" ) ? elem.form :
undefined;
5483 if ( form && !
jQuery._data( form,
"submitBubbles" ) ) {
5484 jQuery.event.add( form,
"submit._submit",
function( event ) {
5485 event._submit_bubble =
true;
5487 jQuery._data( form,
"submitBubbles",
true );
5493 postDispatch:
function( event ) {
5495 if ( event._submit_bubble ) {
5496 delete event._submit_bubble;
5497 if ( this.parentNode && !event.isTrigger ) {
5498 jQuery.event.simulate(
"submit", this.parentNode, event,
true );
5503 teardown:
function() {
5505 if (
jQuery.nodeName(
this,
"form" ) ) {
5510 jQuery.event.remove(
this,
"._submit" );
5516 if ( !
jQuery.support.changeBubbles ) {
5518 jQuery.event.special.change = {
5522 if ( rformElems.test(
this.nodeName ) ) {
5526 if ( this.type ===
"checkbox" || this.type ===
"radio" ) {
5527 jQuery.event.add(
this,
"propertychange._change",
function( event ) {
5528 if ( event.originalEvent.propertyName ===
"checked" ) {
5529 this._just_changed = true;
5532 jQuery.event.add(
this,
"click._change",
function( event ) {
5533 if ( this._just_changed && !event.isTrigger ) {
5534 this._just_changed = false;
5537 jQuery.event.simulate(
"change",
this, event,
true );
5543 jQuery.event.add(
this,
"beforeactivate._change",
function(
e ) {
5544 var elem =
e.target;
5546 if ( rformElems.test( elem.nodeName ) && !
jQuery._data( elem,
"changeBubbles" ) ) {
5547 jQuery.event.add( elem,
"change._change",
function( event ) {
5548 if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
5549 jQuery.event.simulate(
"change", this.parentNode, event, true );
5552 jQuery._data( elem,
"changeBubbles",
true );
5557 handle:
function( event ) {
5558 var elem =
event.target;
5561 if (
this !== elem || event.isSimulated || event.isTrigger || (elem.type !==
"radio" && elem.type !==
"checkbox") ) {
5562 return event.handleObj.handler.apply(
this, arguments );
5566 teardown:
function() {
5567 jQuery.event.remove(
this,
"._change" );
5569 return !rformElems.test( this.nodeName );
5575 if ( !
jQuery.support.focusinBubbles ) {
5576 jQuery.each({ focus:
"focusin", blur:
"focusout" },
function( orig, fix ) {
5580 handler =
function( event ) {
5581 jQuery.event.simulate( fix, event.target,
jQuery.event.fix( event ), true );
5584 jQuery.event.special[ fix ] = {
5586 if ( attaches++ === 0 ) {
5587 document.addEventListener( orig, handler,
true );
5590 teardown:
function() {
5591 if ( --attaches === 0 ) {
5592 document.removeEventListener( orig, handler,
true );
5601 on:
function( types, selector, data, fn, one ) {
5605 if ( typeof types ===
"object" ) {
5607 if ( typeof selector !==
"string" ) {
5609 data = data || selector;
5612 for ( type in types ) {
5613 this.on( type, selector, data, types[ type ], one );
5618 if ( data == null && fn == null ) {
5622 }
else if ( fn == null ) {
5623 if ( typeof selector ===
"string" ) {
5634 if ( fn ===
false ) {
5642 fn =
function( event ) {
5645 return origFn.apply(
this, arguments );
5648 fn.guid = origFn.guid || ( origFn.guid =
jQuery.guid++ );
5650 return this.
each(
function() {
5651 jQuery.event.add(
this, types, fn, data, selector );
5654 one:
function( types, selector, data, fn ) {
5655 return this.on( types, selector, data, fn, 1 );
5657 off:
function( types, selector, fn ) {
5658 var handleObj, type;
5659 if ( types && types.preventDefault && types.handleObj ) {
5661 handleObj = types.handleObj;
5662 jQuery( types.delegateTarget ).off(
5663 handleObj.namespace ? handleObj.origType +
"." + handleObj.namespace : handleObj.origType,
5669 if ( typeof types ===
"object" ) {
5671 for ( type in types ) {
5672 this.off( type, selector, types[ type ] );
5676 if ( selector ===
false || typeof selector ===
"function" ) {
5681 if ( fn ===
false ) {
5684 return this.
each(
function() {
5685 jQuery.event.remove(
this, types, fn, selector );
5689 trigger:
function( type, data ) {
5690 return this.
each(
function() {
5691 jQuery.event.trigger( type, data,
this );
5694 triggerHandler:
function( type, data ) {
5697 return jQuery.event.trigger( type, data, elem,
true );
5701 var isSimple = /^.[^:#\[\.,]*$/,
5702 rparentsprev = /^(?:parents|prev(?:Until|All))/,
5703 rneedsContext =
jQuery.expr.match.needsContext,
5705 guaranteedUnique = {
5713 find:
function( selector ) {
5719 if ( typeof selector !==
"string" ) {
5720 return this.pushStack(
jQuery( selector ).filter(
function() {
5721 for ( i = 0; i < len; i++ ) {
5722 if (
jQuery.contains(
self[ i ],
this ) ) {
5729 for ( i = 0; i < len; i++ ) {
5730 jQuery.find( selector,
self[ i ], ret );
5734 ret = this.pushStack( len > 1 ?
jQuery.unique( ret ) : ret );
5735 ret.selector = this.selector ? this.selector +
" " + selector : selector;
5739 has:
function( target ) {
5741 targets =
jQuery( target,
this ),
5742 len = targets.length;
5744 return this.filter(
function() {
5745 for ( i = 0; i < len; i++ ) {
5746 if (
jQuery.contains(
this, targets[i] ) ) {
5753 not:
function( selector ) {
5754 return this.pushStack( winnow(
this, selector || [],
true) );
5757 filter:
function( selector ) {
5758 return this.pushStack( winnow(
this, selector || [],
false) );
5761 is:
function( selector ) {
5767 typeof selector ===
"string" && rneedsContext.test( selector ) ?
5774 closest:
function( selectors, context ) {
5779 pos = rneedsContext.test( selectors ) || typeof selectors !==
"string" ?
5780 jQuery( selectors, context || this.context ) :
5783 for ( ; i < l; i++ ) {
5784 for ( cur =
this[i]; cur && cur !== context; cur = cur.parentNode ) {
5786 if ( cur.nodeType < 11 && (pos ?
5787 pos.index(cur) > -1 :
5790 cur.nodeType === 1 &&
5791 jQuery.find.matchesSelector(cur, selectors)) ) {
5793 cur = ret.push( cur );
5799 return this.pushStack( ret.length > 1 ?
jQuery.unique( ret ) : ret );
5804 index:
function( elem ) {
5808 return (
this[0] &&
this[0].parentNode ) ? this.first().prevAll().length : -1;
5812 if ( typeof elem ===
"string" ) {
5819 elem.jquery ? elem[0] : elem,
this );
5822 add:
function( selector, context ) {
5823 var
set = typeof selector ===
"string" ?
5824 jQuery( selector, context ) :
5825 jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
5826 all =
jQuery.merge( this.
get(),
set );
5828 return this.pushStack(
jQuery.unique(all) );
5831 addBack:
function( selector ) {
5832 return this.add( selector == null ?
5833 this.prevObject : this.prevObject.filter(selector)
5838 function sibling( cur, dir ) {
5841 }
while ( cur && cur.nodeType !== 1 );
5847 parent:
function( elem ) {
5848 var parent = elem.parentNode;
5849 return parent && parent.nodeType !== 11 ? parent : null;
5851 parents:
function( elem ) {
5852 return jQuery.dir( elem,
"parentNode" );
5854 parentsUntil:
function( elem, i, until ) {
5855 return jQuery.dir( elem,
"parentNode", until );
5857 next:
function( elem ) {
5858 return sibling( elem,
"nextSibling" );
5860 prev:
function( elem ) {
5861 return sibling( elem,
"previousSibling" );
5863 nextAll:
function( elem ) {
5864 return jQuery.dir( elem,
"nextSibling" );
5866 prevAll:
function( elem ) {
5867 return jQuery.dir( elem,
"previousSibling" );
5869 nextUntil:
function( elem, i, until ) {
5870 return jQuery.dir( elem,
"nextSibling", until );
5872 prevUntil:
function( elem, i, until ) {
5873 return jQuery.dir( elem,
"previousSibling", until );
5875 siblings:
function( elem ) {
5876 return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
5878 children:
function( elem ) {
5879 return jQuery.sibling( elem.firstChild );
5881 contents:
function( elem ) {
5882 return jQuery.nodeName( elem,
"iframe" ) ?
5883 elem.contentDocument || elem.contentWindow.document :
5884 jQuery.merge( [], elem.childNodes );
5886 },
function(
name, fn ) {
5887 jQuery.fn[
name ] =
function( until, selector ) {
5888 var ret =
jQuery.map(
this, fn, until );
5890 if (
name.slice( -5 ) !==
"Until" ) {
5894 if ( selector && typeof selector ===
"string" ) {
5895 ret =
jQuery.filter( selector, ret );
5898 if ( this.length > 1 ) {
5900 if ( !guaranteedUnique[
name ] ) {
5901 ret =
jQuery.unique( ret );
5905 if ( rparentsprev.test( name ) ) {
5906 ret = ret.reverse();
5910 return this.pushStack( ret );
5915 filter:
function( expr, elems, not ) {
5916 var elem = elems[ 0 ];
5919 expr =
":not(" + expr +
")";
5922 return elems.length === 1 && elem.nodeType === 1 ?
5923 jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
5924 jQuery.find.matches( expr,
jQuery.grep( elems,
function( elem ) {
5925 return elem.nodeType === 1;
5929 dir:
function( elem, dir, until ) {
5933 while ( cur && cur.nodeType !== 9 && (until ===
undefined || cur.nodeType !== 1 || !
jQuery( cur ).is( until )) ) {
5934 if ( cur.nodeType === 1 ) {
5935 matched.push( cur );
5942 sibling:
function( n, elem ) {
5945 for ( ; n; n = n.nextSibling ) {
5946 if ( n.nodeType === 1 && n !== elem ) {
5956 function winnow( elements, qualifier, not ) {
5957 if (
jQuery.isFunction( qualifier ) ) {
5958 return jQuery.grep( elements,
function( elem, i ) {
5960 return !!qualifier.call( elem, i, elem ) !== not;
5965 if ( qualifier.nodeType ) {
5966 return jQuery.grep( elements,
function( elem ) {
5967 return ( elem === qualifier ) !== not;
5972 if ( typeof qualifier ===
"string" ) {
5973 if ( isSimple.test( qualifier ) ) {
5974 return jQuery.filter( qualifier, elements, not );
5977 qualifier =
jQuery.filter( qualifier, elements );
5980 return jQuery.grep( elements,
function( elem ) {
5981 return (
jQuery.inArray( elem, qualifier ) >= 0 ) !== not;
5984 function createSafeFragment( document ) {
5985 var list = nodeNames.split(
"|" ),
5986 safeFrag = document.createDocumentFragment();
5988 if ( safeFrag.createElement ) {
5989 while ( list.length ) {
5990 safeFrag.createElement(
5998 var nodeNames =
"abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
5999 "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
6000 rinlinejQuery = /
jQuery\d+=
"(?:null|\d+)"/
g,
6001 rnoshimcache =
new RegExp(
"<(?:" + nodeNames +
")[\\s/>]",
"i"),
6002 rleadingWhitespace = /^
\s+/,
6003 rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|
param)(([\
w:]+)[^>]*)\/>/gi,
6004 rtagName = /<([\
w:]+)/,
6006 rhtml = /<|&#?
\w+;/,
6007 rnoInnerhtml = /<(?:script|style|link)/i,
6008 manipulation_rcheckableType = /^(?:checkbox|radio)$/i,
6011 rscriptType = /^$|\/(?:java|ecma)script/i,
6012 rscriptTypeMasked = /^
true\/(.*)/,
6013 rcleanScript = /^
\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>
\s*$/
g,
6017 option: [ 1,
"<select multiple='multiple'>",
"</select>" ],
6018 legend: [ 1,
"<fieldset>",
"</fieldset>" ],
6019 area: [ 1,
"<map>",
"</map>" ],
6020 param: [ 1,
"<object>",
"</object>" ],
6021 thead: [ 1,
"<table>",
"</table>" ],
6022 tr: [ 2,
"<table><tbody>",
"</tbody></table>" ],
6023 col: [ 2,
"<table><tbody></tbody><colgroup>",
"</colgroup></table>" ],
6024 td: [ 3,
"<table><tbody><tr>",
"</tr></tbody></table>" ],
6028 _default:
jQuery.support.htmlSerialize ? [ 0,
"",
"" ] : [ 1,
"X<div>",
"</div>" ]
6030 safeFragment = createSafeFragment( document ),
6031 fragmentDiv = safeFragment.appendChild( document.createElement(
"div") );
6033 wrapMap.optgroup = wrapMap.option;
6034 wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
6035 wrapMap.th = wrapMap.td;
6038 text:
function( value ) {
6039 return jQuery.access(
this,
function( value ) {
6042 this.empty().append( (
this[0] &&
this[0].ownerDocument || document ).createTextNode( value ) );
6043 }, null, value, arguments.length );
6046 append:
function() {
6047 return this.domManip( arguments,
function( elem ) {
6048 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
6049 var target = manipulationTarget(
this, elem );
6050 target.appendChild( elem );
6055 prepend:
function() {
6056 return this.domManip( arguments,
function( elem ) {
6057 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
6058 var target = manipulationTarget(
this, elem );
6059 target.insertBefore( elem, target.firstChild );
6064 before:
function() {
6065 return this.domManip( arguments,
function( elem ) {
6066 if ( this.parentNode ) {
6067 this.parentNode.insertBefore( elem,
this );
6073 return this.domManip( arguments,
function( elem ) {
6074 if ( this.parentNode ) {
6075 this.parentNode.insertBefore( elem, this.nextSibling );
6081 remove:
function( selector, keepData ) {
6083 elems = selector ?
jQuery.filter( selector,
this ) :
this,
6086 for ( ; (elem = elems[i]) != null; i++ ) {
6088 if ( !keepData && elem.nodeType === 1 ) {
6089 jQuery.cleanData( getAll( elem ) );
6092 if ( elem.parentNode ) {
6093 if ( keepData &&
jQuery.contains( elem.ownerDocument, elem ) ) {
6094 setGlobalEval( getAll( elem,
"script" ) );
6096 elem.parentNode.removeChild( elem );
6107 for ( ; (elem =
this[i]) != null; i++ ) {
6109 if ( elem.nodeType === 1 ) {
6110 jQuery.cleanData( getAll( elem,
false ) );
6114 while ( elem.firstChild ) {
6115 elem.removeChild( elem.firstChild );
6120 if ( elem.options &&
jQuery.nodeName( elem,
"select" ) ) {
6121 elem.options.length = 0;
6128 clone:
function( dataAndEvents, deepDataAndEvents ) {
6129 dataAndEvents = dataAndEvents == null ?
false : dataAndEvents;
6130 deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
6132 return this.map(
function () {
6133 return jQuery.clone(
this, dataAndEvents, deepDataAndEvents );
6137 html:
function( value ) {
6138 return jQuery.access(
this,
function( value ) {
6139 var elem =
this[0] || {},
6144 return elem.nodeType === 1 ?
6145 elem.innerHTML.replace( rinlinejQuery,
"" ) :
6150 if ( typeof value ===
"string" && !rnoInnerhtml.test( value ) &&
6151 (
jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) &&
6152 (
jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
6153 !wrapMap[ ( rtagName.exec( value ) || [
"",
""] )[1].toLowerCase() ] ) {
6155 value = value.replace( rxhtmlTag,
"<$1></$2>" );
6158 for (; i < l; i++ ) {
6160 elem =
this[i] || {};
6161 if ( elem.nodeType === 1 ) {
6162 jQuery.cleanData( getAll( elem,
false ) );
6163 elem.innerHTML = value;
6174 this.empty().append( value );
6176 }, null, value, arguments.length );
6179 replaceWith:
function() {
6182 args =
jQuery.map(
this,
function( elem ) {
6183 return [ elem.nextSibling, elem.parentNode ];
6188 this.domManip( arguments,
function( elem ) {
6189 var next = args[ i++ ],
6190 parent = args[ i++ ];
6194 if ( next && next.parentNode !== parent ) {
6195 next = this.nextSibling;
6198 parent.insertBefore( elem, next );
6204 return i ?
this : this.
remove();
6207 detach:
function( selector ) {
6208 return this.
remove( selector, true );
6211 domManip:
function( args, callback, allowIntersection ) {
6214 args = core_concat.apply( [], args );
6216 var first, node, hasScripts,
6217 scripts, doc, fragment,
6223 isFunction =
jQuery.isFunction( value );
6226 if ( isFunction || !( l <= 1 || typeof value !==
"string" ||
jQuery.support.checkClone || !rchecked.test( value ) ) ) {
6227 return this.
each(
function( index ) {
6228 var
self =
set.eq( index );
6230 args[0] = value.call(
this, index,
self.html() );
6232 self.domManip( args, callback, allowIntersection );
6237 fragment =
jQuery.buildFragment( args,
this[ 0 ].ownerDocument,
false, !allowIntersection &&
this );
6238 first = fragment.firstChild;
6240 if ( fragment.childNodes.length === 1 ) {
6245 scripts =
jQuery.map( getAll( fragment,
"script" ), disableScript );
6246 hasScripts = scripts.length;
6250 for ( ; i < l; i++ ) {
6253 if ( i !== iNoClone ) {
6254 node =
jQuery.clone( node,
true,
true );
6258 jQuery.merge( scripts, getAll( node,
"script" ) );
6262 callback.call(
this[i], node, i );
6266 doc = scripts[ scripts.length - 1 ].ownerDocument;
6269 jQuery.map( scripts, restoreScript );
6272 for ( i = 0; i < hasScripts; i++ ) {
6273 node = scripts[ i ];
6274 if ( rscriptType.test( node.type ||
"" ) &&
6275 !
jQuery._data( node,
"globalEval" ) &&
jQuery.contains( doc, node ) ) {
6279 jQuery._evalUrl( node.src );
6281 jQuery.globalEval( ( node.text || node.textContent || node.innerHTML ||
"" ).replace( rcleanScript,
"" ) );
6288 fragment = first = null;
6298 function manipulationTarget( elem, content ) {
6299 return jQuery.nodeName( elem,
"table" ) &&
6300 jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild,
"tr" ) ?
6302 elem.getElementsByTagName(
"tbody")[0] ||
6303 elem.appendChild( elem.ownerDocument.createElement(
"tbody") ) :
6308 function disableScript( elem ) {
6309 elem.type = (
jQuery.find.attr( elem,
"type" ) !== null) +
"/" + elem.type;
6312 function restoreScript( elem ) {
6313 var match = rscriptTypeMasked.exec( elem.type );
6315 elem.type = match[1];
6317 elem.removeAttribute(
"type");
6323 function setGlobalEval( elems, refElements ) {
6326 for ( ; (elem = elems[i]) != null; i++ ) {
6327 jQuery._data( elem,
"globalEval", !refElements ||
jQuery._data( refElements[i],
"globalEval" ) );
6331 function cloneCopyEvent( src, dest ) {
6333 if ( dest.nodeType !== 1 || !
jQuery.hasData( src ) ) {
6338 oldData =
jQuery._data( src ),
6339 curData =
jQuery._data( dest, oldData ),
6340 events = oldData.events;
6343 delete curData.handle;
6344 curData.events = {};
6346 for ( type in events ) {
6347 for ( i = 0, l = events[ type ].length; i < l; i++ ) {
6348 jQuery.event.add( dest, type, events[ type ][ i ] );
6354 if ( curData.data ) {
6355 curData.data =
jQuery.extend( {}, curData.data );
6359 function fixCloneNodeIssues( src, dest ) {
6360 var nodeName,
e, data;
6363 if ( dest.nodeType !== 1 ) {
6367 nodeName = dest.nodeName.toLowerCase();
6370 if ( !
jQuery.support.noCloneEvent && dest[
jQuery.expando ] ) {
6371 data =
jQuery._data( dest );
6373 for ( e in data.events ) {
6374 jQuery.removeEvent( dest, e, data.handle );
6378 dest.removeAttribute(
jQuery.expando );
6382 if ( nodeName ===
"script" && dest.text !== src.text ) {
6383 disableScript( dest ).text = src.text;
6384 restoreScript( dest );
6388 }
else if ( nodeName ===
"object" ) {
6389 if ( dest.parentNode ) {
6390 dest.outerHTML = src.outerHTML;
6397 if (
jQuery.support.html5Clone && ( src.innerHTML && !
jQuery.trim(dest.innerHTML) ) ) {
6398 dest.innerHTML = src.innerHTML;
6401 }
else if ( nodeName ===
"input" && manipulation_rcheckableType.test( src.type ) ) {
6406 dest.defaultChecked = dest.checked = src.checked;
6410 if ( dest.value !== src.value ) {
6411 dest.value = src.value;
6416 }
else if ( nodeName ===
"option" ) {
6417 dest.defaultSelected = dest.selected = src.defaultSelected;
6421 }
else if ( nodeName ===
"input" || nodeName ===
"textarea" ) {
6422 dest.defaultValue = src.defaultValue;
6428 prependTo:
"prepend",
6429 insertBefore:
"before",
6430 insertAfter:
"after",
6431 replaceAll:
"replaceWith" 6432 },
function(
name, original ) {
6437 insert =
jQuery( selector ),
6438 last = insert.length - 1;
6440 for ( ; i <= last; i++ ) {
6441 elems = i === last ?
this : this.clone(
true);
6442 jQuery( insert[i] )[ original ]( elems );
6445 core_push.apply( ret, elems.get() );
6448 return this.pushStack( ret );
6452 function getAll( context, tag ) {
6455 found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag ||
"*" ) :
6456 typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag ||
"*" ) :
6460 for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {
6461 if ( !tag ||
jQuery.nodeName( elem, tag ) ) {
6464 jQuery.merge( found, getAll( elem, tag ) );
6470 jQuery.merge( [ context ], found ) :
6475 function fixDefaultChecked( elem ) {
6476 if ( manipulation_rcheckableType.test( elem.type ) ) {
6477 elem.defaultChecked = elem.checked;
6482 clone:
function( elem, dataAndEvents, deepDataAndEvents ) {
6483 var destElements, node, clone, i, srcElements,
6484 inPage =
jQuery.contains( elem.ownerDocument, elem );
6486 if (
jQuery.support.html5Clone ||
jQuery.isXMLDoc(elem) || !rnoshimcache.test(
"<" + elem.nodeName +
">" ) ) {
6487 clone = elem.cloneNode(
true );
6491 fragmentDiv.innerHTML = elem.outerHTML;
6492 fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
6495 if ( (!
jQuery.support.noCloneEvent || !
jQuery.support.noCloneChecked) &&
6496 (elem.nodeType === 1 || elem.nodeType === 11) && !
jQuery.isXMLDoc(elem) ) {
6499 destElements = getAll( clone );
6500 srcElements = getAll( elem );
6503 for ( i = 0; (node = srcElements[i]) != null; ++i ) {
6505 if ( destElements[i] ) {
6506 fixCloneNodeIssues( node, destElements[i] );
6512 if ( dataAndEvents ) {
6513 if ( deepDataAndEvents ) {
6514 srcElements = srcElements || getAll( elem );
6515 destElements = destElements || getAll( clone );
6517 for ( i = 0; (node = srcElements[i]) != null; i++ ) {
6518 cloneCopyEvent( node, destElements[i] );
6521 cloneCopyEvent( elem, clone );
6526 destElements = getAll( clone,
"script" );
6527 if ( destElements.length > 0 ) {
6528 setGlobalEval( destElements, !inPage && getAll( elem,
"script" ) );
6531 destElements = srcElements = node = null;
6537 buildFragment:
function( elems, context, scripts, selection ) {
6538 var j, elem, contains,
6539 tmp, tag, tbody, wrap,
6543 safe = createSafeFragment( context ),
6548 for ( ; i < l; i++ ) {
6551 if ( elem || elem === 0 ) {
6554 if (
jQuery.type( elem ) ===
"object" ) {
6555 jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
6558 }
else if ( !rhtml.test( elem ) ) {
6559 nodes.push( context.createTextNode( elem ) );
6563 tmp = tmp || safe.appendChild( context.createElement(
"div") );
6566 tag = ( rtagName.exec( elem ) || [
"",
""] )[1].toLowerCase();
6567 wrap = wrapMap[ tag ] || wrapMap._default;
6569 tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag,
"<$1></$2>" ) + wrap[2];
6574 tmp = tmp.lastChild;
6578 if ( !
jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
6579 nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
6583 if ( !
jQuery.support.tbody ) {
6586 elem = tag ===
"table" && !rtbody.test( elem ) ?
6590 wrap[1] ===
"<table>" && !rtbody.test( elem ) ?
6594 j = elem && elem.childNodes.length;
6596 if (
jQuery.nodeName( (tbody = elem.childNodes[j]),
"tbody" ) && !tbody.childNodes.length ) {
6597 elem.removeChild( tbody );
6602 jQuery.merge( nodes, tmp.childNodes );
6605 tmp.textContent =
"";
6608 while ( tmp.firstChild ) {
6609 tmp.removeChild( tmp.firstChild );
6613 tmp = safe.lastChild;
6620 safe.removeChild( tmp );
6625 if ( !
jQuery.support.appendChecked ) {
6626 jQuery.grep( getAll( nodes,
"input" ), fixDefaultChecked );
6630 while ( (elem = nodes[ i++ ]) ) {
6634 if ( selection &&
jQuery.inArray( elem, selection ) !== -1 ) {
6638 contains =
jQuery.contains( elem.ownerDocument, elem );
6641 tmp = getAll( safe.appendChild( elem ),
"script" );
6645 setGlobalEval( tmp );
6651 while ( (elem = tmp[ j++ ]) ) {
6652 if ( rscriptType.test( elem.type ||
"" ) ) {
6653 scripts.push( elem );
6664 cleanData:
function( elems, acceptData ) {
6665 var elem, type, id, data,
6667 internalKey =
jQuery.expando,
6669 deleteExpando =
jQuery.support.deleteExpando,
6670 special =
jQuery.event.special;
6672 for ( ; (elem = elems[i]) != null; i++ ) {
6674 if ( acceptData ||
jQuery.acceptData( elem ) ) {
6676 id = elem[ internalKey ];
6677 data =
id && cache[ id ];
6680 if ( data.events ) {
6681 for ( type in data.events ) {
6682 if ( special[ type ] ) {
6683 jQuery.event.remove( elem, type );
6687 jQuery.removeEvent( elem, type, data.handle );
6693 if ( cache[
id ] ) {
6700 if ( deleteExpando ) {
6701 delete elem[ internalKey ];
6703 }
else if ( typeof elem.removeAttribute !== core_strundefined ) {
6704 elem.removeAttribute( internalKey );
6707 elem[ internalKey ] = null;
6710 core_deletedIds.push(
id );
6717 _evalUrl:
function( url ) {
6729 wrapAll:
function( html ) {
6730 if (
jQuery.isFunction( html ) ) {
6731 return this.
each(
function(i) {
6732 jQuery(
this).wrapAll( html.call(
this, i) );
6738 var wrap =
jQuery( html,
this[0].ownerDocument ).eq(0).clone(
true);
6740 if (
this[0].parentNode ) {
6741 wrap.insertBefore(
this[0] );
6744 wrap.map(
function() {
6747 while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
6748 elem = elem.firstChild;
6758 wrapInner:
function( html ) {
6759 if (
jQuery.isFunction( html ) ) {
6760 return this.
each(
function(i) {
6761 jQuery(
this).wrapInner( html.call(
this, i) );
6765 return this.
each(
function() {
6766 var
self =
jQuery(
this ),
6767 contents =
self.contents();
6769 if ( contents.length ) {
6770 contents.wrapAll( html );
6773 self.append( html );
6778 wrap:
function( html ) {
6779 var isFunction =
jQuery.isFunction( html );
6781 return this.
each(
function(i) {
6782 jQuery(
this ).wrapAll( isFunction ? html.call(
this, i) : html );
6786 unwrap:
function() {
6787 return this.parent().each(
function() {
6788 if ( !
jQuery.nodeName(
this,
"body" ) ) {
6789 jQuery(
this ).replaceWith( this.childNodes );
6794 var iframe, getStyles, curCSS,
6795 ralpha = /alpha\([^)]*\)/i,
6797 rposition = /^(top|right|bottom|left)$/,
6800 rdisplayswap = /^(none|table(?!-c[ea]).+)/,
6801 rmargin = /^margin/,
6802 rnumsplit =
new RegExp(
"^(" + core_pnum +
")(.*)$",
"i" ),
6803 rnumnonpx =
new RegExp(
"^(" + core_pnum +
")(?!px)[a-z%]+$",
"i" ),
6804 rrelNum =
new RegExp(
"^([+-])=(" + core_pnum +
")",
"i" ),
6805 elemdisplay = { BODY:
"block" },
6807 cssShow = { position:
"absolute", visibility:
"hidden", display:
"block" },
6808 cssNormalTransform = {
6813 cssExpand = [
"Top",
"Right",
"Bottom",
"Left" ],
6820 if (
name in style ) {
6825 var capName =
name.charAt(0).toUpperCase() +
name.slice(1),
6831 if (
name in style ) {
6843 return jQuery.css( elem,
"display" ) ===
"none" || !
jQuery.contains( elem.ownerDocument, elem );
6847 var display, elem, hidden,
6850 length = elements.length;
6852 for ( ; index < length; index++ ) {
6853 elem = elements[ index ];
6854 if ( !elem.style ) {
6858 values[ index ] =
jQuery._data( elem,
"olddisplay" );
6859 display = elem.style.display;
6863 if ( !values[ index ] && display ===
"none" ) {
6864 elem.style.display =
"";
6870 if ( elem.style.display ===
"" &&
isHidden( elem ) ) {
6875 if ( !values[ index ] ) {
6878 if ( display && display !==
"none" || !hidden ) {
6879 jQuery._data( elem,
"olddisplay", hidden ? display :
jQuery.css( elem,
"display" ) );
6887 for ( index = 0; index < length; index++ ) {
6888 elem = elements[ index ];
6889 if ( !elem.style ) {
6892 if ( !show || elem.style.display ===
"none" || elem.style.display ===
"" ) {
6893 elem.style.display = show ? values[ index ] ||
"" :
"none";
6901 css:
function(
name, value ) {
6902 return jQuery.access(
this,
function( elem,
name, value ) {
6908 styles = getStyles( elem );
6911 for ( ; i < len; i++ ) {
6912 map[
name[ i ] ] =
jQuery.css( elem, name[ i ],
false, styles );
6921 },
name, value, arguments.length > 1 );
6929 toggle:
function( state ) {
6930 if ( typeof state ===
"boolean" ) {
6931 return state ? this.show() : this.hide();
6934 return this.
each(
function() {
6949 get:
function( elem, computed ) {
6952 var ret = curCSS( elem,
"opacity" );
6953 return ret ===
"" ?
"1" : ret;
6961 "columnCount":
true,
6962 "fillOpacity":
true,
6977 "float":
jQuery.support.cssFloat ?
"cssFloat" :
"styleFloat" 6981 style:
function( elem,
name, value, extra ) {
6983 if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
6988 var ret, type, hooks,
6989 origName =
jQuery.camelCase( name ),
7000 type = typeof value;
7003 if ( type ===
"string" && (ret = rrelNum.exec( value )) ) {
7004 value = ( ret[1] + 1 ) * ret[2] + parseFloat(
jQuery.css( elem, name ) );
7010 if ( value == null || type ===
"number" && isNaN( value ) ) {
7015 if ( type ===
"number" && !
jQuery.cssNumber[ origName ] ) {
7021 if ( !
jQuery.support.clearCloneStyle && value ===
"" && name.indexOf(
"background") === 0 ) {
7022 style[
name ] =
"inherit";
7026 if ( !hooks || !(
"set" in hooks) || (value = hooks.set( elem, value, extra )) !==
undefined ) {
7031 style[
name ] = value;
7037 if ( hooks &&
"get" in hooks && (ret = hooks.get( elem,
false, extra )) !==
undefined ) {
7042 return style[
name ];
7046 css:
function( elem,
name, extra, styles ) {
7047 var num, val, hooks,
7048 origName =
jQuery.camelCase( name );
7058 if ( hooks &&
"get" in hooks ) {
7059 val = hooks.get( elem,
true, extra );
7064 val = curCSS( elem, name, styles );
7068 if ( val ===
"normal" && name in cssNormalTransform ) {
7069 val = cssNormalTransform[
name ];
7073 if ( extra ===
"" || extra ) {
7074 num = parseFloat( val );
7075 return extra ===
true ||
jQuery.isNumeric( num ) ? num || 0 : val;
7084 getStyles =
function( elem ) {
7085 return window.getComputedStyle( elem, null );
7088 curCSS =
function( elem,
name, _computed ) {
7089 var
width, minWidth, maxWidth,
7090 computed = _computed || getStyles( elem ),
7093 ret = computed ? computed.getPropertyValue( name ) || computed[
name ] :
undefined,
7098 if ( ret ===
"" && !
jQuery.contains( elem.ownerDocument, elem ) ) {
7099 ret =
jQuery.style( elem, name );
7106 if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
7109 width = style.width;
7110 minWidth = style.minWidth;
7111 maxWidth = style.maxWidth;
7114 style.minWidth = style.maxWidth = style.width = ret;
7115 ret = computed.width;
7118 style.width =
width;
7119 style.minWidth = minWidth;
7120 style.maxWidth = maxWidth;
7126 }
else if ( document.documentElement.currentStyle ) {
7127 getStyles =
function( elem ) {
7128 return elem.currentStyle;
7131 curCSS =
function( elem,
name, _computed ) {
7132 var left, rs, rsLeft,
7133 computed = _computed || getStyles( elem ),
7139 if ( ret == null && style && style[ name ] ) {
7140 ret = style[
name ];
7150 if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
7154 rs = elem.runtimeStyle;
7155 rsLeft = rs && rs.left;
7159 rs.left = elem.currentStyle.left;
7161 style.left = name ===
"fontSize" ?
"1em" : ret;
7162 ret = style.pixelLeft +
"px";
7171 return ret ===
"" ?
"auto" : ret;
7176 var matches = rnumsplit.exec( value );
7179 Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] ||
"px" ) :
7184 var i = extra === ( isBorderBox ?
"border" :
"content" ) ?
7188 name ===
"width" ? 1 : 0,
7192 for ( ; i < 4; i += 2 ) {
7194 if ( extra ===
"margin" ) {
7195 val +=
jQuery.css( elem, extra + cssExpand[ i ],
true, styles );
7198 if ( isBorderBox ) {
7200 if ( extra ===
"content" ) {
7201 val -=
jQuery.css( elem,
"padding" + cssExpand[ i ],
true, styles );
7205 if ( extra !==
"margin" ) {
7206 val -=
jQuery.css( elem,
"border" + cssExpand[ i ] +
"Width",
true, styles );
7210 val +=
jQuery.css( elem,
"padding" + cssExpand[ i ],
true, styles );
7213 if ( extra !==
"padding" ) {
7214 val +=
jQuery.css( elem,
"border" + cssExpand[ i ] +
"Width",
true, styles );
7225 var valueIsBorderBox =
true,
7226 val =
name ===
"width" ? elem.offsetWidth : elem.offsetHeight,
7227 styles = getStyles( elem ),
7228 isBorderBox =
jQuery.support.boxSizing &&
jQuery.css( elem,
"boxSizing",
false, styles ) ===
"border-box";
7233 if ( val <= 0 || val == null ) {
7235 val = curCSS( elem,
name, styles );
7236 if ( val < 0 || val == null ) {
7237 val = elem.style[
name ];
7241 if ( rnumnonpx.test(val) ) {
7247 valueIsBorderBox = isBorderBox && (
jQuery.support.boxSizingReliable || val === elem.style[
name ] );
7250 val = parseFloat( val ) || 0;
7258 extra || ( isBorderBox ?
"border" :
"content" ),
7268 display = elemdisplay[ nodeName ];
7274 if ( display ===
"none" || !display ) {
7276 iframe = ( iframe ||
7277 jQuery(
"<iframe frameborder='0' width='0' height='0'/>")
7278 .css(
"cssText",
"display:block !important" )
7279 ).appendTo( doc.documentElement );
7282 doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;
7283 doc.write(
"<!doctype html><html><body>");
7291 elemdisplay[ nodeName ] = display;
7299 var elem =
jQuery( doc.createElement(
name ) ).appendTo( doc.body ),
7300 display =
jQuery.css( elem[0],
"display" );
7305 jQuery.each([
"height",
"width" ],
function( i,
name ) {
7307 get:
function( elem, computed, extra ) {
7311 return elem.offsetWidth === 0 && rdisplayswap.test(
jQuery.css( elem,
"display" ) ) ?
7312 jQuery.swap( elem, cssShow,
function() {
7313 return getWidthOrHeight( elem, name, extra );
7319 set:
function( elem, value, extra ) {
7320 var styles = extra && getStyles( elem );
7326 jQuery.support.boxSizing &&
jQuery.css( elem,
"boxSizing",
false, styles ) ===
"border-box",
7335 jQuery.cssHooks.opacity = {
7336 get:
function( elem, computed ) {
7338 return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) ||
"" ) ?
7339 ( 0.01 * parseFloat( RegExp.$1 ) ) +
"" :
7340 computed ?
"1" :
"";
7343 set:
function( elem, value ) {
7344 var style = elem.style,
7345 currentStyle = elem.currentStyle,
7346 opacity =
jQuery.isNumeric( value ) ?
"alpha(opacity=" + value * 100 +
")" :
"",
7347 filter = currentStyle && currentStyle.filter || style.filter ||
"";
7355 if ( ( value >= 1 || value ===
"" ) &&
7356 jQuery.trim( filter.replace( ralpha,
"" ) ) ===
"" &&
7357 style.removeAttribute ) {
7362 style.removeAttribute(
"filter" );
7365 if ( value ===
"" || currentStyle && !currentStyle.filter ) {
7371 style.filter = ralpha.test( filter ) ?
7372 filter.replace( ralpha, opacity ) :
7373 filter +
" " + opacity;
7381 if ( !
jQuery.support.reliableMarginRight ) {
7382 jQuery.cssHooks.marginRight = {
7383 get: function( elem, computed ) {
7387 return jQuery.swap( elem, {
"display":
"inline-block" },
7388 curCSS, [ elem,
"marginRight" ] );
7397 if ( !
jQuery.support.pixelPosition &&
jQuery.fn.position ) {
7398 jQuery.each( [
"top",
"left" ], function( i, prop ) {
7399 jQuery.cssHooks[ prop ] = {
7400 get: function( elem, computed ) {
7402 computed = curCSS( elem, prop );
7404 return rnumnonpx.test( computed ) ?
7405 jQuery( elem ).position()[ prop ] +
"px" :
7416 jQuery.expr.filters.hidden =
function( elem ) {
7419 return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||
7420 (!
jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) ||
jQuery.css( elem,
"display" )) ===
"none");
7423 jQuery.expr.filters.visible =
function( elem ) {
7424 return !
jQuery.expr.filters.hidden( elem );
7433 },
function( prefix, suffix ) {
7434 jQuery.cssHooks[ prefix + suffix ] = {
7435 expand:
function( value ) {
7440 parts = typeof value ===
"string" ? value.split(
" ") : [ value ];
7442 for ( ; i < 4; i++ ) {
7443 expanded[ prefix + cssExpand[ i ] + suffix ] =
7444 parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
7451 if ( !rmargin.test( prefix ) ) {
7462 serialize:
function() {
7463 return jQuery.param( this.serializeArray() );
7465 serializeArray:
function() {
7466 return this.map(
function(){
7468 var elements =
jQuery.prop(
this,
"elements" );
7469 return elements ?
jQuery.makeArray( elements ) :
this;
7472 var type = this.type;
7474 return this.
name && !
jQuery(
this ).is(
":disabled" ) &&
7476 ( this.checked || !manipulation_rcheckableType.test( type ) );
7478 .map(
function( i, elem ){
7479 var val =
jQuery(
this ).val();
7481 return val == null ?
7484 jQuery.map( val,
function( val ){
7485 return {
name: elem.name, value: val.replace(
rCRLF,
"\r\n" ) };
7487 {
name: elem.name, value: val.replace(
rCRLF,
"\r\n" ) };
7497 add =
function( key, value ) {
7499 value =
jQuery.isFunction( value ) ? value() : ( value == null ?
"" : value );
7500 s[ s.length ] = encodeURIComponent( key ) +
"=" + encodeURIComponent( value );
7505 traditional =
jQuery.ajaxSettings &&
jQuery.ajaxSettings.traditional;
7509 if (
jQuery.isArray( a ) || ( a.jquery && !
jQuery.isPlainObject( a ) ) ) {
7511 jQuery.each( a,
function() {
7512 add( this.
name, this.value );
7518 for ( prefix in a ) {
7519 buildParams( prefix, a[ prefix ], traditional, add );
7524 return s.join(
"&" ).replace( r20,
"+" );
7530 if (
jQuery.isArray( obj ) ) {
7532 jQuery.each( obj,
function( i,
v ) {
7533 if ( traditional ||
rbracket.test( prefix ) ) {
7539 buildParams( prefix +
"[" + ( typeof
v ===
"object" ? i :
"" ) +
"]",
v, traditional, add );
7543 }
else if ( !traditional &&
jQuery.type( obj ) ===
"object" ) {
7545 for ( name in obj ) {
7546 buildParams( prefix +
"[" + name +
"]", obj[ name ], traditional, add );
7554 jQuery.each( (
"blur focus focusin focusout load resize scroll unload click dblclick " +
7555 "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
7556 "change select submit keydown keypress keyup error contextmenu").split(
" "),
function( i,
name ) {
7560 return arguments.length > 0 ?
7561 this.on(
name, null, data, fn ) :
7562 this.trigger(
name );
7567 hover:
function( fnOver, fnOut ) {
7568 return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
7571 bind:
function( types, data, fn ) {
7572 return this.on( types, null, data, fn );
7574 unbind:
function( types, fn ) {
7575 return this.off( types, null, fn );
7578 delegate:
function( selector, types, data, fn ) {
7579 return this.on( types, selector, data, fn );
7581 undelegate:
function( selector, types, fn ) {
7583 return arguments.length === 1 ? this.off( selector,
"**" ) : this.off( types, selector ||
"**", fn );
7600 rurl = /^([\
w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\
d+)|)|)/,
7629 ajaxLocation = location.href;
7633 ajaxLocation = document.createElement(
"a" );
7634 ajaxLocation.href =
"";
7635 ajaxLocation = ajaxLocation.href;
7639 ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
7645 return function( dataTypeExpression, func ) {
7647 if ( typeof dataTypeExpression !==
"string" ) {
7648 func = dataTypeExpression;
7649 dataTypeExpression =
"*";
7654 dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];
7656 if (
jQuery.isFunction( func ) ) {
7658 while ( (dataType = dataTypes[i++]) ) {
7660 if ( dataType[0] ===
"+" ) {
7661 dataType = dataType.slice( 1 ) ||
"*";
7662 (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
7666 (structure[ dataType ] = structure[ dataType ] || []).push( func );
7677 seekingTransport = ( structure ===
transports );
7679 function inspect( dataType ) {
7681 inspected[ dataType ] =
true;
7682 jQuery.each( structure[ dataType ] || [],
function( _, prefilterOrFactory ) {
7683 var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
7684 if( typeof dataTypeOrTransport ===
"string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
7685 options.dataTypes.unshift( dataTypeOrTransport );
7686 inspect( dataTypeOrTransport );
7688 }
else if ( seekingTransport ) {
7689 return !( selected = dataTypeOrTransport );
7695 return inspect( options.dataTypes[ 0 ] ) || !inspected[
"*" ] && inspect(
"*" );
7703 flatOptions =
jQuery.ajaxSettings.flatOptions || {};
7705 for ( key in src ) {
7707 ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
7711 jQuery.extend(
true, target, deep );
7718 if ( typeof url !==
"string" &&
_load ) {
7719 return _load.apply(
this, arguments );
7722 var selector, response, type,
7724 off = url.indexOf(
" ");
7727 selector = url.slice( off, url.length );
7728 url = url.slice( 0, off );
7732 if (
jQuery.isFunction( params ) ) {
7739 }
else if ( params && typeof params ===
"object" ) {
7744 if (
self.length > 0 ) {
7752 }).done(
function( responseText ) {
7755 response = arguments;
7757 self.html( selector ?
7761 jQuery(
"<div>").append(
jQuery.parseHTML( responseText ) ).find( selector ) :
7766 }).complete( callback &&
function( jqXHR, status ) {
7767 self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
7775 jQuery.each( [
"ajaxStart",
"ajaxStop",
"ajaxComplete",
"ajaxError",
"ajaxSuccess",
"ajaxSend" ],
function( i, type ){
7776 jQuery.fn[ type ] =
function( fn ){
7777 return this.on( type, fn );
7797 contentType:
"application/x-www-form-urlencoded; charset=UTF-8",
7814 xml:
"application/xml, text/xml",
7815 json:
"application/json, text/javascript" 7826 text:
"responseText",
7827 json:
"responseJSON" 7841 "text json":
jQuery.parseJSON,
7844 "text xml":
jQuery.parseXML
7874 ajax:
function( url, options ) {
7877 if ( typeof url ===
"object" ) {
7883 options = options || {};
7892 responseHeadersString,
7903 s =
jQuery.ajaxSetup( {}, options ),
7905 callbackContext = s.context || s,
7907 globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
7908 jQuery( callbackContext ) :
7911 deferred =
jQuery.Deferred(),
7912 completeDeferred =
jQuery.Callbacks(
"once memory"),
7914 statusCode = s.statusCode || {},
7916 requestHeaders = {},
7917 requestHeadersNames = {},
7921 strAbort =
"canceled",
7927 getResponseHeader:
function( key ) {
7929 if ( state === 2 ) {
7930 if ( !responseHeaders ) {
7931 responseHeaders = {};
7932 while ( (match =
rheaders.exec( responseHeadersString )) ) {
7933 responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
7936 match = responseHeaders[ key.toLowerCase() ];
7938 return match == null ? null : match;
7942 getAllResponseHeaders:
function() {
7943 return state === 2 ? responseHeadersString : null;
7947 setRequestHeader:
function(
name, value ) {
7948 var lname =
name.toLowerCase();
7950 name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] ||
name;
7951 requestHeaders[
name ] = value;
7957 overrideMimeType:
function( type ) {
7965 statusCode:
function( map ) {
7969 for ( code in map ) {
7971 statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
7975 jqXHR.always( map[ jqXHR.status ] );
7982 abort:
function( statusText ) {
7983 var finalText = statusText || strAbort;
7985 transport.abort( finalText );
7987 done( 0, finalText );
7993 deferred.promise( jqXHR ).complete = completeDeferred.add;
7994 jqXHR.success = jqXHR.done;
7995 jqXHR.error = jqXHR.fail;
8004 s.type = options.method || options.type || s.method || s.type;
8007 s.dataTypes =
jQuery.trim( s.dataType ||
"*" ).toLowerCase().match( core_rnotwhite ) || [
""];
8010 if ( s.crossDomain == null ) {
8011 parts = rurl.exec( s.url.toLowerCase() );
8012 s.crossDomain = !!( parts &&
8014 ( parts[ 3 ] || ( parts[ 1 ] ===
"http:" ?
"80" :
"443" ) ) !==
8020 if ( s.data && s.processData && typeof s.data !==
"string" ) {
8021 s.data =
jQuery.param( s.data, s.traditional );
8028 if ( state === 2 ) {
8033 fireGlobals = s.global;
8036 if ( fireGlobals &&
jQuery.active++ === 0 ) {
8037 jQuery.event.trigger(
"ajaxStart");
8041 s.type = s.type.toUpperCase();
8051 if ( !s.hasContent ) {
8055 cacheURL = ( s.url += (
ajax_rquery.test( cacheURL ) ?
"&" :
"?" ) + s.data );
8061 if ( s.cache ===
false ) {
8062 s.url =
rts.test( cacheURL ) ?
8073 if ( s.ifModified ) {
8074 if (
jQuery.lastModified[ cacheURL ] ) {
8075 jqXHR.setRequestHeader(
"If-Modified-Since",
jQuery.lastModified[ cacheURL ] );
8077 if (
jQuery.etag[ cacheURL ] ) {
8078 jqXHR.setRequestHeader(
"If-None-Match",
jQuery.etag[ cacheURL ] );
8083 if ( s.data && s.hasContent && s.contentType !==
false || options.contentType ) {
8084 jqXHR.setRequestHeader(
"Content-Type", s.contentType );
8088 jqXHR.setRequestHeader(
8090 s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
8091 s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !==
"*" ?
", " +
allTypes +
"; q=0.01" :
"" ) :
8096 for ( i in s.headers ) {
8097 jqXHR.setRequestHeader( i, s.headers[ i ] );
8101 if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) ===
false || state === 2 ) ) {
8103 return jqXHR.abort();
8110 for ( i in {
success: 1, error: 1, complete: 1 } ) {
8111 jqXHR[ i ]( s[ i ] );
8119 done( -1,
"No Transport" );
8121 jqXHR.readyState = 1;
8124 if ( fireGlobals ) {
8125 globalEventContext.trigger(
"ajaxSend", [ jqXHR, s ] );
8128 if ( s.async && s.timeout > 0 ) {
8129 timeoutTimer = setTimeout(
function() {
8130 jqXHR.abort(
"timeout");
8136 transport.send( requestHeaders, done );
8149 function done( status, nativeStatusText, responses, headers ) {
8150 var isSuccess,
success, error, response, modified,
8151 statusText = nativeStatusText;
8154 if ( state === 2 ) {
8162 if ( timeoutTimer ) {
8163 clearTimeout( timeoutTimer );
8171 responseHeadersString = headers ||
"";
8174 jqXHR.readyState = status > 0 ? 4 : 0;
8177 isSuccess = status >= 200 && status < 300 || status === 304;
8185 response =
ajaxConvert( s, response, jqXHR, isSuccess );
8191 if ( s.ifModified ) {
8192 modified = jqXHR.getResponseHeader(
"Last-Modified");
8194 jQuery.lastModified[ cacheURL ] = modified;
8196 modified = jqXHR.getResponseHeader(
"etag");
8198 jQuery.etag[ cacheURL ] = modified;
8203 if ( status === 204 || s.type ===
"HEAD" ) {
8204 statusText =
"nocontent";
8207 }
else if ( status === 304 ) {
8208 statusText =
"notmodified";
8212 statusText = response.state;
8213 success = response.data;
8214 error = response.error;
8221 if ( status || !statusText ) {
8222 statusText =
"error";
8230 jqXHR.status = status;
8231 jqXHR.statusText = ( nativeStatusText || statusText ) +
"";
8235 deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
8237 deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
8241 jqXHR.statusCode( statusCode );
8244 if ( fireGlobals ) {
8245 globalEventContext.trigger( isSuccess ?
"ajaxSuccess" :
"ajaxError",
8246 [ jqXHR, s, isSuccess ? success : error ] );
8250 completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
8252 if ( fireGlobals ) {
8253 globalEventContext.trigger(
"ajaxComplete", [ jqXHR, s ] );
8255 if ( !( --
jQuery.active ) ) {
8256 jQuery.event.trigger(
"ajaxStop");
8264 getJSON:
function( url, data, callback ) {
8265 return jQuery.get( url, data, callback,
"json" );
8268 getScript:
function( url, callback ) {
8273 jQuery.each( [
"get",
"post" ],
function( i, method ) {
8274 jQuery[ method ] =
function( url, data, callback, type ) {
8276 if (
jQuery.isFunction( data ) ) {
8277 type = type || callback;
8297 var firstDataType, ct, finalDataType, type,
8298 contents =
s.contents,
8299 dataTypes =
s.dataTypes;
8302 while( dataTypes[ 0 ] ===
"*" ) {
8305 ct =
s.mimeType || jqXHR.getResponseHeader(
"Content-Type");
8311 for ( type in contents ) {
8312 if ( contents[ type ] && contents[ type ].test( ct ) ) {
8313 dataTypes.unshift( type );
8320 if ( dataTypes[ 0 ] in responses ) {
8321 finalDataType = dataTypes[ 0 ];
8324 for ( type in responses ) {
8325 if ( !dataTypes[ 0 ] ||
s.converters[ type +
" " + dataTypes[0] ] ) {
8326 finalDataType = type;
8329 if ( !firstDataType ) {
8330 firstDataType = type;
8334 finalDataType = finalDataType || firstDataType;
8340 if ( finalDataType ) {
8341 if ( finalDataType !== dataTypes[ 0 ] ) {
8342 dataTypes.unshift( finalDataType );
8344 return responses[ finalDataType ];
8352 var conv2, current, conv, tmp, prev,
8355 dataTypes =
s.dataTypes.slice();
8358 if ( dataTypes[ 1 ] ) {
8359 for ( conv in
s.converters ) {
8360 converters[ conv.toLowerCase() ] =
s.converters[ conv ];
8364 current = dataTypes.shift();
8369 if (
s.responseFields[ current ] ) {
8370 jqXHR[
s.responseFields[ current ] ] = response;
8374 if ( !prev && isSuccess &&
s.dataFilter ) {
8375 response =
s.dataFilter( response,
s.dataType );
8379 current = dataTypes.shift();
8384 if ( current ===
"*" ) {
8389 }
else if ( prev !==
"*" && prev !== current ) {
8392 conv = converters[ prev +
" " + current ] || converters[
"* " + current ];
8396 for ( conv2 in converters ) {
8399 tmp = conv2.split(
" " );
8400 if ( tmp[ 1 ] === current ) {
8403 conv = converters[ prev +
" " + tmp[ 0 ] ] ||
8404 converters[
"* " + tmp[ 0 ] ];
8407 if ( conv ===
true ) {
8408 conv = converters[ conv2 ];
8411 }
else if ( converters[ conv2 ] !==
true ) {
8413 dataTypes.unshift( tmp[ 1 ] );
8422 if ( conv !==
true ) {
8425 if ( conv &&
s[
"throws" ] ) {
8426 response = conv( response );
8429 response = conv( response );
8431 return { state:
"parsererror", error: conv ?
e :
"No conversion from " + prev +
" to " + current };
8439 return { state:
"success", data: response };
8444 script:
"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" 8447 script: /(?:java|ecma)script/
8450 "text script":
function( text ) {
8451 jQuery.globalEval( text );
8458 jQuery.ajaxPrefilter(
"script",
function(
s ) {
8462 if (
s.crossDomain ) {
8469 jQuery.ajaxTransport(
"script",
function(
s) {
8472 if (
s.crossDomain ) {
8475 head = document.head || jQuery(
"head")[0] || document.documentElement;
8479 send: function( _, callback ) {
8481 script = document.createElement(
"script");
8483 script.async = true;
8485 if ( s.scriptCharset ) {
8486 script.charset = s.scriptCharset;
8492 script.onload = script.onreadystatechange = function( _, isAbort ) {
8494 if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
8497 script.onload = script.onreadystatechange = null;
8500 if ( script.parentNode ) {
8501 script.parentNode.removeChild( script );
8509 callback( 200,
"success" );
8516 head.insertBefore( script, head.firstChild );
8521 script.onload( undefined, true );
8533 jsonpCallback:
function() {
8534 var callback = oldCallbacks.pop() || (
jQuery.expando +
"_" + (
ajax_nonce++ ) );
8535 this[ callback ] =
true;
8541 jQuery.ajaxPrefilter(
"json jsonp",
function(
s, originalSettings, jqXHR ) {
8543 var callbackName, overwritten, responseContainer,
8544 jsonProp =
s.jsonp !==
false && (
rjsonp.test(
s.url ) ?
8546 typeof
s.data ===
"string" && !(
s.contentType ||
"" ).indexOf(
"application/x-www-form-urlencoded") &&
rjsonp.test(
s.data ) &&
"data" 8550 if ( jsonProp ||
s.dataTypes[ 0 ] ===
"jsonp" ) {
8553 callbackName =
s.jsonpCallback =
jQuery.isFunction(
s.jsonpCallback ) ?
8559 s[ jsonProp ] =
s[ jsonProp ].replace(
rjsonp,
"$1" + callbackName );
8560 }
else if (
s.jsonp !==
false ) {
8561 s.url += (
ajax_rquery.test(
s.url ) ?
"&" :
"?" ) +
s.jsonp +
"=" + callbackName;
8565 s.converters[
"script json"] =
function() {
8566 if ( !responseContainer ) {
8567 jQuery.error( callbackName +
" was not called" );
8569 return responseContainer[ 0 ];
8573 s.dataTypes[ 0 ] =
"json";
8576 overwritten =
window[ callbackName ];
8577 window[ callbackName ] =
function() {
8578 responseContainer = arguments;
8582 jqXHR.always(
function() {
8584 window[ callbackName ] = overwritten;
8587 if (
s[ callbackName ] ) {
8589 s.jsonpCallback = originalSettings.jsonpCallback;
8592 oldCallbacks.push( callbackName );
8596 if ( responseContainer &&
jQuery.isFunction( overwritten ) ) {
8597 overwritten( responseContainer[ 0 ] );
8600 responseContainer = overwritten =
undefined;
8613 for ( key in xhrCallbacks ) {
8621 return new window.XMLHttpRequest();
8627 return new window.ActiveXObject(
"Microsoft.XMLHTTP");
8647 xhrSupported =
jQuery.ajaxSettings.xhr();
8652 if ( xhrSupported ) {
8654 jQuery.ajaxTransport(
function(
s ) {
8656 if ( !
s.crossDomain ||
jQuery.support.cors ) {
8661 send: function( headers, complete ) {
8670 xhr.open( s.type, s.url, s.async, s.username, s.password );
8672 xhr.open( s.type, s.url, s.async );
8676 if ( s.xhrFields ) {
8677 for ( i in s.xhrFields ) {
8678 xhr[ i ] = s.xhrFields[ i ];
8683 if ( s.mimeType && xhr.overrideMimeType ) {
8684 xhr.overrideMimeType( s.mimeType );
8692 if ( !s.crossDomain && !headers[
"X-Requested-With"] ) {
8693 headers[
"X-Requested-With"] =
"XMLHttpRequest";
8698 for ( i in headers ) {
8699 xhr.setRequestHeader( i, headers[ i ] );
8706 xhr.send( ( s.hasContent && s.data ) || null );
8709 callback = function( _, isAbort ) {
8710 var status, responseHeaders, statusText, responses;
8718 if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
8721 callback = undefined;
8725 xhr.onreadystatechange = jQuery.noop;
8726 if ( xhrOnUnloadAbort ) {
8727 delete xhrCallbacks[ handle ];
8734 if ( xhr.readyState !== 4 ) {
8739 status = xhr.status;
8740 responseHeaders = xhr.getAllResponseHeaders();
8744 if ( typeof xhr.responseText ===
"string" ) {
8745 responses.text = xhr.responseText;
8751 statusText = xhr.statusText;
8762 if ( !status && s.isLocal && !s.crossDomain ) {
8763 status = responses.text ? 200 : 404;
8765 } else if ( status === 1223 ) {
8770 } catch( firefoxAccessException ) {
8772 complete( -1, firefoxAccessException );
8778 complete( status, statusText, responses, responseHeaders );
8785 } else if ( xhr.readyState === 4 ) {
8788 setTimeout( callback );
8791 if ( xhrOnUnloadAbort ) {
8794 if ( !xhrCallbacks ) {
8796 jQuery( window ).unload( xhrOnUnloadAbort );
8799 xhrCallbacks[ handle ] = callback;
8801 xhr.onreadystatechange = callback;
8807 callback( undefined, true );
8816 rfxnum =
new RegExp(
"^(?:([+-])=|)(" + core_pnum +
")([a-z%]*)$",
"i" ),
8820 "*": [
function( prop, value ) {
8822 target = tween.cur(),
8823 parts =
rfxnum.exec( value ),
8824 unit = parts && parts[ 3 ] || (
jQuery.cssNumber[ prop ] ?
"" :
"px" ),
8827 start = (
jQuery.cssNumber[ prop ] || unit !==
"px" && +target ) &&
8834 unit = unit ||
start[ 3 ];
8837 parts = parts || [];
8840 start = +target || 1;
8845 scale = scale ||
".5";
8853 }
while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
8858 start = tween.start = +
start || +target || 0;
8861 tween.end = parts[ 1 ] ?
8862 start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
8872 setTimeout(
function() {
8875 return ( fxNow =
jQuery.now() );
8882 length = collection.length;
8883 for ( ; index < length; index++ ) {
8884 if ( (tween = collection[ index ].call(
animation, prop, value )) ) {
8897 deferred =
jQuery.Deferred().always(
function() {
8908 temp = remaining /
animation.duration || 0,
8913 for ( ; index < length ; index++ ) {
8914 animation.tweens[ index ].run( percent );
8917 deferred.notifyWith( elem, [
animation, percent, remaining ]);
8919 if ( percent < 1 && length ) {
8922 deferred.resolveWith( elem, [
animation ] );
8929 opts:
jQuery.extend(
true, { specialEasing: {} }, options ),
8930 originalProperties: properties,
8931 originalOptions: options,
8933 duration: options.duration,
8941 stop:
function( gotoEnd ) {
8945 length = gotoEnd ?
animation.tweens.length : 0;
8950 for ( ; index < length ; index++ ) {
8957 deferred.resolveWith( elem, [
animation, gotoEnd ] );
8959 deferred.rejectWith( elem, [
animation, gotoEnd ] );
8968 for ( ; index < length ; index++ ) {
8985 queue: animation.opts.queue
9000 for ( index in
props ) {
9001 name =
jQuery.camelCase( index );
9002 easing = specialEasing[
name ];
9003 value = props[ index ];
9004 if (
jQuery.isArray( value ) ) {
9005 easing = value[ 1 ];
9006 value = props[ index ] = value[ 0 ];
9009 if ( index !== name ) {
9010 props[
name ] = value;
9011 delete props[ index ];
9015 if ( hooks &&
"expand" in hooks ) {
9016 value = hooks.expand( value );
9017 delete props[
name ];
9021 for ( index in value ) {
9022 if ( !( index in props ) ) {
9023 props[ index ] = value[ index ];
9024 specialEasing[ index ] =
easing;
9035 tweener:
function(
props, callback ) {
9045 length =
props.length;
9047 for ( ; index < length ; index++ ) {
9048 prop =
props[ index ];
9050 tweeners[ prop ].unshift( callback );
9054 prefilter:
function( callback, prepend ) {
9065 var prop, value, toggle, tween, hooks, oldfire,
9069 hidden = elem.nodeType &&
isHidden( elem ),
9070 dataShow =
jQuery._data( elem,
"fxshow" );
9073 if ( !opts.queue ) {
9074 hooks =
jQuery._queueHooks( elem,
"fx" );
9075 if ( hooks.unqueued == null ) {
9077 oldfire = hooks.empty.fire;
9078 hooks.empty.fire =
function() {
9079 if ( !hooks.unqueued ) {
9086 anim.always(
function() {
9089 anim.always(
function() {
9091 if ( !
jQuery.queue( elem,
"fx" ).length ) {
9099 if ( elem.nodeType === 1 && (
"height" in
props ||
"width" in
props ) ) {
9104 opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
9108 if (
jQuery.css( elem,
"display" ) ===
"inline" &&
9109 jQuery.css( elem,
"float" ) ===
"none" ) {
9114 style.display =
"inline-block";
9122 if ( opts.overflow ) {
9123 style.overflow =
"hidden";
9124 if ( !
jQuery.support.shrinkWrapBlocks ) {
9125 anim.always(
function() {
9126 style.overflow = opts.overflow[ 0 ];
9127 style.overflowX = opts.overflow[ 1 ];
9128 style.overflowY = opts.overflow[ 2 ];
9135 for ( prop in props ) {
9136 value = props[ prop ];
9138 delete props[ prop ];
9139 toggle = toggle || value ===
"toggle";
9140 if ( value === ( hidden ?
"hide" :
"show" ) ) {
9143 orig[ prop ] = dataShow && dataShow[ prop ] ||
jQuery.style( elem, prop );
9147 if ( !
jQuery.isEmptyObject( orig ) ) {
9149 if (
"hidden" in dataShow ) {
9150 hidden = dataShow.hidden;
9153 dataShow =
jQuery._data( elem,
"fxshow", {} );
9158 dataShow.hidden = !hidden;
9163 anim.done(
function() {
9167 anim.done(
function() {
9169 jQuery._removeData( elem,
"fxshow" );
9170 for ( prop in orig ) {
9171 jQuery.style( elem, prop, orig[ prop ] );
9174 for ( prop in orig ) {
9175 tween =
createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
9177 if ( !( prop in dataShow ) ) {
9178 dataShow[ prop ] = tween.start;
9180 tween.end = tween.start;
9181 tween.start = prop ===
"width" || prop ===
"height" ? 1 : 0;
9189 return new Tween.prototype.init( elem, options, prop, end,
easing );
9195 init:
function( elem, options, prop, end,
easing, unit ) {
9198 this.easing = easing ||
"swing";
9199 this.options = options;
9200 this.
start = this.now = this.cur();
9202 this.unit = unit || (
jQuery.cssNumber[ prop ] ?
"" :
"px" );
9205 var hooks =
Tween.propHooks[ this.prop ];
9207 return hooks && hooks.get ?
9209 Tween.propHooks._default.get(
this );
9211 run:
function( percent ) {
9213 hooks =
Tween.propHooks[ this.prop ];
9215 if ( this.options.duration ) {
9217 percent, this.options.duration * percent, 0, 1, this.options.duration
9220 this.pos = eased = percent;
9222 this.now = ( this.end - this.
start ) * eased + this.
start;
9224 if ( this.options.step ) {
9225 this.options.step.call( this.elem, this.now,
this );
9228 if ( hooks && hooks.set ) {
9231 Tween.propHooks._default.set(
this );
9237 Tween.prototype.init.prototype =
Tween.prototype;
9241 get:
function( tween ) {
9244 if ( tween.elem[ tween.prop ] != null &&
9245 (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
9246 return tween.elem[ tween.prop ];
9253 result =
jQuery.css( tween.elem, tween.prop,
"" );
9255 return !result || result ===
"auto" ? 0 : result;
9257 set:
function( tween ) {
9260 if (
jQuery.fx.step[ tween.prop ] ) {
9261 jQuery.fx.step[ tween.prop ]( tween );
9262 }
else if ( tween.elem.style && ( tween.elem.style[
jQuery.cssProps[ tween.prop ] ] != null ||
jQuery.cssHooks[ tween.prop ] ) ) {
9263 jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
9265 tween.elem[ tween.prop ] = tween.now;
9275 set:
function( tween ) {
9276 if ( tween.elem.nodeType && tween.elem.parentNode ) {
9277 tween.elem[ tween.prop ] = tween.now;
9282 jQuery.each([
"toggle",
"show",
"hide" ],
function( i,
name ) {
9285 return speed == null || typeof
speed ===
"boolean" ?
9286 cssFn.apply(
this, arguments ) :
9287 this.animate(
genFx(
name,
true ), speed, easing, callback );
9295 return this.filter(
isHidden ).css(
"opacity", 0 ).show()
9298 .end().animate({ opacity: to },
speed,
easing, callback );
9300 animate:
function( prop,
speed,
easing, callback ) {
9301 var empty =
jQuery.isEmptyObject( prop ),
9302 optall =
jQuery.speed( speed, easing, callback ),
9303 doAnimation =
function() {
9308 if ( empty ||
jQuery._data(
this,
"finish" ) ) {
9312 doAnimation.finish = doAnimation;
9314 return empty || optall.queue ===
false ?
9315 this.
each( doAnimation ) :
9316 this.queue( optall.queue, doAnimation );
9318 stop:
function( type, clearQueue, gotoEnd ) {
9319 var stopQueue =
function( hooks ) {
9320 var
stop = hooks.stop;
9325 if ( typeof type !==
"string" ) {
9326 gotoEnd = clearQueue;
9330 if ( clearQueue && type !==
false ) {
9331 this.queue( type ||
"fx", [] );
9334 return this.
each(
function() {
9336 index = type != null && type +
"queueHooks",
9338 data =
jQuery._data(
this );
9341 if ( data[ index ] && data[ index ].
stop ) {
9342 stopQueue( data[ index ] );
9345 for ( index in data ) {
9346 if ( data[ index ] && data[ index ].
stop &&
rrun.test( index ) ) {
9347 stopQueue( data[ index ] );
9352 for ( index = timers.length; index--; ) {
9353 if ( timers[ index ].elem ===
this && (type == null || timers[ index ].queue === type) ) {
9354 timers[ index ].anim.stop( gotoEnd );
9356 timers.splice( index, 1 );
9363 if ( dequeue || !gotoEnd ) {
9364 jQuery.dequeue(
this, type );
9368 finish:
function( type ) {
9369 if ( type !==
false ) {
9370 type = type ||
"fx";
9372 return this.
each(
function() {
9374 data =
jQuery._data(
this ),
9375 queue = data[ type +
"queue" ],
9376 hooks = data[ type +
"queueHooks" ],
9378 length = queue ? queue.length : 0;
9384 jQuery.queue(
this, type, [] );
9386 if ( hooks && hooks.stop ) {
9387 hooks.stop.call(
this,
true );
9391 for ( index = timers.length; index--; ) {
9392 if ( timers[ index ].elem ===
this && timers[ index ].queue === type ) {
9393 timers[ index ].anim.stop(
true );
9394 timers.splice( index, 1 );
9399 for ( index = 0; index < length; index++ ) {
9400 if ( queue[ index ] && queue[ index ].finish ) {
9401 queue[ index ].finish.call(
this );
9414 attrs = {
height: type },
9419 includeWidth = includeWidth? 1 : 0;
9420 for( ; i < 4 ; i += 2 - includeWidth ) {
9421 which = cssExpand[ i ];
9422 attrs[
"margin" + which ] = attrs[
"padding" + which ] = type;
9425 if ( includeWidth ) {
9426 attrs.opacity = attrs.width = type;
9434 slideDown:
genFx(
"show"),
9435 slideUp:
genFx(
"hide"),
9436 slideToggle:
genFx(
"toggle"),
9437 fadeIn: { opacity:
"show" },
9438 fadeOut: { opacity:
"hide" },
9439 fadeToggle: { opacity:
"toggle" }
9442 return this.animate(
props,
speed, easing, callback );
9448 complete: fn || !fn && easing ||
9451 easing: fn && easing || easing && !
jQuery.isFunction( easing ) && easing
9454 opt.duration =
jQuery.fx.off ? 0 : typeof opt.duration ===
"number" ? opt.duration :
9455 opt.duration in
jQuery.fx.speeds ?
jQuery.fx.speeds[ opt.duration ] :
jQuery.fx.speeds._default;
9458 if ( opt.queue == null || opt.queue ===
true ) {
9463 opt.old = opt.complete;
9465 opt.complete =
function() {
9466 if (
jQuery.isFunction( opt.old ) ) {
9467 opt.old.call(
this );
9471 jQuery.dequeue(
this, opt.queue );
9479 linear:
function( p ) {
9482 swing:
function( p ) {
9483 return 0.5 - Math.cos( p*Math.PI ) / 2;
9496 for ( ; i < timers.length; i++ ) {
9497 timer = timers[ i ];
9499 if ( !
timer() && timers[ i ] === timer ) {
9500 timers.splice( i--, 1 );
9504 if ( !timers.length ) {
9520 timerId = setInterval(
jQuery.fx.tick,
jQuery.fx.interval );
9525 clearInterval( timerId );
9540 jQuery.expr.filters.animated =
function( elem ) {
9542 return elem === fn.elem;
9547 if ( arguments.length ) {
9550 this.
each(
function( i ) {
9551 jQuery.offset.setOffset(
this, options, i );
9556 box = { top: 0, left: 0 },
9558 doc = elem && elem.ownerDocument;
9564 docElem = doc.documentElement;
9567 if ( !
jQuery.contains( docElem, elem ) ) {
9573 if ( typeof elem.getBoundingClientRect !== core_strundefined ) {
9574 box = elem.getBoundingClientRect();
9578 top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),
9579 left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
9585 setOffset:
function( elem, options, i ) {
9586 var position =
jQuery.css( elem,
"position" );
9589 if ( position ===
"static" ) {
9590 elem.style.position =
"relative";
9593 var curElem =
jQuery( elem ),
9594 curOffset = curElem.offset(),
9595 curCSSTop =
jQuery.css( elem,
"top" ),
9596 curCSSLeft =
jQuery.css( elem,
"left" ),
9597 calculatePosition = ( position ===
"absolute" || position ===
"fixed" ) &&
jQuery.inArray(
"auto", [curCSSTop, curCSSLeft]) > -1,
9598 props = {}, curPosition = {}, curTop, curLeft;
9601 if ( calculatePosition ) {
9602 curPosition = curElem.position();
9603 curTop = curPosition.top;
9604 curLeft = curPosition.left;
9606 curTop = parseFloat( curCSSTop ) || 0;
9607 curLeft = parseFloat( curCSSLeft ) || 0;
9610 if (
jQuery.isFunction( options ) ) {
9611 options = options.call( elem, i, curOffset );
9614 if ( options.top != null ) {
9615 props.top = ( options.top - curOffset.top ) + curTop;
9617 if ( options.left != null ) {
9618 props.left = ( options.left - curOffset.left ) + curLeft;
9621 if (
"using" in options ) {
9622 options.using.call( elem,
props );
9624 curElem.css(
props );
9632 position:
function() {
9637 var offsetParent,
offset,
9638 parentOffset = { top: 0, left: 0 },
9642 if (
jQuery.css( elem,
"position" ) ===
"fixed" ) {
9644 offset = elem.getBoundingClientRect();
9647 offsetParent = this.offsetParent();
9651 if ( !
jQuery.nodeName( offsetParent[ 0 ],
"html" ) ) {
9652 parentOffset = offsetParent.offset();
9656 parentOffset.top +=
jQuery.css( offsetParent[ 0 ],
"borderTopWidth",
true );
9657 parentOffset.left +=
jQuery.css( offsetParent[ 0 ],
"borderLeftWidth",
true );
9664 top: offset.top - parentOffset.top -
jQuery.css( elem,
"marginTop",
true ),
9665 left: offset.left - parentOffset.left -
jQuery.css( elem,
"marginLeft",
true)
9669 offsetParent:
function() {
9670 return this.map(
function() {
9671 var offsetParent = this.offsetParent || docElem;
9672 while ( offsetParent && ( !
jQuery.nodeName( offsetParent,
"html" ) &&
jQuery.css( offsetParent,
"position") ===
"static" ) ) {
9673 offsetParent = offsetParent.offsetParent;
9675 return offsetParent || docElem;
9682 jQuery.each( {scrollLeft:
"pageXOffset",
scrollTop:
"pageYOffset"},
function( method, prop ) {
9683 var top = /Y/.test( prop );
9685 jQuery.fn[ method ] =
function( val ) {
9686 return jQuery.access(
this,
function( elem, method, val ) {
9690 return win ? (prop in win) ? win[ prop ] :
9691 win.document.documentElement[ method ] :
9697 !top ? val :
jQuery( win ).scrollLeft(),
9702 elem[ method ] = val;
9704 }, method, val, arguments.length, null );
9709 return jQuery.isWindow( elem ) ?
9711 elem.nodeType === 9 ?
9712 elem.defaultView || elem.parentWindow :
9716 jQuery.each( { Height:
"height", Width:
"width" },
function(
name, type ) {
9717 jQuery.each( { padding:
"inner" +
name, content: type,
"":
"outer" +
name },
function( defaultExtra, funcName ) {
9719 jQuery.fn[ funcName ] =
function( margin, value ) {
9720 var chainable = arguments.length && ( defaultExtra || typeof margin !==
"boolean" ),
9721 extra = defaultExtra || ( margin ===
true || value ===
true ?
"margin" :
"border" );
9723 return jQuery.access(
this,
function( elem, type, value ) {
9726 if (
jQuery.isWindow( elem ) ) {
9730 return elem.document.documentElement[
"client" +
name ];
9734 if ( elem.nodeType === 9 ) {
9735 doc = elem.documentElement;
9740 elem.body[
"scroll" +
name ], doc[
"scroll" +
name ],
9741 elem.body[
"offset" +
name ], doc[
"offset" +
name ],
9742 doc[
"client" +
name ]
9748 jQuery.css( elem, type, extra ) :
9751 jQuery.style( elem, type, value, extra );
9752 }, type, chainable ? margin :
undefined, chainable, null );
9784 if ( typeof define ===
"function" && define.amd ) {
9785 define(
"jquery", [],
function () {
return jQuery; } );
jQuery(function(){if(!jQuery.support.reliableMarginRight){jQuery.cssHooks.marginRight={get:function(elem, computed){if(computed){return jQuery.swap(elem,{"display":"inline-block"}, curCSS, [elem,"marginRight"]);}}};}if(!jQuery.support.pixelPosition &&jQuery.fn.position){jQuery.each(["top","left"], function(i, prop){jQuery.cssHooks[prop]={get:function(elem, computed){if(computed){computed=curCSS(elem, prop);return rnumnonpx.test(computed)?jQuery(elem).position()[prop]+"px":computed;}}};});}})
function actualDisplay(name, doc)
function vendorPropName(style, name)
function createActiveXHR()
function setPositiveNumber(elem, value, subtract)
function genFx(type, includeWidth)
if(window.getComputedStyle)
jQuery ajaxPrefilter("script", function(s){if(s.cache===undefined){s.cache=false;}if(s.crossDomain){s.type="GET";s.global=false;}})
function css_defaultDisplay(nodeName)
function ajaxConvert(s, response, jqXHR, isSuccess)
function ajaxHandleResponses(s, jqXHR, responses)
function augmentWidthOrHeight(elem, name, extra, isBorderBox, styles)
function isHidden(elem, el)
function getWidthOrHeight(elem, name, extra)
function createStandardXHR()
function propFilter(props, specialEasing)
document ready(function(){$(window).resize(function(){var track_offset=$("#track_controls").offset().top;var new_track_height=$(this).height()-track_offset;$("#track_controls").height(new_track_height);$("#scrolling_tracks").height(new_track_height);$('body').scope().playhead_height=$("#track-container").height();$(".playhead-line").height($('body').scope().playhead_height);});if(typeof timeline!= 'undefined'){timeline.qt_log("Qt Found!");$('body').scope().EnableQt()}else{console.log("Qt NOT Found!");}$(window).trigger('resize');$("body").keydown(function(event){if(event.which==16)$('body').scope().shift_pressed=true;});$("body").keyup(function(event){if($('body').scope().shift_pressed)$('body').scope().shift_pressed=false;});})
jQuery ajaxTransport("script", function(s){if(s.crossDomain){var script, head=document.head||jQuery("head")[0]||document.documentElement;return{send:function(_, callback){script=document.createElement("script");script.async=true;if(s.scriptCharset){script.charset=s.scriptCharset;}script.src=s.url;script.onload=script.onreadystatechange=function(_, isAbort){if(isAbort||!script.readyState||/loaded|complete/.test(script.readyState)){script.onload=script.onreadystatechange=null;if(script.parentNode){script.parentNode.removeChild(script);}script=null;if(!isAbort){callback(200,"success");}}};head.insertBefore(script, head.firstChild);}, abort:function(){if(script){script.onload(undefined, true);}}};}})
Tween propHooks scrollTop
d module("ngAnimate",["ng"]).directive("ngAnimateChildren"
function showHide(elements, show)
function ajaxExtend(target, src)
jQuery each(["height","width"], function(i, name){jQuery.cssHooks[name]={get:function(elem, computed, extra){if(computed){return elem.offsetWidth===0 &&rdisplayswap.test(jQuery.css(elem,"display"))?jQuery.swap(elem, cssShow, function(){return getWidthOrHeight(elem, name, extra);}):getWidthOrHeight(elem, name, extra);}}, set:function(elem, value, extra){var styles=extra &&getStyles(elem);return setPositiveNumber(elem, value, extra?augmentWidthOrHeight(elem, name, extra, jQuery.support.boxSizing &&jQuery.css(elem,"boxSizing", false, styles)==="border-box", styles):0);}};})
function defaultPrefilter(elem, props, opts)
function addToPrefiltersOrTransports(structure)
function createTween(value, prop, animation)
jQuery ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"}, contents:{script:/(?:java|ecma) script/}, converters:{"text script":function(text){jQuery.globalEval(text);return text;}}})
function buildParams(prefix, obj, traditional, add)
function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR)