Strabon
changeset 611:66736f11dee8
merge
author | Panayiotis Smeros <psmeros@di.uoa.gr> |
---|---|
date | Wed Oct 03 15:52:08 2012 +0300 (2012-10-03) |
parents | 1be8836acc03 26af8ebdc892 |
children | 34e68fb2a595 |
files | endpoint/WebContent/WEB-INF/beans.xml endpoint/WebContent/query.jsp endpoint/WebContent/style.css endpoint/pom.xml |
line diff
1.1 --- a/.hgtags Wed Oct 03 15:34:53 2012 +0300 1.2 +++ b/.hgtags Wed Oct 03 15:52:08 2012 +0300 1.3 @@ -10,3 +10,6 @@ 1.4 f98df7d45ce21e527813cfe46d60308ca68a228b v3.2.1 1.5 8378166a566968b5ba00683384605f6232ef0aaa v3.2.2 1.6 331163be068281f22f61b79b31484eb0f4cfc564 v3.2.3 1.7 +66fbe30eb2e9dcd5c36bf29336efcb1bd3ce45fb v3.2.4 1.8 +73521cf81d1383a7fd885de46ffd7ed6e844851b Teleios_System_v1-1-1 1.9 +331163be068281f22f61b79b31484eb0f4cfc564 Teleios_System_v1-1-1
2.1 --- a/endpoint/WebContent/WEB-INF/web.xml Wed Oct 03 15:34:53 2012 +0300 2.2 +++ b/endpoint/WebContent/WEB-INF/web.xml Wed Oct 03 15:52:08 2012 +0300 2.3 @@ -81,6 +81,17 @@ 2.4 </servlet-mapping> 2.5 2.6 <servlet> 2.7 + <display-name>Browse</display-name> 2.8 + <servlet-name>Browse</servlet-name> 2.9 + <servlet-class>eu.earthobservatory.org.StrabonEndpoint.BrowseBean</servlet-class> 2.10 + <load-on-startup>1</load-on-startup> 2.11 + </servlet> 2.12 + <servlet-mapping> 2.13 + <servlet-name>Browse</servlet-name> 2.14 + <url-pattern>/Browse</url-pattern> 2.15 + </servlet-mapping> 2.16 + 2.17 + <servlet> 2.18 <servlet-name>query.jsp</servlet-name> 2.19 <jsp-file>/query.jsp</jsp-file> 2.20 </servlet> 2.21 @@ -100,6 +111,11 @@ 2.22 <jsp-file>/connection.jsp</jsp-file> 2.23 </servlet> 2.24 2.25 + <servlet> 2.26 + <servlet-name>browse.jsp</servlet-name> 2.27 + <jsp-file>/browse.jsp</jsp-file> 2.28 + </servlet> 2.29 + 2.30 <mime-mapping> 2.31 <extension>kml</extension> 2.32 <mime-type>application/vnd.google-earth.kml+xml</mime-type>
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/endpoint/WebContent/browse.jsp Wed Oct 03 15:52:08 2012 +0300 3.3 @@ -0,0 +1,86 @@ 3.4 +<%@page import="java.net.URLEncoder"%> 3.5 +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 3.6 +<%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%> 3.7 +<%@page import="org.springframework.web.context.WebApplicationContext"%> 3.8 +<%@page import="eu.earthobservatory.org.StrabonEndpoint.StrabonBeanWrapper"%> 3.9 +<%@page import="eu.earthobservatory.org.StrabonEndpoint.StrabonBeanWrapperConfiguration"%> 3.10 +<%@page import="java.util.List"%> 3.11 +<%@page import="java.util.Iterator"%> 3.12 +<jsp:directive.page import="eu.earthobservatory.org.StrabonEndpoint.Common"/> 3.13 +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 3.14 +<html> 3.15 +<head> 3.16 + <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> 3.17 + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 3.18 + <link rel="stylesheet" href="style.css" type="text/css" /> 3.19 + <script type="text/javascript" src="js/more_link.js"></script> 3.20 + <title>TELEIOS: Strabon Endpoint</title> 3.21 + <script> 3.22 + $(document).ready(function() { 3.23 + var showChar = 100; 3.24 + var ellipsestext = "..."; 3.25 + var moretext = "more"; 3.26 + var lesstext = "less"; 3.27 + $('.more').each(function() { 3.28 + var content = $(this).html(); 3.29 + 3.30 + if(content.length > showChar) { 3.31 + 3.32 + var c = content.substr(0, showChar); 3.33 + var h = content.substr(showChar-1, content.length - showChar); 3.34 + 3.35 + var html = c + '<span class="moreelipses">'+ellipsestext+'</span> <span class="morecontent"><span>' + h + '</span> <a href="" class="morelink">'+moretext+'</a></span>'; 3.36 + 3.37 + $(this).html(html); 3.38 + } 3.39 + 3.40 + }); 3.41 + 3.42 + $(".morelink").click(function(){ 3.43 + if($(this).hasClass("less")) { 3.44 + $(this).removeClass("less"); 3.45 + $(this).html(moretext); 3.46 + } else { 3.47 + $(this).addClass("less"); 3.48 + $(this).html(lesstext); 3.49 + } 3.50 + $(this).parent().prev().toggle(); 3.51 + $(this).prev().toggle(); 3.52 + return false; 3.53 + }); 3.54 + }); 3.55 +</script> 3.56 +</head> 3.57 +<body topmargin="0" leftmargin="0" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF"> 3.58 +<TABLE width="80%" BORDER=0 CELLPADDING=0 CELLSPACING=0> 3.59 + <TR> 3.60 + <TD height="1"></TD> 3.61 + </TR> 3.62 + <TR> 3.63 + <TD height="60" background="images/nav2_bg.gif"> 3.64 + <table width="100%" border=0> 3.65 + <tr> 3.66 + <td width="1"><img src="images/nav2_bg.gif" width="1" height="60"></td> 3.67 + <td valign="top" width="50px"><a href="query.jsp"><img border="0" src="images/teleios_logo.png" /></a></td> 3.68 + <td valign="top" align="left"> 3.69 + <span class="logo"><a href="query.jsp"> stSPARQL Endpoint</a></span><br><span class="style4"></span></td> 3.70 + </tr> 3.71 + </table> 3.72 + </TD> 3.73 + </TR> 3.74 +</TABLE> 3.75 + <h1>About: </h1> 3.76 + <a href=""><%=request.getAttribute("resource")%></a> 3.77 + <div id="response"> 3.78 + <!-- Response --> 3.79 + <% if (request.getAttribute("response") != null) { 3.80 + if (Common.getHTMLFormat().equals(request.getParameter("format"))) {%> 3.81 + <%=request.getAttribute("response")%> 3.82 + <%} else { %> 3.83 + <PRE><%=request.getAttribute("response") %></PRE> 3.84 + <%}%> 3.85 + <%}%> 3.86 + </div> 3.87 +</body> 3.88 + 3.89 +</html> 3.90 \ No newline at end of file
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/endpoint/WebContent/js/more_link.js Wed Oct 03 15:52:08 2012 +0300 4.3 @@ -0,0 +1,9440 @@ 4.4 +/*! 4.5 + * jQuery JavaScript Library v1.8.2 4.6 + * http://jquery.com/ 4.7 + * 4.8 + * Includes Sizzle.js 4.9 + * http://sizzlejs.com/ 4.10 + * 4.11 + * Copyright 2012 jQuery Foundation and other contributors 4.12 + * Released under the MIT license 4.13 + * http://jquery.org/license 4.14 + * 4.15 + * Date: Thu Sep 20 2012 21:13:05 GMT-0400 (Eastern Daylight Time) 4.16 + */ 4.17 +(function( window, undefined ) { 4.18 +var 4.19 + // A central reference to the root jQuery(document) 4.20 + rootjQuery, 4.21 + 4.22 + // The deferred used on DOM ready 4.23 + readyList, 4.24 + 4.25 + // Use the correct document accordingly with window argument (sandbox) 4.26 + document = window.document, 4.27 + location = window.location, 4.28 + navigator = window.navigator, 4.29 + 4.30 + // Map over jQuery in case of overwrite 4.31 + _jQuery = window.jQuery, 4.32 + 4.33 + // Map over the $ in case of overwrite 4.34 + _$ = window.$, 4.35 + 4.36 + // Save a reference to some core methods 4.37 + core_push = Array.prototype.push, 4.38 + core_slice = Array.prototype.slice, 4.39 + core_indexOf = Array.prototype.indexOf, 4.40 + core_toString = Object.prototype.toString, 4.41 + core_hasOwn = Object.prototype.hasOwnProperty, 4.42 + core_trim = String.prototype.trim, 4.43 + 4.44 + // Define a local copy of jQuery 4.45 + jQuery = function( selector, context ) { 4.46 + // The jQuery object is actually just the init constructor 'enhanced' 4.47 + return new jQuery.fn.init( selector, context, rootjQuery ); 4.48 + }, 4.49 + 4.50 + // Used for matching numbers 4.51 + core_pnum = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source, 4.52 + 4.53 + // Used for detecting and trimming whitespace 4.54 + core_rnotwhite = /\S/, 4.55 + core_rspace = /\s+/, 4.56 + 4.57 + // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) 4.58 + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, 4.59 + 4.60 + // A simple way to check for HTML strings 4.61 + // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) 4.62 + rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, 4.63 + 4.64 + // Match a standalone tag 4.65 + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, 4.66 + 4.67 + // JSON RegExp 4.68 + rvalidchars = /^[\],:{}\s]*$/, 4.69 + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, 4.70 + rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, 4.71 + rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g, 4.72 + 4.73 + // Matches dashed string for camelizing 4.74 + rmsPrefix = /^-ms-/, 4.75 + rdashAlpha = /-([\da-z])/gi, 4.76 + 4.77 + // Used by jQuery.camelCase as callback to replace() 4.78 + fcamelCase = function( all, letter ) { 4.79 + return ( letter + "" ).toUpperCase(); 4.80 + }, 4.81 + 4.82 + // The ready event handler and self cleanup method 4.83 + DOMContentLoaded = function() { 4.84 + if ( document.addEventListener ) { 4.85 + document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); 4.86 + jQuery.ready(); 4.87 + } else if ( document.readyState === "complete" ) { 4.88 + // we're here because readyState === "complete" in oldIE 4.89 + // which is good enough for us to call the dom ready! 4.90 + document.detachEvent( "onreadystatechange", DOMContentLoaded ); 4.91 + jQuery.ready(); 4.92 + } 4.93 + }, 4.94 + 4.95 + // [[Class]] -> type pairs 4.96 + class2type = {}; 4.97 + 4.98 +jQuery.fn = jQuery.prototype = { 4.99 + constructor: jQuery, 4.100 + init: function( selector, context, rootjQuery ) { 4.101 + var match, elem, ret, doc; 4.102 + 4.103 + // Handle $(""), $(null), $(undefined), $(false) 4.104 + if ( !selector ) { 4.105 + return this; 4.106 + } 4.107 + 4.108 + // Handle $(DOMElement) 4.109 + if ( selector.nodeType ) { 4.110 + this.context = this[0] = selector; 4.111 + this.length = 1; 4.112 + return this; 4.113 + } 4.114 + 4.115 + // Handle HTML strings 4.116 + if ( typeof selector === "string" ) { 4.117 + if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { 4.118 + // Assume that strings that start and end with <> are HTML and skip the regex check 4.119 + match = [ null, selector, null ]; 4.120 + 4.121 + } else { 4.122 + match = rquickExpr.exec( selector ); 4.123 + } 4.124 + 4.125 + // Match html or make sure no context is specified for #id 4.126 + if ( match && (match[1] || !context) ) { 4.127 + 4.128 + // HANDLE: $(html) -> $(array) 4.129 + if ( match[1] ) { 4.130 + context = context instanceof jQuery ? context[0] : context; 4.131 + doc = ( context && context.nodeType ? context.ownerDocument || context : document ); 4.132 + 4.133 + // scripts is true for back-compat 4.134 + selector = jQuery.parseHTML( match[1], doc, true ); 4.135 + if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { 4.136 + this.attr.call( selector, context, true ); 4.137 + } 4.138 + 4.139 + return jQuery.merge( this, selector ); 4.140 + 4.141 + // HANDLE: $(#id) 4.142 + } else { 4.143 + elem = document.getElementById( match[2] ); 4.144 + 4.145 + // Check parentNode to catch when Blackberry 4.6 returns 4.146 + // nodes that are no longer in the document #6963 4.147 + if ( elem && elem.parentNode ) { 4.148 + // Handle the case where IE and Opera return items 4.149 + // by name instead of ID 4.150 + if ( elem.id !== match[2] ) { 4.151 + return rootjQuery.find( selector ); 4.152 + } 4.153 + 4.154 + // Otherwise, we inject the element directly into the jQuery object 4.155 + this.length = 1; 4.156 + this[0] = elem; 4.157 + } 4.158 + 4.159 + this.context = document; 4.160 + this.selector = selector; 4.161 + return this; 4.162 + } 4.163 + 4.164 + // HANDLE: $(expr, $(...)) 4.165 + } else if ( !context || context.jquery ) { 4.166 + return ( context || rootjQuery ).find( selector ); 4.167 + 4.168 + // HANDLE: $(expr, context) 4.169 + // (which is just equivalent to: $(context).find(expr) 4.170 + } else { 4.171 + return this.constructor( context ).find( selector ); 4.172 + } 4.173 + 4.174 + // HANDLE: $(function) 4.175 + // Shortcut for document ready 4.176 + } else if ( jQuery.isFunction( selector ) ) { 4.177 + return rootjQuery.ready( selector ); 4.178 + } 4.179 + 4.180 + if ( selector.selector !== undefined ) { 4.181 + this.selector = selector.selector; 4.182 + this.context = selector.context; 4.183 + } 4.184 + 4.185 + return jQuery.makeArray( selector, this ); 4.186 + }, 4.187 + 4.188 + // Start with an empty selector 4.189 + selector: "", 4.190 + 4.191 + // The current version of jQuery being used 4.192 + jquery: "1.8.2", 4.193 + 4.194 + // The default length of a jQuery object is 0 4.195 + length: 0, 4.196 + 4.197 + // The number of elements contained in the matched element set 4.198 + size: function() { 4.199 + return this.length; 4.200 + }, 4.201 + 4.202 + toArray: function() { 4.203 + return core_slice.call( this ); 4.204 + }, 4.205 + 4.206 + // Get the Nth element in the matched element set OR 4.207 + // Get the whole matched element set as a clean array 4.208 + get: function( num ) { 4.209 + return num == null ? 4.210 + 4.211 + // Return a 'clean' array 4.212 + this.toArray() : 4.213 + 4.214 + // Return just the object 4.215 + ( num < 0 ? this[ this.length + num ] : this[ num ] ); 4.216 + }, 4.217 + 4.218 + // Take an array of elements and push it onto the stack 4.219 + // (returning the new matched element set) 4.220 + pushStack: function( elems, name, selector ) { 4.221 + 4.222 + // Build a new jQuery matched element set 4.223 + var ret = jQuery.merge( this.constructor(), elems ); 4.224 + 4.225 + // Add the old object onto the stack (as a reference) 4.226 + ret.prevObject = this; 4.227 + 4.228 + ret.context = this.context; 4.229 + 4.230 + if ( name === "find" ) { 4.231 + ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; 4.232 + } else if ( name ) { 4.233 + ret.selector = this.selector + "." + name + "(" + selector + ")"; 4.234 + } 4.235 + 4.236 + // Return the newly-formed element set 4.237 + return ret; 4.238 + }, 4.239 + 4.240 + // Execute a callback for every element in the matched set. 4.241 + // (You can seed the arguments with an array of args, but this is 4.242 + // only used internally.) 4.243 + each: function( callback, args ) { 4.244 + return jQuery.each( this, callback, args ); 4.245 + }, 4.246 + 4.247 + ready: function( fn ) { 4.248 + // Add the callback 4.249 + jQuery.ready.promise().done( fn ); 4.250 + 4.251 + return this; 4.252 + }, 4.253 + 4.254 + eq: function( i ) { 4.255 + i = +i; 4.256 + return i === -1 ? 4.257 + this.slice( i ) : 4.258 + this.slice( i, i + 1 ); 4.259 + }, 4.260 + 4.261 + first: function() { 4.262 + return this.eq( 0 ); 4.263 + }, 4.264 + 4.265 + last: function() { 4.266 + return this.eq( -1 ); 4.267 + }, 4.268 + 4.269 + slice: function() { 4.270 + return this.pushStack( core_slice.apply( this, arguments ), 4.271 + "slice", core_slice.call(arguments).join(",") ); 4.272 + }, 4.273 + 4.274 + map: function( callback ) { 4.275 + return this.pushStack( jQuery.map(this, function( elem, i ) { 4.276 + return callback.call( elem, i, elem ); 4.277 + })); 4.278 + }, 4.279 + 4.280 + end: function() { 4.281 + return this.prevObject || this.constructor(null); 4.282 + }, 4.283 + 4.284 + // For internal use only. 4.285 + // Behaves like an Array's method, not like a jQuery method. 4.286 + push: core_push, 4.287 + sort: [].sort, 4.288 + splice: [].splice 4.289 +}; 4.290 + 4.291 +// Give the init function the jQuery prototype for later instantiation 4.292 +jQuery.fn.init.prototype = jQuery.fn; 4.293 + 4.294 +jQuery.extend = jQuery.fn.extend = function() { 4.295 + var options, name, src, copy, copyIsArray, clone, 4.296 + target = arguments[0] || {}, 4.297 + i = 1, 4.298 + length = arguments.length, 4.299 + deep = false; 4.300 + 4.301 + // Handle a deep copy situation 4.302 + if ( typeof target === "boolean" ) { 4.303 + deep = target; 4.304 + target = arguments[1] || {}; 4.305 + // skip the boolean and the target 4.306 + i = 2; 4.307 + } 4.308 + 4.309 + // Handle case when target is a string or something (possible in deep copy) 4.310 + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { 4.311 + target = {}; 4.312 + } 4.313 + 4.314 + // extend jQuery itself if only one argument is passed 4.315 + if ( length === i ) { 4.316 + target = this; 4.317 + --i; 4.318 + } 4.319 + 4.320 + for ( ; i < length; i++ ) { 4.321 + // Only deal with non-null/undefined values 4.322 + if ( (options = arguments[ i ]) != null ) { 4.323 + // Extend the base object 4.324 + for ( name in options ) { 4.325 + src = target[ name ]; 4.326 + copy = options[ name ]; 4.327 + 4.328 + // Prevent never-ending loop 4.329 + if ( target === copy ) { 4.330 + continue; 4.331 + } 4.332 + 4.333 + // Recurse if we're merging plain objects or arrays 4.334 + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { 4.335 + if ( copyIsArray ) { 4.336 + copyIsArray = false; 4.337 + clone = src && jQuery.isArray(src) ? src : []; 4.338 + 4.339 + } else { 4.340 + clone = src && jQuery.isPlainObject(src) ? src : {}; 4.341 + } 4.342 + 4.343 + // Never move original objects, clone them 4.344 + target[ name ] = jQuery.extend( deep, clone, copy ); 4.345 + 4.346 + // Don't bring in undefined values 4.347 + } else if ( copy !== undefined ) { 4.348 + target[ name ] = copy; 4.349 + } 4.350 + } 4.351 + } 4.352 + } 4.353 + 4.354 + // Return the modified object 4.355 + return target; 4.356 +}; 4.357 + 4.358 +jQuery.extend({ 4.359 + noConflict: function( deep ) { 4.360 + if ( window.$ === jQuery ) { 4.361 + window.$ = _$; 4.362 + } 4.363 + 4.364 + if ( deep && window.jQuery === jQuery ) { 4.365 + window.jQuery = _jQuery; 4.366 + } 4.367 + 4.368 + return jQuery; 4.369 + }, 4.370 + 4.371 + // Is the DOM ready to be used? Set to true once it occurs. 4.372 + isReady: false, 4.373 + 4.374 + // A counter to track how many items to wait for before 4.375 + // the ready event fires. See #6781 4.376 + readyWait: 1, 4.377 + 4.378 + // Hold (or release) the ready event 4.379 + holdReady: function( hold ) { 4.380 + if ( hold ) { 4.381 + jQuery.readyWait++; 4.382 + } else { 4.383 + jQuery.ready( true ); 4.384 + } 4.385 + }, 4.386 + 4.387 + // Handle when the DOM is ready 4.388 + ready: function( wait ) { 4.389 + 4.390 + // Abort if there are pending holds or we're already ready 4.391 + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { 4.392 + return; 4.393 + } 4.394 + 4.395 + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). 4.396 + if ( !document.body ) { 4.397 + return setTimeout( jQuery.ready, 1 ); 4.398 + } 4.399 + 4.400 + // Remember that the DOM is ready 4.401 + jQuery.isReady = true; 4.402 + 4.403 + // If a normal DOM Ready event fired, decrement, and wait if need be 4.404 + if ( wait !== true && --jQuery.readyWait > 0 ) { 4.405 + return; 4.406 + } 4.407 + 4.408 + // If there are functions bound, to execute 4.409 + readyList.resolveWith( document, [ jQuery ] ); 4.410 + 4.411 + // Trigger any bound ready events 4.412 + if ( jQuery.fn.trigger ) { 4.413 + jQuery( document ).trigger("ready").off("ready"); 4.414 + } 4.415 + }, 4.416 + 4.417 + // See test/unit/core.js for details concerning isFunction. 4.418 + // Since version 1.3, DOM methods and functions like alert 4.419 + // aren't supported. They return false on IE (#2968). 4.420 + isFunction: function( obj ) { 4.421 + return jQuery.type(obj) === "function"; 4.422 + }, 4.423 + 4.424 + isArray: Array.isArray || function( obj ) { 4.425 + return jQuery.type(obj) === "array"; 4.426 + }, 4.427 + 4.428 + isWindow: function( obj ) { 4.429 + return obj != null && obj == obj.window; 4.430 + }, 4.431 + 4.432 + isNumeric: function( obj ) { 4.433 + return !isNaN( parseFloat(obj) ) && isFinite( obj ); 4.434 + }, 4.435 + 4.436 + type: function( obj ) { 4.437 + return obj == null ? 4.438 + String( obj ) : 4.439 + class2type[ core_toString.call(obj) ] || "object"; 4.440 + }, 4.441 + 4.442 + isPlainObject: function( obj ) { 4.443 + // Must be an Object. 4.444 + // Because of IE, we also have to check the presence of the constructor property. 4.445 + // Make sure that DOM nodes and window objects don't pass through, as well 4.446 + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { 4.447 + return false; 4.448 + } 4.449 + 4.450 + try { 4.451 + // Not own constructor property must be Object 4.452 + if ( obj.constructor && 4.453 + !core_hasOwn.call(obj, "constructor") && 4.454 + !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { 4.455 + return false; 4.456 + } 4.457 + } catch ( e ) { 4.458 + // IE8,9 Will throw exceptions on certain host objects #9897 4.459 + return false; 4.460 + } 4.461 + 4.462 + // Own properties are enumerated firstly, so to speed up, 4.463 + // if last one is own, then all properties are own. 4.464 + 4.465 + var key; 4.466 + for ( key in obj ) {} 4.467 + 4.468 + return key === undefined || core_hasOwn.call( obj, key ); 4.469 + }, 4.470 + 4.471 + isEmptyObject: function( obj ) { 4.472 + var name; 4.473 + for ( name in obj ) { 4.474 + return false; 4.475 + } 4.476 + return true; 4.477 + }, 4.478 + 4.479 + error: function( msg ) { 4.480 + throw new Error( msg ); 4.481 + }, 4.482 + 4.483 + // data: string of html 4.484 + // context (optional): If specified, the fragment will be created in this context, defaults to document 4.485 + // scripts (optional): If true, will include scripts passed in the html string 4.486 + parseHTML: function( data, context, scripts ) { 4.487 + var parsed; 4.488 + if ( !data || typeof data !== "string" ) { 4.489 + return null; 4.490 + } 4.491 + if ( typeof context === "boolean" ) { 4.492 + scripts = context; 4.493 + context = 0; 4.494 + } 4.495 + context = context || document; 4.496 + 4.497 + // Single tag 4.498 + if ( (parsed = rsingleTag.exec( data )) ) { 4.499 + return [ context.createElement( parsed[1] ) ]; 4.500 + } 4.501 + 4.502 + parsed = jQuery.buildFragment( [ data ], context, scripts ? null : [] ); 4.503 + return jQuery.merge( [], 4.504 + (parsed.cacheable ? jQuery.clone( parsed.fragment ) : parsed.fragment).childNodes ); 4.505 + }, 4.506 + 4.507 + parseJSON: function( data ) { 4.508 + if ( !data || typeof data !== "string") { 4.509 + return null; 4.510 + } 4.511 + 4.512 + // Make sure leading/trailing whitespace is removed (IE can't handle it) 4.513 + data = jQuery.trim( data ); 4.514 + 4.515 + // Attempt to parse using the native JSON parser first 4.516 + if ( window.JSON && window.JSON.parse ) { 4.517 + return window.JSON.parse( data ); 4.518 + } 4.519 + 4.520 + // Make sure the incoming data is actual JSON 4.521 + // Logic borrowed from http://json.org/json2.js 4.522 + if ( rvalidchars.test( data.replace( rvalidescape, "@" ) 4.523 + .replace( rvalidtokens, "]" ) 4.524 + .replace( rvalidbraces, "")) ) { 4.525 + 4.526 + return ( new Function( "return " + data ) )(); 4.527 + 4.528 + } 4.529 + jQuery.error( "Invalid JSON: " + data ); 4.530 + }, 4.531 + 4.532 + // Cross-browser xml parsing 4.533 + parseXML: function( data ) { 4.534 + var xml, tmp; 4.535 + if ( !data || typeof data !== "string" ) { 4.536 + return null; 4.537 + } 4.538 + try { 4.539 + if ( window.DOMParser ) { // Standard 4.540 + tmp = new DOMParser(); 4.541 + xml = tmp.parseFromString( data , "text/xml" ); 4.542 + } else { // IE 4.543 + xml = new ActiveXObject( "Microsoft.XMLDOM" ); 4.544 + xml.async = "false"; 4.545 + xml.loadXML( data ); 4.546 + } 4.547 + } catch( e ) { 4.548 + xml = undefined; 4.549 + } 4.550 + if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { 4.551 + jQuery.error( "Invalid XML: " + data ); 4.552 + } 4.553 + return xml; 4.554 + }, 4.555 + 4.556 + noop: function() {}, 4.557 + 4.558 + // Evaluates a script in a global context 4.559 + // Workarounds based on findings by Jim Driscoll 4.560 + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context 4.561 + globalEval: function( data ) { 4.562 + if ( data && core_rnotwhite.test( data ) ) { 4.563 + // We use execScript on Internet Explorer 4.564 + // We use an anonymous function so that context is window 4.565 + // rather than jQuery in Firefox 4.566 + ( window.execScript || function( data ) { 4.567 + window[ "eval" ].call( window, data ); 4.568 + } )( data ); 4.569 + } 4.570 + }, 4.571 + 4.572 + // Convert dashed to camelCase; used by the css and data modules 4.573 + // Microsoft forgot to hump their vendor prefix (#9572) 4.574 + camelCase: function( string ) { 4.575 + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); 4.576 + }, 4.577 + 4.578 + nodeName: function( elem, name ) { 4.579 + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); 4.580 + }, 4.581 + 4.582 + // args is for internal usage only 4.583 + each: function( obj, callback, args ) { 4.584 + var name, 4.585 + i = 0, 4.586 + length = obj.length, 4.587 + isObj = length === undefined || jQuery.isFunction( obj ); 4.588 + 4.589 + if ( args ) { 4.590 + if ( isObj ) { 4.591 + for ( name in obj ) { 4.592 + if ( callback.apply( obj[ name ], args ) === false ) { 4.593 + break; 4.594 + } 4.595 + } 4.596 + } else { 4.597 + for ( ; i < length; ) { 4.598 + if ( callback.apply( obj[ i++ ], args ) === false ) { 4.599 + break; 4.600 + } 4.601 + } 4.602 + } 4.603 + 4.604 + // A special, fast, case for the most common use of each 4.605 + } else { 4.606 + if ( isObj ) { 4.607 + for ( name in obj ) { 4.608 + if ( callback.call( obj[ name ], name, obj[ name ] ) === false ) { 4.609 + break; 4.610 + } 4.611 + } 4.612 + } else { 4.613 + for ( ; i < length; ) { 4.614 + if ( callback.call( obj[ i ], i, obj[ i++ ] ) === false ) { 4.615 + break; 4.616 + } 4.617 + } 4.618 + } 4.619 + } 4.620 + 4.621 + return obj; 4.622 + }, 4.623 + 4.624 + // Use native String.trim function wherever possible 4.625 + trim: core_trim && !core_trim.call("\uFEFF\xA0") ? 4.626 + function( text ) { 4.627 + return text == null ? 4.628 + "" : 4.629 + core_trim.call( text ); 4.630 + } : 4.631 + 4.632 + // Otherwise use our own trimming functionality 4.633 + function( text ) { 4.634 + return text == null ? 4.635 + "" : 4.636 + ( text + "" ).replace( rtrim, "" ); 4.637 + }, 4.638 + 4.639 + // results is for internal usage only 4.640 + makeArray: function( arr, results ) { 4.641 + var type, 4.642 + ret = results || []; 4.643 + 4.644 + if ( arr != null ) { 4.645 + // The window, strings (and functions) also have 'length' 4.646 + // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 4.647 + type = jQuery.type( arr ); 4.648 + 4.649 + if ( arr.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( arr ) ) { 4.650 + core_push.call( ret, arr ); 4.651 + } else { 4.652 + jQuery.merge( ret, arr ); 4.653 + } 4.654 + } 4.655 + 4.656 + return ret; 4.657 + }, 4.658 + 4.659 + inArray: function( elem, arr, i ) { 4.660 + var len; 4.661 + 4.662 + if ( arr ) { 4.663 + if ( core_indexOf ) { 4.664 + return core_indexOf.call( arr, elem, i ); 4.665 + } 4.666 + 4.667 + len = arr.length; 4.668 + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; 4.669 + 4.670 + for ( ; i < len; i++ ) { 4.671 + // Skip accessing in sparse arrays 4.672 + if ( i in arr && arr[ i ] === elem ) { 4.673 + return i; 4.674 + } 4.675 + } 4.676 + } 4.677 + 4.678 + return -1; 4.679 + }, 4.680 + 4.681 + merge: function( first, second ) { 4.682 + var l = second.length, 4.683 + i = first.length, 4.684 + j = 0; 4.685 + 4.686 + if ( typeof l === "number" ) { 4.687 + for ( ; j < l; j++ ) { 4.688 + first[ i++ ] = second[ j ]; 4.689 + } 4.690 + 4.691 + } else { 4.692 + while ( second[j] !== undefined ) { 4.693 + first[ i++ ] = second[ j++ ]; 4.694 + } 4.695 + } 4.696 + 4.697 + first.length = i; 4.698 + 4.699 + return first; 4.700 + }, 4.701 + 4.702 + grep: function( elems, callback, inv ) { 4.703 + var retVal, 4.704 + ret = [], 4.705 + i = 0, 4.706 + length = elems.length; 4.707 + inv = !!inv; 4.708 + 4.709 + // Go through the array, only saving the items 4.710 + // that pass the validator function 4.711 + for ( ; i < length; i++ ) { 4.712 + retVal = !!callback( elems[ i ], i ); 4.713 + if ( inv !== retVal ) { 4.714 + ret.push( elems[ i ] ); 4.715 + } 4.716 + } 4.717 + 4.718 + return ret; 4.719 + }, 4.720 + 4.721 + // arg is for internal usage only 4.722 + map: function( elems, callback, arg ) { 4.723 + var value, key, 4.724 + ret = [], 4.725 + i = 0, 4.726 + length = elems.length, 4.727 + // jquery objects are treated as arrays 4.728 + isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; 4.729 + 4.730 + // Go through the array, translating each of the items to their 4.731 + if ( isArray ) { 4.732 + for ( ; i < length; i++ ) { 4.733 + value = callback( elems[ i ], i, arg ); 4.734 + 4.735 + if ( value != null ) { 4.736 + ret[ ret.length ] = value; 4.737 + } 4.738 + } 4.739 + 4.740 + // Go through every key on the object, 4.741 + } else { 4.742 + for ( key in elems ) { 4.743 + value = callback( elems[ key ], key, arg ); 4.744 + 4.745 + if ( value != null ) { 4.746 + ret[ ret.length ] = value; 4.747 + } 4.748 + } 4.749 + } 4.750 + 4.751 + // Flatten any nested arrays 4.752 + return ret.concat.apply( [], ret ); 4.753 + }, 4.754 + 4.755 + // A global GUID counter for objects 4.756 + guid: 1, 4.757 + 4.758 + // Bind a function to a context, optionally partially applying any 4.759 + // arguments. 4.760 + proxy: function( fn, context ) { 4.761 + var tmp, args, proxy; 4.762 + 4.763 + if ( typeof context === "string" ) { 4.764 + tmp = fn[ context ]; 4.765 + context = fn; 4.766 + fn = tmp; 4.767 + } 4.768 + 4.769 + // Quick check to determine if target is callable, in the spec 4.770 + // this throws a TypeError, but we will just return undefined. 4.771 + if ( !jQuery.isFunction( fn ) ) { 4.772 + return undefined; 4.773 + } 4.774 + 4.775 + // Simulated bind 4.776 + args = core_slice.call( arguments, 2 ); 4.777 + proxy = function() { 4.778 + return fn.apply( context, args.concat( core_slice.call( arguments ) ) ); 4.779 + }; 4.780 + 4.781 + // Set the guid of unique handler to the same of original handler, so it can be removed 4.782 + proxy.guid = fn.guid = fn.guid || jQuery.guid++; 4.783 + 4.784 + return proxy; 4.785 + }, 4.786 + 4.787 + // Multifunctional method to get and set values of a collection 4.788 + // The value/s can optionally be executed if it's a function 4.789 + access: function( elems, fn, key, value, chainable, emptyGet, pass ) { 4.790 + var exec, 4.791 + bulk = key == null, 4.792 + i = 0, 4.793 + length = elems.length; 4.794 + 4.795 + // Sets many values 4.796 + if ( key && typeof key === "object" ) { 4.797 + for ( i in key ) { 4.798 + jQuery.access( elems, fn, i, key[i], 1, emptyGet, value ); 4.799 + } 4.800 + chainable = 1; 4.801 + 4.802 + // Sets one value 4.803 + } else if ( value !== undefined ) { 4.804 + // Optionally, function values get executed if exec is true 4.805 + exec = pass === undefined && jQuery.isFunction( value ); 4.806 + 4.807 + if ( bulk ) { 4.808 + // Bulk operations only iterate when executing function values 4.809 + if ( exec ) { 4.810 + exec = fn; 4.811 + fn = function( elem, key, value ) { 4.812 + return exec.call( jQuery( elem ), value ); 4.813 + }; 4.814 + 4.815 + // Otherwise they run against the entire set 4.816 + } else { 4.817 + fn.call( elems, value ); 4.818 + fn = null; 4.819 + } 4.820 + } 4.821 + 4.822 + if ( fn ) { 4.823 + for (; i < length; i++ ) { 4.824 + fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); 4.825 + } 4.826 + } 4.827 + 4.828 + chainable = 1; 4.829 + } 4.830 + 4.831 + return chainable ? 4.832 + elems : 4.833 + 4.834 + // Gets 4.835 + bulk ? 4.836 + fn.call( elems ) : 4.837 + length ? fn( elems[0], key ) : emptyGet; 4.838 + }, 4.839 + 4.840 + now: function() { 4.841 + return ( new Date() ).getTime(); 4.842 + } 4.843 +}); 4.844 + 4.845 +jQuery.ready.promise = function( obj ) { 4.846 + if ( !readyList ) { 4.847 + 4.848 + readyList = jQuery.Deferred(); 4.849 + 4.850 + // Catch cases where $(document).ready() is called after the browser event has already occurred. 4.851 + // we once tried to use readyState "interactive" here, but it caused issues like the one 4.852 + // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 4.853 + if ( document.readyState === "complete" ) { 4.854 + // Handle it asynchronously to allow scripts the opportunity to delay ready 4.855 + setTimeout( jQuery.ready, 1 ); 4.856 + 4.857 + // Standards-based browsers support DOMContentLoaded 4.858 + } else if ( document.addEventListener ) { 4.859 + // Use the handy event callback 4.860 + document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); 4.861 + 4.862 + // A fallback to window.onload, that will always work 4.863 + window.addEventListener( "load", jQuery.ready, false ); 4.864 + 4.865 + // If IE event model is used 4.866 + } else { 4.867 + // Ensure firing before onload, maybe late but safe also for iframes 4.868 + document.attachEvent( "onreadystatechange", DOMContentLoaded ); 4.869 + 4.870 + // A fallback to window.onload, that will always work 4.871 + window.attachEvent( "onload", jQuery.ready ); 4.872 + 4.873 + // If IE and not a frame 4.874 + // continually check to see if the document is ready 4.875 + var top = false; 4.876 + 4.877 + try { 4.878 + top = window.frameElement == null && document.documentElement; 4.879 + } catch(e) {} 4.880 + 4.881 + if ( top && top.doScroll ) { 4.882 + (function doScrollCheck() { 4.883 + if ( !jQuery.isReady ) { 4.884 + 4.885 + try { 4.886 + // Use the trick by Diego Perini 4.887 + // http://javascript.nwbox.com/IEContentLoaded/ 4.888 + top.doScroll("left"); 4.889 + } catch(e) { 4.890 + return setTimeout( doScrollCheck, 50 ); 4.891 + } 4.892 + 4.893 + // and execute any waiting functions 4.894 + jQuery.ready(); 4.895 + } 4.896 + })(); 4.897 + } 4.898 + } 4.899 + } 4.900 + return readyList.promise( obj ); 4.901 +}; 4.902 + 4.903 +// Populate the class2type map 4.904 +jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { 4.905 + class2type[ "[object " + name + "]" ] = name.toLowerCase(); 4.906 +}); 4.907 + 4.908 +// All jQuery objects should point back to these 4.909 +rootjQuery = jQuery(document); 4.910 +// String to Object options format cache 4.911 +var optionsCache = {}; 4.912 + 4.913 +// Convert String-formatted options into Object-formatted ones and store in cache 4.914 +function createOptions( options ) { 4.915 + var object = optionsCache[ options ] = {}; 4.916 + jQuery.each( options.split( core_rspace ), function( _, flag ) { 4.917 + object[ flag ] = true; 4.918 + }); 4.919 + return object; 4.920 +} 4.921 + 4.922 +/* 4.923 + * Create a callback list using the following parameters: 4.924 + * 4.925 + * options: an optional list of space-separated options that will change how 4.926 + * the callback list behaves or a more traditional option object 4.927 + * 4.928 + * By default a callback list will act like an event callback list and can be 4.929 + * "fired" multiple times. 4.930 + * 4.931 + * Possible options: 4.932 + * 4.933 + * once: will ensure the callback list can only be fired once (like a Deferred) 4.934 + * 4.935 + * memory: will keep track of previous values and will call any callback added 4.936 + * after the list has been fired right away with the latest "memorized" 4.937 + * values (like a Deferred) 4.938 + * 4.939 + * unique: will ensure a callback can only be added once (no duplicate in the list) 4.940 + * 4.941 + * stopOnFalse: interrupt callings when a callback returns false 4.942 + * 4.943 + */ 4.944 +jQuery.Callbacks = function( options ) { 4.945 + 4.946 + // Convert options from String-formatted to Object-formatted if needed 4.947 + // (we check in cache first) 4.948 + options = typeof options === "string" ? 4.949 + ( optionsCache[ options ] || createOptions( options ) ) : 4.950 + jQuery.extend( {}, options ); 4.951 + 4.952 + var // Last fire value (for non-forgettable lists) 4.953 + memory, 4.954 + // Flag to know if list was already fired 4.955 + fired, 4.956 + // Flag to know if list is currently firing 4.957 + firing, 4.958 + // First callback to fire (used internally by add and fireWith) 4.959 + firingStart, 4.960 + // End of the loop when firing 4.961 + firingLength, 4.962 + // Index of currently firing callback (modified by remove if needed) 4.963 + firingIndex, 4.964 + // Actual callback list 4.965 + list = [], 4.966 + // Stack of fire calls for repeatable lists 4.967 + stack = !options.once && [], 4.968 + // Fire callbacks 4.969 + fire = function( data ) { 4.970 + memory = options.memory && data; 4.971 + fired = true; 4.972 + firingIndex = firingStart || 0; 4.973 + firingStart = 0; 4.974 + firingLength = list.length; 4.975 + firing = true; 4.976 + for ( ; list && firingIndex < firingLength; firingIndex++ ) { 4.977 + if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { 4.978 + memory = false; // To prevent further calls using add 4.979 + break; 4.980 + } 4.981 + } 4.982 + firing = false; 4.983 + if ( list ) { 4.984 + if ( stack ) { 4.985 + if ( stack.length ) { 4.986 + fire( stack.shift() ); 4.987 + } 4.988 + } else if ( memory ) { 4.989 + list = []; 4.990 + } else { 4.991 + self.disable(); 4.992 + } 4.993 + } 4.994 + }, 4.995 + // Actual Callbacks object 4.996 + self = { 4.997 + // Add a callback or a collection of callbacks to the list 4.998 + add: function() { 4.999 + if ( list ) { 4.1000 + // First, we save the current length 4.1001 + var start = list.length; 4.1002 + (function add( args ) { 4.1003 + jQuery.each( args, function( _, arg ) { 4.1004 + var type = jQuery.type( arg ); 4.1005 + if ( type === "function" && ( !options.unique || !self.has( arg ) ) ) { 4.1006 + list.push( arg ); 4.1007 + } else if ( arg && arg.length && type !== "string" ) { 4.1008 + // Inspect recursively 4.1009 + add( arg ); 4.1010 + } 4.1011 + }); 4.1012 + })( arguments ); 4.1013 + // Do we need to add the callbacks to the 4.1014 + // current firing batch? 4.1015 + if ( firing ) { 4.1016 + firingLength = list.length; 4.1017 + // With memory, if we're not firing then 4.1018 + // we should call right away 4.1019 + } else if ( memory ) { 4.1020 + firingStart = start; 4.1021 + fire( memory ); 4.1022 + } 4.1023 + } 4.1024 + return this; 4.1025 + }, 4.1026 + // Remove a callback from the list 4.1027 + remove: function() { 4.1028 + if ( list ) { 4.1029 + jQuery.each( arguments, function( _, arg ) { 4.1030 + var index; 4.1031 + while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { 4.1032 + list.splice( index, 1 ); 4.1033 + // Handle firing indexes 4.1034 + if ( firing ) { 4.1035 + if ( index <= firingLength ) { 4.1036 + firingLength--; 4.1037 + } 4.1038 + if ( index <= firingIndex ) { 4.1039 + firingIndex--; 4.1040 + } 4.1041 + } 4.1042 + } 4.1043 + }); 4.1044 + } 4.1045 + return this; 4.1046 + }, 4.1047 + // Control if a given callback is in the list 4.1048 + has: function( fn ) { 4.1049 + return jQuery.inArray( fn, list ) > -1; 4.1050 + }, 4.1051 + // Remove all callbacks from the list 4.1052 + empty: function() { 4.1053 + list = []; 4.1054 + return this; 4.1055 + }, 4.1056 + // Have the list do nothing anymore 4.1057 + disable: function() { 4.1058 + list = stack = memory = undefined; 4.1059 + return this; 4.1060 + }, 4.1061 + // Is it disabled? 4.1062 + disabled: function() { 4.1063 + return !list; 4.1064 + }, 4.1065 + // Lock the list in its current state 4.1066 + lock: function() { 4.1067 + stack = undefined; 4.1068 + if ( !memory ) { 4.1069 + self.disable(); 4.1070 + } 4.1071 + return this; 4.1072 + }, 4.1073 + // Is it locked? 4.1074 + locked: function() { 4.1075 + return !stack; 4.1076 + }, 4.1077 + // Call all callbacks with the given context and arguments 4.1078 + fireWith: function( context, args ) { 4.1079 + args = args || []; 4.1080 + args = [ context, args.slice ? args.slice() : args ]; 4.1081 + if ( list && ( !fired || stack ) ) { 4.1082 + if ( firing ) { 4.1083 + stack.push( args ); 4.1084 + } else { 4.1085 + fire( args ); 4.1086 + } 4.1087 + } 4.1088 + return this; 4.1089 + }, 4.1090 + // Call all the callbacks with the given arguments 4.1091 + fire: function() { 4.1092 + self.fireWith( this, arguments ); 4.1093 + return this; 4.1094 + }, 4.1095 + // To know if the callbacks have already been called at least once 4.1096 + fired: function() { 4.1097 + return !!fired; 4.1098 + } 4.1099 + }; 4.1100 + 4.1101 + return self; 4.1102 +}; 4.1103 +jQuery.extend({ 4.1104 + 4.1105 + Deferred: function( func ) { 4.1106 + var tuples = [ 4.1107 + // action, add listener, listener list, final state 4.1108 + [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], 4.1109 + [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], 4.1110 + [ "notify", "progress", jQuery.Callbacks("memory") ] 4.1111 + ], 4.1112 + state = "pending", 4.1113 + promise = { 4.1114 + state: function() { 4.1115 + return state; 4.1116 + }, 4.1117 + always: function() { 4.1118 + deferred.done( arguments ).fail( arguments ); 4.1119 + return this; 4.1120 + }, 4.1121 + then: function( /* fnDone, fnFail, fnProgress */ ) { 4.1122 + var fns = arguments; 4.1123 + return jQuery.Deferred(function( newDefer ) { 4.1124 + jQuery.each( tuples, function( i, tuple ) { 4.1125 + var action = tuple[ 0 ], 4.1126 + fn = fns[ i ]; 4.1127 + // deferred[ done | fail | progress ] for forwarding actions to newDefer 4.1128 + deferred[ tuple[1] ]( jQuery.isFunction( fn ) ? 4.1129 + function() { 4.1130 + var returned = fn.apply( this, arguments ); 4.1131 + if ( returned && jQuery.isFunction( returned.promise ) ) { 4.1132 + returned.promise() 4.1133 + .done( newDefer.resolve ) 4.1134 + .fail( newDefer.reject ) 4.1135 + .progress( newDefer.notify ); 4.1136 + } else { 4.1137 + newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); 4.1138 + } 4.1139 + } : 4.1140 + newDefer[ action ] 4.1141 + ); 4.1142 + }); 4.1143 + fns = null; 4.1144 + }).promise(); 4.1145 + }, 4.1146 + // Get a promise for this deferred 4.1147 + // If obj is provided, the promise aspect is added to the object 4.1148 + promise: function( obj ) { 4.1149 + return obj != null ? jQuery.extend( obj, promise ) : promise; 4.1150 + } 4.1151 + }, 4.1152 + deferred = {}; 4.1153 + 4.1154 + // Keep pipe for back-compat 4.1155 + promise.pipe = promise.then; 4.1156 + 4.1157 + // Add list-specific methods 4.1158 + jQuery.each( tuples, function( i, tuple ) { 4.1159 + var list = tuple[ 2 ], 4.1160 + stateString = tuple[ 3 ]; 4.1161 + 4.1162 + // promise[ done | fail | progress ] = list.add 4.1163 + promise[ tuple[1] ] = list.add; 4.1164 + 4.1165 + // Handle state 4.1166 + if ( stateString ) { 4.1167 + list.add(function() { 4.1168 + // state = [ resolved | rejected ] 4.1169 + state = stateString; 4.1170 + 4.1171 + // [ reject_list | resolve_list ].disable; progress_list.lock 4.1172 + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); 4.1173 + } 4.1174 + 4.1175 + // deferred[ resolve | reject | notify ] = list.fire 4.1176 + deferred[ tuple[0] ] = list.fire; 4.1177 + deferred[ tuple[0] + "With" ] = list.fireWith; 4.1178 + }); 4.1179 + 4.1180 + // Make the deferred a promise 4.1181 + promise.promise( deferred ); 4.1182 + 4.1183 + // Call given func if any 4.1184 + if ( func ) { 4.1185 + func.call( deferred, deferred ); 4.1186 + } 4.1187 + 4.1188 + // All done! 4.1189 + return deferred; 4.1190 + }, 4.1191 + 4.1192 + // Deferred helper 4.1193 + when: function( subordinate /* , ..., subordinateN */ ) { 4.1194 + var i = 0, 4.1195 + resolveValues = core_slice.call( arguments ), 4.1196 + length = resolveValues.length, 4.1197 + 4.1198 + // the count of uncompleted subordinates 4.1199 + remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, 4.1200 + 4.1201 + // the master Deferred. If resolveValues consist of only a single Deferred, just use that. 4.1202 + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), 4.1203 + 4.1204 + // Update function for both resolve and progress values 4.1205 + updateFunc = function( i, contexts, values ) { 4.1206 + return function( value ) { 4.1207 + contexts[ i ] = this; 4.1208 + values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; 4.1209 + if( values === progressValues ) { 4.1210 + deferred.notifyWith( contexts, values ); 4.1211 + } else if ( !( --remaining ) ) { 4.1212 + deferred.resolveWith( contexts, values ); 4.1213 + } 4.1214 + }; 4.1215 + }, 4.1216 + 4.1217 + progressValues, progressContexts, resolveContexts; 4.1218 + 4.1219 + // add listeners to Deferred subordinates; treat others as resolved 4.1220 + if ( length > 1 ) { 4.1221 + progressValues = new Array( length ); 4.1222 + progressContexts = new Array( length ); 4.1223 + resolveContexts = new Array( length ); 4.1224 + for ( ; i < length; i++ ) { 4.1225 + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { 4.1226 + resolveValues[ i ].promise() 4.1227 + .done( updateFunc( i, resolveContexts, resolveValues ) ) 4.1228 + .fail( deferred.reject ) 4.1229 + .progress( updateFunc( i, progressContexts, progressValues ) ); 4.1230 + } else { 4.1231 + --remaining; 4.1232 + } 4.1233 + } 4.1234 + } 4.1235 + 4.1236 + // if we're not waiting on anything, resolve the master 4.1237 + if ( !remaining ) { 4.1238 + deferred.resolveWith( resolveContexts, resolveValues ); 4.1239 + } 4.1240 + 4.1241 + return deferred.promise(); 4.1242 + } 4.1243 +}); 4.1244 +jQuery.support = (function() { 4.1245 + 4.1246 + var support, 4.1247 + all, 4.1248 + a, 4.1249 + select, 4.1250 + opt, 4.1251 + input, 4.1252 + fragment, 4.1253 + eventName, 4.1254 + i, 4.1255 + isSupported, 4.1256 + clickFn, 4.1257 + div = document.createElement("div"); 4.1258 + 4.1259 + // Preliminary tests 4.1260 + div.setAttribute( "className", "t" ); 4.1261 + div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"; 4.1262 + 4.1263 + all = div.getElementsByTagName("*"); 4.1264 + a = div.getElementsByTagName("a")[ 0 ]; 4.1265 + a.style.cssText = "top:1px;float:left;opacity:.5"; 4.1266 + 4.1267 + // Can't get basic test support 4.1268 + if ( !all || !all.length ) { 4.1269 + return {}; 4.1270 + } 4.1271 + 4.1272 + // First batch of supports tests 4.1273 + select = document.createElement("select"); 4.1274 + opt = select.appendChild( document.createElement("option") ); 4.1275 + input = div.getElementsByTagName("input")[ 0 ]; 4.1276 + 4.1277 + support = { 4.1278 + // IE strips leading whitespace when .innerHTML is used 4.1279 + leadingWhitespace: ( div.firstChild.nodeType === 3 ), 4.1280 + 4.1281 + // Make sure that tbody elements aren't automatically inserted 4.1282 + // IE will insert them into empty tables 4.1283 + tbody: !div.getElementsByTagName("tbody").length, 4.1284 + 4.1285 + // Make sure that link elements get serialized correctly by innerHTML 4.1286 + // This requires a wrapper element in IE 4.1287 + htmlSerialize: !!div.getElementsByTagName("link").length, 4.1288 + 4.1289 + // Get the style information from getAttribute 4.1290 + // (IE uses .cssText instead) 4.1291 + style: /top/.test( a.getAttribute("style") ), 4.1292 + 4.1293 + // Make sure that URLs aren't manipulated 4.1294 + // (IE normalizes it by default) 4.1295 + hrefNormalized: ( a.getAttribute("href") === "/a" ), 4.1296 + 4.1297 + // Make sure that element opacity exists 4.1298 + // (IE uses filter instead) 4.1299 + // Use a regex to work around a WebKit issue. See #5145 4.1300 + opacity: /^0.5/.test( a.style.opacity ), 4.1301 + 4.1302 + // Verify style float existence 4.1303 + // (IE uses styleFloat instead of cssFloat) 4.1304 + cssFloat: !!a.style.cssFloat, 4.1305 + 4.1306 + // Make sure that if no value is specified for a checkbox 4.1307 + // that it defaults to "on". 4.1308 + // (WebKit defaults to "" instead) 4.1309 + checkOn: ( input.value === "on" ), 4.1310 + 4.1311 + // Make sure that a selected-by-default option has a working selected property. 4.1312 + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) 4.1313 + optSelected: opt.selected, 4.1314 + 4.1315 + // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) 4.1316 + getSetAttribute: div.className !== "t", 4.1317 + 4.1318 + // Tests for enctype support on a form(#6743) 4.1319 + enctype: !!document.createElement("form").enctype, 4.1320 + 4.1321 + // Makes sure cloning an html5 element does not cause problems 4.1322 + // Where outerHTML is undefined, this still works 4.1323 + html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>", 4.1324 + 4.1325 + // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode 4.1326 + boxModel: ( document.compatMode === "CSS1Compat" ), 4.1327 + 4.1328 + // Will be defined later 4.1329 + submitBubbles: true, 4.1330 + changeBubbles: true, 4.1331 + focusinBubbles: false, 4.1332 + deleteExpando: true, 4.1333 + noCloneEvent: true, 4.1334 + inlineBlockNeedsLayout: false, 4.1335 + shrinkWrapBlocks: false, 4.1336 + reliableMarginRight: true, 4.1337 + boxSizingReliable: true, 4.1338 + pixelPosition: false 4.1339 + }; 4.1340 + 4.1341 + // Make sure checked status is properly cloned 4.1342 + input.checked = true; 4.1343 + support.noCloneChecked = input.cloneNode( true ).checked; 4.1344 + 4.1345 + // Make sure that the options inside disabled selects aren't marked as disabled 4.1346 + // (WebKit marks them as disabled) 4.1347 + select.disabled = true; 4.1348 + support.optDisabled = !opt.disabled; 4.1349 + 4.1350 + // Test to see if it's possible to delete an expando from an element 4.1351 + // Fails in Internet Explorer 4.1352 + try { 4.1353 + delete div.test; 4.1354 + } catch( e ) { 4.1355 + support.deleteExpando = false; 4.1356 + } 4.1357 + 4.1358 + if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { 4.1359 + div.attachEvent( "onclick", clickFn = function() { 4.1360 + // Cloning a node shouldn't copy over any 4.1361 + // bound event handlers (IE does this) 4.1362 + support.noCloneEvent = false; 4.1363 + }); 4.1364 + div.cloneNode( true ).fireEvent("onclick"); 4.1365 + div.detachEvent( "onclick", clickFn ); 4.1366 + } 4.1367 + 4.1368 + // Check if a radio maintains its value 4.1369 + // after being appended to the DOM 4.1370 + input = document.createElement("input"); 4.1371 + input.value = "t"; 4.1372 + input.setAttribute( "type", "radio" ); 4.1373 + support.radioValue = input.value === "t"; 4.1374 + 4.1375 + input.setAttribute( "checked", "checked" ); 4.1376 + 4.1377 + // #11217 - WebKit loses check when the name is after the checked attribute 4.1378 + input.setAttribute( "name", "t" ); 4.1379 + 4.1380 + div.appendChild( input ); 4.1381 + fragment = document.createDocumentFragment(); 4.1382 + fragment.appendChild( div.lastChild ); 4.1383 + 4.1384 + // WebKit doesn't clone checked state correctly in fragments 4.1385 + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; 4.1386 + 4.1387 + // Check if a disconnected checkbox will retain its checked 4.1388 + // value of true after appended to the DOM (IE6/7) 4.1389 + support.appendChecked = input.checked; 4.1390 + 4.1391 + fragment.removeChild( input ); 4.1392 + fragment.appendChild( div ); 4.1393 + 4.1394 + // Technique from Juriy Zaytsev 4.1395 + // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ 4.1396 + // We only care about the case where non-standard event systems 4.1397 + // are used, namely in IE. Short-circuiting here helps us to 4.1398 + // avoid an eval call (in setAttribute) which can cause CSP 4.1399 + // to go haywire. See: https://developer.mozilla.org/en/Security/CSP 4.1400 + if ( div.attachEvent ) { 4.1401 + for ( i in { 4.1402 + submit: true, 4.1403 + change: true, 4.1404 + focusin: true 4.1405 + }) { 4.1406 + eventName = "on" + i; 4.1407 + isSupported = ( eventName in div ); 4.1408 + if ( !isSupported ) { 4.1409 + div.setAttribute( eventName, "return;" ); 4.1410 + isSupported = ( typeof div[ eventName ] === "function" ); 4.1411 + } 4.1412 + support[ i + "Bubbles" ] = isSupported; 4.1413 + } 4.1414 + } 4.1415 + 4.1416 + // Run tests that need a body at doc ready 4.1417 + jQuery(function() { 4.1418 + var container, div, tds, marginDiv, 4.1419 + divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;", 4.1420 + body = document.getElementsByTagName("body")[0]; 4.1421 + 4.1422 + if ( !body ) { 4.1423 + // Return for frameset docs that don't have a body 4.1424 + return; 4.1425 + } 4.1426 + 4.1427 + container = document.createElement("div"); 4.1428 + container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px"; 4.1429 + body.insertBefore( container, body.firstChild ); 4.1430 + 4.1431 + // Construct the test element 4.1432 + div = document.createElement("div"); 4.1433 + container.appendChild( div ); 4.1434 + 4.1435 + // Check if table cells still have offsetWidth/Height when they are set 4.1436 + // to display:none and there are still other visible table cells in a 4.1437 + // table row; if so, offsetWidth/Height are not reliable for use when 4.1438 + // determining if an element has been hidden directly using 4.1439 + // display:none (it is still safe to use offsets if a parent element is 4.1440 + // hidden; don safety goggles and see bug #4512 for more information). 4.1441 + // (only IE 8 fails this test) 4.1442 + div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>"; 4.1443 + tds = div.getElementsByTagName("td"); 4.1444 + tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; 4.1445 + isSupported = ( tds[ 0 ].offsetHeight === 0 ); 4.1446 + 4.1447 + tds[ 0 ].style.display = ""; 4.1448 + tds[ 1 ].style.display = "none"; 4.1449 + 4.1450 + // Check if empty table cells still have offsetWidth/Height 4.1451 + // (IE <= 8 fail this test) 4.1452 + support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); 4.1453 + 4.1454 + // Check box-sizing and margin behavior 4.1455 + div.innerHTML = ""; 4.1456 + div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; 4.1457 + support.boxSizing = ( div.offsetWidth === 4 ); 4.1458 + support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); 4.1459 + 4.1460 + // NOTE: To any future maintainer, we've window.getComputedStyle 4.1461 + // because jsdom on node.js will break without it. 4.1462 + if ( window.getComputedStyle ) { 4.1463 + support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; 4.1464 + support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; 4.1465 + 4.1466 + // Check if div with explicit width and no margin-right incorrectly 4.1467 + // gets computed margin-right based on width of container. For more 4.1468 + // info see bug #3333 4.1469 + // Fails in WebKit before Feb 2011 nightlies 4.1470 + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right 4.1471 + marginDiv = document.createElement("div"); 4.1472 + marginDiv.style.cssText = div.style.cssText = divReset; 4.1473 + marginDiv.style.marginRight = marginDiv.style.width = "0"; 4.1474 + div.style.width = "1px"; 4.1475 + div.appendChild( marginDiv ); 4.1476 + support.reliableMarginRight = 4.1477 + !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); 4.1478 + } 4.1479 + 4.1480 + if ( typeof div.style.zoom !== "undefined" ) { 4.1481 + // Check if natively block-level elements act like inline-block 4.1482 + // elements when setting their display to 'inline' and giving 4.1483 + // them layout 4.1484 + // (IE < 8 does this) 4.1485 + div.innerHTML = ""; 4.1486 + div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; 4.1487 + support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); 4.1488 + 4.1489 + // Check if elements with layout shrink-wrap their children 4.1490 + // (IE 6 does this) 4.1491 + div.style.display = "block"; 4.1492 + div.style.overflow = "visible"; 4.1493 + div.innerHTML = "<div></div>"; 4.1494 + div.firstChild.style.width = "5px"; 4.1495 + support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); 4.1496 + 4.1497 + container.style.zoom = 1; 4.1498 + } 4.1499 + 4.1500 + // Null elements to avoid leaks in IE 4.1501 + body.removeChild( container ); 4.1502 + container = div = tds = marginDiv = null; 4.1503 + }); 4.1504 + 4.1505 + // Null elements to avoid leaks in IE 4.1506 + fragment.removeChild( div ); 4.1507 + all = a = select = opt = input = fragment = div = null; 4.1508 + 4.1509 + return support; 4.1510 +})(); 4.1511 +var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, 4.1512 + rmultiDash = /([A-Z])/g; 4.1513 + 4.1514 +jQuery.extend({ 4.1515 + cache: {}, 4.1516 + 4.1517 + deletedIds: [], 4.1518 + 4.1519 + // Remove at next major release (1.9/2.0) 4.1520 + uuid: 0, 4.1521 + 4.1522 + // Unique for each copy of jQuery on the page 4.1523 + // Non-digits removed to match rinlinejQuery 4.1524 + expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), 4.1525 + 4.1526 + // The following elements throw uncatchable exceptions if you 4.1527 + // attempt to add expando properties to them. 4.1528 + noData: { 4.1529 + "embed": true, 4.1530 + // Ban all objects except for Flash (which handle expandos) 4.1531 + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", 4.1532 + "applet": true 4.1533 + }, 4.1534 + 4.1535 + hasData: function( elem ) { 4.1536 + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; 4.1537 + return !!elem && !isEmptyDataObject( elem ); 4.1538 + }, 4.1539 + 4.1540 + data: function( elem, name, data, pvt /* Internal Use Only */ ) { 4.1541 + if ( !jQuery.acceptData( elem ) ) { 4.1542 + return; 4.1543 + } 4.1544 + 4.1545 + var thisCache, ret, 4.1546 + internalKey = jQuery.expando, 4.1547 + getByName = typeof name === "string", 4.1548 + 4.1549 + // We have to handle DOM nodes and JS objects differently because IE6-7 4.1550 + // can't GC object references properly across the DOM-JS boundary 4.1551 + isNode = elem.nodeType, 4.1552 + 4.1553 + // Only DOM nodes need the global jQuery cache; JS object data is 4.1554 + // attached directly to the object so GC can occur automatically 4.1555 + cache = isNode ? jQuery.cache : elem, 4.1556 + 4.1557 + // Only defining an ID for JS objects if its cache already exists allows 4.1558 + // the code to shortcut on the same path as a DOM node with no cache 4.1559 + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; 4.1560 + 4.1561 + // Avoid doing any more work than we need to when trying to get data on an 4.1562 + // object that has no data at all 4.1563 + if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { 4.1564 + return; 4.1565 + } 4.1566 + 4.1567 + if ( !id ) { 4.1568 + // Only DOM nodes need a new unique ID for each element since their data 4.1569 + // ends up in the global cache 4.1570 + if ( isNode ) { 4.1571 + elem[ internalKey ] = id = jQuery.deletedIds.pop() || jQuery.guid++; 4.1572 + } else { 4.1573 + id = internalKey; 4.1574 + } 4.1575 + } 4.1576 + 4.1577 + if ( !cache[ id ] ) { 4.1578 + cache[ id ] = {}; 4.1579 + 4.1580 + // Avoids exposing jQuery metadata on plain JS objects when the object 4.1581 + // is serialized using JSON.stringify 4.1582 + if ( !isNode ) { 4.1583 + cache[ id ].toJSON = jQuery.noop; 4.1584 + } 4.1585 + } 4.1586 + 4.1587 + // An object can be passed to jQuery.data instead of a key/value pair; this gets 4.1588 + // shallow copied over onto the existing cache 4.1589 + if ( typeof name === "object" || typeof name === "function" ) { 4.1590 + if ( pvt ) { 4.1591 + cache[ id ] = jQuery.extend( cache[ id ], name ); 4.1592 + } else { 4.1593 + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); 4.1594 + } 4.1595 + } 4.1596 + 4.1597 + thisCache = cache[ id ]; 4.1598 + 4.1599 + // jQuery data() is stored in a separate object inside the object's internal data 4.1600 + // cache in order to avoid key collisions between internal data and user-defined 4.1601 + // data. 4.1602 + if ( !pvt ) { 4.1603 + if ( !thisCache.data ) { 4.1604 + thisCache.data = {}; 4.1605 + } 4.1606 + 4.1607 + thisCache = thisCache.data; 4.1608 + } 4.1609 + 4.1610 + if ( data !== undefined ) { 4.1611 + thisCache[ jQuery.camelCase( name ) ] = data; 4.1612 + } 4.1613 + 4.1614 + // Check for both converted-to-camel and non-converted data property names 4.1615 + // If a data property was specified 4.1616 + if ( getByName ) { 4.1617 + 4.1618 + // First Try to find as-is property data 4.1619 + ret = thisCache[ name ]; 4.1620 + 4.1621 + // Test for null|undefined property data 4.1622 + if ( ret == null ) { 4.1623 + 4.1624 + // Try to find the camelCased property 4.1625 + ret = thisCache[ jQuery.camelCase( name ) ]; 4.1626 + } 4.1627 + } else { 4.1628 + ret = thisCache; 4.1629 + } 4.1630 + 4.1631 + return ret; 4.1632 + }, 4.1633 + 4.1634 + removeData: function( elem, name, pvt /* Internal Use Only */ ) { 4.1635 + if ( !jQuery.acceptData( elem ) ) { 4.1636 + return; 4.1637 + } 4.1638 + 4.1639 + var thisCache, i, l, 4.1640 + 4.1641 + isNode = elem.nodeType, 4.1642 + 4.1643 + // See jQuery.data for more information 4.1644 + cache = isNode ? jQuery.cache : elem, 4.1645 + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; 4.1646 + 4.1647 + // If there is already no cache entry for this object, there is no 4.1648 + // purpose in continuing 4.1649 + if ( !cache[ id ] ) { 4.1650 + return; 4.1651 + } 4.1652 + 4.1653 + if ( name ) { 4.1654 + 4.1655 + thisCache = pvt ? cache[ id ] : cache[ id ].data; 4.1656 + 4.1657 + if ( thisCache ) { 4.1658 + 4.1659 + // Support array or space separated string names for data keys 4.1660 + if ( !jQuery.isArray( name ) ) { 4.1661 + 4.1662 + // try the string as a key before any manipulation 4.1663 + if ( name in thisCache ) { 4.1664 + name = [ name ]; 4.1665 + } else { 4.1666 + 4.1667 + // split the camel cased version by spaces unless a key with the spaces exists 4.1668 + name = jQuery.camelCase( name ); 4.1669 + if ( name in thisCache ) { 4.1670 + name = [ name ]; 4.1671 + } else { 4.1672 + name = name.split(" "); 4.1673 + } 4.1674 + } 4.1675 + } 4.1676 + 4.1677 + for ( i = 0, l = name.length; i < l; i++ ) { 4.1678 + delete thisCache[ name[i] ]; 4.1679 + } 4.1680 + 4.1681 + // If there is no data left in the cache, we want to continue 4.1682 + // and let the cache object itself get destroyed 4.1683 + if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { 4.1684 + return; 4.1685 + } 4.1686 + } 4.1687 + } 4.1688 + 4.1689 + // See jQuery.data for more information 4.1690 + if ( !pvt ) { 4.1691 + delete cache[ id ].data; 4.1692 + 4.1693 + // Don't destroy the parent cache unless the internal data object 4.1694 + // had been the only thing left in it 4.1695 + if ( !isEmptyDataObject( cache[ id ] ) ) { 4.1696 + return; 4.1697 + } 4.1698 + } 4.1699 + 4.1700 + // Destroy the cache 4.1701 + if ( isNode ) { 4.1702 + jQuery.cleanData( [ elem ], true ); 4.1703 + 4.1704 + // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) 4.1705 + } else if ( jQuery.support.deleteExpando || cache != cache.window ) { 4.1706 + delete cache[ id ]; 4.1707 + 4.1708 + // When all else fails, null 4.1709 + } else { 4.1710 + cache[ id ] = null; 4.1711 + } 4.1712 + }, 4.1713 + 4.1714 + // For internal use only. 4.1715 + _data: function( elem, name, data ) { 4.1716 + return jQuery.data( elem, name, data, true ); 4.1717 + }, 4.1718 + 4.1719 + // A method for determining if a DOM node can handle the data expando 4.1720 + acceptData: function( elem ) { 4.1721 + var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; 4.1722 + 4.1723 + // nodes accept data unless otherwise specified; rejection can be conditional 4.1724 + return !noData || noData !== true && elem.getAttribute("classid") === noData; 4.1725 + } 4.1726 +}); 4.1727 + 4.1728 +jQuery.fn.extend({ 4.1729 + data: function( key, value ) { 4.1730 + var parts, part, attr, name, l, 4.1731 + elem = this[0], 4.1732 + i = 0, 4.1733 + data = null; 4.1734 + 4.1735 + // Gets all values 4.1736 + if ( key === undefined ) { 4.1737 + if ( this.length ) { 4.1738 + data = jQuery.data( elem ); 4.1739 + 4.1740 + if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { 4.1741 + attr = elem.attributes; 4.1742 + for ( l = attr.length; i < l; i++ ) { 4.1743 + name = attr[i].name; 4.1744 + 4.1745 + if ( !name.indexOf( "data-" ) ) { 4.1746 + name = jQuery.camelCase( name.substring(5) ); 4.1747 + 4.1748 + dataAttr( elem, name, data[ name ] ); 4.1749 + } 4.1750 + } 4.1751 + jQuery._data( elem, "parsedAttrs", true ); 4.1752 + } 4.1753 + } 4.1754 + 4.1755 + return data; 4.1756 + } 4.1757 + 4.1758 + // Sets multiple values 4.1759 + if ( typeof key === "object" ) { 4.1760 + return this.each(function() { 4.1761 + jQuery.data( this, key ); 4.1762 + }); 4.1763 + } 4.1764 + 4.1765 + parts = key.split( ".", 2 ); 4.1766 + parts[1] = parts[1] ? "." + parts[1] : ""; 4.1767 + part = parts[1] + "!"; 4.1768 + 4.1769 + return jQuery.access( this, function( value ) { 4.1770 + 4.1771 + if ( value === undefined ) { 4.1772 + data = this.triggerHandler( "getData" + part, [ parts[0] ] ); 4.1773 + 4.1774 + // Try to fetch any internally stored data first 4.1775 + if ( data === undefined && elem ) { 4.1776 + data = jQuery.data( elem, key ); 4.1777 + data = dataAttr( elem, key, data ); 4.1778 + } 4.1779 + 4.1780 + return data === undefined && parts[1] ? 4.1781 + this.data( parts[0] ) : 4.1782 + data; 4.1783 + } 4.1784 + 4.1785 + parts[1] = value; 4.1786 + this.each(function() { 4.1787 + var self = jQuery( this ); 4.1788 + 4.1789 + self.triggerHandler( "setData" + part, parts ); 4.1790 + jQuery.data( this, key, value ); 4.1791 + self.triggerHandler( "changeData" + part, parts ); 4.1792 + }); 4.1793 + }, null, value, arguments.length > 1, null, false ); 4.1794 + }, 4.1795 + 4.1796 + removeData: function( key ) { 4.1797 + return this.each(function() { 4.1798 + jQuery.removeData( this, key ); 4.1799 + }); 4.1800 + } 4.1801 +}); 4.1802 + 4.1803 +function dataAttr( elem, key, data ) { 4.1804 + // If nothing was found internally, try to fetch any 4.1805 + // data from the HTML5 data-* attribute 4.1806 + if ( data === undefined && elem.nodeType === 1 ) { 4.1807 + 4.1808 + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); 4.1809 + 4.1810 + data = elem.getAttribute( name ); 4.1811 + 4.1812 + if ( typeof data === "string" ) { 4.1813 + try { 4.1814 + data = data === "true" ? true : 4.1815 + data === "false" ? false : 4.1816 + data === "null" ? null : 4.1817 + // Only convert to a number if it doesn't change the string 4.1818 + +data + "" === data ? +data : 4.1819 + rbrace.test( data ) ? jQuery.parseJSON( data ) : 4.1820 + data; 4.1821 + } catch( e ) {} 4.1822 + 4.1823 + // Make sure we set the data so it isn't changed later 4.1824 + jQuery.data( elem, key, data ); 4.1825 + 4.1826 + } else { 4.1827 + data = undefined; 4.1828 + } 4.1829 + } 4.1830 + 4.1831 + return data; 4.1832 +} 4.1833 + 4.1834 +// checks a cache object for emptiness 4.1835 +function isEmptyDataObject( obj ) { 4.1836 + var name; 4.1837 + for ( name in obj ) { 4.1838 + 4.1839 + // if the public data object is empty, the private is still empty 4.1840 + if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { 4.1841 + continue; 4.1842 + } 4.1843 + if ( name !== "toJSON" ) { 4.1844 + return false; 4.1845 + } 4.1846 + } 4.1847 + 4.1848 + return true; 4.1849 +} 4.1850 +jQuery.extend({ 4.1851 + queue: function( elem, type, data ) { 4.1852 + var queue; 4.1853 + 4.1854 + if ( elem ) { 4.1855 + type = ( type || "fx" ) + "queue"; 4.1856 + queue = jQuery._data( elem, type ); 4.1857 + 4.1858 + // Speed up dequeue by getting out quickly if this is just a lookup 4.1859 + if ( data ) { 4.1860 + if ( !queue || jQuery.isArray(data) ) { 4.1861 + queue = jQuery._data( elem, type, jQuery.makeArray(data) ); 4.1862 + } else { 4.1863 + queue.push( data ); 4.1864 + } 4.1865 + } 4.1866 + return queue || []; 4.1867 + } 4.1868 + }, 4.1869 + 4.1870 + dequeue: function( elem, type ) { 4.1871 + type = type || "fx"; 4.1872 + 4.1873 + var queue = jQuery.queue( elem, type ), 4.1874 + startLength = queue.length, 4.1875 + fn = queue.shift(), 4.1876 + hooks = jQuery._queueHooks( elem, type ), 4.1877 + next = function() { 4.1878 + jQuery.dequeue( elem, type ); 4.1879 + }; 4.1880 + 4.1881 + // If the fx queue is dequeued, always remove the progress sentinel 4.1882 + if ( fn === "inprogress" ) { 4.1883 + fn = queue.shift(); 4.1884 + startLength--; 4.1885 + } 4.1886 + 4.1887 + if ( fn ) { 4.1888 + 4.1889 + // Add a progress sentinel to prevent the fx queue from being 4.1890 + // automatically dequeued 4.1891 + if ( type === "fx" ) { 4.1892 + queue.unshift( "inprogress" ); 4.1893 + } 4.1894 + 4.1895 + // clear up the last queue stop function 4.1896 + delete hooks.stop; 4.1897 + fn.call( elem, next, hooks ); 4.1898 + } 4.1899 + 4.1900 + if ( !startLength && hooks ) { 4.1901 + hooks.empty.fire(); 4.1902 + } 4.1903 + }, 4.1904 + 4.1905 + // not intended for public consumption - generates a queueHooks object, or returns the current one 4.1906 + _queueHooks: function( elem, type ) { 4.1907 + var key = type + "queueHooks"; 4.1908 + return jQuery._data( elem, key ) || jQuery._data( elem, key, { 4.1909 + empty: jQuery.Callbacks("once memory").add(function() { 4.1910 + jQuery.removeData( elem, type + "queue", true ); 4.1911 + jQuery.removeData( elem, key, true ); 4.1912 + }) 4.1913 + }); 4.1914 + } 4.1915 +}); 4.1916 + 4.1917 +jQuery.fn.extend({ 4.1918 + queue: function( type, data ) { 4.1919 + var setter = 2; 4.1920 + 4.1921 + if ( typeof type !== "string" ) { 4.1922 + data = type; 4.1923 + type = "fx"; 4.1924 + setter--; 4.1925 + } 4.1926 + 4.1927 + if ( arguments.length < setter ) { 4.1928 + return jQuery.queue( this[0], type ); 4.1929 + } 4.1930 + 4.1931 + return data === undefined ? 4.1932 + this : 4.1933 + this.each(function() { 4.1934 + var queue = jQuery.queue( this, type, data ); 4.1935 + 4.1936 + // ensure a hooks for this queue 4.1937 + jQuery._queueHooks( this, type ); 4.1938 + 4.1939 + if ( type === "fx" && queue[0] !== "inprogress" ) { 4.1940 + jQuery.dequeue( this, type ); 4.1941 + } 4.1942 + }); 4.1943 + }, 4.1944 + dequeue: function( type ) { 4.1945 + return this.each(function() { 4.1946 + jQuery.dequeue( this, type ); 4.1947 + }); 4.1948 + }, 4.1949 + // Based off of the plugin by Clint Helfers, with permission. 4.1950 + // http://blindsignals.com/index.php/2009/07/jquery-delay/ 4.1951 + delay: function( time, type ) { 4.1952 + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; 4.1953 + type = type || "fx"; 4.1954 + 4.1955 + return this.queue( type, function( next, hooks ) { 4.1956 + var timeout = setTimeout( next, time ); 4.1957 + hooks.stop = function() { 4.1958 + clearTimeout( timeout ); 4.1959 + }; 4.1960 + }); 4.1961 + }, 4.1962 + clearQueue: function( type ) { 4.1963 + return this.queue( type || "fx", [] ); 4.1964 + }, 4.1965 + // Get a promise resolved when queues of a certain type 4.1966 + // are emptied (fx is the type by default) 4.1967 + promise: function( type, obj ) { 4.1968 + var tmp, 4.1969 + count = 1, 4.1970 + defer = jQuery.Deferred(), 4.1971 + elements = this, 4.1972 + i = this.length, 4.1973 + resolve = function() { 4.1974 + if ( !( --count ) ) { 4.1975 + defer.resolveWith( elements, [ elements ] ); 4.1976 + } 4.1977 + }; 4.1978 + 4.1979 + if ( typeof type !== "string" ) { 4.1980 + obj = type; 4.1981 + type = undefined; 4.1982 + } 4.1983 + type = type || "fx"; 4.1984 + 4.1985 + while( i-- ) { 4.1986 + tmp = jQuery._data( elements[ i ], type + "queueHooks" ); 4.1987 + if ( tmp && tmp.empty ) { 4.1988 + count++; 4.1989 + tmp.empty.add( resolve ); 4.1990 + } 4.1991 + } 4.1992 + resolve(); 4.1993 + return defer.promise( obj ); 4.1994 + } 4.1995 +}); 4.1996 +var nodeHook, boolHook, fixSpecified, 4.1997 + rclass = /[\t\r\n]/g, 4.1998 + rreturn = /\r/g, 4.1999 + rtype = /^(?:button|input)$/i, 4.2000 + rfocusable = /^(?:button|input|object|select|textarea)$/i, 4.2001 + rclickable = /^a(?:rea|)$/i, 4.2002 + rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, 4.2003 + getSetAttribute = jQuery.support.getSetAttribute; 4.2004 + 4.2005 +jQuery.fn.extend({ 4.2006 + attr: function( name, value ) { 4.2007 + return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); 4.2008 + }, 4.2009 + 4.2010 + removeAttr: function( name ) { 4.2011 + return this.each(function() { 4.2012 + jQuery.removeAttr( this, name ); 4.2013 + }); 4.2014 + }, 4.2015 + 4.2016 + prop: function( name, value ) { 4.2017 + return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); 4.2018 + }, 4.2019 + 4.2020 + removeProp: function( name ) { 4.2021 + name = jQuery.propFix[ name ] || name; 4.2022 + return this.each(function() { 4.2023 + // try/catch handles cases where IE balks (such as removing a property on window) 4.2024 + try { 4.2025 + this[ name ] = undefined; 4.2026 + delete this[ name ]; 4.2027 + } catch( e ) {} 4.2028 + }); 4.2029 + }, 4.2030 + 4.2031 + addClass: function( value ) { 4.2032 + var classNames, i, l, elem, 4.2033 + setClass, c, cl; 4.2034 + 4.2035 + if ( jQuery.isFunction( value ) ) { 4.2036 + return this.each(function( j ) { 4.2037 + jQuery( this ).addClass( value.call(this, j, this.className) ); 4.2038 + }); 4.2039 + } 4.2040 + 4.2041 + if ( value && typeof value === "string" ) { 4.2042 + classNames = value.split( core_rspace ); 4.2043 + 4.2044 + for ( i = 0, l = this.length; i < l; i++ ) { 4.2045 + elem = this[ i ]; 4.2046 + 4.2047 + if ( elem.nodeType === 1 ) { 4.2048 + if ( !elem.className && classNames.length === 1 ) { 4.2049 + elem.className = value; 4.2050 + 4.2051 + } else { 4.2052 + setClass = " " + elem.className + " "; 4.2053 + 4.2054 + for ( c = 0, cl = classNames.length; c < cl; c++ ) { 4.2055 + if ( setClass.indexOf( " " + classNames[ c ] + " " ) < 0 ) { 4.2056 + setClass += classNames[ c ] + " "; 4.2057 + } 4.2058 + } 4.2059 + elem.className = jQuery.trim( setClass ); 4.2060 + } 4.2061 + } 4.2062 + } 4.2063 + } 4.2064 + 4.2065 + return this; 4.2066 + }, 4.2067 + 4.2068 + removeClass: function( value ) { 4.2069 + var removes, className, elem, c, cl, i, l; 4.2070 + 4.2071 + if ( jQuery.isFunction( value ) ) { 4.2072 + return this.each(function( j ) { 4.2073 + jQuery( this ).removeClass( value.call(this, j, this.className) ); 4.2074 + }); 4.2075 + } 4.2076 + if ( (value && typeof value === "string") || value === undefined ) { 4.2077 + removes = ( value || "" ).split( core_rspace ); 4.2078 + 4.2079 + for ( i = 0, l = this.length; i < l; i++ ) { 4.2080 + elem = this[ i ]; 4.2081 + if ( elem.nodeType === 1 && elem.className ) { 4.2082 + 4.2083 + className = (" " + elem.className + " ").replace( rclass, " " ); 4.2084 + 4.2085 + // loop over each item in the removal list 4.2086 + for ( c = 0, cl = removes.length; c < cl; c++ ) { 4.2087 + // Remove until there is nothing to remove, 4.2088 + while ( className.indexOf(" " + removes[ c ] + " ") >= 0 ) { 4.2089 + className = className.replace( " " + removes[ c ] + " " , " " ); 4.2090 + } 4.2091 + } 4.2092 + elem.className = value ? jQuery.trim( className ) : ""; 4.2093 + } 4.2094 + } 4.2095 + } 4.2096 + 4.2097 + return this; 4.2098 + }, 4.2099 + 4.2100 + toggleClass: function( value, stateVal ) { 4.2101 + var type = typeof value, 4.2102 + isBool = typeof stateVal === "boolean"; 4.2103 + 4.2104 + if ( jQuery.isFunction( value ) ) { 4.2105 + return this.each(function( i ) { 4.2106 + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); 4.2107 + }); 4.2108 + } 4.2109 + 4.2110 + return this.each(function() { 4.2111 + if ( type === "string" ) { 4.2112 + // toggle individual class names 4.2113 + var className, 4.2114 + i = 0, 4.2115 + self = jQuery( this ), 4.2116 + state = stateVal, 4.2117 + classNames = value.split( core_rspace ); 4.2118 + 4.2119 + while ( (className = classNames[ i++ ]) ) { 4.2120 + // check each className given, space separated list 4.2121 + state = isBool ? state : !self.hasClass( className ); 4.2122 + self[ state ? "addClass" : "removeClass" ]( className ); 4.2123 + } 4.2124 + 4.2125 + } else if ( type === "undefined" || type === "boolean" ) { 4.2126 + if ( this.className ) { 4.2127 + // store className if set 4.2128 + jQuery._data( this, "__className__", this.className ); 4.2129 + } 4.2130 + 4.2131 + // toggle whole className 4.2132 + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; 4.2133 + } 4.2134 + }); 4.2135 + }, 4.2136 + 4.2137 + hasClass: function( selector ) { 4.2138 + var className = " " + selector + " ", 4.2139 + i = 0, 4.2140 + l = this.length; 4.2141 + for ( ; i < l; i++ ) { 4.2142 + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { 4.2143 + return true; 4.2144 + } 4.2145 + } 4.2146 + 4.2147 + return false; 4.2148 + }, 4.2149 + 4.2150 + val: function( value ) { 4.2151 + var hooks, ret, isFunction, 4.2152 + elem = this[0]; 4.2153 + 4.2154 + if ( !arguments.length ) { 4.2155 + if ( elem ) { 4.2156 + hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; 4.2157 + 4.2158 + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { 4.2159 + return ret; 4.2160 + } 4.2161 + 4.2162 + ret = elem.value; 4.2163 + 4.2164 + return typeof ret === "string" ? 4.2165 + // handle most common string cases 4.2166 + ret.replace(rreturn, "") : 4.2167 + // handle cases where value is null/undef or number 4.2168 + ret == null ? "" : ret; 4.2169 + } 4.2170 + 4.2171 + return; 4.2172 + } 4.2173 + 4.2174 + isFunction = jQuery.isFunction( value ); 4.2175 + 4.2176 + return this.each(function( i ) { 4.2177 + var val, 4.2178 + self = jQuery(this); 4.2179 + 4.2180 + if ( this.nodeType !== 1 ) { 4.2181 + return; 4.2182 + } 4.2183 + 4.2184 + if ( isFunction ) { 4.2185 + val = value.call( this, i, self.val() ); 4.2186 + } else { 4.2187 + val = value; 4.2188 + } 4.2189 + 4.2190 + // Treat null/undefined as ""; convert numbers to string 4.2191 + if ( val == null ) { 4.2192 + val = ""; 4.2193 + } else if ( typeof val === "number" ) { 4.2194 + val += ""; 4.2195 + } else if ( jQuery.isArray( val ) ) { 4.2196 + val = jQuery.map(val, function ( value ) { 4.2197 + return value == null ? "" : value + ""; 4.2198 + }); 4.2199 + } 4.2200 + 4.2201 + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; 4.2202 + 4.2203 + // If set returns undefined, fall back to normal setting 4.2204 + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { 4.2205 + this.value = val; 4.2206 + } 4.2207 + }); 4.2208 + } 4.2209 +}); 4.2210 + 4.2211 +jQuery.extend({ 4.2212 + valHooks: { 4.2213 + option: { 4.2214 + get: function( elem ) { 4.2215 + // attributes.value is undefined in Blackberry 4.7 but 4.2216 + // uses .value. See #6932 4.2217 + var val = elem.attributes.value; 4.2218 + return !val || val.specified ? elem.value : elem.text; 4.2219 + } 4.2220 + }, 4.2221 + select: { 4.2222 + get: function( elem ) { 4.2223 + var value, i, max, option, 4.2224 + index = elem.selectedIndex, 4.2225 + values = [], 4.2226 + options = elem.options, 4.2227 + one = elem.type === "select-one"; 4.2228 + 4.2229 + // Nothing was selected 4.2230 + if ( index < 0 ) { 4.2231 + return null; 4.2232 + } 4.2233 + 4.2234 + // Loop through all the selected options 4.2235 + i = one ? index : 0; 4.2236 + max = one ? index + 1 : options.length; 4.2237 + for ( ; i < max; i++ ) { 4.2238 + option = options[ i ]; 4.2239 + 4.2240 + // Don't return options that are disabled or in a disabled optgroup 4.2241 + if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && 4.2242 + (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { 4.2243 + 4.2244 + // Get the specific value for the option 4.2245 + value = jQuery( option ).val(); 4.2246 + 4.2247 + // We don't need an array for one selects 4.2248 + if ( one ) { 4.2249 + return value; 4.2250 + } 4.2251 + 4.2252 + // Multi-Selects return an array 4.2253 + values.push( value ); 4.2254 + } 4.2255 + } 4.2256 + 4.2257 + // Fixes Bug #2551 -- select.val() broken in IE after form.reset() 4.2258 + if ( one && !values.length && options.length ) { 4.2259 + return jQuery( options[ index ] ).val(); 4.2260 + } 4.2261 + 4.2262 + return values; 4.2263 + }, 4.2264 + 4.2265 + set: function( elem, value ) { 4.2266 + var values = jQuery.makeArray( value ); 4.2267 + 4.2268 + jQuery(elem).find("option").each(function() { 4.2269 + this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; 4.2270 + }); 4.2271 + 4.2272 + if ( !values.length ) { 4.2273 + elem.selectedIndex = -1; 4.2274 + } 4.2275 + return values; 4.2276 + } 4.2277 + } 4.2278 + }, 4.2279 + 4.2280 + // Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9 4.2281 + attrFn: {}, 4.2282 + 4.2283 + attr: function( elem, name, value, pass ) { 4.2284 + var ret, hooks, notxml, 4.2285 + nType = elem.nodeType; 4.2286 + 4.2287 + // don't get/set attributes on text, comment and attribute nodes 4.2288 + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { 4.2289 + return; 4.2290 + } 4.2291 + 4.2292 + if ( pass && jQuery.isFunction( jQuery.fn[ name ] ) ) { 4.2293 + return jQuery( elem )[ name ]( value ); 4.2294 + } 4.2295 + 4.2296 + // Fallback to prop when attributes are not supported 4.2297 + if ( typeof elem.getAttribute === "undefined" ) { 4.2298 + return jQuery.prop( elem, name, value ); 4.2299 + } 4.2300 + 4.2301 + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); 4.2302 + 4.2303 + // All attributes are lowercase 4.2304 + // Grab necessary hook if one is defined 4.2305 + if ( notxml ) { 4.2306 + name = name.toLowerCase(); 4.2307 + hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); 4.2308 + } 4.2309 + 4.2310 + if ( value !== undefined ) { 4.2311 + 4.2312 + if ( value === null ) { 4.2313 + jQuery.removeAttr( elem, name ); 4.2314 + return; 4.2315 + 4.2316 + } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { 4.2317 + return ret; 4.2318 + 4.2319 + } else { 4.2320 + elem.setAttribute( name, value + "" ); 4.2321 + return value; 4.2322 + } 4.2323 + 4.2324 + } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { 4.2325 + return ret; 4.2326 + 4.2327 + } else { 4.2328 + 4.2329 + ret = elem.getAttribute( name ); 4.2330 + 4.2331 + // Non-existent attributes return null, we normalize to undefined 4.2332 + return ret === null ? 4.2333 + undefined : 4.2334 + ret; 4.2335 + } 4.2336 + }, 4.2337 + 4.2338 + removeAttr: function( elem, value ) { 4.2339 + var propName, attrNames, name, isBool, 4.2340 + i = 0; 4.2341 + 4.2342 + if ( value && elem.nodeType === 1 ) { 4.2343 + 4.2344 + attrNames = value.split( core_rspace ); 4.2345 + 4.2346 + for ( ; i < attrNames.length; i++ ) { 4.2347 + name = attrNames[ i ]; 4.2348 + 4.2349 + if ( name ) { 4.2350 + propName = jQuery.propFix[ name ] || name; 4.2351 + isBool = rboolean.test( name ); 4.2352 + 4.2353 + // See #9699 for explanation of this approach (setting first, then removal) 4.2354 + // Do not do this for boolean attributes (see #10870) 4.2355 + if ( !isBool ) { 4.2356 + jQuery.attr( elem, name, "" ); 4.2357 + } 4.2358 + elem.removeAttribute( getSetAttribute ? name : propName ); 4.2359 + 4.2360 + // Set corresponding property to false for boolean attributes 4.2361 + if ( isBool && propName in elem ) { 4.2362 + elem[ propName ] = false; 4.2363 + } 4.2364 + } 4.2365 + } 4.2366 + } 4.2367 + }, 4.2368 + 4.2369 + attrHooks: { 4.2370 + type: { 4.2371 + set: function( elem, value ) { 4.2372 + // We can't allow the type property to be changed (since it causes problems in IE) 4.2373 + if ( rtype.test( elem.nodeName ) && elem.parentNode ) { 4.2374 + jQuery.error( "type property can't be changed" ); 4.2375 + } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { 4.2376 + // Setting the type on a radio button after the value resets the value in IE6-9 4.2377 + // Reset value to it's default in case type is set after value 4.2378 + // This is for element creation 4.2379 + var val = elem.value; 4.2380 + elem.setAttribute( "type", value ); 4.2381 + if ( val ) { 4.2382 + elem.value = val; 4.2383 + } 4.2384 + return value; 4.2385 + } 4.2386 + } 4.2387 + }, 4.2388 + // Use the value property for back compat 4.2389 + // Use the nodeHook for button elements in IE6/7 (#1954) 4.2390 + value: { 4.2391 + get: function( elem, name ) { 4.2392 + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { 4.2393 + return nodeHook.get( elem, name ); 4.2394 + } 4.2395 + return name in elem ? 4.2396 + elem.value : 4.2397 + null; 4.2398 + }, 4.2399 + set: function( elem, value, name ) { 4.2400 + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { 4.2401 + return nodeHook.set( elem, value, name ); 4.2402 + } 4.2403 + // Does not return so that setAttribute is also used 4.2404 + elem.value = value; 4.2405 + } 4.2406 + } 4.2407 + }, 4.2408 + 4.2409 + propFix: { 4.2410 + tabindex: "tabIndex", 4.2411 + readonly: "readOnly", 4.2412 + "for": "htmlFor", 4.2413 + "class": "className", 4.2414 + maxlength: "maxLength", 4.2415 + cellspacing: "cellSpacing", 4.2416 + cellpadding: "cellPadding", 4.2417 + rowspan: "rowSpan", 4.2418 + colspan: "colSpan", 4.2419 + usemap: "useMap", 4.2420 + frameborder: "frameBorder", 4.2421 + contenteditable: "contentEditable" 4.2422 + }, 4.2423 + 4.2424 + prop: function( elem, name, value ) { 4.2425 + var ret, hooks, notxml, 4.2426 + nType = elem.nodeType; 4.2427 + 4.2428 + // don't get/set properties on text, comment and attribute nodes 4.2429 + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { 4.2430 + return; 4.2431 + } 4.2432 + 4.2433 + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); 4.2434 + 4.2435 + if ( notxml ) { 4.2436 + // Fix name and attach hooks 4.2437 + name = jQuery.propFix[ name ] || name; 4.2438 + hooks = jQuery.propHooks[ name ]; 4.2439 + } 4.2440 + 4.2441 + if ( value !== undefined ) { 4.2442 + if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { 4.2443 + return ret; 4.2444 + 4.2445 + } else { 4.2446 + return ( elem[ name ] = value ); 4.2447 + } 4.2448 + 4.2449 + } else { 4.2450 + if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { 4.2451 + return ret; 4.2452 + 4.2453 + } else { 4.2454 + return elem[ name ]; 4.2455 + } 4.2456 + } 4.2457 + }, 4.2458 + 4.2459 + propHooks: { 4.2460 + tabIndex: { 4.2461 + get: function( elem ) { 4.2462 + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set 4.2463 + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ 4.2464 + var attributeNode = elem.getAttributeNode("tabindex"); 4.2465 + 4.2466 + return attributeNode && attributeNode.specified ? 4.2467 + parseInt( attributeNode.value, 10 ) : 4.2468 + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? 4.2469 + 0 : 4.2470 + undefined; 4.2471 + } 4.2472 + } 4.2473 + } 4.2474 +}); 4.2475 + 4.2476 +// Hook for boolean attributes 4.2477 +boolHook = { 4.2478 + get: function( elem, name ) { 4.2479 + // Align boolean attributes with corresponding properties 4.2480 + // Fall back to attribute presence where some booleans are not supported 4.2481 + var attrNode, 4.2482 + property = jQuery.prop( elem, name ); 4.2483 + return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? 4.2484 + name.toLowerCase() : 4.2485 + undefined; 4.2486 + }, 4.2487 + set: function( elem, value, name ) { 4.2488 + var propName; 4.2489 + if ( value === false ) { 4.2490 + // Remove boolean attributes when set to false 4.2491 + jQuery.removeAttr( elem, name ); 4.2492 + } else { 4.2493 + // value is true since we know at this point it's type boolean and not false 4.2494 + // Set boolean attributes to the same name and set the DOM property 4.2495 + propName = jQuery.propFix[ name ] || name; 4.2496 + if ( propName in elem ) { 4.2497 + // Only set the IDL specifically if it already exists on the element 4.2498 + elem[ propName ] = true; 4.2499 + } 4.2500 + 4.2501 + elem.setAttribute( name, name.toLowerCase() ); 4.2502 + } 4.2503 + return name; 4.2504 + } 4.2505 +}; 4.2506 + 4.2507 +// IE6/7 do not support getting/setting some attributes with get/setAttribute 4.2508 +if ( !getSetAttribute ) { 4.2509 + 4.2510 + fixSpecified = { 4.2511 + name: true, 4.2512 + id: true, 4.2513 + coords: true 4.2514 + }; 4.2515 + 4.2516 + // Use this for any attribute in IE6/7 4.2517 + // This fixes almost every IE6/7 issue 4.2518 + nodeHook = jQuery.valHooks.button = { 4.2519 + get: function( elem, name ) { 4.2520 + var ret; 4.2521 + ret = elem.getAttributeNode( name ); 4.2522 + return ret && ( fixSpecified[ name ] ? ret.value !== "" : ret.specified ) ? 4.2523 + ret.value : 4.2524 + undefined; 4.2525 + }, 4.2526 + set: function( elem, value, name ) { 4.2527 + // Set the existing or create a new attribute node 4.2528 + var ret = elem.getAttributeNode( name ); 4.2529 + if ( !ret ) { 4.2530 + ret = document.createAttribute( name ); 4.2531 + elem.setAttributeNode( ret ); 4.2532 + } 4.2533 + return ( ret.value = value + "" ); 4.2534 + } 4.2535 + }; 4.2536 + 4.2537 + // Set width and height to auto instead of 0 on empty string( Bug #8150 ) 4.2538 + // This is for removals 4.2539 + jQuery.each([ "width", "height" ], function( i, name ) { 4.2540 + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { 4.2541 + set: function( elem, value ) { 4.2542 + if ( value === "" ) { 4.2543 + elem.setAttribute( name, "auto" ); 4.2544 + return value; 4.2545 + } 4.2546 + } 4.2547 + }); 4.2548 + }); 4.2549 + 4.2550 + // Set contenteditable to false on removals(#10429) 4.2551 + // Setting to empty string throws an error as an invalid value 4.2552 + jQuery.attrHooks.contenteditable = { 4.2553 + get: nodeHook.get, 4.2554 + set: function( elem, value, name ) { 4.2555 + if ( value === "" ) { 4.2556 + value = "false"; 4.2557 + } 4.2558 + nodeHook.set( elem, value, name ); 4.2559 + } 4.2560 + }; 4.2561 +} 4.2562 + 4.2563 + 4.2564 +// Some attributes require a special call on IE 4.2565 +if ( !jQuery.support.hrefNormalized ) { 4.2566 + jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { 4.2567 + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { 4.2568 + get: function( elem ) { 4.2569 + var ret = elem.getAttribute( name, 2 ); 4.2570 + return ret === null ? undefined : ret; 4.2571 + } 4.2572 + }); 4.2573 + }); 4.2574 +} 4.2575 + 4.2576 +if ( !jQuery.support.style ) { 4.2577 + jQuery.attrHooks.style = { 4.2578 + get: function( elem ) { 4.2579 + // Return undefined in the case of empty string 4.2580 + // Normalize to lowercase since IE uppercases css property names 4.2581 + return elem.style.cssText.toLowerCase() || undefined; 4.2582 + }, 4.2583 + set: function( elem, value ) { 4.2584 + return ( elem.style.cssText = value + "" ); 4.2585 + } 4.2586 + }; 4.2587 +} 4.2588 + 4.2589 +// Safari mis-reports the default selected property of an option 4.2590 +// Accessing the parent's selectedIndex property fixes it 4.2591 +if ( !jQuery.support.optSelected ) { 4.2592 + jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { 4.2593 + get: function( elem ) { 4.2594 + var parent = elem.parentNode; 4.2595 + 4.2596 + if ( parent ) { 4.2597 + parent.selectedIndex; 4.2598 + 4.2599 + // Make sure that it also works with optgroups, see #5701 4.2600 + if ( parent.parentNode ) { 4.2601 + parent.parentNode.selectedIndex; 4.2602 + } 4.2603 + } 4.2604 + return null; 4.2605 + } 4.2606 + }); 4.2607 +} 4.2608 + 4.2609 +// IE6/7 call enctype encoding 4.2610 +if ( !jQuery.support.enctype ) { 4.2611 + jQuery.propFix.enctype = "encoding"; 4.2612 +} 4.2613 + 4.2614 +// Radios and checkboxes getter/setter 4.2615 +if ( !jQuery.support.checkOn ) { 4.2616 + jQuery.each([ "radio", "checkbox" ], function() { 4.2617 + jQuery.valHooks[ this ] = { 4.2618 + get: function( elem ) { 4.2619 + // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified 4.2620 + return elem.getAttribute("value") === null ? "on" : elem.value; 4.2621 + } 4.2622 + }; 4.2623 + }); 4.2624 +} 4.2625 +jQuery.each([ "radio", "checkbox" ], function() { 4.2626 + jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { 4.2627 + set: function( elem, value ) { 4.2628 + if ( jQuery.isArray( value ) ) { 4.2629 + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); 4.2630 + } 4.2631 + } 4.2632 + }); 4.2633 +}); 4.2634 +var rformElems = /^(?:textarea|input|select)$/i, 4.2635 + rtypenamespace = /^([^\.]*|)(?:\.(.+)|)$/, 4.2636 + rhoverHack = /(?:^|\s)hover(\.\S+|)\b/, 4.2637 + rkeyEvent = /^key/, 4.2638 + rmouseEvent = /^(?:mouse|contextmenu)|click/, 4.2639 + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, 4.2640 + hoverHack = function( events ) { 4.2641 + return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); 4.2642 + }; 4.2643 + 4.2644 +/* 4.2645 + * Helper functions for managing events -- not part of the public interface. 4.2646 + * Props to Dean Edwards' addEvent library for many of the ideas. 4.2647 + */ 4.2648 +jQuery.event = { 4.2649 + 4.2650 + add: function( elem, types, handler, data, selector ) { 4.2651 + 4.2652 + var elemData, eventHandle, events, 4.2653 + t, tns, type, namespaces, handleObj, 4.2654 + handleObjIn, handlers, special; 4.2655 + 4.2656 + // Don't attach events to noData or text/comment nodes (allow plain objects tho) 4.2657 + if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { 4.2658 + return; 4.2659 + } 4.2660 + 4.2661 + // Caller can pass in an object of custom data in lieu of the handler 4.2662 + if ( handler.handler ) { 4.2663 + handleObjIn = handler; 4.2664 + handler = handleObjIn.handler; 4.2665 + selector = handleObjIn.selector; 4.2666 + } 4.2667 + 4.2668 + // Make sure that the handler has a unique ID, used to find/remove it later 4.2669 + if ( !handler.guid ) { 4.2670 + handler.guid = jQuery.guid++; 4.2671 + } 4.2672 + 4.2673 + // Init the element's event structure and main handler, if this is the first 4.2674 + events = elemData.events; 4.2675 + if ( !events ) { 4.2676 + elemData.events = events = {}; 4.2677 + } 4.2678 + eventHandle = elemData.handle; 4.2679 + if ( !eventHandle ) { 4.2680 + elemData.handle = eventHandle = function( e ) { 4.2681 + // Discard the second event of a jQuery.event.trigger() and 4.2682 + // when an event is called after a page has unloaded 4.2683 + return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? 4.2684 + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : 4.2685 + undefined; 4.2686 + }; 4.2687 + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events 4.2688 + eventHandle.elem = elem; 4.2689 + } 4.2690 + 4.2691 + // Handle multiple events separated by a space 4.2692 + // jQuery(...).bind("mouseover mouseout", fn); 4.2693 + types = jQuery.trim( hoverHack(types) ).split( " " ); 4.2694 + for ( t = 0; t < types.length; t++ ) { 4.2695 + 4.2696 + tns = rtypenamespace.exec( types[t] ) || []; 4.2697 + type = tns[1]; 4.2698 + namespaces = ( tns[2] || "" ).split( "." ).sort(); 4.2699 + 4.2700 + // If event changes its type, use the special event handlers for the changed type 4.2701 + special = jQuery.event.special[ type ] || {}; 4.2702 + 4.2703 + // If selector defined, determine special event api type, otherwise given type 4.2704 + type = ( selector ? special.delegateType : special.bindType ) || type; 4.2705 + 4.2706 + // Update special based on newly reset type 4.2707 + special = jQuery.event.special[ type ] || {}; 4.2708 + 4.2709 + // handleObj is passed to all event handlers 4.2710 + handleObj = jQuery.extend({ 4.2711 + type: type, 4.2712 + origType: tns[1], 4.2713 + data: data, 4.2714 + handler: handler, 4.2715 + guid: handler.guid, 4.2716 + selector: selector, 4.2717 + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), 4.2718 + namespace: namespaces.join(".") 4.2719 + }, handleObjIn ); 4.2720 + 4.2721 + // Init the event handler queue if we're the first 4.2722 + handlers = events[ type ]; 4.2723 + if ( !handlers ) { 4.2724 + handlers = events[ type ] = []; 4.2725 + handlers.delegateCount = 0; 4.2726 + 4.2727 + // Only use addEventListener/attachEvent if the special events handler returns false 4.2728 + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { 4.2729 + // Bind the global event handler to the element 4.2730 + if ( elem.addEventListener ) { 4.2731 + elem.addEventListener( type, eventHandle, false ); 4.2732 + 4.2733 + } else if ( elem.attachEvent ) { 4.2734 + elem.attachEvent( "on" + type, eventHandle ); 4.2735 + } 4.2736 + } 4.2737 + } 4.2738 + 4.2739 + if ( special.add ) { 4.2740 + special.add.call( elem, handleObj ); 4.2741 + 4.2742 + if ( !handleObj.handler.guid ) { 4.2743 + handleObj.handler.guid = handler.guid; 4.2744 + } 4.2745 + } 4.2746 + 4.2747 + // Add to the element's handler list, delegates in front 4.2748 + if ( selector ) { 4.2749 + handlers.splice( handlers.delegateCount++, 0, handleObj ); 4.2750 + } else { 4.2751 + handlers.push( handleObj ); 4.2752 + } 4.2753 + 4.2754 + // Keep track of which events have ever been used, for event optimization 4.2755 + jQuery.event.global[ type ] = true; 4.2756 + } 4.2757 + 4.2758 + // Nullify elem to prevent memory leaks in IE 4.2759 + elem = null; 4.2760 + }, 4.2761 + 4.2762 + global: {}, 4.2763 + 4.2764 + // Detach an event or set of events from an element 4.2765 + remove: function( elem, types, handler, selector, mappedTypes ) { 4.2766 + 4.2767 + var t, tns, type, origType, namespaces, origCount, 4.2768 + j, events, special, eventType, handleObj, 4.2769 + elemData = jQuery.hasData( elem ) && jQuery._data( elem ); 4.2770 + 4.2771 + if ( !elemData || !(events = elemData.events) ) { 4.2772 + return; 4.2773 + } 4.2774 + 4.2775 + // Once for each type.namespace in types; type may be omitted 4.2776 + types = jQuery.trim( hoverHack( types || "" ) ).split(" "); 4.2777 + for ( t = 0; t < types.length; t++ ) { 4.2778 + tns = rtypenamespace.exec( types[t] ) || []; 4.2779 + type = origType = tns[1]; 4.2780 + namespaces = tns[2]; 4.2781 + 4.2782 + // Unbind all events (on this namespace, if provided) for the element 4.2783 + if ( !type ) { 4.2784 + for ( type in events ) { 4.2785 + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); 4.2786 + } 4.2787 + continue; 4.2788 + } 4.2789 + 4.2790 + special = jQuery.event.special[ type ] || {}; 4.2791 + type = ( selector? special.delegateType : special.bindType ) || type; 4.2792 + eventType = events[ type ] || []; 4.2793 + origCount = eventType.length; 4.2794 + namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null; 4.2795 + 4.2796 + // Remove matching events 4.2797 + for ( j = 0; j < eventType.length; j++ ) { 4.2798 + handleObj = eventType[ j ]; 4.2799 + 4.2800 + if ( ( mappedTypes || origType === handleObj.origType ) && 4.2801 + ( !handler || handler.guid === handleObj.guid ) && 4.2802 + ( !namespaces || namespaces.test( handleObj.namespace ) ) && 4.2803 + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { 4.2804 + eventType.splice( j--, 1 ); 4.2805 + 4.2806 + if ( handleObj.selector ) { 4.2807 + eventType.delegateCount--; 4.2808 + } 4.2809 + if ( special.remove ) { 4.2810 + special.remove.call( elem, handleObj ); 4.2811 + } 4.2812 + } 4.2813 + } 4.2814 + 4.2815 + // Remove generic event handler if we removed something and no more handlers exist 4.2816 + // (avoids potential for endless recursion during removal of special event handlers) 4.2817 + if ( eventType.length === 0 && origCount !== eventType.length ) { 4.2818 + if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { 4.2819 + jQuery.removeEvent( elem, type, elemData.handle ); 4.2820 + } 4.2821 + 4.2822 + delete events[ type ]; 4.2823 + } 4.2824 + } 4.2825 + 4.2826 + // Remove the expando if it's no longer used 4.2827 + if ( jQuery.isEmptyObject( events ) ) { 4.2828 + delete elemData.handle; 4.2829 + 4.2830 + // removeData also checks for emptiness and clears the expando if empty 4.2831 + // so use it instead of delete 4.2832 + jQuery.removeData( elem, "events", true ); 4.2833 + } 4.2834 + }, 4.2835 + 4.2836 + // Events that are safe to short-circuit if no handlers are attached. 4.2837 + // Native DOM events should not be added, they may have inline handlers. 4.2838 + customEvent: { 4.2839 + "getData": true, 4.2840 + "setData": true, 4.2841 + "changeData": true 4.2842 + }, 4.2843 + 4.2844 + trigger: function( event, data, elem, onlyHandlers ) { 4.2845 + // Don't do events on text and comment nodes 4.2846 + if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { 4.2847 + return; 4.2848 + } 4.2849 + 4.2850 + // Event object or event type 4.2851 + var cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType, 4.2852 + type = event.type || event, 4.2853 + namespaces = []; 4.2854 + 4.2855 + // focus/blur morphs to focusin/out; ensure we're not firing them right now 4.2856 + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { 4.2857 + return; 4.2858 + } 4.2859 + 4.2860 + if ( type.indexOf( "!" ) >= 0 ) { 4.2861 + // Exclusive events trigger only for the exact event (no namespaces) 4.2862 + type = type.slice(0, -1); 4.2863 + exclusive = true; 4.2864 + } 4.2865 + 4.2866 + if ( type.indexOf( "." ) >= 0 ) { 4.2867 + // Namespaced trigger; create a regexp to match event type in handle() 4.2868 + namespaces = type.split("."); 4.2869 + type = namespaces.shift(); 4.2870 + namespaces.sort(); 4.2871 + } 4.2872 + 4.2873 + if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { 4.2874 + // No jQuery handlers for this event type, and it can't have inline handlers 4.2875 + return; 4.2876 + } 4.2877 + 4.2878 + // Caller can pass in an Event, Object, or just an event type string 4.2879 + event = typeof event === "object" ? 4.2880 + // jQuery.Event object 4.2881 + event[ jQuery.expando ] ? event : 4.2882 + // Object literal 4.2883 + new jQuery.Event( type, event ) : 4.2884 + // Just the event type (string) 4.2885 + new jQuery.Event( type ); 4.2886 + 4.2887 + event.type = type; 4.2888 + event.isTrigger = true; 4.2889 + event.exclusive = exclusive; 4.2890 + event.namespace = namespaces.join( "." ); 4.2891 + event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null; 4.2892 + ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; 4.2893 + 4.2894 + // Handle a global trigger 4.2895 + if ( !elem ) { 4.2896 + 4.2897 + // TODO: Stop taunting the data cache; remove global events and always attach to document 4.2898 + cache = jQuery.cache; 4.2899 + for ( i in cache ) { 4.2900 + if ( cache[ i ].events && cache[ i ].events[ type ] ) { 4.2901 + jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); 4.2902 + } 4.2903 + } 4.2904 + return; 4.2905 + } 4.2906 + 4.2907 + // Clean up the event in case it is being reused 4.2908 + event.result = undefined; 4.2909 + if ( !event.target ) { 4.2910 + event.target = elem; 4.2911 + } 4.2912 + 4.2913 + // Clone any incoming data and prepend the event, creating the handler arg list 4.2914 + data = data != null ? jQuery.makeArray( data ) : []; 4.2915 + data.unshift( event ); 4.2916 + 4.2917 + // Allow special events to draw outside the lines 4.2918 + special = jQuery.event.special[ type ] || {}; 4.2919 + if ( special.trigger && special.trigger.apply( elem, data ) === false ) { 4.2920 + return; 4.2921 + } 4.2922 + 4.2923 + // Determine event propagation path in advance, per W3C events spec (#9951) 4.2924 + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) 4.2925 + eventPath = [[ elem, special.bindType || type ]]; 4.2926 + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { 4.2927 + 4.2928 + bubbleType = special.delegateType || type; 4.2929 + cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; 4.2930 + for ( old = elem; cur; cur = cur.parentNode ) { 4.2931 + eventPath.push([ cur, bubbleType ]); 4.2932 + old = cur; 4.2933 + } 4.2934 + 4.2935 + // Only add window if we got to document (e.g., not plain obj or detached DOM) 4.2936 + if ( old === (elem.ownerDocument || document) ) { 4.2937 + eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); 4.2938 + } 4.2939 + } 4.2940 + 4.2941 + // Fire handlers on the event path 4.2942 + for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { 4.2943 + 4.2944 + cur = eventPath[i][0]; 4.2945 + event.type = eventPath[i][1]; 4.2946 + 4.2947 + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); 4.2948 + if ( handle ) { 4.2949 + handle.apply( cur, data ); 4.2950 + } 4.2951 + // Note that this is a bare JS function and not a jQuery handler 4.2952 + handle = ontype && cur[ ontype ]; 4.2953 + if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { 4.2954 + event.preventDefault(); 4.2955 + } 4.2956 + } 4.2957 + event.type = type; 4.2958 + 4.2959 + // If nobody prevented the default action, do it now 4.2960 + if ( !onlyHandlers && !event.isDefaultPrevented() ) { 4.2961 + 4.2962 + if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && 4.2963 + !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { 4.2964 + 4.2965 + // Call a native DOM method on the target with the same name name as the event. 4.2966 + // Can't use an .isFunction() check here because IE6/7 fails that test. 4.2967 + // Don't do default actions on window, that's where global variables be (#6170) 4.2968 + // IE<9 dies on focus/blur to hidden element (#1486) 4.2969 + if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { 4.2970 + 4.2971 + // Don't re-trigger an onFOO event when we call its FOO() method 4.2972 + old = elem[ ontype ]; 4.2973 + 4.2974 + if ( old ) { 4.2975 + elem[ ontype ] = null; 4.2976 + } 4.2977 + 4.2978 + // Prevent re-triggering of the same event, since we already bubbled it above 4.2979 + jQuery.event.triggered = type; 4.2980 + elem[ type ](); 4.2981 + jQuery.event.triggered = undefined; 4.2982 + 4.2983 + if ( old ) { 4.2984 + elem[ ontype ] = old; 4.2985 + } 4.2986 + } 4.2987 + } 4.2988 + } 4.2989 + 4.2990 + return event.result; 4.2991 + }, 4.2992 + 4.2993 + dispatch: function( event ) { 4.2994 + 4.2995 + // Make a writable jQuery.Event from the native event object 4.2996 + event = jQuery.event.fix( event || window.event ); 4.2997 + 4.2998 + var i, j, cur, ret, selMatch, matched, matches, handleObj, sel, related, 4.2999 + handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), 4.3000 + delegateCount = handlers.delegateCount, 4.3001 + args = core_slice.call( arguments ), 4.3002 + run_all = !event.exclusive && !event.namespace, 4.3003 + special = jQuery.event.special[ event.type ] || {}, 4.3004 + handlerQueue = []; 4.3005 + 4.3006 + // Use the fix-ed jQuery.Event rather than the (read-only) native event 4.3007 + args[0] = event; 4.3008 + event.delegateTarget = this; 4.3009 + 4.3010 + // Call the preDispatch hook for the mapped type, and let it bail if desired 4.3011 + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { 4.3012 + return; 4.3013 + } 4.3014 + 4.3015 + // Determine handlers that should run if there are delegated events 4.3016 + // Avoid non-left-click bubbling in Firefox (#3861) 4.3017 + if ( delegateCount && !(event.button && event.type === "click") ) { 4.3018 + 4.3019 + for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { 4.3020 + 4.3021 + // Don't process clicks (ONLY) on disabled elements (#6911, #8165, #11382, #11764) 4.3022 + if ( cur.disabled !== true || event.type !== "click" ) { 4.3023 + selMatch = {}; 4.3024 + matches = []; 4.3025 + for ( i = 0; i < delegateCount; i++ ) { 4.3026 + handleObj = handlers[ i ]; 4.3027 + sel = handleObj.selector; 4.3028 + 4.3029 + if ( selMatch[ sel ] === undefined ) { 4.3030 + selMatch[ sel ] = handleObj.needsContext ? 4.3031 + jQuery( sel, this ).index( cur ) >= 0 : 4.3032 + jQuery.find( sel, this, null, [ cur ] ).length; 4.3033 + } 4.3034 + if ( selMatch[ sel ] ) { 4.3035 + matches.push( handleObj ); 4.3036 + } 4.3037 + } 4.3038 + if ( matches.length ) { 4.3039 + handlerQueue.push({ elem: cur, matches: matches }); 4.3040 + } 4.3041 + } 4.3042 + } 4.3043 + } 4.3044 + 4.3045 + // Add the remaining (directly-bound) handlers 4.3046 + if ( handlers.length > delegateCount ) { 4.3047 + handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); 4.3048 + } 4.3049 + 4.3050 + // Run delegates first; they may want to stop propagation beneath us 4.3051 + for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { 4.3052 + matched = handlerQueue[ i ]; 4.3053 + event.currentTarget = matched.elem; 4.3054 + 4.3055 + for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { 4.3056 + handleObj = matched.matches[ j ]; 4.3057 + 4.3058 + // Triggered event must either 1) be non-exclusive and have no namespace, or 4.3059 + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). 4.3060 + if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { 4.3061 + 4.3062 + event.data = handleObj.data; 4.3063 + event.handleObj = handleObj; 4.3064 + 4.3065 + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) 4.3066 + .apply( matched.elem, args ); 4.3067 + 4.3068 + if ( ret !== undefined ) { 4.3069 + event.result = ret; 4.3070 + if ( ret === false ) { 4.3071 + event.preventDefault(); 4.3072 + event.stopPropagation(); 4.3073 + } 4.3074 + } 4.3075 + } 4.3076 + } 4.3077 + } 4.3078 + 4.3079 + // Call the postDispatch hook for the mapped type 4.3080 + if ( special.postDispatch ) { 4.3081 + special.postDispatch.call( this, event ); 4.3082 + } 4.3083 + 4.3084 + return event.result; 4.3085 + }, 4.3086 + 4.3087 + // Includes some event props shared by KeyEvent and MouseEvent 4.3088 + // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** 4.3089 + props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), 4.3090 + 4.3091 + fixHooks: {}, 4.3092 + 4.3093 + keyHooks: { 4.3094 + props: "char charCode key keyCode".split(" "), 4.3095 + filter: function( event, original ) { 4.3096 + 4.3097 + // Add which for key events 4.3098 + if ( event.which == null ) { 4.3099 + event.which = original.charCode != null ? original.charCode : original.keyCode; 4.3100 + } 4.3101 + 4.3102 + return event; 4.3103 + } 4.3104 + }, 4.3105 + 4.3106 + mouseHooks: { 4.3107 + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), 4.3108 + filter: function( event, original ) { 4.3109 + var eventDoc, doc, body, 4.3110 + button = original.button, 4.3111 + fromElement = original.fromElement; 4.3112 + 4.3113 + // Calculate pageX/Y if missing and clientX/Y available 4.3114 + if ( event.pageX == null && original.clientX != null ) { 4.3115 + eventDoc = event.target.ownerDocument || document; 4.3116 + doc = eventDoc.documentElement; 4.3117 + body = eventDoc.body; 4.3118 + 4.3119 + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); 4.3120 + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); 4.3121 + } 4.3122 + 4.3123 + // Add relatedTarget, if necessary 4.3124 + if ( !event.relatedTarget && fromElement ) { 4.3125 + event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; 4.3126 + } 4.3127 + 4.3128 + // Add which for click: 1 === left; 2 === middle; 3 === right 4.3129 + // Note: button is not normalized, so don't use it 4.3130 + if ( !event.which && button !== undefined ) { 4.3131 + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); 4.3132 + } 4.3133 + 4.3134 + return event; 4.3135 + } 4.3136 + }, 4.3137 + 4.3138 + fix: function( event ) { 4.3139 + if ( event[ jQuery.expando ] ) { 4.3140 + return event; 4.3141 + } 4.3142 + 4.3143 + // Create a writable copy of the event object and normalize some properties 4.3144 + var i, prop, 4.3145 + originalEvent = event, 4.3146 + fixHook = jQuery.event.fixHooks[ event.type ] || {}, 4.3147 + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; 4.3148 + 4.3149 + event = jQuery.Event( originalEvent ); 4.3150 + 4.3151 + for ( i = copy.length; i; ) { 4.3152 + prop = copy[ --i ]; 4.3153 + event[ prop ] = originalEvent[ prop ]; 4.3154 + } 4.3155 + 4.3156 + // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) 4.3157 + if ( !event.target ) { 4.3158 + event.target = originalEvent.srcElement || document; 4.3159 + } 4.3160 + 4.3161 + // Target should not be a text node (#504, Safari) 4.3162 + if ( event.target.nodeType === 3 ) { 4.3163 + event.target = event.target.parentNode; 4.3164 + } 4.3165 + 4.3166 + // For mouse/key events, metaKey==false if it's undefined (#3368, #11328; IE6/7/8) 4.3167 + event.metaKey = !!event.metaKey; 4.3168 + 4.3169 + return fixHook.filter? fixHook.filter( event, originalEvent ) : event; 4.3170 + }, 4.3171 + 4.3172 + special: { 4.3173 + load: { 4.3174 + // Prevent triggered image.load events from bubbling to window.load 4.3175 + noBubble: true 4.3176 + }, 4.3177 + 4.3178 + focus: { 4.3179 + delegateType: "focusin" 4.3180 + }, 4.3181 + blur: { 4.3182 + delegateType: "focusout" 4.3183 + }, 4.3184 + 4.3185 + beforeunload: { 4.3186 + setup: function( data, namespaces, eventHandle ) { 4.3187 + // We only want to do this special case on windows 4.3188 + if ( jQuery.isWindow( this ) ) { 4.3189 + this.onbeforeunload = eventHandle; 4.3190 + } 4.3191 + }, 4.3192 + 4.3193 + teardown: function( namespaces, eventHandle ) { 4.3194 + if ( this.onbeforeunload === eventHandle ) { 4.3195 + this.onbeforeunload = null; 4.3196 + } 4.3197 + } 4.3198 + } 4.3199 + }, 4.3200 + 4.3201 + simulate: function( type, elem, event, bubble ) { 4.3202 + // Piggyback on a donor event to simulate a different one. 4.3203 + // Fake originalEvent to avoid donor's stopPropagation, but if the 4.3204 + // simulated event prevents default then we do the same on the donor. 4.3205 + var e = jQuery.extend( 4.3206 + new jQuery.Event(), 4.3207 + event, 4.3208 + { type: type, 4.3209 + isSimulated: true, 4.3210 + originalEvent: {} 4.3211 + } 4.3212 + ); 4.3213 + if ( bubble ) { 4.3214 + jQuery.event.trigger( e, null, elem ); 4.3215 + } else { 4.3216 + jQuery.event.dispatch.call( elem, e ); 4.3217 + } 4.3218 + if ( e.isDefaultPrevented() ) { 4.3219 + event.preventDefault(); 4.3220 + } 4.3221 + } 4.3222 +}; 4.3223 + 4.3224 +// Some plugins are using, but it's undocumented/deprecated and will be removed. 4.3225 +// The 1.7 special event interface should provide all the hooks needed now. 4.3226 +jQuery.event.handle = jQuery.event.dispatch; 4.3227 + 4.3228 +jQuery.removeEvent = document.removeEventListener ? 4.3229 + function( elem, type, handle ) { 4.3230 + if ( elem.removeEventListener ) { 4.3231 + elem.removeEventListener( type, handle, false ); 4.3232 + } 4.3233 + } : 4.3234 + function( elem, type, handle ) { 4.3235 + var name = "on" + type; 4.3236 + 4.3237 + if ( elem.detachEvent ) { 4.3238 + 4.3239 + // #8545, #7054, preventing memory leaks for custom events in IE6-8 – 4.3240 + // detachEvent needed property on element, by name of that event, to properly expose it to GC 4.3241 + if ( typeof elem[ name ] === "undefined" ) { 4.3242 + elem[ name ] = null; 4.3243 + } 4.3244 + 4.3245 + elem.detachEvent( name, handle ); 4.3246 + } 4.3247 + }; 4.3248 + 4.3249 +jQuery.Event = function( src, props ) { 4.3250 + // Allow instantiation without the 'new' keyword 4.3251 + if ( !(this instanceof jQuery.Event) ) { 4.3252 + return new jQuery.Event( src, props ); 4.3253 + } 4.3254 + 4.3255 + // Event object 4.3256 + if ( src && src.type ) { 4.3257 + this.originalEvent = src; 4.3258 + this.type = src.type; 4.3259 + 4.3260 + // Events bubbling up the document may have been marked as prevented 4.3261 + // by a handler lower down the tree; reflect the correct value. 4.3262 + this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || 4.3263 + src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; 4.3264 + 4.3265 + // Event type 4.3266 + } else { 4.3267 + this.type = src; 4.3268 + } 4.3269 + 4.3270 + // Put explicitly provided properties onto the event object 4.3271 + if ( props ) { 4.3272 + jQuery.extend( this, props ); 4.3273 + } 4.3274 + 4.3275 + // Create a timestamp if incoming event doesn't have one 4.3276 + this.timeStamp = src && src.timeStamp || jQuery.now(); 4.3277 + 4.3278 + // Mark it as fixed 4.3279 + this[ jQuery.expando ] = true; 4.3280 +}; 4.3281 + 4.3282 +function returnFalse() { 4.3283 + return false; 4.3284 +} 4.3285 +function returnTrue() { 4.3286 + return true; 4.3287 +} 4.3288 + 4.3289 +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding 4.3290 +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html 4.3291 +jQuery.Event.prototype = { 4.3292 + preventDefault: function() { 4.3293 + this.isDefaultPrevented = returnTrue; 4.3294 + 4.3295 + var e = this.originalEvent; 4.3296 + if ( !e ) { 4.3297 + return; 4.3298 + } 4.3299 + 4.3300 + // if preventDefault exists run it on the original event 4.3301 + if ( e.preventDefault ) { 4.3302 + e.preventDefault(); 4.3303 + 4.3304 + // otherwise set the returnValue property of the original event to false (IE) 4.3305 + } else { 4.3306 + e.returnValue = false; 4.3307 + } 4.3308 + }, 4.3309 + stopPropagation: function() { 4.3310 + this.isPropagationStopped = returnTrue; 4.3311 + 4.3312 + var e = this.originalEvent; 4.3313 + if ( !e ) { 4.3314 + return; 4.3315 + } 4.3316 + // if stopPropagation exists run it on the original event 4.3317 + if ( e.stopPropagation ) { 4.3318 + e.stopPropagation(); 4.3319 + } 4.3320 + // otherwise set the cancelBubble property of the original event to true (IE) 4.3321 + e.cancelBubble = true; 4.3322 + }, 4.3323 + stopImmediatePropagation: function() { 4.3324 + this.isImmediatePropagationStopped = returnTrue; 4.3325 + this.stopPropagation(); 4.3326 + }, 4.3327 + isDefaultPrevented: returnFalse, 4.3328 + isPropagationStopped: returnFalse, 4.3329 + isImmediatePropagationStopped: returnFalse 4.3330 +}; 4.3331 + 4.3332 +// Create mouseenter/leave events using mouseover/out and event-time checks 4.3333 +jQuery.each({ 4.3334 + mouseenter: "mouseover", 4.3335 + mouseleave: "mouseout" 4.3336 +}, function( orig, fix ) { 4.3337 + jQuery.event.special[ orig ] = { 4.3338 + delegateType: fix, 4.3339 + bindType: fix, 4.3340 + 4.3341 + handle: function( event ) { 4.3342 + var ret, 4.3343 + target = this, 4.3344 + related = event.relatedTarget, 4.3345 + handleObj = event.handleObj, 4.3346 + selector = handleObj.selector; 4.3347 + 4.3348 + // For mousenter/leave call the handler if related is outside the target. 4.3349 + // NB: No relatedTarget if the mouse left/entered the browser window 4.3350 + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { 4.3351 + event.type = handleObj.origType; 4.3352 + ret = handleObj.handler.apply( this, arguments ); 4.3353 + event.type = fix; 4.3354 + } 4.3355 + return ret; 4.3356 + } 4.3357 + }; 4.3358 +}); 4.3359 + 4.3360 +// IE submit delegation 4.3361 +if ( !jQuery.support.submitBubbles ) { 4.3362 + 4.3363 + jQuery.event.special.submit = { 4.3364 + setup: function() { 4.3365 + // Only need this for delegated form submit events 4.3366 + if ( jQuery.nodeName( this, "form" ) ) { 4.3367 + return false; 4.3368 + } 4.3369 + 4.3370 + // Lazy-add a submit handler when a descendant form may potentially be submitted 4.3371 + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { 4.3372 + // Node name check avoids a VML-related crash in IE (#9807) 4.3373 + var elem = e.target, 4.3374 + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; 4.3375 + if ( form && !jQuery._data( form, "_submit_attached" ) ) { 4.3376 + jQuery.event.add( form, "submit._submit", function( event ) { 4.3377 + event._submit_bubble = true; 4.3378 + }); 4.3379 + jQuery._data( form, "_submit_attached", true ); 4.3380 + } 4.3381 + }); 4.3382 + // return undefined since we don't need an event listener 4.3383 + }, 4.3384 + 4.3385 + postDispatch: function( event ) { 4.3386 + // If form was submitted by the user, bubble the event up the tree 4.3387 + if ( event._submit_bubble ) { 4.3388 + delete event._submit_bubble; 4.3389 + if ( this.parentNode && !event.isTrigger ) { 4.3390 + jQuery.event.simulate( "submit", this.parentNode, event, true ); 4.3391 + } 4.3392 + } 4.3393 + }, 4.3394 + 4.3395 + teardown: function() { 4.3396 + // Only need this for delegated form submit events 4.3397 + if ( jQuery.nodeName( this, "form" ) ) { 4.3398 + return false; 4.3399 + } 4.3400 + 4.3401 + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above 4.3402 + jQuery.event.remove( this, "._submit" ); 4.3403 + } 4.3404 + }; 4.3405 +} 4.3406 + 4.3407 +// IE change delegation and checkbox/radio fix 4.3408 +if ( !jQuery.support.changeBubbles ) { 4.3409 + 4.3410 + jQuery.event.special.change = { 4.3411 + 4.3412 + setup: function() { 4.3413 + 4.3414 + if ( rformElems.test( this.nodeName ) ) { 4.3415 + // IE doesn't fire change on a check/radio until blur; trigger it on click 4.3416 + // after a propertychange. Eat the blur-change in special.change.handle. 4.3417 + // This still fires onchange a second time for check/radio after blur. 4.3418 + if ( this.type === "checkbox" || this.type === "radio" ) { 4.3419 + jQuery.event.add( this, "propertychange._change", function( event ) { 4.3420 + if ( event.originalEvent.propertyName === "checked" ) { 4.3421 + this._just_changed = true; 4.3422 + } 4.3423 + }); 4.3424 + jQuery.event.add( this, "click._change", function( event ) { 4.3425 + if ( this._just_changed && !event.isTrigger ) { 4.3426 + this._just_changed = false; 4.3427 + } 4.3428 + // Allow triggered, simulated change events (#11500) 4.3429 + jQuery.event.simulate( "change", this, event, true ); 4.3430 + }); 4.3431 + } 4.3432 + return false; 4.3433 + } 4.3434 + // Delegated event; lazy-add a change handler on descendant inputs 4.3435 + jQuery.event.add( this, "beforeactivate._change", function( e ) { 4.3436 + var elem = e.target; 4.3437 + 4.3438 + if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "_change_attached" ) ) { 4.3439 + jQuery.event.add( elem, "change._change", function( event ) { 4.3440 + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { 4.3441 + jQuery.event.simulate( "change", this.parentNode, event, true ); 4.3442 + } 4.3443 + }); 4.3444 + jQuery._data( elem, "_change_attached", true ); 4.3445 + } 4.3446 + }); 4.3447 + }, 4.3448 + 4.3449 + handle: function( event ) { 4.3450 + var elem = event.target; 4.3451 + 4.3452 + // Swallow native change events from checkbox/radio, we already triggered them above 4.3453 + if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { 4.3454 + return event.handleObj.handler.apply( this, arguments ); 4.3455 + } 4.3456 + }, 4.3457 + 4.3458 + teardown: function() { 4.3459 + jQuery.event.remove( this, "._change" ); 4.3460 + 4.3461 + return !rformElems.test( this.nodeName ); 4.3462 + } 4.3463 + }; 4.3464 +} 4.3465 + 4.3466 +// Create "bubbling" focus and blur events 4.3467 +if ( !jQuery.support.focusinBubbles ) { 4.3468 + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { 4.3469 + 4.3470 + // Attach a single capturing handler while someone wants focusin/focusout 4.3471 + var attaches = 0, 4.3472 + handler = function( event ) { 4.3473 + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); 4.3474 + }; 4.3475 + 4.3476 + jQuery.event.special[ fix ] = { 4.3477 + setup: function() { 4.3478 + if ( attaches++ === 0 ) { 4.3479 + document.addEventListener( orig, handler, true ); 4.3480 + } 4.3481 + }, 4.3482 + teardown: function() { 4.3483 + if ( --attaches === 0 ) { 4.3484 + document.removeEventListener( orig, handler, true ); 4.3485 + } 4.3486 + } 4.3487 + }; 4.3488 + }); 4.3489 +} 4.3490 + 4.3491 +jQuery.fn.extend({ 4.3492 + 4.3493 + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { 4.3494 + var origFn, type; 4.3495 + 4.3496 + // Types can be a map of types/handlers 4.3497 + if ( typeof types === "object" ) { 4.3498 + // ( types-Object, selector, data ) 4.3499 + if ( typeof selector !== "string" ) { // && selector != null 4.3500 + // ( types-Object, data ) 4.3501 + data = data || selector; 4.3502 + selector = undefined; 4.3503 + } 4.3504 + for ( type in types ) { 4.3505 + this.on( type, selector, data, types[ type ], one ); 4.3506 + } 4.3507 + return this; 4.3508 + } 4.3509 + 4.3510 + if ( data == null && fn == null ) { 4.3511 + // ( types, fn ) 4.3512 + fn = selector; 4.3513 + data = selector = undefined; 4.3514 + } else if ( fn == null ) { 4.3515 + if ( typeof selector === "string" ) { 4.3516 + // ( types, selector, fn ) 4.3517 + fn = data; 4.3518 + data = undefined; 4.3519 + } else { 4.3520 + // ( types, data, fn ) 4.3521 + fn = data; 4.3522 + data = selector; 4.3523 + selector = undefined; 4.3524 + } 4.3525 + } 4.3526 + if ( fn === false ) { 4.3527 + fn = returnFalse; 4.3528 + } else if ( !fn ) { 4.3529 + return this; 4.3530 + } 4.3531 + 4.3532 + if ( one === 1 ) { 4.3533 + origFn = fn; 4.3534 + fn = function( event ) { 4.3535 + // Can use an empty set, since event contains the info 4.3536 + jQuery().off( event ); 4.3537 + return origFn.apply( this, arguments ); 4.3538 + }; 4.3539 + // Use same guid so caller can remove using origFn 4.3540 + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); 4.3541 + } 4.3542 + return this.each( function() { 4.3543 + jQuery.event.add( this, types, fn, data, selector ); 4.3544 + }); 4.3545 + }, 4.3546 + one: function( types, selector, data, fn ) { 4.3547 + return this.on( types, selector, data, fn, 1 ); 4.3548 + }, 4.3549 + off: function( types, selector, fn ) { 4.3550 + var handleObj, type; 4.3551 + if ( types && types.preventDefault && types.handleObj ) { 4.3552 + // ( event ) dispatched jQuery.Event 4.3553 + handleObj = types.handleObj; 4.3554 + jQuery( types.delegateTarget ).off( 4.3555 + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, 4.3556 + handleObj.selector, 4.3557 + handleObj.handler 4.3558 + ); 4.3559 + return this; 4.3560 + } 4.3561 + if ( typeof types === "object" ) { 4.3562 + // ( types-object [, selector] ) 4.3563 + for ( type in types ) { 4.3564 + this.off( type, selector, types[ type ] ); 4.3565 + } 4.3566 + return this; 4.3567 + } 4.3568 + if ( selector === false || typeof selector === "function" ) { 4.3569 + // ( types [, fn] ) 4.3570 + fn = selector; 4.3571 + selector = undefined; 4.3572 + } 4.3573 + if ( fn === false ) { 4.3574 + fn = returnFalse; 4.3575 + } 4.3576 + return this.each(function() { 4.3577 + jQuery.event.remove( this, types, fn, selector ); 4.3578 + }); 4.3579 + }, 4.3580 + 4.3581 + bind: function( types, data, fn ) { 4.3582 + return this.on( types, null, data, fn ); 4.3583 + }, 4.3584 + unbind: function( types, fn ) { 4.3585 + return this.off( types, null, fn ); 4.3586 + }, 4.3587 + 4.3588 + live: function( types, data, fn ) { 4.3589 + jQuery( this.context ).on( types, this.selector, data, fn ); 4.3590 + return this; 4.3591 + }, 4.3592 + die: function( types, fn ) { 4.3593 + jQuery( this.context ).off( types, this.selector || "**", fn ); 4.3594 + return this; 4.3595 + }, 4.3596 + 4.3597 + delegate: function( selector, types, data, fn ) { 4.3598 + return this.on( types, selector, data, fn ); 4.3599 + }, 4.3600 + undelegate: function( selector, types, fn ) { 4.3601 + // ( namespace ) or ( selector, types [, fn] ) 4.3602 + return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); 4.3603 + }, 4.3604 + 4.3605 + trigger: function( type, data ) { 4.3606 + return this.each(function() { 4.3607 + jQuery.event.trigger( type, data, this ); 4.3608 + }); 4.3609 + }, 4.3610 + triggerHandler: function( type, data ) { 4.3611 + if ( this[0] ) { 4.3612 + return jQuery.event.trigger( type, data, this[0], true ); 4.3613 + } 4.3614 + }, 4.3615 + 4.3616 + toggle: function( fn ) { 4.3617 + // Save reference to arguments for access in closure 4.3618 + var args = arguments, 4.3619 + guid = fn.guid || jQuery.guid++, 4.3620 + i = 0, 4.3621 + toggler = function( event ) { 4.3622 + // Figure out which function to execute 4.3623 + var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; 4.3624 + jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); 4.3625 + 4.3626 + // Make sure that clicks stop 4.3627 + event.preventDefault(); 4.3628 + 4.3629 + // and execute the function 4.3630 + return args[ lastToggle ].apply( this, arguments ) || false; 4.3631 + }; 4.3632 + 4.3633 + // link all the functions, so any of them can unbind this click handler 4.3634 + toggler.guid = guid; 4.3635 + while ( i < args.length ) { 4.3636 + args[ i++ ].guid = guid; 4.3637 + } 4.3638 + 4.3639 + return this.click( toggler ); 4.3640 + }, 4.3641 + 4.3642 + hover: function( fnOver, fnOut ) { 4.3643 + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); 4.3644 + } 4.3645 +}); 4.3646 + 4.3647 +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + 4.3648 + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + 4.3649 + "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { 4.3650 + 4.3651 + // Handle event binding 4.3652 + jQuery.fn[ name ] = function( data, fn ) { 4.3653 + if ( fn == null ) { 4.3654 + fn = data; 4.3655 + data = null; 4.3656 + } 4.3657 + 4.3658 + return arguments.length > 0 ? 4.3659 + this.on( name, null, data, fn ) : 4.3660 + this.trigger( name ); 4.3661 + }; 4.3662 + 4.3663 + if ( rkeyEvent.test( name ) ) { 4.3664 + jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; 4.3665 + } 4.3666 + 4.3667 + if ( rmouseEvent.test( name ) ) { 4.3668 + jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; 4.3669 + } 4.3670 +}); 4.3671 +/*! 4.3672 + * Sizzle CSS Selector Engine 4.3673 + * Copyright 2012 jQuery Foundation and other contributors 4.3674 + * Released under the MIT license 4.3675 + * http://sizzlejs.com/ 4.3676 + */ 4.3677 +(function( window, undefined ) { 4.3678 + 4.3679 +var cachedruns, 4.3680 + assertGetIdNotName, 4.3681 + Expr, 4.3682 + getText, 4.3683 + isXML, 4.3684 + contains, 4.3685 + compile, 4.3686 + sortOrder, 4.3687 + hasDuplicate, 4.3688 + outermostContext, 4.3689 + 4.3690 + baseHasDuplicate = true, 4.3691 + strundefined = "undefined", 4.3692 + 4.3693 + expando = ( "sizcache" + Math.random() ).replace( ".", "" ), 4.3694 + 4.3695 + Token = String, 4.3696 + document = window.document, 4.3697 + docElem = document.documentElement, 4.3698 + dirruns = 0, 4.3699 + done = 0, 4.3700 + pop = [].pop, 4.3701 + push = [].push, 4.3702 + slice = [].slice, 4.3703 + // Use a stripped-down indexOf if a native one is unavailable 4.3704 + indexOf = [].indexOf || function( elem ) { 4.3705 + var i = 0, 4.3706 + len = this.length; 4.3707 + for ( ; i < len; i++ ) { 4.3708 + if ( this[i] === elem ) { 4.3709 + return i; 4.3710 + } 4.3711 + } 4.3712 + return -1; 4.3713 + }, 4.3714 + 4.3715 + // Augment a function for special use by Sizzle 4.3716 + markFunction = function( fn, value ) { 4.3717 + fn[ expando ] = value == null || value; 4.3718 + return fn; 4.3719 + }, 4.3720 + 4.3721 + createCache = function() { 4.3722 + var cache = {}, 4.3723 + keys = []; 4.3724 + 4.3725 + return markFunction(function( key, value ) { 4.3726 + // Only keep the most recent entries 4.3727 + if ( keys.push( key ) > Expr.cacheLength ) { 4.3728 + delete cache[ keys.shift() ]; 4.3729 + } 4.3730 + 4.3731 + return (cache[ key ] = value); 4.3732 + }, cache ); 4.3733 + }, 4.3734 + 4.3735 + classCache = createCache(), 4.3736 + tokenCache = createCache(), 4.3737 + compilerCache = createCache(), 4.3738 + 4.3739 + // Regex 4.3740 + 4.3741 + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace 4.3742 + whitespace = "[\\x20\\t\\r\\n\\f]", 4.3743 + // http://www.w3.org/TR/css3-syntax/#characters 4.3744 + characterEncoding = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+", 4.3745 + 4.3746 + // Loosely modeled on CSS identifier characters 4.3747 + // An unquoted value should be a CSS identifier (http://www.w3.org/TR/css3-selectors/#attribute-selectors) 4.3748 + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier 4.3749 + identifier = characterEncoding.replace( "w", "w#" ), 4.3750 + 4.3751 + // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors 4.3752 + operators = "([*^$|!~]?=)", 4.3753 + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + 4.3754 + "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", 4.3755 + 4.3756 + // Prefer arguments not in parens/brackets, 4.3757 + // then attribute selectors and non-pseudos (denoted by :), 4.3758 + // then anything else 4.3759 + // These preferences are here to reduce the number of selectors 4.3760 + // needing tokenize in the PSEUDO preFilter 4.3761 + pseudos = ":(" + characterEncoding + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:" + attributes + ")|[^:]|\\\\.)*|.*))\\)|)", 4.3762 + 4.3763 + // For matchExpr.POS and matchExpr.needsContext 4.3764 + pos = ":(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + 4.3765 + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", 4.3766 + 4.3767 + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter 4.3768 + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), 4.3769 + 4.3770 + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), 4.3771 + rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ), 4.3772 + rpseudo = new RegExp( pseudos ), 4.3773 + 4.3774 + // Easily-parseable/retrievable ID or TAG or CLASS selectors 4.3775 + rquickExpr = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/, 4.3776 + 4.3777 + rnot = /^:not/, 4.3778 + rsibling = /[\x20\t\r\n\f]*[+~]/, 4.3779 + rendsWithNot = /:not\($/, 4.3780 + 4.3781 + rheader = /h\d/i, 4.3782 + rinputs = /input|select|textarea|button/i, 4.3783 + 4.3784 + rbackslash = /\\(?!\\)/g, 4.3785 + 4.3786 + matchExpr = { 4.3787 + "ID": new RegExp( "^#(" + characterEncoding + ")" ), 4.3788 + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), 4.3789 + "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), 4.3790 + "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), 4.3791 + "ATTR": new RegExp( "^" + attributes ), 4.3792 + "PSEUDO": new RegExp( "^" + pseudos ), 4.3793 + "POS": new RegExp( pos, "i" ), 4.3794 + "CHILD": new RegExp( "^:(only|nth|first|last)-child(?:\\(" + whitespace + 4.3795 + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + 4.3796 + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), 4.3797 + // For use in libraries implementing .is() 4.3798 + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|" + pos, "i" ) 4.3799 + }, 4.3800 + 4.3801 + // Support 4.3802 + 4.3803 + // Used for testing something on an element 4.3804 + assert = function( fn ) { 4.3805 + var div = document.createElement("div"); 4.3806 + 4.3807 + try { 4.3808 + return fn( div ); 4.3809 + } catch (e) { 4.3810 + return false; 4.3811 + } finally { 4.3812 + // release memory in IE 4.3813 + div = null; 4.3814 + } 4.3815 + }, 4.3816 + 4.3817 + // Check if getElementsByTagName("*") returns only elements 4.3818 + assertTagNameNoComments = assert(function( div ) { 4.3819 + div.appendChild( document.createComment("") ); 4.3820 + return !div.getElementsByTagName("*").length; 4.3821 + }), 4.3822 + 4.3823 + // Check if getAttribute returns normalized href attributes 4.3824 + assertHrefNotNormalized = assert(function( div ) { 4.3825 + div.innerHTML = "<a href='#'></a>"; 4.3826 + return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && 4.3827 + div.firstChild.getAttribute("href") === "#"; 4.3828 + }), 4.3829 + 4.3830 + // Check if attributes should be retrieved by attribute nodes 4.3831 + assertAttributes = assert(function( div ) { 4.3832 + div.innerHTML = "<select></select>"; 4.3833 + var type = typeof div.lastChild.getAttribute("multiple"); 4.3834 + // IE8 returns a string for some attributes even when not present 4.3835 + return type !== "boolean" && type !== "string"; 4.3836 + }), 4.3837 + 4.3838 + // Check if getElementsByClassName can be trusted 4.3839 + assertUsableClassName = assert(function( div ) { 4.3840 + // Opera can't find a second classname (in 9.6) 4.3841 + div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>"; 4.3842 + if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) { 4.3843 + return false; 4.3844 + } 4.3845 + 4.3846 + // Safari 3.2 caches class attributes and doesn't catch changes 4.3847 + div.lastChild.className = "e"; 4.3848 + return div.getElementsByClassName("e").length === 2; 4.3849 + }), 4.3850 + 4.3851 + // Check if getElementById returns elements by name 4.3852 + // Check if getElementsByName privileges form controls or returns elements by ID 4.3853 + assertUsableName = assert(function( div ) { 4.3854 + // Inject content 4.3855 + div.id = expando + 0; 4.3856 + div.innerHTML = "<a name='" + expando + "'></a><div name='" + expando + "'></div>"; 4.3857 + docElem.insertBefore( div, docElem.firstChild ); 4.3858 + 4.3859 + // Test 4.3860 + var pass = document.getElementsByName && 4.3861 + // buggy browsers will return fewer than the correct 2 4.3862 + document.getElementsByName( expando ).length === 2 + 4.3863 + // buggy browsers will return more than the correct 0 4.3864 + document.getElementsByName( expando + 0 ).length; 4.3865 + assertGetIdNotName = !document.getElementById( expando ); 4.3866 + 4.3867 + // Cleanup 4.3868 + docElem.removeChild( div ); 4.3869 + 4.3870 + return pass; 4.3871 + }); 4.3872 + 4.3873 +// If slice is not available, provide a backup 4.3874 +try { 4.3875 + slice.call( docElem.childNodes, 0 )[0].nodeType; 4.3876 +} catch ( e ) { 4.3877 + slice = function( i ) { 4.3878 + var elem, 4.3879 + results = []; 4.3880 + for ( ; (elem = this[i]); i++ ) { 4.3881 + results.push( elem ); 4.3882 + } 4.3883 + return results; 4.3884 + }; 4.3885 +} 4.3886 + 4.3887 +function Sizzle( selector, context, results, seed ) { 4.3888 + results = results || []; 4.3889 + context = context || document; 4.3890 + var match, elem, xml, m, 4.3891 + nodeType = context.nodeType; 4.3892 + 4.3893 + if ( !selector || typeof selector !== "string" ) { 4.3894 + return results; 4.3895 + } 4.3896 + 4.3897 + if ( nodeType !== 1 && nodeType !== 9 ) { 4.3898 + return []; 4.3899 + } 4.3900 + 4.3901 + xml = isXML( context ); 4.3902 + 4.3903 + if ( !xml && !seed ) { 4.3904 + if ( (match = rquickExpr.exec( selector )) ) { 4.3905 + // Speed-up: Sizzle("#ID") 4.3906 + if ( (m = match[1]) ) { 4.3907 + if ( nodeType === 9 ) { 4.3908 + elem = context.getElementById( m ); 4.3909 + // Check parentNode to catch when Blackberry 4.6 returns 4.3910 + // nodes that are no longer in the document #6963 4.3911 + if ( elem && elem.parentNode ) { 4.3912 + // Handle the case where IE, Opera, and Webkit return items 4.3913 + // by name instead of ID 4.3914 + if ( elem.id === m ) { 4.3915 + results.push( elem ); 4.3916 + return results; 4.3917 + } 4.3918 + } else { 4.3919 + return results; 4.3920 + } 4.3921 + } else { 4.3922 + // Context is not a document 4.3923 + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && 4.3924 + contains( context, elem ) && elem.id === m ) { 4.3925 + results.push( elem ); 4.3926 + return results; 4.3927 + } 4.3928 + } 4.3929 + 4.3930 + // Speed-up: Sizzle("TAG") 4.3931 + } else if ( match[2] ) { 4.3932 + push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) ); 4.3933 + return results; 4.3934 + 4.3935 + // Speed-up: Sizzle(".CLASS") 4.3936 + } else if ( (m = match[3]) && assertUsableClassName && context.getElementsByClassName ) { 4.3937 + push.apply( results, slice.call(context.getElementsByClassName( m ), 0) ); 4.3938 + return results; 4.3939 + } 4.3940 + } 4.3941 + } 4.3942 + 4.3943 + // All others 4.3944 + return select( selector.replace( rtrim, "$1" ), context, results, seed, xml ); 4.3945 +} 4.3946 + 4.3947 +Sizzle.matches = function( expr, elements ) { 4.3948 + return Sizzle( expr, null, null, elements ); 4.3949 +}; 4.3950 + 4.3951 +Sizzle.matchesSelector = function( elem, expr ) { 4.3952 + return Sizzle( expr, null, null, [ elem ] ).length > 0; 4.3953 +}; 4.3954 + 4.3955 +// Returns a function to use in pseudos for input types 4.3956 +function createInputPseudo( type ) { 4.3957 + return function( elem ) { 4.3958 + var name = elem.nodeName.toLowerCase(); 4.3959 + return name === "input" && elem.type === type; 4.3960 + }; 4.3961 +} 4.3962 + 4.3963 +// Returns a function to use in pseudos for buttons 4.3964 +function createButtonPseudo( type ) { 4.3965 + return function( elem ) { 4.3966 + var name = elem.nodeName.toLowerCase(); 4.3967 + return (name === "input" || name === "button") && elem.type === type; 4.3968 + }; 4.3969 +} 4.3970 + 4.3971 +// Returns a function to use in pseudos for positionals 4.3972 +function createPositionalPseudo( fn ) { 4.3973 + return markFunction(function( argument ) { 4.3974 + argument = +argument; 4.3975 + return markFunction(function( seed, matches ) { 4.3976 + var j, 4.3977 + matchIndexes = fn( [], seed.length, argument ), 4.3978 + i = matchIndexes.length; 4.3979 + 4.3980 + // Match elements found at the specified indexes 4.3981 + while ( i-- ) { 4.3982 + if ( seed[ (j = matchIndexes[i]) ] ) { 4.3983 + seed[j] = !(matches[j] = seed[j]); 4.3984 + } 4.3985 + } 4.3986 + }); 4.3987 + }); 4.3988 +} 4.3989 + 4.3990 +/** 4.3991 + * Utility function for retrieving the text value of an array of DOM nodes 4.3992 + * @param {Array|Element} elem 4.3993 + */ 4.3994 +getText = Sizzle.getText = function( elem ) { 4.3995 + var node, 4.3996 + ret = "", 4.3997 + i = 0, 4.3998 + nodeType = elem.nodeType; 4.3999 + 4.4000 + if ( nodeType ) { 4.4001 + if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { 4.4002 + // Use textContent for elements 4.4003 + // innerText usage removed for consistency of new lines (see #11153) 4.4004 + if ( typeof elem.textContent === "string" ) { 4.4005 + return elem.textContent; 4.4006 + } else { 4.4007 + // Traverse its children 4.4008 + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { 4.4009 + ret += getText( elem ); 4.4010 + } 4.4011 + } 4.4012 + } else if ( nodeType === 3 || nodeType === 4 ) { 4.4013 + return elem.nodeValue; 4.4014 + } 4.4015 + // Do not include comment or processing instruction nodes 4.4016 + } else { 4.4017 + 4.4018 + // If no nodeType, this is expected to be an array 4.4019 + for ( ; (node = elem[i]); i++ ) { 4.4020 + // Do not traverse comment nodes 4.4021 + ret += getText( node ); 4.4022 + } 4.4023 + } 4.4024 + return ret; 4.4025 +}; 4.4026 + 4.4027 +isXML = Sizzle.isXML = function( elem ) { 4.4028 + // documentElement is verified for cases where it doesn't yet exist 4.4029 + // (such as loading iframes in IE - #4833) 4.4030 + var documentElement = elem && (elem.ownerDocument || elem).documentElement; 4.4031 + return documentElement ? documentElement.nodeName !== "HTML" : false; 4.4032 +}; 4.4033 + 4.4034 +// Element contains another 4.4035 +contains = Sizzle.contains = docElem.contains ? 4.4036 + function( a, b ) { 4.4037 + var adown = a.nodeType === 9 ? a.documentElement : a, 4.4038 + bup = b && b.parentNode; 4.4039 + return a === bup || !!( bup && bup.nodeType === 1 && adown.contains && adown.contains(bup) ); 4.4040 + } : 4.4041 + docElem.compareDocumentPosition ? 4.4042 + function( a, b ) { 4.4043 + return b && !!( a.compareDocumentPosition( b ) & 16 ); 4.4044 + } : 4.4045 + function( a, b ) { 4.4046 + while ( (b = b.parentNode) ) { 4.4047 + if ( b === a ) { 4.4048 + return true; 4.4049 + } 4.4050 + } 4.4051 + return false; 4.4052 + }; 4.4053 + 4.4054 +Sizzle.attr = function( elem, name ) { 4.4055 + var val, 4.4056 + xml = isXML( elem ); 4.4057 + 4.4058 + if ( !xml ) { 4.4059 + name = name.toLowerCase(); 4.4060 + } 4.4061 + if ( (val = Expr.attrHandle[ name ]) ) { 4.4062 + return val( elem ); 4.4063 + } 4.4064 + if ( xml || assertAttributes ) { 4.4065 + return elem.getAttribute( name ); 4.4066 + } 4.4067 + val = elem.getAttributeNode( name ); 4.4068 + return val ? 4.4069 + typeof elem[ name ] === "boolean" ? 4.4070 + elem[ name ] ? name : null : 4.4071 + val.specified ? val.value : null : 4.4072 + null; 4.4073 +}; 4.4074 + 4.4075 +Expr = Sizzle.selectors = { 4.4076 + 4.4077 + // Can be adjusted by the user 4.4078 + cacheLength: 50, 4.4079 + 4.4080 + createPseudo: markFunction, 4.4081 + 4.4082 + match: matchExpr, 4.4083 + 4.4084 + // IE6/7 return a modified href 4.4085 + attrHandle: assertHrefNotNormalized ? 4.4086 + {} : 4.4087 + { 4.4088 + "href": function( elem ) { 4.4089 + return elem.getAttribute( "href", 2 ); 4.4090 + }, 4.4091 + "type": function( elem ) { 4.4092 + return elem.getAttribute("type"); 4.4093 + } 4.4094 + }, 4.4095 + 4.4096 + find: { 4.4097 + "ID": assertGetIdNotName ? 4.4098 + function( id, context, xml ) { 4.4099 + if ( typeof context.getElementById !== strundefined && !xml ) { 4.4100 + var m = context.getElementById( id ); 4.4101 + // Check parentNode to catch when Blackberry 4.6 returns 4.4102 + // nodes that are no longer in the document #6963 4.4103 + return m && m.parentNode ? [m] : []; 4.4104 + } 4.4105 + } : 4.4106 + function( id, context, xml ) { 4.4107 + if ( typeof context.getElementById !== strundefined && !xml ) { 4.4108 + var m = context.getElementById( id ); 4.4109 + 4.4110 + return m ? 4.4111 + m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? 4.4112 + [m] : 4.4113 + undefined : 4.4114 + []; 4.4115 + } 4.4116 + }, 4.4117 + 4.4118 + "TAG": assertTagNameNoComments ? 4.4119 + function( tag, context ) { 4.4120 + if ( typeof context.getElementsByTagName !== strundefined ) { 4.4121 + return context.getElementsByTagName( tag ); 4.4122 + } 4.4123 + } : 4.4124 + function( tag, context ) { 4.4125 + var results = context.getElementsByTagName( tag ); 4.4126 + 4.4127 + // Filter out possible comments 4.4128 + if ( tag === "*" ) { 4.4129 + var elem, 4.4130 + tmp = [], 4.4131 + i = 0; 4.4132 + 4.4133 + for ( ; (elem = results[i]); i++ ) { 4.4134 + if ( elem.nodeType === 1 ) { 4.4135 + tmp.push( elem ); 4.4136 + } 4.4137 + } 4.4138 + 4.4139 + return tmp; 4.4140 + } 4.4141 + return results; 4.4142 + }, 4.4143 + 4.4144 + "NAME": assertUsableName && function( tag, context ) { 4.4145 + if ( typeof context.getElementsByName !== strundefined ) { 4.4146 + return context.getElementsByName( name ); 4.4147 + } 4.4148 + }, 4.4149 + 4.4150 + "CLASS": assertUsableClassName && function( className, context, xml ) { 4.4151 + if ( typeof context.getElementsByClassName !== strundefined && !xml ) { 4.4152 + return context.getElementsByClassName( className ); 4.4153 + } 4.4154 + } 4.4155 + }, 4.4156 + 4.4157 + relative: { 4.4158 + ">": { dir: "parentNode", first: true }, 4.4159 + " ": { dir: "parentNode" }, 4.4160 + "+": { dir: "previousSibling", first: true }, 4.4161 + "~": { dir: "previousSibling" } 4.4162 + }, 4.4163 + 4.4164 + preFilter: { 4.4165 + "ATTR": function( match ) { 4.4166 + match[1] = match[1].replace( rbackslash, "" ); 4.4167 + 4.4168 + // Move the given value to match[3] whether quoted or unquoted 4.4169 + match[3] = ( match[4] || match[5] || "" ).replace( rbackslash, "" ); 4.4170 + 4.4171 + if ( match[2] === "~=" ) { 4.4172 + match[3] = " " + match[3] + " "; 4.4173 + } 4.4174 + 4.4175 + return match.slice( 0, 4 ); 4.4176 + }, 4.4177 + 4.4178 + "CHILD": function( match ) { 4.4179 + /* matches from matchExpr["CHILD"] 4.4180 + 1 type (only|nth|...) 4.4181 + 2 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 4.4182 + 3 xn-component of xn+y argument ([+-]?\d*n|) 4.4183 + 4 sign of xn-component 4.4184 + 5 x of xn-component 4.4185 + 6 sign of y-component 4.4186 + 7 y of y-component 4.4187 + */ 4.4188 + match[1] = match[1].toLowerCase(); 4.4189 + 4.4190 + if ( match[1] === "nth" ) { 4.4191 + // nth-child requires argument 4.4192 + if ( !match[2] ) { 4.4193 + Sizzle.error( match[0] ); 4.4194 + } 4.4195 + 4.4196 + // numeric x and y parameters for Expr.filter.CHILD 4.4197 + // remember that false/true cast respectively to 0/1 4.4198 + match[3] = +( match[3] ? match[4] + (match[5] || 1) : 2 * ( match[2] === "even" || match[2] === "odd" ) ); 4.4199 + match[4] = +( ( match[6] + match[7] ) || match[2] === "odd" ); 4.4200 + 4.4201 + // other types prohibit arguments 4.4202 + } else if ( match[2] ) { 4.4203 + Sizzle.error( match[0] ); 4.4204 + } 4.4205 + 4.4206 + return match; 4.4207 + }, 4.4208 + 4.4209 + "PSEUDO": function( match ) { 4.4210 + var unquoted, excess; 4.4211 + if ( matchExpr["CHILD"].test( match[0] ) ) { 4.4212 + return null; 4.4213 + } 4.4214 + 4.4215 + if ( match[3] ) { 4.4216 + match[2] = match[3]; 4.4217 + } else if ( (unquoted = match[4]) ) { 4.4218 + // Only check arguments that contain a pseudo 4.4219 + if ( rpseudo.test(unquoted) && 4.4220 + // Get excess from tokenize (recursively) 4.4221 + (excess = tokenize( unquoted, true )) && 4.4222 + // advance to the next closing parenthesis 4.4223 + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { 4.4224 + 4.4225 + // excess is a negative index 4.4226 + unquoted = unquoted.slice( 0, excess ); 4.4227 + match[0] = match[0].slice( 0, excess ); 4.4228 + } 4.4229 + match[2] = unquoted; 4.4230 + } 4.4231 + 4.4232 + // Return only captures needed by the pseudo filter method (type and argument) 4.4233 + return match.slice( 0, 3 ); 4.4234 + } 4.4235 + }, 4.4236 + 4.4237 + filter: { 4.4238 + "ID": assertGetIdNotName ? 4.4239 + function( id ) { 4.4240 + id = id.replace( rbackslash, "" ); 4.4241 + return function( elem ) { 4.4242 + return elem.getAttribute("id") === id; 4.4243 + }; 4.4244 + } : 4.4245 + function( id ) { 4.4246 + id = id.replace( rbackslash, "" ); 4.4247 + return function( elem ) { 4.4248 + var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); 4.4249 + return node && node.value === id; 4.4250 + }; 4.4251 + }, 4.4252 + 4.4253 + "TAG": function( nodeName ) { 4.4254 + if ( nodeName === "*" ) { 4.4255 + return function() { return true; }; 4.4256 + } 4.4257 + nodeName = nodeName.replace( rbackslash, "" ).toLowerCase(); 4.4258 + 4.4259 + return function( elem ) { 4.4260 + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; 4.4261 + }; 4.4262 + }, 4.4263 + 4.4264 + "CLASS": function( className ) { 4.4265 + var pattern = classCache[ expando ][ className ]; 4.4266 + if ( !pattern ) { 4.4267 + pattern = classCache( className, new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)") ); 4.4268 + } 4.4269 + return function( elem ) { 4.4270 + return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); 4.4271 + }; 4.4272 + }, 4.4273 + 4.4274 + "ATTR": function( name, operator, check ) { 4.4275 + return function( elem, context ) { 4.4276 + var result = Sizzle.attr( elem, name ); 4.4277 + 4.4278 + if ( result == null ) { 4.4279 + return operator === "!="; 4.4280 + } 4.4281 + if ( !operator ) { 4.4282 + return true; 4.4283 + } 4.4284 + 4.4285 + result += ""; 4.4286 + 4.4287 + return operator === "=" ? result === check : 4.4288 + operator === "!=" ? result !== check : 4.4289 + operator === "^=" ? check && result.indexOf( check ) === 0 : 4.4290 + operator === "*=" ? check && result.indexOf( check ) > -1 : 4.4291 + operator === "$=" ? check && result.substr( result.length - check.length ) === check : 4.4292 + operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : 4.4293 + operator === "|=" ? result === check || result.substr( 0, check.length + 1 ) === check + "-" : 4.4294 + false; 4.4295 + }; 4.4296 + }, 4.4297 + 4.4298 + "CHILD": function( type, argument, first, last ) { 4.4299 + 4.4300 + if ( type === "nth" ) { 4.4301 + return function( elem ) { 4.4302 + var node, diff, 4.4303 + parent = elem.parentNode; 4.4304 + 4.4305 + if ( first === 1 && last === 0 ) { 4.4306 + return true; 4.4307 + } 4.4308 + 4.4309 + if ( parent ) { 4.4310 + diff = 0; 4.4311 + for ( node = parent.firstChild; node; node = node.nextSibling ) { 4.4312 + if ( node.nodeType === 1 ) { 4.4313 + diff++; 4.4314 + if ( elem === node ) { 4.4315 + break; 4.4316 + } 4.4317 + } 4.4318 + } 4.4319 + } 4.4320 + 4.4321 + // Incorporate the offset (or cast to NaN), then check against cycle size 4.4322 + diff -= last; 4.4323 + return diff === first || ( diff % first === 0 && diff / first >= 0 ); 4.4324 + }; 4.4325 + } 4.4326 + 4.4327 + return function( elem ) { 4.4328 + var node = elem; 4.4329 + 4.4330 + switch ( type ) { 4.4331 + case "only": 4.4332 + case "first": 4.4333 + while ( (node = node.previousSibling) ) { 4.4334 + if ( node.nodeType === 1 ) { 4.4335 + return false; 4.4336 + } 4.4337 + } 4.4338 + 4.4339 + if ( type === "first" ) { 4.4340 + return true; 4.4341 + } 4.4342 + 4.4343 + node = elem; 4.4344 + 4.4345 + /* falls through */ 4.4346 + case "last": 4.4347 + while ( (node = node.nextSibling) ) { 4.4348 + if ( node.nodeType === 1 ) { 4.4349 + return false; 4.4350 + } 4.4351 + } 4.4352 + 4.4353 + return true; 4.4354 + } 4.4355 + }; 4.4356 + }, 4.4357 + 4.4358 + "PSEUDO": function( pseudo, argument ) { 4.4359 + // pseudo-class names are case-insensitive 4.4360 + // http://www.w3.org/TR/selectors/#pseudo-classes 4.4361 + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters 4.4362 + // Remember that setFilters inherits from pseudos 4.4363 + var args, 4.4364 + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || 4.4365 + Sizzle.error( "unsupported pseudo: " + pseudo ); 4.4366 + 4.4367 + // The user may use createPseudo to indicate that 4.4368 + // arguments are needed to create the filter function 4.4369 + // just as Sizzle does 4.4370 + if ( fn[ expando ] ) { 4.4371 + return fn( argument ); 4.4372 + } 4.4373 + 4.4374 + // But maintain support for old signatures 4.4375 + if ( fn.length > 1 ) { 4.4376 + args = [ pseudo, pseudo, "", argument ]; 4.4377 + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? 4.4378 + markFunction(function( seed, matches ) { 4.4379 + var idx, 4.4380 + matched = fn( seed, argument ), 4.4381 + i = matched.length; 4.4382 + while ( i-- ) { 4.4383 + idx = indexOf.call( seed, matched[i] ); 4.4384 + seed[ idx ] = !( matches[ idx ] = matched[i] ); 4.4385 + } 4.4386 + }) : 4.4387 + function( elem ) { 4.4388 + return fn( elem, 0, args ); 4.4389 + }; 4.4390 + } 4.4391 + 4.4392 + return fn; 4.4393 + } 4.4394 + }, 4.4395 + 4.4396 + pseudos: { 4.4397 + "not": markFunction(function( selector ) { 4.4398 + // Trim the selector passed to compile 4.4399 + // to avoid treating leading and trailing 4.4400 + // spaces as combinators 4.4401 + var input = [], 4.4402 + results = [], 4.4403 + matcher = compile( selector.replace( rtrim, "$1" ) ); 4.4404 + 4.4405 + return matcher[ expando ] ? 4.4406 + markFunction(function( seed, matches, context, xml ) { 4.4407 + var elem, 4.4408 + unmatched = matcher( seed, null, xml, [] ), 4.4409 + i = seed.length; 4.4410 + 4.4411 + // Match elements unmatched by `matcher` 4.4412 + while ( i-- ) { 4.4413 + if ( (elem = unmatched[i]) ) { 4.4414 + seed[i] = !(matches[i] = elem); 4.4415 + } 4.4416 + } 4.4417 + }) : 4.4418 + function( elem, context, xml ) { 4.4419 + input[0] = elem; 4.4420 + matcher( input, null, xml, results ); 4.4421 + return !results.pop(); 4.4422 + }; 4.4423 + }), 4.4424 + 4.4425 + "has": markFunction(function( selector ) { 4.4426 + return function( elem ) { 4.4427 + return Sizzle( selector, elem ).length > 0; 4.4428 + }; 4.4429 + }), 4.4430 + 4.4431 + "contains": markFunction(function( text ) { 4.4432 + return function( elem ) { 4.4433 + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; 4.4434 + }; 4.4435 + }), 4.4436 + 4.4437 + "enabled": function( elem ) { 4.4438 + return elem.disabled === false; 4.4439 + }, 4.4440 + 4.4441 + "disabled": function( elem ) { 4.4442 + return elem.disabled === true; 4.4443 + }, 4.4444 + 4.4445 + "checked": function( elem ) { 4.4446 + // In CSS3, :checked should return both checked and selected elements 4.4447 + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 4.4448 + var nodeName = elem.nodeName.toLowerCase(); 4.4449 + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); 4.4450 + }, 4.4451 + 4.4452 + "selected": function( elem ) { 4.4453 + // Accessing this property makes selected-by-default 4.4454 + // options in Safari work properly 4.4455 + if ( elem.parentNode ) { 4.4456 + elem.parentNode.selectedIndex; 4.4457 + } 4.4458 + 4.4459 + return elem.selected === true; 4.4460 + }, 4.4461 + 4.4462 + "parent": function( elem ) { 4.4463 + return !Expr.pseudos["empty"]( elem ); 4.4464 + }, 4.4465 + 4.4466 + "empty": function( elem ) { 4.4467 + // http://www.w3.org/TR/selectors/#empty-pseudo 4.4468 + // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), 4.4469 + // not comment, processing instructions, or others 4.4470 + // Thanks to Diego Perini for the nodeName shortcut 4.4471 + // Greater than "@" means alpha characters (specifically not starting with "#" or "?") 4.4472 + var nodeType; 4.4473 + elem = elem.firstChild; 4.4474 + while ( elem ) { 4.4475 + if ( elem.nodeName > "@" || (nodeType = elem.nodeType) === 3 || nodeType === 4 ) { 4.4476 + return false; 4.4477 + } 4.4478 + elem = elem.nextSibling; 4.4479 + } 4.4480 + return true; 4.4481 + }, 4.4482 + 4.4483 + "header": function( elem ) { 4.4484 + return rheader.test( elem.nodeName ); 4.4485 + }, 4.4486 + 4.4487 + "text": function( elem ) { 4.4488 + var type, attr; 4.4489 + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) 4.4490 + // use getAttribute instead to test this case 4.4491 + return elem.nodeName.toLowerCase() === "input" && 4.4492 + (type = elem.type) === "text" && 4.4493 + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === type ); 4.4494 + }, 4.4495 + 4.4496 + // Input types 4.4497 + "radio": createInputPseudo("radio"), 4.4498 + "checkbox": createInputPseudo("checkbox"), 4.4499 + "file": createInputPseudo("file"), 4.4500 + "password": createInputPseudo("password"), 4.4501 + "image": createInputPseudo("image"), 4.4502 + 4.4503 + "submit": createButtonPseudo("submit"), 4.4504 + "reset": createButtonPseudo("reset"), 4.4505 + 4.4506 + "button": function( elem ) { 4.4507 + var name = elem.nodeName.toLowerCase(); 4.4508 + return name === "input" && elem.type === "button" || name === "button"; 4.4509 + }, 4.4510 + 4.4511 + "input": function( elem ) { 4.4512 + return rinputs.test( elem.nodeName ); 4.4513 + }, 4.4514 + 4.4515 + "focus": function( elem ) { 4.4516 + var doc = elem.ownerDocument; 4.4517 + return elem === doc.activeElement && (!doc.hasFocus || doc.hasFocus()) && !!(elem.type || elem.href); 4.4518 + }, 4.4519 + 4.4520 + "active": function( elem ) { 4.4521 + return elem === elem.ownerDocument.activeElement; 4.4522 + }, 4.4523 + 4.4524 + // Positional types 4.4525 + "first": createPositionalPseudo(function( matchIndexes, length, argument ) { 4.4526 + return [ 0 ]; 4.4527 + }), 4.4528 + 4.4529 + "last": createPositionalPseudo(function( matchIndexes, length, argument ) { 4.4530 + return [ length - 1 ]; 4.4531 + }), 4.4532 + 4.4533 + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { 4.4534 + return [ argument < 0 ? argument + length : argument ]; 4.4535 + }), 4.4536 + 4.4537 + "even": createPositionalPseudo(function( matchIndexes, length, argument ) { 4.4538 + for ( var i = 0; i < length; i += 2 ) { 4.4539 + matchIndexes.push( i ); 4.4540 + } 4.4541 + return matchIndexes; 4.4542 + }), 4.4543 + 4.4544 + "odd": createPositionalPseudo(function( matchIndexes, length, argument ) { 4.4545 + for ( var i = 1; i < length; i += 2 ) { 4.4546 + matchIndexes.push( i ); 4.4547 + } 4.4548 + return matchIndexes; 4.4549 + }), 4.4550 + 4.4551 + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { 4.4552 + for ( var i = argument < 0 ? argument + length : argument; --i >= 0; ) { 4.4553 + matchIndexes.push( i ); 4.4554 + } 4.4555 + return matchIndexes; 4.4556 + }), 4.4557 + 4.4558 + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { 4.4559 + for ( var i = argument < 0 ? argument + length : argument; ++i < length; ) { 4.4560 + matchIndexes.push( i ); 4.4561 + } 4.4562 + return matchIndexes; 4.4563 + }) 4.4564 + } 4.4565 +}; 4.4566 + 4.4567 +function siblingCheck( a, b, ret ) { 4.4568 + if ( a === b ) { 4.4569 + return ret; 4.4570 + } 4.4571 + 4.4572 + var cur = a.nextSibling; 4.4573 + 4.4574 + while ( cur ) { 4.4575 + if ( cur === b ) { 4.4576 + return -1; 4.4577 + } 4.4578 + 4.4579 + cur = cur.nextSibling; 4.4580 + } 4.4581 + 4.4582 + return 1; 4.4583 +} 4.4584 + 4.4585 +sortOrder = docElem.compareDocumentPosition ? 4.4586 + function( a, b ) { 4.4587 + if ( a === b ) { 4.4588 + hasDuplicate = true; 4.4589 + return 0; 4.4590 + } 4.4591 + 4.4592 + return ( !a.compareDocumentPosition || !b.compareDocumentPosition ? 4.4593 + a.compareDocumentPosition : 4.4594 + a.compareDocumentPosition(b) & 4 4.4595 + ) ? -1 : 1; 4.4596 + } : 4.4597 + function( a, b ) { 4.4598 + // The nodes are identical, we can exit early 4.4599 + if ( a === b ) { 4.4600 + hasDuplicate = true; 4.4601 + return 0; 4.4602 + 4.4603 + // Fallback to using sourceIndex (in IE) if it's available on both nodes 4.4604 + } else if ( a.sourceIndex && b.sourceIndex ) { 4.4605 + return a.sourceIndex - b.sourceIndex; 4.4606 + } 4.4607 + 4.4608 + var al, bl, 4.4609 + ap = [], 4.4610 + bp = [], 4.4611 + aup = a.parentNode, 4.4612 + bup = b.parentNode, 4.4613 + cur = aup; 4.4614 + 4.4615 + // If the nodes are siblings (or identical) we can do a quick check 4.4616 + if ( aup === bup ) { 4.4617 + return siblingCheck( a, b ); 4.4618 + 4.4619 + // If no parents were found then the nodes are disconnected 4.4620 + } else if ( !aup ) { 4.4621 + return -1; 4.4622 + 4.4623 + } else if ( !bup ) { 4.4624 + return 1; 4.4625 + } 4.4626 + 4.4627 + // Otherwise they're somewhere else in the tree so we need 4.4628 + // to build up a full list of the parentNodes for comparison 4.4629 + while ( cur ) { 4.4630 + ap.unshift( cur ); 4.4631 + cur = cur.parentNode; 4.4632 + } 4.4633 + 4.4634 + cur = bup; 4.4635 + 4.4636 + while ( cur ) { 4.4637 + bp.unshift( cur ); 4.4638 + cur = cur.parentNode; 4.4639 + } 4.4640 + 4.4641 + al = ap.length; 4.4642 + bl = bp.length; 4.4643 + 4.4644 + // Start walking down the tree looking for a discrepancy 4.4645 + for ( var i = 0; i < al && i < bl; i++ ) { 4.4646 + if ( ap[i] !== bp[i] ) { 4.4647 + return siblingCheck( ap[i], bp[i] ); 4.4648 + } 4.4649 + } 4.4650 + 4.4651 + // We ended someplace up the tree so do a sibling check 4.4652 + return i === al ? 4.4653 + siblingCheck( a, bp[i], -1 ) : 4.4654 + siblingCheck( ap[i], b, 1 ); 4.4655 + }; 4.4656 + 4.4657 +// Always assume the presence of duplicates if sort doesn't 4.4658 +// pass them to our comparison function (as in Google Chrome). 4.4659 +[0, 0].sort( sortOrder ); 4.4660 +baseHasDuplicate = !hasDuplicate; 4.4661 + 4.4662 +// Document sorting and removing duplicates 4.4663 +Sizzle.uniqueSort = function( results ) { 4.4664 + var elem, 4.4665 + i = 1; 4.4666 + 4.4667 + hasDuplicate = baseHasDuplicate; 4.4668 + results.sort( sortOrder ); 4.4669 + 4.4670 + if ( hasDuplicate ) { 4.4671 + for ( ; (elem = results[i]); i++ ) { 4.4672 + if ( elem === results[ i - 1 ] ) { 4.4673 + results.splice( i--, 1 ); 4.4674 + } 4.4675 + } 4.4676 + } 4.4677 + 4.4678 + return results; 4.4679 +}; 4.4680 + 4.4681 +Sizzle.error = function( msg ) { 4.4682 + throw new Error( "Syntax error, unrecognized expression: " + msg ); 4.4683 +}; 4.4684 + 4.4685 +function tokenize( selector, parseOnly ) { 4.4686 + var matched, match, tokens, type, soFar, groups, preFilters, 4.4687 + cached = tokenCache[ expando ][ selector ]; 4.4688 + 4.4689 + if ( cached ) { 4.4690 + return parseOnly ? 0 : cached.slice( 0 ); 4.4691 + } 4.4692 + 4.4693 + soFar = selector; 4.4694 + groups = []; 4.4695 + preFilters = Expr.preFilter; 4.4696 + 4.4697 + while ( soFar ) { 4.4698 + 4.4699 + // Comma and first run 4.4700 + if ( !matched || (match = rcomma.exec( soFar )) ) { 4.4701 + if ( match ) { 4.4702 + soFar = soFar.slice( match[0].length ); 4.4703 + } 4.4704 + groups.push( tokens = [] ); 4.4705 + } 4.4706 + 4.4707 + matched = false; 4.4708 + 4.4709 + // Combinators 4.4710 + if ( (match = rcombinators.exec( soFar )) ) { 4.4711 + tokens.push( matched = new Token( match.shift() ) ); 4.4712 + soFar = soFar.slice( matched.length ); 4.4713 + 4.4714 + // Cast descendant combinators to space 4.4715 + matched.type = match[0].replace( rtrim, " " ); 4.4716 + } 4.4717 + 4.4718 + // Filters 4.4719 + for ( type in Expr.filter ) { 4.4720 + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || 4.4721 + // The last two arguments here are (context, xml) for backCompat 4.4722 + (match = preFilters[ type ]( match, document, true ))) ) { 4.4723 + 4.4724 + tokens.push( matched = new Token( match.shift() ) ); 4.4725 + soFar = soFar.slice( matched.length ); 4.4726 + matched.type = type; 4.4727 + matched.matches = match; 4.4728 + } 4.4729 + } 4.4730 + 4.4731 + if ( !matched ) { 4.4732 + break; 4.4733 + } 4.4734 + } 4.4735 + 4.4736 + // Return the length of the invalid excess 4.4737 + // if we're just parsing 4.4738 + // Otherwise, throw an error or return tokens 4.4739 + return parseOnly ? 4.4740 + soFar.length : 4.4741 + soFar ? 4.4742 + Sizzle.error( selector ) : 4.4743 + // Cache the tokens 4.4744 + tokenCache( selector, groups ).slice( 0 ); 4.4745 +} 4.4746 + 4.4747 +function addCombinator( matcher, combinator, base ) { 4.4748 + var dir = combinator.dir, 4.4749 + checkNonElements = base && combinator.dir === "parentNode", 4.4750 + doneName = done++; 4.4751 + 4.4752 + return combinator.first ? 4.4753 + // Check against closest ancestor/preceding element 4.4754 + function( elem, context, xml ) { 4.4755 + while ( (elem = elem[ dir ]) ) { 4.4756 + if ( checkNonElements || elem.nodeType === 1 ) { 4.4757 + return matcher( elem, context, xml ); 4.4758 + } 4.4759 + } 4.4760 + } : 4.4761 + 4.4762 + // Check against all ancestor/preceding elements 4.4763 + function( elem, context, xml ) { 4.4764 + // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching 4.4765 + if ( !xml ) { 4.4766 + var cache, 4.4767 + dirkey = dirruns + " " + doneName + " ", 4.4768 + cachedkey = dirkey + cachedruns; 4.4769 + while ( (elem = elem[ dir ]) ) { 4.4770 + if ( checkNonElements || elem.nodeType === 1 ) { 4.4771 + if ( (cache = elem[ expando ]) === cachedkey ) { 4.4772 + return elem.sizset; 4.4773 + } else if ( typeof cache === "string" && cache.indexOf(dirkey) === 0 ) { 4.4774 + if ( elem.sizset ) { 4.4775 + return elem; 4.4776 + } 4.4777 + } else { 4.4778 + elem[ expando ] = cachedkey; 4.4779 + if ( matcher( elem, context, xml ) ) { 4.4780 + elem.sizset = true; 4.4781 + return elem; 4.4782 + } 4.4783 + elem.sizset = false; 4.4784 + } 4.4785 + } 4.4786 + } 4.4787 + } else { 4.4788 + while ( (elem = elem[ dir ]) ) { 4.4789 + if ( checkNonElements || elem.nodeType === 1 ) { 4.4790 + if ( matcher( elem, context, xml ) ) { 4.4791 + return elem; 4.4792 + } 4.4793 + } 4.4794 + } 4.4795 + } 4.4796 + }; 4.4797 +} 4.4798 + 4.4799 +function elementMatcher( matchers ) { 4.4800 + return matchers.length > 1 ? 4.4801 + function( elem, context, xml ) { 4.4802 + var i = matchers.length; 4.4803 + while ( i-- ) { 4.4804 + if ( !matchers[i]( elem, context, xml ) ) { 4.4805 + return false; 4.4806 + } 4.4807 + } 4.4808 + return true; 4.4809 + } : 4.4810 + matchers[0]; 4.4811 +} 4.4812 + 4.4813 +function condense( unmatched, map, filter, context, xml ) { 4.4814 + var elem, 4.4815 + newUnmatched = [], 4.4816 + i = 0, 4.4817 + len = unmatched.length, 4.4818 + mapped = map != null; 4.4819 + 4.4820 + for ( ; i < len; i++ ) { 4.4821 + if ( (elem = unmatched[i]) ) { 4.4822 + if ( !filter || filter( elem, context, xml ) ) { 4.4823 + newUnmatched.push( elem ); 4.4824 + if ( mapped ) { 4.4825 + map.push( i ); 4.4826 + } 4.4827 + } 4.4828 + } 4.4829 + } 4.4830 + 4.4831 + return newUnmatched; 4.4832 +} 4.4833 + 4.4834 +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { 4.4835 + if ( postFilter && !postFilter[ expando ] ) { 4.4836 + postFilter = setMatcher( postFilter ); 4.4837 + } 4.4838 + if ( postFinder && !postFinder[ expando ] ) { 4.4839 + postFinder = setMatcher( postFinder, postSelector ); 4.4840 + } 4.4841 + return markFunction(function( seed, results, context, xml ) { 4.4842 + // Positional selectors apply to seed elements, so it is invalid to follow them with relative ones 4.4843 + if ( seed && postFinder ) { 4.4844 + return; 4.4845 + } 4.4846 + 4.4847 + var i, elem, postFilterIn, 4.4848 + preMap = [], 4.4849 + postMap = [], 4.4850 + preexisting = results.length, 4.4851 + 4.4852 + // Get initial elements from seed or context 4.4853 + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [], seed ), 4.4854 + 4.4855 + // Prefilter to get matcher input, preserving a map for seed-results synchronization 4.4856 + matcherIn = preFilter && ( seed || !selector ) ? 4.4857 + condense( elems, preMap, preFilter, context, xml ) : 4.4858 + elems, 4.4859 + 4.4860 + matcherOut = matcher ? 4.4861 + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, 4.4862 + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? 4.4863 + 4.4864 + // ...intermediate processing is necessary 4.4865 + [] : 4.4866 + 4.4867 + // ...otherwise use results directly 4.4868 + results : 4.4869 + matcherIn; 4.4870 + 4.4871 + // Find primary matches 4.4872 + if ( matcher ) { 4.4873 + matcher( matcherIn, matcherOut, context, xml ); 4.4874 + } 4.4875 + 4.4876 + // Apply postFilter 4.4877 + if ( postFilter ) { 4.4878 + postFilterIn = condense( matcherOut, postMap ); 4.4879 + postFilter( postFilterIn, [], context, xml ); 4.4880 + 4.4881 + // Un-match failing elements by moving them back to matcherIn 4.4882 + i = postFilterIn.length; 4.4883 + while ( i-- ) { 4.4884 + if ( (elem = postFilterIn[i]) ) { 4.4885 + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); 4.4886 + } 4.4887 + } 4.4888 + } 4.4889 + 4.4890 + // Keep seed and results synchronized 4.4891 + if ( seed ) { 4.4892 + // Ignore postFinder because it can't coexist with seed 4.4893 + i = preFilter && matcherOut.length; 4.4894 + while ( i-- ) { 4.4895 + if ( (elem = matcherOut[i]) ) { 4.4896 + seed[ preMap[i] ] = !(results[ preMap[i] ] = elem); 4.4897 + } 4.4898 + } 4.4899 + } else { 4.4900 + matcherOut = condense( 4.4901 + matcherOut === results ? 4.4902 + matcherOut.splice( preexisting, matcherOut.length ) : 4.4903 + matcherOut 4.4904 + ); 4.4905 + if ( postFinder ) { 4.4906 + postFinder( null, results, matcherOut, xml ); 4.4907 + } else { 4.4908 + push.apply( results, matcherOut ); 4.4909 + } 4.4910 + } 4.4911 + }); 4.4912 +} 4.4913 + 4.4914 +function matcherFromTokens( tokens ) { 4.4915 + var checkContext, matcher, j, 4.4916 + len = tokens.length, 4.4917 + leadingRelative = Expr.relative[ tokens[0].type ], 4.4918 + implicitRelative = leadingRelative || Expr.relative[" "], 4.4919 + i = leadingRelative ? 1 : 0, 4.4920 + 4.4921 + // The foundational matcher ensures that elements are reachable from top-level context(s) 4.4922 + matchContext = addCombinator( function( elem ) { 4.4923 + return elem === checkContext; 4.4924 + }, implicitRelative, true ), 4.4925 + matchAnyContext = addCombinator( function( elem ) { 4.4926 + return indexOf.call( checkContext, elem ) > -1; 4.4927 + }, implicitRelative, true ), 4.4928 + matchers = [ function( elem, context, xml ) { 4.4929 + return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( 4.4930 + (checkContext = context).nodeType ? 4.4931 + matchContext( elem, context, xml ) : 4.4932 + matchAnyContext( elem, context, xml ) ); 4.4933 + } ]; 4.4934 + 4.4935 + for ( ; i < len; i++ ) { 4.4936 + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { 4.4937 + matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; 4.4938 + } else { 4.4939 + // The concatenated values are (context, xml) for backCompat 4.4940 + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); 4.4941 + 4.4942 + // Return special upon seeing a positional matcher 4.4943 + if ( matcher[ expando ] ) { 4.4944 + // Find the next relative operator (if any) for proper handling 4.4945 + j = ++i; 4.4946 + for ( ; j < len; j++ ) { 4.4947 + if ( Expr.relative[ tokens[j].type ] ) { 4.4948 + break; 4.4949 + } 4.4950 + } 4.4951 + return setMatcher( 4.4952 + i > 1 && elementMatcher( matchers ), 4.4953 + i > 1 && tokens.slice( 0, i - 1 ).join("").replace( rtrim, "$1" ), 4.4954 + matcher, 4.4955 + i < j && matcherFromTokens( tokens.slice( i, j ) ), 4.4956 + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), 4.4957 + j < len && tokens.join("") 4.4958 + ); 4.4959 + } 4.4960 + matchers.push( matcher ); 4.4961 + } 4.4962 + } 4.4963 + 4.4964 + return elementMatcher( matchers ); 4.4965 +} 4.4966 + 4.4967 +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { 4.4968 + var bySet = setMatchers.length > 0, 4.4969 + byElement = elementMatchers.length > 0, 4.4970 + superMatcher = function( seed, context, xml, results, expandContext ) { 4.4971 + var elem, j, matcher, 4.4972 + setMatched = [], 4.4973 + matchedCount = 0, 4.4974 + i = "0", 4.4975 + unmatched = seed && [], 4.4976 + outermost = expandContext != null, 4.4977 + contextBackup = outermostContext, 4.4978 + // We must always have either seed elements or context 4.4979 + elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), 4.4980 + // Nested matchers should use non-integer dirruns 4.4981 + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.E); 4.4982 + 4.4983 + if ( outermost ) { 4.4984 + outermostContext = context !== document && context; 4.4985 + cachedruns = superMatcher.el; 4.4986 + } 4.4987 + 4.4988 + // Add elements passing elementMatchers directly to results 4.4989 + for ( ; (elem = elems[i]) != null; i++ ) { 4.4990 + if ( byElement && elem ) { 4.4991 + for ( j = 0; (matcher = elementMatchers[j]); j++ ) { 4.4992 + if ( matcher( elem, context, xml ) ) { 4.4993 + results.push( elem ); 4.4994 + break; 4.4995 + } 4.4996 + } 4.4997 + if ( outermost ) { 4.4998 + dirruns = dirrunsUnique; 4.4999 + cachedruns = ++superMatcher.el; 4.5000 + } 4.5001 + } 4.5002 + 4.5003 + // Track unmatched elements for set filters 4.5004 + if ( bySet ) { 4.5005 + // They will have gone through all possible matchers 4.5006 + if ( (elem = !matcher && elem) ) { 4.5007 + matchedCount--; 4.5008 + } 4.5009 + 4.5010 + // Lengthen the array for every element, matched or not 4.5011 + if ( seed ) { 4.5012 + unmatched.push( elem ); 4.5013 + } 4.5014 + } 4.5015 + } 4.5016 + 4.5017 + // Apply set filters to unmatched elements 4.5018 + matchedCount += i; 4.5019 + if ( bySet && i !== matchedCount ) { 4.5020 + for ( j = 0; (matcher = setMatchers[j]); j++ ) { 4.5021 + matcher( unmatched, setMatched, context, xml ); 4.5022 + } 4.5023 + 4.5024 + if ( seed ) { 4.5025 + // Reintegrate element matches to eliminate the need for sorting 4.5026 + if ( matchedCount > 0 ) { 4.5027 + while ( i-- ) { 4.5028 + if ( !(unmatched[i] || setMatched[i]) ) { 4.5029 + setMatched[i] = pop.call( results ); 4.5030 + } 4.5031 + } 4.5032 + } 4.5033 + 4.5034 + // Discard index placeholder values to get only actual matches 4.5035 + setMatched = condense( setMatched ); 4.5036 + } 4.5037 + 4.5038 + // Add matches to results 4.5039 + push.apply( results, setMatched ); 4.5040 + 4.5041 + // Seedless set matches succeeding multiple successful matchers stipulate sorting 4.5042 + if ( outermost && !seed && setMatched.length > 0 && 4.5043 + ( matchedCount + setMatchers.length ) > 1 ) { 4.5044 + 4.5045 + Sizzle.uniqueSort( results ); 4.5046 + } 4.5047 + } 4.5048 + 4.5049 + // Override manipulation of globals by nested matchers 4.5050 + if ( outermost ) { 4.5051 + dirruns = dirrunsUnique; 4.5052 + outermostContext = contextBackup; 4.5053 + } 4.5054 + 4.5055 + return unmatched; 4.5056 + }; 4.5057 + 4.5058 + superMatcher.el = 0; 4.5059 + return bySet ? 4.5060 + markFunction( superMatcher ) : 4.5061 + superMatcher; 4.5062 +} 4.5063 + 4.5064 +compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { 4.5065 + var i, 4.5066 + setMatchers = [], 4.5067 + elementMatchers = [], 4.5068 + cached = compilerCache[ expando ][ selector ]; 4.5069 + 4.5070 + if ( !cached ) { 4.5071 + // Generate a function of recursive functions that can be used to check each element 4.5072 + if ( !group ) { 4.5073 + group = tokenize( selector ); 4.5074 + } 4.5075 + i = group.length; 4.5076 + while ( i-- ) { 4.5077 + cached = matcherFromTokens( group[i] ); 4.5078 + if ( cached[ expando ] ) { 4.5079 + setMatchers.push( cached ); 4.5080 + } else { 4.5081 + elementMatchers.push( cached ); 4.5082 + } 4.5083 + } 4.5084 + 4.5085 + // Cache the compiled function 4.5086 + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); 4.5087 + } 4.5088 + return cached; 4.5089 +}; 4.5090 + 4.5091 +function multipleContexts( selector, contexts, results, seed ) { 4.5092 + var i = 0, 4.5093 + len = contexts.length; 4.5094 + for ( ; i < len; i++ ) { 4.5095 + Sizzle( selector, contexts[i], results, seed ); 4.5096 + } 4.5097 + return results; 4.5098 +} 4.5099 + 4.5100 +function select( selector, context, results, seed, xml ) { 4.5101 + var i, tokens, token, type, find, 4.5102 + match = tokenize( selector ), 4.5103 + j = match.length; 4.5104 + 4.5105 + if ( !seed ) { 4.5106 + // Try to minimize operations if there is only one group 4.5107 + if ( match.length === 1 ) { 4.5108 + 4.5109 + // Take a shortcut and set the context if the root selector is an ID 4.5110 + tokens = match[0] = match[0].slice( 0 ); 4.5111 + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && 4.5112 + context.nodeType === 9 && !xml && 4.5113 + Expr.relative[ tokens[1].type ] ) { 4.5114 + 4.5115 + context = Expr.find["ID"]( token.matches[0].replace( rbackslash, "" ), context, xml )[0]; 4.5116 + if ( !context ) { 4.5117 + return results; 4.5118 + } 4.5119 + 4.5120 + selector = selector.slice( tokens.shift().length ); 4.5121 + } 4.5122 + 4.5123 + // Fetch a seed set for right-to-left matching 4.5124 + for ( i = matchExpr["POS"].test( selector ) ? -1 : tokens.length - 1; i >= 0; i-- ) { 4.5125 + token = tokens[i]; 4.5126 + 4.5127 + // Abort if we hit a combinator 4.5128 + if ( Expr.relative[ (type = token.type) ] ) { 4.5129 + break; 4.5130 + } 4.5131 + if ( (find = Expr.find[ type ]) ) { 4.5132 + // Search, expanding context for leading sibling combinators 4.5133 + if ( (seed = find( 4.5134 + token.matches[0].replace( rbackslash, "" ), 4.5135 + rsibling.test( tokens[0].type ) && context.parentNode || context, 4.5136 + xml 4.5137 + )) ) { 4.5138 + 4.5139 + // If seed is empty or no tokens remain, we can return early 4.5140 + tokens.splice( i, 1 ); 4.5141 + selector = seed.length && tokens.join(""); 4.5142 + if ( !selector ) { 4.5143 + push.apply( results, slice.call( seed, 0 ) ); 4.5144 + return results; 4.5145 + } 4.5146 + 4.5147 + break; 4.5148 + } 4.5149 + } 4.5150 + } 4.5151 + } 4.5152 + } 4.5153 + 4.5154 + // Compile and execute a filtering function 4.5155 + // Provide `match` to avoid retokenization if we modified the selector above 4.5156 + compile( selector, match )( 4.5157 + seed, 4.5158 + context, 4.5159 + xml, 4.5160 + results, 4.5161 + rsibling.test( selector ) 4.5162 + ); 4.5163 + return results; 4.5164 +} 4.5165 + 4.5166 +if ( document.querySelectorAll ) { 4.5167 + (function() { 4.5168 + var disconnectedMatch, 4.5169 + oldSelect = select, 4.5170 + rescape = /'|\\/g, 4.5171 + rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, 4.5172 + 4.5173 + // qSa(:focus) reports false when true (Chrome 21), 4.5174 + // A support test would require too much code (would include document ready) 4.5175 + rbuggyQSA = [":focus"], 4.5176 + 4.5177 + // matchesSelector(:focus) reports false when true (Chrome 21), 4.5178 + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) 4.5179 + // A support test would require too much code (would include document ready) 4.5180 + // just skip matchesSelector for :active 4.5181 + rbuggyMatches = [ ":active", ":focus" ], 4.5182 + matches = docElem.matchesSelector || 4.5183 + docElem.mozMatchesSelector || 4.5184 + docElem.webkitMatchesSelector || 4.5185 + docElem.oMatchesSelector || 4.5186 + docElem.msMatchesSelector; 4.5187 + 4.5188 + // Build QSA regex 4.5189 + // Regex strategy adopted from Diego Perini 4.5190 + assert(function( div ) { 4.5191 + // Select is set to empty string on purpose 4.5192 + // This is to test IE's treatment of not explictly 4.5193 + // setting a boolean content attribute, 4.5194 + // since its presence should be enough 4.5195 + // http://bugs.jquery.com/ticket/12359 4.5196 + div.innerHTML = "<select><option selected=''></option></select>"; 4.5197 + 4.5198 + // IE8 - Some boolean attributes are not treated correctly 4.5199 + if ( !div.querySelectorAll("[selected]").length ) { 4.5200 + rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); 4.5201 + } 4.5202 + 4.5203 + // Webkit/Opera - :checked should return selected option elements 4.5204 + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 4.5205 + // IE8 throws error here (do not put tests after this one) 4.5206 + if ( !div.querySelectorAll(":checked").length ) { 4.5207 + rbuggyQSA.push(":checked"); 4.5208 + } 4.5209 + }); 4.5210 + 4.5211 + assert(function( div ) { 4.5212 + 4.5213 + // Opera 10-12/IE9 - ^= $= *= and empty values 4.5214 + // Should not select anything 4.5215 + div.innerHTML = "<p test=''></p>"; 4.5216 + if ( div.querySelectorAll("[test^='']").length ) { 4.5217 + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); 4.5218 + } 4.5219 + 4.5220 + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) 4.5221 + // IE8 throws error here (do not put tests after this one) 4.5222 + div.innerHTML = "<input type='hidden'/>"; 4.5223 + if ( !div.querySelectorAll(":enabled").length ) { 4.5224 + rbuggyQSA.push(":enabled", ":disabled"); 4.5225 + } 4.5226 + }); 4.5227 + 4.5228 + // rbuggyQSA always contains :focus, so no need for a length check 4.5229 + rbuggyQSA = /* rbuggyQSA.length && */ new RegExp( rbuggyQSA.join("|") ); 4.5230 + 4.5231 + select = function( selector, context, results, seed, xml ) { 4.5232 + // Only use querySelectorAll when not filtering, 4.5233 + // when this is not xml, 4.5234 + // and when no QSA bugs apply 4.5235 + if ( !seed && !xml && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { 4.5236 + var groups, i, 4.5237 + old = true, 4.5238 + nid = expando, 4.5239 + newContext = context, 4.5240 + newSelector = context.nodeType === 9 && selector; 4.5241 + 4.5242 + // qSA works strangely on Element-rooted queries 4.5243 + // We can work around this by specifying an extra ID on the root 4.5244 + // and working up from there (Thanks to Andrew Dupont for the technique) 4.5245 + // IE 8 doesn't work on object elements 4.5246 + if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { 4.5247 + groups = tokenize( selector ); 4.5248 + 4.5249 + if ( (old = context.getAttribute("id")) ) { 4.5250 + nid = old.replace( rescape, "\\$&" ); 4.5251 + } else { 4.5252 + context.setAttribute( "id", nid ); 4.5253 + } 4.5254 + nid = "[id='" + nid + "'] "; 4.5255 + 4.5256 + i = groups.length; 4.5257 + while ( i-- ) { 4.5258 + groups[i] = nid + groups[i].join(""); 4.5259 + } 4.5260 + newContext = rsibling.test( selector ) && context.parentNode || context; 4.5261 + newSelector = groups.join(","); 4.5262 + } 4.5263 + 4.5264 + if ( newSelector ) { 4.5265 + try { 4.5266 + push.apply( results, slice.call( newContext.querySelectorAll( 4.5267 + newSelector 4.5268 + ), 0 ) ); 4.5269 + return results; 4.5270 + } catch(qsaError) { 4.5271 + } finally { 4.5272 + if ( !old ) { 4.5273 + context.removeAttribute("id"); 4.5274 + } 4.5275 + } 4.5276 + } 4.5277 + } 4.5278 + 4.5279 + return oldSelect( selector, context, results, seed, xml ); 4.5280 + }; 4.5281 + 4.5282 + if ( matches ) { 4.5283 + assert(function( div ) { 4.5284 + // Check to see if it's possible to do matchesSelector 4.5285 + // on a disconnected node (IE 9) 4.5286 + disconnectedMatch = matches.call( div, "div" ); 4.5287 + 4.5288 + // This should fail with an exception 4.5289 + // Gecko does not error, returns false instead 4.5290 + try { 4.5291 + matches.call( div, "[test!='']:sizzle" ); 4.5292 + rbuggyMatches.push( "!=", pseudos ); 4.5293 + } catch ( e ) {} 4.5294 + }); 4.5295 + 4.5296 + // rbuggyMatches always contains :active and :focus, so no need for a length check 4.5297 + rbuggyMatches = /* rbuggyMatches.length && */ new RegExp( rbuggyMatches.join("|") ); 4.5298 + 4.5299 + Sizzle.matchesSelector = function( elem, expr ) { 4.5300 + // Make sure that attribute selectors are quoted 4.5301 + expr = expr.replace( rattributeQuotes, "='$1']" ); 4.5302 + 4.5303 + // rbuggyMatches always contains :active, so no need for an existence check 4.5304 + if ( !isXML( elem ) && !rbuggyMatches.test( expr ) && (!rbuggyQSA || !rbuggyQSA.test( expr )) ) { 4.5305 + try { 4.5306 + var ret = matches.call( elem, expr ); 4.5307 + 4.5308 + // IE 9's matchesSelector returns false on disconnected nodes 4.5309 + if ( ret || disconnectedMatch || 4.5310 + // As well, disconnected nodes are said to be in a document 4.5311 + // fragment in IE 9 4.5312 + elem.document && elem.document.nodeType !== 11 ) { 4.5313 + return ret; 4.5314 + } 4.5315 + } catch(e) {} 4.5316 + } 4.5317 + 4.5318 + return Sizzle( expr, null, null, [ elem ] ).length > 0; 4.5319 + }; 4.5320 + } 4.5321 + })(); 4.5322 +} 4.5323 + 4.5324 +// Deprecated 4.5325 +Expr.pseudos["nth"] = Expr.pseudos["eq"]; 4.5326 + 4.5327 +// Back-compat 4.5328 +function setFilters() {} 4.5329 +Expr.filters = setFilters.prototype = Expr.pseudos; 4.5330 +Expr.setFilters = new setFilters(); 4.5331 + 4.5332 +// Override sizzle attribute retrieval 4.5333 +Sizzle.attr = jQuery.attr; 4.5334 +jQuery.find = Sizzle; 4.5335 +jQuery.expr = Sizzle.selectors; 4.5336 +jQuery.expr[":"] = jQuery.expr.pseudos; 4.5337 +jQuery.unique = Sizzle.uniqueSort; 4.5338 +jQuery.text = Sizzle.getText; 4.5339 +jQuery.isXMLDoc = Sizzle.isXML; 4.5340 +jQuery.contains = Sizzle.contains; 4.5341 + 4.5342 + 4.5343 +})( window ); 4.5344 +var runtil = /Until$/, 4.5345 + rparentsprev = /^(?:parents|prev(?:Until|All))/, 4.5346 + isSimple = /^.[^:#\[\.,]*$/, 4.5347 + rneedsContext = jQuery.expr.match.needsContext, 4.5348 + // methods guaranteed to produce a unique set when starting from a unique set 4.5349 + guaranteedUnique = { 4.5350 + children: true, 4.5351 + contents: true, 4.5352 + next: true, 4.5353 + prev: true 4.5354 + }; 4.5355 + 4.5356 +jQuery.fn.extend({ 4.5357 + find: function( selector ) { 4.5358 + var i, l, length, n, r, ret, 4.5359 + self = this; 4.5360 + 4.5361 + if ( typeof selector !== "string" ) { 4.5362 + return jQuery( selector ).filter(function() { 4.5363 + for ( i = 0, l = self.length; i < l; i++ ) { 4.5364 + if ( jQuery.contains( self[ i ], this ) ) { 4.5365 + return true; 4.5366 + } 4.5367 + } 4.5368 + }); 4.5369 + } 4.5370 + 4.5371 + ret = this.pushStack( "", "find", selector ); 4.5372 + 4.5373 + for ( i = 0, l = this.length; i < l; i++ ) { 4.5374 + length = ret.length; 4.5375 + jQuery.find( selector, this[i], ret ); 4.5376 + 4.5377 + if ( i > 0 ) { 4.5378 + // Make sure that the results are unique 4.5379 + for ( n = length; n < ret.length; n++ ) { 4.5380 + for ( r = 0; r < length; r++ ) { 4.5381 + if ( ret[r] === ret[n] ) { 4.5382 + ret.splice(n--, 1); 4.5383 + break; 4.5384 + } 4.5385 + } 4.5386 + } 4.5387 + } 4.5388 + } 4.5389 + 4.5390 + return ret; 4.5391 + }, 4.5392 + 4.5393 + has: function( target ) { 4.5394 + var i, 4.5395 + targets = jQuery( target, this ), 4.5396 + len = targets.length; 4.5397 + 4.5398 + return this.filter(function() { 4.5399 + for ( i = 0; i < len; i++ ) { 4.5400 + if ( jQuery.contains( this, targets[i] ) ) { 4.5401 + return true; 4.5402 + } 4.5403 + } 4.5404 + }); 4.5405 + }, 4.5406 + 4.5407 + not: function( selector ) { 4.5408 + return this.pushStack( winnow(this, selector, false), "not", selector); 4.5409 + }, 4.5410 + 4.5411 + filter: function( selector ) { 4.5412 + return this.pushStack( winnow(this, selector, true), "filter", selector ); 4.5413 + }, 4.5414 + 4.5415 + is: function( selector ) { 4.5416 + return !!selector && ( 4.5417 + typeof selector === "string" ? 4.5418 + // If this is a positional/relative selector, check membership in the returned set 4.5419 + // so $("p:first").is("p:last") won't return true for a doc with two "p". 4.5420 + rneedsContext.test( selector ) ? 4.5421 + jQuery( selector, this.context ).index( this[0] ) >= 0 : 4.5422 + jQuery.filter( selector, this ).length > 0 : 4.5423 + this.filter( selector ).length > 0 ); 4.5424 + }, 4.5425 + 4.5426 + closest: function( selectors, context ) { 4.5427 + var cur, 4.5428 + i = 0, 4.5429 + l = this.length, 4.5430 + ret = [], 4.5431 + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? 4.5432 + jQuery( selectors, context || this.context ) : 4.5433 + 0; 4.5434 + 4.5435 + for ( ; i < l; i++ ) { 4.5436 + cur = this[i]; 4.5437 + 4.5438 + while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) { 4.5439 + if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { 4.5440 + ret.push( cur ); 4.5441 + break; 4.5442 + } 4.5443 + cur = cur.parentNode; 4.5444 + } 4.5445 + } 4.5446 + 4.5447 + ret = ret.length > 1 ? jQuery.unique( ret ) : ret; 4.5448 + 4.5449 + return this.pushStack( ret, "closest", selectors ); 4.5450 + }, 4.5451 + 4.5452 + // Determine the position of an element within 4.5453 + // the matched set of elements 4.5454 + index: function( elem ) { 4.5455 + 4.5456 + // No argument, return index in parent 4.5457 + if ( !elem ) { 4.5458 + return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; 4.5459 + } 4.5460 + 4.5461 + // index in selector 4.5462 + if ( typeof elem === "string" ) { 4.5463 + return jQuery.inArray( this[0], jQuery( elem ) ); 4.5464 + } 4.5465 + 4.5466 + // Locate the position of the desired element 4.5467 + return jQuery.inArray( 4.5468 + // If it receives a jQuery object, the first element is used 4.5469 + elem.jquery ? elem[0] : elem, this ); 4.5470 + }, 4.5471 + 4.5472 + add: function( selector, context ) { 4.5473 + var set = typeof selector === "string" ? 4.5474 + jQuery( selector, context ) : 4.5475 + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), 4.5476 + all = jQuery.merge( this.get(), set ); 4.5477 + 4.5478 + return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? 4.5479 + all : 4.5480 + jQuery.unique( all ) ); 4.5481 + }, 4.5482 + 4.5483 + addBack: function( selector ) { 4.5484 + return this.add( selector == null ? 4.5485 + this.prevObject : this.prevObject.filter(selector) 4.5486 + ); 4.5487 + } 4.5488 +}); 4.5489 + 4.5490 +jQuery.fn.andSelf = jQuery.fn.addBack; 4.5491 + 4.5492 +// A painfully simple check to see if an element is disconnected 4.5493 +// from a document (should be improved, where feasible). 4.5494 +function isDisconnected( node ) { 4.5495 + return !node || !node.parentNode || node.parentNode.nodeType === 11; 4.5496 +} 4.5497 + 4.5498 +function sibling( cur, dir ) { 4.5499 + do { 4.5500 + cur = cur[ dir ]; 4.5501 + } while ( cur && cur.nodeType !== 1 ); 4.5502 + 4.5503 + return cur; 4.5504 +} 4.5505 + 4.5506 +jQuery.each({ 4.5507 + parent: function( elem ) { 4.5508 + var parent = elem.parentNode; 4.5509 + return parent && parent.nodeType !== 11 ? parent : null; 4.5510 + }, 4.5511 + parents: function( elem ) { 4.5512 + return jQuery.dir( elem, "parentNode" ); 4.5513 + }, 4.5514 + parentsUntil: function( elem, i, until ) { 4.5515 + return jQuery.dir( elem, "parentNode", until ); 4.5516 + }, 4.5517 + next: function( elem ) { 4.5518 + return sibling( elem, "nextSibling" ); 4.5519 + }, 4.5520 + prev: function( elem ) { 4.5521 + return sibling( elem, "previousSibling" ); 4.5522 + }, 4.5523 + nextAll: function( elem ) { 4.5524 + return jQuery.dir( elem, "nextSibling" ); 4.5525 + }, 4.5526 + prevAll: function( elem ) { 4.5527 + return jQuery.dir( elem, "previousSibling" ); 4.5528 + }, 4.5529 + nextUntil: function( elem, i, until ) { 4.5530 + return jQuery.dir( elem, "nextSibling", until ); 4.5531 + }, 4.5532 + prevUntil: function( elem, i, until ) { 4.5533 + return jQuery.dir( elem, "previousSibling", until ); 4.5534 + }, 4.5535 + siblings: function( elem ) { 4.5536 + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); 4.5537 + }, 4.5538 + children: function( elem ) { 4.5539 + return jQuery.sibling( elem.firstChild ); 4.5540 + }, 4.5541 + contents: function( elem ) { 4.5542 + return jQuery.nodeName( elem, "iframe" ) ? 4.5543 + elem.contentDocument || elem.contentWindow.document : 4.5544 + jQuery.merge( [], elem.childNodes ); 4.5545 + } 4.5546 +}, function( name, fn ) { 4.5547 + jQuery.fn[ name ] = function( until, selector ) { 4.5548 + var ret = jQuery.map( this, fn, until ); 4.5549 + 4.5550 + if ( !runtil.test( name ) ) { 4.5551 + selector = until; 4.5552 + } 4.5553 + 4.5554 + if ( selector && typeof selector === "string" ) { 4.5555 + ret = jQuery.filter( selector, ret ); 4.5556 + } 4.5557 + 4.5558 + ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; 4.5559 + 4.5560 + if ( this.length > 1 && rparentsprev.test( name ) ) { 4.5561 + ret = ret.reverse(); 4.5562 + } 4.5563 + 4.5564 + return this.pushStack( ret, name, core_slice.call( arguments ).join(",") ); 4.5565 + }; 4.5566 +}); 4.5567 + 4.5568 +jQuery.extend({ 4.5569 + filter: function( expr, elems, not ) { 4.5570 + if ( not ) { 4.5571 + expr = ":not(" + expr + ")"; 4.5572 + } 4.5573 + 4.5574 + return elems.length === 1 ? 4.5575 + jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : 4.5576 + jQuery.find.matches(expr, elems); 4.5577 + }, 4.5578 + 4.5579 + dir: function( elem, dir, until ) { 4.5580 + var matched = [], 4.5581 + cur = elem[ dir ]; 4.5582 + 4.5583 + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { 4.5584 + if ( cur.nodeType === 1 ) { 4.5585 + matched.push( cur ); 4.5586 + } 4.5587 + cur = cur[dir]; 4.5588 + } 4.5589 + return matched; 4.5590 + }, 4.5591 + 4.5592 + sibling: function( n, elem ) { 4.5593 + var r = []; 4.5594 + 4.5595 + for ( ; n; n = n.nextSibling ) { 4.5596 + if ( n.nodeType === 1 && n !== elem ) { 4.5597 + r.push( n ); 4.5598 + } 4.5599 + } 4.5600 + 4.5601 + return r; 4.5602 + } 4.5603 +}); 4.5604 + 4.5605 +// Implement the identical functionality for filter and not 4.5606 +function winnow( elements, qualifier, keep ) { 4.5607 + 4.5608 + // Can't pass null or undefined to indexOf in Firefox 4 4.5609 + // Set to 0 to skip string check 4.5610 + qualifier = qualifier || 0; 4.5611 + 4.5612 + if ( jQuery.isFunction( qualifier ) ) { 4.5613 + return jQuery.grep(elements, function( elem, i ) { 4.5614 + var retVal = !!qualifier.call( elem, i, elem ); 4.5615 + return retVal === keep; 4.5616 + }); 4.5617 + 4.5618 + } else if ( qualifier.nodeType ) { 4.5619 + return jQuery.grep(elements, function( elem, i ) { 4.5620 + return ( elem === qualifier ) === keep; 4.5621 + }); 4.5622 + 4.5623 + } else if ( typeof qualifier === "string" ) { 4.5624 + var filtered = jQuery.grep(elements, function( elem ) { 4.5625 + return elem.nodeType === 1; 4.5626 + }); 4.5627 + 4.5628 + if ( isSimple.test( qualifier ) ) { 4.5629 + return jQuery.filter(qualifier, filtered, !keep); 4.5630 + } else { 4.5631 + qualifier = jQuery.filter( qualifier, filtered ); 4.5632 + } 4.5633 + } 4.5634 + 4.5635 + return jQuery.grep(elements, function( elem, i ) { 4.5636 + return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; 4.5637 + }); 4.5638 +} 4.5639 +function createSafeFragment( document ) { 4.5640 + var list = nodeNames.split( "|" ), 4.5641 + safeFrag = document.createDocumentFragment(); 4.5642 + 4.5643 + if ( safeFrag.createElement ) { 4.5644 + while ( list.length ) { 4.5645 + safeFrag.createElement( 4.5646 + list.pop() 4.5647 + ); 4.5648 + } 4.5649 + } 4.5650 + return safeFrag; 4.5651 +} 4.5652 + 4.5653 +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + 4.5654 + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", 4.5655 + rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, 4.5656 + rleadingWhitespace = /^\s+/, 4.5657 + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, 4.5658 + rtagName = /<([\w:]+)/, 4.5659 + rtbody = /<tbody/i, 4.5660 + rhtml = /<|&#?\w+;/, 4.5661 + rnoInnerhtml = /<(?:script|style|link)/i, 4.5662 + rnocache = /<(?:script|object|embed|option|style)/i, 4.5663 + rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), 4.5664 + rcheckableType = /^(?:checkbox|radio)$/, 4.5665 + // checked="checked" or checked 4.5666 + rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, 4.5667 + rscriptType = /\/(java|ecma)script/i, 4.5668 + rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g, 4.5669 + wrapMap = { 4.5670 + option: [ 1, "<select multiple='multiple'>", "</select>" ], 4.5671 + legend: [ 1, "<fieldset>", "</fieldset>" ], 4.5672 + thead: [ 1, "<table>", "</table>" ], 4.5673 + tr: [ 2, "<table><tbody>", "</tbody></table>" ], 4.5674 + td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], 4.5675 + col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], 4.5676 + area: [ 1, "<map>", "</map>" ], 4.5677 + _default: [ 0, "", "" ] 4.5678 + }, 4.5679 + safeFragment = createSafeFragment( document ), 4.5680 + fragmentDiv = safeFragment.appendChild( document.createElement("div") ); 4.5681 + 4.5682 +wrapMap.optgroup = wrapMap.option; 4.5683 +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; 4.5684 +wrapMap.th = wrapMap.td; 4.5685 + 4.5686 +// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, 4.5687 +// unless wrapped in a div with non-breaking characters in front of it. 4.5688 +if ( !jQuery.support.htmlSerialize ) { 4.5689 + wrapMap._default = [ 1, "X<div>", "</div>" ]; 4.5690 +} 4.5691 + 4.5692 +jQuery.fn.extend({ 4.5693 + text: function( value ) { 4.5694 + return jQuery.access( this, function( value ) { 4.5695 + return value === undefined ? 4.5696 + jQuery.text( this ) : 4.5697 + this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); 4.5698 + }, null, value, arguments.length ); 4.5699 + }, 4.5700 + 4.5701 + wrapAll: function( html ) { 4.5702 + if ( jQuery.isFunction( html ) ) { 4.5703 + return this.each(function(i) { 4.5704 + jQuery(this).wrapAll( html.call(this, i) ); 4.5705 + }); 4.5706 + } 4.5707 + 4.5708 + if ( this[0] ) { 4.5709 + // The elements to wrap the target around 4.5710 + var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); 4.5711 + 4.5712 + if ( this[0].parentNode ) { 4.5713 + wrap.insertBefore( this[0] ); 4.5714 + } 4.5715 + 4.5716 + wrap.map(function() { 4.5717 + var elem = this; 4.5718 + 4.5719 + while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { 4.5720 + elem = elem.firstChild; 4.5721 + } 4.5722 + 4.5723 + return elem; 4.5724 + }).append( this ); 4.5725 + } 4.5726 + 4.5727 + return this; 4.5728 + }, 4.5729 + 4.5730 + wrapInner: function( html ) { 4.5731 + if ( jQuery.isFunction( html ) ) { 4.5732 + return this.each(function(i) { 4.5733 + jQuery(this).wrapInner( html.call(this, i) ); 4.5734 + }); 4.5735 + } 4.5736 + 4.5737 + return this.each(function() { 4.5738 + var self = jQuery( this ), 4.5739 + contents = self.contents(); 4.5740 + 4.5741 + if ( contents.length ) { 4.5742 + contents.wrapAll( html ); 4.5743 + 4.5744 + } else { 4.5745 + self.append( html ); 4.5746 + } 4.5747 + }); 4.5748 + }, 4.5749 + 4.5750 + wrap: function( html ) { 4.5751 + var isFunction = jQuery.isFunction( html ); 4.5752 + 4.5753 + return this.each(function(i) { 4.5754 + jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); 4.5755 + }); 4.5756 + }, 4.5757 + 4.5758 + unwrap: function() { 4.5759 + return this.parent().each(function() { 4.5760 + if ( !jQuery.nodeName( this, "body" ) ) { 4.5761 + jQuery( this ).replaceWith( this.childNodes ); 4.5762 + } 4.5763 + }).end(); 4.5764 + }, 4.5765 + 4.5766 + append: function() { 4.5767 + return this.domManip(arguments, true, function( elem ) { 4.5768 + if ( this.nodeType === 1 || this.nodeType === 11 ) { 4.5769 + this.appendChild( elem ); 4.5770 + } 4.5771 + }); 4.5772 + }, 4.5773 + 4.5774 + prepend: function() { 4.5775 + return this.domManip(arguments, true, function( elem ) { 4.5776 + if ( this.nodeType === 1 || this.nodeType === 11 ) { 4.5777 + this.insertBefore( elem, this.firstChild ); 4.5778 + } 4.5779 + }); 4.5780 + }, 4.5781 + 4.5782 + before: function() { 4.5783 + if ( !isDisconnected( this[0] ) ) { 4.5784 + return this.domManip(arguments, false, function( elem ) { 4.5785 + this.parentNode.insertBefore( elem, this ); 4.5786 + }); 4.5787 + } 4.5788 + 4.5789 + if ( arguments.length ) { 4.5790 + var set = jQuery.clean( arguments ); 4.5791 + return this.pushStack( jQuery.merge( set, this ), "before", this.selector ); 4.5792 + } 4.5793 + }, 4.5794 + 4.5795 + after: function() { 4.5796 + if ( !isDisconnected( this[0] ) ) { 4.5797 + return this.domManip(arguments, false, function( elem ) { 4.5798 + this.parentNode.insertBefore( elem, this.nextSibling ); 4.5799 + }); 4.5800 + } 4.5801 + 4.5802 + if ( arguments.length ) { 4.5803 + var set = jQuery.clean( arguments ); 4.5804 + return this.pushStack( jQuery.merge( this, set ), "after", this.selector ); 4.5805 + } 4.5806 + }, 4.5807 + 4.5808 + // keepData is for internal use only--do not document 4.5809 + remove: function( selector, keepData ) { 4.5810 + var elem, 4.5811 + i = 0; 4.5812 + 4.5813 + for ( ; (elem = this[i]) != null; i++ ) { 4.5814 + if ( !selector || jQuery.filter( selector, [ elem ] ).length ) { 4.5815 + if ( !keepData && elem.nodeType === 1 ) { 4.5816 + jQuery.cleanData( elem.getElementsByTagName("*") ); 4.5817 + jQuery.cleanData( [ elem ] ); 4.5818 + } 4.5819 + 4.5820 + if ( elem.parentNode ) { 4.5821 + elem.parentNode.removeChild( elem ); 4.5822 + } 4.5823 + } 4.5824 + } 4.5825 + 4.5826 + return this; 4.5827 + }, 4.5828 + 4.5829 + empty: function() { 4.5830 + var elem, 4.5831 + i = 0; 4.5832 + 4.5833 + for ( ; (elem = this[i]) != null; i++ ) { 4.5834 + // Remove element nodes and prevent memory leaks 4.5835 + if ( elem.nodeType === 1 ) { 4.5836 + jQuery.cleanData( elem.getElementsByTagName("*") ); 4.5837 + } 4.5838 + 4.5839 + // Remove any remaining nodes 4.5840 + while ( elem.firstChild ) { 4.5841 + elem.removeChild( elem.firstChild ); 4.5842 + } 4.5843 + } 4.5844 + 4.5845 + return this; 4.5846 + }, 4.5847 + 4.5848 + clone: function( dataAndEvents, deepDataAndEvents ) { 4.5849 + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; 4.5850 + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; 4.5851 + 4.5852 + return this.map( function () { 4.5853 + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); 4.5854 + }); 4.5855 + }, 4.5856 + 4.5857 + html: function( value ) { 4.5858 + return jQuery.access( this, function( value ) { 4.5859 + var elem = this[0] || {}, 4.5860 + i = 0, 4.5861 + l = this.length; 4.5862 + 4.5863 + if ( value === undefined ) { 4.5864 + return elem.nodeType === 1 ? 4.5865 + elem.innerHTML.replace( rinlinejQuery, "" ) : 4.5866 + undefined; 4.5867 + } 4.5868 + 4.5869 + // See if we can take a shortcut and just use innerHTML 4.5870 + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && 4.5871 + ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && 4.5872 + ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && 4.5873 + !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { 4.5874 + 4.5875 + value = value.replace( rxhtmlTag, "<$1></$2>" ); 4.5876 + 4.5877 + try { 4.5878 + for (; i < l; i++ ) { 4.5879 + // Remove element nodes and prevent memory leaks 4.5880 + elem = this[i] || {}; 4.5881 + if ( elem.nodeType === 1 ) { 4.5882 + jQuery.cleanData( elem.getElementsByTagName( "*" ) ); 4.5883 + elem.innerHTML = value; 4.5884 + } 4.5885 + } 4.5886 + 4.5887 + elem = 0; 4.5888 + 4.5889 + // If using innerHTML throws an exception, use the fallback method 4.5890 + } catch(e) {} 4.5891 + } 4.5892 + 4.5893 + if ( elem ) { 4.5894 + this.empty().append( value ); 4.5895 + } 4.5896 + }, null, value, arguments.length ); 4.5897 + }, 4.5898 + 4.5899 + replaceWith: function( value ) { 4.5900 + if ( !isDisconnected( this[0] ) ) { 4.5901 + // Make sure that the elements are removed from the DOM before they are inserted 4.5902 + // this can help fix replacing a parent with child elements 4.5903 + if ( jQuery.isFunction( value ) ) { 4.5904 + return this.each(function(i) { 4.5905 + var self = jQuery(this), old = self.html(); 4.5906 + self.replaceWith( value.call( this, i, old ) ); 4.5907 + }); 4.5908 + } 4.5909 + 4.5910 + if ( typeof value !== "string" ) { 4.5911 + value = jQuery( value ).detach(); 4.5912 + } 4.5913 + 4.5914 + return this.each(function() { 4.5915 + var next = this.nextSibling, 4.5916 + parent = this.parentNode; 4.5917 + 4.5918 + jQuery( this ).remove(); 4.5919 + 4.5920 + if ( next ) { 4.5921 + jQuery(next).before( value ); 4.5922 + } else { 4.5923 + jQuery(parent).append( value ); 4.5924 + } 4.5925 + }); 4.5926 + } 4.5927 + 4.5928 + return this.length ? 4.5929 + this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) : 4.5930 + this; 4.5931 + }, 4.5932 + 4.5933 + detach: function( selector ) { 4.5934 + return this.remove( selector, true ); 4.5935 + }, 4.5936 + 4.5937 + domManip: function( args, table, callback ) { 4.5938 + 4.5939 + // Flatten any nested arrays 4.5940 + args = [].concat.apply( [], args ); 4.5941 + 4.5942 + var results, first, fragment, iNoClone, 4.5943 + i = 0, 4.5944 + value = args[0], 4.5945 + scripts = [], 4.5946 + l = this.length; 4.5947 + 4.5948 + // We can't cloneNode fragments that contain checked, in WebKit 4.5949 + if ( !jQuery.support.checkClone && l > 1 && typeof value === "string" && rchecked.test( value ) ) { 4.5950 + return this.each(function() { 4.5951 + jQuery(this).domManip( args, table, callback ); 4.5952 + }); 4.5953 + } 4.5954 + 4.5955 + if ( jQuery.isFunction(value) ) { 4.5956 + return this.each(function(i) { 4.5957 + var self = jQuery(this); 4.5958 + args[0] = value.call( this, i, table ? self.html() : undefined ); 4.5959 + self.domManip( args, table, callback ); 4.5960 + }); 4.5961 + } 4.5962 + 4.5963 + if ( this[0] ) { 4.5964 + results = jQuery.buildFragment( args, this, scripts ); 4.5965 + fragment = results.fragment; 4.5966 + first = fragment.firstChild; 4.5967 + 4.5968 + if ( fragment.childNodes.length === 1 ) { 4.5969 + fragment = first; 4.5970 + } 4.5971 + 4.5972 + if ( first ) { 4.5973 + table = table && jQuery.nodeName( first, "tr" ); 4.5974 + 4.5975 + // Use the original fragment for the last item instead of the first because it can end up 4.5976 + // being emptied incorrectly in certain situations (#8070). 4.5977 + // Fragments from the fragment cache must always be cloned and never used in place. 4.5978 + for ( iNoClone = results.cacheable || l - 1; i < l; i++ ) { 4.5979 + callback.call( 4.5980 + table && jQuery.nodeName( this[i], "table" ) ? 4.5981 + findOrAppend( this[i], "tbody" ) : 4.5982 + this[i], 4.5983 + i === iNoClone ? 4.5984 + fragment : 4.5985 + jQuery.clone( fragment, true, true ) 4.5986 + ); 4.5987 + } 4.5988 + } 4.5989 + 4.5990 + // Fix #11809: Avoid leaking memory 4.5991 + fragment = first = null; 4.5992 + 4.5993 + if ( scripts.length ) { 4.5994 + jQuery.each( scripts, function( i, elem ) { 4.5995 + if ( elem.src ) { 4.5996 + if ( jQuery.ajax ) { 4.5997 + jQuery.ajax({ 4.5998 + url: elem.src, 4.5999 + type: "GET", 4.6000 + dataType: "script", 4.6001 + async: false, 4.6002 + global: false, 4.6003 + "throws": true 4.6004 + }); 4.6005 + } else { 4.6006 + jQuery.error("no ajax"); 4.6007 + } 4.6008 + } else { 4.6009 + jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "" ) ); 4.6010 + } 4.6011 + 4.6012 + if ( elem.parentNode ) { 4.6013 + elem.parentNode.removeChild( elem ); 4.6014 + } 4.6015 + }); 4.6016 + } 4.6017 + } 4.6018 + 4.6019 + return this; 4.6020 + } 4.6021 +}); 4.6022 + 4.6023 +function findOrAppend( elem, tag ) { 4.6024 + return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) ); 4.6025 +} 4.6026 + 4.6027 +function cloneCopyEvent( src, dest ) { 4.6028 + 4.6029 + if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { 4.6030 + return; 4.6031 + } 4.6032 + 4.6033 + var type, i, l, 4.6034 + oldData = jQuery._data( src ), 4.6035 + curData = jQuery._data( dest, oldData ), 4.6036 + events = oldData.events; 4.6037 + 4.6038 + if ( events ) { 4.6039 + delete curData.handle; 4.6040 + curData.events = {}; 4.6041 + 4.6042 + for ( type in events ) { 4.6043 + for ( i = 0, l = events[ type ].length; i < l; i++ ) { 4.6044 + jQuery.event.add( dest, type, events[ type ][ i ] ); 4.6045 + } 4.6046 + } 4.6047 + } 4.6048 + 4.6049 + // make the cloned public data object a copy from the original 4.6050 + if ( curData.data ) { 4.6051 + curData.data = jQuery.extend( {}, curData.data ); 4.6052 + } 4.6053 +} 4.6054 + 4.6055 +function cloneFixAttributes( src, dest ) { 4.6056 + var nodeName; 4.6057 + 4.6058 + // We do not need to do anything for non-Elements 4.6059 + if ( dest.nodeType !== 1 ) { 4.6060 + return; 4.6061 + } 4.6062 + 4.6063 + // clearAttributes removes the attributes, which we don't want, 4.6064 + // but also removes the attachEvent events, which we *do* want 4.6065 + if ( dest.clearAttributes ) { 4.6066 + dest.clearAttributes(); 4.6067 + } 4.6068 + 4.6069 + // mergeAttributes, in contrast, only merges back on the 4.6070 + // original attributes, not the events 4.6071 + if ( dest.mergeAttributes ) { 4.6072 + dest.mergeAttributes( src ); 4.6073 + } 4.6074 + 4.6075 + nodeName = dest.nodeName.toLowerCase(); 4.6076 + 4.6077 + if ( nodeName === "object" ) { 4.6078 + // IE6-10 improperly clones children of object elements using classid. 4.6079 + // IE10 throws NoModificationAllowedError if parent is null, #12132. 4.6080 + if ( dest.parentNode ) { 4.6081 + dest.outerHTML = src.outerHTML; 4.6082 + } 4.6083 + 4.6084 + // This path appears unavoidable for IE9. When cloning an object 4.6085 + // element in IE9, the outerHTML strategy above is not sufficient. 4.6086 + // If the src has innerHTML and the destination does not, 4.6087 + // copy the src.innerHTML into the dest.innerHTML. #10324 4.6088 + if ( jQuery.support.html5Clone && (src.innerHTML && !jQuery.trim(dest.innerHTML)) ) { 4.6089 + dest.innerHTML = src.innerHTML; 4.6090 + } 4.6091 + 4.6092 + } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) { 4.6093 + // IE6-8 fails to persist the checked state of a cloned checkbox 4.6094 + // or radio button. Worse, IE6-7 fail to give the cloned element 4.6095 + // a checked appearance if the defaultChecked value isn't also set 4.6096 + 4.6097 + dest.defaultChecked = dest.checked = src.checked; 4.6098 + 4.6099 + // IE6-7 get confused and end up setting the value of a cloned 4.6100 + // checkbox/radio button to an empty string instead of "on" 4.6101 + if ( dest.value !== src.value ) { 4.6102 + dest.value = src.value; 4.6103 + } 4.6104 + 4.6105 + // IE6-8 fails to return the selected option to the default selected 4.6106 + // state when cloning options 4.6107 + } else if ( nodeName === "option" ) { 4.6108 + dest.selected = src.defaultSelected; 4.6109 + 4.6110 + // IE6-8 fails to set the defaultValue to the correct value when 4.6111 + // cloning other types of input fields 4.6112 + } else if ( nodeName === "input" || nodeName === "textarea" ) { 4.6113 + dest.defaultValue = src.defaultValue; 4.6114 + 4.6115 + // IE blanks contents when cloning scripts 4.6116 + } else if ( nodeName === "script" && dest.text !== src.text ) { 4.6117 + dest.text = src.text; 4.6118 + } 4.6119 + 4.6120 + // Event data gets referenced instead of copied if the expando 4.6121 + // gets copied too 4.6122 + dest.removeAttribute( jQuery.expando ); 4.6123 +} 4.6124 + 4.6125 +jQuery.buildFragment = function( args, context, scripts ) { 4.6126 + var fragment, cacheable, cachehit, 4.6127 + first = args[ 0 ]; 4.6128 + 4.6129 + // Set context from what may come in as undefined or a jQuery collection or a node 4.6130 + // Updated to fix #12266 where accessing context[0] could throw an exception in IE9/10 & 4.6131 + // also doubles as fix for #8950 where plain objects caused createDocumentFragment exception 4.6132 + context = context || document; 4.6133 + context = !context.nodeType && context[0] || context; 4.6134 + context = context.ownerDocument || context; 4.6135 + 4.6136 + // Only cache "small" (1/2 KB) HTML strings that are associated with the main document 4.6137 + // Cloning options loses the selected state, so don't cache them 4.6138 + // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment 4.6139 + // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache 4.6140 + // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501 4.6141 + if ( args.length === 1 && typeof first === "string" && first.length < 512 && context === document && 4.6142 + first.charAt(0) === "<" && !rnocache.test( first ) && 4.6143 + (jQuery.support.checkClone || !rchecked.test( first )) && 4.6144 + (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) { 4.6145 + 4.6146 + // Mark cacheable and look for a hit 4.6147 + cacheable = true; 4.6148 + fragment = jQuery.fragments[ first ]; 4.6149 + cachehit = fragment !== undefined; 4.6150 + } 4.6151 + 4.6152 + if ( !fragment ) { 4.6153 + fragment = context.createDocumentFragment(); 4.6154 + jQuery.clean( args, context, fragment, scripts ); 4.6155 + 4.6156 + // Update the cache, but only store false 4.6157 + // unless this is a second parsing of the same content 4.6158 + if ( cacheable ) { 4.6159 + jQuery.fragments[ first ] = cachehit && fragment; 4.6160 + } 4.6161 + } 4.6162 + 4.6163 + return { fragment: fragment, cacheable: cacheable }; 4.6164 +}; 4.6165 + 4.6166 +jQuery.fragments = {}; 4.6167 + 4.6168 +jQuery.each({ 4.6169 + appendTo: "append", 4.6170 + prependTo: "prepend", 4.6171 + insertBefore: "before", 4.6172 + insertAfter: "after", 4.6173 + replaceAll: "replaceWith" 4.6174 +}, function( name, original ) { 4.6175 + jQuery.fn[ name ] = function( selector ) { 4.6176 + var elems, 4.6177 + i = 0, 4.6178 + ret = [], 4.6179 + insert = jQuery( selector ), 4.6180 + l = insert.length, 4.6181 + parent = this.length === 1 && this[0].parentNode; 4.6182 + 4.6183 + if ( (parent == null || parent && parent.nodeType === 11 && parent.childNodes.length === 1) && l === 1 ) { 4.6184 + insert[ original ]( this[0] ); 4.6185 + return this; 4.6186 + } else { 4.6187 + for ( ; i < l; i++ ) { 4.6188 + elems = ( i > 0 ? this.clone(true) : this ).get(); 4.6189 + jQuery( insert[i] )[ original ]( elems ); 4.6190 + ret = ret.concat( elems ); 4.6191 + } 4.6192 + 4.6193 + return this.pushStack( ret, name, insert.selector ); 4.6194 + } 4.6195 + }; 4.6196 +}); 4.6197 + 4.6198 +function getAll( elem ) { 4.6199 + if ( typeof elem.getElementsByTagName !== "undefined" ) { 4.6200 + return elem.getElementsByTagName( "*" ); 4.6201 + 4.6202 + } else if ( typeof elem.querySelectorAll !== "undefined" ) { 4.6203 + return elem.querySelectorAll( "*" ); 4.6204 + 4.6205 + } else { 4.6206 + return []; 4.6207 + } 4.6208 +} 4.6209 + 4.6210 +// Used in clean, fixes the defaultChecked property 4.6211 +function fixDefaultChecked( elem ) { 4.6212 + if ( rcheckableType.test( elem.type ) ) { 4.6213 + elem.defaultChecked = elem.checked; 4.6214 + } 4.6215 +} 4.6216 + 4.6217 +jQuery.extend({ 4.6218 + clone: function( elem, dataAndEvents, deepDataAndEvents ) { 4.6219 + var srcElements, 4.6220 + destElements, 4.6221 + i, 4.6222 + clone; 4.6223 + 4.6224 + if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { 4.6225 + clone = elem.cloneNode( true ); 4.6226 + 4.6227 + // IE<=8 does not properly clone detached, unknown element nodes 4.6228 + } else { 4.6229 + fragmentDiv.innerHTML = elem.outerHTML; 4.6230 + fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); 4.6231 + } 4.6232 + 4.6233 + if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && 4.6234 + (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { 4.6235 + // IE copies events bound via attachEvent when using cloneNode. 4.6236 + // Calling detachEvent on the clone will also remove the events 4.6237 + // from the original. In order to get around this, we use some 4.6238 + // proprietary methods to clear the events. Thanks to MooTools 4.6239 + // guys for this hotness. 4.6240 + 4.6241 + cloneFixAttributes( elem, clone ); 4.6242 + 4.6243 + // Using Sizzle here is crazy slow, so we use getElementsByTagName instead 4.6244 + srcElements = getAll( elem ); 4.6245 + destElements = getAll( clone ); 4.6246 + 4.6247 + // Weird iteration because IE will replace the length property 4.6248 + // with an element if you are cloning the body and one of the 4.6249 + // elements on the page has a name or id of "length" 4.6250 + for ( i = 0; srcElements[i]; ++i ) { 4.6251 + // Ensure that the destination node is not null; Fixes #9587 4.6252 + if ( destElements[i] ) { 4.6253 + cloneFixAttributes( srcElements[i], destElements[i] ); 4.6254 + } 4.6255 + } 4.6256 + } 4.6257 + 4.6258 + // Copy the events from the original to the clone 4.6259 + if ( dataAndEvents ) { 4.6260 + cloneCopyEvent( elem, clone ); 4.6261 + 4.6262 + if ( deepDataAndEvents ) { 4.6263 + srcElements = getAll( elem ); 4.6264 + destElements = getAll( clone ); 4.6265 + 4.6266 + for ( i = 0; srcElements[i]; ++i ) { 4.6267 + cloneCopyEvent( srcElements[i], destElements[i] ); 4.6268 + } 4.6269 + } 4.6270 + } 4.6271 + 4.6272 + srcElements = destElements = null; 4.6273 + 4.6274 + // Return the cloned set 4.6275 + return clone; 4.6276 + }, 4.6277 + 4.6278 + clean: function( elems, context, fragment, scripts ) { 4.6279 + var i, j, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags, 4.6280 + safe = context === document && safeFragment, 4.6281 + ret = []; 4.6282 + 4.6283 + // Ensure that context is a document 4.6284 + if ( !context || typeof context.createDocumentFragment === "undefined" ) { 4.6285 + context = document; 4.6286 + } 4.6287 + 4.6288 + // Use the already-created safe fragment if context permits 4.6289 + for ( i = 0; (elem = elems[i]) != null; i++ ) { 4.6290 + if ( typeof elem === "number" ) { 4.6291 + elem += ""; 4.6292 + } 4.6293 + 4.6294 + if ( !elem ) { 4.6295 + continue; 4.6296 + } 4.6297 + 4.6298 + // Convert html string into DOM nodes 4.6299 + if ( typeof elem === "string" ) { 4.6300 + if ( !rhtml.test( elem ) ) { 4.6301 + elem = context.createTextNode( elem ); 4.6302 + } else { 4.6303 + // Ensure a safe container in which to render the html 4.6304 + safe = safe || createSafeFragment( context ); 4.6305 + div = context.createElement("div"); 4.6306 + safe.appendChild( div ); 4.6307 + 4.6308 + // Fix "XHTML"-style tags in all browsers 4.6309 + elem = elem.replace(rxhtmlTag, "<$1></$2>"); 4.6310 + 4.6311 + // Go to html and back, then peel off extra wrappers 4.6312 + tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); 4.6313 + wrap = wrapMap[ tag ] || wrapMap._default; 4.6314 + depth = wrap[0]; 4.6315 + div.innerHTML = wrap[1] + elem + wrap[2]; 4.6316 + 4.6317 + // Move to the right depth 4.6318 + while ( depth-- ) { 4.6319 + div = div.lastChild; 4.6320 + } 4.6321 + 4.6322 + // Remove IE's autoinserted <tbody> from table fragments 4.6323 + if ( !jQuery.support.tbody ) { 4.6324 + 4.6325 + // String was a <table>, *may* have spurious <tbody> 4.6326 + hasBody = rtbody.test(elem); 4.6327 + tbody = tag === "table" && !hasBody ? 4.6328 + div.firstChild && div.firstChild.childNodes : 4.6329 + 4.6330 + // String was a bare <thead> or <tfoot> 4.6331 + wrap[1] === "<table>" && !hasBody ? 4.6332 + div.childNodes : 4.6333 + []; 4.6334 + 4.6335 + for ( j = tbody.length - 1; j >= 0 ; --j ) { 4.6336 + if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) { 4.6337 + tbody[ j ].parentNode.removeChild( tbody[ j ] ); 4.6338 + } 4.6339 + } 4.6340 + } 4.6341 + 4.6342 + // IE completely kills leading whitespace when innerHTML is used 4.6343 + if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { 4.6344 + div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild ); 4.6345 + } 4.6346 + 4.6347 + elem = div.childNodes; 4.6348 + 4.6349 + // Take out of fragment container (we need a fresh div each time) 4.6350 + div.parentNode.removeChild( div ); 4.6351 + } 4.6352 + } 4.6353 + 4.6354 + if ( elem.nodeType ) { 4.6355 + ret.push( elem ); 4.6356 + } else { 4.6357 + jQuery.merge( ret, elem ); 4.6358 + } 4.6359 + } 4.6360 + 4.6361 + // Fix #11356: Clear elements from safeFragment 4.6362 + if ( div ) { 4.6363 + elem = div = safe = null; 4.6364 + } 4.6365 + 4.6366 + // Reset defaultChecked for any radios and checkboxes 4.6367 + // about to be appended to the DOM in IE 6/7 (#8060) 4.6368 + if ( !jQuery.support.appendChecked ) { 4.6369 + for ( i = 0; (elem = ret[i]) != null; i++ ) { 4.6370 + if ( jQuery.nodeName( elem, "input" ) ) { 4.6371 + fixDefaultChecked( elem ); 4.6372 + } else if ( typeof elem.getElementsByTagName !== "undefined" ) { 4.6373 + jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked ); 4.6374 + } 4.6375 + } 4.6376 + } 4.6377 + 4.6378 + // Append elements to a provided document fragment 4.6379 + if ( fragment ) { 4.6380 + // Special handling of each script element 4.6381 + handleScript = function( elem ) { 4.6382 + // Check if we consider it executable 4.6383 + if ( !elem.type || rscriptType.test( elem.type ) ) { 4.6384 + // Detach the script and store it in the scripts array (if provided) or the fragment 4.6385 + // Return truthy to indicate that it has been handled 4.6386 + return scripts ? 4.6387 + scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) : 4.6388 + fragment.appendChild( elem ); 4.6389 + } 4.6390 + }; 4.6391 + 4.6392 + for ( i = 0; (elem = ret[i]) != null; i++ ) { 4.6393 + // Check if we're done after handling an executable script 4.6394 + if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) { 4.6395 + // Append to fragment and handle embedded scripts 4.6396 + fragment.appendChild( elem ); 4.6397 + if ( typeof elem.getElementsByTagName !== "undefined" ) { 4.6398 + // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration 4.6399 + jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript ); 4.6400 + 4.6401 + // Splice the scripts into ret after their former ancestor and advance our index beyond them 4.6402 + ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) ); 4.6403 + i += jsTags.length; 4.6404 + } 4.6405 + } 4.6406 + } 4.6407 + } 4.6408 + 4.6409 + return ret; 4.6410 + }, 4.6411 + 4.6412 + cleanData: function( elems, /* internal */ acceptData ) { 4.6413 + var data, id, elem, type, 4.6414 + i = 0, 4.6415 + internalKey = jQuery.expando, 4.6416 + cache = jQuery.cache, 4.6417 + deleteExpando = jQuery.support.deleteExpando, 4.6418 + special = jQuery.event.special; 4.6419 + 4.6420 + for ( ; (elem = elems[i]) != null; i++ ) { 4.6421 + 4.6422 + if ( acceptData || jQuery.acceptData( elem ) ) { 4.6423 + 4.6424 + id = elem[ internalKey ]; 4.6425 + data = id && cache[ id ]; 4.6426 + 4.6427 + if ( data ) { 4.6428 + if ( data.events ) { 4.6429 + for ( type in data.events ) { 4.6430 + if ( special[ type ] ) { 4.6431 + jQuery.event.remove( elem, type ); 4.6432 + 4.6433 + // This is a shortcut to avoid jQuery.event.remove's overhead 4.6434 + } else { 4.6435 + jQuery.removeEvent( elem, type, data.handle ); 4.6436 + } 4.6437 + } 4.6438 + } 4.6439 + 4.6440 + // Remove cache only if it was not already removed by jQuery.event.remove 4.6441 + if ( cache[ id ] ) { 4.6442 + 4.6443 + delete cache[ id ]; 4.6444 + 4.6445 + // IE does not allow us to delete expando properties from nodes, 4.6446 + // nor does it have a removeAttribute function on Document nodes; 4.6447 + // we must handle all of these cases 4.6448 + if ( deleteExpando ) { 4.6449 + delete elem[ internalKey ]; 4.6450 + 4.6451 + } else if ( elem.removeAttribute ) { 4.6452 + elem.removeAttribute( internalKey ); 4.6453 + 4.6454 + } else { 4.6455 + elem[ internalKey ] = null; 4.6456 + } 4.6457 + 4.6458 + jQuery.deletedIds.push( id ); 4.6459 + } 4.6460 + } 4.6461 + } 4.6462 + } 4.6463 + } 4.6464 +}); 4.6465 +// Limit scope pollution from any deprecated API 4.6466 +(function() { 4.6467 + 4.6468 +var matched, browser; 4.6469 + 4.6470 +// Use of jQuery.browser is frowned upon. 4.6471 +// More details: http://api.jquery.com/jQuery.browser 4.6472 +// jQuery.uaMatch maintained for back-compat 4.6473 +jQuery.uaMatch = function( ua ) { 4.6474 + ua = ua.toLowerCase(); 4.6475 + 4.6476 + var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) || 4.6477 + /(webkit)[ \/]([\w.]+)/.exec( ua ) || 4.6478 + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || 4.6479 + /(msie) ([\w.]+)/.exec( ua ) || 4.6480 + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || 4.6481 + []; 4.6482 + 4.6483 + return { 4.6484 + browser: match[ 1 ] || "", 4.6485 + version: match[ 2 ] || "0" 4.6486 + }; 4.6487 +}; 4.6488 + 4.6489 +matched = jQuery.uaMatch( navigator.userAgent ); 4.6490 +browser = {}; 4.6491 + 4.6492 +if ( matched.browser ) { 4.6493 + browser[ matched.browser ] = true; 4.6494 + browser.version = matched.version; 4.6495 +} 4.6496 + 4.6497 +// Chrome is Webkit, but Webkit is also Safari. 4.6498 +if ( browser.chrome ) { 4.6499 + browser.webkit = true; 4.6500 +} else if ( browser.webkit ) { 4.6501 + browser.safari = true; 4.6502 +} 4.6503 + 4.6504 +jQuery.browser = browser; 4.6505 + 4.6506 +jQuery.sub = function() { 4.6507 + function jQuerySub( selector, context ) { 4.6508 + return new jQuerySub.fn.init( selector, context ); 4.6509 + } 4.6510 + jQuery.extend( true, jQuerySub, this ); 4.6511 + jQuerySub.superclass = this; 4.6512 + jQuerySub.fn = jQuerySub.prototype = this(); 4.6513 + jQuerySub.fn.constructor = jQuerySub; 4.6514 + jQuerySub.sub = this.sub; 4.6515 + jQuerySub.fn.init = function init( selector, context ) { 4.6516 + if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { 4.6517 + context = jQuerySub( context ); 4.6518 + } 4.6519 + 4.6520 + return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); 4.6521 + }; 4.6522 + jQuerySub.fn.init.prototype = jQuerySub.fn; 4.6523 + var rootjQuerySub = jQuerySub(document); 4.6524 + return jQuerySub; 4.6525 +}; 4.6526 + 4.6527 +})(); 4.6528 +var curCSS, iframe, iframeDoc, 4.6529 + ralpha = /alpha\([^)]*\)/i, 4.6530 + ropacity = /opacity=([^)]*)/, 4.6531 + rposition = /^(top|right|bottom|left)$/, 4.6532 + // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" 4.6533 + // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display 4.6534 + rdisplayswap = /^(none|table(?!-c[ea]).+)/, 4.6535 + rmargin = /^margin/, 4.6536 + rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), 4.6537 + rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), 4.6538 + rrelNum = new RegExp( "^([-+])=(" + core_pnum + ")", "i" ), 4.6539 + elemdisplay = {}, 4.6540 + 4.6541 + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, 4.6542 + cssNormalTransform = { 4.6543 + letterSpacing: 0, 4.6544 + fontWeight: 400 4.6545 + }, 4.6546 + 4.6547 + cssExpand = [ "Top", "Right", "Bottom", "Left" ], 4.6548 + cssPrefixes = [ "Webkit", "O", "Moz", "ms" ], 4.6549 + 4.6550 + eventsToggle = jQuery.fn.toggle; 4.6551 + 4.6552 +// return a css property mapped to a potentially vendor prefixed property 4.6553 +function vendorPropName( style, name ) { 4.6554 + 4.6555 + // shortcut for names that are not vendor prefixed 4.6556 + if ( name in style ) { 4.6557 + return name; 4.6558 + } 4.6559 + 4.6560 + // check for vendor prefixed names 4.6561 + var capName = name.charAt(0).toUpperCase() + name.slice(1), 4.6562 + origName = name, 4.6563 + i = cssPrefixes.length; 4.6564 + 4.6565 + while ( i-- ) { 4.6566 + name = cssPrefixes[ i ] + capName; 4.6567 + if ( name in style ) { 4.6568 + return name; 4.6569 + } 4.6570 + } 4.6571 + 4.6572 + return origName; 4.6573 +} 4.6574 + 4.6575 +function isHidden( elem, el ) { 4.6576 + elem = el || elem; 4.6577 + return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); 4.6578 +} 4.6579 + 4.6580 +function showHide( elements, show ) { 4.6581 + var elem, display, 4.6582 + values = [], 4.6583 + index = 0, 4.6584 + length = elements.length; 4.6585 + 4.6586 + for ( ; index < length; index++ ) { 4.6587 + elem = elements[ index ]; 4.6588 + if ( !elem.style ) { 4.6589 + continue; 4.6590 + } 4.6591 + values[ index ] = jQuery._data( elem, "olddisplay" ); 4.6592 + if ( show ) { 4.6593 + // Reset the inline display of this element to learn if it is 4.6594 + // being hidden by cascaded rules or not 4.6595 + if ( !values[ index ] && elem.style.display === "none" ) { 4.6596 + elem.style.display = ""; 4.6597 + } 4.6598 + 4.6599 + // Set elements which have been overridden with display: none 4.6600 + // in a stylesheet to whatever the default browser style is 4.6601 + // for such an element 4.6602 + if ( elem.style.display === "" && isHidden( elem ) ) { 4.6603 + values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); 4.6604 + } 4.6605 + } else { 4.6606 + display = curCSS( elem, "display" ); 4.6607 + 4.6608 + if ( !values[ index ] && display !== "none" ) { 4.6609 + jQuery._data( elem, "olddisplay", display ); 4.6610 + } 4.6611 + } 4.6612 + } 4.6613 + 4.6614 + // Set the display of most of the elements in a second loop 4.6615 + // to avoid the constant reflow 4.6616 + for ( index = 0; index < length; index++ ) { 4.6617 + elem = elements[ index ]; 4.6618 + if ( !elem.style ) { 4.6619 + continue; 4.6620 + } 4.6621 + if ( !show || elem.style.display === "none" || elem.style.display === "" ) { 4.6622 + elem.style.display = show ? values[ index ] || "" : "none"; 4.6623 + } 4.6624 + } 4.6625 + 4.6626 + return elements; 4.6627 +} 4.6628 + 4.6629 +jQuery.fn.extend({ 4.6630 + css: function( name, value ) { 4.6631 + return jQuery.access( this, function( elem, name, value ) { 4.6632 + return value !== undefined ? 4.6633 + jQuery.style( elem, name, value ) : 4.6634 + jQuery.css( elem, name ); 4.6635 + }, name, value, arguments.length > 1 ); 4.6636 + }, 4.6637 + show: function() { 4.6638 + return showHide( this, true ); 4.6639 + }, 4.6640 + hide: function() { 4.6641 + return showHide( this ); 4.6642 + }, 4.6643 + toggle: function( state, fn2 ) { 4.6644 + var bool = typeof state === "boolean"; 4.6645 + 4.6646 + if ( jQuery.isFunction( state ) && jQuery.isFunction( fn2 ) ) { 4.6647 + return eventsToggle.apply( this, arguments ); 4.6648 + } 4.6649 + 4.6650 + return this.each(function() { 4.6651 + if ( bool ? state : isHidden( this ) ) { 4.6652 + jQuery( this ).show(); 4.6653 + } else { 4.6654 + jQuery( this ).hide(); 4.6655 + } 4.6656 + }); 4.6657 + } 4.6658 +}); 4.6659 + 4.6660 +jQuery.extend({ 4.6661 + // Add in style property hooks for overriding the default 4.6662 + // behavior of getting and setting a style property 4.6663 + cssHooks: { 4.6664 + opacity: { 4.6665 + get: function( elem, computed ) { 4.6666 + if ( computed ) { 4.6667 + // We should always get a number back from opacity 4.6668 + var ret = curCSS( elem, "opacity" ); 4.6669 + return ret === "" ? "1" : ret; 4.6670 + 4.6671 + } 4.6672 + } 4.6673 + } 4.6674 + }, 4.6675 + 4.6676 + // Exclude the following css properties to add px 4.6677 + cssNumber: { 4.6678 + "fillOpacity": true, 4.6679 + "fontWeight": true, 4.6680 + "lineHeight": true, 4.6681 + "opacity": true, 4.6682 + "orphans": true, 4.6683 + "widows": true, 4.6684 + "zIndex": true, 4.6685 + "zoom": true 4.6686 + }, 4.6687 + 4.6688 + // Add in properties whose names you wish to fix before 4.6689 + // setting or getting the value 4.6690 + cssProps: { 4.6691 + // normalize float css property 4.6692 + "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" 4.6693 + }, 4.6694 + 4.6695 + // Get and set the style property on a DOM Node 4.6696 + style: function( elem, name, value, extra ) { 4.6697 + // Don't set styles on text and comment nodes 4.6698 + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { 4.6699 + return; 4.6700 + } 4.6701 + 4.6702 + // Make sure that we're working with the right name 4.6703 + var ret, type, hooks, 4.6704 + origName = jQuery.camelCase( name ), 4.6705 + style = elem.style; 4.6706 + 4.6707 + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); 4.6708 + 4.6709 + // gets hook for the prefixed version 4.6710 + // followed by the unprefixed version 4.6711 + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; 4.6712 + 4.6713 + // Check if we're setting a value 4.6714 + if ( value !== undefined ) { 4.6715 + type = typeof value; 4.6716 + 4.6717 + // convert relative number strings (+= or -=) to relative numbers. #7345 4.6718 + if ( type === "string" && (ret = rrelNum.exec( value )) ) { 4.6719 + value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); 4.6720 + // Fixes bug #9237 4.6721 + type = "number"; 4.6722 + } 4.6723 + 4.6724 + // Make sure that NaN and null values aren't set. See: #7116 4.6725 + if ( value == null || type === "number" && isNaN( value ) ) { 4.6726 + return; 4.6727 + } 4.6728 + 4.6729 + // If a number was passed in, add 'px' to the (except for certain CSS properties) 4.6730 + if ( type === "number" && !jQuery.cssNumber[ origName ] ) { 4.6731 + value += "px"; 4.6732 + } 4.6733 + 4.6734 + // If a hook was provided, use that value, otherwise just set the specified value 4.6735 + if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { 4.6736 + // Wrapped to prevent IE from throwing errors when 'invalid' values are provided 4.6737 + // Fixes bug #5509 4.6738 + try { 4.6739 + style[ name ] = value; 4.6740 + } catch(e) {} 4.6741 + } 4.6742 + 4.6743 + } else { 4.6744 + // If a hook was provided get the non-computed value from there 4.6745 + if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { 4.6746 + return ret; 4.6747 + } 4.6748 + 4.6749 + // Otherwise just get the value from the style object 4.6750 + return style[ name ]; 4.6751 + } 4.6752 + }, 4.6753 + 4.6754 + css: function( elem, name, numeric, extra ) { 4.6755 + var val, num, hooks, 4.6756 + origName = jQuery.camelCase( name ); 4.6757 + 4.6758 + // Make sure that we're working with the right name 4.6759 + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); 4.6760 + 4.6761 + // gets hook for the prefixed version 4.6762 + // followed by the unprefixed version 4.6763 + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; 4.6764 + 4.6765 + // If a hook was provided get the computed value from there 4.6766 + if ( hooks && "get" in hooks ) { 4.6767 + val = hooks.get( elem, true, extra ); 4.6768 + } 4.6769 + 4.6770 + // Otherwise, if a way to get the computed value exists, use that 4.6771 + if ( val === undefined ) { 4.6772 + val = curCSS( elem, name ); 4.6773 + } 4.6774 + 4.6775 + //convert "normal" to computed value 4.6776 + if ( val === "normal" && name in cssNormalTransform ) { 4.6777 + val = cssNormalTransform[ name ]; 4.6778 + } 4.6779 + 4.6780 + // Return, converting to number if forced or a qualifier was provided and val looks numeric 4.6781 + if ( numeric || extra !== undefined ) { 4.6782 + num = parseFloat( val ); 4.6783 + return numeric || jQuery.isNumeric( num ) ? num || 0 : val; 4.6784 + } 4.6785 + return val; 4.6786 + }, 4.6787 + 4.6788 + // A method for quickly swapping in/out CSS properties to get correct calculations 4.6789 + swap: function( elem, options, callback ) { 4.6790 + var ret, name, 4.6791 + old = {}; 4.6792 + 4.6793 + // Remember the old values, and insert the new ones 4.6794 + for ( name in options ) { 4.6795 + old[ name ] = elem.style[ name ]; 4.6796 + elem.style[ name ] = options[ name ]; 4.6797 + } 4.6798 + 4.6799 + ret = callback.call( elem ); 4.6800 + 4.6801 + // Revert the old values 4.6802 + for ( name in options ) { 4.6803 + elem.style[ name ] = old[ name ]; 4.6804 + } 4.6805 + 4.6806 + return ret; 4.6807 + } 4.6808 +}); 4.6809 + 4.6810 +// NOTE: To any future maintainer, we've window.getComputedStyle 4.6811 +// because jsdom on node.js will break without it. 4.6812 +if ( window.getComputedStyle ) { 4.6813 + curCSS = function( elem, name ) { 4.6814 + var ret, width, minWidth, maxWidth, 4.6815 + computed = window.getComputedStyle( elem, null ), 4.6816 + style = elem.style; 4.6817 + 4.6818 + if ( computed ) { 4.6819 + 4.6820 + ret = computed[ name ]; 4.6821 + if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { 4.6822 + ret = jQuery.style( elem, name ); 4.6823 + } 4.6824 + 4.6825 + // A tribute to the "awesome hack by Dean Edwards" 4.6826 + // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right 4.6827 + // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels 4.6828 + // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values 4.6829 + if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { 4.6830 + width = style.width; 4.6831 + minWidth = style.minWidth; 4.6832 + maxWidth = style.maxWidth; 4.6833 + 4.6834 + style.minWidth = style.maxWidth = style.width = ret; 4.6835 + ret = computed.width; 4.6836 + 4.6837 + style.width = width; 4.6838 + style.minWidth = minWidth; 4.6839 + style.maxWidth = maxWidth; 4.6840 + } 4.6841 + } 4.6842 + 4.6843 + return ret; 4.6844 + }; 4.6845 +} else if ( document.documentElement.currentStyle ) { 4.6846 + curCSS = function( elem, name ) { 4.6847 + var left, rsLeft, 4.6848 + ret = elem.currentStyle && elem.currentStyle[ name ], 4.6849 + style = elem.style; 4.6850 + 4.6851 + // Avoid setting ret to empty string here 4.6852 + // so we don't default to auto 4.6853 + if ( ret == null && style && style[ name ] ) { 4.6854 + ret = style[ name ]; 4.6855 + } 4.6856 + 4.6857 + // From the awesome hack by Dean Edwards 4.6858 + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 4.6859 + 4.6860 + // If we're not dealing with a regular pixel number 4.6861 + // but a number that has a weird ending, we need to convert it to pixels 4.6862 + // but not position css attributes, as those are proportional to the parent element instead 4.6863 + // and we can't measure the parent instead because it might trigger a "stacking dolls" problem 4.6864 + if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { 4.6865 + 4.6866 + // Remember the original values 4.6867 + left = style.left; 4.6868 + rsLeft = elem.runtimeStyle && elem.runtimeStyle.left; 4.6869 + 4.6870 + // Put in the new values to get a computed value out 4.6871 + if ( rsLeft ) { 4.6872 + elem.runtimeStyle.left = elem.currentStyle.left; 4.6873 + } 4.6874 + style.left = name === "fontSize" ? "1em" : ret; 4.6875 + ret = style.pixelLeft + "px"; 4.6876 + 4.6877 + // Revert the changed values 4.6878 + style.left = left; 4.6879 + if ( rsLeft ) { 4.6880 + elem.runtimeStyle.left = rsLeft; 4.6881 + } 4.6882 + } 4.6883 + 4.6884 + return ret === "" ? "auto" : ret; 4.6885 + }; 4.6886 +} 4.6887 + 4.6888 +function setPositiveNumber( elem, value, subtract ) { 4.6889 + var matches = rnumsplit.exec( value ); 4.6890 + return matches ? 4.6891 + Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : 4.6892 + value; 4.6893 +} 4.6894 + 4.6895 +function augmentWidthOrHeight( elem, name, extra, isBorderBox ) { 4.6896 + var i = extra === ( isBorderBox ? "border" : "content" ) ? 4.6897 + // If we already have the right measurement, avoid augmentation 4.6898 + 4 : 4.6899 + // Otherwise initialize for horizontal or vertical properties 4.6900 + name === "width" ? 1 : 0, 4.6901 + 4.6902 + val = 0; 4.6903 + 4.6904 + for ( ; i < 4; i += 2 ) { 4.6905 + // both box models exclude margin, so add it if we want it 4.6906 + if ( extra === "margin" ) { 4.6907 + // we use jQuery.css instead of curCSS here 4.6908 + // because of the reliableMarginRight CSS hook! 4.6909 + val += jQuery.css( elem, extra + cssExpand[ i ], true ); 4.6910 + } 4.6911 + 4.6912 + // From this point on we use curCSS for maximum performance (relevant in animations) 4.6913 + if ( isBorderBox ) { 4.6914 + // border-box includes padding, so remove it if we want content 4.6915 + if ( extra === "content" ) { 4.6916 + val -= parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0; 4.6917 + } 4.6918 + 4.6919 + // at this point, extra isn't border nor margin, so remove border 4.6920 + if ( extra !== "margin" ) { 4.6921 + val -= parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; 4.6922 + } 4.6923 + } else { 4.6924 + // at this point, extra isn't content, so add padding 4.6925 + val += parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0; 4.6926 + 4.6927 + // at this point, extra isn't content nor padding, so add border 4.6928 + if ( extra !== "padding" ) { 4.6929 + val += parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; 4.6930 + } 4.6931 + } 4.6932 + } 4.6933 + 4.6934 + return val; 4.6935 +} 4.6936 + 4.6937 +function getWidthOrHeight( elem, name, extra ) { 4.6938 + 4.6939 + // Start with offset property, which is equivalent to the border-box value 4.6940 + var val = name === "width" ? elem.offsetWidth : elem.offsetHeight, 4.6941 + valueIsBorderBox = true, 4.6942 + isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box"; 4.6943 + 4.6944 + // some non-html elements return undefined for offsetWidth, so check for null/undefined 4.6945 + // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 4.6946 + // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 4.6947 + if ( val <= 0 || val == null ) { 4.6948 + // Fall back to computed then uncomputed css if necessary 4.6949 + val = curCSS( elem, name ); 4.6950 + if ( val < 0 || val == null ) { 4.6951 + val = elem.style[ name ]; 4.6952 + } 4.6953 + 4.6954 + // Computed unit is not pixels. Stop here and return. 4.6955 + if ( rnumnonpx.test(val) ) { 4.6956 + return val; 4.6957 + } 4.6958 + 4.6959 + // we need the check for style in case a browser which returns unreliable values 4.6960 + // for getComputedStyle silently falls back to the reliable elem.style 4.6961 + valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); 4.6962 + 4.6963 + // Normalize "", auto, and prepare for extra 4.6964 + val = parseFloat( val ) || 0; 4.6965 + } 4.6966 + 4.6967 + // use the active box-sizing model to add/subtract irrelevant styles 4.6968 + return ( val + 4.6969 + augmentWidthOrHeight( 4.6970 + elem, 4.6971 + name, 4.6972 + extra || ( isBorderBox ? "border" : "content" ), 4.6973 + valueIsBorderBox 4.6974 + ) 4.6975 + ) + "px"; 4.6976 +} 4.6977 + 4.6978 + 4.6979 +// Try to determine the default display value of an element 4.6980 +function css_defaultDisplay( nodeName ) { 4.6981 + if ( elemdisplay[ nodeName ] ) { 4.6982 + return elemdisplay[ nodeName ]; 4.6983 + } 4.6984 + 4.6985 + var elem = jQuery( "<" + nodeName + ">" ).appendTo( document.body ), 4.6986 + display = elem.css("display"); 4.6987 + elem.remove(); 4.6988 + 4.6989 + // If the simple way fails, 4.6990 + // get element's real default display by attaching it to a temp iframe 4.6991 + if ( display === "none" || display === "" ) { 4.6992 + // Use the already-created iframe if possible 4.6993 + iframe = document.body.appendChild( 4.6994 + iframe || jQuery.extend( document.createElement("iframe"), { 4.6995 + frameBorder: 0, 4.6996 + width: 0, 4.6997 + height: 0 4.6998 + }) 4.6999 + ); 4.7000 + 4.7001 + // Create a cacheable copy of the iframe document on first call. 4.7002 + // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML 4.7003 + // document to it; WebKit & Firefox won't allow reusing the iframe document. 4.7004 + if ( !iframeDoc || !iframe.createElement ) { 4.7005 + iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document; 4.7006 + iframeDoc.write("<!doctype html><html><body>"); 4.7007 + iframeDoc.close(); 4.7008 + } 4.7009 + 4.7010 + elem = iframeDoc.body.appendChild( iframeDoc.createElement(nodeName) ); 4.7011 + 4.7012 + display = curCSS( elem, "display" ); 4.7013 + document.body.removeChild( iframe ); 4.7014 + } 4.7015 + 4.7016 + // Store the correct default display 4.7017 + elemdisplay[ nodeName ] = display; 4.7018 + 4.7019 + return display; 4.7020 +} 4.7021 + 4.7022 +jQuery.each([ "height", "width" ], function( i, name ) { 4.7023 + jQuery.cssHooks[ name ] = { 4.7024 + get: function( elem, computed, extra ) { 4.7025 + if ( computed ) { 4.7026 + // certain elements can have dimension info if we invisibly show them 4.7027 + // however, it must have a current display style that would benefit from this 4.7028 + if ( elem.offsetWidth === 0 && rdisplayswap.test( curCSS( elem, "display" ) ) ) { 4.7029 + return jQuery.swap( elem, cssShow, function() { 4.7030 + return getWidthOrHeight( elem, name, extra ); 4.7031 + }); 4.7032 + } else { 4.7033 + return getWidthOrHeight( elem, name, extra ); 4.7034 + } 4.7035 + } 4.7036 + }, 4.7037 + 4.7038 + set: function( elem, value, extra ) { 4.7039 + return setPositiveNumber( elem, value, extra ? 4.7040 + augmentWidthOrHeight( 4.7041 + elem, 4.7042 + name, 4.7043 + extra, 4.7044 + jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box" 4.7045 + ) : 0 4.7046 + ); 4.7047 + } 4.7048 + }; 4.7049 +}); 4.7050 + 4.7051 +if ( !jQuery.support.opacity ) { 4.7052 + jQuery.cssHooks.opacity = { 4.7053 + get: function( elem, computed ) { 4.7054 + // IE uses filters for opacity 4.7055 + return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? 4.7056 + ( 0.01 * parseFloat( RegExp.$1 ) ) + "" : 4.7057 + computed ? "1" : ""; 4.7058 + }, 4.7059 + 4.7060 + set: function( elem, value ) { 4.7061 + var style = elem.style, 4.7062 + currentStyle = elem.currentStyle, 4.7063 + opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", 4.7064 + filter = currentStyle && currentStyle.filter || style.filter || ""; 4.7065 + 4.7066 + // IE has trouble with opacity if it does not have layout 4.7067 + // Force it by setting the zoom level 4.7068 + style.zoom = 1; 4.7069 + 4.7070 + // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 4.7071 + if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" && 4.7072 + style.removeAttribute ) { 4.7073 + 4.7074 + // Setting style.filter to null, "" & " " still leave "filter:" in the cssText 4.7075 + // if "filter:" is present at all, clearType is disabled, we want to avoid this 4.7076 + // style.removeAttribute is IE Only, but so apparently is this code path... 4.7077 + style.removeAttribute( "filter" ); 4.7078 + 4.7079 + // if there there is no filter style applied in a css rule, we are done 4.7080 + if ( currentStyle && !currentStyle.filter ) { 4.7081 + return; 4.7082 + } 4.7083 + } 4.7084 + 4.7085 + // otherwise, set new filter values 4.7086 + style.filter = ralpha.test( filter ) ? 4.7087 + filter.replace( ralpha, opacity ) : 4.7088 + filter + " " + opacity; 4.7089 + } 4.7090 + }; 4.7091 +} 4.7092 + 4.7093 +// These hooks cannot be added until DOM ready because the support test 4.7094 +// for it is not run until after DOM ready 4.7095 +jQuery(function() { 4.7096 + if ( !jQuery.support.reliableMarginRight ) { 4.7097 + jQuery.cssHooks.marginRight = { 4.7098 + get: function( elem, computed ) { 4.7099 + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right 4.7100 + // Work around by temporarily setting element display to inline-block 4.7101 + return jQuery.swap( elem, { "display": "inline-block" }, function() { 4.7102 + if ( computed ) { 4.7103 + return curCSS( elem, "marginRight" ); 4.7104 + } 4.7105 + }); 4.7106 + } 4.7107 + }; 4.7108 + } 4.7109 + 4.7110 + // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 4.7111 + // getComputedStyle returns percent when specified for top/left/bottom/right 4.7112 + // rather than make the css module depend on the offset module, we just check for it here 4.7113 + if ( !jQuery.support.pixelPosition && jQuery.fn.position ) { 4.7114 + jQuery.each( [ "top", "left" ], function( i, prop ) { 4.7115 + jQuery.cssHooks[ prop ] = { 4.7116 + get: function( elem, computed ) { 4.7117 + if ( computed ) { 4.7118 + var ret = curCSS( elem, prop ); 4.7119 + // if curCSS returns percentage, fallback to offset 4.7120 + return rnumnonpx.test( ret ) ? jQuery( elem ).position()[ prop ] + "px" : ret; 4.7121 + } 4.7122 + } 4.7123 + }; 4.7124 + }); 4.7125 + } 4.7126 + 4.7127 +}); 4.7128 + 4.7129 +if ( jQuery.expr && jQuery.expr.filters ) { 4.7130 + jQuery.expr.filters.hidden = function( elem ) { 4.7131 + return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || curCSS( elem, "display" )) === "none"); 4.7132 + }; 4.7133 + 4.7134 + jQuery.expr.filters.visible = function( elem ) { 4.7135 + return !jQuery.expr.filters.hidden( elem ); 4.7136 + }; 4.7137 +} 4.7138 + 4.7139 +// These hooks are used by animate to expand properties 4.7140 +jQuery.each({ 4.7141 + margin: "", 4.7142 + padding: "", 4.7143 + border: "Width" 4.7144 +}, function( prefix, suffix ) { 4.7145 + jQuery.cssHooks[ prefix + suffix ] = { 4.7146 + expand: function( value ) { 4.7147 + var i, 4.7148 + 4.7149 + // assumes a single number if not a string 4.7150 + parts = typeof value === "string" ? value.split(" ") : [ value ], 4.7151 + expanded = {}; 4.7152 + 4.7153 + for ( i = 0; i < 4; i++ ) { 4.7154 + expanded[ prefix + cssExpand[ i ] + suffix ] = 4.7155 + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; 4.7156 + } 4.7157 + 4.7158 + return expanded; 4.7159 + } 4.7160 + }; 4.7161 + 4.7162 + if ( !rmargin.test( prefix ) ) { 4.7163 + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; 4.7164 + } 4.7165 +}); 4.7166 +var r20 = /%20/g, 4.7167 + rbracket = /\[\]$/, 4.7168 + rCRLF = /\r?\n/g, 4.7169 + rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, 4.7170 + rselectTextarea = /^(?:select|textarea)/i; 4.7171 + 4.7172 +jQuery.fn.extend({ 4.7173 + serialize: function() { 4.7174 + return jQuery.param( this.serializeArray() ); 4.7175 + }, 4.7176 + serializeArray: function() { 4.7177 + return this.map(function(){ 4.7178 + return this.elements ? jQuery.makeArray( this.elements ) : this; 4.7179 + }) 4.7180 + .filter(function(){ 4.7181 + return this.name && !this.disabled && 4.7182 + ( this.checked || rselectTextarea.test( this.nodeName ) || 4.7183 + rinput.test( this.type ) ); 4.7184 + }) 4.7185 + .map(function( i, elem ){ 4.7186 + var val = jQuery( this ).val(); 4.7187 + 4.7188 + return val == null ? 4.7189 + null : 4.7190 + jQuery.isArray( val ) ? 4.7191 + jQuery.map( val, function( val, i ){ 4.7192 + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; 4.7193 + }) : 4.7194 + { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; 4.7195 + }).get(); 4.7196 + } 4.7197 +}); 4.7198 + 4.7199 +//Serialize an array of form elements or a set of 4.7200 +//key/values into a query string 4.7201 +jQuery.param = function( a, traditional ) { 4.7202 + var prefix, 4.7203 + s = [], 4.7204 + add = function( key, value ) { 4.7205 + // If value is a function, invoke it and return its value 4.7206 + value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); 4.7207 + s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); 4.7208 + }; 4.7209 + 4.7210 + // Set traditional to true for jQuery <= 1.3.2 behavior. 4.7211 + if ( traditional === undefined ) { 4.7212 + traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; 4.7213 + } 4.7214 + 4.7215 + // If an array was passed in, assume that it is an array of form elements. 4.7216 + if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { 4.7217 + // Serialize the form elements 4.7218 + jQuery.each( a, function() { 4.7219 + add( this.name, this.value ); 4.7220 + }); 4.7221 + 4.7222 + } else { 4.7223 + // If traditional, encode the "old" way (the way 1.3.2 or older 4.7224 + // did it), otherwise encode params recursively. 4.7225 + for ( prefix in a ) { 4.7226 + buildParams( prefix, a[ prefix ], traditional, add ); 4.7227 + } 4.7228 + } 4.7229 + 4.7230 + // Return the resulting serialization 4.7231 + return s.join( "&" ).replace( r20, "+" ); 4.7232 +}; 4.7233 + 4.7234 +function buildParams( prefix, obj, traditional, add ) { 4.7235 + var name; 4.7236 + 4.7237 + if ( jQuery.isArray( obj ) ) { 4.7238 + // Serialize array item. 4.7239 + jQuery.each( obj, function( i, v ) { 4.7240 + if ( traditional || rbracket.test( prefix ) ) { 4.7241 + // Treat each array item as a scalar. 4.7242 + add( prefix, v ); 4.7243 + 4.7244 + } else { 4.7245 + // If array item is non-scalar (array or object), encode its 4.7246 + // numeric index to resolve deserialization ambiguity issues. 4.7247 + // Note that rack (as of 1.0.0) can't currently deserialize 4.7248 + // nested arrays properly, and attempting to do so may cause 4.7249 + // a server error. Possible fixes are to modify rack's 4.7250 + // deserialization algorithm or to provide an option or flag 4.7251 + // to force array serialization to be shallow. 4.7252 + buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); 4.7253 + } 4.7254 + }); 4.7255 + 4.7256 + } else if ( !traditional && jQuery.type( obj ) === "object" ) { 4.7257 + // Serialize object item. 4.7258 + for ( name in obj ) { 4.7259 + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); 4.7260 + } 4.7261 + 4.7262 + } else { 4.7263 + // Serialize scalar item. 4.7264 + add( prefix, obj ); 4.7265 + } 4.7266 +} 4.7267 +var 4.7268 + // Document location 4.7269 + ajaxLocParts, 4.7270 + ajaxLocation, 4.7271 + 4.7272 + rhash = /#.*$/, 4.7273 + rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL 4.7274 + // #7653, #8125, #8152: local protocol detection 4.7275 + rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, 4.7276 + rnoContent = /^(?:GET|HEAD)$/, 4.7277 + rprotocol = /^\/\//, 4.7278 + rquery = /\?/, 4.7279 + rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, 4.7280 + rts = /([?&])_=[^&]*/, 4.7281 + rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, 4.7282 + 4.7283 + // Keep a copy of the old load method 4.7284 + _load = jQuery.fn.load, 4.7285 + 4.7286 + /* Prefilters 4.7287 + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) 4.7288 + * 2) These are called: 4.7289 + * - BEFORE asking for a transport 4.7290 + * - AFTER param serialization (s.data is a string if s.processData is true) 4.7291 + * 3) key is the dataType 4.7292 + * 4) the catchall symbol "*" can be used 4.7293 + * 5) execution will start with transport dataType and THEN continue down to "*" if needed 4.7294 + */ 4.7295 + prefilters = {}, 4.7296 + 4.7297 + /* Transports bindings 4.7298 + * 1) key is the dataType 4.7299 + * 2) the catchall symbol "*" can be used 4.7300 + * 3) selection will start with transport dataType and THEN go to "*" if needed 4.7301 + */ 4.7302 + transports = {}, 4.7303 + 4.7304 + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression 4.7305 + allTypes = ["*/"] + ["*"]; 4.7306 + 4.7307 +// #8138, IE may throw an exception when accessing 4.7308 +// a field from window.location if document.domain has been set 4.7309 +try { 4.7310 + ajaxLocation = location.href; 4.7311 +} catch( e ) { 4.7312 + // Use the href attribute of an A element 4.7313 + // since IE will modify it given document.location 4.7314 + ajaxLocation = document.createElement( "a" ); 4.7315 + ajaxLocation.href = ""; 4.7316 + ajaxLocation = ajaxLocation.href; 4.7317 +} 4.7318 + 4.7319 +// Segment location into parts 4.7320 +ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; 4.7321 + 4.7322 +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport 4.7323 +function addToPrefiltersOrTransports( structure ) { 4.7324 + 4.7325 + // dataTypeExpression is optional and defaults to "*" 4.7326 + return function( dataTypeExpression, func ) { 4.7327 + 4.7328 + if ( typeof dataTypeExpression !== "string" ) { 4.7329 + func = dataTypeExpression; 4.7330 + dataTypeExpression = "*"; 4.7331 + } 4.7332 + 4.7333 + var dataType, list, placeBefore, 4.7334 + dataTypes = dataTypeExpression.toLowerCase().split( core_rspace ), 4.7335 + i = 0, 4.7336 + length = dataTypes.length; 4.7337 + 4.7338 + if ( jQuery.isFunction( func ) ) { 4.7339 + // For each dataType in the dataTypeExpression 4.7340 + for ( ; i < length; i++ ) { 4.7341 + dataType = dataTypes[ i ]; 4.7342 + // We control if we're asked to add before 4.7343 + // any existing element 4.7344 + placeBefore = /^\+/.test( dataType ); 4.7345 + if ( placeBefore ) { 4.7346 + dataType = dataType.substr( 1 ) || "*"; 4.7347 + } 4.7348 + list = structure[ dataType ] = structure[ dataType ] || []; 4.7349 + // then we add to the structure accordingly 4.7350 + list[ placeBefore ? "unshift" : "push" ]( func ); 4.7351 + } 4.7352 + } 4.7353 + }; 4.7354 +} 4.7355 + 4.7356 +// Base inspection function for prefilters and transports 4.7357 +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, 4.7358 + dataType /* internal */, inspected /* internal */ ) { 4.7359 + 4.7360 + dataType = dataType || options.dataTypes[ 0 ]; 4.7361 + inspected = inspected || {}; 4.7362 + 4.7363 + inspected[ dataType ] = true; 4.7364 + 4.7365 + var selection, 4.7366 + list = structure[ dataType ], 4.7367 + i = 0, 4.7368 + length = list ? list.length : 0, 4.7369 + executeOnly = ( structure === prefilters ); 4.7370 + 4.7371 + for ( ; i < length && ( executeOnly || !selection ); i++ ) { 4.7372 + selection = list[ i ]( options, originalOptions, jqXHR ); 4.7373 + // If we got redirected to another dataType 4.7374 + // we try there if executing only and not done already 4.7375 + if ( typeof selection === "string" ) { 4.7376 + if ( !executeOnly || inspected[ selection ] ) { 4.7377 + selection = undefined; 4.7378 + } else { 4.7379 + options.dataTypes.unshift( selection ); 4.7380 + selection = inspectPrefiltersOrTransports( 4.7381 + structure, options, originalOptions, jqXHR, selection, inspected ); 4.7382 + } 4.7383 + } 4.7384 + } 4.7385 + // If we're only executing or nothing was selected 4.7386 + // we try the catchall dataType if not done already 4.7387 + if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) { 4.7388 + selection = inspectPrefiltersOrTransports( 4.7389 + structure, options, originalOptions, jqXHR, "*", inspected ); 4.7390 + } 4.7391 + // unnecessary when only executing (prefilters) 4.7392 + // but it'll be ignored by the caller in that case 4.7393 + return selection; 4.7394 +} 4.7395 + 4.7396 +// A special extend for ajax options 4.7397 +// that takes "flat" options (not to be deep extended) 4.7398 +// Fixes #9887 4.7399 +function ajaxExtend( target, src ) { 4.7400 + var key, deep, 4.7401 + flatOptions = jQuery.ajaxSettings.flatOptions || {}; 4.7402 + for ( key in src ) { 4.7403 + if ( src[ key ] !== undefined ) { 4.7404 + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; 4.7405 + } 4.7406 + } 4.7407 + if ( deep ) { 4.7408 + jQuery.extend( true, target, deep ); 4.7409 + } 4.7410 +} 4.7411 + 4.7412 +jQuery.fn.load = function( url, params, callback ) { 4.7413 + if ( typeof url !== "string" && _load ) { 4.7414 + return _load.apply( this, arguments ); 4.7415 + } 4.7416 + 4.7417 + // Don't do a request if no elements are being requested 4.7418 + if ( !this.length ) { 4.7419 + return this; 4.7420 + } 4.7421 + 4.7422 + var selector, type, response, 4.7423 + self = this, 4.7424 + off = url.indexOf(" "); 4.7425 + 4.7426 + if ( off >= 0 ) { 4.7427 + selector = url.slice( off, url.length ); 4.7428 + url = url.slice( 0, off ); 4.7429 + } 4.7430 + 4.7431 + // If it's a function 4.7432 + if ( jQuery.isFunction( params ) ) { 4.7433 + 4.7434 + // We assume that it's the callback 4.7435 + callback = params; 4.7436 + params = undefined; 4.7437 + 4.7438 + // Otherwise, build a param string 4.7439 + } else if ( params && typeof params === "object" ) { 4.7440 + type = "POST"; 4.7441 + } 4.7442 + 4.7443 + // Request the remote document 4.7444 + jQuery.ajax({ 4.7445 + url: url, 4.7446 + 4.7447 + // if "type" variable is undefined, then "GET" method will be used 4.7448 + type: type, 4.7449 + dataType: "html", 4.7450 + data: params, 4.7451 + complete: function( jqXHR, status ) { 4.7452 + if ( callback ) { 4.7453 + self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); 4.7454 + } 4.7455 + } 4.7456 + }).done(function( responseText ) { 4.7457 + 4.7458 + // Save response for use in complete callback 4.7459 + response = arguments; 4.7460 + 4.7461 + // See if a selector was specified 4.7462 + self.html( selector ? 4.7463 + 4.7464 + // Create a dummy div to hold the results 4.7465 + jQuery("<div>") 4.7466 + 4.7467 + // inject the contents of the document in, removing the scripts 4.7468 + // to avoid any 'Permission Denied' errors in IE 4.7469 + .append( responseText.replace( rscript, "" ) ) 4.7470 + 4.7471 + // Locate the specified elements 4.7472 + .find( selector ) : 4.7473 + 4.7474 + // If not, just inject the full result 4.7475 + responseText ); 4.7476 + 4.7477 + }); 4.7478 + 4.7479 + return this; 4.7480 +}; 4.7481 + 4.7482 +// Attach a bunch of functions for handling common AJAX events 4.7483 +jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){ 4.7484 + jQuery.fn[ o ] = function( f ){ 4.7485 + return this.on( o, f ); 4.7486 + }; 4.7487 +}); 4.7488 + 4.7489 +jQuery.each( [ "get", "post" ], function( i, method ) { 4.7490 + jQuery[ method ] = function( url, data, callback, type ) { 4.7491 + // shift arguments if data argument was omitted 4.7492 + if ( jQuery.isFunction( data ) ) { 4.7493 + type = type || callback; 4.7494 + callback = data; 4.7495 + data = undefined; 4.7496 + } 4.7497 + 4.7498 + return jQuery.ajax({ 4.7499 + type: method, 4.7500 + url: url, 4.7501 + data: data, 4.7502 + success: callback, 4.7503 + dataType: type 4.7504 + }); 4.7505 + }; 4.7506 +}); 4.7507 + 4.7508 +jQuery.extend({ 4.7509 + 4.7510 + getScript: function( url, callback ) { 4.7511 + return jQuery.get( url, undefined, callback, "script" ); 4.7512 + }, 4.7513 + 4.7514 + getJSON: function( url, data, callback ) { 4.7515 + return jQuery.get( url, data, callback, "json" ); 4.7516 + }, 4.7517 + 4.7518 + // Creates a full fledged settings object into target 4.7519 + // with both ajaxSettings and settings fields. 4.7520 + // If target is omitted, writes into ajaxSettings. 4.7521 + ajaxSetup: function( target, settings ) { 4.7522 + if ( settings ) { 4.7523 + // Building a settings object 4.7524 + ajaxExtend( target, jQuery.ajaxSettings ); 4.7525 + } else { 4.7526 + // Extending ajaxSettings 4.7527 + settings = target; 4.7528 + target = jQuery.ajaxSettings; 4.7529 + } 4.7530 + ajaxExtend( target, settings ); 4.7531 + return target; 4.7532 + }, 4.7533 + 4.7534 + ajaxSettings: { 4.7535 + url: ajaxLocation, 4.7536 + isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), 4.7537 + global: true, 4.7538 + type: "GET", 4.7539 + contentType: "application/x-www-form-urlencoded; charset=UTF-8", 4.7540 + processData: true, 4.7541 + async: true, 4.7542 + /* 4.7543 + timeout: 0, 4.7544 + data: null, 4.7545 + dataType: null, 4.7546 + username: null, 4.7547 + password: null, 4.7548 + cache: null, 4.7549 + throws: false, 4.7550 + traditional: false, 4.7551 + headers: {}, 4.7552 + */ 4.7553 + 4.7554 + accepts: { 4.7555 + xml: "application/xml, text/xml", 4.7556 + html: "text/html", 4.7557 + text: "text/plain", 4.7558 + json: "application/json, text/javascript", 4.7559 + "*": allTypes 4.7560 + }, 4.7561 + 4.7562 + contents: { 4.7563 + xml: /xml/, 4.7564 + html: /html/, 4.7565 + json: /json/ 4.7566 + }, 4.7567 + 4.7568 + responseFields: { 4.7569 + xml: "responseXML", 4.7570 + text: "responseText" 4.7571 + }, 4.7572 + 4.7573 + // List of data converters 4.7574 + // 1) key format is "source_type destination_type" (a single space in-between) 4.7575 + // 2) the catchall symbol "*" can be used for source_type 4.7576 + converters: { 4.7577 + 4.7578 + // Convert anything to text 4.7579 + "* text": window.String, 4.7580 + 4.7581 + // Text to html (true = no transformation) 4.7582 + "text html": true, 4.7583 + 4.7584 + // Evaluate text as a json expression 4.7585 + "text json": jQuery.parseJSON, 4.7586 + 4.7587 + // Parse text as xml 4.7588 + "text xml": jQuery.parseXML 4.7589 + }, 4.7590 + 4.7591 + // For options that shouldn't be deep extended: 4.7592 + // you can add your own custom options here if 4.7593 + // and when you create one that shouldn't be 4.7594 + // deep extended (see ajaxExtend) 4.7595 + flatOptions: { 4.7596 + context: true, 4.7597 + url: true 4.7598 + } 4.7599 + }, 4.7600 + 4.7601 + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), 4.7602 + ajaxTransport: addToPrefiltersOrTransports( transports ), 4.7603 + 4.7604 + // Main method 4.7605 + ajax: function( url, options ) { 4.7606 + 4.7607 + // If url is an object, simulate pre-1.5 signature 4.7608 + if ( typeof url === "object" ) { 4.7609 + options = url; 4.7610 + url = undefined; 4.7611 + } 4.7612 + 4.7613 + // Force options to be an object 4.7614 + options = options || {}; 4.7615 + 4.7616 + var // ifModified key 4.7617 + ifModifiedKey, 4.7618 + // Response headers 4.7619 + responseHeadersString, 4.7620 + responseHeaders, 4.7621 + // transport 4.7622 + transport, 4.7623 + // timeout handle 4.7624 + timeoutTimer, 4.7625 + // Cross-domain detection vars 4.7626 + parts, 4.7627 + // To know if global events are to be dispatched 4.7628 + fireGlobals, 4.7629 + // Loop variable 4.7630 + i, 4.7631 + // Create the final options object 4.7632 + s = jQuery.ajaxSetup( {}, options ), 4.7633 + // Callbacks context 4.7634 + callbackContext = s.context || s, 4.7635 + // Context for global events 4.7636 + // It's the callbackContext if one was provided in the options 4.7637 + // and if it's a DOM node or a jQuery collection 4.7638 + globalEventContext = callbackContext !== s && 4.7639 + ( callbackContext.nodeType || callbackContext instanceof jQuery ) ? 4.7640 + jQuery( callbackContext ) : jQuery.event, 4.7641 + // Deferreds 4.7642 + deferred = jQuery.Deferred(), 4.7643 + completeDeferred = jQuery.Callbacks( "once memory" ), 4.7644 + // Status-dependent callbacks 4.7645 + statusCode = s.statusCode || {}, 4.7646 + // Headers (they are sent all at once) 4.7647 + requestHeaders = {}, 4.7648 + requestHeadersNames = {}, 4.7649 + // The jqXHR state 4.7650 + state = 0, 4.7651 + // Default abort message 4.7652 + strAbort = "canceled", 4.7653 + // Fake xhr 4.7654 + jqXHR = { 4.7655 + 4.7656 + readyState: 0, 4.7657 + 4.7658 + // Caches the header 4.7659 + setRequestHeader: function( name, value ) { 4.7660 + if ( !state ) { 4.7661 + var lname = name.toLowerCase(); 4.7662 + name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; 4.7663 + requestHeaders[ name ] = value; 4.7664 + } 4.7665 + return this; 4.7666 + }, 4.7667 + 4.7668 + // Raw string 4.7669 + getAllResponseHeaders: function() { 4.7670 + return state === 2 ? responseHeadersString : null; 4.7671 + }, 4.7672 + 4.7673 + // Builds headers hashtable if needed 4.7674 + getResponseHeader: function( key ) { 4.7675 + var match; 4.7676 + if ( state === 2 ) { 4.7677 + if ( !responseHeaders ) { 4.7678 + responseHeaders = {}; 4.7679 + while( ( match = rheaders.exec( responseHeadersString ) ) ) { 4.7680 + responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; 4.7681 + } 4.7682 + } 4.7683 + match = responseHeaders[ key.toLowerCase() ]; 4.7684 + } 4.7685 + return match === undefined ? null : match; 4.7686 + }, 4.7687 + 4.7688 + // Overrides response content-type header 4.7689 + overrideMimeType: function( type ) { 4.7690 + if ( !state ) { 4.7691 + s.mimeType = type; 4.7692 + } 4.7693 + return this; 4.7694 + }, 4.7695 + 4.7696 + // Cancel the request 4.7697 + abort: function( statusText ) { 4.7698 + statusText = statusText || strAbort; 4.7699 + if ( transport ) { 4.7700 + transport.abort( statusText ); 4.7701 + } 4.7702 + done( 0, statusText ); 4.7703 + return this; 4.7704 + } 4.7705 + }; 4.7706 + 4.7707 + // Callback for when everything is done 4.7708 + // It is defined here because jslint complains if it is declared 4.7709 + // at the end of the function (which would be more logical and readable) 4.7710 + function done( status, nativeStatusText, responses, headers ) { 4.7711 + var isSuccess, success, error, response, modified, 4.7712 + statusText = nativeStatusText; 4.7713 + 4.7714 + // Called once 4.7715 + if ( state === 2 ) { 4.7716 + return; 4.7717 + } 4.7718 + 4.7719 + // State is "done" now 4.7720 + state = 2; 4.7721 + 4.7722 + // Clear timeout if it exists 4.7723 + if ( timeoutTimer ) { 4.7724 + clearTimeout( timeoutTimer ); 4.7725 + } 4.7726 + 4.7727 + // Dereference transport for early garbage collection 4.7728 + // (no matter how long the jqXHR object will be used) 4.7729 + transport = undefined; 4.7730 + 4.7731 + // Cache response headers 4.7732 + responseHeadersString = headers || ""; 4.7733 + 4.7734 + // Set readyState 4.7735 + jqXHR.readyState = status > 0 ? 4 : 0; 4.7736 + 4.7737 + // Get response data 4.7738 + if ( responses ) { 4.7739 + response = ajaxHandleResponses( s, jqXHR, responses ); 4.7740 + } 4.7741 + 4.7742 + // If successful, handle type chaining 4.7743 + if ( status >= 200 && status < 300 || status === 304 ) { 4.7744 + 4.7745 + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 4.7746 + if ( s.ifModified ) { 4.7747 + 4.7748 + modified = jqXHR.getResponseHeader("Last-Modified"); 4.7749 + if ( modified ) { 4.7750 + jQuery.lastModified[ ifModifiedKey ] = modified; 4.7751 + } 4.7752 + modified = jqXHR.getResponseHeader("Etag"); 4.7753 + if ( modified ) { 4.7754 + jQuery.etag[ ifModifiedKey ] = modified; 4.7755 + } 4.7756 + } 4.7757 + 4.7758 + // If not modified 4.7759 + if ( status === 304 ) { 4.7760 + 4.7761 + statusText = "notmodified"; 4.7762 + isSuccess = true; 4.7763 + 4.7764 + // If we have data 4.7765 + } else { 4.7766 + 4.7767 + isSuccess = ajaxConvert( s, response ); 4.7768 + statusText = isSuccess.state; 4.7769 + success = isSuccess.data; 4.7770 + error = isSuccess.error; 4.7771 + isSuccess = !error; 4.7772 + } 4.7773 + } else { 4.7774 + // We extract error from statusText 4.7775 + // then normalize statusText and status for non-aborts 4.7776 + error = statusText; 4.7777 + if ( !statusText || status ) { 4.7778 + statusText = "error"; 4.7779 + if ( status < 0 ) { 4.7780 + status = 0; 4.7781 + } 4.7782 + } 4.7783 + } 4.7784 + 4.7785 + // Set data for the fake xhr object 4.7786 + jqXHR.status = status; 4.7787 + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; 4.7788 + 4.7789 + // Success/Error 4.7790 + if ( isSuccess ) { 4.7791 + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); 4.7792 + } else { 4.7793 + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); 4.7794 + } 4.7795 + 4.7796 + // Status-dependent callbacks 4.7797 + jqXHR.statusCode( statusCode ); 4.7798 + statusCode = undefined; 4.7799 + 4.7800 + if ( fireGlobals ) { 4.7801 + globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ), 4.7802 + [ jqXHR, s, isSuccess ? success : error ] ); 4.7803 + } 4.7804 + 4.7805 + // Complete 4.7806 + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); 4.7807 + 4.7808 + if ( fireGlobals ) { 4.7809 + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); 4.7810 + // Handle the global AJAX counter 4.7811 + if ( !( --jQuery.active ) ) { 4.7812 + jQuery.event.trigger( "ajaxStop" ); 4.7813 + } 4.7814 + } 4.7815 + } 4.7816 + 4.7817 + // Attach deferreds 4.7818 + deferred.promise( jqXHR ); 4.7819 + jqXHR.success = jqXHR.done; 4.7820 + jqXHR.error = jqXHR.fail; 4.7821 + jqXHR.complete = completeDeferred.add; 4.7822 + 4.7823 + // Status-dependent callbacks 4.7824 + jqXHR.statusCode = function( map ) { 4.7825 + if ( map ) { 4.7826 + var tmp; 4.7827 + if ( state < 2 ) { 4.7828 + for ( tmp in map ) { 4.7829 + statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ]; 4.7830 + } 4.7831 + } else { 4.7832 + tmp = map[ jqXHR.status ]; 4.7833 + jqXHR.always( tmp ); 4.7834 + } 4.7835 + } 4.7836 + return this; 4.7837 + }; 4.7838 + 4.7839 + // Remove hash character (#7531: and string promotion) 4.7840 + // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) 4.7841 + // We also use the url parameter if available 4.7842 + s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); 4.7843 + 4.7844 + // Extract dataTypes list 4.7845 + s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( core_rspace ); 4.7846 + 4.7847 + // A cross-domain request is in order when we have a protocol:host:port mismatch 4.7848 + if ( s.crossDomain == null ) { 4.7849 + parts = rurl.exec( s.url.toLowerCase() ) || false; 4.7850 + s.crossDomain = parts && ( parts.join(":") + ( parts[ 3 ] ? "" : parts[ 1 ] === "http:" ? 80 : 443 ) ) !== 4.7851 + ( ajaxLocParts.join(":") + ( ajaxLocParts[ 3 ] ? "" : ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ); 4.7852 + } 4.7853 + 4.7854 + // Convert data if not already a string 4.7855 + if ( s.data && s.processData && typeof s.data !== "string" ) { 4.7856 + s.data = jQuery.param( s.data, s.traditional ); 4.7857 + } 4.7858 + 4.7859 + // Apply prefilters 4.7860 + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); 4.7861 + 4.7862 + // If request was aborted inside a prefilter, stop there 4.7863 + if ( state === 2 ) { 4.7864 + return jqXHR; 4.7865 + } 4.7866 + 4.7867 + // We can fire global events as of now if asked to 4.7868 + fireGlobals = s.global; 4.7869 + 4.7870 + // Uppercase the type 4.7871 + s.type = s.type.toUpperCase(); 4.7872 + 4.7873 + // Determine if request has content 4.7874 + s.hasContent = !rnoContent.test( s.type ); 4.7875 + 4.7876 + // Watch for a new set of requests 4.7877 + if ( fireGlobals && jQuery.active++ === 0 ) { 4.7878 + jQuery.event.trigger( "ajaxStart" ); 4.7879 + } 4.7880 + 4.7881 + // More options handling for requests with no content 4.7882 + if ( !s.hasContent ) { 4.7883 + 4.7884 + // If data is available, append data to url 4.7885 + if ( s.data ) { 4.7886 + s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data; 4.7887 + // #9682: remove data so that it's not used in an eventual retry 4.7888 + delete s.data; 4.7889 + } 4.7890 + 4.7891 + // Get ifModifiedKey before adding the anti-cache parameter 4.7892 + ifModifiedKey = s.url; 4.7893 + 4.7894 + // Add anti-cache in url if needed 4.7895 + if ( s.cache === false ) { 4.7896 + 4.7897 + var ts = jQuery.now(), 4.7898 + // try replacing _= if it is there 4.7899 + ret = s.url.replace( rts, "$1_=" + ts ); 4.7900 + 4.7901 + // if nothing was replaced, add timestamp to the end 4.7902 + s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" ); 4.7903 + } 4.7904 + } 4.7905 + 4.7906 + // Set the correct header, if data is being sent 4.7907 + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { 4.7908 + jqXHR.setRequestHeader( "Content-Type", s.contentType ); 4.7909 + } 4.7910 + 4.7911 + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 4.7912 + if ( s.ifModified ) { 4.7913 + ifModifiedKey = ifModifiedKey || s.url; 4.7914 + if ( jQuery.lastModified[ ifModifiedKey ] ) { 4.7915 + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] ); 4.7916 + } 4.7917 + if ( jQuery.etag[ ifModifiedKey ] ) { 4.7918 + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] ); 4.7919 + } 4.7920 + } 4.7921 + 4.7922 + // Set the Accepts header for the server, depending on the dataType 4.7923 + jqXHR.setRequestHeader( 4.7924 + "Accept", 4.7925 + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? 4.7926 + s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : 4.7927 + s.accepts[ "*" ] 4.7928 + ); 4.7929 + 4.7930 + // Check for headers option 4.7931 + for ( i in s.headers ) { 4.7932 + jqXHR.setRequestHeader( i, s.headers[ i ] ); 4.7933 + } 4.7934 + 4.7935 + // Allow custom headers/mimetypes and early abort 4.7936 + if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { 4.7937 + // Abort if not done already and return 4.7938 + return jqXHR.abort(); 4.7939 + 4.7940 + } 4.7941 + 4.7942 + // aborting is no longer a cancellation 4.7943 + strAbort = "abort"; 4.7944 + 4.7945 + // Install callbacks on deferreds 4.7946 + for ( i in { success: 1, error: 1, complete: 1 } ) { 4.7947 + jqXHR[ i ]( s[ i ] ); 4.7948 + } 4.7949 + 4.7950 + // Get transport 4.7951 + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); 4.7952 + 4.7953 + // If no transport, we auto-abort 4.7954 + if ( !transport ) { 4.7955 + done( -1, "No Transport" ); 4.7956 + } else { 4.7957 + jqXHR.readyState = 1; 4.7958 + // Send global event 4.7959 + if ( fireGlobals ) { 4.7960 + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); 4.7961 + } 4.7962 + // Timeout 4.7963 + if ( s.async && s.timeout > 0 ) { 4.7964 + timeoutTimer = setTimeout( function(){ 4.7965 + jqXHR.abort( "timeout" ); 4.7966 + }, s.timeout ); 4.7967 + } 4.7968 + 4.7969 + try { 4.7970 + state = 1; 4.7971 + transport.send( requestHeaders, done ); 4.7972 + } catch (e) { 4.7973 + // Propagate exception as error if not done 4.7974 + if ( state < 2 ) { 4.7975 + done( -1, e ); 4.7976 + // Simply rethrow otherwise 4.7977 + } else { 4.7978 + throw e; 4.7979 + } 4.7980 + } 4.7981 + } 4.7982 + 4.7983 + return jqXHR; 4.7984 + }, 4.7985 + 4.7986 + // Counter for holding the number of active queries 4.7987 + active: 0, 4.7988 + 4.7989 + // Last-Modified header cache for next request 4.7990 + lastModified: {}, 4.7991 + etag: {} 4.7992 + 4.7993 +}); 4.7994 + 4.7995 +/* Handles responses to an ajax request: 4.7996 + * - sets all responseXXX fields accordingly 4.7997 + * - finds the right dataType (mediates between content-type and expected dataType) 4.7998 + * - returns the corresponding response 4.7999 + */ 4.8000 +function ajaxHandleResponses( s, jqXHR, responses ) { 4.8001 + 4.8002 + var ct, type, finalDataType, firstDataType, 4.8003 + contents = s.contents, 4.8004 + dataTypes = s.dataTypes, 4.8005 + responseFields = s.responseFields; 4.8006 + 4.8007 + // Fill responseXXX fields 4.8008 + for ( type in responseFields ) { 4.8009 + if ( type in responses ) { 4.8010 + jqXHR[ responseFields[type] ] = responses[ type ]; 4.8011 + } 4.8012 + } 4.8013 + 4.8014 + // Remove auto dataType and get content-type in the process 4.8015 + while( dataTypes[ 0 ] === "*" ) { 4.8016 + dataTypes.shift(); 4.8017 + if ( ct === undefined ) { 4.8018 + ct = s.mimeType || jqXHR.getResponseHeader( "content-type" ); 4.8019 + } 4.8020 + } 4.8021 + 4.8022 + // Check if we're dealing with a known content-type 4.8023 + if ( ct ) { 4.8024 + for ( type in contents ) { 4.8025 + if ( contents[ type ] && contents[ type ].test( ct ) ) { 4.8026 + dataTypes.unshift( type ); 4.8027 + break; 4.8028 + } 4.8029 + } 4.8030 + } 4.8031 + 4.8032 + // Check to see if we have a response for the expected dataType 4.8033 + if ( dataTypes[ 0 ] in responses ) { 4.8034 + finalDataType = dataTypes[ 0 ]; 4.8035 + } else { 4.8036 + // Try convertible dataTypes 4.8037 + for ( type in responses ) { 4.8038 + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { 4.8039 + finalDataType = type; 4.8040 + break; 4.8041 + } 4.8042 + if ( !firstDataType ) { 4.8043 + firstDataType = type; 4.8044 + } 4.8045 + } 4.8046 + // Or just use first one 4.8047 + finalDataType = finalDataType || firstDataType; 4.8048 + } 4.8049 + 4.8050 + // If we found a dataType 4.8051 + // We add the dataType to the list if needed 4.8052 + // and return the corresponding response 4.8053 + if ( finalDataType ) { 4.8054 + if ( finalDataType !== dataTypes[ 0 ] ) { 4.8055 + dataTypes.unshift( finalDataType ); 4.8056 + } 4.8057 + return responses[ finalDataType ]; 4.8058 + } 4.8059 +} 4.8060 + 4.8061 +// Chain conversions given the request and the original response 4.8062 +function ajaxConvert( s, response ) { 4.8063 + 4.8064 + var conv, conv2, current, tmp, 4.8065 + // Work with a copy of dataTypes in case we need to modify it for conversion 4.8066 + dataTypes = s.dataTypes.slice(), 4.8067 + prev = dataTypes[ 0 ], 4.8068 + converters = {}, 4.8069 + i = 0; 4.8070 + 4.8071 + // Apply the dataFilter if provided 4.8072 + if ( s.dataFilter ) { 4.8073 + response = s.dataFilter( response, s.dataType ); 4.8074 + } 4.8075 + 4.8076 + // Create converters map with lowercased keys 4.8077 + if ( dataTypes[ 1 ] ) { 4.8078 + for ( conv in s.converters ) { 4.8079 + converters[ conv.toLowerCase() ] = s.converters[ conv ]; 4.8080 + } 4.8081 + } 4.8082 + 4.8083 + // Convert to each sequential dataType, tolerating list modification 4.8084 + for ( ; (current = dataTypes[++i]); ) { 4.8085 + 4.8086 + // There's only work to do if current dataType is non-auto 4.8087 + if ( current !== "*" ) { 4.8088 + 4.8089 + // Convert response if prev dataType is non-auto and differs from current 4.8090 + if ( prev !== "*" && prev !== current ) { 4.8091 + 4.8092 + // Seek a direct converter 4.8093 + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; 4.8094 + 4.8095 + // If none found, seek a pair 4.8096 + if ( !conv ) { 4.8097 + for ( conv2 in converters ) { 4.8098 + 4.8099 + // If conv2 outputs current 4.8100 + tmp = conv2.split(" "); 4.8101 + if ( tmp[ 1 ] === current ) { 4.8102 + 4.8103 + // If prev can be converted to accepted input 4.8104 + conv = converters[ prev + " " + tmp[ 0 ] ] || 4.8105 + converters[ "* " + tmp[ 0 ] ]; 4.8106 + if ( conv ) { 4.8107 + // Condense equivalence converters 4.8108 + if ( conv === true ) { 4.8109 + conv = converters[ conv2 ]; 4.8110 + 4.8111 + // Otherwise, insert the intermediate dataType 4.8112 + } else if ( converters[ conv2 ] !== true ) { 4.8113 + current = tmp[ 0 ]; 4.8114 + dataTypes.splice( i--, 0, current ); 4.8115 + } 4.8116 + 4.8117 + break; 4.8118 + } 4.8119 + } 4.8120 + } 4.8121 + } 4.8122 + 4.8123 + // Apply converter (if not an equivalence) 4.8124 + if ( conv !== true ) { 4.8125 + 4.8126 + // Unless errors are allowed to bubble, catch and return them 4.8127 + if ( conv && s["throws"] ) { 4.8128 + response = conv( response ); 4.8129 + } else { 4.8130 + try { 4.8131 + response = conv( response ); 4.8132 + } catch ( e ) { 4.8133 + return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; 4.8134 + } 4.8135 + } 4.8136 + } 4.8137 + } 4.8138 + 4.8139 + // Update prev for next iteration 4.8140 + prev = current; 4.8141 + } 4.8142 + } 4.8143 + 4.8144 + return { state: "success", data: response }; 4.8145 +} 4.8146 +var oldCallbacks = [], 4.8147 + rquestion = /\?/, 4.8148 + rjsonp = /(=)\?(?=&|$)|\?\?/, 4.8149 + nonce = jQuery.now(); 4.8150 + 4.8151 +// Default jsonp settings 4.8152 +jQuery.ajaxSetup({ 4.8153 + jsonp: "callback", 4.8154 + jsonpCallback: function() { 4.8155 + var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); 4.8156 + this[ callback ] = true; 4.8157 + return callback; 4.8158 + } 4.8159 +}); 4.8160 + 4.8161 +// Detect, normalize options and install callbacks for jsonp requests 4.8162 +jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { 4.8163 + 4.8164 + var callbackName, overwritten, responseContainer, 4.8165 + data = s.data, 4.8166 + url = s.url, 4.8167 + hasCallback = s.jsonp !== false, 4.8168 + replaceInUrl = hasCallback && rjsonp.test( url ), 4.8169 + replaceInData = hasCallback && !replaceInUrl && typeof data === "string" && 4.8170 + !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && 4.8171 + rjsonp.test( data ); 4.8172 + 4.8173 + // Handle iff the expected data type is "jsonp" or we have a parameter to set 4.8174 + if ( s.dataTypes[ 0 ] === "jsonp" || replaceInUrl || replaceInData ) { 4.8175 + 4.8176 + // Get callback name, remembering preexisting value associated with it 4.8177 + callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? 4.8178 + s.jsonpCallback() : 4.8179 + s.jsonpCallback; 4.8180 + overwritten = window[ callbackName ]; 4.8181 + 4.8182 + // Insert callback into url or form data 4.8183 + if ( replaceInUrl ) { 4.8184 + s.url = url.replace( rjsonp, "$1" + callbackName ); 4.8185 + } else if ( replaceInData ) { 4.8186 + s.data = data.replace( rjsonp, "$1" + callbackName ); 4.8187 + } else if ( hasCallback ) { 4.8188 + s.url += ( rquestion.test( url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; 4.8189 + } 4.8190 + 4.8191 + // Use data converter to retrieve json after script execution 4.8192 + s.converters["script json"] = function() { 4.8193 + if ( !responseContainer ) { 4.8194 + jQuery.error( callbackName + " was not called" ); 4.8195 + } 4.8196 + return responseContainer[ 0 ]; 4.8197 + }; 4.8198 + 4.8199 + // force json dataType 4.8200 + s.dataTypes[ 0 ] = "json"; 4.8201 + 4.8202 + // Install callback 4.8203 + window[ callbackName ] = function() { 4.8204 + responseContainer = arguments; 4.8205 + }; 4.8206 + 4.8207 + // Clean-up function (fires after converters) 4.8208 + jqXHR.always(function() { 4.8209 + // Restore preexisting value 4.8210 + window[ callbackName ] = overwritten; 4.8211 + 4.8212 + // Save back as free 4.8213 + if ( s[ callbackName ] ) { 4.8214 + // make sure that re-using the options doesn't screw things around 4.8215 + s.jsonpCallback = originalSettings.jsonpCallback; 4.8216 + 4.8217 + // save the callback name for future use 4.8218 + oldCallbacks.push( callbackName ); 4.8219 + } 4.8220 + 4.8221 + // Call if it was a function and we have a response 4.8222 + if ( responseContainer && jQuery.isFunction( overwritten ) ) { 4.8223 + overwritten( responseContainer[ 0 ] ); 4.8224 + } 4.8225 + 4.8226 + responseContainer = overwritten = undefined; 4.8227 + }); 4.8228 + 4.8229 + // Delegate to script 4.8230 + return "script"; 4.8231 + } 4.8232 +}); 4.8233 +// Install script dataType 4.8234 +jQuery.ajaxSetup({ 4.8235 + accepts: { 4.8236 + script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" 4.8237 + }, 4.8238 + contents: { 4.8239 + script: /javascript|ecmascript/ 4.8240 + }, 4.8241 + converters: { 4.8242 + "text script": function( text ) { 4.8243 + jQuery.globalEval( text ); 4.8244 + return text; 4.8245 + } 4.8246 + } 4.8247 +}); 4.8248 + 4.8249 +// Handle cache's special case and global 4.8250 +jQuery.ajaxPrefilter( "script", function( s ) { 4.8251 + if ( s.cache === undefined ) { 4.8252 + s.cache = false; 4.8253 + } 4.8254 + if ( s.crossDomain ) { 4.8255 + s.type = "GET"; 4.8256 + s.global = false; 4.8257 + } 4.8258 +}); 4.8259 + 4.8260 +// Bind script tag hack transport 4.8261 +jQuery.ajaxTransport( "script", function(s) { 4.8262 + 4.8263 + // This transport only deals with cross domain requests 4.8264 + if ( s.crossDomain ) { 4.8265 + 4.8266 + var script, 4.8267 + head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement; 4.8268 + 4.8269 + return { 4.8270 + 4.8271 + send: function( _, callback ) { 4.8272 + 4.8273 + script = document.createElement( "script" ); 4.8274 + 4.8275 + script.async = "async"; 4.8276 + 4.8277 + if ( s.scriptCharset ) { 4.8278 + script.charset = s.scriptCharset; 4.8279 + } 4.8280 + 4.8281 + script.src = s.url; 4.8282 + 4.8283 + // Attach handlers for all browsers 4.8284 + script.onload = script.onreadystatechange = function( _, isAbort ) { 4.8285 + 4.8286 + if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { 4.8287 + 4.8288 + // Handle memory leak in IE 4.8289 + script.onload = script.onreadystatechange = null; 4.8290 + 4.8291 + // Remove the script 4.8292 + if ( head && script.parentNode ) { 4.8293 + head.removeChild( script ); 4.8294 + } 4.8295 + 4.8296 + // Dereference the script 4.8297 + script = undefined; 4.8298 + 4.8299 + // Callback if not abort 4.8300 + if ( !isAbort ) { 4.8301 + callback( 200, "success" ); 4.8302 + } 4.8303 + } 4.8304 + }; 4.8305 + // Use insertBefore instead of appendChild to circumvent an IE6 bug. 4.8306 + // This arises when a base node is used (#2709 and #4378). 4.8307 + head.insertBefore( script, head.firstChild ); 4.8308 + }, 4.8309 + 4.8310 + abort: function() { 4.8311 + if ( script ) { 4.8312 + script.onload( 0, 1 ); 4.8313 + } 4.8314 + } 4.8315 + }; 4.8316 + } 4.8317 +}); 4.8318 +var xhrCallbacks, 4.8319 + // #5280: Internet Explorer will keep connections alive if we don't abort on unload 4.8320 + xhrOnUnloadAbort = window.ActiveXObject ? function() { 4.8321 + // Abort all pending requests 4.8322 + for ( var key in xhrCallbacks ) { 4.8323 + xhrCallbacks[ key ]( 0, 1 ); 4.8324 + } 4.8325 + } : false, 4.8326 + xhrId = 0; 4.8327 + 4.8328 +// Functions to create xhrs 4.8329 +function createStandardXHR() { 4.8330 + try { 4.8331 + return new window.XMLHttpRequest(); 4.8332 + } catch( e ) {} 4.8333 +} 4.8334 + 4.8335 +function createActiveXHR() { 4.8336 + try { 4.8337 + return new window.ActiveXObject( "Microsoft.XMLHTTP" ); 4.8338 + } catch( e ) {} 4.8339 +} 4.8340 + 4.8341 +// Create the request object 4.8342 +// (This is still attached to ajaxSettings for backward compatibility) 4.8343 +jQuery.ajaxSettings.xhr = window.ActiveXObject ? 4.8344 + /* Microsoft failed to properly 4.8345 + * implement the XMLHttpRequest in IE7 (can't request local files), 4.8346 + * so we use the ActiveXObject when it is available 4.8347 + * Additionally XMLHttpRequest can be disabled in IE7/IE8 so 4.8348 + * we need a fallback. 4.8349 + */ 4.8350 + function() { 4.8351 + return !this.isLocal && createStandardXHR() || createActiveXHR(); 4.8352 + } : 4.8353 + // For all other browsers, use the standard XMLHttpRequest object 4.8354 + createStandardXHR; 4.8355 + 4.8356 +// Determine support properties 4.8357 +(function( xhr ) { 4.8358 + jQuery.extend( jQuery.support, { 4.8359 + ajax: !!xhr, 4.8360 + cors: !!xhr && ( "withCredentials" in xhr ) 4.8361 + }); 4.8362 +})( jQuery.ajaxSettings.xhr() ); 4.8363 + 4.8364 +// Create transport if the browser can provide an xhr 4.8365 +if ( jQuery.support.ajax ) { 4.8366 + 4.8367 + jQuery.ajaxTransport(function( s ) { 4.8368 + // Cross domain only allowed if supported through XMLHttpRequest 4.8369 + if ( !s.crossDomain || jQuery.support.cors ) { 4.8370 + 4.8371 + var callback; 4.8372 + 4.8373 + return { 4.8374 + send: function( headers, complete ) { 4.8375 + 4.8376 + // Get a new xhr 4.8377 + var handle, i, 4.8378 + xhr = s.xhr(); 4.8379 + 4.8380 + // Open the socket 4.8381 + // Passing null username, generates a login popup on Opera (#2865) 4.8382 + if ( s.username ) { 4.8383 + xhr.open( s.type, s.url, s.async, s.username, s.password ); 4.8384 + } else { 4.8385 + xhr.open( s.type, s.url, s.async ); 4.8386 + } 4.8387 + 4.8388 + // Apply custom fields if provided 4.8389 + if ( s.xhrFields ) { 4.8390 + for ( i in s.xhrFields ) { 4.8391 + xhr[ i ] = s.xhrFields[ i ]; 4.8392 + } 4.8393 + } 4.8394 + 4.8395 + // Override mime type if needed 4.8396 + if ( s.mimeType && xhr.overrideMimeType ) { 4.8397 + xhr.overrideMimeType( s.mimeType ); 4.8398 + } 4.8399 + 4.8400 + // X-Requested-With header 4.8401 + // For cross-domain requests, seeing as conditions for a preflight are 4.8402 + // akin to a jigsaw puzzle, we simply never set it to be sure. 4.8403 + // (it can always be set on a per-request basis or even using ajaxSetup) 4.8404 + // For same-domain requests, won't change header if already provided. 4.8405 + if ( !s.crossDomain && !headers["X-Requested-With"] ) { 4.8406 + headers[ "X-Requested-With" ] = "XMLHttpRequest"; 4.8407 + } 4.8408 + 4.8409 + // Need an extra try/catch for cross domain requests in Firefox 3 4.8410 + try { 4.8411 + for ( i in headers ) { 4.8412 + xhr.setRequestHeader( i, headers[ i ] ); 4.8413 + } 4.8414 + } catch( _ ) {} 4.8415 + 4.8416 + // Do send the request 4.8417 + // This may raise an exception which is actually 4.8418 + // handled in jQuery.ajax (so no try/catch here) 4.8419 + xhr.send( ( s.hasContent && s.data ) || null ); 4.8420 + 4.8421 + // Listener 4.8422 + callback = function( _, isAbort ) { 4.8423 + 4.8424 + var status, 4.8425 + statusText, 4.8426 + responseHeaders, 4.8427 + responses, 4.8428 + xml; 4.8429 + 4.8430 + // Firefox throws exceptions when accessing properties 4.8431 + // of an xhr when a network error occurred 4.8432 + // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) 4.8433 + try { 4.8434 + 4.8435 + // Was never called and is aborted or complete 4.8436 + if ( callback && ( isAbort || xhr.readyState === 4 ) ) { 4.8437 + 4.8438 + // Only called once 4.8439 + callback = undefined; 4.8440 + 4.8441 + // Do not keep as active anymore 4.8442 + if ( handle ) { 4.8443 + xhr.onreadystatechange = jQuery.noop; 4.8444 + if ( xhrOnUnloadAbort ) { 4.8445 + delete xhrCallbacks[ handle ]; 4.8446 + } 4.8447 + } 4.8448 + 4.8449 + // If it's an abort 4.8450 + if ( isAbort ) { 4.8451 + // Abort it manually if needed 4.8452 + if ( xhr.readyState !== 4 ) { 4.8453 + xhr.abort(); 4.8454 + } 4.8455 + } else { 4.8456 + status = xhr.status; 4.8457 + responseHeaders = xhr.getAllResponseHeaders(); 4.8458 + responses = {}; 4.8459 + xml = xhr.responseXML; 4.8460 + 4.8461 + // Construct response list 4.8462 + if ( xml && xml.documentElement /* #4958 */ ) { 4.8463 + responses.xml = xml; 4.8464 + } 4.8465 + 4.8466 + // When requesting binary data, IE6-9 will throw an exception 4.8467 + // on any attempt to access responseText (#11426) 4.8468 + try { 4.8469 + responses.text = xhr.responseText; 4.8470 + } catch( _ ) { 4.8471 + } 4.8472 + 4.8473 + // Firefox throws an exception when accessing 4.8474 + // statusText for faulty cross-domain requests 4.8475 + try { 4.8476 + statusText = xhr.statusText; 4.8477 + } catch( e ) { 4.8478 + // We normalize with Webkit giving an empty statusText 4.8479 + statusText = ""; 4.8480 + } 4.8481 + 4.8482 + // Filter status for non standard behaviors 4.8483 + 4.8484 + // If the request is local and we have data: assume a success 4.8485 + // (success with no data won't get notified, that's the best we 4.8486 + // can do given current implementations) 4.8487 + if ( !status && s.isLocal && !s.crossDomain ) { 4.8488 + status = responses.text ? 200 : 404; 4.8489 + // IE - #1450: sometimes returns 1223 when it should be 204 4.8490 + } else if ( status === 1223 ) { 4.8491 + status = 204; 4.8492 + } 4.8493 + } 4.8494 + } 4.8495 + } catch( firefoxAccessException ) { 4.8496 + if ( !isAbort ) { 4.8497 + complete( -1, firefoxAccessException ); 4.8498 + } 4.8499 + } 4.8500 + 4.8501 + // Call complete if needed 4.8502 + if ( responses ) { 4.8503 + complete( status, statusText, responses, responseHeaders ); 4.8504 + } 4.8505 + }; 4.8506 + 4.8507 + if ( !s.async ) { 4.8508 + // if we're in sync mode we fire the callback 4.8509 + callback(); 4.8510 + } else if ( xhr.readyState === 4 ) { 4.8511 + // (IE6 & IE7) if it's in cache and has been 4.8512 + // retrieved directly we need to fire the callback 4.8513 + setTimeout( callback, 0 ); 4.8514 + } else { 4.8515 + handle = ++xhrId; 4.8516 + if ( xhrOnUnloadAbort ) { 4.8517 + // Create the active xhrs callbacks list if needed 4.8518 + // and attach the unload handler 4.8519 + if ( !xhrCallbacks ) { 4.8520 + xhrCallbacks = {}; 4.8521 + jQuery( window ).unload( xhrOnUnloadAbort ); 4.8522 + } 4.8523 + // Add to list of active xhrs callbacks 4.8524 + xhrCallbacks[ handle ] = callback; 4.8525 + } 4.8526 + xhr.onreadystatechange = callback; 4.8527 + } 4.8528 + }, 4.8529 + 4.8530 + abort: function() { 4.8531 + if ( callback ) { 4.8532 + callback(0,1); 4.8533 + } 4.8534 + } 4.8535 + }; 4.8536 + } 4.8537 + }); 4.8538 +} 4.8539 +var fxNow, timerId, 4.8540 + rfxtypes = /^(?:toggle|show|hide)$/, 4.8541 + rfxnum = new RegExp( "^(?:([-+])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), 4.8542 + rrun = /queueHooks$/, 4.8543 + animationPrefilters = [ defaultPrefilter ], 4.8544 + tweeners = { 4.8545 + "*": [function( prop, value ) { 4.8546 + var end, unit, 4.8547 + tween = this.createTween( prop, value ), 4.8548 + parts = rfxnum.exec( value ), 4.8549 + target = tween.cur(), 4.8550 + start = +target || 0, 4.8551 + scale = 1, 4.8552 + maxIterations = 20; 4.8553 + 4.8554 + if ( parts ) { 4.8555 + end = +parts[2]; 4.8556 + unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" ); 4.8557 + 4.8558 + // We need to compute starting value 4.8559 + if ( unit !== "px" && start ) { 4.8560 + // Iteratively approximate from a nonzero starting point 4.8561 + // Prefer the current property, because this process will be trivial if it uses the same units 4.8562 + // Fallback to end or a simple constant 4.8563 + start = jQuery.css( tween.elem, prop, true ) || end || 1; 4.8564 + 4.8565 + do { 4.8566 + // If previous iteration zeroed out, double until we get *something* 4.8567 + // Use a string for doubling factor so we don't accidentally see scale as unchanged below 4.8568 + scale = scale || ".5"; 4.8569 + 4.8570 + // Adjust and apply 4.8571 + start = start / scale; 4.8572 + jQuery.style( tween.elem, prop, start + unit ); 4.8573 + 4.8574 + // Update scale, tolerating zero or NaN from tween.cur() 4.8575 + // And breaking the loop if scale is unchanged or perfect, or if we've just had enough 4.8576 + } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations ); 4.8577 + } 4.8578 + 4.8579 + tween.unit = unit; 4.8580 + tween.start = start; 4.8581 + // If a +=/-= token was provided, we're doing a relative animation 4.8582 + tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end; 4.8583 + } 4.8584 + return tween; 4.8585 + }] 4.8586 + }; 4.8587 + 4.8588 +// Animations created synchronously will run synchronously 4.8589 +function createFxNow() { 4.8590 + setTimeout(function() { 4.8591 + fxNow = undefined; 4.8592 + }, 0 ); 4.8593 + return ( fxNow = jQuery.now() ); 4.8594 +} 4.8595 + 4.8596 +function createTweens( animation, props ) { 4.8597 + jQuery.each( props, function( prop, value ) { 4.8598 + var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), 4.8599 + index = 0, 4.8600 + length = collection.length; 4.8601 + for ( ; index < length; index++ ) { 4.8602 + if ( collection[ index ].call( animation, prop, value ) ) { 4.8603 + 4.8604 + // we're done with this property 4.8605 + return; 4.8606 + } 4.8607 + } 4.8608 + }); 4.8609 +} 4.8610 + 4.8611 +function Animation( elem, properties, options ) { 4.8612 + var result, 4.8613 + index = 0, 4.8614 + tweenerIndex = 0, 4.8615 + length = animationPrefilters.length, 4.8616 + deferred = jQuery.Deferred().always( function() { 4.8617 + // don't match elem in the :animated selector 4.8618 + delete tick.elem; 4.8619 + }), 4.8620 + tick = function() { 4.8621 + var currentTime = fxNow || createFxNow(), 4.8622 + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), 4.8623 + percent = 1 - ( remaining / animation.duration || 0 ), 4.8624 + index = 0, 4.8625 + length = animation.tweens.length; 4.8626 + 4.8627 + for ( ; index < length ; index++ ) { 4.8628 + animation.tweens[ index ].run( percent ); 4.8629 + } 4.8630 + 4.8631 + deferred.notifyWith( elem, [ animation, percent, remaining ]); 4.8632 + 4.8633 + if ( percent < 1 && length ) { 4.8634 + return remaining; 4.8635 + } else { 4.8636 + deferred.resolveWith( elem, [ animation ] ); 4.8637 + return false; 4.8638 + } 4.8639 + }, 4.8640 + animation = deferred.promise({ 4.8641 + elem: elem, 4.8642 + props: jQuery.extend( {}, properties ), 4.8643 + opts: jQuery.extend( true, { specialEasing: {} }, options ), 4.8644 + originalProperties: properties, 4.8645 + originalOptions: options, 4.8646 + startTime: fxNow || createFxNow(), 4.8647 + duration: options.duration, 4.8648 + tweens: [], 4.8649 + createTween: function( prop, end, easing ) { 4.8650 + var tween = jQuery.Tween( elem, animation.opts, prop, end, 4.8651 + animation.opts.specialEasing[ prop ] || animation.opts.easing ); 4.8652 + animation.tweens.push( tween ); 4.8653 + return tween; 4.8654 + }, 4.8655 + stop: function( gotoEnd ) { 4.8656 + var index = 0, 4.8657 + // if we are going to the end, we want to run all the tweens 4.8658 + // otherwise we skip this part 4.8659 + length = gotoEnd ? animation.tweens.length : 0; 4.8660 + 4.8661 + for ( ; index < length ; index++ ) { 4.8662 + animation.tweens[ index ].run( 1 ); 4.8663 + } 4.8664 + 4.8665 + // resolve when we played the last frame 4.8666 + // otherwise, reject 4.8667 + if ( gotoEnd ) { 4.8668 + deferred.resolveWith( elem, [ animation, gotoEnd ] ); 4.8669 + } else { 4.8670 + deferred.rejectWith( elem, [ animation, gotoEnd ] ); 4.8671 + } 4.8672 + return this; 4.8673 + } 4.8674 + }), 4.8675 + props = animation.props; 4.8676 + 4.8677 + propFilter( props, animation.opts.specialEasing ); 4.8678 + 4.8679 + for ( ; index < length ; index++ ) { 4.8680 + result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); 4.8681 + if ( result ) { 4.8682 + return result; 4.8683 + } 4.8684 + } 4.8685 + 4.8686 + createTweens( animation, props ); 4.8687 + 4.8688 + if ( jQuery.isFunction( animation.opts.start ) ) { 4.8689 + animation.opts.start.call( elem, animation ); 4.8690 + } 4.8691 + 4.8692 + jQuery.fx.timer( 4.8693 + jQuery.extend( tick, { 4.8694 + anim: animation, 4.8695 + queue: animation.opts.queue, 4.8696 + elem: elem 4.8697 + }) 4.8698 + ); 4.8699 + 4.8700 + // attach callbacks from options 4.8701 + return animation.progress( animation.opts.progress ) 4.8702 + .done( animation.opts.done, animation.opts.complete ) 4.8703 + .fail( animation.opts.fail ) 4.8704 + .always( animation.opts.always ); 4.8705 +} 4.8706 + 4.8707 +function propFilter( props, specialEasing ) { 4.8708 + var index, name, easing, value, hooks; 4.8709 + 4.8710 + // camelCase, specialEasing and expand cssHook pass 4.8711 + for ( index in props ) { 4.8712 + name = jQuery.camelCase( index ); 4.8713 + easing = specialEasing[ name ]; 4.8714 + value = props[ index ]; 4.8715 + if ( jQuery.isArray( value ) ) { 4.8716 + easing = value[ 1 ]; 4.8717 + value = props[ index ] = value[ 0 ]; 4.8718 + } 4.8719 + 4.8720 + if ( index !== name ) { 4.8721 + props[ name ] = value; 4.8722 + delete props[ index ]; 4.8723 + } 4.8724 + 4.8725 + hooks = jQuery.cssHooks[ name ]; 4.8726 + if ( hooks && "expand" in hooks ) { 4.8727 + value = hooks.expand( value ); 4.8728 + delete props[ name ]; 4.8729 + 4.8730 + // not quite $.extend, this wont overwrite keys already present. 4.8731 + // also - reusing 'index' from above because we have the correct "name" 4.8732 + for ( index in value ) { 4.8733 + if ( !( index in props ) ) { 4.8734 + props[ index ] = value[ index ]; 4.8735 + specialEasing[ index ] = easing; 4.8736 + } 4.8737 + } 4.8738 + } else { 4.8739 + specialEasing[ name ] = easing; 4.8740 + } 4.8741 + } 4.8742 +} 4.8743 + 4.8744 +jQuery.Animation = jQuery.extend( Animation, { 4.8745 + 4.8746 + tweener: function( props, callback ) { 4.8747 + if ( jQuery.isFunction( props ) ) { 4.8748 + callback = props; 4.8749 + props = [ "*" ]; 4.8750 + } else { 4.8751 + props = props.split(" "); 4.8752 + } 4.8753 + 4.8754 + var prop, 4.8755 + index = 0, 4.8756 + length = props.length; 4.8757 + 4.8758 + for ( ; index < length ; index++ ) { 4.8759 + prop = props[ index ]; 4.8760 + tweeners[ prop ] = tweeners[ prop ] || []; 4.8761 + tweeners[ prop ].unshift( callback ); 4.8762 + } 4.8763 + }, 4.8764 + 4.8765 + prefilter: function( callback, prepend ) { 4.8766 + if ( prepend ) { 4.8767 + animationPrefilters.unshift( callback ); 4.8768 + } else { 4.8769 + animationPrefilters.push( callback ); 4.8770 + } 4.8771 + } 4.8772 +}); 4.8773 + 4.8774 +function defaultPrefilter( elem, props, opts ) { 4.8775 + var index, prop, value, length, dataShow, tween, hooks, oldfire, 4.8776 + anim = this, 4.8777 + style = elem.style, 4.8778 + orig = {}, 4.8779 + handled = [], 4.8780 + hidden = elem.nodeType && isHidden( elem ); 4.8781 + 4.8782 + // handle queue: false promises 4.8783 + if ( !opts.queue ) { 4.8784 + hooks = jQuery._queueHooks( elem, "fx" ); 4.8785 + if ( hooks.unqueued == null ) { 4.8786 + hooks.unqueued = 0; 4.8787 + oldfire = hooks.empty.fire; 4.8788 + hooks.empty.fire = function() { 4.8789 + if ( !hooks.unqueued ) { 4.8790 + oldfire(); 4.8791 + } 4.8792 + }; 4.8793 + } 4.8794 + hooks.unqueued++; 4.8795 + 4.8796 + anim.always(function() { 4.8797 + // doing this makes sure that the complete handler will be called 4.8798 + // before this completes 4.8799 + anim.always(function() { 4.8800 + hooks.unqueued--; 4.8801 + if ( !jQuery.queue( elem, "fx" ).length ) { 4.8802 + hooks.empty.fire(); 4.8803 + } 4.8804 + }); 4.8805 + }); 4.8806 + } 4.8807 + 4.8808 + // height/width overflow pass 4.8809 + if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { 4.8810 + // Make sure that nothing sneaks out 4.8811 + // Record all 3 overflow attributes because IE does not 4.8812 + // change the overflow attribute when overflowX and 4.8813 + // overflowY are set to the same value 4.8814 + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; 4.8815 + 4.8816 + // Set display property to inline-block for height/width 4.8817 + // animations on inline elements that are having width/height animated 4.8818 + if ( jQuery.css( elem, "display" ) === "inline" && 4.8819 + jQuery.css( elem, "float" ) === "none" ) { 4.8820 + 4.8821 + // inline-level elements accept inline-block; 4.8822 + // block-level elements need to be inline with layout 4.8823 + if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { 4.8824 + style.display = "inline-block"; 4.8825 + 4.8826 + } else { 4.8827 + style.zoom = 1; 4.8828 + } 4.8829 + } 4.8830 + } 4.8831 + 4.8832 + if ( opts.overflow ) { 4.8833 + style.overflow = "hidden"; 4.8834 + if ( !jQuery.support.shrinkWrapBlocks ) { 4.8835 + anim.done(function() { 4.8836 + style.overflow = opts.overflow[ 0 ]; 4.8837 + style.overflowX = opts.overflow[ 1 ]; 4.8838 + style.overflowY = opts.overflow[ 2 ]; 4.8839 + }); 4.8840 + } 4.8841 + } 4.8842 + 4.8843 + 4.8844 + // show/hide pass 4.8845 + for ( index in props ) { 4.8846 + value = props[ index ]; 4.8847 + if ( rfxtypes.exec( value ) ) { 4.8848 + delete props[ index ]; 4.8849 + if ( value === ( hidden ? "hide" : "show" ) ) { 4.8850 + continue; 4.8851 + } 4.8852 + handled.push( index ); 4.8853 + } 4.8854 + } 4.8855 + 4.8856 + length = handled.length; 4.8857 + if ( length ) { 4.8858 + dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} ); 4.8859 + if ( hidden ) { 4.8860 + jQuery( elem ).show(); 4.8861 + } else { 4.8862 + anim.done(function() { 4.8863 + jQuery( elem ).hide(); 4.8864 + }); 4.8865 + } 4.8866 + anim.done(function() { 4.8867 + var prop; 4.8868 + jQuery.removeData( elem, "fxshow", true ); 4.8869 + for ( prop in orig ) { 4.8870 + jQuery.style( elem, prop, orig[ prop ] ); 4.8871 + } 4.8872 + }); 4.8873 + for ( index = 0 ; index < length ; index++ ) { 4.8874 + prop = handled[ index ]; 4.8875 + tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 ); 4.8876 + orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop ); 4.8877 + 4.8878 + if ( !( prop in dataShow ) ) { 4.8879 + dataShow[ prop ] = tween.start; 4.8880 + if ( hidden ) { 4.8881 + tween.end = tween.start; 4.8882 + tween.start = prop === "width" || prop === "height" ? 1 : 0; 4.8883 + } 4.8884 + } 4.8885 + } 4.8886 + } 4.8887 +} 4.8888 + 4.8889 +function Tween( elem, options, prop, end, easing ) { 4.8890 + return new Tween.prototype.init( elem, options, prop, end, easing ); 4.8891 +} 4.8892 +jQuery.Tween = Tween; 4.8893 + 4.8894 +Tween.prototype = { 4.8895 + constructor: Tween, 4.8896 + init: function( elem, options, prop, end, easing, unit ) { 4.8897 + this.elem = elem; 4.8898 + this.prop = prop; 4.8899 + this.easing = easing || "swing"; 4.8900 + this.options = options; 4.8901 + this.start = this.now = this.cur(); 4.8902 + this.end = end; 4.8903 + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); 4.8904 + }, 4.8905 + cur: function() { 4.8906 + var hooks = Tween.propHooks[ this.prop ]; 4.8907 + 4.8908 + return hooks && hooks.get ? 4.8909 + hooks.get( this ) : 4.8910 + Tween.propHooks._default.get( this ); 4.8911 + }, 4.8912 + run: function( percent ) { 4.8913 + var eased, 4.8914 + hooks = Tween.propHooks[ this.prop ]; 4.8915 + 4.8916 + if ( this.options.duration ) { 4.8917 + this.pos = eased = jQuery.easing[ this.easing ]( 4.8918 + percent, this.options.duration * percent, 0, 1, this.options.duration 4.8919 + ); 4.8920 + } else { 4.8921 + this.pos = eased = percent; 4.8922 + } 4.8923 + this.now = ( this.end - this.start ) * eased + this.start; 4.8924 + 4.8925 + if ( this.options.step ) { 4.8926 + this.options.step.call( this.elem, this.now, this ); 4.8927 + } 4.8928 + 4.8929 + if ( hooks && hooks.set ) { 4.8930 + hooks.set( this ); 4.8931 + } else { 4.8932 + Tween.propHooks._default.set( this ); 4.8933 + } 4.8934 + return this; 4.8935 + } 4.8936 +}; 4.8937 + 4.8938 +Tween.prototype.init.prototype = Tween.prototype; 4.8939 + 4.8940 +Tween.propHooks = { 4.8941 + _default: { 4.8942 + get: function( tween ) { 4.8943 + var result; 4.8944 + 4.8945 + if ( tween.elem[ tween.prop ] != null && 4.8946 + (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { 4.8947 + return tween.elem[ tween.prop ]; 4.8948 + } 4.8949 + 4.8950 + // passing any value as a 4th parameter to .css will automatically 4.8951 + // attempt a parseFloat and fallback to a string if the parse fails 4.8952 + // so, simple values such as "10px" are parsed to Float. 4.8953 + // complex values such as "rotate(1rad)" are returned as is. 4.8954 + result = jQuery.css( tween.elem, tween.prop, false, "" ); 4.8955 + // Empty strings, null, undefined and "auto" are converted to 0. 4.8956 + return !result || result === "auto" ? 0 : result; 4.8957 + }, 4.8958 + set: function( tween ) { 4.8959 + // use step hook for back compat - use cssHook if its there - use .style if its 4.8960 + // available and use plain properties where available 4.8961 + if ( jQuery.fx.step[ tween.prop ] ) { 4.8962 + jQuery.fx.step[ tween.prop ]( tween ); 4.8963 + } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { 4.8964 + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); 4.8965 + } else { 4.8966 + tween.elem[ tween.prop ] = tween.now; 4.8967 + } 4.8968 + } 4.8969 + } 4.8970 +}; 4.8971 + 4.8972 +// Remove in 2.0 - this supports IE8's panic based approach 4.8973 +// to setting things on disconnected nodes 4.8974 + 4.8975 +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { 4.8976 + set: function( tween ) { 4.8977 + if ( tween.elem.nodeType && tween.elem.parentNode ) { 4.8978 + tween.elem[ tween.prop ] = tween.now; 4.8979 + } 4.8980 + } 4.8981 +}; 4.8982 + 4.8983 +jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { 4.8984 + var cssFn = jQuery.fn[ name ]; 4.8985 + jQuery.fn[ name ] = function( speed, easing, callback ) { 4.8986 + return speed == null || typeof speed === "boolean" || 4.8987 + // special check for .toggle( handler, handler, ... ) 4.8988 + ( !i && jQuery.isFunction( speed ) && jQuery.isFunction( easing ) ) ? 4.8989 + cssFn.apply( this, arguments ) : 4.8990 + this.animate( genFx( name, true ), speed, easing, callback ); 4.8991 + }; 4.8992 +}); 4.8993 + 4.8994 +jQuery.fn.extend({ 4.8995 + fadeTo: function( speed, to, easing, callback ) { 4.8996 + 4.8997 + // show any hidden elements after setting opacity to 0 4.8998 + return this.filter( isHidden ).css( "opacity", 0 ).show() 4.8999 + 4.9000 + // animate to the value specified 4.9001 + .end().animate({ opacity: to }, speed, easing, callback ); 4.9002 + }, 4.9003 + animate: function( prop, speed, easing, callback ) { 4.9004 + var empty = jQuery.isEmptyObject( prop ), 4.9005 + optall = jQuery.speed( speed, easing, callback ), 4.9006 + doAnimation = function() { 4.9007 + // Operate on a copy of prop so per-property easing won't be lost 4.9008 + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); 4.9009 + 4.9010 + // Empty animations resolve immediately 4.9011 + if ( empty ) { 4.9012 + anim.stop( true ); 4.9013 + } 4.9014 + }; 4.9015 + 4.9016 + return empty || optall.queue === false ? 4.9017 + this.each( doAnimation ) : 4.9018 + this.queue( optall.queue, doAnimation ); 4.9019 + }, 4.9020 + stop: function( type, clearQueue, gotoEnd ) { 4.9021 + var stopQueue = function( hooks ) { 4.9022 + var stop = hooks.stop; 4.9023 + delete hooks.stop; 4.9024 + stop( gotoEnd ); 4.9025 + }; 4.9026 + 4.9027 + if ( typeof type !== "string" ) { 4.9028 + gotoEnd = clearQueue; 4.9029 + clearQueue = type; 4.9030 + type = undefined; 4.9031 + } 4.9032 + if ( clearQueue && type !== false ) { 4.9033 + this.queue( type || "fx", [] ); 4.9034 + } 4.9035 + 4.9036 + return this.each(function() { 4.9037 + var dequeue = true, 4.9038 + index = type != null && type + "queueHooks", 4.9039 + timers = jQuery.timers, 4.9040 + data = jQuery._data( this ); 4.9041 + 4.9042 + if ( index ) { 4.9043 + if ( data[ index ] && data[ index ].stop ) { 4.9044 + stopQueue( data[ index ] ); 4.9045 + } 4.9046 + } else { 4.9047 + for ( index in data ) { 4.9048 + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { 4.9049 + stopQueue( data[ index ] ); 4.9050 + } 4.9051 + } 4.9052 + } 4.9053 + 4.9054 + for ( index = timers.length; index--; ) { 4.9055 + if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { 4.9056 + timers[ index ].anim.stop( gotoEnd ); 4.9057 + dequeue = false; 4.9058 + timers.splice( index, 1 ); 4.9059 + } 4.9060 + } 4.9061 + 4.9062 + // start the next in the queue if the last step wasn't forced 4.9063 + // timers currently will call their complete callbacks, which will dequeue 4.9064 + // but only if they were gotoEnd 4.9065 + if ( dequeue || !gotoEnd ) { 4.9066 + jQuery.dequeue( this, type ); 4.9067 + } 4.9068 + }); 4.9069 + } 4.9070 +}); 4.9071 + 4.9072 +// Generate parameters to create a standard animation 4.9073 +function genFx( type, includeWidth ) { 4.9074 + var which, 4.9075 + attrs = { height: type }, 4.9076 + i = 0; 4.9077 + 4.9078 + // if we include width, step value is 1 to do all cssExpand values, 4.9079 + // if we don't include width, step value is 2 to skip over Left and Right 4.9080 + includeWidth = includeWidth? 1 : 0; 4.9081 + for( ; i < 4 ; i += 2 - includeWidth ) { 4.9082 + which = cssExpand[ i ]; 4.9083 + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; 4.9084 + } 4.9085 + 4.9086 + if ( includeWidth ) { 4.9087 + attrs.opacity = attrs.width = type; 4.9088 + } 4.9089 + 4.9090 + return attrs; 4.9091 +} 4.9092 + 4.9093 +// Generate shortcuts for custom animations 4.9094 +jQuery.each({ 4.9095 + slideDown: genFx("show"), 4.9096 + slideUp: genFx("hide"), 4.9097 + slideToggle: genFx("toggle"), 4.9098 + fadeIn: { opacity: "show" }, 4.9099 + fadeOut: { opacity: "hide" }, 4.9100 + fadeToggle: { opacity: "toggle" } 4.9101 +}, function( name, props ) { 4.9102 + jQuery.fn[ name ] = function( speed, easing, callback ) { 4.9103 + return this.animate( props, speed, easing, callback ); 4.9104 + }; 4.9105 +}); 4.9106 + 4.9107 +jQuery.speed = function( speed, easing, fn ) { 4.9108 + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { 4.9109 + complete: fn || !fn && easing || 4.9110 + jQuery.isFunction( speed ) && speed, 4.9111 + duration: speed, 4.9112 + easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing 4.9113 + }; 4.9114 + 4.9115 + opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : 4.9116 + opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; 4.9117 + 4.9118 + // normalize opt.queue - true/undefined/null -> "fx" 4.9119 + if ( opt.queue == null || opt.queue === true ) { 4.9120 + opt.queue = "fx"; 4.9121 + } 4.9122 + 4.9123 + // Queueing 4.9124 + opt.old = opt.complete; 4.9125 + 4.9126 + opt.complete = function() { 4.9127 + if ( jQuery.isFunction( opt.old ) ) { 4.9128 + opt.old.call( this ); 4.9129 + } 4.9130 + 4.9131 + if ( opt.queue ) { 4.9132 + jQuery.dequeue( this, opt.queue ); 4.9133 + } 4.9134 + }; 4.9135 + 4.9136 + return opt; 4.9137 +}; 4.9138 + 4.9139 +jQuery.easing = { 4.9140 + linear: function( p ) { 4.9141 + return p; 4.9142 + }, 4.9143 + swing: function( p ) { 4.9144 + return 0.5 - Math.cos( p*Math.PI ) / 2; 4.9145 + } 4.9146 +}; 4.9147 + 4.9148 +jQuery.timers = []; 4.9149 +jQuery.fx = Tween.prototype.init; 4.9150 +jQuery.fx.tick = function() { 4.9151 + var timer, 4.9152 + timers = jQuery.timers, 4.9153 + i = 0; 4.9154 + 4.9155 + for ( ; i < timers.length; i++ ) { 4.9156 + timer = timers[ i ]; 4.9157 + // Checks the timer has not already been removed 4.9158 + if ( !timer() && timers[ i ] === timer ) { 4.9159 + timers.splice( i--, 1 ); 4.9160 + } 4.9161 + } 4.9162 + 4.9163 + if ( !timers.length ) { 4.9164 + jQuery.fx.stop(); 4.9165 + } 4.9166 +}; 4.9167 + 4.9168 +jQuery.fx.timer = function( timer ) { 4.9169 + if ( timer() && jQuery.timers.push( timer ) && !timerId ) { 4.9170 + timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); 4.9171 + } 4.9172 +}; 4.9173 + 4.9174 +jQuery.fx.interval = 13; 4.9175 + 4.9176 +jQuery.fx.stop = function() { 4.9177 + clearInterval( timerId ); 4.9178 + timerId = null; 4.9179 +}; 4.9180 + 4.9181 +jQuery.fx.speeds = { 4.9182 + slow: 600, 4.9183 + fast: 200, 4.9184 + // Default speed 4.9185 + _default: 400 4.9186 +}; 4.9187 + 4.9188 +// Back Compat <1.8 extension point 4.9189 +jQuery.fx.step = {}; 4.9190 + 4.9191 +if ( jQuery.expr && jQuery.expr.filters ) { 4.9192 + jQuery.expr.filters.animated = function( elem ) { 4.9193 + return jQuery.grep(jQuery.timers, function( fn ) { 4.9194 + return elem === fn.elem; 4.9195 + }).length; 4.9196 + }; 4.9197 +} 4.9198 +var rroot = /^(?:body|html)$/i; 4.9199 + 4.9200 +jQuery.fn.offset = function( options ) { 4.9201 + if ( arguments.length ) { 4.9202 + return options === undefined ? 4.9203 + this : 4.9204 + this.each(function( i ) { 4.9205 + jQuery.offset.setOffset( this, options, i ); 4.9206 + }); 4.9207 + } 4.9208 + 4.9209 + var docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft, 4.9210 + box = { top: 0, left: 0 }, 4.9211 + elem = this[ 0 ], 4.9212 + doc = elem && elem.ownerDocument; 4.9213 + 4.9214 + if ( !doc ) { 4.9215 + return; 4.9216 + } 4.9217 + 4.9218 + if ( (body = doc.body) === elem ) { 4.9219 + return jQuery.offset.bodyOffset( elem ); 4.9220 + } 4.9221 + 4.9222 + docElem = doc.documentElement; 4.9223 + 4.9224 + // Make sure it's not a disconnected DOM node 4.9225 + if ( !jQuery.contains( docElem, elem ) ) { 4.9226 + return box; 4.9227 + } 4.9228 + 4.9229 + // If we don't have gBCR, just use 0,0 rather than error 4.9230 + // BlackBerry 5, iOS 3 (original iPhone) 4.9231 + if ( typeof elem.getBoundingClientRect !== "undefined" ) { 4.9232 + box = elem.getBoundingClientRect(); 4.9233 + } 4.9234 + win = getWindow( doc ); 4.9235 + clientTop = docElem.clientTop || body.clientTop || 0; 4.9236 + clientLeft = docElem.clientLeft || body.clientLeft || 0; 4.9237 + scrollTop = win.pageYOffset || docElem.scrollTop; 4.9238 + scrollLeft = win.pageXOffset || docElem.scrollLeft; 4.9239 + return { 4.9240 + top: box.top + scrollTop - clientTop, 4.9241 + left: box.left + scrollLeft - clientLeft 4.9242 + }; 4.9243 +}; 4.9244 + 4.9245 +jQuery.offset = { 4.9246 + 4.9247 + bodyOffset: function( body ) { 4.9248 + var top = body.offsetTop, 4.9249 + left = body.offsetLeft; 4.9250 + 4.9251 + if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) { 4.9252 + top += parseFloat( jQuery.css(body, "marginTop") ) || 0; 4.9253 + left += parseFloat( jQuery.css(body, "marginLeft") ) || 0; 4.9254 + } 4.9255 + 4.9256 + return { top: top, left: left }; 4.9257 + }, 4.9258 + 4.9259 + setOffset: function( elem, options, i ) { 4.9260 + var position = jQuery.css( elem, "position" ); 4.9261 + 4.9262 + // set position first, in-case top/left are set even on static elem 4.9263 + if ( position === "static" ) { 4.9264 + elem.style.position = "relative"; 4.9265 + } 4.9266 + 4.9267 + var curElem = jQuery( elem ), 4.9268 + curOffset = curElem.offset(), 4.9269 + curCSSTop = jQuery.css( elem, "top" ), 4.9270 + curCSSLeft = jQuery.css( elem, "left" ), 4.9271 + calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, 4.9272 + props = {}, curPosition = {}, curTop, curLeft; 4.9273 + 4.9274 + // need to be able to calculate position if either top or left is auto and position is either absolute or fixed 4.9275 + if ( calculatePosition ) { 4.9276 + curPosition = curElem.position(); 4.9277 + curTop = curPosition.top; 4.9278 + curLeft = curPosition.left; 4.9279 + } else { 4.9280 + curTop = parseFloat( curCSSTop ) || 0; 4.9281 + curLeft = parseFloat( curCSSLeft ) || 0; 4.9282 + } 4.9283 + 4.9284 + if ( jQuery.isFunction( options ) ) { 4.9285 + options = options.call( elem, i, curOffset ); 4.9286 + } 4.9287 + 4.9288 + if ( options.top != null ) { 4.9289 + props.top = ( options.top - curOffset.top ) + curTop; 4.9290 + } 4.9291 + if ( options.left != null ) { 4.9292 + props.left = ( options.left - curOffset.left ) + curLeft; 4.9293 + } 4.9294 + 4.9295 + if ( "using" in options ) { 4.9296 + options.using.call( elem, props ); 4.9297 + } else { 4.9298 + curElem.css( props ); 4.9299 + } 4.9300 + } 4.9301 +}; 4.9302 + 4.9303 + 4.9304 +jQuery.fn.extend({ 4.9305 + 4.9306 + position: function() { 4.9307 + if ( !this[0] ) { 4.9308 + return; 4.9309 + } 4.9310 + 4.9311 + var elem = this[0], 4.9312 + 4.9313 + // Get *real* offsetParent 4.9314 + offsetParent = this.offsetParent(), 4.9315 + 4.9316 + // Get correct offsets 4.9317 + offset = this.offset(), 4.9318 + parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); 4.9319 + 4.9320 + // Subtract element margins 4.9321 + // note: when an element has margin: auto the offsetLeft and marginLeft 4.9322 + // are the same in Safari causing offset.left to incorrectly be 0 4.9323 + offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0; 4.9324 + offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0; 4.9325 + 4.9326 + // Add offsetParent borders 4.9327 + parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0; 4.9328 + parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0; 4.9329 + 4.9330 + // Subtract the two offsets 4.9331 + return { 4.9332 + top: offset.top - parentOffset.top, 4.9333 + left: offset.left - parentOffset.left 4.9334 + }; 4.9335 + }, 4.9336 + 4.9337 + offsetParent: function() { 4.9338 + return this.map(function() { 4.9339 + var offsetParent = this.offsetParent || document.body; 4.9340 + while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) { 4.9341 + offsetParent = offsetParent.offsetParent; 4.9342 + } 4.9343 + return offsetParent || document.body; 4.9344 + }); 4.9345 + } 4.9346 +}); 4.9347 + 4.9348 + 4.9349 +// Create scrollLeft and scrollTop methods 4.9350 +jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { 4.9351 + var top = /Y/.test( prop ); 4.9352 + 4.9353 + jQuery.fn[ method ] = function( val ) { 4.9354 + return jQuery.access( this, function( elem, method, val ) { 4.9355 + var win = getWindow( elem ); 4.9356 + 4.9357 + if ( val === undefined ) { 4.9358 + return win ? (prop in win) ? win[ prop ] : 4.9359 + win.document.documentElement[ method ] : 4.9360 + elem[ method ]; 4.9361 + } 4.9362 + 4.9363 + if ( win ) { 4.9364 + win.scrollTo( 4.9365 + !top ? val : jQuery( win ).scrollLeft(), 4.9366 + top ? val : jQuery( win ).scrollTop() 4.9367 + ); 4.9368 + 4.9369 + } else { 4.9370 + elem[ method ] = val; 4.9371 + } 4.9372 + }, method, val, arguments.length, null ); 4.9373 + }; 4.9374 +}); 4.9375 + 4.9376 +function getWindow( elem ) { 4.9377 + return jQuery.isWindow( elem ) ? 4.9378 + elem : 4.9379 + elem.nodeType === 9 ? 4.9380 + elem.defaultView || elem.parentWindow : 4.9381 + false; 4.9382 +} 4.9383 +// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods 4.9384 +jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { 4.9385 + jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { 4.9386 + // margin is only for outerHeight, outerWidth 4.9387 + jQuery.fn[ funcName ] = function( margin, value ) { 4.9388 + var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), 4.9389 + extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); 4.9390 + 4.9391 + return jQuery.access( this, function( elem, type, value ) { 4.9392 + var doc; 4.9393 + 4.9394 + if ( jQuery.isWindow( elem ) ) { 4.9395 + // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there 4.9396 + // isn't a whole lot we can do. See pull request at this URL for discussion: 4.9397 + // https://github.com/jquery/jquery/pull/764 4.9398 + return elem.document.documentElement[ "client" + name ]; 4.9399 + } 4.9400 + 4.9401 + // Get document width or height 4.9402 + if ( elem.nodeType === 9 ) { 4.9403 + doc = elem.documentElement; 4.9404 + 4.9405 + // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest 4.9406 + // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. 4.9407 + return Math.max( 4.9408 + elem.body[ "scroll" + name ], doc[ "scroll" + name ], 4.9409 + elem.body[ "offset" + name ], doc[ "offset" + name ], 4.9410 + doc[ "client" + name ] 4.9411 + ); 4.9412 + } 4.9413 + 4.9414 + return value === undefined ? 4.9415 + // Get width or height on the element, requesting but not forcing parseFloat 4.9416 + jQuery.css( elem, type, value, extra ) : 4.9417 + 4.9418 + // Set width or height on the element 4.9419 + jQuery.style( elem, type, value, extra ); 4.9420 + }, type, chainable ? margin : undefined, chainable, null ); 4.9421 + }; 4.9422 + }); 4.9423 +}); 4.9424 +// Expose jQuery to the global object 4.9425 +window.jQuery = window.$ = jQuery; 4.9426 + 4.9427 +// Expose jQuery as an AMD module, but only for AMD loaders that 4.9428 +// understand the issues with loading multiple versions of jQuery 4.9429 +// in a page that all might call define(). The loader will indicate 4.9430 +// they have special allowances for multiple jQuery versions by 4.9431 +// specifying define.amd.jQuery = true. Register as a named module, 4.9432 +// since jQuery can be concatenated with other files that may use define, 4.9433 +// but not use a proper concatenation script that understands anonymous 4.9434 +// AMD modules. A named AMD is safest and most robust way to register. 4.9435 +// Lowercase jquery is used because AMD module names are derived from 4.9436 +// file names, and jQuery is normally delivered in a lowercase file name. 4.9437 +// Do this after creating the global so that if an AMD module wants to call 4.9438 +// noConflict to hide this version of jQuery, it will work. 4.9439 +if ( typeof define === "function" && define.amd && define.amd.jQuery ) { 4.9440 + define( "jquery", [], function () { return jQuery; } ); 4.9441 +} 4.9442 + 4.9443 +})( window );
5.1 --- a/endpoint/WebContent/query.jsp Wed Oct 03 15:34:53 2012 +0300 5.2 +++ b/endpoint/WebContent/query.jsp Wed Oct 03 15:52:08 2012 +0300 5.3 @@ -12,6 +12,7 @@ 5.4 <head> 5.5 <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> 5.6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 5.7 + <script type="text/javascript" src="js/more_link.js"></script> 5.8 <link rel="stylesheet" href="style.css" type="text/css" /> 5.9 <script type="text/javascript"> 5.10 function toggleMe(a) { 5.11 @@ -27,6 +28,41 @@ 5.12 return true; 5.13 } 5.14 </script> 5.15 + <script> 5.16 + $(document).ready(function() { 5.17 + var showChar = 100; 5.18 + var ellipsestext = "..."; 5.19 + var moretext = "more"; 5.20 + var lesstext = "less"; 5.21 + $('.more').each(function() { 5.22 + var content = $(this).html(); 5.23 + 5.24 + if(content.length > showChar) { 5.25 + 5.26 + var c = content.substr(0, showChar); 5.27 + var h = content.substr(showChar-1, content.length - showChar); 5.28 + 5.29 + var html = c + '<span class="moreelipses">'+ellipsestext+'</span> <span class="morecontent"><span>' + h + '</span> <a href="" class="morelink">'+moretext+'</a></span>'; 5.30 + 5.31 + $(this).html(html); 5.32 + } 5.33 + 5.34 + }); 5.35 + 5.36 + $(".morelink").click(function(){ 5.37 + if($(this).hasClass("less")) { 5.38 + $(this).removeClass("less"); 5.39 + $(this).html(moretext); 5.40 + } else { 5.41 + $(this).addClass("less"); 5.42 + $(this).html(lesstext); 5.43 + } 5.44 + $(this).parent().prev().toggle(); 5.45 + $(this).prev().toggle(); 5.46 + return false; 5.47 + }); 5.48 + }); 5.49 +</script> 5.50 <% 5.51 if (request.getAttribute("pathToKML") != null) { 5.52 if ("map_local".equals(request.getAttribute("handle"))) { 5.53 @@ -197,7 +233,7 @@ 5.54 } 5.55 5.56 // get format parameter or attribute (the attribute comes from ConnectionBean) 5.57 - String selFormat = ""; 5.58 + String selFormat = "HTML"; 5.59 if (request.getParameter("format") != null) { 5.60 selFormat = request.getParameter("format"); 5.61
6.1 --- a/endpoint/WebContent/style.css Wed Oct 03 15:34:53 2012 +0300 6.2 +++ b/endpoint/WebContent/style.css Wed Oct 03 15:52:08 2012 +0300 6.3 @@ -27,6 +27,7 @@ 6.4 a 6.5 { 6.6 color:black; 6.7 + text-decoration: none; 6.8 } 6.9 6.10 a:hover 6.11 @@ -42,6 +43,12 @@ 6.12 background:#E6A685; 6.13 } 6.14 6.15 +h1 6.16 +{ 6.17 + display: inline; 6.18 + text-align: left; 6.19 +} 6.20 + 6.21 /* ID Styles */ 6.22 6.23 #border 6.24 @@ -57,14 +64,25 @@ 6.25 #padding:5px; 6.26 padding:1px; 6.27 font-size:13px; 6.28 - 6.29 } 6.30 6.31 - 6.32 #output 6.33 { 6.34 border: 1px dashed #bbbbbb; 6.35 } 6.36 +#response 6.37 +{ 6.38 + margin-top: 20px; 6.39 + 6.40 +} 6.41 + 6.42 +#response td{ 6.43 + width: 33.33%; 6.44 +} 6.45 + 6.46 +#response table{ 6.47 + width: 100%; 6.48 +} 6.49 6.50 input[type=submit] 6.51 { 6.52 @@ -138,6 +156,25 @@ 6.53 margin-top:0px; 6.54 } 6.55 6.56 +.logo 6.57 +{ 6.58 + font:20px Arial, Helvetica, sans-serif; 6.59 + color: #333333; 6.60 + letter-spacing:.2em; 6.61 + line-height:30px; 6.62 +} 6.63 + 6.64 +.logo a:link{ 6.65 + padding-left: 10px; 6.66 + padding-top: 20px; 6.67 + text-decoration: none; 6.68 + } 6.69 + 6.70 +.logo a:hover 6.71 +{ 6.72 + color: #333333; 6.73 +} 6.74 + 6.75 .pageName{ 6.76 font: 18px Arial, Helvetica, sans-serif; 6.77 color: #99CC66; 6.78 @@ -182,3 +219,23 @@ 6.79 .linkText:hover { 6.80 text-decoration: underline; 6.81 } 6.82 +.query_results_data{ 6.83 + font:13px Arial, Helvetica, sans-serif; 6.84 +} 6.85 + 6.86 +.comment { 6.87 + width: 400px; 6.88 + background-color: #f0f0f0; 6.89 + margin: 10px; 6.90 +} 6.91 + 6.92 +a.morelink { 6.93 + text-decoration:none; 6.94 + outline: none; 6.95 + color: blue; 6.96 +} 6.97 + 6.98 +.morecontent span { 6.99 + display: none; 6.100 + 6.101 +} 6.102 \ No newline at end of file
7.1 --- a/endpoint/WebContent/teleios-header.html Wed Oct 03 15:34:53 2012 +0300 7.2 +++ b/endpoint/WebContent/teleios-header.html Wed Oct 03 15:52:08 2012 +0300 7.3 @@ -8,9 +8,9 @@ 7.4 <table width="100%" border=0> 7.5 <tr> 7.6 <td width="1"><img src="images/nav2_bg.gif" width="1" height="60"></td> 7.7 - <td valign="top" width="80px"><img border="0" src="images/teleios_logo.png" /></td> 7.8 + <td valign="top" width="50px"><a href="query.jsp"><img border="0" src="images/teleios_logo.png" /></a></td> 7.9 <td valign="top" align="left"> 7.10 - <span class="logo"> stSPARQL Endpoint</span><br><span class="style4"></span></td> 7.11 + <span class="logo"><a href="query.jsp"> stSPARQL Endpoint</a></span><br><span class="style4"></span></td> 7.12 </tr> 7.13 </table> 7.14 </TD>
8.1 --- a/endpoint/pom.xml Wed Oct 03 15:34:53 2012 +0300 8.2 +++ b/endpoint/pom.xml Wed Oct 03 15:52:08 2012 +0300 8.3 @@ -4,7 +4,7 @@ 8.4 <parent> 8.5 <groupId>eu.earthobservatory</groupId> 8.6 <artifactId>strabon</artifactId> 8.7 - <version>3.2.4-SNAPSHOT</version> 8.8 + <version>3.2.5-SNAPSHOT</version> 8.9 </parent> 8.10 8.11 <artifactId>strabon-endpoint</artifactId> 8.12 @@ -189,6 +189,8 @@ 8.13 <include>query.jsp</include> 8.14 <include>describe.jsp</include> 8.15 <include>connection.jsp</include> 8.16 + <include>connection.jsp</include> 8.17 + <include>browse.jsp</include> 8.18 <include>teleios-header.html</include> 8.19 </includes> 8.20 </resource>
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 9.2 +++ b/endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/BrowseBean.java Wed Oct 03 15:52:08 2012 +0300 9.3 @@ -0,0 +1,212 @@ 9.4 +/** 9.5 + * This Source Code Form is subject to the terms of the Mozilla Public 9.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 9.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. 9.8 + * 9.9 + * Copyright (C) 2010, 2011, 2012, Pyravlos Team 9.10 + * 9.11 + * http://www.strabon.di.uoa.gr/ 9.12 + */ 9.13 +package eu.earthobservatory.org.StrabonEndpoint; 9.14 + 9.15 +import java.io.ByteArrayOutputStream; 9.16 +import java.io.IOException; 9.17 +import java.net.URLDecoder; 9.18 + 9.19 +import javax.servlet.RequestDispatcher; 9.20 +import javax.servlet.ServletConfig; 9.21 +import javax.servlet.ServletContext; 9.22 +import javax.servlet.ServletException; 9.23 +import javax.servlet.ServletOutputStream; 9.24 +import javax.servlet.http.HttpServlet; 9.25 +import javax.servlet.http.HttpServletRequest; 9.26 +import javax.servlet.http.HttpServletResponse; 9.27 + 9.28 +import org.apache.commons.lang.StringEscapeUtils; 9.29 +import org.openrdf.query.resultio.stSPARQLQueryResultFormat; 9.30 +import org.slf4j.Logger; 9.31 +import org.slf4j.LoggerFactory; 9.32 +import org.springframework.web.context.WebApplicationContext; 9.33 +import org.springframework.web.context.support.WebApplicationContextUtils; 9.34 + 9.35 +/*@author Stella Giannakopoulou <sgian@di.uoa.gr>*/ 9.36 + 9.37 +public class BrowseBean extends HttpServlet { 9.38 + 9.39 + private static final long serialVersionUID = -378175118289907707L; 9.40 + 9.41 + private static Logger logger = LoggerFactory 9.42 + .getLogger(eu.earthobservatory.org.StrabonEndpoint.BrowseBean.class); 9.43 + 9.44 + /** 9.45 + * Attributes carrying values to be rendered by the browse.jsp file 9.46 + */ 9.47 + private static final String ERROR = "error"; 9.48 + private static final String RESPONSE = "response"; 9.49 + 9.50 + /** 9.51 + * Error returned by BrowseBean 9.52 + */ 9.53 + private static final String PARAM_ERROR = "stSPARQL Query Results Format or SPARQL query are not set or are invalid."; 9.54 + 9.55 + /** 9.56 + * The context of the servlet 9.57 + */ 9.58 + private ServletContext context; 9.59 + 9.60 + /** 9.61 + * Wrapper over Strabon 9.62 + */ 9.63 + private StrabonBeanWrapper strabonWrapper; 9.64 + 9.65 + 9.66 + public void doGet(HttpServletRequest request, HttpServletResponse response) 9.67 + throws ServletException, IOException { 9.68 + doPost(request, response); 9.69 + } 9.70 + 9.71 + public void init(ServletConfig servletConfig) throws ServletException { 9.72 + super.init(servletConfig); 9.73 + 9.74 + // get the context of the servlet 9.75 + context = getServletContext(); 9.76 + 9.77 + // get the context of the application 9.78 + WebApplicationContext applicationContext = WebApplicationContextUtils 9.79 + .getWebApplicationContext(context); 9.80 + 9.81 + // the the strabon wrapper 9.82 + strabonWrapper = (StrabonBeanWrapper) applicationContext 9.83 + .getBean("strabonBean"); 9.84 + 9.85 + } 9.86 + 9.87 + public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 9.88 + request.setCharacterEncoding("UTF-8"); 9.89 + 9.90 + // check connection details 9.91 + if (strabonWrapper.getStrabon() == null) { 9.92 + RequestDispatcher dispatcher = request 9.93 + .getRequestDispatcher("/connection.jsp"); 9.94 + 9.95 + // pass the current details of the connection 9.96 + request.setAttribute("username", strabonWrapper.getUsername()); 9.97 + request.setAttribute("password", strabonWrapper.getPassword()); 9.98 + request.setAttribute("dbname", strabonWrapper.getDatabaseName()); 9.99 + request.setAttribute("hostname", strabonWrapper.getHostName()); 9.100 + request.setAttribute("port", strabonWrapper.getPort()); 9.101 + request.setAttribute("dbengine", strabonWrapper.getDBEngine()); 9.102 + 9.103 + // pass the other parameters as well 9.104 + request.setAttribute("query", request.getParameter("query")); 9.105 + request.setAttribute("format", request.getParameter("format")); 9.106 + request.setAttribute("handle", request.getParameter("handle")); 9.107 + 9.108 + // forward the request 9.109 + dispatcher.forward(request, response); 9.110 + 9.111 + } else { 9.112 + 9.113 + if (Common.VIEW_TYPE.equals(request.getParameter(Common.VIEW))) { 9.114 + // HTML visual interface 9.115 + processVIEWRequest(request, response); 9.116 + 9.117 + } else {// invoked as a service 9.118 + processRequest(request, response); 9.119 + } 9.120 + } 9.121 + } 9.122 + 9.123 + /** 9.124 + * Processes the request made by a client of the endpoint that uses it as a 9.125 + * service. 9.126 + * 9.127 + * @param request 9.128 + * @param response 9.129 + * @throws IOException 9.130 + */ 9.131 + private void processRequest(HttpServletRequest request, 9.132 + HttpServletResponse response) throws IOException { 9.133 + ServletOutputStream out = response.getOutputStream(); 9.134 + 9.135 + // get the stSPARQL Query Result format (we check only the Accept 9.136 + // header) 9.137 + stSPARQLQueryResultFormat format = stSPARQLQueryResultFormat.forMIMEType(request.getHeader("accept")); 9.138 + 9.139 + // get the query 9.140 + String query = request.getParameter("query"); 9.141 + 9.142 + // check for required parameters 9.143 + if (format == null || query == null) { 9.144 + response.setStatus(HttpServletResponse.SC_BAD_REQUEST); 9.145 + out.print(ResponseMessages.getXMLHeader()); 9.146 + out.print(ResponseMessages.getXMLException(PARAM_ERROR)); 9.147 + out.print(ResponseMessages.getXMLFooter()); 9.148 + 9.149 + } else { 9.150 + // decode the query 9.151 + query = URLDecoder.decode(request.getParameter("query"), "UTF-8&quo