Subversion Repositories Sites.obs-saisons.fr

Rev

Rev 31 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 31 Rev 54
Line 1... Line 1...
1
/*!
1
/*!
2
 * jQuery JavaScript Library v1.4.2
2
 * jQuery JavaScript Library v1.4.4
3
 * http://jquery.com/
3
 * http://jquery.com/
4
 *
4
 *
5
 * Copyright 2010, John Resig
5
 * Copyright 2010, John Resig
6
 * Dual licensed under the MIT or GPL Version 2 licenses.
6
 * Dual licensed under the MIT or GPL Version 2 licenses.
7
 * http://jquery.org/license
7
 * http://jquery.org/license
Line 9... Line 9...
9
 * Includes Sizzle.js
9
 * Includes Sizzle.js
10
 * http://sizzlejs.com/
10
 * http://sizzlejs.com/
11
 * Copyright 2010, The Dojo Foundation
11
 * Copyright 2010, The Dojo Foundation
12
 * Released under the MIT, BSD, and GPL Licenses.
12
 * Released under the MIT, BSD, and GPL Licenses.
13
 *
13
 *
14
 * Date: Sat Feb 13 22:33:48 2010 -0500
14
 * Date: Thu Nov 11 19:04:53 2010 -0500
15
 */
15
 */
