r52953 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52952‎ | r52953 | r52954 >
Date:00:43, 9 July 2009
Author:catrope
Status:deferred
Tags:
Comment:
UsabilityInitiative: minify jquery.combined.js because we can; it's generated from other files anyway
Modified paths:
  • /trunk/extensions/UsabilityInitiative/Resources/jquery.combined.js (modified) (history)

Diff [purge]

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

Status & tagging log