Projet

Général

Profil

Révision 2c8c2b87

Ajouté par Assos Assos il y a presque 9 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/jquery_update/replace/jquery/1.7/jquery.js
1 1
/*!
2
 * jQuery JavaScript Library v1.7.1
2
 * jQuery JavaScript Library v1.7.2
3 3
 * http://jquery.com/
4 4
 *
5 5
 * Copyright 2011, John Resig
......
11 11
 * Copyright 2011, The Dojo Foundation
12 12
 * Released under the MIT, BSD, and GPL Licenses.
13 13
 *
14
 * Date: Mon Nov 21 21:11:03 2011 -0500
14
 * Date: Wed Mar 21 12:46:34 2012 -0700
15 15
 */
16 16
(function( window, undefined ) {
17 17

  
......
210 210
	selector: "",
211 211

  
212 212
	// The current version of jQuery being used
213
	jquery: "1.7.1",
213
	jquery: "1.7.2",
214 214

  
215 215
	// The default length of a jQuery object is 0
216 216
	length: 0,
......
497 497
		return jQuery.type(obj) === "array";
498 498
	},
499 499

  
500
	// A crude way of determining if an object is a window
501 500
	isWindow: function( obj ) {
502
		return obj && typeof obj === "object" && "setInterval" in obj;
501
		return obj != null && obj == obj.window;
503 502
	},
504 503

  
505 504
	isNumeric: function( obj ) {
......
579 578

  
580 579
	// Cross-browser xml parsing
581 580
	parseXML: function( data ) {
581
		if ( typeof data !== "string" || !data ) {
582
			return null;
583
		}
582 584
		var xml, tmp;
583 585
		try {
584 586
			if ( window.DOMParser ) { // Standard
......
822 824

  
823 825
	// Mutifunctional method to get and set values to a collection
824 826
	// The value/s can optionally be executed if it's a function
825
	access: function( elems, key, value, exec, fn, pass ) {
826
		var length = elems.length;
827
	access: function( elems, fn, key, value, chainable, emptyGet, pass ) {
828
		var exec,
829
			bulk = key == null,
830
			i = 0,
831
			length = elems.length;
827 832

  
828
		// Setting many attributes
829
		if ( typeof key === "object" ) {
830
			for ( var k in key ) {
831
				jQuery.access( elems, k, key[k], exec, fn, value );
833
		// Sets many values
834
		if ( key && typeof key === "object" ) {
835
			for ( i in key ) {
836
				jQuery.access( elems, fn, i, key[i], 1, emptyGet, value );
832 837
			}
833
			return elems;
834
		}
838
			chainable = 1;
835 839

  
836
		// Setting one attribute
837
		if ( value !== undefined ) {
840
		// Sets one value
841
		} else if ( value !== undefined ) {
838 842
			// Optionally, function values get executed if exec is true
839
			exec = !pass && exec && jQuery.isFunction(value);
843
			exec = pass === undefined && jQuery.isFunction( value );
844

  
845
			if ( bulk ) {
846
				// Bulk operations only iterate when executing function values
847
				if ( exec ) {
848
					exec = fn;
849
					fn = function( elem, key, value ) {
850
						return exec.call( jQuery( elem ), value );
851
					};
852

  
853
				// Otherwise they run against the entire set
854
				} else {
855
					fn.call( elems, value );
856
					fn = null;
857
				}
858
			}
840 859

  
841
			for ( var i = 0; i < length; i++ ) {
842
				fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
860
			if ( fn ) {
861
				for (; i < length; i++ ) {
862
					fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
863
				}
843 864
			}
844 865

  
845
			return elems;
866
			chainable = 1;
846 867
		}
847 868

  
848
		// Getting an attribute
849
		return length ? fn( elems[0], key ) : undefined;
869
		return chainable ?
870
			elems :
871

  
872
			// Gets
873
			bulk ?
874
				fn.call( elems ) :
875
				length ? fn( elems[0], key ) : emptyGet;
850 876
	},
851 877

  
852 878
	now: function() {
......
1005 1031
		stack = [],
1006 1032
		// Last fire value (for non-forgettable lists)
1007 1033
		memory,
1034
		// Flag to know if list was already fired
1035
		fired,
1008 1036
		// Flag to know if list is currently firing
1009 1037
		firing,
1010 1038
		// First callback to fire (used internally by add and fireWith)
......
1038 1066
		fire = function( context, args ) {
1039 1067
			args = args || [];
1040 1068
			memory = !flags.memory || [ context, args ];
1069
			fired = true;
1041 1070
			firing = true;
1042 1071
			firingIndex = firingStart || 0;
1043 1072
			firingStart = 0;
......
1173 1202
			},
1174 1203
			// To know if the callbacks have already been called at least once
1175 1204
			fired: function() {
1176
				return !!memory;
1205
				return !!fired;
1177 1206
			}
1178 1207
		};
1179 1208

  
......
1336 1365
		select,
1337 1366
		opt,
1338 1367
		input,
1339
		marginDiv,
1340 1368
		fragment,
1341 1369
		tds,
1342 1370
		events,
......
1419 1447
		noCloneEvent: true,
1420 1448
		inlineBlockNeedsLayout: false,
1421 1449
		shrinkWrapBlocks: false,
1422
		reliableMarginRight: true
1450
		reliableMarginRight: true,
1451
		pixelMargin: true
1423 1452
	};
1424 1453

  
1454
	// jQuery.boxModel DEPRECATED in 1.3, use jQuery.support.boxModel instead
1455
	jQuery.boxModel = support.boxModel = (document.compatMode === "CSS1Compat");
1456

  
1425 1457
	// Make sure checked status is properly cloned
1426 1458
	input.checked = true;
1427 1459
	support.noCloneChecked = input.cloneNode( true ).checked;
......
1456 1488
	support.radioValue = input.value === "t";
1457 1489

  
1458 1490
	input.setAttribute("checked", "checked");
1491

  
1492
	// #11217 - WebKit loses check when the name is after the checked attribute
1493
	input.setAttribute( "name", "t" );
1494

  
1459 1495
	div.appendChild( input );
1460 1496
	fragment = document.createDocumentFragment();
1461 1497
	fragment.appendChild( div.lastChild );
......
1470 1506
	fragment.removeChild( input );
1471 1507
	fragment.appendChild( div );
1472 1508

  
1473
	div.innerHTML = "";
1474

  
1475
	// Check if div with explicit width and no margin-right incorrectly
1476
	// gets computed margin-right based on width of container. For more
1477
	// info see bug #3333
1478
	// Fails in WebKit before Feb 2011 nightlies
1479
	// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
1480
	if ( window.getComputedStyle ) {
1481
		marginDiv = document.createElement( "div" );
1482
		marginDiv.style.width = "0";
1483
		marginDiv.style.marginRight = "0";
1484
		div.style.width = "2px";
1485
		div.appendChild( marginDiv );
1486
		support.reliableMarginRight =
1487
			( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
1488
	}
1489

  
1490 1509
	// Technique from Juriy Zaytsev
1491 1510
	// http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
1492 1511
	// We only care about the case where non-standard event systems
......
1494 1513
	// avoid an eval call (in setAttribute) which can cause CSP
1495 1514
	// to go haywire. See: https://developer.mozilla.org/en/Security/CSP
1496 1515
	if ( div.attachEvent ) {
1497
		for( i in {
1516
		for ( i in {
1498 1517
			submit: 1,
1499 1518
			change: 1,
1500 1519
			focusin: 1
......
1512 1531
	fragment.removeChild( div );
1513 1532

  
1514 1533
	// Null elements to avoid leaks in IE
1515
	fragment = select = opt = marginDiv = div = input = null;
1534
	fragment = select = opt = div = input = null;
1516 1535

  
1517 1536
	// Run tests that need a body at doc ready
1518 1537
	jQuery(function() {
1519 1538
		var container, outer, inner, table, td, offsetSupport,
1520
			conMarginTop, ptlm, vb, style, html,
1539
			marginDiv, conMarginTop, style, html, positionTopLeftWidthHeight,
1540
			paddingMarginBorderVisibility, paddingMarginBorder,
1521 1541
			body = document.getElementsByTagName("body")[0];
1522 1542

  
1523 1543
		if ( !body ) {
......
1526 1546
		}
1527 1547

  
1528 1548
		conMarginTop = 1;
1529
		ptlm = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";
1530
		vb = "visibility:hidden;border:0;";
1531
		style = "style='" + ptlm + "border:5px solid #000;padding:0;'";
1532
		html = "<div " + style + "><div></div></div>" +
1533
			"<table " + style + " cellpadding='0' cellspacing='0'>" +
1549
		paddingMarginBorder = "padding:0;margin:0;border:";
1550
		positionTopLeftWidthHeight = "position:absolute;top:0;left:0;width:1px;height:1px;";
1551
		paddingMarginBorderVisibility = paddingMarginBorder + "0;visibility:hidden;";
1552
		style = "style='" + positionTopLeftWidthHeight + paddingMarginBorder + "5px solid #000;";
1553
		html = "<div " + style + "display:block;'><div style='" + paddingMarginBorder + "0;display:block;overflow:hidden;'></div></div>" +
1554
			"<table " + style + "' cellpadding='0' cellspacing='0'>" +
1534 1555
			"<tr><td></td></tr></table>";
1535 1556

  
1536 1557
		container = document.createElement("div");
1537
		container.style.cssText = vb + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px";
1558
		container.style.cssText = paddingMarginBorderVisibility + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px";
1538 1559
		body.insertBefore( container, body.firstChild );
1539 1560

  
1540 1561
		// Construct the test element
......
1548 1569
		// display:none (it is still safe to use offsets if a parent element is
1549 1570
		// hidden; don safety goggles and see bug #4512 for more information).
1550 1571
		// (only IE 8 fails this test)
1551
		div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
1572
		div.innerHTML = "<table><tr><td style='" + paddingMarginBorder + "0;display:none'></td><td>t</td></tr></table>";
1552 1573
		tds = div.getElementsByTagName( "td" );
1553 1574
		isSupported = ( tds[ 0 ].offsetHeight === 0 );
1554 1575

  
......
1559 1580
		// (IE <= 8 fail this test)
1560 1581
		support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
1561 1582

  
1562
		// Figure out if the W3C box model works as expected
1563
		div.innerHTML = "";
1564
		div.style.width = div.style.paddingLeft = "1px";
1565
		jQuery.boxModel = support.boxModel = div.offsetWidth === 2;
1583
		// Check if div with explicit width and no margin-right incorrectly
1584
		// gets computed margin-right based on width of container. For more
1585
		// info see bug #3333
1586
		// Fails in WebKit before Feb 2011 nightlies
1587
		// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
1588
		if ( window.getComputedStyle ) {
1589
			div.innerHTML = "";
1590
			marginDiv = document.createElement( "div" );
1591
			marginDiv.style.width = "0";
1592
			marginDiv.style.marginRight = "0";
1593
			div.style.width = "2px";
1594
			div.appendChild( marginDiv );
1595
			support.reliableMarginRight =
1596
				( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
1597
		}
1566 1598

  
1567 1599
		if ( typeof div.style.zoom !== "undefined" ) {
1568 1600
			// Check if natively block-level elements act like inline-block
1569 1601
			// elements when setting their display to 'inline' and giving
1570 1602
			// them layout
1571 1603
			// (IE < 8 does this)
1604
			div.innerHTML = "";
1605
			div.style.width = div.style.padding = "1px";
1606
			div.style.border = 0;
1607
			div.style.overflow = "hidden";
1572 1608
			div.style.display = "inline";
1573 1609
			div.style.zoom = 1;
1574
			support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 );
1610
			support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
1575 1611

  
1576 1612
			// Check if elements with layout shrink-wrap their children
1577 1613
			// (IE 6 does this)
1578
			div.style.display = "";
1579
			div.innerHTML = "<div style='width:4px;'></div>";
1580
			support.shrinkWrapBlocks = ( div.offsetWidth !== 2 );
1614
			div.style.display = "block";
1615
			div.style.overflow = "visible";
1616
			div.innerHTML = "<div style='width:5px;'></div>";
1617
			support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
1581 1618
		}
1582 1619

  
1583
		div.style.cssText = ptlm + vb;
1620
		div.style.cssText = positionTopLeftWidthHeight + paddingMarginBorderVisibility;
1584 1621
		div.innerHTML = html;
1585 1622

  
1586 1623
		outer = div.firstChild;
......
1605 1642
		offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 );
1606 1643
		offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop );
1607 1644

  
1645
		if ( window.getComputedStyle ) {
1646
			div.style.marginTop = "1%";
1647
			support.pixelMargin = ( window.getComputedStyle( div, null ) || { marginTop: 0 } ).marginTop !== "1%";
1648
		}
1649

  
1650
		if ( typeof container.style.zoom !== "undefined" ) {
1651
			container.style.zoom = 1;
1652
		}
1653

  
1608 1654
		body.removeChild( container );
1609
		div  = container = null;
1655
		marginDiv = div = container = null;
1610 1656

  
1611 1657
		jQuery.extend( support, offsetSupport );
1612 1658
	});
......
1863 1909

  
1864 1910
jQuery.fn.extend({
1865 1911
	data: function( key, value ) {
1866
		var parts, attr, name,
1912
		var parts, part, attr, name, l,
1913
			elem = this[0],
1914
			i = 0,
1867 1915
			data = null;
1868 1916

  
1869
		if ( typeof key === "undefined" ) {
1917
		// Gets all values
1918
		if ( key === undefined ) {
1870 1919
			if ( this.length ) {
1871
				data = jQuery.data( this[0] );
1920
				data = jQuery.data( elem );
1872 1921

  
1873
				if ( this[0].nodeType === 1 && !jQuery._data( this[0], "parsedAttrs" ) ) {
1874
					attr = this[0].attributes;
1875
					for ( var i = 0, l = attr.length; i < l; i++ ) {
1922
				if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
1923
					attr = elem.attributes;
1924
					for ( l = attr.length; i < l; i++ ) {
1876 1925
						name = attr[i].name;
1877 1926

  
1878 1927
						if ( name.indexOf( "data-" ) === 0 ) {
1879 1928
							name = jQuery.camelCase( name.substring(5) );
1880 1929

  
1881
							dataAttr( this[0], name, data[ name ] );
1930
							dataAttr( elem, name, data[ name ] );
1882 1931
						}
1883 1932
					}
1884
					jQuery._data( this[0], "parsedAttrs", true );
1933
					jQuery._data( elem, "parsedAttrs", true );
1885 1934
				}
1886 1935
			}
1887 1936

  
1888 1937
			return data;
1938
		}
1889 1939

  
1890
		} else if ( typeof key === "object" ) {
1940
		// Sets multiple values
1941
		if ( typeof key === "object" ) {
1891 1942
			return this.each(function() {
1892 1943
				jQuery.data( this, key );
1893 1944
			});
1894 1945
		}
1895 1946

  
1896
		parts = key.split(".");
1947
		parts = key.split( ".", 2 );
1897 1948
		parts[1] = parts[1] ? "." + parts[1] : "";
1949
		part = parts[1] + "!";
1898 1950

  
1899
		if ( value === undefined ) {
1900
			data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
1951
		return jQuery.access( this, function( value ) {
1901 1952

  
1902
			// Try to fetch any internally stored data first
1903
			if ( data === undefined && this.length ) {
1904
				data = jQuery.data( this[0], key );
1905
				data = dataAttr( this[0], key, data );
1906
			}
1953
			if ( value === undefined ) {
1954
				data = this.triggerHandler( "getData" + part, [ parts[0] ] );
1907 1955

  
1908
			return data === undefined && parts[1] ?
1909
				this.data( parts[0] ) :
1910
				data;
1956
				// Try to fetch any internally stored data first
1957
				if ( data === undefined && elem ) {
1958
					data = jQuery.data( elem, key );
1959
					data = dataAttr( elem, key, data );
1960
				}
1911 1961

  
1912
		} else {
1913
			return this.each(function() {
1914
				var self = jQuery( this ),
1915
					args = [ parts[0], value ];
1962
				return data === undefined && parts[1] ?
1963
					this.data( parts[0] ) :
1964
					data;
1965
			}
1916 1966

  
1917
				self.triggerHandler( "setData" + parts[1] + "!", args );
1967
			parts[1] = value;
1968
			this.each(function() {
1969
				var self = jQuery( this );
1970

  
1971
				self.triggerHandler( "setData" + part, parts );
1918 1972
				jQuery.data( this, key, value );
1919
				self.triggerHandler( "changeData" + parts[1] + "!", args );
1973
				self.triggerHandler( "changeData" + part, parts );
1920 1974
			});
1921
		}
1975
		}, null, value, arguments.length > 1, null, false );
1922 1976
	},
1923 1977

  
1924 1978
	removeData: function( key ) {
......
1942 1996
				data = data === "true" ? true :
1943 1997
				data === "false" ? false :
1944 1998
				data === "null" ? null :
1945
				jQuery.isNumeric( data ) ? parseFloat( data ) :
1999
				jQuery.isNumeric( data ) ? +data :
1946 2000
					rbrace.test( data ) ? jQuery.parseJSON( data ) :
1947 2001
					data;
1948 2002
			} catch( e ) {}
......
2077 2131

  
2078 2132
jQuery.fn.extend({
2079 2133
	queue: function( type, data ) {
2134
		var setter = 2;
2135

  
2080 2136
		if ( typeof type !== "string" ) {
2081 2137
			data = type;
2082 2138
			type = "fx";
2139
			setter--;
2083 2140
		}
2084 2141

  
2085
		if ( data === undefined ) {
2142
		if ( arguments.length < setter ) {
2086 2143
			return jQuery.queue( this[0], type );
2087 2144
		}
2088
		return this.each(function() {
2089
			var queue = jQuery.queue( this, type, data );
2090 2145

  
2091
			if ( type === "fx" && queue[0] !== "inprogress" ) {
2092
				jQuery.dequeue( this, type );
2093
			}
2094
		});
2146
		return data === undefined ?
2147
			this :
2148
			this.each(function() {
2149
				var queue = jQuery.queue( this, type, data );
2150

  
2151
				if ( type === "fx" && queue[0] !== "inprogress" ) {
2152
					jQuery.dequeue( this, type );
2153
				}
2154
			});
2095 2155
	},
2096 2156
	dequeue: function( type ) {
2097 2157
		return this.each(function() {
......
2145 2205
			}
2146 2206
		}
2147 2207
		resolve();
2148
		return defer.promise();
2208
		return defer.promise( object );
2149 2209
	}
2150 2210
});
2151 2211

  
......
2164 2224

  
2165 2225
jQuery.fn.extend({
2166 2226
	attr: function( name, value ) {
2167
		return jQuery.access( this, name, value, true, jQuery.attr );
2227
		return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
2168 2228
	},
2169 2229

  
2170 2230
	removeAttr: function( name ) {
......
2174 2234
	},
2175 2235

  
2176 2236
	prop: function( name, value ) {
2177
		return jQuery.access( this, name, value, true, jQuery.prop );
2237
		return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
2178 2238
	},
2179 2239

  
2180 2240
	removeProp: function( name ) {
......
2314 2374

  
2315 2375
		if ( !arguments.length ) {
2316 2376
			if ( elem ) {
2317
				hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ];
2377
				hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
2318 2378

  
2319 2379
				if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
2320 2380
					return ret;
......
2358 2418
				});
2359 2419
			}
2360 2420

  
2361
			hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ];
2421
			hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
2362 2422

  
2363 2423
			// If set returns undefined, fall back to normal setting
2364 2424
			if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
......
2504 2564
	},
2505 2565

  
2506 2566
	removeAttr: function( elem, value ) {
2507
		var propName, attrNames, name, l,
2567
		var propName, attrNames, name, l, isBool,
2508 2568
			i = 0;
2509 2569

  
2510 2570
		if ( value && elem.nodeType === 1 ) {
......
2516 2576

  
2517 2577
				if ( name ) {
2518 2578
					propName = jQuery.propFix[ name ] || name;
2579
					isBool = rboolean.test( name );
2519 2580

  
2520 2581
					// See #9699 for explanation of this approach (setting first, then removal)
2521
					jQuery.attr( elem, name, "" );
2582
					// Do not do this for boolean attributes (see #10870)
2583
					if ( !isBool ) {
2584
						jQuery.attr( elem, name, "" );
2585
					}
2522 2586
					elem.removeAttribute( getSetAttribute ? name : propName );
2523 2587

  
2524 2588
					// Set corresponding property to false for boolean attributes
2525
					if ( rboolean.test( name ) && propName in elem ) {
2589
					if ( isBool && propName in elem ) {
2526 2590
						elem[ propName ] = false;
2527 2591
					}
2528 2592
				}
......
2676 2740

  
2677 2741
	fixSpecified = {
2678 2742
		name: true,
2679
		id: true
2743
		id: true,
2744
		coords: true
2680 2745
	};
2681 2746

  
2682 2747
	// Use this for any attribute in IE6/7
......
2806 2871

  
2807 2872
var rformElems = /^(?:textarea|input|select)$/i,
2808 2873
	rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
2809
	rhoverHack = /\bhover(\.\S+)?\b/,
2874
	rhoverHack = /(?:^|\s)hover(\.\S+)?\b/,
2810 2875
	rkeyEvent = /^key/,
2811 2876
	rmouseEvent = /^(?:mouse|contextmenu)|click/,
2812 2877
	rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
......
2854 2919
		if ( handler.handler ) {
2855 2920
			handleObjIn = handler;
2856 2921
			handler = handleObjIn.handler;
2922
			selector = handleObjIn.selector;
2857 2923
		}
2858 2924

  
2859 2925
		// Make sure that the handler has a unique ID, used to find/remove it later
......
2905 2971
				handler: handler,
2906 2972
				guid: handler.guid,
2907 2973
				selector: selector,
2908
				quick: quickParse( selector ),
2974
				quick: selector && quickParse( selector ),
2909 2975
				namespace: namespaces.join(".")
2910 2976
			}, handleObjIn );
2911 2977

  
......
3194 3260
			delegateCount = handlers.delegateCount,
3195 3261
			args = [].slice.call( arguments, 0 ),
3196 3262
			run_all = !event.exclusive && !event.namespace,
3263
			special = jQuery.event.special[ event.type ] || {},
3197 3264
			handlerQueue = [],
3198 3265
			i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related;
3199 3266

  
......
3201 3268
		args[0] = event;
3202 3269
		event.delegateTarget = this;
3203 3270

  
3271
		// Call the preDispatch hook for the mapped type, and let it bail if desired
3272
		if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
3273
			return;
3274
		}
3275

  
3204 3276
		// Determine handlers that should run if there are delegated events
3205
		// Avoid disabled elements in IE (#6911) and non-left-click bubbling in Firefox (#3861)
3206
		if ( delegateCount && !event.target.disabled && !(event.button && event.type === "click") ) {
3277
		// Avoid non-left-click bubbling in Firefox (#3861)
3278
		if ( delegateCount && !(event.button && event.type === "click") ) {
3207 3279

  
3208 3280
			// Pregenerate a single jQuery object for reuse with .is()
3209 3281
			jqcur = jQuery(this);
3210 3282
			jqcur.context = this.ownerDocument || this;
3211 3283

  
3212 3284
			for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {
3213
				selMatch = {};
3214
				matches = [];
3215
				jqcur[0] = cur;
3216
				for ( i = 0; i < delegateCount; i++ ) {
3217
					handleObj = handlers[ i ];
3218
					sel = handleObj.selector;
3219

  
3220
					if ( selMatch[ sel ] === undefined ) {
3221
						selMatch[ sel ] = (
3222
							handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel )
3223
						);
3285

  
3286
				// Don't process events on disabled elements (#6911, #8165)
3287
				if ( cur.disabled !== true ) {
3288
					selMatch = {};
3289
					matches = [];
3290
					jqcur[0] = cur;
3291
					for ( i = 0; i < delegateCount; i++ ) {
3292
						handleObj = handlers[ i ];
3293
						sel = handleObj.selector;
3294

  
3295
						if ( selMatch[ sel ] === undefined ) {
3296
							selMatch[ sel ] = (
3297
								handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel )
3298
							);
3299
						}
3300
						if ( selMatch[ sel ] ) {
3301
							matches.push( handleObj );
3302
						}
3224 3303
					}
3225
					if ( selMatch[ sel ] ) {
3226
						matches.push( handleObj );
3304
					if ( matches.length ) {
3305
						handlerQueue.push({ elem: cur, matches: matches });
3227 3306
					}
3228 3307
				}
3229
				if ( matches.length ) {
3230
					handlerQueue.push({ elem: cur, matches: matches });
3231
				}
3232 3308
			}
3233 3309
		}
3234 3310

  
......
3266 3342
			}
3267 3343
		}
3268 3344

  
3345
		// Call the postDispatch hook for the mapped type
3346
		if ( special.postDispatch ) {
3347
			special.postDispatch.call( this, event );
3348
		}
3349

  
3269 3350
		return event.result;
3270 3351
	},
3271 3352

  
......
3557 3638
					form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
3558 3639
				if ( form && !form._submit_attached ) {
3559 3640
					jQuery.event.add( form, "submit._submit", function( event ) {
3560
						// If form was submitted by the user, bubble the event up the tree
3561
						if ( this.parentNode && !event.isTrigger ) {
3562
							jQuery.event.simulate( "submit", this.parentNode, event, true );
3563
						}
3641
						event._submit_bubble = true;
3564 3642
					});
3565 3643
					form._submit_attached = true;
3566 3644
				}
3567 3645
			});
3568 3646
			// return undefined since we don't need an event listener
3569 3647
		},
3648
		
3649
		postDispatch: function( event ) {
3650
			// If form was submitted by the user, bubble the event up the tree
3651
			if ( event._submit_bubble ) {
3652
				delete event._submit_bubble;
3653
				if ( this.parentNode && !event.isTrigger ) {
3654
					jQuery.event.simulate( "submit", this.parentNode, event, true );
3655
				}
3656
			}
3657
		},
3570 3658

  
3571 3659
		teardown: function() {
3572 3660
			// Only need this for delegated form submit events
......
3671 3759
		// Types can be a map of types/handlers
3672 3760
		if ( typeof types === "object" ) {
3673 3761
			// ( types-Object, selector, data )
3674
			if ( typeof selector !== "string" ) {
3762
			if ( typeof selector !== "string" ) { // && selector != null
3675 3763
				// ( types-Object, data )
3676
				data = selector;
3764
				data = data || selector;
3677 3765
				selector = undefined;
3678 3766
			}
3679 3767
			for ( type in types ) {
......
3719 3807
		});
3720 3808
	},
3721 3809
	one: function( types, selector, data, fn ) {
3722
		return this.on.call( this, types, selector, data, fn, 1 );
3810
		return this.on( types, selector, data, fn, 1 );
3723 3811
	},
3724 3812
	off: function( types, selector, fn ) {
3725 3813
		if ( types && types.preventDefault && types.handleObj ) {
3726 3814
			// ( event )  dispatched jQuery.Event
3727 3815
			var handleObj = types.handleObj;
3728 3816
			jQuery( types.delegateTarget ).off(
3729
				handleObj.namespace? handleObj.type + "." + handleObj.namespace : handleObj.type,
3817
				handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
3730 3818
				handleObj.selector,
3731 3819
				handleObj.handler
3732 3820
			);
......
3885 3973
	if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
3886 3974
		return [];
3887 3975
	}
3888
	
3976

  
3889 3977
	if ( !selector || typeof selector !== "string" ) {
3890 3978
		return results;
3891 3979
	}
......
3895 3983
		contextXML = Sizzle.isXML( context ),
3896 3984
		parts = [],
3897 3985
		soFar = selector;
3898
	
3986

  
3899 3987
	// Reset the position of the chunker regexp (start from head)
3900 3988
	do {
3901 3989
		chunker.exec( "" );
......
3903 3991

  
3904 3992
		if ( m ) {
3905 3993
			soFar = m[3];
3906
		
3994

  
3907 3995
			parts.push( m[1] );
3908
		
3996

  
3909 3997
			if ( m[2] ) {
3910 3998
				extra = m[3];
3911 3999
				break;
......
3929 4017
				if ( Expr.relative[ selector ] ) {
3930 4018
					selector += parts.shift();
3931 4019
				}
3932
				
4020

  
3933 4021
				set = posProcess( selector, set, seed );
3934 4022
			}
3935 4023
		}
......
4057 4145

  
4058 4146
	for ( i = 0, len = Expr.order.length; i < len; i++ ) {
4059 4147
		type = Expr.order[i];
4060
		
4148

  
4061 4149
		if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
4062 4150
			left = match[1];
4063 4151
			match.splice( 1, 1 );
......
4189 4277
		ret = "";
4190 4278

  
4191 4279
	if ( nodeType ) {
4192
		if ( nodeType === 1 || nodeType === 9 ) {
4280
		if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
4193 4281
			// Use textContent || innerText for elements
4194 4282
			if ( typeof elem.textContent === 'string' ) {
4195 4283
				return elem.textContent;
......
4429 4517

  
4430 4518
		ATTR: function( match, curLoop, inplace, result, not, isXML ) {
4431 4519
			var name = match[1] = match[1].replace( rBackslash, "" );
4432
			
4520

  
4433 4521
			if ( !isXML && Expr.attrMap[name] ) {
4434 4522
				match[1] = Expr.attrMap[name];
4435 4523
			}
......
4463 4551
			} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
4464 4552
				return true;
4465 4553
			}
4466
			
4554

  
4467 4555
			return match;
4468 4556
		},
4469 4557

  
......
4473 4561
			return match;
4474 4562
		}
4475 4563
	},
4476
	
4564

  
4477 4565
	filters: {
4478 4566
		enabled: function( elem ) {
4479 4567
			return elem.disabled === false && elem.type !== "hidden";
......
4486 4574
		checked: function( elem ) {
4487 4575
			return elem.checked === true;
4488 4576
		},
4489
		
4577

  
4490 4578
		selected: function( elem ) {
4491 4579
			// Accessing this property makes selected-by-default
4492 4580
			// options in Safari work properly
4493 4581
			if ( elem.parentNode ) {
4494 4582
				elem.parentNode.selectedIndex;
4495 4583
			}
4496
			
4584

  
4497 4585
			return elem.selected === true;
4498 4586
		},
4499 4587

  
......
4515 4603

  
4516 4604
		text: function( elem ) {
4517 4605
			var attr = elem.getAttribute( "type" ), type = elem.type;
4518
			// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) 
4606
			// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
4519 4607
			// use getAttribute instead to test this case
4520 4608
			return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
4521 4609
		},
......
4633 4721
			switch ( type ) {
4634 4722
				case "only":
4635 4723
				case "first":
4636
					while ( (node = node.previousSibling) )	 {
4637
						if ( node.nodeType === 1 ) { 
4638
							return false; 
4724
					while ( (node = node.previousSibling) ) {
4725
						if ( node.nodeType === 1 ) {
4726
							return false;
4639 4727
						}
4640 4728
					}
4641 4729

  
4642
					if ( type === "first" ) { 
4643
						return true; 
4730
					if ( type === "first" ) {
4731
						return true;
4644 4732
					}
4645 4733

  
4646 4734
					node = elem;
4647 4735

  
4736
					/* falls through */
4648 4737
				case "last":
4649
					while ( (node = node.nextSibling) )	 {
4650
						if ( node.nodeType === 1 ) { 
4651
							return false; 
4738
					while ( (node = node.nextSibling) ) {
4739
						if ( node.nodeType === 1 ) {
4740
							return false;
4652 4741
						}
4653 4742
					}
4654 4743

  
......
4661 4750
					if ( first === 1 && last === 0 ) {
4662 4751
						return true;
4663 4752
					}
4664
					
4753

  
4665 4754
					doneName = match[0];
4666 4755
					parent = elem.parentNode;
4667
	
4756

  
4668 4757
					if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) {
4669 4758
						count = 0;
4670
						
4759

  
4671 4760
						for ( node = parent.firstChild; node; node = node.nextSibling ) {
4672 4761
							if ( node.nodeType === 1 ) {
4673 4762
								node.nodeIndex = ++count;
4674 4763
							}
4675
						} 
4764
						}
4676 4765

  
4677 4766
						parent[ expando ] = doneName;
4678 4767
					}
4679
					
4768

  
4680 4769
					diff = elem.nodeIndex - last;
4681 4770

  
4682 4771
					if ( first === 0 ) {
......
4695 4784
		TAG: function( elem, match ) {
4696 4785
			return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match;
4697 4786
		},
4698
		
4787

  
4699 4788
		CLASS: function( elem, match ) {
4700 4789
			return (" " + (elem.className || elem.getAttribute("class")) + " ")
4701 4790
				.indexOf( match ) > -1;
......
4757 4846
	Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
4758 4847
	Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
4759 4848
}
4849
// Expose origPOS
4850
// "global" as in regardless of relation to brackets/parens
4851
Expr.match.globalPOS = origPOS;
4760 4852

  
4761 4853
var makeArray = function( array, results ) {
4762 4854
	array = Array.prototype.slice.call( array, 0 );
......
4765 4857
		results.push.apply( results, array );
4766 4858
		return results;
4767 4859
	}
4768
	
4860

  
4769 4861
	return array;
4770 4862
};
4771 4863

  
......
4997 5089
		if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
4998 5090
			return;
4999 5091
		}
5000
	
5092

  
5001 5093
		Sizzle = function( query, context, extra, seed ) {
5002 5094
			context = context || document;
5003 5095

  
......
5006 5098
			if ( !seed && !Sizzle.isXML(context) ) {
5007 5099
				// See if we find a selector to speed up
5008 5100
				var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
5009
				
5101

  
5010 5102
				if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
5011 5103
					// Speed-up: Sizzle("TAG")
5012 5104
					if ( match[1] ) {
5013 5105
						return makeArray( context.getElementsByTagName( query ), extra );
5014
					
5106

  
5015 5107
					// Speed-up: Sizzle(".CLASS")
5016 5108
					} else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
5017 5109
						return makeArray( context.getElementsByClassName( match[2] ), extra );
5018 5110
					}
5019 5111
				}
5020
				
5112

  
5021 5113
				if ( context.nodeType === 9 ) {
5022 5114
					// Speed-up: Sizzle("body")
5023 5115
					// The body element only exists once, optimize finding it
5024 5116
					if ( query === "body" && context.body ) {
5025 5117
						return makeArray( [ context.body ], extra );
5026
						
5118

  
5027 5119
					// Speed-up: Sizzle("#ID")
5028 5120
					} else if ( match && match[3] ) {
5029 5121
						var elem = context.getElementById( match[3] );
......
5036 5128
							if ( elem.id === match[3] ) {
5037 5129
								return makeArray( [ elem ], extra );
5038 5130
							}
5039
							
5131

  
5040 5132
						} else {
5041 5133
							return makeArray( [], extra );
5042 5134
						}
5043 5135
					}
5044
					
5136

  
5045 5137
					try {
5046 5138
						return makeArray( context.querySelectorAll(query), extra );
5047 5139
					} catch(qsaError) {}
......
5079 5171
					}
5080 5172
				}
5081 5173
			}
5082
		
5174

  
5083 5175
			return oldSizzle(query, context, extra, seed);
5084 5176
		};
5085 5177

  
......
5106 5198
			// This should fail with an exception
5107 5199
			// Gecko does not error, returns false instead
5108 5200
			matches.call( document.documentElement, "[test!='']:sizzle" );
5109
	
5201

  
5110 5202
		} catch( pseudoError ) {
5111 5203
			pseudoWorks = true;
5112 5204
		}
......
5116 5208
			expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
5117 5209

  
5118 5210
			if ( !Sizzle.isXML( node ) ) {
5119
				try { 
5211
				try {
5120 5212
					if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
5121 5213
						var ret = matches.call( node, expr );
5122 5214

  
......
5153 5245
	if ( div.getElementsByClassName("e").length === 1 ) {
5154 5246
		return;
5155 5247
	}
5156
	
5248

  
5157 5249
	Expr.order.splice(1, 0, "CLASS");
5158 5250
	Expr.find.CLASS = function( match, context, isXML ) {
5159 5251
		if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
......
5204 5296

  
5205 5297
		if ( elem ) {
5206 5298
			var match = false;
5207
			
5299

  
5208 5300
			elem = elem[dir];
5209 5301

  
5210 5302
			while ( elem ) {
......
5257 5349

  
5258 5350
Sizzle.isXML = function( elem ) {
5259 5351
	// documentElement is verified for cases where it doesn't yet exist
5260
	// (such as loading iframes in IE - #4833) 
5352
	// (such as loading iframes in IE - #4833)
5261 5353
	var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
5262 5354

  
5263 5355
	return documentElement ? documentElement.nodeName !== "HTML" : false;
......
5307 5399
	rmultiselector = /,/,
5308 5400
	isSimple = /^.[^:#\[\.,]*$/,
5309 5401
	slice = Array.prototype.slice,
5310
	POS = jQuery.expr.match.POS,
5402
	POS = jQuery.expr.match.globalPOS,
5311 5403
	// methods guaranteed to produce a unique set when starting from a unique set
5312 5404
	guaranteedUnique = {
5313 5405
		children: true,
......
5374 5466
	},
5375 5467

  
5376 5468
	is: function( selector ) {
5377
		return !!selector && ( 
5469
		return !!selector && (
5378 5470
			typeof selector === "string" ?
5379 5471
				// If this is a positional selector, check membership in the returned set
5380 5472
				// so $("p:first").is("p:last") won't return true for a doc with two "p".
5381
				POS.test( selector ) ? 
5473
				POS.test( selector ) ?
5382 5474
					jQuery( selector, this.context ).index( this[0] ) >= 0 :
5383 5475
					jQuery.filter( selector, this ).length > 0 :
5384 5476
				this.filter( selector ).length > 0 );
......
5386 5478

  
5387 5479
	closest: function( selectors, context ) {
5388 5480
		var ret = [], i, l, cur = this[0];
5389
		
5481

  
5390 5482
		// Array (deprecated as of jQuery 1.7)
5391 5483
		if ( jQuery.isArray( selectors ) ) {
5392 5484
			var level = 1;
......
5505 5597
		return jQuery.dir( elem, "previousSibling", until );
5506 5598
	},
5507 5599
	siblings: function( elem ) {
5508
		return jQuery.sibling( elem.parentNode.firstChild, elem );
5600
		return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
5509 5601
	},
5510 5602
	children: function( elem ) {
5511 5603
		return jQuery.sibling( elem.firstChild );
......
5639 5731
	return safeFrag;
5640 5732
}
5641 5733

  
5642
var nodeNames = "abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|" +
5734
var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
5643 5735
		"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
5644 5736
	rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
5645 5737
	rleadingWhitespace = /^\s+/,
......
5649 5741
	rhtml = /<|&#?\w+;/,
5650 5742
	rnoInnerhtml = /<(?:script|style)/i,
5651 5743
	rnocache = /<(?:script|object|embed|option|style)/i,
5652
	rnoshimcache = new RegExp("<(?:" + nodeNames + ")", "i"),
5744
	rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
5653 5745
	// checked="checked" or checked
5654 5746
	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
5655 5747
	rscriptType = /\/(java|ecma)script/i,
......
5676 5768
}
5677 5769

  
5678 5770
jQuery.fn.extend({
5679
	text: function( text ) {
5680
		if ( jQuery.isFunction(text) ) {
5681
			return this.each(function(i) {
5682
				var self = jQuery( this );
5683

  
5684
				self.text( text.call(this, i, self.text()) );
5685
			});
5686
		}
5687

  
5688
		if ( typeof text !== "object" && text !== undefined ) {
5689
			return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
5690
		}
5691

  
5692
		return jQuery.text( this );
5771
	text: function( value ) {
5772
		return jQuery.access( this, function( value ) {
5773
			return value === undefined ?
5774
				jQuery.text( this ) :
5775
				this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
5776
		}, null, value, arguments.length );
5693 5777
	},
5694 5778

  
5695 5779
	wrapAll: function( html ) {
......
5841 5925
	},
5842 5926

  
5843 5927
	html: function( value ) {
5844
		if ( value === undefined ) {
5845
			return this[0] && this[0].nodeType === 1 ?
5846
				this[0].innerHTML.replace(rinlinejQuery, "") :
5847
				null;
5928
		return jQuery.access( this, function( value ) {
5929
			var elem = this[0] || {},
5930
				i = 0,
5931
				l = this.length;
5848 5932

  
5849
		// See if we can take a shortcut and just use innerHTML
5850
		} else if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
5851
			(jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
5852
			!wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
5933
			if ( value === undefined ) {
5934
				return elem.nodeType === 1 ?
5935
					elem.innerHTML.replace( rinlinejQuery, "" ) :
5936
					null;
5937
			}
5853 5938

  
5854
			value = value.replace(rxhtmlTag, "<$1></$2>");
5855 5939

  
5856
			try {
5857
				for ( var i = 0, l = this.length; i < l; i++ ) {
5858
					// Remove element nodes and prevent memory leaks
5859
					if ( this[i].nodeType === 1 ) {
5860
						jQuery.cleanData( this[i].getElementsByTagName("*") );
5861
						this[i].innerHTML = value;
5862
					}
5863
				}
5940
			if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
5941
				( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
5942
				!wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
5864 5943

  
5865
			// If using innerHTML throws an exception, use the fallback method
5866
			} catch(e) {
5867
				this.empty().append( value );
5868
			}
5944
				value = value.replace( rxhtmlTag, "<$1></$2>" );
5869 5945

  
5870
		} else if ( jQuery.isFunction( value ) ) {
5871
			this.each(function(i){
5872
				var self = jQuery( this );
5946
				try {
5947
					for (; i < l; i++ ) {
5948
						// Remove element nodes and prevent memory leaks
5949
						elem = this[i] || {};
5950
						if ( elem.nodeType === 1 ) {
5951
							jQuery.cleanData( elem.getElementsByTagName( "*" ) );
5952
							elem.innerHTML = value;
5953
						}
5954
					}
5873 5955

  
5874
				self.html( value.call(this, i, self.html()) );
5875
			});
5956
					elem = 0;
5876 5957

  
5877
		} else {
5878
			this.empty().append( value );
5879
		}
5958
				// If using innerHTML throws an exception, use the fallback method
5959
				} catch(e) {}
5960
			}
5880 5961

  
5881
		return this;
5962
			if ( elem ) {
5963
				this.empty().append( value );
5964
			}
5965
		}, null, value, arguments.length );
5882 5966
	},
5883 5967

  
5884 5968
	replaceWith: function( value ) {
......
5981 6065
			}
5982 6066

  
5983 6067
			if ( scripts.length ) {
5984
				jQuery.each( scripts, evalScript );
6068
				jQuery.each( scripts, function( i, elem ) {
6069
					if ( elem.src ) {
6070
						jQuery.ajax({
6071
							type: "GET",
6072
							global: false,
6073
							url: elem.src,
6074
							async: false,
6075
							dataType: "script"
6076
						});
6077
					} else {
6078
						jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) );
6079
					}
6080

  
6081
					if ( elem.parentNode ) {
6082
						elem.parentNode.removeChild( elem );
6083
					}
6084
				});
5985 6085
			}
5986 6086
		}
5987 6087

  
......
6013 6113

  
6014 6114
		for ( type in events ) {
6015 6115
			for ( i = 0, l = events[ type ].length; i < l; i++ ) {
6016
				jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data );
6116
				jQuery.event.add( dest, type, events[ type ][ i ] );
6017 6117
			}
6018 6118
		}
6019 6119
	}
......
6075 6175
	// cloning other types of input fields
6076 6176
	} else if ( nodeName === "input" || nodeName === "textarea" ) {
6077 6177
		dest.defaultValue = src.defaultValue;
6178

  
6179
	// IE blanks contents when cloning scripts
6180
	} else if ( nodeName === "script" && dest.text !== src.text ) {
6181
		dest.text = src.text;
6078 6182
	}
6079 6183

  
6080 6184
	// Event data gets referenced instead of copied if the expando
6081 6185
	// gets copied too
6082 6186
	dest.removeAttribute( jQuery.expando );
6187

  
6188
	// Clear flags for bubbling special change/submit events, they must
6189
	// be reattached when the newly cloned events are first activated
6190
	dest.removeAttribute( "_submit_attached" );
6191
	dest.removeAttribute( "_change_attached" );
6083 6192
}
6084 6193

  
6085 6194
jQuery.buildFragment = function( args, nodes, scripts ) {
......
6204 6313
			destElements,
6205 6314
			i,
6206 6315
			// IE<=8 does not properly clone detached, unknown element nodes
6207
			clone = jQuery.support.html5Clone || !rnoshimcache.test( "<" + elem.nodeName ) ?
6316
			clone = jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ?
6208 6317
				elem.cloneNode( true ) :
6209 6318
				shimCloneNode( elem );
6210 6319

  
......
6254 6363
	},
6255 6364

  
6256 6365
	clean: function( elems, context, fragment, scripts ) {
6257
		var checkScriptType;
6366
		var checkScriptType, script, j,
6367
				ret = [];
6258 6368

  
6259 6369
		context = context || document;
6260 6370

  
......
6263 6373
			context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
6264 6374
		}
6265 6375

  
6266
		var ret = [], j;
6267

  
6268 6376
		for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
6269 6377
			if ( typeof elem === "number" ) {
6270 6378
				elem += "";
......
6286 6394
					var tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(),
6287 6395
						wrap = wrapMap[ tag ] || wrapMap._default,
6288 6396
						depth = wrap[0],
6289
						div = context.createElement("div");
6397
						div = context.createElement("div"),
6398
						safeChildNodes = safeFragment.childNodes,
6399
						remove;
6290 6400

  
6291 6401
					// Append wrapper element to unknown element safe doc fragment
6292 6402
					if ( context === document ) {
......
6331 6441
					}
6332 6442

  
6333 6443
					elem = div.childNodes;
6444

  
6445
					// Clear elements from DocumentFragment (safeFragment or otherwise)
6446
					// to avoid hoarding elements. Fixes #11356
6447
					if ( div ) {
6448
						div.parentNode.removeChild( div );
6449

  
6450
						// Guard against -1 index exceptions in FF3.6
6451
						if ( safeChildNodes.length > 0 ) {
6452
							remove = safeChildNodes[ safeChildNodes.length - 1 ];
6453

  
6454
							if ( remove && remove.parentNode ) {
6455
								remove.parentNode.removeChild( remove );
6456
							}
6457
						}
6458
					}
6334 6459
				}
6335 6460
			}
6336 6461

  
......
6359 6484
				return !elem.type || rscriptType.test( elem.type );
6360 6485
			};
6361 6486
			for ( i = 0; ret[i]; i++ ) {
6362
				if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
6363
					scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
6487
				script = ret[i];
6488
				if ( scripts && jQuery.nodeName( script, "script" ) && (!script.type || rscriptType.test( script.type )) ) {
6489
					scripts.push( script.parentNode ? script.parentNode.removeChild( script ) : script );
6364 6490

  
6365 6491
				} else {
6366
					if ( ret[i].nodeType === 1 ) {
6367
						var jsTags = jQuery.grep( ret[i].getElementsByTagName( "script" ), checkScriptType );
6492
					if ( script.nodeType === 1 ) {
6493
						var jsTags = jQuery.grep( script.getElementsByTagName( "script" ), checkScriptType );
6368 6494

  
6369 6495
						ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
6370 6496
					}
6371
					fragment.appendChild( ret[i] );
6497
					fragment.appendChild( script );
6372 6498
				}
6373 6499
			}
6374 6500
		}
......
6422 6548
	}
6423 6549
});
6424 6550

  
6425
function evalScript( i, elem ) {
6426
	if ( elem.src ) {
6427
		jQuery.ajax({
6428
			url: elem.src,
6429
			async: false,
6430
			dataType: "script"
6431
		});
6432
	} else {
6433
		jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) );
6434
	}
6435

  
6436
	if ( elem.parentNode ) {
6437
		elem.parentNode.removeChild( elem );
6438
	}
6439
}
6440

  
6441 6551

  
6442 6552

  
6443 6553

  
......
6445 6555
	ropacity = /opacity=([^)]*)/,
6446 6556
	// fixed for IE9, see #8346
6447 6557
	rupper = /([A-Z]|^ms)/g,
6448
	rnumpx = /^-?\d+(?:px)?$/i,
6449
	rnum = /^-?\d/,
6558
	rnum = /^[\-+]?(?:\d*\.)?\d+$/i,
6559
	rnumnonpx = /^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,
6450 6560
	rrelNum = /^([\-+])=([\-+.\de]+)/,
6561
	rmargin = /^margin/,
6451 6562

  
6452 6563
	cssShow = { position: "absolute", visibility: "hidden", display: "block" },
6453
	cssWidth = [ "Left", "Right" ],
6454
	cssHeight = [ "Top", "Bottom" ],
6564

  
6565
	// order is important!
6566
	cssExpand = [ "Top", "Right", "Bottom", "Left" ],
6567

  
6455 6568
	curCSS,
6456 6569

  
6457 6570
	getComputedStyle,
6458 6571
	currentStyle;
6459 6572

  
6460 6573
jQuery.fn.css = function( name, value ) {
6461
	// Setting 'undefined' is a no-op
6462
	if ( arguments.length === 2 && value === undefined ) {
6463
		return this;
6464
	}
6465

  
6466
	return jQuery.access( this, name, value, true, function( elem, name, value ) {
6574
	return jQuery.access( this, function( elem, name, value ) {
6467 6575
		return value !== undefined ?
6468 6576
			jQuery.style( elem, name, value ) :
6469 6577
			jQuery.css( elem, name );
6470
	});
6578
	}, name, value, arguments.length > 1 );
6471 6579
};
6472 6580

  
6473 6581
jQuery.extend({
......
6478 6586
			get: function( elem, computed ) {
6479 6587
				if ( computed ) {
6480 6588
					// We should always get a number back from opacity
6481
					var ret = curCSS( elem, "opacity", "opacity" );
6589
					var ret = curCSS( elem, "opacity" );
6482 6590
					return ret === "" ? "1" : ret;
6483 6591

  
6484 6592
				} else {
......
6586 6694

  
6587 6695
	// A method for quickly swapping in/out CSS properties to get correct calculations
6588 6696
	swap: function( elem, options, callback ) {
6589
		var old = {};
6697
		var old = {},
6698
			ret, name;
6590 6699

  
6591 6700
		// Remember the old values, and insert the new ones
6592
		for ( var name in options ) {
6701
		for ( name in options ) {
6593 6702
			old[ name ] = elem.style[ name ];
6594 6703
			elem.style[ name ] = options[ name ];
6595 6704
		}
6596 6705

  
6597
		callback.call( elem );
6706
		ret = callback.call( elem );
6598 6707

  
6599 6708
		// Revert the old values
6600 6709
		for ( name in options ) {
6601 6710
			elem.style[ name ] = old[ name ];
6602 6711
		}
6712

  
6713
		return ret;
6603 6714
	}
6604 6715
});
6605 6716

  
6606
// DEPRECATED, Use jQuery.css() instead
6717
// DEPRECATED in 1.3, Use jQuery.css() instead
6607 6718
jQuery.curCSS = jQuery.css;
6608 6719

  
6609
jQuery.each(["height", "width"], function( i, name ) {
6610
	jQuery.cssHooks[ name ] = {
6611
		get: function( elem, computed, extra ) {
6612
			var val;
6613

  
6614
			if ( computed ) {
6615
				if ( elem.offsetWidth !== 0 ) {
6616
					return getWH( elem, name, extra );
6617
				} else {
6618
					jQuery.swap( elem, cssShow, function() {
6619
						val = getWH( elem, name, extra );
6620
					});
6621
				}
6622

  
6623
				return val;
6624
			}
6625
		},
6626

  
6627
		set: function( elem, value ) {
6628
			if ( rnumpx.test( value ) ) {
6629
				// ignore negative width and height values #1599
6630
				value = parseFloat( value );
6631

  
6632
				if ( value >= 0 ) {
6633
					return value + "px";
6634
				}
6635

  
6636
			} else {
6637
				return value;
6638
			}
6639
		}
6640
	};
6641
});
6642

  
6643
if ( !jQuery.support.opacity ) {
6644
	jQuery.cssHooks.opacity = {
6645
		get: function( elem, computed ) {
6646
			// IE uses filters for opacity
6647
			return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
6648
				( parseFloat( RegExp.$1 ) / 100 ) + "" :
6649
				computed ? "1" : "";
6650
		},
6651

  
6652
		set: function( elem, value ) {
6653
			var style = elem.style,
6654
				currentStyle = elem.currentStyle,
6655
				opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
6656
				filter = currentStyle && currentStyle.filter || style.filter || "";
6657

  
6658
			// IE has trouble with opacity if it does not have layout
6659
			// Force it by setting the zoom level
6660
			style.zoom = 1;
6661

  
6662
			// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
6663
			if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" ) {
6664

  
6665
				// Setting style.filter to null, "" & " " still leave "filter:" in the cssText
6666
				// if "filter:" is present at all, clearType is disabled, we want to avoid this
6667
				// style.removeAttribute is IE Only, but so apparently is this code path...
6668
				style.removeAttribute( "filter" );
6669

  
... Ce différentiel a été tronqué car il excède la taille maximale pouvant être affichée.

Formats disponibles : Unified diff