16
(function( window, undefined ) {
16
(function( window, undefined ) {
Line -... Line 17...
-
 
17
 
-
 
18
// Use the correct document accordingly with window argument (sandbox)
-
 
19
var document = window.document;
-
 
20
var jQuery = (function() {
17
 
21
 
18
// Define a local copy of jQuery
22
// Define a local copy of jQuery
19
var jQuery = function( selector, context ) {
23
var jQuery = function( selector, context ) {
20
		// The jQuery object is actually just the init constructor 'enhanced'
24
		// The jQuery object is actually just the init constructor 'enhanced'
21
		return new jQuery.fn.init( selector, context );
25
		return new jQuery.fn.init( selector, context );
Line 25... Line 29...
25
	_jQuery = window.jQuery,
29
	_jQuery = window.jQuery,
Line 26... Line 30...
26
 
30
 
27
	// Map over the $ in case of overwrite
31
	// Map over the $ in case of overwrite
Line 28... Line -...
28
	_$ = window.$,
-
 
29
 
-
 
30
	// Use the correct document accordingly with window argument (sandbox)
-
 
31
	document = window.document,
32
	_$ = window.$,
32
 
33
 
Line 33... Line 34...
33
	// A central reference to the root jQuery(document)
34
	// A central reference to the root jQuery(document)
34
	rootjQuery,
35
	rootjQuery,
35
 
36
 
Line 36... Line 37...
36
	// A simple way to check for HTML strings or ID strings
37
	// A simple way to check for HTML strings or ID strings
37
	// (both of which we optimize for)
38
	// (both of which we optimize for)
Line 38... Line 39...
38
	quickExpr = /^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,
39
	quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,
39
 
40
 
-
 
41
	// Is it a simple selector
Line 40... Line 42...
40
	// Is it a simple selector
42
	isSimple = /^.[^:#\[\.,]*$/,
-
 
43
 
41
	isSimple = /^.[^:#\[\.,]*$/,
44
	// Check if a string has a non-whitespace character in it
-
 
45
	rnotwhite = /\S/,
-
 
46
	rwhite = /\s/,
-
 
47
 
-
 
48
	// Used for trimming whitespace
-
 
49
	trimLeft = /^\s+/,
-
 
50
	trimRight = /\s+$/,
Line 42... Line 51...
42
 
51
 
43
	// Check if a string has a non-whitespace character in it
52
	// Check for non-word characters
Line -... Line 53...
-
 
53
	rnonword = /\W/,
-
 
54
 
-
 
55
	// Check for digits
-
 
56
	rdigit = /\d/,
-
 
57
 
-
 
58
	// Match a standalone tag
-
 
59
	rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
-
 
60
 
-
 
61
	// JSON RegExp
-
 
62
	rvalidchars = /^[\],:{}\s]*$/,
-
 
63
	rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
-
 
64
	rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
44
	rnotwhite = /\S/,
65
	rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
45
 
66
 
Line 46... Line 67...
46
	// Used for trimming whitespace
67
	// Useragent RegExp
47
	rtrim = /^(\s|\u00A0)+|(\s|\u00A0)+$/g,
68
	rwebkit = /(webkit)[ \/]([\w.]+)/,
Line 64... Line 85...
64
	// The ready event handler
85
	// The ready event handler
65
	DOMContentLoaded,
86
	DOMContentLoaded,
Line 66... Line 87...
66
 
87
 
67
	// Save a reference to some core methods
88
	// Save a reference to some core methods
68
	toString = Object.prototype.toString,
89
	toString = Object.prototype.toString,
69
	hasOwnProperty = Object.prototype.hasOwnProperty,
90
	hasOwn = Object.prototype.hasOwnProperty,
70
	push = Array.prototype.push,
91
	push = Array.prototype.push,
-
 
92
	slice = Array.prototype.slice,
71
	slice = Array.prototype.slice,
93
	trim = String.prototype.trim,
-
 
94
	indexOf = Array.prototype.indexOf,
-
 
95
	
-
 
96
	// [[Class]] -> type pairs
Line 72... Line 97...
72
	indexOf = Array.prototype.indexOf;
97
	class2type = {};
73
 
98
 
74
jQuery.fn = jQuery.prototype = {
99
jQuery.fn = jQuery.prototype = {
Line 86... Line 111...
86
			this.length = 1;
111
			this.length = 1;
87
			return this;
112
			return this;
88
		}
113
		}
Line 89... Line 114...
89
		
114
		
90
		// The body element only exists once, optimize finding it
115
		// The body element only exists once, optimize finding it
91
		if ( selector === "body" && !context ) {
116
		if ( selector === "body" && !context && document.body ) {
92
			this.context = document;
117
			this.context = document;
93
			this[0] = document.body;
118
			this[0] = document.body;
94
			this.selector = "body";
119
			this.selector = "body";
95
			this.length = 1;
120
			this.length = 1;
Line 120... Line 145...
120
						} else {
145
						} else {
121
							selector = [ doc.createElement( ret[1] ) ];
146
							selector = [ doc.createElement( ret[1] ) ];
122
						}
147
						}
Line 123... Line 148...
123
 
148
 
124
					} else {
149
					} else {
125
						ret = buildFragment( [ match[1] ], [ doc ] );
150
						ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
126
						selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes;
151
						selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes;
Line 127... Line 152...
127
					}
152
					}
Line 128... Line 153...
128
					
153
					
129
					return jQuery.merge( this, selector );
154
					return jQuery.merge( this, selector );
130
					
155
					
Line -... Line 156...
-
 
156
				// HANDLE: $("#id")
-
 
157
				} else {
131
				// HANDLE: $("#id")
158
					elem = document.getElementById( match[2] );
132
				} else {
159
 
133
					elem = document.getElementById( match[2] );
160
					// Check parentNode to catch when Blackberry 4.6 returns
134
 
161
					// nodes that are no longer in the document #6963
135
					if ( elem ) {
162
					if ( elem && elem.parentNode ) {
136
						// Handle the case where IE and Opera return items
163
						// Handle the case where IE and Opera return items
Line 148... Line 175...
148
					this.selector = selector;
175
					this.selector = selector;
149
					return this;
176
					return this;
150
				}
177
				}
Line 151... Line 178...
151
 
178
 
152
			// HANDLE: $("TAG")
179
			// HANDLE: $("TAG")
153
			} else if ( !context && /^\w+$/.test( selector ) ) {
180
			} else if ( !context && !rnonword.test( selector ) ) {
154
				this.selector = selector;
181
				this.selector = selector;
155
				this.context = document;
182
				this.context = document;
156
				selector = document.getElementsByTagName( selector );
183
				selector = document.getElementsByTagName( selector );
Line 182... Line 209...
182
 
209
 
183
	// Start with an empty selector
210
	// Start with an empty selector
Line 184... Line 211...
184
	selector: "",
211
	selector: "",
185
 
212
 
Line 186... Line 213...
186
	// The current version of jQuery being used
213
	// The current version of jQuery being used
187
	jquery: "1.4.2",
214
	jquery: "1.4.4",
Line 188... Line 215...
188
 
215
 
Line 301... Line 328...
301
 
328
 
302
// Give the init function the jQuery prototype for later instantiation
329
// Give the init function the jQuery prototype for later instantiation
Line 303... Line 330...
303
jQuery.fn.init.prototype = jQuery.fn;
330
jQuery.fn.init.prototype = jQuery.fn;
-
 
331
 
304
 
332
jQuery.extend = jQuery.fn.extend = function() {
-
 
333
	 var options, name, src, copy, copyIsArray, clone,
305
jQuery.extend = jQuery.fn.extend = function() {
334
		target = arguments[0] || {},
-
 
335
		i = 1,
Line 306... Line 336...
306
	// copy reference to target object
336
		length = arguments.length,
307
	var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options, name, src, copy;
337
		deep = false;
308
 
338
 
309
	// Handle a deep copy situation
339
	// Handle a deep copy situation
Line 336... Line 366...
336
				// Prevent never-ending loop
366
				// Prevent never-ending loop
337
				if ( target === copy ) {
367
				if ( target === copy ) {
338
					continue;
368
					continue;
339
				}
369
				}
Line 340... Line 370...
340
 
370
 
341
				// Recurse if we're merging object literal values or arrays
371
				// Recurse if we're merging plain objects or arrays
-
 
372
				if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
-
 
373
					if ( copyIsArray ) {
342
				if ( deep && copy && ( jQuery.isPlainObject(copy) || jQuery.isArray(copy) ) ) {
374
						copyIsArray = false;
-
 
375
						clone = src && jQuery.isArray(src) ? src : [];
-
 
376
 
343
					var clone = src && ( jQuery.isPlainObject(src) || jQuery.isArray(src) ) ? src
377
					} else {
-
 
378
						clone = src && jQuery.isPlainObject(src) ? src : {};
Line 344... Line 379...
344
						: jQuery.isArray(copy) ? [] : {};
379
					}
345
 
380
 
Line 346... Line 381...
346
					// Never move original objects, clone them
381
					// Never move original objects, clone them
Line 369... Line 404...
369
		return jQuery;
404
		return jQuery;
370
	},
405
	},
Line 371... Line 406...
371
	
406
	
372
	// Is the DOM ready to be used? Set to true once it occurs.
407
	// Is the DOM ready to be used? Set to true once it occurs.
-
 
408
	isReady: false,
-
 
409
 
-
 
410
	// A counter to track how many items to wait for before
-
 
411
	// the ready event fires. See #6781
Line 373... Line 412...
373
	isReady: false,
412
	readyWait: 1,
374
	
413
	
-
 
414
	// Handle when the DOM is ready
-
 
415
	ready: function( wait ) {
-
 
416
		// A third-party is pushing the ready event forwards
-
 
417
		if ( wait === true ) {
-
 
418
			jQuery.readyWait--;
375
	// Handle when the DOM is ready
419
		}
376
	ready: function() {
420
 
377
		// Make sure that the DOM is not already loaded
421
		// Make sure that the DOM is not already loaded
378
		if ( !jQuery.isReady ) {
422
		if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) {
379
			// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
423
			// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
380
			if ( !document.body ) {
424
			if ( !document.body ) {
Line 381... Line 425...
381
				return setTimeout( jQuery.ready, 13 );
425
				return setTimeout( jQuery.ready, 1 );
382
			}
426
			}
Line -... Line 427...
-
 
427
 
-
 
428
			// Remember that the DOM is ready
-
 
429
			jQuery.isReady = true;
-
 
430
 
-
 
431
			// If a normal DOM Ready event fired, decrement, and wait if need be
383
 
432
			if ( wait !== true && --jQuery.readyWait > 0 ) {
384
			// Remember that the DOM is ready
433
				return;
385
			jQuery.isReady = true;
434
			}
386
 
435
 
387
			// If there are functions bound, to execute
436
			// If there are functions bound, to execute
388
			if ( readyList ) {
437
			if ( readyList ) {
389
				// Execute all of them
-
 
Line 390... Line 438...
390
				var fn, i = 0;
438
				// Execute all of them
391
				while ( (fn = readyList[ i++ ]) ) {
439
				var fn,
392
					fn.call( document, jQuery );
-
 
Line -... Line 440...
-
 
440
					i = 0,
-
 
441
					ready = readyList;
-
 
442
 
-
 
443
				// Reset the list of functions
393
				}
444
				readyList = null;
394
 
445
 
395
				// Reset the list of functions
446
				while ( (fn = ready[ i++ ]) ) {
-
 
447
					fn.call( document, jQuery );
396
				readyList = null;
448
				}
397
			}
449
 
398
 
450
				// Trigger any bound ready events
Line 399... Line 451...
399
			// Trigger any bound ready events
451
				if ( jQuery.fn.trigger ) {
Line 411... Line 463...
411
		readyBound = true;
463
		readyBound = true;
Line 412... Line 464...
412
 
464
 
413
		// Catch cases where $(document).ready() is called after the
465
		// Catch cases where $(document).ready() is called after the
414
		// browser event has already occurred.
466
		// browser event has already occurred.
-
 
467
		if ( document.readyState === "complete" ) {
415
		if ( document.readyState === "complete" ) {
468
			// Handle it asynchronously to allow scripts the opportunity to delay ready
416
			return jQuery.ready();
469
			return setTimeout( jQuery.ready, 1 );
Line 417... Line 470...
417
		}
470
		}
418
 
471
 
419
		// Mozilla, Opera and webkit nightlies currently support this event
472
		// Mozilla, Opera and webkit nightlies currently support this event
Line 449... Line 502...
449
 
502
 
450
	// See test/unit/core.js for details concerning isFunction.
503
	// See test/unit/core.js for details concerning isFunction.
451
	// Since version 1.3, DOM methods and functions like alert
504
	// Since version 1.3, DOM methods and functions like alert
452
	// aren't supported. They return false on IE (#2968).
505
	// aren't supported. They return false on IE (#2968).
453
	isFunction: function( obj ) {
506
	isFunction: function( obj ) {
-
 
507
		return jQuery.type(obj) === "function";
-
 
508
	},
-
 
509
 
-
 
510
	isArray: Array.isArray || function( obj ) {
-
 
511
		return jQuery.type(obj) === "array";
-
 
512
	},
-
 
513
 
-
 
514
	// A crude way of determining if an object is a window
-
 
515
	isWindow: function( obj ) {
-
 
516
		return obj && typeof obj === "object" && "setInterval" in obj;
-
 
517
	},
-
 
518
 
-
 
519
	isNaN: function( obj ) {
454
		return toString.call(obj) === "[object Function]";
520
		return obj == null || !rdigit.test( obj ) || isNaN( obj );
Line 455... Line 521...
455
	},
521
	},
-
 
522
 
-
 
523
	type: function( obj ) {
456
 
524
		return obj == null ?
457
	isArray: function( obj ) {
525
			String( obj ) :
Line 458... Line 526...
458
		return toString.call(obj) === "[object Array]";
526
			class2type[ toString.call(obj) ] || "object";
459
	},
527
	},
460
 
528
 
461
	isPlainObject: function( obj ) {
529
	isPlainObject: function( obj ) {
462
		// Must be an Object.
530
		// Must be an Object.
463
		// Because of IE, we also have to check the presence of the constructor property.
531
		// Because of IE, we also have to check the presence of the constructor property.
464
		// Make sure that DOM nodes and window objects don't pass through, as well
532
		// Make sure that DOM nodes and window objects don't pass through, as well
Line 465... Line 533...
465
		if ( !obj || toString.call(obj) !== "[object Object]" || obj.nodeType || obj.setInterval ) {
533
		if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
466
			return false;
534
			return false;
467
		}
535
		}
468
		
536
		
469
		// Not own constructor property must be Object
537
		// Not own constructor property must be Object
470
		if ( obj.constructor
538
		if ( obj.constructor &&
Line 471... Line 539...
471
			&& !hasOwnProperty.call(obj, "constructor")
539
			!hasOwn.call(obj, "constructor") &&
472
			&& !hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf") ) {
540
			!hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
Line 473... Line 541...
473
			return false;
541
			return false;
474
		}
542
		}
Line 475... Line 543...
475
		
543
		
476
		// Own properties are enumerated firstly, so to speed up,
544
		// Own properties are enumerated firstly, so to speed up,
Line 477... Line 545...
477
		// if last one is own, then all properties are own.
545
		// if last one is own, then all properties are own.
478
	
546
	
479
		var key;
547
		var key;
Line 501... Line 569...
501
		// Make sure leading/trailing whitespace is removed (IE can't handle it)
569
		// Make sure leading/trailing whitespace is removed (IE can't handle it)
502
		data = jQuery.trim( data );
570
		data = jQuery.trim( data );
Line 503... Line 571...
503
		
571
		
504
		// Make sure the incoming data is actual JSON
572
		// Make sure the incoming data is actual JSON
505
		// Logic borrowed from http://json.org/json2.js
573
		// Logic borrowed from http://json.org/json2.js
506
		if ( /^[\],:{}\s]*$/.test(data.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@")
574
		if ( rvalidchars.test(data.replace(rvalidescape, "@")
507
			.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]")
575
			.replace(rvalidtokens, "]")
Line 508... Line 576...
508
			.replace(/(?:^|:|,)(?:\s*\[)+/g, "")) ) {
576
			.replace(rvalidbraces, "")) ) {
509
 
577
 
510
			// Try to use the native JSON parser first
578
			// Try to use the native JSON parser first
511
			return window.JSON && window.JSON.parse ?
579
			return window.JSON && window.JSON.parse ?
Line 582... Line 650...
582
		}
650
		}
Line 583... Line 651...
583
 
651
 
584
		return object;
652
		return object;
Line -... Line 653...
-
 
653
	},
-
 
654
 
585
	},
655
	// Use native String.trim function wherever possible
-
 
656
	trim: trim ?
-
 
657
		function( text ) {
-
 
658
			return text == null ?
-
 
659
				"" :
-
 
660
				trim.call( text );
-
 
661
		} :
-
 
662
 
-
 
663
		// Otherwise use our own trimming functionality
-
 
664
		function( text ) {
586
 
665
			return text == null ?
587
	trim: function( text ) {
666
				"" :
Line 588... Line 667...
588
		return (text || "").replace( rtrim, "" );
667
				text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
589
	},
668
		},
590
 
669
 
Line 591... Line 670...
591
	// results is for internal usage only
670
	// results is for internal usage only
592
	makeArray: function( array, results ) {
671
	makeArray: function( array, results ) {
593
		var ret = results || [];
672
		var ret = results || [];
594
 
673
 
-
 
674
		if ( array != null ) {
-
 
675
			// The window, strings (and functions) also have 'length'
-
 
676
			// The extra typeof function check is to prevent crashes
595
		if ( array != null ) {
677
			// in Safari 2 (See: #3039)
596
			// The window, strings (and functions) also have 'length'
678
			// Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
597
			// The extra typeof function check is to prevent crashes
679
			var type = jQuery.type(array);
598
			// in Safari 2 (See: #3039)
680
 
599
			if ( array.length == null || typeof array === "string" || jQuery.isFunction(array) || (typeof array !== "function" && array.setInterval) ) {
681
			if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
600
				push.call( ret, array );
682
				push.call( ret, array );
Line 619... Line 701...
619
 
701
 
620
		return -1;
702
		return -1;
Line 621... Line 703...
621
	},
703
	},
622
 
704
 
-
 
705
	merge: function( first, second ) {
Line 623... Line 706...
623
	merge: function( first, second ) {
706
		var i = first.length,
624
		var i = first.length, j = 0;
707
			j = 0;
625
 
708
 
626
		if ( typeof second.length === "number" ) {
709
		if ( typeof second.length === "number" ) {
Line 638... Line 721...
638
 
721
 
639
		return first;
722
		return first;
Line 640... Line 723...
640
	},
723
	},
641
 
724
 
-
 
725
	grep: function( elems, callback, inv ) {
Line 642... Line 726...
642
	grep: function( elems, callback, inv ) {
726
		var ret = [], retVal;
643
		var ret = [];
727
		inv = !!inv;
644
 
728
 
645
		// Go through the array, only saving the items
729
		// Go through the array, only saving the items
-
 
730
		// that pass the validator function
646
		// that pass the validator function
731
		for ( var i = 0, length = elems.length; i < length; i++ ) {
647
		for ( var i = 0, length = elems.length; i < length; i++ ) {
732
			retVal = !!callback( elems[ i ], i );
648
			if ( !inv !== !callback( elems[ i ], i ) ) {
733
			if ( inv !== retVal ) {
Line 649... Line 734...
649
				ret.push( elems[ i ] );
734
				ret.push( elems[ i ] );
Line 699... Line 784...
699
 
784
 
700
		// So proxy can be declared as an argument
785
		// So proxy can be declared as an argument
701
		return proxy;
786
		return proxy;
Line -... Line 787...
-
 
787
	},
-
 
788
 
-
 
789
	// Mutifunctional method to get and set values to a collection
-
 
790
	// The value/s can be optionally by executed if its a function
-
 
791
	access: function( elems, key, value, exec, fn, pass ) {
-
 
792
		var length = elems.length;
-
 
793
	
-
 
794
		// Setting many attributes
-
 
795
		if ( typeof key === "object" ) {
-
 
796
			for ( var k in key ) {
-
 
797
				jQuery.access( elems, k, key[k], exec, fn, value );
-
 
798
			}
-
 
799
			return elems;
-
 
800
		}
-
 
801
	
-
 
802
		// Setting one attribute
-
 
803
		if ( value !== undefined ) {
-
 
804
			// Optionally, function values get executed if exec is true
-
 
805
			exec = !pass && exec && jQuery.isFunction(value);
-
 
806
		
-
 
807
			for ( var i = 0; i < length; i++ ) {
-
 
808
				fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
-
 
809
			}
-
 
810
		
-
 
811
			return elems;
-
 
812
		}
-
 
813
	
-
 
814
		// Getting an attribute
-
 
815
		return length ? fn( elems[0], key ) : undefined;
-
 
816
	},
-
 
817
 
-
 
818
	now: function() {
-
 
819
		return (new Date()).getTime();
702
	},
820
	},
703
 
821
 
704
	// Use of jQuery.browser is frowned upon.
822
	// Use of jQuery.browser is frowned upon.
705
	// More details: http://docs.jquery.com/Utilities/jQuery.browser
823
	// More details: http://docs.jquery.com/Utilities/jQuery.browser
Line 706... Line 824...
706
	uaMatch: function( ua ) {
824
	uaMatch: function( ua ) {
707
		ua = ua.toLowerCase();
825
		ua = ua.toLowerCase();
708
 
826
 
709
		var match = /(webkit)[ \/]([\w.]+)/.exec( ua ) ||
827
		var match = rwebkit.exec( ua ) ||
710
			/(opera)(?:.*version)?[ \/]([\w.]+)/.exec( ua ) ||
828
			ropera.exec( ua ) ||
Line 711... Line 829...
711
			/(msie) ([\w.]+)/.exec( ua ) ||
829
			rmsie.exec( ua ) ||
712
			!/compatible/.test( ua ) && /(mozilla)(?:.*? rv:([\w.]+))?/.exec( ua ) ||
830
			ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
Line 713... Line 831...
713
		  	[];
831
			[];
714
 
832
 
Line -... Line 833...
-
 
833
		return { browser: match[1] || "", version: match[2] || "0" };
-
 
834
	},
-
 
835
 
-
 
836
	browser: {}
-
 
837
});
715
		return { browser: match[1] || "", version: match[2] || "0" };
838
 
716
	},
839
// Populate the class2type map
717
 
840
jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
718
	browser: {}
841
	class2type[ "[object " + name + "]" ] = name.toLowerCase();
719
});
842
});
Line 733... Line 856...
733
	jQuery.inArray = function( elem, array ) {
856
	jQuery.inArray = function( elem, array ) {
734
		return indexOf.call( array, elem );
857
		return indexOf.call( array, elem );
735
	};
858
	};
736
}
859
}
Line -... Line 860...
-
 
860
 
-
 
861
// Verify that \s matches non-breaking spaces
-
 
862
// (IE fails on this test)
-
 
863
if ( !rwhite.test( "\xA0" ) ) {
-
 
864
	trimLeft = /^[\s\xA0]+/;
-
 
865
	trimRight = /[\s\xA0]+$/;
-
 
866
}
737
 
867
 
738
// All jQuery objects should point back to these
868
// All jQuery objects should point back to these
Line 739... Line 869...
739
rootjQuery = jQuery(document);
869
rootjQuery = jQuery(document);
740
 
870
 
Line 763... Line 893...
763
 
893
 
764
	try {
894
	try {
765
		// If IE is used, use the trick by Diego Perini
895
		// If IE is used, use the trick by Diego Perini
766
		// http://javascript.nwbox.com/IEContentLoaded/
896
		// http://javascript.nwbox.com/IEContentLoaded/
767
		document.documentElement.doScroll("left");
897
		document.documentElement.doScroll("left");
768
	} catch( error ) {
898
	} catch(e) {
769
		setTimeout( doScrollCheck, 1 );
899
		setTimeout( doScrollCheck, 1 );
770
		return;
900
		return;
Line 771... Line 901...
771
	}
901
	}
772
 
902
 
773
	// and execute any waiting functions
903
	// and execute any waiting functions
Line 774... Line 904...
774
	jQuery.ready();
904
	jQuery.ready();
775
}
-
 
776
 
-
 
777
function evalScript( i, elem ) {
-
 
778
	if ( elem.src ) {
-
 
779
		jQuery.ajax({
-
 
780
			url: elem.src,
-
 
781
			async: false,
-
 
782
			dataType: "script"
905
}
783
		});
-
 
Line 784... Line -...
784
	} else {
-
 
785
		jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
-
 
786
	}
-
 
787
 
906
 
Line 788... Line -...
788
	if ( elem.parentNode ) {
-
 
789
		elem.parentNode.removeChild( elem );
-
 
790
	}
-
 
791
}
-
 
792
 
-
 
793
// Mutifunctional method to get and set values to a collection
-
 
794
// The value/s can be optionally by executed if its a function
-
 
795
function access( elems, key, value, exec, fn, pass ) {
-
 
796
	var length = elems.length;
-
 
797
	
-
 
798
	// Setting many attributes
-
 
799
	if ( typeof key === "object" ) {
-
 
800
		for ( var k in key ) {
-
 
801
			access( elems, k, key[k], exec, fn, value );
-
 
802
		}
-
 
803
		return elems;
-
 
804
	}
-
 
805
	
-
 
806
	// Setting one attribute
-
 
807
	if ( value !== undefined ) {
-
 
808
		// Optionally, function values get executed if exec is true
-
 
809
		exec = !pass && exec && jQuery.isFunction(value);
-
 
810
		
-
 
811
		for ( var i = 0; i < length; i++ ) {
-
 
812
			fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
-
 
813
		}
-
 
814
		
-
 
815
		return elems;
-
 
Line 816... Line -...
816
	}
-
 
817
	
-
 
818
	// Getting an attribute
-
 
819
	return length ? fn( elems[0], key ) : undefined;
907
// Expose jQuery to the global object
Line 820... Line 908...
820
}
908
return (window.jQuery = window.$ = jQuery);
Line 821... Line 909...
821
 
909
 
822
function now() {
910
})();
823
	return (new Date).getTime();
911
 
824
}
912
 
Line 825... Line 913...
825
(function() {
913
(function() {
826
 
914
 
Line 827... Line 915...
827
	jQuery.support = {};
915
	jQuery.support = {};
828
 
916
 
-
 
917
	var root = document.documentElement,
-
 
918
		script = document.createElement("script"),
Line 829... Line 919...
829
	var root = document.documentElement,
919
		div = document.createElement("div"),
830
		script = document.createElement("script"),
920
		id = "script" + jQuery.now();
831
		div = document.createElement("div"),
921
 
832
		id = "script" + now();
922
	div.style.display = "none";
Line 876... Line 966...
876
		// (WebKit defaults to "" instead)
966
		// (WebKit defaults to "" instead)
877
		checkOn: div.getElementsByTagName("input")[0].value === "on",
967
		checkOn: div.getElementsByTagName("input")[0].value === "on",
Line 878... Line 968...
878
 
968
 
879
		// Make sure that a selected-by-default option has a working selected property.
969
		// Make sure that a selected-by-default option has a working selected property.
880
		// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
970
		// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
881
		optSelected: document.createElement("select").appendChild( document.createElement("option") ).selected,
-
 
882
 
-
 
Line 883... Line 971...
883
		parentNode: div.removeChild( div.appendChild( document.createElement("div") ) ).parentNode === null,
971
		optSelected: opt.selected,
884
 
972
 
-
 
973
		// Will be defined later
885
		// Will be defined later
974
		deleteExpando: true,
886
		deleteExpando: true,
975
		optDisabled: false,
887
		checkClone: false,
976
		checkClone: false,
888
		scriptEval: false,
977
		scriptEval: false,
-
 
978
		noCloneEvent: true,
-
 
979
		boxModel: null,
-
 
980
		inlineBlockNeedsLayout: false,
889
		noCloneEvent: true,
981
		shrinkWrapBlocks: false,
Line -... Line 982...
-
 
982
		reliableHiddenOffsets: true
-
 
983
	};
-
 
984
 
-
 
985
	// Make sure that the options inside disabled selects aren't marked as disabled
-
 
986
	// (WebKit marks them as diabled)
890
		boxModel: null
987
	select.disabled = true;
891
	};
988
	jQuery.support.optDisabled = !opt.disabled;
892
 
989
 
893
	script.type = "text/javascript";
990
	script.type = "text/javascript";
Line 907... Line 1004...
907
 
1004
 
908
	// Test to see if it's possible to delete an expando from an element
1005
	// Test to see if it's possible to delete an expando from an element
909
	// Fails in Internet Explorer
1006
	// Fails in Internet Explorer
910
	try {
1007
	try {
911
		delete script.test;
1008
		delete script.test;
912
	
1009
 
913
	} catch(e) {
1010
	} catch(e) {
914
		jQuery.support.deleteExpando = false;
1011
		jQuery.support.deleteExpando = false;
Line 915... Line 1012...
915
	}
1012
	}
Line 941... Line 1038...
941
		var div = document.createElement("div");
1038
		var div = document.createElement("div");
942
		div.style.width = div.style.paddingLeft = "1px";
1039
		div.style.width = div.style.paddingLeft = "1px";
Line 943... Line 1040...
943
 
1040
 
944
		document.body.appendChild( div );
1041
		document.body.appendChild( div );
945
		jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
-
 
Line -... Line 1042...
-
 
1042
		jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
-
 
1043
 
-
 
1044
		if ( "zoom" in div.style ) {
-
 
1045
			// Check if natively block-level elements act like inline-block
-
 
1046
			// elements when setting their display to 'inline' and giving
-
 
1047
			// them layout
-
 
1048
			// (IE < 8 does this)
-
 
1049
			div.style.display = "inline";
-
 
1050
			div.style.zoom = 1;
-
 
1051
			jQuery.support.inlineBlockNeedsLayout = div.offsetWidth === 2;
-
 
1052
 
-
 
1053
			// Check if elements with layout shrink-wrap their children
-
 
1054
			// (IE 6 does this)
-
 
1055
			div.style.display = "";
-
 
1056
			div.innerHTML = "<div style='width:4px;'></div>";
-
 
1057
			jQuery.support.shrinkWrapBlocks = div.offsetWidth !== 2;
-
 
1058
		}
-
 
1059
 
-
 
1060
		div.innerHTML = "<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";
-
 
1061
		var tds = div.getElementsByTagName("td");
-
 
1062
 
-
 
1063
		// Check if table cells still have offsetWidth/Height when they are set
-
 
1064
		// to display:none and there are still other visible table cells in a
-
 
1065
		// table row; if so, offsetWidth/Height are not reliable for use when
-
 
1066
		// determining if an element has been hidden directly using
-
 
1067
		// display:none (it is still safe to use offsets if a parent element is
-
 
1068
		// hidden; don safety goggles and see bug #4512 for more information).
-
 
1069
		// (only IE 8 fails this test)
-
 
1070
		jQuery.support.reliableHiddenOffsets = tds[0].offsetHeight === 0;
-
 
1071
 
-
 
1072
		tds[0].style.display = "";
-
 
1073
		tds[1].style.display = "none";
-
 
1074
 
-
 
1075
		// Check if empty table cells still have offsetWidth/Height
-
 
1076
		// (IE < 8 fail this test)
-
 
1077
		jQuery.support.reliableHiddenOffsets = jQuery.support.reliableHiddenOffsets && tds[0].offsetHeight === 0;
-
 
1078
		div.innerHTML = "";
946
		document.body.removeChild( div ).style.display = 'none';
1079
 
947
 
1080
		document.body.removeChild( div ).style.display = "none";
Line 948... Line 1081...
948
		div = null;
1081
		div = tds = null;
949
	});
1082
	});
950
 
1083
 
951
	// Technique from Juriy Zaytsev
1084
	// Technique from Juriy Zaytsev
952
	// http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
1085
	// http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
953
	var eventSupported = function( eventName ) { 
1086
	var eventSupported = function( eventName ) {
954
		var el = document.createElement("div"); 
1087
		var el = document.createElement("div");
955
		eventName = "on" + eventName; 
1088
		eventName = "on" + eventName;
956
 
1089
 
957
		var isSupported = (eventName in el); 
1090
		var isSupported = (eventName in el);
958
		if ( !isSupported ) { 
1091
		if ( !isSupported ) {
959
			el.setAttribute(eventName, "return;"); 
1092
			el.setAttribute(eventName, "return;");
Line 960... Line 1093...
960
			isSupported = typeof el[eventName] === "function"; 
1093
			isSupported = typeof el[eventName] === "function";
961
		} 
1094
		}
962
		el = null; 
1095
		el = null;
963
 
1096
 
964
		return isSupported; 
1097
		return isSupported;
Line 965... Line 1098...
965
	};
1098
	};
966
	
1099
 
967
	jQuery.support.submitBubbles = eventSupported("submit");
1100
	jQuery.support.submitBubbles = eventSupported("submit");
Line 968... Line -...
968
	jQuery.support.changeBubbles = eventSupported("change");
-
 
969
 
-
 
970
	// release memory in IE
-
 
971
	root = script = div = all = a = null;
-
 
972
})();
-
 
973
 
-
 
974
jQuery.props = {
-
 
975
	"for": "htmlFor",
-
 
-
 
1101
	jQuery.support.changeBubbles = eventSupported("change");
-
 
1102
 
976
	"class": "className",
1103
	// release memory in IE
977
	readonly: "readOnly",
-
 
978
	maxlength: "maxLength",
1104
	root = script = div = all = a = null;
979
	cellspacing: "cellSpacing",
-
 
980
	rowspan: "rowSpan",
-
 
Line 981... Line 1105...
981
	colspan: "colSpan",
1105
})();
982
	tabindex: "tabIndex",
1106
 
983
	usemap: "useMap",
1107
 
-
 
1108
 
-
 
1109
var windowData = {},
-
 
1110
	rbrace = /^(?:\{.*\}|\[.*\])$/;
-
 
1111
 
984
	frameborder: "frameBorder"
1112
jQuery.extend({
Line 985... Line 1113...
985
};
1113
	cache: {},
986
var expando = "jQuery" + now(), uuid = 0, windowData = {};
1114
 
987
 
1115
	// Please use with caution
988
jQuery.extend({
1116
	uuid: 0,
-
 
1117
 
989
	cache: {},
1118
	// Unique for each copy of jQuery on the page	
990
	
1119
	expando: "jQuery" + jQuery.now(),
991
	expando:expando,
1120
 
Line 992... Line 1121...
992
 
1121
	// The following elements throw uncatchable exceptions if you
993
	// The following elements throw uncatchable exceptions if you
1122
	// attempt to add expando properties to them.
994
	// attempt to add expando properties to them.
1123
	noData: {
995
	noData: {
1124
		"embed": true,
Line 996... Line 1125...
996
		"embed": true,
1125
		// Ban all objects except for Flash (which handle expandos)
997
		"object": true,
1126
		"object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
998
		"applet": true
1127
		"applet": true
Line -... Line 1128...
-
 
1128
	},
-
 
1129
 
999
	},
1130
	data: function( elem, name, data ) {
Line 1000... Line 1131...
1000
 
1131
		if ( !jQuery.acceptData( elem ) ) {
1001
	data: function( elem, name, data ) {
1132
			return;
1002
		if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
1133
		}
Line -... Line 1134...
-
 
1134
 
-
 
1135
		elem = elem == window ?
-
 
1136
			windowData :
-
 
1137
			elem;
1003
			return;
1138
 
1004
		}
1139
		var isNode = elem.nodeType,
1005
 
1140
			id = isNode ? elem[ jQuery.expando ] : null,
1006
		elem = elem == window ?
1141
			cache = jQuery.cache, thisCache;
Line 1007... Line 1142...
1007
			windowData :
1142
 
1008
			elem;
1143
		if ( isNode && !id && typeof name === "string" && data === undefined ) {
1009
 
1144
			return;
1010
		var id = elem[ expando ], cache = jQuery.cache, thisCache;
1145
		}
1011
 
1146
 
-
 
1147
		// Get the data from the object directly
-
 
1148
		if ( !isNode ) {
-
 
1149
			cache = elem;
-
 
1150
 
Line 1012... Line 1151...
1012
		if ( !id && typeof name === "string" && data === undefined ) {
1151
		// Compute a unique ID for the element
1013
			return null;
-
 
1014
		}
1152
		} else if ( !id ) {
1015
 
1153
			elem[ jQuery.expando ] = id = ++jQuery.uuid;
Line 1016... Line 1154...
1016
		// Compute a unique ID for the element
1154
		}
Line 1017... Line 1155...
1017
		if ( !id ) { 
1155
 
1018
			id = ++uuid;
1156
		// Avoid generating a new cache unless none exists and we
1019
		}
1157
		// want to manipulate it.
1020
 
1158
		if ( typeof name === "object" ) {
Line 1021... Line 1159...
1021
		// Avoid generating a new cache unless none exists and we
1159
			if ( isNode ) {
1022
		// want to manipulate it.
1160
				cache[ id ] = jQuery.extend(cache[ id ], name);
Line 1023... Line 1161...
1023
		if ( typeof name === "object" ) {
1161
 
1024
			elem[ expando ] = id;
1162
			} else {
1025
			thisCache = cache[ id ] = jQuery.extend(true, {}, name);
1163
				jQuery.extend( cache, name );
1026
 
1164
			}
Line 1027... Line 1165...
1027
		} else if ( !cache[ id ] ) {
1165
 
1028
			elem[ expando ] = id;
1166
		} else if ( isNode && !cache[ id ] ) {
1029
			cache[ id ] = {};
1167
			cache[ id ] = {};
Line -... Line 1168...
-
 
1168
		}
1030
		}
1169
 
-
 
1170
		thisCache = isNode ? cache[ id ] : cache;
-
 
1171
 
Line 1031... Line 1172...
1031
 
1172
		// Prevent overriding the named cache with undefined values
1032
		thisCache = cache[ id ];
1173
		if ( data !== undefined ) {
1033
 
1174
			thisCache[ name ] = data;
1034
		// Prevent overriding the named cache with undefined values
1175
		}
1035
		if ( data !== undefined ) {
1176
 
Line 1036... Line 1177...
1036
			thisCache[ name ] = data;
1177
		return typeof name === "string" ? thisCache[ name ] : thisCache;
1037
		}
1178
	},
1038
 
1179
 
1039
		return typeof name === "string" ? thisCache[ name ] : thisCache;
1180
	removeData: function( elem, name ) {
1040
	},
1181
		if ( !jQuery.acceptData( elem ) ) {
Line 1041... Line 1182...
1041
 
1182
			return;
1042
	removeData: function( elem, name ) {
1183
		}
1043
		if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
1184
 
1044
			return;
1185
		elem = elem == window ?
Line 1045... Line 1186...
1045
		}
1186
			windowData :
1046
 
1187
			elem;
1047
		elem = elem == window ?
-
 
Line 1048... Line 1188...
1048
			windowData :
1188
 
-
 
1189
		var isNode = elem.nodeType,
1049
			elem;
1190
			id = isNode ? elem[ jQuery.expando ] : elem,
-
 
1191
			cache = jQuery.cache,
-
 
1192
			thisCache = isNode ? cache[ id ] : id;
-
 
1193
 
-
 
1194
		// If we want to remove a specific section of the element's data
-
 
1195
		if ( name ) {
-
 
1196
			if ( thisCache ) {
-
 
1197
				// Remove the section of cache data
-
 
1198
				delete thisCache[ name ];
-
 
1199
 
-
 
1200
				// If we've removed all the data, remove the element's cache
-
 
1201
				if ( isNode && jQuery.isEmptyObject(thisCache) ) {
-
 
1202
					jQuery.removeData( elem );
-
 
1203
				}
-
 
1204
			}
-
 
1205
 
-
 
1206
		// Otherwise, we want to remove all of the element's data
-
 
1207
		} else {
-
 
1208
			if ( isNode && jQuery.support.deleteExpando ) {
1050
 
1209
				delete elem[ jQuery.expando ];
-
 
1210
 
-
 
1211
			} else if ( elem.removeAttribute ) {
1051
		var id = elem[ expando ], cache = jQuery.cache, thisCache = cache[ id ];
1212
				elem.removeAttribute( jQuery.expando );
1052
 
1213
 
Line 1053... Line 1214...
1053
		// If we want to remove a specific section of the element's data
1214
			// Completely remove the data cache
1054
		if ( name ) {
1215
			} else if ( isNode ) {
-
 
1216
				delete cache[ id ];
-
 
1217
 
1055
			if ( thisCache ) {
1218
			// Remove all fields from the object
-
 
1219
			} else {
-
 
1220
				for ( var n in elem ) {
1056
				// Remove the section of cache data
1221
					delete elem[ n ];
-
 
1222
				}
-
 
1223
			}
-
 
1224
		}
-
 
1225
	},
-
 
1226
 
-
 
1227
	// A method for determining if a DOM node can handle the data expando
-
 
1228
	acceptData: function( elem ) {
-
 
1229
		if ( elem.nodeName ) {
-
 
1230
			var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
-
 
1231
 
-
 
1232
			if ( match ) {
-
 
1233
				return !(match === true || elem.getAttribute("classid") !== match);
Line 1057... Line 1234...
1057
				delete thisCache[ name ];
1234
			}
1058
 
1235
		}
1059
				// If we've removed all the data, remove the element's cache
1236
 
1060
				if ( jQuery.isEmptyObject(thisCache) ) {
1237
		return true;
Line 1090... Line 1267...
1090
 
1267
 
1091
		var parts = key.split(".");
1268
		var parts = key.split(".");
Line 1092... Line 1269...
1092
		parts[1] = parts[1] ? "." + parts[1] : "";
1269
		parts[1] = parts[1] ? "." + parts[1] : "";
1093
 
1270
 
Line -... Line 1271...
-
 
1271
		if ( value === undefined ) {
1094
		if ( value === undefined ) {
1272
			data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
1095
			var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
1273
 
-
 
1274
			// Try to fetch any internally stored data first
1096
 
1275
			if ( data === undefined && this.length ) {
-
 
1276
				data = jQuery.data( this[0], key );
1097
			if ( data === undefined && this.length ) {
1277
				data = dataAttr( this[0], key, data );
1098
				data = jQuery.data( this[0], key );
1278
			}
1099
			}
1279
 
-
 
1280
			return data === undefined && parts[1] ?
1100
			return data === undefined && parts[1] ?
1281
				this.data( parts[0] ) :
-
 
1282
				data;
-
 
1283
 
-
 
1284
		} else {
-
 
1285
			return this.each(function() {
1101
				this.data( parts[0] ) :
1286
				var $this = jQuery( this ),
1102
				data;
1287
					args = [ parts[0], value ];
-
 
1288
 
1103
		} else {
1289
				$this.triggerHandler( "setData" + parts[1] + "!", args );
1104
			return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function() {
1290
				jQuery.data( this, key, value );
1105
				jQuery.data( this, key, value );
1291
				$this.triggerHandler( "changeData" + parts[1] + "!", args );
Line 1106... Line 1292...
1106
			});
1292
			});
1107
		}
1293
		}
1108
	},
1294
	},
1109
 
1295
 
1110
	removeData: function( key ) {
1296
	removeData: function( key ) {
1111
		return this.each(function() {
1297
		return this.each(function() {
-
 
1298
			jQuery.removeData( this, key );
-
 
1299
		});
-
 
1300
	}
-
 
1301
});
-
 
1302
 
-
 
1303
function dataAttr( elem, key, data ) {
-
 
1304
	// If nothing was found internally, try to fetch any
-
 
1305
	// data from the HTML5 data-* attribute
-
 
1306
	if ( data === undefined && elem.nodeType === 1 ) {
-
 
1307
		data = elem.getAttribute( "data-" + key );
-
 
1308
 
-
 
1309
		if ( typeof data === "string" ) {
-
 
1310
			try {
-
 
1311
				data = data === "true" ? true :
-
 
1312
				data === "false" ? false :
-
 
1313
				data === "null" ? null :
-
 
1314
				!jQuery.isNaN( data ) ? parseFloat( data ) :
-
 
1315
					rbrace.test( data ) ? jQuery.parseJSON( data ) :
-
 
1316
					data;
-
 
1317
			} catch( e ) {}
-
 
1318
 
-
 
1319
			// Make sure we set the data so it isn't changed later
-
 
1320
			jQuery.data( elem, key, data );
-
 
1321
 
-
 
1322
		} else {
-
 
1323
			data = undefined;
-
 
1324
		}
-
 
1325
	}
-
 
1326
 
-
 
1327
	return data;
-
 
1328
}
1112
			jQuery.removeData( this, key );
1329
 
1113
		});
1330
 
1114
	}
1331
 
1115
});
1332
 
1116
jQuery.extend({
1333
jQuery.extend({
Line 1138... Line 1355...
1138
	},
1355
	},
Line 1139... Line 1356...
1139
 
1356
 
1140
	dequeue: function( elem, type ) {
1357
	dequeue: function( elem, type ) {
Line 1141... Line 1358...
1141
		type = type || "fx";
1358
		type = type || "fx";
-
 
1359
 
Line 1142... Line 1360...
1142
 
1360
		var queue = jQuery.queue( elem, type ),
1143
		var queue = jQuery.queue( elem, type ), fn = queue.shift();
1361
			fn = queue.shift();
1144
 
1362
 
1145
		// If the fx queue is dequeued, always remove the progress sentinel
1363
		// If the fx queue is dequeued, always remove the progress sentinel
Line 1169... Line 1387...
1169
		}
1387
		}
Line 1170... Line 1388...
1170
 
1388
 
1171
		if ( data === undefined ) {
1389
		if ( data === undefined ) {
1172
			return jQuery.queue( this[0], type );
1390
			return jQuery.queue( this[0], type );
1173
		}
1391
		}
1174
		return this.each(function( i, elem ) {
1392
		return this.each(function( i ) {
Line 1175... Line 1393...
1175
			var queue = jQuery.queue( this, type, data );
1393
			var queue = jQuery.queue( this, type, data );
1176
 
1394
 
1177
			if ( type === "fx" && queue[0] !== "inprogress" ) {
1395
			if ( type === "fx" && queue[0] !== "inprogress" ) {
Line 1201... Line 1419...
1201
 
1419
 
1202
	clearQueue: function( type ) {
1420
	clearQueue: function( type ) {
1203
		return this.queue( type || "fx", [] );
1421
		return this.queue( type || "fx", [] );
1204
	}
1422
	}
-
 
1423
});
-
 
1424
 
-
 
1425
 
-
 
1426
 
1205
});
1427
 
1206
var rclass = /[\n\t]/g,
1428
var rclass = /[\n\t]/g,
1207
	rspace = /\s+/,
1429
	rspaces = /\s+/,
1208
	rreturn = /\r/g,
1430
	rreturn = /\r/g,
1209
	rspecialurl = /href|src|style/,
1431
	rspecialurl = /^(?:href|src|style)$/,
1210
	rtype = /(button|input)/i,
1432
	rtype = /^(?:button|input)$/i,
1211
	rfocusable = /(button|input|object|select|textarea)/i,
1433
	rfocusable = /^(?:button|input|object|select|textarea)$/i,
1212
	rclickable = /^(a|area)$/i,
1434
	rclickable = /^a(?:rea)?$/i,
-
 
1435
	rradiocheck = /^(?:radio|checkbox)$/i;
-
 
1436
 
-
 
1437
jQuery.props = {
-
 
1438
	"for": "htmlFor",
-
 
1439
	"class": "className",
-
 
1440
	readonly: "readOnly",
-
 
1441
	maxlength: "maxLength",
-
 
1442
	cellspacing: "cellSpacing",
-
 
1443
	rowspan: "rowSpan",
-
 
1444
	colspan: "colSpan",
-
 
1445
	tabindex: "tabIndex",
-
 
1446
	usemap: "useMap",
-
 
1447
	frameborder: "frameBorder"
Line 1213... Line 1448...
1213
	rradiocheck = /radio|checkbox/;
1448
};
1214
 
1449
 
1215
jQuery.fn.extend({
1450
jQuery.fn.extend({
1216
	attr: function( name, value ) {
1451
	attr: function( name, value ) {
Line 1217... Line 1452...
1217
		return access( this, name, value, true, jQuery.attr );
1452
		return jQuery.access( this, name, value, true, jQuery.attr );
1218
	},
1453
	},
1219
 
1454
 
Line 1233... Line 1468...
1233
				self.addClass( value.call(this, i, self.attr("class")) );
1468
				self.addClass( value.call(this, i, self.attr("class")) );
1234
			});
1469
			});
1235
		}
1470
		}
Line 1236... Line 1471...
1236
 
1471
 
1237
		if ( value && typeof value === "string" ) {
1472
		if ( value && typeof value === "string" ) {
Line 1238... Line 1473...
1238
			var classNames = (value || "").split( rspace );
1473
			var classNames = (value || "").split( rspaces );
1239
 
1474
 
Line 1240... Line 1475...
1240
			for ( var i = 0, l = this.length; i < l; i++ ) {
1475
			for ( var i = 0, l = this.length; i < l; i++ ) {
1241
				var elem = this[i];
1476
				var elem = this[i];
1242
 
1477
 
Line 1243... Line 1478...
1243
				if ( elem.nodeType === 1 ) {
1478
				if ( elem.nodeType === 1 ) {
1244
					if ( !elem.className ) {
1479
					if ( !elem.className ) {
-
 
1480
						elem.className = value;
-
 
1481
 
1245
						elem.className = value;
1482
					} else {
1246
 
1483
						var className = " " + elem.className + " ",
1247
					} else {
1484
							setClass = elem.className;
1248
						var className = " " + elem.className + " ", setClass = elem.className;
1485
 
1249
						for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
1486
						for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
Line 1267... Line 1504...
1267
				self.removeClass( value.call(this, i, self.attr("class")) );
1504
				self.removeClass( value.call(this, i, self.attr("class")) );
1268
			});
1505
			});
1269
		}
1506
		}
Line 1270... Line 1507...
1270
 
1507
 
1271
		if ( (value && typeof value === "string") || value === undefined ) {
1508
		if ( (value && typeof value === "string") || value === undefined ) {
Line 1272... Line 1509...
1272
			var classNames = (value || "").split(rspace);
1509
			var classNames = (value || "").split( rspaces );
1273
 
1510
 
Line 1274... Line 1511...
1274
			for ( var i = 0, l = this.length; i < l; i++ ) {
1511
			for ( var i = 0, l = this.length; i < l; i++ ) {
Line 1291... Line 1528...
1291
 
1528
 
1292
		return this;
1529
		return this;
Line 1293... Line 1530...
1293
	},
1530
	},
-
 
1531
 
1294
 
1532
	toggleClass: function( value, stateVal ) {
Line 1295... Line 1533...
1295
	toggleClass: function( value, stateVal ) {
1533
		var type = typeof value,
1296
		var type = typeof value, isBool = typeof stateVal === "boolean";
1534
			isBool = typeof stateVal === "boolean";
1297
 
1535
 
1298
		if ( jQuery.isFunction( value ) ) {
1536
		if ( jQuery.isFunction( value ) ) {
Line 1303... Line 1541...
1303
		}
1541
		}
Line 1304... Line 1542...
1304
 
1542
 
1305
		return this.each(function() {
1543
		return this.each(function() {
1306
			if ( type === "string" ) {
1544
			if ( type === "string" ) {
-
 
1545
				// toggle individual class names
-
 
1546
				var className,
1307
				// toggle individual class names
1547
					i = 0,
1308
				var className, i = 0, self = jQuery(this),
1548
					self = jQuery( this ),
1309
					state = stateVal,
1549
					state = stateVal,
Line 1310... Line 1550...
1310
					classNames = value.split( rspace );
1550
					classNames = value.split( rspaces );
1311
 
1551
 
1312
				while ( (className = classNames[ i++ ]) ) {
1552
				while ( (className = classNames[ i++ ]) ) {
1313
					// check each className given, space seperated list
1553
					// check each className given, space seperated list
Line 1337... Line 1577...
1337
 
1577
 
1338
		return false;
1578
		return false;
Line 1339... Line 1579...
1339
	},
1579
	},
1340
 
1580
 
1341
	val: function( value ) {
1581
	val: function( value ) {
Line 1342... Line 1582...
1342
		if ( value === undefined ) {
1582
		if ( !arguments.length ) {
1343
			var elem = this[0];
1583
			var elem = this[0];
-
 
1584
 
-
 
1585
			if ( elem ) {
-
 
1586
				if ( jQuery.nodeName( elem, "option" ) ) {
1344
 
1587
					// attributes.value is undefined in Blackberry 4.7 but
1345
			if ( elem ) {
1588
					// uses .value. See #6932
Line 1346... Line 1589...
1346
				if ( jQuery.nodeName( elem, "option" ) ) {
1589
					var val = elem.attributes.value;
1347
					return (elem.attributes.value || {}).specified ? elem.value : elem.text;
1590
					return !val || val.specified ? elem.value : elem.text;
1348
				}
1591
				}
Line 1361... Line 1604...
1361
 
1604
 
1362
					// Loop through all the selected options
1605
					// Loop through all the selected options
1363
					for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
1606
					for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
Line 1364... Line 1607...
1364
						var option = options[ i ];
1607
						var option = options[ i ];
-
 
1608
 
-
 
1609
						// Don't return options that are disabled or in a disabled optgroup
-
 
1610
						if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && 
1365
 
1611
								(!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
1366
						if ( option.selected ) {
1612
 
Line 1367... Line 1613...
1367
							// Get the specifc value for the option
1613
							// Get the specific value for the option
1368
							value = jQuery(option).val();
1614
							value = jQuery(option).val();
1369
 
1615
 
Line 1405... Line 1651...
1405
 
1651
 
1406
			if ( isFunction ) {
1652
			if ( isFunction ) {
1407
				val = value.call(this, i, self.val());
1653
				val = value.call(this, i, self.val());
Line 1408... Line 1654...
1408
			}
1654
			}
1409
 
1655
 
-
 
1656
			// Treat null/undefined as ""; convert numbers to string
1410
			// Typecast each time if the value is a Function and the appended
1657
			if ( val == null ) {
1411
			// value is therefore different each time.
1658
				val = "";
-
 
1659
			} else if ( typeof val === "number" ) {
-
 
1660
				val += "";
-
 
1661
			} else if ( jQuery.isArray(val) ) {
-
 
1662
				val = jQuery.map(val, function (value) {
1412
			if ( typeof val === "number" ) {
1663
					return value == null ? "" : value + "";
Line 1413... Line 1664...
1413
				val += "";
1664
				});
1414
			}
1665
			}
Line 1461... Line 1712...
1461
			set = value !== undefined;
1712
			set = value !== undefined;
Line 1462... Line 1713...
1462
 
1713
 
1463
		// Try to normalize/fix the name
1714
		// Try to normalize/fix the name
Line 1464... Line -...
1464
		name = notxml && jQuery.props[ name ] || name;
-
 
1465
 
-
 
1466
		// Only do all the following if this is a node (faster for style)
1715
		name = notxml && jQuery.props[ name ] || name;
1467
		if ( elem.nodeType === 1 ) {
1716
 
1468
			// These attributes require special treatment
-
 
1469
			var special = rspecialurl.test( name );
-
 
1470
 
-
 
1471
			// Safari mis-reports the default selected property of an option
-
 
1472
			// Accessing the parent's selectedIndex property fixes it
-
 
1473
			if ( name === "selected" && !jQuery.support.optSelected ) {
-
 
1474
				var parent = elem.parentNode;
-
 
1475
				if ( parent ) {
-
 
1476
					parent.selectedIndex;
-
 
1477
	
-
 
1478
					// Make sure that it also works with optgroups, see #5701
-
 
1479
					if ( parent.parentNode ) {
-
 
1480
						parent.parentNode.selectedIndex;
-
 
1481
					}
-
 
Line 1482... Line 1717...
1482
				}
1717
		// These attributes require special treatment
1483
			}
1718
		var special = rspecialurl.test( name );
1484
 
-
 
1485
			// If applicable, access the attribute via the DOM 0 way
1719
 
1486
			if ( name in elem && notxml && !special ) {
1720
		// Safari mis-reports the default selected property of an option
1487
				if ( set ) {
1721
		// Accessing the parent's selectedIndex property fixes it
1488
					// We can't allow the type property to be changed (since it causes problems in IE)
1722
		if ( name === "selected" && !jQuery.support.optSelected ) {
Line -... Line 1723...
-
 
1723
			var parent = elem.parentNode;
-
 
1724
			if ( parent ) {
1489
					if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) {
1725
				parent.selectedIndex;
1490
						jQuery.error( "type property can't be changed" );
1726
 
-
 
1727
				// Make sure that it also works with optgroups, see #5701
-
 
1728
				if ( parent.parentNode ) {
Line -... Line 1729...
-
 
1729
					parent.parentNode.selectedIndex;
-
 
1730
				}
1491
					}
1731
			}
-
 
1732
		}
-
 
1733
 
1492
 
1734
		// If applicable, access the attribute via the DOM 0 way
1493
					elem[ name ] = value;
1735
		// 'in' checks fail in Blackberry 4.7 #6931
1494
				}
1736
		if ( (name in elem || elem[ name ] !== undefined) && notxml && !special ) {
Line 1495... Line 1737...
1495
 
1737
			if ( set ) {
1496
				// browsers index elements by id/name on forms, give priority to attributes.
-
 
1497
				if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) {
1738
				// We can't allow the type property to be changed (since it causes problems in IE)
1498
					return elem.getAttributeNode( name ).nodeValue;
1739
				if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) {
-
 
1740
					jQuery.error( "type property can't be changed" );
Line 1499... Line -...
1499
				}
-
 
1500
 
-
 
1501
				// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
-
 
1502
				// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
1741
				}
1503
				if ( name === "tabIndex" ) {
1742
 
1504
					var attributeNode = elem.getAttributeNode( "tabIndex" );
1743
				if ( value === null ) {
-
 
1744
					if ( elem.nodeType === 1 ) {
Line -... Line 1745...
-
 
1745
						elem.removeAttribute( name );
-
 
1746
					}
1505
 
1747
 
1506
					return attributeNode && attributeNode.specified ?
1748
				} else {
Line 1507... Line 1749...
1507
						attributeNode.value :
1749
					elem[ name ] = value;
-
 
1750
				}
1508
						rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
1751
			}
1509
							0 :
1752
 
1510
							undefined;
-
 
Line -... Line 1753...
-
 
1753
			// browsers index elements by id/name on forms, give priority to attributes.
1511
				}
1754
			if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) {
-
 
1755
				return elem.getAttributeNode( name ).nodeValue;
-
 
1756
			}
-
 
1757
 
1512
 
1758
			// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
Line -... Line 1759...
-
 
1759
			// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
-
 
1760
			if ( name === "tabIndex" ) {
-
 
1761
				var attributeNode = elem.getAttributeNode( "tabIndex" );
-
 
1762
 
1513
				return elem[ name ];
1763
				return attributeNode && attributeNode.specified ?
1514
			}
-
 
1515
 
1764
					attributeNode.value :
1516
			if ( !jQuery.support.style && notxml && name === "style" ) {
1765
					rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
Line 1517... Line 1766...
1517
				if ( set ) {
1766
						0 :
-
 
1767
						undefined;
-
 
1768
			}
1518
					elem.style.cssText = "" + value;
1769
 
1519
				}
1770
			return elem[ name ];
1520
 
1771
		}
-
 
1772
 
Line 1521... Line 1773...
1521
				return elem.style.cssText;
1773
		if ( !jQuery.support.style && notxml && name === "style" ) {
-
 
1774
			if ( set ) {
-
 
1775
				elem.style.cssText = "" + value;
1522
			}
1776
			}
1523
 
1777
 
Line -... Line 1778...
-
 
1778
			return elem.style.cssText;
1524
			if ( set ) {
1779
		}
-
 
1780
 
-
 
1781
		if ( set ) {
-
 
1782
			// convert the value to a string (all browsers do this but IE) see #1070
1525
				// convert the value to a string (all browsers do this but IE) see #1070
1783
			elem.setAttribute( name, "" + value );
1526
				elem.setAttribute( name, "" + value );
1784
		}
1527
			}
1785
 
1528
 
1786
		// Ensure that missing attributes return undefined
-
 
1787
		// Blackberry 4.7 returns "" from getAttribute #6938
-
 
1788
		if ( !elem.attributes[ name ] && (elem.hasAttribute && !elem.hasAttribute( name )) ) {
-
 
1789
			return undefined;
-
 
1790
		}
1529
			var attr = !jQuery.support.hrefNormalized && notxml && special ?
1791
 
-
 
1792
		var attr = !jQuery.support.hrefNormalized && notxml && special ?
-
 
1793
				// Some attributes require a special call on IE
-
 
1794
				elem.getAttribute( name, 2 ) :
-
 
1795
				elem.getAttribute( name );
1530
					// Some attributes require a special call on IE
1796
 
1531
					elem.getAttribute( name, 2 ) :
1797
		// Non-existent attributes return null, we normalize to undefined
1532
					elem.getAttribute( name );
-
 
1533
 
-
 
1534
			// Non-existent attributes return null, we normalize to undefined
1798
		return attr === null ? undefined : attr;
-
 
1799
	}
Line 1535... Line 1800...
1535
			return attr === null ? undefined : attr;
1800
});
1536
		}
1801
 
1537
 
1802
 
1538
		// elem is actually elem.style ... set the style
1803
 
Line 1561... Line 1826...
1561
			return;
1826
			return;
1562
		}
1827
		}
Line 1563... Line 1828...
1563
 
1828
 
1564
		// For whatever reason, IE has trouble passing the window object
1829
		// For whatever reason, IE has trouble passing the window object
1565
		// around, causing it to be cloned in the process
1830
		// around, causing it to be cloned in the process
1566
		if ( elem.setInterval && ( elem !== window && !elem.frameElement ) ) {
1831
		if ( jQuery.isWindow( elem ) && ( elem !== window && !elem.frameElement ) ) {
1567
			elem = window;
1832
			elem = window;
Line -... Line 1833...
-
 
1833
		}
-
 
1834
 
-
 
1835
		if ( handler === false ) {
-
 
1836
			handler = returnFalse;
-
 
1837
		} else if ( !handler ) {
-
 
1838
			// Fixes bug #7229. Fix recommended by jdalton
-
 
1839
		  return;
1568
		}
1840
		}
Line 1569... Line 1841...
1569
 
1841
 
1570
		var handleObjIn, handleObj;
1842
		var handleObjIn, handleObj;
1571
 
1843
 
Line 1586... Line 1858...
1586
		// banned noData elements
1858
		// banned noData elements
1587
		if ( !elemData ) {
1859
		if ( !elemData ) {
1588
			return;
1860
			return;
1589
		}
1861
		}
Line -... Line 1862...
-
 
1862
 
-
 
1863
		// Use a key less likely to result in collisions for plain JS objects.
1590
 
1864
		// Fixes bug #7150.
-
 
1865
		var eventKey = elem.nodeType ? "events" : "__events__",
1591
		var events = elemData.events = elemData.events || {},
1866
			events = elemData[ eventKey ],
-
 
1867
			eventHandle = elemData.handle;
-
 
1868
			
-
 
1869
		if ( typeof events === "function" ) {
-
 
1870
			// On plain objects events is a fn that holds the the data
-
 
1871
			// which prevents this data from being JSON serialized
-
 
1872
			// the function does not need to be called, it just contains the data
-
 
1873
			eventHandle = events.handle;
-
 
1874
			events = events.events;
-
 
1875
 
-
 
1876
		} else if ( !events ) {
-
 
1877
			if ( !elem.nodeType ) {
-
 
1878
				// On plain objects, create a fn that acts as the holder
-
 
1879
				// of the values to avoid JSON serialization of event data
-
 
1880
				elemData[ eventKey ] = elemData = function(){};
-
 
1881
			}
-
 
1882
 
-
 
1883
			elemData.events = events = {};
Line 1592... Line 1884...
1592
			eventHandle = elemData.handle, eventHandle;
1884
		}
1593
 
1885
 
1594
		if ( !eventHandle ) {
1886
		if ( !eventHandle ) {
1595
			elemData.handle = eventHandle = function() {
1887
			elemData.handle = eventHandle = function() {
Line 1626... Line 1918...
1626
				namespaces = [];
1918
				namespaces = [];
1627
				handleObj.namespace = "";
1919
				handleObj.namespace = "";
1628
			}
1920
			}
Line 1629... Line 1921...
1629
 
1921
 
-
 
1922
			handleObj.type = type;
1630
			handleObj.type = type;
1923
			if ( !handleObj.guid ) {
-
 
1924
				handleObj.guid = handler.guid;
Line 1631... Line 1925...
1631
			handleObj.guid = handler.guid;
1925
			}
1632
 
1926
 
1633
			// Get the current list of functions bound to this event
1927
			// Get the current list of functions bound to this event
Line 1678... Line 1972...
1678
		// don't do events on text and comment nodes
1972
		// don't do events on text and comment nodes
1679
		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
1973
		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
1680
			return;
1974
			return;
1681
		}
1975
		}
Line -... Line 1976...
-
 
1976
 
-
 
1977
		if ( handler === false ) {
-
 
1978
			handler = returnFalse;
-
 
1979
		}
1682
 
1980
 
-
 
1981
		var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType,
1683
		var ret, type, fn, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType,
1982
			eventKey = elem.nodeType ? "events" : "__events__",
1684
			elemData = jQuery.data( elem ),
1983
			elemData = jQuery.data( elem ),
Line 1685... Line 1984...
1685
			events = elemData && elemData.events;
1984
			events = elemData && elemData[ eventKey ];
1686
 
1985
 
1687
		if ( !elemData || !events ) {
1986
		if ( !elemData || !events ) {
-
 
1987
			return;
-
 
1988
		}
-
 
1989
		
-
 
1990
		if ( typeof events === "function" ) {
-
 
1991
			elemData = events;
Line 1688... Line 1992...
1688
			return;
1992
			events = events.events;
1689
		}
1993
		}
1690
 
1994
 
1691
		// types is actually an event object here
1995
		// types is actually an event object here
Line 1719... Line 2023...
1719
				// Namespaced event handlers
2023
				// Namespaced event handlers
1720
				namespaces = type.split(".");
2024
				namespaces = type.split(".");
1721
				type = namespaces.shift();
2025
				type = namespaces.shift();
Line 1722... Line 2026...
1722
 
2026
 
1723
				namespace = new RegExp("(^|\\.)" + 
2027
				namespace = new RegExp("(^|\\.)" + 
1724
					jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)")
2028
					jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)");
Line 1725... Line 2029...
1725
			}
2029
			}
Line 1726... Line 2030...
1726
 
2030
 
1727
			eventType = events[ type ];
2031
			eventType = events[ type ];
1728
 
2032
 
Line 1729... Line 2033...
1729
			if ( !eventType ) {
2033
			if ( !eventType ) {
1730
				continue;
2034
				continue;
1731
			}
2035
			}
Line 1732... Line 2036...
1732
 
2036
 
1733
			if ( !handler ) {
2037
			if ( !handler ) {
1734
				for ( var j = 0; j < eventType.length; j++ ) {
2038
				for ( j = 0; j < eventType.length; j++ ) {
Line 1743... Line 2047...
1743
				continue;
2047
				continue;
1744
			}
2048
			}
Line 1745... Line 2049...
1745
 
2049
 
Line 1746... Line 2050...
1746
			special = jQuery.event.special[ type ] || {};
2050
			special = jQuery.event.special[ type ] || {};
1747
 
2051
 
Line 1748... Line 2052...
1748
			for ( var j = pos || 0; j < eventType.length; j++ ) {
2052
			for ( j = pos || 0; j < eventType.length; j++ ) {
1749
				handleObj = eventType[ j ];
2053
				handleObj = eventType[ j ];
1750
 
2054
 
Line 1767... Line 2071...
1767
			}
2071
			}
Line 1768... Line 2072...
1768
 
2072
 
1769
			// remove generic event handler if no more handlers exist
2073
			// remove generic event handler if no more handlers exist
1770
			if ( eventType.length === 0 || pos != null && eventType.length === 1 ) {
2074
			if ( eventType.length === 0 || pos != null && eventType.length === 1 ) {
1771
				if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
2075
				if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
1772
					removeEvent( elem, type, elemData.handle );
2076
					jQuery.removeEvent( elem, type, elemData.handle );
Line 1773... Line 2077...
1773
				}
2077
				}
1774
 
2078
 
1775
				ret = null;
2079
				ret = null;
Line 1785... Line 2089...
1785
			}
2089
			}
Line 1786... Line 2090...
1786
 
2090
 
1787
			delete elemData.events;
2091
			delete elemData.events;
Line -... Line 2092...
-
 
2092
			delete elemData.handle;
-
 
2093
 
-
 
2094
			if ( typeof elemData === "function" ) {
1788
			delete elemData.handle;
2095
				jQuery.removeData( elem, eventKey );
1789
 
2096
 
1790
			if ( jQuery.isEmptyObject( elemData ) ) {
2097
			} else if ( jQuery.isEmptyObject( elemData ) ) {
1791
				jQuery.removeData( elem );
2098
				jQuery.removeData( elem );
1792
			}
2099
			}
Line 1800... Line 2107...
1800
			bubbling = arguments[3];
2107
			bubbling = arguments[3];
Line 1801... Line 2108...
1801
 
2108
 
1802
		if ( !bubbling ) {
2109
		if ( !bubbling ) {
1803
			event = typeof event === "object" ?
2110
			event = typeof event === "object" ?
1804
				// jQuery.Event object
2111
				// jQuery.Event object
1805
				event[expando] ? event :
2112
				event[ jQuery.expando ] ? event :
1806
				// Object literal
2113
				// Object literal
1807
				jQuery.extend( jQuery.Event(type), event ) :
2114
				jQuery.extend( jQuery.Event(type), event ) :
1808
				// Just the event type (string)
2115
				// Just the event type (string)
Line 1845... Line 2152...
1845
		}
2152
		}
Line 1846... Line 2153...
1846
 
2153
 
Line 1847... Line 2154...
1847
		event.currentTarget = elem;
2154
		event.currentTarget = elem;
-
 
2155
 
1848
 
2156
		// Trigger the event, it is assumed that "handle" is a function
-
 
2157
		var handle = elem.nodeType ?
-
 
2158
			jQuery.data( elem, "handle" ) :
1849
		// Trigger the event, it is assumed that "handle" is a function
2159
			(jQuery.data( elem, "__events__" ) || {}).handle;
1850
		var handle = jQuery.data( elem, "handle" );
2160
 
1851
		if ( handle ) {
2161
		if ( handle ) {
Line 1852... Line 2162...
1852
			handle.apply( elem, data );
2162
			handle.apply( elem, data );
Line 1857... Line 2167...
1857
		// Trigger an inline bound script
2167
		// Trigger an inline bound script
1858
		try {
2168
		try {
1859
			if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) {
2169
			if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) {
1860
				if ( elem[ "on" + type ] && elem[ "on" + type ].apply( elem, data ) === false ) {
2170
				if ( elem[ "on" + type ] && elem[ "on" + type ].apply( elem, data ) === false ) {
1861
					event.result = false;
2171
					event.result = false;
-
 
2172
					event.preventDefault();
1862
				}
2173
				}
1863
			}
2174
			}
Line 1864... Line 2175...
1864
 
2175
 
1865
		// prevent IE from throwing an error for some elements with some event types, see #3533
2176
		// prevent IE from throwing an error for some elements with some event types, see #3533
Line 1866... Line 2177...
1866
		} catch (e) {}
2177
		} catch (inlineError) {}
1867
 
2178
 
Line 1868... Line 2179...
1868
		if ( !event.isPropagationStopped() && parent ) {
2179
		if ( !event.isPropagationStopped() && parent ) {
-
 
2180
			jQuery.event.trigger( event, data, parent, true );
1869
			jQuery.event.trigger( event, data, parent, true );
2181
 
-
 
2182
		} else if ( !event.isDefaultPrevented() ) {
1870
 
2183
			var old,
1871
		} else if ( !event.isDefaultPrevented() ) {
2184
				target = event.target,
Line 1872... Line 2185...
1872
			var target = event.target, old,
2185
				targetType = type.replace( rnamespaces, "" ),
1873
				isClick = jQuery.nodeName(target, "a") && type === "click",
2186
				isClick = jQuery.nodeName( target, "a" ) && targetType === "click",
Line 1874... Line 2187...
1874
				special = jQuery.event.special[ type ] || {};
2187
				special = jQuery.event.special[ targetType ] || {};
1875
 
2188
 
1876
			if ( (!special._default || special._default.call( elem, event ) === false) && 
2189
			if ( (!special._default || special._default.call( elem, event ) === false) && 
1877
				!isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) {
2190
				!isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) {
Line 1878... Line 2191...
1878
 
2191
 
1879
				try {
2192
				try {
1880
					if ( target[ type ] ) {
2193
					if ( target[ targetType ] ) {
Line 1881... Line 2194...
1881
						// Make sure that we don't accidentally re-trigger the onFOO events
2194
						// Make sure that we don't accidentally re-trigger the onFOO events
1882
						old = target[ "on" + type ];
2195
						old = target[ "on" + targetType ];
1883
 
2196
 
Line 1884... Line 2197...
1884
						if ( old ) {
2197
						if ( old ) {
1885
							target[ "on" + type ] = null;
2198
							target[ "on" + targetType ] = null;
Line 1886... Line 2199...
1886
						}
2199
						}
1887
 
2200
 
1888
						jQuery.event.triggered = true;
2201
						jQuery.event.triggered = true;
Line 1889... Line 2202...
1889
						target[ type ]();
2202
						target[ targetType ]();
1890
					}
2203
					}
1891
 
2204
 
1892
				// prevent IE from throwing an error for some elements with some event types, see #3533
2205
				// prevent IE from throwing an error for some elements with some event types, see #3533
Line 1893... Line 2206...
1893
				} catch (e) {}
2206
				} catch (triggerError) {}
1894
 
2207
 
-
 
2208
				if ( old ) {
-
 
2209
					target[ "on" + targetType ] = old;
Line 1895... Line 2210...
1895
				if ( old ) {
2210
				}
1896
					target[ "on" + type ] = old;
2211
 
Line 1897... Line 2212...
1897
				}
2212
				jQuery.event.triggered = false;
1898
 
2213
			}
Line 1899... Line 2214...
1899
				jQuery.event.triggered = false;
2214
		}
1900
			}
2215
	},
1901
		}
2216
 
-
 
2217
	handle: function( event ) {
1902
	},
2218
		var all, handlers, namespaces, namespace_re, events,
-
 
2219
			namespace_sort = [],
-
 
2220
			args = jQuery.makeArray( arguments );
-
 
2221
 
-
 
2222
		event = args[0] = jQuery.event.fix( event || window.event );
-
 
2223
		event.currentTarget = this;
-
 
2224
 
-
 
2225
		// Namespaced event handlers
-
 
2226
		all = event.type.indexOf(".") < 0 && !event.exclusive;
1903
 
2227
 
Line 1904... Line 2228...
1904
	handle: function( event ) {
2228
		if ( !all ) {
Line 1905... Line 2229...
1905
		var all, handlers, namespaces, namespace, events;
2229
			namespaces = event.type.split(".");
1906
 
2230
			event.type = namespaces.shift();
1907
		event = arguments[0] = jQuery.event.fix( event || window.event );
2231
			namespace_sort = namespaces.slice(0).sort();
Line 1908... Line 2232...
1908
		event.currentTarget = this;
2232
			namespace_re = new RegExp("(^|\\.)" + namespace_sort.join("\\.(?:.*\\.)?") + "(\\.|$)");
1909
 
2233
		}
Line 1910... Line 2234...
1910
		// Namespaced event handlers
2234
 
1911
		all = event.type.indexOf(".") < 0 && !event.exclusive;
2235
		event.namespace = event.namespace || namespace_sort.join(".");
1912
 
2236
 
1913
		if ( !all ) {
2237
		events = jQuery.data(this, this.nodeType ? "events" : "__events__");
1914
			namespaces = event.type.split(".");
2238
 
1915
			event.type = namespaces.shift();
2239
		if ( typeof events === "function" ) {
1916
			namespace = new RegExp("(^|\\.)" + namespaces.slice(0).sort().join("\\.(?:.*\\.)?") + "(\\.|$)");
2240
			events = events.events;
Line 1917... Line 2241...
1917
		}
2241
		}
Line 1918... Line 2242...
1918
 
2242
 
1919
		var events = jQuery.data(this, "events"), handlers = events[ event.type ];
2243
		handlers = (events || {})[ event.type ];
1920
 
2244
 
1921
		if ( events && handlers ) {
2245
		if ( events && handlers ) {
Line 1951... Line 2275...
1951
		}
2275
		}
Line 1952... Line 2276...
1952
 
2276
 
1953
		return event.result;
2277
		return event.result;
Line 1954... Line 2278...
1954
	},
2278
	},
Line 1955... Line 2279...
1955
 
2279
 
1956
	props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
2280
	props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
1957
 
2281
 
1958
	fix: function( event ) {
2282
	fix: function( event ) {
Line 1959... Line 2283...
1959
		if ( event[ expando ] ) {
2283
		if ( event[ jQuery.expando ] ) {
1960
			return event;
2284
			return event;
Line 1970... Line 2294...
1970
			event[ prop ] = originalEvent[ prop ];
2294
			event[ prop ] = originalEvent[ prop ];
1971
		}
2295
		}
Line 1972... Line 2296...
1972
 
2296
 
1973
		// Fix target property, if necessary
2297
		// Fix target property, if necessary
1974
		if ( !event.target ) {
2298
		if ( !event.target ) {
-
 
2299
			// Fixes #1925 where srcElement might not be defined either
1975
			event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either
2300
			event.target = event.srcElement || document;
Line 1976... Line 2301...
1976
		}
2301
		}
1977
 
2302
 
1978
		// check if target is a textnode (safari)
2303
		// check if target is a textnode (safari)
Line 1985... Line 2310...
1985
			event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;
2310
			event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;
1986
		}
2311
		}
Line 1987... Line 2312...
1987
 
2312
 
1988
		// Calculate pageX/Y if missing and clientX/Y available
2313
		// Calculate pageX/Y if missing and clientX/Y available
1989
		if ( event.pageX == null && event.clientX != null ) {
2314
		if ( event.pageX == null && event.clientX != null ) {
-
 
2315
			var doc = document.documentElement,
-
 
2316
				body = document.body;
1990
			var doc = document.documentElement, body = document.body;
2317
 
1991
			event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
2318
			event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
1992
			event.pageY = event.clientY + (doc && doc.scrollTop  || body && body.scrollTop  || 0) - (doc && doc.clientTop  || body && body.clientTop  || 0);
2319
			event.pageY = event.clientY + (doc && doc.scrollTop  || body && body.scrollTop  || 0) - (doc && doc.clientTop  || body && body.clientTop  || 0);
Line 1993... Line 2320...
1993
		}
2320
		}
1994
 
2321
 
1995
		// Add which for key events
2322
		// Add which for key events
1996
		if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) ) {
2323
		if ( event.which == null && (event.charCode != null || event.keyCode != null) ) {
Line 1997... Line 2324...
1997
			event.which = event.charCode || event.keyCode;
2324
			event.which = event.charCode != null ? event.charCode : event.keyCode;
1998
		}
2325
		}
1999
 
2326
 
Line 2024... Line 2351...
2024
			teardown: jQuery.noop
2351
			teardown: jQuery.noop
2025
		},
2352
		},
Line 2026... Line 2353...
2026
 
2353
 
2027
		live: {
2354
		live: {
-
 
2355
			add: function( handleObj ) {
-
 
2356
				jQuery.event.add( this,
2028
			add: function( handleObj ) {
2357
					liveConvert( handleObj.origType, handleObj.selector ),
2029
				jQuery.event.add( this, handleObj.origType, jQuery.extend({}, handleObj, {handler: liveHandler}) ); 
2358
					jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) ); 
Line 2030... Line 2359...
2030
			},
2359
			},
2031
 
-
 
2032
			remove: function( handleObj ) {
-
 
2033
				var remove = true,
-
 
2034
					type = handleObj.origType.replace(rnamespaces, "");
-
 
2035
				
-
 
2036
				jQuery.each( jQuery.data(this, "events").live || [], function() {
-
 
2037
					if ( type === this.origType.replace(rnamespaces, "") ) {
-
 
2038
						remove = false;
-
 
2039
						return false;
-
 
2040
					}
-
 
2041
				});
-
 
2042
 
2360
 
2043
				if ( remove ) {
-
 
2044
					jQuery.event.remove( this, handleObj.origType, liveHandler );
2361
			remove: function( handleObj ) {
2045
				}
-
 
2046
			}
2362
				jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj );
Line 2047... Line 2363...
2047
 
2363
			}
2048
		},
2364
		},
2049
 
2365
 
2050
		beforeunload: {
2366
		beforeunload: {
2051
			setup: function( data, namespaces, eventHandle ) {
2367
			setup: function( data, namespaces, eventHandle ) {
2052
				// We only want to do this special case on windows
2368
				// We only want to do this special case on windows
2053
				if ( this.setInterval ) {
-
 
2054
					this.onbeforeunload = eventHandle;
-
 
2055
				}
2369
				if ( jQuery.isWindow( this ) ) {
-
 
2370
					this.onbeforeunload = eventHandle;
2056
 
2371
				}
2057
				return false;
2372
			},
2058
			},
2373
 
2059
			teardown: function( namespaces, eventHandle ) {
2374
			teardown: function( namespaces, eventHandle ) {
2060
				if ( this.onbeforeunload === eventHandle ) {
2375
				if ( this.onbeforeunload === eventHandle ) {
2061
					this.onbeforeunload = null;
2376
					this.onbeforeunload = null;
2062
				}
2377
				}
2063
			}
2378
			}
Line 2064... Line 2379...
2064
		}
2379
		}
2065
	}
2380
	}
-
 
2381
};
2066
};
2382
 
-
 
2383
jQuery.removeEvent = document.removeEventListener ?
2067
 
2384
	function( elem, type, handle ) {
2068
var removeEvent = document.removeEventListener ?
2385
		if ( elem.removeEventListener ) {
-
 
2386
			elem.removeEventListener( type, handle, false );
2069
	function( elem, type, handle ) {
2387
		}
-
 
2388
	} : 
2070
		elem.removeEventListener( type, handle, false );
2389
	function( elem, type, handle ) {
Line 2071... Line 2390...
2071
	} : 
2390
		if ( elem.detachEvent ) {
2072
	function( elem, type, handle ) {
2391
			elem.detachEvent( "on" + type, handle );
2073
		elem.detachEvent( "on" + type, handle );
2392
		}
Line 2088... Line 2407...
2088
		this.type = src;
2407
		this.type = src;
2089
	}
2408
	}
Line 2090... Line 2409...
2090
 
2409
 
2091
	// timeStamp is buggy for some events on Firefox(#3843)
2410
	// timeStamp is buggy for some events on Firefox(#3843)
2092
	// So we won't rely on the native value
2411
	// So we won't rely on the native value
Line 2093... Line 2412...
2093
	this.timeStamp = now();
2412
	this.timeStamp = jQuery.now();
2094
 
2413
 
2095
	// Mark it as fixed
2414
	// Mark it as fixed
Line 2096... Line 2415...
2096
	this[ expando ] = true;
2415
	this[ jQuery.expando ] = true;
2097
};
2416
};
2098
 
