Changeset 10360
- Timestamp:
- 01/14/2009 09:55:26 PM (16 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/jquery/jquery.js
r10352 r10360 1 /* !2 * jQuery JavaScript Library v1.3 rc21 /* 2 * jQuery JavaScript Library v1.3 3 3 * http://jquery.com/ 4 4 * … … 7 7 * http://docs.jquery.com/License 8 8 * 9 * Date: 2009-01-1 2 19:11:21 -0500 (Mon, 12Jan 2009)10 * Revision: 610 09 * Date: 2009-01-13 12:50:31 -0500 (Tue, 13 Jan 2009) 10 * Revision: 6104 11 11 */ 12 (function(){ 13 14 var 15 // Will speed up references to window, and allows munging its name. 16 window = this, 17 // Will speed up references to undefined, and allows munging its name. 18 undefined, 19 // Map over jQuery in case of overwrite 20 _jQuery = window.jQuery, 21 // Map over the $ in case of overwrite 22 _$ = window.$, 23 24 jQuery = window.jQuery = window.$ = function( selector, context ) { 25 // The jQuery object is actually just the init constructor 'enhanced' 26 return new jQuery.fn.init( selector, context ); 27 }, 28 29 // A simple way to check for HTML strings or ID strings 30 // (both of which we optimize for) 31 quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/, 32 // Is it a simple selector 33 isSimple = /^.[^:#\[\.,]*$/; 34 35 jQuery.fn = jQuery.prototype = { 36 init: function( selector, context ) { 37 // Make sure that a selection was provided 38 selector = selector || document; 39 40 // Handle $(DOMElement) 41 if ( selector.nodeType ) { 42 this[0] = selector; 43 this.length = 1; 44 this.context = selector; 45 return this; 46 } 47 // Handle HTML strings 48 if ( typeof selector === "string" ) { 49 // Are we dealing with HTML string or an ID? 50 var match = quickExpr.exec( selector ); 51 52 // Verify a match, and that no context was specified for #id 53 if ( match && (match[1] || !context) ) { 54 55 // HANDLE: $(html) -> $(array) 56 if ( match[1] ) 57 selector = jQuery.clean( [ match[1] ], context ); 58 59 // HANDLE: $("#id") 60 else { 61 var elem = document.getElementById( match[3] ); 62 63 // Make sure an element was located 64 if ( elem ){ 65 // Handle the case where IE and Opera return items 66 // by name instead of ID 67 if ( elem.id != match[3] ) 68 return jQuery().find( selector ); 69 70 // Otherwise, we inject the element directly into the jQuery object 71 var ret = jQuery( elem ); 72 ret.context = document; 73 ret.selector = selector; 74 return ret; 75 } 76 selector = []; 77 } 78 79 // HANDLE: $(expr, [context]) 80 // (which is just equivalent to: $(content).find(expr) 81 } else 82 return jQuery( context ).find( selector ); 83 84 // HANDLE: $(function) 85 // Shortcut for document ready 86 } else if ( jQuery.isFunction( selector ) ) 87 return jQuery( document ).ready( selector ); 88 89 // Make sure that old selector state is passed along 90 if ( selector.selector && selector.context ) { 91 this.selector = selector.selector; 92 this.context = selector.context; 93 } 94 95 return this.setArray(jQuery.makeArray(selector)); 96 }, 97 98 // Start with an empty selector 99 selector: "", 100 101 // The current version of jQuery being used 102 jquery: "1.3rc2", 103 104 // The number of elements contained in the matched element set 105 size: function() { 106 return this.length; 107 }, 108 109 // Get the Nth element in the matched element set OR 110 // Get the whole matched element set as a clean array 111 get: function( num ) { 112 return num === undefined ? 113 114 // Return a 'clean' array 115 jQuery.makeArray( this ) : 116 117 // Return just the object 118 this[ num ]; 119 }, 120 121 // Take an array of elements and push it onto the stack 122 // (returning the new matched element set) 123 pushStack: function( elems, name, selector ) { 124 // Build a new jQuery matched element set 125 var ret = jQuery( elems ); 126 127 // Add the old object onto the stack (as a reference) 128 ret.prevObject = this; 129 130 ret.context = this.context; 131 132 if ( name === "find" ) 133 ret.selector = this.selector + (this.selector ? " " : "") + selector; 134 else if ( name ) 135 ret.selector = this.selector + "." + name + "(" + selector + ")"; 136 137 // Return the newly-formed element set 138 return ret; 139 }, 140 141 // Force the current matched set of elements to become 142 // the specified array of elements (destroying the stack in the process) 143 // You should use pushStack() in order to do this, but maintain the stack 144 setArray: function( elems ) { 145 // Resetting the length to 0, then using the native Array push 146 // is a super-fast way to populate an object with array-like properties 147 this.length = 0; 148 Array.prototype.push.apply( this, elems ); 149 150 return this; 151 }, 152 153 // Execute a callback for every element in the matched set. 154 // (You can seed the arguments with an array of args, but this is 155 // only used internally.) 156 each: function( callback, args ) { 157 return jQuery.each( this, callback, args ); 158 }, 159 160 // Determine the position of an element within 161 // the matched set of elements 162 index: function( elem ) { 163 // Locate the position of the desired element 164 return jQuery.inArray( 165 // If it receives a jQuery object, the first element is used 166 elem && elem.jquery ? elem[0] : elem 167 , this ); 168 }, 169 170 attr: function( name, value, type ) { 171 var options = name; 172 173 // Look for the case where we're accessing a style value 174 if ( typeof name === "string" ) 175 if ( value === undefined ) 176 return this[0] && jQuery[ type || "attr" ]( this[0], name ); 177 178 else { 179 options = {}; 180 options[ name ] = value; 181 } 182 183 // Check to see if we're setting style values 184 return this.each(function(i){ 185 // Set all the styles 186 for ( name in options ) 187 jQuery.attr( 188 type ? 189 this.style : 190 this, 191 name, jQuery.prop( this, options[ name ], type, i, name ) 192 ); 193 }); 194 }, 195 196 css: function( key, value ) { 197 // ignore negative width and height values 198 if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) 199 value = undefined; 200 return this.attr( key, value, "curCSS" ); 201 }, 202 203 text: function( text ) { 204 if ( typeof text !== "object" && text != null ) 205 return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); 206 207 var ret = ""; 208 209 jQuery.each( text || this, function(){ 210 jQuery.each( this.childNodes, function(){ 211 if ( this.nodeType != 8 ) 212 ret += this.nodeType != 1 ? 213 this.nodeValue : 214 jQuery.fn.text( [ this ] ); 215 }); 216 }); 217 218 return ret; 219 }, 220 221 wrapAll: function( html ) { 222 if ( this[0] ) { 223 // The elements to wrap the target around 224 var wrap = jQuery( html, this[0].ownerDocument ).clone(); 225 226 if ( this[0].parentNode ) 227 wrap.insertBefore( this[0] ); 228 229 wrap.map(function(){ 230 var elem = this; 231 232 while ( elem.firstChild ) 233 elem = elem.firstChild; 234 235 return elem; 236 }).append(this); 237 } 238 239 return this; 240 }, 241 242 wrapInner: function( html ) { 243 return this.each(function(){ 244 jQuery( this ).contents().wrapAll( html ); 245 }); 246 }, 247 248 wrap: function( html ) { 249 return this.each(function(){ 250 jQuery( this ).wrapAll( html ); 251 }); 252 }, 253 254 append: function() { 255 return this.domManip(arguments, true, function(elem){ 256 if (this.nodeType == 1) 257 this.appendChild( elem ); 258 }); 259 }, 260 261 prepend: function() { 262 return this.domManip(arguments, true, function(elem){ 263 if (this.nodeType == 1) 264 this.insertBefore( elem, this.firstChild ); 265 }); 266 }, 267 268 before: function() { 269 return this.domManip(arguments, false, function(elem){ 270 this.parentNode.insertBefore( elem, this ); 271 }); 272 }, 273 274 after: function() { 275 return this.domManip(arguments, false, function(elem){ 276 this.parentNode.insertBefore( elem, this.nextSibling ); 277 }); 278 }, 279 280 end: function() { 281 return this.prevObject || jQuery( [] ); 282 }, 283 284 // For internal use only. 285 // Behaves like an Array's .push method, not like a jQuery method. 286 push: [].push, 287 288 find: function( selector ) { 289 if ( this.length === 1 && !/,/.test(selector) ) { 290 var ret = this.pushStack( [], "find", selector ); 291 ret.length = 0; 292 jQuery.find( selector, this[0], ret ); 293 return ret; 294 } else { 295 var elems = jQuery.map(this, function(elem){ 296 return jQuery.find( selector, elem ); 297 }); 298 299 return this.pushStack( /[^+>] [^+>]/.test( selector ) ? 300 jQuery.unique( elems ) : 301 elems, "find", selector ); 302 } 303 }, 304 305 clone: function( events ) { 306 // Do the clone 307 var ret = this.map(function(){ 308 if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) { 309 // IE copies events bound via attachEvent when 310 // using cloneNode. Calling detachEvent on the 311 // clone will also remove the events from the orignal 312 // In order to get around this, we use innerHTML. 313 // Unfortunately, this means some modifications to 314 // attributes in IE that are actually only stored 315 // as properties will not be copied (such as the 316 // the name attribute on an input). 317 var clone = this.cloneNode(true), 318 container = document.createElement("div"); 319 container.appendChild(clone); 320 return jQuery.clean([container.innerHTML])[0]; 321 } else 322 return this.cloneNode(true); 323 }); 324 325 // Need to set the expando to null on the cloned set if it exists 326 // removeData doesn't work here, IE removes it from the original as well 327 // this is primarily for IE but the data expando shouldn't be copied over in any browser 328 var clone = ret.find("*").andSelf().each(function(){ 329 if ( this[ expando ] !== undefined ) 330 this[ expando ] = null; 331 }); 332 333 // Copy the events from the original to the clone 334 if ( events === true ) 335 this.find("*").andSelf().each(function(i){ 336 if (this.nodeType == 3) 337 return; 338 var events = jQuery.data( this, "events" ); 339 340 for ( var type in events ) 341 for ( var handler in events[ type ] ) 342 jQuery.event.add( clone[ i ], type, events[ type ][ handler ], events[ type ][ handler ].data ); 343 }); 344 345 // Return the cloned set 346 return ret; 347 }, 348 349 filter: function( selector ) { 350 return this.pushStack( 351 jQuery.isFunction( selector ) && 352 jQuery.grep(this, function(elem, i){ 353 return selector.call( elem, i ); 354 }) || 355 356 jQuery.multiFilter( selector, jQuery.grep(this, function(elem){ 357 return elem.nodeType === 1; 358 }) ), "filter", selector ); 359 }, 360 361 closest: function( selector ) { 362 var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null; 363 364 return this.map(function(){ 365 var cur = this; 366 while ( cur && cur.ownerDocument ) { 367 if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) 368 return cur; 369 cur = cur.parentNode; 370 } 371 }); 372 }, 373 374 not: function( selector ) { 375 if ( typeof selector === "string" ) 376 // test special case where just one selector is passed in 377 if ( isSimple.test( selector ) ) 378 return this.pushStack( jQuery.multiFilter( selector, this, true ), "not", selector ); 379 else 380 selector = jQuery.multiFilter( selector, this ); 381 382 var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; 383 return this.filter(function() { 384 return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; 385 }); 386 }, 387 388 add: function( selector ) { 389 return this.pushStack( jQuery.unique( jQuery.merge( 390 this.get(), 391 typeof selector === "string" ? 392 jQuery( selector ) : 393 jQuery.makeArray( selector ) 394 ))); 395 }, 396 397 is: function( selector ) { 398 return !!selector && jQuery.multiFilter( selector, this ).length > 0; 399 }, 400 401 hasClass: function( selector ) { 402 return !!selector && this.is( "." + selector ); 403 }, 404 405 val: function( value ) { 406 if ( value === undefined ) { 407 var elem = this[0]; 408 409 if ( elem ) { 410 if( jQuery.nodeName( elem, 'option' ) ) 411 return (elem.attributes.value || {}).specified ? elem.value : elem.text; 412 413 // We need to handle select boxes special 414 if ( jQuery.nodeName( elem, "select" ) ) { 415 var index = elem.selectedIndex, 416 values = [], 417 options = elem.options, 418 one = elem.type == "select-one"; 419 420 // Nothing was selected 421 if ( index < 0 ) 422 return null; 423 424 // Loop through all the selected options 425 for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { 426 var option = options[ i ]; 427 428 if ( option.selected ) { 429 // Get the specifc value for the option 430 value = jQuery(option).val(); 431 432 // We don't need an array for one selects 433 if ( one ) 434 return value; 435 436 // Multi-Selects return an array 437 values.push( value ); 438 } 439 } 440 441 return values; 442 } 443 444 // Everything else, we just grab the value 445 return (elem.value || "").replace(/\r/g, ""); 446 447 } 448 449 return undefined; 450 } 451 452 if ( typeof value === "number" ) 453 value += ''; 454 455 return this.each(function(){ 456 if ( this.nodeType != 1 ) 457 return; 458 459 if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) ) 460 this.checked = (jQuery.inArray(this.value, value) >= 0 || 461 jQuery.inArray(this.name, value) >= 0); 462 463 else if ( jQuery.nodeName( this, "select" ) ) { 464 var values = jQuery.makeArray(value); 465 466 jQuery( "option", this ).each(function(){ 467 this.selected = (jQuery.inArray( this.value, values ) >= 0 || 468 jQuery.inArray( this.text, values ) >= 0); 469 }); 470 471 if ( !values.length ) 472 this.selectedIndex = -1; 473 474 } else 475 this.value = value; 476 }); 477 }, 478 479 html: function( value ) { 480 return value === undefined ? 481 (this[0] ? 482 this[0].innerHTML : 483 null) : 484 this.empty().append( value ); 485 }, 486 487 replaceWith: function( value ) { 488 return this.after( value ).remove(); 489 }, 490 491 eq: function( i ) { 492 return this.slice( i, +i + 1 ); 493 }, 494 495 slice: function() { 496 return this.pushStack( Array.prototype.slice.apply( this, arguments ), 497 "slice", Array.prototype.slice.call(arguments).join(",") ); 498 }, 499 500 map: function( callback ) { 501 return this.pushStack( jQuery.map(this, function(elem, i){ 502 return callback.call( elem, i, elem ); 503 })); 504 }, 505 506 andSelf: function() { 507 return this.add( this.prevObject ); 508 }, 509 510 domManip: function( args, table, callback ) { 511 if ( this[0] ) { 512 var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(), 513 scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ), 514 first = fragment.firstChild, 515 extra = this.length > 1 ? fragment.cloneNode(true) : fragment; 516 517 if ( first ) 518 for ( var i = 0, l = this.length; i < l; i++ ) 519 callback.call( root(this[i], first), i > 0 ? extra.cloneNode(true) : fragment ); 520 521 if ( scripts ) 522 jQuery.each( scripts, evalScript ); 523 } 524 525 return this; 526 527 function root( elem, cur ) { 528 return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ? 529 (elem.getElementsByTagName("tbody")[0] || 530 elem.appendChild(elem.ownerDocument.createElement("tbody"))) : 531 elem; 532 } 533 } 534 }; 535 536 // Give the init function the jQuery prototype for later instantiation 537 jQuery.fn.init.prototype = jQuery.fn; 538 539 function evalScript( i, elem ) { 540 if ( elem.src ) 541 jQuery.ajax({ 542 url: elem.src, 543 async: false, 544 dataType: "script" 545 }); 546 547 else 548 jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); 549 550 if ( elem.parentNode ) 551 elem.parentNode.removeChild( elem ); 552 } 553 554 function now(){ 555 return +new Date; 556 } 557 558 jQuery.extend = jQuery.fn.extend = function() { 559 // copy reference to target object 560 var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; 561 562 // Handle a deep copy situation 563 if ( typeof target === "boolean" ) { 564 deep = target; 565 target = arguments[1] || {}; 566 // skip the boolean and the target 567 i = 2; 568 } 569 570 // Handle case when target is a string or something (possible in deep copy) 571 if ( typeof target !== "object" && !jQuery.isFunction(target) ) 572 target = {}; 573 574 // extend jQuery itself if only one argument is passed 575 if ( length == i ) { 576 target = this; 577 --i; 578 } 579 580 for ( ; i < length; i++ ) 581 // Only deal with non-null/undefined values 582 if ( (options = arguments[ i ]) != null ) 583 // Extend the base object 584 for ( var name in options ) { 585 var src = target[ name ], copy = options[ name ]; 586 587 // Prevent never-ending loop 588 if ( target === copy ) 589 continue; 590 591 // Recurse if we're merging object values 592 if ( deep && copy && typeof copy === "object" && !copy.nodeType ) 593 target[ name ] = jQuery.extend( deep, 594 // Never move original objects, clone them 595 src || ( copy.length != null ? [ ] : { } ) 596 , copy ); 597 598 // Don't bring in undefined values 599 else if ( copy !== undefined ) 600 target[ name ] = copy; 601 602 } 603 604 // Return the modified object 605 return target; 606 }; 607 608 // exclude the following css properties to add px 609 var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, 610 // cache defaultView 611 defaultView = document.defaultView || {}, 612 toString = Object.prototype.toString; 613 614 jQuery.extend({ 615 noConflict: function( deep ) { 616 window.$ = _$; 617 618 if ( deep ) 619 window.jQuery = _jQuery; 620 621 return jQuery; 622 }, 623 624 // See test/unit/core.js for details concerning isFunction. 625 // Since version 1.3, DOM methods and functions like alert 626 // aren't supported. They return false on IE (#2968). 627 isFunction: function( obj ) { 628 return toString.call(obj) === "[object Function]"; 629 }, 630 631 isArray: function( obj ) { 632 return toString.call(obj) === "[object Array]"; 633 }, 634 635 // check if an element is in a (or is an) XML document 636 isXMLDoc: function( elem ) { 637 return elem.documentElement && !elem.body || 638 elem.tagName && elem.ownerDocument && !elem.ownerDocument.body; 639 }, 640 641 // Evalulates a script in a global context 642 globalEval: function( data ) { 643 data = jQuery.trim( data ); 644 645 if ( data ) { 646 // Inspired by code by Andrea Giammarchi 647 // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html 648 var head = document.getElementsByTagName("head")[0] || document.documentElement, 649 script = document.createElement("script"); 650 651 script.type = "text/javascript"; 652 if ( jQuery.support.scriptEval ) 653 script.appendChild( document.createTextNode( data ) ); 654 else 655 script.text = data; 656 657 // Use insertBefore instead of appendChild to circumvent an IE6 bug. 658 // This arises when a base node is used (#2709). 659 head.insertBefore( script, head.firstChild ); 660 head.removeChild( script ); 661 } 662 }, 663 664 nodeName: function( elem, name ) { 665 return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); 666 }, 667 668 // args is for internal usage only 669 each: function( object, callback, args ) { 670 var name, i = 0, length = object.length; 671 672 if ( args ) { 673 if ( length === undefined ) { 674 for ( name in object ) 675 if ( callback.apply( object[ name ], args ) === false ) 676 break; 677 } else 678 for ( ; i < length; ) 679 if ( callback.apply( object[ i++ ], args ) === false ) 680 break; 681 682 // A special, fast, case for the most common use of each 683 } else { 684 if ( length === undefined ) { 685 for ( name in object ) 686 if ( callback.call( object[ name ], name, object[ name ] ) === false ) 687 break; 688 } else 689 for ( var value = object[0]; 690 i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} 691 } 692 693 return object; 694 }, 695 696 prop: function( elem, value, type, i, name ) { 697 // Handle executable functions 698 if ( jQuery.isFunction( value ) ) 699 value = value.call( elem, i ); 700 701 // Handle passing in a number to a CSS property 702 return typeof value === "number" && type == "curCSS" && !exclude.test( name ) ? 703 value + "px" : 704 value; 705 }, 706 707 className: { 708 // internal only, use addClass("class") 709 add: function( elem, classNames ) { 710 jQuery.each((classNames || "").split(/\s+/), function(i, className){ 711 if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) 712 elem.className += (elem.className ? " " : "") + className; 713 }); 714 }, 715 716 // internal only, use removeClass("class") 717 remove: function( elem, classNames ) { 718 if (elem.nodeType == 1) 719 elem.className = classNames !== undefined ? 720 jQuery.grep(elem.className.split(/\s+/), function(className){ 721 return !jQuery.className.has( classNames, className ); 722 }).join(" ") : 723 ""; 724 }, 725 726 // internal only, use hasClass("class") 727 has: function( elem, className ) { 728 return jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; 729 } 730 }, 731 732 // A method for quickly swapping in/out CSS properties to get correct calculations 733 swap: function( elem, options, callback ) { 734 var old = {}; 735 // Remember the old values, and insert the new ones 736 for ( var name in options ) { 737 old[ name ] = elem.style[ name ]; 738 elem.style[ name ] = options[ name ]; 739 } 740 741 callback.call( elem ); 742 743 // Revert the old values 744 for ( var name in options ) 745 elem.style[ name ] = old[ name ]; 746 }, 747 748 css: function( elem, name, force ) { 749 if ( name == "width" || name == "height" ) { 750 var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; 751 752 function getWH() { 753 val = name == "width" ? elem.offsetWidth : elem.offsetHeight; 754 var padding = 0, border = 0; 755 jQuery.each( which, function() { 756 padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; 757 border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; 758 }); 759 val -= Math.round(padding + border); 760 } 761 762 if ( jQuery(elem).is(":visible") ) 763 getWH(); 764 else 765 jQuery.swap( elem, props, getWH ); 766 767 return Math.max(0, val); 768 } 769 770 return jQuery.curCSS( elem, name, force ); 771 }, 772 773 curCSS: function( elem, name, force ) { 774 var ret, style = elem.style; 775 776 // We need to handle opacity special in IE 777 if ( name == "opacity" && !jQuery.support.opacity ) { 778 ret = jQuery.attr( style, "opacity" ); 779 780 return ret == "" ? 781 "1" : 782 ret; 783 } 784 785 // Make sure we're using the right name for getting the float value 786 if ( name.match( /float/i ) ) 787 name = styleFloat; 788 789 if ( !force && style && style[ name ] ) 790 ret = style[ name ]; 791 792 else if ( defaultView.getComputedStyle ) { 793 794 // Only "float" is needed here 795 if ( name.match( /float/i ) ) 796 name = "float"; 797 798 name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); 799 800 var computedStyle = defaultView.getComputedStyle( elem, null ); 801 802 if ( computedStyle ) 803 ret = computedStyle.getPropertyValue( name ); 804 805 // We should always get a number back from opacity 806 if ( name == "opacity" && ret == "" ) 807 ret = "1"; 808 809 } else if ( elem.currentStyle ) { 810 var camelCase = name.replace(/\-(\w)/g, function(all, letter){ 811 return letter.toUpperCase(); 812 }); 813 814 ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; 815 816 // From the awesome hack by Dean Edwards 817 // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 818 819 // If we're not dealing with a regular pixel number 820 // but a number that has a weird ending, we need to convert it to pixels 821 if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { 822 // Remember the original values 823 var left = style.left, rsLeft = elem.runtimeStyle.left; 824 825 // Put in the new values to get a computed value out 826 elem.runtimeStyle.left = elem.currentStyle.left; 827 style.left = ret || 0; 828 ret = style.pixelLeft + "px"; 829 830 // Revert the changed values 831 style.left = left; 832 elem.runtimeStyle.left = rsLeft; 833 } 834 } 835 836 return ret; 837 }, 838 839 clean: function( elems, context, fragment ) { 840 context = context || document; 841 842 // !context.createElement fails in IE with an error but returns typeof 'object' 843 if ( typeof context.createElement === "undefined" ) 844 context = context.ownerDocument || context[0] && context[0].ownerDocument || document; 845 846 // If a single string is passed in and it's a single tag 847 // just do a createElement and skip the rest 848 if ( !fragment && elems.length === 1 && typeof elems[0] === "string" ) { 849 var match = /^<(\w+)\s*\/?>$/.exec(elems[0]); 850 if ( match ) 851 return [ context.createElement( match[1] ) ]; 852 } 853 854 var ret = [], scripts = [], div = context.createElement("div"); 855 856 jQuery.each(elems, function(i, elem){ 857 if ( typeof elem === "number" ) 858 elem += ''; 859 860 if ( !elem ) 861 return; 862 863 // Convert html string into DOM nodes 864 if ( typeof elem === "string" ) { 865 // Fix "XHTML"-style tags in all browsers 866 elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ 867 return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? 868 all : 869 front + "></" + tag + ">"; 870 }); 871 872 // Trim whitespace, otherwise indexOf won't work as expected 873 var tags = jQuery.trim( elem ).toLowerCase(); 874 875 var wrap = 876 // option or optgroup 877 !tags.indexOf("<opt") && 878 [ 1, "<select multiple='multiple'>", "</select>" ] || 879 880 !tags.indexOf("<leg") && 881 [ 1, "<fieldset>", "</fieldset>" ] || 882 883 tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && 884 [ 1, "<table>", "</table>" ] || 885 886 !tags.indexOf("<tr") && 887 [ 2, "<table><tbody>", "</tbody></table>" ] || 888 889 // <thead> matched above 890 (!tags.indexOf("<td") || !tags.indexOf("<th")) && 891 [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ] || 892 893 !tags.indexOf("<col") && 894 [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ] || 895 896 // IE can't serialize <link> and <script> tags normally 897 !jQuery.support.htmlSerialize && 898 [ 1, "div<div>", "</div>" ] || 899 900 [ 0, "", "" ]; 901 902 // Go to html and back, then peel off extra wrappers 903 div.innerHTML = wrap[1] + elem + wrap[2]; 904 905 // Move to the right depth 906 while ( wrap[0]-- ) 907 div = div.lastChild; 908 909 // Remove IE's autoinserted <tbody> from table fragments 910 if ( !jQuery.support.tbody ) { 911 912 // String was a <table>, *may* have spurious <tbody> 913 var tbody = !tags.indexOf("<table") && tags.indexOf("<tbody") < 0 ? 914 div.firstChild && div.firstChild.childNodes : 915 916 // String was a bare <thead> or <tfoot> 917 wrap[1] == "<table>" && tags.indexOf("<tbody") < 0 ? 918 div.childNodes : 919 []; 920 921 for ( var j = tbody.length - 1; j >= 0 ; --j ) 922 if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) 923 tbody[ j ].parentNode.removeChild( tbody[ j ] ); 924 925 } 926 927 // IE completely kills leading whitespace when innerHTML is used 928 if ( !jQuery.support.leadingWhitespace && /^\s/.test( elem ) ) 929 div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild ); 930 931 elem = jQuery.makeArray( div.childNodes ); 932 } 933 934 if ( elem.nodeType ) 935 ret.push( elem ); 936 else 937 ret = jQuery.merge( ret, elem ); 938 939 }); 940 941 if ( fragment ) { 942 for ( var i = 0; ret[i]; i++ ) { 943 if ( jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) { 944 scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] ); 945 } else { 946 if ( ret[i].nodeType === 1 ) 947 ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) ); 948 fragment.appendChild( ret[i] ); 949 } 950 } 951 952 return scripts; 953 } 954 955 return ret; 956 }, 957 958 attr: function( elem, name, value ) { 959 // don't set attributes on text and comment nodes 960 if (!elem || elem.nodeType == 3 || elem.nodeType == 8) 961 return undefined; 962 963 var notxml = !jQuery.isXMLDoc( elem ), 964 // Whether we are setting (or getting) 965 set = value !== undefined; 966 967 // Try to normalize/fix the name 968 name = notxml && jQuery.props[ name ] || name; 969 970 // Only do all the following if this is a node (faster for style) 971 // IE elem.getAttribute passes even for style 972 if ( elem.tagName ) { 973 974 // These attributes require special treatment 975 var special = /href|src|style/.test( name ); 976 977 // Safari mis-reports the default selected property of a hidden option 978 // Accessing the parent's selectedIndex property fixes it 979 if ( name == "selected" && elem.parentNode ) 980 elem.parentNode.selectedIndex; 981 982 // If applicable, access the attribute via the DOM 0 way 983 if ( name in elem && notxml && !special ) { 984 if ( set ){ 985 // We can't allow the type property to be changed (since it causes problems in IE) 986 if ( name == "type" && jQuery.nodeName( elem, "input" ) && elem.parentNode ) 987 throw "type property can't be changed"; 988 989 elem[ name ] = value; 990 } 991 992 // browsers index elements by id/name on forms, give priority to attributes. 993 if( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) 994 return elem.getAttributeNode( name ).nodeValue; 995 996 // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set 997 // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ 998 if ( name == "tabIndex" ) { 999 var attributeNode = elem.getAttributeNode( "tabIndex" ); 1000 return attributeNode && attributeNode.specified 1001 ? attributeNode.value 1002 : elem.nodeName.match(/^(a|area|button|input|object|select|textarea)$/i) 1003 ? 0 1004 : undefined; 1005 } 1006 1007 return elem[ name ]; 1008 } 1009 1010 if ( !jQuery.support.style && notxml && name == "style" ) 1011 return jQuery.attr( elem.style, "cssText", value ); 1012 1013 if ( set ) 1014 // convert the value to a string (all browsers do this but IE) see #1070 1015 elem.setAttribute( name, "" + value ); 1016 1017 var attr = !jQuery.support.hrefNormalized && notxml && special 1018 // Some attributes require a special call on IE 1019 ? elem.getAttribute( name, 2 ) 1020 : elem.getAttribute( name ); 1021 1022 // Non-existent attributes return null, we normalize to undefined 1023 return attr === null ? undefined : attr; 1024 } 1025 1026 // elem is actually elem.style ... set the style 1027 1028 // IE uses filters for opacity 1029 if ( !jQuery.support.opacity && name == "opacity" ) { 1030 if ( set ) { 1031 // IE has trouble with opacity if it does not have layout 1032 // Force it by setting the zoom level 1033 elem.zoom = 1; 1034 1035 // Set the alpha filter to set the opacity 1036 elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) + 1037 (parseInt( value ) + '' == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")"); 1038 } 1039 1040 return elem.filter && elem.filter.indexOf("opacity=") >= 0 ? 1041 (parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100) + '': 1042 ""; 1043 } 1044 1045 name = name.replace(/-([a-z])/ig, function(all, letter){ 1046 return letter.toUpperCase(); 1047 }); 1048 1049 if ( set ) 1050 elem[ name ] = value; 1051 1052 return elem[ name ]; 1053 }, 1054 1055 trim: function( text ) { 1056 return (text || "").replace( /^\s+|\s+$/g, "" ); 1057 }, 1058 1059 makeArray: function( array ) { 1060 var ret = []; 1061 1062 if( array != null ){ 1063 var i = array.length; 1064 // The window, strings (and functions) also have 'length' 1065 if( i == null || typeof array === "string" || jQuery.isFunction(array) || array.setInterval ) 1066 ret[0] = array; 1067 else 1068 while( i ) 1069 ret[--i] = array[i]; 1070 } 1071 1072 return ret; 1073 }, 1074 1075 inArray: function( elem, array ) { 1076 for ( var i = 0, length = array.length; i < length; i++ ) 1077 // Use === because on IE, window == document 1078 if ( array[ i ] === elem ) 1079 return i; 1080 1081 return -1; 1082 }, 1083 1084 merge: function( first, second ) { 1085 // We have to loop this way because IE & Opera overwrite the length 1086 // expando of getElementsByTagName 1087 var i = 0, elem, pos = first.length; 1088 // Also, we need to make sure that the correct elements are being returned 1089 // (IE returns comment nodes in a '*' query) 1090 if ( !jQuery.support.getAll ) { 1091 while ( (elem = second[ i++ ]) != null ) 1092 if ( elem.nodeType != 8 ) 1093 first[ pos++ ] = elem; 1094 1095 } else 1096 while ( (elem = second[ i++ ]) != null ) 1097 first[ pos++ ] = elem; 1098 1099 return first; 1100 }, 1101 1102 unique: function( array ) { 1103 var ret = [], done = {}; 1104 1105 try { 1106 1107 for ( var i = 0, length = array.length; i < length; i++ ) { 1108 var id = jQuery.data( array[ i ] ); 1109 1110 if ( !done[ id ] ) { 1111 done[ id ] = true; 1112 ret.push( array[ i ] ); 1113 } 1114 } 1115 1116 } catch( e ) { 1117 ret = array; 1118 } 1119 1120 return ret; 1121 }, 1122 1123 grep: function( elems, callback, inv ) { 1124 var ret = []; 1125 1126 // Go through the array, only saving the items 1127 // that pass the validator function 1128 for ( var i = 0, length = elems.length; i < length; i++ ) 1129 if ( !inv != !callback( elems[ i ], i ) ) 1130 ret.push( elems[ i ] ); 1131 1132 return ret; 1133 }, 1134 1135 map: function( elems, callback ) { 1136 var ret = []; 1137 1138 // Go through the array, translating each of the items to their 1139 // new value (or values). 1140 for ( var i = 0, length = elems.length; i < length; i++ ) { 1141 var value = callback( elems[ i ], i ); 1142 1143 if ( value != null ) 1144 ret[ ret.length ] = value; 1145 } 1146 1147 return ret.concat.apply( [], ret ); 1148 } 1149 }); 1150 1151 // Use of jQuery.browser is deprecated. 1152 // It's included for backwards compatibility and plugins, 1153 // although they should work to migrate away. 1154 1155 var userAgent = navigator.userAgent.toLowerCase(); 1156 1157 // Figure out what browser is being used 1158 jQuery.browser = { 1159 version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1], 1160 safari: /webkit/.test( userAgent ), 1161 opera: /opera/.test( userAgent ), 1162 msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ), 1163 mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent ) 1164 }; 1165 1166 jQuery.each({ 1167 parent: function(elem){return elem.parentNode;}, 1168 parents: function(elem){return jQuery.dir(elem,"parentNode");}, 1169 next: function(elem){return jQuery.nth(elem,2,"nextSibling");}, 1170 prev: function(elem){return jQuery.nth(elem,2,"previousSibling");}, 1171 nextAll: function(elem){return jQuery.dir(elem,"nextSibling");}, 1172 prevAll: function(elem){return jQuery.dir(elem,"previousSibling");}, 1173 siblings: function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);}, 1174 children: function(elem){return jQuery.sibling(elem.firstChild);}, 1175 contents: function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);} 1176 }, function(name, fn){ 1177 jQuery.fn[ name ] = function( selector ) { 1178 var ret = jQuery.map( this, fn ); 1179 1180 if ( selector && typeof selector == "string" ) 1181 ret = jQuery.multiFilter( selector, ret ); 1182 1183 return this.pushStack( jQuery.unique( ret ), name, selector ); 1184 }; 1185 }); 1186 1187 jQuery.each({ 1188 appendTo: "append", 1189 prependTo: "prepend", 1190 insertBefore: "before", 1191 insertAfter: "after", 1192 replaceAll: "replaceWith" 1193 }, function(name, original){ 1194 jQuery.fn[ name ] = function() { 1195 var args = arguments; 1196 1197 return this.each(function(){ 1198 for ( var i = 0, length = args.length; i < length; i++ ) 1199 jQuery( args[ i ] )[ original ]( this ); 1200 }); 1201 }; 1202 }); 1203 1204 jQuery.each({ 1205 removeAttr: function( name ) { 1206 jQuery.attr( this, name, "" ); 1207 if (this.nodeType == 1) 1208 this.removeAttribute( name ); 1209 }, 1210 1211 addClass: function( classNames ) { 1212 jQuery.className.add( this, classNames ); 1213 }, 1214 1215 removeClass: function( classNames ) { 1216 jQuery.className.remove( this, classNames ); 1217 }, 1218 1219 toggleClass: function( classNames, state ) { 1220 if( typeof state !== "boolean" ) 1221 state = !jQuery.className.has( this, classNames ); 1222 jQuery.className[ state ? "add" : "remove" ]( this, classNames ); 1223 }, 1224 1225 remove: function( selector ) { 1226 if ( !selector || jQuery.filter( selector, [ this ] ).length ) { 1227 // Prevent memory leaks 1228 jQuery( "*", this ).add([this]).each(function(){ 1229 jQuery.event.remove(this); 1230 jQuery.removeData(this); 1231 }); 1232 if (this.parentNode) 1233 this.parentNode.removeChild( this ); 1234 } 1235 }, 1236 1237 empty: function() { 1238 // Remove element nodes and prevent memory leaks 1239 jQuery( ">*", this ).remove(); 1240 1241 // Remove any remaining nodes 1242 while ( this.firstChild ) 1243 this.removeChild( this.firstChild ); 1244 } 1245 }, function(name, fn){ 1246 jQuery.fn[ name ] = function(){ 1247 return this.each( fn, arguments ); 1248 }; 1249 }); 1250 1251 // Helper function used by the dimensions and offset modules 1252 function num(elem, prop) { 1253 return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0; 1254 } 1255 var expando = "jQuery" + now(), uuid = 0, windowData = {}; 1256 1257 jQuery.extend({ 1258 cache: {}, 1259 1260 data: function( elem, name, data ) { 1261 elem = elem == window ? 1262 windowData : 1263 elem; 1264 1265 var id = elem[ expando ]; 1266 1267 // Compute a unique ID for the element 1268 if ( !id ) 1269 id = elem[ expando ] = ++uuid; 1270 1271 // Only generate the data cache if we're 1272 // trying to access or manipulate it 1273 if ( name && !jQuery.cache[ id ] ) 1274 jQuery.cache[ id ] = {}; 1275 1276 // Prevent overriding the named cache with undefined values 1277 if ( data !== undefined ) 1278 jQuery.cache[ id ][ name ] = data; 1279 1280 // Return the named cache data, or the ID for the element 1281 return name ? 1282 jQuery.cache[ id ][ name ] : 1283 id; 1284 }, 1285 1286 removeData: function( elem, name ) { 1287 elem = elem == window ? 1288 windowData : 1289 elem; 1290 1291 var id = elem[ expando ]; 1292 1293 // If we want to remove a specific section of the element's data 1294 if ( name ) { 1295 if ( jQuery.cache[ id ] ) { 1296 // Remove the section of cache data 1297 delete jQuery.cache[ id ][ name ]; 1298 1299 // If we've removed all the data, remove the element's cache 1300 name = ""; 1301 1302 for ( name in jQuery.cache[ id ] ) 1303 break; 1304 1305 if ( !name ) 1306 jQuery.removeData( elem ); 1307 } 1308 1309 // Otherwise, we want to remove all of the element's data 1310 } else { 1311 // Clean up the element expando 1312 try { 1313 delete elem[ expando ]; 1314 } catch(e){ 1315 // IE has trouble directly removing the expando 1316 // but it's ok with using removeAttribute 1317 if ( elem.removeAttribute ) 1318 elem.removeAttribute( expando ); 1319 } 1320 1321 // Completely remove the data cache 1322 delete jQuery.cache[ id ]; 1323 } 1324 }, 1325 queue: function( elem, type, data ) { 1326 if ( elem ){ 1327 1328 type = (type || "fx") + "queue"; 1329 1330 var q = jQuery.data( elem, type ); 1331 1332 if ( !q || jQuery.isArray(data) ) 1333 q = jQuery.data( elem, type, jQuery.makeArray(data) ); 1334 else if( data ) 1335 q.push( data ); 1336 1337 } 1338 return q; 1339 }, 1340 1341 dequeue: function( elem, type ){ 1342 var queue = jQuery.queue( elem, type ), 1343 fn = queue.shift(); 1344 1345 if( !type || type === "fx" ) 1346 fn = queue[0]; 1347 1348 if( fn !== undefined ) 1349 fn.call(elem); 1350 } 1351 }); 1352 1353 jQuery.fn.extend({ 1354 data: function( key, value ){ 1355 var parts = key.split("."); 1356 parts[1] = parts[1] ? "." + parts[1] : ""; 1357 1358 if ( value === undefined ) { 1359 var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); 1360 1361 if ( data === undefined && this.length ) 1362 data = jQuery.data( this[0], key ); 1363 1364 return data === undefined && parts[1] ? 1365 this.data( parts[0] ) : 1366 data; 1367 } else 1368 return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){ 1369 jQuery.data( this, key, value ); 1370 }); 1371 }, 1372 1373 removeData: function( key ){ 1374 return this.each(function(){ 1375 jQuery.removeData( this, key ); 1376 }); 1377 }, 1378 queue: function(type, data){ 1379 if ( typeof type !== "string" ) { 1380 data = type; 1381 type = "fx"; 1382 } 1383 1384 if ( data === undefined ) 1385 return jQuery.queue( this[0], type ); 1386 1387 return this.each(function(){ 1388 var queue = jQuery.queue( this, type, data ); 1389 1390 if( type == "fx" && queue.length == 1 ) 1391 queue[0].call(this); 1392 }); 1393 }, 1394 dequeue: function(type){ 1395 return this.each(function(){ 1396 jQuery.dequeue( this, type ); 1397 }); 1398 } 1399 });/*! 12 (function(){var l=this,g,x=l.jQuery,o=l.$,n=l.jQuery=l.$=function(D,E){return new n.fn.init(D,E)},C=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;n.fn=n.prototype={init:function(D,G){D=D||document;if(D.nodeType){this[0]=D;this.length=1;this.context=D;return this}if(typeof D==="string"){var F=C.exec(D);if(F&&(F[1]||!G)){if(F[1]){D=n.clean([F[1]],G)}else{var H=document.getElementById(F[3]);if(H){if(H.id!=F[3]){return n().find(D)}var E=n(H);E.context=document;E.selector=D;return E}D=[]}}else{return n(G).find(D)}}else{if(n.isFunction(D)){return n(document).ready(D)}}if(D.selector&&D.context){this.selector=D.selector;this.context=D.context}return this.setArray(n.makeArray(D))},selector:"",jquery:"1.3",size:function(){return this.length},get:function(D){return D===g?n.makeArray(this):this[D]},pushStack:function(E,G,D){var F=n(E);F.prevObject=this;F.context=this.context;if(G==="find"){F.selector=this.selector+(this.selector?" ":"")+D}else{if(G){F.selector=this.selector+"."+G+"("+D+")"}}return F},setArray:function(D){this.length=0;Array.prototype.push.apply(this,D);return this},each:function(E,D){return n.each(this,E,D)},index:function(D){return n.inArray(D&&D.jquery?D[0]:D,this)},attr:function(E,G,F){var D=E;if(typeof E==="string"){if(G===g){return this[0]&&n[F||"attr"](this[0],E)}else{D={};D[E]=G}}return this.each(function(H){for(E in D){n.attr(F?this.style:this,E,n.prop(this,D[E],F,H,E))}})},css:function(D,E){if((D=="width"||D=="height")&&parseFloat(E)<0){E=g}return this.attr(D,E,"curCSS")},text:function(E){if(typeof E!=="object"&&E!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(E))}var D="";n.each(E||this,function(){n.each(this.childNodes,function(){if(this.nodeType!=8){D+=this.nodeType!=1?this.nodeValue:n.fn.text([this])}})});return D},wrapAll:function(D){if(this[0]){var E=n(D,this[0].ownerDocument).clone();if(this[0].parentNode){E.insertBefore(this[0])}E.map(function(){var F=this;while(F.firstChild){F=F.firstChild}return F}).append(this)}return this},wrapInner:function(D){return this.each(function(){n(this).contents().wrapAll(D)})},wrap:function(D){return this.each(function(){n(this).wrapAll(D)})},append:function(){return this.domManip(arguments,true,function(D){if(this.nodeType==1){this.appendChild(D)}})},prepend:function(){return this.domManip(arguments,true,function(D){if(this.nodeType==1){this.insertBefore(D,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(D){this.parentNode.insertBefore(D,this)})},after:function(){return this.domManip(arguments,false,function(D){this.parentNode.insertBefore(D,this.nextSibling)})},end:function(){return this.prevObject||n([])},push:[].push,find:function(D){if(this.length===1&&!/,/.test(D)){var F=this.pushStack([],"find",D);F.length=0;n.find(D,this[0],F);return F}else{var E=n.map(this,function(G){return n.find(D,G)});return this.pushStack(/[^+>] [^+>]/.test(D)?n.unique(E):E,"find",D)}},clone:function(E){var D=this.map(function(){if(!n.support.noCloneEvent&&!n.isXMLDoc(this)){var H=this.cloneNode(true),G=document.createElement("div");G.appendChild(H);return n.clean([G.innerHTML])[0]}else{return this.cloneNode(true)}});var F=D.find("*").andSelf().each(function(){if(this[h]!==g){this[h]=null}});if(E===true){this.find("*").andSelf().each(function(H){if(this.nodeType==3){return}var G=n.data(this,"events");for(var J in G){for(var I in G[J]){n.event.add(F[H],J,G[J][I],G[J][I].data)}}})}return D},filter:function(D){return this.pushStack(n.isFunction(D)&&n.grep(this,function(F,E){return D.call(F,E)})||n.multiFilter(D,n.grep(this,function(E){return E.nodeType===1})),"filter",D)},closest:function(D){var E=n.expr.match.POS.test(D)?n(D):null;return this.map(function(){var F=this;while(F&&F.ownerDocument){if(E?E.index(F)>-1:n(F).is(D)){return F}F=F.parentNode}})},not:function(D){if(typeof D==="string"){if(f.test(D)){return this.pushStack(n.multiFilter(D,this,true),"not",D)}else{D=n.multiFilter(D,this)}}var E=D.length&&D[D.length-1]!==g&&!D.nodeType;return this.filter(function(){return E?n.inArray(this,D)<0:this!=D})},add:function(D){return this.pushStack(n.unique(n.merge(this.get(),typeof D==="string"?n(D):n.makeArray(D))))},is:function(D){return !!D&&n.multiFilter(D,this).length>0},hasClass:function(D){return !!D&&this.is("."+D)},val:function(J){if(J===g){var D=this[0];if(D){if(n.nodeName(D,"option")){return(D.attributes.value||{}).specified?D.value:D.text}if(n.nodeName(D,"select")){var H=D.selectedIndex,K=[],L=D.options,G=D.type=="select-one";if(H<0){return null}for(var E=G?H:0,I=G?H+1:L.length;E<I;E++){var F=L[E];if(F.selected){J=n(F).val();if(G){return J}K.push(J)}}return K}return(D.value||"").replace(/\r/g,"")}return g}if(typeof J==="number"){J+=""}return this.each(function(){if(this.nodeType!=1){return}if(n.isArray(J)&&/radio|checkbox/.test(this.type)){this.checked=(n.inArray(this.value,J)>=0||n.inArray(this.name,J)>=0)}else{if(n.nodeName(this,"select")){var M=n.makeArray(J);n("option",this).each(function(){this.selected=(n.inArray(this.value,M)>=0||n.inArray(this.text,M)>=0)});if(!M.length){this.selectedIndex=-1}}else{this.value=J}}})},html:function(D){return D===g?(this[0]?this[0].innerHTML:null):this.empty().append(D)},replaceWith:function(D){return this.after(D).remove()},eq:function(D){return this.slice(D,+D+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(D){return this.pushStack(n.map(this,function(F,E){return D.call(F,E,F)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=n.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild,D=this.length>1?I.cloneNode(true):I;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),G>0?D.cloneNode(true):I)}}if(F){n.each(F,y)}}return this;function K(N,O){return M&&n.nodeName(N,"table")&&n.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};n.fn.init.prototype=n.fn;function y(D,E){if(E.src){n.ajax({url:E.src,async:false,dataType:"script"})}else{n.globalEval(E.text||E.textContent||E.innerHTML||"")}if(E.parentNode){E.parentNode.removeChild(E)}}function e(){return +new Date}n.extend=n.fn.extend=function(){var I=arguments[0]||{},G=1,H=arguments.length,D=false,F;if(typeof I==="boolean"){D=I;I=arguments[1]||{};G=2}if(typeof I!=="object"&&!n.isFunction(I)){I={}}if(H==G){I=this;--G}for(;G<H;G++){if((F=arguments[G])!=null){for(var E in F){var J=I[E],K=F[E];if(I===K){continue}if(D&&K&&typeof K==="object"&&!K.nodeType){I[E]=n.extend(D,J||(K.length!=null?[]:{}),K)}else{if(K!==g){I[E]=K}}}}}return I};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,p=document.defaultView||{},r=Object.prototype.toString;n.extend({noConflict:function(D){l.$=o;if(D){l.jQuery=x}return n},isFunction:function(D){return r.call(D)==="[object Function]"},isArray:function(D){return r.call(D)==="[object Array]"},isXMLDoc:function(D){return D.documentElement&&!D.body||D.tagName&&D.ownerDocument&&!D.ownerDocument.body},globalEval:function(F){F=n.trim(F);if(F){var E=document.getElementsByTagName("head")[0]||document.documentElement,D=document.createElement("script");D.type="text/javascript";if(n.support.scriptEval){D.appendChild(document.createTextNode(F))}else{D.text=F}E.insertBefore(D,E.firstChild);E.removeChild(D)}},nodeName:function(E,D){return E.nodeName&&E.nodeName.toUpperCase()==D.toUpperCase()},each:function(F,J,E){var D,G=0,H=F.length;if(E){if(H===g){for(D in F){if(J.apply(F[D],E)===false){break}}}else{for(;G<H;){if(J.apply(F[G++],E)===false){break}}}}else{if(H===g){for(D in F){if(J.call(F[D],D,F[D])===false){break}}}else{for(var I=F[0];G<H&&J.call(I,G,I)!==false;I=F[++G]){}}}return F},prop:function(G,H,F,E,D){if(n.isFunction(H)){H=H.call(G,E)}return typeof H==="number"&&F=="curCSS"&&!b.test(D)?H+"px":H},className:{add:function(D,E){n.each((E||"").split(/\s+/),function(F,G){if(D.nodeType==1&&!n.className.has(D.className,G)){D.className+=(D.className?" ":"")+G}})},remove:function(D,E){if(D.nodeType==1){D.className=E!==g?n.grep(D.className.split(/\s+/),function(F){return !n.className.has(E,F)}).join(" "):""}},has:function(E,D){return n.inArray(D,(E.className||E).toString().split(/\s+/))>-1}},swap:function(G,F,H){var D={};for(var E in F){D[E]=G.style[E];G.style[E]=F[E]}H.call(G);for(var E in F){G.style[E]=D[E]}},css:function(F,D,H){if(D=="width"||D=="height"){var J,E={position:"absolute",visibility:"hidden",display:"block"},I=D=="width"?["Left","Right"]:["Top","Bottom"];function G(){J=D=="width"?F.offsetWidth:F.offsetHeight;var L=0,K=0;n.each(I,function(){L+=parseFloat(n.curCSS(F,"padding"+this,true))||0;K+=parseFloat(n.curCSS(F,"border"+this+"Width",true))||0});J-=Math.round(L+K)}if(n(F).is(":visible")){G()}else{n.swap(F,E,G)}return Math.max(0,J)}return n.curCSS(F,D,H)},curCSS:function(H,E,F){var K,D=H.style;if(E=="opacity"&&!n.support.opacity){K=n.attr(D,"opacity");return K==""?"1":K}if(E.match(/float/i)){E=v}if(!F&&D&&D[E]){K=D[E]}else{if(p.getComputedStyle){if(E.match(/float/i)){E="float"}E=E.replace(/([A-Z])/g,"-$1").toLowerCase();var L=p.getComputedStyle(H,null);if(L){K=L.getPropertyValue(E)}if(E=="opacity"&&K==""){K="1"}}else{if(H.currentStyle){var I=E.replace(/\-(\w)/g,function(M,N){return N.toUpperCase()});K=H.currentStyle[E]||H.currentStyle[I];if(!/^\d+(px)?$/i.test(K)&&/^\d/.test(K)){var G=D.left,J=H.runtimeStyle.left;H.runtimeStyle.left=H.currentStyle.left;D.left=K||0;K=D.pixelLeft+"px";D.left=G;H.runtimeStyle.left=J}}}}return K},clean:function(E,J,H){J=J||document;if(typeof J.createElement==="undefined"){J=J.ownerDocument||J[0]&&J[0].ownerDocument||document}if(!H&&E.length===1&&typeof E[0]==="string"){var G=/^<(\w+)\s*\/?>$/.exec(E[0]);if(G){return[J.createElement(G[1])]}}var F=[],D=[],K=J.createElement("div");n.each(E,function(O,Q){if(typeof Q==="number"){Q+=""}if(!Q){return}if(typeof Q==="string"){Q=Q.replace(/(<(\w+)[^>]*?)\/>/g,function(S,T,R){return R.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?S:T+"></"+R+">"});var N=n.trim(Q).toLowerCase();var P=!N.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!N.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||N.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!N.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!N.indexOf("<td")||!N.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!N.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!n.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];K.innerHTML=P[1]+Q+P[2];while(P[0]--){K=K.lastChild}if(!n.support.tbody){var M=!N.indexOf("<table")&&N.indexOf("<tbody")<0?K.firstChild&&K.firstChild.childNodes:P[1]=="<table>"&&N.indexOf("<tbody")<0?K.childNodes:[];for(var L=M.length-1;L>=0;--L){if(n.nodeName(M[L],"tbody")&&!M[L].childNodes.length){M[L].parentNode.removeChild(M[L])}}}if(!n.support.leadingWhitespace&&/^\s/.test(Q)){K.insertBefore(J.createTextNode(Q.match(/^\s*/)[0]),K.firstChild)}Q=n.makeArray(K.childNodes)}if(Q.nodeType){F.push(Q)}else{F=n.merge(F,Q)}});if(H){for(var I=0;F[I];I++){if(n.nodeName(F[I],"script")&&(!F[I].type||F[I].type.toLowerCase()==="text/javascript")){D.push(F[I].parentNode?F[I].parentNode.removeChild(F[I]):F[I])}else{if(F[I].nodeType===1){F.splice.apply(F,[I+1,0].concat(n.makeArray(F[I].getElementsByTagName("script"))))}H.appendChild(F[I])}}return D}return F},attr:function(I,F,J){if(!I||I.nodeType==3||I.nodeType==8){return g}var G=!n.isXMLDoc(I),K=J!==g;F=G&&n.props[F]||F;if(I.tagName){var E=/href|src|style/.test(F);if(F=="selected"&&I.parentNode){I.parentNode.selectedIndex}if(F in I&&G&&!E){if(K){if(F=="type"&&n.nodeName(I,"input")&&I.parentNode){throw"type property can't be changed"}I[F]=J}if(n.nodeName(I,"form")&&I.getAttributeNode(F)){return I.getAttributeNode(F).nodeValue}if(F=="tabIndex"){var H=I.getAttributeNode("tabIndex");return H&&H.specified?H.value:I.nodeName.match(/^(a|area|button|input|object|select|textarea)$/i)?0:g}return I[F]}if(!n.support.style&&G&&F=="style"){return n.attr(I.style,"cssText",J)}if(K){I.setAttribute(F,""+J)}var D=!n.support.hrefNormalized&&G&&E?I.getAttribute(F,2):I.getAttribute(F);return D===null?g:D}if(!n.support.opacity&&F=="opacity"){if(K){I.zoom=1;I.filter=(I.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(J)+""=="NaN"?"":"alpha(opacity="+J*100+")")}return I.filter&&I.filter.indexOf("opacity=")>=0?(parseFloat(I.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}F=F.replace(/-([a-z])/ig,function(L,M){return M.toUpperCase()});if(K){I[F]=J}return I[F]},trim:function(D){return(D||"").replace(/^\s+|\s+$/g,"")},makeArray:function(F){var D=[];if(F!=null){var E=F.length;if(E==null||typeof F==="string"||n.isFunction(F)||F.setInterval){D[0]=F}else{while(E){D[--E]=F[E]}}}return D},inArray:function(F,G){for(var D=0,E=G.length;D<E;D++){if(G[D]===F){return D}}return -1},merge:function(G,D){var E=0,F,H=G.length;if(!n.support.getAll){while((F=D[E++])!=null){if(F.nodeType!=8){G[H++]=F}}}else{while((F=D[E++])!=null){G[H++]=F}}return G},unique:function(J){var E=[],D={};try{for(var F=0,G=J.length;F<G;F++){var I=n.data(J[F]);if(!D[I]){D[I]=true;E.push(J[F])}}}catch(H){E=J}return E},grep:function(E,I,D){var F=[];for(var G=0,H=E.length;G<H;G++){if(!D!=!I(E[G],G)){F.push(E[G])}}return F},map:function(D,I){var E=[];for(var F=0,G=D.length;F<G;F++){var H=I(D[F],F);if(H!=null){E[E.length]=H}}return E.concat.apply([],E)}});var B=navigator.userAgent.toLowerCase();n.browser={version:(B.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(B),opera:/opera/.test(B),msie:/msie/.test(B)&&!/opera/.test(B),mozilla:/mozilla/.test(B)&&!/(compatible|webkit)/.test(B)};n.each({parent:function(D){return D.parentNode},parents:function(D){return n.dir(D,"parentNode")},next:function(D){return n.nth(D,2,"nextSibling")},prev:function(D){return n.nth(D,2,"previousSibling")},nextAll:function(D){return n.dir(D,"nextSibling")},prevAll:function(D){return n.dir(D,"previousSibling")},siblings:function(D){return n.sibling(D.parentNode.firstChild,D)},children:function(D){return n.sibling(D.firstChild)},contents:function(D){return n.nodeName(D,"iframe")?D.contentDocument||D.contentWindow.document:n.makeArray(D.childNodes)}},function(D,E){n.fn[D]=function(F){var G=n.map(this,E);if(F&&typeof F=="string"){G=n.multiFilter(F,G)}return this.pushStack(n.unique(G),D,F)}});n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(D,E){n.fn[D]=function(){var F=arguments;return this.each(function(){for(var G=0,H=F.length;G<H;G++){n(F[G])[E](this)}})}});n.each({removeAttr:function(D){n.attr(this,D,"");if(this.nodeType==1){this.removeAttribute(D)}},addClass:function(D){n.className.add(this,D)},removeClass:function(D){n.className.remove(this,D)},toggleClass:function(E,D){if(typeof D!=="boolean"){D=!n.className.has(this,E)}n.className[D?"add":"remove"](this,E)},remove:function(D){if(!D||n.filter(D,[this]).length){n("*",this).add([this]).each(function(){n.event.remove(this);n.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){n(">*",this).remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(D,E){n.fn[D]=function(){return this.each(E,arguments)}});function j(D,E){return D[0]&&parseInt(n.curCSS(D[0],E,true),10)||0}var h="jQuery"+e(),u=0,z={};n.extend({cache:{},data:function(E,D,F){E=E==l?z:E;var G=E[h];if(!G){G=E[h]=++u}if(D&&!n.cache[G]){n.cache[G]={}}if(F!==g){n.cache[G][D]=F}return D?n.cache[G][D]:G},removeData:function(E,D){E=E==l?z:E;var G=E[h];if(D){if(n.cache[G]){delete n.cache[G][D];D="";for(D in n.cache[G]){break}if(!D){n.removeData(E)}}}else{try{delete E[h]}catch(F){if(E.removeAttribute){E.removeAttribute(h)}}delete n.cache[G]}},queue:function(E,D,G){if(E){D=(D||"fx")+"queue";var F=n.data(E,D);if(!F||n.isArray(G)){F=n.data(E,D,n.makeArray(G))}else{if(G){F.push(G)}}}return F},dequeue:function(G,F){var D=n.queue(G,F),E=D.shift();if(!F||F==="fx"){E=D[0]}if(E!==g){E.call(G)}}});n.fn.extend({data:function(D,F){var G=D.split(".");G[1]=G[1]?"."+G[1]:"";if(F===g){var E=this.triggerHandler("getData"+G[1]+"!",[G[0]]);if(E===g&&this.length){E=n.data(this[0],D)}return E===g&&G[1]?this.data(G[0]):E}else{return this.trigger("setData"+G[1]+"!",[G[0],F]).each(function(){n.data(this,D,F)})}},removeData:function(D){return this.each(function(){n.removeData(this,D)})},queue:function(D,E){if(typeof D!=="string"){E=D;D="fx"}if(E===g){return n.queue(this[0],D)}return this.each(function(){var F=n.queue(this,D,E);if(D=="fx"&&F.length==1){F[0].call(this)}})},dequeue:function(D){return this.each(function(){n.dequeue(this,D)})}}); 13 /* 1400 14 * Sizzle CSS Selector Engine - v0.9.1 1401 15 * Copyright 2009, The Dojo Foundation … … 1403 17 * More information: http://sizzlejs.com/ 1404 18 */ 1405 (function(){ 1406 1407 var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|[^[\]]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g, 1408 done = 0, 1409 toString = Object.prototype.toString; 1410 1411 var Sizzle = function(selector, context, results, seed) { 1412 results = results || []; 1413 context = context || document; 1414 1415 if ( context.nodeType !== 1 && context.nodeType !== 9 ) 1416 return []; 1417 1418 if ( !selector || typeof selector !== "string" ) { 1419 return results; 1420 } 1421 1422 var parts = [], m, set, checkSet, check, mode, extra, prune = true; 1423 1424 // Reset the position of the chunker regexp (start from head) 1425 chunker.lastIndex = 0; 1426 1427 while ( (m = chunker.exec(selector)) !== null ) { 1428 parts.push( m[1] ); 1429 1430 if ( m[2] ) { 1431 extra = RegExp.rightContext; 1432 break; 1433 } 1434 } 1435 1436 if ( parts.length > 1 && Expr.match.POS.exec( selector ) ) { 1437 if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { 1438 var later = "", match; 1439 1440 // Position selectors must be done after the filter 1441 while ( (match = Expr.match.POS.exec( selector )) ) { 1442 later += match[0]; 1443 selector = selector.replace( Expr.match.POS, "" ); 1444 } 1445 1446 set = Sizzle.filter( later, Sizzle( selector, context ) ); 1447 } else { 1448 set = Expr.relative[ parts[0] ] ? 1449 [ context ] : 1450 Sizzle( parts.shift(), context ); 1451 1452 while ( parts.length ) { 1453 var tmpSet = []; 1454 1455 selector = parts.shift(); 1456 if ( Expr.relative[ selector ] ) 1457 selector += parts.shift(); 1458 1459 for ( var i = 0, l = set.length; i < l; i++ ) { 1460 Sizzle( selector, set[i], tmpSet ); 1461 } 1462 1463 set = tmpSet; 1464 } 1465 } 1466 } else { 1467 var ret = seed ? 1468 { expr: parts.pop(), set: makeArray(seed) } : 1469 Sizzle.find( parts.pop(), parts.length === 1 && context.parentNode ? context.parentNode : context ); 1470 set = Sizzle.filter( ret.expr, ret.set ); 1471 1472 if ( parts.length > 0 ) { 1473 checkSet = makeArray(set); 1474 } else { 1475 prune = false; 1476 } 1477 1478 while ( parts.length ) { 1479 var cur = parts.pop(), pop = cur; 1480 1481 if ( !Expr.relative[ cur ] ) { 1482 cur = ""; 1483 } else { 1484 pop = parts.pop(); 1485 } 1486 1487 if ( pop == null ) { 1488 pop = context; 1489 } 1490 1491 Expr.relative[ cur ]( checkSet, pop, isXML(context) ); 1492 } 1493 } 1494 1495 if ( !checkSet ) { 1496 checkSet = set; 1497 } 1498 1499 if ( !checkSet ) { 1500 throw "Syntax error, unrecognized expression: " + (cur || selector); 1501 } 1502 1503 if ( toString.call(checkSet) === "[object Array]" ) { 1504 if ( !prune ) { 1505 results.push.apply( results, checkSet ); 1506 } else if ( context.nodeType === 1 ) { 1507 for ( var i = 0; checkSet[i] != null; i++ ) { 1508 if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && contains(context, checkSet[i])) ) { 1509 results.push( set[i] ); 1510 } 1511 } 1512 } else { 1513 for ( var i = 0; checkSet[i] != null; i++ ) { 1514 if ( checkSet[i] && checkSet[i].nodeType === 1 ) { 1515 results.push( set[i] ); 1516 } 1517 } 1518 } 1519 } else { 1520 makeArray( checkSet, results ); 1521 } 1522 1523 if ( extra ) { 1524 Sizzle( extra, context, results, seed ); 1525 } 1526 1527 return results; 1528 }; 1529 1530 Sizzle.matches = function(expr, set){ 1531 return Sizzle(expr, null, null, set); 1532 }; 1533 1534 Sizzle.find = function(expr, context){ 1535 var set, match; 1536 1537 if ( !expr ) { 1538 return []; 1539 } 1540 1541 for ( var i = 0, l = Expr.order.length; i < l; i++ ) { 1542 var type = Expr.order[i], match; 1543 1544 if ( (match = Expr.match[ type ].exec( expr )) ) { 1545 var left = RegExp.leftContext; 1546 1547 if ( left.substr( left.length - 1 ) !== "\\" ) { 1548 match[1] = (match[1] || "").replace(/\\/g, ""); 1549 set = Expr.find[ type ]( match, context ); 1550 if ( set != null ) { 1551 expr = expr.replace( Expr.match[ type ], "" ); 1552 break; 1553 } 1554 } 1555 } 1556 } 1557 1558 if ( !set ) { 1559 set = context.getElementsByTagName("*"); 1560 } 1561 1562 return {set: set, expr: expr}; 1563 }; 1564 1565 Sizzle.filter = function(expr, set, inplace, not){ 1566 var old = expr, result = [], curLoop = set, match, anyFound; 1567 1568 while ( expr && set.length ) { 1569 for ( var type in Expr.filter ) { 1570 if ( (match = Expr.match[ type ].exec( expr )) != null ) { 1571 var filter = Expr.filter[ type ], goodArray = null, goodPos = 0, found, item; 1572 anyFound = false; 1573 1574 if ( curLoop == result ) { 1575 result = []; 1576 } 1577 1578 if ( Expr.preFilter[ type ] ) { 1579 match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not ); 1580 1581 if ( !match ) { 1582 anyFound = found = true; 1583 } else if ( match === true ) { 1584 continue; 1585 } else if ( match[0] === true ) { 1586 goodArray = []; 1587 var last = null, elem; 1588 for ( var i = 0; (elem = curLoop[i]) !== undefined; i++ ) { 1589 if ( elem && last !== elem ) { 1590 goodArray.push( elem ); 1591 last = elem; 1592 } 1593 } 1594 } 1595 } 1596 1597 if ( match ) { 1598 for ( var i = 0; (item = curLoop[i]) !== undefined; i++ ) { 1599 if ( item ) { 1600 if ( goodArray && item != goodArray[goodPos] ) { 1601 goodPos++; 1602 } 1603 1604 found = filter( item, match, goodPos, goodArray ); 1605 var pass = not ^ !!found; 1606 1607 if ( inplace && found != null ) { 1608 if ( pass ) { 1609 anyFound = true; 1610 } else { 1611 curLoop[i] = false; 1612 } 1613 } else if ( pass ) { 1614 result.push( item ); 1615 anyFound = true; 1616 } 1617 } 1618 } 1619 } 1620 1621 if ( found !== undefined ) { 1622 if ( !inplace ) { 1623 curLoop = result; 1624 } 1625 1626 expr = expr.replace( Expr.match[ type ], "" ); 1627 1628 if ( !anyFound ) { 1629 return []; 1630 } 1631 1632 break; 1633 } 1634 } 1635 } 1636 1637 expr = expr.replace(/\s*,\s*/, ""); 1638 1639 // Improper expression 1640 if ( expr == old ) { 1641 if ( anyFound == null ) { 1642 throw "Syntax error, unrecognized expression: " + expr; 1643 } else { 1644 break; 1645 } 1646 } 1647 1648 old = expr; 1649 } 1650 1651 return curLoop; 1652 }; 1653 1654 var Expr = Sizzle.selectors = { 1655 order: [ "ID", "NAME", "TAG" ], 1656 match: { 1657 ID: /#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/, 1658 CLASS: /\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/, 1659 NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/, 1660 ATTR: /\[((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\]/, 1661 TAG: /^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/, 1662 CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/, 1663 POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/, 1664 PSEUDO: /:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/ 1665 }, 1666 attrMap: { 1667 "class": "className", 1668 "for": "htmlFor" 1669 }, 1670 relative: { 1671 "+": function(checkSet, part){ 1672 for ( var i = 0, l = checkSet.length; i < l; i++ ) { 1673 var elem = checkSet[i]; 1674 if ( elem ) { 1675 var cur = elem.previousSibling; 1676 while ( cur && cur.nodeType !== 1 ) { 1677 cur = cur.previousSibling; 1678 } 1679 checkSet[i] = typeof part === "string" ? 1680 cur || false : 1681 cur === part; 1682 } 1683 } 1684 1685 if ( typeof part === "string" ) { 1686 Sizzle.filter( part, checkSet, true ); 1687 } 1688 }, 1689 ">": function(checkSet, part, isXML){ 1690 if ( typeof part === "string" && !/\W/.test(part) ) { 1691 part = isXML ? part : part.toUpperCase(); 1692 1693 for ( var i = 0, l = checkSet.length; i < l; i++ ) { 1694 var elem = checkSet[i]; 1695 if ( elem ) { 1696 var parent = elem.parentNode; 1697 checkSet[i] = parent.nodeName === part ? parent : false; 1698 } 1699 } 1700 } else { 1701 for ( var i = 0, l = checkSet.length; i < l; i++ ) { 1702 var elem = checkSet[i]; 1703 if ( elem ) { 1704 checkSet[i] = typeof part === "string" ? 1705 elem.parentNode : 1706 elem.parentNode === part; 1707 } 1708 } 1709 1710 if ( typeof part === "string" ) { 1711 Sizzle.filter( part, checkSet, true ); 1712 } 1713 } 1714 }, 1715 "": function(checkSet, part, isXML){ 1716 var doneName = "done" + (done++), checkFn = dirCheck; 1717 1718 if ( !part.match(/\W/) ) { 1719 var nodeCheck = part = isXML ? part : part.toUpperCase(); 1720 checkFn = dirNodeCheck; 1721 } 1722 1723 checkFn("parentNode", part, doneName, checkSet, nodeCheck); 1724 }, 1725 "~": function(checkSet, part, isXML){ 1726 var doneName = "done" + (done++), checkFn = dirCheck; 1727 1728 if ( typeof part === "string" && !part.match(/\W/) ) { 1729 var nodeCheck = part = isXML ? part : part.toUpperCase(); 1730 checkFn = dirNodeCheck; 1731 } 1732 1733 checkFn("previousSibling", part, doneName, checkSet, nodeCheck); 1734 } 1735 }, 1736 find: { 1737 ID: function(match, context){ 1738 if ( context.getElementById ) { 1739 var m = context.getElementById(match[1]); 1740 return m ? [m] : []; 1741 } 1742 }, 1743 NAME: function(match, context){ 1744 return context.getElementsByName ? context.getElementsByName(match[1]) : null; 1745 }, 1746 TAG: function(match, context){ 1747 return context.getElementsByTagName(match[1]); 1748 } 1749 }, 1750 preFilter: { 1751 CLASS: function(match, curLoop, inplace, result, not){ 1752 match = " " + match[1].replace(/\\/g, "") + " "; 1753 1754 for ( var i = 0; curLoop[i]; i++ ) { 1755 if ( not ^ (" " + curLoop[i].className + " ").indexOf(match) >= 0 ) { 1756 if ( !inplace ) 1757 result.push( curLoop[i] ); 1758 } else if ( inplace ) { 1759 curLoop[i] = false; 1760 } 1761 } 1762 1763 return false; 1764 }, 1765 ID: function(match){ 1766 return match[1].replace(/\\/g, ""); 1767 }, 1768 TAG: function(match, curLoop){ 1769 for ( var i = 0; !curLoop[i]; i++ ){} 1770 return isXML(curLoop[i]) ? match[1] : match[1].toUpperCase(); 1771 }, 1772 CHILD: function(match){ 1773 if ( match[1] == "nth" ) { 1774 // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' 1775 var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec( 1776 match[2] == "even" && "2n" || match[2] == "odd" && "2n+1" || 1777 !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); 1778 1779 // calculate the numbers (first)n+(last) including if they are negative 1780 match[2] = (test[1] + (test[2] || 1)) - 0; 1781 match[3] = test[3] - 0; 1782 } 1783 1784 // TODO: Move to normal caching system 1785 match[0] = "done" + (done++); 1786 1787 return match; 1788 }, 1789 ATTR: function(match){ 1790 var name = match[1]; 1791 1792 if ( Expr.attrMap[name] ) { 1793 match[1] = Expr.attrMap[name]; 1794 } 1795 1796 if ( match[2] === "~=" ) { 1797 match[4] = " " + match[4] + " "; 1798 } 1799 1800 return match; 1801 }, 1802 PSEUDO: function(match, curLoop, inplace, result, not){ 1803 if ( match[1] === "not" ) { 1804 // If we're dealing with a complex expression, or a simple one 1805 if ( match[3].match(chunker).length > 1 ) { 1806 match[3] = Sizzle(match[3], null, null, curLoop); 1807 } else { 1808 var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); 1809 if ( !inplace ) { 1810 result.push.apply( result, ret ); 1811 } 1812 return false; 1813 } 1814 } else if ( Expr.match.POS.test( match[0] ) ) { 1815 return true; 1816 } 1817 1818 return match; 1819 }, 1820 POS: function(match){ 1821 match.unshift( true ); 1822 return match; 1823 } 1824 }, 1825 filters: { 1826 enabled: function(elem){ 1827 return elem.disabled === false && elem.type !== "hidden"; 1828 }, 1829 disabled: function(elem){ 1830 return elem.disabled === true; 1831 }, 1832 checked: function(elem){ 1833 return elem.checked === true; 1834 }, 1835 selected: function(elem){ 1836 // Accessing this property makes selected-by-default 1837 // options in Safari work properly 1838 elem.parentNode.selectedIndex; 1839 return elem.selected === true; 1840 }, 1841 parent: function(elem){ 1842 return !!elem.firstChild; 1843 }, 1844 empty: function(elem){ 1845 return !elem.firstChild; 1846 }, 1847 has: function(elem, i, match){ 1848 return !!Sizzle( match[3], elem ).length; 1849 }, 1850 header: function(elem){ 1851 return /h\d/i.test( elem.nodeName ); 1852 }, 1853 text: function(elem){ 1854 return "text" === elem.type; 1855 }, 1856 radio: function(elem){ 1857 return "radio" === elem.type; 1858 }, 1859 checkbox: function(elem){ 1860 return "checkbox" === elem.type; 1861 }, 1862 file: function(elem){ 1863 return "file" === elem.type; 1864 }, 1865 password: function(elem){ 1866 return "password" === elem.type; 1867 }, 1868 submit: function(elem){ 1869 return "submit" === elem.type; 1870 }, 1871 image: function(elem){ 1872 return "image" === elem.type; 1873 }, 1874 reset: function(elem){ 1875 return "reset" === elem.type; 1876 }, 1877 button: function(elem){ 1878 return "button" === elem.type || elem.nodeName.toUpperCase() === "BUTTON"; 1879 }, 1880 input: function(elem){ 1881 return /input|select|textarea|button/i.test(elem.nodeName); 1882 } 1883 }, 1884 setFilters: { 1885 first: function(elem, i){ 1886 return i === 0; 1887 }, 1888 last: function(elem, i, match, array){ 1889 return i === array.length - 1; 1890 }, 1891 even: function(elem, i){ 1892 return i % 2 === 0; 1893 }, 1894 odd: function(elem, i){ 1895 return i % 2 === 1; 1896 }, 1897 lt: function(elem, i, match){ 1898 return i < match[3] - 0; 1899 }, 1900 gt: function(elem, i, match){ 1901 return i > match[3] - 0; 1902 }, 1903 nth: function(elem, i, match){ 1904 return match[3] - 0 == i; 1905 }, 1906 eq: function(elem, i, match){ 1907 return match[3] - 0 == i; 1908 } 1909 }, 1910 filter: { 1911 CHILD: function(elem, match){ 1912 var type = match[1], parent = elem.parentNode; 1913 1914 var doneName = "child" + parent.childNodes.length; 1915 1916 if ( parent && (!parent[ doneName ] || !elem.nodeIndex) ) { 1917 var count = 1; 1918 1919 for ( var node = parent.firstChild; node; node = node.nextSibling ) { 1920 if ( node.nodeType == 1 ) { 1921 node.nodeIndex = count++; 1922 } 1923 } 1924 1925 parent[ doneName ] = count - 1; 1926 } 1927 1928 if ( type == "first" ) { 1929 return elem.nodeIndex == 1; 1930 } else if ( type == "last" ) { 1931 return elem.nodeIndex == parent[ doneName ]; 1932 } else if ( type == "only" ) { 1933 return parent[ doneName ] == 1; 1934 } else if ( type == "nth" ) { 1935 var add = false, first = match[2], last = match[3]; 1936 1937 if ( first == 1 && last == 0 ) { 1938 return true; 1939 } 1940 1941 if ( first == 0 ) { 1942 if ( elem.nodeIndex == last ) { 1943 add = true; 1944 } 1945 } else if ( (elem.nodeIndex - last) % first == 0 && (elem.nodeIndex - last) / first >= 0 ) { 1946 add = true; 1947 } 1948 1949 return add; 1950 } 1951 }, 1952 PSEUDO: function(elem, match, i, array){ 1953 var name = match[1], filter = Expr.filters[ name ]; 1954 1955 if ( filter ) { 1956 return filter( elem, i, match, array ); 1957 } else if ( name === "contains" ) { 1958 return (elem.textContent || elem.innerText || "").indexOf(match[3]) >= 0; 1959 } else if ( name === "not" ) { 1960 var not = match[3]; 1961 1962 for ( var i = 0, l = not.length; i < l; i++ ) { 1963 if ( not[i] === elem ) { 1964 return false; 1965 } 1966 } 1967 1968 return true; 1969 } 1970 }, 1971 ID: function(elem, match){ 1972 return elem.nodeType === 1 && elem.getAttribute("id") === match; 1973 }, 1974 TAG: function(elem, match){ 1975 return (match === "*" && elem.nodeType === 1) || elem.nodeName === match; 1976 }, 1977 CLASS: function(elem, match){ 1978 return match.test( elem.className ); 1979 }, 1980 ATTR: function(elem, match){ 1981 var result = elem[ match[1] ] || elem.getAttribute( match[1] ), value = result + "", type = match[2], check = match[4]; 1982 return result == null ? 1983 false : 1984 type === "=" ? 1985 value === check : 1986 type === "*=" ? 1987 value.indexOf(check) >= 0 : 1988 type === "~=" ? 1989 (" " + value + " ").indexOf(check) >= 0 : 1990 !match[4] ? 1991 result : 1992 type === "!=" ? 1993 value != check : 1994 type === "^=" ? 1995 value.indexOf(check) === 0 : 1996 type === "$=" ? 1997 value.substr(value.length - check.length) === check : 1998 type === "|=" ? 1999 value === check || value.substr(0, check.length + 1) === check + "-" : 2000 false; 2001 }, 2002 POS: function(elem, match, i, array){ 2003 var name = match[2], filter = Expr.setFilters[ name ]; 2004 2005 if ( filter ) { 2006 return filter( elem, i, match, array ); 2007 } 2008 } 2009 } 2010 }; 2011 2012 for ( var type in Expr.match ) { 2013 Expr.match[ type ] = RegExp( Expr.match[ type ].source + /(?![^\[]*\])(?![^\(]*\))/.source ); 2014 } 2015 2016 var makeArray = function(array, results) { 2017 array = Array.prototype.slice.call( array ); 2018 2019 if ( results ) { 2020 results.push.apply( results, array ); 2021 return results; 2022 } 2023 2024 return array; 2025 }; 2026 2027 // Perform a simple check to determine if the browser is capable of 2028 // converting a NodeList to an array using builtin methods. 2029 try { 2030 Array.prototype.slice.call( document.documentElement.childNodes ); 2031 2032 // Provide a fallback method if it does not work 2033 } catch(e){ 2034 makeArray = function(array, results) { 2035 var ret = results || []; 2036 2037 if ( toString.call(array) === "[object Array]" ) { 2038 Array.prototype.push.apply( ret, array ); 2039 } else { 2040 if ( typeof array.length === "number" ) { 2041 for ( var i = 0, l = array.length; i < l; i++ ) { 2042 ret.push( array[i] ); 2043 } 2044 } else { 2045 for ( var i = 0; array[i]; i++ ) { 2046 ret.push( array[i] ); 2047 } 2048 } 2049 } 2050 2051 return ret; 2052 }; 2053 } 2054 2055 // Check to see if the browser returns elements by name when 2056 // querying by getElementById (and provide a workaround) 2057 (function(){ 2058 // We're going to inject a fake input element with a specified name 2059 var form = document.createElement("form"), 2060 id = "script" + (new Date).getTime(); 2061 form.innerHTML = "<input name='" + id + "'/>"; 2062 2063 // Inject it into the root element, check its status, and remove it quickly 2064 var root = document.documentElement; 2065 root.insertBefore( form, root.firstChild ); 2066 2067 // The workaround has to do additional checks after a getElementById 2068 // Which slows things down for other browsers (hence the branching) 2069 if ( !!document.getElementById( id ) ) { 2070 Expr.find.ID = function(match, context){ 2071 if ( context.getElementById ) { 2072 var m = context.getElementById(match[1]); 2073 return m ? m.id === match[1] || m.getAttributeNode && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : []; 2074 } 2075 }; 2076 2077 Expr.filter.ID = function(elem, match){ 2078 var node = elem.getAttributeNode && elem.getAttributeNode("id"); 2079 return elem.nodeType === 1 && node && node.nodeValue === match; 2080 }; 2081 } 2082 2083 root.removeChild( form ); 2084 })(); 2085 2086 // Check to see if the browser returns only elements 2087 // when doing getElementsByTagName("*") 2088 (function(){ 2089 // Create a fake element 2090 var div = document.createElement("div"); 2091 div.appendChild( document.createComment("") ); 2092 2093 // Make sure no comments are found 2094 if ( div.getElementsByTagName("*").length > 0 ) { 2095 Expr.find.TAG = function(match, context){ 2096 var results = context.getElementsByTagName(match[1]); 2097 2098 // Filter out possible comments 2099 if ( match[1] === "*" ) { 2100 var tmp = []; 2101 2102 for ( var i = 0; results[i]; i++ ) { 2103 if ( results[i].nodeType === 1 ) { 2104 tmp.push( results[i] ); 2105 } 2106 } 2107 2108 results = tmp; 2109 } 2110 2111 return results; 2112 }; 2113 } 2114 })(); 2115 2116 if ( document.querySelectorAll ) (function(){ 2117 var oldSizzle = Sizzle; 2118 2119 Sizzle = function(query, context, extra, seed){ 2120 context = context || document; 2121 2122 if ( !seed && context.nodeType === 9 ) { 2123 try { 2124 return makeArray( context.querySelectorAll(query), extra ); 2125 } catch(e){} 2126 } 2127 2128 return oldSizzle(query, context, extra, seed); 2129 }; 2130 2131 Sizzle.find = oldSizzle.find; 2132 Sizzle.filter = oldSizzle.filter; 2133 Sizzle.selectors = oldSizzle.selectors; 2134 Sizzle.matches = oldSizzle.matches; 2135 })(); 2136 2137 if ( document.documentElement.getElementsByClassName ) { 2138 Expr.order.splice(1, 0, "CLASS"); 2139 Expr.find.CLASS = function(match, context) { 2140 return context.getElementsByClassName(match[1]); 2141 }; 2142 } 2143 2144 function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck ) { 2145 for ( var i = 0, l = checkSet.length; i < l; i++ ) { 2146 var elem = checkSet[i]; 2147 if ( elem ) { 2148 elem = elem[dir]; 2149 var match = false; 2150 2151 while ( elem && elem.nodeType ) { 2152 var done = elem[doneName]; 2153 if ( done ) { 2154 match = checkSet[ done ]; 2155 break; 2156 } 2157 2158 if ( elem.nodeType === 1 ) 2159 elem[doneName] = i; 2160 2161 if ( elem.nodeName === cur ) { 2162 match = elem; 2163 break; 2164 } 2165 2166 elem = elem[dir]; 2167 } 2168 2169 checkSet[i] = match; 2170 } 2171 } 2172 } 2173 2174 function dirCheck( dir, cur, doneName, checkSet, nodeCheck ) { 2175 for ( var i = 0, l = checkSet.length; i < l; i++ ) { 2176 var elem = checkSet[i]; 2177 if ( elem ) { 2178 elem = elem[dir]; 2179 var match = false; 2180 2181 while ( elem && elem.nodeType ) { 2182 if ( elem[doneName] ) { 2183 match = checkSet[ elem[doneName] ]; 2184 break; 2185 } 2186 2187 if ( elem.nodeType === 1 ) { 2188 elem[doneName] = i; 2189 2190 if ( typeof cur !== "string" ) { 2191 if ( elem === cur ) { 2192 match = true; 2193 break; 2194 } 2195 2196 } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { 2197 match = elem; 2198 break; 2199 } 2200 } 2201 2202 elem = elem[dir]; 2203 } 2204 2205 checkSet[i] = match; 2206 } 2207 } 2208 } 2209 2210 var contains = document.compareDocumentPosition ? function(a, b){ 2211 return a.compareDocumentPosition(b) & 16; 2212 } : function(a, b){ 2213 return a !== b && (a.contains ? a.contains(b) : true); 2214 }; 2215 2216 var isXML = function(elem){ 2217 return elem.documentElement && !elem.body || 2218 elem.tagName && elem.ownerDocument && !elem.ownerDocument.body; 2219 }; 2220 2221 // EXPOSE 2222 jQuery.find = Sizzle; 2223 jQuery.filter = Sizzle.filter; 2224 jQuery.expr = Sizzle.selectors; 2225 jQuery.expr[":"] = jQuery.expr.filters; 2226 2227 Sizzle.selectors.filters.hidden = function(elem){ 2228 return "hidden" === elem.type || 2229 jQuery.css(elem, "display") === "none" || 2230 jQuery.css(elem, "visibility") === "hidden"; 2231 }; 2232 2233 Sizzle.selectors.filters.visible = function(elem){ 2234 return "hidden" !== elem.type && 2235 jQuery.css(elem, "display") !== "none" && 2236 jQuery.css(elem, "visibility") !== "hidden"; 2237 }; 2238 2239 Sizzle.selectors.filters.animated = function(elem){ 2240 return jQuery.grep(jQuery.timers, function(fn){ 2241 return elem === fn.elem; 2242 }).length; 2243 }; 2244 2245 jQuery.multiFilter = function( expr, elems, not ) { 2246 if ( not ) { 2247 expr = ":not(" + expr + ")"; 2248 } 2249 2250 return Sizzle.matches(expr, elems); 2251 }; 2252 2253 jQuery.dir = function( elem, dir ){ 2254 var matched = [], cur = elem[dir]; 2255 while ( cur && cur != document ) { 2256 if ( cur.nodeType == 1 ) 2257 matched.push( cur ); 2258 cur = cur[dir]; 2259 } 2260 return matched; 2261 }; 2262 2263 jQuery.nth = function(cur, result, dir, elem){ 2264 result = result || 1; 2265 var num = 0; 2266 2267 for ( ; cur; cur = cur[dir] ) 2268 if ( cur.nodeType == 1 && ++num == result ) 2269 break; 2270 2271 return cur; 2272 }; 2273 2274 jQuery.sibling = function(n, elem){ 2275 var r = []; 2276 2277 for ( ; n; n = n.nextSibling ) { 2278 if ( n.nodeType == 1 && n != elem ) 2279 r.push( n ); 2280 } 2281 2282 return r; 2283 }; 2284 2285 return; 2286 2287 window.Sizzle = Sizzle; 2288 2289 })(); 2290 /* 2291 * A number of helper functions used for managing events. 2292 * Many of the ideas behind this code originated from 2293 * Dean Edwards' addEvent library. 2294 */ 2295 jQuery.event = { 2296 2297 // Bind an event to an element 2298 // Original by Dean Edwards 2299 add: function(elem, types, handler, data) { 2300 if ( elem.nodeType == 3 || elem.nodeType == 8 ) 2301 return; 2302 2303 // For whatever reason, IE has trouble passing the window object 2304 // around, causing it to be cloned in the process 2305 if ( elem.setInterval && elem != window ) 2306 elem = window; 2307 2308 // Make sure that the function being executed has a unique ID 2309 if ( !handler.guid ) 2310 handler.guid = this.guid++; 2311 2312 // if data is passed, bind to handler 2313 if ( data !== undefined ) { 2314 // Create temporary function pointer to original handler 2315 var fn = handler; 2316 2317 // Create unique handler function, wrapped around original handler 2318 handler = this.proxy( fn ); 2319 2320 // Store data in unique handler 2321 handler.data = data; 2322 } 2323 2324 // Init the element's event structure 2325 var events = jQuery.data(elem, "events") || jQuery.data(elem, "events", {}), 2326 handle = jQuery.data(elem, "handle") || jQuery.data(elem, "handle", function(){ 2327 // Handle the second event of a trigger and when 2328 // an event is called after a page has unloaded 2329 return typeof jQuery !== "undefined" && !jQuery.event.triggered ? 2330 jQuery.event.handle.apply(arguments.callee.elem, arguments) : 2331 undefined; 2332 }); 2333 // Add elem as a property of the handle function 2334 // This is to prevent a memory leak with non-native 2335 // event in IE. 2336 handle.elem = elem; 2337 2338 // Handle multiple events separated by a space 2339 // jQuery(...).bind("mouseover mouseout", fn); 2340 jQuery.each(types.split(/\s+/), function(index, type) { 2341 // Namespaced event handlers 2342 var namespaces = type.split("."); 2343 type = namespaces.shift(); 2344 handler.type = namespaces.slice().sort().join("."); 2345 2346 // Get the current list of functions bound to this event 2347 var handlers = events[type]; 2348 2349 if ( jQuery.event.specialAll[type] ) 2350 jQuery.event.specialAll[type].setup.call(elem, data, namespaces); 2351 2352 // Init the event handler queue 2353 if (!handlers) { 2354 handlers = events[type] = {}; 2355 2356 // Check for a special event handler 2357 // Only use addEventListener/attachEvent if the special 2358 // events handler returns false 2359 if ( !jQuery.event.special[type] || jQuery.event.special[type].setup.call(elem, data, namespaces) === false ) { 2360 // Bind the global event handler to the element 2361 if (elem.addEventListener) 2362 elem.addEventListener(type, handle, false); 2363 else if (elem.attachEvent) 2364 elem.attachEvent("on" + type, handle); 2365 } 2366 } 2367 2368 // Add the function to the element's handler list 2369 handlers[handler.guid] = handler; 2370 2371 // Keep track of which events have been used, for global triggering 2372 jQuery.event.global[type] = true; 2373 }); 2374 2375 // Nullify elem to prevent memory leaks in IE 2376 elem = null; 2377 }, 2378 2379 guid: 1, 2380 global: {}, 2381 2382 // Detach an event or set of events from an element 2383 remove: function(elem, types, handler) { 2384 // don't do events on text and comment nodes 2385 if ( elem.nodeType == 3 || elem.nodeType == 8 ) 2386 return; 2387 2388 var events = jQuery.data(elem, "events"), ret, index; 2389 2390 if ( events ) { 2391 // Unbind all events for the element 2392 if ( types === undefined || (typeof types === "string" && types.charAt(0) == ".") ) 2393 for ( var type in events ) 2394 this.remove( elem, type + (types || "") ); 2395 else { 2396 // types is actually an event object here 2397 if ( types.type ) { 2398 handler = types.handler; 2399 types = types.type; 2400 } 2401 2402 // Handle multiple events seperated by a space 2403 // jQuery(...).unbind("mouseover mouseout", fn); 2404 jQuery.each(types.split(/\s+/), function(index, type){ 2405 // Namespaced event handlers 2406 var namespaces = type.split("."); 2407 type = namespaces.shift(); 2408 var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)"); 2409 2410 if ( events[type] ) { 2411 // remove the given handler for the given type 2412 if ( handler ) 2413 delete events[type][handler.guid]; 2414 2415 // remove all handlers for the given type 2416 else 2417 for ( var handle in events[type] ) 2418 // Handle the removal of namespaced events 2419 if ( namespace.test(events[type][handle].type) ) 2420 delete events[type][handle]; 2421 2422 if ( jQuery.event.specialAll[type] ) 2423 jQuery.event.specialAll[type].teardown.call(elem, namespaces); 2424 2425 // remove generic event handler if no more handlers exist 2426 for ( ret in events[type] ) break; 2427 if ( !ret ) { 2428 if ( !jQuery.event.special[type] || jQuery.event.special[type].teardown.call(elem, namespaces) === false ) { 2429 if (elem.removeEventListener) 2430 elem.removeEventListener(type, jQuery.data(elem, "handle"), false); 2431 else if (elem.detachEvent) 2432 elem.detachEvent("on" + type, jQuery.data(elem, "handle")); 2433 } 2434 ret = null; 2435 delete events[type]; 2436 } 2437 } 2438 }); 2439 } 2440 2441 // Remove the expando if it's no longer used 2442 for ( ret in events ) break; 2443 if ( !ret ) { 2444 var handle = jQuery.data( elem, "handle" ); 2445 if ( handle ) handle.elem = null; 2446 jQuery.removeData( elem, "events" ); 2447 jQuery.removeData( elem, "handle" ); 2448 } 2449 } 2450 }, 2451 2452 // bubbling is internal 2453 trigger: function( event, data, elem, bubbling ) { 2454 // Event object or event type 2455 var type = event.type || event; 2456 2457 if( !bubbling ){ 2458 event = typeof event === "object" ? 2459 // jQuery.Event object 2460 event[expando] ? event : 2461 // Object literal 2462 jQuery.extend( jQuery.Event(type), event ) : 2463 // Just the event type (string) 2464 jQuery.Event(type); 2465 2466 if ( type.indexOf("!") >= 0 ) { 2467 event.type = type = type.slice(0, -1); 2468 event.exclusive = true; 2469 } 2470 2471 // Handle a global trigger 2472 if ( !elem ) { 2473 // Don't bubble custom events when global (to avoid too much overhead) 2474 event.stopPropagation(); 2475 // Only trigger if we've ever bound an event for it 2476 if ( this.global[type] ) 2477 jQuery.each( jQuery.cache, function(){ 2478 if ( this.events && this.events[type] ) 2479 jQuery.event.trigger( event, data, this.handle.elem ); 2480 }); 2481 } 2482 2483 // Handle triggering a single element 2484 2485 // don't do events on text and comment nodes 2486 if ( !elem || elem.nodeType == 3 || elem.nodeType == 8 ) 2487 return undefined; 2488 2489 // Clean up in case it is reused 2490 event.result = undefined; 2491 event.target = elem; 2492 2493 // Clone the incoming data, if any 2494 data = jQuery.makeArray(data); 2495 data.unshift( event ); 2496 } 2497 2498 event.currentTarget = elem; 2499 2500 // Trigger the event, it is assumed that "handle" is a function 2501 var handle = jQuery.data(elem, "handle"); 2502 if ( handle ) 2503 handle.apply( elem, data ); 2504 2505 // Handle triggering native .onfoo handlers (and on links since we don't call .click() for links) 2506 if ( (!elem[type] || (jQuery.nodeName(elem, 'a') && type == "click")) && elem["on"+type] && elem["on"+type].apply( elem, data ) === false ) 2507 event.result = false; 2508 2509 // Trigger the native events (except for clicks on links) 2510 if ( !bubbling && elem[type] && !event.isDefaultPrevented() && !(jQuery.nodeName(elem, 'a') && type == "click") ) { 2511 this.triggered = true; 2512 try { 2513 elem[ type ](); 2514 // prevent IE from throwing an error for some hidden elements 2515 } catch (e) {} 2516 } 2517 2518 this.triggered = false; 2519 2520 if ( !event.isPropagationStopped() ) { 2521 var parent = elem.parentNode || elem.ownerDocument; 2522 if ( parent ) 2523 jQuery.event.trigger(event, data, parent, true); 2524 } 2525 }, 2526 2527 handle: function(event) { 2528 // returned undefined or false 2529 var all, handlers; 2530 2531 event = arguments[0] = jQuery.event.fix( event || window.event ); 2532 2533 // Namespaced event handlers 2534 var namespaces = event.type.split("."); 2535 event.type = namespaces.shift(); 2536 2537 // Cache this now, all = true means, any handler 2538 all = !namespaces.length && !event.exclusive; 2539 2540 var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)"); 2541 2542 handlers = ( jQuery.data(this, "events") || {} )[event.type]; 2543 2544 for ( var j in handlers ) { 2545 var handler = handlers[j]; 2546 2547 // Filter the functions by class 2548 if ( all || namespace.test(handler.type) ) { 2549 // Pass in a reference to the handler function itself 2550 // So that we can later remove it 2551 event.handler = handler; 2552 event.data = handler.data; 2553 2554 var ret = handler.apply(this, arguments); 2555 2556 if( ret !== undefined ){ 2557 event.result = ret; 2558 if ( ret === false ) { 2559 event.preventDefault(); 2560 event.stopPropagation(); 2561 } 2562 } 2563 2564 if( event.isImmediatePropagationStopped() ) 2565 break; 2566 2567 } 2568 } 2569 }, 2570 2571 props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), 2572 2573 fix: function(event) { 2574 if ( event[expando] ) 2575 return event; 2576 2577 // store a copy of the original event object 2578 // and "clone" to set read-only properties 2579 var originalEvent = event; 2580 event = jQuery.Event( originalEvent ); 2581 2582 for ( var i = this.props.length, prop; i; ){ 2583 prop = this.props[ --i ]; 2584 event[ prop ] = originalEvent[ prop ]; 2585 } 2586 2587 // Fix target property, if necessary 2588 if ( !event.target ) 2589 event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either 2590 2591 // check if target is a textnode (safari) 2592 if ( event.target.nodeType == 3 ) 2593 event.target = event.target.parentNode; 2594 2595 // Add relatedTarget, if necessary 2596 if ( !event.relatedTarget && event.fromElement ) 2597 event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement; 2598 2599 // Calculate pageX/Y if missing and clientX/Y available 2600 if ( event.pageX == null && event.clientX != null ) { 2601 var doc = document.documentElement, body = document.body; 2602 event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0); 2603 event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0); 2604 } 2605 2606 // Add which for key events 2607 if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) ) 2608 event.which = event.charCode || event.keyCode; 2609 2610 // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) 2611 if ( !event.metaKey && event.ctrlKey ) 2612 event.metaKey = event.ctrlKey; 2613 2614 // Add which for click: 1 == left; 2 == middle; 3 == right 2615 // Note: button is not normalized, so don't use it 2616 if ( !event.which && event.button ) 2617 event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); 2618 2619 return event; 2620 }, 2621 2622 proxy: function( fn, proxy ){ 2623 proxy = proxy || function(){ return fn.apply(this, arguments); }; 2624 // Set the guid of unique handler to the same of original handler, so it can be removed 2625 proxy.guid = fn.guid = fn.guid || proxy.guid || this.guid++; 2626 // So proxy can be declared as an argument 2627 return proxy; 2628 }, 2629 2630 special: { 2631 ready: { 2632 // Make sure the ready event is setup 2633 setup: bindReady, 2634 teardown: function() {} 2635 } 2636 }, 2637 2638 specialAll: { 2639 live: { 2640 setup: function( selector, namespaces ){ 2641 jQuery.event.add( this, namespaces[0], liveHandler ); 2642 }, 2643 teardown: function( namespaces ){ 2644 if ( namespaces.length ) { 2645 var remove = 0, name = RegExp("(^|\\.)" + namespaces[0] + "(\\.|$)"); 2646 2647 jQuery.each( (jQuery.data(this, "events").live || {}), function(){ 2648 if ( name.test(this.type) ) 2649 remove++; 2650 }); 2651 2652 if ( remove < 1 ) 2653 jQuery.event.remove( this, namespaces[0], liveHandler ); 2654 } 2655 } 2656 } 2657 } 2658 }; 2659 2660 jQuery.Event = function( src ){ 2661 // Allow instantiation without the 'new' keyword 2662 if( !this.preventDefault ) 2663 return new jQuery.Event(src); 2664 2665 // Event object 2666 if( src && src.type ){ 2667 this.originalEvent = src; 2668 this.type = src.type; 2669 this.timeStamp = src.timeStamp; 2670 // Event type 2671 }else 2672 this.type = src; 2673 2674 if( !this.timeStamp ) 2675 this.timeStamp = now(); 2676 2677 // Mark it as fixed 2678 this[expando] = true; 2679 }; 2680 2681 function returnFalse(){ 2682 return false; 2683 } 2684 function returnTrue(){ 2685 return true; 2686 } 2687 2688 // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding 2689 // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html 2690 jQuery.Event.prototype = { 2691 preventDefault: function() { 2692 this.isDefaultPrevented = returnTrue; 2693 2694 var e = this.originalEvent; 2695 if( !e ) 2696 return; 2697 // if preventDefault exists run it on the original event 2698 if (e.preventDefault) 2699 e.preventDefault(); 2700 // otherwise set the returnValue property of the original event to false (IE) 2701 e.returnValue = false; 2702 }, 2703 stopPropagation: function() { 2704 this.isPropagationStopped = returnTrue; 2705 2706 var e = this.originalEvent; 2707 if( !e ) 2708 return; 2709 // if stopPropagation exists run it on the original event 2710 if (e.stopPropagation) 2711 e.stopPropagation(); 2712 // otherwise set the cancelBubble property of the original event to true (IE) 2713 e.cancelBubble = true; 2714 }, 2715 stopImmediatePropagation:function(){ 2716 this.isImmediatePropagationStopped = returnTrue; 2717 this.stopPropagation(); 2718 }, 2719 isDefaultPrevented: returnFalse, 2720 isPropagationStopped: returnFalse, 2721 isImmediatePropagationStopped: returnFalse 2722 }; 2723 // Checks if an event happened on an element within another element 2724 // Used in jQuery.event.special.mouseenter and mouseleave handlers 2725 var withinElement = function(event) { 2726 // Check if mouse(over|out) are still within the same parent element 2727 var parent = event.relatedTarget; 2728 // Traverse up the tree 2729 while ( parent && parent != this ) 2730 try { parent = parent.parentNode; } 2731 catch(e) { parent = this; } 2732 2733 if( parent != this ){ 2734 // set the correct event type 2735 event.type = event.data; 2736 // handle event if we actually just moused on to a non sub-element 2737 jQuery.event.handle.apply( this, arguments ); 2738 } 2739 }; 2740 2741 jQuery.each({ 2742 mouseover: 'mouseenter', 2743 mouseout: 'mouseleave' 2744 }, function( orig, fix ){ 2745 jQuery.event.special[ fix ] = { 2746 setup: function(){ 2747 jQuery.event.add( this, orig, withinElement, fix ); 2748 }, 2749 teardown: function(){ 2750 jQuery.event.remove( this, orig, withinElement ); 2751 } 2752 }; 2753 }); 2754 2755 jQuery.fn.extend({ 2756 bind: function( type, data, fn ) { 2757 return type == "unload" ? this.one(type, data, fn) : this.each(function(){ 2758 jQuery.event.add( this, type, fn || data, fn && data ); 2759 }); 2760 }, 2761 2762 one: function( type, data, fn ) { 2763 var one = jQuery.event.proxy( fn || data, function(event) { 2764 jQuery(this).unbind(event, one); 2765 return (fn || data).apply( this, arguments ); 2766 }); 2767 return this.each(function(){ 2768 jQuery.event.add( this, type, one, fn && data); 2769 }); 2770 }, 2771 2772 unbind: function( type, fn ) { 2773 return this.each(function(){ 2774 jQuery.event.remove( this, type, fn ); 2775 }); 2776 }, 2777 2778 trigger: function( type, data ) { 2779 return this.each(function(){ 2780 jQuery.event.trigger( type, data, this ); 2781 }); 2782 }, 2783 2784 triggerHandler: function( type, data ) { 2785 if( this[0] ){ 2786 var event = jQuery.Event(type); 2787 event.preventDefault(); 2788 event.stopPropagation(); 2789 jQuery.event.trigger( event, data, this[0] ); 2790 return event.result; 2791 } 2792 }, 2793 2794 toggle: function( fn ) { 2795 // Save reference to arguments for access in closure 2796 var args = arguments, i = 1; 2797 2798 // link all the functions, so any of them can unbind this click handler 2799 while( i < args.length ) 2800 jQuery.event.proxy( fn, args[i++] ); 2801 2802 return this.click( jQuery.event.proxy( fn, function(event) { 2803 // Figure out which function to execute 2804 this.lastToggle = ( this.lastToggle || 0 ) % i; 2805 2806 // Make sure that clicks stop 2807 event.preventDefault(); 2808 2809 // and execute the function 2810 return args[ this.lastToggle++ ].apply( this, arguments ) || false; 2811 })); 2812 }, 2813 2814 hover: function(fnOver, fnOut) { 2815 return this.mouseenter(fnOver).mouseleave(fnOut); 2816 }, 2817 2818 ready: function(fn) { 2819 // Attach the listeners 2820 bindReady(); 2821 2822 // If the DOM is already ready 2823 if ( jQuery.isReady ) 2824 // Execute the function immediately 2825 fn.call( document, jQuery ); 2826 2827 // Otherwise, remember the function for later 2828 else 2829 // Add the function to the wait list 2830 jQuery.readyList.push( fn ); 2831 2832 return this; 2833 }, 2834 2835 live: function( type, fn ){ 2836 var proxy = jQuery.event.proxy( fn ); 2837 proxy.guid += this.selector + type; 2838 2839 jQuery(document).bind( liveConvert(type, this.selector), this.selector, proxy ); 2840 2841 return this; 2842 }, 2843 2844 die: function( type, fn ){ 2845 jQuery(document).unbind( liveConvert(type, this.selector), fn ? { guid: fn.guid + this.selector + type } : null ); 2846 return this; 2847 } 2848 }); 2849 2850 function liveHandler( event ){ 2851 var check = RegExp("(^|\\.)" + event.type + "(\\.|$)"), 2852 stop = true, 2853 elems = []; 2854 2855 jQuery.each(jQuery.data(this, "events").live || [], function(i, fn){ 2856 if ( check.test(fn.type) ) { 2857 var elem = jQuery(event.target).closest(fn.data)[0]; 2858 if ( elem ) 2859 elems.push({ elem: elem, fn: fn }); 2860 } 2861 }); 2862 2863 jQuery.each(elems, function(){ 2864 if ( !event.isImmediatePropagationStopped() && 2865 this.fn.call(this.elem, event, this.fn.data) === false ) 2866 stop = false; 2867 }); 2868 2869 return stop; 2870 } 2871 2872 function liveConvert(type, selector){ 2873 return ["live", type, selector.replace(/\./g, "`").replace(/ /g, "|")].join("."); 2874 } 2875 2876 jQuery.extend({ 2877 isReady: false, 2878 readyList: [], 2879 // Handle when the DOM is ready 2880 ready: function() { 2881 // Make sure that the DOM is not already loaded 2882 if ( !jQuery.isReady ) { 2883 // Remember that the DOM is ready 2884 jQuery.isReady = true; 2885 2886 // If there are functions bound, to execute 2887 if ( jQuery.readyList ) { 2888 // Execute all of them 2889 jQuery.each( jQuery.readyList, function(){ 2890 this.call( document, jQuery ); 2891 }); 2892 2893 // Reset the list of functions 2894 jQuery.readyList = null; 2895 } 2896 2897 // Trigger any bound ready events 2898 jQuery(document).triggerHandler("ready"); 2899 } 2900 } 2901 }); 2902 2903 var readyBound = false; 2904 2905 function bindReady(){ 2906 if ( readyBound ) return; 2907 readyBound = true; 2908 2909 // Mozilla, Opera and webkit nightlies currently support this event 2910 if ( document.addEventListener ) { 2911 // Use the handy event callback 2912 document.addEventListener( "DOMContentLoaded", function(){ 2913 document.removeEventListener( "DOMContentLoaded", arguments.callee, false ); 2914 jQuery.ready(); 2915 }, false ); 2916 2917 // If IE event model is used 2918 } else if ( document.attachEvent ) { 2919 // ensure firing before onload, 2920 // maybe late but safe also for iframes 2921 document.attachEvent("onreadystatechange", function(){ 2922 if ( document.readyState === "complete" ) { 2923 document.detachEvent( "onreadystatechange", arguments.callee ); 2924 jQuery.ready(); 2925 } 2926 }); 2927 2928 // If IE and not an iframe 2929 // continually check to see if the document is ready 2930 if ( document.documentElement.doScroll && !window.frameElement ) (function(){ 2931 if ( jQuery.isReady ) return; 2932 2933 try { 2934 // If IE is used, use the trick by Diego Perini 2935 // http://javascript.nwbox.com/IEContentLoaded/ 2936 document.documentElement.doScroll("left"); 2937 } catch( error ) { 2938 setTimeout( arguments.callee, 0 ); 2939 return; 2940 } 2941 2942 // and execute any waiting functions 2943 jQuery.ready(); 2944 })(); 2945 } 2946 2947 // A fallback to window.onload, that will always work 2948 jQuery.event.add( window, "load", jQuery.ready ); 2949 } 2950 2951 jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," + 2952 "mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave," + 2953 "change,select,submit,keydown,keypress,keyup,error").split(","), function(i, name){ 2954 2955 // Handle event binding 2956 jQuery.fn[name] = function(fn){ 2957 return fn ? this.bind(name, fn) : this.trigger(name); 2958 }; 2959 }); 2960 2961 // Prevent memory leaks in IE 2962 // And prevent errors on refresh with events like mouseover in other browsers 2963 // Window isn't included so as not to unbind existing unload events 2964 jQuery( window ).bind( 'unload', function(){ 2965 for ( var id in jQuery.cache ) 2966 // Skip the window 2967 if ( id != 1 && jQuery.cache[ id ].handle ) 2968 jQuery.event.remove( jQuery.cache[ id ].handle.elem ); 2969 }); 2970 (function(){ 2971 2972 jQuery.support = {}; 2973 2974 var root = document.documentElement, 2975 script = document.createElement("script"), 2976 div = document.createElement("div"), 2977 id = "script" + (new Date).getTime(); 2978 2979 div.style.display = "none"; 2980 div.innerHTML = ' <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param></object>'; 2981 2982 var all = div.getElementsByTagName("*"), 2983 a = div.getElementsByTagName("a")[0]; 2984 2985 // Can't get basic test support 2986 if ( !all || !all.length || !a ) { 2987 return; 2988 } 2989 2990 jQuery.support = { 2991 // IE strips leading whitespace when .innerHTML is used 2992 leadingWhitespace: div.firstChild.nodeType == 3, 2993 2994 // Make sure that tbody elements aren't automatically inserted 2995 // IE will insert them into empty tables 2996 tbody: !div.getElementsByTagName("tbody").length, 2997 2998 // Make sure that you can get all elements in an <object> element 2999 // IE 7 always returns no results 3000 objectAll: !!div.getElementsByTagName("object")[0] 3001 .getElementsByTagName("*").length, 3002 3003 // Make sure that link elements get serialized correctly by innerHTML 3004 // This requires a wrapper element in IE 3005 htmlSerialize: !!div.getElementsByTagName("link").length, 3006 3007 // Get the style information from getAttribute 3008 // (IE uses .cssText insted) 3009 style: /red/.test( a.getAttribute("style") ), 3010 3011 // Make sure that URLs aren't manipulated 3012 // (IE normalizes it by default) 3013 hrefNormalized: a.getAttribute("href") === "/a", 3014 3015 // Make sure that element opacity exists 3016 // (IE uses filter instead) 3017 opacity: a.style.opacity === "0.5", 3018 3019 // Verify style float existence 3020 // (IE uses styleFloat instead of cssFloat) 3021 cssFloat: !!a.style.cssFloat, 3022 3023 // Will be defined later 3024 scriptEval: false, 3025 noCloneEvent: true, 3026 boxModel: null 3027 }; 3028 3029 script.type = "text/javascript"; 3030 try { 3031 script.appendChild( document.createTextNode( "window." + id + "=1;" ) ); 3032 } catch(e){} 3033 3034 root.insertBefore( script, root.firstChild ); 3035 3036 // Make sure that the execution of code works by injecting a script 3037 // tag with appendChild/createTextNode 3038 // (IE doesn't support this, fails, and uses .text instead) 3039 if ( window[ id ] ) { 3040 jQuery.support.scriptEval = true; 3041 delete window[ id ]; 3042 } 3043 3044 root.removeChild( script ); 3045 3046 if ( div.attachEvent && div.fireEvent ) { 3047 div.attachEvent("onclick", function(){ 3048 // Cloning a node shouldn't copy over any 3049 // bound event handlers (IE does this) 3050 jQuery.support.noCloneEvent = false; 3051 div.detachEvent("onclick", arguments.callee); 3052 }); 3053 div.cloneNode(true).fireEvent("onclick"); 3054 } 3055 3056 // Figure out if the W3C box model works as expected 3057 // document.body must exist before we can do this 3058 jQuery(function(){ 3059 var div = document.createElement("div"); 3060 div.style.width = "1px"; 3061 div.style.paddingLeft = "1px"; 3062 3063 document.body.appendChild( div ); 3064 jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2; 3065 document.body.removeChild( div ); 3066 }); 3067 })(); 3068 3069 var styleFloat = jQuery.support.cssFloat ? "cssFloat" : "styleFloat"; 3070 3071 jQuery.props = { 3072 "for": "htmlFor", 3073 "class": "className", 3074 "float": styleFloat, 3075 cssFloat: styleFloat, 3076 styleFloat: styleFloat, 3077 readonly: "readOnly", 3078 maxlength: "maxLength", 3079 cellspacing: "cellSpacing", 3080 rowspan: "rowSpan", 3081 tabindex: "tabIndex" 3082 }; 3083 jQuery.fn.extend({ 3084 // Keep a copy of the old load 3085 _load: jQuery.fn.load, 3086 3087 load: function( url, params, callback ) { 3088 if ( typeof url !== "string" ) 3089 return this._load( url ); 3090 3091 var off = url.indexOf(" "); 3092 if ( off >= 0 ) { 3093 var selector = url.slice(off, url.length); 3094 url = url.slice(0, off); 3095 } 3096 3097 // Default to a GET request 3098 var type = "GET"; 3099 3100 // If the second parameter was provided 3101 if ( params ) 3102 // If it's a function 3103 if ( jQuery.isFunction( params ) ) { 3104 // We assume that it's the callback 3105 callback = params; 3106 params = null; 3107 3108 // Otherwise, build a param string 3109 } else if( typeof params === "object" ) { 3110 params = jQuery.param( params ); 3111 type = "POST"; 3112 } 3113 3114 var self = this; 3115 3116 // Request the remote document 3117 jQuery.ajax({ 3118 url: url, 3119 type: type, 3120 dataType: "html", 3121 data: params, 3122 complete: function(res, status){ 3123 // If successful, inject the HTML into all the matched elements 3124 if ( status == "success" || status == "notmodified" ) 3125 // See if a selector was specified 3126 self.html( selector ? 3127 // Create a dummy div to hold the results 3128 jQuery("<div/>") 3129 // inject the contents of the document in, removing the scripts 3130 // to avoid any 'Permission Denied' errors in IE 3131 .append(res.responseText.replace(/<script(.|\s)*?\/script>/g, "")) 3132 3133 // Locate the specified elements 3134 .find(selector) : 3135 3136 // If not, just inject the full result 3137 res.responseText ); 3138 3139 if( callback ) 3140 self.each( callback, [res.responseText, status, res] ); 3141 } 3142 }); 3143 return this; 3144 }, 3145 3146 serialize: function() { 3147 return jQuery.param(this.serializeArray()); 3148 }, 3149 serializeArray: function() { 3150 return this.map(function(){ 3151 return this.elements ? jQuery.makeArray(this.elements) : this; 3152 }) 3153 .filter(function(){ 3154 return this.name && !this.disabled && 3155 (this.checked || /select|textarea/i.test(this.nodeName) || 3156 /text|hidden|password/i.test(this.type)); 3157 }) 3158 .map(function(i, elem){ 3159 var val = jQuery(this).val(); 3160 return val == null ? null : 3161 jQuery.isArray(val) ? 3162 jQuery.map( val, function(val, i){ 3163 return {name: elem.name, value: val}; 3164 }) : 3165 {name: elem.name, value: val}; 3166 }).get(); 3167 } 3168 }); 3169 3170 // Attach a bunch of functions for handling common AJAX events 3171 jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){ 3172 jQuery.fn[o] = function(f){ 3173 return this.bind(o, f); 3174 }; 3175 }); 3176 3177 var jsc = now(); 3178 3179 jQuery.extend({ 3180 3181 get: function( url, data, callback, type ) { 3182 // shift arguments if data argument was ommited 3183 if ( jQuery.isFunction( data ) ) { 3184 callback = data; 3185 data = null; 3186 } 3187 3188 return jQuery.ajax({ 3189 type: "GET", 3190 url: url, 3191 data: data, 3192 success: callback, 3193 dataType: type 3194 }); 3195 }, 3196 3197 getScript: function( url, callback ) { 3198 return jQuery.get(url, null, callback, "script"); 3199 }, 3200 3201 getJSON: function( url, data, callback ) { 3202 return jQuery.get(url, data, callback, "json"); 3203 }, 3204 3205 post: function( url, data, callback, type ) { 3206 if ( jQuery.isFunction( data ) ) { 3207 callback = data; 3208 data = {}; 3209 } 3210 3211 return jQuery.ajax({ 3212 type: "POST", 3213 url: url, 3214 data: data, 3215 success: callback, 3216 dataType: type 3217 }); 3218 }, 3219 3220 ajaxSetup: function( settings ) { 3221 jQuery.extend( jQuery.ajaxSettings, settings ); 3222 }, 3223 3224 ajaxSettings: { 3225 url: location.href, 3226 global: true, 3227 type: "GET", 3228 contentType: "application/x-www-form-urlencoded", 3229 processData: true, 3230 async: true, 3231 /* 3232 timeout: 0, 3233 data: null, 3234 username: null, 3235 password: null, 3236 */ 3237 // Create the request object; Microsoft failed to properly 3238 // implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available 3239 // This function can be overriden by calling jQuery.ajaxSetup 3240 xhr:function(){ 3241 return window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); 3242 }, 3243 accepts: { 3244 xml: "application/xml, text/xml", 3245 html: "text/html", 3246 script: "text/javascript, application/javascript", 3247 json: "application/json, text/javascript", 3248 text: "text/plain", 3249 _default: "*/*" 3250 } 3251 }, 3252 3253 // Last-Modified header cache for next request 3254 lastModified: {}, 3255 3256 ajax: function( s ) { 3257 // Extend the settings, but re-extend 's' so that it can be 3258 // checked again later (in the test suite, specifically) 3259 s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s)); 3260 3261 var jsonp, jsre = /=\?(&|$)/g, status, data, 3262 type = s.type.toUpperCase(); 3263 3264 // convert data if not already a string 3265 if ( s.data && s.processData && typeof s.data !== "string" ) 3266 s.data = jQuery.param(s.data); 3267 3268 // Handle JSONP Parameter Callbacks 3269 if ( s.dataType == "jsonp" ) { 3270 if ( type == "GET" ) { 3271 if ( !s.url.match(jsre) ) 3272 s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?"; 3273 } else if ( !s.data || !s.data.match(jsre) ) 3274 s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?"; 3275 s.dataType = "json"; 3276 } 3277 3278 // Build temporary JSONP function 3279 if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) { 3280 jsonp = "jsonp" + jsc++; 3281 3282 // Replace the =? sequence both in the query string and the data 3283 if ( s.data ) 3284 s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1"); 3285 s.url = s.url.replace(jsre, "=" + jsonp + "$1"); 3286 3287 // We need to make sure 3288 // that a JSONP style response is executed properly 3289 s.dataType = "script"; 3290 3291 // Handle JSONP-style loading 3292 window[ jsonp ] = function(tmp){ 3293 data = tmp; 3294 success(); 3295 complete(); 3296 // Garbage collect 3297 window[ jsonp ] = undefined; 3298 try{ delete window[ jsonp ]; } catch(e){} 3299 if ( head ) 3300 head.removeChild( script ); 3301 }; 3302 } 3303 3304 if ( s.dataType == "script" && s.cache == null ) 3305 s.cache = false; 3306 3307 if ( s.cache === false && type == "GET" ) { 3308 var ts = now(); 3309 // try replacing _= if it is there 3310 var ret = s.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + ts + "$2"); 3311 // if nothing was replaced, add timestamp to the end 3312 s.url = ret + ((ret == s.url) ? (s.url.match(/\?/) ? "&" : "?") + "_=" + ts : ""); 3313 } 3314 3315 // If data is available, append data to url for get requests 3316 if ( s.data && type == "GET" ) { 3317 s.url += (s.url.match(/\?/) ? "&" : "?") + s.data; 3318 3319 // IE likes to send both get and post data, prevent this 3320 s.data = null; 3321 } 3322 3323 // Watch for a new set of requests 3324 if ( s.global && ! jQuery.active++ ) 3325 jQuery.event.trigger( "ajaxStart" ); 3326 3327 // Matches an absolute URL, and saves the domain 3328 var parts = /^(\w+:)?\/\/([^\/?#]+)/.exec( s.url ); 3329 3330 // If we're requesting a remote document 3331 // and trying to load JSON or Script with a GET 3332 if ( s.dataType == "script" && type == "GET" && parts 3333 && ( parts[1] && parts[1] != location.protocol || parts[2] != location.host )){ 3334 3335 var head = document.getElementsByTagName("head")[0]; 3336 var script = document.createElement("script"); 3337 script.src = s.url; 3338 if (s.scriptCharset) 3339 script.charset = s.scriptCharset; 3340 3341 // Handle Script loading 3342 if ( !jsonp ) { 3343 var done = false; 3344 3345 // Attach handlers for all browsers 3346 script.onload = script.onreadystatechange = function(){ 3347 if ( !done && (!this.readyState || 3348 this.readyState == "loaded" || this.readyState == "complete") ) { 3349 done = true; 3350 success(); 3351 complete(); 3352 head.removeChild( script ); 3353 } 3354 }; 3355 } 3356 3357 head.appendChild(script); 3358 3359 // We handle everything using the script element injection 3360 return undefined; 3361 } 3362 3363 var requestDone = false; 3364 3365 // Create the request object 3366 var xhr = s.xhr(); 3367 3368 // Open the socket 3369 // Passing null username, generates a login popup on Opera (#2865) 3370 if( s.username ) 3371 xhr.open(type, s.url, s.async, s.username, s.password); 3372 else 3373 xhr.open(type, s.url, s.async); 3374 3375 // Need an extra try/catch for cross domain requests in Firefox 3 3376 try { 3377 // Set the correct header, if data is being sent 3378 if ( s.data ) 3379 xhr.setRequestHeader("Content-Type", s.contentType); 3380 3381 // Set the If-Modified-Since header, if ifModified mode. 3382 if ( s.ifModified ) 3383 xhr.setRequestHeader("If-Modified-Since", 3384 jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" ); 3385 3386 // Set header so the called script knows that it's an XMLHttpRequest 3387 xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"); 3388 3389 // Set the Accepts header for the server, depending on the dataType 3390 xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ? 3391 s.accepts[ s.dataType ] + ", */*" : 3392 s.accepts._default ); 3393 } catch(e){} 3394 3395 // Allow custom headers/mimetypes and early abort 3396 if ( s.beforeSend && s.beforeSend(xhr, s) === false ) { 3397 // Handle the global AJAX counter 3398 if ( s.global && ! --jQuery.active ) 3399 jQuery.event.trigger( "ajaxStop" ); 3400 // close opended socket 3401 xhr.abort(); 3402 return false; 3403 } 3404 3405 if ( s.global ) 3406 jQuery.event.trigger("ajaxSend", [xhr, s]); 3407 3408 // Wait for a response to come back 3409 var onreadystatechange = function(isTimeout){ 3410 // The request was aborted, clear the interval and decrement jQuery.active 3411 if (xhr.readyState == 0) { 3412 if (ival) { 3413 // clear poll interval 3414 clearInterval(ival); 3415 ival = null; 3416 // Handle the global AJAX counter 3417 if ( s.global && ! --jQuery.active ) 3418 jQuery.event.trigger( "ajaxStop" ); 3419 } 3420 // The transfer is complete and the data is available, or the request timed out 3421 } else if ( !requestDone && xhr && (xhr.readyState == 4 || isTimeout == "timeout") ) { 3422 requestDone = true; 3423 3424 // clear poll interval 3425 if (ival) { 3426 clearInterval(ival); 3427 ival = null; 3428 } 3429 3430 status = isTimeout == "timeout" ? "timeout" : 3431 !jQuery.httpSuccess( xhr ) ? "error" : 3432 s.ifModified && jQuery.httpNotModified( xhr, s.url ) ? "notmodified" : 3433 "success"; 3434 3435 if ( status == "success" ) { 3436 // Watch for, and catch, XML document parse errors 3437 try { 3438 // process the data (runs the xml through httpData regardless of callback) 3439 data = jQuery.httpData( xhr, s.dataType, s ); 3440 } catch(e) { 3441 status = "parsererror"; 3442 } 3443 } 3444 3445 // Make sure that the request was successful or notmodified 3446 if ( status == "success" ) { 3447 // Cache Last-Modified header, if ifModified mode. 3448 var modRes; 3449 try { 3450 modRes = xhr.getResponseHeader("Last-Modified"); 3451 } catch(e) {} // swallow exception thrown by FF if header is not available 3452 3453 if ( s.ifModified && modRes ) 3454 jQuery.lastModified[s.url] = modRes; 3455 3456 // JSONP handles its own success callback 3457 if ( !jsonp ) 3458 success(); 3459 } else 3460 jQuery.handleError(s, xhr, status); 3461 3462 // Fire the complete handlers 3463 complete(); 3464 3465 // Stop memory leaks 3466 if ( s.async ) 3467 xhr = null; 3468 } 3469 }; 3470 3471 if ( s.async ) { 3472 // don't attach the handler to the request, just poll it instead 3473 var ival = setInterval(onreadystatechange, 13); 3474 3475 // Timeout checker 3476 if ( s.timeout > 0 ) 3477 setTimeout(function(){ 3478 // Check to see if the request is still happening 3479 if ( xhr ) { 3480 if( !requestDone ) 3481 onreadystatechange( "timeout" ); 3482 3483 // Cancel the request 3484 if ( xhr ) 3485 xhr.abort(); 3486 } 3487 }, s.timeout); 3488 } 3489 3490 // Send the data 3491 try { 3492 xhr.send(s.data); 3493 } catch(e) { 3494 jQuery.handleError(s, xhr, null, e); 3495 } 3496 3497 // firefox 1.5 doesn't fire statechange for sync requests 3498 if ( !s.async ) 3499 onreadystatechange(); 3500 3501 function success(){ 3502 // If a local callback was specified, fire it and pass it the data 3503 if ( s.success ) 3504 s.success( data, status ); 3505 3506 // Fire the global callback 3507 if ( s.global ) 3508 jQuery.event.trigger( "ajaxSuccess", [xhr, s] ); 3509 } 3510 3511 function complete(){ 3512 // Process result 3513 if ( s.complete ) 3514 s.complete(xhr, status); 3515 3516 // The request was completed 3517 if ( s.global ) 3518 jQuery.event.trigger( "ajaxComplete", [xhr, s] ); 3519 3520 // Handle the global AJAX counter 3521 if ( s.global && ! --jQuery.active ) 3522 jQuery.event.trigger( "ajaxStop" ); 3523 } 3524 3525 // return XMLHttpRequest to allow aborting the request etc. 3526 return xhr; 3527 }, 3528 3529 handleError: function( s, xhr, status, e ) { 3530 // If a local callback was specified, fire it 3531 if ( s.error ) s.error( xhr, status, e ); 3532 3533 // Fire the global callback 3534 if ( s.global ) 3535 jQuery.event.trigger( "ajaxError", [xhr, s, e] ); 3536 }, 3537 3538 // Counter for holding the number of active queries 3539 active: 0, 3540 3541 // Determines if an XMLHttpRequest was successful or not 3542 httpSuccess: function( xhr ) { 3543 try { 3544 // IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450 3545 return !xhr.status && location.protocol == "file:" || 3546 ( xhr.status >= 200 && xhr.status < 300 ) || xhr.status == 304 || xhr.status == 1223; 3547 } catch(e){} 3548 return false; 3549 }, 3550 3551 // Determines if an XMLHttpRequest returns NotModified 3552 httpNotModified: function( xhr, url ) { 3553 try { 3554 var xhrRes = xhr.getResponseHeader("Last-Modified"); 3555 3556 // Firefox always returns 200. check Last-Modified date 3557 return xhr.status == 304 || xhrRes == jQuery.lastModified[url]; 3558 } catch(e){} 3559 return false; 3560 }, 3561 3562 httpData: function( xhr, type, s ) { 3563 var ct = xhr.getResponseHeader("content-type"), 3564 xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0, 3565 data = xml ? xhr.responseXML : xhr.responseText; 3566 3567 if ( xml && data.documentElement.tagName == "parsererror" ) 3568 throw "parsererror"; 3569 3570 // Allow a pre-filtering function to sanitize the response 3571 // s != null is checked to keep backwards compatibility 3572 if( s && s.dataFilter ) 3573 data = s.dataFilter( data, type ); 3574 3575 // The filter can actually parse the response 3576 if( typeof data === "string" ){ 3577 3578 // If the type is "script", eval it in global context 3579 if ( type == "script" ) 3580 jQuery.globalEval( data ); 3581 3582 // Get the JavaScript object, if JSON is used. 3583 if ( type == "json" ) 3584 data = window["eval"]("(" + data + ")"); 3585 } 3586 3587 return data; 3588 }, 3589 3590 // Serialize an array of form elements or a set of 3591 // key/values into a query string 3592 param: function( a ) { 3593 var s = [ ]; 3594 3595 function add( key, value ){ 3596 s[ s.length ] = encodeURIComponent(key) + '=' + encodeURIComponent(value); 3597 }; 3598 3599 // If an array was passed in, assume that it is an array 3600 // of form elements 3601 if ( jQuery.isArray(a) || a.jquery ) 3602 // Serialize the form elements 3603 jQuery.each( a, function(){ 3604 add( this.name, this.value ); 3605 }); 3606 3607 // Otherwise, assume that it's an object of key/value pairs 3608 else 3609 // Serialize the key/values 3610 for ( var j in a ) 3611 // If the value is an array then the key names need to be repeated 3612 if ( jQuery.isArray(a[j]) ) 3613 jQuery.each( a[j], function(){ 3614 add( j, this ); 3615 }); 3616 else 3617 add( j, jQuery.isFunction(a[j]) ? a[j]() : a[j] ); 3618 3619 // Return the resulting serialization 3620 return s.join("&").replace(/%20/g, "+"); 3621 } 3622 3623 }); 3624 var elemdisplay = {}, 3625 fxAttrs = [ 3626 // height animations 3627 [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ], 3628 // width animations 3629 [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ], 3630 // opacity animations 3631 [ "opacity" ] 3632 ]; 3633 3634 function genFx( type, num ){ 3635 var obj = {}; 3636 jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function(){ 3637 obj[ this ] = type; 3638 }); 3639 return obj; 3640 } 3641 3642 jQuery.fn.extend({ 3643 show: function(speed,callback){ 3644 if ( speed ) { 3645 return this.animate( genFx("show", 3), speed, callback); 3646 } else { 3647 for ( var i = 0, l = this.length; i < l; i++ ){ 3648 var old = jQuery.data(this[i], "olddisplay"); 3649 3650 this[i].style.display = old || ""; 3651 3652 if ( jQuery.css(this[i], "display") === "none" ) { 3653 var tagName = this[i].tagName, display; 3654 3655 if ( elemdisplay[ tagName ] ) { 3656 display = elemdisplay[ tagName ]; 3657 } else { 3658 var elem = jQuery("<" + tagName + " />").appendTo("body"); 3659 3660 display = elem.css("display"); 3661 if ( display === "none" ) 3662 display = "block"; 3663 3664 elem.remove(); 3665 3666 elemdisplay[ tagName ] = display; 3667 } 3668 3669 this[i].style.display = jQuery.data(this[i], "olddisplay", display); 3670 } 3671 } 3672 3673 return this; 3674 } 3675 }, 3676 3677 hide: function(speed,callback){ 3678 if ( speed ) { 3679 return this.animate( genFx("hide", 3), speed, callback); 3680 } else { 3681 for ( var i = 0, l = this.length; i < l; i++ ){ 3682 var old = jQuery.data(this[i], "olddisplay"); 3683 if ( !old && old !== "none" ) 3684 jQuery.data(this[i], "olddisplay", jQuery.css(this[i], "display")); 3685 this[i].style.display = "none"; 3686 } 3687 return this; 3688 } 3689 }, 3690 3691 // Save the old toggle function 3692 _toggle: jQuery.fn.toggle, 3693 3694 toggle: function( fn, fn2 ){ 3695 var bool = typeof fn === "boolean"; 3696 3697 return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ? 3698 this._toggle.apply( this, arguments ) : 3699 fn == null || bool ? 3700 this.each(function(){ 3701 var state = bool ? fn : jQuery(this).is(":hidden"); 3702 jQuery(this)[ state ? "show" : "hide" ](); 3703 }) : 3704 this.animate(genFx("toggle", 3), fn, fn2); 3705 }, 3706 3707 fadeTo: function(speed,to,callback){ 3708 return this.animate({opacity: to}, speed, callback); 3709 }, 3710 3711 animate: function( prop, speed, easing, callback ) { 3712 var optall = jQuery.speed(speed, easing, callback); 3713 3714 return this[ optall.queue === false ? "each" : "queue" ](function(){ 3715 3716 var opt = jQuery.extend({}, optall), p, 3717 hidden = this.nodeType == 1 && jQuery(this).is(":hidden"), 3718 self = this; 3719 3720 for ( p in prop ) { 3721 if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden ) 3722 return opt.complete.call(this); 3723 3724 if ( ( p == "height" || p == "width" ) && this.style ) { 3725 // Store display property 3726 opt.display = jQuery.css(this, "display"); 3727 3728 // Make sure that nothing sneaks out 3729 opt.overflow = this.style.overflow; 3730 } 3731 } 3732 3733 if ( opt.overflow != null ) 3734 this.style.overflow = "hidden"; 3735 3736 opt.curAnim = jQuery.extend({}, prop); 3737 3738 jQuery.each( prop, function(name, val){ 3739 var e = new jQuery.fx( self, opt, name ); 3740 3741 if ( /toggle|show|hide/.test(val) ) 3742 e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop ); 3743 else { 3744 var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/), 3745 start = e.cur(true) || 0; 3746 3747 if ( parts ) { 3748 var end = parseFloat(parts[2]), 3749 unit = parts[3] || "px"; 3750 3751 // We need to compute starting value 3752 if ( unit != "px" ) { 3753 self.style[ name ] = (end || 1) + unit; 3754 start = ((end || 1) / e.cur(true)) * start; 3755 self.style[ name ] = start + unit; 3756 } 3757 3758 // If a +=/-= token was provided, we're doing a relative animation 3759 if ( parts[1] ) 3760 end = ((parts[1] == "-=" ? -1 : 1) * end) + start; 3761 3762 e.custom( start, end, unit ); 3763 } else 3764 e.custom( start, val, "" ); 3765 } 3766 }); 3767 3768 // For JS strict compliance 3769 return true; 3770 }); 3771 }, 3772 3773 stop: function(clearQueue, gotoEnd){ 3774 var timers = jQuery.timers; 3775 3776 if (clearQueue) 3777 this.queue([]); 3778 3779 this.each(function(){ 3780 // go in reverse order so anything added to the queue during the loop is ignored 3781 for ( var i = timers.length - 1; i >= 0; i-- ) 3782 if ( timers[i].elem == this ) { 3783 if (gotoEnd) 3784 // force the next step to be the last 3785 timers[i](true); 3786 timers.splice(i, 1); 3787 } 3788 }); 3789 3790 // start the next in the queue if the last step wasn't forced 3791 if (!gotoEnd) 3792 this.dequeue(); 3793 3794 return this; 3795 } 3796 3797 }); 3798 3799 // Generate shortcuts for custom animations 3800 jQuery.each({ 3801 slideDown: genFx("show", 1), 3802 slideUp: genFx("hide", 1), 3803 slideToggle: genFx("toggle", 1), 3804 fadeIn: { opacity: "show" }, 3805 fadeOut: { opacity: "hide" } 3806 }, function( name, props ){ 3807 jQuery.fn[ name ] = function( speed, callback ){ 3808 return this.animate( props, speed, callback ); 3809 }; 3810 }); 3811 3812 jQuery.extend({ 3813 3814 speed: function(speed, easing, fn) { 3815 var opt = typeof speed === "object" ? speed : { 3816 complete: fn || !fn && easing || 3817 jQuery.isFunction( speed ) && speed, 3818 duration: speed, 3819 easing: fn && easing || easing && !jQuery.isFunction(easing) && easing 3820 }; 3821 3822 opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : 3823 jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default; 3824 3825 // Queueing 3826 opt.old = opt.complete; 3827 opt.complete = function(){ 3828 if ( opt.queue !== false ) 3829 jQuery(this).dequeue(); 3830 if ( jQuery.isFunction( opt.old ) ) 3831 opt.old.call( this ); 3832 }; 3833 3834 return opt; 3835 }, 3836 3837 easing: { 3838 linear: function( p, n, firstNum, diff ) { 3839 return firstNum + diff * p; 3840 }, 3841 swing: function( p, n, firstNum, diff ) { 3842 return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum; 3843 } 3844 }, 3845 3846 timers: [], 3847 timerId: null, 3848 3849 fx: function( elem, options, prop ){ 3850 this.options = options; 3851 this.elem = elem; 3852 this.prop = prop; 3853 3854 if ( !options.orig ) 3855 options.orig = {}; 3856 } 3857 3858 }); 3859 3860 jQuery.fx.prototype = { 3861 3862 // Simple function for setting a style value 3863 update: function(){ 3864 if ( this.options.step ) 3865 this.options.step.call( this.elem, this.now, this ); 3866 3867 (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this ); 3868 3869 // Set display property to block for height/width animations 3870 if ( ( this.prop == "height" || this.prop == "width" ) && this.elem.style ) 3871 this.elem.style.display = "block"; 3872 }, 3873 3874 // Get the current size 3875 cur: function(force){ 3876 if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) 3877 return this.elem[ this.prop ]; 3878 3879 var r = parseFloat(jQuery.css(this.elem, this.prop, force)); 3880 return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0; 3881 }, 3882 3883 // Start an animation from one number to another 3884 custom: function(from, to, unit){ 3885 this.startTime = now(); 3886 this.start = from; 3887 this.end = to; 3888 this.unit = unit || this.unit || "px"; 3889 this.now = this.start; 3890 this.pos = this.state = 0; 3891 3892 var self = this; 3893 function t(gotoEnd){ 3894 return self.step(gotoEnd); 3895 } 3896 3897 t.elem = this.elem; 3898 3899 jQuery.timers.push(t); 3900 3901 if ( t() && jQuery.timerId == null ) { 3902 jQuery.timerId = setInterval(function(){ 3903 var timers = jQuery.timers; 3904 3905 for ( var i = 0; i < timers.length; i++ ) 3906 if ( !timers[i]() ) 3907 timers.splice(i--, 1); 3908 3909 if ( !timers.length ) { 3910 clearInterval( jQuery.timerId ); 3911 jQuery.timerId = null; 3912 } 3913 }, 13); 3914 } 3915 }, 3916 3917 // Simple 'show' function 3918 show: function(){ 3919 // Remember where we started, so that we can go back to it later 3920 this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop ); 3921 this.options.show = true; 3922 3923 // Begin the animation 3924 // Make sure that we start at a small width/height to avoid any 3925 // flash of content 3926 this.custom(this.prop == "width" || this.prop == "height" ? 1 : 0, this.cur()); 3927 3928 // Start by showing the element 3929 jQuery(this.elem).show(); 3930 }, 3931 3932 // Simple 'hide' function 3933 hide: function(){ 3934 // Remember where we started, so that we can go back to it later 3935 this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop ); 3936 this.options.hide = true; 3937 3938 // Begin the animation 3939 this.custom(this.cur(), 0); 3940 }, 3941 3942 // Each step of an animation 3943 step: function(gotoEnd){ 3944 var t = now(); 3945 3946 if ( gotoEnd || t >= this.options.duration + this.startTime ) { 3947 this.now = this.end; 3948 this.pos = this.state = 1; 3949 this.update(); 3950 3951 this.options.curAnim[ this.prop ] = true; 3952 3953 var done = true; 3954 for ( var i in this.options.curAnim ) 3955 if ( this.options.curAnim[i] !== true ) 3956 done = false; 3957 3958 if ( done ) { 3959 if ( this.options.display != null ) { 3960 // Reset the overflow 3961 this.elem.style.overflow = this.options.overflow; 3962 3963 // Reset the display 3964 this.elem.style.display = this.options.display; 3965 if ( jQuery.css(this.elem, "display") == "none" ) 3966 this.elem.style.display = "block"; 3967 } 3968 3969 // Hide the element if the "hide" operation was done 3970 if ( this.options.hide ) 3971 jQuery(this.elem).hide(); 3972 3973 // Reset the properties, if the item has been hidden or shown 3974 if ( this.options.hide || this.options.show ) 3975 for ( var p in this.options.curAnim ) 3976 jQuery.attr(this.elem.style, p, this.options.orig[p]); 3977 } 3978 3979 if ( done ) 3980 // Execute the complete function 3981 this.options.complete.call( this.elem ); 3982 3983 return false; 3984 } else { 3985 var n = t - this.startTime; 3986 this.state = n / this.options.duration; 3987 3988 // Perform the easing function, defaults to swing 3989 this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration); 3990 this.now = this.start + ((this.end - this.start) * this.pos); 3991 3992 // Perform the next step of the animation 3993 this.update(); 3994 } 3995 3996 return true; 3997 } 3998 3999 }; 4000 4001 jQuery.extend( jQuery.fx, { 4002 speeds:{ 4003 slow: 600, 4004 fast: 200, 4005 // Default speed 4006 _default: 400 4007 }, 4008 step: { 4009 4010 opacity: function(fx){ 4011 jQuery.attr(fx.elem.style, "opacity", fx.now); 4012 }, 4013 4014 _default: function(fx){ 4015 if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) 4016 fx.elem.style[ fx.prop ] = fx.now + fx.unit; 4017 else 4018 fx.elem[ fx.prop ] = fx.now; 4019 } 4020 } 4021 }); 4022 if ( document.documentElement["getBoundingClientRect"] ) 4023 jQuery.fn.offset = function() { 4024 if ( !this[0] ) return { top: 0, left: 0 }; 4025 if ( this[0] === this[0].ownerDocument.body ) return jQuery.offset.bodyOffset( this[0] ); 4026 var box = this[0].getBoundingClientRect(), doc = this[0].ownerDocument, body = doc.body, docElem = doc.documentElement, 4027 clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0, 4028 top = box.top + (self.pageYOffset || jQuery.boxModel && docElem.scrollTop || body.scrollTop ) - clientTop, 4029 left = box.left + (self.pageXOffset || jQuery.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft; 4030 return { top: top, left: left }; 4031 }; 4032 else 4033 jQuery.fn.offset = function() { 4034 if ( !this[0] ) return { top: 0, left: 0 }; 4035 if ( this[0] === this[0].ownerDocument.body ) return jQuery.offset.bodyOffset( this[0] ); 4036 jQuery.offset.initialized || jQuery.offset.initialize(); 4037 4038 var elem = this[0], offsetParent = elem.offsetParent, prevOffsetParent = elem, 4039 doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement, 4040 body = doc.body, defaultView = doc.defaultView, 4041 prevComputedStyle = defaultView.getComputedStyle(elem, null), 4042 top = elem.offsetTop, left = elem.offsetLeft; 4043 4044 while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) { 4045 computedStyle = defaultView.getComputedStyle(elem, null); 4046 top -= elem.scrollTop, left -= elem.scrollLeft; 4047 if ( elem === offsetParent ) { 4048 top += elem.offsetTop, left += elem.offsetLeft; 4049 if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(elem.tagName)) ) 4050 top += parseInt( computedStyle.borderTopWidth, 10) || 0, 4051 left += parseInt( computedStyle.borderLeftWidth, 10) || 0; 4052 prevOffsetParent = offsetParent, offsetParent = elem.offsetParent; 4053 } 4054 if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) 4055 top += parseInt( computedStyle.borderTopWidth, 10) || 0, 4056 left += parseInt( computedStyle.borderLeftWidth, 10) || 0; 4057 prevComputedStyle = computedStyle; 4058 } 4059 4060 if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) 4061 top += body.offsetTop, 4062 left += body.offsetLeft; 4063 4064 if ( prevComputedStyle.position === "fixed" ) 4065 top += Math.max(docElem.scrollTop, body.scrollTop), 4066 left += Math.max(docElem.scrollLeft, body.scrollLeft); 4067 4068 return { top: top, left: left }; 4069 }; 4070 4071 jQuery.offset = { 4072 initialize: function() { 4073 if ( this.initialized ) return; 4074 var body = document.body, container = document.createElement('div'), innerDiv, checkDiv, table, td, rules, prop, bodyMarginTop = body.style.marginTop, 4075 html = '<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"cellpadding="0"cellspacing="0"><tr><td></td></tr></table>'; 4076 4077 rules = { position: 'absolute', top: 0, left: 0, margin: 0, border: 0, width: '1px', height: '1px', visibility: 'hidden' }; 4078 for ( prop in rules ) container.style[prop] = rules[prop]; 4079 4080 container.innerHTML = html; 4081 body.insertBefore(container, body.firstChild); 4082 innerDiv = container.firstChild, checkDiv = innerDiv.firstChild, td = innerDiv.nextSibling.firstChild.firstChild; 4083 4084 this.doesNotAddBorder = (checkDiv.offsetTop !== 5); 4085 this.doesAddBorderForTableAndCells = (td.offsetTop === 5); 4086 4087 innerDiv.style.overflow = 'hidden', innerDiv.style.position = 'relative'; 4088 this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5); 4089 4090 body.style.marginTop = '1px'; 4091 this.doesNotIncludeMarginInBodyOffset = (body.offsetTop === 0); 4092 body.style.marginTop = bodyMarginTop; 4093 4094 body.removeChild(container); 4095 this.initialized = true; 4096 }, 4097 4098 bodyOffset: function(body) { 4099 jQuery.offset.initialized || jQuery.offset.initialize(); 4100 var top = body.offsetTop, left = body.offsetLeft; 4101 if ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) 4102 top += parseInt( jQuery.curCSS(body, 'marginTop', true), 10 ) || 0, 4103 left += parseInt( jQuery.curCSS(body, 'marginLeft', true), 10 ) || 0; 4104 return { top: top, left: left }; 4105 } 4106 }; 4107 4108 4109 jQuery.fn.extend({ 4110 position: function() { 4111 var left = 0, top = 0, results; 4112 4113 if ( this[0] ) { 4114 // Get *real* offsetParent 4115 var offsetParent = this.offsetParent(), 4116 4117 // Get correct offsets 4118 offset = this.offset(), 4119 parentOffset = /^body|html$/i.test(offsetParent[0].tagName) ? { top: 0, left: 0 } : offsetParent.offset(); 4120 4121 // Subtract element margins 4122 // note: when an element has margin: auto the offsetLeft and marginLeft 4123 // are the same in Safari causing offset.left to incorrectly be 0 4124 offset.top -= num( this, 'marginTop' ); 4125 offset.left -= num( this, 'marginLeft' ); 4126 4127 // Add offsetParent borders 4128 parentOffset.top += num( offsetParent, 'borderTopWidth' ); 4129 parentOffset.left += num( offsetParent, 'borderLeftWidth' ); 4130 4131 // Subtract the two offsets 4132 results = { 4133 top: offset.top - parentOffset.top, 4134 left: offset.left - parentOffset.left 4135 }; 4136 } 4137 4138 return results; 4139 }, 4140 4141 offsetParent: function() { 4142 var offsetParent = this[0].offsetParent || document.body; 4143 while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && jQuery.css(offsetParent, 'position') == 'static') ) 4144 offsetParent = offsetParent.offsetParent; 4145 return jQuery(offsetParent); 4146 } 4147 }); 4148 4149 4150 // Create scrollLeft and scrollTop methods 4151 jQuery.each( ['Left', 'Top'], function(i, name) { 4152 var method = 'scroll' + name; 4153 4154 jQuery.fn[ method ] = function(val) { 4155 if (!this[0]) return null; 4156 4157 return val !== undefined ? 4158 4159 // Set the scroll offset 4160 this.each(function() { 4161 this == window || this == document ? 4162 window.scrollTo( 4163 !i ? val : jQuery(window).scrollLeft(), 4164 i ? val : jQuery(window).scrollTop() 4165 ) : 4166 this[ method ] = val; 4167 }) : 4168 4169 // Return the scroll offset 4170 this[0] == window || this[0] == document ? 4171 self[ i ? 'pageYOffset' : 'pageXOffset' ] || 4172 jQuery.boxModel && document.documentElement[ method ] || 4173 document.body[ method ] : 4174 this[0][ method ]; 4175 }; 4176 }); 4177 // Create innerHeight, innerWidth, outerHeight and outerWidth methods 4178 jQuery.each([ "Height", "Width" ], function(i, name){ 4179 4180 var tl = i ? "Left" : "Top", // top or left 4181 br = i ? "Right" : "Bottom"; // bottom or right 4182 4183 // innerHeight and innerWidth 4184 jQuery.fn["inner" + name] = function(){ 4185 return this[ name.toLowerCase() ]() + 4186 num(this, "padding" + tl) + 4187 num(this, "padding" + br); 4188 }; 4189 4190 // outerHeight and outerWidth 4191 jQuery.fn["outer" + name] = function(margin) { 4192 return this["inner" + name]() + 4193 num(this, "border" + tl + "Width") + 4194 num(this, "border" + br + "Width") + 4195 (margin ? 4196 num(this, "margin" + tl) + num(this, "margin" + br) : 0); 4197 }; 4198 4199 var type = name.toLowerCase(); 4200 4201 jQuery.fn[ type ] = function( size ) { 4202 // Get window width or height 4203 return this[0] == window ? 4204 // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode 4205 document.compatMode == "CSS1Compat" && document.documentElement[ "client" + name ] || 4206 document.body[ "client" + name ] : 4207 4208 // Get document width or height 4209 this[0] == document ? 4210 // Either scroll[Width/Height] or offset[Width/Height], whichever is greater 4211 Math.max( 4212 document.documentElement["client" + name], 4213 document.body["scroll" + name], document.documentElement["scroll" + name], 4214 document.body["offset" + name], document.documentElement["offset" + name] 4215 ) : 4216 4217 // Get or set width or height on the element 4218 size === undefined ? 4219 // Get width or height on the element 4220 (this.length ? jQuery.css( this[0], type ) : null) : 4221 4222 // Set the width or height on the element (default to pixels if value is unitless) 4223 this.css( type, typeof size === "string" ? size : size + "px" ); 4224 }; 4225 4226 });})(); 4227 19 (function(){var N=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|[^[\]]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g,I=0,F=Object.prototype.toString;var E=function(ae,S,aa,V){aa=aa||[];S=S||document;if(S.nodeType!==1&&S.nodeType!==9){return[]}if(!ae||typeof ae!=="string"){return aa}var ab=[],ac,Y,ah,ag,Z,R,Q=true;N.lastIndex=0;while((ac=N.exec(ae))!==null){ab.push(ac[1]);if(ac[2]){R=RegExp.rightContext;break}}if(ab.length>1&&G.match.POS.exec(ae)){if(ab.length===2&&G.relative[ab[0]]){var U="",X;while((X=G.match.POS.exec(ae))){U+=X[0];ae=ae.replace(G.match.POS,"")}Y=E.filter(U,E(/\s$/.test(ae)?ae+"*":ae,S))}else{Y=G.relative[ab[0]]?[S]:E(ab.shift(),S);while(ab.length){var P=[];ae=ab.shift();if(G.relative[ae]){ae+=ab.shift()}for(var af=0,ad=Y.length;af<ad;af++){E(ae,Y[af],P)}Y=P}}}else{var ai=V?{expr:ab.pop(),set:D(V)}:E.find(ab.pop(),ab.length===1&&S.parentNode?S.parentNode:S);Y=E.filter(ai.expr,ai.set);if(ab.length>0){ah=D(Y)}else{Q=false}while(ab.length){var T=ab.pop(),W=T;if(!G.relative[T]){T=""}else{W=ab.pop()}if(W==null){W=S}G.relative[T](ah,W,M(S))}}if(!ah){ah=Y}if(!ah){throw"Syntax error, unrecognized expression: "+(T||ae)}if(F.call(ah)==="[object Array]"){if(!Q){aa.push.apply(aa,ah)}else{if(S.nodeType===1){for(var af=0;ah[af]!=null;af++){if(ah[af]&&(ah[af]===true||ah[af].nodeType===1&&H(S,ah[af]))){aa.push(Y[af])}}}else{for(var af=0;ah[af]!=null;af++){if(ah[af]&&ah[af].nodeType===1){aa.push(Y[af])}}}}}else{D(ah,aa)}if(R){E(R,S,aa,V)}return aa};E.matches=function(P,Q){return E(P,null,null,Q)};E.find=function(V,S){var W,Q;if(!V){return[]}for(var R=0,P=G.order.length;R<P;R++){var T=G.order[R],Q;if((Q=G.match[T].exec(V))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){Q[1]=(Q[1]||"").replace(/\\/g,"");W=G.find[T](Q,S);if(W!=null){V=V.replace(G.match[T],"");break}}}}if(!W){W=S.getElementsByTagName("*")}return{set:W,expr:V}};E.filter=function(S,ac,ad,T){var Q=S,Y=[],ah=ac,V,ab;while(S&&ac.length){for(var U in G.filter){if((V=G.match[U].exec(S))!=null){var Z=G.filter[U],R=null,X=0,aa,ag;ab=false;if(ah==Y){Y=[]}if(G.preFilter[U]){V=G.preFilter[U](V,ah,ad,Y,T);if(!V){ab=aa=true}else{if(V===true){continue}else{if(V[0]===true){R=[];var W=null,af;for(var ae=0;(af=ah[ae])!==g;ae++){if(af&&W!==af){R.push(af);W=af}}}}}}if(V){for(var ae=0;(ag=ah[ae])!==g;ae++){if(ag){if(R&&ag!=R[X]){X++}aa=Z(ag,V,X,R);var P=T^!!aa;if(ad&&aa!=null){if(P){ab=true}else{ah[ae]=false}}else{if(P){Y.push(ag);ab=true}}}}}if(aa!==g){if(!ad){ah=Y}S=S.replace(G.match[U],"");if(!ab){return[]}break}}}S=S.replace(/\s*,\s*/,"");if(S==Q){if(ab==null){throw"Syntax error, unrecognized expression: "+S}else{break}}Q=S}return ah};var G=E.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(P){return P.getAttribute("href")}},relative:{"+":function(T,Q){for(var R=0,P=T.length;R<P;R++){var S=T[R];if(S){var U=S.previousSibling;while(U&&U.nodeType!==1){U=U.previousSibling}T[R]=typeof Q==="string"?U||false:U===Q}}if(typeof Q==="string"){E.filter(Q,T,true)}},">":function(U,Q,V){if(typeof Q==="string"&&!/\W/.test(Q)){Q=V?Q:Q.toUpperCase();for(var R=0,P=U.length;R<P;R++){var T=U[R];if(T){var S=T.parentNode;U[R]=S.nodeName===Q?S:false}}}else{for(var R=0,P=U.length;R<P;R++){var T=U[R];if(T){U[R]=typeof Q==="string"?T.parentNode:T.parentNode===Q}}if(typeof Q==="string"){E.filter(Q,U,true)}}},"":function(S,Q,U){var R="done"+(I++),P=O;if(!Q.match(/\W/)){var T=Q=U?Q:Q.toUpperCase();P=L}P("parentNode",Q,R,S,T,U)},"~":function(S,Q,U){var R="done"+(I++),P=O;if(typeof Q==="string"&&!Q.match(/\W/)){var T=Q=U?Q:Q.toUpperCase();P=L}P("previousSibling",Q,R,S,T,U)}},find:{ID:function(Q,R){if(R.getElementById){var P=R.getElementById(Q[1]);return P?[P]:[]}},NAME:function(P,Q){return Q.getElementsByName?Q.getElementsByName(P[1]):null},TAG:function(P,Q){return Q.getElementsByTagName(P[1])}},preFilter:{CLASS:function(S,Q,R,P,U){S=" "+S[1].replace(/\\/g,"")+" ";for(var T=0;Q[T];T++){if(U^(" "+Q[T].className+" ").indexOf(S)>=0){if(!R){P.push(Q[T])}}else{if(R){Q[T]=false}}}return false},ID:function(P){return P[1].replace(/\\/g,"")},TAG:function(Q,P){for(var R=0;!P[R];R++){}return M(P[R])?Q[1]:Q[1].toUpperCase()},CHILD:function(P){if(P[1]=="nth"){var Q=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(P[2]=="even"&&"2n"||P[2]=="odd"&&"2n+1"||!/\D/.test(P[2])&&"0n+"+P[2]||P[2]);P[2]=(Q[1]+(Q[2]||1))-0;P[3]=Q[3]-0}P[0]="done"+(I++);return P},ATTR:function(Q){var P=Q[1];if(G.attrMap[P]){Q[1]=G.attrMap[P]}if(Q[2]==="~="){Q[4]=" "+Q[4]+" "}return Q},PSEUDO:function(T,Q,R,P,U){if(T[1]==="not"){if(T[3].match(N).length>1){T[3]=E(T[3],null,null,Q)}else{var S=E.filter(T[3],Q,R,true^U);if(!R){P.push.apply(P,S)}return false}}else{if(G.match.POS.test(T[0])){return true}}return T},POS:function(P){P.unshift(true);return P}},filters:{enabled:function(P){return P.disabled===false&&P.type!=="hidden"},disabled:function(P){return P.disabled===true},checked:function(P){return P.checked===true},selected:function(P){P.parentNode.selectedIndex;return P.selected===true},parent:function(P){return !!P.firstChild},empty:function(P){return !P.firstChild},has:function(R,Q,P){return !!E(P[3],R).length},header:function(P){return/h\d/i.test(P.nodeName)},text:function(P){return"text"===P.type},radio:function(P){return"radio"===P.type},checkbox:function(P){return"checkbox"===P.type},file:function(P){return"file"===P.type},password:function(P){return"password"===P.type},submit:function(P){return"submit"===P.type},image:function(P){return"image"===P.type},reset:function(P){return"reset"===P.type},button:function(P){return"button"===P.type||P.nodeName.toUpperCase()==="BUTTON"},input:function(P){return/input|select|textarea|button/i.test(P.nodeName)}},setFilters:{first:function(Q,P){return P===0},last:function(R,Q,P,S){return Q===S.length-1},even:function(Q,P){return P%2===0},odd:function(Q,P){return P%2===1},lt:function(R,Q,P){return Q<P[3]-0},gt:function(R,Q,P){return Q>P[3]-0},nth:function(R,Q,P){return P[3]-0==Q},eq:function(R,Q,P){return P[3]-0==Q}},filter:{CHILD:function(P,S){var V=S[1],W=P.parentNode;var U="child"+W.childNodes.length;if(W&&(!W[U]||!P.nodeIndex)){var T=1;for(var Q=W.firstChild;Q;Q=Q.nextSibling){if(Q.nodeType==1){Q.nodeIndex=T++}}W[U]=T-1}if(V=="first"){return P.nodeIndex==1}else{if(V=="last"){return P.nodeIndex==W[U]}else{if(V=="only"){return W[U]==1}else{if(V=="nth"){var Y=false,R=S[2],X=S[3];if(R==1&&X==0){return true}if(R==0){if(P.nodeIndex==X){Y=true}}else{if((P.nodeIndex-X)%R==0&&(P.nodeIndex-X)/R>=0){Y=true}}return Y}}}}},PSEUDO:function(V,R,S,W){var Q=R[1],T=G.filters[Q];if(T){return T(V,S,R,W)}else{if(Q==="contains"){return(V.textContent||V.innerText||"").indexOf(R[3])>=0}else{if(Q==="not"){var U=R[3];for(var S=0,P=U.length;S<P;S++){if(U[S]===V){return false}}return true}}}},ID:function(Q,P){return Q.nodeType===1&&Q.getAttribute("id")===P},TAG:function(Q,P){return(P==="*"&&Q.nodeType===1)||Q.nodeName===P},CLASS:function(Q,P){return P.test(Q.className)},ATTR:function(T,R){var P=G.attrHandle[R[1]]?G.attrHandle[R[1]](T):T[R[1]]||T.getAttribute(R[1]),U=P+"",S=R[2],Q=R[4];return P==null?false:S==="="?U===Q:S==="*="?U.indexOf(Q)>=0:S==="~="?(" "+U+" ").indexOf(Q)>=0:!R[4]?P:S==="!="?U!=Q:S==="^="?U.indexOf(Q)===0:S==="$="?U.substr(U.length-Q.length)===Q:S==="|="?U===Q||U.substr(0,Q.length+1)===Q+"-":false},POS:function(T,Q,R,U){var P=Q[2],S=G.setFilters[P];if(S){return S(T,R,Q,U)}}}};for(var K in G.match){G.match[K]=RegExp(G.match[K].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var D=function(Q,P){Q=Array.prototype.slice.call(Q);if(P){P.push.apply(P,Q);return P}return Q};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(J){D=function(T,S){var Q=S||[];if(F.call(T)==="[object Array]"){Array.prototype.push.apply(Q,T)}else{if(typeof T.length==="number"){for(var R=0,P=T.length;R<P;R++){Q.push(T[R])}}else{for(var R=0;T[R];R++){Q.push(T[R])}}}return Q}}(function(){var Q=document.createElement("form"),R="script"+(new Date).getTime();Q.innerHTML="<input name='"+R+"'/>";var P=document.documentElement;P.insertBefore(Q,P.firstChild);if(!!document.getElementById(R)){G.find.ID=function(T,U){if(U.getElementById){var S=U.getElementById(T[1]);return S?S.id===T[1]||S.getAttributeNode&&S.getAttributeNode("id").nodeValue===T[1]?[S]:g:[]}};G.filter.ID=function(U,S){var T=U.getAttributeNode&&U.getAttributeNode("id");return U.nodeType===1&&T&&T.nodeValue===S}}P.removeChild(Q)})();(function(){var P=document.createElement("div");P.appendChild(document.createComment(""));if(P.getElementsByTagName("*").length>0){G.find.TAG=function(Q,U){var T=U.getElementsByTagName(Q[1]);if(Q[1]==="*"){var S=[];for(var R=0;T[R];R++){if(T[R].nodeType===1){S.push(T[R])}}T=S}return T}}P.innerHTML="<a href='#'></a>";if(P.firstChild.getAttribute("href")!=="#"){G.attrHandle.href=function(Q){return Q.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var P=E;E=function(T,S,Q,R){S=S||document;if(!R&&S.nodeType===9){try{return D(S.querySelectorAll(T),Q)}catch(U){}}return P(T,S,Q,R)};E.find=P.find;E.filter=P.filter;E.selectors=P.selectors;E.matches=P.matches})()}if(document.documentElement.getElementsByClassName){G.order.splice(1,0,"CLASS");G.find.CLASS=function(P,Q){return Q.getElementsByClassName(P[1])}}function L(Q,W,V,Z,X,Y){for(var T=0,R=Z.length;T<R;T++){var P=Z[T];if(P){P=P[Q];var U=false;while(P&&P.nodeType){var S=P[V];if(S){U=Z[S];break}if(P.nodeType===1&&!Y){P[V]=T}if(P.nodeName===W){U=P;break}P=P[Q]}Z[T]=U}}}function O(Q,V,U,Y,W,X){for(var S=0,R=Y.length;S<R;S++){var P=Y[S];if(P){P=P[Q];var T=false;while(P&&P.nodeType){if(P[U]){T=Y[P[U]];break}if(P.nodeType===1){if(!X){P[U]=S}if(typeof V!=="string"){if(P===V){T=true;break}}else{if(E.filter(V,[P]).length>0){T=P;break}}}P=P[Q]}Y[S]=T}}}var H=document.compareDocumentPosition?function(Q,P){return Q.compareDocumentPosition(P)&16}:function(Q,P){return Q!==P&&(Q.contains?Q.contains(P):true)};var M=function(P){return P.documentElement&&!P.body||P.tagName&&P.ownerDocument&&!P.ownerDocument.body};n.find=E;n.filter=E.filter;n.expr=E.selectors;n.expr[":"]=n.expr.filters;E.selectors.filters.hidden=function(P){return"hidden"===P.type||n.css(P,"display")==="none"||n.css(P,"visibility")==="hidden"};E.selectors.filters.visible=function(P){return"hidden"!==P.type&&n.css(P,"display")!=="none"&&n.css(P,"visibility")!=="hidden"};E.selectors.filters.animated=function(P){return n.grep(n.timers,function(Q){return P===Q.elem}).length};n.multiFilter=function(R,P,Q){if(Q){R=":not("+R+")"}return E.matches(R,P)};n.dir=function(R,Q){var P=[],S=R[Q];while(S&&S!=document){if(S.nodeType==1){P.push(S)}S=S[Q]}return P};n.nth=function(T,P,R,S){P=P||1;var Q=0;for(;T;T=T[R]){if(T.nodeType==1&&++Q==P){break}}return T};n.sibling=function(R,Q){var P=[];for(;R;R=R.nextSibling){if(R.nodeType==1&&R!=Q){P.push(R)}}return P};return;l.Sizzle=E})();n.event={add:function(H,E,G,J){if(H.nodeType==3||H.nodeType==8){return}if(H.setInterval&&H!=l){H=l}if(!G.guid){G.guid=this.guid++}if(J!==g){var F=G;G=this.proxy(F);G.data=J}var D=n.data(H,"events")||n.data(H,"events",{}),I=n.data(H,"handle")||n.data(H,"handle",function(){return typeof n!=="undefined"&&!n.event.triggered?n.event.handle.apply(arguments.callee.elem,arguments):g});I.elem=H;n.each(E.split(/\s+/),function(L,M){var N=M.split(".");M=N.shift();G.type=N.slice().sort().join(".");var K=D[M];if(n.event.specialAll[M]){n.event.specialAll[M].setup.call(H,J,N)}if(!K){K=D[M]={};if(!n.event.special[M]||n.event.special[M].setup.call(H,J,N)===false){if(H.addEventListener){H.addEventListener(M,I,false)}else{if(H.attachEvent){H.attachEvent("on"+M,I)}}}}K[G.guid]=G;n.event.global[M]=true});H=null},guid:1,global:{},remove:function(J,G,I){if(J.nodeType==3||J.nodeType==8){return}var F=n.data(J,"events"),E,D;if(F){if(G===g||(typeof G==="string"&&G.charAt(0)==".")){for(var H in F){this.remove(J,H+(G||""))}}else{if(G.type){I=G.handler;G=G.type}n.each(G.split(/\s+/),function(L,N){var P=N.split(".");N=P.shift();var M=RegExp("(^|\\.)"+P.slice().sort().join(".*\\.")+"(\\.|$)");if(F[N]){if(I){delete F[N][I.guid]}else{for(var O in F[N]){if(M.test(F[N][O].type)){delete F[N][O]}}}if(n.event.specialAll[N]){n.event.specialAll[N].teardown.call(J,P)}for(E in F[N]){break}if(!E){if(!n.event.special[N]||n.event.special[N].teardown.call(J,P)===false){if(J.removeEventListener){J.removeEventListener(N,n.data(J,"handle"),false)}else{if(J.detachEvent){J.detachEvent("on"+N,n.data(J,"handle"))}}}E=null;delete F[N]}}})}for(E in F){break}if(!E){var K=n.data(J,"handle");if(K){K.elem=null}n.removeData(J,"events");n.removeData(J,"handle")}}},trigger:function(H,J,G,D){var F=H.type||H;if(!D){H=typeof H==="object"?H[h]?H:n.extend(n.Event(F),H):n.Event(F);if(F.indexOf("!")>=0){H.type=F=F.slice(0,-1);H.exclusive=true}if(!G){H.stopPropagation();if(this.global[F]){n.each(n.cache,function(){if(this.events&&this.events[F]){n.event.trigger(H,J,this.handle.elem)}})}}if(!G||G.nodeType==3||G.nodeType==8){return g}H.result=g;H.target=G;J=n.makeArray(J);J.unshift(H)}H.currentTarget=G;var I=n.data(G,"handle");if(I){I.apply(G,J)}if((!G[F]||(n.nodeName(G,"a")&&F=="click"))&&G["on"+F]&&G["on"+F].apply(G,J)===false){H.result=false}if(!D&&G[F]&&!H.isDefaultPrevented()&&!(n.nodeName(G,"a")&&F=="click")){this.triggered=true;try{G[F]()}catch(K){}}this.triggered=false;if(!H.isPropagationStopped()){var E=G.parentNode||G.ownerDocument;if(E){n.event.trigger(H,J,E,true)}}},handle:function(J){var I,D;J=arguments[0]=n.event.fix(J||l.event);var K=J.type.split(".");J.type=K.shift();I=!K.length&&!J.exclusive;var H=RegExp("(^|\\.)"+K.slice().sort().join(".*\\.")+"(\\.|$)");D=(n.data(this,"events")||{})[J.type];for(var F in D){var G=D[F];if(I||H.test(G.type)){J.handler=G;J.data=G.data;var E=G.apply(this,arguments);if(E!==g){J.result=E;if(E===false){J.preventDefault();J.stopPropagation()}}if(J.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(G){if(G[h]){return G}var E=G;G=n.Event(E);for(var F=this.props.length,I;F;){I=this.props[--F];G[I]=E[I]}if(!G.target){G.target=G.srcElement||document}if(G.target.nodeType==3){G.target=G.target.parentNode}if(!G.relatedTarget&&G.fromElement){G.relatedTarget=G.fromElement==G.target?G.toElement:G.fromElement}if(G.pageX==null&&G.clientX!=null){var H=document.documentElement,D=document.body;G.pageX=G.clientX+(H&&H.scrollLeft||D&&D.scrollLeft||0)-(H.clientLeft||0);G.pageY=G.clientY+(H&&H.scrollTop||D&&D.scrollTop||0)-(H.clientTop||0)}if(!G.which&&((G.charCode||G.charCode===0)?G.charCode:G.keyCode)){G.which=G.charCode||G.keyCode}if(!G.metaKey&&G.ctrlKey){G.metaKey=G.ctrlKey}if(!G.which&&G.button){G.which=(G.button&1?1:(G.button&2?3:(G.button&4?2:0)))}return G},proxy:function(E,D){D=D||function(){return E.apply(this,arguments)};D.guid=E.guid=E.guid||D.guid||this.guid++;return D},special:{ready:{setup:A,teardown:function(){}}},specialAll:{live:{setup:function(D,E){n.event.add(this,E[0],c)},teardown:function(F){if(F.length){var D=0,E=RegExp("(^|\\.)"+F[0]+"(\\.|$)");n.each((n.data(this,"events").live||{}),function(){if(E.test(this.type)){D++}});if(D<1){n.event.remove(this,F[0],c)}}}}}};n.Event=function(D){if(!this.preventDefault){return new n.Event(D)}if(D&&D.type){this.originalEvent=D;this.type=D.type;this.timeStamp=D.timeStamp}else{this.type=D}if(!this.timeStamp){this.timeStamp=e()}this[h]=true};function k(){return false}function t(){return true}n.Event.prototype={preventDefault:function(){this.isDefaultPrevented=t;var D=this.originalEvent;if(!D){return}if(D.preventDefault){D.preventDefault()}D.returnValue=false},stopPropagation:function(){this.isPropagationStopped=t;var D=this.originalEvent;if(!D){return}if(D.stopPropagation){D.stopPropagation()}D.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=t;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(E){var D=E.relatedTarget;while(D&&D!=this){try{D=D.parentNode}catch(F){D=this}}if(D!=this){E.type=E.data;n.event.handle.apply(this,arguments)}};n.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(E,D){n.event.special[D]={setup:function(){n.event.add(this,E,a,D)},teardown:function(){n.event.remove(this,E,a)}}});n.fn.extend({bind:function(E,F,D){return E=="unload"?this.one(E,F,D):this.each(function(){n.event.add(this,E,D||F,D&&F)})},one:function(F,G,E){var D=n.event.proxy(E||G,function(H){n(this).unbind(H,D);return(E||G).apply(this,arguments)});return this.each(function(){n.event.add(this,F,D,E&&G)})},unbind:function(E,D){return this.each(function(){n.event.remove(this,E,D)})},trigger:function(D,E){return this.each(function(){n.event.trigger(D,E,this)})},triggerHandler:function(D,F){if(this[0]){var E=n.Event(D);E.preventDefault();E.stopPropagation();n.event.trigger(E,F,this[0]);return E.result}},toggle:function(F){var D=arguments,E=1;while(E<D.length){n.event.proxy(F,D[E++])}return this.click(n.event.proxy(F,function(G){this.lastToggle=(this.lastToggle||0)%E;G.preventDefault();return D[this.lastToggle++].apply(this,arguments)||false}))},hover:function(D,E){return this.mouseenter(D).mouseleave(E)},ready:function(D){A();if(n.isReady){D.call(document,n)}else{n.readyList.push(D)}return this},live:function(F,E){var D=n.event.proxy(E);D.guid+=this.selector+F;n(document).bind(i(F,this.selector),this.selector,D);return this},die:function(E,D){n(document).unbind(i(E,this.selector),D?{guid:D.guid+this.selector+E}:null);return this}});function c(G){var D=RegExp("(^|\\.)"+G.type+"(\\.|$)"),F=true,E=[];n.each(n.data(this,"events").live||[],function(H,I){if(D.test(I.type)){var J=n(G.target).closest(I.data)[0];if(J){E.push({elem:J,fn:I})}}});n.each(E,function(){if(!G.isImmediatePropagationStopped()&&this.fn.call(this.elem,G,this.fn.data)===false){F=false}});return F}function i(E,D){return["live",E,D.replace(/\./g,"`").replace(/ /g,"|")].join(".")}n.extend({isReady:false,readyList:[],ready:function(){if(!n.isReady){n.isReady=true;if(n.readyList){n.each(n.readyList,function(){this.call(document,n)});n.readyList=null}n(document).triggerHandler("ready")}}});var w=false;function A(){if(w){return}w=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);n.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);n.ready()}});if(document.documentElement.doScroll&&!l.frameElement){(function(){if(n.isReady){return}try{document.documentElement.doScroll("left")}catch(D){setTimeout(arguments.callee,0);return}n.ready()})()}}}n.event.add(l,"load",n.ready)}n.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(E,D){n.fn[D]=function(F){return F?this.bind(D,F):this.trigger(D)}});n(l).bind("unload",function(){for(var D in n.cache){if(D!=1&&n.cache[D].handle){n.event.remove(n.cache[D].handle.elem)}}});(function(){n.support={};var E=document.documentElement,F=document.createElement("script"),J=document.createElement("div"),I="script"+(new Date).getTime();J.style.display="none";J.innerHTML=' <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var G=J.getElementsByTagName("*"),D=J.getElementsByTagName("a")[0];if(!G||!G.length||!D){return}n.support={leadingWhitespace:J.firstChild.nodeType==3,tbody:!J.getElementsByTagName("tbody").length,objectAll:!!J.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!J.getElementsByTagName("link").length,style:/red/.test(D.getAttribute("style")),hrefNormalized:D.getAttribute("href")==="/a",opacity:D.style.opacity==="0.5",cssFloat:!!D.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};F.type="text/javascript";try{F.appendChild(document.createTextNode("window."+I+"=1;"))}catch(H){}E.insertBefore(F,E.firstChild);if(l[I]){n.support.scriptEval=true;delete l[I]}E.removeChild(F);if(J.attachEvent&&J.fireEvent){J.attachEvent("onclick",function(){n.support.noCloneEvent=false;J.detachEvent("onclick",arguments.callee)});J.cloneNode(true).fireEvent("onclick")}n(function(){var K=document.createElement("div");K.style.width="1px";K.style.paddingLeft="1px";document.body.appendChild(K);n.boxModel=n.support.boxModel=K.offsetWidth===2;document.body.removeChild(K)})})();var v=n.support.cssFloat?"cssFloat":"styleFloat";n.props={"for":"htmlFor","class":"className","float":v,cssFloat:v,styleFloat:v,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};n.fn.extend({_load:n.fn.load,load:function(F,I,J){if(typeof F!=="string"){return this._load(F)}var H=F.indexOf(" ");if(H>=0){var D=F.slice(H,F.length);F=F.slice(0,H)}var G="GET";if(I){if(n.isFunction(I)){J=I;I=null}else{if(typeof I==="object"){I=n.param(I);G="POST"}}}var E=this;n.ajax({url:F,type:G,dataType:"html",data:I,complete:function(L,K){if(K=="success"||K=="notmodified"){E.html(D?n("<div/>").append(L.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(D):L.responseText)}if(J){E.each(J,[L.responseText,K,L])}}});return this},serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?n.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))}).map(function(D,E){var F=n(this).val();return F==null?null:n.isArray(F)?n.map(F,function(H,G){return{name:E.name,value:H}}):{name:E.name,value:F}}).get()}});n.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(D,E){n.fn[E]=function(F){return this.bind(E,F)}});var q=e();n.extend({get:function(D,F,G,E){if(n.isFunction(F)){G=F;F=null}return n.ajax({type:"GET",url:D,data:F,success:G,dataType:E})},getScript:function(D,E){return n.get(D,null,E,"script")},getJSON:function(D,E,F){return n.get(D,E,F,"json")},post:function(D,F,G,E){if(n.isFunction(F)){G=F;F={}}return n.ajax({type:"POST",url:D,data:F,success:G,dataType:E})},ajaxSetup:function(D){n.extend(n.ajaxSettings,D)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(L){L=n.extend(true,L,n.extend(true,{},n.ajaxSettings,L));var V,E=/=\?(&|$)/g,Q,U,F=L.type.toUpperCase();if(L.data&&L.processData&&typeof L.data!=="string"){L.data=n.param(L.data)}if(L.dataType=="jsonp"){if(F=="GET"){if(!L.url.match(E)){L.url+=(L.url.match(/\?/)?"&":"?")+(L.jsonp||"callback")+"=?"}}else{if(!L.data||!L.data.match(E)){L.data=(L.data?L.data+"&":"")+(L.jsonp||"callback")+"=?"}}L.dataType="json"}if(L.dataType=="json"&&(L.data&&L.data.match(E)||L.url.match(E))){V="jsonp"+q++;if(L.data){L.data=(L.data+"").replace(E,"="+V+"$1")}L.url=L.url.replace(E,"="+V+"$1");L.dataType="script";l[V]=function(W){U=W;H();K();l[V]=g;try{delete l[V]}catch(X){}if(G){G.removeChild(S)}}}if(L.dataType=="script"&&L.cache==null){L.cache=false}if(L.cache===false&&F=="GET"){var D=e();var T=L.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+D+"$2");L.url=T+((T==L.url)?(L.url.match(/\?/)?"&":"?")+"_="+D:"")}if(L.data&&F=="GET"){L.url+=(L.url.match(/\?/)?"&":"?")+L.data;L.data=null}if(L.global&&!n.active++){n.event.trigger("ajaxStart")}var P=/^(\w+:)?\/\/([^\/?#]+)/.exec(L.url);if(L.dataType=="script"&&F=="GET"&&P&&(P[1]&&P[1]!=location.protocol||P[2]!=location.host)){var G=document.getElementsByTagName("head")[0];var S=document.createElement("script");S.src=L.url;if(L.scriptCharset){S.charset=L.scriptCharset}if(!V){var N=false;S.onload=S.onreadystatechange=function(){if(!N&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){N=true;H();K();G.removeChild(S)}}}G.appendChild(S);return g}var J=false;var I=L.xhr();if(L.username){I.open(F,L.url,L.async,L.username,L.password)}else{I.open(F,L.url,L.async)}try{if(L.data){I.setRequestHeader("Content-Type",L.contentType)}if(L.ifModified){I.setRequestHeader("If-Modified-Since",n.lastModified[L.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}I.setRequestHeader("X-Requested-With","XMLHttpRequest");I.setRequestHeader("Accept",L.dataType&&L.accepts[L.dataType]?L.accepts[L.dataType]+", */*":L.accepts._default)}catch(R){}if(L.beforeSend&&L.beforeSend(I,L)===false){if(L.global&&!--n.active){n.event.trigger("ajaxStop")}I.abort();return false}if(L.global){n.event.trigger("ajaxSend",[I,L])}var M=function(W){if(I.readyState==0){if(O){clearInterval(O);O=null;if(L.global&&!--n.active){n.event.trigger("ajaxStop")}}}else{if(!J&&I&&(I.readyState==4||W=="timeout")){J=true;if(O){clearInterval(O);O=null}Q=W=="timeout"?"timeout":!n.httpSuccess(I)?"error":L.ifModified&&n.httpNotModified(I,L.url)?"notmodified":"success";if(Q=="success"){try{U=n.httpData(I,L.dataType,L)}catch(Y){Q="parsererror"}}if(Q=="success"){var X;try{X=I.getResponseHeader("Last-Modified")}catch(Y){}if(L.ifModified&&X){n.lastModified[L.url]=X}if(!V){H()}}else{n.handleError(L,I,Q)}K();if(L.async){I=null}}}};if(L.async){var O=setInterval(M,13);if(L.timeout>0){setTimeout(function(){if(I){if(!J){M("timeout")}if(I){I.abort()}}},L.timeout)}}try{I.send(L.data)}catch(R){n.handleError(L,I,null,R)}if(!L.async){M()}function H(){if(L.success){L.success(U,Q)}if(L.global){n.event.trigger("ajaxSuccess",[I,L])}}function K(){if(L.complete){L.complete(I,Q)}if(L.global){n.event.trigger("ajaxComplete",[I,L])}if(L.global&&!--n.active){n.event.trigger("ajaxStop")}}return I},handleError:function(E,G,D,F){if(E.error){E.error(G,D,F)}if(E.global){n.event.trigger("ajaxError",[G,E,F])}},active:0,httpSuccess:function(E){try{return !E.status&&location.protocol=="file:"||(E.status>=200&&E.status<300)||E.status==304||E.status==1223}catch(D){}return false},httpNotModified:function(F,D){try{var G=F.getResponseHeader("Last-Modified");return F.status==304||G==n.lastModified[D]}catch(E){}return false},httpData:function(I,G,F){var E=I.getResponseHeader("content-type"),D=G=="xml"||!G&&E&&E.indexOf("xml")>=0,H=D?I.responseXML:I.responseText;if(D&&H.documentElement.tagName=="parsererror"){throw"parsererror"}if(F&&F.dataFilter){H=F.dataFilter(H,G)}if(typeof H==="string"){if(G=="script"){n.globalEval(H)}if(G=="json"){H=l["eval"]("("+H+")")}}return H},param:function(D){var F=[];function G(H,I){F[F.length]=encodeURIComponent(H)+"="+encodeURIComponent(I)}if(n.isArray(D)||D.jquery){n.each(D,function(){G(this.name,this.value)})}else{for(var E in D){if(n.isArray(D[E])){n.each(D[E],function(){G(E,this)})}else{G(E,n.isFunction(D[E])?D[E]():D[E])}}}return F.join("&").replace(/%20/g,"+")}});var m={},d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function s(E,D){var F={};n.each(d.concat.apply([],d.slice(0,D)),function(){F[this]=E});return F}n.fn.extend({show:function(I,K){if(I){return this.animate(s("show",3),I,K)}else{for(var G=0,E=this.length;G<E;G++){var D=n.data(this[G],"olddisplay");this[G].style.display=D||"";if(n.css(this[G],"display")==="none"){var F=this[G].tagName,J;if(m[F]){J=m[F]}else{var H=n("<"+F+" />").appendTo("body");J=H.css("display");if(J==="none"){J="block"}H.remove();m[F]=J}this[G].style.display=n.data(this[G],"olddisplay",J)}}return this}},hide:function(G,H){if(G){return this.animate(s("hide",3),G,H)}else{for(var F=0,E=this.length;F<E;F++){var D=n.data(this[F],"olddisplay");if(!D&&D!=="none"){n.data(this[F],"olddisplay",n.css(this[F],"display"))}this[F].style.display="none"}return this}},_toggle:n.fn.toggle,toggle:function(F,E){var D=typeof F==="boolean";return n.isFunction(F)&&n.isFunction(E)?this._toggle.apply(this,arguments):F==null||D?this.each(function(){var G=D?F:n(this).is(":hidden");n(this)[G?"show":"hide"]()}):this.animate(s("toggle",3),F,E)},fadeTo:function(D,F,E){return this.animate({opacity:F},D,E)},animate:function(H,E,G,F){var D=n.speed(E,G,F);return this[D.queue===false?"each":"queue"](function(){var J=n.extend({},D),L,K=this.nodeType==1&&n(this).is(":hidden"),I=this;for(L in H){if(H[L]=="hide"&&K||H[L]=="show"&&!K){return J.complete.call(this)}if((L=="height"||L=="width")&&this.style){J.display=n.css(this,"display");J.overflow=this.style.overflow}}if(J.overflow!=null){this.style.overflow="hidden"}J.curAnim=n.extend({},H);n.each(H,function(N,R){var Q=new n.fx(I,J,N);if(/toggle|show|hide/.test(R)){Q[R=="toggle"?K?"show":"hide":R](H)}else{var P=R.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),S=Q.cur(true)||0;if(P){var M=parseFloat(P[2]),O=P[3]||"px";if(O!="px"){I.style[N]=(M||1)+O;S=((M||1)/Q.cur(true))*S;I.style[N]=S+O}if(P[1]){M=((P[1]=="-="?-1:1)*M)+S}Q.custom(S,M,O)}else{Q.custom(S,R,"")}}});return true})},stop:function(E,D){var F=n.timers;if(E){this.queue([])}this.each(function(){for(var G=F.length-1;G>=0;G--){if(F[G].elem==this){if(D){F[G](true)}F.splice(G,1)}}});if(!D){this.dequeue()}return this}});n.each({slideDown:s("show",1),slideUp:s("hide",1),slideToggle:s("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(D,E){n.fn[D]=function(F,G){return this.animate(E,F,G)}});n.extend({speed:function(F,G,E){var D=typeof F==="object"?F:{complete:E||!E&&G||n.isFunction(F)&&F,duration:F,easing:E&&G||G&&!n.isFunction(G)&&G};D.duration=n.fx.off?0:typeof D.duration==="number"?D.duration:n.fx.speeds[D.duration]||n.fx.speeds._default;D.old=D.complete;D.complete=function(){if(D.queue!==false){n(this).dequeue()}if(n.isFunction(D.old)){D.old.call(this)}};return D},easing:{linear:function(F,G,D,E){return D+E*F},swing:function(F,G,D,E){return((-Math.cos(F*Math.PI)/2)+0.5)*E+D}},timers:[],timerId:null,fx:function(E,D,F){this.options=D;this.elem=E;this.prop=F;if(!D.orig){D.orig={}}}});n.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(n.fx.step[this.prop]||n.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(E){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var D=parseFloat(n.css(this.elem,this.prop,E));return D&&D>-10000?D:parseFloat(n.curCSS(this.elem,this.prop))||0},custom:function(H,G,F){this.startTime=e();this.start=H;this.end=G;this.unit=F||this.unit||"px";this.now=this.start;this.pos=this.state=0;var D=this;function E(I){return D.step(I)}E.elem=this.elem;n.timers.push(E);if(E()&&n.timerId==null){n.timerId=setInterval(function(){var J=n.timers;for(var I=0;I<J.length;I++){if(!J[I]()){J.splice(I--,1)}}if(!J.length){clearInterval(n.timerId);n.timerId=null}},13)}},show:function(){this.options.orig[this.prop]=n.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());n(this.elem).show()},hide:function(){this.options.orig[this.prop]=n.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(G){var F=e();if(G||F>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var D=true;for(var E in this.options.curAnim){if(this.options.curAnim[E]!==true){D=false}}if(D){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(n.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){n(this.elem).hide()}if(this.options.hide||this.options.show){for(var H in this.options.curAnim){n.attr(this.elem.style,H,this.options.orig[H])}}}if(D){this.options.complete.call(this.elem)}return false}else{var I=F-this.startTime;this.state=I/this.options.duration;this.pos=n.easing[this.options.easing||(n.easing.swing?"swing":"linear")](this.state,I,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};n.extend(n.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(D){n.attr(D.elem.style,"opacity",D.now)},_default:function(D){if(D.elem.style&&D.elem.style[D.prop]!=null){D.elem.style[D.prop]=D.now+D.unit}else{D.elem[D.prop]=D.now}}}});if(document.documentElement.getBoundingClientRect){n.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return n.offset.bodyOffset(this[0])}var F=this[0].getBoundingClientRect(),I=this[0].ownerDocument,E=I.body,D=I.documentElement,K=D.clientTop||E.clientTop||0,J=D.clientLeft||E.clientLeft||0,H=F.top+(self.pageYOffset||n.boxModel&&D.scrollTop||E.scrollTop)-K,G=F.left+(self.pageXOffset||n.boxModel&&D.scrollLeft||E.scrollLeft)-J;return{top:H,left:G}}}else{n.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return n.offset.bodyOffset(this[0])}n.offset.initialized||n.offset.initialize();var I=this[0],F=I.offsetParent,E=I,N=I.ownerDocument,L,G=N.documentElement,J=N.body,K=N.defaultView,D=K.getComputedStyle(I,null),M=I.offsetTop,H=I.offsetLeft;while((I=I.parentNode)&&I!==J&&I!==G){L=K.getComputedStyle(I,null);M-=I.scrollTop,H-=I.scrollLeft;if(I===F){M+=I.offsetTop,H+=I.offsetLeft;if(n.offset.doesNotAddBorder&&!(n.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(I.tagName))){M+=parseInt(L.borderTopWidth,10)||0,H+=parseInt(L.borderLeftWidth,10)||0}E=F,F=I.offsetParent}if(n.offset.subtractsBorderForOverflowNotVisible&&L.overflow!=="visible"){M+=parseInt(L.borderTopWidth,10)||0,H+=parseInt(L.borderLeftWidth,10)||0}D=L}if(D.position==="relative"||D.position==="static"){M+=J.offsetTop,H+=J.offsetLeft}if(D.position==="fixed"){M+=Math.max(G.scrollTop,J.scrollTop),H+=Math.max(G.scrollLeft,J.scrollLeft)}return{top:M,left:H}}}n.offset={initialize:function(){if(this.initialized){return}var K=document.body,E=document.createElement("div"),G,F,M,H,L,D,I=K.style.marginTop,J='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"cellpadding="0"cellspacing="0"><tr><td></td></tr></table>';L={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(D in L){E.style[D]=L[D]}E.innerHTML=J;K.insertBefore(E,K.firstChild);G=E.firstChild,F=G.firstChild,H=G.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(F.offsetTop!==5);this.doesAddBorderForTableAndCells=(H.offsetTop===5);G.style.overflow="hidden",G.style.position="relative";this.subtractsBorderForOverflowNotVisible=(F.offsetTop===-5);K.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(K.offsetTop===0);K.style.marginTop=I;K.removeChild(E);this.initialized=true},bodyOffset:function(D){n.offset.initialized||n.offset.initialize();var F=D.offsetTop,E=D.offsetLeft;if(n.offset.doesNotIncludeMarginInBodyOffset){F+=parseInt(n.curCSS(D,"marginTop",true),10)||0,E+=parseInt(n.curCSS(D,"marginLeft",true),10)||0}return{top:F,left:E}}};n.fn.extend({position:function(){var H=0,G=0,E;if(this[0]){var F=this.offsetParent(),I=this.offset(),D=/^body|html$/i.test(F[0].tagName)?{top:0,left:0}:F.offset();I.top-=j(this,"marginTop");I.left-=j(this,"marginLeft");D.top+=j(F,"borderTopWidth");D.left+=j(F,"borderLeftWidth");E={top:I.top-D.top,left:I.left-D.left}}return E},offsetParent:function(){var D=this[0].offsetParent||document.body;while(D&&(!/^body|html$/i.test(D.tagName)&&n.css(D,"position")=="static")){D=D.offsetParent}return n(D)}});n.each(["Left","Top"],function(E,D){var F="scroll"+D;n.fn[F]=function(G){if(!this[0]){return null}return G!==g?this.each(function(){this==l||this==document?l.scrollTo(!E?G:n(l).scrollLeft(),E?G:n(l).scrollTop()):this[F]=G}):this[0]==l||this[0]==document?self[E?"pageYOffset":"pageXOffset"]||n.boxModel&&document.documentElement[F]||document.body[F]:this[0][F]}});n.each(["Height","Width"],function(G,E){var D=G?"Left":"Top",F=G?"Right":"Bottom";n.fn["inner"+E]=function(){return this[E.toLowerCase()]()+j(this,"padding"+D)+j(this,"padding"+F)};n.fn["outer"+E]=function(I){return this["inner"+E]()+j(this,"border"+D+"Width")+j(this,"border"+F+"Width")+(I?j(this,"margin"+D)+j(this,"margin"+F):0)};var H=E.toLowerCase();n.fn[H]=function(I){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+E]||document.body["client"+E]:this[0]==document?Math.max(document.documentElement["client"+E],document.body["scroll"+E],document.documentElement["scroll"+E],document.body["offset"+E],document.documentElement["offset"+E]):I===g?(this.length?n.css(this[0],H):null):this.css(H,typeof I==="string"?I:I+"px")}})})(); 4228 20 jQuery.noConflict(); -
trunk/wp-includes/script-loader.php
r10357 r10360 114 114 $scripts->add( 'cropper', '/wp-includes/js/crop/cropper.js', array('scriptaculous-dragdrop'), '20070118'); 115 115 116 $scripts->add( 'jquery', '/wp-includes/js/jquery/jquery.js', false, '1.3 b2');116 $scripts->add( 'jquery', '/wp-includes/js/jquery/jquery.js', false, '1.3'); 117 117 118 118 $scripts->add( 'jquery-ui-core', '/wp-includes/js/jquery/ui.core.js', array('jquery'), '1.5.2' );
Note: See TracChangeset
for help on using the changeset viewer.