app/jquery/jquery-1.3.2.js
author Madhusudan.C.S <madhusudancs@gmail.com>
Sat, 22 Aug 2009 03:56:25 +0530
changeset 2784 801eee4eda9a
parent 2738 5723f329d098
permissions -rw-r--r--
Added timeline view for GHOP. Moved the method _createTimelineForType from Views to Logic for both core Program and GHOPProgram. Added default values parameter to apps_tasks_limit and slots in Program model. Registered timeline view for the sitemap in GHOP callback.py. Added timeline view module and class which overrides the edit method. Overriding the params['edit_form'] to accommodate dynainclude and dynaexclude fields.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2738
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
     1
/*!
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
     2
 * jQuery JavaScript Library v1.3.2
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
     3
 * http://jquery.com/
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
     4
 *
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
     5
 * Copyright (c) 2009 John Resig
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
     6
 * Dual licensed under the MIT and GPL licenses.
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
     7
 * http://docs.jquery.com/License
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
     8
 *
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
     9
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    10
 * Revision: 6246
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    11
 */
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    12
(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    13
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    14
var 
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    15
	// Will speed up references to window, and allows munging its name.
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    16
	window = this,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    17
	// Will speed up references to undefined, and allows munging its name.
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    18
	undefined,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    19
	// Map over jQuery in case of overwrite
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    20
	_jQuery = window.jQuery,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    21
	// Map over the $ in case of overwrite
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    22
	_$ = window.$,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    23
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    24
	jQuery = window.jQuery = window.$ = function( selector, context ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    25
		// The jQuery object is actually just the init constructor 'enhanced'
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    26
		return new jQuery.fn.init( selector, context );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    27
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    28
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    29
	// A simple way to check for HTML strings or ID strings
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    30
	// (both of which we optimize for)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    31
	quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    32
	// Is it a simple selector
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    33
	isSimple = /^.[^:#\[\.,]*$/;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    34
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    35
jQuery.fn = jQuery.prototype = {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    36
	init: function( selector, context ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    37
		// Make sure that a selection was provided
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    38
		selector = selector || document;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    39
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    40
		// Handle $(DOMElement)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    41
		if ( selector.nodeType ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    42
			this[0] = selector;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    43
			this.length = 1;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    44
			this.context = selector;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    45
			return this;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    46
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    47
		// Handle HTML strings
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    48
		if ( typeof selector === "string" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    49
			// Are we dealing with HTML string or an ID?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    50
			var match = quickExpr.exec( selector );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    51
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    52
			// Verify a match, and that no context was specified for #id
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    53
			if ( match && (match[1] || !context) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    54
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    55
				// HANDLE: $(html) -> $(array)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    56
				if ( match[1] )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    57
					selector = jQuery.clean( [ match[1] ], context );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    58
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    59
				// HANDLE: $("#id")
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    60
				else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    61
					var elem = document.getElementById( match[3] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    62
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    63
					// Handle the case where IE and Opera return items
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    64
					// by name instead of ID
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    65
					if ( elem && elem.id != match[3] )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    66
						return jQuery().find( selector );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    67
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    68
					// Otherwise, we inject the element directly into the jQuery object
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    69
					var ret = jQuery( elem || [] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    70
					ret.context = document;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    71
					ret.selector = selector;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    72
					return ret;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    73
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    74
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    75
			// HANDLE: $(expr, [context])
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    76
			// (which is just equivalent to: $(content).find(expr)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    77
			} else
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    78
				return jQuery( context ).find( selector );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    79
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    80
		// HANDLE: $(function)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    81
		// Shortcut for document ready
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    82
		} else if ( jQuery.isFunction( selector ) )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    83
			return jQuery( document ).ready( selector );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    84
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    85
		// Make sure that old selector state is passed along
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    86
		if ( selector.selector && selector.context ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    87
			this.selector = selector.selector;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    88
			this.context = selector.context;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    89
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    90
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    91
		return this.setArray(jQuery.isArray( selector ) ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    92
			selector :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    93
			jQuery.makeArray(selector));
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    94
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    95
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    96
	// Start with an empty selector
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    97
	selector: "",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    98
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
    99
	// The current version of jQuery being used
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   100
	jquery: "1.3.2",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   101
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   102
	// The number of elements contained in the matched element set
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   103
	size: function() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   104
		return this.length;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   105
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   106
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   107
	// Get the Nth element in the matched element set OR
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   108
	// Get the whole matched element set as a clean array
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   109
	get: function( num ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   110
		return num === undefined ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   111
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   112
			// Return a 'clean' array
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   113
			Array.prototype.slice.call( this ) :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   114
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   115
			// Return just the object
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   116
			this[ num ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   117
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   118
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   119
	// Take an array of elements and push it onto the stack
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   120
	// (returning the new matched element set)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   121
	pushStack: function( elems, name, selector ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   122
		// Build a new jQuery matched element set
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   123
		var ret = jQuery( elems );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   124
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   125
		// Add the old object onto the stack (as a reference)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   126
		ret.prevObject = this;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   127
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   128
		ret.context = this.context;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   129
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   130
		if ( name === "find" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   131
			ret.selector = this.selector + (this.selector ? " " : "") + selector;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   132
		else if ( name )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   133
			ret.selector = this.selector + "." + name + "(" + selector + ")";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   134
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   135
		// Return the newly-formed element set
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   136
		return ret;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   137
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   138
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   139
	// Force the current matched set of elements to become
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   140
	// the specified array of elements (destroying the stack in the process)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   141
	// You should use pushStack() in order to do this, but maintain the stack
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   142
	setArray: function( elems ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   143
		// Resetting the length to 0, then using the native Array push
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   144
		// is a super-fast way to populate an object with array-like properties
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   145
		this.length = 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   146
		Array.prototype.push.apply( this, elems );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   147
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   148
		return this;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   149
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   150
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   151
	// Execute a callback for every element in the matched set.
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   152
	// (You can seed the arguments with an array of args, but this is
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   153
	// only used internally.)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   154
	each: function( callback, args ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   155
		return jQuery.each( this, callback, args );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   156
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   157
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   158
	// Determine the position of an element within
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   159
	// the matched set of elements
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   160
	index: function( elem ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   161
		// Locate the position of the desired element
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   162
		return jQuery.inArray(
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   163
			// If it receives a jQuery object, the first element is used
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   164
			elem && elem.jquery ? elem[0] : elem
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   165
		, this );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   166
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   167
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   168
	attr: function( name, value, type ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   169
		var options = name;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   170
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   171
		// Look for the case where we're accessing a style value
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   172
		if ( typeof name === "string" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   173
			if ( value === undefined )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   174
				return this[0] && jQuery[ type || "attr" ]( this[0], name );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   175
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   176
			else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   177
				options = {};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   178
				options[ name ] = value;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   179
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   180
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   181
		// Check to see if we're setting style values
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   182
		return this.each(function(i){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   183
			// Set all the styles
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   184
			for ( name in options )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   185
				jQuery.attr(
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   186
					type ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   187
						this.style :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   188
						this,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   189
					name, jQuery.prop( this, options[ name ], type, i, name )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   190
				);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   191
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   192
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   193
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   194
	css: function( key, value ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   195
		// ignore negative width and height values
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   196
		if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   197
			value = undefined;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   198
		return this.attr( key, value, "curCSS" );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   199
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   200
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   201
	text: function( text ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   202
		if ( typeof text !== "object" && text != null )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   203
			return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   204
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   205
		var ret = "";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   206
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   207
		jQuery.each( text || this, function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   208
			jQuery.each( this.childNodes, function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   209
				if ( this.nodeType != 8 )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   210
					ret += this.nodeType != 1 ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   211
						this.nodeValue :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   212
						jQuery.fn.text( [ this ] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   213
			});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   214
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   215
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   216
		return ret;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   217
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   218
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   219
	wrapAll: function( html ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   220
		if ( this[0] ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   221
			// The elements to wrap the target around
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   222
			var wrap = jQuery( html, this[0].ownerDocument ).clone();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   223
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   224
			if ( this[0].parentNode )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   225
				wrap.insertBefore( this[0] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   226
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   227
			wrap.map(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   228
				var elem = this;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   229
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   230
				while ( elem.firstChild )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   231
					elem = elem.firstChild;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   232
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   233
				return elem;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   234
			}).append(this);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   235
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   236
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   237
		return this;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   238
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   239
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   240
	wrapInner: function( html ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   241
		return this.each(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   242
			jQuery( this ).contents().wrapAll( html );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   243
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   244
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   245
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   246
	wrap: function( html ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   247
		return this.each(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   248
			jQuery( this ).wrapAll( html );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   249
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   250
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   251
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   252
	append: function() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   253
		return this.domManip(arguments, true, function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   254
			if (this.nodeType == 1)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   255
				this.appendChild( elem );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   256
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   257
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   258
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   259
	prepend: function() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   260
		return this.domManip(arguments, true, function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   261
			if (this.nodeType == 1)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   262
				this.insertBefore( elem, this.firstChild );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   263
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   264
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   265
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   266
	before: function() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   267
		return this.domManip(arguments, false, function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   268
			this.parentNode.insertBefore( elem, this );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   269
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   270
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   271
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   272
	after: function() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   273
		return this.domManip(arguments, false, function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   274
			this.parentNode.insertBefore( elem, this.nextSibling );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   275
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   276
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   277
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   278
	end: function() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   279
		return this.prevObject || jQuery( [] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   280
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   281
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   282
	// For internal use only.
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   283
	// Behaves like an Array's method, not like a jQuery method.
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   284
	push: [].push,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   285
	sort: [].sort,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   286
	splice: [].splice,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   287
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   288
	find: function( selector ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   289
		if ( this.length === 1 ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   290
			var ret = this.pushStack( [], "find", selector );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   291
			ret.length = 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   292
			jQuery.find( selector, this[0], ret );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   293
			return ret;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   294
		} else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   295
			return this.pushStack( jQuery.unique(jQuery.map(this, function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   296
				return jQuery.find( selector, elem );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   297
			})), "find", selector );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   298
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   299
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   300
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   301
	clone: function( events ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   302
		// Do the clone
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   303
		var ret = this.map(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   304
			if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   305
				// IE copies events bound via attachEvent when
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   306
				// using cloneNode. Calling detachEvent on the
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   307
				// clone will also remove the events from the orignal
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   308
				// In order to get around this, we use innerHTML.
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   309
				// Unfortunately, this means some modifications to
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   310
				// attributes in IE that are actually only stored
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   311
				// as properties will not be copied (such as the
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   312
				// the name attribute on an input).
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   313
				var html = this.outerHTML;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   314
				if ( !html ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   315
					var div = this.ownerDocument.createElement("div");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   316
					div.appendChild( this.cloneNode(true) );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   317
					html = div.innerHTML;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   318
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   319
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   320
				return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g, "").replace(/^\s*/, "")])[0];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   321
			} else
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   322
				return this.cloneNode(true);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   323
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   324
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   325
		// Copy the events from the original to the clone
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   326
		if ( events === true ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   327
			var orig = this.find("*").andSelf(), i = 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   328
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   329
			ret.find("*").andSelf().each(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   330
				if ( this.nodeName !== orig[i].nodeName )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   331
					return;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   332
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   333
				var events = jQuery.data( orig[i], "events" );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   334
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   335
				for ( var type in events ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   336
					for ( var handler in events[ type ] ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   337
						jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   338
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   339
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   340
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   341
				i++;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   342
			});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   343
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   344
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   345
		// Return the cloned set
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   346
		return ret;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   347
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   348
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   349
	filter: function( selector ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   350
		return this.pushStack(
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   351
			jQuery.isFunction( selector ) &&
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   352
			jQuery.grep(this, function(elem, i){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   353
				return selector.call( elem, i );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   354
			}) ||
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   355
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   356
			jQuery.multiFilter( selector, jQuery.grep(this, function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   357
				return elem.nodeType === 1;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   358
			}) ), "filter", selector );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   359
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   360
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   361
	closest: function( selector ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   362
		var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   363
			closer = 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   364
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   365
		return this.map(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   366
			var cur = this;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   367
			while ( cur && cur.ownerDocument ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   368
				if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   369
					jQuery.data(cur, "closest", closer);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   370
					return cur;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   371
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   372
				cur = cur.parentNode;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   373
				closer++;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   374
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   375
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   376
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   377
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   378
	not: function( selector ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   379
		if ( typeof selector === "string" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   380
			// test special case where just one selector is passed in
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   381
			if ( isSimple.test( selector ) )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   382
				return this.pushStack( jQuery.multiFilter( selector, this, true ), "not", selector );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   383
			else
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   384
				selector = jQuery.multiFilter( selector, this );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   385
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   386
		var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   387
		return this.filter(function() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   388
			return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   389
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   390
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   391
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   392
	add: function( selector ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   393
		return this.pushStack( jQuery.unique( jQuery.merge(
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   394
			this.get(),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   395
			typeof selector === "string" ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   396
				jQuery( selector ) :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   397
				jQuery.makeArray( selector )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   398
		)));
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   399
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   400
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   401
	is: function( selector ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   402
		return !!selector && jQuery.multiFilter( selector, this ).length > 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   403
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   404
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   405
	hasClass: function( selector ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   406
		return !!selector && this.is( "." + selector );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   407
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   408
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   409
	val: function( value ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   410
		if ( value === undefined ) {			
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   411
			var elem = this[0];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   412
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   413
			if ( elem ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   414
				if( jQuery.nodeName( elem, 'option' ) )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   415
					return (elem.attributes.value || {}).specified ? elem.value : elem.text;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   416
				
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   417
				// We need to handle select boxes special
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   418
				if ( jQuery.nodeName( elem, "select" ) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   419
					var index = elem.selectedIndex,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   420
						values = [],
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   421
						options = elem.options,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   422
						one = elem.type == "select-one";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   423
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   424
					// Nothing was selected
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   425
					if ( index < 0 )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   426
						return null;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   427
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   428
					// Loop through all the selected options
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   429
					for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   430
						var option = options[ i ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   431
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   432
						if ( option.selected ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   433
							// Get the specifc value for the option
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   434
							value = jQuery(option).val();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   435
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   436
							// We don't need an array for one selects
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   437
							if ( one )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   438
								return value;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   439
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   440
							// Multi-Selects return an array
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   441
							values.push( value );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   442
						}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   443
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   444
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   445
					return values;				
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   446
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   447
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   448
				// Everything else, we just grab the value
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   449
				return (elem.value || "").replace(/\r/g, "");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   450
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   451
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   452
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   453
			return undefined;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   454
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   455
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   456
		if ( typeof value === "number" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   457
			value += '';
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   458
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   459
		return this.each(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   460
			if ( this.nodeType != 1 )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   461
				return;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   462
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   463
			if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   464
				this.checked = (jQuery.inArray(this.value, value) >= 0 ||
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   465
					jQuery.inArray(this.name, value) >= 0);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   466
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   467
			else if ( jQuery.nodeName( this, "select" ) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   468
				var values = jQuery.makeArray(value);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   469
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   470
				jQuery( "option", this ).each(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   471
					this.selected = (jQuery.inArray( this.value, values ) >= 0 ||
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   472
						jQuery.inArray( this.text, values ) >= 0);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   473
				});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   474
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   475
				if ( !values.length )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   476
					this.selectedIndex = -1;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   477
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   478
			} else
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   479
				this.value = value;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   480
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   481
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   482
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   483
	html: function( value ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   484
		return value === undefined ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   485
			(this[0] ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   486
				this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   487
				null) :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   488
			this.empty().append( value );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   489
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   490
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   491
	replaceWith: function( value ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   492
		return this.after( value ).remove();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   493
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   494
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   495
	eq: function( i ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   496
		return this.slice( i, +i + 1 );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   497
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   498
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   499
	slice: function() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   500
		return this.pushStack( Array.prototype.slice.apply( this, arguments ),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   501
			"slice", Array.prototype.slice.call(arguments).join(",") );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   502
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   503
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   504
	map: function( callback ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   505
		return this.pushStack( jQuery.map(this, function(elem, i){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   506
			return callback.call( elem, i, elem );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   507
		}));
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   508
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   509
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   510
	andSelf: function() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   511
		return this.add( this.prevObject );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   512
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   513
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   514
	domManip: function( args, table, callback ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   515
		if ( this[0] ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   516
			var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   517
				scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   518
				first = fragment.firstChild;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   519
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   520
			if ( first )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   521
				for ( var i = 0, l = this.length; i < l; i++ )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   522
					callback.call( root(this[i], first), this.length > 1 || i > 0 ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   523
							fragment.cloneNode(true) : fragment );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   524
		
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   525
			if ( scripts )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   526
				jQuery.each( scripts, evalScript );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   527
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   528
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   529
		return this;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   530
		
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   531
		function root( elem, cur ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   532
			return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   533
				(elem.getElementsByTagName("tbody")[0] ||
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   534
				elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   535
				elem;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   536
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   537
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   538
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   539
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   540
// Give the init function the jQuery prototype for later instantiation
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   541
jQuery.fn.init.prototype = jQuery.fn;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   542
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   543
function evalScript( i, elem ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   544
	if ( elem.src )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   545
		jQuery.ajax({
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   546
			url: elem.src,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   547
			async: false,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   548
			dataType: "script"
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   549
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   550
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   551
	else
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   552
		jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   553
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   554
	if ( elem.parentNode )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   555
		elem.parentNode.removeChild( elem );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   556
}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   557
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   558
function now(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   559
	return +new Date;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   560
}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   561
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   562
jQuery.extend = jQuery.fn.extend = function() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   563
	// copy reference to target object
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   564
	var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   565
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   566
	// Handle a deep copy situation
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   567
	if ( typeof target === "boolean" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   568
		deep = target;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   569
		target = arguments[1] || {};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   570
		// skip the boolean and the target
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   571
		i = 2;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   572
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   573
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   574
	// Handle case when target is a string or something (possible in deep copy)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   575
	if ( typeof target !== "object" && !jQuery.isFunction(target) )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   576
		target = {};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   577
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   578
	// extend jQuery itself if only one argument is passed
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   579
	if ( length == i ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   580
		target = this;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   581
		--i;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   582
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   583
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   584
	for ( ; i < length; i++ )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   585
		// Only deal with non-null/undefined values
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   586
		if ( (options = arguments[ i ]) != null )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   587
			// Extend the base object
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   588
			for ( var name in options ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   589
				var src = target[ name ], copy = options[ name ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   590
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   591
				// Prevent never-ending loop
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   592
				if ( target === copy )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   593
					continue;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   594
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   595
				// Recurse if we're merging object values
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   596
				if ( deep && copy && typeof copy === "object" && !copy.nodeType )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   597
					target[ name ] = jQuery.extend( deep, 
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   598
						// Never move original objects, clone them
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   599
						src || ( copy.length != null ? [ ] : { } )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   600
					, copy );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   601
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   602
				// Don't bring in undefined values
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   603
				else if ( copy !== undefined )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   604
					target[ name ] = copy;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   605
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   606
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   607
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   608
	// Return the modified object
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   609
	return target;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   610
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   611
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   612
// exclude the following css properties to add px
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   613
var	exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   614
	// cache defaultView
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   615
	defaultView = document.defaultView || {},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   616
	toString = Object.prototype.toString;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   617
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   618
jQuery.extend({
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   619
	noConflict: function( deep ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   620
		window.$ = _$;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   621
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   622
		if ( deep )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   623
			window.jQuery = _jQuery;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   624
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   625
		return jQuery;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   626
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   627
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   628
	// See test/unit/core.js for details concerning isFunction.
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   629
	// Since version 1.3, DOM methods and functions like alert
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   630
	// aren't supported. They return false on IE (#2968).
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   631
	isFunction: function( obj ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   632
		return toString.call(obj) === "[object Function]";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   633
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   634
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   635
	isArray: function( obj ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   636
		return toString.call(obj) === "[object Array]";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   637
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   638
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   639
	// check if an element is in a (or is an) XML document
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   640
	isXMLDoc: function( elem ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   641
		return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" ||
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   642
			!!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   643
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   644
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   645
	// Evalulates a script in a global context
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   646
	globalEval: function( data ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   647
		if ( data && /\S/.test(data) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   648
			// Inspired by code by Andrea Giammarchi
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   649
			// http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   650
			var head = document.getElementsByTagName("head")[0] || document.documentElement,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   651
				script = document.createElement("script");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   652
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   653
			script.type = "text/javascript";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   654
			if ( jQuery.support.scriptEval )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   655
				script.appendChild( document.createTextNode( data ) );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   656
			else
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   657
				script.text = data;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   658
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   659
			// Use insertBefore instead of appendChild  to circumvent an IE6 bug.
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   660
			// This arises when a base node is used (#2709).
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   661
			head.insertBefore( script, head.firstChild );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   662
			head.removeChild( script );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   663
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   664
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   665
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   666
	nodeName: function( elem, name ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   667
		return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   668
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   669
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   670
	// args is for internal usage only
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   671
	each: function( object, callback, args ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   672
		var name, i = 0, length = object.length;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   673
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   674
		if ( args ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   675
			if ( length === undefined ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   676
				for ( name in object )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   677
					if ( callback.apply( object[ name ], args ) === false )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   678
						break;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   679
			} else
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   680
				for ( ; i < length; )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   681
					if ( callback.apply( object[ i++ ], args ) === false )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   682
						break;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   683
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   684
		// A special, fast, case for the most common use of each
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   685
		} else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   686
			if ( length === undefined ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   687
				for ( name in object )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   688
					if ( callback.call( object[ name ], name, object[ name ] ) === false )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   689
						break;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   690
			} else
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   691
				for ( var value = object[0];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   692
					i < length && callback.call( value, i, value ) !== false; value = object[++i] ){}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   693
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   694
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   695
		return object;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   696
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   697
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   698
	prop: function( elem, value, type, i, name ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   699
		// Handle executable functions
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   700
		if ( jQuery.isFunction( value ) )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   701
			value = value.call( elem, i );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   702
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   703
		// Handle passing in a number to a CSS property
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   704
		return typeof value === "number" && type == "curCSS" && !exclude.test( name ) ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   705
			value + "px" :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   706
			value;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   707
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   708
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   709
	className: {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   710
		// internal only, use addClass("class")
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   711
		add: function( elem, classNames ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   712
			jQuery.each((classNames || "").split(/\s+/), function(i, className){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   713
				if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   714
					elem.className += (elem.className ? " " : "") + className;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   715
			});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   716
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   717
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   718
		// internal only, use removeClass("class")
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   719
		remove: function( elem, classNames ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   720
			if (elem.nodeType == 1)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   721
				elem.className = classNames !== undefined ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   722
					jQuery.grep(elem.className.split(/\s+/), function(className){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   723
						return !jQuery.className.has( classNames, className );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   724
					}).join(" ") :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   725
					"";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   726
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   727
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   728
		// internal only, use hasClass("class")
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   729
		has: function( elem, className ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   730
			return elem && jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   731
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   732
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   733
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   734
	// A method for quickly swapping in/out CSS properties to get correct calculations
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   735
	swap: function( elem, options, callback ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   736
		var old = {};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   737
		// Remember the old values, and insert the new ones
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   738
		for ( var name in options ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   739
			old[ name ] = elem.style[ name ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   740
			elem.style[ name ] = options[ name ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   741
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   742
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   743
		callback.call( elem );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   744
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   745
		// Revert the old values
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   746
		for ( var name in options )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   747
			elem.style[ name ] = old[ name ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   748
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   749
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   750
	css: function( elem, name, force, extra ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   751
		if ( name == "width" || name == "height" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   752
			var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   753
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   754
			function getWH() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   755
				val = name == "width" ? elem.offsetWidth : elem.offsetHeight;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   756
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   757
				if ( extra === "border" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   758
					return;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   759
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   760
				jQuery.each( which, function() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   761
					if ( !extra )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   762
						val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   763
					if ( extra === "margin" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   764
						val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   765
					else
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   766
						val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   767
				});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   768
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   769
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   770
			if ( elem.offsetWidth !== 0 )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   771
				getWH();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   772
			else
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   773
				jQuery.swap( elem, props, getWH );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   774
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   775
			return Math.max(0, Math.round(val));
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   776
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   777
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   778
		return jQuery.curCSS( elem, name, force );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   779
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   780
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   781
	curCSS: function( elem, name, force ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   782
		var ret, style = elem.style;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   783
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   784
		// We need to handle opacity special in IE
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   785
		if ( name == "opacity" && !jQuery.support.opacity ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   786
			ret = jQuery.attr( style, "opacity" );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   787
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   788
			return ret == "" ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   789
				"1" :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   790
				ret;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   791
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   792
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   793
		// Make sure we're using the right name for getting the float value
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   794
		if ( name.match( /float/i ) )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   795
			name = styleFloat;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   796
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   797
		if ( !force && style && style[ name ] )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   798
			ret = style[ name ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   799
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   800
		else if ( defaultView.getComputedStyle ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   801
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   802
			// Only "float" is needed here
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   803
			if ( name.match( /float/i ) )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   804
				name = "float";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   805
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   806
			name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   807
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   808
			var computedStyle = defaultView.getComputedStyle( elem, null );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   809
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   810
			if ( computedStyle )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   811
				ret = computedStyle.getPropertyValue( name );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   812
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   813
			// We should always get a number back from opacity
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   814
			if ( name == "opacity" && ret == "" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   815
				ret = "1";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   816
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   817
		} else if ( elem.currentStyle ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   818
			var camelCase = name.replace(/\-(\w)/g, function(all, letter){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   819
				return letter.toUpperCase();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   820
			});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   821
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   822
			ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   823
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   824
			// From the awesome hack by Dean Edwards
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   825
			// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   826
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   827
			// If we're not dealing with a regular pixel number
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   828
			// but a number that has a weird ending, we need to convert it to pixels
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   829
			if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   830
				// Remember the original values
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   831
				var left = style.left, rsLeft = elem.runtimeStyle.left;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   832
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   833
				// Put in the new values to get a computed value out
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   834
				elem.runtimeStyle.left = elem.currentStyle.left;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   835
				style.left = ret || 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   836
				ret = style.pixelLeft + "px";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   837
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   838
				// Revert the changed values
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   839
				style.left = left;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   840
				elem.runtimeStyle.left = rsLeft;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   841
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   842
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   843
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   844
		return ret;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   845
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   846
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   847
	clean: function( elems, context, fragment ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   848
		context = context || document;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   849
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   850
		// !context.createElement fails in IE with an error but returns typeof 'object'
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   851
		if ( typeof context.createElement === "undefined" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   852
			context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   853
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   854
		// If a single string is passed in and it's a single tag
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   855
		// just do a createElement and skip the rest
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   856
		if ( !fragment && elems.length === 1 && typeof elems[0] === "string" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   857
			var match = /^<(\w+)\s*\/?>$/.exec(elems[0]);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   858
			if ( match )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   859
				return [ context.createElement( match[1] ) ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   860
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   861
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   862
		var ret = [], scripts = [], div = context.createElement("div");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   863
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   864
		jQuery.each(elems, function(i, elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   865
			if ( typeof elem === "number" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   866
				elem += '';
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   867
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   868
			if ( !elem )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   869
				return;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   870
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   871
			// Convert html string into DOM nodes
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   872
			if ( typeof elem === "string" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   873
				// Fix "XHTML"-style tags in all browsers
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   874
				elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   875
					return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   876
						all :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   877
						front + "></" + tag + ">";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   878
				});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   879
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   880
				// Trim whitespace, otherwise indexOf won't work as expected
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   881
				var tags = elem.replace(/^\s+/, "").substring(0, 10).toLowerCase();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   882
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   883
				var wrap =
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   884
					// option or optgroup
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   885
					!tags.indexOf("<opt") &&
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   886
					[ 1, "<select multiple='multiple'>", "</select>" ] ||
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   887
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   888
					!tags.indexOf("<leg") &&
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   889
					[ 1, "<fieldset>", "</fieldset>" ] ||
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   890
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   891
					tags.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   892
					[ 1, "<table>", "</table>" ] ||
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   893
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   894
					!tags.indexOf("<tr") &&
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   895
					[ 2, "<table><tbody>", "</tbody></table>" ] ||
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   896
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   897
				 	// <thead> matched above
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   898
					(!tags.indexOf("<td") || !tags.indexOf("<th")) &&
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   899
					[ 3, "<table><tbody><tr>", "</tr></tbody></table>" ] ||
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   900
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   901
					!tags.indexOf("<col") &&
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   902
					[ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ] ||
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   903
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   904
					// IE can't serialize <link> and <script> tags normally
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   905
					!jQuery.support.htmlSerialize &&
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   906
					[ 1, "div<div>", "</div>" ] ||
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   907
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   908
					[ 0, "", "" ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   909
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   910
				// Go to html and back, then peel off extra wrappers
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   911
				div.innerHTML = wrap[1] + elem + wrap[2];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   912
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   913
				// Move to the right depth
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   914
				while ( wrap[0]-- )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   915
					div = div.lastChild;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   916
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   917
				// Remove IE's autoinserted <tbody> from table fragments
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   918
				if ( !jQuery.support.tbody ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   919
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   920
					// String was a <table>, *may* have spurious <tbody>
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   921
					var hasBody = /<tbody/i.test(elem),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   922
						tbody = !tags.indexOf("<table") && !hasBody ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   923
							div.firstChild && div.firstChild.childNodes :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   924
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   925
						// String was a bare <thead> or <tfoot>
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   926
						wrap[1] == "<table>" && !hasBody ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   927
							div.childNodes :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   928
							[];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   929
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   930
					for ( var j = tbody.length - 1; j >= 0 ; --j )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   931
						if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   932
							tbody[ j ].parentNode.removeChild( tbody[ j ] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   933
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   934
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   935
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   936
				// IE completely kills leading whitespace when innerHTML is used
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   937
				if ( !jQuery.support.leadingWhitespace && /^\s/.test( elem ) )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   938
					div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   939
				
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   940
				elem = jQuery.makeArray( div.childNodes );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   941
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   942
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   943
			if ( elem.nodeType )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   944
				ret.push( elem );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   945
			else
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   946
				ret = jQuery.merge( ret, elem );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   947
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   948
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   949
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   950
		if ( fragment ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   951
			for ( var i = 0; ret[i]; i++ ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   952
				if ( jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   953
					scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   954
				} else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   955
					if ( ret[i].nodeType === 1 )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   956
						ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   957
					fragment.appendChild( ret[i] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   958
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   959
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   960
			
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   961
			return scripts;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   962
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   963
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   964
		return ret;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   965
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   966
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   967
	attr: function( elem, name, value ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   968
		// don't set attributes on text and comment nodes
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   969
		if (!elem || elem.nodeType == 3 || elem.nodeType == 8)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   970
			return undefined;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   971
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   972
		var notxml = !jQuery.isXMLDoc( elem ),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   973
			// Whether we are setting (or getting)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   974
			set = value !== undefined;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   975
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   976
		// Try to normalize/fix the name
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   977
		name = notxml && jQuery.props[ name ] || name;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   978
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   979
		// Only do all the following if this is a node (faster for style)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   980
		// IE elem.getAttribute passes even for style
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   981
		if ( elem.tagName ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   982
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   983
			// These attributes require special treatment
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   984
			var special = /href|src|style/.test( name );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   985
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   986
			// Safari mis-reports the default selected property of a hidden option
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   987
			// Accessing the parent's selectedIndex property fixes it
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   988
			if ( name == "selected" && elem.parentNode )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   989
				elem.parentNode.selectedIndex;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   990
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   991
			// If applicable, access the attribute via the DOM 0 way
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   992
			if ( name in elem && notxml && !special ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   993
				if ( set ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   994
					// We can't allow the type property to be changed (since it causes problems in IE)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   995
					if ( name == "type" && jQuery.nodeName( elem, "input" ) && elem.parentNode )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   996
						throw "type property can't be changed";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   997
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   998
					elem[ name ] = value;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
   999
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1000
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1001
				// browsers index elements by id/name on forms, give priority to attributes.
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1002
				if( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1003
					return elem.getAttributeNode( name ).nodeValue;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1004
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1005
				// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1006
				// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1007
				if ( name == "tabIndex" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1008
					var attributeNode = elem.getAttributeNode( "tabIndex" );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1009
					return attributeNode && attributeNode.specified
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1010
						? attributeNode.value
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1011
						: elem.nodeName.match(/(button|input|object|select|textarea)/i)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1012
							? 0
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1013
							: elem.nodeName.match(/^(a|area)$/i) && elem.href
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1014
								? 0
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1015
								: undefined;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1016
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1017
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1018
				return elem[ name ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1019
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1020
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1021
			if ( !jQuery.support.style && notxml &&  name == "style" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1022
				return jQuery.attr( elem.style, "cssText", value );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1023
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1024
			if ( set )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1025
				// convert the value to a string (all browsers do this but IE) see #1070
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1026
				elem.setAttribute( name, "" + value );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1027
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1028
			var attr = !jQuery.support.hrefNormalized && notxml && special
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1029
					// Some attributes require a special call on IE
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1030
					? elem.getAttribute( name, 2 )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1031
					: elem.getAttribute( name );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1032
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1033
			// Non-existent attributes return null, we normalize to undefined
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1034
			return attr === null ? undefined : attr;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1035
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1036
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1037
		// elem is actually elem.style ... set the style
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1038
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1039
		// IE uses filters for opacity
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1040
		if ( !jQuery.support.opacity && name == "opacity" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1041
			if ( set ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1042
				// IE has trouble with opacity if it does not have layout
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1043
				// Force it by setting the zoom level
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1044
				elem.zoom = 1;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1045
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1046
				// Set the alpha filter to set the opacity
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1047
				elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) +
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1048
					(parseInt( value ) + '' == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1049
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1050
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1051
			return elem.filter && elem.filter.indexOf("opacity=") >= 0 ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1052
				(parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100) + '':
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1053
				"";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1054
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1055
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1056
		name = name.replace(/-([a-z])/ig, function(all, letter){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1057
			return letter.toUpperCase();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1058
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1059
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1060
		if ( set )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1061
			elem[ name ] = value;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1062
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1063
		return elem[ name ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1064
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1065
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1066
	trim: function( text ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1067
		return (text || "").replace( /^\s+|\s+$/g, "" );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1068
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1069
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1070
	makeArray: function( array ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1071
		var ret = [];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1072
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1073
		if( array != null ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1074
			var i = array.length;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1075
			// The window, strings (and functions) also have 'length'
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1076
			if( i == null || typeof array === "string" || jQuery.isFunction(array) || array.setInterval )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1077
				ret[0] = array;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1078
			else
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1079
				while( i )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1080
					ret[--i] = array[i];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1081
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1082
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1083
		return ret;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1084
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1085
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1086
	inArray: function( elem, array ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1087
		for ( var i = 0, length = array.length; i < length; i++ )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1088
		// Use === because on IE, window == document
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1089
			if ( array[ i ] === elem )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1090
				return i;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1091
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1092
		return -1;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1093
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1094
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1095
	merge: function( first, second ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1096
		// We have to loop this way because IE & Opera overwrite the length
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1097
		// expando of getElementsByTagName
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1098
		var i = 0, elem, pos = first.length;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1099
		// Also, we need to make sure that the correct elements are being returned
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1100
		// (IE returns comment nodes in a '*' query)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1101
		if ( !jQuery.support.getAll ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1102
			while ( (elem = second[ i++ ]) != null )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1103
				if ( elem.nodeType != 8 )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1104
					first[ pos++ ] = elem;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1105
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1106
		} else
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1107
			while ( (elem = second[ i++ ]) != null )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1108
				first[ pos++ ] = elem;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1109
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1110
		return first;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1111
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1112
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1113
	unique: function( array ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1114
		var ret = [], done = {};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1115
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1116
		try {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1117
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1118
			for ( var i = 0, length = array.length; i < length; i++ ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1119
				var id = jQuery.data( array[ i ] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1120
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1121
				if ( !done[ id ] ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1122
					done[ id ] = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1123
					ret.push( array[ i ] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1124
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1125
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1126
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1127
		} catch( e ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1128
			ret = array;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1129
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1130
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1131
		return ret;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1132
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1133
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1134
	grep: function( elems, callback, inv ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1135
		var ret = [];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1136
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1137
		// Go through the array, only saving the items
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1138
		// that pass the validator function
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1139
		for ( var i = 0, length = elems.length; i < length; i++ )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1140
			if ( !inv != !callback( elems[ i ], i ) )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1141
				ret.push( elems[ i ] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1142
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1143
		return ret;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1144
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1145
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1146
	map: function( elems, callback ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1147
		var ret = [];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1148
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1149
		// Go through the array, translating each of the items to their
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1150
		// new value (or values).
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1151
		for ( var i = 0, length = elems.length; i < length; i++ ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1152
			var value = callback( elems[ i ], i );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1153
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1154
			if ( value != null )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1155
				ret[ ret.length ] = value;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1156
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1157
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1158
		return ret.concat.apply( [], ret );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1159
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1160
});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1161
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1162
// Use of jQuery.browser is deprecated.
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1163
// It's included for backwards compatibility and plugins,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1164
// although they should work to migrate away.
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1165
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1166
var userAgent = navigator.userAgent.toLowerCase();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1167
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1168
// Figure out what browser is being used
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1169
jQuery.browser = {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1170
	version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1],
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1171
	safari: /webkit/.test( userAgent ),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1172
	opera: /opera/.test( userAgent ),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1173
	msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1174
	mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1175
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1176
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1177
jQuery.each({
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1178
	parent: function(elem){return elem.parentNode;},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1179
	parents: function(elem){return jQuery.dir(elem,"parentNode");},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1180
	next: function(elem){return jQuery.nth(elem,2,"nextSibling");},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1181
	prev: function(elem){return jQuery.nth(elem,2,"previousSibling");},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1182
	nextAll: function(elem){return jQuery.dir(elem,"nextSibling");},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1183
	prevAll: function(elem){return jQuery.dir(elem,"previousSibling");},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1184
	siblings: function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1185
	children: function(elem){return jQuery.sibling(elem.firstChild);},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1186
	contents: function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1187
}, function(name, fn){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1188
	jQuery.fn[ name ] = function( selector ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1189
		var ret = jQuery.map( this, fn );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1190
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1191
		if ( selector && typeof selector == "string" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1192
			ret = jQuery.multiFilter( selector, ret );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1193
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1194
		return this.pushStack( jQuery.unique( ret ), name, selector );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1195
	};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1196
});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1197
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1198
jQuery.each({
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1199
	appendTo: "append",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1200
	prependTo: "prepend",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1201
	insertBefore: "before",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1202
	insertAfter: "after",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1203
	replaceAll: "replaceWith"
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1204
}, function(name, original){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1205
	jQuery.fn[ name ] = function( selector ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1206
		var ret = [], insert = jQuery( selector );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1207
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1208
		for ( var i = 0, l = insert.length; i < l; i++ ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1209
			var elems = (i > 0 ? this.clone(true) : this).get();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1210
			jQuery.fn[ original ].apply( jQuery(insert[i]), elems );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1211
			ret = ret.concat( elems );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1212
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1213
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1214
		return this.pushStack( ret, name, selector );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1215
	};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1216
});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1217
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1218
jQuery.each({
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1219
	removeAttr: function( name ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1220
		jQuery.attr( this, name, "" );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1221
		if (this.nodeType == 1)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1222
			this.removeAttribute( name );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1223
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1224
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1225
	addClass: function( classNames ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1226
		jQuery.className.add( this, classNames );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1227
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1228
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1229
	removeClass: function( classNames ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1230
		jQuery.className.remove( this, classNames );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1231
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1232
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1233
	toggleClass: function( classNames, state ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1234
		if( typeof state !== "boolean" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1235
			state = !jQuery.className.has( this, classNames );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1236
		jQuery.className[ state ? "add" : "remove" ]( this, classNames );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1237
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1238
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1239
	remove: function( selector ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1240
		if ( !selector || jQuery.filter( selector, [ this ] ).length ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1241
			// Prevent memory leaks
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1242
			jQuery( "*", this ).add([this]).each(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1243
				jQuery.event.remove(this);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1244
				jQuery.removeData(this);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1245
			});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1246
			if (this.parentNode)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1247
				this.parentNode.removeChild( this );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1248
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1249
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1250
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1251
	empty: function() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1252
		// Remove element nodes and prevent memory leaks
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1253
		jQuery(this).children().remove();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1254
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1255
		// Remove any remaining nodes
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1256
		while ( this.firstChild )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1257
			this.removeChild( this.firstChild );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1258
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1259
}, function(name, fn){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1260
	jQuery.fn[ name ] = function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1261
		return this.each( fn, arguments );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1262
	};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1263
});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1264
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1265
// Helper function used by the dimensions and offset modules
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1266
function num(elem, prop) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1267
	return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1268
}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1269
var expando = "jQuery" + now(), uuid = 0, windowData = {};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1270
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1271
jQuery.extend({
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1272
	cache: {},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1273
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1274
	data: function( elem, name, data ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1275
		elem = elem == window ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1276
			windowData :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1277
			elem;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1278
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1279
		var id = elem[ expando ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1280
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1281
		// Compute a unique ID for the element
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1282
		if ( !id )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1283
			id = elem[ expando ] = ++uuid;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1284
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1285
		// Only generate the data cache if we're
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1286
		// trying to access or manipulate it
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1287
		if ( name && !jQuery.cache[ id ] )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1288
			jQuery.cache[ id ] = {};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1289
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1290
		// Prevent overriding the named cache with undefined values
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1291
		if ( data !== undefined )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1292
			jQuery.cache[ id ][ name ] = data;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1293
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1294
		// Return the named cache data, or the ID for the element
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1295
		return name ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1296
			jQuery.cache[ id ][ name ] :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1297
			id;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1298
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1299
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1300
	removeData: function( elem, name ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1301
		elem = elem == window ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1302
			windowData :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1303
			elem;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1304
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1305
		var id = elem[ expando ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1306
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1307
		// If we want to remove a specific section of the element's data
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1308
		if ( name ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1309
			if ( jQuery.cache[ id ] ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1310
				// Remove the section of cache data
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1311
				delete jQuery.cache[ id ][ name ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1312
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1313
				// If we've removed all the data, remove the element's cache
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1314
				name = "";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1315
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1316
				for ( name in jQuery.cache[ id ] )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1317
					break;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1318
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1319
				if ( !name )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1320
					jQuery.removeData( elem );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1321
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1322
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1323
		// Otherwise, we want to remove all of the element's data
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1324
		} else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1325
			// Clean up the element expando
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1326
			try {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1327
				delete elem[ expando ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1328
			} catch(e){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1329
				// IE has trouble directly removing the expando
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1330
				// but it's ok with using removeAttribute
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1331
				if ( elem.removeAttribute )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1332
					elem.removeAttribute( expando );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1333
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1334
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1335
			// Completely remove the data cache
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1336
			delete jQuery.cache[ id ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1337
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1338
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1339
	queue: function( elem, type, data ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1340
		if ( elem ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1341
	
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1342
			type = (type || "fx") + "queue";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1343
	
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1344
			var q = jQuery.data( elem, type );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1345
	
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1346
			if ( !q || jQuery.isArray(data) )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1347
				q = jQuery.data( elem, type, jQuery.makeArray(data) );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1348
			else if( data )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1349
				q.push( data );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1350
	
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1351
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1352
		return q;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1353
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1354
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1355
	dequeue: function( elem, type ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1356
		var queue = jQuery.queue( elem, type ),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1357
			fn = queue.shift();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1358
		
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1359
		if( !type || type === "fx" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1360
			fn = queue[0];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1361
			
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1362
		if( fn !== undefined )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1363
			fn.call(elem);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1364
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1365
});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1366
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1367
jQuery.fn.extend({
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1368
	data: function( key, value ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1369
		var parts = key.split(".");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1370
		parts[1] = parts[1] ? "." + parts[1] : "";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1371
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1372
		if ( value === undefined ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1373
			var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1374
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1375
			if ( data === undefined && this.length )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1376
				data = jQuery.data( this[0], key );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1377
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1378
			return data === undefined && parts[1] ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1379
				this.data( parts[0] ) :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1380
				data;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1381
		} else
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1382
			return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1383
				jQuery.data( this, key, value );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1384
			});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1385
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1386
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1387
	removeData: function( key ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1388
		return this.each(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1389
			jQuery.removeData( this, key );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1390
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1391
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1392
	queue: function(type, data){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1393
		if ( typeof type !== "string" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1394
			data = type;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1395
			type = "fx";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1396
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1397
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1398
		if ( data === undefined )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1399
			return jQuery.queue( this[0], type );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1400
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1401
		return this.each(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1402
			var queue = jQuery.queue( this, type, data );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1403
			
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1404
			 if( type == "fx" && queue.length == 1 )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1405
				queue[0].call(this);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1406
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1407
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1408
	dequeue: function(type){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1409
		return this.each(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1410
			jQuery.dequeue( this, type );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1411
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1412
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1413
});/*!
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1414
 * Sizzle CSS Selector Engine - v0.9.3
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1415
 *  Copyright 2009, The Dojo Foundation
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1416
 *  Released under the MIT, BSD, and GPL Licenses.
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1417
 *  More information: http://sizzlejs.com/
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1418
 */
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1419
(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1420
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1421
var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1422
	done = 0,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1423
	toString = Object.prototype.toString;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1424
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1425
var Sizzle = function(selector, context, results, seed) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1426
	results = results || [];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1427
	context = context || document;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1428
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1429
	if ( context.nodeType !== 1 && context.nodeType !== 9 )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1430
		return [];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1431
	
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1432
	if ( !selector || typeof selector !== "string" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1433
		return results;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1434
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1435
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1436
	var parts = [], m, set, checkSet, check, mode, extra, prune = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1437
	
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1438
	// Reset the position of the chunker regexp (start from head)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1439
	chunker.lastIndex = 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1440
	
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1441
	while ( (m = chunker.exec(selector)) !== null ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1442
		parts.push( m[1] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1443
		
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1444
		if ( m[2] ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1445
			extra = RegExp.rightContext;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1446
			break;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1447
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1448
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1449
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1450
	if ( parts.length > 1 && origPOS.exec( selector ) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1451
		if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1452
			set = posProcess( parts[0] + parts[1], context );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1453
		} else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1454
			set = Expr.relative[ parts[0] ] ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1455
				[ context ] :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1456
				Sizzle( parts.shift(), context );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1457
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1458
			while ( parts.length ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1459
				selector = parts.shift();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1460
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1461
				if ( Expr.relative[ selector ] )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1462
					selector += parts.shift();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1463
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1464
				set = posProcess( selector, set );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1465
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1466
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1467
	} else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1468
		var ret = seed ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1469
			{ expr: parts.pop(), set: makeArray(seed) } :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1470
			Sizzle.find( parts.pop(), parts.length === 1 && context.parentNode ? context.parentNode : context, isXML(context) );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1471
		set = Sizzle.filter( ret.expr, ret.set );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1472
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1473
		if ( parts.length > 0 ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1474
			checkSet = makeArray(set);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1475
		} else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1476
			prune = false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1477
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1478
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1479
		while ( parts.length ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1480
			var cur = parts.pop(), pop = cur;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1481
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1482
			if ( !Expr.relative[ cur ] ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1483
				cur = "";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1484
			} else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1485
				pop = parts.pop();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1486
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1487
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1488
			if ( pop == null ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1489
				pop = context;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1490
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1491
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1492
			Expr.relative[ cur ]( checkSet, pop, isXML(context) );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1493
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1494
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1495
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1496
	if ( !checkSet ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1497
		checkSet = set;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1498
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1499
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1500
	if ( !checkSet ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1501
		throw "Syntax error, unrecognized expression: " + (cur || selector);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1502
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1503
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1504
	if ( toString.call(checkSet) === "[object Array]" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1505
		if ( !prune ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1506
			results.push.apply( results, checkSet );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1507
		} else if ( context.nodeType === 1 ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1508
			for ( var i = 0; checkSet[i] != null; i++ ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1509
				if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && contains(context, checkSet[i])) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1510
					results.push( set[i] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1511
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1512
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1513
		} else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1514
			for ( var i = 0; checkSet[i] != null; i++ ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1515
				if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1516
					results.push( set[i] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1517
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1518
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1519
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1520
	} else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1521
		makeArray( checkSet, results );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1522
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1523
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1524
	if ( extra ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1525
		Sizzle( extra, context, results, seed );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1526
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1527
		if ( sortOrder ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1528
			hasDuplicate = false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1529
			results.sort(sortOrder);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1530
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1531
			if ( hasDuplicate ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1532
				for ( var i = 1; i < results.length; i++ ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1533
					if ( results[i] === results[i-1] ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1534
						results.splice(i--, 1);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1535
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1536
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1537
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1538
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1539
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1540
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1541
	return results;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1542
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1543
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1544
Sizzle.matches = function(expr, set){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1545
	return Sizzle(expr, null, null, set);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1546
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1547
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1548
Sizzle.find = function(expr, context, isXML){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1549
	var set, match;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1550
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1551
	if ( !expr ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1552
		return [];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1553
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1554
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1555
	for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1556
		var type = Expr.order[i], match;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1557
		
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1558
		if ( (match = Expr.match[ type ].exec( expr )) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1559
			var left = RegExp.leftContext;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1560
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1561
			if ( left.substr( left.length - 1 ) !== "\\" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1562
				match[1] = (match[1] || "").replace(/\\/g, "");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1563
				set = Expr.find[ type ]( match, context, isXML );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1564
				if ( set != null ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1565
					expr = expr.replace( Expr.match[ type ], "" );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1566
					break;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1567
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1568
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1569
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1570
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1571
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1572
	if ( !set ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1573
		set = context.getElementsByTagName("*");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1574
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1575
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1576
	return {set: set, expr: expr};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1577
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1578
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1579
Sizzle.filter = function(expr, set, inplace, not){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1580
	var old = expr, result = [], curLoop = set, match, anyFound,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1581
		isXMLFilter = set && set[0] && isXML(set[0]);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1582
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1583
	while ( expr && set.length ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1584
		for ( var type in Expr.filter ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1585
			if ( (match = Expr.match[ type ].exec( expr )) != null ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1586
				var filter = Expr.filter[ type ], found, item;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1587
				anyFound = false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1588
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1589
				if ( curLoop == result ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1590
					result = [];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1591
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1592
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1593
				if ( Expr.preFilter[ type ] ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1594
					match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1595
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1596
					if ( !match ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1597
						anyFound = found = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1598
					} else if ( match === true ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1599
						continue;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1600
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1601
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1602
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1603
				if ( match ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1604
					for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1605
						if ( item ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1606
							found = filter( item, match, i, curLoop );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1607
							var pass = not ^ !!found;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1608
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1609
							if ( inplace && found != null ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1610
								if ( pass ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1611
									anyFound = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1612
								} else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1613
									curLoop[i] = false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1614
								}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1615
							} else if ( pass ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1616
								result.push( item );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1617
								anyFound = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1618
							}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1619
						}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1620
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1621
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1622
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1623
				if ( found !== undefined ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1624
					if ( !inplace ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1625
						curLoop = result;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1626
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1627
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1628
					expr = expr.replace( Expr.match[ type ], "" );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1629
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1630
					if ( !anyFound ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1631
						return [];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1632
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1633
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1634
					break;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1635
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1636
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1637
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1638
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1639
		// Improper expression
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1640
		if ( expr == old ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1641
			if ( anyFound == null ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1642
				throw "Syntax error, unrecognized expression: " + expr;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1643
			} else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1644
				break;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1645
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1646
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1647
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1648
		old = expr;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1649
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1650
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1651
	return curLoop;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1652
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1653
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1654
var Expr = Sizzle.selectors = {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1655
	order: [ "ID", "NAME", "TAG" ],
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1656
	match: {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1657
		ID: /#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1658
		CLASS: /\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1659
		NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1660
		ATTR: /\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1661
		TAG: /^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1662
		CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1663
		POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1664
		PSEUDO: /:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1665
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1666
	attrMap: {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1667
		"class": "className",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1668
		"for": "htmlFor"
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1669
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1670
	attrHandle: {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1671
		href: function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1672
			return elem.getAttribute("href");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1673
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1674
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1675
	relative: {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1676
		"+": function(checkSet, part, isXML){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1677
			var isPartStr = typeof part === "string",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1678
				isTag = isPartStr && !/\W/.test(part),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1679
				isPartStrNotTag = isPartStr && !isTag;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1680
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1681
			if ( isTag && !isXML ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1682
				part = part.toUpperCase();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1683
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1684
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1685
			for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1686
				if ( (elem = checkSet[i]) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1687
					while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1688
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1689
					checkSet[i] = isPartStrNotTag || elem && elem.nodeName === part ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1690
						elem || false :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1691
						elem === part;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1692
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1693
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1694
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1695
			if ( isPartStrNotTag ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1696
				Sizzle.filter( part, checkSet, true );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1697
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1698
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1699
		">": function(checkSet, part, isXML){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1700
			var isPartStr = typeof part === "string";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1701
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1702
			if ( isPartStr && !/\W/.test(part) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1703
				part = isXML ? part : part.toUpperCase();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1704
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1705
				for ( var i = 0, l = checkSet.length; i < l; i++ ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1706
					var elem = checkSet[i];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1707
					if ( elem ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1708
						var parent = elem.parentNode;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1709
						checkSet[i] = parent.nodeName === part ? parent : false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1710
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1711
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1712
			} else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1713
				for ( var i = 0, l = checkSet.length; i < l; i++ ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1714
					var elem = checkSet[i];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1715
					if ( elem ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1716
						checkSet[i] = isPartStr ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1717
							elem.parentNode :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1718
							elem.parentNode === part;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1719
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1720
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1721
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1722
				if ( isPartStr ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1723
					Sizzle.filter( part, checkSet, true );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1724
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1725
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1726
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1727
		"": function(checkSet, part, isXML){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1728
			var doneName = done++, checkFn = dirCheck;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1729
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1730
			if ( !part.match(/\W/) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1731
				var nodeCheck = part = isXML ? part : part.toUpperCase();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1732
				checkFn = dirNodeCheck;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1733
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1734
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1735
			checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1736
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1737
		"~": function(checkSet, part, isXML){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1738
			var doneName = done++, checkFn = dirCheck;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1739
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1740
			if ( typeof part === "string" && !part.match(/\W/) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1741
				var nodeCheck = part = isXML ? part : part.toUpperCase();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1742
				checkFn = dirNodeCheck;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1743
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1744
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1745
			checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1746
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1747
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1748
	find: {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1749
		ID: function(match, context, isXML){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1750
			if ( typeof context.getElementById !== "undefined" && !isXML ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1751
				var m = context.getElementById(match[1]);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1752
				return m ? [m] : [];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1753
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1754
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1755
		NAME: function(match, context, isXML){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1756
			if ( typeof context.getElementsByName !== "undefined" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1757
				var ret = [], results = context.getElementsByName(match[1]);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1758
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1759
				for ( var i = 0, l = results.length; i < l; i++ ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1760
					if ( results[i].getAttribute("name") === match[1] ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1761
						ret.push( results[i] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1762
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1763
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1764
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1765
				return ret.length === 0 ? null : ret;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1766
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1767
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1768
		TAG: function(match, context){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1769
			return context.getElementsByTagName(match[1]);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1770
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1771
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1772
	preFilter: {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1773
		CLASS: function(match, curLoop, inplace, result, not, isXML){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1774
			match = " " + match[1].replace(/\\/g, "") + " ";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1775
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1776
			if ( isXML ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1777
				return match;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1778
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1779
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1780
			for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1781
				if ( elem ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1782
					if ( not ^ (elem.className && (" " + elem.className + " ").indexOf(match) >= 0) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1783
						if ( !inplace )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1784
							result.push( elem );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1785
					} else if ( inplace ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1786
						curLoop[i] = false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1787
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1788
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1789
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1790
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1791
			return false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1792
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1793
		ID: function(match){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1794
			return match[1].replace(/\\/g, "");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1795
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1796
		TAG: function(match, curLoop){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1797
			for ( var i = 0; curLoop[i] === false; i++ ){}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1798
			return curLoop[i] && isXML(curLoop[i]) ? match[1] : match[1].toUpperCase();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1799
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1800
		CHILD: function(match){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1801
			if ( match[1] == "nth" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1802
				// parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1803
				var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1804
					match[2] == "even" && "2n" || match[2] == "odd" && "2n+1" ||
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1805
					!/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1806
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1807
				// calculate the numbers (first)n+(last) including if they are negative
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1808
				match[2] = (test[1] + (test[2] || 1)) - 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1809
				match[3] = test[3] - 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1810
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1811
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1812
			// TODO: Move to normal caching system
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1813
			match[0] = done++;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1814
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1815
			return match;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1816
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1817
		ATTR: function(match, curLoop, inplace, result, not, isXML){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1818
			var name = match[1].replace(/\\/g, "");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1819
			
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1820
			if ( !isXML && Expr.attrMap[name] ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1821
				match[1] = Expr.attrMap[name];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1822
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1823
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1824
			if ( match[2] === "~=" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1825
				match[4] = " " + match[4] + " ";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1826
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1827
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1828
			return match;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1829
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1830
		PSEUDO: function(match, curLoop, inplace, result, not){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1831
			if ( match[1] === "not" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1832
				// If we're dealing with a complex expression, or a simple one
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1833
				if ( match[3].match(chunker).length > 1 || /^\w/.test(match[3]) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1834
					match[3] = Sizzle(match[3], null, null, curLoop);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1835
				} else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1836
					var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1837
					if ( !inplace ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1838
						result.push.apply( result, ret );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1839
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1840
					return false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1841
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1842
			} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1843
				return true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1844
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1845
			
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1846
			return match;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1847
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1848
		POS: function(match){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1849
			match.unshift( true );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1850
			return match;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1851
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1852
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1853
	filters: {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1854
		enabled: function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1855
			return elem.disabled === false && elem.type !== "hidden";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1856
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1857
		disabled: function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1858
			return elem.disabled === true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1859
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1860
		checked: function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1861
			return elem.checked === true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1862
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1863
		selected: function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1864
			// Accessing this property makes selected-by-default
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1865
			// options in Safari work properly
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1866
			elem.parentNode.selectedIndex;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1867
			return elem.selected === true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1868
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1869
		parent: function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1870
			return !!elem.firstChild;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1871
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1872
		empty: function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1873
			return !elem.firstChild;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1874
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1875
		has: function(elem, i, match){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1876
			return !!Sizzle( match[3], elem ).length;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1877
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1878
		header: function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1879
			return /h\d/i.test( elem.nodeName );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1880
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1881
		text: function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1882
			return "text" === elem.type;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1883
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1884
		radio: function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1885
			return "radio" === elem.type;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1886
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1887
		checkbox: function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1888
			return "checkbox" === elem.type;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1889
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1890
		file: function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1891
			return "file" === elem.type;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1892
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1893
		password: function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1894
			return "password" === elem.type;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1895
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1896
		submit: function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1897
			return "submit" === elem.type;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1898
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1899
		image: function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1900
			return "image" === elem.type;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1901
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1902
		reset: function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1903
			return "reset" === elem.type;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1904
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1905
		button: function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1906
			return "button" === elem.type || elem.nodeName.toUpperCase() === "BUTTON";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1907
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1908
		input: function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1909
			return /input|select|textarea|button/i.test(elem.nodeName);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1910
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1911
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1912
	setFilters: {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1913
		first: function(elem, i){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1914
			return i === 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1915
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1916
		last: function(elem, i, match, array){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1917
			return i === array.length - 1;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1918
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1919
		even: function(elem, i){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1920
			return i % 2 === 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1921
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1922
		odd: function(elem, i){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1923
			return i % 2 === 1;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1924
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1925
		lt: function(elem, i, match){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1926
			return i < match[3] - 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1927
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1928
		gt: function(elem, i, match){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1929
			return i > match[3] - 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1930
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1931
		nth: function(elem, i, match){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1932
			return match[3] - 0 == i;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1933
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1934
		eq: function(elem, i, match){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1935
			return match[3] - 0 == i;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1936
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1937
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1938
	filter: {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1939
		PSEUDO: function(elem, match, i, array){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1940
			var name = match[1], filter = Expr.filters[ name ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1941
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1942
			if ( filter ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1943
				return filter( elem, i, match, array );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1944
			} else if ( name === "contains" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1945
				return (elem.textContent || elem.innerText || "").indexOf(match[3]) >= 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1946
			} else if ( name === "not" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1947
				var not = match[3];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1948
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1949
				for ( var i = 0, l = not.length; i < l; i++ ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1950
					if ( not[i] === elem ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1951
						return false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1952
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1953
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1954
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1955
				return true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1956
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1957
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1958
		CHILD: function(elem, match){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1959
			var type = match[1], node = elem;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1960
			switch (type) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1961
				case 'only':
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1962
				case 'first':
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1963
					while (node = node.previousSibling)  {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1964
						if ( node.nodeType === 1 ) return false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1965
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1966
					if ( type == 'first') return true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1967
					node = elem;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1968
				case 'last':
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1969
					while (node = node.nextSibling)  {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1970
						if ( node.nodeType === 1 ) return false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1971
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1972
					return true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1973
				case 'nth':
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1974
					var first = match[2], last = match[3];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1975
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1976
					if ( first == 1 && last == 0 ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1977
						return true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1978
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1979
					
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1980
					var doneName = match[0],
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1981
						parent = elem.parentNode;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1982
	
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1983
					if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1984
						var count = 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1985
						for ( node = parent.firstChild; node; node = node.nextSibling ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1986
							if ( node.nodeType === 1 ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1987
								node.nodeIndex = ++count;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1988
							}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1989
						} 
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1990
						parent.sizcache = doneName;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1991
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1992
					
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1993
					var diff = elem.nodeIndex - last;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1994
					if ( first == 0 ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1995
						return diff == 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1996
					} else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1997
						return ( diff % first == 0 && diff / first >= 0 );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1998
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  1999
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2000
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2001
		ID: function(elem, match){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2002
			return elem.nodeType === 1 && elem.getAttribute("id") === match;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2003
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2004
		TAG: function(elem, match){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2005
			return (match === "*" && elem.nodeType === 1) || elem.nodeName === match;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2006
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2007
		CLASS: function(elem, match){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2008
			return (" " + (elem.className || elem.getAttribute("class")) + " ")
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2009
				.indexOf( match ) > -1;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2010
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2011
		ATTR: function(elem, match){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2012
			var name = match[1],
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2013
				result = Expr.attrHandle[ name ] ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2014
					Expr.attrHandle[ name ]( elem ) :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2015
					elem[ name ] != null ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2016
						elem[ name ] :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2017
						elem.getAttribute( name ),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2018
				value = result + "",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2019
				type = match[2],
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2020
				check = match[4];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2021
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2022
			return result == null ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2023
				type === "!=" :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2024
				type === "=" ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2025
				value === check :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2026
				type === "*=" ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2027
				value.indexOf(check) >= 0 :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2028
				type === "~=" ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2029
				(" " + value + " ").indexOf(check) >= 0 :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2030
				!check ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2031
				value && result !== false :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2032
				type === "!=" ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2033
				value != check :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2034
				type === "^=" ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2035
				value.indexOf(check) === 0 :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2036
				type === "$=" ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2037
				value.substr(value.length - check.length) === check :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2038
				type === "|=" ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2039
				value === check || value.substr(0, check.length + 1) === check + "-" :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2040
				false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2041
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2042
		POS: function(elem, match, i, array){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2043
			var name = match[2], filter = Expr.setFilters[ name ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2044
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2045
			if ( filter ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2046
				return filter( elem, i, match, array );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2047
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2048
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2049
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2050
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2051
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2052
var origPOS = Expr.match.POS;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2053
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2054
for ( var type in Expr.match ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2055
	Expr.match[ type ] = RegExp( Expr.match[ type ].source + /(?![^\[]*\])(?![^\(]*\))/.source );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2056
}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2057
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2058
var makeArray = function(array, results) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2059
	array = Array.prototype.slice.call( array );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2060
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2061
	if ( results ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2062
		results.push.apply( results, array );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2063
		return results;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2064
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2065
	
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2066
	return array;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2067
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2068
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2069
// Perform a simple check to determine if the browser is capable of
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2070
// converting a NodeList to an array using builtin methods.
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2071
try {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2072
	Array.prototype.slice.call( document.documentElement.childNodes );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2073
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2074
// Provide a fallback method if it does not work
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2075
} catch(e){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2076
	makeArray = function(array, results) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2077
		var ret = results || [];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2078
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2079
		if ( toString.call(array) === "[object Array]" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2080
			Array.prototype.push.apply( ret, array );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2081
		} else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2082
			if ( typeof array.length === "number" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2083
				for ( var i = 0, l = array.length; i < l; i++ ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2084
					ret.push( array[i] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2085
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2086
			} else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2087
				for ( var i = 0; array[i]; i++ ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2088
					ret.push( array[i] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2089
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2090
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2091
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2092
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2093
		return ret;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2094
	};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2095
}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2096
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2097
var sortOrder;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2098
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2099
if ( document.documentElement.compareDocumentPosition ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2100
	sortOrder = function( a, b ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2101
		var ret = a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2102
		if ( ret === 0 ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2103
			hasDuplicate = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2104
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2105
		return ret;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2106
	};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2107
} else if ( "sourceIndex" in document.documentElement ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2108
	sortOrder = function( a, b ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2109
		var ret = a.sourceIndex - b.sourceIndex;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2110
		if ( ret === 0 ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2111
			hasDuplicate = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2112
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2113
		return ret;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2114
	};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2115
} else if ( document.createRange ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2116
	sortOrder = function( a, b ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2117
		var aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2118
		aRange.selectNode(a);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2119
		aRange.collapse(true);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2120
		bRange.selectNode(b);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2121
		bRange.collapse(true);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2122
		var ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2123
		if ( ret === 0 ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2124
			hasDuplicate = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2125
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2126
		return ret;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2127
	};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2128
}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2129
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2130
// Check to see if the browser returns elements by name when
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2131
// querying by getElementById (and provide a workaround)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2132
(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2133
	// We're going to inject a fake input element with a specified name
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2134
	var form = document.createElement("form"),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2135
		id = "script" + (new Date).getTime();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2136
	form.innerHTML = "<input name='" + id + "'/>";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2137
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2138
	// Inject it into the root element, check its status, and remove it quickly
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2139
	var root = document.documentElement;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2140
	root.insertBefore( form, root.firstChild );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2141
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2142
	// The workaround has to do additional checks after a getElementById
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2143
	// Which slows things down for other browsers (hence the branching)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2144
	if ( !!document.getElementById( id ) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2145
		Expr.find.ID = function(match, context, isXML){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2146
			if ( typeof context.getElementById !== "undefined" && !isXML ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2147
				var m = context.getElementById(match[1]);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2148
				return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : [];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2149
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2150
		};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2151
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2152
		Expr.filter.ID = function(elem, match){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2153
			var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2154
			return elem.nodeType === 1 && node && node.nodeValue === match;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2155
		};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2156
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2157
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2158
	root.removeChild( form );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2159
})();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2160
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2161
(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2162
	// Check to see if the browser returns only elements
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2163
	// when doing getElementsByTagName("*")
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2164
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2165
	// Create a fake element
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2166
	var div = document.createElement("div");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2167
	div.appendChild( document.createComment("") );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2168
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2169
	// Make sure no comments are found
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2170
	if ( div.getElementsByTagName("*").length > 0 ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2171
		Expr.find.TAG = function(match, context){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2172
			var results = context.getElementsByTagName(match[1]);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2173
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2174
			// Filter out possible comments
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2175
			if ( match[1] === "*" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2176
				var tmp = [];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2177
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2178
				for ( var i = 0; results[i]; i++ ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2179
					if ( results[i].nodeType === 1 ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2180
						tmp.push( results[i] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2181
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2182
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2183
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2184
				results = tmp;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2185
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2186
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2187
			return results;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2188
		};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2189
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2190
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2191
	// Check to see if an attribute returns normalized href attributes
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2192
	div.innerHTML = "<a href='#'></a>";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2193
	if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2194
			div.firstChild.getAttribute("href") !== "#" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2195
		Expr.attrHandle.href = function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2196
			return elem.getAttribute("href", 2);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2197
		};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2198
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2199
})();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2200
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2201
if ( document.querySelectorAll ) (function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2202
	var oldSizzle = Sizzle, div = document.createElement("div");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2203
	div.innerHTML = "<p class='TEST'></p>";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2204
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2205
	// Safari can't handle uppercase or unicode characters when
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2206
	// in quirks mode.
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2207
	if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2208
		return;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2209
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2210
	
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2211
	Sizzle = function(query, context, extra, seed){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2212
		context = context || document;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2213
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2214
		// Only use querySelectorAll on non-XML documents
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2215
		// (ID selectors don't work in non-HTML documents)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2216
		if ( !seed && context.nodeType === 9 && !isXML(context) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2217
			try {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2218
				return makeArray( context.querySelectorAll(query), extra );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2219
			} catch(e){}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2220
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2221
		
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2222
		return oldSizzle(query, context, extra, seed);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2223
	};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2224
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2225
	Sizzle.find = oldSizzle.find;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2226
	Sizzle.filter = oldSizzle.filter;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2227
	Sizzle.selectors = oldSizzle.selectors;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2228
	Sizzle.matches = oldSizzle.matches;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2229
})();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2230
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2231
if ( document.getElementsByClassName && document.documentElement.getElementsByClassName ) (function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2232
	var div = document.createElement("div");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2233
	div.innerHTML = "<div class='test e'></div><div class='test'></div>";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2234
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2235
	// Opera can't find a second classname (in 9.6)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2236
	if ( div.getElementsByClassName("e").length === 0 )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2237
		return;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2238
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2239
	// Safari caches class attributes, doesn't catch changes (in 3.2)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2240
	div.lastChild.className = "e";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2241
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2242
	if ( div.getElementsByClassName("e").length === 1 )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2243
		return;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2244
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2245
	Expr.order.splice(1, 0, "CLASS");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2246
	Expr.find.CLASS = function(match, context, isXML) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2247
		if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2248
			return context.getElementsByClassName(match[1]);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2249
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2250
	};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2251
})();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2252
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2253
function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2254
	var sibDir = dir == "previousSibling" && !isXML;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2255
	for ( var i = 0, l = checkSet.length; i < l; i++ ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2256
		var elem = checkSet[i];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2257
		if ( elem ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2258
			if ( sibDir && elem.nodeType === 1 ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2259
				elem.sizcache = doneName;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2260
				elem.sizset = i;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2261
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2262
			elem = elem[dir];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2263
			var match = false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2264
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2265
			while ( elem ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2266
				if ( elem.sizcache === doneName ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2267
					match = checkSet[elem.sizset];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2268
					break;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2269
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2270
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2271
				if ( elem.nodeType === 1 && !isXML ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2272
					elem.sizcache = doneName;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2273
					elem.sizset = i;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2274
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2275
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2276
				if ( elem.nodeName === cur ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2277
					match = elem;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2278
					break;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2279
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2280
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2281
				elem = elem[dir];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2282
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2283
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2284
			checkSet[i] = match;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2285
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2286
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2287
}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2288
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2289
function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2290
	var sibDir = dir == "previousSibling" && !isXML;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2291
	for ( var i = 0, l = checkSet.length; i < l; i++ ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2292
		var elem = checkSet[i];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2293
		if ( elem ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2294
			if ( sibDir && elem.nodeType === 1 ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2295
				elem.sizcache = doneName;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2296
				elem.sizset = i;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2297
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2298
			elem = elem[dir];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2299
			var match = false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2300
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2301
			while ( elem ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2302
				if ( elem.sizcache === doneName ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2303
					match = checkSet[elem.sizset];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2304
					break;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2305
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2306
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2307
				if ( elem.nodeType === 1 ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2308
					if ( !isXML ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2309
						elem.sizcache = doneName;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2310
						elem.sizset = i;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2311
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2312
					if ( typeof cur !== "string" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2313
						if ( elem === cur ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2314
							match = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2315
							break;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2316
						}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2317
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2318
					} else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2319
						match = elem;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2320
						break;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2321
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2322
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2323
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2324
				elem = elem[dir];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2325
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2326
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2327
			checkSet[i] = match;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2328
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2329
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2330
}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2331
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2332
var contains = document.compareDocumentPosition ?  function(a, b){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2333
	return a.compareDocumentPosition(b) & 16;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2334
} : function(a, b){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2335
	return a !== b && (a.contains ? a.contains(b) : true);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2336
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2337
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2338
var isXML = function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2339
	return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" ||
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2340
		!!elem.ownerDocument && isXML( elem.ownerDocument );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2341
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2342
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2343
var posProcess = function(selector, context){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2344
	var tmpSet = [], later = "", match,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2345
		root = context.nodeType ? [context] : context;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2346
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2347
	// Position selectors must be done after the filter
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2348
	// And so must :not(positional) so we move all PSEUDOs to the end
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2349
	while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2350
		later += match[0];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2351
		selector = selector.replace( Expr.match.PSEUDO, "" );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2352
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2353
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2354
	selector = Expr.relative[selector] ? selector + "*" : selector;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2355
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2356
	for ( var i = 0, l = root.length; i < l; i++ ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2357
		Sizzle( selector, root[i], tmpSet );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2358
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2359
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2360
	return Sizzle.filter( later, tmpSet );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2361
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2362
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2363
// EXPOSE
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2364
jQuery.find = Sizzle;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2365
jQuery.filter = Sizzle.filter;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2366
jQuery.expr = Sizzle.selectors;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2367
jQuery.expr[":"] = jQuery.expr.filters;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2368
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2369
Sizzle.selectors.filters.hidden = function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2370
	return elem.offsetWidth === 0 || elem.offsetHeight === 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2371
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2372
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2373
Sizzle.selectors.filters.visible = function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2374
	return elem.offsetWidth > 0 || elem.offsetHeight > 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2375
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2376
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2377
Sizzle.selectors.filters.animated = function(elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2378
	return jQuery.grep(jQuery.timers, function(fn){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2379
		return elem === fn.elem;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2380
	}).length;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2381
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2382
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2383
jQuery.multiFilter = function( expr, elems, not ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2384
	if ( not ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2385
		expr = ":not(" + expr + ")";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2386
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2387
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2388
	return Sizzle.matches(expr, elems);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2389
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2390
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2391
jQuery.dir = function( elem, dir ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2392
	var matched = [], cur = elem[dir];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2393
	while ( cur && cur != document ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2394
		if ( cur.nodeType == 1 )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2395
			matched.push( cur );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2396
		cur = cur[dir];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2397
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2398
	return matched;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2399
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2400
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2401
jQuery.nth = function(cur, result, dir, elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2402
	result = result || 1;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2403
	var num = 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2404
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2405
	for ( ; cur; cur = cur[dir] )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2406
		if ( cur.nodeType == 1 && ++num == result )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2407
			break;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2408
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2409
	return cur;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2410
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2411
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2412
jQuery.sibling = function(n, elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2413
	var r = [];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2414
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2415
	for ( ; n; n = n.nextSibling ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2416
		if ( n.nodeType == 1 && n != elem )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2417
			r.push( n );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2418
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2419
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2420
	return r;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2421
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2422
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2423
return;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2424
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2425
window.Sizzle = Sizzle;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2426
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2427
})();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2428
/*
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2429
 * A number of helper functions used for managing events.
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2430
 * Many of the ideas behind this code originated from
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2431
 * Dean Edwards' addEvent library.
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2432
 */
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2433
jQuery.event = {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2434
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2435
	// Bind an event to an element
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2436
	// Original by Dean Edwards
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2437
	add: function(elem, types, handler, data) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2438
		if ( elem.nodeType == 3 || elem.nodeType == 8 )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2439
			return;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2440
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2441
		// For whatever reason, IE has trouble passing the window object
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2442
		// around, causing it to be cloned in the process
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2443
		if ( elem.setInterval && elem != window )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2444
			elem = window;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2445
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2446
		// Make sure that the function being executed has a unique ID
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2447
		if ( !handler.guid )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2448
			handler.guid = this.guid++;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2449
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2450
		// if data is passed, bind to handler
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2451
		if ( data !== undefined ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2452
			// Create temporary function pointer to original handler
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2453
			var fn = handler;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2454
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2455
			// Create unique handler function, wrapped around original handler
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2456
			handler = this.proxy( fn );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2457
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2458
			// Store data in unique handler
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2459
			handler.data = data;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2460
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2461
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2462
		// Init the element's event structure
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2463
		var events = jQuery.data(elem, "events") || jQuery.data(elem, "events", {}),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2464
			handle = jQuery.data(elem, "handle") || jQuery.data(elem, "handle", function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2465
				// Handle the second event of a trigger and when
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2466
				// an event is called after a page has unloaded
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2467
				return typeof jQuery !== "undefined" && !jQuery.event.triggered ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2468
					jQuery.event.handle.apply(arguments.callee.elem, arguments) :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2469
					undefined;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2470
			});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2471
		// Add elem as a property of the handle function
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2472
		// This is to prevent a memory leak with non-native
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2473
		// event in IE.
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2474
		handle.elem = elem;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2475
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2476
		// Handle multiple events separated by a space
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2477
		// jQuery(...).bind("mouseover mouseout", fn);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2478
		jQuery.each(types.split(/\s+/), function(index, type) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2479
			// Namespaced event handlers
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2480
			var namespaces = type.split(".");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2481
			type = namespaces.shift();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2482
			handler.type = namespaces.slice().sort().join(".");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2483
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2484
			// Get the current list of functions bound to this event
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2485
			var handlers = events[type];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2486
			
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2487
			if ( jQuery.event.specialAll[type] )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2488
				jQuery.event.specialAll[type].setup.call(elem, data, namespaces);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2489
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2490
			// Init the event handler queue
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2491
			if (!handlers) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2492
				handlers = events[type] = {};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2493
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2494
				// Check for a special event handler
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2495
				// Only use addEventListener/attachEvent if the special
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2496
				// events handler returns false
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2497
				if ( !jQuery.event.special[type] || jQuery.event.special[type].setup.call(elem, data, namespaces) === false ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2498
					// Bind the global event handler to the element
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2499
					if (elem.addEventListener)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2500
						elem.addEventListener(type, handle, false);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2501
					else if (elem.attachEvent)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2502
						elem.attachEvent("on" + type, handle);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2503
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2504
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2505
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2506
			// Add the function to the element's handler list
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2507
			handlers[handler.guid] = handler;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2508
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2509
			// Keep track of which events have been used, for global triggering
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2510
			jQuery.event.global[type] = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2511
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2512
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2513
		// Nullify elem to prevent memory leaks in IE
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2514
		elem = null;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2515
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2516
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2517
	guid: 1,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2518
	global: {},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2519
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2520
	// Detach an event or set of events from an element
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2521
	remove: function(elem, types, handler) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2522
		// don't do events on text and comment nodes
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2523
		if ( elem.nodeType == 3 || elem.nodeType == 8 )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2524
			return;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2525
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2526
		var events = jQuery.data(elem, "events"), ret, index;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2527
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2528
		if ( events ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2529
			// Unbind all events for the element
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2530
			if ( types === undefined || (typeof types === "string" && types.charAt(0) == ".") )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2531
				for ( var type in events )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2532
					this.remove( elem, type + (types || "") );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2533
			else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2534
				// types is actually an event object here
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2535
				if ( types.type ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2536
					handler = types.handler;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2537
					types = types.type;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2538
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2539
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2540
				// Handle multiple events seperated by a space
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2541
				// jQuery(...).unbind("mouseover mouseout", fn);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2542
				jQuery.each(types.split(/\s+/), function(index, type){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2543
					// Namespaced event handlers
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2544
					var namespaces = type.split(".");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2545
					type = namespaces.shift();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2546
					var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2547
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2548
					if ( events[type] ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2549
						// remove the given handler for the given type
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2550
						if ( handler )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2551
							delete events[type][handler.guid];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2552
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2553
						// remove all handlers for the given type
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2554
						else
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2555
							for ( var handle in events[type] )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2556
								// Handle the removal of namespaced events
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2557
								if ( namespace.test(events[type][handle].type) )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2558
									delete events[type][handle];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2559
									
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2560
						if ( jQuery.event.specialAll[type] )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2561
							jQuery.event.specialAll[type].teardown.call(elem, namespaces);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2562
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2563
						// remove generic event handler if no more handlers exist
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2564
						for ( ret in events[type] ) break;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2565
						if ( !ret ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2566
							if ( !jQuery.event.special[type] || jQuery.event.special[type].teardown.call(elem, namespaces) === false ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2567
								if (elem.removeEventListener)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2568
									elem.removeEventListener(type, jQuery.data(elem, "handle"), false);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2569
								else if (elem.detachEvent)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2570
									elem.detachEvent("on" + type, jQuery.data(elem, "handle"));
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2571
							}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2572
							ret = null;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2573
							delete events[type];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2574
						}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2575
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2576
				});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2577
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2578
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2579
			// Remove the expando if it's no longer used
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2580
			for ( ret in events ) break;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2581
			if ( !ret ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2582
				var handle = jQuery.data( elem, "handle" );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2583
				if ( handle ) handle.elem = null;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2584
				jQuery.removeData( elem, "events" );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2585
				jQuery.removeData( elem, "handle" );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2586
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2587
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2588
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2589
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2590
	// bubbling is internal
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2591
	trigger: function( event, data, elem, bubbling ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2592
		// Event object or event type
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2593
		var type = event.type || event;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2594
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2595
		if( !bubbling ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2596
			event = typeof event === "object" ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2597
				// jQuery.Event object
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2598
				event[expando] ? event :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2599
				// Object literal
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2600
				jQuery.extend( jQuery.Event(type), event ) :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2601
				// Just the event type (string)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2602
				jQuery.Event(type);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2603
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2604
			if ( type.indexOf("!") >= 0 ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2605
				event.type = type = type.slice(0, -1);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2606
				event.exclusive = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2607
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2608
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2609
			// Handle a global trigger
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2610
			if ( !elem ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2611
				// Don't bubble custom events when global (to avoid too much overhead)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2612
				event.stopPropagation();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2613
				// Only trigger if we've ever bound an event for it
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2614
				if ( this.global[type] )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2615
					jQuery.each( jQuery.cache, function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2616
						if ( this.events && this.events[type] )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2617
							jQuery.event.trigger( event, data, this.handle.elem );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2618
					});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2619
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2620
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2621
			// Handle triggering a single element
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2622
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2623
			// don't do events on text and comment nodes
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2624
			if ( !elem || elem.nodeType == 3 || elem.nodeType == 8 )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2625
				return undefined;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2626
			
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2627
			// Clean up in case it is reused
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2628
			event.result = undefined;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2629
			event.target = elem;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2630
			
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2631
			// Clone the incoming data, if any
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2632
			data = jQuery.makeArray(data);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2633
			data.unshift( event );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2634
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2635
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2636
		event.currentTarget = elem;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2637
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2638
		// Trigger the event, it is assumed that "handle" is a function
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2639
		var handle = jQuery.data(elem, "handle");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2640
		if ( handle )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2641
			handle.apply( elem, data );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2642
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2643
		// Handle triggering native .onfoo handlers (and on links since we don't call .click() for links)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2644
		if ( (!elem[type] || (jQuery.nodeName(elem, 'a') && type == "click")) && elem["on"+type] && elem["on"+type].apply( elem, data ) === false )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2645
			event.result = false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2646
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2647
		// Trigger the native events (except for clicks on links)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2648
		if ( !bubbling && elem[type] && !event.isDefaultPrevented() && !(jQuery.nodeName(elem, 'a') && type == "click") ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2649
			this.triggered = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2650
			try {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2651
				elem[ type ]();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2652
			// prevent IE from throwing an error for some hidden elements
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2653
			} catch (e) {}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2654
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2655
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2656
		this.triggered = false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2657
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2658
		if ( !event.isPropagationStopped() ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2659
			var parent = elem.parentNode || elem.ownerDocument;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2660
			if ( parent )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2661
				jQuery.event.trigger(event, data, parent, true);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2662
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2663
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2664
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2665
	handle: function(event) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2666
		// returned undefined or false
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2667
		var all, handlers;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2668
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2669
		event = arguments[0] = jQuery.event.fix( event || window.event );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2670
		event.currentTarget = this;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2671
		
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2672
		// Namespaced event handlers
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2673
		var namespaces = event.type.split(".");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2674
		event.type = namespaces.shift();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2675
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2676
		// Cache this now, all = true means, any handler
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2677
		all = !namespaces.length && !event.exclusive;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2678
		
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2679
		var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2680
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2681
		handlers = ( jQuery.data(this, "events") || {} )[event.type];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2682
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2683
		for ( var j in handlers ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2684
			var handler = handlers[j];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2685
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2686
			// Filter the functions by class
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2687
			if ( all || namespace.test(handler.type) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2688
				// Pass in a reference to the handler function itself
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2689
				// So that we can later remove it
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2690
				event.handler = handler;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2691
				event.data = handler.data;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2692
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2693
				var ret = handler.apply(this, arguments);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2694
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2695
				if( ret !== undefined ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2696
					event.result = ret;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2697
					if ( ret === false ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2698
						event.preventDefault();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2699
						event.stopPropagation();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2700
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2701
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2702
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2703
				if( event.isImmediatePropagationStopped() )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2704
					break;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2705
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2706
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2707
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2708
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2709
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2710
	props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2711
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2712
	fix: function(event) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2713
		if ( event[expando] )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2714
			return event;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2715
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2716
		// store a copy of the original event object
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2717
		// and "clone" to set read-only properties
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2718
		var originalEvent = event;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2719
		event = jQuery.Event( originalEvent );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2720
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2721
		for ( var i = this.props.length, prop; i; ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2722
			prop = this.props[ --i ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2723
			event[ prop ] = originalEvent[ prop ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2724
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2725
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2726
		// Fix target property, if necessary
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2727
		if ( !event.target )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2728
			event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2729
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2730
		// check if target is a textnode (safari)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2731
		if ( event.target.nodeType == 3 )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2732
			event.target = event.target.parentNode;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2733
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2734
		// Add relatedTarget, if necessary
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2735
		if ( !event.relatedTarget && event.fromElement )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2736
			event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2737
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2738
		// Calculate pageX/Y if missing and clientX/Y available
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2739
		if ( event.pageX == null && event.clientX != null ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2740
			var doc = document.documentElement, body = document.body;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2741
			event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2742
			event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2743
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2744
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2745
		// Add which for key events
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2746
		if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2747
			event.which = event.charCode || event.keyCode;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2748
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2749
		// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2750
		if ( !event.metaKey && event.ctrlKey )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2751
			event.metaKey = event.ctrlKey;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2752
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2753
		// Add which for click: 1 == left; 2 == middle; 3 == right
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2754
		// Note: button is not normalized, so don't use it
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2755
		if ( !event.which && event.button )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2756
			event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2757
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2758
		return event;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2759
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2760
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2761
	proxy: function( fn, proxy ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2762
		proxy = proxy || function(){ return fn.apply(this, arguments); };
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2763
		// Set the guid of unique handler to the same of original handler, so it can be removed
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2764
		proxy.guid = fn.guid = fn.guid || proxy.guid || this.guid++;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2765
		// So proxy can be declared as an argument
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2766
		return proxy;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2767
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2768
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2769
	special: {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2770
		ready: {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2771
			// Make sure the ready event is setup
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2772
			setup: bindReady,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2773
			teardown: function() {}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2774
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2775
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2776
	
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2777
	specialAll: {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2778
		live: {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2779
			setup: function( selector, namespaces ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2780
				jQuery.event.add( this, namespaces[0], liveHandler );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2781
			},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2782
			teardown:  function( namespaces ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2783
				if ( namespaces.length ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2784
					var remove = 0, name = RegExp("(^|\\.)" + namespaces[0] + "(\\.|$)");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2785
					
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2786
					jQuery.each( (jQuery.data(this, "events").live || {}), function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2787
						if ( name.test(this.type) )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2788
							remove++;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2789
					});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2790
					
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2791
					if ( remove < 1 )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2792
						jQuery.event.remove( this, namespaces[0], liveHandler );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2793
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2794
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2795
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2796
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2797
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2798
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2799
jQuery.Event = function( src ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2800
	// Allow instantiation without the 'new' keyword
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2801
	if( !this.preventDefault )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2802
		return new jQuery.Event(src);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2803
	
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2804
	// Event object
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2805
	if( src && src.type ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2806
		this.originalEvent = src;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2807
		this.type = src.type;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2808
	// Event type
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2809
	}else
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2810
		this.type = src;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2811
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2812
	// timeStamp is buggy for some events on Firefox(#3843)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2813
	// So we won't rely on the native value
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2814
	this.timeStamp = now();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2815
	
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2816
	// Mark it as fixed
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2817
	this[expando] = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2818
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2819
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2820
function returnFalse(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2821
	return false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2822
}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2823
function returnTrue(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2824
	return true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2825
}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2826
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2827
// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2828
// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2829
jQuery.Event.prototype = {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2830
	preventDefault: function() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2831
		this.isDefaultPrevented = returnTrue;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2832
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2833
		var e = this.originalEvent;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2834
		if( !e )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2835
			return;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2836
		// if preventDefault exists run it on the original event
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2837
		if (e.preventDefault)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2838
			e.preventDefault();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2839
		// otherwise set the returnValue property of the original event to false (IE)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2840
		e.returnValue = false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2841
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2842
	stopPropagation: function() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2843
		this.isPropagationStopped = returnTrue;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2844
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2845
		var e = this.originalEvent;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2846
		if( !e )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2847
			return;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2848
		// if stopPropagation exists run it on the original event
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2849
		if (e.stopPropagation)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2850
			e.stopPropagation();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2851
		// otherwise set the cancelBubble property of the original event to true (IE)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2852
		e.cancelBubble = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2853
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2854
	stopImmediatePropagation:function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2855
		this.isImmediatePropagationStopped = returnTrue;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2856
		this.stopPropagation();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2857
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2858
	isDefaultPrevented: returnFalse,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2859
	isPropagationStopped: returnFalse,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2860
	isImmediatePropagationStopped: returnFalse
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2861
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2862
// Checks if an event happened on an element within another element
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2863
// Used in jQuery.event.special.mouseenter and mouseleave handlers
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2864
var withinElement = function(event) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2865
	// Check if mouse(over|out) are still within the same parent element
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2866
	var parent = event.relatedTarget;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2867
	// Traverse up the tree
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2868
	while ( parent && parent != this )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2869
		try { parent = parent.parentNode; }
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2870
		catch(e) { parent = this; }
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2871
	
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2872
	if( parent != this ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2873
		// set the correct event type
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2874
		event.type = event.data;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2875
		// handle event if we actually just moused on to a non sub-element
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2876
		jQuery.event.handle.apply( this, arguments );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2877
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2878
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2879
	
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2880
jQuery.each({ 
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2881
	mouseover: 'mouseenter', 
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2882
	mouseout: 'mouseleave'
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2883
}, function( orig, fix ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2884
	jQuery.event.special[ fix ] = {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2885
		setup: function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2886
			jQuery.event.add( this, orig, withinElement, fix );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2887
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2888
		teardown: function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2889
			jQuery.event.remove( this, orig, withinElement );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2890
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2891
	};			   
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2892
});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2893
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2894
jQuery.fn.extend({
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2895
	bind: function( type, data, fn ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2896
		return type == "unload" ? this.one(type, data, fn) : this.each(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2897
			jQuery.event.add( this, type, fn || data, fn && data );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2898
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2899
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2900
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2901
	one: function( type, data, fn ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2902
		var one = jQuery.event.proxy( fn || data, function(event) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2903
			jQuery(this).unbind(event, one);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2904
			return (fn || data).apply( this, arguments );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2905
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2906
		return this.each(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2907
			jQuery.event.add( this, type, one, fn && data);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2908
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2909
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2910
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2911
	unbind: function( type, fn ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2912
		return this.each(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2913
			jQuery.event.remove( this, type, fn );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2914
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2915
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2916
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2917
	trigger: function( type, data ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2918
		return this.each(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2919
			jQuery.event.trigger( type, data, this );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2920
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2921
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2922
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2923
	triggerHandler: function( type, data ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2924
		if( this[0] ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2925
			var event = jQuery.Event(type);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2926
			event.preventDefault();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2927
			event.stopPropagation();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2928
			jQuery.event.trigger( event, data, this[0] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2929
			return event.result;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2930
		}		
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2931
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2932
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2933
	toggle: function( fn ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2934
		// Save reference to arguments for access in closure
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2935
		var args = arguments, i = 1;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2936
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2937
		// link all the functions, so any of them can unbind this click handler
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2938
		while( i < args.length )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2939
			jQuery.event.proxy( fn, args[i++] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2940
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2941
		return this.click( jQuery.event.proxy( fn, function(event) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2942
			// Figure out which function to execute
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2943
			this.lastToggle = ( this.lastToggle || 0 ) % i;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2944
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2945
			// Make sure that clicks stop
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2946
			event.preventDefault();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2947
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2948
			// and execute the function
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2949
			return args[ this.lastToggle++ ].apply( this, arguments ) || false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2950
		}));
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2951
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2952
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2953
	hover: function(fnOver, fnOut) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2954
		return this.mouseenter(fnOver).mouseleave(fnOut);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2955
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2956
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2957
	ready: function(fn) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2958
		// Attach the listeners
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2959
		bindReady();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2960
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2961
		// If the DOM is already ready
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2962
		if ( jQuery.isReady )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2963
			// Execute the function immediately
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2964
			fn.call( document, jQuery );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2965
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2966
		// Otherwise, remember the function for later
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2967
		else
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2968
			// Add the function to the wait list
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2969
			jQuery.readyList.push( fn );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2970
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2971
		return this;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2972
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2973
	
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2974
	live: function( type, fn ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2975
		var proxy = jQuery.event.proxy( fn );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2976
		proxy.guid += this.selector + type;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2977
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2978
		jQuery(document).bind( liveConvert(type, this.selector), this.selector, proxy );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2979
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2980
		return this;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2981
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2982
	
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2983
	die: function( type, fn ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2984
		jQuery(document).unbind( liveConvert(type, this.selector), fn ? { guid: fn.guid + this.selector + type } : null );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2985
		return this;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2986
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2987
});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2988
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2989
function liveHandler( event ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2990
	var check = RegExp("(^|\\.)" + event.type + "(\\.|$)"),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2991
		stop = true,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2992
		elems = [];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2993
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2994
	jQuery.each(jQuery.data(this, "events").live || [], function(i, fn){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2995
		if ( check.test(fn.type) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2996
			var elem = jQuery(event.target).closest(fn.data)[0];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2997
			if ( elem )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2998
				elems.push({ elem: elem, fn: fn });
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  2999
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3000
	});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3001
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3002
	elems.sort(function(a,b) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3003
		return jQuery.data(a.elem, "closest") - jQuery.data(b.elem, "closest");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3004
	});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3005
	
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3006
	jQuery.each(elems, function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3007
		if ( this.fn.call(this.elem, event, this.fn.data) === false )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3008
			return (stop = false);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3009
	});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3010
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3011
	return stop;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3012
}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3013
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3014
function liveConvert(type, selector){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3015
	return ["live", type, selector.replace(/\./g, "`").replace(/ /g, "|")].join(".");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3016
}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3017
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3018
jQuery.extend({
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3019
	isReady: false,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3020
	readyList: [],
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3021
	// Handle when the DOM is ready
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3022
	ready: function() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3023
		// Make sure that the DOM is not already loaded
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3024
		if ( !jQuery.isReady ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3025
			// Remember that the DOM is ready
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3026
			jQuery.isReady = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3027
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3028
			// If there are functions bound, to execute
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3029
			if ( jQuery.readyList ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3030
				// Execute all of them
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3031
				jQuery.each( jQuery.readyList, function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3032
					this.call( document, jQuery );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3033
				});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3034
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3035
				// Reset the list of functions
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3036
				jQuery.readyList = null;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3037
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3038
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3039
			// Trigger any bound ready events
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3040
			jQuery(document).triggerHandler("ready");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3041
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3042
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3043
});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3044
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3045
var readyBound = false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3046
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3047
function bindReady(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3048
	if ( readyBound ) return;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3049
	readyBound = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3050
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3051
	// Mozilla, Opera and webkit nightlies currently support this event
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3052
	if ( document.addEventListener ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3053
		// Use the handy event callback
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3054
		document.addEventListener( "DOMContentLoaded", function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3055
			document.removeEventListener( "DOMContentLoaded", arguments.callee, false );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3056
			jQuery.ready();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3057
		}, false );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3058
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3059
	// If IE event model is used
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3060
	} else if ( document.attachEvent ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3061
		// ensure firing before onload,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3062
		// maybe late but safe also for iframes
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3063
		document.attachEvent("onreadystatechange", function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3064
			if ( document.readyState === "complete" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3065
				document.detachEvent( "onreadystatechange", arguments.callee );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3066
				jQuery.ready();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3067
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3068
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3069
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3070
		// If IE and not an iframe
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3071
		// continually check to see if the document is ready
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3072
		if ( document.documentElement.doScroll && window == window.top ) (function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3073
			if ( jQuery.isReady ) return;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3074
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3075
			try {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3076
				// If IE is used, use the trick by Diego Perini
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3077
				// http://javascript.nwbox.com/IEContentLoaded/
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3078
				document.documentElement.doScroll("left");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3079
			} catch( error ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3080
				setTimeout( arguments.callee, 0 );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3081
				return;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3082
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3083
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3084
			// and execute any waiting functions
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3085
			jQuery.ready();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3086
		})();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3087
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3088
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3089
	// A fallback to window.onload, that will always work
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3090
	jQuery.event.add( window, "load", jQuery.ready );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3091
}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3092
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3093
jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3094
	"mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave," +
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3095
	"change,select,submit,keydown,keypress,keyup,error").split(","), function(i, name){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3096
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3097
	// Handle event binding
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3098
	jQuery.fn[name] = function(fn){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3099
		return fn ? this.bind(name, fn) : this.trigger(name);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3100
	};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3101
});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3102
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3103
// Prevent memory leaks in IE
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3104
// And prevent errors on refresh with events like mouseover in other browsers
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3105
// Window isn't included so as not to unbind existing unload events
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3106
jQuery( window ).bind( 'unload', function(){ 
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3107
	for ( var id in jQuery.cache )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3108
		// Skip the window
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3109
		if ( id != 1 && jQuery.cache[ id ].handle )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3110
			jQuery.event.remove( jQuery.cache[ id ].handle.elem );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3111
}); 
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3112
(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3113
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3114
	jQuery.support = {};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3115
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3116
	var root = document.documentElement,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3117
		script = document.createElement("script"),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3118
		div = document.createElement("div"),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3119
		id = "script" + (new Date).getTime();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3120
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3121
	div.style.display = "none";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3122
	div.innerHTML = '   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3123
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3124
	var all = div.getElementsByTagName("*"),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3125
		a = div.getElementsByTagName("a")[0];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3126
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3127
	// Can't get basic test support
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3128
	if ( !all || !all.length || !a ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3129
		return;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3130
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3131
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3132
	jQuery.support = {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3133
		// IE strips leading whitespace when .innerHTML is used
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3134
		leadingWhitespace: div.firstChild.nodeType == 3,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3135
		
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3136
		// Make sure that tbody elements aren't automatically inserted
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3137
		// IE will insert them into empty tables
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3138
		tbody: !div.getElementsByTagName("tbody").length,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3139
		
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3140
		// Make sure that you can get all elements in an <object> element
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3141
		// IE 7 always returns no results
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3142
		objectAll: !!div.getElementsByTagName("object")[0]
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3143
			.getElementsByTagName("*").length,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3144
		
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3145
		// Make sure that link elements get serialized correctly by innerHTML
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3146
		// This requires a wrapper element in IE
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3147
		htmlSerialize: !!div.getElementsByTagName("link").length,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3148
		
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3149
		// Get the style information from getAttribute
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3150
		// (IE uses .cssText insted)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3151
		style: /red/.test( a.getAttribute("style") ),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3152
		
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3153
		// Make sure that URLs aren't manipulated
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3154
		// (IE normalizes it by default)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3155
		hrefNormalized: a.getAttribute("href") === "/a",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3156
		
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3157
		// Make sure that element opacity exists
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3158
		// (IE uses filter instead)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3159
		opacity: a.style.opacity === "0.5",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3160
		
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3161
		// Verify style float existence
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3162
		// (IE uses styleFloat instead of cssFloat)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3163
		cssFloat: !!a.style.cssFloat,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3164
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3165
		// Will be defined later
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3166
		scriptEval: false,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3167
		noCloneEvent: true,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3168
		boxModel: null
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3169
	};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3170
	
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3171
	script.type = "text/javascript";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3172
	try {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3173
		script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3174
	} catch(e){}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3175
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3176
	root.insertBefore( script, root.firstChild );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3177
	
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3178
	// Make sure that the execution of code works by injecting a script
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3179
	// tag with appendChild/createTextNode
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3180
	// (IE doesn't support this, fails, and uses .text instead)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3181
	if ( window[ id ] ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3182
		jQuery.support.scriptEval = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3183
		delete window[ id ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3184
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3185
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3186
	root.removeChild( script );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3187
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3188
	if ( div.attachEvent && div.fireEvent ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3189
		div.attachEvent("onclick", function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3190
			// Cloning a node shouldn't copy over any
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3191
			// bound event handlers (IE does this)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3192
			jQuery.support.noCloneEvent = false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3193
			div.detachEvent("onclick", arguments.callee);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3194
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3195
		div.cloneNode(true).fireEvent("onclick");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3196
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3197
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3198
	// Figure out if the W3C box model works as expected
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3199
	// document.body must exist before we can do this
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3200
	jQuery(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3201
		var div = document.createElement("div");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3202
		div.style.width = div.style.paddingLeft = "1px";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3203
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3204
		document.body.appendChild( div );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3205
		jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3206
		document.body.removeChild( div ).style.display = 'none';
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3207
	});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3208
})();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3209
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3210
var styleFloat = jQuery.support.cssFloat ? "cssFloat" : "styleFloat";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3211
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3212
jQuery.props = {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3213
	"for": "htmlFor",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3214
	"class": "className",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3215
	"float": styleFloat,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3216
	cssFloat: styleFloat,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3217
	styleFloat: styleFloat,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3218
	readonly: "readOnly",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3219
	maxlength: "maxLength",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3220
	cellspacing: "cellSpacing",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3221
	rowspan: "rowSpan",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3222
	tabindex: "tabIndex"
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3223
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3224
jQuery.fn.extend({
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3225
	// Keep a copy of the old load
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3226
	_load: jQuery.fn.load,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3227
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3228
	load: function( url, params, callback ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3229
		if ( typeof url !== "string" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3230
			return this._load( url );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3231
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3232
		var off = url.indexOf(" ");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3233
		if ( off >= 0 ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3234
			var selector = url.slice(off, url.length);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3235
			url = url.slice(0, off);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3236
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3237
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3238
		// Default to a GET request
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3239
		var type = "GET";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3240
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3241
		// If the second parameter was provided
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3242
		if ( params )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3243
			// If it's a function
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3244
			if ( jQuery.isFunction( params ) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3245
				// We assume that it's the callback
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3246
				callback = params;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3247
				params = null;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3248
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3249
			// Otherwise, build a param string
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3250
			} else if( typeof params === "object" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3251
				params = jQuery.param( params );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3252
				type = "POST";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3253
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3254
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3255
		var self = this;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3256
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3257
		// Request the remote document
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3258
		jQuery.ajax({
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3259
			url: url,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3260
			type: type,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3261
			dataType: "html",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3262
			data: params,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3263
			complete: function(res, status){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3264
				// If successful, inject the HTML into all the matched elements
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3265
				if ( status == "success" || status == "notmodified" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3266
					// See if a selector was specified
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3267
					self.html( selector ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3268
						// Create a dummy div to hold the results
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3269
						jQuery("<div/>")
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3270
							// inject the contents of the document in, removing the scripts
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3271
							// to avoid any 'Permission Denied' errors in IE
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3272
							.append(res.responseText.replace(/<script(.|\s)*?\/script>/g, ""))
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3273
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3274
							// Locate the specified elements
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3275
							.find(selector) :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3276
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3277
						// If not, just inject the full result
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3278
						res.responseText );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3279
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3280
				if( callback )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3281
					self.each( callback, [res.responseText, status, res] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3282
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3283
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3284
		return this;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3285
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3286
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3287
	serialize: function() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3288
		return jQuery.param(this.serializeArray());
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3289
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3290
	serializeArray: function() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3291
		return this.map(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3292
			return this.elements ? jQuery.makeArray(this.elements) : this;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3293
		})
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3294
		.filter(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3295
			return this.name && !this.disabled &&
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3296
				(this.checked || /select|textarea/i.test(this.nodeName) ||
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3297
					/text|hidden|password|search/i.test(this.type));
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3298
		})
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3299
		.map(function(i, elem){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3300
			var val = jQuery(this).val();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3301
			return val == null ? null :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3302
				jQuery.isArray(val) ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3303
					jQuery.map( val, function(val, i){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3304
						return {name: elem.name, value: val};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3305
					}) :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3306
					{name: elem.name, value: val};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3307
		}).get();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3308
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3309
});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3310
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3311
// Attach a bunch of functions for handling common AJAX events
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3312
jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3313
	jQuery.fn[o] = function(f){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3314
		return this.bind(o, f);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3315
	};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3316
});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3317
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3318
var jsc = now();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3319
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3320
jQuery.extend({
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3321
  
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3322
	get: function( url, data, callback, type ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3323
		// shift arguments if data argument was ommited
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3324
		if ( jQuery.isFunction( data ) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3325
			callback = data;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3326
			data = null;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3327
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3328
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3329
		return jQuery.ajax({
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3330
			type: "GET",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3331
			url: url,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3332
			data: data,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3333
			success: callback,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3334
			dataType: type
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3335
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3336
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3337
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3338
	getScript: function( url, callback ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3339
		return jQuery.get(url, null, callback, "script");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3340
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3341
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3342
	getJSON: function( url, data, callback ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3343
		return jQuery.get(url, data, callback, "json");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3344
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3345
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3346
	post: function( url, data, callback, type ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3347
		if ( jQuery.isFunction( data ) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3348
			callback = data;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3349
			data = {};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3350
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3351
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3352
		return jQuery.ajax({
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3353
			type: "POST",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3354
			url: url,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3355
			data: data,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3356
			success: callback,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3357
			dataType: type
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3358
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3359
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3360
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3361
	ajaxSetup: function( settings ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3362
		jQuery.extend( jQuery.ajaxSettings, settings );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3363
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3364
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3365
	ajaxSettings: {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3366
		url: location.href,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3367
		global: true,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3368
		type: "GET",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3369
		contentType: "application/x-www-form-urlencoded",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3370
		processData: true,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3371
		async: true,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3372
		/*
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3373
		timeout: 0,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3374
		data: null,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3375
		username: null,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3376
		password: null,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3377
		*/
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3378
		// Create the request object; Microsoft failed to properly
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3379
		// implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3380
		// This function can be overriden by calling jQuery.ajaxSetup
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3381
		xhr:function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3382
			return window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3383
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3384
		accepts: {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3385
			xml: "application/xml, text/xml",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3386
			html: "text/html",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3387
			script: "text/javascript, application/javascript",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3388
			json: "application/json, text/javascript",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3389
			text: "text/plain",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3390
			_default: "*/*"
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3391
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3392
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3393
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3394
	// Last-Modified header cache for next request
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3395
	lastModified: {},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3396
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3397
	ajax: function( s ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3398
		// Extend the settings, but re-extend 's' so that it can be
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3399
		// checked again later (in the test suite, specifically)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3400
		s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s));
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3401
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3402
		var jsonp, jsre = /=\?(&|$)/g, status, data,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3403
			type = s.type.toUpperCase();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3404
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3405
		// convert data if not already a string
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3406
		if ( s.data && s.processData && typeof s.data !== "string" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3407
			s.data = jQuery.param(s.data);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3408
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3409
		// Handle JSONP Parameter Callbacks
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3410
		if ( s.dataType == "jsonp" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3411
			if ( type == "GET" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3412
				if ( !s.url.match(jsre) )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3413
					s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3414
			} else if ( !s.data || !s.data.match(jsre) )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3415
				s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3416
			s.dataType = "json";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3417
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3418
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3419
		// Build temporary JSONP function
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3420
		if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3421
			jsonp = "jsonp" + jsc++;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3422
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3423
			// Replace the =? sequence both in the query string and the data
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3424
			if ( s.data )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3425
				s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3426
			s.url = s.url.replace(jsre, "=" + jsonp + "$1");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3427
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3428
			// We need to make sure
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3429
			// that a JSONP style response is executed properly
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3430
			s.dataType = "script";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3431
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3432
			// Handle JSONP-style loading
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3433
			window[ jsonp ] = function(tmp){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3434
				data = tmp;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3435
				success();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3436
				complete();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3437
				// Garbage collect
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3438
				window[ jsonp ] = undefined;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3439
				try{ delete window[ jsonp ]; } catch(e){}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3440
				if ( head )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3441
					head.removeChild( script );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3442
			};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3443
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3444
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3445
		if ( s.dataType == "script" && s.cache == null )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3446
			s.cache = false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3447
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3448
		if ( s.cache === false && type == "GET" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3449
			var ts = now();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3450
			// try replacing _= if it is there
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3451
			var ret = s.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + ts + "$2");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3452
			// if nothing was replaced, add timestamp to the end
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3453
			s.url = ret + ((ret == s.url) ? (s.url.match(/\?/) ? "&" : "?") + "_=" + ts : "");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3454
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3455
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3456
		// If data is available, append data to url for get requests
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3457
		if ( s.data && type == "GET" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3458
			s.url += (s.url.match(/\?/) ? "&" : "?") + s.data;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3459
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3460
			// IE likes to send both get and post data, prevent this
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3461
			s.data = null;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3462
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3463
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3464
		// Watch for a new set of requests
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3465
		if ( s.global && ! jQuery.active++ )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3466
			jQuery.event.trigger( "ajaxStart" );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3467
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3468
		// Matches an absolute URL, and saves the domain
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3469
		var parts = /^(\w+:)?\/\/([^\/?#]+)/.exec( s.url );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3470
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3471
		// If we're requesting a remote document
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3472
		// and trying to load JSON or Script with a GET
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3473
		if ( s.dataType == "script" && type == "GET" && parts
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3474
			&& ( parts[1] && parts[1] != location.protocol || parts[2] != location.host )){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3475
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3476
			var head = document.getElementsByTagName("head")[0];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3477
			var script = document.createElement("script");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3478
			script.src = s.url;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3479
			if (s.scriptCharset)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3480
				script.charset = s.scriptCharset;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3481
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3482
			// Handle Script loading
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3483
			if ( !jsonp ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3484
				var done = false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3485
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3486
				// Attach handlers for all browsers
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3487
				script.onload = script.onreadystatechange = function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3488
					if ( !done && (!this.readyState ||
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3489
							this.readyState == "loaded" || this.readyState == "complete") ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3490
						done = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3491
						success();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3492
						complete();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3493
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3494
						// Handle memory leak in IE
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3495
						script.onload = script.onreadystatechange = null;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3496
						head.removeChild( script );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3497
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3498
				};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3499
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3500
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3501
			head.appendChild(script);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3502
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3503
			// We handle everything using the script element injection
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3504
			return undefined;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3505
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3506
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3507
		var requestDone = false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3508
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3509
		// Create the request object
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3510
		var xhr = s.xhr();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3511
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3512
		// Open the socket
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3513
		// Passing null username, generates a login popup on Opera (#2865)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3514
		if( s.username )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3515
			xhr.open(type, s.url, s.async, s.username, s.password);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3516
		else
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3517
			xhr.open(type, s.url, s.async);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3518
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3519
		// Need an extra try/catch for cross domain requests in Firefox 3
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3520
		try {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3521
			// Set the correct header, if data is being sent
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3522
			if ( s.data )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3523
				xhr.setRequestHeader("Content-Type", s.contentType);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3524
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3525
			// Set the If-Modified-Since header, if ifModified mode.
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3526
			if ( s.ifModified )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3527
				xhr.setRequestHeader("If-Modified-Since",
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3528
					jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3529
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3530
			// Set header so the called script knows that it's an XMLHttpRequest
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3531
			xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3532
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3533
			// Set the Accepts header for the server, depending on the dataType
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3534
			xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3535
				s.accepts[ s.dataType ] + ", */*" :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3536
				s.accepts._default );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3537
		} catch(e){}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3538
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3539
		// Allow custom headers/mimetypes and early abort
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3540
		if ( s.beforeSend && s.beforeSend(xhr, s) === false ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3541
			// Handle the global AJAX counter
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3542
			if ( s.global && ! --jQuery.active )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3543
				jQuery.event.trigger( "ajaxStop" );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3544
			// close opended socket
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3545
			xhr.abort();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3546
			return false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3547
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3548
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3549
		if ( s.global )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3550
			jQuery.event.trigger("ajaxSend", [xhr, s]);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3551
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3552
		// Wait for a response to come back
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3553
		var onreadystatechange = function(isTimeout){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3554
			// The request was aborted, clear the interval and decrement jQuery.active
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3555
			if (xhr.readyState == 0) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3556
				if (ival) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3557
					// clear poll interval
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3558
					clearInterval(ival);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3559
					ival = null;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3560
					// Handle the global AJAX counter
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3561
					if ( s.global && ! --jQuery.active )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3562
						jQuery.event.trigger( "ajaxStop" );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3563
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3564
			// The transfer is complete and the data is available, or the request timed out
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3565
			} else if ( !requestDone && xhr && (xhr.readyState == 4 || isTimeout == "timeout") ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3566
				requestDone = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3567
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3568
				// clear poll interval
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3569
				if (ival) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3570
					clearInterval(ival);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3571
					ival = null;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3572
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3573
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3574
				status = isTimeout == "timeout" ? "timeout" :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3575
					!jQuery.httpSuccess( xhr ) ? "error" :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3576
					s.ifModified && jQuery.httpNotModified( xhr, s.url ) ? "notmodified" :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3577
					"success";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3578
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3579
				if ( status == "success" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3580
					// Watch for, and catch, XML document parse errors
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3581
					try {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3582
						// process the data (runs the xml through httpData regardless of callback)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3583
						data = jQuery.httpData( xhr, s.dataType, s );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3584
					} catch(e) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3585
						status = "parsererror";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3586
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3587
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3588
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3589
				// Make sure that the request was successful or notmodified
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3590
				if ( status == "success" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3591
					// Cache Last-Modified header, if ifModified mode.
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3592
					var modRes;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3593
					try {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3594
						modRes = xhr.getResponseHeader("Last-Modified");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3595
					} catch(e) {} // swallow exception thrown by FF if header is not available
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3596
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3597
					if ( s.ifModified && modRes )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3598
						jQuery.lastModified[s.url] = modRes;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3599
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3600
					// JSONP handles its own success callback
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3601
					if ( !jsonp )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3602
						success();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3603
				} else
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3604
					jQuery.handleError(s, xhr, status);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3605
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3606
				// Fire the complete handlers
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3607
				complete();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3608
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3609
				if ( isTimeout )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3610
					xhr.abort();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3611
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3612
				// Stop memory leaks
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3613
				if ( s.async )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3614
					xhr = null;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3615
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3616
		};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3617
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3618
		if ( s.async ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3619
			// don't attach the handler to the request, just poll it instead
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3620
			var ival = setInterval(onreadystatechange, 13);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3621
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3622
			// Timeout checker
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3623
			if ( s.timeout > 0 )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3624
				setTimeout(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3625
					// Check to see if the request is still happening
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3626
					if ( xhr && !requestDone )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3627
						onreadystatechange( "timeout" );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3628
				}, s.timeout);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3629
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3630
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3631
		// Send the data
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3632
		try {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3633
			xhr.send(s.data);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3634
		} catch(e) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3635
			jQuery.handleError(s, xhr, null, e);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3636
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3637
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3638
		// firefox 1.5 doesn't fire statechange for sync requests
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3639
		if ( !s.async )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3640
			onreadystatechange();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3641
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3642
		function success(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3643
			// If a local callback was specified, fire it and pass it the data
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3644
			if ( s.success )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3645
				s.success( data, status );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3646
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3647
			// Fire the global callback
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3648
			if ( s.global )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3649
				jQuery.event.trigger( "ajaxSuccess", [xhr, s] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3650
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3651
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3652
		function complete(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3653
			// Process result
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3654
			if ( s.complete )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3655
				s.complete(xhr, status);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3656
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3657
			// The request was completed
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3658
			if ( s.global )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3659
				jQuery.event.trigger( "ajaxComplete", [xhr, s] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3660
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3661
			// Handle the global AJAX counter
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3662
			if ( s.global && ! --jQuery.active )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3663
				jQuery.event.trigger( "ajaxStop" );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3664
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3665
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3666
		// return XMLHttpRequest to allow aborting the request etc.
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3667
		return xhr;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3668
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3669
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3670
	handleError: function( s, xhr, status, e ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3671
		// If a local callback was specified, fire it
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3672
		if ( s.error ) s.error( xhr, status, e );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3673
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3674
		// Fire the global callback
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3675
		if ( s.global )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3676
			jQuery.event.trigger( "ajaxError", [xhr, s, e] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3677
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3678
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3679
	// Counter for holding the number of active queries
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3680
	active: 0,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3681
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3682
	// Determines if an XMLHttpRequest was successful or not
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3683
	httpSuccess: function( xhr ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3684
		try {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3685
			// IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3686
			return !xhr.status && location.protocol == "file:" ||
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3687
				( xhr.status >= 200 && xhr.status < 300 ) || xhr.status == 304 || xhr.status == 1223;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3688
		} catch(e){}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3689
		return false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3690
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3691
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3692
	// Determines if an XMLHttpRequest returns NotModified
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3693
	httpNotModified: function( xhr, url ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3694
		try {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3695
			var xhrRes = xhr.getResponseHeader("Last-Modified");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3696
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3697
			// Firefox always returns 200. check Last-Modified date
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3698
			return xhr.status == 304 || xhrRes == jQuery.lastModified[url];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3699
		} catch(e){}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3700
		return false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3701
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3702
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3703
	httpData: function( xhr, type, s ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3704
		var ct = xhr.getResponseHeader("content-type"),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3705
			xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3706
			data = xml ? xhr.responseXML : xhr.responseText;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3707
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3708
		if ( xml && data.documentElement.tagName == "parsererror" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3709
			throw "parsererror";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3710
			
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3711
		// Allow a pre-filtering function to sanitize the response
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3712
		// s != null is checked to keep backwards compatibility
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3713
		if( s && s.dataFilter )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3714
			data = s.dataFilter( data, type );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3715
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3716
		// The filter can actually parse the response
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3717
		if( typeof data === "string" ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3718
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3719
			// If the type is "script", eval it in global context
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3720
			if ( type == "script" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3721
				jQuery.globalEval( data );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3722
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3723
			// Get the JavaScript object, if JSON is used.
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3724
			if ( type == "json" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3725
				data = window["eval"]("(" + data + ")");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3726
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3727
		
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3728
		return data;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3729
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3730
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3731
	// Serialize an array of form elements or a set of
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3732
	// key/values into a query string
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3733
	param: function( a ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3734
		var s = [ ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3735
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3736
		function add( key, value ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3737
			s[ s.length ] = encodeURIComponent(key) + '=' + encodeURIComponent(value);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3738
		};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3739
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3740
		// If an array was passed in, assume that it is an array
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3741
		// of form elements
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3742
		if ( jQuery.isArray(a) || a.jquery )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3743
			// Serialize the form elements
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3744
			jQuery.each( a, function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3745
				add( this.name, this.value );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3746
			});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3747
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3748
		// Otherwise, assume that it's an object of key/value pairs
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3749
		else
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3750
			// Serialize the key/values
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3751
			for ( var j in a )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3752
				// If the value is an array then the key names need to be repeated
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3753
				if ( jQuery.isArray(a[j]) )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3754
					jQuery.each( a[j], function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3755
						add( j, this );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3756
					});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3757
				else
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3758
					add( j, jQuery.isFunction(a[j]) ? a[j]() : a[j] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3759
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3760
		// Return the resulting serialization
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3761
		return s.join("&").replace(/%20/g, "+");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3762
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3763
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3764
});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3765
var elemdisplay = {},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3766
	timerId,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3767
	fxAttrs = [
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3768
		// height animations
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3769
		[ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3770
		// width animations
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3771
		[ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3772
		// opacity animations
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3773
		[ "opacity" ]
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3774
	];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3775
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3776
function genFx( type, num ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3777
	var obj = {};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3778
	jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3779
		obj[ this ] = type;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3780
	});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3781
	return obj;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3782
}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3783
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3784
jQuery.fn.extend({
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3785
	show: function(speed,callback){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3786
		if ( speed ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3787
			return this.animate( genFx("show", 3), speed, callback);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3788
		} else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3789
			for ( var i = 0, l = this.length; i < l; i++ ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3790
				var old = jQuery.data(this[i], "olddisplay");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3791
				
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3792
				this[i].style.display = old || "";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3793
				
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3794
				if ( jQuery.css(this[i], "display") === "none" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3795
					var tagName = this[i].tagName, display;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3796
					
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3797
					if ( elemdisplay[ tagName ] ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3798
						display = elemdisplay[ tagName ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3799
					} else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3800
						var elem = jQuery("<" + tagName + " />").appendTo("body");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3801
						
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3802
						display = elem.css("display");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3803
						if ( display === "none" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3804
							display = "block";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3805
						
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3806
						elem.remove();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3807
						
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3808
						elemdisplay[ tagName ] = display;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3809
					}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3810
					
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3811
					jQuery.data(this[i], "olddisplay", display);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3812
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3813
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3814
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3815
			// Set the display of the elements in a second loop
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3816
			// to avoid the constant reflow
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3817
			for ( var i = 0, l = this.length; i < l; i++ ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3818
				this[i].style.display = jQuery.data(this[i], "olddisplay") || "";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3819
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3820
			
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3821
			return this;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3822
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3823
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3824
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3825
	hide: function(speed,callback){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3826
		if ( speed ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3827
			return this.animate( genFx("hide", 3), speed, callback);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3828
		} else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3829
			for ( var i = 0, l = this.length; i < l; i++ ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3830
				var old = jQuery.data(this[i], "olddisplay");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3831
				if ( !old && old !== "none" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3832
					jQuery.data(this[i], "olddisplay", jQuery.css(this[i], "display"));
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3833
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3834
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3835
			// Set the display of the elements in a second loop
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3836
			// to avoid the constant reflow
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3837
			for ( var i = 0, l = this.length; i < l; i++ ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3838
				this[i].style.display = "none";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3839
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3840
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3841
			return this;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3842
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3843
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3844
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3845
	// Save the old toggle function
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3846
	_toggle: jQuery.fn.toggle,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3847
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3848
	toggle: function( fn, fn2 ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3849
		var bool = typeof fn === "boolean";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3850
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3851
		return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3852
			this._toggle.apply( this, arguments ) :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3853
			fn == null || bool ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3854
				this.each(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3855
					var state = bool ? fn : jQuery(this).is(":hidden");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3856
					jQuery(this)[ state ? "show" : "hide" ]();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3857
				}) :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3858
				this.animate(genFx("toggle", 3), fn, fn2);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3859
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3860
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3861
	fadeTo: function(speed,to,callback){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3862
		return this.animate({opacity: to}, speed, callback);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3863
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3864
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3865
	animate: function( prop, speed, easing, callback ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3866
		var optall = jQuery.speed(speed, easing, callback);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3867
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3868
		return this[ optall.queue === false ? "each" : "queue" ](function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3869
		
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3870
			var opt = jQuery.extend({}, optall), p,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3871
				hidden = this.nodeType == 1 && jQuery(this).is(":hidden"),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3872
				self = this;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3873
	
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3874
			for ( p in prop ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3875
				if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3876
					return opt.complete.call(this);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3877
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3878
				if ( ( p == "height" || p == "width" ) && this.style ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3879
					// Store display property
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3880
					opt.display = jQuery.css(this, "display");
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3881
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3882
					// Make sure that nothing sneaks out
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3883
					opt.overflow = this.style.overflow;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3884
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3885
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3886
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3887
			if ( opt.overflow != null )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3888
				this.style.overflow = "hidden";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3889
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3890
			opt.curAnim = jQuery.extend({}, prop);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3891
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3892
			jQuery.each( prop, function(name, val){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3893
				var e = new jQuery.fx( self, opt, name );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3894
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3895
				if ( /toggle|show|hide/.test(val) )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3896
					e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3897
				else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3898
					var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3899
						start = e.cur(true) || 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3900
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3901
					if ( parts ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3902
						var end = parseFloat(parts[2]),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3903
							unit = parts[3] || "px";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3904
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3905
						// We need to compute starting value
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3906
						if ( unit != "px" ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3907
							self.style[ name ] = (end || 1) + unit;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3908
							start = ((end || 1) / e.cur(true)) * start;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3909
							self.style[ name ] = start + unit;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3910
						}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3911
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3912
						// If a +=/-= token was provided, we're doing a relative animation
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3913
						if ( parts[1] )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3914
							end = ((parts[1] == "-=" ? -1 : 1) * end) + start;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3915
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3916
						e.custom( start, end, unit );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3917
					} else
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3918
						e.custom( start, val, "" );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3919
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3920
			});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3921
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3922
			// For JS strict compliance
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3923
			return true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3924
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3925
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3926
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3927
	stop: function(clearQueue, gotoEnd){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3928
		var timers = jQuery.timers;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3929
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3930
		if (clearQueue)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3931
			this.queue([]);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3932
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3933
		this.each(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3934
			// go in reverse order so anything added to the queue during the loop is ignored
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3935
			for ( var i = timers.length - 1; i >= 0; i-- )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3936
				if ( timers[i].elem == this ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3937
					if (gotoEnd)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3938
						// force the next step to be the last
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3939
						timers[i](true);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3940
					timers.splice(i, 1);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3941
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3942
		});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3943
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3944
		// start the next in the queue if the last step wasn't forced
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3945
		if (!gotoEnd)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3946
			this.dequeue();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3947
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3948
		return this;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3949
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3950
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3951
});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3952
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3953
// Generate shortcuts for custom animations
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3954
jQuery.each({
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3955
	slideDown: genFx("show", 1),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3956
	slideUp: genFx("hide", 1),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3957
	slideToggle: genFx("toggle", 1),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3958
	fadeIn: { opacity: "show" },
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3959
	fadeOut: { opacity: "hide" }
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3960
}, function( name, props ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3961
	jQuery.fn[ name ] = function( speed, callback ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3962
		return this.animate( props, speed, callback );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3963
	};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3964
});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3965
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3966
jQuery.extend({
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3967
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3968
	speed: function(speed, easing, fn) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3969
		var opt = typeof speed === "object" ? speed : {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3970
			complete: fn || !fn && easing ||
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3971
				jQuery.isFunction( speed ) && speed,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3972
			duration: speed,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3973
			easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3974
		};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3975
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3976
		opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3977
			jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3978
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3979
		// Queueing
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3980
		opt.old = opt.complete;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3981
		opt.complete = function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3982
			if ( opt.queue !== false )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3983
				jQuery(this).dequeue();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3984
			if ( jQuery.isFunction( opt.old ) )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3985
				opt.old.call( this );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3986
		};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3987
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3988
		return opt;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3989
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3990
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3991
	easing: {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3992
		linear: function( p, n, firstNum, diff ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3993
			return firstNum + diff * p;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3994
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3995
		swing: function( p, n, firstNum, diff ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3996
			return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3997
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3998
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  3999
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4000
	timers: [],
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4001
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4002
	fx: function( elem, options, prop ){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4003
		this.options = options;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4004
		this.elem = elem;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4005
		this.prop = prop;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4006
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4007
		if ( !options.orig )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4008
			options.orig = {};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4009
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4010
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4011
});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4012
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4013
jQuery.fx.prototype = {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4014
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4015
	// Simple function for setting a style value
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4016
	update: function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4017
		if ( this.options.step )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4018
			this.options.step.call( this.elem, this.now, this );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4019
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4020
		(jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4021
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4022
		// Set display property to block for height/width animations
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4023
		if ( ( this.prop == "height" || this.prop == "width" ) && this.elem.style )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4024
			this.elem.style.display = "block";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4025
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4026
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4027
	// Get the current size
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4028
	cur: function(force){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4029
		if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4030
			return this.elem[ this.prop ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4031
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4032
		var r = parseFloat(jQuery.css(this.elem, this.prop, force));
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4033
		return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4034
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4035
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4036
	// Start an animation from one number to another
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4037
	custom: function(from, to, unit){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4038
		this.startTime = now();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4039
		this.start = from;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4040
		this.end = to;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4041
		this.unit = unit || this.unit || "px";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4042
		this.now = this.start;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4043
		this.pos = this.state = 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4044
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4045
		var self = this;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4046
		function t(gotoEnd){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4047
			return self.step(gotoEnd);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4048
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4049
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4050
		t.elem = this.elem;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4051
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4052
		if ( t() && jQuery.timers.push(t) && !timerId ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4053
			timerId = setInterval(function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4054
				var timers = jQuery.timers;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4055
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4056
				for ( var i = 0; i < timers.length; i++ )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4057
					if ( !timers[i]() )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4058
						timers.splice(i--, 1);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4059
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4060
				if ( !timers.length ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4061
					clearInterval( timerId );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4062
					timerId = undefined;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4063
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4064
			}, 13);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4065
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4066
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4067
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4068
	// Simple 'show' function
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4069
	show: function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4070
		// Remember where we started, so that we can go back to it later
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4071
		this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4072
		this.options.show = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4073
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4074
		// Begin the animation
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4075
		// Make sure that we start at a small width/height to avoid any
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4076
		// flash of content
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4077
		this.custom(this.prop == "width" || this.prop == "height" ? 1 : 0, this.cur());
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4078
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4079
		// Start by showing the element
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4080
		jQuery(this.elem).show();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4081
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4082
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4083
	// Simple 'hide' function
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4084
	hide: function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4085
		// Remember where we started, so that we can go back to it later
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4086
		this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4087
		this.options.hide = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4088
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4089
		// Begin the animation
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4090
		this.custom(this.cur(), 0);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4091
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4092
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4093
	// Each step of an animation
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4094
	step: function(gotoEnd){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4095
		var t = now();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4096
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4097
		if ( gotoEnd || t >= this.options.duration + this.startTime ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4098
			this.now = this.end;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4099
			this.pos = this.state = 1;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4100
			this.update();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4101
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4102
			this.options.curAnim[ this.prop ] = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4103
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4104
			var done = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4105
			for ( var i in this.options.curAnim )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4106
				if ( this.options.curAnim[i] !== true )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4107
					done = false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4108
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4109
			if ( done ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4110
				if ( this.options.display != null ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4111
					// Reset the overflow
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4112
					this.elem.style.overflow = this.options.overflow;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4113
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4114
					// Reset the display
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4115
					this.elem.style.display = this.options.display;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4116
					if ( jQuery.css(this.elem, "display") == "none" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4117
						this.elem.style.display = "block";
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4118
				}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4119
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4120
				// Hide the element if the "hide" operation was done
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4121
				if ( this.options.hide )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4122
					jQuery(this.elem).hide();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4123
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4124
				// Reset the properties, if the item has been hidden or shown
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4125
				if ( this.options.hide || this.options.show )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4126
					for ( var p in this.options.curAnim )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4127
						jQuery.attr(this.elem.style, p, this.options.orig[p]);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4128
					
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4129
				// Execute the complete function
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4130
				this.options.complete.call( this.elem );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4131
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4132
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4133
			return false;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4134
		} else {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4135
			var n = t - this.startTime;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4136
			this.state = n / this.options.duration;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4137
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4138
			// Perform the easing function, defaults to swing
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4139
			this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4140
			this.now = this.start + ((this.end - this.start) * this.pos);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4141
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4142
			// Perform the next step of the animation
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4143
			this.update();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4144
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4145
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4146
		return true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4147
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4148
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4149
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4150
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4151
jQuery.extend( jQuery.fx, {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4152
	speeds:{
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4153
		slow: 600,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4154
 		fast: 200,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4155
 		// Default speed
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4156
 		_default: 400
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4157
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4158
	step: {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4159
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4160
		opacity: function(fx){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4161
			jQuery.attr(fx.elem.style, "opacity", fx.now);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4162
		},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4163
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4164
		_default: function(fx){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4165
			if ( fx.elem.style && fx.elem.style[ fx.prop ] != null )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4166
				fx.elem.style[ fx.prop ] = fx.now + fx.unit;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4167
			else
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4168
				fx.elem[ fx.prop ] = fx.now;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4169
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4170
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4171
});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4172
if ( document.documentElement["getBoundingClientRect"] )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4173
	jQuery.fn.offset = function() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4174
		if ( !this[0] ) return { top: 0, left: 0 };
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4175
		if ( this[0] === this[0].ownerDocument.body ) return jQuery.offset.bodyOffset( this[0] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4176
		var box  = this[0].getBoundingClientRect(), doc = this[0].ownerDocument, body = doc.body, docElem = doc.documentElement,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4177
			clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4178
			top  = box.top  + (self.pageYOffset || jQuery.boxModel && docElem.scrollTop  || body.scrollTop ) - clientTop,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4179
			left = box.left + (self.pageXOffset || jQuery.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4180
		return { top: top, left: left };
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4181
	};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4182
else 
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4183
	jQuery.fn.offset = function() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4184
		if ( !this[0] ) return { top: 0, left: 0 };
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4185
		if ( this[0] === this[0].ownerDocument.body ) return jQuery.offset.bodyOffset( this[0] );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4186
		jQuery.offset.initialized || jQuery.offset.initialize();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4187
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4188
		var elem = this[0], offsetParent = elem.offsetParent, prevOffsetParent = elem,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4189
			doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4190
			body = doc.body, defaultView = doc.defaultView,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4191
			prevComputedStyle = defaultView.getComputedStyle(elem, null),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4192
			top = elem.offsetTop, left = elem.offsetLeft;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4193
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4194
		while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4195
			computedStyle = defaultView.getComputedStyle(elem, null);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4196
			top -= elem.scrollTop, left -= elem.scrollLeft;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4197
			if ( elem === offsetParent ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4198
				top += elem.offsetTop, left += elem.offsetLeft;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4199
				if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(elem.tagName)) )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4200
					top  += parseInt( computedStyle.borderTopWidth,  10) || 0,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4201
					left += parseInt( computedStyle.borderLeftWidth, 10) || 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4202
				prevOffsetParent = offsetParent, offsetParent = elem.offsetParent;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4203
			}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4204
			if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4205
				top  += parseInt( computedStyle.borderTopWidth,  10) || 0,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4206
				left += parseInt( computedStyle.borderLeftWidth, 10) || 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4207
			prevComputedStyle = computedStyle;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4208
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4209
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4210
		if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4211
			top  += body.offsetTop,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4212
			left += body.offsetLeft;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4213
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4214
		if ( prevComputedStyle.position === "fixed" )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4215
			top  += Math.max(docElem.scrollTop, body.scrollTop),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4216
			left += Math.max(docElem.scrollLeft, body.scrollLeft);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4217
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4218
		return { top: top, left: left };
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4219
	};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4220
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4221
jQuery.offset = {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4222
	initialize: function() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4223
		if ( this.initialized ) return;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4224
		var body = document.body, container = document.createElement('div'), innerDiv, checkDiv, table, td, rules, prop, bodyMarginTop = body.style.marginTop,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4225
			html = '<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4226
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4227
		rules = { position: 'absolute', top: 0, left: 0, margin: 0, border: 0, width: '1px', height: '1px', visibility: 'hidden' };
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4228
		for ( prop in rules ) container.style[prop] = rules[prop];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4229
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4230
		container.innerHTML = html;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4231
		body.insertBefore(container, body.firstChild);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4232
		innerDiv = container.firstChild, checkDiv = innerDiv.firstChild, td = innerDiv.nextSibling.firstChild.firstChild;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4233
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4234
		this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4235
		this.doesAddBorderForTableAndCells = (td.offsetTop === 5);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4236
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4237
		innerDiv.style.overflow = 'hidden', innerDiv.style.position = 'relative';
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4238
		this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4239
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4240
		body.style.marginTop = '1px';
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4241
		this.doesNotIncludeMarginInBodyOffset = (body.offsetTop === 0);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4242
		body.style.marginTop = bodyMarginTop;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4243
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4244
		body.removeChild(container);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4245
		this.initialized = true;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4246
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4247
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4248
	bodyOffset: function(body) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4249
		jQuery.offset.initialized || jQuery.offset.initialize();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4250
		var top = body.offsetTop, left = body.offsetLeft;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4251
		if ( jQuery.offset.doesNotIncludeMarginInBodyOffset )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4252
			top  += parseInt( jQuery.curCSS(body, 'marginTop',  true), 10 ) || 0,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4253
			left += parseInt( jQuery.curCSS(body, 'marginLeft', true), 10 ) || 0;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4254
		return { top: top, left: left };
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4255
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4256
};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4257
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4258
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4259
jQuery.fn.extend({
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4260
	position: function() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4261
		var left = 0, top = 0, results;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4262
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4263
		if ( this[0] ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4264
			// Get *real* offsetParent
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4265
			var offsetParent = this.offsetParent(),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4266
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4267
			// Get correct offsets
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4268
			offset       = this.offset(),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4269
			parentOffset = /^body|html$/i.test(offsetParent[0].tagName) ? { top: 0, left: 0 } : offsetParent.offset();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4270
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4271
			// Subtract element margins
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4272
			// note: when an element has margin: auto the offsetLeft and marginLeft 
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4273
			// are the same in Safari causing offset.left to incorrectly be 0
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4274
			offset.top  -= num( this, 'marginTop'  );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4275
			offset.left -= num( this, 'marginLeft' );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4276
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4277
			// Add offsetParent borders
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4278
			parentOffset.top  += num( offsetParent, 'borderTopWidth'  );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4279
			parentOffset.left += num( offsetParent, 'borderLeftWidth' );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4280
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4281
			// Subtract the two offsets
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4282
			results = {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4283
				top:  offset.top  - parentOffset.top,
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4284
				left: offset.left - parentOffset.left
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4285
			};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4286
		}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4287
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4288
		return results;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4289
	},
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4290
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4291
	offsetParent: function() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4292
		var offsetParent = this[0].offsetParent || document.body;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4293
		while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && jQuery.css(offsetParent, 'position') == 'static') )
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4294
			offsetParent = offsetParent.offsetParent;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4295
		return jQuery(offsetParent);
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4296
	}
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4297
});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4298
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4299
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4300
// Create scrollLeft and scrollTop methods
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4301
jQuery.each( ['Left', 'Top'], function(i, name) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4302
	var method = 'scroll' + name;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4303
	
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4304
	jQuery.fn[ method ] = function(val) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4305
		if (!this[0]) return null;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4306
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4307
		return val !== undefined ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4308
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4309
			// Set the scroll offset
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4310
			this.each(function() {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4311
				this == window || this == document ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4312
					window.scrollTo(
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4313
						!i ? val : jQuery(window).scrollLeft(),
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4314
						 i ? val : jQuery(window).scrollTop()
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4315
					) :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4316
					this[ method ] = val;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4317
			}) :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4318
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4319
			// Return the scroll offset
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4320
			this[0] == window || this[0] == document ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4321
				self[ i ? 'pageYOffset' : 'pageXOffset' ] ||
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4322
					jQuery.boxModel && document.documentElement[ method ] ||
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4323
					document.body[ method ] :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4324
				this[0][ method ];
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4325
	};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4326
});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4327
// Create innerHeight, innerWidth, outerHeight and outerWidth methods
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4328
jQuery.each([ "Height", "Width" ], function(i, name){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4329
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4330
	var tl = i ? "Left"  : "Top",  // top or left
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4331
		br = i ? "Right" : "Bottom", // bottom or right
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4332
		lower = name.toLowerCase();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4333
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4334
	// innerHeight and innerWidth
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4335
	jQuery.fn["inner" + name] = function(){
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4336
		return this[0] ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4337
			jQuery.css( this[0], lower, false, "padding" ) :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4338
			null;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4339
	};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4340
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4341
	// outerHeight and outerWidth
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4342
	jQuery.fn["outer" + name] = function(margin) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4343
		return this[0] ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4344
			jQuery.css( this[0], lower, false, margin ? "margin" : "border" ) :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4345
			null;
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4346
	};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4347
	
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4348
	var type = name.toLowerCase();
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4349
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4350
	jQuery.fn[ type ] = function( size ) {
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4351
		// Get window width or height
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4352
		return this[0] == window ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4353
			// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4354
			document.compatMode == "CSS1Compat" && document.documentElement[ "client" + name ] ||
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4355
			document.body[ "client" + name ] :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4356
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4357
			// Get document width or height
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4358
			this[0] == document ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4359
				// Either scroll[Width/Height] or offset[Width/Height], whichever is greater
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4360
				Math.max(
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4361
					document.documentElement["client" + name],
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4362
					document.body["scroll" + name], document.documentElement["scroll" + name],
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4363
					document.body["offset" + name], document.documentElement["offset" + name]
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4364
				) :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4365
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4366
				// Get or set width or height on the element
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4367
				size === undefined ?
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4368
					// Get width or height on the element
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4369
					(this.length ? jQuery.css( this[0], type ) : null) :
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4370
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4371
					// Set the width or height on the element (default to pixels if value is unitless)
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4372
					this.css( type, typeof size === "string" ? size : size + "px" );
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4373
	};
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4374
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4375
});
5723f329d098 Upgrade to jQuery library to 1.3.2 version.
Mario Ferraro <fadinlight@gmail.com>
parents:
diff changeset
  4376
})();