2417
 
Line 2115... Line 2434...
2115
		}
2434
		}
Line 2116... Line 2435...
2116
		
2435
		
2117
		// if preventDefault exists run it on the original event
2436
		// if preventDefault exists run it on the original event
2118
		if ( e.preventDefault ) {
2437
		if ( e.preventDefault ) {
2119
			e.preventDefault();
2438
			e.preventDefault();
2120
		}
2439
 
-
 
2440
		// otherwise set the returnValue property of the original event to false (IE)
2121
		// otherwise set the returnValue property of the original event to false (IE)
2441
		} else {
-
 
2442
			e.returnValue = false;
2122
		e.returnValue = false;
2443
		}
2123
	},
2444
	},
2124
	stopPropagation: function() {
2445
	stopPropagation: function() {
Line 2125... Line 2446...
2125
		this.isPropagationStopped = returnTrue;
2446
		this.isPropagationStopped = returnTrue;
Line 2197... Line 2518...
2197
 
2518
 
2198
	jQuery.event.special.submit = {
2519
	jQuery.event.special.submit = {
2199
		setup: function( data, namespaces ) {
2520
		setup: function( data, namespaces ) {
2200
			if ( this.nodeName.toLowerCase() !== "form" ) {
2521
			if ( this.nodeName.toLowerCase() !== "form" ) {
2201
				jQuery.event.add(this, "click.specialSubmit", function( e ) {
2522
				jQuery.event.add(this, "click.specialSubmit", function( e ) {
-
 
2523
					var elem = e.target,
Line 2202... Line 2524...
2202
					var elem = e.target, type = elem.type;
2524
						type = elem.type;
-
 
2525
 
2203
 
2526
					if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
2204
					if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
2527
						e.liveFired = undefined;
2205
						return trigger( "submit", this, arguments );
2528
						return trigger( "submit", this, arguments );
Line 2206... Line 2529...
2206
					}
2529
					}
2207
				});
2530
				});
-
 
2531
	 
Line 2208... Line 2532...
2208
	 
2532
				jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
-
 
2533
					var elem = e.target,
2209
				jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
2534
						type = elem.type;
2210
					var elem = e.target, type = elem.type;
2535
 
2211
 
2536
					if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
Line 2212... Line 2537...
2212
					if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
2537
						e.liveFired = undefined;
Line 2227... Line 2552...
2227
}
2552
}
Line 2228... Line 2553...
2228
 
2553
 
2229
// change delegation, happens here so we have bind.
2554
// change delegation, happens here so we have bind.
Line 2230... Line -...
2230
if ( !jQuery.support.changeBubbles ) {
-
 
2231
 
-
 
2232
	var formElems = /textarea|input|select/i,
2555
if ( !jQuery.support.changeBubbles ) {
Line 2233... Line 2556...
2233
 
2556
 
2234
	changeFilters,
2557
	var changeFilters,
Line 2235... Line 2558...
2235
 
2558
 
Line 2254... Line 2577...
2254
	},
2577
	},
Line 2255... Line 2578...
2255
 
2578
 
2256
	testChange = function testChange( e ) {
2579
	testChange = function testChange( e ) {
Line 2257... Line 2580...
2257
		var elem = e.target, data, val;
2580
		var elem = e.target, data, val;
2258
 
2581
 
2259
		if ( !formElems.test( elem.nodeName ) || elem.readOnly ) {
2582
		if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) {
Line 2260... Line 2583...
2260
			return;
2583
			return;
2261
		}
2584
		}
Line 2272... Line 2595...
2272
			return;
2595
			return;
2273
		}
2596
		}
Line 2274... Line 2597...
2274
 
2597
 
2275
		if ( data != null || val ) {
2598
		if ( data != null || val ) {
-
 
2599
			e.type = "change";
2276
			e.type = "change";
2600
			e.liveFired = undefined;
2277
			return jQuery.event.trigger( e, arguments[1], elem );
2601
			return jQuery.event.trigger( e, arguments[1], elem );
2278
		}
2602
		}
Line 2279... Line 2603...
2279
	};
2603
	};
2280
 
2604
 
2281
	jQuery.event.special.change = {
2605
	jQuery.event.special.change = {
Line -... Line 2606...
-
 
2606
		filters: {
-
 
2607
			focusout: testChange, 
2282
		filters: {
2608
 
2283
			focusout: testChange, 
2609
			beforedeactivate: testChange,
Line 2284... Line 2610...
2284
 
2610
 
2285
			click: function( e ) {
2611
			click: function( e ) {
Line 2302... Line 2628...
2302
				}
2628
				}
2303
			},
2629
			},
Line 2304... Line 2630...
2304
 
2630
 
2305
			// Beforeactivate happens also before the previous element is blurred
2631
			// Beforeactivate happens also before the previous element is blurred
2306
			// with this event you can't trigger a change event, but you can store
2632
			// with this event you can't trigger a change event, but you can store
2307
			// information/focus[in] is not needed anymore
2633
			// information
2308
			beforeactivate: function( e ) {
2634
			beforeactivate: function( e ) {
2309
				var elem = e.target;
2635
				var elem = e.target;
2310
				jQuery.data( elem, "_change_data", getVal(elem) );
2636
				jQuery.data( elem, "_change_data", getVal(elem) );
2311
			}
2637
			}
Line 2318... Line 2644...
2318
 
2644
 
2319
			for ( var type in changeFilters ) {
2645
			for ( var type in changeFilters ) {
2320
				jQuery.event.add( this, type + ".specialChange", changeFilters[type] );
2646
				jQuery.event.add( this, type + ".specialChange", changeFilters[type] );
Line 2321... Line 2647...
2321
			}
2647
			}
2322
 
2648
 
Line 2323... Line 2649...
2323
			return formElems.test( this.nodeName );
2649
			return rformElems.test( this.nodeName );
2324
		},
2650
		},
Line 2325... Line 2651...
2325
 
2651
 
2326
		teardown: function( namespaces ) {
2652
		teardown: function( namespaces ) {
2327
			jQuery.event.remove( this, ".specialChange" );
2653
			jQuery.event.remove( this, ".specialChange" );
Line 2328... Line 2654...
2328
 
2654
 
-
 
2655
			return rformElems.test( this.nodeName );
-
 
2656
		}
-
 
2657
	};
2329
			return formElems.test( this.nodeName );
2658
 
Line 2330... Line 2659...
2330
		}
2659
	changeFilters = jQuery.event.special.change.filters;
2331
	};
2660
 
2332
 
2661
	// Handle when the input is .focus()'d
Line 2341... Line 2670...
2341
// Create "bubbling" focus and blur events
2670
// Create "bubbling" focus and blur events
2342
if ( document.addEventListener ) {
2671
if ( document.addEventListener ) {
2343
	jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
2672
	jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
2344
		jQuery.event.special[ fix ] = {
2673
		jQuery.event.special[ fix ] = {
2345
			setup: function() {
2674
			setup: function() {
-
 
2675
				if ( focusCounts[fix]++ === 0 ) {
2346
				this.addEventListener( orig, handler, true );
2676
					document.addEventListener( orig, handler, true );
-
 
2677
				}
2347
			}, 
2678
			}, 
2348
			teardown: function() { 
2679
			teardown: function() { 
-
 
2680
				if ( --focusCounts[fix] === 0 ) {
2349
				this.removeEventListener( orig, handler, true );
2681
					document.removeEventListener( orig, handler, true );
-
 
2682
				}
2350
			}
2683
			}
2351
		};
2684
		};
Line 2352... Line 2685...
2352
 
2685
 
2353
		function handler( e ) { 
2686
		function handler( e ) { 
2354
			e = jQuery.event.fix( e );
2687
			e = jQuery.event.fix( e );
2355
			e.type = fix;
2688
			e.type = fix;
2356
			return jQuery.event.handle.call( this, e );
2689
			return jQuery.event.trigger( e, null, e.target );
2357
		}
2690
		}
2358
	});
2691
	});
Line 2359... Line 2692...
2359
}
2692
}
Line 2366... Line 2699...
2366
				this[ name ](key, data, type[key], fn);
2699
				this[ name ](key, data, type[key], fn);
2367
			}
2700
			}
2368
			return this;
2701
			return this;
2369
		}
2702
		}
Line 2370... Line 2703...
2370
		
2703
		
2371
		if ( jQuery.isFunction( data ) ) {
2704
		if ( jQuery.isFunction( data ) || data === false ) {
2372
			fn = data;
2705
			fn = data;
2373
			data = undefined;
2706
			data = undefined;
Line 2374... Line 2707...
2374
		}
2707
		}
Line 2437... Line 2770...
2437
		}
2770
		}
2438
	},
2771
	},
Line 2439... Line 2772...
2439
 
2772
 
2440
	toggle: function( fn ) {
2773
	toggle: function( fn ) {
2441
		// Save reference to arguments for access in closure
2774
		// Save reference to arguments for access in closure
-
 
2775
		var args = arguments,
Line 2442... Line 2776...
2442
		var args = arguments, i = 1;
2776
			i = 1;
2443
 
2777
 
2444
		// link all the functions, so any of them can unbind this click handler
2778
		// link all the functions, so any of them can unbind this click handler
2445
		while ( i < args.length ) {
2779
		while ( i < args.length ) {
Line 2474... Line 2808...
2474
jQuery.each(["live", "die"], function( i, name ) {
2808
jQuery.each(["live", "die"], function( i, name ) {
2475
	jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) {
2809
	jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) {
2476
		var type, i = 0, match, namespaces, preType,
2810
		var type, i = 0, match, namespaces, preType,
2477
			selector = origSelector || this.selector,
2811
			selector = origSelector || this.selector,
2478
			context = origSelector ? this : jQuery( this.context );
2812
			context = origSelector ? this : jQuery( this.context );
-
 
2813
		
-
 
2814
		if ( typeof types === "object" && !types.preventDefault ) {
-
 
2815
			for ( var key in types ) {
-
 
2816
				context[ name ]( key, data, types[key], selector );
-
 
2817
			}
-
 
2818
			
-
 
2819
			return this;
-
 
2820
		}
Line 2479... Line 2821...
2479
 
2821
 
2480
		if ( jQuery.isFunction( data ) ) {
2822
		if ( jQuery.isFunction( data ) ) {
2481
			fn = data;
2823
			fn = data;
2482
			data = undefined;
2824
			data = undefined;
Line 2508... Line 2850...
2508
				type = (liveMap[ type ] || type) + namespaces;
2850
				type = (liveMap[ type ] || type) + namespaces;
2509
			}
2851
			}
Line 2510... Line 2852...
2510
 
2852
 
2511
			if ( name === "live" ) {
2853
			if ( name === "live" ) {
2512
				// bind live handler
2854
				// bind live handler
2513
				context.each(function(){
2855
				for ( var j = 0, l = context.length; j < l; j++ ) {
2514
					jQuery.event.add( this, liveConvert( type, selector ),
2856
					jQuery.event.add( context[j], "live." + liveConvert( type, selector ),
2515
						{ data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } );
2857
						{ data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } );
Line 2516... Line 2858...
2516
				});
2858
				}
2517
 
2859
 
2518
			} else {
2860
			} else {
2519
				// unbind live handler
2861
				// unbind live handler
2520
				context.unbind( liveConvert( type, selector ), fn );
2862
				context.unbind( "live." + liveConvert( type, selector ), fn );
Line 2521... Line 2863...
2521
			}
2863
			}
2522
		}
2864
		}
2523
		
2865
		
Line 2524... Line 2866...
2524
		return this;
2866
		return this;
2525
	}
2867
	};
-
 
2868
});
-
 
2869
 
2526
});
2870
function liveHandler( event ) {
-
 
2871
	var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret,
-
 
2872
		elems = [],
2527
 
2873
		selectors = [],
-
 
2874
		events = jQuery.data( this, this.nodeType ? "events" : "__events__" );
Line 2528... Line 2875...
2528
function liveHandler( event ) {
2875
 
2529
	var stop, elems = [], selectors = [], args = arguments,
2876
	if ( typeof events === "function" ) {
2530
		related, match, handleObj, elem, j, i, l, data,
2877
		events = events.events;
2531
		events = jQuery.data( this, "events" );
2878
	}
-
 
2879
 
-
 
2880
	// Make sure we avoid non-left-click bubbling in Firefox (#3861)
-
 
2881
	if ( event.liveFired === this || !events || !events.live || event.button && event.type === "click" ) {
-
 
2882
		return;
Line 2532... Line 2883...
2532
 
2883
	}
Line 2533... Line 2884...
2533
	// Make sure we avoid non-left-click bubbling in Firefox (#3861)
2884
	
Line 2551... Line 2902...
2551
	}
2902
	}
Line 2552... Line 2903...
2552
 
2903
 
Line 2553... Line 2904...
2553
	match = jQuery( event.target ).closest( selectors, event.currentTarget );
2904
	match = jQuery( event.target ).closest( selectors, event.currentTarget );
-
 
2905
 
-
 
2906
	for ( i = 0, l = match.length; i < l; i++ ) {
2554
 
2907
		close = match[i];
2555
	for ( i = 0, l = match.length; i < l; i++ ) {
2908
 
Line 2556... Line 2909...
2556
		for ( j = 0; j < live.length; j++ ) {
2909
		for ( j = 0; j < live.length; j++ ) {
2557
			handleObj = live[j];
2910
			handleObj = live[j];
2558
 
2911
 
Line 2559... Line 2912...
2559
			if ( match[i].selector === handleObj.selector ) {
2912
			if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) ) {
2560
				elem = match[i].elem;
2913
				elem = close.elem;
-
 
2914
				related = null;
2561
				related = null;
2915
 
2562
 
2916
				// Those two events require additional checking
Line 2563... Line 2917...
2563
				// Those two events require additional checking
2917
				if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) {
2564
				if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) {
2918
					event.type = handleObj.preType;
2565
					related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0];
2919
					related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0];
2566
				}
2920
				}
2567
 
2921
 
2568
				if ( !related || related !== elem ) {
2922
				if ( !related || related !== elem ) {
Line 2569... Line 2923...
2569
					elems.push({ elem: elem, handleObj: handleObj });
2923
					elems.push({ elem: elem, handleObj: handleObj, level: close.level });
2570
				}
2924
				}
-
 
2925
			}
-
 
2926
		}
-
 
2927
	}
-
 
2928
 
-
 
2929
	for ( i = 0, l = elems.length; i < l; i++ ) {
2571
			}
2930
		match = elems[i];
2572
		}
2931
 
2573
	}
2932
		if ( maxLevel && match.level > maxLevel ) {
Line 2574... Line 2933...
2574
 
2933
			break;
-
 
2934
		}
-
 
2935
 
-
 
2936
		event.currentTarget = match.elem;
-
 
2937
		event.data = match.handleObj.data;
-
 
2938
		event.handleObj = match.handleObj;
2575
	for ( i = 0, l = elems.length; i < l; i++ ) {
2939
 
-
 
2940
		ret = match.handleObj.origHandler.apply( match.elem, arguments );
-
 
2941
 
2576
		match = elems[i];
2942
		if ( ret === false || event.isPropagationStopped() ) {
-
 
2943
			maxLevel = match.level;
2577
		event.currentTarget = match.elem;
2944
 
2578
		event.data = match.handleObj.data;
2945
			if ( ret === false ) {
Line 2579... Line 2946...
2579
		event.handleObj = match.handleObj;
2946
				stop = false;
2580
 
2947
			}
Line 2581... Line 2948...
2581
		if ( match.handleObj.origHandler.apply( match.elem, args ) === false ) {
2948
			if ( event.isImmediatePropagationStopped() ) {
2582
			stop = false;
2949
				break;
2583
			break;
2950
			}
Line 2584... Line 2951...
2584
		}
2951
		}
2585
	}
2952
	}
2586
 
2953
 
Line 2587... Line 2954...
2587
	return stop;
2954
	return stop;
2588
}
2955
}
-
 
2956
 
-
 
2957
function liveConvert( type, selector ) {
-
 
2958
	return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspace, "&");
-
 
2959
}
-
 
2960
 
-
 
2961
jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
2589
 
2962
	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
-
 
2963
	"change select submit keydown keypress keyup error").split(" "), function( i, name ) {
2590
function liveConvert( type, selector ) {
2964
 
Line 2591... Line 2965...
2591
	return "live." + (type && type !== "*" ? type + "." : "") + selector.replace(/\./g, "`").replace(/ /g, "&");
2965
	// Handle event binding
2592
}
2966
	jQuery.fn[ name ] = function( data, fn ) {
2593
 
2967
		if ( fn == null ) {
Line 2608... Line 2982...
2608
// Prevent memory leaks in IE
2982
// Prevent memory leaks in IE
2609
// Window isn't included so as not to unbind existing unload events
2983
// Window isn't included so as not to unbind existing unload events
2610
// More info:
2984
// More info:
2611
//  - http://isaacschlueter.com/2006/10/msie-memory-leaks/
2985
//  - http://isaacschlueter.com/2006/10/msie-memory-leaks/
2612
if ( window.attachEvent && !window.addEventListener ) {
2986
if ( window.attachEvent && !window.addEventListener ) {
2613
	window.attachEvent("onunload", function() {
2987
	jQuery(window).bind("unload", function() {
2614
		for ( var id in jQuery.cache ) {
2988
		for ( var id in jQuery.cache ) {
2615
			if ( jQuery.cache[ id ].handle ) {
2989
			if ( jQuery.cache[ id ].handle ) {
2616
				// Try/Catch is to handle iframes being unloaded, see #4280
2990
				// Try/Catch is to handle iframes being unloaded, see #4280
2617
				try {
2991
				try {
2618
					jQuery.event.remove( jQuery.cache[ id ].handle.elem );
2992
					jQuery.event.remove( jQuery.cache[ id ].handle.elem );
2619
				} catch(e) {}
2993
				} catch(e) {}
2620
			}
2994
			}
2621
		}
2995
		}
2622
	});
2996
	});
2623
}
2997
}
-
 
2998
 
-
 
2999
 
2624
/*!
3000
/*!
2625
 * Sizzle CSS Selector Engine - v1.0
3001
 * Sizzle CSS Selector Engine - v1.0
2626
 *  Copyright 2009, The Dojo Foundation
3002
 *  Copyright 2009, The Dojo Foundation
2627
 *  Released under the MIT, BSD, and GPL Licenses.
3003
 *  Released under the MIT, BSD, and GPL Licenses.
2628
 *  More information: http://sizzlejs.com/
3004
 *  More information: http://sizzlejs.com/
2629
 */
3005
 */
2630
(function(){
3006
(function(){
Line 2631... Line 3007...
2631
 
3007
 
2632
var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
3008
var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
2633
	done = 0,
3009
	done = 0,
2634
	toString = Object.prototype.toString,
3010
	toString = Object.prototype.toString,
2635
	hasDuplicate = false,
3011
	hasDuplicate = false,
Line 2636... Line 3012...
2636
	baseHasDuplicate = true;
3012
	baseHasDuplicate = true;
2637
 
3013
 
2638
// Here we check if the JavaScript engine is using some sort of
3014
// Here we check if the JavaScript engine is using some sort of
2639
// optimization where it does not always call our comparision
3015
// optimization where it does not always call our comparision
2640
// function. If that is the case, discard the hasDuplicate value.
3016
// function. If that is the case, discard the hasDuplicate value.
2641
//   Thus far that includes Google Chrome.
3017
//   Thus far that includes Google Chrome.
2642
[0, 0].sort(function(){
3018
[0, 0].sort(function() {
2643
	baseHasDuplicate = false;
3019
	baseHasDuplicate = false;
Line 2644... Line 3020...
2644
	return 0;
3020
	return 0;
2645
});
3021
});
2646
 
3022
 
-
 
3023
var Sizzle = function( selector, context, results, seed ) {
-
 
3024
	results = results || [];
Line 2647... Line 3025...
2647
var Sizzle = function(selector, context, results, seed) {
3025
	context = context || document;
2648
	results = results || [];
3026
 
2649
	var origContext = context = context || document;
3027
	var origContext = context;
Line 2650... Line 3028...
2650
 
3028
 
2651
	if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
3029
	if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
2652
		return [];
3030
		return [];
Line 2653... Line 3031...
2653
	}
3031
	}
-
 
3032
	
-
 
3033
	if ( !selector || typeof selector !== "string" ) {
-
 
3034
		return results;
2654
	
3035
	}
Line 2655... Line 3036...
2655
	if ( !selector || typeof selector !== "string" ) {
3036
 
-
 
3037
	var m, set, checkSet, extra, ret, cur, pop, i,
-
 
3038
		prune = true,
2656
		return results;
3039
		contextXML = Sizzle.isXML( context ),
-
 
3040
		parts = [],
-
 
3041
		soFar = selector;
2657
	}
3042
	
Line 2658... Line 3043...
2658
 
3043
	// Reset the position of the chunker regexp (start from head)
Line 2659... Line 3044...
2659
	var parts = [], m, set, checkSet, extra, prune = true, contextXML = isXML(context),
3044
	do {
2660
		soFar = selector;
3045
		chunker.exec( "" );
2661
	
3046
		m = chunker.exec( soFar );
-
 
3047
 
2662
	// Reset the position of the chunker regexp (start from head)
3048
		if ( m ) {
2663
	while ( (chunker.exec(""), m = chunker.exec(soFar)) !== null ) {
3049
			soFar = m[3];
Line 2664... Line 3050...
2664
		soFar = m[3];
3050
		
-
 
3051
			parts.push( m[1] );
2665
		
3052
		
2666
		parts.push( m[1] );
3053
			if ( m[2] ) {
-
 
3054
				extra = m[3];
2667
		
3055
				break;
2668
		if ( m[2] ) {
3056
			}
2669
			extra = m[3];
3057
		}
2670
			break;
3058
	} while ( m );
Line 2687... Line 3075...
2687
				}
3075
				}
Line 2688... Line 3076...
2688
				
3076
				
2689
				set = posProcess( selector, set );
3077
				set = posProcess( selector, set );
2690
			}
3078
			}
-
 
3079
		}
2691
		}
3080
 
2692
	} else {
3081
	} else {
2693
		// Take a shortcut and set the context if the root selector is an ID
3082
		// Take a shortcut and set the context if the root selector is an ID
2694
		// (but not if it'll be faster if the inner selector is an ID)
3083
		// (but not if it'll be faster if the inner selector is an ID)
2695
		if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
3084
		if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
-
 
3085
				Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
2696
				Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
3086
 
-
 
3087
			ret = Sizzle.find( parts.shift(), context, contextXML );
2697
			var ret = Sizzle.find( parts.shift(), context, contextXML );
3088
			context = ret.expr ?
-
 
3089
				Sizzle.filter( ret.expr, ret.set )[0] :
2698
			context = ret.expr ? Sizzle.filter( ret.expr, ret.set )[0] : ret.set[0];
3090
				ret.set[0];
Line 2699... Line 3091...
2699
		}
3091
		}
2700
 
3092
 
2701
		if ( context ) {
3093
		if ( context ) {
2702
			var ret = seed ?
3094
			ret = seed ?
-
 
3095
				{ expr: parts.pop(), set: makeArray(seed) } :
-
 
3096
				Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
2703
				{ expr: parts.pop(), set: makeArray(seed) } :
3097
 
-
 
3098
			set = ret.expr ?
Line 2704... Line 3099...
2704
				Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
3099
				Sizzle.filter( ret.expr, ret.set ) :
2705
			set = ret.expr ? Sizzle.filter( ret.expr, ret.set ) : ret.set;
3100
				ret.set;
-
 
3101
 
2706
 
3102
			if ( parts.length > 0 ) {
2707
			if ( parts.length > 0 ) {
3103
				checkSet = makeArray( set );
2708
				checkSet = makeArray(set);
3104
 
Line 2709... Line 3105...
2709
			} else {
3105
			} else {
2710
				prune = false;
3106
				prune = false;
-
 
3107
			}
Line 2711... Line 3108...
2711
			}
3108
 
2712
 
3109
			while ( parts.length ) {
2713
			while ( parts.length ) {
3110
				cur = parts.pop();
2714
				var cur = parts.pop(), pop = cur;
3111
				pop = cur;
Line 2723... Line 3120...
2723
					pop = context;
3120
					pop = context;
2724
				}
3121
				}
Line 2725... Line 3122...
2725
 
3122
 
2726
				Expr.relative[ cur ]( checkSet, pop, contextXML );
3123
				Expr.relative[ cur ]( checkSet, pop, contextXML );
-
 
3124
			}
2727
			}
3125
 
2728
		} else {
3126
		} else {
2729
			checkSet = parts = [];
3127
			checkSet = parts = [];
2730
		}
