<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[23301] trunk/wp-includes: jQuery 1.9 final.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/23301">23301</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2013-01-15 17:52:42 +0000 (Tue, 15 Jan 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>jQuery 1.9 final. jQuery Migrate 1.0. Uncompressed for now, while we iron out kinks.
props jorbin. see <a href="http://core.trac.wordpress.org/ticket/22975">#22975</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesjsjqueryjquerymigratejs">trunk/wp-includes/js/jquery/jquery-migrate.js</a></li>
<li><a href="#trunkwpincludesjsjqueryjqueryjs">trunk/wp-includes/js/jquery/jquery.js</a></li>
<li><a href="#trunkwpincludesscriptloaderphp">trunk/wp-includes/script-loader.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesjsjqueryjquerymigratejs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/jquery/jquery-migrate.js (23300 => 23301)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/jquery/jquery-migrate.js        2013-01-15 17:32:35 UTC (rev 23300)
+++ trunk/wp-includes/js/jquery/jquery-migrate.js        2013-01-15 17:52:42 UTC (rev 23301)
</span><span class="lines">@@ -1,24 +1,20 @@
</span><span class="cx"> /*!
</span><del>- * jQuery Migrate - v1.0.0pre - 2012-12-17
</del><ins>+ * jQuery Migrate - v1.0.0 - 2013-01-14
</ins><span class="cx"> * https://github.com/jquery/jquery-migrate
</span><del>- * Copyright 2012 jQuery Foundation and other contributors; Licensed MIT
</del><ins>+ * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
</ins><span class="cx"> */
</span><del>-
</del><span class="cx"> (function( jQuery, window, undefined ) {
</span><span class="cx"> "use strict";
</span><span class="cx">
</span><del>-// Use Uglify to do conditional compilation of warning messages;
-// the minified version will set this to false and remove dead code.
-if ( typeof window.JQMIGRATE_WARN === "undefined" ) {
-        window.JQMIGRATE_WARN = true;
-}
</del><span class="cx">
</span><del>-
</del><span class="cx"> var warnedAbout = {};
</span><span class="cx">
</span><span class="cx"> // List of warnings already given; public read only
</span><span class="cx"> jQuery.migrateWarnings = [];
</span><span class="cx">
</span><ins>+// Set to true to prevent console output; migrateWarnings still maintained
+// jQuery.migrateMute = false;
+
</ins><span class="cx"> // Forget any warnings we've already given; public
</span><span class="cx"> jQuery.migrateReset = function() {
</span><span class="cx">         warnedAbout = {};
</span><span class="lines">@@ -26,19 +22,17 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> function migrateWarn( msg) {
</span><del>-        if ( window.JQMIGRATE_WARN ) {
-                if ( !warnedAbout[ msg ] ) {
-                        warnedAbout[ msg ] = true;
-                        jQuery.migrateWarnings.push( msg );
-                        if ( window.console && console.warn ) {
-                                console.warn( "JQMIGRATE: " + msg );
-                        }
</del><ins>+        if ( !warnedAbout[ msg ] ) {
+                warnedAbout[ msg ] = true;
+                jQuery.migrateWarnings.push( msg );
+                if ( window.console && console.warn && !jQuery.migrateMute ) {
+                        console.warn( "JQMIGRATE: " + msg );
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function migrateWarnProp( obj, prop, value, msg ) {
</span><del>-        if ( window.JQMIGRATE_WARN && Object.defineProperty ) {
</del><ins>+        if ( Object.defineProperty ) {
</ins><span class="cx">                 // On ES5 browsers (non-oldIE), warn if the code tries to get prop;
</span><span class="cx">                 // allow property to be overwritten in case some other plugin wants it
</span><span class="cx">                 try {
</span><span class="lines">@@ -65,7 +59,7 @@
</span><span class="cx">         obj[ prop ] = value;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-if ( window.JQMIGRATE_WARN && document.compatMode === "BackCompat" ) {
</del><ins>+if ( document.compatMode === "BackCompat" ) {
</ins><span class="cx">         // jQuery has never supported or tested Quirks Mode
</span><span class="cx">         migrateWarn( "jQuery is not compatible with Quirks Mode" );
</span><span class="cx"> }
</span><span class="lines">@@ -78,15 +72,20 @@
</span><span class="cx">         valueAttrSet = jQuery.attrHooks.value && jQuery.attrHooks.value.set ||
</span><span class="cx">                 function() { return undefined; },
</span><span class="cx">         rnoType = /^(?:input|button)$/i,
</span><del>-        rnoAttrNodeType = /^[238]$/;
</del><ins>+        rnoAttrNodeType = /^[238]$/,
+        rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
+        ruseDefault = /^(?:checked|selected)$/i;
</ins><span class="cx">
</span><span class="cx"> // jQuery.attrFn
</span><span class="cx"> migrateWarnProp( jQuery, "attrFn", attrFn, "jQuery.attrFn is deprecated" );
</span><span class="cx">
</span><span class="cx"> jQuery.attr = function( elem, name, value, pass ) {
</span><ins>+        var lowerName = name.toLowerCase(),
+                nType = elem && elem.nodeType;
+
</ins><span class="cx">         if ( pass ) {
</span><span class="cx">                 migrateWarn("jQuery.fn.attr( props, pass ) is deprecated");
</span><del>-                if ( elem && !rnoAttrNodeType.test( elem.nodeType ) && jQuery.isFunction( jQuery.fn[ name ] ) ) {
</del><ins>+                if ( elem && !rnoAttrNodeType.test( nType ) && jQuery.isFunction( jQuery.fn[ name ] ) ) {
</ins><span class="cx">                         return jQuery( elem )[ name ]( value );
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="lines">@@ -96,25 +95,71 @@
</span><span class="cx">                 migrateWarn("Can't change the 'type' of an input or button in IE 6/7/8");
</span><span class="cx">         }
</span><span class="cx">
</span><ins>+        // Restore boolHook for boolean property/attribute synchronization
+        if ( !jQuery.attrHooks[ lowerName ] && rboolean.test( lowerName ) ) {
+                jQuery.attrHooks[ lowerName ] = {
+                        get: function( elem, name ) {
+                                // Align boolean attributes with corresponding properties
+                                // Fall back to attribute presence where some booleans are not supported
+                                var attrNode,
+                                        property = jQuery.prop( elem, name );
+                                return property === true || typeof property !== "boolean" &&
+                                        ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
+
+                                        name.toLowerCase() :
+                                        undefined;
+                        },
+                        set: function( elem, value, name ) {
+                                var propName;
+                                if ( value === false ) {
+                                        // Remove boolean attributes when set to false
+                                        jQuery.removeAttr( elem, name );
+                                } else {
+                                        // value is true since we know at this point it's type boolean and not false
+                                        // Set boolean attributes to the same name and set the DOM property
+                                        propName = jQuery.propFix[ name ] || name;
+                                        if ( propName in elem ) {
+                                                // Only set the IDL specifically if it already exists on the element
+                                                elem[ propName ] = true;
+                                        }
+
+                                        elem.setAttribute( name, name.toLowerCase() );
+                                }
+                                return name;
+                        }
+                };
+
+                // Warn only for attributes that can remain distinct from their properties post-1.9
+                if ( ruseDefault.test( lowerName ) ) {
+                        migrateWarn( "jQuery.fn.attr(" + lowerName + ") may use property instead of attribute" );
+                }
+        }
+
</ins><span class="cx">         return attr.call( jQuery, elem, name, value );
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> // attrHooks: value
</span><span class="cx"> jQuery.attrHooks.value = {
</span><span class="cx">         get: function( elem, name ) {
</span><del>-                if ( jQuery.nodeName( elem, "button" ) ) {
</del><ins>+                var nodeName = ( elem.nodeName || "" ).toLowerCase();
+                if ( nodeName === "button" ) {
</ins><span class="cx">                         return valueAttrGet.apply( this, arguments );
</span><span class="cx">                 }
</span><del>-                migrateWarn("property-based jQuery.fn.attr('value') is deprecated");
</del><ins>+                if ( nodeName !== "input" && nodeName !== "option" ) {
+                        migrateWarn("property-based jQuery.fn.attr('value') is deprecated");
+                }
</ins><span class="cx">                 return name in elem ?
</span><span class="cx">                         elem.value :
</span><span class="cx">                         null;
</span><span class="cx">         },
</span><del>-        set: function( elem, value, name ) {
-                if ( jQuery.nodeName( elem, "button" ) ) {
</del><ins>+        set: function( elem, value ) {
+                var nodeName = ( elem.nodeName || "" ).toLowerCase();
+                if ( nodeName === "button" ) {
</ins><span class="cx">                         return valueAttrSet.apply( this, arguments );
</span><span class="cx">                 }
</span><del>-                migrateWarn("property-based jQuery.fn.attr('value', val) is deprecated");
</del><ins>+                if ( nodeName !== "input" && nodeName !== "option" ) {
+                        migrateWarn("property-based jQuery.fn.attr('value', val) is deprecated");
+                }
</ins><span class="cx">                 // Does not return so that setAttribute is also used
</span><span class="cx">                 elem.value = value;
</span><span class="cx">         }
</span><span class="lines">@@ -122,10 +167,9 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> var matched, browser,
</span><del>-        oldAccess = jQuery.access,
</del><span class="cx">         oldInit = jQuery.fn.init,
</span><span class="cx">         // Note this does NOT include the # XSS fix from 1.7!
</span><del>-        rquickExpr = /^(?:.*(<[\w\W]+>)[^>]*|#([\w-]*))$/;
</del><ins>+        rquickExpr = /^(?:.*(<[\w\W]+>)[^>]*|#([\w\-]*))$/;
</ins><span class="cx">
</span><span class="cx"> // $(html) "looks like html" rule change
</span><span class="cx"> jQuery.fn.init = function( selector, context, rootjQuery ) {
</span><span class="lines">@@ -151,27 +195,6 @@
</span><span class="cx"> };
</span><span class="cx"> jQuery.fn.init.prototype = jQuery.fn;
</span><span class="cx">
</span><del>-if ( jQuery.fn.jquery >= "1.9" ) {
-        // jQuery.access( ..., pass )
-        jQuery.access = function( elems, fn, key, value, chainable, emptyGet, pass ) {
-                var i = 0,
-                        length = elems.length;
-
-                if ( key && typeof key === "object" && value ) {
-                        for ( i in key ) {
-                                jQuery.access( elems, fn, i, key[i], true, emptyGet, value );
-                        }
-                        return elems;
-                } else if ( pass && key != null && value !== undefined ) {
-                        for ( ; i < length; i++ ) {
-                                fn( elems[i], key, value, true );
-                        }
-                        return elems;
-                }
-                return oldAccess.call( jQuery, elems, fn, key, value, chainable, emptyGet );
-        };
-}
-
</del><span class="cx"> jQuery.uaMatch = function( ua ) {
</span><span class="cx">         ua = ua.toLowerCase();
</span><span class="cx">
</span><span class="lines">@@ -250,7 +273,8 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx">
</span><del>-var oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack,
</del><ins>+var rscriptType = /\/(java|ecma)script/i,
+        oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack,
</ins><span class="cx">         oldFragment = jQuery.buildFragment;
</span><span class="cx">
</span><span class="cx"> jQuery.fn.andSelf = function() {
</span><span class="lines">@@ -258,25 +282,83 @@
</span><span class="cx">         return oldSelf.apply( this, arguments );
</span><span class="cx"> };
</span><span class="cx">
</span><del>-jQuery.buildFragment = function( args, context, scripts ) {
-        var fragment;
-
-        if ( !oldFragment ) {
-                // Set context from what may come in as undefined or a jQuery collection or a node
-                // Updated to fix #12266 where accessing context[0] could throw an exception in IE9/10 &
-                // also doubles as fix for #8950 where plain objects caused createDocumentFragment exception
</del><ins>+// Since jQuery.clean is used internally on older versions, we only shim if it's missing
+if ( !jQuery.clean ) {
+        jQuery.clean = function( elems, context, fragment, scripts ) {
+                // Set context per 1.8 logic
</ins><span class="cx">                 context = context || document;
</span><span class="cx">                 context = !context.nodeType && context[0] || context;
</span><span class="cx">                 context = context.ownerDocument || context;
</span><span class="cx">
</span><del>-                fragment = context.createDocumentFragment();
-                jQuery.clean( args, context, fragment, scripts );
</del><ins>+                migrateWarn("jQuery.clean() is deprecated");
</ins><span class="cx">
</span><del>-                migrateWarn("jQuery.buildFragment() is deprecated");
-                return { fragment: fragment, cacheable: false };
</del><ins>+                var i, elem, handleScript, jsTags,
+                        ret = [];
+
+                jQuery.merge( ret, jQuery.buildFragment( elems, context ).childNodes );
+
+                // Complex logic lifted directly from jQuery 1.8
+                if ( fragment ) {
+                        // Special handling of each script element
+                        handleScript = function( elem ) {
+                                // Check if we consider it executable
+                                if ( !elem.type || rscriptType.test( elem.type ) ) {
+                                        // Detach the script and store it in the scripts array (if provided) or the fragment
+                                        // Return truthy to indicate that it has been handled
+                                        return scripts ?
+                                                scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) :
+                                                fragment.appendChild( elem );
+                                }
+                        };
+
+                        for ( i = 0; (elem = ret[i]) != null; i++ ) {
+                                // Check if we're done after handling an executable script
+                                if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) {
+                                        // Append to fragment and handle embedded scripts
+                                        fragment.appendChild( elem );
+                                        if ( typeof elem.getElementsByTagName !== "undefined" ) {
+                                                // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration
+                                                jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript );
+
+                                                // Splice the scripts into ret after their former ancestor and advance our index beyond them
+                                                ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
+                                                i += jsTags.length;
+                                        }
+                                }
+                        }
+                }
+
+                return ret;
+        };
+}
+
+jQuery.buildFragment = function( elems, context, scripts, selection ) {
+        var ret,
+                warning = "jQuery.buildFragment() is deprecated";
+
+        // Set context per 1.8 logic
+        context = context || document;
+        context = !context.nodeType && context[0] || context;
+        context = context.ownerDocument || context;
+
+        try {
+                ret = oldFragment.call( jQuery, elems, context, scripts, selection );
+
+        // jQuery < 1.8 required arrayish context; jQuery 1.9 fails on it
+        } catch( x ) {
+                ret = oldFragment.call( jQuery, elems, context.nodeType ? [ context ] : context[ 0 ], scripts, selection );
+
+                // Success from tweaking context means buildFragment was called by the user
+                migrateWarn( warning );
</ins><span class="cx">         }
</span><del>-        // Don't warn if we are in a version where buildFragment is used internally
-        return oldFragment.apply( this, arguments );
</del><ins>+
+        // jQuery < 1.9 returned an object instead of the fragment itself
+        if ( !ret.fragment ) {
+                migrateWarnProp( ret, "fragment", ret, warning );
+                migrateWarnProp( ret, "cacheable", false, warning );
+        }
+
+        return ret;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> var eventAdd = jQuery.event.add,
</span><span class="lines">@@ -303,6 +385,9 @@
</span><span class="cx">         jQuery.event.props.unshift( "attrChange", "attrName", "relatedNode", "srcElement" );
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+// Undocumented jQuery.event.handle was "deprecated" in jQuery 1.7
+migrateWarnProp( jQuery.event, "handle", jQuery.event.dispatch, "jQuery.event.handle is undocumented and deprecated" );
+
</ins><span class="cx"> // Support for 'hover' pseudo-event and ajax event warnings
</span><span class="cx"> jQuery.event.add = function( elem, types, handler, data, selector ){
</span><span class="cx">         if ( elem !== document && rajaxEvent.test( types ) ) {
</span><span class="lines">@@ -314,7 +399,7 @@
</span><span class="cx">         eventRemove.call( this, elem, hoverHack( types ) || "", handler, selector, mappedTypes );
</span><span class="cx"> };
</span><span class="cx">
</span><del>-jQuery.fn.error = function( data, fn ) {
</del><ins>+jQuery.fn.error = function() {
</ins><span class="cx">         var args = Array.prototype.slice.call( arguments, 0);
</span><span class="cx">         migrateWarn("jQuery.fn.error() is deprecated");
</span><span class="cx">         args.splice( 0, 0, "error" );
</span><span class="lines">@@ -387,25 +472,25 @@
</span><span class="cx"> jQuery.each( ajaxEvents.split("|"),
</span><span class="cx">         function( _, name ) {
</span><span class="cx">                 jQuery.event.special[ name ] = {
</span><del>-                        setup: function( data ) {
</del><ins>+                        setup: function() {
</ins><span class="cx">                                 var elem = this;
</span><span class="cx">
</span><span class="cx">                                 // The document needs no shimming; must be !== for oldIE
</span><span class="cx">                                 if ( elem !== document ) {
</span><del>-                                        jQuery.event.add( document, name + "." + jQuery.guid, function( event ) {
</del><ins>+                                        jQuery.event.add( document, name + "." + jQuery.guid, function() {
</ins><span class="cx">                                                 jQuery.event.trigger( name, null, elem, true );
</span><span class="cx">                                         });
</span><span class="cx">                                         jQuery._data( this, name, jQuery.guid++ );
</span><span class="cx">                                 }
</span><span class="cx">                                 return false;
</span><span class="cx">                         },
</span><del>-                        teardown: function( data, handleObj ) {
</del><ins>+                        teardown: function() {
</ins><span class="cx">                                 if ( this !== document ) {
</span><span class="cx">                                         jQuery.event.remove( document, name + "." + jQuery._data( this, name ) );
</span><span class="cx">                                 }
</span><span class="cx">                                 return false;
</span><span class="cx">                         }
</span><del>-                }
</del><ins>+                };
</ins><span class="cx">         }
</span><span class="cx"> );
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpincludesjsjqueryjqueryjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/jquery/jquery.js (23300 => 23301)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/jquery/jquery.js        2013-01-15 17:32:35 UTC (rev 23300)
+++ trunk/wp-includes/js/jquery/jquery.js        2013-01-15 17:52:42 UTC (rev 23301)
</span><span class="lines">@@ -1,15 +1,15 @@
</span><span class="cx"> /*!
</span><del>- * jQuery JavaScript Library v1.9.0b1
</del><ins>+ * jQuery JavaScript Library v1.9.0
</ins><span class="cx"> * http://jquery.com/
</span><span class="cx"> *
</span><span class="cx"> * Includes Sizzle.js
</span><span class="cx"> * http://sizzlejs.com/
</span><span class="cx"> *
</span><del>- * Copyright 2012 jQuery Foundation and other contributors
</del><ins>+ * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
</ins><span class="cx"> * Released under the MIT license
</span><span class="cx"> * http://jquery.org/license
</span><span class="cx"> *
</span><del>- * Date: 2012-12-16
</del><ins>+ * Date: 2013-1-14
</ins><span class="cx"> */
</span><span class="cx"> (function( window, undefined ) {
</span><span class="cx"> "use strict";
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx">         // List of deleted data cache ids, so we can reuse them
</span><span class="cx">         core_deletedIds = [],
</span><span class="cx">
</span><del>-        core_version = "1.9.0b1",
</del><ins>+        core_version = "1.9.0",
</ins><span class="cx">
</span><span class="cx">         // Save a reference to some core methods
</span><span class="cx">         core_concat = core_deletedIds.concat,
</span><span class="lines">@@ -111,13 +111,6 @@
</span><span class="cx">                         return this;
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                // HANDLE: $(DOMElement)
-                if ( selector.nodeType ) {
-                        this.context = this[0] = selector;
-                        this.length = 1;
-                        return this;
-                }
-
</del><span class="cx">                 // Handle HTML strings
</span><span class="cx">                 if ( typeof selector === "string" ) {
</span><span class="cx">                         if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
</span><span class="lines">@@ -191,6 +184,12 @@
</span><span class="cx">                                 return this.constructor( context ).find( selector );
</span><span class="cx">                         }
</span><span class="cx">
</span><ins>+                // HANDLE: $(DOMElement)
+                } else if ( selector.nodeType ) {
+                        this.context = this[0] = selector;
+                        this.length = 1;
+                        return this;
+
</ins><span class="cx">                 // HANDLE: $(function)
</span><span class="cx">                 // Shortcut for document ready
</span><span class="cx">                 } else if ( jQuery.isFunction( selector ) ) {
</span><span class="lines">@@ -442,9 +441,12 @@
</span><span class="cx">         },
</span><span class="cx">
</span><span class="cx">         type: function( obj ) {
</span><del>-                return obj == null ?
-                        String( obj ) :
-                        class2type[ core_toString.call(obj) ] || "object";
</del><ins>+                if ( obj == null ) {
+                        return String( obj );
+                }
+                return typeof obj === "object" || typeof obj === "function" ?
+                        class2type[ core_toString.call(obj) ] || "object" :
+                        typeof obj;
</ins><span class="cx">         },
</span><span class="cx">
</span><span class="cx">         isPlainObject: function( obj ) {
</span><span class="lines">@@ -509,8 +511,7 @@
</span><span class="cx">                         return [ context.createElement( parsed[1] ) ];
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                parsed = context.createDocumentFragment();
-                jQuery.clean( [ data ], context, parsed, scripts );
</del><ins>+                parsed = jQuery.buildFragment( [ data ], context, scripts );
</ins><span class="cx">                 if ( scripts ) {
</span><span class="cx">                         jQuery( scripts ).remove();
</span><span class="cx">                 }
</span><span class="lines">@@ -1164,22 +1165,19 @@
</span><span class="cx">                                         return jQuery.Deferred(function( newDefer ) {
</span><span class="cx">                                                 jQuery.each( tuples, function( i, tuple ) {
</span><span class="cx">                                                         var action = tuple[ 0 ],
</span><del>-                                                                fn = fns[ i ];
</del><ins>+                                                                fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
</ins><span class="cx">                                                         // deferred[ done | fail | progress ] for forwarding actions to newDefer
</span><del>-                                                        deferred[ tuple[1] ]( jQuery.isFunction( fn ) ?
-                                                                function() {
-                                                                        var returned = fn.apply( this, arguments );
-                                                                        if ( returned && jQuery.isFunction( returned.promise ) ) {
-                                                                                returned.promise()
-                                                                                        .done( newDefer.resolve )
-                                                                                        .fail( newDefer.reject )
-                                                                                        .progress( newDefer.notify );
-                                                                        } else {
-                                                                                newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, [ returned ] );
-                                                                        }
-                                                                } :
-                                                                newDefer[ action ]
-                                                        );
</del><ins>+                                                        deferred[ tuple[1] ](function() {
+                                                                var returned = fn && fn.apply( this, arguments );
+                                                                if ( returned && jQuery.isFunction( returned.promise ) ) {
+                                                                        returned.promise()
+                                                                                .done( newDefer.resolve )
+                                                                                .fail( newDefer.reject )
+                                                                                .progress( newDefer.notify );
+                                                                } else {
+                                                                        newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
+                                                                }
+                                                        });
</ins><span class="cx">                                                 });
</span><span class="cx">                                                 fns = null;
</span><span class="cx">                                         }).promise();
</span><span class="lines">@@ -1215,7 +1213,7 @@
</span><span class="cx">
</span><span class="cx">                         // deferred[ resolve | reject | notify ]
</span><span class="cx">                         deferred[ tuple[0] ] = function() {
</span><del>-                                deferred[ tuple[0] + "With" ]( promise, arguments );
</del><ins>+                                deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
</ins><span class="cx">                                 return this;
</span><span class="cx">                         };
</span><span class="cx">                         deferred[ tuple[0] + "With" ] = list.fireWith;
</span><span class="lines">@@ -1287,17 +1285,7 @@
</span><span class="cx"> });
</span><span class="cx"> jQuery.support = (function() {
</span><span class="cx">
</span><del>-        var support,
-                all,
-                a,
-                select,
-                opt,
-                input,
-                fragment,
-                eventName,
-                i,
-                isSupported,
-                clickFn,
</del><ins>+        var support, all, a, select, opt, input, fragment, eventName, isSupported, i,
</ins><span class="cx">                 div = document.createElement("div");
</span><span class="cx">
</span><span class="cx">         // Setup
</span><span class="lines">@@ -1367,9 +1355,6 @@
</span><span class="cx">                 boxModel: document.compatMode === "CSS1Compat",
</span><span class="cx">
</span><span class="cx">                 // Will be defined later
</span><del>-                submitBubbles: true,
-                changeBubbles: true,
-                focusinBubbles: false,
</del><span class="cx">                 deleteExpando: true,
</span><span class="cx">                 noCloneEvent: true,
</span><span class="cx">                 inlineBlockNeedsLayout: false,
</span><span class="lines">@@ -1388,24 +1373,13 @@
</span><span class="cx">         select.disabled = true;
</span><span class="cx">         support.optDisabled = !opt.disabled;
</span><span class="cx">
</span><del>-        // Test to see if it's possible to delete an expando from an element
-        // Fails in Internet Explorer
</del><ins>+        // Support: IE<9
</ins><span class="cx">         try {
</span><span class="cx">                 delete div.test;
</span><span class="cx">         } catch( e ) {
</span><span class="cx">                 support.deleteExpando = false;
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
-                div.attachEvent( "onclick", clickFn = function() {
-                        // Cloning a node shouldn't copy over any
-                        // bound event handlers (IE does this)
-                        support.noCloneEvent = false;
-                });
-                div.cloneNode( true ).fireEvent("onclick");
-                div.detachEvent( "onclick", clickFn );
-        }
-
</del><span class="cx">         // Check if we can trust getAttribute("value")
</span><span class="cx">         input = document.createElement("input");
</span><span class="cx">         input.setAttribute( "value", "" );
</span><span class="lines">@@ -1417,49 +1391,46 @@
</span><span class="cx">         support.radioValue = input.value === "t";
</span><span class="cx">
</span><span class="cx">         // #11217 - WebKit loses check when the name is after the checked attribute
</span><del>-        input.setAttribute( "checked", "checked" );
</del><ins>+        input.setAttribute( "checked", "t" );
</ins><span class="cx">         input.setAttribute( "name", "t" );
</span><span class="cx">
</span><del>-        div.appendChild( input );
</del><span class="cx">         fragment = document.createDocumentFragment();
</span><del>-        fragment.appendChild( div.lastChild );
</del><ins>+        fragment.appendChild( input );
</ins><span class="cx">
</span><del>-        // WebKit doesn't clone checked state correctly in fragments
-        support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
-
</del><span class="cx">         // Check if a disconnected checkbox will retain its checked
</span><span class="cx">         // value of true after appended to the DOM (IE6/7)
</span><span class="cx">         support.appendChecked = input.checked;
</span><span class="cx">
</span><del>-        fragment.removeChild( input );
-        fragment.appendChild( div );
</del><ins>+        // WebKit doesn't clone checked state correctly in fragments
+        support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
</ins><span class="cx">
</span><del>-        // Technique from Juriy Zaytsev
-        // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
-        // We only care about the case where non-standard event systems
-        // are used, namely in IE. Short-circuiting here helps us to
-        // avoid an eval call (in setAttribute) which can cause CSP
-        // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
</del><ins>+        // Support: IE<9
+        // Opera does not clone events (and typeof div.attachEvent === undefined).
+        // IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
</ins><span class="cx">         if ( div.attachEvent ) {
</span><del>-                for ( i in {
-                        submit: true,
-                        change: true,
-                        focusin: true
-                }) {
-                        eventName = "on" + i;
-                        isSupported = ( eventName in div );
-                        if ( !isSupported ) {
-                                div.setAttribute( eventName, "return;" );
-                                isSupported = ( typeof div[ eventName ] === "function" );
-                        }
-                        support[ i + "Bubbles" ] = isSupported;
-                }
</del><ins>+                div.attachEvent( "onclick", function() {
+                        support.noCloneEvent = false;
+                });
+
+                div.cloneNode( true ).click();
</ins><span class="cx">         }
</span><span class="cx">
</span><ins>+        // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)
+        // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php
+        for ( i in { submit: true, change: true, focusin: true }) {
+                div.setAttribute( eventName = "on" + i, "t" );
+
+                support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false;
+        }
+
+        div.style.backgroundClip = "content-box";
+        div.cloneNode( true ).style.backgroundClip = "";
+        support.clearCloneStyle = div.style.backgroundClip === "content-box";
+
</ins><span class="cx">         // Run tests that need a body at doc ready
</span><span class="cx">         jQuery(function() {
</span><del>-                var container, div, tds, marginDiv,
-                        divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
</del><ins>+                var container, marginDiv, tds,
+                        divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
</ins><span class="cx">                         body = document.getElementsByTagName("body")[0];
</span><span class="cx">
</span><span class="cx">                 if ( !body ) {
</span><span class="lines">@@ -1468,20 +1439,17 @@
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 container = document.createElement("div");
</span><del>-                container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px";
-                body.insertBefore( container, body.firstChild );
</del><ins>+                container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
</ins><span class="cx">
</span><del>-                // Construct the test element
-                div = document.createElement("div");
-                container.appendChild( div );
</del><ins>+                body.appendChild( container ).appendChild( div );
</ins><span class="cx">
</span><ins>+                // Support: IE8
</ins><span class="cx">                 // Check if table cells still have offsetWidth/Height when they are set
</span><span class="cx">                 // to display:none and there are still other visible table cells in a
</span><span class="cx">                 // table row; if so, offsetWidth/Height are not reliable for use when
</span><span class="cx">                 // determining if an element has been hidden directly using
</span><span class="cx">                 // display:none (it is still safe to use offsets if a parent element is
</span><span class="cx">                 // hidden; don safety goggles and see bug #4512 for more information).
</span><del>-                // (only IE 8 fails this test)
</del><span class="cx">                 div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
</span><span class="cx">                 tds = div.getElementsByTagName("td");
</span><span class="cx">                 tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
</span><span class="lines">@@ -1490,8 +1458,8 @@
</span><span class="cx">                 tds[ 0 ].style.display = "";
</span><span class="cx">                 tds[ 1 ].style.display = "none";
</span><span class="cx">
</span><ins>+                // Support: IE8
</ins><span class="cx">                 // Check if empty table cells still have offsetWidth/Height
</span><del>-                // (IE <= 8 fail this test)
</del><span class="cx">                 support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
</span><span class="cx">
</span><span class="cx">                 // Check box-sizing and margin behavior
</span><span class="lines">@@ -1500,39 +1468,36 @@
</span><span class="cx">                 support.boxSizing = ( div.offsetWidth === 4 );
</span><span class="cx">                 support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
</span><span class="cx">
</span><del>-                // NOTE: To any future maintainer, we've window.getComputedStyle
-                // because jsdom on node.js will break without it.
</del><ins>+                // Use window.getComputedStyle because jsdom on node.js will break without it.
</ins><span class="cx">                 if ( window.getComputedStyle ) {
</span><span class="cx">                         support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
</span><span class="cx">                         support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
</span><span class="cx">
</span><span class="cx">                         // Check if div with explicit width and no margin-right incorrectly
</span><del>-                        // gets computed margin-right based on width of container. For more
-                        // info see bug #3333
</del><ins>+                        // gets computed margin-right based on width of container. (#3333)
</ins><span class="cx">                         // Fails in WebKit before Feb 2011 nightlies
</span><span class="cx">                         // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
</span><del>-                        marginDiv = document.createElement("div");
</del><ins>+                        marginDiv = div.appendChild( document.createElement("div") );
</ins><span class="cx">                         marginDiv.style.cssText = div.style.cssText = divReset;
</span><span class="cx">                         marginDiv.style.marginRight = marginDiv.style.width = "0";
</span><span class="cx">                         div.style.width = "1px";
</span><del>-                        div.appendChild( marginDiv );
</del><ins>+
</ins><span class="cx">                         support.reliableMarginRight =
</span><span class="cx">                                 !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 if ( typeof div.style.zoom !== "undefined" ) {
</span><ins>+                        // Support: IE<8
</ins><span class="cx">                         // Check if natively block-level elements act like inline-block
</span><span class="cx">                         // elements when setting their display to 'inline' and giving
</span><span class="cx">                         // them layout
</span><del>-                        // (IE < 8 does this)
</del><span class="cx">                         div.innerHTML = "";
</span><span class="cx">                         div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
</span><span class="cx">                         support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
</span><span class="cx">
</span><ins>+                        // Support: IE6
</ins><span class="cx">                         // Check if elements with layout shrink-wrap their children
</span><del>-                        // (IE 6 does this)
</del><span class="cx">                         div.style.display = "block";
</span><del>-                        div.style.overflow = "visible";
</del><span class="cx">                         div.innerHTML = "<div></div>";
</span><span class="cx">                         div.firstChild.style.width = "5px";
</span><span class="cx">                         support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
</span><span class="lines">@@ -1542,20 +1507,21 @@
</span><span class="cx">                         body.style.zoom = 1;
</span><span class="cx">                 }
</span><span class="cx">
</span><ins>+                body.removeChild( container );
+
</ins><span class="cx">                 // Null elements to avoid leaks in IE
</span><del>-                body.removeChild( container );
</del><span class="cx">                 container = div = tds = marginDiv = null;
</span><span class="cx">         });
</span><span class="cx">
</span><span class="cx">         // Null elements to avoid leaks in IE
</span><del>-        fragment.removeChild( div );
-        all = a = select = opt = input = fragment = div = null;
</del><ins>+        all = select = fragment = opt = a = input = null;
</ins><span class="cx">
</span><span class="cx">         return support;
</span><span class="cx"> })();
</span><ins>+
</ins><span class="cx"> var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
</span><span class="cx">         rmultiDash = /([A-Z])/g;
</span><del>-
</del><ins>+        
</ins><span class="cx"> function internalData( elem, name, data, pvt /* Internal Use Only */ ){
</span><span class="cx">         if ( !jQuery.acceptData( elem ) ) {
</span><span class="cx">                 return;
</span><span class="lines">@@ -1771,7 +1737,7 @@
</span><span class="cx">         _data: function( elem, name, data ) {
</span><span class="cx">                 return internalData( elem, name, data, true );
</span><span class="cx">         },
</span><del>-
</del><ins>+        
</ins><span class="cx">         _removeData: function( elem, name ) {
</span><span class="cx">                 return internalRemoveData( elem, name, true );
</span><span class="cx">         },
</span><span class="lines">@@ -1926,6 +1892,7 @@
</span><span class="cx">                         startLength--;
</span><span class="cx">                 }
</span><span class="cx">
</span><ins>+                hooks.cur = fn;
</ins><span class="cx">                 if ( fn ) {
</span><span class="cx">
</span><span class="cx">                         // Add a progress sentinel to prevent the fx queue from being
</span><span class="lines">@@ -2367,7 +2334,11 @@
</span><span class="cx">
</span><span class="cx">                 } else {
</span><span class="cx">
</span><del>-                        ret = elem.getAttribute( name );
</del><ins>+                        // In IE9+, Flash objects don't have .getAttribute (#12945)
+                        // Support: IE9+
+                        if ( typeof elem.getAttribute !== "undefined" ) {
+                                ret = elem.getAttribute( name );
+                        }
</ins><span class="cx">
</span><span class="cx">                         // Non-existent attributes return null, we normalize to undefined
</span><span class="cx">                         return ret == null ?
</span><span class="lines">@@ -2637,8 +2608,9 @@
</span><span class="cx">         jQuery.attrHooks.style = {
</span><span class="cx">                 get: function( elem ) {
</span><span class="cx">                         // Return undefined in the case of empty string
</span><del>-                        // Normalize to lowercase since IE uppercases css property names
-                        return elem.style.cssText.toLowerCase() || undefined;
</del><ins>+                        // Note: IE uppercases css property names, but if we were to .toLowerCase()
+                        // .cssText, that would destroy case senstitivity in URL's, like in "background"
+                        return elem.style.cssText || undefined;
</ins><span class="cx">                 },
</span><span class="cx">                 set: function( elem, value ) {
</span><span class="cx">                         return ( elem.style.cssText = value + "" );
</span><span class="lines">@@ -2697,20 +2669,31 @@
</span><span class="cx">         rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
</span><span class="cx">         rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
</span><span class="cx">
</span><ins>+function returnTrue() {
+        return true;
+}
+
+function returnFalse() {
+        return false;
+}
+
</ins><span class="cx"> /*
</span><span class="cx"> * Helper functions for managing events -- not part of the public interface.
</span><span class="cx"> * Props to Dean Edwards' addEvent library for many of the ideas.
</span><span class="cx"> */
</span><span class="cx"> jQuery.event = {
</span><span class="cx">
</span><ins>+        global: {},
+
</ins><span class="cx">         add: function( elem, types, handler, data, selector ) {
</span><del>-                var elemData, eventHandle, events,
-                        tns, type, namespaces, handleObj,
-                        handleObjIn, handlers, special,
-                        t = 0;
</del><span class="cx">
</span><del>-                // Don't attach events to noData or text/comment nodes (allow plain objects tho)
-                if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
</del><ins>+                var handleObjIn, eventHandle, tmp,
+                        events, t, handleObj,
+                        special, handlers, type, namespaces, origType,
+                        // Don't attach events to noData or text/comment nodes (but allow plain objects)
+                        elemData = elem.nodeType !== 3 && elem.nodeType !== 8 && jQuery._data( elem );
+
+                if ( !elemData ) {
</ins><span class="cx">                         return;
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -2727,13 +2710,11 @@
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 // Init the element's event structure and main handler, if this is the first
</span><del>-                events = elemData.events;
-                if ( !events ) {
-                        elemData.events = events = {};
</del><ins>+                if ( !(events = elemData.events) ) {
+                        events = elemData.events = {};
</ins><span class="cx">                 }
</span><del>-                eventHandle = elemData.handle;
-                if ( !eventHandle ) {
-                        elemData.handle = eventHandle = function( e ) {
</del><ins>+                if ( !(eventHandle = elemData.handle) ) {
+                        eventHandle = elemData.handle = function( e ) {
</ins><span class="cx">                                 // Discard the second event of a jQuery.event.trigger() and
</span><span class="cx">                                 // when an event is called after a page has unloaded
</span><span class="cx">                                 return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
</span><span class="lines">@@ -2747,12 +2728,12 @@
</span><span class="cx">                 // Handle multiple events separated by a space
</span><span class="cx">                 // jQuery(...).bind("mouseover mouseout", fn);
</span><span class="cx">                 types = ( types || "" ).match( core_rnotwhite ) || [""];
</span><del>-                for ( ; t < types.length; t++ ) {
</del><ins>+                t = types.length;
+                while ( t-- ) {
+                        tmp = rtypenamespace.exec( types[t] ) || [];
+                        type = origType = tmp[1];
+                        namespaces = ( tmp[2] || "" ).split( "." ).sort();
</ins><span class="cx">
</span><del>-                        tns = rtypenamespace.exec( types[t] ) || [];
-                        type = tns[1];
-                        namespaces = ( tns[2] || "" ).split( "." ).sort();
-
</del><span class="cx">                         // If event changes its type, use the special event handlers for the changed type
</span><span class="cx">                         special = jQuery.event.special[ type ] || {};
</span><span class="cx">
</span><span class="lines">@@ -2765,7 +2746,7 @@
</span><span class="cx">                         // handleObj is passed to all event handlers
</span><span class="cx">                         handleObj = jQuery.extend({
</span><span class="cx">                                 type: type,
</span><del>-                                origType: tns[1],
</del><ins>+                                origType: origType,
</ins><span class="cx">                                 data: data,
</span><span class="cx">                                 handler: handler,
</span><span class="cx">                                 guid: handler.guid,
</span><span class="lines">@@ -2775,8 +2756,7 @@
</span><span class="cx">                         }, handleObjIn );
</span><span class="cx">
</span><span class="cx">                         // Init the event handler queue if we're the first
</span><del>-                        handlers = events[ type ];
-                        if ( !handlers ) {
</del><ins>+                        if ( !(handlers = events[ type ]) ) {
</ins><span class="cx">                                 handlers = events[ type ] = [];
</span><span class="cx">                                 handlers.delegateCount = 0;
</span><span class="cx">
</span><span class="lines">@@ -2815,14 +2795,12 @@
</span><span class="cx">                 elem = null;
</span><span class="cx">         },
</span><span class="cx">
</span><del>-        global: {},
-
</del><span class="cx">         // Detach an event or set of events from an element
</span><span class="cx">         remove: function( elem, types, handler, selector, mappedTypes ) {
</span><span class="cx">
</span><del>-                var tns, type, origType, namespaces, origCount,
-                        j, events, special, eventType, handleObj,
-                        t = 0,
</del><ins>+                var j, origCount, tmp,
+                        events, t, handleObj,
+                        special, handlers, type, namespaces, origType,
</ins><span class="cx">                         elemData = jQuery.hasData( elem ) && jQuery._data( elem );
</span><span class="cx">
</span><span class="cx">                 if ( !elemData || !(events = elemData.events) ) {
</span><span class="lines">@@ -2831,10 +2809,11 @@
</span><span class="cx">
</span><span class="cx">                 // Once for each type.namespace in types; type may be omitted
</span><span class="cx">                 types = ( types || "" ).match( core_rnotwhite ) || [""];
</span><del>-                for ( ; t < types.length; t++ ) {
-                        tns = rtypenamespace.exec( types[t] ) || [];
-                        type = origType = tns[1];
-                        namespaces = tns[2];
</del><ins>+                t = types.length;
+                while ( t-- ) {
+                        tmp = rtypenamespace.exec( types[t] ) || [];
+                        type = origType = tmp[1];
+                        namespaces = ( tmp[2] || "" ).split( "." ).sort();
</ins><span class="cx">
</span><span class="cx">                         // Unbind all events (on this namespace, if provided) for the element
</span><span class="cx">                         if ( !type ) {
</span><span class="lines">@@ -2845,23 +2824,23 @@
</span><span class="cx">                         }
</span><span class="cx">
</span><span class="cx">                         special = jQuery.event.special[ type ] || {};
</span><del>-                        type = ( selector? special.delegateType : special.bindType ) || type;
-                        eventType = events[ type ] || [];
-                        origCount = eventType.length;
-                        namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
</del><ins>+                        type = ( selector ? special.delegateType : special.bindType ) || type;
+                        handlers = events[ type ] || [];
+                        tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
</ins><span class="cx">
</span><span class="cx">                         // Remove matching events
</span><del>-                        for ( j = 0; j < eventType.length; j++ ) {
-                                handleObj = eventType[ j ];
</del><ins>+                        origCount = j = handlers.length;
+                        while ( j-- ) {
+                                handleObj = handlers[ j ];
</ins><span class="cx">
</span><span class="cx">                                 if ( ( mappedTypes || origType === handleObj.origType ) &&
</span><span class="cx">                                         ( !handler || handler.guid === handleObj.guid ) &&
</span><del>-                                        ( !namespaces || namespaces.test( handleObj.namespace ) ) &&
</del><ins>+                                        ( !tmp || tmp.test( handleObj.namespace ) ) &&
</ins><span class="cx">                                         ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
</span><del>-                                        eventType.splice( j--, 1 );
</del><ins>+                                        handlers.splice( j, 1 );
</ins><span class="cx">
</span><span class="cx">                                         if ( handleObj.selector ) {
</span><del>-                                                eventType.delegateCount--;
</del><ins>+                                                handlers.delegateCount--;
</ins><span class="cx">                                         }
</span><span class="cx">                                         if ( special.remove ) {
</span><span class="cx">                                                 special.remove.call( elem, handleObj );
</span><span class="lines">@@ -2871,7 +2850,7 @@
</span><span class="cx">
</span><span class="cx">                         // Remove generic event handler if we removed something and no more handlers exist
</span><span class="cx">                         // (avoids potential for endless recursion during removal of special event handlers)
</span><del>-                        if ( eventType.length === 0 && origCount !== eventType.length ) {
</del><ins>+                        if ( origCount && !handlers.length ) {
</ins><span class="cx">                                 if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
</span><span class="cx">                                         jQuery.removeEvent( elem, type, elemData.handle );
</span><span class="cx">                                 }
</span><span class="lines">@@ -2892,11 +2871,12 @@
</span><span class="cx">
</span><span class="cx">         trigger: function( event, data, elem, onlyHandlers ) {
</span><span class="cx">
</span><del>-                var i, cur, old, ontype, special, handle, eventPath, bubbleType,
</del><ins>+                var i, cur, tmp, bubbleType, ontype, handle, special,
+                        eventPath = [ elem || document ],
</ins><span class="cx">                         type = event.type || event,
</span><span class="cx">                         namespaces = event.namespace ? event.namespace.split(".") : [];
</span><span class="cx">
</span><del>-                elem = elem || document;
</del><ins>+                cur = tmp = elem = elem || document;
</ins><span class="cx">
</span><span class="cx">                 // Don't do events on text and comment nodes
</span><span class="cx">                 if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
</span><span class="lines">@@ -2914,21 +2894,18 @@
</span><span class="cx">                         type = namespaces.shift();
</span><span class="cx">                         namespaces.sort();
</span><span class="cx">                 }
</span><ins>+                ontype = type.indexOf(":") < 0 && "on" + type;
</ins><span class="cx">
</span><del>-                // Caller can pass in an Event, Object, or just an event type string
-                event = typeof event === "object" ?
-                        // jQuery.Event object
-                        event[ jQuery.expando ] ? event :
-                        // Object literal
-                        new jQuery.Event( type, event ) :
-                        // Just the event type (string)
-                        new jQuery.Event( type );
</del><ins>+                // Caller can pass in a jQuery.Event object, Object, or just an event type string
+                event = event[ jQuery.expando ] ?
+                        event :
+                        new jQuery.Event( type, typeof event === "object" && event );
</ins><span class="cx">
</span><del>-                event.type = type;
</del><span class="cx">                 event.isTrigger = true;
</span><span class="cx">                 event.namespace = namespaces.join(".");
</span><del>-                event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
-                ontype = type.indexOf(":") < 0 ? "on" + type : "";
</del><ins>+                event.namespace_re = event.namespace ?
+                        new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
+                        null;
</ins><span class="cx">
</span><span class="cx">                 // Clean up the event in case it is being reused
</span><span class="cx">                 event.result = undefined;
</span><span class="lines">@@ -2937,8 +2914,9 @@
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 // Clone any incoming data and prepend the event, creating the handler arg list
</span><del>-                data = data != null ? jQuery.makeArray( data ) : [];
-                data.unshift( event );
</del><ins>+                data = data == null ?
+                        [ event ] :
+                        jQuery.makeArray( data, [ event ] );
</ins><span class="cx">
</span><span class="cx">                 // Allow special events to draw outside the lines
</span><span class="cx">                 special = jQuery.event.special[ type ] || {};
</span><span class="lines">@@ -2948,33 +2926,38 @@
</span><span class="cx">
</span><span class="cx">                 // Determine event propagation path in advance, per W3C events spec (#9951)
</span><span class="cx">                 // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
</span><del>-                eventPath = [[ elem, special.bindType || type ]];
</del><span class="cx">                 if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
</span><span class="cx">
</span><span class="cx">                         bubbleType = special.delegateType || type;
</span><del>-                        cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode;
-                        for ( old = elem; cur; cur = cur.parentNode ) {
-                                eventPath.push([ cur, bubbleType ]);
-                                old = cur;
</del><ins>+                        if ( !rfocusMorph.test( bubbleType + type ) ) {
+                                cur = cur.parentNode;
</ins><span class="cx">                         }
</span><ins>+                        for ( ; cur; cur = cur.parentNode ) {
+                                eventPath.push( cur );
+                                tmp = cur;
+                        }
</ins><span class="cx">
</span><span class="cx">                         // Only add window if we got to document (e.g., not plain obj or detached DOM)
</span><del>-                        if ( old === (elem.ownerDocument || document) ) {
-                                eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]);
</del><ins>+                        if ( tmp === (elem.ownerDocument || document) ) {
+                                eventPath.push( tmp.defaultView || tmp.parentWindow || window );
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 // Fire handlers on the event path
</span><del>-                for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) {
</del><ins>+                i = 0;
+                while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
</ins><span class="cx">
</span><del>-                        cur = eventPath[i][0];
-                        event.type = eventPath[i][1];
</del><ins>+                        event.type = i > 1 ?
+                                bubbleType :
+                                special.bindType || type;
</ins><span class="cx">
</span><ins>+                        // jQuery handler
</ins><span class="cx">                         handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
</span><span class="cx">                         if ( handle ) {
</span><span class="cx">                                 handle.apply( cur, data );
</span><span class="cx">                         }
</span><del>-                        // Note that this is a bare JS function and not a jQuery handler
</del><ins>+
+                        // Native handler
</ins><span class="cx">                         handle = ontype && cur[ ontype ];
</span><span class="cx">                         if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
</span><span class="cx">                                 event.preventDefault();
</span><span class="lines">@@ -2994,9 +2977,9 @@
</span><span class="cx">                                 if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
</span><span class="cx">
</span><span class="cx">                                         // Don't re-trigger an onFOO event when we call its FOO() method
</span><del>-                                        old = elem[ ontype ];
</del><ins>+                                        tmp = elem[ ontype ];
</ins><span class="cx">
</span><del>-                                        if ( old ) {
</del><ins>+                                        if ( tmp ) {
</ins><span class="cx">                                                 elem[ ontype ] = null;
</span><span class="cx">                                         }
</span><span class="cx">
</span><span class="lines">@@ -3010,8 +2993,8 @@
</span><span class="cx">                                         }
</span><span class="cx">                                         jQuery.event.triggered = undefined;
</span><span class="cx">
</span><del>-                                        if ( old ) {
-                                                elem[ ontype ] = old;
</del><ins>+                                        if ( tmp ) {
+                                                elem[ ontype ] = tmp;
</ins><span class="cx">                                         }
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="lines">@@ -3025,12 +3008,11 @@
</span><span class="cx">                 // Make a writable jQuery.Event from the native event object
</span><span class="cx">                 event = jQuery.event.fix( event );
</span><span class="cx">
</span><del>-                var i, j, cur, ret, selMatch, matched, matches, handleObj, sel,
-                        handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
-                        delegateCount = handlers.delegateCount,
</del><ins>+                var i, j, ret, matched, handleObj,
+                        handlerQueue = [],
</ins><span class="cx">                         args = core_slice.call( arguments ),
</span><del>-                        special = jQuery.event.special[ event.type ] || {},
-                        handlerQueue = [];
</del><ins>+                        handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
+                        special = jQuery.event.special[ event.type ] || {};
</ins><span class="cx">
</span><span class="cx">                 // Use the fix-ed jQuery.Event rather than the (read-only) native event
</span><span class="cx">                 args[0] = event;
</span><span class="lines">@@ -3041,76 +3023,127 @@
</span><span class="cx">                         return;
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                // Determine handlers that should run if there are delegated events
</del><ins>+                // Determine handlers
+                handlerQueue = jQuery.event.handlers.call( this, event, handlers );
+
+                // Run delegates first; they may want to stop propagation beneath us
+                i = 0;
+                while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
+                        event.currentTarget = matched.elem;
+
+                        j = 0;
+                        while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
+
+                                // Triggered event must either 1) have no namespace, or
+                                // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
+                                if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
+
+                                        event.handleObj = handleObj;
+                                        event.data = handleObj.data;
+
+                                        ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+                                                        .apply( matched.elem, args );
+
+                                        if ( ret !== undefined ) {
+                                                if ( (event.result = ret) === false ) {
+                                                        event.preventDefault();
+                                                        event.stopPropagation();
+                                                }
+                                        }
+                                }
+                        }
+                }
+
+                // Call the postDispatch hook for the mapped type
+                if ( special.postDispatch ) {
+                        special.postDispatch.call( this, event );
+                }
+
+                return event.result;
+        },
+
+        handlers: function( event, handlers ) {
+                var i, matches, sel, handleObj,
+                        handlerQueue = [],
+                        delegateCount = handlers.delegateCount,
+                        cur = event.target;
+
+                // Find delegate handlers
+                // Black-hole SVG <use> instance trees (#13180)
</ins><span class="cx">                 // Avoid non-left-click bubbling in Firefox (#3861)
</span><del>-                if ( delegateCount && !(event.button && event.type === "click") ) {
</del><ins>+                if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
</ins><span class="cx">
</span><del>-                        for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {
</del><ins>+                        for ( ; cur != this; cur = cur.parentNode || this ) {
</ins><span class="cx">
</span><del>-                                // Don't process clicks (ONLY) on disabled elements (#6911, #8165, #11382, #11764)
</del><ins>+                                // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
</ins><span class="cx">                                 if ( cur.disabled !== true || event.type !== "click" ) {
</span><del>-                                        selMatch = {};
</del><span class="cx">                                         matches = [];
</span><span class="cx">                                         for ( i = 0; i < delegateCount; i++ ) {
</span><span class="cx">                                                 handleObj = handlers[ i ];
</span><del>-                                                sel = handleObj.selector;
</del><span class="cx">
</span><del>-                                                if ( selMatch[ sel ] === undefined ) {
-                                                        selMatch[ sel ] = handleObj.needsContext ?
</del><ins>+                                                // Don't conflict with Object.prototype properties (#13203)
+                                                sel = handleObj.selector + " ";
+
+                                                if ( matches[ sel ] === undefined ) {
+                                                        matches[ sel ] = handleObj.needsContext ?
</ins><span class="cx">                                                                 jQuery( sel, this ).index( cur ) >= 0 :
</span><span class="cx">                                                                 jQuery.find( sel, this, null, [ cur ] ).length;
</span><span class="cx">                                                 }
</span><del>-                                                if ( selMatch[ sel ] ) {
</del><ins>+                                                if ( matches[ sel ] ) {
</ins><span class="cx">                                                         matches.push( handleObj );
</span><span class="cx">                                                 }
</span><span class="cx">                                         }
</span><span class="cx">                                         if ( matches.length ) {
</span><del>-                                                handlerQueue.push({ elem: cur, matches: matches });
</del><ins>+                                                handlerQueue.push({ elem: cur, handlers: matches });
</ins><span class="cx">                                         }
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 // Add the remaining (directly-bound) handlers
</span><del>-                if ( handlers.length > delegateCount ) {
-                        handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) });
</del><ins>+                if ( delegateCount < handlers.length ) {
+                        handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
</ins><span class="cx">                 }
</span><span class="cx">
</span><del>-                // Run delegates first; they may want to stop propagation beneath us
-                for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) {
-                        matched = handlerQueue[ i ];
-                        event.currentTarget = matched.elem;
</del><ins>+                return handlerQueue;
+        },
</ins><span class="cx">
</span><del>-                        for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) {
-                                handleObj = matched.matches[ j ];
</del><ins>+        fix: function( event ) {
+                if ( event[ jQuery.expando ] ) {
+                        return event;
+                }
</ins><span class="cx">
</span><del>-                                // Triggered event must either 1) have no namespace, or
-                                // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
-                                if ( !event.namespace || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
</del><ins>+                // Create a writable copy of the event object and normalize some properties
+                var i, prop,
+                        originalEvent = event,
+                        fixHook = jQuery.event.fixHooks[ event.type ] || {},
+                        copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
</ins><span class="cx">
</span><del>-                                        event.data = handleObj.data;
-                                        event.handleObj = handleObj;
</del><ins>+                event = new jQuery.Event( originalEvent );
</ins><span class="cx">
</span><del>-                                        ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
-                                                        .apply( matched.elem, args );
</del><ins>+                i = copy.length;
+                while ( i-- ) {
+                        prop = copy[ i ];
+                        event[ prop ] = originalEvent[ prop ];
+                }
</ins><span class="cx">
</span><del>-                                        if ( ret !== undefined ) {
-                                                event.result = ret;
-                                                if ( ret === false ) {
-                                                        event.preventDefault();
-                                                        event.stopPropagation();
-                                                }
-                                        }
-                                }
-                        }
</del><ins>+                // Support: IE<9
+                // Fix target property (#1925)
+                if ( !event.target ) {
+                        event.target = originalEvent.srcElement || document;
</ins><span class="cx">                 }
</span><span class="cx">
</span><del>-                // Call the postDispatch hook for the mapped type
-                if ( special.postDispatch ) {
-                        special.postDispatch.call( this, event );
</del><ins>+                // Support: Chrome 23+, Safari?
+                // Target should not be a text node (#504, #13143)
+                if ( event.target.nodeType === 3 ) {
+                        event.target = event.target.parentNode;
</ins><span class="cx">                 }
</span><span class="cx">
</span><del>-                return event.result;
</del><ins>+                // Support: IE<9
+                // For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
+                event.metaKey = !!event.metaKey;
+
+                return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
</ins><span class="cx">         },
</span><span class="cx">
</span><span class="cx">         // Includes some event props shared by KeyEvent and MouseEvent
</span><span class="lines">@@ -3163,40 +3196,6 @@
</span><span class="cx">                 }
</span><span class="cx">         },
</span><span class="cx">
</span><del>-        fix: function( event ) {
-                if ( event[ jQuery.expando ] ) {
-                        return event;
-                }
-
-                // Create a writable copy of the event object and normalize some properties
-                var i, prop,
-                        originalEvent = event,
-                        fixHook = jQuery.event.fixHooks[ event.type ] || {},
-                        copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
-
-                event = jQuery.Event( originalEvent );
-
-                for ( i = copy.length; i; ) {
-                        prop = copy[ --i ];
-                        event[ prop ] = originalEvent[ prop ];
-                }
-
-                // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)
-                if ( !event.target ) {
-                        event.target = originalEvent.srcElement || document;
-                }
-
-                // Target should not be a text node (#504, Safari)
-                if ( event.target.nodeType === 3 ) {
-                        event.target = event.target.parentNode;
-                }
-
-                // For mouse/key events, metaKey==false if it's undefined (#3368, #11328; IE6/7/8)
-                event.metaKey = !!event.metaKey;
-
-                return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
-        },
-
</del><span class="cx">         special: {
</span><span class="cx">                 load: {
</span><span class="cx">                         // Prevent triggered image.load events from bubbling to window.load
</span><span class="lines">@@ -3219,8 +3218,9 @@
</span><span class="cx">                                                 this.focus();
</span><span class="cx">                                                 return false;
</span><span class="cx">                                         } catch ( e ) {
</span><del>-                                                // IE<9 dies on focus to hidden element (#1486,#12518)
-                                                // If this happens, let .trigger() run the handlers
</del><ins>+                                                // Support: IE<9
+                                                // If we error on focus to hidden element (#1486, #12518),
+                                                // let .trigger() run the handlers
</ins><span class="cx">                                         }
</span><span class="cx">                                 }
</span><span class="cx">                         },
</span><span class="lines">@@ -3270,10 +3270,6 @@
</span><span class="cx">         }
</span><span class="cx"> };
</span><span class="cx">
</span><del>-// Some plugins are using, but it's undocumented/deprecated and will be removed.
-// The 1.7 special event interface should provide all the hooks needed now.
-jQuery.event.handle = jQuery.event.dispatch;
-
</del><span class="cx"> jQuery.removeEvent = document.removeEventListener ?
</span><span class="cx">         function( elem, type, handle ) {
</span><span class="cx">                 if ( elem.removeEventListener ) {
</span><span class="lines">@@ -3328,54 +3324,51 @@
</span><span class="cx">         this[ jQuery.expando ] = true;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-function returnFalse() {
-        return false;
-}
-function returnTrue() {
-        return true;
-}
-
</del><span class="cx"> // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
</span><span class="cx"> // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
</span><span class="cx"> jQuery.Event.prototype = {
</span><ins>+        isDefaultPrevented: returnFalse,
+        isPropagationStopped: returnFalse,
+        isImmediatePropagationStopped: returnFalse,
+
</ins><span class="cx">         preventDefault: function() {
</span><ins>+                var e = this.originalEvent;
+
</ins><span class="cx">                 this.isDefaultPrevented = returnTrue;
</span><del>-
-                var e = this.originalEvent;
</del><span class="cx">                 if ( !e ) {
</span><span class="cx">                         return;
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                // if preventDefault exists run it on the original event
</del><ins>+                // If preventDefault exists, run it on the original event
</ins><span class="cx">                 if ( e.preventDefault ) {
</span><span class="cx">                         e.preventDefault();
</span><span class="cx">
</span><del>-                // otherwise set the returnValue property of the original event to false (IE)
</del><ins>+                // Support: IE
+                // Otherwise set the returnValue property of the original event to false
</ins><span class="cx">                 } else {
</span><span class="cx">                         e.returnValue = false;
</span><span class="cx">                 }
</span><span class="cx">         },
</span><span class="cx">         stopPropagation: function() {
</span><ins>+                var e = this.originalEvent;
+
</ins><span class="cx">                 this.isPropagationStopped = returnTrue;
</span><del>-
-                var e = this.originalEvent;
</del><span class="cx">                 if ( !e ) {
</span><span class="cx">                         return;
</span><span class="cx">                 }
</span><del>-                // if stopPropagation exists run it on the original event
</del><ins>+                // If stopPropagation exists, run it on the original event
</ins><span class="cx">                 if ( e.stopPropagation ) {
</span><span class="cx">                         e.stopPropagation();
</span><span class="cx">                 }
</span><del>-                // otherwise set the cancelBubble property of the original event to true (IE)
</del><ins>+
+                // Support: IE
+                // Set the cancelBubble property of the original event to true
</ins><span class="cx">                 e.cancelBubble = true;
</span><span class="cx">         },
</span><span class="cx">         stopImmediatePropagation: function() {
</span><span class="cx">                 this.isImmediatePropagationStopped = returnTrue;
</span><span class="cx">                 this.stopPropagation();
</span><del>-        },
-        isDefaultPrevented: returnFalse,
-        isPropagationStopped: returnFalse,
-        isImmediatePropagationStopped: returnFalse
</del><ins>+        }
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> // Create mouseenter/leave events using mouseover/out and event-time checks
</span><span class="lines">@@ -3420,11 +3413,11 @@
</span><span class="cx">                                 // Node name check avoids a VML-related crash in IE (#9807)
</span><span class="cx">                                 var elem = e.target,
</span><span class="cx">                                         form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
</span><del>-                                if ( form && !jQuery._data( form, "_submit_attached" ) ) {
</del><ins>+                                if ( form && !jQuery._data( form, "submitBubbles" ) ) {
</ins><span class="cx">                                         jQuery.event.add( form, "submit._submit", function( event ) {
</span><span class="cx">                                                 event._submit_bubble = true;
</span><span class="cx">                                         });
</span><del>-                                        jQuery._data( form, "_submit_attached", true );
</del><ins>+                                        jQuery._data( form, "submitBubbles", true );
</ins><span class="cx">                                 }
</span><span class="cx">                         });
</span><span class="cx">                         // return undefined since we don't need an event listener
</span><span class="lines">@@ -3483,13 +3476,13 @@
</span><span class="cx">                         jQuery.event.add( this, "beforeactivate._change", function( e ) {
</span><span class="cx">                                 var elem = e.target;
</span><span class="cx">
</span><del>-                                if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "_change_attached" ) ) {
</del><ins>+                                if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) {
</ins><span class="cx">                                         jQuery.event.add( elem, "change._change", function( event ) {
</span><span class="cx">                                                 if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
</span><span class="cx">                                                         jQuery.event.simulate( "change", this.parentNode, event, true );
</span><span class="cx">                                                 }
</span><span class="cx">                                         });
</span><del>-                                        jQuery._data( elem, "_change_attached", true );
</del><ins>+                                        jQuery._data( elem, "changeBubbles", true );
</ins><span class="cx">                                 }
</span><span class="cx">                         });
</span><span class="cx">                 },
</span><span class="lines">@@ -3544,7 +3537,7 @@
</span><span class="cx">                 // Types can be a map of types/handlers
</span><span class="cx">                 if ( typeof types === "object" ) {
</span><span class="cx">                         // ( types-Object, selector, data )
</span><del>-                        if ( typeof selector !== "string" ) { // && selector != null
</del><ins>+                        if ( typeof selector !== "string" ) {
</ins><span class="cx">                                 // ( types-Object, data )
</span><span class="cx">                                 data = data || selector;
</span><span class="cx">                                 selector = undefined;
</span><span class="lines">@@ -3633,15 +3626,6 @@
</span><span class="cx">                 return this.off( types, null, fn );
</span><span class="cx">         },
</span><span class="cx">
</span><del>-        live: function( types, data, fn ) {
-                jQuery( this.context ).on( types, this.selector, data, fn );
-                return this;
-        },
-        die: function( types, fn ) {
-                jQuery( this.context ).off( types, this.selector || "**", fn );
-                return this;
-        },
-
</del><span class="cx">         delegate: function( selector, types, data, fn ) {
</span><span class="cx">                 return this.on( types, selector, data, fn );
</span><span class="cx">         },
</span><span class="lines">@@ -3656,8 +3640,9 @@
</span><span class="cx">                 });
</span><span class="cx">         },
</span><span class="cx">         triggerHandler: function( type, data ) {
</span><del>-                if ( this[0] ) {
-                        return jQuery.event.trigger( type, data, this[0], true );
</del><ins>+                var elem = this[0];
+                if ( elem ) {
+                        return jQuery.event.trigger( type, data, elem, true );
</ins><span class="cx">                 }
</span><span class="cx">         },
</span><span class="cx">
</span><span class="lines">@@ -3713,19 +3698,20 @@
</span><span class="cx">         contains,
</span><span class="cx">         sortOrder,
</span><span class="cx">
</span><ins>+        // Instance-specific data
</ins><span class="cx">         expando = "sizzle" + -(new Date()),
</span><ins>+        preferredDoc = window.document,
+        support = {},
+        dirruns = 0,
+        done = 0,
+        classCache = createCache(),
+        tokenCache = createCache(),
+        compilerCache = createCache(),
</ins><span class="cx">
</span><ins>+        // General-purpose constants
</ins><span class="cx">         strundefined = typeof undefined,
</span><del>-
-        // Used in sorting
</del><span class="cx">         MAX_NEGATIVE = 1 << 31,
</span><del>-        preferredDoc = window.document,
</del><span class="cx">
</span><del>-        Token = String,
-        dirruns = 0,
-        done = 0,
-        support = {},
-
</del><span class="cx">         // Array methods
</span><span class="cx">         arr = [],
</span><span class="cx">         pop = arr.pop,
</span><span class="lines">@@ -3743,40 +3729,16 @@
</span><span class="cx">                 return -1;
</span><span class="cx">         },
</span><span class="cx">
</span><del>-        // Augment a function for special use by Sizzle
-        markFunction = function( fn, value ) {
-                fn[ expando ] = value == null || value;
-                return fn;
-        },
</del><span class="cx">
</span><del>-        createCache = function() {
-                var cache = {},
-                        keys = [];
</del><ins>+        // Regular expressions
</ins><span class="cx">
</span><del>-                return markFunction(function( key, value ) {
-                        // Only keep the most recent entries
-                        if ( keys.push( key ) > Expr.cacheLength ) {
-                                delete cache[ keys.shift() ];
-                        }
-
-                        // Retrieve with (key + " ") to avoid collision with native Object.prototype properties (see Issue #157)
-                        return (cache[ key + " " ] = value);
-                }, cache );
-        },
-
-        classCache = createCache(),
-        tokenCache = createCache(),
-        compilerCache = createCache(),
-
-        // Regex
-
</del><span class="cx">         // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
</span><span class="cx">         whitespace = "[\\x20\\t\\r\\n\\f]",
</span><span class="cx">         // http://www.w3.org/TR/css3-syntax/#characters
</span><span class="cx">         characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
</span><span class="cx">
</span><span class="cx">         // Loosely modeled on CSS identifier characters
</span><del>-        // An unquoted value should be a CSS identifier (http://www.w3.org/TR/css3-selectors/#attribute-selectors)
</del><ins>+        // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
</ins><span class="cx">         // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
</span><span class="cx">         identifier = characterEncoding.replace( "w", "w#" ),
</span><span class="cx">
</span><span class="lines">@@ -3799,22 +3761,8 @@
</span><span class="cx">         rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
</span><span class="cx">         rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ),
</span><span class="cx">         rpseudo = new RegExp( pseudos ),
</span><ins>+        ridentifier = new RegExp( "^" + identifier + "$" ),
</ins><span class="cx">
</span><del>-        // Easily-parseable/retrievable ID or TAG or CLASS selectors
-        rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
-
-        rsibling = /[\x20\t\r\n\f]*[+~]/,
-
-        rheader = /h\d/i,
-        rinputs = /input|select|textarea|button/i,
-
-        rnative = /\{\s*\[native code\]\s*\}/,
-
-        rbackslash = /\\(?!\\)/g,
-
-        rescape = /'|\\/g,
-        rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,
-
</del><span class="cx">         matchExpr = {
</span><span class="cx">                 "ID": new RegExp( "^#(" + characterEncoding + ")" ),
</span><span class="cx">                 "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
</span><span class="lines">@@ -3831,29 +3779,31 @@
</span><span class="cx">                         whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
</span><span class="cx">         },
</span><span class="cx">
</span><del>-        /**
-         * For feature detection
-         * @param {Function} fn The function to test for native support
-         */
-        isNative = function( fn ) {
-                return rnative.test( fn + "" );
-        },
</del><ins>+        rsibling = /[\x20\t\r\n\f]*[+~]/,
</ins><span class="cx">
</span><del>-        /**
-         * Support testing using an element
-         * @param {Function} fn Passed the created div and expects a boolean result
-         */
-        assert = function( fn ) {
-                var div = document.createElement("div");
</del><ins>+        rnative = /\{\s*\[native code\]\s*\}/,
</ins><span class="cx">
</span><del>-                try {
-                        return fn( div );
-                } catch (e) {
-                        return false;
-                } finally {
-                        // release memory in IE
-                        div = null;
-                }
</del><ins>+        // Easily-parseable/retrievable ID or TAG or CLASS selectors
+        rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+        rinputs = /^(?:input|select|textarea|button)$/i,
+        rheader = /^h\d$/i,
+
+        rescape = /'|\\/g,
+        rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,
+
+        // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+        runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,
+        funescape = function( _, escaped ) {
+                var high = "0x" + escaped - 0x10000;
+                // NaN means non-codepoint
+                return high !== high ?
+                        escaped :
+                        // BMP codepoint
+                        high < 0 ?
+                                String.fromCharCode( high + 0x10000 ) :
+                                // Supplemental Plane codepoint (surrogate pair)
+                                String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
</ins><span class="cx">         };
</span><span class="cx">
</span><span class="cx"> // Use a stripped-down slice if we can't use a native one
</span><span class="lines">@@ -3870,12 +3820,66 @@
</span><span class="cx">         };
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+/**
+ * For feature detection
+ * @param {Function} fn The function to test for native support
+ */
+function isNative( fn ) {
+        return rnative.test( fn + "" );
+}
+
+/**
+ * Create key-value caches of limited size
+ * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
+ *        property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ *        deleting the oldest entry
+ */
+function createCache() {
+        var cache,
+                keys = [];
+
+        return (cache = function( key, value ) {
+                // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+                if ( keys.push( key += " " ) > Expr.cacheLength ) {
+                        // Only keep the most recent entries
+                        delete cache[ keys.shift() ];
+                }
+                return (cache[ key ] = value);
+        });
+}
+
+/**
+ * Mark a function for special use by Sizzle
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+        fn[ expando ] = true;
+        return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created div and expects a boolean result
+ */
+function assert( fn ) {
+        var div = document.createElement("div");
+
+        try {
+                return fn( div );
+        } catch (e) {
+                return false;
+        } finally {
+                // release memory in IE
+                div = null;
+        }
+}
+
</ins><span class="cx"> function Sizzle( selector, context, results, seed ) {
</span><span class="cx">         var match, elem, m, nodeType,
</span><span class="cx">                 // QSA vars
</span><span class="cx">                 i, groups, old, nid, newContext, newSelector;
</span><span class="cx">
</span><del>-        if ( context && (( context.ownerDocument || context ) !== document) ) {
</del><ins>+        if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
</ins><span class="cx">                 setDocument( context );
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -3954,7 +3958,7 @@
</span><span class="cx">
</span><span class="cx">                                 i = groups.length;
</span><span class="cx">                                 while ( i-- ) {
</span><del>-                                        groups[i] = nid + groups[i].join("");
</del><ins>+                                        groups[i] = nid + toSelector( groups[i] );
</ins><span class="cx">                                 }
</span><span class="cx">                                 newContext = rsibling.test( selector ) && context.parentNode || context;
</span><span class="cx">                                 newSelector = groups.join(",");
</span><span class="lines">@@ -3996,11 +4000,11 @@
</span><span class="cx"> * @param {Element|Object} [doc] An element or document object to use to set the document
</span><span class="cx"> * @returns {Object} Returns the current document
</span><span class="cx"> */
</span><del>-setDocument = Sizzle.setDocument = function( doc ) {
-        doc = doc && doc.ownerDocument || doc || window.document;
</del><ins>+setDocument = Sizzle.setDocument = function( node ) {
+        var doc = node ? node.ownerDocument || node : preferredDoc;
</ins><span class="cx">
</span><span class="cx">         // If no document and documentElement is available, return
</span><del>-        if ( !doc || doc.nodeType !== 9 || !doc.documentElement || document === doc ) {
</del><ins>+        if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
</ins><span class="cx">                 return document;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -4087,7 +4091,7 @@
</span><span class="cx">                         }
</span><span class="cx">                 };
</span><span class="cx">                 Expr.filter["ID"] = function( id ) {
</span><del>-                        var attrId = id.replace( rbackslash, "" );
</del><ins>+                        var attrId = id.replace( runescape, funescape );
</ins><span class="cx">                         return function( elem ) {
</span><span class="cx">                                 return elem.getAttribute("id") === attrId;
</span><span class="cx">                         };
</span><span class="lines">@@ -4105,7 +4109,7 @@
</span><span class="cx">                         }
</span><span class="cx">                 };
</span><span class="cx">                 Expr.filter["ID"] = function( id ) {
</span><del>-                        var attrId = id.replace( rbackslash, "" );
</del><ins>+                        var attrId = id.replace( runescape, funescape );
</ins><span class="cx">                         return function( elem ) {
</span><span class="cx">                                 var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
</span><span class="cx">                                 return node && node.value === attrId;
</span><span class="lines">@@ -4189,16 +4193,15 @@
</span><span class="cx">
</span><span class="cx">                 assert(function( div ) {
</span><span class="cx">
</span><del>-                        // Opera 10-12/IE9 - ^= $= *= and empty values
</del><ins>+                        // Opera 10-12/IE8 - ^= $= *= and empty values
</ins><span class="cx">                         // Should not select anything
</span><del>-                        div.innerHTML = "<p test=''></p>";
-                        if ( div.querySelectorAll("[test^='']").length ) {
</del><ins>+                        div.innerHTML = "<input type='hidden' i=''/>";
+                        if ( div.querySelectorAll("[i^='']").length ) {
</ins><span class="cx">                                 rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" );
</span><span class="cx">                         }
</span><span class="cx">
</span><span class="cx">                         // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
</span><span class="cx">                         // IE8 throws error here and will not see later tests
</span><del>-                        div.innerHTML = "<input type='hidden'/>";
</del><span class="cx">                         if ( !div.querySelectorAll(":enabled").length ) {
</span><span class="cx">                                 rbuggyQSA.push( ":enabled", ":disabled" );
</span><span class="cx">                         }
</span><span class="lines">@@ -4222,7 +4225,7 @@
</span><span class="cx">
</span><span class="cx">                         // This should fail with an exception
</span><span class="cx">                         // Gecko does not error, returns false instead
</span><del>-                        matches.call( div, "[test!='']:x" );
</del><ins>+                        matches.call( div, "[s!='']:x" );
</ins><span class="cx">                         rbuggyMatches.push( "!=", pseudos );
</span><span class="cx">                 });
</span><span class="cx">         }
</span><span class="lines">@@ -4344,12 +4347,12 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> Sizzle.matches = function( expr, elements ) {
</span><del>-        return Sizzle( expr, window.document, null, elements );
</del><ins>+        return Sizzle( expr, null, null, elements );
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> Sizzle.matchesSelector = function( elem, expr ) {
</span><span class="cx">         // Set document vars if needed
</span><del>-        if ( elem && (( elem.ownerDocument || elem ) !== document) ) {
</del><ins>+        if ( ( elem.ownerDocument || elem ) !== document ) {
</ins><span class="cx">                 setDocument( elem );
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -4376,7 +4379,7 @@
</span><span class="cx">
</span><span class="cx"> Sizzle.contains = function( context, elem ) {
</span><span class="cx">         // Set document vars if needed
</span><del>-        if ( context && (( context.ownerDocument || context ) !== document) ) {
</del><ins>+        if ( ( context.ownerDocument || context ) !== document ) {
</ins><span class="cx">                 setDocument( context );
</span><span class="cx">         }
</span><span class="cx">         return contains( context, elem );
</span><span class="lines">@@ -4386,7 +4389,7 @@
</span><span class="cx">         var val;
</span><span class="cx">
</span><span class="cx">         // Set document vars if needed
</span><del>-        if ( elem && (( elem.ownerDocument || elem ) !== document) ) {
</del><ins>+        if ( ( elem.ownerDocument || elem ) !== document ) {
</ins><span class="cx">                 setDocument( elem );
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -4535,10 +4538,10 @@
</span><span class="cx">
</span><span class="cx">         preFilter: {
</span><span class="cx">                 "ATTR": function( match ) {
</span><del>-                        match[1] = match[1].replace( rbackslash, "" );
</del><ins>+                        match[1] = match[1].replace( runescape, funescape );
</ins><span class="cx">
</span><span class="cx">                         // Move the given value to match[3] whether quoted or unquoted
</span><del>-                        match[3] = ( match[4] || match[5] || "" ).replace( rbackslash, "" );
</del><ins>+                        match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
</ins><span class="cx">
</span><span class="cx">                         if ( match[2] === "~=" ) {
</span><span class="cx">                                 match[3] = " " + match[3] + " ";
</span><span class="lines">@@ -4615,14 +4618,14 @@
</span><span class="cx">                                 return function() { return true; };
</span><span class="cx">                         }
</span><span class="cx">
</span><del>-                        nodeName = nodeName.replace( rbackslash, "" ).toLowerCase();
</del><ins>+                        nodeName = nodeName.replace( runescape, funescape ).toLowerCase();
</ins><span class="cx">                         return function( elem ) {
</span><span class="cx">                                 return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
</span><span class="cx">                         };
</span><span class="cx">                 },
</span><span class="cx">
</span><span class="cx">                 "CLASS": function( className ) {
</span><del>-                        var pattern = classCache[ expando ][ className + " " ];
</del><ins>+                        var pattern = classCache[ className + " " ];
</ins><span class="cx">
</span><span class="cx">                         return pattern ||
</span><span class="cx">                                 (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
</span><span class="lines">@@ -4824,6 +4827,34 @@
</span><span class="cx">                         };
</span><span class="cx">                 }),
</span><span class="cx">
</span><ins>+                // "Whether an element is represented by a :lang() selector
+                // is based solely on the element's language value
+                // being equal to the identifier C,
+                // or beginning with the identifier C immediately followed by "-".
+                // The matching of C against the element's language value is performed case-insensitively.
+                // The identifier C does not have to be a valid language name."
+                // http://www.w3.org/TR/selectors/#lang-pseudo
+                "lang": markFunction( function( lang ) {
+                        // lang value must be a valid identifider
+                        if ( !ridentifier.test(lang || "") ) {
+                                Sizzle.error( "unsupported lang: " + lang );
+                        }
+                        lang = lang.replace( runescape, funescape ).toLowerCase();
+                        return function( elem ) {
+                                var elemLang;
+                                do {
+                                        if ( (elemLang = documentIsXML ?
+                                                elem.getAttribute("xml:lang") || elem.getAttribute("lang") :
+                                                elem.lang) ) {
+
+                                                elemLang = elemLang.toLowerCase();
+                                                return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
+                                        }
+                                } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
+                                return false;
+                        };
+                }),
+
</ins><span class="cx">                 // Miscellaneous
</span><span class="cx">                 "target": function( elem ) {
</span><span class="cx">                         var hash = window.location && window.location.hash;
</span><span class="lines">@@ -4964,7 +4995,7 @@
</span><span class="cx"> function tokenize( selector, parseOnly ) {
</span><span class="cx">         var matched, match, tokens, type,
</span><span class="cx">                 soFar, groups, preFilters,
</span><del>-                cached = tokenCache[ expando ][ selector + " " ];
</del><ins>+                cached = tokenCache[ selector + " " ];
</ins><span class="cx">
</span><span class="cx">         if ( cached ) {
</span><span class="cx">                 return parseOnly ? 0 : cached.slice( 0 );
</span><span class="lines">@@ -4989,22 +5020,26 @@
</span><span class="cx">
</span><span class="cx">                 // Combinators
</span><span class="cx">                 if ( (match = rcombinators.exec( soFar )) ) {
</span><del>-                        tokens.push( matched = new Token( match.shift() ) );
</del><ins>+                        matched = match.shift();
+                        tokens.push( {
+                                value: matched,
+                                // Cast descendant combinators to space
+                                type: match[0].replace( rtrim, " " )
+                        } );
</ins><span class="cx">                         soFar = soFar.slice( matched.length );
</span><del>-
-                        // Cast descendant combinators to space
-                        matched.type = match[0].replace( rtrim, " " );
</del><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 // Filters
</span><span class="cx">                 for ( type in Expr.filter ) {
</span><span class="cx">                         if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
</span><span class="cx">                                 (match = preFilters[ type ]( match ))) ) {
</span><del>-
-                                tokens.push( matched = new Token( match.shift() ) );
</del><ins>+                                matched = match.shift();
+                                tokens.push( {
+                                        value: matched,
+                                        type: type,
+                                        matches: match
+                                } );
</ins><span class="cx">                                 soFar = soFar.slice( matched.length );
</span><del>-                                matched.type = type;
-                                matched.matches = match;
</del><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -5024,6 +5059,16 @@
</span><span class="cx">                         tokenCache( selector, groups ).slice( 0 );
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+function toSelector( tokens ) {
+        var i = 0,
+                len = tokens.length,
+                selector = "";
+        for ( ; i < len; i++ ) {
+                selector += tokens[i].value;
+        }
+        return selector;
+}
+
</ins><span class="cx"> function addCombinator( matcher, combinator, base ) {
</span><span class="cx">         var dir = combinator.dir,
</span><span class="cx">                 checkNonElements = base && combinator.dir === "parentNode",
</span><span class="lines">@@ -5240,11 +5285,11 @@
</span><span class="cx">                                 }
</span><span class="cx">                                 return setMatcher(
</span><span class="cx">                                         i > 1 && elementMatcher( matchers ),
</span><del>-                                        i > 1 && tokens.slice( 0, i - 1 ).join("").replace( rtrim, "$1" ),
</del><ins>+                                        i > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, "$1" ),
</ins><span class="cx">                                         matcher,
</span><span class="cx">                                         i < j && matcherFromTokens( tokens.slice( i, j ) ),
</span><span class="cx">                                         j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
</span><del>-                                        j < len && tokens.join("")
</del><ins>+                                        j < len && toSelector( tokens )
</ins><span class="cx">                                 );
</span><span class="cx">                         }
</span><span class="cx">                         matchers.push( matcher );
</span><span class="lines">@@ -5357,7 +5402,7 @@
</span><span class="cx">         var i,
</span><span class="cx">                 setMatchers = [],
</span><span class="cx">                 elementMatchers = [],
</span><del>-                cached = compilerCache[ expando ][ selector + " " ];
</del><ins>+                cached = compilerCache[ selector + " " ];
</ins><span class="cx">
</span><span class="cx">         if ( !cached ) {
</span><span class="cx">                 // Generate a function of recursive functions that can be used to check each element
</span><span class="lines">@@ -5403,12 +5448,12 @@
</span><span class="cx">                                         context.nodeType === 9 && !documentIsXML &&
</span><span class="cx">                                         Expr.relative[ tokens[1].type ] ) {
</span><span class="cx">
</span><del>-                                context = Expr.find["ID"]( token.matches[0].replace( rbackslash, "" ), context )[0];
</del><ins>+                                context = Expr.find["ID"]( token.matches[0].replace( runescape, funescape ), context )[0];
</ins><span class="cx">                                 if ( !context ) {
</span><span class="cx">                                         return results;
</span><span class="cx">                                 }
</span><span class="cx">
</span><del>-                                selector = selector.slice( tokens.shift().length );
</del><ins>+                                selector = selector.slice( tokens.shift().value.length );
</ins><span class="cx">                         }
</span><span class="cx">
</span><span class="cx">                         // Fetch a seed set for right-to-left matching
</span><span class="lines">@@ -5422,13 +5467,13 @@
</span><span class="cx">                                 if ( (find = Expr.find[ type ]) ) {
</span><span class="cx">                                         // Search, expanding context for leading sibling combinators
</span><span class="cx">                                         if ( (seed = find(
</span><del>-                                                token.matches[0].replace( rbackslash, "" ),
</del><ins>+                                                token.matches[0].replace( runescape, funescape ),
</ins><span class="cx">                                                 rsibling.test( tokens[0].type ) && context.parentNode || context
</span><span class="cx">                                         )) ) {
</span><span class="cx">
</span><span class="cx">                                                 // If seed is empty or no tokens remain, we can return early
</span><span class="cx">                                                 tokens.splice( i, 1 );
</span><del>-                                                selector = seed.length && tokens.join("");
</del><ins>+                                                selector = seed.length && toSelector( tokens );
</ins><span class="cx">                                                 if ( !selector ) {
</span><span class="cx">                                                         push.apply( results, slice.call( seed, 0 ) );
</span><span class="cx">                                                         return results;
</span><span class="lines">@@ -5780,19 +5825,21 @@
</span><span class="cx">         rscriptType = /^$|\/(?:java|ecma)script/i,
</span><span class="cx">         rscriptTypeMasked = /^true\/(.*)/,
</span><span class="cx">         rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
</span><ins>+
+        // We have to close these tags to support XHTML (#13200)
</ins><span class="cx">         wrapMap = {
</span><del>-                option: [ 1, "<select multiple='multiple'>" ],
-                legend: [ 1, "<fieldset>" ],
-                area: [ 1, "<map>" ],
-                param: [ 1, "<object>" ],
-                thead: [ 1, "<table>" ],
-                tr: [ 2, "<table><tbody>" ],
-                col: [ 2, "<table><tbody></tbody><colgroup>", "</table>" ],
-                td: [ 3, "<table><tbody><tr>" ],
</del><ins>+                option: [ 1, "<select multiple='multiple'>", "</select>" ],
+                legend: [ 1, "<fieldset>", "</fieldset>" ],
+                area: [ 1, "<map>", "</map>" ],
+                param: [ 1, "<object>", "</object>" ],
+                thead: [ 1, "<table>", "</table>" ],
+                tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+                col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
+                td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
</ins><span class="cx">
</span><span class="cx">                 // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
</span><span class="cx">                 // unless wrapped in a div with non-breaking characters in front of it.
</span><del>-                _default: jQuery.support.htmlSerialize ? [ 0, "" ] : [ 1, "X<div>" ]
</del><ins>+                _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
</ins><span class="cx">         },
</span><span class="cx">         safeFragment = createSafeFragment( document ),
</span><span class="cx">         fragmentDiv = safeFragment.appendChild( document.createElement("div") );
</span><span class="lines">@@ -5944,6 +5991,12 @@
</span><span class="cx">                         while ( elem.firstChild ) {
</span><span class="cx">                                 elem.removeChild( elem.firstChild );
</span><span class="cx">                         }
</span><ins>+
+                        // If this is a select, ensure that it displays empty (#12336)
+                        // Support: IE<9
+                        if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
+                                elem.options.length = 0;
+                        }
</ins><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 return this;
</span><span class="lines">@@ -6038,25 +6091,24 @@
</span><span class="cx">                 var fragment, first, scripts, hasScripts, node, doc,
</span><span class="cx">                         i = 0,
</span><span class="cx">                         l = this.length,
</span><ins>+                        set = this,
</ins><span class="cx">                         iNoClone = l - 1,
</span><span class="cx">                         value = args[0],
</span><span class="cx">                         isFunction = jQuery.isFunction( value );
</span><span class="cx">
</span><span class="cx">                 // We can't cloneNode fragments that contain checked, in WebKit
</span><span class="cx">                 if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {
</span><del>-                        return this.each(function() {
-                                var self = jQuery( this );
</del><ins>+                        return this.each(function( index ) {
+                                var self = set.eq( index );
</ins><span class="cx">                                 if ( isFunction ) {
</span><del>-                                        args[0] = value.call( this, i, table ? self.html() : undefined );
</del><ins>+                                        args[0] = value.call( this, index, table ? self.html() : undefined );
</ins><span class="cx">                                 }
</span><span class="cx">                                 self.domManip( args, table, callback );
</span><span class="cx">                         });
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                if ( this[0] ) {
-                        doc = this[0].ownerDocument;
-                        fragment = doc.createDocumentFragment();
-                        jQuery.clean( args, doc, fragment, undefined, this );
</del><ins>+                if ( l ) {
+                        fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );
</ins><span class="cx">                         first = fragment.firstChild;
</span><span class="cx">
</span><span class="cx">                         if ( fragment.childNodes.length === 1 ) {
</span><span class="lines">@@ -6301,7 +6353,7 @@
</span><span class="cx">                 found;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-// Used in clean, fixes the defaultChecked property
</del><ins>+// Used in buildFragment, fixes the defaultChecked property
</ins><span class="cx"> function fixDefaultChecked( elem ) {
</span><span class="cx">         if ( manipulation_rcheckableType.test( elem.type ) ) {
</span><span class="cx">                 elem.defaultChecked = elem.checked;
</span><span class="lines">@@ -6364,37 +6416,39 @@
</span><span class="cx">                 return clone;
</span><span class="cx">         },
</span><span class="cx">
</span><del>-        clean: function( elems, context, fragment, scripts, selection ) {
-                var elem, i, j, tmp, tag, wrap, tbody,
-                        ret = [],
-                        safe = context === document && safeFragment;
</del><ins>+        buildFragment: function( elems, context, scripts, selection ) {
+                var contains, elem, tag, tmp, wrap, tbody, j,
+                        l = elems.length,
</ins><span class="cx">
</span><del>-                // Ensure that context is a document
-                if ( !context || typeof context.createDocumentFragment === "undefined" ) {
-                        context = document;
-                }
</del><ins>+                        // Ensure a safe fragment
+                        safe = createSafeFragment( context ),
</ins><span class="cx">
</span><del>-                for ( i = 0; (elem = elems[i]) != null; i++ ) {
</del><ins>+                        nodes = [],
+                        i = 0;
+
+                for ( ; i < l; i++ ) {
+                        elem = elems[ i ];
+
</ins><span class="cx">                         if ( elem || elem === 0 ) {
</span><ins>+
</ins><span class="cx">                                 // Add nodes directly
</span><span class="cx">                                 if ( jQuery.type( elem ) === "object" ) {
</span><del>-                                        jQuery.merge( ret, elem.nodeType ? [ elem ] : elem );
</del><ins>+                                        jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
</ins><span class="cx">
</span><span class="cx">                                 // Convert non-html into a text node
</span><span class="cx">                                 } else if ( !rhtml.test( elem ) ) {
</span><del>-                                        ret.push( context.createTextNode( elem ) );
</del><ins>+                                        nodes.push( context.createTextNode( elem ) );
</ins><span class="cx">
</span><span class="cx">                                 // Convert html into DOM nodes
</span><span class="cx">                                 } else {
</span><del>-                                        // Ensure a safe container
-                                        safe = safe || createSafeFragment( context );
</del><span class="cx">                                         tmp = tmp || safe.appendChild( context.createElement("div") );
</span><span class="cx">
</span><span class="cx">                                         // Deserialize a standard representation
</span><span class="cx">                                         tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();
</span><span class="cx">                                         wrap = wrapMap[ tag ] || wrapMap._default;
</span><del>-                                        tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + ( wrap[2] || "" );
</del><span class="cx">
</span><ins>+                                        tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];
+
</ins><span class="cx">                                         // Descend through wrappers to the right content
</span><span class="cx">                                         j = wrap[0];
</span><span class="cx">                                         while ( j-- ) {
</span><span class="lines">@@ -6403,7 +6457,7 @@
</span><span class="cx">
</span><span class="cx">                                         // Manually add leading whitespace removed by IE
</span><span class="cx">                                         if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
</span><del>-                                                ret.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
</del><ins>+                                                nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
</ins><span class="cx">                                         }
</span><span class="cx">
</span><span class="cx">                                         // Remove IE's autoinserted <tbody> from table fragments
</span><span class="lines">@@ -6426,7 +6480,7 @@
</span><span class="cx">                                                 }
</span><span class="cx">                                         }
</span><span class="cx">
</span><del>-                                        jQuery.merge( ret, tmp.childNodes );
</del><ins>+                                        jQuery.merge( nodes, tmp.childNodes );
</ins><span class="cx">
</span><span class="cx">                                         // Fix #12392 for WebKit and IE > 9
</span><span class="cx">                                         tmp.textContent = "";
</span><span class="lines">@@ -6442,7 +6496,7 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                // Fix #11356: Clear elements from safeFragment
</del><ins>+                // Fix #11356: Clear elements from fragment
</ins><span class="cx">                 if ( tmp ) {
</span><span class="cx">                         safe.removeChild( tmp );
</span><span class="cx">                 }
</span><span class="lines">@@ -6450,40 +6504,42 @@
</span><span class="cx">                 // Reset defaultChecked for any radios and checkboxes
</span><span class="cx">                 // about to be appended to the DOM in IE 6/7 (#8060)
</span><span class="cx">                 if ( !jQuery.support.appendChecked ) {
</span><del>-                        jQuery.grep( getAll( ret, "input" ), fixDefaultChecked );
</del><ins>+                        jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
</ins><span class="cx">                 }
</span><span class="cx">
</span><del>-                if ( fragment ) {
-                        for ( i = 0; (elem = ret[i]) != null; i++ ) {
-                                safe = jQuery.contains( elem.ownerDocument, elem );
</del><ins>+                i = 0;
+                while ( (elem = nodes[ i++ ]) ) {
</ins><span class="cx">
</span><del>-                                // Append to fragment
-                                // #4087 - If origin and destination elements are the same, and this is
-                                // that element, do not append to fragment
-                                if ( !selection || jQuery.inArray( elem, selection ) === -1 ) {
-                                        fragment.appendChild( elem );
-                                }
-                                tmp = getAll( elem, "script" );
</del><ins>+                        // #4087 - If origin and destination elements are the same, and this is
+                        // that element, do not do anything
+                        if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
+                                continue;
+                        }
</ins><span class="cx">
</span><del>-                                // Preserve script evaluation history
-                                if ( safe ) {
-                                        setGlobalEval( tmp );
-                                }
</del><ins>+                        contains = jQuery.contains( elem.ownerDocument, elem );
</ins><span class="cx">
</span><del>-                                // Capture executables
-                                if ( scripts ) {
-                                        for ( j = 0; (elem = tmp[j]) != null; j++ ) {
-                                                if ( rscriptType.test( elem.type || "" ) ) {
-                                                        scripts.push( elem );
-                                                }
</del><ins>+                        // Append to fragment
+                        tmp = getAll( safe.appendChild( elem ), "script" );
+
+                        // Preserve script evaluation history
+                        if ( contains ) {
+                                setGlobalEval( tmp );
+                        }
+
+                        // Capture executables
+                        if ( scripts ) {
+                                j = 0;
+                                while ( (elem = tmp[ j++ ]) ) {
+                                        if ( rscriptType.test( elem.type || "" ) ) {
+                                                scripts.push( elem );
</ins><span class="cx">                                         }
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                elem = tmp = safe = null;
</del><ins>+                tmp = null;
</ins><span class="cx">
</span><del>-                return ret;
</del><ins>+                return safe;
</ins><span class="cx">         },
</span><span class="cx">
</span><span class="cx">         cleanData: function( elems, /* internal */ acceptData ) {
</span><span class="lines">@@ -6525,7 +6581,7 @@
</span><span class="cx">                                                 if ( deleteExpando ) {
</span><span class="cx">                                                         delete elem[ internalKey ];
</span><span class="cx">
</span><del>-                                                } else if ( elem.removeAttribute ) {
</del><ins>+                                                } else if ( typeof elem.removeAttribute !== "undefined" ) {
</ins><span class="cx">                                                         elem.removeAttribute( internalKey );
</span><span class="cx">
</span><span class="cx">                                                 } else {
</span><span class="lines">@@ -6754,8 +6810,8 @@
</span><span class="cx">
</span><span class="cx">                         // Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
</span><span class="cx">                         // but it would mean to define eight (for every problematic property) identical functions
</span><del>-                        if ( value === "" && name.indexOf("background") === 0 ) {
-                                value = " ";
</del><ins>+                        if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
+                                style[ name ] = "inherit";
</ins><span class="cx">                         }
</span><span class="cx">
</span><span class="cx">                         // If a hook was provided, use that value, otherwise just set the specified value
</span><span class="lines">@@ -7309,7 +7365,7 @@
</span><span class="cx">         // Document location
</span><span class="cx">         ajaxLocParts,
</span><span class="cx">         ajaxLocation,
</span><del>-
</del><ins>+        
</ins><span class="cx">         ajax_nonce = jQuery.now(),
</span><span class="cx">
</span><span class="cx">         ajax_rquery = /\?/,
</span><span class="lines">@@ -8609,6 +8665,7 @@
</span><span class="cx">
</span><span class="cx"> function Animation( elem, properties, options ) {
</span><span class="cx">         var result,
</span><ins>+                stopped,
</ins><span class="cx">                 index = 0,
</span><span class="cx">                 length = animationPrefilters.length,
</span><span class="cx">                 deferred = jQuery.Deferred().always( function() {
</span><span class="lines">@@ -8616,6 +8673,9 @@
</span><span class="cx">                         delete tick.elem;
</span><span class="cx">                 }),
</span><span class="cx">                 tick = function() {
</span><ins>+                        if ( stopped ) {
+                                return false;
+                        }
</ins><span class="cx">                         var currentTime = fxNow || createFxNow(),
</span><span class="cx">                                 remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
</span><span class="cx">                                 // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
</span><span class="lines">@@ -8657,7 +8717,10 @@
</span><span class="cx">                                         // if we are going to the end, we want to run all the tweens
</span><span class="cx">                                         // otherwise we skip this part
</span><span class="cx">                                         length = gotoEnd ? animation.tweens.length : 0;
</span><del>-
</del><ins>+                                if ( stopped ) {
+                                        return this;
+                                }
+                                stopped = true;
</ins><span class="cx">                                 for ( ; index < length ; index++ ) {
</span><span class="cx">                                         animation.tweens[ index ].run( 1 );
</span><span class="cx">                                 }
</span><span class="lines">@@ -8691,9 +8754,9 @@
</span><span class="cx">
</span><span class="cx">         jQuery.fx.timer(
</span><span class="cx">                 jQuery.extend( tick, {
</span><ins>+                        elem: elem,
</ins><span class="cx">                         anim: animation,
</span><del>-                        queue: animation.opts.queue,
-                        elem: elem
</del><ins>+                        queue: animation.opts.queue
</ins><span class="cx">                 })
</span><span class="cx">         );
</span><span class="cx">
</span><span class="lines">@@ -9014,12 +9077,15 @@
</span><span class="cx">                         doAnimation = function() {
</span><span class="cx">                                 // Operate on a copy of prop so per-property easing won't be lost
</span><span class="cx">                                 var anim = Animation( this, jQuery.extend( {}, prop ), optall );
</span><del>-
-                                // Empty animations resolve immediately
-                                if ( empty ) {
</del><ins>+                                doAnimation.finish = function() {
</ins><span class="cx">                                         anim.stop( true );
</span><ins>+                                };
+                                // Empty animations, or finishing resolves immediately
+                                if ( empty || jQuery._data( this, "finish" ) ) {
+                                        anim.stop( true );
</ins><span class="cx">                                 }
</span><span class="cx">                         };
</span><ins>+                        doAnimation.finish = doAnimation;
</ins><span class="cx">
</span><span class="cx">                 return empty || optall.queue === false ?
</span><span class="cx">                         this.each( doAnimation ) :
</span><span class="lines">@@ -9074,6 +9140,47 @@
</span><span class="cx">                                 jQuery.dequeue( this, type );
</span><span class="cx">                         }
</span><span class="cx">                 });
</span><ins>+        },
+        finish: function( type ) {
+                if ( type !== false ) {
+                        type = type || "fx";
+                }
+                return this.each(function() {
+                        var index,
+                                data = jQuery._data( this ),
+                                queue = data[ type + "queue" ],
+                                hooks = data[ type + "queueHooks" ],
+                                timers = jQuery.timers,
+                                length = queue ? queue.length : 0;
+
+                        // enable finishing flag on private data
+                        data.finish = true;
+
+                        // empty the queue first
+                        jQuery.queue( this, type, [] );
+
+                        if ( hooks && hooks.cur && hooks.cur.finish ) {
+                                hooks.cur.finish.call( this );
+                        }
+
+                        // look for any active animations, and finish them
+                        for ( index = timers.length; index--; ) {
+                                if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
+                                        timers[ index ].anim.stop( true );
+                                        timers.splice( index, 1 );
+                                }
+                        }
+
+                        // look for any animations in the old queue and finish them
+                        for ( index = 0; index < length; index++ ) {
+                                if ( queue[ index ] && queue[ index ].finish ) {
+                                        queue[ index ].finish.call( this );
+                                }
+                        }
+
+                        // turn off finishing flag
+                        delete data.finish;
+                });
</ins><span class="cx">         }
</span><span class="cx"> });
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/script-loader.php (23300 => 23301)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2013-01-15 17:32:35 UTC (rev 23300)
+++ trunk/wp-includes/script-loader.php        2013-01-15 17:52:42 UTC (rev 23301)
</span><span class="lines">@@ -126,8 +126,8 @@
</span><span class="cx">
</span><span class="cx">         // jQuery
</span><span class="cx">         $scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ) );
</span><del>-        $scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '1.9.0b1' );
-        $scripts->add( 'jquery-migrate', '/wp-includes/js/jquery/jquery-migrate.js', array(), '1.0.0b1' );
</del><ins>+        $scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '1.9.0' );
+        $scripts->add( 'jquery-migrate', '/wp-includes/js/jquery/jquery-migrate.js', array(), '1.0.0' );
</ins><span class="cx">
</span><span class="cx">         // full jQuery UI
</span><span class="cx">         $scripts->add( 'jquery-ui-core', '/wp-includes/js/jquery/ui/jquery.ui.core.min.js', array('jquery'), '1.9.2', 1 );
</span></span></pre>
</div>
</div>
</body>
</html>