hgbook

diff web/javascript/jquery.js @ 690:2c266a253b44

Merge with myself
author Bryan O'Sullivan <bos@serpentine.com>
date Sun Apr 26 23:23:06 2009 -0700 (2009-04-26)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/web/javascript/jquery.js	Sun Apr 26 23:23:06 2009 -0700
     1.3 @@ -0,0 +1,2992 @@
     1.4 +(function(){
     1.5 +/*
     1.6 + * jQuery 1.2.1 - New Wave Javascript
     1.7 + *
     1.8 + * Copyright (c) 2007 John Resig (jquery.com)
     1.9 + * Dual licensed under the MIT (MIT-LICENSE.txt)
    1.10 + * and GPL (GPL-LICENSE.txt) licenses.
    1.11 + *
    1.12 + * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $
    1.13 + * $Rev: 3353 $
    1.14 + */
    1.15 +
    1.16 +// Map over jQuery in case of overwrite
    1.17 +if ( typeof jQuery != "undefined" )
    1.18 +	var _jQuery = jQuery;
    1.19 +
    1.20 +var jQuery = window.jQuery = function(selector, context) {
    1.21 +	// If the context is a namespace object, return a new object
    1.22 +	return this instanceof jQuery ?
    1.23 +		this.init(selector, context) :
    1.24 +		new jQuery(selector, context);
    1.25 +};
    1.26 +
    1.27 +// Map over the $ in case of overwrite
    1.28 +if ( typeof $ != "undefined" )
    1.29 +	var _$ = $;
    1.30 +	
    1.31 +// Map the jQuery namespace to the '$' one
    1.32 +window.$ = jQuery;
    1.33 +
    1.34 +var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;
    1.35 +
    1.36 +jQuery.fn = jQuery.prototype = {
    1.37 +	init: function(selector, context) {
    1.38 +		// Make sure that a selection was provided
    1.39 +		selector = selector || document;
    1.40 +
    1.41 +		// Handle HTML strings
    1.42 +		if ( typeof selector  == "string" ) {
    1.43 +			var m = quickExpr.exec(selector);
    1.44 +			if ( m && (m[1] || !context) ) {
    1.45 +				// HANDLE: $(html) -> $(array)
    1.46 +				if ( m[1] )
    1.47 +					selector = jQuery.clean( [ m[1] ], context );
    1.48 +
    1.49 +				// HANDLE: $("#id")
    1.50 +				else {
    1.51 +					var tmp = document.getElementById( m[3] );
    1.52 +					if ( tmp )
    1.53 +						// Handle the case where IE and Opera return items
    1.54 +						// by name instead of ID
    1.55 +						if ( tmp.id != m[3] )
    1.56 +							return jQuery().find( selector );
    1.57 +						else {
    1.58 +							this[0] = tmp;
    1.59 +							this.length = 1;
    1.60 +							return this;
    1.61 +						}
    1.62 +					else
    1.63 +						selector = [];
    1.64 +				}
    1.65 +
    1.66 +			// HANDLE: $(expr)
    1.67 +			} else
    1.68 +				return new jQuery( context ).find( selector );
    1.69 +
    1.70 +		// HANDLE: $(function)
    1.71 +		// Shortcut for document ready
    1.72 +		} else if ( jQuery.isFunction(selector) )
    1.73 +			return new jQuery(document)[ jQuery.fn.ready ? "ready" : "load" ]( selector );
    1.74 +
    1.75 +		return this.setArray(
    1.76 +			// HANDLE: $(array)
    1.77 +			selector.constructor == Array && selector ||
    1.78 +
    1.79 +			// HANDLE: $(arraylike)
    1.80 +			// Watch for when an array-like object is passed as the selector
    1.81 +			(selector.jquery || selector.length && selector != window && !selector.nodeType && selector[0] != undefined && selector[0].nodeType) && jQuery.makeArray( selector ) ||
    1.82 +
    1.83 +			// HANDLE: $(*)
    1.84 +			[ selector ] );
    1.85 +	},
    1.86 +	
    1.87 +	jquery: "1.2.1",
    1.88 +
    1.89 +	size: function() {
    1.90 +		return this.length;
    1.91 +	},
    1.92 +	
    1.93 +	length: 0,
    1.94 +
    1.95 +	get: function( num ) {
    1.96 +		return num == undefined ?
    1.97 +
    1.98 +			// Return a 'clean' array
    1.99 +			jQuery.makeArray( this ) :
   1.100 +
   1.101 +			// Return just the object
   1.102 +			this[num];
   1.103 +	},
   1.104 +	
   1.105 +	pushStack: function( a ) {
   1.106 +		var ret = jQuery(a);
   1.107 +		ret.prevObject = this;
   1.108 +		return ret;
   1.109 +	},
   1.110 +	
   1.111 +	setArray: function( a ) {
   1.112 +		this.length = 0;
   1.113 +		Array.prototype.push.apply( this, a );
   1.114 +		return this;
   1.115 +	},
   1.116 +
   1.117 +	each: function( fn, args ) {
   1.118 +		return jQuery.each( this, fn, args );
   1.119 +	},
   1.120 +
   1.121 +	index: function( obj ) {
   1.122 +		var pos = -1;
   1.123 +		this.each(function(i){
   1.124 +			if ( this == obj ) pos = i;
   1.125 +		});
   1.126 +		return pos;
   1.127 +	},
   1.128 +
   1.129 +	attr: function( key, value, type ) {
   1.130 +		var obj = key;
   1.131 +		
   1.132 +		// Look for the case where we're accessing a style value
   1.133 +		if ( key.constructor == String )
   1.134 +			if ( value == undefined )
   1.135 +				return this.length && jQuery[ type || "attr" ]( this[0], key ) || undefined;
   1.136 +			else {
   1.137 +				obj = {};
   1.138 +				obj[ key ] = value;
   1.139 +			}
   1.140 +		
   1.141 +		// Check to see if we're setting style values
   1.142 +		return this.each(function(index){
   1.143 +			// Set all the styles
   1.144 +			for ( var prop in obj )
   1.145 +				jQuery.attr(
   1.146 +					type ? this.style : this,
   1.147 +					prop, jQuery.prop(this, obj[prop], type, index, prop)
   1.148 +				);
   1.149 +		});
   1.150 +	},
   1.151 +
   1.152 +	css: function( key, value ) {
   1.153 +		return this.attr( key, value, "curCSS" );
   1.154 +	},
   1.155 +
   1.156 +	text: function(e) {
   1.157 +		if ( typeof e != "object" && e != null )
   1.158 +			return this.empty().append( document.createTextNode( e ) );
   1.159 +
   1.160 +		var t = "";
   1.161 +		jQuery.each( e || this, function(){
   1.162 +			jQuery.each( this.childNodes, function(){
   1.163 +				if ( this.nodeType != 8 )
   1.164 +					t += this.nodeType != 1 ?
   1.165 +						this.nodeValue : jQuery.fn.text([ this ]);
   1.166 +			});
   1.167 +		});
   1.168 +		return t;
   1.169 +	},
   1.170 +
   1.171 +	wrapAll: function(html) {
   1.172 +		if ( this[0] )
   1.173 +			// The elements to wrap the target around
   1.174 +			jQuery(html, this[0].ownerDocument)
   1.175 +				.clone()
   1.176 +				.insertBefore(this[0])
   1.177 +				.map(function(){
   1.178 +					var elem = this;
   1.179 +					while ( elem.firstChild )
   1.180 +						elem = elem.firstChild;
   1.181 +					return elem;
   1.182 +				})
   1.183 +				.append(this);
   1.184 +
   1.185 +		return this;
   1.186 +	},
   1.187 +
   1.188 +	wrapInner: function(html) {
   1.189 +		return this.each(function(){
   1.190 +			jQuery(this).contents().wrapAll(html);
   1.191 +		});
   1.192 +	},
   1.193 +
   1.194 +	wrap: function(html) {
   1.195 +		return this.each(function(){
   1.196 +			jQuery(this).wrapAll(html);
   1.197 +		});
   1.198 +	},
   1.199 +
   1.200 +	append: function() {
   1.201 +		return this.domManip(arguments, true, 1, function(a){
   1.202 +			this.appendChild( a );
   1.203 +		});
   1.204 +	},
   1.205 +
   1.206 +	prepend: function() {
   1.207 +		return this.domManip(arguments, true, -1, function(a){
   1.208 +			this.insertBefore( a, this.firstChild );
   1.209 +		});
   1.210 +	},
   1.211 +	
   1.212 +	before: function() {
   1.213 +		return this.domManip(arguments, false, 1, function(a){
   1.214 +			this.parentNode.insertBefore( a, this );
   1.215 +		});
   1.216 +	},
   1.217 +
   1.218 +	after: function() {
   1.219 +		return this.domManip(arguments, false, -1, function(a){
   1.220 +			this.parentNode.insertBefore( a, this.nextSibling );
   1.221 +		});
   1.222 +	},
   1.223 +
   1.224 +	end: function() {
   1.225 +		return this.prevObject || jQuery([]);
   1.226 +	},
   1.227 +
   1.228 +	find: function(t) {
   1.229 +		var data = jQuery.map(this, function(a){ return jQuery.find(t,a); });
   1.230 +		return this.pushStack( /[^+>] [^+>]/.test( t ) || t.indexOf("..") > -1 ?
   1.231 +			jQuery.unique( data ) : data );
   1.232 +	},
   1.233 +
   1.234 +	clone: function(events) {
   1.235 +		// Do the clone
   1.236 +		var ret = this.map(function(){
   1.237 +			return this.outerHTML ? jQuery(this.outerHTML)[0] : this.cloneNode(true);
   1.238 +		});
   1.239 +
   1.240 +		// Need to set the expando to null on the cloned set if it exists
   1.241 +		// removeData doesn't work here, IE removes it from the original as well
   1.242 +		// this is primarily for IE but the data expando shouldn't be copied over in any browser
   1.243 +		var clone = ret.find("*").andSelf().each(function(){
   1.244 +			if ( this[ expando ] != undefined )
   1.245 +				this[ expando ] = null;
   1.246 +		});
   1.247 +		
   1.248 +		// Copy the events from the original to the clone
   1.249 +		if (events === true)
   1.250 +			this.find("*").andSelf().each(function(i) {
   1.251 +				var events = jQuery.data(this, "events");
   1.252 +				for ( var type in events )
   1.253 +					for ( var handler in events[type] )
   1.254 +						jQuery.event.add(clone[i], type, events[type][handler], events[type][handler].data);
   1.255 +			});
   1.256 +
   1.257 +		// Return the cloned set
   1.258 +		return ret;
   1.259 +	},
   1.260 +
   1.261 +	filter: function(t) {
   1.262 +		return this.pushStack(
   1.263 +			jQuery.isFunction( t ) &&
   1.264 +			jQuery.grep(this, function(el, index){
   1.265 +				return t.apply(el, [index]);
   1.266 +			}) ||
   1.267 +
   1.268 +			jQuery.multiFilter(t,this) );
   1.269 +	},
   1.270 +
   1.271 +	not: function(t) {
   1.272 +		return this.pushStack(
   1.273 +			t.constructor == String &&
   1.274 +			jQuery.multiFilter(t, this, true) ||
   1.275 +
   1.276 +			jQuery.grep(this, function(a) {
   1.277 +				return ( t.constructor == Array || t.jquery )
   1.278 +					? jQuery.inArray( a, t ) < 0
   1.279 +					: a != t;
   1.280 +			})
   1.281 +		);
   1.282 +	},
   1.283 +
   1.284 +	add: function(t) {
   1.285 +		return this.pushStack( jQuery.merge(
   1.286 +			this.get(),
   1.287 +			t.constructor == String ?
   1.288 +				jQuery(t).get() :
   1.289 +				t.length != undefined && (!t.nodeName || jQuery.nodeName(t, "form")) ?
   1.290 +					t : [t] )
   1.291 +		);
   1.292 +	},
   1.293 +
   1.294 +	is: function(expr) {
   1.295 +		return expr ? jQuery.multiFilter(expr,this).length > 0 : false;
   1.296 +	},
   1.297 +
   1.298 +	hasClass: function(expr) {
   1.299 +		return this.is("." + expr);
   1.300 +	},
   1.301 +	
   1.302 +	val: function( val ) {
   1.303 +		if ( val == undefined ) {
   1.304 +			if ( this.length ) {
   1.305 +				var elem = this[0];
   1.306 +		    	
   1.307 +				// We need to handle select boxes special
   1.308 +				if ( jQuery.nodeName(elem, "select") ) {
   1.309 +					var index = elem.selectedIndex,
   1.310 +						a = [],
   1.311 +						options = elem.options,
   1.312 +						one = elem.type == "select-one";
   1.313 +					
   1.314 +					// Nothing was selected
   1.315 +					if ( index < 0 )
   1.316 +						return null;
   1.317 +
   1.318 +					// Loop through all the selected options
   1.319 +					for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
   1.320 +						var option = options[i];
   1.321 +						if ( option.selected ) {
   1.322 +							// Get the specifc value for the option
   1.323 +							var val = jQuery.browser.msie && !option.attributes["value"].specified ? option.text : option.value;
   1.324 +							
   1.325 +							// We don't need an array for one selects
   1.326 +							if ( one )
   1.327 +								return val;
   1.328 +							
   1.329 +							// Multi-Selects return an array
   1.330 +							a.push(val);
   1.331 +						}
   1.332 +					}
   1.333 +					
   1.334 +					return a;
   1.335 +					
   1.336 +				// Everything else, we just grab the value
   1.337 +				} else
   1.338 +					return this[0].value.replace(/\r/g, "");
   1.339 +			}
   1.340 +		} else
   1.341 +			return this.each(function(){
   1.342 +				if ( val.constructor == Array && /radio|checkbox/.test(this.type) )
   1.343 +					this.checked = (jQuery.inArray(this.value, val) >= 0 ||
   1.344 +						jQuery.inArray(this.name, val) >= 0);
   1.345 +				else if ( jQuery.nodeName(this, "select") ) {
   1.346 +					var tmp = val.constructor == Array ? val : [val];
   1.347 +
   1.348 +					jQuery("option", this).each(function(){
   1.349 +						this.selected = (jQuery.inArray(this.value, tmp) >= 0 ||
   1.350 +						jQuery.inArray(this.text, tmp) >= 0);
   1.351 +					});
   1.352 +
   1.353 +					if ( !tmp.length )
   1.354 +						this.selectedIndex = -1;
   1.355 +				} else
   1.356 +					this.value = val;
   1.357 +			});
   1.358 +	},
   1.359 +	
   1.360 +	html: function( val ) {
   1.361 +		return val == undefined ?
   1.362 +			( this.length ? this[0].innerHTML : null ) :
   1.363 +			this.empty().append( val );
   1.364 +	},
   1.365 +
   1.366 +	replaceWith: function( val ) {
   1.367 +		return this.after( val ).remove();
   1.368 +	},
   1.369 +
   1.370 +	eq: function(i){
   1.371 +		return this.slice(i, i+1);
   1.372 +	},
   1.373 +
   1.374 +	slice: function() {
   1.375 +		return this.pushStack( Array.prototype.slice.apply( this, arguments ) );
   1.376 +	},
   1.377 +
   1.378 +	map: function(fn) {
   1.379 +		return this.pushStack(jQuery.map( this, function(elem,i){
   1.380 +			return fn.call( elem, i, elem );
   1.381 +		}));
   1.382 +	},
   1.383 +
   1.384 +	andSelf: function() {
   1.385 +		return this.add( this.prevObject );
   1.386 +	},
   1.387 +	
   1.388 +	domManip: function(args, table, dir, fn) {
   1.389 +		var clone = this.length > 1, a; 
   1.390 +
   1.391 +		return this.each(function(){
   1.392 +			if ( !a ) {
   1.393 +				a = jQuery.clean(args, this.ownerDocument);
   1.394 +				if ( dir < 0 )
   1.395 +					a.reverse();
   1.396 +			}
   1.397 +
   1.398 +			var obj = this;
   1.399 +
   1.400 +			if ( table && jQuery.nodeName(this, "table") && jQuery.nodeName(a[0], "tr") )
   1.401 +				obj = this.getElementsByTagName("tbody")[0] || this.appendChild(document.createElement("tbody"));
   1.402 +
   1.403 +			jQuery.each( a, function(){
   1.404 +				var elem = clone ? this.cloneNode(true) : this;
   1.405 +				if ( !evalScript(0, elem) )
   1.406 +					fn.call( obj, elem );
   1.407 +			});
   1.408 +		});
   1.409 +	}
   1.410 +};
   1.411 +
   1.412 +function evalScript(i, elem){
   1.413 +	var script = jQuery.nodeName(elem, "script");
   1.414 +
   1.415 +	if ( script ) {
   1.416 +		if ( elem.src )
   1.417 +			jQuery.ajax({ url: elem.src, async: false, dataType: "script" });
   1.418 +		else
   1.419 +			jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
   1.420 +	
   1.421 +		if ( elem.parentNode )
   1.422 +			elem.parentNode.removeChild(elem);
   1.423 +
   1.424 +	} else if ( elem.nodeType == 1 )
   1.425 +    jQuery("script", elem).each(evalScript);
   1.426 +
   1.427 +	return script;
   1.428 +}
   1.429 +
   1.430 +jQuery.extend = jQuery.fn.extend = function() {
   1.431 +	// copy reference to target object
   1.432 +	var target = arguments[0] || {}, a = 1, al = arguments.length, deep = false;
   1.433 +
   1.434 +	// Handle a deep copy situation
   1.435 +	if ( target.constructor == Boolean ) {
   1.436 +		deep = target;
   1.437 +		target = arguments[1] || {};
   1.438 +	}
   1.439 +
   1.440 +	// extend jQuery itself if only one argument is passed
   1.441 +	if ( al == 1 ) {
   1.442 +		target = this;
   1.443 +		a = 0;
   1.444 +	}
   1.445 +
   1.446 +	var prop;
   1.447 +
   1.448 +	for ( ; a < al; a++ )
   1.449 +		// Only deal with non-null/undefined values
   1.450 +		if ( (prop = arguments[a]) != null )
   1.451 +			// Extend the base object
   1.452 +			for ( var i in prop ) {
   1.453 +				// Prevent never-ending loop
   1.454 +				if ( target == prop[i] )
   1.455 +					continue;
   1.456 +
   1.457 +				// Recurse if we're merging object values
   1.458 +				if ( deep && typeof prop[i] == 'object' && target[i] )
   1.459 +					jQuery.extend( target[i], prop[i] );
   1.460 +
   1.461 +				// Don't bring in undefined values
   1.462 +				else if ( prop[i] != undefined )
   1.463 +					target[i] = prop[i];
   1.464 +			}
   1.465 +
   1.466 +	// Return the modified object
   1.467 +	return target;
   1.468 +};
   1.469 +
   1.470 +var expando = "jQuery" + (new Date()).getTime(), uuid = 0, win = {};
   1.471 +
   1.472 +jQuery.extend({
   1.473 +	noConflict: function(deep) {
   1.474 +		window.$ = _$;
   1.475 +		if ( deep )
   1.476 +			window.jQuery = _jQuery;
   1.477 +		return jQuery;
   1.478 +	},
   1.479 +
   1.480 +	// This may seem like some crazy code, but trust me when I say that this
   1.481 +	// is the only cross-browser way to do this. --John
   1.482 +	isFunction: function( fn ) {
   1.483 +		return !!fn && typeof fn != "string" && !fn.nodeName && 
   1.484 +			fn.constructor != Array && /function/i.test( fn + "" );
   1.485 +	},
   1.486 +	
   1.487 +	// check if an element is in a XML document
   1.488 +	isXMLDoc: function(elem) {
   1.489 +		return elem.documentElement && !elem.body ||
   1.490 +			elem.tagName && elem.ownerDocument && !elem.ownerDocument.body;
   1.491 +	},
   1.492 +
   1.493 +	// Evalulates a script in a global context
   1.494 +	// Evaluates Async. in Safari 2 :-(
   1.495 +	globalEval: function( data ) {
   1.496 +		data = jQuery.trim( data );
   1.497 +		if ( data ) {
   1.498 +			if ( window.execScript )
   1.499 +				window.execScript( data );
   1.500 +			else if ( jQuery.browser.safari )
   1.501 +				// safari doesn't provide a synchronous global eval
   1.502 +				window.setTimeout( data, 0 );
   1.503 +			else
   1.504 +				eval.call( window, data );
   1.505 +		}
   1.506 +	},
   1.507 +
   1.508 +	nodeName: function( elem, name ) {
   1.509 +		return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
   1.510 +	},
   1.511 +	
   1.512 +	cache: {},
   1.513 +	
   1.514 +	data: function( elem, name, data ) {
   1.515 +		elem = elem == window ? win : elem;
   1.516 +
   1.517 +		var id = elem[ expando ];
   1.518 +
   1.519 +		// Compute a unique ID for the element
   1.520 +		if ( !id ) 
   1.521 +			id = elem[ expando ] = ++uuid;
   1.522 +
   1.523 +		// Only generate the data cache if we're
   1.524 +		// trying to access or manipulate it
   1.525 +		if ( name && !jQuery.cache[ id ] )
   1.526 +			jQuery.cache[ id ] = {};
   1.527 +		
   1.528 +		// Prevent overriding the named cache with undefined values
   1.529 +		if ( data != undefined )
   1.530 +			jQuery.cache[ id ][ name ] = data;
   1.531 +		
   1.532 +		// Return the named cache data, or the ID for the element	
   1.533 +		return name ? jQuery.cache[ id ][ name ] : id;
   1.534 +	},
   1.535 +	
   1.536 +	removeData: function( elem, name ) {
   1.537 +		elem = elem == window ? win : elem;
   1.538 +
   1.539 +		var id = elem[ expando ];
   1.540 +
   1.541 +		// If we want to remove a specific section of the element's data
   1.542 +		if ( name ) {
   1.543 +			if ( jQuery.cache[ id ] ) {
   1.544 +				// Remove the section of cache data
   1.545 +				delete jQuery.cache[ id ][ name ];
   1.546 +
   1.547 +				// If we've removed all the data, remove the element's cache
   1.548 +				name = "";
   1.549 +				for ( name in jQuery.cache[ id ] ) break;
   1.550 +				if ( !name )
   1.551 +					jQuery.removeData( elem );
   1.552 +			}
   1.553 +
   1.554 +		// Otherwise, we want to remove all of the element's data
   1.555 +		} else {
   1.556 +			// Clean up the element expando
   1.557 +			try {
   1.558 +				delete elem[ expando ];
   1.559 +			} catch(e){
   1.560 +				// IE has trouble directly removing the expando
   1.561 +				// but it's ok with using removeAttribute
   1.562 +				if ( elem.removeAttribute )
   1.563 +					elem.removeAttribute( expando );
   1.564 +			}
   1.565 +
   1.566 +			// Completely remove the data cache
   1.567 +			delete jQuery.cache[ id ];
   1.568 +		}
   1.569 +	},
   1.570 +
   1.571 +	// args is for internal usage only
   1.572 +	each: function( obj, fn, args ) {
   1.573 +		if ( args ) {
   1.574 +			if ( obj.length == undefined )
   1.575 +				for ( var i in obj )
   1.576 +					fn.apply( obj[i], args );
   1.577 +			else
   1.578 +				for ( var i = 0, ol = obj.length; i < ol; i++ )
   1.579 +					if ( fn.apply( obj[i], args ) === false ) break;
   1.580 +
   1.581 +		// A special, fast, case for the most common use of each
   1.582 +		} else {
   1.583 +			if ( obj.length == undefined )
   1.584 +				for ( var i in obj )
   1.585 +					fn.call( obj[i], i, obj[i] );
   1.586 +			else
   1.587 +				for ( var i = 0, ol = obj.length, val = obj[0]; 
   1.588 +					i < ol && fn.call(val,i,val) !== false; val = obj[++i] ){}
   1.589 +		}
   1.590 +
   1.591 +		return obj;
   1.592 +	},
   1.593 +	
   1.594 +	prop: function(elem, value, type, index, prop){
   1.595 +			// Handle executable functions
   1.596 +			if ( jQuery.isFunction( value ) )
   1.597 +				value = value.call( elem, [index] );
   1.598 +				
   1.599 +			// exclude the following css properties to add px
   1.600 +			var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i;
   1.601 +
   1.602 +			// Handle passing in a number to a CSS property
   1.603 +			return value && value.constructor == Number && type == "curCSS" && !exclude.test(prop) ?
   1.604 +				value + "px" :
   1.605 +				value;
   1.606 +	},
   1.607 +
   1.608 +	className: {
   1.609 +		// internal only, use addClass("class")
   1.610 +		add: function( elem, c ){
   1.611 +			jQuery.each( (c || "").split(/\s+/), function(i, cur){
   1.612 +				if ( !jQuery.className.has( elem.className, cur ) )
   1.613 +					elem.className += ( elem.className ? " " : "" ) + cur;
   1.614 +			});
   1.615 +		},
   1.616 +
   1.617 +		// internal only, use removeClass("class")
   1.618 +		remove: function( elem, c ){
   1.619 +			elem.className = c != undefined ?
   1.620 +				jQuery.grep( elem.className.split(/\s+/), function(cur){
   1.621 +					return !jQuery.className.has( c, cur );	
   1.622 +				}).join(" ") : "";
   1.623 +		},
   1.624 +
   1.625 +		// internal only, use is(".class")
   1.626 +		has: function( t, c ) {
   1.627 +			return jQuery.inArray( c, (t.className || t).toString().split(/\s+/) ) > -1;
   1.628 +		}
   1.629 +	},
   1.630 +
   1.631 +	swap: function(e,o,f) {
   1.632 +		for ( var i in o ) {
   1.633 +			e.style["old"+i] = e.style[i];
   1.634 +			e.style[i] = o[i];
   1.635 +		}
   1.636 +		f.apply( e, [] );
   1.637 +		for ( var i in o )
   1.638 +			e.style[i] = e.style["old"+i];
   1.639 +	},
   1.640 +
   1.641 +	css: function(e,p) {
   1.642 +		if ( p == "height" || p == "width" ) {
   1.643 +			var old = {}, oHeight, oWidth, d = ["Top","Bottom","Right","Left"];
   1.644 +
   1.645 +			jQuery.each( d, function(){
   1.646 +				old["padding" + this] = 0;
   1.647 +				old["border" + this + "Width"] = 0;
   1.648 +			});
   1.649 +
   1.650 +			jQuery.swap( e, old, function() {
   1.651 +				if ( jQuery(e).is(':visible') ) {
   1.652 +					oHeight = e.offsetHeight;
   1.653 +					oWidth = e.offsetWidth;
   1.654 +				} else {
   1.655 +					e = jQuery(e.cloneNode(true))
   1.656 +						.find(":radio").removeAttr("checked").end()
   1.657 +						.css({
   1.658 +							visibility: "hidden", position: "absolute", display: "block", right: "0", left: "0"
   1.659 +						}).appendTo(e.parentNode)[0];
   1.660 +
   1.661 +					var parPos = jQuery.css(e.parentNode,"position") || "static";
   1.662 +					if ( parPos == "static" )
   1.663 +						e.parentNode.style.position = "relative";
   1.664 +
   1.665 +					oHeight = e.clientHeight;
   1.666 +					oWidth = e.clientWidth;
   1.667 +
   1.668 +					if ( parPos == "static" )
   1.669 +						e.parentNode.style.position = "static";
   1.670 +
   1.671 +					e.parentNode.removeChild(e);
   1.672 +				}
   1.673 +			});
   1.674 +
   1.675 +			return p == "height" ? oHeight : oWidth;
   1.676 +		}
   1.677 +
   1.678 +		return jQuery.curCSS( e, p );
   1.679 +	},
   1.680 +
   1.681 +	curCSS: function(elem, prop, force) {
   1.682 +		var ret, stack = [], swap = [];
   1.683 +
   1.684 +		// A helper method for determining if an element's values are broken
   1.685 +		function color(a){
   1.686 +			if ( !jQuery.browser.safari )
   1.687 +				return false;
   1.688 +
   1.689 +			var ret = document.defaultView.getComputedStyle(a,null);
   1.690 +			return !ret || ret.getPropertyValue("color") == "";
   1.691 +		}
   1.692 +
   1.693 +		if (prop == "opacity" && jQuery.browser.msie) {
   1.694 +			ret = jQuery.attr(elem.style, "opacity");
   1.695 +			return ret == "" ? "1" : ret;
   1.696 +		}
   1.697 +		
   1.698 +		if (prop.match(/float/i))
   1.699 +			prop = styleFloat;
   1.700 +
   1.701 +		if (!force && elem.style[prop])
   1.702 +			ret = elem.style[prop];
   1.703 +
   1.704 +		else if (document.defaultView && document.defaultView.getComputedStyle) {
   1.705 +
   1.706 +			if (prop.match(/float/i))
   1.707 +				prop = "float";
   1.708 +
   1.709 +			prop = prop.replace(/([A-Z])/g,"-$1").toLowerCase();
   1.710 +			var cur = document.defaultView.getComputedStyle(elem, null);
   1.711 +
   1.712 +			if ( cur && !color(elem) )
   1.713 +				ret = cur.getPropertyValue(prop);
   1.714 +
   1.715 +			// If the element isn't reporting its values properly in Safari
   1.716 +			// then some display: none elements are involved
   1.717 +			else {
   1.718 +				// Locate all of the parent display: none elements
   1.719 +				for ( var a = elem; a && color(a); a = a.parentNode )
   1.720 +					stack.unshift(a);
   1.721 +
   1.722 +				// Go through and make them visible, but in reverse
   1.723 +				// (It would be better if we knew the exact display type that they had)
   1.724 +				for ( a = 0; a < stack.length; a++ )
   1.725 +					if ( color(stack[a]) ) {
   1.726 +						swap[a] = stack[a].style.display;
   1.727 +						stack[a].style.display = "block";
   1.728 +					}
   1.729 +
   1.730 +				// Since we flip the display style, we have to handle that
   1.731 +				// one special, otherwise get the value
   1.732 +				ret = prop == "display" && swap[stack.length-1] != null ?
   1.733 +					"none" :
   1.734 +					document.defaultView.getComputedStyle(elem,null).getPropertyValue(prop) || "";
   1.735 +
   1.736 +				// Finally, revert the display styles back
   1.737 +				for ( a = 0; a < swap.length; a++ )
   1.738 +					if ( swap[a] != null )
   1.739 +						stack[a].style.display = swap[a];
   1.740 +			}
   1.741 +
   1.742 +			if ( prop == "opacity" && ret == "" )
   1.743 +				ret = "1";
   1.744 +
   1.745 +		} else if (elem.currentStyle) {
   1.746 +			var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});
   1.747 +			ret = elem.currentStyle[prop] || elem.currentStyle[newProp];
   1.748 +
   1.749 +			// From the awesome hack by Dean Edwards
   1.750 +			// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
   1.751 +
   1.752 +			// If we're not dealing with a regular pixel number
   1.753 +			// but a number that has a weird ending, we need to convert it to pixels
   1.754 +			if ( !/^\d+(px)?$/i.test(ret) && /^\d/.test(ret) ) {
   1.755 +				var style = elem.style.left;
   1.756 +				var runtimeStyle = elem.runtimeStyle.left;
   1.757 +				elem.runtimeStyle.left = elem.currentStyle.left;
   1.758 +				elem.style.left = ret || 0;
   1.759 +				ret = elem.style.pixelLeft + "px";
   1.760 +				elem.style.left = style;
   1.761 +				elem.runtimeStyle.left = runtimeStyle;
   1.762 +			}
   1.763 +		}
   1.764 +
   1.765 +		return ret;
   1.766 +	},
   1.767 +	
   1.768 +	clean: function(a, doc) {
   1.769 +		var r = [];
   1.770 +		doc = doc || document;
   1.771 +
   1.772 +		jQuery.each( a, function(i,arg){
   1.773 +			if ( !arg ) return;
   1.774 +
   1.775 +			if ( arg.constructor == Number )
   1.776 +				arg = arg.toString();
   1.777 +			
   1.778 +			// Convert html string into DOM nodes
   1.779 +			if ( typeof arg == "string" ) {
   1.780 +				// Fix "XHTML"-style tags in all browsers
   1.781 +				arg = arg.replace(/(<(\w+)[^>]*?)\/>/g, function(m, all, tag){
   1.782 +					return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area)$/i)? m : all+"></"+tag+">";
   1.783 +				});
   1.784 +
   1.785 +				// Trim whitespace, otherwise indexOf won't work as expected
   1.786 +				var s = jQuery.trim(arg).toLowerCase(), div = doc.createElement("div"), tb = [];
   1.787 +
   1.788 +				var wrap =
   1.789 +					// option or optgroup
   1.790 +					!s.indexOf("<opt") &&
   1.791 +					[1, "<select>", "</select>"] ||
   1.792 +					
   1.793 +					!s.indexOf("<leg") &&
   1.794 +					[1, "<fieldset>", "</fieldset>"] ||
   1.795 +					
   1.796 +					s.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
   1.797 +					[1, "<table>", "</table>"] ||
   1.798 +					
   1.799 +					!s.indexOf("<tr") &&
   1.800 +					[2, "<table><tbody>", "</tbody></table>"] ||
   1.801 +					
   1.802 +				 	// <thead> matched above
   1.803 +					(!s.indexOf("<td") || !s.indexOf("<th")) &&
   1.804 +					[3, "<table><tbody><tr>", "</tr></tbody></table>"] ||
   1.805 +					
   1.806 +					!s.indexOf("<col") &&
   1.807 +					[2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"] ||
   1.808 +
   1.809 +					// IE can't serialize <link> and <script> tags normally
   1.810 +					jQuery.browser.msie &&
   1.811 +					[1, "div<div>", "</div>"] ||
   1.812 +					
   1.813 +					[0,"",""];
   1.814 +
   1.815 +				// Go to html and back, then peel off extra wrappers
   1.816 +				div.innerHTML = wrap[1] + arg + wrap[2];
   1.817 +				
   1.818 +				// Move to the right depth
   1.819 +				while ( wrap[0]-- )
   1.820 +					div = div.lastChild;
   1.821 +				
   1.822 +				// Remove IE's autoinserted <tbody> from table fragments
   1.823 +				if ( jQuery.browser.msie ) {
   1.824 +					
   1.825 +					// String was a <table>, *may* have spurious <tbody>
   1.826 +					if ( !s.indexOf("<table") && s.indexOf("<tbody") < 0 ) 
   1.827 +						tb = div.firstChild && div.firstChild.childNodes;
   1.828 +						
   1.829 +					// String was a bare <thead> or <tfoot>
   1.830 +					else if ( wrap[1] == "<table>" && s.indexOf("<tbody") < 0 )
   1.831 +						tb = div.childNodes;
   1.832 +
   1.833 +					for ( var n = tb.length-1; n >= 0 ; --n )
   1.834 +						if ( jQuery.nodeName(tb[n], "tbody") && !tb[n].childNodes.length )
   1.835 +							tb[n].parentNode.removeChild(tb[n]);
   1.836 +	
   1.837 +					// IE completely kills leading whitespace when innerHTML is used	
   1.838 +					if ( /^\s/.test(arg) )	
   1.839 +						div.insertBefore( doc.createTextNode( arg.match(/^\s*/)[0] ), div.firstChild );
   1.840 +
   1.841 +				}
   1.842 +				
   1.843 +				arg = jQuery.makeArray( div.childNodes );
   1.844 +			}
   1.845 +
   1.846 +			if ( 0 === arg.length && (!jQuery.nodeName(arg, "form") && !jQuery.nodeName(arg, "select")) )
   1.847 +				return;
   1.848 +
   1.849 +			if ( arg[0] == undefined || jQuery.nodeName(arg, "form") || arg.options )
   1.850 +				r.push( arg );
   1.851 +			else
   1.852 +				r = jQuery.merge( r, arg );
   1.853 +
   1.854 +		});
   1.855 +
   1.856 +		return r;
   1.857 +	},
   1.858 +	
   1.859 +	attr: function(elem, name, value){
   1.860 +		var fix = jQuery.isXMLDoc(elem) ? {} : jQuery.props;
   1.861 +
   1.862 +		// Safari mis-reports the default selected property of a hidden option
   1.863 +		// Accessing the parent's selectedIndex property fixes it
   1.864 +		if ( name == "selected" && jQuery.browser.safari )
   1.865 +			elem.parentNode.selectedIndex;
   1.866 +		
   1.867 +		// Certain attributes only work when accessed via the old DOM 0 way
   1.868 +		if ( fix[name] ) {
   1.869 +			if ( value != undefined ) elem[fix[name]] = value;
   1.870 +			return elem[fix[name]];
   1.871 +		} else if ( jQuery.browser.msie && name == "style" )
   1.872 +			return jQuery.attr( elem.style, "cssText", value );
   1.873 +
   1.874 +		else if ( value == undefined && jQuery.browser.msie && jQuery.nodeName(elem, "form") && (name == "action" || name == "method") )
   1.875 +			return elem.getAttributeNode(name).nodeValue;
   1.876 +
   1.877 +		// IE elem.getAttribute passes even for style
   1.878 +		else if ( elem.tagName ) {
   1.879 +
   1.880 +			if ( value != undefined ) {
   1.881 +				if ( name == "type" && jQuery.nodeName(elem,"input") && elem.parentNode )
   1.882 +					throw "type property can't be changed";
   1.883 +				elem.setAttribute( name, value );
   1.884 +			}
   1.885 +
   1.886 +			if ( jQuery.browser.msie && /href|src/.test(name) && !jQuery.isXMLDoc(elem) ) 
   1.887 +				return elem.getAttribute( name, 2 );
   1.888 +
   1.889 +			return elem.getAttribute( name );
   1.890 +
   1.891 +		// elem is actually elem.style ... set the style
   1.892 +		} else {
   1.893 +			// IE actually uses filters for opacity
   1.894 +			if ( name == "opacity" && jQuery.browser.msie ) {
   1.895 +				if ( value != undefined ) {
   1.896 +					// IE has trouble with opacity if it does not have layout
   1.897 +					// Force it by setting the zoom level
   1.898 +					elem.zoom = 1; 
   1.899 +	
   1.900 +					// Set the alpha filter to set the opacity
   1.901 +					elem.filter = (elem.filter || "").replace(/alpha\([^)]*\)/,"") +
   1.902 +						(parseFloat(value).toString() == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
   1.903 +				}
   1.904 +	
   1.905 +				return elem.filter ? 
   1.906 +					(parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100).toString() : "";
   1.907 +			}
   1.908 +			name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});
   1.909 +			if ( value != undefined ) elem[name] = value;
   1.910 +			return elem[name];
   1.911 +		}
   1.912 +	},
   1.913 +	
   1.914 +	trim: function(t){
   1.915 +		return (t||"").replace(/^\s+|\s+$/g, "");
   1.916 +	},
   1.917 +
   1.918 +	makeArray: function( a ) {
   1.919 +		var r = [];
   1.920 +
   1.921 +		// Need to use typeof to fight Safari childNodes crashes
   1.922 +		if ( typeof a != "array" )
   1.923 +			for ( var i = 0, al = a.length; i < al; i++ )
   1.924 +				r.push( a[i] );
   1.925 +		else
   1.926 +			r = a.slice( 0 );
   1.927 +
   1.928 +		return r;
   1.929 +	},
   1.930 +
   1.931 +	inArray: function( b, a ) {
   1.932 +		for ( var i = 0, al = a.length; i < al; i++ )
   1.933 +			if ( a[i] == b )
   1.934 +				return i;
   1.935 +		return -1;
   1.936 +	},
   1.937 +
   1.938 +	merge: function(first, second) {
   1.939 +		// We have to loop this way because IE & Opera overwrite the length
   1.940 +		// expando of getElementsByTagName
   1.941 +
   1.942 +		// Also, we need to make sure that the correct elements are being returned
   1.943 +		// (IE returns comment nodes in a '*' query)
   1.944 +		if ( jQuery.browser.msie ) {
   1.945 +			for ( var i = 0; second[i]; i++ )
   1.946 +				if ( second[i].nodeType != 8 )
   1.947 +					first.push(second[i]);
   1.948 +		} else
   1.949 +			for ( var i = 0; second[i]; i++ )
   1.950 +				first.push(second[i]);
   1.951 +
   1.952 +		return first;
   1.953 +	},
   1.954 +
   1.955 +	unique: function(first) {
   1.956 +		var r = [], done = {};
   1.957 +
   1.958 +		try {
   1.959 +			for ( var i = 0, fl = first.length; i < fl; i++ ) {
   1.960 +				var id = jQuery.data(first[i]);
   1.961 +				if ( !done[id] ) {
   1.962 +					done[id] = true;
   1.963 +					r.push(first[i]);
   1.964 +				}
   1.965 +			}
   1.966 +		} catch(e) {
   1.967 +			r = first;
   1.968 +		}
   1.969 +
   1.970 +		return r;
   1.971 +	},
   1.972 +
   1.973 +	grep: function(elems, fn, inv) {
   1.974 +		// If a string is passed in for the function, make a function
   1.975 +		// for it (a handy shortcut)
   1.976 +		if ( typeof fn == "string" )
   1.977 +			fn = eval("false||function(a,i){return " + fn + "}");
   1.978 +
   1.979 +		var result = [];
   1.980 +
   1.981 +		// Go through the array, only saving the items
   1.982 +		// that pass the validator function
   1.983 +		for ( var i = 0, el = elems.length; i < el; i++ )
   1.984 +			if ( !inv && fn(elems[i],i) || inv && !fn(elems[i],i) )
   1.985 +				result.push( elems[i] );
   1.986 +
   1.987 +		return result;
   1.988 +	},
   1.989 +
   1.990 +	map: function(elems, fn) {
   1.991 +		// If a string is passed in for the function, make a function
   1.992 +		// for it (a handy shortcut)
   1.993 +		if ( typeof fn == "string" )
   1.994 +			fn = eval("false||function(a){return " + fn + "}");
   1.995 +
   1.996 +		var result = [];
   1.997 +
   1.998 +		// Go through the array, translating each of the items to their
   1.999 +		// new value (or values).
  1.1000 +		for ( var i = 0, el = elems.length; i < el; i++ ) {
  1.1001 +			var val = fn(elems[i],i);
  1.1002 +
  1.1003 +			if ( val !== null && val != undefined ) {
  1.1004 +				if ( val.constructor != Array ) val = [val];
  1.1005 +				result = result.concat( val );
  1.1006 +			}
  1.1007 +		}
  1.1008 +
  1.1009 +		return result;
  1.1010 +	}
  1.1011 +});
  1.1012 +
  1.1013 +var userAgent = navigator.userAgent.toLowerCase();
  1.1014 +
  1.1015 +// Figure out what browser is being used
  1.1016 +jQuery.browser = {
  1.1017 +	version: (userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1],
  1.1018 +	safari: /webkit/.test(userAgent),
  1.1019 +	opera: /opera/.test(userAgent),
  1.1020 +	msie: /msie/.test(userAgent) && !/opera/.test(userAgent),
  1.1021 +	mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent)
  1.1022 +};
  1.1023 +
  1.1024 +var styleFloat = jQuery.browser.msie ? "styleFloat" : "cssFloat";
  1.1025 +	
  1.1026 +jQuery.extend({
  1.1027 +	// Check to see if the W3C box model is being used
  1.1028 +	boxModel: !jQuery.browser.msie || document.compatMode == "CSS1Compat",
  1.1029 +	
  1.1030 +	styleFloat: jQuery.browser.msie ? "styleFloat" : "cssFloat",
  1.1031 +	
  1.1032 +	props: {
  1.1033 +		"for": "htmlFor",
  1.1034 +		"class": "className",
  1.1035 +		"float": styleFloat,
  1.1036 +		cssFloat: styleFloat,
  1.1037 +		styleFloat: styleFloat,
  1.1038 +		innerHTML: "innerHTML",
  1.1039 +		className: "className",
  1.1040 +		value: "value",
  1.1041 +		disabled: "disabled",
  1.1042 +		checked: "checked",
  1.1043 +		readonly: "readOnly",
  1.1044 +		selected: "selected",
  1.1045 +		maxlength: "maxLength"
  1.1046 +	}
  1.1047 +});
  1.1048 +
  1.1049 +jQuery.each({
  1.1050 +	parent: "a.parentNode",
  1.1051 +	parents: "jQuery.dir(a,'parentNode')",
  1.1052 +	next: "jQuery.nth(a,2,'nextSibling')",
  1.1053 +	prev: "jQuery.nth(a,2,'previousSibling')",
  1.1054 +	nextAll: "jQuery.dir(a,'nextSibling')",
  1.1055 +	prevAll: "jQuery.dir(a,'previousSibling')",
  1.1056 +	siblings: "jQuery.sibling(a.parentNode.firstChild,a)",
  1.1057 +	children: "jQuery.sibling(a.firstChild)",
  1.1058 +	contents: "jQuery.nodeName(a,'iframe')?a.contentDocument||a.contentWindow.document:jQuery.makeArray(a.childNodes)"
  1.1059 +}, function(i,n){
  1.1060 +	jQuery.fn[ i ] = function(a) {
  1.1061 +		var ret = jQuery.map(this,n);
  1.1062 +		if ( a && typeof a == "string" )
  1.1063 +			ret = jQuery.multiFilter(a,ret);
  1.1064 +		return this.pushStack( jQuery.unique(ret) );
  1.1065 +	};
  1.1066 +});
  1.1067 +
  1.1068 +jQuery.each({
  1.1069 +	appendTo: "append",
  1.1070 +	prependTo: "prepend",
  1.1071 +	insertBefore: "before",
  1.1072 +	insertAfter: "after",
  1.1073 +	replaceAll: "replaceWith"
  1.1074 +}, function(i,n){
  1.1075 +	jQuery.fn[ i ] = function(){
  1.1076 +		var a = arguments;
  1.1077 +		return this.each(function(){
  1.1078 +			for ( var j = 0, al = a.length; j < al; j++ )
  1.1079 +				jQuery(a[j])[n]( this );
  1.1080 +		});
  1.1081 +	};
  1.1082 +});
  1.1083 +
  1.1084 +jQuery.each( {
  1.1085 +	removeAttr: function( key ) {
  1.1086 +		jQuery.attr( this, key, "" );
  1.1087 +		this.removeAttribute( key );
  1.1088 +	},
  1.1089 +	addClass: function(c){
  1.1090 +		jQuery.className.add(this,c);
  1.1091 +	},
  1.1092 +	removeClass: function(c){
  1.1093 +		jQuery.className.remove(this,c);
  1.1094 +	},
  1.1095 +	toggleClass: function( c ){
  1.1096 +		jQuery.className[ jQuery.className.has(this,c) ? "remove" : "add" ](this, c);
  1.1097 +	},
  1.1098 +	remove: function(a){
  1.1099 +		if ( !a || jQuery.filter( a, [this] ).r.length ) {
  1.1100 +			jQuery.removeData( this );
  1.1101 +			this.parentNode.removeChild( this );
  1.1102 +		}
  1.1103 +	},
  1.1104 +	empty: function() {
  1.1105 +		// Clean up the cache
  1.1106 +		jQuery("*", this).each(function(){ jQuery.removeData(this); });
  1.1107 +
  1.1108 +		while ( this.firstChild )
  1.1109 +			this.removeChild( this.firstChild );
  1.1110 +	}
  1.1111 +}, function(i,n){
  1.1112 +	jQuery.fn[ i ] = function() {
  1.1113 +		return this.each( n, arguments );
  1.1114 +	};
  1.1115 +});
  1.1116 +
  1.1117 +jQuery.each( [ "Height", "Width" ], function(i,name){
  1.1118 +	var n = name.toLowerCase();
  1.1119 +	
  1.1120 +	jQuery.fn[ n ] = function(h) {
  1.1121 +		return this[0] == window ?
  1.1122 +			jQuery.browser.safari && self["inner" + name] ||
  1.1123 +			jQuery.boxModel && Math.max(document.documentElement["client" + name], document.body["client" + name]) ||
  1.1124 +			document.body["client" + name] :
  1.1125 +		
  1.1126 +			this[0] == document ?
  1.1127 +				Math.max( document.body["scroll" + name], document.body["offset" + name] ) :
  1.1128 +        
  1.1129 +				h == undefined ?
  1.1130 +					( this.length ? jQuery.css( this[0], n ) : null ) :
  1.1131 +					this.css( n, h.constructor == String ? h : h + "px" );
  1.1132 +	};
  1.1133 +});
  1.1134 +
  1.1135 +var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ?
  1.1136 +		"(?:[\\w*_-]|\\\\.)" :
  1.1137 +		"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",
  1.1138 +	quickChild = new RegExp("^>\\s*(" + chars + "+)"),
  1.1139 +	quickID = new RegExp("^(" + chars + "+)(#)(" + chars + "+)"),
  1.1140 +	quickClass = new RegExp("^([#.]?)(" + chars + "*)");
  1.1141 +
  1.1142 +jQuery.extend({
  1.1143 +	expr: {
  1.1144 +		"": "m[2]=='*'||jQuery.nodeName(a,m[2])",
  1.1145 +		"#": "a.getAttribute('id')==m[2]",
  1.1146 +		":": {
  1.1147 +			// Position Checks
  1.1148 +			lt: "i<m[3]-0",
  1.1149 +			gt: "i>m[3]-0",
  1.1150 +			nth: "m[3]-0==i",
  1.1151 +			eq: "m[3]-0==i",
  1.1152 +			first: "i==0",
  1.1153 +			last: "i==r.length-1",
  1.1154 +			even: "i%2==0",
  1.1155 +			odd: "i%2",
  1.1156 +
  1.1157 +			// Child Checks
  1.1158 +			"first-child": "a.parentNode.getElementsByTagName('*')[0]==a",
  1.1159 +			"last-child": "jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a",
  1.1160 +			"only-child": "!jQuery.nth(a.parentNode.lastChild,2,'previousSibling')",
  1.1161 +
  1.1162 +			// Parent Checks
  1.1163 +			parent: "a.firstChild",
  1.1164 +			empty: "!a.firstChild",
  1.1165 +
  1.1166 +			// Text Check
  1.1167 +			contains: "(a.textContent||a.innerText||jQuery(a).text()||'').indexOf(m[3])>=0",
  1.1168 +
  1.1169 +			// Visibility
  1.1170 +			visible: '"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',
  1.1171 +			hidden: '"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',
  1.1172 +
  1.1173 +			// Form attributes
  1.1174 +			enabled: "!a.disabled",
  1.1175 +			disabled: "a.disabled",
  1.1176 +			checked: "a.checked",
  1.1177 +			selected: "a.selected||jQuery.attr(a,'selected')",
  1.1178 +
  1.1179 +			// Form elements
  1.1180 +			text: "'text'==a.type",
  1.1181 +			radio: "'radio'==a.type",
  1.1182 +			checkbox: "'checkbox'==a.type",
  1.1183 +			file: "'file'==a.type",
  1.1184 +			password: "'password'==a.type",
  1.1185 +			submit: "'submit'==a.type",
  1.1186 +			image: "'image'==a.type",
  1.1187 +			reset: "'reset'==a.type",
  1.1188 +			button: '"button"==a.type||jQuery.nodeName(a,"button")',
  1.1189 +			input: "/input|select|textarea|button/i.test(a.nodeName)",
  1.1190 +
  1.1191 +			// :has()
  1.1192 +			has: "jQuery.find(m[3],a).length",
  1.1193 +
  1.1194 +			// :header
  1.1195 +			header: "/h\\d/i.test(a.nodeName)",
  1.1196 +
  1.1197 +			// :animated
  1.1198 +			animated: "jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length"
  1.1199 +		}
  1.1200 +	},
  1.1201 +	
  1.1202 +	// The regular expressions that power the parsing engine
  1.1203 +	parse: [
  1.1204 +		// Match: [@value='test'], [@foo]
  1.1205 +		/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,
  1.1206 +
  1.1207 +		// Match: :contains('foo')
  1.1208 +		/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,
  1.1209 +
  1.1210 +		// Match: :even, :last-chlid, #id, .class
  1.1211 +		new RegExp("^([:.#]*)(" + chars + "+)")
  1.1212 +	],
  1.1213 +
  1.1214 +	multiFilter: function( expr, elems, not ) {
  1.1215 +		var old, cur = [];
  1.1216 +
  1.1217 +		while ( expr && expr != old ) {
  1.1218 +			old = expr;
  1.1219 +			var f = jQuery.filter( expr, elems, not );
  1.1220 +			expr = f.t.replace(/^\s*,\s*/, "" );
  1.1221 +			cur = not ? elems = f.r : jQuery.merge( cur, f.r );
  1.1222 +		}
  1.1223 +
  1.1224 +		return cur;
  1.1225 +	},
  1.1226 +
  1.1227 +	find: function( t, context ) {
  1.1228 +		// Quickly handle non-string expressions
  1.1229 +		if ( typeof t != "string" )
  1.1230 +			return [ t ];
  1.1231 +
  1.1232 +		// Make sure that the context is a DOM Element
  1.1233 +		if ( context && !context.nodeType )
  1.1234 +			context = null;
  1.1235 +
  1.1236 +		// Set the correct context (if none is provided)
  1.1237 +		context = context || document;
  1.1238 +
  1.1239 +		// Initialize the search
  1.1240 +		var ret = [context], done = [], last;
  1.1241 +
  1.1242 +		// Continue while a selector expression exists, and while
  1.1243 +		// we're no longer looping upon ourselves
  1.1244 +		while ( t && last != t ) {
  1.1245 +			var r = [];
  1.1246 +			last = t;
  1.1247 +
  1.1248 +			t = jQuery.trim(t);
  1.1249 +
  1.1250 +			var foundToken = false;
  1.1251 +
  1.1252 +			// An attempt at speeding up child selectors that
  1.1253 +			// point to a specific element tag
  1.1254 +			var re = quickChild;
  1.1255 +			var m = re.exec(t);
  1.1256 +
  1.1257 +			if ( m ) {
  1.1258 +				var nodeName = m[1].toUpperCase();
  1.1259 +
  1.1260 +				// Perform our own iteration and filter
  1.1261 +				for ( var i = 0; ret[i]; i++ )
  1.1262 +					for ( var c = ret[i].firstChild; c; c = c.nextSibling )
  1.1263 +						if ( c.nodeType == 1 && (nodeName == "*" || c.nodeName.toUpperCase() == nodeName.toUpperCase()) )
  1.1264 +							r.push( c );
  1.1265 +
  1.1266 +				ret = r;
  1.1267 +				t = t.replace( re, "" );
  1.1268 +				if ( t.indexOf(" ") == 0 ) continue;
  1.1269 +				foundToken = true;
  1.1270 +			} else {
  1.1271 +				re = /^([>+~])\s*(\w*)/i;
  1.1272 +
  1.1273 +				if ( (m = re.exec(t)) != null ) {
  1.1274 +					r = [];
  1.1275 +
  1.1276 +					var nodeName = m[2], merge = {};
  1.1277 +					m = m[1];
  1.1278 +
  1.1279 +					for ( var j = 0, rl = ret.length; j < rl; j++ ) {
  1.1280 +						var n = m == "~" || m == "+" ? ret[j].nextSibling : ret[j].firstChild;
  1.1281 +						for ( ; n; n = n.nextSibling )
  1.1282 +							if ( n.nodeType == 1 ) {
  1.1283 +								var id = jQuery.data(n);
  1.1284 +
  1.1285 +								if ( m == "~" && merge[id] ) break;
  1.1286 +								
  1.1287 +								if (!nodeName || n.nodeName.toUpperCase() == nodeName.toUpperCase() ) {
  1.1288 +									if ( m == "~" ) merge[id] = true;
  1.1289 +									r.push( n );
  1.1290 +								}
  1.1291 +								
  1.1292 +								if ( m == "+" ) break;
  1.1293 +							}
  1.1294 +					}
  1.1295 +
  1.1296 +					ret = r;
  1.1297 +
  1.1298 +					// And remove the token
  1.1299 +					t = jQuery.trim( t.replace( re, "" ) );
  1.1300 +					foundToken = true;
  1.1301 +				}
  1.1302 +			}
  1.1303 +
  1.1304 +			// See if there's still an expression, and that we haven't already
  1.1305 +			// matched a token
  1.1306 +			if ( t && !foundToken ) {
  1.1307 +				// Handle multiple expressions
  1.1308 +				if ( !t.indexOf(",") ) {
  1.1309 +					// Clean the result set
  1.1310 +					if ( context == ret[0] ) ret.shift();
  1.1311 +
  1.1312 +					// Merge the result sets
  1.1313 +					done = jQuery.merge( done, ret );
  1.1314 +
  1.1315 +					// Reset the context
  1.1316 +					r = ret = [context];
  1.1317 +
  1.1318 +					// Touch up the selector string
  1.1319 +					t = " " + t.substr(1,t.length);
  1.1320 +
  1.1321 +				} else {
  1.1322 +					// Optimize for the case nodeName#idName
  1.1323 +					var re2 = quickID;
  1.1324 +					var m = re2.exec(t);
  1.1325 +					
  1.1326 +					// Re-organize the results, so that they're consistent
  1.1327 +					if ( m ) {
  1.1328 +					   m = [ 0, m[2], m[3], m[1] ];
  1.1329 +
  1.1330 +					} else {
  1.1331 +						// Otherwise, do a traditional filter check for
  1.1332 +						// ID, class, and element selectors
  1.1333 +						re2 = quickClass;
  1.1334 +						m = re2.exec(t);
  1.1335 +					}
  1.1336 +
  1.1337 +					m[2] = m[2].replace(/\\/g, "");
  1.1338 +
  1.1339 +					var elem = ret[ret.length-1];
  1.1340 +
  1.1341 +					// Try to do a global search by ID, where we can
  1.1342 +					if ( m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) {
  1.1343 +						// Optimization for HTML document case
  1.1344 +						var oid = elem.getElementById(m[2]);
  1.1345 +						
  1.1346 +						// Do a quick check for the existence of the actual ID attribute
  1.1347 +						// to avoid selecting by the name attribute in IE
  1.1348 +						// also check to insure id is a string to avoid selecting an element with the name of 'id' inside a form
  1.1349 +						if ( (jQuery.browser.msie||jQuery.browser.opera) && oid && typeof oid.id == "string" && oid.id != m[2] )
  1.1350 +							oid = jQuery('[@id="'+m[2]+'"]', elem)[0];
  1.1351 +
  1.1352 +						// Do a quick check for node name (where applicable) so
  1.1353 +						// that div#foo searches will be really fast
  1.1354 +						ret = r = oid && (!m[3] || jQuery.nodeName(oid, m[3])) ? [oid] : [];
  1.1355 +					} else {
  1.1356 +						// We need to find all descendant elements
  1.1357 +						for ( var i = 0; ret[i]; i++ ) {
  1.1358 +							// Grab the tag name being searched for
  1.1359 +							var tag = m[1] == "#" && m[3] ? m[3] : m[1] != "" || m[0] == "" ? "*" : m[2];
  1.1360 +
  1.1361 +							// Handle IE7 being really dumb about <object>s
  1.1362 +							if ( tag == "*" && ret[i].nodeName.toLowerCase() == "object" )
  1.1363 +								tag = "param";
  1.1364 +
  1.1365 +							r = jQuery.merge( r, ret[i].getElementsByTagName( tag ));
  1.1366 +						}
  1.1367 +
  1.1368 +						// It's faster to filter by class and be done with it
  1.1369 +						if ( m[1] == "." )
  1.1370 +							r = jQuery.classFilter( r, m[2] );
  1.1371 +
  1.1372 +						// Same with ID filtering
  1.1373 +						if ( m[1] == "#" ) {
  1.1374 +							var tmp = [];
  1.1375 +
  1.1376 +							// Try to find the element with the ID
  1.1377 +							for ( var i = 0; r[i]; i++ )
  1.1378 +								if ( r[i].getAttribute("id") == m[2] ) {
  1.1379 +									tmp = [ r[i] ];
  1.1380 +									break;
  1.1381 +								}
  1.1382 +
  1.1383 +							r = tmp;
  1.1384 +						}
  1.1385 +
  1.1386 +						ret = r;
  1.1387 +					}
  1.1388 +
  1.1389 +					t = t.replace( re2, "" );
  1.1390 +				}
  1.1391 +
  1.1392 +			}
  1.1393 +
  1.1394 +			// If a selector string still exists
  1.1395 +			if ( t ) {
  1.1396 +				// Attempt to filter it
  1.1397 +				var val = jQuery.filter(t,r);
  1.1398 +				ret = r = val.r;
  1.1399 +				t = jQuery.trim(val.t);
  1.1400 +			}
  1.1401 +		}
  1.1402 +
  1.1403 +		// An error occurred with the selector;
  1.1404 +		// just return an empty set instead
  1.1405 +		if ( t )
  1.1406 +			ret = [];
  1.1407 +
  1.1408 +		// Remove the root context
  1.1409 +		if ( ret && context == ret[0] )
  1.1410 +			ret.shift();
  1.1411 +
  1.1412 +		// And combine the results
  1.1413 +		done = jQuery.merge( done, ret );
  1.1414 +
  1.1415 +		return done;
  1.1416 +	},
  1.1417 +
  1.1418 +	classFilter: function(r,m,not){
  1.1419 +		m = " " + m + " ";
  1.1420 +		var tmp = [];
  1.1421 +		for ( var i = 0; r[i]; i++ ) {
  1.1422 +			var pass = (" " + r[i].className + " ").indexOf( m ) >= 0;
  1.1423 +			if ( !not && pass || not && !pass )
  1.1424 +				tmp.push( r[i] );
  1.1425 +		}
  1.1426 +		return tmp;
  1.1427 +	},
  1.1428 +
  1.1429 +	filter: function(t,r,not) {
  1.1430 +		var last;
  1.1431 +
  1.1432 +		// Look for common filter expressions
  1.1433 +		while ( t  && t != last ) {
  1.1434 +			last = t;
  1.1435 +
  1.1436 +			var p = jQuery.parse, m;
  1.1437 +
  1.1438 +			for ( var i = 0; p[i]; i++ ) {
  1.1439 +				m = p[i].exec( t );
  1.1440 +
  1.1441 +				if ( m ) {
  1.1442 +					// Remove what we just matched
  1.1443 +					t = t.substring( m[0].length );
  1.1444 +
  1.1445 +					m[2] = m[2].replace(/\\/g, "");
  1.1446 +					break;
  1.1447 +				}
  1.1448 +			}
  1.1449 +
  1.1450 +			if ( !m )
  1.1451 +				break;
  1.1452 +
  1.1453 +			// :not() is a special case that can be optimized by
  1.1454 +			// keeping it out of the expression list
  1.1455 +			if ( m[1] == ":" && m[2] == "not" )
  1.1456 +				r = jQuery.filter(m[3], r, true).r;
  1.1457 +
  1.1458 +			// We can get a big speed boost by filtering by class here
  1.1459 +			else if ( m[1] == "." )
  1.1460 +				r = jQuery.classFilter(r, m[2], not);
  1.1461 +
  1.1462 +			else if ( m[1] == "[" ) {
  1.1463 +				var tmp = [], type = m[3];
  1.1464 +				
  1.1465 +				for ( var i = 0, rl = r.length; i < rl; i++ ) {
  1.1466 +					var a = r[i], z = a[ jQuery.props[m[2]] || m[2] ];
  1.1467 +					
  1.1468 +					if ( z == null || /href|src|selected/.test(m[2]) )
  1.1469 +						z = jQuery.attr(a,m[2]) || '';
  1.1470 +
  1.1471 +					if ( (type == "" && !!z ||
  1.1472 +						 type == "=" && z == m[5] ||
  1.1473 +						 type == "!=" && z != m[5] ||
  1.1474 +						 type == "^=" && z && !z.indexOf(m[5]) ||
  1.1475 +						 type == "$=" && z.substr(z.length - m[5].length) == m[5] ||
  1.1476 +						 (type == "*=" || type == "~=") && z.indexOf(m[5]) >= 0) ^ not )
  1.1477 +							tmp.push( a );
  1.1478 +				}
  1.1479 +				
  1.1480 +				r = tmp;
  1.1481 +
  1.1482 +			// We can get a speed boost by handling nth-child here
  1.1483 +			} else if ( m[1] == ":" && m[2] == "nth-child" ) {
  1.1484 +				var merge = {}, tmp = [],
  1.1485 +					test = /(\d*)n\+?(\d*)/.exec(
  1.1486 +						m[3] == "even" && "2n" || m[3] == "odd" && "2n+1" ||
  1.1487 +						!/\D/.test(m[3]) && "n+" + m[3] || m[3]),
  1.1488 +					first = (test[1] || 1) - 0, last = test[2] - 0;
  1.1489 +
  1.1490 +				for ( var i = 0, rl = r.length; i < rl; i++ ) {
  1.1491 +					var node = r[i], parentNode = node.parentNode, id = jQuery.data(parentNode);
  1.1492 +
  1.1493 +					if ( !merge[id] ) {
  1.1494 +						var c = 1;
  1.1495 +
  1.1496 +						for ( var n = parentNode.firstChild; n; n = n.nextSibling )
  1.1497 +							if ( n.nodeType == 1 )
  1.1498 +								n.nodeIndex = c++;
  1.1499 +
  1.1500 +						merge[id] = true;
  1.1501 +					}
  1.1502 +
  1.1503 +					var add = false;
  1.1504 +
  1.1505 +					if ( first == 1 ) {
  1.1506 +						if ( last == 0 || node.nodeIndex == last )
  1.1507 +							add = true;
  1.1508 +					} else if ( (node.nodeIndex + last) % first == 0 )
  1.1509 +						add = true;
  1.1510 +
  1.1511 +					if ( add ^ not )
  1.1512 +						tmp.push( node );
  1.1513 +				}
  1.1514 +
  1.1515 +				r = tmp;
  1.1516 +
  1.1517 +			// Otherwise, find the expression to execute
  1.1518 +			} else {
  1.1519 +				var f = jQuery.expr[m[1]];
  1.1520 +				if ( typeof f != "string" )
  1.1521 +					f = jQuery.expr[m[1]][m[2]];
  1.1522 +
  1.1523 +				// Build a custom macro to enclose it
  1.1524 +				f = eval("false||function(a,i){return " + f + "}");
  1.1525 +
  1.1526 +				// Execute it against the current filter
  1.1527 +				r = jQuery.grep( r, f, not );
  1.1528 +			}
  1.1529 +		}
  1.1530 +
  1.1531 +		// Return an array of filtered elements (r)
  1.1532 +		// and the modified expression string (t)
  1.1533 +		return { r: r, t: t };
  1.1534 +	},
  1.1535 +
  1.1536 +	dir: function( elem, dir ){
  1.1537 +		var matched = [];
  1.1538 +		var cur = elem[dir];
  1.1539 +		while ( cur && cur != document ) {
  1.1540 +			if ( cur.nodeType == 1 )
  1.1541 +				matched.push( cur );
  1.1542 +			cur = cur[dir];
  1.1543 +		}
  1.1544 +		return matched;
  1.1545 +	},
  1.1546 +	
  1.1547 +	nth: function(cur,result,dir,elem){
  1.1548 +		result = result || 1;
  1.1549 +		var num = 0;
  1.1550 +
  1.1551 +		for ( ; cur; cur = cur[dir] )
  1.1552 +			if ( cur.nodeType == 1 && ++num == result )
  1.1553 +				break;
  1.1554 +
  1.1555 +		return cur;
  1.1556 +	},
  1.1557 +	
  1.1558 +	sibling: function( n, elem ) {
  1.1559 +		var r = [];
  1.1560 +
  1.1561 +		for ( ; n; n = n.nextSibling ) {
  1.1562 +			if ( n.nodeType == 1 && (!elem || n != elem) )
  1.1563 +				r.push( n );
  1.1564 +		}
  1.1565 +
  1.1566 +		return r;
  1.1567 +	}
  1.1568 +});
  1.1569 +/*
  1.1570 + * A number of helper functions used for managing events.
  1.1571 + * Many of the ideas behind this code orignated from 
  1.1572 + * Dean Edwards' addEvent library.
  1.1573 + */
  1.1574 +jQuery.event = {
  1.1575 +
  1.1576 +	// Bind an event to an element
  1.1577 +	// Original by Dean Edwards
  1.1578 +	add: function(element, type, handler, data) {
  1.1579 +		// For whatever reason, IE has trouble passing the window object
  1.1580 +		// around, causing it to be cloned in the process
  1.1581 +		if ( jQuery.browser.msie && element.setInterval != undefined )
  1.1582 +			element = window;
  1.1583 +
  1.1584 +		// Make sure that the function being executed has a unique ID
  1.1585 +		if ( !handler.guid )
  1.1586 +			handler.guid = this.guid++;
  1.1587 +			
  1.1588 +		// if data is passed, bind to handler 
  1.1589 +		if( data != undefined ) { 
  1.1590 +        		// Create temporary function pointer to original handler 
  1.1591 +			var fn = handler; 
  1.1592 +
  1.1593 +			// Create unique handler function, wrapped around original handler 
  1.1594 +			handler = function() { 
  1.1595 +				// Pass arguments and context to original handler 
  1.1596 +				return fn.apply(this, arguments); 
  1.1597 +			};
  1.1598 +
  1.1599 +			// Store data in unique handler 
  1.1600 +			handler.data = data;
  1.1601 +
  1.1602 +			// Set the guid of unique handler to the same of original handler, so it can be removed 
  1.1603 +			handler.guid = fn.guid;
  1.1604 +		}
  1.1605 +
  1.1606 +		// Namespaced event handlers
  1.1607 +		var parts = type.split(".");
  1.1608 +		type = parts[0];
  1.1609 +		handler.type = parts[1];
  1.1610 +
  1.1611 +		// Init the element's event structure
  1.1612 +		var events = jQuery.data(element, "events") || jQuery.data(element, "events", {});
  1.1613 +		
  1.1614 +		var handle = jQuery.data(element, "handle", function(){
  1.1615 +			// returned undefined or false
  1.1616 +			var val;
  1.1617 +
  1.1618 +			// Handle the second event of a trigger and when
  1.1619 +			// an event is called after a page has unloaded
  1.1620 +			if ( typeof jQuery == "undefined" || jQuery.event.triggered )
  1.1621 +				return val;
  1.1622 +			
  1.1623 +			val = jQuery.event.handle.apply(element, arguments);
  1.1624 +			
  1.1625 +			return val;
  1.1626 +		});
  1.1627 +
  1.1628 +		// Get the current list of functions bound to this event
  1.1629 +		var handlers = events[type];
  1.1630 +
  1.1631 +		// Init the event handler queue
  1.1632 +		if (!handlers) {
  1.1633 +			handlers = events[type] = {};	
  1.1634 +			
  1.1635 +			// And bind the global event handler to the element
  1.1636 +			if (element.addEventListener)
  1.1637 +				element.addEventListener(type, handle, false);
  1.1638 +			else
  1.1639 +				element.attachEvent("on" + type, handle);
  1.1640 +		}
  1.1641 +
  1.1642 +		// Add the function to the element's handler list
  1.1643 +		handlers[handler.guid] = handler;
  1.1644 +
  1.1645 +		// Keep track of which events have been used, for global triggering
  1.1646 +		this.global[type] = true;
  1.1647 +	},
  1.1648 +
  1.1649 +	guid: 1,
  1.1650 +	global: {},
  1.1651 +
  1.1652 +	// Detach an event or set of events from an element
  1.1653 +	remove: function(element, type, handler) {
  1.1654 +		var events = jQuery.data(element, "events"), ret, index;
  1.1655 +
  1.1656 +		// Namespaced event handlers
  1.1657 +		if ( typeof type == "string" ) {
  1.1658 +			var parts = type.split(".");
  1.1659 +			type = parts[0];
  1.1660 +		}
  1.1661 +
  1.1662 +		if ( events ) {
  1.1663 +			// type is actually an event object here
  1.1664 +			if ( type && type.type ) {
  1.1665 +				handler = type.handler;
  1.1666 +				type = type.type;
  1.1667 +			}
  1.1668 +			
  1.1669 +			if ( !type ) {
  1.1670 +				for ( type in events )
  1.1671 +					this.remove( element, type );
  1.1672 +
  1.1673 +			} else if ( events[type] ) {
  1.1674 +				// remove the given handler for the given type
  1.1675 +				if ( handler )
  1.1676 +					delete events[type][handler.guid];
  1.1677 +				
  1.1678 +				// remove all handlers for the given type
  1.1679 +				else
  1.1680 +					for ( handler in events[type] )
  1.1681 +						// Handle the removal of namespaced events
  1.1682 +						if ( !parts[1] || events[type][handler].type == parts[1] )
  1.1683 +							delete events[type][handler];
  1.1684 +
  1.1685 +				// remove generic event handler if no more handlers exist
  1.1686 +				for ( ret in events[type] ) break;
  1.1687 +				if ( !ret ) {
  1.1688 +					if (element.removeEventListener)
  1.1689 +						element.removeEventListener(type, jQuery.data(element, "handle"), false);
  1.1690 +					else
  1.1691 +						element.detachEvent("on" + type, jQuery.data(element, "handle"));
  1.1692 +					ret = null;
  1.1693 +					delete events[type];
  1.1694 +				}
  1.1695 +			}
  1.1696 +
  1.1697 +			// Remove the expando if it's no longer used
  1.1698 +			for ( ret in events ) break;
  1.1699 +			if ( !ret ) {
  1.1700 +				jQuery.removeData( element, "events" );
  1.1701 +				jQuery.removeData( element, "handle" );
  1.1702 +			}
  1.1703 +		}
  1.1704 +	},
  1.1705 +
  1.1706 +	trigger: function(type, data, element, donative, extra) {
  1.1707 +		// Clone the incoming data, if any
  1.1708 +		data = jQuery.makeArray(data || []);
  1.1709 +
  1.1710 +		// Handle a global trigger
  1.1711 +		if ( !element ) {
  1.1712 +			// Only trigger if we've ever bound an event for it
  1.1713 +			if ( this.global[type] )
  1.1714 +				jQuery("*").add([window, document]).trigger(type, data);
  1.1715 +
  1.1716 +		// Handle triggering a single element
  1.1717 +		} else {
  1.1718 +			var val, ret, fn = jQuery.isFunction( element[ type ] || null ),
  1.1719 +				// Check to see if we need to provide a fake event, or not
  1.1720 +				evt = !data[0] || !data[0].preventDefault;
  1.1721 +			
  1.1722 +			// Pass along a fake event
  1.1723 +			if ( evt )
  1.1724 +				data.unshift( this.fix({ type: type, target: element }) );
  1.1725 +
  1.1726 +			// Enforce the right trigger type
  1.1727 +			data[0].type = type;
  1.1728 +
  1.1729 +			// Trigger the event
  1.1730 +			if ( jQuery.isFunction( jQuery.data(element, "handle") ) )
  1.1731 +				val = jQuery.data(element, "handle").apply( element, data );
  1.1732 +
  1.1733 +			// Handle triggering native .onfoo handlers
  1.1734 +			if ( !fn && element["on"+type] && element["on"+type].apply( element, data ) === false )
  1.1735 +				val = false;
  1.1736 +
  1.1737 +			// Extra functions don't get the custom event object
  1.1738 +			if ( evt )
  1.1739 +				data.shift();
  1.1740 +
  1.1741 +			// Handle triggering of extra function
  1.1742 +			if ( extra && extra.apply( element, data ) === false )
  1.1743 +				val = false;
  1.1744 +
  1.1745 +			// Trigger the native events (except for clicks on links)
  1.1746 +			if ( fn && donative !== false && val !== false && !(jQuery.nodeName(element, 'a') && type == "click") ) {
  1.1747 +				this.triggered = true;
  1.1748 +				element[ type ]();
  1.1749 +			}
  1.1750 +
  1.1751 +			this.triggered = false;
  1.1752 +		}
  1.1753 +
  1.1754 +		return val;
  1.1755 +	},
  1.1756 +
  1.1757 +	handle: function(event) {
  1.1758 +		// returned undefined or false
  1.1759 +		var val;
  1.1760 +
  1.1761 +		// Empty object is for triggered events with no data
  1.1762 +		event = jQuery.event.fix( event || window.event || {} ); 
  1.1763 +
  1.1764 +		// Namespaced event handlers
  1.1765 +		var parts = event.type.split(".");
  1.1766 +		event.type = parts[0];
  1.1767 +
  1.1768 +		var c = jQuery.data(this, "events") && jQuery.data(this, "events")[event.type], args = Array.prototype.slice.call( arguments, 1 );
  1.1769 +		args.unshift( event );
  1.1770 +
  1.1771 +		for ( var j in c ) {
  1.1772 +			// Pass in a reference to the handler function itself
  1.1773 +			// So that we can later remove it
  1.1774 +			args[0].handler = c[j];
  1.1775 +			args[0].data = c[j].data;
  1.1776 +
  1.1777 +			// Filter the functions by class
  1.1778 +			if ( !parts[1] || c[j].type == parts[1] ) {
  1.1779 +				var tmp = c[j].apply( this, args );
  1.1780 +
  1.1781 +				if ( val !== false )
  1.1782 +					val = tmp;
  1.1783 +
  1.1784 +				if ( tmp === false ) {
  1.1785 +					event.preventDefault();
  1.1786 +					event.stopPropagation();
  1.1787 +				}
  1.1788 +			}
  1.1789 +		}
  1.1790 +
  1.1791 +		// Clean up added properties in IE to prevent memory leak
  1.1792 +		if (jQuery.browser.msie)
  1.1793 +			event.target = event.preventDefault = event.stopPropagation =
  1.1794 +				event.handler = event.data = null;
  1.1795 +
  1.1796 +		return val;
  1.1797 +	},
  1.1798 +
  1.1799 +	fix: function(event) {
  1.1800 +		// store a copy of the original event object 
  1.1801 +		// and clone to set read-only properties
  1.1802 +		var originalEvent = event;
  1.1803 +		event = jQuery.extend({}, originalEvent);
  1.1804 +		
  1.1805 +		// add preventDefault and stopPropagation since 
  1.1806 +		// they will not work on the clone
  1.1807 +		event.preventDefault = function() {
  1.1808 +			// if preventDefault exists run it on the original event
  1.1809 +			if (originalEvent.preventDefault)
  1.1810 +				originalEvent.preventDefault();
  1.1811 +			// otherwise set the returnValue property of the original event to false (IE)
  1.1812 +			originalEvent.returnValue = false;
  1.1813 +		};
  1.1814 +		event.stopPropagation = function() {
  1.1815 +			// if stopPropagation exists run it on the original event
  1.1816 +			if (originalEvent.stopPropagation)
  1.1817 +				originalEvent.stopPropagation();
  1.1818 +			// otherwise set the cancelBubble property of the original event to true (IE)
  1.1819 +			originalEvent.cancelBubble = true;
  1.1820 +		};
  1.1821 +		
  1.1822 +		// Fix target property, if necessary
  1.1823 +		if ( !event.target && event.srcElement )
  1.1824 +			event.target = event.srcElement;
  1.1825 +				
  1.1826 +		// check if target is a textnode (safari)
  1.1827 +		if (jQuery.browser.safari && event.target.nodeType == 3)
  1.1828 +			event.target = originalEvent.target.parentNode;
  1.1829 +
  1.1830 +		// Add relatedTarget, if necessary
  1.1831 +		if ( !event.relatedTarget && event.fromElement )
  1.1832 +			event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement;
  1.1833 +
  1.1834 +		// Calculate pageX/Y if missing and clientX/Y available
  1.1835 +		if ( event.pageX == null && event.clientX != null ) {
  1.1836 +			var e = document.documentElement, b = document.body;
  1.1837 +			event.pageX = event.clientX + (e && e.scrollLeft || b.scrollLeft || 0);
  1.1838 +			event.pageY = event.clientY + (e && e.scrollTop || b.scrollTop || 0);
  1.1839 +		}
  1.1840 +			
  1.1841 +		// Add which for key events
  1.1842 +		if ( !event.which && (event.charCode || event.keyCode) )
  1.1843 +			event.which = event.charCode || event.keyCode;
  1.1844 +		
  1.1845 +		// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
  1.1846 +		if ( !event.metaKey && event.ctrlKey )
  1.1847 +			event.metaKey = event.ctrlKey;
  1.1848 +
  1.1849 +		// Add which for click: 1 == left; 2 == middle; 3 == right
  1.1850 +		// Note: button is not normalized, so don't use it
  1.1851 +		if ( !event.which && event.button )
  1.1852 +			event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
  1.1853 +			
  1.1854 +		return event;
  1.1855 +	}
  1.1856 +};
  1.1857 +
  1.1858 +jQuery.fn.extend({
  1.1859 +	bind: function( type, data, fn ) {
  1.1860 +		return type == "unload" ? this.one(type, data, fn) : this.each(function(){
  1.1861 +			jQuery.event.add( this, type, fn || data, fn && data );
  1.1862 +		});
  1.1863 +	},
  1.1864 +	
  1.1865 +	one: function( type, data, fn ) {
  1.1866 +		return this.each(function(){
  1.1867 +			jQuery.event.add( this, type, function(event) {
  1.1868 +				jQuery(this).unbind(event);
  1.1869 +				return (fn || data).apply( this, arguments);
  1.1870 +			}, fn && data);
  1.1871 +		});
  1.1872 +	},
  1.1873 +
  1.1874 +	unbind: function( type, fn ) {
  1.1875 +		return this.each(function(){
  1.1876 +			jQuery.event.remove( this, type, fn );
  1.1877 +		});
  1.1878 +	},
  1.1879 +
  1.1880 +	trigger: function( type, data, fn ) {
  1.1881 +		return this.each(function(){
  1.1882 +			jQuery.event.trigger( type, data, this, true, fn );
  1.1883 +		});
  1.1884 +	},
  1.1885 +
  1.1886 +	triggerHandler: function( type, data, fn ) {
  1.1887 +		if ( this[0] )
  1.1888 +			return jQuery.event.trigger( type, data, this[0], false, fn );
  1.1889 +	},
  1.1890 +
  1.1891 +	toggle: function() {
  1.1892 +		// Save reference to arguments for access in closure
  1.1893 +		var a = arguments;
  1.1894 +
  1.1895 +		return this.click(function(e) {
  1.1896 +			// Figure out which function to execute
  1.1897 +			this.lastToggle = 0 == this.lastToggle ? 1 : 0;
  1.1898 +			
  1.1899 +			// Make sure that clicks stop
  1.1900 +			e.preventDefault();
  1.1901 +			
  1.1902 +			// and execute the function
  1.1903 +			return a[this.lastToggle].apply( this, [e] ) || false;
  1.1904 +		});
  1.1905 +	},
  1.1906 +
  1.1907 +	hover: function(f,g) {
  1.1908 +		
  1.1909 +		// A private function for handling mouse 'hovering'
  1.1910 +		function handleHover(e) {
  1.1911 +			// Check if mouse(over|out) are still within the same parent element
  1.1912 +			var p = e.relatedTarget;
  1.1913 +	
  1.1914 +			// Traverse up the tree
  1.1915 +			while ( p && p != this ) try { p = p.parentNode; } catch(e) { p = this; };
  1.1916 +			
  1.1917 +			// If we actually just moused on to a sub-element, ignore it
  1.1918 +			if ( p == this ) return false;
  1.1919 +			
  1.1920 +			// Execute the right function
  1.1921 +			return (e.type == "mouseover" ? f : g).apply(this, [e]);
  1.1922 +		}
  1.1923 +		
  1.1924 +		// Bind the function to the two event listeners
  1.1925 +		return this.mouseover(handleHover).mouseout(handleHover);
  1.1926 +	},
  1.1927 +	
  1.1928 +	ready: function(f) {
  1.1929 +		// Attach the listeners
  1.1930 +		bindReady();
  1.1931 +
  1.1932 +		// If the DOM is already ready
  1.1933 +		if ( jQuery.isReady )
  1.1934 +			// Execute the function immediately
  1.1935 +			f.apply( document, [jQuery] );
  1.1936 +			
  1.1937 +		// Otherwise, remember the function for later
  1.1938 +		else
  1.1939 +			// Add the function to the wait list
  1.1940 +			jQuery.readyList.push( function() { return f.apply(this, [jQuery]); } );
  1.1941 +	
  1.1942 +		return this;
  1.1943 +	}
  1.1944 +});
  1.1945 +
  1.1946 +jQuery.extend({
  1.1947 +	/*
  1.1948 +	 * All the code that makes DOM Ready work nicely.
  1.1949 +	 */
  1.1950 +	isReady: false,
  1.1951 +	readyList: [],
  1.1952 +	
  1.1953 +	// Handle when the DOM is ready
  1.1954 +	ready: function() {
  1.1955 +		// Make sure that the DOM is not already loaded
  1.1956 +		if ( !jQuery.isReady ) {
  1.1957 +			// Remember that the DOM is ready
  1.1958 +			jQuery.isReady = true;
  1.1959 +			
  1.1960 +			// If there are functions bound, to execute
  1.1961 +			if ( jQuery.readyList ) {
  1.1962 +				// Execute all of them
  1.1963 +				jQuery.each( jQuery.readyList, function(){
  1.1964 +					this.apply( document );
  1.1965 +				});
  1.1966 +				
  1.1967 +				// Reset the list of functions
  1.1968 +				jQuery.readyList = null;
  1.1969 +			}
  1.1970 +			// Remove event listener to avoid memory leak
  1.1971 +			if ( jQuery.browser.mozilla || jQuery.browser.opera )
  1.1972 +				document.removeEventListener( "DOMContentLoaded", jQuery.ready, false );
  1.1973 +			
  1.1974 +			// Remove script element used by IE hack
  1.1975 +			if( !window.frames.length ) // don't remove if frames are present (#1187)
  1.1976 +				jQuery(window).load(function(){ jQuery("#__ie_init").remove(); });
  1.1977 +		}
  1.1978 +	}
  1.1979 +});
  1.1980 +
  1.1981 +jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
  1.1982 +	"mousedown,mouseup,mousemove,mouseover,mouseout,change,select," + 
  1.1983 +	"submit,keydown,keypress,keyup,error").split(","), function(i,o){
  1.1984 +	
  1.1985 +	// Handle event binding
  1.1986 +	jQuery.fn[o] = function(f){
  1.1987 +		return f ? this.bind(o, f) : this.trigger(o);
  1.1988 +	};
  1.1989 +});
  1.1990 +
  1.1991 +var readyBound = false;
  1.1992 +
  1.1993 +function bindReady(){
  1.1994 +	if ( readyBound ) return;
  1.1995 +	readyBound = true;
  1.1996 +
  1.1997 +	// If Mozilla is used
  1.1998 +	if ( jQuery.browser.mozilla || jQuery.browser.opera )
  1.1999 +		// Use the handy event callback
  1.2000 +		document.addEventListener( "DOMContentLoaded", jQuery.ready, false );
  1.2001 +	
  1.2002 +	// If IE is used, use the excellent hack by Matthias Miller
  1.2003 +	// http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited
  1.2004 +	else if ( jQuery.browser.msie ) {
  1.2005 +	
  1.2006 +		// Only works if you document.write() it
  1.2007 +		document.write("<scr" + "ipt id=__ie_init defer=true " + 
  1.2008 +			"src=//:><\/script>");
  1.2009 +	
  1.2010 +		// Use the defer script hack
  1.2011 +		var script = document.getElementById("__ie_init");
  1.2012 +		
  1.2013 +		// script does not exist if jQuery is loaded dynamically
  1.2014 +		if ( script ) 
  1.2015 +			script.onreadystatechange = function() {
  1.2016 +				if ( this.readyState != "complete" ) return;
  1.2017 +				jQuery.ready();
  1.2018 +			};
  1.2019 +	
  1.2020 +		// Clear from memory
  1.2021 +		script = null;
  1.2022 +	
  1.2023 +	// If Safari  is used
  1.2024 +	} else if ( jQuery.browser.safari )
  1.2025 +		// Continually check to see if the document.readyState is valid
  1.2026 +		jQuery.safariTimer = setInterval(function(){
  1.2027 +			// loaded and complete are both valid states
  1.2028 +			if ( document.readyState == "loaded" || 
  1.2029 +				document.readyState == "complete" ) {
  1.2030 +	
  1.2031 +				// If either one are found, remove the timer
  1.2032 +				clearInterval( jQuery.safariTimer );
  1.2033 +				jQuery.safariTimer = null;
  1.2034 +	
  1.2035 +				// and execute any waiting functions
  1.2036 +				jQuery.ready();
  1.2037 +			}
  1.2038 +		}, 10); 
  1.2039 +
  1.2040 +	// A fallback to window.onload, that will always work
  1.2041 +	jQuery.event.add( window, "load", jQuery.ready );
  1.2042 +}
  1.2043 +jQuery.fn.extend({
  1.2044 +	load: function( url, params, callback ) {
  1.2045 +		if ( jQuery.isFunction( url ) )
  1.2046 +			return this.bind("load", url);
  1.2047 +
  1.2048 +		var off = url.indexOf(" ");
  1.2049 +		if ( off >= 0 ) {
  1.2050 +			var selector = url.slice(off, url.length);
  1.2051 +			url = url.slice(0, off);
  1.2052 +		}
  1.2053 +
  1.2054 +		callback = callback || function(){};
  1.2055 +
  1.2056 +		// Default to a GET request
  1.2057 +		var type = "GET";
  1.2058 +
  1.2059 +		// If the second parameter was provided
  1.2060 +		if ( params )
  1.2061 +			// If it's a function
  1.2062 +			if ( jQuery.isFunction( params ) ) {
  1.2063 +				// We assume that it's the callback
  1.2064 +				callback = params;
  1.2065 +				params = null;
  1.2066 +
  1.2067 +			// Otherwise, build a param string
  1.2068 +			} else {
  1.2069 +				params = jQuery.param( params );
  1.2070 +				type = "POST";
  1.2071 +			}
  1.2072 +
  1.2073 +		var self = this;
  1.2074 +
  1.2075 +		// Request the remote document
  1.2076 +		jQuery.ajax({
  1.2077 +			url: url,
  1.2078 +			type: type,
  1.2079 +			data: params,
  1.2080 +			complete: function(res, status){
  1.2081 +				// If successful, inject the HTML into all the matched elements
  1.2082 +				if ( status == "success" || status == "notmodified" )
  1.2083 +					// See if a selector was specified
  1.2084 +					self.html( selector ?
  1.2085 +						// Create a dummy div to hold the results
  1.2086 +						jQuery("<div/>")
  1.2087 +							// inject the contents of the document in, removing the scripts
  1.2088 +							// to avoid any 'Permission Denied' errors in IE
  1.2089 +							.append(res.responseText.replace(/<script(.|\s)*?\/script>/g, ""))
  1.2090 +
  1.2091 +							// Locate the specified elements
  1.2092 +							.find(selector) :
  1.2093 +
  1.2094 +						// If not, just inject the full result
  1.2095 +						res.responseText );
  1.2096 +
  1.2097 +				// Add delay to account for Safari's delay in globalEval
  1.2098 +				setTimeout(function(){
  1.2099 +					self.each( callback, [res.responseText, status, res] );
  1.2100 +				}, 13);
  1.2101 +			}
  1.2102 +		});
  1.2103 +		return this;
  1.2104 +	},
  1.2105 +
  1.2106 +	serialize: function() {
  1.2107 +		return jQuery.param(this.serializeArray());
  1.2108 +	},
  1.2109 +	serializeArray: function() {
  1.2110 +		return this.map(function(){
  1.2111 +			return jQuery.nodeName(this, "form") ?
  1.2112 +				jQuery.makeArray(this.elements) : this;
  1.2113 +		})
  1.2114 +		.filter(function(){
  1.2115 +			return this.name && !this.disabled && 
  1.2116 +				(this.checked || /select|textarea/i.test(this.nodeName) || 
  1.2117 +					/text|hidden|password/i.test(this.type));
  1.2118 +		})
  1.2119 +		.map(function(i, elem){
  1.2120 +			var val = jQuery(this).val();
  1.2121 +			return val == null ? null :
  1.2122 +				val.constructor == Array ?
  1.2123 +					jQuery.map( val, function(val, i){
  1.2124 +						return {name: elem.name, value: val};
  1.2125 +					}) :
  1.2126 +					{name: elem.name, value: val};
  1.2127 +		}).get();
  1.2128 +	}
  1.2129 +});
  1.2130 +
  1.2131 +// Attach a bunch of functions for handling common AJAX events
  1.2132 +jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
  1.2133 +	jQuery.fn[o] = function(f){
  1.2134 +		return this.bind(o, f);
  1.2135 +	};
  1.2136 +});
  1.2137 +
  1.2138 +var jsc = (new Date).getTime();
  1.2139 +
  1.2140 +jQuery.extend({
  1.2141 +	get: function( url, data, callback, type ) {
  1.2142 +		// shift arguments if data argument was ommited
  1.2143 +		if ( jQuery.isFunction( data ) ) {
  1.2144 +			callback = data;
  1.2145 +			data = null;
  1.2146 +		}
  1.2147 +		
  1.2148 +		return jQuery.ajax({
  1.2149 +			type: "GET",
  1.2150 +			url: url,
  1.2151 +			data: data,
  1.2152 +			success: callback,
  1.2153 +			dataType: type
  1.2154 +		});
  1.2155 +	},
  1.2156 +
  1.2157 +	getScript: function( url, callback ) {
  1.2158 +		return jQuery.get(url, null, callback, "script");
  1.2159 +	},
  1.2160 +
  1.2161 +	getJSON: function( url, data, callback ) {
  1.2162 +		return jQuery.get(url, data, callback, "json");
  1.2163 +	},
  1.2164 +
  1.2165 +	post: function( url, data, callback, type ) {
  1.2166 +		if ( jQuery.isFunction( data ) ) {
  1.2167 +			callback = data;
  1.2168 +			data = {};
  1.2169 +		}
  1.2170 +
  1.2171 +		return jQuery.ajax({
  1.2172 +			type: "POST",
  1.2173 +			url: url,
  1.2174 +			data: data,
  1.2175 +			success: callback,
  1.2176 +			dataType: type
  1.2177 +		});
  1.2178 +	},
  1.2179 +
  1.2180 +	ajaxSetup: function( settings ) {
  1.2181 +		jQuery.extend( jQuery.ajaxSettings, settings );
  1.2182 +	},
  1.2183 +
  1.2184 +	ajaxSettings: {
  1.2185 +		global: true,
  1.2186 +		type: "GET",
  1.2187 +		timeout: 0,
  1.2188 +		contentType: "application/x-www-form-urlencoded",
  1.2189 +		processData: true,
  1.2190 +		async: true,
  1.2191 +		data: null
  1.2192 +	},
  1.2193 +	
  1.2194 +	// Last-Modified header cache for next request
  1.2195 +	lastModified: {},
  1.2196 +
  1.2197 +	ajax: function( s ) {
  1.2198 +		var jsonp, jsre = /=(\?|%3F)/g, status, data;
  1.2199 +
  1.2200 +		// Extend the settings, but re-extend 's' so that it can be
  1.2201 +		// checked again later (in the test suite, specifically)
  1.2202 +		s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s));
  1.2203 +
  1.2204 +		// convert data if not already a string
  1.2205 +		if ( s.data && s.processData && typeof s.data != "string" )
  1.2206 +			s.data = jQuery.param(s.data);
  1.2207 +
  1.2208 +		// Handle JSONP Parameter Callbacks
  1.2209 +		if ( s.dataType == "jsonp" ) {
  1.2210 +			if ( s.type.toLowerCase() == "get" ) {
  1.2211 +				if ( !s.url.match(jsre) )
  1.2212 +					s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?";
  1.2213 +			} else if ( !s.data || !s.data.match(jsre) )
  1.2214 +				s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?";
  1.2215 +			s.dataType = "json";
  1.2216 +		}
  1.2217 +
  1.2218 +		// Build temporary JSONP function
  1.2219 +		if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) {
  1.2220 +			jsonp = "jsonp" + jsc++;
  1.2221 +
  1.2222 +			// Replace the =? sequence both in the query string and the data
  1.2223 +			if ( s.data )
  1.2224 +				s.data = s.data.replace(jsre, "=" + jsonp);
  1.2225 +			s.url = s.url.replace(jsre, "=" + jsonp);
  1.2226 +
  1.2227 +			// We need to make sure
  1.2228 +			// that a JSONP style response is executed properly
  1.2229 +			s.dataType = "script";
  1.2230 +
  1.2231 +			// Handle JSONP-style loading
  1.2232 +			window[ jsonp ] = function(tmp){
  1.2233 +				data = tmp;
  1.2234 +				success();
  1.2235 +				complete();
  1.2236 +				// Garbage collect
  1.2237 +				window[ jsonp ] = undefined;
  1.2238 +				try{ delete window[ jsonp ]; } catch(e){}
  1.2239 +			};
  1.2240 +		}
  1.2241 +
  1.2242 +		if ( s.dataType == "script" && s.cache == null )
  1.2243 +			s.cache = false;
  1.2244 +
  1.2245 +		if ( s.cache === false && s.type.toLowerCase() == "get" )
  1.2246 +			s.url += (s.url.match(/\?/) ? "&" : "?") + "_=" + (new Date()).getTime();
  1.2247 +
  1.2248 +		// If data is available, append data to url for get requests
  1.2249 +		if ( s.data && s.type.toLowerCase() == "get" ) {
  1.2250 +			s.url += (s.url.match(/\?/) ? "&" : "?") + s.data;
  1.2251 +
  1.2252 +			// IE likes to send both get and post data, prevent this
  1.2253 +			s.data = null;
  1.2254 +		}
  1.2255 +
  1.2256 +		// Watch for a new set of requests
  1.2257 +		if ( s.global && ! jQuery.active++ )
  1.2258 +			jQuery.event.trigger( "ajaxStart" );
  1.2259 +
  1.2260 +		// If we're requesting a remote document
  1.2261 +		// and trying to load JSON or Script
  1.2262 +		if ( !s.url.indexOf("http") && s.dataType == "script" ) {
  1.2263 +			var head = document.getElementsByTagName("head")[0];
  1.2264 +			var script = document.createElement("script");
  1.2265 +			script.src = s.url;
  1.2266 +
  1.2267 +			// Handle Script loading
  1.2268 +			if ( !jsonp && (s.success || s.complete) ) {
  1.2269 +				var done = false;
  1.2270 +
  1.2271 +				// Attach handlers for all browsers
  1.2272 +				script.onload = script.onreadystatechange = function(){
  1.2273 +					if ( !done && (!this.readyState || 
  1.2274 +							this.readyState == "loaded" || this.readyState == "complete") ) {
  1.2275 +						done = true;
  1.2276 +						success();
  1.2277 +						complete();
  1.2278 +						head.removeChild( script );
  1.2279 +					}
  1.2280 +				};
  1.2281 +			}
  1.2282 +
  1.2283 +			head.appendChild(script);
  1.2284 +
  1.2285 +			// We handle everything using the script element injection
  1.2286 +			return;
  1.2287 +		}
  1.2288 +
  1.2289 +		var requestDone = false;
  1.2290 +
  1.2291 +		// Create the request object; Microsoft failed to properly
  1.2292 +		// implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
  1.2293 +		var xml = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
  1.2294 +
  1.2295 +		// Open the socket
  1.2296 +		xml.open(s.type, s.url, s.async);
  1.2297 +
  1.2298 +		// Set the correct header, if data is being sent
  1.2299 +		if ( s.data )
  1.2300 +			xml.setRequestHeader("Content-Type", s.contentType);
  1.2301 +
  1.2302 +		// Set the If-Modified-Since header, if ifModified mode.
  1.2303 +		if ( s.ifModified )
  1.2304 +			xml.setRequestHeader("If-Modified-Since",
  1.2305 +				jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" );
  1.2306 +
  1.2307 +		// Set header so the called script knows that it's an XMLHttpRequest
  1.2308 +		xml.setRequestHeader("X-Requested-With", "XMLHttpRequest");
  1.2309 +
  1.2310 +		// Allow custom headers/mimetypes
  1.2311 +		if ( s.beforeSend )
  1.2312 +			s.beforeSend(xml);
  1.2313 +			
  1.2314 +		if ( s.global )
  1.2315 +		    jQuery.event.trigger("ajaxSend", [xml, s]);
  1.2316 +
  1.2317 +		// Wait for a response to come back
  1.2318 +		var onreadystatechange = function(isTimeout){
  1.2319 +			// The transfer is complete and the data is available, or the request timed out
  1.2320 +			if ( !requestDone && xml && (xml.readyState == 4 || isTimeout == "timeout") ) {
  1.2321 +				requestDone = true;
  1.2322 +				
  1.2323 +				// clear poll interval
  1.2324 +				if (ival) {
  1.2325 +					clearInterval(ival);
  1.2326 +					ival = null;
  1.2327 +				}
  1.2328 +				
  1.2329 +				status = isTimeout == "timeout" && "timeout" ||
  1.2330 +					!jQuery.httpSuccess( xml ) && "error" ||
  1.2331 +					s.ifModified && jQuery.httpNotModified( xml, s.url ) && "notmodified" ||
  1.2332 +					"success";
  1.2333 +
  1.2334 +				if ( status == "success" ) {
  1.2335 +					// Watch for, and catch, XML document parse errors
  1.2336 +					try {
  1.2337 +						// process the data (runs the xml through httpData regardless of callback)
  1.2338 +						data = jQuery.httpData( xml, s.dataType );
  1.2339 +					} catch(e) {
  1.2340 +						status = "parsererror";
  1.2341 +					}
  1.2342 +				}
  1.2343 +
  1.2344 +				// Make sure that the request was successful or notmodified
  1.2345 +				if ( status == "success" ) {
  1.2346 +					// Cache Last-Modified header, if ifModified mode.
  1.2347 +					var modRes;
  1.2348 +					try {
  1.2349 +						modRes = xml.getResponseHeader("Last-Modified");
  1.2350 +					} catch(e) {} // swallow exception thrown by FF if header is not available
  1.2351 +	
  1.2352 +					if ( s.ifModified && modRes )
  1.2353 +						jQuery.lastModified[s.url] = modRes;
  1.2354 +
  1.2355 +					// JSONP handles its own success callback
  1.2356 +					if ( !jsonp )
  1.2357 +						success();	
  1.2358 +				} else
  1.2359 +					jQuery.handleError(s, xml, status);
  1.2360 +
  1.2361 +				// Fire the complete handlers
  1.2362 +				complete();
  1.2363 +
  1.2364 +				// Stop memory leaks
  1.2365 +				if ( s.async )
  1.2366 +					xml = null;
  1.2367 +			}
  1.2368 +		};
  1.2369 +		
  1.2370 +		if ( s.async ) {
  1.2371 +			// don't attach the handler to the request, just poll it instead
  1.2372 +			var ival = setInterval(onreadystatechange, 13); 
  1.2373 +
  1.2374 +			// Timeout checker
  1.2375 +			if ( s.timeout > 0 )
  1.2376 +				setTimeout(function(){
  1.2377 +					// Check to see if the request is still happening
  1.2378 +					if ( xml ) {
  1.2379 +						// Cancel the request
  1.2380 +						xml.abort();
  1.2381 +	
  1.2382 +						if( !requestDone )
  1.2383 +							onreadystatechange( "timeout" );
  1.2384 +					}
  1.2385 +				}, s.timeout);
  1.2386 +		}
  1.2387 +			
  1.2388 +		// Send the data
  1.2389 +		try {
  1.2390 +			xml.send(s.data);
  1.2391 +		} catch(e) {
  1.2392 +			jQuery.handleError(s, xml, null, e);
  1.2393 +		}
  1.2394 +		
  1.2395 +		// firefox 1.5 doesn't fire statechange for sync requests
  1.2396 +		if ( !s.async )
  1.2397 +			onreadystatechange();
  1.2398 +		
  1.2399 +		// return XMLHttpRequest to allow aborting the request etc.
  1.2400 +		return xml;
  1.2401 +
  1.2402 +		function success(){
  1.2403 +			// If a local callback was specified, fire it and pass it the data
  1.2404 +			if ( s.success )
  1.2405 +				s.success( data, status );
  1.2406 +
  1.2407 +			// Fire the global callback
  1.2408 +			if ( s.global )
  1.2409 +				jQuery.event.trigger( "ajaxSuccess", [xml, s] );
  1.2410 +		}
  1.2411 +
  1.2412 +		function complete(){
  1.2413 +			// Process result
  1.2414 +			if ( s.complete )
  1.2415 +				s.complete(xml, status);
  1.2416 +
  1.2417 +			// The request was completed
  1.2418 +			if ( s.global )
  1.2419 +				jQuery.event.trigger( "ajaxComplete", [xml, s] );
  1.2420 +
  1.2421 +			// Handle the global AJAX counter
  1.2422 +			if ( s.global && ! --jQuery.active )
  1.2423 +				jQuery.event.trigger( "ajaxStop" );
  1.2424 +		}
  1.2425 +	},
  1.2426 +
  1.2427 +	handleError: function( s, xml, status, e ) {
  1.2428 +		// If a local callback was specified, fire it
  1.2429 +		if ( s.error ) s.error( xml, status, e );
  1.2430 +
  1.2431 +		// Fire the global callback
  1.2432 +		if ( s.global )
  1.2433 +			jQuery.event.trigger( "ajaxError", [xml, s, e] );
  1.2434 +	},
  1.2435 +
  1.2436 +	// Counter for holding the number of active queries
  1.2437 +	active: 0,
  1.2438 +
  1.2439 +	// Determines if an XMLHttpRequest was successful or not
  1.2440 +	httpSuccess: function( r ) {
  1.2441 +		try {
  1.2442 +			return !r.status && location.protocol == "file:" ||
  1.2443 +				( r.status >= 200 && r.status < 300 ) || r.status == 304 ||
  1.2444 +				jQuery.browser.safari && r.status == undefined;
  1.2445 +		} catch(e){}
  1.2446 +		return false;
  1.2447 +	},
  1.2448 +
  1.2449 +	// Determines if an XMLHttpRequest returns NotModified
  1.2450 +	httpNotModified: function( xml, url ) {
  1.2451 +		try {
  1.2452 +			var xmlRes = xml.getResponseHeader("Last-Modified");
  1.2453 +
  1.2454 +			// Firefox always returns 200. check Last-Modified date
  1.2455 +			return xml.status == 304 || xmlRes == jQuery.lastModified[url] ||
  1.2456 +				jQuery.browser.safari && xml.status == undefined;
  1.2457 +		} catch(e){}
  1.2458 +		return false;
  1.2459 +	},
  1.2460 +
  1.2461 +	httpData: function( r, type ) {
  1.2462 +		var ct = r.getResponseHeader("content-type");
  1.2463 +		var xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0;
  1.2464 +		var data = xml ? r.responseXML : r.responseText;
  1.2465 +
  1.2466 +		if ( xml && data.documentElement.tagName == "parsererror" )
  1.2467 +			throw "parsererror";
  1.2468 +
  1.2469 +		// If the type is "script", eval it in global context
  1.2470 +		if ( type == "script" )
  1.2471 +			jQuery.globalEval( data );
  1.2472 +
  1.2473 +		// Get the JavaScript object, if JSON is used.
  1.2474 +		if ( type == "json" )
  1.2475 +			data = eval("(" + data + ")");
  1.2476 +
  1.2477 +		return data;
  1.2478 +	},
  1.2479 +
  1.2480 +	// Serialize an array of form elements or a set of
  1.2481 +	// key/values into a query string
  1.2482 +	param: function( a ) {
  1.2483 +		var s = [];
  1.2484 +
  1.2485 +		// If an array was passed in, assume that it is an array
  1.2486 +		// of form elements
  1.2487 +		if ( a.constructor == Array || a.jquery )
  1.2488 +			// Serialize the form elements
  1.2489 +			jQuery.each( a, function(){
  1.2490 +				s.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( this.value ) );
  1.2491 +			});
  1.2492 +
  1.2493 +		// Otherwise, assume that it's an object of key/value pairs
  1.2494 +		else
  1.2495 +			// Serialize the key/values
  1.2496 +			for ( var j in a )
  1.2497 +				// If the value is an array then the key names need to be repeated
  1.2498 +				if ( a[j] && a[j].constructor == Array )
  1.2499 +					jQuery.each( a[j], function(){
  1.2500 +						s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) );
  1.2501 +					});
  1.2502 +				else
  1.2503 +					s.push( encodeURIComponent(j) + "=" + encodeURIComponent( a[j] ) );
  1.2504 +
  1.2505 +		// Return the resulting serialization
  1.2506 +		return s.join("&").replace(/%20/g, "+");
  1.2507 +	}
  1.2508 +
  1.2509 +});
  1.2510 +jQuery.fn.extend({
  1.2511 +	show: function(speed,callback){
  1.2512 +		return speed ?
  1.2513 +			this.animate({
  1.2514 +				height: "show", width: "show", opacity: "show"
  1.2515 +			}, speed, callback) :
  1.2516 +			
  1.2517 +			this.filter(":hidden").each(function(){
  1.2518 +				this.style.display = this.oldblock ? this.oldblock : "";
  1.2519 +				if ( jQuery.css(this,"display") == "none" )
  1.2520 +					this.style.display = "block";
  1.2521 +			}).end();
  1.2522 +	},
  1.2523 +	
  1.2524 +	hide: function(speed,callback){
  1.2525 +		return speed ?
  1.2526 +			this.animate({
  1.2527 +				height: "hide", width: "hide", opacity: "hide"
  1.2528 +			}, speed, callback) :
  1.2529 +			
  1.2530 +			this.filter(":visible").each(function(){
  1.2531 +				this.oldblock = this.oldblock || jQuery.css(this,"display");
  1.2532 +				if ( this.oldblock == "none" )
  1.2533 +					this.oldblock = "block";
  1.2534 +				this.style.display = "none";
  1.2535 +			}).end();
  1.2536 +	},
  1.2537 +
  1.2538 +	// Save the old toggle function
  1.2539 +	_toggle: jQuery.fn.toggle,
  1.2540 +	
  1.2541 +	toggle: function( fn, fn2 ){
  1.2542 +		return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
  1.2543 +			this._toggle( fn, fn2 ) :
  1.2544 +			fn ?
  1.2545 +				this.animate({
  1.2546 +					height: "toggle", width: "toggle", opacity: "toggle"
  1.2547 +				}, fn, fn2) :
  1.2548 +				this.each(function(){
  1.2549 +					jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
  1.2550 +				});
  1.2551 +	},
  1.2552 +	
  1.2553 +	slideDown: function(speed,callback){
  1.2554 +		return this.animate({height: "show"}, speed, callback);
  1.2555 +	},
  1.2556 +	
  1.2557 +	slideUp: function(speed,callback){
  1.2558 +		return this.animate({height: "hide"}, speed, callback);
  1.2559 +	},
  1.2560 +
  1.2561 +	slideToggle: function(speed, callback){
  1.2562 +		return this.animate({height: "toggle"}, speed, callback);
  1.2563 +	},
  1.2564 +	
  1.2565 +	fadeIn: function(speed, callback){
  1.2566 +		return this.animate({opacity: "show"}, speed, callback);
  1.2567 +	},
  1.2568 +	
  1.2569 +	fadeOut: function(speed, callback){
  1.2570 +		return this.animate({opacity: "hide"}, speed, callback);
  1.2571 +	},
  1.2572 +	
  1.2573 +	fadeTo: function(speed,to,callback){
  1.2574 +		return this.animate({opacity: to}, speed, callback);
  1.2575 +	},
  1.2576 +	
  1.2577 +	animate: function( prop, speed, easing, callback ) {
  1.2578 +		var opt = jQuery.speed(speed, easing, callback);
  1.2579 +
  1.2580 +		return this[ opt.queue === false ? "each" : "queue" ](function(){
  1.2581 +			opt = jQuery.extend({}, opt);
  1.2582 +			var hidden = jQuery(this).is(":hidden"), self = this;
  1.2583 +			
  1.2584 +			for ( var p in prop ) {
  1.2585 +				if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
  1.2586 +					return jQuery.isFunction(opt.complete) && opt.complete.apply(this);
  1.2587 +
  1.2588 +				if ( p == "height" || p == "width" ) {
  1.2589 +					// Store display property
  1.2590 +					opt.display = jQuery.css(this, "display");
  1.2591 +
  1.2592 +					// Make sure that nothing sneaks out
  1.2593 +					opt.overflow = this.style.overflow;
  1.2594 +				}
  1.2595 +			}
  1.2596 +
  1.2597 +			if ( opt.overflow != null )
  1.2598 +				this.style.overflow = "hidden";
  1.2599 +
  1.2600 +			opt.curAnim = jQuery.extend({}, prop);
  1.2601 +			
  1.2602 +			jQuery.each( prop, function(name, val){
  1.2603 +				var e = new jQuery.fx( self, opt, name );
  1.2604 +
  1.2605 +				if ( /toggle|show|hide/.test(val) )
  1.2606 +					e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop );
  1.2607 +				else {
  1.2608 +					var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),
  1.2609 +						start = e.cur(true) || 0;
  1.2610 +
  1.2611 +					if ( parts ) {
  1.2612 +						var end = parseFloat(parts[2]),
  1.2613 +							unit = parts[3] || "px";
  1.2614 +
  1.2615 +						// We need to compute starting value
  1.2616 +						if ( unit != "px" ) {
  1.2617 +							self.style[ name ] = (end || 1) + unit;
  1.2618 +							start = ((end || 1) / e.cur(true)) * start;
  1.2619 +							self.style[ name ] = start + unit;
  1.2620 +						}
  1.2621 +
  1.2622 +						// If a +=/-= token was provided, we're doing a relative animation
  1.2623 +						if ( parts[1] )
  1.2624 +							end = ((parts[1] == "-=" ? -1 : 1) * end) + start;
  1.2625 +
  1.2626 +						e.custom( start, end, unit );
  1.2627 +					} else
  1.2628 +						e.custom( start, val, "" );
  1.2629 +				}
  1.2630 +			});
  1.2631 +
  1.2632 +			// For JS strict compliance
  1.2633 +			return true;
  1.2634 +		});
  1.2635 +	},
  1.2636 +	
  1.2637 +	queue: function(type, fn){
  1.2638 +		if ( jQuery.isFunction(type) ) {
  1.2639 +			fn = type;
  1.2640 +			type = "fx";
  1.2641 +		}
  1.2642 +
  1.2643 +		if ( !type || (typeof type == "string" && !fn) )
  1.2644 +			return queue( this[0], type );
  1.2645 +
  1.2646 +		return this.each(function(){
  1.2647 +			if ( fn.constructor == Array )
  1.2648 +				queue(this, type, fn);
  1.2649 +			else {
  1.2650 +				queue(this, type).push( fn );
  1.2651 +			
  1.2652 +				if ( queue(this, type).length == 1 )
  1.2653 +					fn.apply(this);
  1.2654 +			}
  1.2655 +		});
  1.2656 +	},
  1.2657 +
  1.2658 +	stop: function(){
  1.2659 +		var timers = jQuery.timers;
  1.2660 +
  1.2661 +		return this.each(function(){
  1.2662 +			for ( var i = 0; i < timers.length; i++ )
  1.2663 +				if ( timers[i].elem == this )
  1.2664 +					timers.splice(i--, 1);
  1.2665 +		}).dequeue();
  1.2666 +	}
  1.2667 +
  1.2668 +});
  1.2669 +
  1.2670 +var queue = function( elem, type, array ) {
  1.2671 +	if ( !elem )
  1.2672 +		return;
  1.2673 +
  1.2674 +	var q = jQuery.data( elem, type + "queue" );
  1.2675 +
  1.2676 +	if ( !q || array )
  1.2677 +		q = jQuery.data( elem, type + "queue", 
  1.2678 +			array ? jQuery.makeArray(array) : [] );
  1.2679 +
  1.2680 +	return q;
  1.2681 +};
  1.2682 +
  1.2683 +jQuery.fn.dequeue = function(type){
  1.2684 +	type = type || "fx";
  1.2685 +
  1.2686 +	return this.each(function(){
  1.2687 +		var q = queue(this, type);
  1.2688 +
  1.2689 +		q.shift();
  1.2690 +
  1.2691 +		if ( q.length )
  1.2692 +			q[0].apply( this );
  1.2693 +	});
  1.2694 +};
  1.2695 +
  1.2696 +jQuery.extend({
  1.2697 +	
  1.2698 +	speed: function(speed, easing, fn) {
  1.2699 +		var opt = speed && speed.constructor == Object ? speed : {
  1.2700 +			complete: fn || !fn && easing || 
  1.2701 +				jQuery.isFunction( speed ) && speed,
  1.2702 +			duration: speed,
  1.2703 +			easing: fn && easing || easing && easing.constructor != Function && easing
  1.2704 +		};
  1.2705 +
  1.2706 +		opt.duration = (opt.duration && opt.duration.constructor == Number ? 
  1.2707 +			opt.duration : 
  1.2708 +			{ slow: 600, fast: 200 }[opt.duration]) || 400;
  1.2709 +	
  1.2710 +		// Queueing
  1.2711 +		opt.old = opt.complete;
  1.2712 +		opt.complete = function(){
  1.2713 +			jQuery(this).dequeue();
  1.2714 +			if ( jQuery.isFunction( opt.old ) )
  1.2715 +				opt.old.apply( this );
  1.2716 +		};
  1.2717 +	
  1.2718 +		return opt;
  1.2719 +	},
  1.2720 +	
  1.2721 +	easing: {
  1.2722 +		linear: function( p, n, firstNum, diff ) {
  1.2723 +			return firstNum + diff * p;
  1.2724 +		},
  1.2725 +		swing: function( p, n, firstNum, diff ) {
  1.2726 +			return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
  1.2727 +		}
  1.2728 +	},
  1.2729 +	
  1.2730 +	timers: [],
  1.2731 +
  1.2732 +	fx: function( elem, options, prop ){
  1.2733 +		this.options = options;
  1.2734 +		this.elem = elem;
  1.2735 +		this.prop = prop;
  1.2736 +
  1.2737 +		if ( !options.orig )
  1.2738 +			options.orig = {};
  1.2739 +	}
  1.2740 +
  1.2741 +});
  1.2742 +
  1.2743 +jQuery.fx.prototype = {
  1.2744 +
  1.2745 +	// Simple function for setting a style value
  1.2746 +	update: function(){
  1.2747 +		if ( this.options.step )
  1.2748 +			this.options.step.apply( this.elem, [ this.now, this ] );
  1.2749 +
  1.2750 +		(jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
  1.2751 +
  1.2752 +		// Set display property to block for height/width animations
  1.2753 +		if ( this.prop == "height" || this.prop == "width" )
  1.2754 +			this.elem.style.display = "block";
  1.2755 +	},
  1.2756 +
  1.2757 +	// Get the current size
  1.2758 +	cur: function(force){
  1.2759 +		if ( this.elem[this.prop] != null && this.elem.style[this.prop] == null )
  1.2760 +			return this.elem[ this.prop ];
  1.2761 +
  1.2762 +		var r = parseFloat(jQuery.curCSS(this.elem, this.prop, force));
  1.2763 +		return r && r > -10000 ? r : parseFloat(jQuery.css(this.elem, this.prop)) || 0;
  1.2764 +	},
  1.2765 +
  1.2766 +	// Start an animation from one number to another
  1.2767 +	custom: function(from, to, unit){
  1.2768 +		this.startTime = (new Date()).getTime();
  1.2769 +		this.start = from;
  1.2770 +		this.end = to;
  1.2771 +		this.unit = unit || this.unit || "px";
  1.2772 +		this.now = this.start;
  1.2773 +		this.pos = this.state = 0;
  1.2774 +		this.update();
  1.2775 +
  1.2776 +		var self = this;
  1.2777 +		function t(){
  1.2778 +			return self.step();
  1.2779 +		}
  1.2780 +
  1.2781 +		t.elem = this.elem;
  1.2782 +
  1.2783 +		jQuery.timers.push(t);
  1.2784 +
  1.2785 +		if ( jQuery.timers.length == 1 ) {
  1.2786 +			var timer = setInterval(function(){
  1.2787 +				var timers = jQuery.timers;
  1.2788 +				
  1.2789 +				for ( var i = 0; i < timers.length; i++ )
  1.2790 +					if ( !timers[i]() )
  1.2791 +						timers.splice(i--, 1);
  1.2792 +
  1.2793 +				if ( !timers.length )
  1.2794 +					clearInterval( timer );
  1.2795 +			}, 13);
  1.2796 +		}
  1.2797 +	},
  1.2798 +
  1.2799 +	// Simple 'show' function
  1.2800 +	show: function(){
  1.2801 +		// Remember where we started, so that we can go back to it later
  1.2802 +		this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
  1.2803 +		this.options.show = true;
  1.2804 +
  1.2805 +		// Begin the animation
  1.2806 +		this.custom(0, this.cur());
  1.2807 +
  1.2808 +		// Make sure that we start at a small width/height to avoid any
  1.2809 +		// flash of content
  1.2810 +		if ( this.prop == "width" || this.prop == "height" )
  1.2811 +			this.elem.style[this.prop] = "1px";
  1.2812 +		
  1.2813 +		// Start by showing the element
  1.2814 +		jQuery(this.elem).show();
  1.2815 +	},
  1.2816 +
  1.2817 +	// Simple 'hide' function
  1.2818 +	hide: function(){
  1.2819 +		// Remember where we started, so that we can go back to it later
  1.2820 +		this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
  1.2821 +		this.options.hide = true;
  1.2822 +
  1.2823 +		// Begin the animation
  1.2824 +		this.custom(this.cur(), 0);
  1.2825 +	},
  1.2826 +
  1.2827 +	// Each step of an animation
  1.2828 +	step: function(){
  1.2829 +		var t = (new Date()).getTime();
  1.2830 +
  1.2831 +		if ( t > this.options.duration + this.startTime ) {
  1.2832 +			this.now = this.end;
  1.2833 +			this.pos = this.state = 1;
  1.2834 +			this.update();
  1.2835 +
  1.2836 +			this.options.curAnim[ this.prop ] = true;
  1.2837 +
  1.2838 +			var done = true;
  1.2839 +			for ( var i in this.options.curAnim )
  1.2840 +				if ( this.options.curAnim[i] !== true )
  1.2841 +					done = false;
  1.2842 +
  1.2843 +			if ( done ) {
  1.2844 +				if ( this.options.display != null ) {
  1.2845 +					// Reset the overflow
  1.2846 +					this.elem.style.overflow = this.options.overflow;
  1.2847 +				
  1.2848 +					// Reset the display
  1.2849 +					this.elem.style.display = this.options.display;
  1.2850 +					if ( jQuery.css(this.elem, "display") == "none" )
  1.2851 +						this.elem.style.display = "block";
  1.2852 +				}
  1.2853 +
  1.2854 +				// Hide the element if the "hide" operation was done
  1.2855 +				if ( this.options.hide )
  1.2856 +					this.elem.style.display = "none";
  1.2857 +
  1.2858 +				// Reset the properties, if the item has been hidden or shown
  1.2859 +				if ( this.options.hide || this.options.show )
  1.2860 +					for ( var p in this.options.curAnim )
  1.2861 +						jQuery.attr(this.elem.style, p, this.options.orig[p]);
  1.2862 +			}
  1.2863 +
  1.2864 +			// If a callback was provided, execute it
  1.2865 +			if ( done && jQuery.isFunction( this.options.complete ) )
  1.2866 +				// Execute the complete function
  1.2867 +				this.options.complete.apply( this.elem );
  1.2868 +
  1.2869 +			return false;
  1.2870 +		} else {
  1.2871 +			var n = t - this.startTime;
  1.2872 +			this.state = n / this.options.duration;
  1.2873 +
  1.2874 +			// Perform the easing function, defaults to swing
  1.2875 +			this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration);
  1.2876 +			this.now = this.start + ((this.end - this.start) * this.pos);
  1.2877 +
  1.2878 +			// Perform the next step of the animation
  1.2879 +			this.update();
  1.2880 +		}
  1.2881 +
  1.2882 +		return true;
  1.2883 +	}
  1.2884 +
  1.2885 +};
  1.2886 +
  1.2887 +jQuery.fx.step = {
  1.2888 +	scrollLeft: function(fx){
  1.2889 +		fx.elem.scrollLeft = fx.now;
  1.2890 +	},
  1.2891 +
  1.2892 +	scrollTop: function(fx){
  1.2893 +		fx.elem.scrollTop = fx.now;
  1.2894 +	},
  1.2895 +
  1.2896 +	opacity: function(fx){
  1.2897 +		jQuery.attr(fx.elem.style, "opacity", fx.now);
  1.2898 +	},
  1.2899 +
  1.2900 +	_default: function(fx){
  1.2901 +		fx.elem.style[ fx.prop ] = fx.now + fx.unit;
  1.2902 +	}
  1.2903 +};
  1.2904 +// The Offset Method
  1.2905 +// Originally By Brandon Aaron, part of the Dimension Plugin
  1.2906 +// http://jquery.com/plugins/project/dimensions
  1.2907 +jQuery.fn.offset = function() {
  1.2908 +	var left = 0, top = 0, elem = this[0], results;
  1.2909 +	
  1.2910 +	if ( elem ) with ( jQuery.browser ) {
  1.2911 +		var	absolute     = jQuery.css(elem, "position") == "absolute", 
  1.2912 +		    parent       = elem.parentNode, 
  1.2913 +		    offsetParent = elem.offsetParent, 
  1.2914 +		    doc          = elem.ownerDocument,
  1.2915 +		    safari2      = safari && parseInt(version) < 522;
  1.2916 +	
  1.2917 +		// Use getBoundingClientRect if available
  1.2918 +		if ( elem.getBoundingClientRect ) {
  1.2919 +			box = elem.getBoundingClientRect();
  1.2920 +		
  1.2921 +			// Add the document scroll offsets
  1.2922 +			add(
  1.2923 +				box.left + Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft),
  1.2924 +				box.top  + Math.max(doc.documentElement.scrollTop,  doc.body.scrollTop)
  1.2925 +			);
  1.2926 +		
  1.2927 +			// IE adds the HTML element's border, by default it is medium which is 2px
  1.2928 +			// IE 6 and IE 7 quirks mode the border width is overwritable by the following css html { border: 0; }
  1.2929 +			// IE 7 standards mode, the border is always 2px
  1.2930 +			if ( msie ) {
  1.2931 +				var border = jQuery("html").css("borderWidth");
  1.2932 +				border = (border == "medium" || jQuery.boxModel && parseInt(version) >= 7) && 2 || border;
  1.2933 +				add( -border, -border );
  1.2934 +			}
  1.2935 +	
  1.2936 +		// Otherwise loop through the offsetParents and parentNodes
  1.2937 +		} else {
  1.2938 +		
  1.2939 +			// Initial element offsets
  1.2940 +			add( elem.offsetLeft, elem.offsetTop );
  1.2941 +		
  1.2942 +			// Get parent offsets
  1.2943 +			while ( offsetParent ) {
  1.2944 +				// Add offsetParent offsets
  1.2945 +				add( offsetParent.offsetLeft, offsetParent.offsetTop );
  1.2946 +			
  1.2947 +				// Mozilla and Safari > 2 does not include the border on offset parents
  1.2948 +				// However Mozilla adds the border for table cells
  1.2949 +				if ( mozilla && /^t[d|h]$/i.test(parent.tagName) || !safari2 )
  1.2950 +					border( offsetParent );
  1.2951 +				
  1.2952 +				// Safari <= 2 doubles body offsets with an absolutely positioned element or parent
  1.2953 +				if ( safari2 && !absolute && jQuery.css(offsetParent, "position") == "absolute" )
  1.2954 +					absolute = true;
  1.2955 +			
  1.2956 +				// Get next offsetParent
  1.2957 +				offsetParent = offsetParent.offsetParent;
  1.2958 +			}
  1.2959 +		
  1.2960 +			// Get parent scroll offsets
  1.2961 +			while ( parent.tagName && !/^body|html$/i.test(parent.tagName) ) {
  1.2962 +				// Work around opera inline/table scrollLeft/Top bug
  1.2963 +				if ( !/^inline|table-row.*$/i.test(jQuery.css(parent, "display")) )
  1.2964 +					// Subtract parent scroll offsets
  1.2965 +					add( -parent.scrollLeft, -parent.scrollTop );
  1.2966 +			
  1.2967 +				// Mozilla does not add the border for a parent that has overflow != visible
  1.2968 +				if ( mozilla && jQuery.css(parent, "overflow") != "visible" )
  1.2969 +					border( parent );
  1.2970 +			
  1.2971 +				// Get next parent
  1.2972 +				parent = parent.parentNode;
  1.2973 +			}
  1.2974 +		
  1.2975 +			// Safari doubles body offsets with an absolutely positioned element or parent
  1.2976 +			if ( safari2 && absolute )
  1.2977 +				add( -doc.body.offsetLeft, -doc.body.offsetTop );
  1.2978 +		}
  1.2979 +
  1.2980 +		// Return an object with top and left properties
  1.2981 +		results = { top: top, left: left };
  1.2982 +	}
  1.2983 +
  1.2984 +	return results;
  1.2985 +
  1.2986 +	function border(elem) {
  1.2987 +		add( jQuery.css(elem, "borderLeftWidth"), jQuery.css(elem, "borderTopWidth") );
  1.2988 +	}
  1.2989 +
  1.2990 +	function add(l, t) {
  1.2991 +		left += parseInt(l) || 0;
  1.2992 +		top += parseInt(t) || 0;
  1.2993 +	}
  1.2994 +};
  1.2995 +})();