3128
		}
Line 2739... Line 3137...
2739
	}
3137
	}
Line 2740... Line 3138...
2740
 
3138
 
2741
	if ( toString.call(checkSet) === "[object Array]" ) {
3139
	if ( toString.call(checkSet) === "[object Array]" ) {
2742
		if ( !prune ) {
3140
		if ( !prune ) {
-
 
3141
			results.push.apply( results, checkSet );
2743
			results.push.apply( results, checkSet );
3142
 
2744
		} else if ( context && context.nodeType === 1 ) {
3143
		} else if ( context && context.nodeType === 1 ) {
2745
			for ( var i = 0; checkSet[i] != null; i++ ) {
3144
			for ( i = 0; checkSet[i] != null; i++ ) {
2746
				if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && contains(context, checkSet[i])) ) {
3145
				if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
2747
					results.push( set[i] );
3146
					results.push( set[i] );
2748
				}
3147
				}
-
 
3148
			}
2749
			}
3149
 
2750
		} else {
3150
		} else {
2751
			for ( var i = 0; checkSet[i] != null; i++ ) {
3151
			for ( i = 0; checkSet[i] != null; i++ ) {
2752
				if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
3152
				if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
2753
					results.push( set[i] );
3153
					results.push( set[i] );
2754
				}
3154
				}
2755
			}
3155
			}
-
 
3156
		}
2756
		}
3157
 
2757
	} else {
3158
	} else {
2758
		makeArray( checkSet, results );
3159
		makeArray( checkSet, results );
Line 2759... Line 3160...
2759
	}
3160
	}
Line 2764... Line 3165...
2764
	}
3165
	}
Line 2765... Line 3166...
2765
 
3166
 
2766
	return results;
3167
	return results;
Line 2767... Line 3168...
2767
};
3168
};
2768
 
3169
 
2769
Sizzle.uniqueSort = function(results){
3170
Sizzle.uniqueSort = function( results ) {
2770
	if ( sortOrder ) {
3171
	if ( sortOrder ) {
Line 2771... Line 3172...
2771
		hasDuplicate = baseHasDuplicate;
3172
		hasDuplicate = baseHasDuplicate;
2772
		results.sort(sortOrder);
3173
		results.sort( sortOrder );
2773
 
3174
 
2774
		if ( hasDuplicate ) {
3175
		if ( hasDuplicate ) {
2775
			for ( var i = 1; i < results.length; i++ ) {
3176
			for ( var i = 1; i < results.length; i++ ) {
2776
				if ( results[i] === results[i-1] ) {
3177
				if ( results[i] === results[ i - 1 ] ) {
2777
					results.splice(i--, 1);
3178
					results.splice( i--, 1 );
2778
				}
3179
				}
Line 2779... Line 3180...
2779
			}
3180
			}
2780
		}
3181
		}
Line 2781... Line 3182...
2781
	}
3182
	}
2782
 
3183
 
-
 
3184
	return results;
-
 
3185
};
-
 
3186
 
-
 
3187
Sizzle.matches = function( expr, set ) {
2783
	return results;
3188
	return Sizzle( expr, null, null, set );
Line 2784... Line 3189...
2784
};
3189
};
2785
 
3190
 
Line 2786... Line 3191...
2786
Sizzle.matches = function(expr, set){
3191
Sizzle.matchesSelector = function( node, expr ) {
2787
	return Sizzle(expr, null, null, set);
3192
	return Sizzle( expr, null, null, [node] ).length > 0;
2788
};
3193
};
Line 2789... Line 3194...
2789
 
3194
 
-
 
3195
Sizzle.find = function( expr, context, isXML ) {
2790
Sizzle.find = function(expr, context, isXML){
3196
	var set;
Line 2791... Line 3197...
2791
	var set, match;
3197
 
2792
 
3198
	if ( !expr ) {
2793
	if ( !expr ) {
3199
		return [];
Line 2794... Line 3200...
2794
		return [];
3200
	}
2795
	}
3201
 
2796
 
3202
	for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
-
 
3203
		var match,
2797
	for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
3204
			type = Expr.order[i];
2798
		var type = Expr.order[i], match;
3205
		
2799
		
3206
		if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
2800
		if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
3207
			var left = match[1];
2801
			var left = match[1];
3208
			match.splice( 1, 1 );
2802
			match.splice(1,1);
3209
 
2803
 
3210
			if ( left.substr( left.length - 1 ) !== "\\" ) {
Line 2804... Line 3211...
2804
			if ( left.substr( left.length - 1 ) !== "\\" ) {
3211
				match[1] = (match[1] || "").replace(/\\/g, "");
2805
				match[1] = (match[1] || "").replace(/\\/g, "");
3212
				set = Expr.find[ type ]( match, context, isXML );
2806
				set = Expr.find[ type ]( match, context, isXML );
3213
 
Line 2807... Line 3214...
2807
				if ( set != null ) {
3214
				if ( set != null ) {
2808
					expr = expr.replace( Expr.match[ type ], "" );
3215
					expr = expr.replace( Expr.match[ type ], "" );
Line 2809... Line 3216...
2809
					break;
3216
					break;
2810
				}
3217
				}
-
 
3218
			}
-
 
3219
		}
-
 
3220
	}
2811
			}
3221
 
Line 2812... Line 3222...
2812
		}
3222
	if ( !set ) {
2813
	}
3223
		set = context.getElementsByTagName( "*" );
2814
 
3224
	}
-
 
3225
 
2815
	if ( !set ) {
3226
	return { set: set, expr: expr };
-
 
3227
};
-
 
3228
 
2816
		set = context.getElementsByTagName("*");
3229
Sizzle.filter = function( expr, set, inplace, not ) {
Line 2817... Line 3230...
2817
	}
3230
	var match, anyFound,
Line 2818... Line 3231...
2818
 
3231
		old = expr,
Line 2842... Line 3255...
2842
				if ( Expr.preFilter[ type ] ) {
3255
				if ( Expr.preFilter[ type ] ) {
2843
					match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
3256
					match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
Line 2844... Line 3257...
2844
 
3257
 
2845
					if ( !match ) {
3258
					if ( !match ) {
-
 
3259
						anyFound = found = true;
2846
						anyFound = found = true;
3260
 
2847
					} else if ( match === true ) {
3261
					} else if ( match === true ) {
2848
						continue;
3262
						continue;
2849
					}
3263
					}
Line 2856... Line 3270...
2856
							var pass = not ^ !!found;
3270
							var pass = not ^ !!found;
Line 2857... Line 3271...
2857
 
3271
 
2858
							if ( inplace && found != null ) {
3272
							if ( inplace && found != null ) {
2859
								if ( pass ) {
3273
								if ( pass ) {
-
 
3274
									anyFound = true;
2860
									anyFound = true;
3275
 
2861
								} else {
3276
								} else {
2862
									curLoop[i] = false;
3277
									curLoop[i] = false;
-
 
3278
								}
2863
								}
3279
 
2864
							} else if ( pass ) {
3280
							} else if ( pass ) {
2865
								result.push( item );
3281
								result.push( item );
2866
								anyFound = true;
3282
								anyFound = true;
2867
							}
3283
							}
Line 2887... Line 3303...
2887
 
3303
 
2888
		// Improper expression
3304
		// Improper expression
2889
		if ( expr === old ) {
3305
		if ( expr === old ) {
2890
			if ( anyFound == null ) {
3306
			if ( anyFound == null ) {
-
 
3307
				Sizzle.error( expr );
2891
				Sizzle.error( expr );
3308
 
2892
			} else {
3309
			} else {
2893
				break;
3310
				break;
2894
			}
3311
			}
Line 2904... Line 3321...
2904
	throw "Syntax error, unrecognized expression: " + msg;
3321
	throw "Syntax error, unrecognized expression: " + msg;
2905
};
3322
};
Line 2906... Line 3323...
2906
 
3323
 
2907
var Expr = Sizzle.selectors = {
3324
var Expr = Sizzle.selectors = {
-
 
3325
	order: [ "ID", "NAME", "TAG" ],
2908
	order: [ "ID", "NAME", "TAG" ],
3326
 
2909
	match: {
3327
	match: {
2910
		ID: /#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
3328
		ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
2911
		CLASS: /\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
3329
		CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
2912
		NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,
3330
		NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
2913
		ATTR: /\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
3331
		ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
2914
		TAG: /^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,
3332
		TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
2915
		CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,
3333
		CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,
2916
		POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,
3334
		POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
2917
		PSEUDO: /:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
3335
		PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
-
 
3336
	},
2918
	},
3337
 
-
 
3338
	leftMatch: {},
2919
	leftMatch: {},
3339
 
2920
	attrMap: {
3340
	attrMap: {
2921
		"class": "className",
3341
		"class": "className",
2922
		"for": "htmlFor"
3342
		"for": "htmlFor"
-
 
3343
	},
2923
	},
3344
 
2924
	attrHandle: {
3345
	attrHandle: {
2925
		href: function(elem){
3346
		href: function( elem ) {
2926
			return elem.getAttribute("href");
3347
			return elem.getAttribute( "href" );
2927
		}
3348
		}
-
 
3349
	},
2928
	},
3350
 
2929
	relative: {
3351
	relative: {
2930
		"+": function(checkSet, part){
3352
		"+": function(checkSet, part){
2931
			var isPartStr = typeof part === "string",
3353
			var isPartStr = typeof part === "string",
2932
				isTag = isPartStr && !/\W/.test(part),
3354
				isTag = isPartStr && !/\W/.test( part ),
Line 2933... Line 3355...
2933
				isPartStrNotTag = isPartStr && !isTag;
3355
				isPartStrNotTag = isPartStr && !isTag;
2934
 
3356
 
2935
			if ( isTag ) {
3357
			if ( isTag ) {
Line 2948... Line 3370...
2948
 
3370
 
2949
			if ( isPartStrNotTag ) {
3371
			if ( isPartStrNotTag ) {
2950
				Sizzle.filter( part, checkSet, true );
3372
				Sizzle.filter( part, checkSet, true );
2951
			}
3373
			}
2952
		},
-
 
2953
		">": function(checkSet, part){
-
 
Line -... Line 3374...
-
 
3374
		},
-
 
3375
 
-
 
3376
		">": function( checkSet, part ) {
-
 
3377
			var elem,
-
 
3378
				isPartStr = typeof part === "string",
-
 
3379
				i = 0,
2954
			var isPartStr = typeof part === "string";
3380
				l = checkSet.length;
2955
 
3381
 
Line 2956... Line 3382...
2956
			if ( isPartStr && !/\W/.test(part) ) {
3382
			if ( isPartStr && !/\W/.test( part ) ) {
2957
				part = part.toLowerCase();
3383
				part = part.toLowerCase();
-
 
3384
 
2958
 
3385
				for ( ; i < l; i++ ) {
2959
				for ( var i = 0, l = checkSet.length; i < l; i++ ) {
3386
					elem = checkSet[i];
2960
					var elem = checkSet[i];
3387
 
2961
					if ( elem ) {
3388
					if ( elem ) {
2962
						var parent = elem.parentNode;
3389
						var parent = elem.parentNode;
-
 
3390
						checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
2963
						checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
3391
					}
2964
					}
3392
				}
2965
				}
3393
 
-
 
3394
			} else {
2966
			} else {
3395
				for ( ; i < l; i++ ) {
2967
				for ( var i = 0, l = checkSet.length; i < l; i++ ) {
3396
					elem = checkSet[i];
2968
					var elem = checkSet[i];
3397
 
2969
					if ( elem ) {
3398
					if ( elem ) {
2970
						checkSet[i] = isPartStr ?
3399
						checkSet[i] = isPartStr ?
Line 2976... Line 3405...
2976
				if ( isPartStr ) {
3405
				if ( isPartStr ) {
2977
					Sizzle.filter( part, checkSet, true );
3406
					Sizzle.filter( part, checkSet, true );
2978
				}
3407
				}
2979
			}
3408
			}
2980
		},
3409
		},
-
 
3410
 
2981
		"": function(checkSet, part, isXML){
3411
		"": function(checkSet, part, isXML){
-
 
3412
			var nodeCheck,
-
 
3413
				doneName = done++,
2982
			var doneName = done++, checkFn = dirCheck;
3414
				checkFn = dirCheck;
Line 2983... Line 3415...
2983
 
3415
 
2984
			if ( typeof part === "string" && !/\W/.test(part) ) {
3416
			if ( typeof part === "string" && !/\W/.test(part) ) {
-
 
3417
				part = part.toLowerCase();
2985
				var nodeCheck = part = part.toLowerCase();
3418
				nodeCheck = part;
2986
				checkFn = dirNodeCheck;
3419
				checkFn = dirNodeCheck;
Line 2987... Line 3420...
2987
			}
3420
			}
2988
 
3421
 
2989
			checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML);
-
 
2990
		},
-
 
Line -... Line 3422...
-
 
3422
			checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
-
 
3423
		},
-
 
3424
 
-
 
3425
		"~": function( checkSet, part, isXML ) {
-
 
3426
			var nodeCheck,
2991
		"~": function(checkSet, part, isXML){
3427
				doneName = done++,
2992
			var doneName = done++, checkFn = dirCheck;
3428
				checkFn = dirCheck;
-
 
3429
 
2993
 
3430
			if ( typeof part === "string" && !/\W/.test( part ) ) {
2994
			if ( typeof part === "string" && !/\W/.test(part) ) {
3431
				part = part.toLowerCase();
Line 2995... Line 3432...
2995
				var nodeCheck = part = part.toLowerCase();
3432
				nodeCheck = part;
2996
				checkFn = dirNodeCheck;
3433
				checkFn = dirNodeCheck;
2997
			}
3434
			}
-
 
3435
 
2998
 
3436
			checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
2999
			checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML);
3437
		}
3000
		}
3438
	},
3001
	},
3439
 
-
 
3440
	find: {
-
 
3441
		ID: function( match, context, isXML ) {
3002
	find: {
3442
			if ( typeof context.getElementById !== "undefined" && !isXML ) {
3003
		ID: function(match, context, isXML){
3443
				var m = context.getElementById(match[1]);
3004
			if ( typeof context.getElementById !== "undefined" && !isXML ) {
3444
				// Check parentNode to catch when Blackberry 4.6 returns
-
 
3445
				// nodes that are no longer in the document #6963
3005
				var m = context.getElementById(match[1]);
3446
				return m && m.parentNode ? [m] : [];
3006
				return m ? [m] : [];
3447
			}
-
 
3448
		},
3007
			}
3449
 
Line 3008... Line 3450...
3008
		},
3450
		NAME: function( match, context ) {
3009
		NAME: function(match, context){
3451
			if ( typeof context.getElementsByName !== "undefined" ) {
3010
			if ( typeof context.getElementsByName !== "undefined" ) {
3452
				var ret = [],
3011
				var ret = [], results = context.getElementsByName(match[1]);
3453
					results = context.getElementsByName( match[1] );
3012
 
3454
 
Line 3013... Line 3455...
3013
				for ( var i = 0, l = results.length; i < l; i++ ) {
3455
				for ( var i = 0, l = results.length; i < l; i++ ) {
3014
					if ( results[i].getAttribute("name") === match[1] ) {
3456
					if ( results[i].getAttribute("name") === match[1] ) {
3015
						ret.push( results[i] );
3457
						ret.push( results[i] );
-
 
3458
					}
3016
					}
3459
				}
3017
				}
3460
 
3018
 
3461
				return ret.length === 0 ? null : ret;
3019
				return ret.length === 0 ? null : ret;
3462
			}
3020
			}
3463
		},
3021
		},
3464
 
3022
		TAG: function(match, context){
3465
		TAG: function( match, context ) {
Line 3023... Line 3466...
3023
			return context.getElementsByTagName(match[1]);
3466
			return context.getElementsByTagName( match[1] );
3024
		}
3467
		}
3025
	},
3468
	},
Line 3035... Line 3478...
3035
				if ( elem ) {
3478
				if ( elem ) {
3036
					if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n]/g, " ").indexOf(match) >= 0) ) {
3479
					if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n]/g, " ").indexOf(match) >= 0) ) {
3037
						if ( !inplace ) {
3480
						if ( !inplace ) {
3038
							result.push( elem );
3481
							result.push( elem );
3039
						}
3482
						}
-
 
3483
 
3040
					} else if ( inplace ) {
3484
					} else if ( inplace ) {
3041
						curLoop[i] = false;
3485
						curLoop[i] = false;
3042
					}
3486
					}
3043
				}
3487
				}
3044
			}
3488
			}
Line 3045... Line 3489...
3045
 
3489
 
3046
			return false;
3490
			return false;
-
 
3491
		},
3047
		},
3492
 
3048
		ID: function(match){
3493
		ID: function( match ) {
3049
			return match[1].replace(/\\/g, "");
3494
			return match[1].replace(/\\/g, "");
-
 
3495
		},
3050
		},
3496
 
3051
		TAG: function(match, curLoop){
3497
		TAG: function( match, curLoop ) {
3052
			return match[1].toLowerCase();
3498
			return match[1].toLowerCase();
-
 
3499
		},
3053
		},
3500
 
3054
		CHILD: function(match){
3501
		CHILD: function( match ) {
3055
			if ( match[1] === "nth" ) {
3502
			if ( match[1] === "nth" ) {
3056
				// parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
3503
				// parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
3057
				var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
3504
				var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
3058
					match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
3505
					match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
Line 3066... Line 3513...
3066
			// TODO: Move to normal caching system
3513
			// TODO: Move to normal caching system
3067
			match[0] = done++;
3514
			match[0] = done++;
Line 3068... Line 3515...
3068
 
3515
 
3069
			return match;
3516
			return match;
-
 
3517
		},
3070
		},
3518
 
3071
		ATTR: function(match, curLoop, inplace, result, not, isXML){
3519
		ATTR: function( match, curLoop, inplace, result, not, isXML ) {
Line 3072... Line 3520...
3072
			var name = match[1].replace(/\\/g, "");
3520
			var name = match[1].replace(/\\/g, "");
3073
			
3521
			
3074
			if ( !isXML && Expr.attrMap[name] ) {
3522
			if ( !isXML && Expr.attrMap[name] ) {
Line 3079... Line 3527...
3079
				match[4] = " " + match[4] + " ";
3527
				match[4] = " " + match[4] + " ";
3080
			}
3528
			}
Line 3081... Line 3529...
3081
 
3529
 
3082
			return match;
3530
			return match;
-
 
3531
		},
3083
		},
3532
 
3084
		PSEUDO: function(match, curLoop, inplace, result, not){
3533
		PSEUDO: function( match, curLoop, inplace, result, not ) {
3085
			if ( match[1] === "not" ) {
3534
			if ( match[1] === "not" ) {
3086
				// If we're dealing with a complex expression, or a simple one
3535
				// If we're dealing with a complex expression, or a simple one
3087
				if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
3536
				if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
-
 
3537
					match[3] = Sizzle(match[3], null, null, curLoop);
3088
					match[3] = Sizzle(match[3], null, null, curLoop);
3538
 
3089
				} else {
3539
				} else {
-
 
3540
					var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
3090
					var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
3541
 
3091
					if ( !inplace ) {
3542
					if ( !inplace ) {
3092
						result.push.apply( result, ret );
3543
						result.push.apply( result, ret );
-
 
3544
					}
3093
					}
3545
 
3094
					return false;
3546
					return false;
-
 
3547
				}
3095
				}
3548
 
3096
			} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
3549
			} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
3097
				return true;
3550
				return true;
Line 3098... Line 3551...
3098
			}
3551
			}
3099
			
3552
			
-
 
3553
			return match;
3100
			return match;
3554
		},
3101
		},
3555
 
-
 
3556
		POS: function( match ) {
3102
		POS: function(match){
3557
			match.unshift( true );
3103
			match.unshift( true );
3558
 
3104
			return match;
3559
			return match;
-
 
3560
		}
3105
		}
3561
	},
3106
	},
3562
	
3107
	filters: {
3563
	filters: {
3108
		enabled: function(elem){
3564
		enabled: function( elem ) {
-
 
3565
			return elem.disabled === false && elem.type !== "hidden";
3109
			return elem.disabled === false && elem.type !== "hidden";
3566
		},
3110
		},
3567
 
3111
		disabled: function(elem){
3568
		disabled: function( elem ) {
-
 
3569
			return elem.disabled === true;
3112
			return elem.disabled === true;
3570
		},
3113
		},
3571
 
3114
		checked: function(elem){
3572
		checked: function( elem ) {
-
 
3573
			return elem.checked === true;
3115
			return elem.checked === true;
3574
		},
3116
		},
3575
		
3117
		selected: function(elem){
3576
		selected: function( elem ) {
3118
			// Accessing this property makes selected-by-default
3577
			// Accessing this property makes selected-by-default
-
 
3578
			// options in Safari work properly
3119
			// options in Safari work properly
3579
			elem.parentNode.selectedIndex;
3120
			elem.parentNode.selectedIndex;
3580
			
-
 
3581
			return elem.selected === true;
3121
			return elem.selected === true;
3582
		},
3122
		},
3583
 
3123
		parent: function(elem){
3584
		parent: function( elem ) {
-
 
3585
			return !!elem.firstChild;
3124
			return !!elem.firstChild;
3586
		},
3125
		},
3587
 
3126
		empty: function(elem){
3588
		empty: function( elem ) {
-
 
3589
			return !elem.firstChild;
3127
			return !elem.firstChild;
3590
		},
3128
		},
3591
 
3129
		has: function(elem, i, match){
3592
		has: function( elem, i, match ) {
-
 
3593
			return !!Sizzle( match[3], elem ).length;
3130
			return !!Sizzle( match[3], elem ).length;
3594
		},
3131
		},
3595
 
3132
		header: function(elem){
3596
		header: function( elem ) {
-
 
3597
			return (/h\d/i).test( elem.nodeName );
3133
			return /h\d/i.test( elem.nodeName );
3598
		},
3134
		},
3599
 
3135
		text: function(elem){
3600
		text: function( elem ) {
3136
			return "text" === elem.type;
3601
			return "text" === elem.type;
3137
		},
3602
		},
3138
		radio: function(elem){
3603
		radio: function( elem ) {
-
 
3604
			return "radio" === elem.type;
3139
			return "radio" === elem.type;
3605
		},
3140
		},
3606
 
3141
		checkbox: function(elem){
3607
		checkbox: function( elem ) {
-
 
3608
			return "checkbox" === elem.type;
3142
			return "checkbox" === elem.type;
3609
		},
3143
		},
3610
 
3144
		file: function(elem){
3611
		file: function( elem ) {
3145
			return "file" === elem.type;
3612
			return "file" === elem.type;
3146
		},
3613
		},
3147
		password: function(elem){
3614
		password: function( elem ) {
-
 
3615
			return "password" === elem.type;
3148
			return "password" === elem.type;
3616
		},
3149
		},
3617
 
3150
		submit: function(elem){
3618
		submit: function( elem ) {
-
 
3619
			return "submit" === elem.type;
3151
			return "submit" === elem.type;
3620
		},
3152
		},
3621
 
3153
		image: function(elem){
3622
		image: function( elem ) {
-
 
3623
			return "image" === elem.type;
3154
			return "image" === elem.type;
3624
		},
3155
		},
3625
 
3156
		reset: function(elem){
3626
		reset: function( elem ) {
-
 
3627
			return "reset" === elem.type;
3157
			return "reset" === elem.type;
3628
		},
3158
		},
3629
 
3159
		button: function(elem){
3630
		button: function( elem ) {
-
 
3631
			return "button" === elem.type || elem.nodeName.toLowerCase() === "button";
3160
			return "button" === elem.type || elem.nodeName.toLowerCase() === "button";
3632
		},
3161
		},
3633
 
3162
		input: function(elem){
3634
		input: function( elem ) {
3163
			return /input|select|textarea|button/i.test(elem.nodeName);
3635
			return (/input|select|textarea|button/i).test( elem.nodeName );
3164
		}
3636
		}
3165
	},
3637
	},
3166
	setFilters: {
3638
	setFilters: {
3167
		first: function(elem, i){
3639
		first: function( elem, i ) {
-
 
3640
			return i === 0;
3168
			return i === 0;
3641
		},
3169
		},
3642
 
3170
		last: function(elem, i, match, array){
3643
		last: function( elem, i, match, array ) {
-
 
3644
			return i === array.length - 1;
3171
			return i === array.length - 1;
3645
		},
3172
		},
3646
 
3173
		even: function(elem, i){
3647
		even: function( elem, i ) {
-
 
3648
			return i % 2 === 0;
3174
			return i % 2 === 0;
3649
		},
3175
		},
3650
 
3176
		odd: function(elem, i){
3651
		odd: function( elem, i ) {
-
 
3652
			return i % 2 === 1;
3177
			return i % 2 === 1;
3653
		},
3178
		},
3654
 
3179
		lt: function(elem, i, match){
3655
		lt: function( elem, i, match ) {
-
 
3656
			return i < match[3] - 0;
3180
			return i < match[3] - 0;
3657
		},
3181
		},
3658
 
3182
		gt: function(elem, i, match){
3659
		gt: function( elem, i, match ) {
-
 
3660
			return i > match[3] - 0;
3183
			return i > match[3] - 0;
3661
		},
3184
		},
3662
 
3185
		nth: function(elem, i, match){
3663
		nth: function( elem, i, match ) {
-
 
3664
			return match[3] - 0 === i;
3186
			return match[3] - 0 === i;
3665
		},
3187
		},
3666
 
3188
		eq: function(elem, i, match){
3667
		eq: function( elem, i, match ) {
3189
			return match[3] - 0 === i;
3668
			return match[3] - 0 === i;
3190
		}
3669
		}
3191
	},
3670
	},
-
 
3671
	filter: {
3192
	filter: {
3672
		PSEUDO: function( elem, match, i, array ) {
Line 3193... Line 3673...
3193
		PSEUDO: function(elem, match, i, array){
3673
			var name = match[1],
3194
			var name = match[1], filter = Expr.filters[ name ];
3674
				filter = Expr.filters[ name ];
-
 
3675
 
3195
 
3676
			if ( filter ) {
3196
			if ( filter ) {
3677
				return filter( elem, i, match, array );
-
 
3678
 
3197
				return filter( elem, i, match, array );
3679
			} else if ( name === "contains" ) {
3198
			} else if ( name === "contains" ) {
3680
				return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0;
Line 3199... Line 3681...
3199
				return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0;
3681
 
3200
			} else if ( name === "not" ) {
3682
			} else if ( name === "not" ) {
3201
				var not = match[3];
3683
				var not = match[3];
3202
 
3684
 
3203
				for ( var i = 0, l = not.length; i < l; i++ ) {
3685
				for ( var j = 0, l = not.length; j < l; j++ ) {
Line 3204... Line 3686...
3204
					if ( not[i] === elem ) {
3686
					if ( not[j] === elem ) {
-
 
3687
						return false;
3205
						return false;
3688
					}
3206
					}
3689
				}
3207
				}
3690
 
3208
 
3691
				return true;
-
 
3692
 
3209
				return true;
3693
			} else {
3210
			} else {
3694
				Sizzle.error( "Syntax error, unrecognized expression: " + name );
-
 
3695
			}
-
 
3696
		},
3211
				Sizzle.error( "Syntax error, unrecognized expression: " + name );
3697
 
3212
			}
3698
		CHILD: function( elem, match ) {
3213
		},
3699
			var type = match[1],
3214
		CHILD: function(elem, match){
3700
				node = elem;
3215
			var type = match[1], node = elem;
3701
 
3216
			switch (type) {
3702
			switch ( type ) {
3217
				case 'only':
3703
				case "only":
3218
				case 'first':
3704
				case "first":
-
 
3705
					while ( (node = node.previousSibling) )	 {
3219
					while ( (node = node.previousSibling) )	 {
3706
						if ( node.nodeType === 1 ) { 
3220
						if ( node.nodeType === 1 ) { 
3707
							return false; 
3221
							return false; 
3708
						}
-
 
3709
					}
3222
						}
3710
 
-
 
3711
					if ( type === "first" ) { 
3223
					}
3712
						return true; 
3224
					if ( type === "first" ) { 
3713
					}
3225
						return true; 
3714
 
3226
					}
3715
					node = elem;
3227
					node = elem;
3716
 
3228
				case 'last':
3717
				case "last":
-
 
3718
					while ( (node = node.nextSibling) )	 {
3229
					while ( (node = node.nextSibling) )	 {
3719
						if ( node.nodeType === 1 ) { 
-
 
3720
							return false; 
3230
						if ( node.nodeType === 1 ) { 
3721
						}
3231
							return false; 
3722
					}
-
 
3723
 
Line 3232... Line 3724...
3232
						}
3724
					return true;
3233
					}
3725
 
3234
					return true;
3726
				case "nth":
Line 3235... Line 3727...
3235
				case 'nth':
3727
					var first = match[2],
3236
					var first = match[2], last = match[3];
3728
						last = match[3];
Line 3237... Line 3729...
3237
 
3729
 
3238
					if ( first === 1 && last === 0 ) {
3730
					if ( first === 1 && last === 0 ) {
-
 
3731
						return true;
3239
						return true;
3732
					}
3240
					}
3733
					
3241
					
3734
					var doneName = match[0],
3242
					var doneName = match[0],
3735
						parent = elem.parentNode;
3243
						parent = elem.parentNode;
3736
	
-
 
3737
					if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
3244
	
3738
						var count = 0;
3245
					if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
3739
						
Line 3246... Line 3740...
3246
						var count = 0;
3740
						for ( node = parent.firstChild; node; node = node.nextSibling ) {
-
 
3741
							if ( node.nodeType === 1 ) {
3247
						for ( node = parent.firstChild; node; node = node.nextSibling ) {
3742
								node.nodeIndex = ++count;
3248
							if ( node.nodeType === 1 ) {
3743
							}
-
 
3744
						} 
3249
								node.nodeIndex = ++count;
3745
 
3250
							}
3746
						parent.sizcache = doneName;
3251
						} 
3747
					}
3252
						parent.sizcache = doneName;
3748
					
3253
					}
3749
					var diff = elem.nodeIndex - last;
-
 
3750
 
3254
					
3751
					if ( first === 0 ) {
3255
					var diff = elem.nodeIndex - last;
3752
						return diff === 0;
3256
					if ( first === 0 ) {
3753
 
-
 
3754
					} else {
3257
						return diff === 0;
3755
						return ( diff % first === 0 && diff / first >= 0 );
3258
					} else {
3756
					}
3259
						return ( diff % first === 0 && diff / first >= 0 );
3757
			}
-
 
3758
		},
3260
					}
3759
 
3261
			}
3760
		ID: function( elem, match ) {
3262
		},
3761
			return elem.nodeType === 1 && elem.getAttribute("id") === match;
3263
		ID: function(elem, match){
3762
		},
-
 
3763
 
3264
			return elem.nodeType === 1 && elem.getAttribute("id") === match;
3764
		TAG: function( elem, match ) {
3265
		},
3765
			return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match;
3266
		TAG: function(elem, match){
3766
		},
3267
			return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match;
3767
		
3268
		},
3768
		CLASS: function( elem, match ) {
3269
		CLASS: function(elem, match){
3769
			return (" " + (elem.className || elem.getAttribute("class")) + " ")
Line 3299... Line 3799...
3299
				value.substr(value.length - check.length) === check :
3799
				value.substr(value.length - check.length) === check :
3300
				type === "|=" ?
3800
				type === "|=" ?
3301
				value === check || value.substr(0, check.length + 1) === check + "-" :
3801
				value === check || value.substr(0, check.length + 1) === check + "-" :
3302
				false;
3802
				false;
3303
		},
3803
		},
-
 
3804
 
3304
		POS: function(elem, match, i, array){
3805
		POS: function( elem, match, i, array ) {
-
 
3806
			var name = match[2],
3305
			var name = match[2], filter = Expr.setFilters[ name ];
3807
				filter = Expr.setFilters[ name ];
Line 3306... Line 3808...
3306
 
3808
 
3307
			if ( filter ) {
3809
			if ( filter ) {
3308
				return filter( elem, i, match, array );
3810
				return filter( elem, i, match, array );
3309
			}
3811
			}
3310
		}
3812
		}
3311
	}
3813
	}
Line 3312... Line 3814...
3312
};
3814
};
-
 
3815
 
-
 
3816
var origPOS = Expr.match.POS,
-
 
3817
	fescape = function(all, num){
Line 3313... Line 3818...
3313
 
3818
		return "\\" + (num - 0 + 1);
3314
var origPOS = Expr.match.POS;
3819
	};
3315
 
3820
 
3316
for ( var type in Expr.match ) {
-
 
3317
	Expr.match[ type ] = new RegExp( Expr.match[ type ].source + /(?![^\[]*\])(?![^\(]*\))/.source );
-
 
3318
	Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, function(all, num){
3821
for ( var type in Expr.match ) {
Line 3319... Line 3822...
3319
		return "\\" + (num - 0 + 1);
3822
	Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
3320
	}));
3823
	Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
Line 3321... Line 3824...
3321
}
3824
}
3322
 
3825
 
3323
var makeArray = function(array, results) {
3826
var makeArray = function( array, results ) {
Line 3337... Line 3840...
3337
// (which is not the case in the Blackberry browser)
3840
// (which is not the case in the Blackberry browser)
3338
try {
3841
try {
3339
	Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
3842
	Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
Line 3340... Line 3843...
3340
 
3843
 
3341
// Provide a fallback method if it does not work
3844
// Provide a fallback method if it does not work
3342
} catch(e){
3845
} catch( e ) {
-
 
3846
	makeArray = function( array, results ) {
3343
	makeArray = function(array, results) {
3847
		var i = 0,
Line 3344... Line 3848...
3344
		var ret = results || [];
3848
			ret = results || [];
3345
 
3849
 
-
 
3850
		if ( toString.call(array) === "[object Array]" ) {
3346
		if ( toString.call(array) === "[object Array]" ) {
3851
			Array.prototype.push.apply( ret, array );
3347
			Array.prototype.push.apply( ret, array );
3852
 
3348
		} else {
3853
		} else {
3349
			if ( typeof array.length === "number" ) {
3854
			if ( typeof array.length === "number" ) {
3350
				for ( var i = 0, l = array.length; i < l; i++ ) {
3855
				for ( var l = array.length; i < l; i++ ) {
-
 
3856
					ret.push( array[i] );
3351
					ret.push( array[i] );
3857
				}
3352
				}
3858
 
3353
			} else {
3859
			} else {
3354
				for ( var i = 0; array[i]; i++ ) {
3860
				for ( ; array[i]; i++ ) {
3355
					ret.push( array[i] );
3861
					ret.push( array[i] );
3356
				}
3862
				}
Line 3357... Line 3863...
3357
			}
3863
			}
3358
		}
3864
		}
3359
 
3865
 
Line 3360... Line 3866...
3360
		return ret;
3866
		return ret;
Line 3361... Line 3867...
3361
	};
3867
	};
3362
}
3868
}
-
 
3869
 
-
 
3870
var sortOrder, siblingCheck;
-
 
3871
 
-
 
3872
if ( document.documentElement.compareDocumentPosition ) {
-
 
3873
	sortOrder = function( a, b ) {
3363
 
3874
		if ( a === b ) {
3364
var sortOrder;
-
 
3365
 
-
 
3366
if ( document.documentElement.compareDocumentPosition ) {
-
 
3367
	sortOrder = function( a, b ) {
3875
			hasDuplicate = true;
3368
		if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
3876
			return 0;
Line 3369... Line 3877...
3369
			if ( a == b ) {
3877
		}
3370
				hasDuplicate = true;
-
 
3371
			}
-
 
3372
			return a.compareDocumentPosition ? -1 : 1;
-
 
3373
		}
-
 
3374
 
3878
 
-
 
3879
		if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
3375
		var ret = a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1;
3880
			return a.compareDocumentPosition ? -1 : 1;
3376
		if ( ret === 0 ) {
3881
		}
3377
			hasDuplicate = true;
-
 
3378
		}
3882
 
3379
		return ret;
3883
		return a.compareDocumentPosition(b) & 4 ? -1 : 1;
3380
	};
3884
	};
3381
} else if ( "sourceIndex" in document.documentElement ) {
3885
 
-
 
3886
} else {
3382
	sortOrder = function( a, b ) {
3887
	sortOrder = function( a, b ) {
Line 3383... Line 3888...
3383
		if ( !a.sourceIndex || !b.sourceIndex ) {
3888
		var al, bl,
3384
			if ( a == b ) {
3889
			ap = [],
3385
				hasDuplicate = true;
3890
			bp = [],
-
 
3891
			aup = a.parentNode,
-
 
3892
			bup = b.parentNode,
-
 
3893
			cur = aup;
-
 
3894
 
-
 
3895
		// The nodes are identical, we can exit early
-
 
3896
		if ( a === b ) {
-
 
3897
			hasDuplicate = true;
-
 
3898
			return 0;
-
 
3899
 
-
 
3900
		// If the nodes are siblings (or identical) we can do a quick check
-
 
3901
		} else if ( aup === bup ) {
-
 
3902
			return siblingCheck( a, b );
3386
			}
3903
 
-
 
3904
		// If no parents were found then the nodes are disconnected
-
 
3905
		} else if ( !aup ) {
-
 
3906
			return -1;
-
 
3907
 
-
 
3908
		} else if ( !bup ) {
-
 
3909
			return 1;
-
 
3910
		}
-
 
3911
 
3387
			return a.sourceIndex ? -1 : 1;
3912
		// Otherwise they're somewhere else in the tree so we need
-
 
3913
		// to build up a full list of the parentNodes for comparison
-
 
3914
		while ( cur ) {
-
 
3915
			ap.unshift( cur );
-
 
3916
			cur = cur.parentNode;
-
 
3917
		}
-
 
3918
 
-
 
3919
		cur = bup;
-
 
3920
 
-
 
3921
		while ( cur ) {
-
 
3922
			bp.unshift( cur );
-
 
3923
			cur = cur.parentNode;
-
 
3924
		}
-
 
3925
 
-
 
3926
		al = ap.length;
-
 
3927
		bl = bp.length;
-
 
3928
 
-
 
3929
		// Start walking down the tree looking for a discrepancy
-
 
3930
		for ( var i = 0; i < al && i < bl; i++ ) {
-
 
3931
			if ( ap[i] !== bp[i] ) {
-
 
3932
				return siblingCheck( ap[i], bp[i] );
3388
		}
3933
			}
3389
 
-
 
-
 
3934
		}
3390
		var ret = a.sourceIndex - b.sourceIndex;
3935
 
3391
		if ( ret === 0 ) {
-
 
3392
			hasDuplicate = true;
3936
		// We ended someplace up the tree so do a sibling check
3393
		}
-
 
3394
		return ret;
-
 
3395
	};
3937
		return i === al ?
3396
} else if ( document.createRange ) {
3938
			siblingCheck( a, bp[i], -1 ) :
Line 3397... Line -...
3397
	sortOrder = function( a, b ) {
-
 
3398
		if ( !a.ownerDocument || !b.ownerDocument ) {
3939
			siblingCheck( ap[i], b, 1 );
-
 
3940
	};
3399
			if ( a == b ) {
3941
 
3400
				hasDuplicate = true;
3942
	siblingCheck = function( a, b, ret ) {
3401
			}
3943
		if ( a === b ) {
3402
			return a.ownerDocument ? -1 : 1;
-
 
3403
		}
3944
			return ret;
-
 
3945
		}
3404
 
3946
 
3405
		var aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange();
3947
		var cur = a.nextSibling;
-
 
3948
 
3406
		aRange.setStart(a, 0);
3949
		while ( cur ) {
3407
		aRange.setEnd(a, 0);
3950
			if ( cur === b ) {
3408
		bRange.setStart(b, 0);
3951
				return -1;
Line 3409... Line 3952...
3409
		bRange.setEnd(b, 0);
3952
			}
3410
		var ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange);
3953
 
3411
		if ( ret === 0 ) {
3954
			cur = cur.nextSibling;
Line 3412... Line 3955...
3412
			hasDuplicate = true;
3955
		}
3413
		}
3956
 
Line 3426... Line 3969...
3426
		if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
3969
		if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
3427
			ret += elem.nodeValue;
3970
			ret += elem.nodeValue;
Line 3428... Line 3971...
3428
 
3971
 
3429
		// Traverse everything else, except comment nodes
3972
		// Traverse everything else, except comment nodes
3430
		} else if ( elem.nodeType !== 8 ) {
3973
		} else if ( elem.nodeType !== 8 ) {
3431
			ret += getText( elem.childNodes );
3974
			ret += Sizzle.getText( elem.childNodes );
3432
		}
3975
		}
Line 3433... Line 3976...
3433
	}
3976
	}
3434
 
3977
 
Line 3435... Line 3978...
3435
	return ret;
3978
	return ret;
3436
}
3979
};
3437
 
3980
 
3438
// Check to see if the browser returns elements by name when
3981
// Check to see if the browser returns elements by name when
3439
// querying by getElementById (and provide a workaround)
3982
// querying by getElementById (and provide a workaround)
3440
(function(){
3983
(function(){
-
 
3984
	// We're going to inject a fake input element with a specified name
-
 
3985
	var form = document.createElement("div"),
3441
	// We're going to inject a fake input element with a specified name
3986
		id = "script" + (new Date()).getTime(),
Line 3442... Line 3987...
3442
	var form = document.createElement("div"),
3987
		root = document.documentElement;
3443
		id = "script" + (new Date).getTime();
-
 
3444
	form.innerHTML = "<a name='" + id + "'/>";
3988
 
Line 3445... Line 3989...
3445
 
3989
	form.innerHTML = "<a name='" + id + "'/>";
3446
	// Inject it into the root element, check its status, and remove it quickly
3990
 
3447
	var root = document.documentElement;
3991
	// Inject it into the root element, check its status, and remove it quickly
3448
	root.insertBefore( form, root.firstChild );
3992
	root.insertBefore( form, root.firstChild );
3449
 
3993
 
3450
	// The workaround has to do additional checks after a getElementById
3994
	// The workaround has to do additional checks after a getElementById
-
 
3995
	// Which slows things down for other browsers (hence the branching)
-
 
3996
	if ( document.getElementById( id ) ) {
3451
	// Which slows things down for other browsers (hence the branching)
3997
		Expr.find.ID = function( match, context, isXML ) {
-
 
3998
			if ( typeof context.getElementById !== "undefined" && !isXML ) {
-
 
3999
				var m = context.getElementById(match[1]);
-
 
4000
 
3452
	if ( document.getElementById( id ) ) {
4001
				return m ?
3453
		Expr.find.ID = function(match, context, isXML){
4002
					m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
Line 3454... Line 4003...
3454
			if ( typeof context.getElementById !== "undefined" && !isXML ) {
4003
						[m] :
3455
				var m = context.getElementById(match[1]);
4004
						undefined :
-
 
4005
					[];
3456
				return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : [];
4006
			}
3457
			}
4007
		};
3458
		};
4008
 
Line 3459... Line 4009...
3459
 
4009
		Expr.filter.ID = function( elem, match ) {
-
 
4010
			var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
3460
		Expr.filter.ID = function(elem, match){
4011
 
-
 
4012
			return elem.nodeType === 1 && node && node.nodeValue === match;
3461
			var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
4013
		};
Line 3462... Line 4014...
3462
			return elem.nodeType === 1 && node && node.nodeValue === match;
4014
	}
3463
		};
4015
 
3464
	}
4016
	root.removeChild( form );
Line 3475... Line 4027...
3475
	var div = document.createElement("div");
4027
	var div = document.createElement("div");
3476
	div.appendChild( document.createComment("") );
4028
	div.appendChild( document.createComment("") );
Line 3477... Line 4029...
3477
 
4029
 
3478
	// Make sure no comments are found
4030
	// Make sure no comments are found
3479
	if ( div.getElementsByTagName("*").length > 0 ) {
4031
	if ( div.getElementsByTagName("*").length > 0 ) {
3480
		Expr.find.TAG = function(match, context){
4032
		Expr.find.TAG = function( match, context ) {
Line 3481... Line 4033...
3481
			var results = context.getElementsByTagName(match[1]);
4033
			var results = context.getElementsByTagName( match[1] );
3482
 
4034
 
3483
			// Filter out possible comments
4035
			// Filter out possible comments
Line 3497... Line 4049...
3497
		};
4049
		};
3498
	}
4050
	}
Line 3499... Line 4051...
3499
 
4051
 
3500
	// Check to see if an attribute returns normalized href attributes
4052
	// Check to see if an attribute returns normalized href attributes
-
 
4053
	div.innerHTML = "<a href='#'></a>";
3501
	div.innerHTML = "<a href='#'></a>";
4054
 
3502
	if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
4055
	if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
-
 
4056
			div.firstChild.getAttribute("href") !== "#" ) {
3503
			div.firstChild.getAttribute("href") !== "#" ) {
4057
 
3504
		Expr.attrHandle.href = function(elem){
4058
		Expr.attrHandle.href = function( elem ) {
3505
			return elem.getAttribute("href", 2);
4059
			return elem.getAttribute( "href", 2 );
3506
		};
4060
		};
Line 3507... Line 4061...
3507
	}
4061
	}
-
 
4062
 
3508
 
4063
	// release memory in IE
Line 3509... Line 4064...
3509
	div = null; // release memory in IE
4064
	div = null;
3510
})();
4065
})();
-
 
4066
 
3511
 
4067
if ( document.querySelectorAll ) {
-
 
4068
	(function(){
-
 
4069
		var oldSizzle = Sizzle,
3512
if ( document.querySelectorAll ) {
4070
			div = document.createElement("div"),
Line 3513... Line 4071...
3513
	(function(){
4071
			id = "__sizzle__";
3514
		var oldSizzle = Sizzle, div = document.createElement("div");
4072
 
3515
		div.innerHTML = "<p class='TEST'></p>";
4073
		div.innerHTML = "<p class='TEST'></p>";
3516
 
4074
 
3517
		// Safari can't handle uppercase or unicode characters when
4075
		// Safari can't handle uppercase or unicode characters when
Line 3518... Line 4076...
3518
		// in quirks mode.
4076
		// in quirks mode.
3519
		if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
4077
		if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
Line -... Line 4078...
-
 
4078
			return;
-
 
4079
		}
-
 
4080
	
3520
			return;
4081
		Sizzle = function( query, context, extra, seed ) {
3521
		}
4082
			context = context || document;
3522
	
4083
 
-
 
4084
			// Make sure that attribute selectors are quoted
3523
		Sizzle = function(query, context, extra, seed){
4085
			query = query.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
3524
			context = context || document;
4086
 
3525
 
4087
			// Only use querySelectorAll on non-XML documents
-
 
4088
			// (ID selectors don't work in non-HTML documents)
-
 
4089
			if ( !seed && !Sizzle.isXML(context) ) {
-
 
4090
				if ( context.nodeType === 9 ) {
-
 
4091
					try {
-
 
4092
						return makeArray( context.querySelectorAll(query), extra );
-
 
4093
					} catch(qsaError) {}
-
 
4094
 
-
 
4095
				// qSA works strangely on Element-rooted queries
-
 
4096
				// We can work around this by specifying an extra ID on the root
-
 
4097
				// and working up from there (Thanks to Andrew Dupont for the technique)
-
 
4098
				// IE 8 doesn't work on object elements
-
 
4099
				} else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
-
 
4100
					var old = context.getAttribute( "id" ),
-
 
4101
						nid = old || id;
-
 
4102
 
-
 
4103
					if ( !old ) {
-
 
4104
						context.setAttribute( "id", nid );
-
 
4105
					}
-
 
4106
 
-
 
4107
					try {
-
 
4108
						return makeArray( context.querySelectorAll( "#" + nid + " " + query ), extra );
-
 
4109
 
-
 
4110
					} catch(pseudoError) {
3526
			// Only use querySelectorAll on non-XML documents
4111
					} finally {
Line 3527... Line 4112...
3527
			// (ID selectors don't work in non-HTML documents)
4112
						if ( !old ) {
3528
			if ( !seed && context.nodeType === 9 && !isXML(context) ) {
4113
							context.removeAttribute( "id" );
Line 3529... Line 4114...
3529
				try {
4114
						}
3530
					return makeArray( context.querySelectorAll(query), extra );
4115
					}
3531
				} catch(e){}
4116
				}
Line 3532... Line 4117...
3532
			}
4117
			}
-
 
4118
		
3533
		
4119
			return oldSizzle(query, context, extra, seed);
3534
			return oldSizzle(query, context, extra, seed);
4120
		};
Line 3535... Line 4121...
3535
		};
4121
 
-
 
4122
		for ( var prop in oldSizzle ) {
-
 
4123
			Sizzle[ prop ] = oldSizzle[ prop ];
-
 
4124
		}
-
 
4125
 
-
 
4126
		// release memory in IE
-
 
4127
		div = null;
-
 
4128
	})();
-
 
4129
}
-
 
4130
 
-
 
4131
(function(){
-
 
4132
	var html = document.documentElement,
-
 
4133
		matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector,
-
 
4134
		pseudoWorks = false;
-
 
4135
 
-
 
4136
	try {
-
 
4137
		// This should fail with an exception
-
 
4138
		// Gecko does not error, returns false instead
-
 
4139
		matches.call( document.documentElement, "[test!='']:sizzle" );
-
 
4140
	
-
 
4141
	} catch( pseudoError ) {
-
 
4142
		pseudoWorks = true;
-
 
4143
	}
-
 
4144
 
-
 
4145
	if ( matches ) {
-
 
4146
		Sizzle.matchesSelector = function( node, expr ) {
-
 
4147
			// Make sure that attribute selectors are quoted
-
 
4148
			expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
-
 
4149
 
-
 
4150
			if ( !Sizzle.isXML( node ) ) {
-
 
4151
				try { 
-
 
4152
					if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
-
 
4153
						return matches.call( node, expr );
3536
 
4154
					}
Line 3537... Line 4155...
3537
		for ( var prop in oldSizzle ) {
4155
				} catch(e) {}
Line 3538... Line 4156...
3538
			Sizzle[ prop ] = oldSizzle[ prop ];
4156
			}
Line 3559... Line 4177...
3559
	if ( div.getElementsByClassName("e").length === 1 ) {
4177
	if ( div.getElementsByClassName("e").length === 1 ) {
3560
		return;
4178
		return;
3561
	}
4179
	}
Line 3562... Line 4180...
3562
	
4180
	
3563
	Expr.order.splice(1, 0, "CLASS");
4181
	Expr.order.splice(1, 0, "CLASS");
3564
	Expr.find.CLASS = function(match, context, isXML) {
4182
	Expr.find.CLASS = function( match, context, isXML ) {
3565
		if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
4183
		if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
3566
			return context.getElementsByClassName(match[1]);
4184
			return context.getElementsByClassName(match[1]);
3567
		}
4185
		}
Line 3568... Line 4186...
3568
	};
4186
	};
-
 
4187
 
3569
 
4188
	// release memory in IE
Line 3570... Line 4189...
3570
	div = null; // release memory in IE
4189
	div = null;
3571
})();
4190
})();
3572
 
4191
 
-
 
4192
function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
3573
function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
4193
	for ( var i = 0, l = checkSet.length; i < l; i++ ) {
3574
	for ( var i = 0, l = checkSet.length; i < l; i++ ) {
-
 
3575
		var elem = checkSet[i];
4194
		var elem = checkSet[i];
Line -... Line 4195...
-
 
4195
 
-
 
4196
		if ( elem ) {
3576
		if ( elem ) {
4197
			var match = false;
3577
			elem = elem[dir];
4198
 
3578
			var match = false;
4199
			elem = elem[dir];
3579
 
4200
 
3580
			while ( elem ) {
4201
			while ( elem ) {
Line 3602... Line 4223...
3602
}
4223
}
Line 3603... Line 4224...
3603
 
4224
 
3604
function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
4225
function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
3605
	for ( var i = 0, l = checkSet.length; i < l; i++ ) {
4226
	for ( var i = 0, l = checkSet.length; i < l; i++ ) {
-
 
4227
		var elem = checkSet[i];
3606
		var elem = checkSet[i];
4228
 
3607
		if ( elem ) {
-
 
3608
			elem = elem[dir];
4229
		if ( elem ) {
-
 
4230
			var match = false;
-
 
4231
			
Line 3609... Line 4232...
3609
			var match = false;
4232
			elem = elem[dir];
3610
 
4233
 
3611
			while ( elem ) {
4234
			while ( elem ) {
3612
				if ( elem.sizcache === doneName ) {
4235
				if ( elem.sizcache === doneName ) {
Line 3617... Line 4240...
3617
				if ( elem.nodeType === 1 ) {
4240
				if ( elem.nodeType === 1 ) {
3618
					if ( !isXML ) {
4241
					if ( !isXML ) {
3619
						elem.sizcache = doneName;
4242
						elem.sizcache = doneName;
3620
						elem.sizset = i;
4243
						elem.sizset = i;
3621
					}
4244
					}
-
 
4245
 
3622
					if ( typeof cur !== "string" ) {
4246
					if ( typeof cur !== "string" ) {
3623
						if ( elem === cur ) {
4247
						if ( elem === cur ) {
3624
							match = true;
4248
							match = true;
3625
							break;
4249
							break;
3626
						}
4250
						}
Line 3637... Line 4261...
3637
			checkSet[i] = match;
4261
			checkSet[i] = match;
3638
		}
4262
		}
3639
	}
4263
	}
3640
}
4264
}
Line 3641... Line 4265...
3641
 
4265
 
-
 
4266
if ( document.documentElement.contains ) {
3642
var contains = document.compareDocumentPosition ? function(a, b){
4267
	Sizzle.contains = function( a, b ) {
-
 
4268
		return a !== b && (a.contains ? a.contains(b) : true);
-
 
4269
	};
-
 
4270
 
3643
	return !!(a.compareDocumentPosition(b) & 16);
4271
} else if ( document.documentElement.compareDocumentPosition ) {
3644
} : function(a, b){
4272
	Sizzle.contains = function( a, b ) {
3645
	return a !== b && (a.contains ? a.contains(b) : true);
4273
		return !!(a.compareDocumentPosition(b) & 16);
Line -... Line 4274...
-
 
4274
	};
-
 
4275
 
-
 
4276
} else {
-
 
4277
	Sizzle.contains = function() {
-
 
4278
		return false;
-
 
4279
	};
3646
};
4280
}
3647
 
4281
 
3648
var isXML = function(elem){
4282
Sizzle.isXML = function( elem ) {
3649
	// documentElement is verified for cases where it doesn't yet exist
4283
	// documentElement is verified for cases where it doesn't yet exist
-
 
4284
	// (such as loading iframes in IE - #4833) 
3650
	// (such as loading iframes in IE - #4833) 
4285
	var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
3651
	var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
4286
 
Line 3652... Line 4287...
3652
	return documentElement ? documentElement.nodeName !== "HTML" : false;
4287
	return documentElement ? documentElement.nodeName !== "HTML" : false;
-
 
4288
};
3653
};
4289
 
-
 
4290
var posProcess = function( selector, context ) {
3654
 
4291
	var match,
Line 3655... Line 4292...
3655
var posProcess = function(selector, context){
4292
		tmpSet = [],
3656
	var tmpSet = [], later = "", match,
4293
		later = "",
3657
		root = context.nodeType ? [context] : context;
4294
		root = context.nodeType ? [context] : context;
Line 3675... Line 4312...
3675
// EXPOSE
4312
// EXPOSE
3676
jQuery.find = Sizzle;
4313
jQuery.find = Sizzle;
3677
jQuery.expr = Sizzle.selectors;
4314
jQuery.expr = Sizzle.selectors;
3678
jQuery.expr[":"] = jQuery.expr.filters;
4315
jQuery.expr[":"] = jQuery.expr.filters;
3679
jQuery.unique = Sizzle.uniqueSort;
4316
jQuery.unique = Sizzle.uniqueSort;
3680
jQuery.text = getText;
4317
jQuery.text = Sizzle.getText;
3681
jQuery.isXMLDoc = isXML;
4318
jQuery.isXMLDoc = Sizzle.isXML;
3682
jQuery.contains = contains;
4319
jQuery.contains = Sizzle.contains;
Line 3683... Line -...
3683
 
-
 
3684
return;
-
 
3685
 
-
 
Line 3686... Line 4320...
3686
window.Sizzle = Sizzle;
4320
 
-
 
4321
 
-
 
4322
})();
3687
 
4323
 
3688
})();
4324
 
3689
var runtil = /Until$/,
4325
var runtil = /Until$/,
3690
	rparentsprev = /^(?:parents|prevUntil|prevAll)/,
4326
	rparentsprev = /^(?:parents|prevUntil|prevAll)/,
3691
	// Note: This RegExp should be improved, or likely pulled from Sizzle
4327
	// Note: This RegExp should be improved, or likely pulled from Sizzle
3692
	rmultiselector = /,/,
-
 
3693
	slice = Array.prototype.slice;
-
 
3694
 
-
 
3695
// Implement the identical functionality for filter and not
-
 
3696
var winnow = function( elements, qualifier, keep ) {
-
 
3697
	if ( jQuery.isFunction( qualifier ) ) {
-
 
3698
		return jQuery.grep(elements, function( elem, i ) {
-
 
3699
			return !!qualifier.call( elem, i, elem ) === keep;
-
 
3700
		});
4328
	rmultiselector = /,/,
3701
 
-
 
3702
	} else if ( qualifier.nodeType ) {
-
 
3703
		return jQuery.grep(elements, function( elem, i ) {
-
 
3704
			return (elem === qualifier) === keep;
-
 
3705
		});
-
 
3706
 
-
 
3707
	} else if ( typeof qualifier === "string" ) {
4329
	isSimple = /^.[^:#\[\.,]*$/,
3708
		var filtered = jQuery.grep(elements, function( elem ) {
-
 
3709
			return elem.nodeType === 1;
-
 
3710
		});
-
 
3711
 
-
 
3712
		if ( isSimple.test( qualifier ) ) {
-
 
3713
			return jQuery.filter(qualifier, filtered, !keep);
-
 
3714
		} else {
-
 
3715
			qualifier = jQuery.filter( qualifier, filtered );
-
 
3716
		}
-
 
3717
	}
-
 
3718
 
-
 
3719
	return jQuery.grep(elements, function( elem, i ) {
-
 
3720
		return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
-
 
Line 3721... Line 4330...
3721
	});
4330
	slice = Array.prototype.slice,
3722
};
4331
	POS = jQuery.expr.match.POS;
3723
 
4332
 
-
 
4333
jQuery.fn.extend({
Line 3724... Line 4334...
3724
jQuery.fn.extend({
4334
	find: function( selector ) {
3725
	find: function( selector ) {
4335
		var ret = this.pushStack( "", "find", selector ),
3726
		var ret = this.pushStack( "", "find", selector ), length = 0;
4336
			length = 0;
Line 3767... Line 4377...
3767
	is: function( selector ) {
4377
	is: function( selector ) {
3768
		return !!selector && jQuery.filter( selector, this ).length > 0;
4378
		return !!selector && jQuery.filter( selector, this ).length > 0;
3769
	},
4379
	},
Line 3770... Line 4380...
3770
 
4380
 
-
 
4381
	closest: function( selectors, context ) {
-
 
4382
		var ret = [], i, l, cur = this[0];
3771
	closest: function( selectors, context ) {
4383
 
3772
		if ( jQuery.isArray( selectors ) ) {
4384
		if ( jQuery.isArray( selectors ) ) {
-
 
4385
			var match, selector,
-
 
4386
				matches = {},
Line 3773... Line 4387...
3773
			var ret = [], cur = this[0], match, matches = {}, selector;
4387
				level = 1;
3774
 
4388
 
3775
			if ( cur && selectors.length ) {
4389
			if ( cur && selectors.length ) {
Line 3776... Line 4390...
3776
				for ( var i = 0, l = selectors.length; i < l; i++ ) {
4390
				for ( i = 0, l = selectors.length; i < l; i++ ) {
3777
					selector = selectors[i];
4391
					selector = selectors[i];
3778
 
4392
 
Line 3786... Line 4400...
3786
				while ( cur && cur.ownerDocument && cur !== context ) {
4400
				while ( cur && cur.ownerDocument && cur !== context ) {
3787
					for ( selector in matches ) {
4401
					for ( selector in matches ) {
3788
						match = matches[selector];
4402
						match = matches[selector];
Line 3789... Line 4403...
3789
 
4403
 
3790
						if ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) {
4404
						if ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) {
3791
							ret.push({ selector: selector, elem: cur });
-
 
3792
							delete matches[selector];
4405
							ret.push({ selector: selector, elem: cur, level: level });
3793
						}
4406
						}
-
 
4407
					}
3794
					}
4408
 
-
 
4409
					cur = cur.parentNode;
3795
					cur = cur.parentNode;
4410
					level++;
3796
				}
4411
				}
Line 3797... Line 4412...
3797
			}
4412
			}
3798
 
4413
 
Line 3799... Line 4414...
3799
			return ret;
4414
			return ret;
3800
		}
4415
		}
Line 3801... Line 4416...
3801
 
4416
 
-
 
4417
		var pos = POS.test( selectors ) ? 
-
 
4418
			jQuery( selectors, context || this.context ) : null;
3802
		var pos = jQuery.expr.match.POS.test( selectors ) ? 
4419
 
3803
			jQuery( selectors, context || this.context ) : null;
4420
		for ( i = 0, l = this.length; i < l; i++ ) {
3804
 
4421
			cur = this[i];
-
 
4422
 
-
 
4423
			while ( cur ) {
-
 
4424
				if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
-
 
4425
					ret.push( cur );
-
 
4426
					break;
-
 
4427
 
-
 
4428
				} else {
3805
		return this.map(function( i, cur ) {
4429
					cur = cur.parentNode;
3806
			while ( cur && cur.ownerDocument && cur !== context ) {
-
 
3807
				if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selectors) ) {
4430
					if ( !cur || !cur.ownerDocument || cur === context ) {
3808
					return cur;
-
 
3809
				}
4431
						break;
-
 
4432
					}
-
 
4433
				}
-
 
4434
			}
-
 
4435
		}
3810
				cur = cur.parentNode;
4436
 
Line 3811... Line 4437...
3811
			}
4437
		ret = ret.length > 1 ? jQuery.unique(ret) : ret;
3812
			return null;
4438
		
3813
		});
4439
		return this.pushStack( ret, "closest", selectors );
Line 3916... Line 4542...
3916
	filter: function( expr, elems, not ) {
4542
	filter: function( expr, elems, not ) {
3917
		if ( not ) {
4543
		if ( not ) {
3918
			expr = ":not(" + expr + ")";
4544
			expr = ":not(" + expr + ")";
3919
		}
4545
		}
Line -... Line 4546...
-
 
4546
 
-
 
4547
		return elems.length === 1 ?
3920
 
4548
			jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
3921
		return jQuery.find.matches(expr, elems);
4549
			jQuery.find.matches(expr, elems);
Line 3922... Line 4550...
3922
	},
4550
	},
3923
	
4551
	
-
 
4552
	dir: function( elem, dir, until ) {
-
 
4553
		var matched = [],
3924
	dir: function( elem, dir, until ) {
4554
			cur = elem[ dir ];
3925
		var matched = [], cur = elem[dir];
4555
 
3926
		while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
4556
		while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
3927
			if ( cur.nodeType === 1 ) {
4557
			if ( cur.nodeType === 1 ) {
3928
				matched.push( cur );
4558
				matched.push( cur );
Line 3955... Line 4585...
3955
		}
4585
		}
Line 3956... Line 4586...
3956
 
4586
 
3957
		return r;
4587
		return r;
3958
	}
4588
	}
-
 
4589
});
-
 
4590
 
-
 
4591
// Implement the identical functionality for filter and not
-
 
4592
function winnow( elements, qualifier, keep ) {
-
 
4593
	if ( jQuery.isFunction( qualifier ) ) {
-
 
4594
		return jQuery.grep(elements, function( elem, i ) {
-
 
4595
			var retVal = !!qualifier.call( elem, i, elem );
-
 
4596
			return retVal === keep;
-
 
4597
		});
-
 
4598
 
-
 
4599
	} else if ( qualifier.nodeType ) {
-
 
4600
		return jQuery.grep(elements, function( elem, i ) {
-
 
4601
			return (elem === qualifier) === keep;
-
 
4602
		});
-
 
4603
 
-
 
4604
	} else if ( typeof qualifier === "string" ) {
-
 
4605
		var filtered = jQuery.grep(elements, function( elem ) {
-
 
4606
			return elem.nodeType === 1;
-
 
4607
		});
-
 
4608
 
-
 
4609
		if ( isSimple.test( qualifier ) ) {
-
 
4610
			return jQuery.filter(qualifier, filtered, !keep);
-
 
4611
		} else {
-
 
4612
			qualifier = jQuery.filter( qualifier, filtered );
-
 
4613
		}
-
 
4614
	}
-
 
4615
 
-
 
4616
	return jQuery.grep(elements, function( elem, i ) {
-
 
4617
		return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
-
 
4618
	});
-
 
4619
}
-
 
4620
 
-
 
4621
 
-
 
4622
 
3959
});
4623
 
3960
var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
4624
var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
3961
	rleadingWhitespace = /^\s+/,
-
 
3962
	rxhtmlTag = /(<([\w:]+)[^>]*?)\/>/g,
4625
	rleadingWhitespace = /^\s+/,
3963
	rselfClosing = /^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,
4626
	rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
3964
	rtagName = /<([\w:]+)/,
4627
	rtagName = /<([\w:]+)/,
3965
	rtbody = /<tbody/i,
4628
	rtbody = /<tbody/i,
3966
	rhtml = /<|&#?\w+;/,
4629
	rhtml = /<|&#?\w+;/,
3967
	rnocache = /<script|<object|<embed|<option|<style/i,
4630
	rnocache = /<(?:script|object|embed|option|style)/i,
3968
	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,  // checked="checked" or checked (html5)
4631
	// checked="checked" or checked (html5)
3969
	fcloseTag = function( all, front, tag ) {
-
 
3970
		return rselfClosing.test( tag ) ?
-
 
3971
			all :
4632
	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
3972
			front + "></" + tag + ">";
-
 
3973
	},
4633
	raction = /\=([^="'>\s]+\/)>/g,
3974
	wrapMap = {
4634
	wrapMap = {
3975
		option: [ 1, "<select multiple='multiple'>", "</select>" ],
4635
		option: [ 1, "<select multiple='multiple'>", "</select>" ],
3976
		legend: [ 1, "<fieldset>", "</fieldset>" ],
4636
		legend: [ 1, "<fieldset>", "</fieldset>" ],
3977
		thead: [ 1, "<table>", "</table>" ],
4637
		thead: [ 1, "<table>", "</table>" ],
Line 3993... Line 4653...
3993
 
4653
 
3994
jQuery.fn.extend({
4654
jQuery.fn.extend({
3995
	text: function( text ) {
4655
	text: function( text ) {
3996
		if ( jQuery.isFunction(text) ) {
4656
		if ( jQuery.isFunction(text) ) {
3997
			return this.each(function(i) {
4657
			return this.each(function(i) {
-
 
4658
				var self = jQuery( this );
3998
				var self = jQuery(this);
4659
 
3999
				self.text( text.call(this, i, self.text()) );
4660
				self.text( text.call(this, i, self.text()) );
4000
			});
4661
			});
Line 4001... Line 4662...
4001
		}
4662
		}
Line 4042... Line 4703...
4042
				jQuery(this).wrapInner( html.call(this, i) );
4703
				jQuery(this).wrapInner( html.call(this, i) );
4043
			});
4704
			});
4044
		}
4705
		}
Line 4045... Line 4706...
4045
 
4706
 
-
 
4707
		return this.each(function() {
4046
		return this.each(function() {
4708
			var self = jQuery( this ),
Line 4047... Line 4709...
4047
			var self = jQuery( this ), contents = self.contents();
4709
				contents = self.contents();
4048
 
4710
 
Line 4049... Line 4711...
4049
			if ( contents.length ) {
4711
			if ( contents.length ) {
Line 4153... Line 4815...
4153
				// In order to get around this, we use innerHTML.
4815
				// In order to get around this, we use innerHTML.
4154
				// Unfortunately, this means some modifications to
4816
				// Unfortunately, this means some modifications to
4155
				// attributes in IE that are actually only stored
4817
				// attributes in IE that are actually only stored
4156
				// as properties will not be copied (such as the
4818
				// as properties will not be copied (such as the
4157
				// the name attribute on an input).
4819
				// the name attribute on an input).
-
 
4820
				var html = this.outerHTML,
4158
				var html = this.outerHTML, ownerDocument = this.ownerDocument;
4821
					ownerDocument = this.ownerDocument;
-
 
4822
 
4159
				if ( !html ) {
4823
				if ( !html ) {
4160
					var div = ownerDocument.createElement("div");
4824
					var div = ownerDocument.createElement("div");
4161
					div.appendChild( this.cloneNode(true) );
4825
					div.appendChild( this.cloneNode(true) );
4162
					html = div.innerHTML;
4826
					html = div.innerHTML;
4163
				}
4827
				}
Line 4164... Line 4828...
4164
 
4828
 
4165
				return jQuery.clean([html.replace(rinlinejQuery, "")
4829
				return jQuery.clean([html.replace(rinlinejQuery, "")
4166
					// Handle the case in IE 8 where action=/test/> self-closes a tag
4830
					// Handle the case in IE 8 where action=/test/> self-closes a tag
4167
					.replace(/=([^="'>\s]+\/)>/g, '="$1">')
4831
					.replace(raction, '="$1">')
4168
					.replace(rleadingWhitespace, "")], ownerDocument)[0];
4832
					.replace(rleadingWhitespace, "")], ownerDocument)[0];
4169
			} else {
4833
			} else {
4170
				return this.cloneNode(true);
4834
				return this.cloneNode(true);
4171
			}
4835
			}
Line 4190... Line 4854...
4190
		// See if we can take a shortcut and just use innerHTML
4854
		// See if we can take a shortcut and just use innerHTML
4191
		} else if ( typeof value === "string" && !rnocache.test( value ) &&
4855
		} else if ( typeof value === "string" && !rnocache.test( value ) &&
4192
			(jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
4856
			(jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
4193
			!wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
4857
			!wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
Line 4194... Line 4858...
4194
 
4858
 
Line 4195... Line 4859...
4195
			value = value.replace(rxhtmlTag, fcloseTag);
4859
			value = value.replace(rxhtmlTag, "<$1></$2>");
4196
 
4860
 
4197
			try {
4861
			try {
4198
				for ( var i = 0, l = this.length; i < l; i++ ) {
4862
				for ( var i = 0, l = this.length; i < l; i++ ) {
Line 4208... Line 4872...
4208
				this.empty().append( value );
4872
				this.empty().append( value );
4209
			}
4873
			}
Line 4210... Line 4874...
4210
 
4874
 
4211
		} else if ( jQuery.isFunction( value ) ) {
4875
		} else if ( jQuery.isFunction( value ) ) {
4212
			this.each(function(i){
4876
			this.each(function(i){
4213
				var self = jQuery(this), old = self.html();
-
 
-
 
4877
				var self = jQuery( this );
4214
				self.empty().append(function(){
4878
 
4215
					return value.call( this, i, old );
-
 
4216
				});
4879
				self.html( value.call(this, i, self.html()) );
Line 4217... Line 4880...
4217
			});
4880
			});
4218
 
4881
 
4219
		} else {
4882
		} else {
Line 4233... Line 4896...
4233
					self.replaceWith( value.call( this, i, old ) );
4896
					self.replaceWith( value.call( this, i, old ) );
4234
				});
4897
				});
4235
			}
4898
			}
Line 4236... Line 4899...
4236
 
4899
 
4237
			if ( typeof value !== "string" ) {
4900
			if ( typeof value !== "string" ) {
4238
				value = jQuery(value).detach();
4901
				value = jQuery( value ).detach();
Line 4239... Line 4902...
4239
			}
4902
			}
4240
 
4903
 
-
 
4904
			return this.each(function() {
Line 4241... Line 4905...
4241
			return this.each(function() {
4905
				var next = this.nextSibling,
Line 4242... Line 4906...
4242
				var next = this.nextSibling, parent = this.parentNode;
4906
					parent = this.parentNode;
4243
 
4907
 
4244
				jQuery(this).remove();
4908
				jQuery( this ).remove();
4245
 
4909
 
Line 4257... Line 4921...
4257
	detach: function( selector ) {
4921
	detach: function( selector ) {
4258
		return this.remove( selector, true );
4922
		return this.remove( selector, true );
4259
	},
4923
	},
Line 4260... Line 4924...
4260
 
4924
 
4261
	domManip: function( args, table, callback ) {
4925
	domManip: function( args, table, callback ) {
-
 
4926
		var results, first, fragment, parent,
-
 
4927
			value = args[0],
Line 4262... Line 4928...
4262
		var results, first, value = args[0], scripts = [], fragment, parent;
4928
			scripts = [];
4263
 
4929
 
4264
		// We can't cloneNode fragments that contain checked, in WebKit
4930
		// We can't cloneNode fragments that contain checked, in WebKit
4265
		if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
4931
		if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
Line 4282... Line 4948...
4282
			// If we're in a fragment, just use that instead of building a new one
4948
			// If we're in a fragment, just use that instead of building a new one
4283
			if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
4949
			if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
4284
				results = { fragment: parent };
4950
				results = { fragment: parent };
Line 4285... Line 4951...
4285
 
4951
 
4286
			} else {
4952
			} else {
4287
				results = buildFragment( args, this, scripts );
4953
				results = jQuery.buildFragment( args, this, scripts );
Line 4288... Line 4954...
4288
			}
4954
			}
Line 4289... Line 4955...
4289
			
4955
			
Line 4314... Line 4980...
4314
				jQuery.each( scripts, evalScript );
4980
				jQuery.each( scripts, evalScript );
4315
			}
4981
			}
4316
		}
4982
		}
Line 4317... Line 4983...
4317
 
4983
 
4318
		return this;
-
 
4319
 
-
 
4320
		function root( elem, cur ) {
-
 
4321
			return jQuery.nodeName(elem, "table") ?
-
 
4322
				(elem.getElementsByTagName("tbody")[0] ||
-
 
4323
				elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
-
 
4324
				elem;
-
 
4325
		}
4984
		return this;
4326
	}
4985
	}
Line -... Line 4986...
-
 
4986
});
-
 
4987
 
-
 
4988
function root( elem, cur ) {
-
 
4989
	return jQuery.nodeName(elem, "table") ?
-
 
4990
		(elem.getElementsByTagName("tbody")[0] ||
-
 
4991
		elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
-
 
4992
		elem;
4327
});
4993
}
4328
 
4994
 
Line 4329... Line 4995...
4329
function cloneCopyEvent(orig, ret) {
4995
function cloneCopyEvent(orig, ret) {
4330
	var i = 0;
4996
	var i = 0;
4331
 
4997
 
4332
	ret.each(function() {
4998
	ret.each(function() {
Line -... Line 4999...
-
 
4999
		if ( this.nodeName !== (orig[i] && orig[i].nodeName) ) {
4333
		if ( this.nodeName !== (orig[i] && orig[i].nodeName) ) {
5000
			return;
-
 
5001
		}
Line 4334... Line 5002...
4334
			return;
5002
 
4335
		}
5003
		var oldData = jQuery.data( orig[i++] ),
4336
 
5004
			curData = jQuery.data( this, oldData ),
Line 4347... Line 5015...
4347
			}
5015
			}
4348
		}
5016
		}
4349
	});
5017
	});
4350
}
5018
}
Line 4351... Line 5019...
4351
 
5019
 
4352
function buildFragment( args, nodes, scripts ) {
5020
jQuery.buildFragment = function( args, nodes, scripts ) {
4353
	var fragment, cacheable, cacheresults,
5021
	var fragment, cacheable, cacheresults,
Line 4354... Line 5022...
4354
		doc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document);
5022
		doc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document);
4355
 
5023
 
Line 4377... Line 5045...
4377
	if ( cacheable ) {
5045
	if ( cacheable ) {
4378
		jQuery.fragments[ args[0] ] = cacheresults ? fragment : 1;
5046
		jQuery.fragments[ args[0] ] = cacheresults ? fragment : 1;
4379
	}
5047
	}
Line 4380... Line 5048...
4380
 
5048
 
4381
	return { fragment: fragment, cacheable: cacheable };
5049
	return { fragment: fragment, cacheable: cacheable };
Line 4382... Line 5050...
4382
}
5050
};
Line 4383... Line 5051...
4383
 
5051
 
4384
jQuery.fragments = {};
5052
jQuery.fragments = {};
Line 4389... Line 5057...
4389
	insertBefore: "before",
5057
	insertBefore: "before",
4390
	insertAfter: "after",
5058
	insertAfter: "after",
4391
	replaceAll: "replaceWith"
5059
	replaceAll: "replaceWith"
4392
}, function( name, original ) {
5060
}, function( name, original ) {
4393
	jQuery.fn[ name ] = function( selector ) {
5061
	jQuery.fn[ name ] = function( selector ) {
-
 
5062
		var ret = [],
4394
		var ret = [], insert = jQuery( selector ),
5063
			insert = jQuery( selector ),
4395
			parent = this.length === 1 && this[0].parentNode;
5064
			parent = this.length === 1 && this[0].parentNode;
Line 4396... Line 5065...
4396
		
5065
		
4397
		if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
5066
		if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
4398
			insert[ original ]( this[0] );
5067
			insert[ original ]( this[0] );
Line 4399... Line 5068...
4399
			return this;
5068
			return this;
4400
			
5069
			
4401
		} else {
5070
		} else {
4402
			for ( var i = 0, l = insert.length; i < l; i++ ) {
5071
			for ( var i = 0, l = insert.length; i < l; i++ ) {
4403
				var elems = (i > 0 ? this.clone(true) : this).get();
5072
				var elems = (i > 0 ? this.clone(true) : this).get();
4404
				jQuery.fn[ original ].apply( jQuery(insert[i]), elems );
5073
				jQuery( insert[i] )[ original ]( elems );
Line 4405... Line 5074...
4405
				ret = ret.concat( elems );
5074
				ret = ret.concat( elems );
4406
			}
5075
			}
Line 4434... Line 5103...
4434
			if ( typeof elem === "string" && !rhtml.test( elem ) ) {
5103
			if ( typeof elem === "string" && !rhtml.test( elem ) ) {
4435
				elem = context.createTextNode( elem );
5104
				elem = context.createTextNode( elem );
Line 4436... Line 5105...
4436
 
5105
 
4437
			} else if ( typeof elem === "string" ) {
5106
			} else if ( typeof elem === "string" ) {
4438
				// Fix "XHTML"-style tags in all browsers
5107
				// Fix "XHTML"-style tags in all browsers
Line 4439... Line 5108...
4439
				elem = elem.replace(rxhtmlTag, fcloseTag);
5108
				elem = elem.replace(rxhtmlTag, "<$1></$2>");
4440
 
5109
 
4441
				// Trim whitespace, otherwise indexOf won't work as expected
5110
				// Trim whitespace, otherwise indexOf won't work as expected
4442
				var tag = (rtagName.exec( elem ) || ["", ""])[1].toLowerCase(),
5111
				var tag = (rtagName.exec( elem ) || ["", ""])[1].toLowerCase(),
Line 4487... Line 5156...
4487
				ret = jQuery.merge( ret, elem );
5156
				ret = jQuery.merge( ret, elem );
4488
			}
5157
			}
4489
		}
5158
		}
Line 4490... Line 5159...
4490
 
5159
 
4491
		if ( fragment ) {
5160
		if ( fragment ) {
4492
			for ( var i = 0; ret[i]; i++ ) {
5161
			for ( i = 0; ret[i]; i++ ) {
4493
				if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
5162
				if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
Line 4494... Line 5163...
4494
					scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
5163
					scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
4495
				
5164
				
Line 4509... Line 5178...
4509
		var data, id, cache = jQuery.cache,
5178
		var data, id, cache = jQuery.cache,
4510
			special = jQuery.event.special,
5179
			special = jQuery.event.special,
4511
			deleteExpando = jQuery.support.deleteExpando;
5180
			deleteExpando = jQuery.support.deleteExpando;
Line 4512... Line 5181...
4512
		
5181
		
-
 
5182
		for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
-
 
5183
			if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
-
 
5184
				continue;
-
 
5185
			}
4513
		for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
5186
 
Line 4514... Line 5187...
4514
			id = elem[ jQuery.expando ];
5187
			id = elem[ jQuery.expando ];
4515
			
5188
			
Line 4516... Line 5189...
4516
			if ( id ) {
5189
			if ( id ) {
4517
				data = cache[ id ];
5190
				data = cache[ id ];
4518
				
5191
				
4519
				if ( data.events ) {
5192
				if ( data && data.events ) {
Line 4520... Line 5193...
4520
					for ( var type in data.events ) {
5193
					for ( var type in data.events ) {
4521
						if ( special[ type ] ) {
5194
						if ( special[ type ] ) {
4522
							jQuery.event.remove( elem, type );
5195
							jQuery.event.remove( elem, type );
4523
 
5196
 
4524
						} else {
5197
						} else {
Line 4525... Line 5198...
4525
							removeEvent( elem, type, data.handle );
5198
							jQuery.removeEvent( elem, type, data.handle );
Line 4537... Line 5210...
4537
				delete cache[ id ];
5210
				delete cache[ id ];
4538
			}
5211
			}
4539
		}
5212
		}
4540
	}
5213
	}
4541
});
5214
});
-
 
5215
 
4542
// exclude the following css properties to add px
5216
function evalScript( i, elem ) {
-
 
5217
	if ( elem.src ) {
-
 
5218
		jQuery.ajax({
-
 
5219
			url: elem.src,
-
 
5220
			async: false,
-
 
5221
			dataType: "script"
-
 
5222
		});
-
 
5223
	} else {
4543
var rexclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,
5224
		jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
-
 
5225
	}
-
 
5226
 
-
 
5227
	if ( elem.parentNode ) {
-
 
5228
		elem.parentNode.removeChild( elem );
-
 
5229
	}
-
 
5230
}
-
 
5231
 
-
 
5232
 
-
 
5233
 
-
 
5234
 
4544
	ralpha = /alpha\([^)]*\)/,
5235
var ralpha = /alpha\([^)]*\)/i,
4545
	ropacity = /opacity=([^)]*)/,
5236
	ropacity = /opacity=([^)]*)/,
4546
	rfloat = /float/i,
-
 
4547
	rdashAlpha = /-([a-z])/ig,
5237
	rdashAlpha = /-([a-z])/ig,
4548
	rupper = /([A-Z])/g,
5238
	rupper = /([A-Z])/g,
4549
	rnumpx = /^-?\d+(?:px)?$/i,
5239
	rnumpx = /^-?\d+(?:px)?$/i,
4550
	rnum = /^-?\d/,
5240
	rnum = /^-?\d/,
Line 4551... Line 5241...
4551
 
5241
 
4552
	cssShow = { position: "absolute", visibility: "hidden", display:"block" },
5242
	cssShow = { position: "absolute", visibility: "hidden", display: "block" },
4553
	cssWidth = [ "Left", "Right" ],
5243
	cssWidth = [ "Left", "Right" ],
-
 
5244
	cssHeight = [ "Top", "Bottom" ],
-
 
5245
	curCSS,
-
 
5246
 
-
 
5247
	getComputedStyle,
Line 4554... Line -...
4554
	cssHeight = [ "Top", "Bottom" ],
-
 
4555
 
-
 
4556
	// cache check for defaultView.getComputedStyle
-
 
4557
	getComputedStyle = document.defaultView && document.defaultView.getComputedStyle,
-
 
4558
	// normalize float css property
5248
	currentStyle,
4559
	styleFloat = jQuery.support.cssFloat ? "cssFloat" : "styleFloat",
5249
 
4560
	fcamelCase = function( all, letter ) {
5250
	fcamelCase = function( all, letter ) {
Line 4561... Line 5251...
4561
		return letter.toUpperCase();
5251
		return letter.toUpperCase();
4562
	};
-
 
4563
 
5252
	};
4564
jQuery.fn.css = function( name, value ) {
-
 
4565
	return access( this, name, value, true, function( elem, name, value ) {
-
 
4566
		if ( value === undefined ) {
-
 
4567
			return jQuery.curCSS( elem, name );
5253
 
4568
		}
5254
jQuery.fn.css = function( name, value ) {
4569
		
5255
	// Setting 'undefined' is a no-op
Line -... Line 5256...
-
 
5256
	if ( arguments.length === 2 && value === undefined ) {
-
 
5257
		return this;
4570
		if ( typeof value === "number" && !rexclude.test(name) ) {
5258
	}
-
 
5259
 
4571
			value += "px";
5260
	return jQuery.access( this, name, value, true, function( elem, name, value ) {
4572
		}
5261
		return value !== undefined ?
Line 4573... Line 5262...
4573
 
5262
			jQuery.style( elem, name, value ) :
-
 
5263
			jQuery.css( elem, name );
-
 
5264
	});
-
 
5265
};
-
 
5266
 
4574
		jQuery.style( elem, name, value );
5267
jQuery.extend({
-
 
5268
	// Add in style property hooks for overriding the default
4575
	});
5269
	// behavior of getting and setting a style property
4576
};
5270
	cssHooks: {
4577
 
5271
		opacity: {
4578
jQuery.extend({
-
 
Line 4579... Line 5272...
4579
	style: function( elem, name, value ) {
5272
			get: function( elem, computed ) {
4580
		// don't set styles on text and comment nodes
5273
				if ( computed ) {
4581
		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
5274
					// We should always get a number back from opacity
-
 
5275
					var ret = curCSS( elem, "opacity", "opacity" );
4582
			return undefined;
5276
					return ret === "" ? "1" : ret;
-
 
5277
 
Line 4583... Line 5278...
4583
		}
5278
				} else {
-
 
5279
					return elem.style.opacity;
-
 
5280
				}
-
 
5281
			}
-
 
5282
		}
-
 
5283
	},
-
 
5284
 
-
 
5285
	// Exclude the following css properties to add px
Line 4584... Line -...
4584
 
-
 
4585
		// ignore negative width and height values #1599
-
 
4586
		if ( (name === "width" || name === "height") && parseFloat(value) < 0 ) {
-
 
4587
			value = undefined;
5286
	cssNumber: {
4588
		}
5287
		"zIndex": true,
4589
 
5288
		"fontWeight": true,
4590
		var style = elem.style || elem, set = value !== undefined;
-
 
4591
 
5289
		"opacity": true,
4592
		// IE uses filters for opacity
-
 
4593
		if ( !jQuery.support.opacity && name === "opacity" ) {
-
 
4594
			if ( set ) {
5290
		"zoom": true,
4595
				// IE has trouble with opacity if it does not have layout
5291
		"lineHeight": true
Line 4596... Line 5292...
4596
				// Force it by setting the zoom level
5292
	},
-
 
5293
 
4597
				style.zoom = 1;
5294
	// Add in properties whose names you wish to fix before
-
 
5295
	// setting or getting the value
4598
 
5296
	cssProps: {
4599
				// Set the alpha filter to set the opacity
5297
		// normalize float css property
Line 4600... Line 5298...
4600
				var opacity = parseInt( value, 10 ) + "" === "NaN" ? "" : "alpha(opacity=" + value * 100 + ")";
5298
		"float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
-
 
5299
	},
-
 
5300
 
-
 
5301
	// Get and set the style property on a DOM Node
-
 
5302
	style: function( elem, name, value, extra ) {
-
 
5303
		// Don't set styles on text and comment nodes
-
 
5304
		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
4601
				var filter = style.filter || jQuery.curCSS( elem, "filter" ) || "";
5305
			return;
-
 
5306
		}
-
 
5307
 
-
 
5308
		// Make sure that we're working with the right name
-
 
5309
		var ret, origName = jQuery.camelCase( name ),
-
 
5310
			style = elem.style, hooks = jQuery.cssHooks[ origName ];
-
 
5311
 
-
 
5312
		name = jQuery.cssProps[ origName ] || origName;
4602
				style.filter = ralpha.test(filter) ? filter.replace(ralpha, opacity) : opacity;
5313
 
4603
			}
5314
		// Check if we're setting a value
Line -... Line 5315...
-
 
5315
		if ( value !== undefined ) {
-
 
5316
			// Make sure that NaN and null values aren't set. See: #7116
-
 
5317
			if ( typeof value === "number" && isNaN( value ) || value == null ) {
-
 
5318
				return;
-
 
5319
			}
4604
 
5320
 
-
 
5321
			// If a number was passed in, add 'px' to the (except for certain CSS properties)
-
 
5322
			if ( typeof value === "number" && !jQuery.cssNumber[ origName ] ) {
Line 4605... Line 5323...
4605
			return style.filter && style.filter.indexOf("opacity=") >= 0 ?
5323
				value += "px";
-
 
5324
			}
-
 
5325
 
4606
				(parseFloat( ropacity.exec(style.filter)[1] ) / 100) + "":
5326
			// If a hook was provided, use that value, otherwise just set the specified value
4607
				"";
5327
			if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
Line -... Line 5328...
-
 
5328
				// Wrapped to prevent IE from throwing errors when 'invalid' values are provided
4608
		}
5329
				// Fixes bug #5509
-
 
5330
				try {
4609
 
5331
					style[ name ] = value;
Line 4610... Line 5332...
4610
		// Make sure we're using the right name for getting the float value
5332
				} catch(e) {}
4611
		if ( rfloat.test( name ) ) {
5333
			}
4612
			name = styleFloat;
5334
 
-
 
5335
		} else {
Line 4613... Line -...
4613
		}
-
 
4614
 
5336
			// If a hook was provided get the non-computed value from there
4615
		name = name.replace(rdashAlpha, fcamelCase);
-
 
4616
 
-
 
4617
		if ( set ) {
-
 
4618
			style[ name ] = value;
-
 
Line 4619... Line 5337...
4619
		}
5337
			if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
4620
 
-
 
4621
		return style[ name ];
5338
				return ret;
4622
	},
5339
			}
Line 4623... Line -...
4623
 
-
 
4624
	css: function( elem, name, force, extra ) {
5340
 
4625
		if ( name === "width" || name === "height" ) {
5341
			// Otherwise just get the value from the style object
4626
			var val, props = cssShow, which = name === "width" ? cssWidth : cssHeight;
5342
			return style[ name ];
4627
 
5343
		}
4628
			function getWH() {
-
 
4629
				val = name === "width" ? elem.offsetWidth : elem.offsetHeight;
5344
	},
Line 4630... Line 5345...
4630
 
5345
 
4631
				if ( extra === "border" ) {
-
 
4632
					return;
-
 
4633
				}
5346
	css: function( elem, name, extra ) {
4634
 
5347
		// Make sure that we're working with the right name
Line -... Line 5348...
-
 
5348
		var ret, origName = jQuery.camelCase( name ),
-
 
5349
			hooks = jQuery.cssHooks[ origName ];
-
 
5350
 
4635
				jQuery.each( which, function() {
5351
		name = jQuery.cssProps[ origName ] || origName;
4636
					if ( !extra ) {
5352
 
Line -... Line 5353...
-
 
5353
		// If a hook was provided get the computed value from there
-
 
5354
		if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
-
 
5355
			return ret;
-
 
5356
 
4637
						val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0;
5357
		// Otherwise, if a way to get the computed value exists, use that
-
 
5358
		} else if ( curCSS ) {
4638
					}
5359
			return curCSS( elem, name, origName );
Line 4639... Line 5360...
4639
 
5360
		}
4640
					if ( extra === "margin" ) {
5361
	},
-
 
5362
 
-
 
5363
	// A method for quickly swapping in/out CSS properties to get correct calculations
Line 4641... Line 5364...
4641
						val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0;
5364
	swap: function( elem, options, callback ) {
4642
					} else {
-
 
4643
						val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0;
-
 
4644
					}
5365
		var old = {};
4645
				});
-
 
Line -... Line 5366...
-
 
5366
 
4646
			}
5367
		// Remember the old values, and insert the new ones
4647
 
5368
		for ( var name in options ) {
4648
			if ( elem.offsetWidth !== 0 ) {
5369
			old[ name ] = elem.style[ name ];
4649
				getWH();
5370
			elem.style[ name ] = options[ name ];
-
 
5371
		}
-
 
5372
 
-
 
5373
		callback.call( elem );
Line -... Line 5374...
-
 
5374
 
4650
			} else {
5375
		// Revert the old values
4651
				jQuery.swap( elem, props, getWH );
5376
		for ( name in options ) {
4652
			}
5377
			elem.style[ name ] = old[ name ];
4653
 
5378
		}
Line 4654... Line 5379...
4654
			return Math.max(0, Math.round(val));
5379
	},
4655
		}
5380
 
Line 4656... Line 5381...
4656
 
5381
	camelCase: function( string ) {
-
 
5382
		return string.replace( rdashAlpha, fcamelCase );
-
 
5383
	}
Line 4657... Line 5384...
4657
		return jQuery.curCSS( elem, name, force );
5384
});
4658
	},
5385
 
4659
 
5386
// DEPRECATED, Use jQuery.css() instead
-
 
5387
jQuery.curCSS = jQuery.css;
-
 
5388
 
4660
	curCSS: function( elem, name, force ) {
5389
jQuery.each(["height", "width"], function( i, name ) {
Line -... Line 5390...
-
 
5390
	jQuery.cssHooks[ name ] = {
4661
		var ret, style = elem.style, filter;
5391
		get: function( elem, computed, extra ) {
Line 4662... Line 5392...
4662
 
5392
			var val;
-
 
5393
 
-
 
5394
			if ( computed ) {
-
 
5395
				if ( elem.offsetWidth !== 0 ) {
Line 4663... Line 5396...
4663
		// IE uses filters for opacity
5396
					val = getWH( elem, name, extra );
4664
		if ( !jQuery.support.opacity && name === "opacity" && elem.currentStyle ) {
-
 
4665
			ret = ropacity.test(elem.currentStyle.filter || "") ?
5397
 
-
 
5398
				} else {
Line -... Line 5399...
-
 
5399
					jQuery.swap( elem, cssShow, function() {
-
 
5400
						val = getWH( elem, name, extra );
4666
				(parseFloat(RegExp.$1) / 100) + "" :
5401
					});
-
 
5402
				}
Line 4667... Line 5403...
4667
				"";
5403
 
4668
 
5404
				if ( val <= 0 ) {
4669
			return ret === "" ?
5405
					val = curCSS( elem, name, name );
Line 4670... Line -...
4670
				"1" :
-
 
4671
				ret;
5406
 
4672
		}
5407
					if ( val === "0px" && currentStyle ) {
4673
 
5408
						val = currentStyle( elem, name, name );
-
 
5409
					}
-
 
5410
 
-
 
5411
					if ( val != null ) {
Line -... Line 5412...
-
 
5412
						// Should return "auto" instead of 0, use 0 for
-
 
5413
						// temporary backwards-compat
4674
		// Make sure we're using the right name for getting the float value
5414
						return val === "" || val === "auto" ? "0px" : val;
-
 
5415
					}
-
 
5416
				}
-
 
5417
 
-
 
5418
				if ( val < 0 || val == null ) {
-
 
5419
					val = elem.style[ name ];
-
 
5420
 
-
 
5421
					// Should return "auto" instead of 0, use 0 for
-
 
5422
					// temporary backwards-compat
-
 
5423
					return val === "" || val === "auto" ? "0px" : val;
4675
		if ( rfloat.test( name ) ) {
5424
				}
-
 
5425
 
-
 
5426
				return typeof val === "string" ? val : val + "px";
Line 4676... Line 5427...
4676
			name = styleFloat;
5427
			}
-
 
5428
		},
-
 
5429
 
-
 
5430
		set: function( elem, value ) {
-
 
5431
			if ( rnumpx.test( value ) ) {
Line 4677... Line 5432...
4677
		}
5432
				// ignore negative width and height values #1599
4678
 
5433
				value = parseFloat(value);
-
 
5434
 
-
 
5435
				if ( value >= 0 ) {
-
 
5436
					return value + "px";
-
 
5437
				}
Line 4679... Line -...
4679
		if ( !force && style && style[ name ] ) {
-
 
4680
			ret = style[ name ];
5438
 
4681
 
5439
			} else {
4682
		} else if ( getComputedStyle ) {
-
 
4683
 
5440
				return value;
Line 4684... Line -...
4684
			// Only "float" is needed here
-
 
4685
			if ( rfloat.test( name ) ) {
-
 
4686
				name = "float";
5441
			}
4687
			}
-
 
Line 4688... Line 5442...
4688
 
5442
		}
4689
			name = name.replace( rupper, "-$1" ).toLowerCase();
5443
	};
-
 
5444
});
-
 
5445
 
-
 
5446
if ( !jQuery.support.opacity ) {
-
 
5447
	jQuery.cssHooks.opacity = {
-
 
5448
		get: function( elem, computed ) {
4690
 
5449
			// IE uses filters for opacity
4691
			var defaultView = elem.ownerDocument.defaultView;
5450
			return ropacity.test((computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "") ?
4692
 
5451
				(parseFloat(RegExp.$1) / 100) + "" :
Line 4693... Line 5452...
4693
			if ( !defaultView ) {
5452
				computed ? "1" : "";
4694
				return null;
5453
		},
-
 
5454
 
Line -... Line 5455...
-
 
5455
		set: function( elem, value ) {
-
 
5456
			var style = elem.style;
-
 
5457
 
-
 
5458
			// IE has trouble with opacity if it does not have layout
-
 
5459
			// Force it by setting the zoom level
-
 
5460
			style.zoom = 1;
-
 
5461
 
-
 
5462
			// Set the alpha filter to set the opacity
-
 
5463
			var opacity = jQuery.isNaN(value) ?
-
 
5464
				"" :
4695
			}
5465
				"alpha(opacity=" + value * 100 + ")",
-
 
5466
				filter = style.filter || "";
-
 
5467
 
-
 
5468
			style.filter = ralpha.test(filter) ?
4696
 
5469
				filter.replace(ralpha, opacity) :
-
 
5470
				style.filter + ' ' + opacity;
-
 
5471
		}
-
 
5472
	};
-
 
5473
}
-
 
5474
 
-
 
5475
if ( document.defaultView && document.defaultView.getComputedStyle ) {
-
 
5476
	getComputedStyle = function( elem, newName, name ) {
4697
			var computedStyle = defaultView.getComputedStyle( elem, null );
5477
		var ret, defaultView, computedStyle;
-
 
5478
 
-
 
5479
		name = name.replace( rupper, "-$1" ).toLowerCase();
Line -... Line 5480...
-
 
5480
 
-
 
5481
		if ( !(defaultView = elem.ownerDocument.defaultView) ) {
-
 
5482
			return undefined;
-
 
5483
		}
-
 
5484
 
-
 
5485
		if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
-
 
5486
			ret = computedStyle.getPropertyValue( name );
4698
 
5487
			if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
-
 
5488
				ret = jQuery.style( elem, name );
-
 
5489
			}
4699
			if ( computedStyle ) {
5490
		}
-
 
5491
 
-
 
5492
		return ret;
-
 
5493
	};
4700
				ret = computedStyle.getPropertyValue( name );
5494
}
-
 
5495
 
4701
			}
5496
if ( document.documentElement.currentStyle ) {
4702
 
5497
	currentStyle = function( elem, name ) {
Line 4703... Line 5498...
4703
			// We should always get a number back from opacity
5498
		var left, rsLeft,
-
 
5499
			ret = elem.currentStyle && elem.currentStyle[ name ],
Line 4704... Line 5500...
4704
			if ( name === "opacity" && ret === "" ) {
5500
			style = elem.style;
4705
				ret = "1";
-
 
4706
			}
5501
 
4707
 
5502
		// From the awesome hack by Dean Edwards
4708
		} else if ( elem.currentStyle ) {
5503
		// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
-
 
5504
 
-
 
5505
		// If we're not dealing with a regular pixel number
4709
			var camelCase = name.replace(rdashAlpha, fcamelCase);
5506
		// but a number that has a weird ending, we need to convert it to pixels
Line 4710... Line 5507...
4710
 
5507
		if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
4711
			ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];
5508
			// Remember the original values
4712
 
5509
			left = style.left;
4713
			// From the awesome hack by Dean Edwards
5510
			rsLeft = elem.runtimeStyle.left;
Line 4714... Line 5511...
4714
			// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
5511
 
4715
 
-
 
4716
			// If we're not dealing with a regular pixel number
-
 
4717
			// but a number that has a weird ending, we need to convert it to pixels
-
 
4718
			if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
-
 
4719
				// Remember the original values
5512
			// Put in the new values to get a computed value out
Line 4720... Line 5513...
4720
				var left = style.left, rsLeft = elem.runtimeStyle.left;
5513
			elem.runtimeStyle.left = elem.currentStyle.left;
4721
 
5514
			style.left = name === "fontSize" ? "1em" : (ret || 0);
4722
				// Put in the new values to get a computed value out
5515
			ret = style.pixelLeft + "px";
4723
				elem.runtimeStyle.left = elem.currentStyle.left;
5516
 
-
 
5517
			// Revert the changed values
-
 
5518
			style.left = left;
-
 
5519
			elem.runtimeStyle.left = rsLeft;
-
 
5520
		}
4724
				style.left = camelCase === "fontSize" ? "1em" : (ret || 0);
5521
 
4725
				ret = style.pixelLeft + "px";
5522
		return ret === "" ? "auto" : ret;
4726
 
5523
	};
4727
				// Revert the changed values
5524
}
-
 
5525
 
-
 
5526
curCSS = getComputedStyle || currentStyle;
4728
				style.left = left;
5527
 
4729
				elem.runtimeStyle.left = rsLeft;
5528
function getWH( elem, name, extra ) {
4730
			}
5529
	var which = name === "width" ? cssWidth : cssHeight,
4731
		}
5530
		val = name === "width" ? elem.offsetWidth : elem.offsetHeight;
4732
 
5531
 
-
 
5532
	if ( extra === "border" ) {
Line 4733... Line 5533...
4733
		return ret;
5533
		return val;
4734
	},
5534
	}
Line 4735... Line 5535...
4735
 
5535
 
4736
	// A method for quickly swapping in/out CSS properties to get correct calculations
5536
	jQuery.each( which, function() {
4737
	swap: function( elem, options, callback ) {
5537
		if ( !extra ) {
4738
		var old = {};
5538
			val -= parseFloat(jQuery.css( elem, "padding" + this )) || 0;
Line 4739... Line 5539...
4739
 
5539
		}
4740
		// Remember the old values, and insert the new ones
5540
 
4741
		for ( var name in options ) {
5541
		if ( extra === "margin" ) {
4742
			old[ name ] = elem.style[ name ];
5542
			val += parseFloat(jQuery.css( elem, "margin" + this )) || 0;
Line 4827... Line 5627...
4827
				// If successful, inject the HTML into all the matched elements
5627
				// If successful, inject the HTML into all the matched elements
4828
				if ( status === "success" || status === "notmodified" ) {
5628
				if ( status === "success" || status === "notmodified" ) {
4829
					// See if a selector was specified
5629
					// See if a selector was specified
4830
					self.html( selector ?
5630
					self.html( selector ?
4831
						// Create a dummy div to hold the results
5631
						// Create a dummy div to hold the results
4832
						jQuery("<div />")
5632
						jQuery("<div>")
4833
							// inject the contents of the document in, removing the scripts
5633
							// inject the contents of the document in, removing the scripts
4834
							// to avoid any 'Permission Denied' errors in IE
5634
							// to avoid any 'Permission Denied' errors in IE
4835
							.append(res.responseText.replace(rscript, ""))
5635
							.append(res.responseText.replace(rscript, ""))
Line 4836... Line 5636...
4836
 
5636
 
Line 4851... Line 5651...
4851
	},
5651
	},
Line 4852... Line 5652...
4852
 
5652
 
4853
	serialize: function() {
5653
	serialize: function() {
4854
		return jQuery.param(this.serializeArray());
5654
		return jQuery.param(this.serializeArray());
-
 
5655
	},
4855
	},
5656
 
4856
	serializeArray: function() {
5657
	serializeArray: function() {
4857
		return this.map(function() {
5658
		return this.map(function() {
4858
			return this.elements ? jQuery.makeArray(this.elements) : this;
5659
			return this.elements ? jQuery.makeArray(this.elements) : this;
4859
		})
5660
		})
Line 4882... Line 5683...
4882
		return this.bind(o, f);
5683
		return this.bind(o, f);
4883
	};
5684
	};
4884
});
5685
});
Line 4885... Line 5686...
4885
 
5686
 
4886
jQuery.extend({
-
 
4887
 
5687
jQuery.extend({
4888
	get: function( url, data, callback, type ) {
5688
	get: function( url, data, callback, type ) {
4889
		// shift arguments if data argument was omited
5689
		// shift arguments if data argument was omited
4890
		if ( jQuery.isFunction( data ) ) {
5690
		if ( jQuery.isFunction( data ) ) {
4891
			type = type || callback;
5691
			type = type || callback;
Line 4943... Line 5743...
4943
		data: null,
5743
		data: null,
4944
		username: null,
5744
		username: null,
4945
		password: null,
5745
		password: null,
4946
		traditional: false,
5746
		traditional: false,
4947
		*/
5747
		*/
4948
		// Create the request object; Microsoft failed to properly
-
 
4949
		// implement the XMLHttpRequest in IE7 (can't request local files),
-
 
4950
		// so we use the ActiveXObject when it is available
-
 
4951
		// This function can be overriden by calling jQuery.ajaxSetup
5748
		// This function can be overriden by calling jQuery.ajaxSetup
4952
		xhr: window.XMLHttpRequest && (window.location.protocol !== "file:" || !window.ActiveXObject) ?
-
 
4953
			function() {
5749
		xhr: function() {
4954
				return new window.XMLHttpRequest();
5750
			return new window.XMLHttpRequest();
4955
			} :
-
 
4956
			function() {
-
 
4957
				try {
-
 
4958
					return new window.ActiveXObject("Microsoft.XMLHTTP");
-
 
4959
				} catch(e) {}
-
 
4960
			},
5751
		},
4961
		accepts: {
5752
		accepts: {
4962
			xml: "application/xml, text/xml",
5753
			xml: "application/xml, text/xml",
4963
			html: "text/html",
5754
			html: "text/html",
4964
			script: "text/javascript, application/javascript",
5755
			script: "text/javascript, application/javascript",
4965
			json: "application/json, text/javascript",
5756
			json: "application/json, text/javascript",
4966
			text: "text/plain",
5757
			text: "text/plain",
4967
			_default: "*/*"
5758
			_default: "*/*"
4968
		}
5759
		}
4969
	},
5760
	},
Line 4970... Line -...
4970
 
-
 
4971
	// Last-Modified header cache for next request
-
 
4972
	lastModified: {},
-
 
4973
	etag: {},
-
 
4974
 
5761
 
4975
	ajax: function( origSettings ) {
5762
	ajax: function( origSettings ) {
-
 
5763
		var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings),
4976
		var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings);
5764
			jsonp, status, data, type = s.type.toUpperCase(), noContent = rnoContent.test(type);
4977
		
5765
 
-
 
5766
		s.url = s.url.replace( rhash, "" );
4978
		var jsonp, status, data,
5767
 
4979
			callbackContext = origSettings && origSettings.context || s,
5768
		// Use original (not extended) context object if it was provided
Line 4980... Line 5769...
4980
			type = s.type.toUpperCase();
5769
		s.context = origSettings && origSettings.context != null ? origSettings.context : s;
4981
 
5770
 
4982
		// convert data if not already a string
5771
		// convert data if not already a string
4983
		if ( s.data && s.processData && typeof s.data !== "string" ) {
5772
		if ( s.data && s.processData && typeof s.data !== "string" ) {
Line 5010... Line 5799...
5010
			// We need to make sure
5799
			// We need to make sure
5011
			// that a JSONP style response is executed properly
5800
			// that a JSONP style response is executed properly
5012
			s.dataType = "script";
5801
			s.dataType = "script";
Line 5013... Line 5802...
5013
 
5802
 
5014
			// Handle JSONP-style loading
-
 
5015
			window[ jsonp ] = window[ jsonp ] || function( tmp ) {
-
 
5016
				data = tmp;
-
 
5017
				success();
-
 
5018
				complete();
-
 
5019
				// Garbage collect
5803
			// Handle JSONP-style loading
Line -... Line 5804...
-
 
5804
			var customJsonp = window[ jsonp ];
-
 
5805
 
-
 
5806
			window[ jsonp ] = function( tmp ) {
-
 
5807
				if ( jQuery.isFunction( customJsonp ) ) {
5020
				window[ jsonp ] = undefined;
5808
					customJsonp( tmp );
5021
 
5809
 
5022
				try {
5810
				} else {
Line -... Line 5811...
-
 
5811
					// Garbage collect
-
 
5812
					window[ jsonp ] = undefined;
-
 
5813
 
-
 
5814
					try {
-
 
5815
						delete window[ jsonp ];
-
 
5816
					} catch( jsonpError ) {}
-
 
5817
				}
-
 
5818
 
-
 
5819
				data = tmp;
5023
					delete window[ jsonp ];
5820
				jQuery.handleSuccess( s, xhr, status, data );
5024
				} catch(e) {}
5821
				jQuery.handleComplete( s, xhr, status, data );
5025
 
5822
				
5026
				if ( head ) {
5823
				if ( head ) {
5027
					head.removeChild( script );
5824
					head.removeChild( script );
Line 5028... Line 5825...
5028
				}
5825
				}
5029
			};
5826
			};
5030
		}
5827
		}
Line 5031... Line 5828...
5031
 
5828
 
5032
		if ( s.dataType === "script" && s.cache === null ) {
5829
		if ( s.dataType === "script" && s.cache === null ) {
Line 5033... Line 5830...
5033
			s.cache = false;
5830
			s.cache = false;
5034
		}
5831
		}
Line 5035... Line 5832...
5035
 
5832
 
5036
		if ( s.cache === false && type === "GET" ) {
5833
		if ( s.cache === false && noContent ) {
5037
			var ts = now();
5834
			var ts = jQuery.now();
Line 5038... Line 5835...
5038
 
5835
 
5039
			// try replacing _= if it is there
5836
			// try replacing _= if it is there
5040
			var ret = s.url.replace(rts, "$1_=" + ts + "$2");
5837
			var ret = s.url.replace(rts, "$1_=" + ts);
5041
 
5838
 
Line 5042... Line 5839...
5042
			// if nothing was replaced, add timestamp to the end
5839
			// if nothing was replaced, add timestamp to the end
5043
			s.url = ret + ((ret === s.url) ? (rquery.test(s.url) ? "&" : "?") + "_=" + ts : "");
5840
			s.url = ret + ((ret === s.url) ? (rquery.test(s.url) ? "&" : "?") + "_=" + ts : "");
5044
		}
5841
		}
5045
 
5842
 
Line 5046... Line 5843...
5046
		// If data is available, append data to url for get requests
5843
		// If data is available, append data to url for GET/HEAD requests
5047
		if ( s.data && type === "GET" ) {
5844
		if ( s.data && noContent ) {
5048
			s.url += (rquery.test(s.url) ? "&" : "?") + s.data;
5845
			s.url += (rquery.test(s.url) ? "&" : "?") + s.data;
Line 5049... Line 5846...
5049
		}
5846
		}
5050
 
5847
 
5051
		// Watch for a new set of requests
5848
		// Watch for a new set of requests
5052
		if ( s.global && ! jQuery.active++ ) {
5849
		if ( s.global && jQuery.active++ === 0 ) {
5053
			jQuery.event.trigger( "ajaxStart" );
5850
			jQuery.event.trigger( "ajaxStart" );
5054
		}
-
 
5055
 
5851
		}
5056
		// Matches an absolute URL, and saves the domain
5852
 
5057
		var parts = rurl.exec( s.url ),
5853
		// Matches an absolute URL, and saves the domain
-
 
5854
		var parts = rurl.exec( s.url ),
Line 5058... Line 5855...
5058
			remote = parts && (parts[1] && parts[1] !== location.protocol || parts[2] !== location.host);
5855
			remote = parts && (parts[1] && parts[1].toLowerCase() !== location.protocol || parts[2].toLowerCase() !== location.host);
5059
 
5856
 
5060
		// If we're requesting a remote document
5857
		// If we're requesting a remote document
Line 5061... Line 5858...
5061
		// and trying to load JSON or Script with a GET
5858
		// and trying to load JSON or Script with a GET
5062
		if ( s.dataType === "script" && type === "GET" && remote ) {
5859
		if ( s.dataType === "script" && type === "GET" && remote ) {
5063
			var head = document.getElementsByTagName("head")[0] || document.documentElement;
5860
			var head = document.getElementsByTagName("head")[0] || document.documentElement;
5064
			var script = document.createElement("script");
5861
			var script = document.createElement("script");
5065
			script.src = s.url;
5862
			if ( s.scriptCharset ) {
5066
			if ( s.scriptCharset ) {
5863
				script.charset = s.scriptCharset;
5067
				script.charset = s.scriptCharset;
5864
			}
Line 5068... Line 5865...
5068
			}
5865
			script.src = s.url;
5069
 
5866
 
5070
			// Handle Script loading
5867
			// Handle Script loading
5071
			if ( !jsonp ) {
5868
			if ( !jsonp ) {
Line 5113... Line 5910...
5113
			xhr.open(type, s.url, s.async);
5910
			xhr.open(type, s.url, s.async);
5114
		}
5911
		}
Line 5115... Line 5912...
5115
 
5912
 
5116
		// Need an extra try/catch for cross domain requests in Firefox 3
5913
		// Need an extra try/catch for cross domain requests in Firefox 3
5117
		try {
5914
		try {
5118
			// Set the correct header, if data is being sent
5915
			// Set content-type if data specified and content-body is valid for this type
5119
			if ( s.data || origSettings && origSettings.contentType ) {
5916
			if ( (s.data != null && !noContent) || (origSettings && origSettings.contentType) ) {
5120
				xhr.setRequestHeader("Content-Type", s.contentType);
5917
				xhr.setRequestHeader("Content-Type", s.contentType);
Line 5121... Line 5918...
5121
			}
5918
			}
5122
 
5919
 
Line 5137... Line 5934...
5137
				xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
5934
				xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
5138
			}
5935
			}
Line 5139... Line 5936...
5139
 
5936
 
5140
			// Set the Accepts header for the server, depending on the dataType
5937
			// Set the Accepts header for the server, depending on the dataType
5141
			xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ?
5938
			xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ?
5142
				s.accepts[ s.dataType ] + ", */*" :
5939
				s.accepts[ s.dataType ] + ", */*; q=0.01" :
5143
				s.accepts._default );
5940
				s.accepts._default );
Line 5144... Line 5941...
5144
		} catch(e) {}
5941
		} catch( headerError ) {}
5145
 
5942
 
5146
		// Allow custom headers/mimetypes and early abort
5943
		// Allow custom headers/mimetypes and early abort
5147
		if ( s.beforeSend && s.beforeSend.call(callbackContext, xhr, s) === false ) {
5944
		if ( s.beforeSend && s.beforeSend.call(s.context, xhr, s) === false ) {
5148
			// Handle the global AJAX counter
5945
			// Handle the global AJAX counter
5149
			if ( s.global && ! --jQuery.active ) {
5946
			if ( s.global && jQuery.active-- === 1 ) {
Line 5150... Line 5947...
5150
				jQuery.event.trigger( "ajaxStop" );
5947
				jQuery.event.trigger( "ajaxStop" );
5151
			}
5948
			}
5152
 
5949
 
5153
			// close opended socket
5950
			// close opended socket
Line 5154... Line 5951...
5154
			xhr.abort();
5951
			xhr.abort();
5155
			return false;
5952
			return false;
5156
		}
5953
		}
Line 5157... Line 5954...
5157
 
5954
 
5158
		if ( s.global ) {
5955
		if ( s.global ) {
5159
			trigger("ajaxSend", [xhr, s]);
5956
			jQuery.triggerGlobal( s, "ajaxSend", [xhr, s] );
5160
		}
5957
		}
5161
 
5958
 
5162
		// Wait for a response to come back
5959
		// Wait for a response to come back
5163
		var onreadystatechange = xhr.onreadystatechange = function( isTimeout ) {
5960
		var onreadystatechange = xhr.onreadystatechange = function( isTimeout ) {
5164
			// The request was aborted
5961
			// The request was aborted
5165
			if ( !xhr || xhr.readyState === 0 || isTimeout === "abort" ) {
5962
			if ( !xhr || xhr.readyState === 0 || isTimeout === "abort" ) {
Line 5166... Line 5963...
5166
				// Opera doesn't call onreadystatechange before this point
5963
				// Opera doesn't call onreadystatechange before this point
5167
				// so we simulate the call
5964
				// so we simulate the call
5168
				if ( !requestDone ) {
5965
				if ( !requestDone ) {
Line 5192... Line 5989...
5192
				if ( status === "success" ) {
5989
				if ( status === "success" ) {
5193
					// Watch for, and catch, XML document parse errors
5990
					// Watch for, and catch, XML document parse errors
5194
					try {
5991
					try {
5195
						// process the data (runs the xml through httpData regardless of callback)
5992
						// process the data (runs the xml through httpData regardless of callback)
5196
						data = jQuery.httpData( xhr, s.dataType, s );
5993
						data = jQuery.httpData( xhr, s.dataType, s );
5197
					} catch(err) {
5994
					} catch( parserError ) {
5198
						status = "parsererror";
5995
						status = "parsererror";
5199
						errMsg = err;
5996
						errMsg = parserError;
5200
					}
5997
					}
5201
				}
5998
				}
Line 5202... Line 5999...
5202
 
5999
 
5203
				// Make sure that the request was successful or notmodified
6000
				// Make sure that the request was successful or notmodified
5204
				if ( status === "success" || status === "notmodified" ) {
6001
				if ( status === "success" || status === "notmodified" ) {
5205
					// JSONP handles its own success callback
6002
					// JSONP handles its own success callback
5206
					if ( !jsonp ) {
6003
					if ( !jsonp ) {
5207
						success();
6004
						jQuery.handleSuccess( s, xhr, status, data );
5208
					}
6005
					}
5209
				} else {
6006
				} else {
5210
					jQuery.handleError(s, xhr, status, errMsg);
6007
					jQuery.handleError( s, xhr, status, errMsg );
Line 5211... Line 6008...
5211
				}
6008
				}
5212
 
6009
 
-
 
6010
				// Fire the complete handlers
-
 
6011
				if ( !jsonp ) {
Line 5213... Line 6012...
5213
				// Fire the complete handlers
6012
					jQuery.handleComplete( s, xhr, status, data );
5214
				complete();
6013
				}
5215
 
6014
 
Line 5222... Line 6021...
5222
					xhr = null;
6021
					xhr = null;
5223
				}
6022
				}
5224
			}
6023
			}
5225
		};
6024
		};
Line 5226... Line 6025...
5226
 
6025
 
5227
		// Override the abort handler, if we can (IE doesn't allow it, but that's OK)
6026
		// Override the abort handler, if we can (IE 6 doesn't allow it, but that's OK)
5228
		// Opera doesn't fire onreadystatechange at all on abort
6027
		// Opera doesn't fire onreadystatechange at all on abort
5229
		try {
6028
		try {
5230
			var oldAbort = xhr.abort;
6029
			var oldAbort = xhr.abort;
5231
			xhr.abort = function() {
6030
			xhr.abort = function() {
5232
				if ( xhr ) {
6031
				if ( xhr ) {
-
 
6032
					// oldAbort has no call property in IE7 so
-
 
6033
					// just do it this way, which works in all
-
 
6034
					// browsers
5233
					oldAbort.call( xhr );
6035
					Function.prototype.call.call( oldAbort, xhr );
Line 5234... Line 6036...
5234
				}
6036
				}
5235
 
6037
 
5236
				onreadystatechange( "abort" );
6038
				onreadystatechange( "abort" );
Line 5237... Line 6039...
5237
			};
6039
			};
5238
		} catch(e) { }
6040
		} catch( abortError ) {}
5239
 
6041
 
5240
		// Timeout checker
6042
		// Timeout checker
Line 5247... Line 6049...
5247
			}, s.timeout);
6049
			}, s.timeout);
5248
		}
6050
		}
Line 5249... Line 6051...
5249
 
6051
 
5250
		// Send the data
6052
		// Send the data
5251
		try {
6053
		try {
-
 
6054
			xhr.send( noContent || s.data == null ? null : s.data );
5252
			xhr.send( type === "POST" || type === "PUT" || type === "DELETE" ? s.data : null );
6055
 
5253
		} catch(e) {
6056
		} catch( sendError ) {
-
 
6057
			jQuery.handleError( s, xhr, null, sendError );
5254
			jQuery.handleError(s, xhr, null, e);
6058
 
5255
			// Fire the complete handlers
6059
			// Fire the complete handlers
5256
			complete();
6060
			jQuery.handleComplete( s, xhr, status, data );
Line 5257... Line 6061...
5257
		}
6061
		}
5258
 
6062
 
5259
		// firefox 1.5 doesn't fire statechange for sync requests
6063
		// firefox 1.5 doesn't fire statechange for sync requests
5260
		if ( !s.async ) {
6064
		if ( !s.async ) {
Line 5261... Line -...
5261
			onreadystatechange();
-
 
5262
		}
6065
			onreadystatechange();
5263
 
6066
		}
5264
		function success() {
-
 
5265
			// If a local callback was specified, fire it and pass it the data
6067
 
Line -... Line 6068...
-
 
6068
		// return XMLHttpRequest to allow aborting the request etc.
-
 
6069
		return xhr;
-
 
6070
	},
-
 
6071
 
-
 
6072
	// Serialize an array of form elements or a set of
-
 
6073
	// key/values into a query string
-
 
6074
	param: function( a, traditional ) {
-
 
6075
		var s = [],
-
 
6076
			add = function( key, value ) {
-
 
6077
				// If value is a function, invoke it and return its value
-
 
6078
				value = jQuery.isFunction(value) ? value() : value;
-
 
6079
				s[ s.length ] = encodeURIComponent(key) + "=" + encodeURIComponent(value);
-
 
6080
			};
-
 
6081
		
-
 
6082
		// Set traditional to true for jQuery <= 1.3.2 behavior.
-
 
6083
		if ( traditional === undefined ) {
-
 
6084
			traditional = jQuery.ajaxSettings.traditional;
5266
			if ( s.success ) {
6085
		}
-
 
6086
		
-
 
6087
		// If an array was passed in, assume that it is an array of form elements.
-
 
6088
		if ( jQuery.isArray(a) || a.jquery ) {
-
 
6089
			// Serialize the form elements
-
 
6090
			jQuery.each( a, function() {
-
 
6091
				add( this.name, this.value );
-
 
6092
			});
5267
				s.success.call( callbackContext, data, status, xhr );
6093
			
5268
			}
6094
		} else {
5269
 
6095
			// If traditional, encode the "old" way (the way 1.3.2 or older
5270
			// Fire the global callback
6096
			// did it), otherwise encode params recursively.
Line 5271... Line -...
5271
			if ( s.global ) {
-
 
5272
				trigger( "ajaxSuccess", [xhr, s] );
6097
			for ( var prefix in a ) {
5273
			}
-
 
5274
		}
6098
				buildParams( prefix, a[prefix], traditional, add );
5275
 
6099
			}
-
 
6100
		}
Line -... Line 6101...
-
 
6101
 
-
 
6102
		// Return the resulting serialization
5276
		function complete() {
6103
		return s.join("&").replace(r20, "+");
5277
			// Process result
6104
	}
-
 
6105
});
5278
			if ( s.complete ) {
6106
 
5279
				s.complete.call( callbackContext, xhr, status);
6107
function buildParams( prefix, obj, traditional, add ) {
Line -... Line 6108...
-
 
6108
	if ( jQuery.isArray(obj) && obj.length ) {
-
 
6109
		// Serialize array item.
-
 
6110
		jQuery.each( obj, function( i, v ) {
5280
			}
6111
			if ( traditional || rbracket.test( prefix ) ) {
-
 
6112
				// Treat each array item as a scalar.
-
 
6113
				add( prefix, v );
5281
 
6114
 
5282
			// The request was completed
6115
			} else {
-
 
6116
				// If array item is non-scalar (array or object), encode its
5283
			if ( s.global ) {
6117
				// numeric index to resolve deserialization ambiguity issues.
-
 
6118
				// Note that rack (as of 1.0.0) can't currently deserialize
-
 
6119
				// nested arrays properly, and attempting to do so may cause
-
 
6120
				// a server error. Possible fixes are to modify rack's
-
 
6121
				// deserialization algorithm or to provide an option or flag
-
 
6122
				// to force array serialization to be shallow.
-
 
6123
				buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add );
-
 
6124
			}
-
 
6125
		});
-
 
6126
			
-
 
6127
	} else if ( !traditional && obj != null && typeof obj === "object" ) {
-
 
6128
		if ( jQuery.isEmptyObject( obj ) ) {
5284
				trigger( "ajaxComplete", [xhr, s] );
6129
			add( prefix, "" );
5285
			}
6130
 
-
 
6131
		// Serialize object item.
5286
 
6132
		} else {
5287
			// Handle the global AJAX counter
6133
			jQuery.each( obj, function( k, v ) {
5288
			if ( s.global && ! --jQuery.active ) {
6134
				buildParams( prefix + "[" + k + "]", v, traditional, add );
-
 
6135
			});
Line -... Line 6136...
-
 
6136
		}
-
 
6137
					
-
 
6138
	} else {
-
 
6139
		// Serialize scalar item.
5289
				jQuery.event.trigger( "ajaxStop" );
6140
		add( prefix, obj );
5290
			}
6141
	}
-
 
6142
}
-
 
6143
 
-
 
6144
// This is still on the jQuery object... for now
5291
		}
6145
// Want to move this to jQuery.ajax some day
Line 5292... Line 6146...
5292
		
6146
jQuery.extend({
5293
		function trigger(type, args) {
6147
 
5294
			(s.context ? jQuery(s.context) : jQuery.event).trigger(type, args);
6148
	// Counter for holding the number of active queries
5295
		}
6149
	active: 0,
5296
 
6150
 
Line 5297... Line 6151...
5297
		// return XMLHttpRequest to allow aborting the request etc.
6151
	// Last-Modified header cache for next request
5298
		return xhr;
6152
	lastModified: {},
5299
	},
6153
	etag: {},
5300
 
6154
 
5301
	handleError: function( s, xhr, status, e ) {
6155
	handleError: function( s, xhr, status, e ) {
Line -... Line 6156...
-
 
6156
		// If a local callback was specified, fire it
-
 
6157
		if ( s.error ) {
-
 
6158
			s.error.call( s.context, xhr, status, e );
5302
		// If a local callback was specified, fire it
6159
		}
-
 
6160
 
-
 
6161
		// Fire the global callback
-
 
6162
		if ( s.global ) {
-
 
6163
			jQuery.triggerGlobal( s, "ajaxError", [xhr, s, e] );
-
 
6164
		}
-
 
6165
	},
-
 
6166
 
-
 
6167
	handleSuccess: function( s, xhr, status, data ) {
-
 
6168
		// If a local callback was specified, fire it and pass it the data
5303
		if ( s.error ) {
6169
		if ( s.success ) {
-
 
6170
			s.success.call( s.context, data, status, xhr );
-
 
6171
		}
-
 
6172
 
-
 
6173
		// Fire the global callback
-
 
6174
		if ( s.global ) {
-
 
6175
			jQuery.triggerGlobal( s, "ajaxSuccess", [xhr, s] );
-
 
6176
		}
-
 
6177
	},
-
 
6178
 
-
 
6179
	handleComplete: function( s, xhr, status ) {
-
 
6180
		// Process result
-
 
6181
		if ( s.complete ) {
-
 
6182
			s.complete.call( s.context, xhr, status );
-
 
6183
		}
-
 
6184
 
-
 
6185
		// The request was completed
-
 
6186
		if ( s.global ) {
-
 
6187
			jQuery.triggerGlobal( s, "ajaxComplete", [xhr, s] );
Line 5304... Line 6188...
5304
			s.error.call( s.context || s, xhr, status, e );
6188
		}
5305
		}
6189
 
5306
 
6190
		// Handle the global AJAX counter
5307
		// Fire the global callback
6191
		if ( s.global && jQuery.active-- === 1 ) {
5308
		if ( s.global ) {
6192
			jQuery.event.trigger( "ajaxStop" );
5309
			(s.context ? jQuery(s.context) : jQuery.event).trigger( "ajaxError", [xhr, s, e] );
-
 
5310
		}
6193
		}
5311
	},
6194
	},
5312
 
6195
		
Line 5313... Line 6196...
5313
	// Counter for holding the number of active queries
6196
	triggerGlobal: function( s, type, args ) {
5314
	active: 0,
6197
		(s.context && s.context.url == null ? jQuery(s.context) : jQuery.event).trigger(type, args);
Line 5337... Line 6220...
5337
 
6220
 
5338
		if ( etag ) {
6221
		if ( etag ) {
5339
			jQuery.etag[url] = etag;
6222
			jQuery.etag[url] = etag;
Line 5340... Line -...
5340
		}
-
 
5341
 
6223
		}
5342
		// Opera returns 0 when status is 304
6224
 
Line 5343... Line 6225...
5343
		return xhr.status === 304 || xhr.status === 0;
6225
		return xhr.status === 304;
5344
	},
6226
	},
5345
 
6227
 
Line 5369... Line 6251...
5369
				jQuery.globalEval( data );
6251
				jQuery.globalEval( data );
5370
			}
6252
			}
5371
		}
6253
		}
Line 5372... Line 6254...
5372
 
6254
 
5373
		return data;
6255
		return data;
Line 5374... Line -...
5374
	},
-
 
5375
 
-
 
5376
	// Serialize an array of form elements or a set of
-
 
5377
	// key/values into a query string
6256
	}
5378
	param: function( a, traditional ) {
6257
 
-
 
6258
});
5379
		var s = [];
6259
 
-
 
6260
/*
5380
		
6261
 * Create the request object; Microsoft failed to properly
5381
		// Set traditional to true for jQuery <= 1.3.2 behavior.
6262
 * implement the XMLHttpRequest in IE7 (can't request local files),
-
 
6263
 * so we use the ActiveXObject when it is available
5382
		if ( traditional === undefined ) {
6264
 * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
5383
			traditional = jQuery.ajaxSettings.traditional;
-
 
5384
		}
-
 
5385
		
6265
 * we need a fallback.
5386
		// If an array was passed in, assume that it is an array of form elements.
-
 
5387
		if ( jQuery.isArray(a) || a.jquery ) {
6266
 */
5388
			// Serialize the form elements
6267
if ( window.ActiveXObject ) {
5389
			jQuery.each( a, function() {
-
 
5390
				add( this.name, this.value );
-
 
5391
			});
6268
	jQuery.ajaxSettings.xhr = function() {
5392
			
-
 
5393
		} else {
6269
		if ( window.location.protocol !== "file:" ) {
5394
			// If traditional, encode the "old" way (the way 1.3.2 or older
6270
			try {
5395
			// did it), otherwise encode params recursively.
-
 
5396
			for ( var prefix in a ) {
-
 
5397
				buildParams( prefix, a[prefix] );
6271
				return new window.XMLHttpRequest();
Line -... Line 6272...
-
 
6272
			} catch(xhrError) {}
-
 
6273
		}
-
 
6274
 
-
 
6275
		try {
-
 
6276
			return new window.ActiveXObject("Microsoft.XMLHTTP");
-
 
6277
		} catch(activeError) {}
5398
			}
6278
	};
5399
		}
6279
}
-
 
6280
 
-
 
6281
// Does this browser support XHR requests?
Line 5400... Line -...
5400
 
-
 
5401
		// Return the resulting serialization
-
 
5402
		return s.join("&").replace(r20, "+");
-
 
5403
 
-
 
5404
		function buildParams( prefix, obj ) {
-
 
5405
			if ( jQuery.isArray(obj) ) {
-
 
5406
				// Serialize array item.
-
 
5407
				jQuery.each( obj, function( i, v ) {
-
 
5408
					if ( traditional || /\[\]$/.test( prefix ) ) {
-
 
5409
						// Treat each array item as a scalar.
-
 
5410
						add( prefix, v );
-
 
5411
					} else {
-
 
5412
						// If array item is non-scalar (array or object), encode its
-
 
5413
						// numeric index to resolve deserialization ambiguity issues.
-
 
5414
						// Note that rack (as of 1.0.0) can't currently deserialize
-
 
5415
						// nested arrays properly, and attempting to do so may cause
-
 
5416
						// a server error. Possible fixes are to modify rack's
-
 
5417
						// deserialization algorithm or to provide an option or flag
-
 
5418
						// to force array serialization to be shallow.
-
 
5419
						buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v );
-
 
5420
					}
-
 
5421
				});
-
 
5422
					
-
 
5423
			} else if ( !traditional && obj != null && typeof obj === "object" ) {
-
 
5424
				// Serialize object item.
-
 
5425
				jQuery.each( obj, function( k, v ) {
-
 
5426
					buildParams( prefix + "[" + k + "]", v );
-
 
5427
				});
-
 
5428
					
-
 
5429
			} else {
-
 
Line 5430... Line -...
5430
				// Serialize scalar item.
-
 
5431
				add( prefix, obj );
-
 
5432
			}
-
 
5433
		}
-
 
5434
 
-
 
5435
		function add( key, value ) {
-
 
5436
			// If value is a function, invoke it and return its value
-
 
5437
			value = jQuery.isFunction(value) ? value() : value;
6282
jQuery.support.ajax = !!jQuery.ajaxSettings.xhr();
5438
			s[ s.length ] = encodeURIComponent(key) + "=" + encodeURIComponent(value);
6283
 
5439
		}
6284
 
5440
	}
6285
 
5441
});
6286
 
5442
var elemdisplay = {},
6287
var elemdisplay = {},
5443
	rfxtypes = /toggle|show|hide/,
6288
	rfxtypes = /^(?:toggle|show|hide)$/,
5444
	rfxnum = /^([+-]=)?([\d+-.]+)(.*)$/,
6289
	rfxnum = /^([+\-]=)?([\d+.\-]+)(.*)$/,
Line 5451... Line 6296...
5451
		// opacity animations
6296
		// opacity animations
5452
		[ "opacity" ]
6297
		[ "opacity" ]
5453
	];
6298
	];
Line 5454... Line 6299...
5454
 
6299
 
5455
jQuery.fn.extend({
6300
jQuery.fn.extend({
5456
	show: function( speed, callback ) {
-
 
5457
		if ( speed || speed === 0) {
-
 
5458
			return this.animate( genFx("show", 3), speed, callback);
-
 
5459
 
-
 
5460
		} else {
-
 
5461
			for ( var i = 0, l = this.length; i < l; i++ ) {
-
 
5462
				var old = jQuery.data(this[i], "olddisplay");
-
 
5463
 
-
 
5464
				this[i].style.display = old || "";
-
 
5465
 
-
 
5466
				if ( jQuery.css(this[i], "display") === "none" ) {
6301
	show: function( speed, easing, callback ) {
5467
					var nodeName = this[i].nodeName, display;
-
 
5468
 
-
 
5469
					if ( elemdisplay[ nodeName ] ) {
-
 
Line 5470... Line -...
5470
						display = elemdisplay[ nodeName ];
-
 
5471
 
-
 
5472
					} else {
-
 
5473
						var elem = jQuery("<" + nodeName + " />").appendTo("body");
-
 
5474
 
-
 
5475
						display = elem.css("display");
6302
		var elem, display;
5476
 
6303
 
5477
						if ( display === "none" ) {
-
 
Line -... Line 6304...
-
 
6304
		if ( speed || speed === 0 ) {
-
 
6305
			return this.animate( genFx("show", 3), speed, easing, callback);
5478
							display = "block";
6306
 
-
 
6307
		} else {
Line -... Line 6308...
-
 
6308
			for ( var i = 0, j = this.length; i < j; i++ ) {
-
 
6309
				elem = this[i];
-
 
6310
				display = elem.style.display;
5479
						}
6311
 
5480
 
6312
				// Reset the inline display of this element to learn if it is
Line -... Line 6313...
-
 
6313
				// being hidden by cascaded rules or not
-
 
6314
				if ( !jQuery.data(elem, "olddisplay") && display === "none" ) {
-
 
6315
					display = elem.style.display = "";
-
 
6316
				}
5481
						elem.remove();
6317
 
5482
 
6318
				// Set elements which have been overridden with display: none
5483
						elemdisplay[ nodeName ] = display;
6319
				// in a stylesheet to whatever the default browser style is
Line 5484... Line 6320...
5484
					}
6320
				// for such an element
5485
 
6321
				if ( display === "" && jQuery.css( elem, "display" ) === "none" ) {
5486
					jQuery.data(this[i], "olddisplay", display);
6322
					jQuery.data(elem, "olddisplay", defaultDisplay(elem.nodeName));
-
 
6323
				}
-
 
6324
			}
-
 
6325
 
-
 
6326
			// Set the display of most of the elements in a second loop
5487
				}
6327
			// to avoid the constant reflow
-
 
6328
			for ( i = 0; i < j; i++ ) {
5488
			}
6329
				elem = this[i];
Line 5489... Line 6330...
5489
 
6330
				display = elem.style.display;
5490
			// Set the display of the elements in a second loop
6331
 
5491
			// to avoid the constant reflow
6332
				if ( display === "" || display === "none" ) {
Line 5492... Line 6333...
5492
			for ( var j = 0, k = this.length; j < k; j++ ) {
6333
					elem.style.display = jQuery.data(elem, "olddisplay") || "";
5493
				this[j].style.display = jQuery.data(this[j], "olddisplay") || "";
6334
				}
5494
			}
6335
			}
Line 5495... Line 6336...
5495
 
6336
 
5496
			return this;
6337
			return this;
5497
		}
6338
		}
-
 
6339
	},
5498
	},
6340
 
5499
 
6341
	hide: function( speed, easing, callback ) {
5500
	hide: function( speed, callback ) {
6342
		if ( speed || speed === 0 ) {
5501
		if ( speed || speed === 0 ) {
6343
			return this.animate( genFx("hide", 3), speed, easing, callback);
Line 5502... Line 6344...
5502
			return this.animate( genFx("hide", 3), speed, callback);
6344
 
5503
 
6345
		} else {
5504
		} else {
6346
			for ( var i = 0, j = this.length; i < j; i++ ) {
5505
			for ( var i = 0, l = this.length; i < l; i++ ) {
6347
				var display = jQuery.css( this[i], "display" );
5506
				var old = jQuery.data(this[i], "olddisplay");
6348
 
Line 5507... Line 6349...
5507
				if ( !old && old !== "none" ) {
6349
				if ( display !== "none" ) {
5508
					jQuery.data(this[i], "olddisplay", jQuery.css(this[i], "display"));
6350
					jQuery.data( this[i], "olddisplay", display );
5509
				}
6351
				}
Line 5510... Line 6352...
5510
			}
6352
			}
5511
 
6353
 
Line 5512... Line 6354...
5512
			// Set the display of the elements in a second loop
6354
			// Set the display of the elements in a second loop
5513
			// to avoid the constant reflow
6355
			// to avoid the constant reflow
Line 5514... Line 6356...
5514
			for ( var j = 0, k = this.length; j < k; j++ ) {
6356
			for ( i = 0; i < j; i++ ) {
5515
				this[j].style.display = "none";
6357
				this[i].style.display = "none";
Line 5533... Line 6375...
5533
				var state = bool ? fn : jQuery(this).is(":hidden");
6375
				var state = bool ? fn : jQuery(this).is(":hidden");
5534
				jQuery(this)[ state ? "show" : "hide" ]();
6376
				jQuery(this)[ state ? "show" : "hide" ]();
5535
			});
6377
			});
Line 5536... Line 6378...
5536
 
6378
 
5537
		} else {
6379
		} else {
5538
			this.animate(genFx("toggle", 3), fn, fn2);
6380
			this.animate(genFx("toggle", 3), fn, fn2, callback);
Line 5539... Line 6381...
5539
		}
6381
		}
5540
 
6382
 
Line 5541... Line 6383...
5541
		return this;
6383
		return this;
5542
	},
6384
	},
5543
 
6385
 
5544
	fadeTo: function( speed, to, callback ) {
6386
	fadeTo: function( speed, to, easing, callback ) {
Line 5545... Line 6387...
5545
		return this.filter(":hidden").css("opacity", 0).show().end()
6387
		return this.filter(":hidden").css("opacity", 0).show().end()
5546
					.animate({opacity: to}, speed, callback);
6388
					.animate({opacity: to}, speed, easing, callback);
Line 5547... Line 6389...
5547
	},
6389
	},
5548
 
6390
 
5549
	animate: function( prop, speed, easing, callback ) {
6391
	animate: function( prop, speed, easing, callback ) {
Line 5550... Line 6392...
5550
		var optall = jQuery.speed(speed, easing, callback);
6392
		var optall = jQuery.speed(speed, easing, callback);
-
 
6393
 
-
 
6394
		if ( jQuery.isEmptyObject( prop ) ) {
-
 
6395
			return this.each( optall.complete );
5551
 
6396
		}
-
 
6397
 
5552
		if ( jQuery.isEmptyObject( prop ) ) {
6398
		return this[ optall.queue === false ? "each" : "queue" ](function() {
5553
			return this.each( optall.complete );
6399
			// XXX 'this' does not always have a nodeName when running the
Line 5554... Line 6400...
5554
		}
6400
			// test suite
5555
 
6401
 
Line 5556... Line 6402...
5556
		return this[ optall.queue === false ? "each" : "queue" ](function() {
6402
			var opt = jQuery.extend({}, optall), p,
5557
			var opt = jQuery.extend({}, optall), p,
6403
				isElement = this.nodeType === 1,
5558
				hidden = this.nodeType === 1 && jQuery(this).is(":hidden"),
6404
				hidden = isElement && jQuery(this).is(":hidden"),
5559
				self = this;
6405
				self = this;
Line 5569... Line 6415...
5569
 
6415
 
5570
				if ( prop[p] === "hide" && hidden || prop[p] === "show" && !hidden ) {
6416
				if ( prop[p] === "hide" && hidden || prop[p] === "show" && !hidden ) {
5571
					return opt.complete.call(this);
6417
					return opt.complete.call(this);
Line 5572... Line 6418...
5572
				}
6418
				}
5573
 
-
 
5574
				if ( ( p === "height" || p === "width" ) && this.style ) {
-
 
5575
					// Store display property
-
 
5576
					opt.display = jQuery.css(this, "display");
6419
 
-
 
6420
				if ( isElement && ( p === "height" || p === "width" ) ) {
5577
 
6421
					// Make sure that nothing sneaks out
-
 
6422
					// Record all 3 overflow attributes because IE does not
-
 
6423
					// change the overflow attribute when overflowX and
-
 
6424
					// overflowY are set to the same value
-
 
6425
					opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];
-
 
6426
 
-
 
6427
					// Set display property to inline-block for height/width
-
 
6428
					// animations on inline elements that are having width/height
-
 
6429
					// animated
-
 
6430
					if ( jQuery.css( this, "display" ) === "inline" &&
-
 
6431
							jQuery.css( this, "float" ) === "none" ) {
-
 
6432
						if ( !jQuery.support.inlineBlockNeedsLayout ) {
-
 
6433
							this.style.display = "inline-block";
-
 
6434
 
-
 
6435
						} else {
-
 
6436
							var display = defaultDisplay(this.nodeName);
-
 
6437
 
-
 
6438
							// inline-level elements accept inline-block;
-
 
6439
							// block-level elements need to be inline with layout
-
 
6440
							if ( display === "inline" ) {
-
 
6441
								this.style.display = "inline-block";
-
 
6442
 
-
 
6443
							} else {
-
 
6444
								this.style.display = "inline";
-
 
6445
								this.style.zoom = 1;
-
 
6446
							}
5578
					// Make sure that nothing sneaks out
6447
						}
Line 5579... Line 6448...
5579
					opt.overflow = this.style.overflow;
6448
					}
5580
				}
6449
				}
5581
 
6450
 
Line 5598... Line 6467...
5598
				if ( rfxtypes.test(val) ) {
6467
				if ( rfxtypes.test(val) ) {
5599
					e[ val === "toggle" ? hidden ? "show" : "hide" : val ]( prop );
6468
					e[ val === "toggle" ? hidden ? "show" : "hide" : val ]( prop );
Line 5600... Line 6469...
5600
 
6469
 
5601
				} else {
6470
				} else {
5602
					var parts = rfxnum.exec(val),
6471
					var parts = rfxnum.exec(val),
Line 5603... Line 6472...
5603
						start = e.cur(true) || 0;
6472
						start = e.cur() || 0;
5604
 
6473
 
5605
					if ( parts ) {
6474
					if ( parts ) {
Line 5606... Line 6475...
5606
						var end = parseFloat( parts[2] ),
6475
						var end = parseFloat( parts[2] ),
5607
							unit = parts[3] || "px";
6476
							unit = parts[3] || "px";
5608
 
6477
 
5609
						// We need to compute starting value
6478
						// We need to compute starting value
5610
						if ( unit !== "px" ) {
6479
						if ( unit !== "px" ) {
5611
							self.style[ name ] = (end || 1) + unit;
6480
							jQuery.style( self, name, (end || 1) + unit);
Line 5612... Line 6481...
5612
							start = ((end || 1) / e.cur(true)) * start;
6481
							start = ((end || 1) / e.cur()) * start;
5613
							self.style[ name ] = start + unit;
6482
							jQuery.style( self, name, start + unit);
5614
						}
6483
						}
Line 5660... Line 6529...
5660
		return this;
6529
		return this;
5661
	}
6530
	}
Line 5662... Line 6531...
5662
 
6531
 
Line -... Line 6532...
-
 
6532
});
-
 
6533
 
-
 
6534
function genFx( type, num ) {
-
 
6535
	var obj = {};
-
 
6536
 
-
 
6537
	jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() {
-
 
6538
		obj[ this ] = type;
-
 
6539
	});
-
 
6540
 
-
 
6541
	return obj;
5663
});
6542
}
5664
 
6543
 
5665
// Generate shortcuts for custom animations
6544
// Generate shortcuts for custom animations
5666
jQuery.each({
6545
jQuery.each({
5667
	slideDown: genFx("show", 1),
6546
	slideDown: genFx("show", 1),
5668
	slideUp: genFx("hide", 1),
6547
	slideUp: genFx("hide", 1),
5669
	slideToggle: genFx("toggle", 1),
6548
	slideToggle: genFx("toggle", 1),
-
 
6549
	fadeIn: { opacity: "show" },
5670
	fadeIn: { opacity: "show" },
6550
	fadeOut: { opacity: "hide" },
5671
	fadeOut: { opacity: "hide" }
6551
	fadeToggle: { opacity: "toggle" }
5672
}, function( name, props ) {
6552
}, function( name, props ) {
5673
	jQuery.fn[ name ] = function( speed, callback ) {
6553
	jQuery.fn[ name ] = function( speed, easing, callback ) {
5674
		return this.animate( props, speed, callback );
6554
		return this.animate( props, speed, easing, callback );
Line 5675... Line 6555...
5675
	};
6555
	};
5676
});
6556
});
5677
 
6557
 
5678
jQuery.extend({
6558
jQuery.extend({
5679
	speed: function( speed, easing, fn ) {
6559
	speed: function( speed, easing, fn ) {
5680
		var opt = speed && typeof speed === "object" ? speed : {
6560
		var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
5681
			complete: fn || !fn && easing ||
6561
			complete: fn || !fn && easing ||
5682
				jQuery.isFunction( speed ) && speed,
6562
				jQuery.isFunction( speed ) && speed,
Line 5683... Line 6563...
5683
			duration: speed,
6563
			duration: speed,
5684
			easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
6564
			easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
Line 5685... Line 6565...
5685
		};
6565
		};
5686
 
6566
 
5687
		opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
6567
		opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
5688
			jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default;
6568
			opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default;
Line 5730... Line 6610...
5730
		if ( this.options.step ) {
6610
		if ( this.options.step ) {
5731
			this.options.step.call( this.elem, this.now, this );
6611
			this.options.step.call( this.elem, this.now, this );
5732
		}
6612
		}
Line 5733... Line 6613...
5733
 
6613
 
5734
		(jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
-
 
5735
 
-
 
5736
		// Set display property to block for height/width animations
-
 
5737
		if ( ( this.prop === "height" || this.prop === "width" ) && this.elem.style ) {
-
 
5738
			this.elem.style.display = "block";
-
 
5739
		}
6614
		(jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
Line 5740... Line 6615...
5740
	},
6615
	},
5741
 
6616
 
5742
	// Get the current size
6617
	// Get the current size
5743
	cur: function( force ) {
6618
	cur: function() {
5744
		if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
6619
		if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
Line 5745... Line 6620...
5745
			return this.elem[ this.prop ];
6620
			return this.elem[ this.prop ];
5746
		}
6621
		}
5747
 
6622
 
Line 5748... Line 6623...
5748
		var r = parseFloat(jQuery.css(this.elem, this.prop, force));
6623
		var r = parseFloat( jQuery.css( this.elem, this.prop ) );
5749
		return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0;
6624
		return r && r > -10000 ? r : 0;
-
 
6625
	},
-
 
6626
 
-
 
6627
	// Start an animation from one number to another
5750
	},
6628
	custom: function( from, to, unit ) {
5751
 
6629
		var self = this,
5752
	// Start an animation from one number to another
6630
			fx = jQuery.fx;
5753
	custom: function( from, to, unit ) {
6631
 
5754
		this.startTime = now();
6632
		this.startTime = jQuery.now();
5755
		this.start = from;
6633
		this.start = from;
Line 5756... Line -...
5756
		this.end = to;
-
 
5757
		this.unit = unit || this.unit || "px";
6634
		this.end = to;
5758
		this.now = this.start;
6635
		this.unit = unit || this.unit || "px";
5759
		this.pos = this.state = 0;
6636
		this.now = this.start;
Line 5760... Line 6637...
5760
 
6637
		this.pos = this.state = 0;
Line 5761... Line 6638...
5761
		var self = this;
6638
 
5762
		function t( gotoEnd ) {
6639
		function t( gotoEnd ) {
5763
			return self.step(gotoEnd);
6640
			return self.step(gotoEnd);
5764
		}
6641
		}
Line 5765... Line 6642...
5765
 
6642
 
5766
		t.elem = this.elem;
6643
		t.elem = this.elem;
Line 5795... Line 6672...
5795
		this.custom(this.cur(), 0);
6672
		this.custom(this.cur(), 0);
5796
	},
6673
	},
Line 5797... Line 6674...
5797
 
6674
 
5798
	// Each step of an animation
6675
	// Each step of an animation
5799
	step: function( gotoEnd ) {
6676
	step: function( gotoEnd ) {
Line 5800... Line 6677...
5800
		var t = now(), done = true;
6677
		var t = jQuery.now(), done = true;
5801
 
6678
 
5802
		if ( gotoEnd || t >= this.options.duration + this.startTime ) {
6679
		if ( gotoEnd || t >= this.options.duration + this.startTime ) {
5803
			this.now = this.end;
6680
			this.now = this.end;
Line 5811... Line 6688...
5811
					done = false;
6688
					done = false;
5812
				}
6689
				}
5813
			}
6690
			}
Line 5814... Line 6691...
5814
 
6691
 
5815
			if ( done ) {
-
 
5816
				if ( this.options.display != null ) {
6692
			if ( done ) {
5817
					// Reset the overflow
6693
				// Reset the overflow
5818
					this.elem.style.overflow = this.options.overflow;
-
 
5819
 
6694
				if ( this.options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
5820
					// Reset the display
-
 
5821
					var old = jQuery.data(this.elem, "olddisplay");
6695
					var elem = this.elem,
5822
					this.elem.style.display = old ? old : this.options.display;
6696
						options = this.options;
5823
 
6697
 
5824
					if ( jQuery.css(this.elem, "display") === "none" ) {
6698
					jQuery.each( [ "", "X", "Y" ], function (index, value) {
5825
						this.elem.style.display = "block";
6699
						elem.style[ "overflow" + value ] = options.overflow[index];
5826
					}
6700
					} );
Line 5827... Line 6701...
5827
				}
6701
				}
5828
 
6702
 
5829
				// Hide the element if the "hide" operation was done
6703
				// Hide the element if the "hide" operation was done
5830
				if ( this.options.hide ) {
6704
				if ( this.options.hide ) {
Line 5831... Line 6705...
5831
					jQuery(this.elem).hide();
6705
					jQuery(this.elem).hide();
5832
				}
6706
				}
5833
 
6707
 
5834
				// Reset the properties, if the item has been hidden or shown
6708
				// Reset the properties, if the item has been hidden or shown
5835
				if ( this.options.hide || this.options.show ) {
6709
				if ( this.options.hide || this.options.show ) {
5836
					for ( var p in this.options.curAnim ) {
6710
					for ( var p in this.options.curAnim ) {
Line 5837... Line 6711...
5837
						jQuery.style(this.elem, p, this.options.orig[p]);
6711
						jQuery.style( this.elem, p, this.options.orig[p] );
5838
					}
6712
					}
Line 5874... Line 6748...
5874
 
6748
 
5875
		if ( !timers.length ) {
6749
		if ( !timers.length ) {
5876
			jQuery.fx.stop();
6750
			jQuery.fx.stop();
5877
		}
6751
		}
5878
	},
6752
	},
-
 
6753
 
-
 
6754
	interval: 13,
5879
		
6755
 
5880
	stop: function() {
6756
	stop: function() {
5881
		clearInterval( timerId );
6757
		clearInterval( timerId );
5882
		timerId = null;
6758
		timerId = null;
5883
	},
6759
	},
5884
	
6760
 
5885
	speeds: {
6761
	speeds: {
5886
		slow: 600,
6762
		slow: 600,
5887
 		fast: 200,
6763
		fast: 200,
5888
 		// Default speed
6764
		// Default speed
5889
 		_default: 400
6765
		_default: 400
Line 5890... Line 6766...
5890
	},
6766
	},
5891
 
6767
 
5892
	step: {
6768
	step: {
5893
		opacity: function( fx ) {
6769
		opacity: function( fx ) {
Line 5894... Line 6770...
5894
			jQuery.style(fx.elem, "opacity", fx.now);
6770
			jQuery.style( fx.elem, "opacity", fx.now );
5895
		},
6771
		},
5896
 
6772
 
Line 5910... Line 6786...
5910
			return elem === fn.elem;
6786
			return elem === fn.elem;
5911
		}).length;
6787
		}).length;
5912
	};
6788
	};
5913
}
6789
}
Line 5914... Line 6790...
5914
 
6790
 
5915
function genFx( type, num ) {
6791
function defaultDisplay( nodeName ) {
-
 
6792
	if ( !elemdisplay[ nodeName ] ) {
-
 
6793
		var elem = jQuery("<" + nodeName + ">").appendTo("body"),
Line 5916... Line -...
5916
	var obj = {};
-
 
5917
 
6794
			display = elem.css("display");
5918
	jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() {
-
 
Line -... Line 6795...
-
 
6795
 
-
 
6796
		elem.remove();
-
 
6797
 
-
 
6798
		if ( display === "none" || display === "" ) {
-
 
6799
			display = "block";
-
 
6800
		}
-
 
6801
 
5919
		obj[ this ] = type;
6802
		elemdisplay[ nodeName ] = display;
5920
	});
6803
	}
-
 
6804
 
-
 
6805
	return elemdisplay[ nodeName ];
-
 
6806
}
-
 
6807
 
-
 
6808
 
-
 
6809
 
-
 
6810
 
5921
 
6811
var rtable = /^t(?:able|d|h)$/i,
5922
	return obj;
6812
	rroot = /^(?:body|html)$/i;
5923
}
6813
 
Line 5924... Line 6814...
5924
if ( "getBoundingClientRect" in document.documentElement ) {
6814
if ( "getBoundingClientRect" in document.documentElement ) {
5925
	jQuery.fn.offset = function( options ) {
6815
	jQuery.fn.offset = function( options ) {
5926
		var elem = this[0];
6816
		var elem = this[0], box;
5927
 
6817
 
Line 5937... Line 6827...
5937
 
6827
 
5938
		if ( elem === elem.ownerDocument.body ) {
6828
		if ( elem === elem.ownerDocument.body ) {
5939
			return jQuery.offset.bodyOffset( elem );
6829
			return jQuery.offset.bodyOffset( elem );
Line -... Line 6830...
-
 
6830
		}
-
 
6831
 
-
 
6832
		try {
-
 
6833
			box = elem.getBoundingClientRect();
-
 
6834
		} catch(e) {}
-
 
6835
 
-
 
6836
		var doc = elem.ownerDocument,
-
 
6837
			docElem = doc.documentElement;
-
 
6838
 
-
 
6839
		// Make sure we're not dealing with a disconnected DOM node
-
 
6840
		if ( !box || !jQuery.contains( docElem, elem ) ) {
-
 
6841
			return box || { top: 0, left: 0 };
-
 
6842
		}
-
 
6843
 
5940
		}
6844
		var body = doc.body,
5941
 
6845
			win = getWindow(doc),
5942
		var box = elem.getBoundingClientRect(), doc = elem.ownerDocument, body = doc.body, docElem = doc.documentElement,
6846
			clientTop  = docElem.clientTop  || body.clientTop  || 0,
5943
			clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0,
6847
			clientLeft = docElem.clientLeft || body.clientLeft || 0,
-
 
6848
			scrollTop  = (win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop  || body.scrollTop ),
-
 
6849
			scrollLeft = (win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft),
Line 5944... Line 6850...
5944
			top  = box.top  + (self.pageYOffset || jQuery.support.boxModel && docElem.scrollTop  || body.scrollTop ) - clientTop,
6850
			top  = box.top  + scrollTop  - clientTop,
5945
			left = box.left + (self.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft;
6851
			left = box.left + scrollLeft - clientLeft;
Line 5946... Line 6852...
5946
 
6852
 
Line 5965... Line 6871...
5965
			return jQuery.offset.bodyOffset( elem );
6871
			return jQuery.offset.bodyOffset( elem );
5966
		}
6872
		}
Line 5967... Line 6873...
5967
 
6873
 
Line -... Line 6874...
-
 
6874
		jQuery.offset.initialize();
5968
		jQuery.offset.initialize();
6875
 
-
 
6876
		var computedStyle,
-
 
6877
			offsetParent = elem.offsetParent,
5969
 
6878
			prevOffsetParent = elem,
-
 
6879
			doc = elem.ownerDocument,
5970
		var offsetParent = elem.offsetParent, prevOffsetParent = elem,
6880
			docElem = doc.documentElement,
5971
			doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement,
6881
			body = doc.body,
-
 
6882
			defaultView = doc.defaultView,
5972
			body = doc.body, defaultView = doc.defaultView,
6883
			prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
Line 5973... Line 6884...
5973
			prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
6884
			top = elem.offsetTop,
5974
			top = elem.offsetTop, left = elem.offsetLeft;
6885
			left = elem.offsetLeft;
5975
 
6886
 
5976
		while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
6887
		while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
Line 5984... Line 6895...
5984
 
6895
 
5985
			if ( elem === offsetParent ) {
6896
			if ( elem === offsetParent ) {
5986
				top  += elem.offsetTop;
6897
				top  += elem.offsetTop;
Line 5987... Line 6898...
5987
				left += elem.offsetLeft;
6898
				left += elem.offsetLeft;
5988
 
6899
 
5989
				if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(elem.nodeName)) ) {
6900
				if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
5990
					top  += parseFloat( computedStyle.borderTopWidth  ) || 0;
6901
					top  += parseFloat( computedStyle.borderTopWidth  ) || 0;
Line -... Line 6902...
-
 
6902
					left += parseFloat( computedStyle.borderLeftWidth ) || 0;
5991
					left += parseFloat( computedStyle.borderLeftWidth ) || 0;
6903
				}
5992
				}
6904
 
Line 5993... Line 6905...
5993
 
6905
				prevOffsetParent = offsetParent;
5994
				prevOffsetParent = offsetParent, offsetParent = elem.offsetParent;
6906
				offsetParent = elem.offsetParent;
5995
			}
6907
			}
Line 6016... Line 6928...
6016
	};
6928
	};
6017
}
6929
}
Line 6018... Line 6930...
6018
 
6930
 
6019
jQuery.offset = {
6931
jQuery.offset = {
6020
	initialize: function() {
6932
	initialize: function() {
6021
		var body = document.body, container = document.createElement("div"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.curCSS(body, "marginTop", true) ) || 0,
6933
		var body = document.body, container = document.createElement("div"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.css(body, "marginTop") ) || 0,
Line 6022... Line 6934...
6022
			html = "<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
6934
			html = "<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
Line 6023... Line 6935...
6023
 
6935
 
Line 6030... Line 6942...
6030
		td = innerDiv.nextSibling.firstChild.firstChild;
6942
		td = innerDiv.nextSibling.firstChild.firstChild;
Line 6031... Line 6943...
6031
 
6943
 
6032
		this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
6944
		this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
Line 6033... Line 6945...
6033
		this.doesAddBorderForTableAndCells = (td.offsetTop === 5);
6945
		this.doesAddBorderForTableAndCells = (td.offsetTop === 5);
-
 
6946
 
-
 
6947
		checkDiv.style.position = "fixed";
6034
 
6948
		checkDiv.style.top = "20px";
6035
		checkDiv.style.position = "fixed", checkDiv.style.top = "20px";
6949
 
6036
		// safari subtracts parent border width here which is 5px
6950
		// safari subtracts parent border width here which is 5px
Line -... Line 6951...
-
 
6951
		this.supportsFixedPosition = (checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15);
6037
		this.supportsFixedPosition = (checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15);
6952
		checkDiv.style.position = checkDiv.style.top = "";
-
 
6953
 
6038
		checkDiv.style.position = checkDiv.style.top = "";
6954
		innerDiv.style.overflow = "hidden";
Line 6039... Line 6955...
6039
 
6955
		innerDiv.style.position = "relative";
Line 6040... Line 6956...
6040
		innerDiv.style.overflow = "hidden", innerDiv.style.position = "relative";
6956
 
6041
		this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);
6957
		this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);
6042
 
6958
 
6043
		this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);
6959
		this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);
Line 6044... Line 6960...
6044
 
6960
 
6045
		body.removeChild( container );
6961
		body.removeChild( container );
-
 
6962
		body = container = innerDiv = checkDiv = table = td = null;
Line 6046... Line 6963...
6046
		body = container = innerDiv = checkDiv = table = td = null;
6963
		jQuery.offset.initialize = jQuery.noop;
Line 6047... Line 6964...
6047
		jQuery.offset.initialize = jQuery.noop;
6964
	},
6048
	},
6965
 
6049
 
6966
	bodyOffset: function( body ) {
6050
	bodyOffset: function( body ) {
6967
		var top = body.offsetTop,
Line 6051... Line 6968...
6051
		var top = body.offsetTop, left = body.offsetLeft;
6968
			left = body.offsetLeft;
6052
 
6969
 
Line 6053... Line 6970...
6053
		jQuery.offset.initialize();
6970
		jQuery.offset.initialize();
-
 
6971
 
-
 
6972
		if ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) {
6054
 
6973
			top  += parseFloat( jQuery.css(body, "marginTop") ) || 0;
6055
		if ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) {
6974
			left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
6056
			top  += parseFloat( jQuery.curCSS(body, "marginTop",  true) ) || 0;
6975
		}
6057
			left += parseFloat( jQuery.curCSS(body, "marginLeft", true) ) || 0;
6976
 
-
 
6977
		return { top: top, left: left };
6058
		}
6978
	},
6059
 
6979
	
6060
		return { top: top, left: left };
6980
	setOffset: function( elem, options, i ) {
6061
	},
6981
		var position = jQuery.css( elem, "position" );
-
 
6982
 
-
 
6983
		// set position first, in-case top/left are set even on static elem
-
 
6984
		if ( position === "static" ) {
-
 
6985
			elem.style.position = "relative";
-
 
6986
		}
-
 
6987
 
-
 
6988
		var curElem = jQuery( elem ),
-
 
6989
			curOffset = curElem.offset(),
-
 
6990
			curCSSTop = jQuery.css( elem, "top" ),
-
 
6991
			curCSSLeft = jQuery.css( elem, "left" ),
Line 6062... Line 6992...
6062
	
6992
			calculatePosition = (position === "absolute" && jQuery.inArray('auto', [curCSSTop, curCSSLeft]) > -1),
6063
	setOffset: function( elem, options, i ) {
6993
			props = {}, curPosition = {}, curTop, curLeft;
6064
		// set position first, in-case top/left are set even on static elem
6994
 
Line 6065... Line 6995...
6065
		if ( /static/.test( jQuery.curCSS( elem, "position" ) ) ) {
6995
		// need to be able to calculate position if either top or left is auto and position is absolute
6066
			elem.style.position = "relative";
6996
		if ( calculatePosition ) {
-
 
6997
			curPosition = curElem.position();
-
 
6998
		}
6067
		}
6999
 
6068
		var curElem   = jQuery( elem ),
7000
		curTop  = calculatePosition ? curPosition.top  : parseInt( curCSSTop,  10 ) || 0;
Line 6069... Line 7001...
6069
			curOffset = curElem.offset(),
7001
		curLeft = calculatePosition ? curPosition.left : parseInt( curCSSLeft, 10 ) || 0;
6070
			curTop    = parseInt( jQuery.curCSS( elem, "top",  true ), 10 ) || 0,
7002
 
6071
			curLeft   = parseInt( jQuery.curCSS( elem, "left", true ), 10 ) || 0;
7003
		if ( jQuery.isFunction( options ) ) {
6072
 
7004
			options = options.call( elem, i, curOffset );
Line 6099... Line 7031...
6099
		// Get *real* offsetParent
7031
		// Get *real* offsetParent
6100
		offsetParent = this.offsetParent(),
7032
		offsetParent = this.offsetParent(),
Line 6101... Line 7033...
6101
 
7033
 
6102
		// Get correct offsets
7034
		// Get correct offsets
6103
		offset       = this.offset(),
7035
		offset       = this.offset(),
Line 6104... Line 7036...
6104
		parentOffset = /^body|html$/i.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
7036
		parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
6105
 
7037
 
6106
		// Subtract element margins
7038
		// Subtract element margins
6107
		// note: when an element has margin: auto the offsetLeft and marginLeft
7039
		// note: when an element has margin: auto the offsetLeft and marginLeft
6108
		// are the same in Safari causing offset.left to incorrectly be 0
7040
		// are the same in Safari causing offset.left to incorrectly be 0
Line 6109... Line 7041...
6109
		offset.top  -= parseFloat( jQuery.curCSS(elem, "marginTop",  true) ) || 0;
7041
		offset.top  -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
6110
		offset.left -= parseFloat( jQuery.curCSS(elem, "marginLeft", true) ) || 0;
7042
		offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
6111
 
7043
 
Line 6112... Line 7044...
6112
		// Add offsetParent borders
7044
		// Add offsetParent borders
6113
		parentOffset.top  += parseFloat( jQuery.curCSS(offsetParent[0], "borderTopWidth",  true) ) || 0;
7045
		parentOffset.top  += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
6114
		parentOffset.left += parseFloat( jQuery.curCSS(offsetParent[0], "borderLeftWidth", true) ) || 0;
7046
		parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
6115
 
7047
 
Line 6121... Line 7053...
6121
	},
7053
	},
Line 6122... Line 7054...
6122
 
7054
 
6123
	offsetParent: function() {
7055
	offsetParent: function() {
6124
		return this.map(function() {
7056
		return this.map(function() {
6125
			var offsetParent = this.offsetParent || document.body;
7057
			var offsetParent = this.offsetParent || document.body;
6126
			while ( offsetParent && (!/^body|html$/i.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
7058
			while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
6127
				offsetParent = offsetParent.offsetParent;
7059
				offsetParent = offsetParent.offsetParent;
6128
			}
7060
			}
6129
			return offsetParent;
7061
			return offsetParent;
6130
		});
7062
		});
Line 6169... Line 7101...
6169
		}
7101
		}
6170
	};
7102
	};
6171
});
7103
});
Line 6172... Line 7104...
6172
 
7104
 
6173
function getWindow( elem ) {
7105
function getWindow( elem ) {
6174
	return ("scrollTo" in elem && elem.document) ?
7106
	return jQuery.isWindow( elem ) ?
6175
		elem :
7107
		elem :
6176
		elem.nodeType === 9 ?
7108
		elem.nodeType === 9 ?
6177
			elem.defaultView || elem.parentWindow :
7109
			elem.defaultView || elem.parentWindow :
6178
			false;
7110
			false;
-
 
7111
}
-
 
7112
 
-
 
7113
 
-
 
7114
 
6179
}
7115
 
6180
// Create innerHeight, innerWidth, outerHeight and outerWidth methods
7116
// Create innerHeight, innerWidth, outerHeight and outerWidth methods
Line 6181... Line 7117...
6181
jQuery.each([ "Height", "Width" ], function( i, name ) {
7117
jQuery.each([ "Height", "Width" ], function( i, name ) {
Line 6182... Line 7118...
6182
 
7118
 
6183
	var type = name.toLowerCase();
7119
	var type = name.toLowerCase();
6184
 
7120
 
6185
	// innerHeight and innerWidth
7121
	// innerHeight and innerWidth
6186
	jQuery.fn["inner" + name] = function() {
7122
	jQuery.fn["inner" + name] = function() {
6187
		return this[0] ?
7123
		return this[0] ?
Line 6188... Line 7124...
6188
			jQuery.css( this[0], type, false, "padding" ) :
7124
			parseFloat( jQuery.css( this[0], type, "padding" ) ) :
6189
			null;
7125
			null;
6190
	};
7126
	};
6191
 
7127
 
6192
	// outerHeight and outerWidth
7128
	// outerHeight and outerWidth
6193
	jQuery.fn["outer" + name] = function( margin ) {
7129
	jQuery.fn["outer" + name] = function( margin ) {
Line 6194... Line 7130...
6194
		return this[0] ?
7130
		return this[0] ?
6195
			jQuery.css( this[0], type, false, margin ? "margin" : "border" ) :
7131
			parseFloat( jQuery.css( this[0], type, margin ? "margin" : "border" ) ) :
Line 6208... Line 7144...
6208
				var self = jQuery( this );
7144
				var self = jQuery( this );
6209
				self[ type ]( size.call( this, i, self[ type ]() ) );
7145
				self[ type ]( size.call( this, i, self[ type ]() ) );
6210
			});
7146
			});
6211
		}
7147
		}
Line 6212... Line 7148...
6212
 
7148
 
6213
		return ("scrollTo" in elem && elem.document) ? // does it walk and quack like a window?
7149
		if ( jQuery.isWindow( elem ) ) {
6214
			// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
7150
			// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
6215
			elem.document.compatMode === "CSS1Compat" && elem.document.documentElement[ "client" + name ] ||
7151
			return elem.document.compatMode === "CSS1Compat" && elem.document.documentElement[ "client" + name ] ||
-
 
7152
				elem.document.body[ "client" + name ];
-
 
7153
 
-
 
7154
		// Get document width or height
-
 
7155
		} else if ( elem.nodeType === 9 ) {
-
 
7156
			// Either scroll[Width/Height] or offset[Width/Height], whichever is greater
-
 
7157
			return Math.max(
-
 
7158
				elem.documentElement["client" + name],
-
 
7159
				elem.body["scroll" + name], elem.documentElement["scroll" + name],
-
 
7160
				elem.body["offset" + name], elem.documentElement["offset" + name]
-
 
7161
			);
-
 
7162
 
-
 
7163
		// Get or set width or height on the element
-
 
7164
		} else if ( size === undefined ) {
-
 
7165
			var orig = jQuery.css( elem, type ),
Line 6216... Line -...
6216
			elem.document.body[ "client" + name ] :
-
 
6217
 
-
 
6218
			// Get document width or height
-
 
6219
			(elem.nodeType === 9) ? // is it a document
-
 
6220
				// Either scroll[Width/Height] or offset[Width/Height], whichever is greater
-
 
6221
				Math.max(
-
 
6222
					elem.documentElement["client" + name],
-
 
6223
					elem.body["scroll" + name], elem.documentElement["scroll" + name],
-
 
6224
					elem.body["offset" + name], elem.documentElement["offset" + name]
-
 
6225
				) :
-
 
6226
 
-
 
6227
				// Get or set width or height on the element
-
 
6228
				size === undefined ?
7166
				ret = parseFloat( orig );
Line 6229... Line 7167...
6229
					// Get width or height on the element
7167
 
-
 
7168
			return jQuery.isNaN( ret ) ? orig : ret;
6230
					jQuery.css( elem, type ) :
7169
 
-
 
7170
		// Set the width or height on the element (default to pixels if value is unitless)
6231
 
7171
		} else {
Line 6232... Line 7172...
6232
					// Set the width or height on the element (default to pixels if value is unitless)
7172
			return this.css( type, typeof size === "string" ? size : size + "px" );
6233
					this.css( type, typeof size === "string" ? size : size + "px" );
-
 
6234
	};
-
 
-
 
7173
		}
Line 6235... Line 7174...
6235
 
7174
	};