/*
 * jQuery 1.1 - New Wave Javascript
 *
 * Copyright (c) 2007 John Resig (jquery.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * + form.js (plugins @ jQuery.com)
 * + ajaxCallback.js (www.spip.net)
 */
/* prevent execution of jQuery if included more than once */
if(typeof window.jQuery == "undefined") {
/*
 * jQuery 1.1.1 - New Wave Javascript
 *
 * Copyright (c) 2007 John Resig (jquery.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * $Date: 2007-02-03 20:32:16 +0100 (Sat, 03 Feb 2007) $
 * $Rev: 1261 $
 */

// Global undefined variable
window.undefined = window.undefined;
var jQuery = function(a,c) {
	// If the context is global, return a new object
	if ( window == this )
		return new jQuery(a,c);

	// Make sure that a selection was provided
	a = a || document;
	
	// HANDLE: $(function)
	// Shortcut for document ready
	if ( jQuery.isFunction(a) )
		return new jQuery(document)[ jQuery.fn.ready ? "ready" : "load" ]( a );
	
	// Handle HTML strings
	if ( typeof a  == "string" ) {
		// HANDLE: $(html) -> $(array)
		var m = /^[^<]*(<(.|\s)+>)[^>]*$/.exec(a);
		if ( m )
			a = jQuery.clean( [ m[1] ] );
		
		// HANDLE: $(expr)
		else
			return new jQuery( c ).find( a );
	}
	
	return this.setArray(
		// HANDLE: $(array)
		a.constructor == Array && a ||

		// HANDLE: $(arraylike)
		// Watch for when an array-like object is passed as the selector
		(a.jquery || a.length && a != window && !a.nodeType && a[0] != undefined && a[0].nodeType) && jQuery.makeArray( a ) ||

		// HANDLE: $(*)
		[ a ] );
};

// Map over the $ in case of overwrite
if ( typeof $ != "undefined" )
	jQuery._$ = $;
	
// Map the jQuery namespace to the '$' one
var $ = jQuery;

jQuery.fn = jQuery.prototype = {
	jquery: "1.1.1",

	size: function() {
		return this.length;
	},
	
	length: 0,

	get: function( num ) {
		return num == undefined ?

			// Return a 'clean' array
			jQuery.makeArray( this ) :

			// Return just the object
			this[num];
	},
	pushStack: function( a ) {
		var ret = jQuery(a);
		ret.prevObject = this;
		return ret;
	},
	setArray: function( a ) {
		this.length = 0;
		[].push.apply( this, a );
		return this;
	},
	each: function( fn, args ) {
		return jQuery.each( this, fn, args );
	},
	index: function( obj ) {
		var pos = -1;
		this.each(function(i){
			if ( this == obj ) pos = i;
		});
		return pos;
	},

	attr: function( key, value, type ) {
		var obj = key;
		
		// Look for the case where we're accessing a style value
		if ( key.constructor == String )
			if ( value == undefined )
				return this.length && jQuery[ type || "attr" ]( this[0], key ) || undefined;
			else {
				obj = {};
				obj[ key ] = value;
			}
		
		// Check to see if we're setting style values
		return this.each(function(index){
			// Set all the styles
			for ( var prop in obj )
				jQuery.attr(
					type ? this.style : this,
					prop, jQuery.prop(this, obj[prop], type, index, prop)
				);
		});
	},

	css: function( key, value ) {
		return this.attr( key, value, "curCSS" );
	},

	text: function(e) {
		if ( typeof e == "string" )
			return this.empty().append( document.createTextNode( e ) );

		var t = "";
		jQuery.each( e || this, function(){
			jQuery.each( this.childNodes, function(){
				if ( this.nodeType != 8 )
					t += this.nodeType != 1 ?
						this.nodeValue : jQuery.fn.text([ this ]);
			});
		});
		return t;
	},

	wrap: function() {
		// The elements to wrap the target around
		var a = jQuery.clean(arguments);

		// Wrap each of the matched elements individually
		return this.each(function(){
			// Clone the structure that we're using to wrap
			var b = a[0].cloneNode(true);

			// Insert it before the element to be wrapped
			this.parentNode.insertBefore( b, this );

			// Find the deepest point in the wrap structure
			while ( b.firstChild )
				b = b.firstChild;

			// Move the matched element to within the wrap structure
			b.appendChild( this );
		});
	},
	append: function() {
		return this.domManip(arguments, true, 1, function(a){
			this.appendChild( a );
		});
	},
	prepend: function() {
		return this.domManip(arguments, true, -1, function(a){
			this.insertBefore( a, this.firstChild );
		});
	},
	before: function() {
		return this.domManip(arguments, false, 1, function(a){
			this.parentNode.insertBefore( a, this );
		});
	},
	after: function() {
		return this.domManip(arguments, false, -1, function(a){
			this.parentNode.insertBefore( a, this.nextSibling );
		});
	},
	end: function() {
		return this.prevObject || jQuery([]);
	},
	find: function(t) {
		return this.pushStack( jQuery.map( this, function(a){
			return jQuery.find(t,a);
		}), t );
	},
	clone: function(deep) {
		return this.pushStack( jQuery.map( this, function(a){
			return a.cloneNode( deep != undefined ? deep : true );
		}) );
	},

	filter: function(t) {
		return this.pushStack(
			jQuery.isFunction( t ) &&
			jQuery.grep(this, function(el, index){
				return t.apply(el, [index])
			}) ||

			jQuery.multiFilter(t,this) );
	},

	not: function(t) {
		return this.pushStack(
			t.constructor == String &&
			jQuery.multiFilter(t, this, true) ||

			jQuery.grep(this, function(a) {
				return ( t.constructor == Array || t.jquery )
					? jQuery.inArray( a, t ) < 0
					: a != t;
			})
		);
	},

	add: function(t) {
		return this.pushStack( jQuery.merge(
			this.get(),
			t.constructor == String ?
				jQuery(t).get() :
				t.length != undefined && (!t.nodeName || t.nodeName == "FORM") ?
					t : [t] )
		);
	},
	is: function(expr) {
		return expr ? jQuery.filter(expr,this).r.length > 0 : false;
	},

	val: function( val ) {
		return val == undefined ?
			( this.length ? this[0].value : null ) :
			this.attr( "value", val );
	},

	html: function( val ) {
		return val == undefined ?
			( this.length ? this[0].innerHTML : null ) :
			this.empty().append( val );
	},
	domManip: function(args, table, dir, fn){
		var clone = this.length > 1; 
		var a = jQuery.clean(args);
		if ( dir < 0 )
			a.reverse();

		return this.each(function(){
			var obj = this;

			if ( table && jQuery.nodeName(this, "table") && jQuery.nodeName(a[0], "tr") )
				obj = this.getElementsByTagName("tbody")[0] || this.appendChild(document.createElement("tbody"));

			jQuery.each( a, function(){
				fn.apply( obj, [ clone ? this.cloneNode(true) : this ] );
			});

		});
	}
};

jQuery.extend = jQuery.fn.extend = function() {
	// copy reference to target object
	var target = arguments[0],
		a = 1;

	// extend jQuery itself if only one argument is passed
	if ( arguments.length == 1 ) {
		target = this;
		a = 0;
	}
	var prop;
	while (prop = arguments[a++])
		// Extend the base object
		for ( var i in prop ) target[i] = prop[i];

	// Return the modified object
	return target;
};

jQuery.extend({
	noConflict: function() {
		if ( jQuery._$ )
			$ = jQuery._$;
		return jQuery;
	},

	// This may seem like some crazy code, but trust me when I say that this
	// is the only cross-browser way to do this. --John
	isFunction: function( fn ) {
		return !!fn && typeof fn != "string" &&
			typeof fn[0] == "undefined" && /function/i.test( fn + "" );
	},

	nodeName: function( elem, name ) {
		return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
	},
	// args is for internal usage only
	each: function( obj, fn, args ) {
		if ( obj.length == undefined )
			for ( var i in obj )
				fn.apply( obj[i], args || [i, obj[i]] );
		else
			for ( var i = 0, ol = obj.length; i < ol; i++ )
				if ( fn.apply( obj[i], args || [i, obj[i]] ) === false ) break;
		return obj;
	},
	
	prop: function(elem, value, type, index, prop){
			// Handle executable functions
			if ( jQuery.isFunction( value ) )
				return value.call( elem, [index] );
				
			// exclude the following css properties to add px
			var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i;

			// Handle passing in a number to a CSS property
			return value && value.constructor == Number && type == "curCSS" && !exclude.test(prop) ?
				value + "px" :
				value;
	},

	className: {
		// internal only, use addClass("class")
		add: function( elem, c ){
			jQuery.each( c.split(/\s+/), function(i, cur){
				if ( !jQuery.className.has( elem.className, cur ) )
					elem.className += ( elem.className ? " " : "" ) + cur;
			});
		},

		// internal only, use removeClass("class")
		remove: function( elem, c ){
			elem.className = c ?
				jQuery.grep( elem.className.split(/\s+/), function(cur){
					return !jQuery.className.has( c, cur );	
				}).join(" ") : "";
		},

		// internal only, use is(".class")
		has: function( t, c ) {
			t = t.className || t;
			return t && new RegExp("(^|\\s)" + c + "(\\s|$)").test( t );
		}
	},
	swap: function(e,o,f) {
		for ( var i in o ) {
			e.style["old"+i] = e.style[i];
			e.style[i] = o[i];
		}
		f.apply( e, [] );
		for ( var i in o )
			e.style[i] = e.style["old"+i];
	},

	css: function(e,p) {
		if ( p == "height" || p == "width" ) {
			var old = {}, oHeight, oWidth, d = ["Top","Bottom","Right","Left"];

			jQuery.each( d, function(){
				old["padding" + this] = 0;
				old["border" + this + "Width"] = 0;
			});

			jQuery.swap( e, old, function() {
				if (jQuery.css(e,"display") != "none") {
					oHeight = e.offsetHeight;
					oWidth = e.offsetWidth;
				} else {
					e = jQuery(e.cloneNode(true))
						.find(":radio").removeAttr("checked").end()
						.css({
							visibility: "hidden", position: "absolute", display: "block", right: "0", left: "0"
						}).appendTo(e.parentNode)[0];

					var parPos = jQuery.css(e.parentNode,"position");
					if ( parPos == "" || parPos == "static" )
						e.parentNode.style.position = "relative";

					oHeight = e.clientHeight;
					oWidth = e.clientWidth;

					if ( parPos == "" || parPos == "static" )
						e.parentNode.style.position = "static";

					e.parentNode.removeChild(e);
				}
			});

			return p == "height" ? oHeight : oWidth;
		}

		return jQuery.curCSS( e, p );
	},

	curCSS: function(elem, prop, force) {
		var ret;
		
		if (prop == "opacity" && jQuery.browser.msie)
			return jQuery.attr(elem.style, "opacity");
			
		if (prop == "float" || prop == "cssFloat")
		    prop = jQuery.browser.msie ? "styleFloat" : "cssFloat";

		if (!force && elem.style[prop])
			ret = elem.style[prop];

		else if (document.defaultView && document.defaultView.getComputedStyle) {

			if (prop == "cssFloat" || prop == "styleFloat")
				prop = "float";

			prop = prop.replace(/([A-Z])/g,"-$1").toLowerCase();
			var cur = document.defaultView.getComputedStyle(elem, null);

			if ( cur )
				ret = cur.getPropertyValue(prop);
			else if ( prop == "display" )
				ret = "none";
			else
				jQuery.swap(elem, { display: "block" }, function() {
				    var c = document.defaultView.getComputedStyle(this, "");
				    ret = c && c.getPropertyValue(prop) || "";
				});

		} else if (elem.currentStyle) {

			var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});
			ret = elem.currentStyle[prop] || elem.currentStyle[newProp];
			
		}

		return ret;
	},
	
	clean: function(a) {
		var r = [];

		jQuery.each( a, function(i,arg){
			if ( !arg ) return;

			if ( arg.constructor == Number )
				arg = arg.toString();
			
			 // Convert html string into DOM nodes
			if ( typeof arg == "string" ) {
				// Trim whitespace, otherwise indexOf won't work as expected
				var s = jQuery.trim(arg), div = document.createElement("div"), tb = [];

				var wrap =
					 // option or optgroup
					!s.indexOf("<opt") &&
					[1, "<select>", "</select>"] ||
					
					(!s.indexOf("<thead") || !s.indexOf("<tbody") || !s.indexOf("<tfoot")) &&
					[1, "<table>", "</table>"] ||
					
					!s.indexOf("<tr") &&
					[2, "<table><tbody>", "</tbody></table>"] ||
					
				 	// <thead> matched above
					(!s.indexOf("<td") || !s.indexOf("<th")) &&
					[3, "<table><tbody><tr>", "</tr></tbody></table>"] ||
					
					[0,"",""];

				// Go to html and back, then peel off extra wrappers
				div.innerHTML = wrap[1] + s + wrap[2];
				
				// Move to the right depth
				while ( wrap[0]-- )
					div = div.firstChild;
				
				// Remove IE's autoinserted <tbody> from table fragments
				if ( jQuery.browser.msie ) {
					
					// String was a <table>, *may* have spurious <tbody>
					if ( !s.indexOf("<table") && s.indexOf("<tbody") < 0 ) 
						tb = div.firstChild && div.firstChild.childNodes;
						
					// String was a bare <thead> or <tfoot>
					else if ( wrap[1] == "<table>" && s.indexOf("<tbody") < 0 )
						tb = div.childNodes;

					for ( var n = tb.length-1; n >= 0 ; --n )
						if ( jQuery.nodeName(tb[n], "tbody") && !tb[n].childNodes.length )
							tb[n].parentNode.removeChild(tb[n]);
					
				}
				
				arg = div.childNodes;
			}

			if ( arg.length === 0 )
				return;
			
			if ( arg[0] == undefined )
				r.push( arg );
			else
				r = jQuery.merge( r, arg );

		});

		return r;
	},
	
	attr: function(elem, name, value){
		var fix = {
			"for": "htmlFor",
			"class": "className",
			"float": jQuery.browser.msie ? "styleFloat" : "cssFloat",
			cssFloat: jQuery.browser.msie ? "styleFloat" : "cssFloat",
			innerHTML: "innerHTML",
			className: "className",
			value: "value",
			disabled: "disabled",
			checked: "checked",
			readonly: "readOnly",
			selected: "selected"
		};
		
		// IE actually uses filters for opacity ... elem is actually elem.style
		if ( name == "opacity" && jQuery.browser.msie && value != undefined ) {
			// IE has trouble with opacity if it does not have layout
			// Force it by setting the zoom level
			elem.zoom = 1; 

			// Set the alpha filter to set the opacity
			return elem.filter = elem.filter.replace(/alpha\([^\)]*\)/gi,"") +
				( value == 1 ? "" : "alpha(opacity=" + value * 100 + ")" );

		} else if ( name == "opacity" && jQuery.browser.msie )
			return elem.filter ? 
				parseFloat( elem.filter.match(/alpha\(opacity=(.*)\)/)[1] ) / 100 : 1;
		
		// Mozilla doesn't play well with opacity 1
		if ( name == "opacity" && jQuery.browser.mozilla && value == 1 )
			value = 0.9999;

		// Certain attributes only work when accessed via the old DOM 0 way
		if ( fix[name] ) {
			if ( value != undefined ) elem[fix[name]] = value;
			return elem[fix[name]];

		} else if ( value == undefined && jQuery.browser.msie && jQuery.nodeName(elem, "form") && (name == "action" || name == "method") )
			return elem.getAttributeNode(name).nodeValue;

		// IE elem.getAttribute passes even for style
		else if ( elem.tagName ) {
			if ( value != undefined ) elem.setAttribute( name, value );
			return elem.getAttribute( name );

		} else {
			name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});
			if ( value != undefined ) elem[name] = value;
			return elem[name];
		}
	},
	trim: function(t){
		return t.replace(/^\s+|\s+$/g, "");
	},

	makeArray: function( a ) {
		var r = [];

		if ( a.constructor != Array )
			for ( var i = 0, al = a.length; i < al; i++ )
				r.push( a[i] );
		else
			r = a.slice( 0 );

		return r;
	},

	inArray: function( b, a ) {
		for ( var i = 0, al = a.length; i < al; i++ )
			if ( a[i] == b )
				return i;
		return -1;
	},
	merge: function(first, second) {
		var r = [].slice.call( first, 0 );

		// Now check for duplicates between the two arrays
		// and only add the unique items
		for ( var i = 0, sl = second.length; i < sl; i++ )
			// Check for duplicates
			if ( jQuery.inArray( second[i], r ) == -1 )
				// The item is unique, add it
				first.push( second[i] );

		return first;
	},
	grep: function(elems, fn, inv) {
		// If a string is passed in for the function, make a function
		// for it (a handy shortcut)
		if ( typeof fn == "string" )
			fn = new Function("a","i","return " + fn);

		var result = [];

		// Go through the array, only saving the items
		// that pass the validator function
		for ( var i = 0, el = elems.length; i < el; i++ )
			if ( !inv && fn(elems[i],i) || inv && !fn(elems[i],i) )
				result.push( elems[i] );

		return result;
	},
	map: function(elems, fn) {
		// If a string is passed in for the function, make a function
		// for it (a handy shortcut)
		if ( typeof fn == "string" )
			fn = new Function("a","return " + fn);

		var result = [], r = [];

		// Go through the array, translating each of the items to their
		// new value (or values).
		for ( var i = 0, el = elems.length; i < el; i++ ) {
			var val = fn(elems[i],i);

			if ( val !== null && val != undefined ) {
				if ( val.constructor != Array ) val = [val];
				result = result.concat( val );
			}
		}

		var r = result.length ? [ result[0] ] : [];

		check: for ( var i = 1, rl = result.length; i < rl; i++ ) {
			for ( var j = 0; j < i; j++ )
				if ( result[i] == r[j] )
					continue check;

			r.push( result[i] );
		}

		return r;
	}
});
 
/*
 * Whether the W3C compliant box model is being used.
 *
 * @property
 * @name $.boxModel
 * @type Boolean
 * @cat JavaScript
 */
new function() {
	var b = navigator.userAgent.toLowerCase();

	// Figure out what browser is being used
	jQuery.browser = {
		safari: /webkit/.test(b),
		opera: /opera/.test(b),
		msie: /msie/.test(b) && !/opera/.test(b),
		mozilla: /mozilla/.test(b) && !/(compatible|webkit)/.test(b)
	};

	// Check to see if the W3C box model is being used
	jQuery.boxModel = !jQuery.browser.msie || document.compatMode == "CSS1Compat";
};

jQuery.each({
	parent: "a.parentNode",
	parents: "jQuery.parents(a)",
	next: "jQuery.nth(a,2,'nextSibling')",
	prev: "jQuery.nth(a,2,'previousSibling')",
	siblings: "jQuery.sibling(a.parentNode.firstChild,a)",
	children: "jQuery.sibling(a.firstChild)"
}, function(i,n){
	jQuery.fn[ i ] = function(a) {
		var ret = jQuery.map(this,n);
		if ( a && typeof a == "string" )
			ret = jQuery.multiFilter(a,ret);
		return this.pushStack( ret );
	};
});

jQuery.each({
	appendTo: "append",
	prependTo: "prepend",
	insertBefore: "before",
	insertAfter: "after"
}, function(i,n){
	jQuery.fn[ i ] = function(){
		var a = arguments;
		return this.each(function(){
			for ( var j = 0, al = a.length; j < al; j++ )
				jQuery(a[j])[n]( this );
		});
	};
});

jQuery.each( {
	removeAttr: function( key ) {
		jQuery.attr( this, key, "" );
		this.removeAttribute( key );
	},
	addClass: function(c){
		jQuery.className.add(this,c);
	},
	removeClass: function(c){
		jQuery.className.remove(this,c);
	},
	toggleClass: function( c ){
		jQuery.className[ jQuery.className.has(this,c) ? "remove" : "add" ](this, c);
	},
	remove: function(a){
		if ( !a || jQuery.filter( a, [this] ).r.length )
			this.parentNode.removeChild( this );
	},
	empty: function() {
		while ( this.firstChild )
			this.removeChild( this.firstChild );
	}
}, function(i,n){
	jQuery.fn[ i ] = function() {
		return this.each( n, arguments );
	};
});

jQuery.each( [ "eq", "lt", "gt", "contains" ], function(i,n){
	jQuery.fn[ n ] = function(num,fn) {
		return this.filter( ":" + n + "(" + num + ")", fn );
	};
});

jQuery.each( [ "height", "width" ], function(i,n){
	jQuery.fn[ n ] = function(h) {
		return h == undefined ?
			( this.length ? jQuery.css( this[0], n ) : null ) :
			this.css( n, h.constructor == String ? h : h + "px" );
	};
});
jQuery.extend({
	expr: {
		"": "m[2]=='*'||jQuery.nodeName(a,m[2])",
		"#": "a.getAttribute('id')==m[2]",
		":": {
			// Position Checks
			lt: "i<m[3]-0",
			gt: "i>m[3]-0",
			nth: "m[3]-0==i",
			eq: "m[3]-0==i",
			first: "i==0",
			last: "i==r.length-1",
			even: "i%2==0",
			odd: "i%2",

			// Child Checks
			"nth-child": "jQuery.nth(a.parentNode.firstChild,m[3],'nextSibling',a)==a",
			"first-child": "jQuery.nth(a.parentNode.firstChild,1,'nextSibling')==a",
			"last-child": "jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a",
			"only-child": "jQuery.sibling(a.parentNode.firstChild).length==1",

			// Parent Checks
			parent: "a.firstChild",
			empty: "!a.firstChild",

			// Text Check
			contains: "jQuery.fn.text.apply([a]).indexOf(m[3])>=0",

			// Visibility
			visible: 'a.type!="hidden"&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',
			hidden: 'a.type=="hidden"||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',

			// Form attributes
			enabled: "!a.disabled",
			disabled: "a.disabled",
			checked: "a.checked",
			selected: "a.selected||jQuery.attr(a,'selected')",

			// Form elements
			text: "a.type=='text'",
			radio: "a.type=='radio'",
			checkbox: "a.type=='checkbox'",
			file: "a.type=='file'",
			password: "a.type=='password'",
			submit: "a.type=='submit'",
			image: "a.type=='image'",
			reset: "a.type=='reset'",
			button: 'a.type=="button"||jQuery.nodeName(a,"button")',
			input: "/input|select|textarea|button/i.test(a.nodeName)"
		},
		".": "jQuery.className.has(a,m[2])",
		"@": {
			"=": "z==m[4]",
			"!=": "z!=m[4]",
			"^=": "z&&!z.indexOf(m[4])",
			"$=": "z&&z.substr(z.length - m[4].length,m[4].length)==m[4]",
			"*=": "z&&z.indexOf(m[4])>=0",
			"": "z",
			_resort: function(m){
				return ["", m[1], m[3], m[2], m[5]];
			},
			_prefix: "z=a[m[3]]||jQuery.attr(a,m[3]);"
		},
		"[": "jQuery.find(m[2],a).length"
	},
	
	// The regular expressions that power the parsing engine
	parse: [
		// Match: [@value='test'], [@foo]
		/^\[ *(@)([a-z0-9_-]*) *([!*$^=]*) *('?"?)(.*?)\4 *\]/i,

		// Match: [div], [div p]
		/^(\[)\s*(.*?(\[.*?\])?[^[]*?)\s*\]/,

		// Match: :contains('foo')
		/^(:)([a-z0-9_-]*)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/i,

		// Match: :even, :last-chlid
		/^([:.#]*)([a-z0-9_*-]*)/i
	],

	token: [
		/^(\/?\.\.)/, "a.parentNode",
		/^(>|\/)/, "jQuery.sibling(a.firstChild)",
		/^(\+)/, "jQuery.nth(a,2,'nextSibling')",
		/^(~)/, function(a){
			var s = jQuery.sibling(a.parentNode.firstChild);
			return s.slice(0, jQuery.inArray(a,s));
		}
	],

	multiFilter: function( expr, elems, not ) {
		var old, cur = [];

		while ( expr && expr != old ) {
			old = expr;
			var f = jQuery.filter( expr, elems, not );
			expr = f.t.replace(/^\s*,\s*/, "" );
			cur = not ? elems = f.r : jQuery.merge( cur, f.r );
		}

		return cur;
	},
	find: function( t, context ) {
		// Quickly handle non-string expressions
		if ( typeof t != "string" )
			return [ t ];

		// Make sure that the context is a DOM Element
		if ( context && !context.nodeType )
			context = null;

		// Set the correct context (if none is provided)
		context = context || document;

		// Handle the common XPath // expression
		if ( !t.indexOf("//") ) {
			context = context.documentElement;
			t = t.substr(2,t.length);

		// And the / root expression
		} else if ( !t.indexOf("/") ) {
			context = context.documentElement;
			t = t.substr(1,t.length);
			if ( t.indexOf("/") >= 1 )
				t = t.substr(t.indexOf("/"),t.length);
		}

		// Initialize the search
		var ret = [context], done = [], last = null;

		// Continue while a selector expression exists, and while
		// we're no longer looping upon ourselves
		while ( t && last != t ) {
			var r = [];
			last = t;

			t = jQuery.trim(t).replace( /^\/\//i, "" );

			var foundToken = false;

			// An attempt at speeding up child selectors that
			// point to a specific element tag
			var re = /^[\/>]\s*([a-z0-9*-]+)/i;
			var m = re.exec(t);

			if ( m ) {
				// Perform our own iteration and filter
				jQuery.each( ret, function(){
					for ( var c = this.firstChild; c; c = c.nextSibling )
						if ( c.nodeType == 1 && ( jQuery.nodeName(c, m[1]) || m[1] == "*" ) )
							r.push( c );
				});

				ret = r;
				t = t.replace( re, "" );
				if ( t.indexOf(" ") == 0 ) continue;
				foundToken = true;
			} else {
				// Look for pre-defined expression tokens
				for ( var i = 0; i < jQuery.token.length; i += 2 ) {
					// Attempt to match each, individual, token in
					// the specified order
					var re = jQuery.token[i];
					var m = re.exec(t);

					// If the token match was found
					if ( m ) {
						// Map it against the token's handler
						r = ret = jQuery.map( ret, jQuery.isFunction( jQuery.token[i+1] ) ?
							jQuery.token[i+1] :
							function(a){ return eval(jQuery.token[i+1]); });

						// And remove the token
						t = jQuery.trim( t.replace( re, "" ) );
						foundToken = true;
						break;
					}
				}
			}

			// See if there's still an expression, and that we haven't already
			// matched a token
			if ( t && !foundToken ) {
				// Handle multiple expressions
				if ( !t.indexOf(",") ) {
					// Clean the result set
					if ( ret[0] == context ) ret.shift();

					// Merge the result sets
					jQuery.merge( done, ret );

					// Reset the context
					r = ret = [context];

					// Touch up the selector string
					t = " " + t.substr(1,t.length);

				} else {
					// Optomize for the case nodeName#idName
					var re2 = /^([a-z0-9_-]+)(#)([a-z0-9\\*_-]*)/i;
					var m = re2.exec(t);
					
					// Re-organize the results, so that they're consistent
					if ( m ) {
					   m = [ 0, m[2], m[3], m[1] ];

					} else {
						// Otherwise, do a traditional filter check for
						// ID, class, and element selectors
						re2 = /^([#.]?)([a-z0-9\\*_-]*)/i;
						m = re2.exec(t);
					}

					// Try to do a global search by ID, where we can
					if ( m[1] == "#" && ret[ret.length-1].getElementById ) {
						// Optimization for HTML document case
						var oid = ret[ret.length-1].getElementById(m[2]);

						// Do a quick check for node name (where applicable) so
						// that div#foo searches will be really fast
						ret = r = oid && 
						  (!m[3] || jQuery.nodeName(oid, m[3])) ? [oid] : [];

					} else {
						// Pre-compile a regular expression to handle class searches
						if ( m[1] == "." )
							var rec = new RegExp("(^|\\s)" + m[2] + "(\\s|$)");

						// We need to find all descendant elements, it is more
						// efficient to use getAll() when we are already further down
						// the tree - we try to recognize that here
						jQuery.each( ret, function(){
							// Grab the tag name being searched for
							var tag = m[1] != "" || m[0] == "" ? "*" : m[2];

							// Handle IE7 being really dumb about <object>s
							if ( jQuery.nodeName(this, "object") && tag == "*" )
								tag = "param";

							jQuery.merge( r,
								m[1] != "" && ret.length != 1 ?
									jQuery.getAll( this, [], m[1], m[2], rec ) :
									this.getElementsByTagName( tag )
							);
						});

						// It's faster to filter by class and be done with it
						if ( m[1] == "." && ret.length == 1 )
							r = jQuery.grep( r, function(e) {
								return rec.test(e.className);
							});

						// Same with ID filtering
						if ( m[1] == "#" && ret.length == 1 ) {
							// Remember, then wipe out, the result set
							var tmp = r;
							r = [];

							// Then try to find the element with the ID
							jQuery.each( tmp, function(){
								if ( this.getAttribute("id") == m[2] ) {
									r = [ this ];
									return false;
								}
							});
						}

						ret = r;
					}

					t = t.replace( re2, "" );
				}

			}

			// If a selector string still exists
			if ( t ) {
				// Attempt to filter it
				var val = jQuery.filter(t,r);
				ret = r = val.r;
				t = jQuery.trim(val.t);
			}
		}

		// Remove the root context
		if ( ret && ret[0] == context ) ret.shift();

		// And combine the results
		jQuery.merge( done, ret );

		return done;
	},

	filter: function(t,r,not) {
		// Look for common filter expressions
		while ( t && /^[a-z[({<*:.#]/i.test(t) ) {

			var p = jQuery.parse, m;

			jQuery.each( p, function(i,re){
		
				// Look for, and replace, string-like sequences
				// and finally build a regexp out of it
				m = re.exec( t );

				if ( m ) {
					// Remove what we just matched
					t = t.substring( m[0].length );

					// Re-organize the first match
					if ( jQuery.expr[ m[1] ]._resort )
						m = jQuery.expr[ m[1] ]._resort( m );

					return false;
				}
			});

			// :not() is a special case that can be optimized by
			// keeping it out of the expression list
			if ( m[1] == ":" && m[2] == "not" )
				r = jQuery.filter(m[3], r, true).r;

			// Handle classes as a special case (this will help to
			// improve the speed, as the regexp will only be compiled once)
			else if ( m[1] == "." ) {

				var re = new RegExp("(^|\\s)" + m[2] + "(\\s|$)");
				r = jQuery.grep( r, function(e){
					return re.test(e.className || "");
				}, not);

			// Otherwise, find the expression to execute
			} else {
				var f = jQuery.expr[m[1]];
				if ( typeof f != "string" )
					f = jQuery.expr[m[1]][m[2]];

				// Build a custom macro to enclose it
				eval("f = function(a,i){" +
					( jQuery.expr[ m[1] ]._prefix || "" ) +
					"return " + f + "}");

				// Execute it against the current filter
				r = jQuery.grep( r, f, not );
			}
		}

		// Return an array of filtered elements (r)
		// and the modified expression string (t)
		return { r: r, t: t };
	},
	
	getAll: function( o, r, token, name, re ) {
		for ( var s = o.firstChild; s; s = s.nextSibling )
			if ( s.nodeType == 1 ) {
				var add = true;

				if ( token == "." )
					add = s.className && re.test(s.className);
				else if ( token == "#" )
					add = s.getAttribute("id") == name;
	
				if ( add )
					r.push( s );

				if ( token == "#" && r.length ) break;

				if ( s.firstChild )
					jQuery.getAll( s, r, token, name, re );
			}

		return r;
	},
	parents: function( elem ){
		var matched = [];
		var cur = elem.parentNode;
		while ( cur && cur != document ) {
			matched.push( cur );
			cur = cur.parentNode;
		}
		return matched;
	},
	nth: function(cur,result,dir,elem){
		result = result || 1;
		var num = 0;
		for ( ; cur; cur = cur[dir] ) {
			if ( cur.nodeType == 1 ) num++;
			if ( num == result || result == "even" && num % 2 == 0 && num > 1 && cur == elem ||
				result == "odd" && num % 2 == 1 && cur == elem ) return cur;
		}
	},
	sibling: function( n, elem ) {
		var r = [];

		for ( ; n; n = n.nextSibling ) {
			if ( n.nodeType == 1 && (!elem || n != elem) )
				r.push( n );
		}

		return r;
	}
});
/*
 * A number of helper functions used for managing events.
 * Many of the ideas behind this code orignated from 
 * Dean Edwards' addEvent library.
 */
jQuery.event = {

	// Bind an event to an element
	// Original by Dean Edwards
	add: function(element, type, handler, data) {
		// For whatever reason, IE has trouble passing the window object
		// around, causing it to be cloned in the process
		if ( jQuery.browser.msie && element.setInterval != undefined )
			element = window;

		// if data is passed, bind to handler
		if( data ) 
			handler.data = data;

		// Make sure that the function being executed has a unique ID
		if ( !handler.guid )
			handler.guid = this.guid++;

		// Init the element's event structure
		if (!element.events)
			element.events = {};

		// Get the current list of functions bound to this event
		var handlers = element.events[type];

		// If it hasn't been initialized yet
		if (!handlers) {
			// Init the event handler queue
			handlers = element.events[type] = {};

			// Remember an existing handler, if it's already there
			if (element["on" + type])
				handlers[0] = element["on" + type];
		}

		// Add the function to the element's handler list
		handlers[handler.guid] = handler;

		// And bind the global event handler to the element
		element["on" + type] = this.handle;

		// Remember the function in a global list (for triggering)
		if (!this.global[type])
			this.global[type] = [];
		this.global[type].push( element );
	},

	guid: 1,
	global: {},

	// Detach an event or set of events from an element
	remove: function(element, type, handler) {
		if (element.events)
			if ( type && type.type )
				delete element.events[ type.type ][ type.handler.guid ];
			else if (type && element.events[type])
				if ( handler )
					delete element.events[type][handler.guid];
				else
					for ( var i in element.events[type] )
						delete element.events[type][i];
			else
				for ( var j in element.events )
					this.remove( element, j );
	},

	trigger: function(type, data, element) {
		// Clone the incoming data, if any
		data = jQuery.makeArray(data || []);

		// Handle a global trigger
		if ( !element )
			jQuery.each( this.global[type] || [], function(){
				jQuery.event.trigger( type, data, this );
			});

		// Handle triggering a single element
		else {
			var handler = element["on" + type ], val,
				fn = jQuery.isFunction( element[ type ] );

			if ( handler ) {
				// Pass along a fake event
				data.unshift( this.fix({ type: type, target: element }) );
	
				// Trigger the event
				if ( (val = handler.apply( element, data )) !== false )
					this.triggered = true;
			}

			if ( fn && val !== false )
				element[ type ]();

			this.triggered = false;
		}
	},

	handle: function(event) {
		// Handle the second event of a trigger and when
		// an event is called after a page has unloaded
		if ( typeof jQuery == "undefined" || jQuery.event.triggered ) return;

		// Empty object is for triggered events with no data
		event = jQuery.event.fix( event || window.event || {} ); 

		// returned undefined or false
		var returnValue;

		var c = this.events[event.type];

		var args = [].slice.call( arguments, 1 );
		args.unshift( event );

		for ( var j in c ) {
			// Pass in a reference to the handler function itself
			// So that we can later remove it
			args[0].handler = c[j];
			args[0].data = c[j].data;

			if ( c[j].apply( this, args ) === false ) {
				event.preventDefault();
				event.stopPropagation();
				returnValue = false;
			}
		}

		// Clean up added properties in IE to prevent memory leak
		if (jQuery.browser.msie) event.target = event.preventDefault = event.stopPropagation = event.handler = event.data = null;

		return returnValue;
	},

	fix: function(event) {
		// Fix target property, if necessary
		if ( !event.target && event.srcElement )
			event.target = event.srcElement;

		// Calculate pageX/Y if missing and clientX/Y available
		if ( event.pageX == undefined && event.clientX != undefined ) {
			var e = document.documentElement, b = document.body;
			event.pageX = event.clientX + (e.scrollLeft || b.scrollLeft);
			event.pageY = event.clientY + (e.scrollTop || b.scrollTop);
		}
				
		// check if target is a textnode (safari)
		if (jQuery.browser.safari && event.target.nodeType == 3) {
			// store a copy of the original event object 
			// and clone because target is read only
			var originalEvent = event;
			event = jQuery.extend({}, originalEvent);
			
			// get parentnode from textnode
			event.target = originalEvent.target.parentNode;
			
			// add preventDefault and stopPropagation since 
			// they will not work on the clone
			event.preventDefault = function() {
				return originalEvent.preventDefault();
			};
			event.stopPropagation = function() {
				return originalEvent.stopPropagation();
			};
		}
		
		// fix preventDefault and stopPropagation
		if (!event.preventDefault)
			event.preventDefault = function() {
				this.returnValue = false;
			};
			
		if (!event.stopPropagation)
			event.stopPropagation = function() {
				this.cancelBubble = true;
			};
			
		return event;
	}
};

jQuery.fn.extend({
	bind: function( type, data, fn ) {
		return this.each(function(){
			jQuery.event.add( this, type, fn || data, data );
		});
	},
	one: function( type, data, fn ) {
		return this.each(function(){
			jQuery.event.add( this, type, function(event) {
				jQuery(this).unbind(event);
				return (fn || data).apply( this, arguments);
			}, data);
		});
	},
	unbind: function( type, fn ) {
		return this.each(function(){
			jQuery.event.remove( this, type, fn );
		});
	},
	trigger: function( type, data ) {
		return this.each(function(){
			jQuery.event.trigger( type, data, this );
		});
	},
	toggle: function() {
		// Save reference to arguments for access in closure
		var a = arguments;

		return this.click(function(e) {
			// Figure out which function to execute
			this.lastToggle = this.lastToggle == 0 ? 1 : 0;
			
			// Make sure that clicks stop
			e.preventDefault();
			
			// and execute the function
			return a[this.lastToggle].apply( this, [e] ) || false;
		});
	},
	hover: function(f,g) {
		
		// A private function for handling mouse 'hovering'
		function handleHover(e) {
			// Check if mouse(over|out) are still within the same parent element
			var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget;
	
			// Traverse up the tree
			while ( p && p != this ) try { p = p.parentNode } catch(e) { p = this; };
			
			// If we actually just moused on to a sub-element, ignore it
			if ( p == this ) return false;
			
			// Execute the right function
			return (e.type == "mouseover" ? f : g).apply(this, [e]);
		}
		
		// Bind the function to the two event listeners
		return this.mouseover(handleHover).mouseout(handleHover);
	},
	ready: function(f) {
		// If the DOM is already ready
		if ( jQuery.isReady )
			// Execute the function immediately
			f.apply( document, [jQuery] );
			
		// Otherwise, remember the function for later
		else {
			// Add the function to the wait list
			jQuery.readyList.push( function() { return f.apply(this, [jQuery]) } );
		}
	
		return this;
	}
});

jQuery.extend({
	/*
	 * All the code that makes DOM Ready work nicely.
	 */
	isReady: false,
	readyList: [],
	
	// Handle when the DOM is ready
	ready: function() {
		// Make sure that the DOM is not already loaded
		if ( !jQuery.isReady ) {
			// Remember that the DOM is ready
			jQuery.isReady = true;
			
			// If there are functions bound, to execute
			if ( jQuery.readyList ) {
				// Execute all of them
				jQuery.each( jQuery.readyList, function(){
					this.apply( document );
				});
				
				// Reset the list of functions
				jQuery.readyList = null;
			}
			// Remove event lisenter to avoid memory leak
			if ( jQuery.browser.mozilla || jQuery.browser.opera )
				document.removeEventListener( "DOMContentLoaded", jQuery.ready, false );
		}
	}
});

new function(){

	jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
		"mousedown,mouseup,mousemove,mouseover,mouseout,change,select," + 
		"submit,keydown,keypress,keyup,error").split(","), function(i,o){
		
		// Handle event binding
		jQuery.fn[o] = function(f){
			return f ? this.bind(o, f) : this.trigger(o);
		};
			
	});
	
	// If Mozilla is used
	if ( jQuery.browser.mozilla || jQuery.browser.opera )
		// Use the handy event callback
		document.addEventListener( "DOMContentLoaded", jQuery.ready, false );
	
	// If IE is used, use the excellent hack by Matthias Miller
	// http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited
	else if ( jQuery.browser.msie ) {
	
		// Only works if you document.write() it
		document.write("<scr" + "ipt id=__ie_init defer=true " + 
			"src=//:><\/script>");
	
		// Use the defer script hack
		var script = document.getElementById("__ie_init");
		
		// script does not exist if jQuery is loaded dynamically
		if ( script ) 
			script.onreadystatechange = function() {
				if ( this.readyState != "complete" ) return;
				this.parentNode.removeChild( this );
				jQuery.ready();
			};
	
		// Clear from memory
		script = null;
	
	// If Safari  is used
	} else if ( jQuery.browser.safari )
		// Continually check to see if the document.readyState is valid
		jQuery.safariTimer = setInterval(function(){
			// loaded and complete are both valid states
			if ( document.readyState == "loaded" || 
				document.readyState == "complete" ) {
	
				// If either one are found, remove the timer
				clearInterval( jQuery.safariTimer );
				jQuery.safariTimer = null;
	
				// and execute any waiting functions
				jQuery.ready();
			}
		}, 10); 

	// A fallback to window.onload, that will always work
	jQuery.event.add( window, "load", jQuery.ready );
	
};

// Clean up after IE to avoid memory leaks
if (jQuery.browser.msie)
	jQuery(window).one("unload", function() {
		var global = jQuery.event.global;
		for ( var type in global ) {
			var els = global[type], i = els.length;
			if ( i && type != 'unload' )
				do
					jQuery.event.remove(els[i-1], type);
				while (--i);
		}
	});
jQuery.fn.extend({

	show: function(speed,callback){
		var hidden = this.filter(":hidden");
		speed ?
			hidden.animate({
				height: "show", width: "show", opacity: "show"
			}, speed, callback) :
			
			hidden.each(function(){
				this.style.display = this.oldblock ? this.oldblock : "";
				if ( jQuery.css(this,"display") == "none" )
					this.style.display = "block";
			});
		return this;
	},

	hide: function(speed,callback){
		var visible = this.filter(":visible");
		speed ?
			visible.animate({
				height: "hide", width: "hide", opacity: "hide"
			}, speed, callback) :
			
			visible.each(function(){
				this.oldblock = this.oldblock || jQuery.css(this,"display");
				if ( this.oldblock == "none" )
					this.oldblock = "block";
				this.style.display = "none";
			});
		return this;
	},

	// Save the old toggle function
	_toggle: jQuery.fn.toggle,
	toggle: function( fn, fn2 ){
		var args = arguments;
		return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
			this._toggle( fn, fn2 ) :
			this.each(function(){
				jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]
					.apply( jQuery(this), args );
			});
	},
	slideDown: function(speed,callback){
		return this.animate({height: "show"}, speed, callback);
	},
	slideUp: function(speed,callback){
		return this.animate({height: "hide"}, speed, callback);
	},
	slideToggle: function(speed, callback){
		return this.each(function(){
			var state = jQuery(this).is(":hidden") ? "show" : "hide";
			jQuery(this).animate({height: state}, speed, callback);
		});
	},
	fadeIn: function(speed, callback){
		return this.animate({opacity: "show"}, speed, callback);
	},
	fadeOut: function(speed, callback){
		return this.animate({opacity: "hide"}, speed, callback);
	},
	fadeTo: function(speed,to,callback){
		return this.animate({opacity: to}, speed, callback);
	},
	animate: function( prop, speed, easing, callback ) {
		return this.queue(function(){
		
			this.curAnim = jQuery.extend({}, prop);
			var opt = jQuery.speed(speed, easing, callback);
			
			for ( var p in prop ) {
				var e = new jQuery.fx( this, opt, p );
				if ( prop[p].constructor == Number )
					e.custom( e.cur(), prop[p] );
				else
					e[ prop[p] ]( prop );
			}
			
		});
	},
	queue: function(type,fn){
		if ( !fn ) {
			fn = type;
			type = "fx";
		}
	
		return this.each(function(){
			if ( !this.queue )
				this.queue = {};
	
			if ( !this.queue[type] )
				this.queue[type] = [];
	
			this.queue[type].push( fn );
		
			if ( this.queue[type].length == 1 )
				fn.apply(this);
		});
	}

});

jQuery.extend({
	
	speed: function(speed, easing, fn) {
		var opt = speed && speed.constructor == Object ? speed : {
			complete: fn || !fn && easing || 
				jQuery.isFunction( speed ) && speed,
			duration: speed,
			easing: fn && easing || easing && easing.constructor != Function && easing
		};

		opt.duration = (opt.duration && opt.duration.constructor == Number ? 
			opt.duration : 
			{ slow: 600, fast: 200 }[opt.duration]) || 400;
	
		// Queueing
		opt.old = opt.complete;
		opt.complete = function(){
			jQuery.dequeue(this, "fx");
			if ( jQuery.isFunction( opt.old ) )
				opt.old.apply( this );
		};
	
		return opt;
	},
	
	easing: {},
	
	queue: {},
	
	dequeue: function(elem,type){
		type = type || "fx";
	
		if ( elem.queue && elem.queue[type] ) {
			// Remove self
			elem.queue[type].shift();
	
			// Get next function
			var f = elem.queue[type][0];
		
			if ( f ) f.apply( elem );
		}
	},

	/*
	 * I originally wrote fx() as a clone of moo.fx and in the process
	 * of making it small in size the code became illegible to sane
	 * people. You've been warned.
	 */
	
	fx: function( elem, options, prop ){

		var z = this;

		// The styles
		var y = elem.style;
		
		// Store display property
		var oldDisplay = jQuery.css(elem, "display");

		// Make sure that nothing sneaks out
		y.overflow = "hidden";

		// Simple function for setting a style value
		z.a = function(){
			if ( options.step )
				options.step.apply( elem, [ z.now ] );

			if ( prop == "opacity" )
				jQuery.attr(y, "opacity", z.now); // Let attr handle opacity
			else if ( parseInt(z.now) ) // My hate for IE will never die
				y[prop] = parseInt(z.now) + "px";
			
			y.display = "block"; // Set display property to block for animation
		};

		// Figure out the maximum number to run to
		z.max = function(){
			return parseFloat( jQuery.css(elem,prop) );
		};

		// Get the current size
		z.cur = function(){
			var r = parseFloat( jQuery.curCSS(elem, prop) );
			return r && r > -10000 ? r : z.max();
		};

		// Start an animation from one number to another
		z.custom = function(from,to){
			z.startTime = (new Date()).getTime();
			z.now = from;
			z.a();

			z.timer = setInterval(function(){
				z.step(from, to);
			}, 13);
		};

		// Simple 'show' function
		z.show = function(){
			if ( !elem.orig ) elem.orig = {};

			// Remember where we started, so that we can go back to it later
			elem.orig[prop] = this.cur();

			options.show = true;

			// Begin the animation
			z.custom(0, elem.orig[prop]);

			// Stupid IE, look what you made me do
			if ( prop != "opacity" )
				y[prop] = "1px";
		};

		// Simple 'hide' function
		z.hide = function(){
			if ( !elem.orig ) elem.orig = {};

			// Remember where we started, so that we can go back to it later
			elem.orig[prop] = this.cur();

			options.hide = true;

			// Begin the animation
			z.custom(elem.orig[prop], 0);
		};
		
		//Simple 'toggle' function
		z.toggle = function() {
			if ( !elem.orig ) elem.orig = {};

			// Remember where we started, so that we can go back to it later
			elem.orig[prop] = this.cur();

			if(oldDisplay == "none")  {
				options.show = true;
				
				// Stupid IE, look what you made me do
				if ( prop != "opacity" )
					y[prop] = "1px";

				// Begin the animation
				z.custom(0, elem.orig[prop]);	
			} else {
				options.hide = true;

				// Begin the animation
				z.custom(elem.orig[prop], 0);
			}		
		};

		// Each step of an animation
		z.step = function(firstNum, lastNum){
			var t = (new Date()).getTime();

			if (t > options.duration + z.startTime) {
				// Stop the timer
				clearInterval(z.timer);
				z.timer = null;

				z.now = lastNum;
				z.a();

				if (elem.curAnim) elem.curAnim[ prop ] = true;

				var done = true;
				for ( var i in elem.curAnim )
					if ( elem.curAnim[i] !== true )
						done = false;

				if ( done ) {
					// Reset the overflow
					y.overflow = "";
					
					// Reset the display
					y.display = oldDisplay;
					if (jQuery.css(elem, "display") == "none")
						y.display = "block";

					// Hide the element if the "hide" operation was done
					if ( options.hide ) 
						y.display = "none";

					// Reset the properties, if the item has been hidden or shown
					if ( options.hide || options.show )
						for ( var p in elem.curAnim )
							if (p == "opacity")
								jQuery.attr(y, p, elem.orig[p]);
							else
								y[p] = "";
				}

				// If a callback was provided, execute it
				if ( done && jQuery.isFunction( options.complete ) )
					// Execute the complete function
					options.complete.apply( elem );
			} else {
				var n = t - this.startTime;
				// Figure out where in the animation we are and set the number
				var p = n / options.duration;
				
				// If the easing function exists, then use it 
				z.now = options.easing && jQuery.easing[options.easing] ?
					jQuery.easing[options.easing](p, n,  firstNum, (lastNum-firstNum), options.duration) :
					// else use default linear easing
					((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum;

				// Perform the next step of the animation
				z.a();
			}
		};
	
	}
});
jQuery.fn.extend({
	loadIfModified: function( url, params, callback ) {
		this.load( url, params, callback, 1 );
	},
	load: function( url, params, callback, ifModified ) {
		if ( jQuery.isFunction( url ) )
			return this.bind("load", url);

		callback = callback || function(){};

		// Default to a GET request
		var type = "GET";

		// If the second parameter was provided
		if ( params )
			// If it's a function
			if ( jQuery.isFunction( params ) ) {
				// We assume that it's the callback
				callback = params;
				params = null;

			// Otherwise, build a param string
			} else {
				params = jQuery.param( params );
				type = "POST";
			}

		var self = this;

		// Request the remote document
		jQuery.ajax({
			url: url,
			type: type,
			data: params,
			ifModified: ifModified,
			complete: function(res, status){
				if ( status == "success" || !ifModified && status == "notmodified" )
					// Inject the HTML into all the matched elements
					self.attr("innerHTML", res.responseText)
					  // Execute all the scripts inside of the newly-injected HTML
					  .evalScripts()
					  // Execute callback
					  .each( callback, [res.responseText, status, res] );
				else
					callback.apply( self, [res.responseText, status, res] );
			}
		});
		return this;
	},
	serialize: function() {
		return jQuery.param( this );
	},
	evalScripts: function() {
		return this.find("script").each(function(){
			if ( this.src )
				jQuery.getScript( this.src );
			else
				jQuery.globalEval( this.text || this.textContent || this.innerHTML || "" );
		}).end();
	}

});

// If IE is used, create a wrapper for the XMLHttpRequest object
if ( !window.XMLHttpRequest )
	XMLHttpRequest = function(){
		return new ActiveXObject("Microsoft.XMLHTTP");
	};

// Attach a bunch of functions for handling common AJAX events

jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
	jQuery.fn[o] = function(f){
		return this.bind(o, f);
	};
});

jQuery.extend({
	get: function( url, data, callback, type, ifModified ) {
		// shift arguments if data argument was ommited
		if ( jQuery.isFunction( data ) ) {
			callback = data;
			data = null;
		}
		
		return jQuery.ajax({
			url: url,
			data: data,
			success: callback,
			dataType: type,
			ifModified: ifModified
		});
	},
	getIfModified: function( url, data, callback, type ) {
		return jQuery.get(url, data, callback, type, 1);
	},
	getScript: function( url, callback ) {
		return jQuery.get(url, null, callback, "script");
	},
	getJSON: function( url, data, callback ) {
		return jQuery.get(url, data, callback, "json");
	},
	post: function( url, data, callback, type ) {
		if ( jQuery.isFunction( data ) ) {
			callback = data;
			data = {};
		}

		return jQuery.ajax({
			type: "POST",
			url: url,
			data: data,
			success: callback,
			dataType: type
		});
	},

	// timeout (ms)
	//timeout: 0,
	ajaxTimeout: function( timeout ) {
		jQuery.ajaxSettings.timeout = timeout;
	},
	ajaxSetup: function( settings ) {
		jQuery.extend( jQuery.ajaxSettings, settings );
	},

	ajaxSettings: {
		global: true,
		type: "GET",
		timeout: 0,
		contentType: "application/x-www-form-urlencoded",
		processData: true,
		async: true,
		data: null
	},
	
	// Last-Modified header cache for next request
	lastModified: {},
	ajax: function( s ) {
		// TODO introduce global settings, allowing the client to modify them for all requests, not only timeout
		s = jQuery.extend({}, jQuery.ajaxSettings, s);

		// if data available
		if ( s.data ) {
			// convert data if not already a string
			if (s.processData && typeof s.data != "string")
    			s.data = jQuery.param(s.data);
			// append data to url for get requests
			if( s.type.toLowerCase() == "get" ) {
				// "?" + data or "&" + data (in case there are already params)
				s.url += ((s.url.indexOf("?") > -1) ? "&" : "?") + s.data;
				// IE likes to send both get and post data, prevent this
				s.data = null;
			}
		}

		// Watch for a new set of requests
		if ( s.global && ! jQuery.active++ )
			jQuery.event.trigger( "ajaxStart" );

		var requestDone = false;

		// Create the request object
		var xml = new XMLHttpRequest();

		// Open the socket
		xml.open(s.type, s.url, s.async);

		// Set the correct header, if data is being sent
		if ( s.data )
			xml.setRequestHeader("Content-Type", s.contentType);

		// Set the If-Modified-Since header, if ifModified mode.
		if ( s.ifModified )
			xml.setRequestHeader("If-Modified-Since",
				jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" );

		// Set header so the called script knows that it's an XMLHttpRequest
		xml.setRequestHeader("X-Requested-With", "XMLHttpRequest");

		// Make sure the browser sends the right content length
		if ( xml.overrideMimeType )
			xml.setRequestHeader("Connection", "close");
			
		// Allow custom headers/mimetypes
		if( s.beforeSend )
			s.beforeSend(xml);
			
		if ( s.global )
		    jQuery.event.trigger("ajaxSend", [xml, s]);

		// Wait for a response to come back
		var onreadystatechange = function(isTimeout){
			// The transfer is complete and the data is available, or the request timed out
			if ( xml && (xml.readyState == 4 || isTimeout == "timeout") ) {
				requestDone = true;
				var status;
				try {
					status = jQuery.httpSuccess( xml ) && isTimeout != "timeout" ?
						s.ifModified && jQuery.httpNotModified( xml, s.url ) ? "notmodified" : "success" : "error";
					// Make sure that the request was successful or notmodified
					if ( status != "error" ) {
						// Cache Last-Modified header, if ifModified mode.
						var modRes;
						try {
							modRes = xml.getResponseHeader("Last-Modified");
						} catch(e) {} // swallow exception thrown by FF if header is not available
	
						if ( s.ifModified && modRes )
							jQuery.lastModified[s.url] = modRes;
	
						// process the data (runs the xml through httpData regardless of callback)
						var data = jQuery.httpData( xml, s.dataType );
	
						// If a local callback was specified, fire it and pass it the data
						if ( s.success )
							s.success( data, status );
	
						// Fire the global callback
						if( s.global )
							jQuery.event.trigger( "ajaxSuccess", [xml, s] );
					} else
						jQuery.handleError(s, xml, status);
				} catch(e) {
					status = "error";
					jQuery.handleError(s, xml, status, e);
				}

				// The request was completed
				if( s.global )
					jQuery.event.trigger( "ajaxComplete", [xml, s] );

				// Handle the global AJAX counter
				if ( s.global && ! --jQuery.active )
					jQuery.event.trigger( "ajaxStop" );

				// Process result
				if ( s.complete )
					s.complete(xml, status);

				// Stop memory leaks
				xml.onreadystatechange = function(){};
				xml = null;
			}
		};
		xml.onreadystatechange = onreadystatechange;

		// Timeout checker
		if ( s.timeout > 0 )
			setTimeout(function(){
				// Check to see if the request is still happening
				if ( xml ) {
					// Cancel the request
					xml.abort();

					if( !requestDone )
						onreadystatechange( "timeout" );
				}
			}, s.timeout);
			
		// save non-leaking reference 
		var xml2 = xml;

		// Send the data
		try {
			xml2.send(s.data);
		} catch(e) {
			jQuery.handleError(s, xml, null, e);
		}
		
		// firefox 1.5 doesn't fire statechange for sync requests
		if ( !s.async )
			onreadystatechange();
		
		// return XMLHttpRequest to allow aborting the request etc.
		return xml2;
	},

	handleError: function( s, xml, status, e ) {
		// If a local callback was specified, fire it
		if ( s.error ) s.error( xml, status, e );

		// Fire the global callback
		if ( s.global )
			jQuery.event.trigger( "ajaxError", [xml, s, e] );
	},

	// Counter for holding the number of active queries
	active: 0,

	// Determines if an XMLHttpRequest was successful or not
	httpSuccess: function( r ) {
		try {
			return !r.status && location.protocol == "file:" ||
				( r.status >= 200 && r.status < 300 ) || r.status == 304 ||
				jQuery.browser.safari && r.status == undefined;
		} catch(e){}
		return false;
	},

	// Determines if an XMLHttpRequest returns NotModified
	httpNotModified: function( xml, url ) {
		try {
			var xmlRes = xml.getResponseHeader("Last-Modified");

			// Firefox always returns 200. check Last-Modified date
			return xml.status == 304 || xmlRes == jQuery.lastModified[url] ||
				jQuery.browser.safari && xml.status == undefined;
		} catch(e){}
		return false;
	},

	/* Get the data out of an XMLHttpRequest.
	 * Return parsed XML if content-type header is "xml" and type is "xml" or omitted,
	 * otherwise return plain text.
	 * (String) data - The type of data that you're expecting back,
	 * (e.g. "xml", "html", "script")
	 */
	httpData: function( r, type ) {
		var ct = r.getResponseHeader("content-type");
		var data = !type && ct && ct.indexOf("xml") >= 0;
		data = type == "xml" || data ? r.responseXML : r.responseText;

		// If the type is "script", eval it in global context
		if ( type == "script" )
			jQuery.globalEval( data );

		// Get the JavaScript object, if JSON is used.
		if ( type == "json" )
			eval( "data = " + data );

		// evaluate scripts within html
		if ( type == "html" )
			jQuery("<div>").html(data).evalScripts();

		return data;
	},

	// Serialize an array of form elements or a set of
	// key/values into a query string
	param: function( a ) {
		var s = [];

		// If an array was passed in, assume that it is an array
		// of form elements
		if ( a.constructor == Array || a.jquery )
			// Serialize the form elements
			jQuery.each( a, function(){
				s.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( this.value ) );
			});

		// Otherwise, assume that it's an object of key/value pairs
		else
			// Serialize the key/values
			for ( var j in a )
				// If the value is an array then the key names need to be repeated
				if ( a[j] && a[j].constructor == Array )
					jQuery.each( a[j], function(){
						s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) );
					});
				else
					s.push( encodeURIComponent(j) + "=" + encodeURIComponent( a[j] ) );

		// Return the resulting serialization
		return s.join("&");
	},
	
	// evalulates a script in global context
	// not reliable for safari
	globalEval: function( data ) {
		if ( window.execScript )
			window.execScript( data );
		else if ( jQuery.browser.safari )
			// safari doesn't provide a synchronous global eval
			window.setTimeout( data, 0 );
		else
			eval.call( window, data );
	}

});
}

/* JavaScriptCompressor 0.8 [www.devpro.it], thanks to Dean Edwards for idea [dean.edwards.name] */
jQuery.fn.ajaxSubmit=function(options){if (typeof options==
'function'
)
options={success:options};options=jQuery.extend({url:this.attr(
'action'
)||
''
,method:this.attr(
'method'
)||
'GET'
},options||{});
options.success=options.success||options.after;options.beforeSubmit=options.beforeSubmit||options.before;options.type=options.type||options.method;var a=this.formToArray(options.semantic);
if (options.beforeSubmit&&options.beforeSubmit(a,this,options)===false) return;var q=jQuery.param(a);if (options.type.toUpperCase()==
'GET'
){
options.url+=(options.url.indexOf(
'?'
)>=0?
'&'
:
'?'
)+q;options.data=null;
}
else
options.data=q;
var $form=this,callbacks=[];if (options.resetForm) callbacks.push(function(){$form.resetForm();});if (options.clearForm) callbacks.push(function(){$form.clearForm();});
if (!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data,status){jQuery(options.target).html(data).evalScripts().each(oldSuccess,[data,status]);});}
else if (options.success)
 callbacks.push(options.success);options.success=function(data,status){for (var i=0,max=callbacks.length;i<max;i++)
callbacks[i](data,status);};jQuery.ajax(options);return this;};
jQuery.fn.ajaxForm=function(options){return this.each(function(){jQuery(
"input:submit,input:image,button:submit"
,this).click(function(ev){var $form=this.form;$form.clk=this;if (this.type==
'image'
){if (ev.offsetX !=undefined){$form.clk_x=ev.offsetX;$form.clk_y=ev.offsetY;} else if (typeof jQuery.fn.offset==
'function'
){
var offset=$(this).offset();$form.clk_x=ev.pageX-offset.left;$form.clk_y=ev.pageY-offset.top;} else {$form.clk_x=ev.pageX-this.offsetLeft;$form.clk_y=ev.pageY-this.offsetTop;}}
setTimeout(function(){$form.clk=$form.clk_x=$form.clk_y=null;},10);})}).submit(function(e){jQuery(this).ajaxSubmit(options);return false;});};
jQuery.fn.formToArray=function(semantic){var a=[];if (this.length==0) return a;var form=this[0];var els=semantic?form.getElementsByTagName(
'*'
):form.elements;if (!els) return a;for(var i=0,max=els.length;i<max;i++){var el=els[i];var n=el.name;if (!n) continue;if (semantic&&form.clk&&el.type==
"image"
){
if(!el.disabled&&form.clk==el)
a.push({name:n+
'.x'
,value:form.clk_x},{name:n+
'.y'
,value:form.clk_y});continue;}
var v=jQuery.fieldValue(el,true);if (v===null) continue;if (v.constructor==Array){for(var j=0,jmax=v.length;j<jmax;j++)
a.push({name:n,value:v[j]});}
else
 a.push({name:n,value:v});}
if (!semantic&&form.clk){
var inputs=form.getElementsByTagName(
"input"
);for(var i=0,max=inputs.length;i<max;i++){var input=inputs[i];var n=input.name;if(n&&!input.disabled&&input.type==
"image"
&&form.clk==input)
a.push({name:n+
'.x'
,value:form.clk_x},{name:n+
'.y'
,value:form.clk_y});}}
return a;};
jQuery.fn.formSerialize=function(semantic){
return jQuery.param(this.formToArray(semantic));};
jQuery.fn.fieldSerialize=function(successful){var a=[];this.each(function(){var n=this.name;if (!n) return;var v=jQuery.fieldValue(this,successful);if (v&&v.constructor==Array){for (var i=0,max=v.length;i<max;i++)
a.push({name:n,value:v[i]});}
else if (v !==null&&typeof v !=
'undefined'
)
a.push({name:this.name,value:v});});
return jQuery.param(a);};
jQuery.fn.fieldValue=function(successful){var cbVal,cbName;
for (var i=0,max=this.length;i<max;i++){var el=this[i];var v=jQuery.fieldValue(el,successful);if (v===null||typeof v==
'undefined'
||(v.constructor==Array&&!v.length))
continue;
if (el.type !=
'checkbox'
) return v;cbName=cbName||el.name;if (cbName !=el.name)
return cbVal;cbVal=cbVal||[];cbVal.push(v);}
return cbVal;};
jQuery.fieldValue=function(el,successful){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if (typeof successful==
'undefined'
) successful=true;if (successful&&(!n||el.disabled||t==
'reset'
||(t==
'checkbox'
||t==
'radio'
)&&!el.checked||(t==
'submit'
||t==
'image'
)&&el.form&&el.form.clk !=el||tag==
'select'
&&el.selectedIndex==-1))
return null;if (tag==
'select'
){var index=el.selectedIndex;if (index<0) return null;var a=[],ops=el.options;var one=(t==
'select-one'
);var max=(one?index+1:ops.length);for(var i=(one?index:0);i<max;i++){var op=ops[i];if (op.selected){
var v=jQuery.browser.msie&&!(op.attributes[
'value'
].specified)?op.text:op.value;if (one) return v;a.push(v);}}
return a;}
return el.value;};
jQuery.fn.clearForm=function(){return this.each(function(){jQuery(
'input,select,textarea'
,this).clearInputs();});}
jQuery.fn.clearInputs=function(){return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if (t==
'text'
||t==
'password'
||tag==
'textarea'
)
this.value=
''
;else if (t==
'checkbox'
||t==
'radio'
)
this.checked=false;else if (tag==
'select'
)
this.selectedIndex=-1;});}
jQuery.fn.resetForm=function(){return this.each(function(){
if (typeof this.reset==
'function'
||(typeof this.reset==
'object'
&&!this.reset.nodeType))
 this.reset();});}
/* JavaScriptCompressor 0.8 [www.devpro.it], thanks to Dean Edwards for idea [dean.edwards.name] */
if(!jQuery.load_handlers){jQuery.load_handlers=new Array();
function onAjaxLoad(f){jQuery.load_handlers.push(f);};
function triggerAjaxLoad(root){for (var i=0;i<jQuery.load_handlers.length;i++)
jQuery.load_handlers[i].apply(root);};jQuery.fn._load=jQuery.fn.load;jQuery.fn.load=function(url,params,callback,ifModified){callback=callback||function(){};
if (params){
if (params.constructor==Function){
callback=params;params=null;}}
var callback2=function(res,status){triggerAjaxLoad(this);callback(res,status);};return this._load(url,params,callback2,ifModified);};jQuery._ajax=jQuery.ajax;jQuery.ajax=function(type,url,data,ret,ifModified){
if (jQuery.ajax.caller==jQuery.fn._load) return jQuery._ajax(type,url,data,ret,ifModified);
if (!url){var orig_complete=type.complete||function(){};type.complete=function(res,status){triggerAjaxLoad(document);orig_complete(res,status);};} else {var orig_ret=ret||function(){};ret=function(res,status){triggerAjaxLoad(document);orig_ret(res,status);};}
return jQuery._ajax(type,url,data,ret,ifModified);};}
/* JavaScriptCompressor 0.8 [www.devpro.it], thanks to Dean Edwards for idea [dean.edwards.name] */
function popup(photo,titre,largeur,hauteur){var posX=(screen.width
/ 2) - (largeur /2);var posY=(screen.height
/ 2) - (hauteur /2);var contenu=
"<html><head><title>"
+titre+
"</title></head><body topmargin='0' leftmargin='0'><p><a href='javascript:self.close()'><object type='application/x-shockwave-flash' data='"
+photo+
"' width='550' height='448'><param name='movie' value='"
+photo+
"' /></object><div id='Layer1' style='position:absolute; z-index:1; margin-left: 400px; margin-top: -20px; background-color:none; padding:5px; font-size: 9px; color: #ccc; font-family:\'Trebuchet MS\';'><a href='javascript:window.close();' style='text-decoration:none!important; color: #ccc; '>&copy;&nbsp;Rhino Jazz 2006</a></div></p></body></html>"
;
var fenetre=open(
""
,
""
,
"title="
+titre+
",resizable=no,scrollbars=no,left = "
+posX+
", top = "
+posY+
",width="
+largeur+
", height="
+hauteur+
""
);fenetre.document.write(contenu);}
function popup2(photo,titre,largeur,hauteur){var posX=(screen.width
/ 2) - (largeur /2);var posY=(screen.height
/ 2) - (hauteur /2);var contenu=
"<html><head><title>"
+titre+
"</title></head><body topmargin='0' leftmargin='0'><p><a href='javascript:self.close()'><img border='0' src='"
+photo+
"'></a></p></body></html>"
;var fenetre=open(
""
,
""
,
"title="
+titre+
",resizable=no,scrollbars=no,left = "
+posX+
", top = "
+posY+
",width="
+largeur+
", height="
+hauteur+
""
);fenetre.document.write(contenu);}
function affiche_selecteur(){var url_page=document.location;$.get(
'spip.php?page=selection_magasin'
,{url:url_page},function(data){$(
"#magasin_absolu"
).addClass(
"affiche_magasin_absolu"
);$(
"#bloc_selection"
).addClass(
"style_bloc_selection"
);$(
"#bloc_selection"
).html(data);var NomNav=navigator.appName;
var VersNav=navigator.appVersion;
var NumVers=parseFloat(VersNav);if (NomNav==
"Microsoft Internet Explorer"
){var ieversion=version_navigateur();if (ieversion<7){resize_conteneur();}
else
{$(
"#magasin_absolu"
).height($(
'body'
).height()+
"px"
);}}
else
{$(
"#magasin_absolu"
).height($(
'body'
).height()+
"px"
);}});
$(
"#diapo_home"
).css(
"display"
,
"none"
);};function version_navigateur(){var ieversion=0;if (navigator.appVersion.indexOf(
"MSIE"
) !=-1){t=navigator.appVersion.split(
"MSIE"
);ieversion=parseFloat(t[1]);}
return ieversion;}
function resize_conteneur(){var body_height=$(
'#conteneur'
).height();var height_total=(body_height *-1);$(
"#magasin_absolu"
).height($(
'body'
).height()+
"px"
);$(
'#magasin_absolu'
).css(
"margin-top"
,height_total+
"px"
);$(
"#bloc_selection"
).css(
"margin-top"
,(height_total-$(
"#bloc_selection"
).height())+
"px"
);$(
"#bloc_selection"
).css(
"margin-left"
,(($(
"#magasin_absolu"
).width()
/ 2) - ($("#bloc_selection").width() /2))+
"px"
);}
$(window).resize(function(){var NomNav=navigator.appName;
var VersNav=navigator.appVersion;
var NumVers=parseFloat(VersNav);if (NomNav==
"Microsoft Internet Explorer"
){var ieversion=version_navigateur();if (ieversion<7){resize_conteneur();}
else
{$(
"#magasin_absolu"
).height($(
'body'
).height()+
"px"
);}}
else
{$(
"#magasin_absolu"
).height($(
'body'
).height()+
"px"
);}});function affiche_logo_magasin(code_mag){$.get(
'http://www.supercasino.fr/spip.php?page=wslogomagasin'
,{id:code_mag},function(data){$(
"#logo_magasin"
).html(data);});}
function trouve_dep2(num_dep){document.getElementById(
'code_casino'
).selectedIndex=num_dep;}
function traitement(code,url){$.get(
"spip.php?page=enregistre_magasin"
,{code_casino:code},function(data){$(
"#diapo_home"
).css(
"display"
,
"block"
);document.location.href=url;});
}
function clique_departement(num_dep){if (parseInt(num_dep,10)<10){num_dep=
"0"
+parseInt(num_dep,10);}
$.get(
"spip.php?page=liste_magasin_dep"
,{dep:num_dep},function(data){$(
"#code_casino"
).empty();
if(
/Safari/.test(navigator.appVersion)){resultat_contenu=document.getElementById(
"code_casino"
);resultat_contenu.innerHTML=resultat_contenu.innerHTML+data;}
else
{$(
"#code_casino"
).html(data);}});}
function autre_mag(){if (confirm(
"Cette op\u00E9ration va effacer votre menu pr\u00E9c\u00E9dent : "
)){document.location.href=
"spip.php?page=panier_add&menu_sup=1"
;}}

/* JavaScriptCompressor 0.8 [www.devpro.it], thanks to Dean Edwards for idea [dean.edwards.name] */

/* JavaScriptCompressor 0.8 [www.devpro.it], thanks to Dean Edwards for idea [dean.edwards.name] */


var GB_ROOT_DIR = "plugins/axomepack/greybox/js/";
/* JavaScriptCompressor 0.8 [www.devpro.it], thanks to Dean Edwards for idea [dean.edwards.name] */

/* JavaScriptCompressor 0.8 [www.devpro.it], thanks to Dean Edwards for idea [dean.edwards.name] */

/* JavaScriptCompressor 0.8 [www.devpro.it], thanks to Dean Edwards for idea [dean.edwards.name] */

/*
 * Interface elements for jQuery - http://interface.eyecon.ro
 *
 * Copyright (c) 2006 Stefan Petre
 * Dual licensed under the MIT (MIT-LICENSE.txt) 
 * and GPL (GPL-LICENSE.txt) licenses.
 */
 eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('6.16={3e:D(e){C x=0;C y=0;C 31=F;C 1j=e.18;k(6(e).H(\'1e\')==\'1k\'){3l=1j.2o;5e=1j.Q;1j.2o=\'3q\';1j.1e=\'3E\';1j.Q=\'2s\';31=12}C A=e;65(A){x+=A.56+(A.4c&&!6.2A.5Y?J(A.4c.6c)||0:0);y+=A.5i+(A.4c&&!6.2A.5Y?J(A.4c.6v)||0:0);A=A.7u}A=e;65(A&&A.4I&&A.4I.5l()!=\'1J\'){x-=A.4s||0;y-=A.3F||0;A=A.2S}k(31){1j.1e=\'1k\';1j.Q=5e;1j.2o=3l}E{x:x,y:y}},bl:D(A){C x=0,y=0;65(A){x+=A.56||0;y+=A.5i||0;A=A.7u}E{x:x,y:y}},2d:D(e){C w=6.H(e,\'Z\');C h=6.H(e,\'V\');C 1F=0;C 1y=0;C 1j=e.18;k(6(e).H(\'1e\')!=\'1k\'){1F=e.5A;1y=e.63}P{3l=1j.2o;5e=1j.Q;1j.2o=\'3q\';1j.1e=\'3E\';1j.Q=\'2s\';1F=e.5A;1y=e.63;1j.1e=\'1k\';1j.Q=5e;1j.2o=3l}E{w:w,h:h,1F:1F,1y:1y}},6O:D(A){E{1F:A.5A||0,1y:A.63||0}},8o:D(e){C h,w,3W;k(e){w=e.4E;h=e.4U}P{3W=17.2q;w=3t.6s||54.6s||(3W&&3W.4E)||17.1J.4E;h=3t.66||54.66||(3W&&3W.4U)||17.1J.4U}E{w:w,h:h}},7a:D(e){C t,l,w,h,4m,4q;k(e&&e.5J.5l()!=\'1J\'){t=e.3F;l=e.4s;w=e.68;h=e.6w;4m=0;4q=0}P{k(17.2q&&17.2q.3F){t=17.2q.3F;l=17.2q.4s;w=17.2q.68;h=17.2q.6w}P k(17.1J){t=17.1J.3F;l=17.1J.4s;w=17.1J.68;h=17.1J.6w}4m=54.6s||17.2q.4E||17.1J.4E||0;4q=54.66||17.2q.4U||17.1J.4U||0}E{t:t,l:l,w:w,h:h,4m:4m,4q:4q}},7W:D(e,4u){C A=6(e);C t=A.H(\'3D\')||\'\';C r=A.H(\'3G\')||\'\';C b=A.H(\'3H\')||\'\';C l=A.H(\'3I\')||\'\';k(4u)E{t:J(t)||0,r:J(r)||0,b:J(b)||0,l:J(l)};P E{t:t,r:r,b:b,l:l}},aY:D(e,4u){C A=6(e);C t=A.H(\'80\')||\'\';C r=A.H(\'81\')||\'\';C b=A.H(\'88\')||\'\';C l=A.H(\'87\')||\'\';k(4u)E{t:J(t)||0,r:J(r)||0,b:J(b)||0,l:J(l)};P E{t:t,r:r,b:b,l:l}},62:D(e,4u){C A=6(e);C t=A.H(\'6v\')||\'\';C r=A.H(\'86\')||\'\';C b=A.H(\'84\')||\'\';C l=A.H(\'6c\')||\'\';k(4u)E{t:J(t)||0,r:J(r)||0,b:J(b)||0,l:J(l)||0};P E{t:t,r:r,b:b,l:l}},30:D(3o){C x=3o.at||(3o.au+(17.2q.4s||17.1J.4s))||0;C y=3o.b4||(3o.bv+(17.2q.3F||17.1J.3F))||0;E{x:x,y:y}},6C:D(2u,6o){6o(2u);2u=2u.4M;65(2u){6.16.6C(2u,6o);2u=2u.bI}},bt:D(2u){6.16.6C(2u,D(A){1B(C 1N 1W A){k(25 A[1N]===\'D\'){A[1N]=Y}}})},9k:D(A,1u){C 2L=$.16.7a();C 6h=$.16.2d(A);k(!1u||1u==\'2e\')$(A).H({M:2L.t+((1t.2I(2L.h,2L.4q)-2L.t-6h.1y)/2)+\'14\'});k(!1u||1u==\'29\')$(A).H({L:2L.l+((1t.2I(2L.w,2L.4m)-2L.l-6h.1F)/2)+\'14\'})},ab:D(A,7D){C 89=$(\'82[@5W*="5L"]\',A||17),5L;89.1L(D(){5L=u.5W;u.5W=7D;u.18.69="90:8R.9e.bf(5W=\'"+5L+"\')"})}};[].7Z||(4S.9a.7Z=D(v,n){n=(n==Y)?0:n;C m=u.1Y;1B(C i=n;i<m;i++)k(u[i]==v)E i;E-1});6.6g=D(e){k(/^8Z$|^8V$|^8P$|^a0$|^a2$|^9X$|^a7$|^a8$|^9S$|^1J$|^9R$|^9B$|^9D$|^9z$|^9L$|^9H$|^9J$/i.4d(e.5J))E F;P E 12};6.O.9K=D(e,34){C c=e.4M;C 3n=c.18;3n.Q=34.Q;3n.3D=34.2M.t;3n.3I=34.2M.l;3n.3H=34.2M.b;3n.3G=34.2M.r;3n.M=34.M+\'14\';3n.L=34.L+\'14\';e.2S.7E(c,e);e.2S.9I(e)};6.O.9M=D(e){k(!6.6g(e))E F;C t=6(e);C 1j=e.18;C 31=F;C 1d={};1d.Q=t.H(\'Q\');k(t.H(\'1e\')==\'1k\'){3l=t.H(\'2o\');1j.2o=\'3q\';1j.1e=\'\';31=12}1d.1v=6.16.2d(e);1d.2M=6.16.7W(e);C 6d=e.4c?e.4c.7J:t.H(\'9O\');1d.M=J(t.H(\'M\'))||0;1d.L=J(t.H(\'L\'))||0;C 83=\'9N\'+J(1t.7o()*78);C 3P=17.9G(/^82$|^br$|^9x$|^9w$|^5c$|^9u$|^6r$|^9v$|^9A$|^9E$|^9C$|^a9$|^a6$|^aa$/i.4d(e.5J)?\'2Y\':e.5J);6.1N(3P,\'27\',83);3P.2E=\'af\';C 1U=3P.18;C M=0;C L=0;k(1d.Q==\'2i\'||1d.Q==\'2s\'){M=1d.M;L=1d.L}1U.1e=\'1k\';1U.M=M+\'14\';1U.L=L+\'14\';1U.Q=1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1K[2]),b:J(1K[3])};P k(1K=/46\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*\\)$/.5P(2v))E{r:2g(1K[1])*2.55,g:2g(1K[2])*2.55,b:2g(1K[3])*2.55};P k(1K=/^#([a-4l-4o-9])([a-4l-4o-9])([a-4l-4o-9])$/.5P(2v))E{r:J("4g"+1K[1]+1K[1]),g:J("4g"+1K[2]+1K[2]),b:J("4g"+1K[3]+1K[3])};P k(1K=/^#([a-4l-4o-9]{2})([a-4l-4o-9]{2})([a-4l-4o-9]{2})$/.5P(2v))E{r:J("4g"+1K[1]),g:J("4g"+1K[2]),b:J("4g"+1K[3])};P E 7T==12?F:{r:1m,g:1m,b:1m}};6.O.7k={84:1,6c:1,86:1,6v:1,3y:1,bO:1,V:1,L:1,bF:1,bE:1,3H:1,3I:1,3G:1,3D:1,4W:1,5q:1,4T:1,57:1,1H:1,bx:1,bw:1,88:1,87:1,81:1,80:1,43:1,by:1,M:1,Z:1,2r:1};6.O.7g={bz:1,bD:1,bC:1,bB:1,bA:1,2v:1,b3:1};6.O.4X=[\'ay\',\'aw\',\'av\',\'az\'];6.O.6t={\'6z\':[\'4H\',\'7b\'],\'5y\':[\'4H\',\'6l\'],\'5G\':[\'5G\',\'\'],\'5z\':[\'5z\',\'\']};6.3v.1Q({8x:D(3a,1i,19,1r){E u.2j(D(){C 5H=6.1i(1i,19,1r);C e=1I 6.7i(u,5H,3a)})},6y:D(1i,1r){E u.2j(D(){C 5H=6.1i(1i,1r);C e=1I 6.6y(u,5H)})},58:D(2x){E u.1L(D(){k(u.3d)6.6n(u,2x)})},aE:D(2x){E u.1L(D(){k(u.3d)6.6n(u,2x);k(u.2j&&u.2j[\'O\'])u.2j.O=[]})}});6.1Q({6y:D(1l,R){C z=u,1O;z.2x=D(){k(6.7q(R.3z))R.3z.1A(1l)};z.4z=7t(D(){z.2x()},R.2C);1l.3d=z},19:{7h:D(p,n,7y,7X,2C){E((-1t.aC(p*1t.aB)/2)+0.5)*7X+7y}},7i:D(1l,R,3a){C z=u,1O;C y=1l.18;C 7v=6.H(1l,"3m");C 45=6.H(1l,"1e");C 1n={};z.5V=(1I 7z()).7A();R.19=R.19&&6.19[R.19]?R.19:\'7h\';z.5F=D(1s,24){k(6.O.7k[1s]){k(24==\'2t\'||24==\'2k\'||24==\'7m\'){k(!1l.3K)1l.3K={};C r=2g(6.3C(1l,1s));1l.3K[1s]=r&&r>-78?r:(2g(6.H(1l,1s))||0);24=24==\'7m\'?(45==\'1k\'?\'2t\':\'2k\'):24;R[24]=12;1n[1s]=24==\'2t\'?[0,1l.3K[1s]]:[1l.3K[1s],0];k(1s!=\'1H\')y[1s]=1n[1s][0]+(1s!=\'2r\'&&1s!=\'6p\'?\'14\':\'\');P 6.1N(y,"1H",1n[1s][0])}P{1n[1s]=[2g(6.3C(1l,1s)),2g(24)||0]}}P k(6.O.7g[1s])1n[1s]=[6.O.3B(6.3C(1l,1s)),6.O.3B(24)];P k(/^5G$|5z$|4H$|5y$|6z$/i.4d(1s)){C m=24.3c(/\\s+/g,\' \').3c(/46\\s*\\(\\s*/g,\'46(\').3c(/\\s*,\\s*/g,\',\').3c(/\\s*\\)/g,\')\').8C(/([^\\s]+)/g);2Z(1s){1a\'5G\':1a\'5z\':1a\'6z\':1a\'5y\':m[3]=m[3]||m[1]||m[0];m[2]=m[2]||m[0];m[1]=m[1]||m[0];1B(C i=0;i<6.O.4X.1Y;i++){C 3b=6.O.6t[1s][0]+6.O.4X[i]+6.O.6t[1s][1];1n[3b]=1s==\'5y\'?[6.O.3B(6.3C(1l,3b)),6.O.3B(m[i])]:[2g(6.3C(1l,3b)),2g(m[i])]}1p;1a\'4H\':1B(C i=0;i<m.1Y;i++){C 6k=2g(m[i]);C 5v=!an(6k)?\'7b\':(!/as|1k|3q|ar|aq|ap|aF|aG|aW|aV|aU/i.4d(m[i])?\'6l\':F);k(5v){1B(C j=0;j<6.O.4X.1Y;j++){3b=\'4H\'+6.O.4X[j]+5v;1n[3b]=5v==\'6l\'?[6.O.3B(6.3C(1l,3b)),6.O.3B(m[i])]:[2g(6.3C(1l,3b)),6k]}}P{y[\'b1\']=m[i]}}1p}}P{y[1s]=24}E F};1B(p 1W 3a){k(p==\'18\'){C 2Q=6.6m(3a[p]);1B(4b 1W 2Q){u.5F(4b,2Q[4b])}}P k(p==\'2E\'){k(17.5B)1B(C i=0;i<17.5B.1Y;i++){C 4a=17.5B[i].4a||17.5B[i].aR||Y;k(4a){1B(C j=0;j<4a.1Y;j++){k(4a[j].aK==\'.\'+3a[p]){C 4n=1I aJ(\'\\.\'+3a[p]+\' {\');C 3g=4a[j].18.aH;C 2Q=6.6m(3g.3c(4n,\'\').3c(/}/g,\'\'));1B(4b 1W 2Q){u.5F(4b,2Q[4b])}}}}}}P{u.5F(p,3a[p])}}y.1e=45==\'1k\'?\'3E\':45;y.3m=\'3q\';z.2x=D(){C t=(1I 7z()).7A();k(t>R.2C+z.5V){8G(z.4z);z.4z=Y;1B(p 1W 1n){k(p=="1H")6.1N(y,"1H",1n[p][1]);P k(25 1n[p][1]==\'6r\')y[p]=\'46(\'+1n[p][1].r+\',\'+1n[p][1].g+\',\'+1n[p][1].b+\')\';P y[p]=1n[p][1]+(p!=\'2r\'&&p!=\'6p\'?\'14\':\'\')}k(R.2k||R.2t)1B(C p 1W 1l.3K)k(p=="1H")6.1N(y,p,1l.3K[p]);P y[p]="";y.1e=R.2k?\'1k\':(45!=\'1k\'?45:\'3E\');y.3m=7v;1l.3d=Y;k(6.7q(R.3z))R.3z.1A(1l)}P{C n=t-u.5V;C 4B=n/R.2C;1B(p 1W 1n){k(25 1n[p][1]==\'6r\'){y[p]=\'46(\'+J(6.19[R.19](4B,n,1n[p][0].r,(1n[p][1].r-1n[p][0].r),R.2C))+\',\'+J(6.19[R.19](4B,n,1n[p][0].g,(1n[p][1].g-1n[p][0].g),R.2C))+\',\'+J(6.19[R.19](4B,n,1n[p][0].b,(1n[p][1].b-1n[p][0].b),R.2C))+\')\'}P{C 6u=6.19[R.19](4B,n,1n[p][0],(1n[p][1]-1n[p][0]),R.2C);k(p=="1H")6.1N(y,"1H",6u);P y[p]=6u+(p!=\'2r\'&&p!=\'6p\'?\'14\':\'\')}}}};z.4z=7t(D(){z.2x()},13);1l.3d=z},6n:D(1l,2x){k(2x)1l.3d.5V-=bQ;P{3t.8G(1l.3d.4z);1l.3d=Y;6.6A(1l,"O")}}});6.6m=D(3g){C 2Q={};k(25 3g==\'5h\'){3g=3g.5l().8I(\';\');1B(C i=0;i<3g.1Y;i++){4n=3g[i].8I(\':\');k(4n.1Y==2){2Q[6.8K(4n[0].3c(/\\-(\\w)/g,D(m,c){E c.aN()}))]=6.8K(4n[1])}}}E 2Q};6.G={1b:Y,q:Y,4e:D(){E u.1L(D(){k(u.5f){u.7.2H.26(\'2J\',6.G.77);u.7=Y;u.5f=F;k(6.2A.4i){u.6x="aL"}P{u.18.aI=\'\';u.18.8E=\'\';u.18.8g=\'\'}}})},77:D(e){k(6.G.q!=Y){6.G.5n(e);E F}C 8=u.1X;6(17).1S(\'2l\',6.G.6q).1S(\'4p\',6.G.5n);8.7.1c=6.16.30(e);8.7.2b=8.7.1c;8.7.5r=F;8.7.aS=u!=u.1X;6.G.q=8;k(8.7.2V&&u!=u.1X){6B=6.16.3e(8.2S);6j=6.16.2d(8);6D={x:J(6.H(8,\'L\'))||0,y:J(6.H(8,\'M\'))||0};W=8.7.2b.x-6B.x-6j.1F/2-6D.x;X=8.7.2b.y-6B.y-6j.1y/2-6D.y;6.1M.2F(8,[W,X])}E 6.aX||F},8v:D(e){C 8=6.G.q;8.7.5r=12;C 5m=8.18;8.7.4k=6.H(8,\'1e\');8.7.3s=6.H(8,\'Q\');k(!8.7.8l)8.7.8l=8.7.3s;8.7.1h={x:J(6.H(8,\'L\'))||0,y:J(6.H(8,\'M\'))||0};8.7.5j=0;8.7.5b=0;k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.y-8.7.5b+\'14\';21.Z=8.7.11.1F+\'14\';21.V=8.7.11.1y+\'14\';6.G.q.7.5s=F;k(8.7.2N){8.7.2X.3k=6.G.6U}k(8.7.2r!=F){6.G.1b.H(\'2r\',8.7.2r)}k(8.7.1H){6.G.1b.H(\'1H\',8.7.1H);k(3t.5a){6.G.1b.H(\'69\',\'8A(1H=\'+8.7.1H*2W+\')\')}}k(8.7.3X){6.G.1b.5R(8.7.3X);6.G.1b.1g(0).4M.18.1e=\'1k\'}k(8.7.3i)8.7.3i.1A(8,[2T,8.7.1h.x,8.7.1h.y]);k(6.T&&6.T.4Y>0){6.T.8a(8)}k(8.7.4v==F){5m.1e=\'1k\'}E F},6J:D(8){k(8.7.1E.1D==73){k(8.7.1E==\'4R\'){8.7.1f=6.1Q({x:0,y:0},6.16.2d(8.2S));C 4Z=6.16.62(8.2S,12);8.7.1f.w=8.7.1f.1F-4Z.l-4Z.r;8.7.1f.h=8.7.1f.1y-4Z.t-4Z.b}P k(8.7.1E==\'17\'){C 6f=6.16.8o();8.7.1f={x:0,y:0,w:6f.w,h:6f.h}}}P k(8.7.1E.1D==4S){8.7.1f={x:J(8.7.1E[0])||0,y:J(8.7.1E[1])||0,w:J(8.7.1E[2])||0,h:J(8.7.1E[3])||0}}8.7.1f.W=8.7.1f.x-8.7.11.x;8.7.1f.X=8.7.1f.y-8.7.11.y},5o:D(q){k(q.7.4L||q.7.1E==\'4R\'){6(\'1J\',17).4A(6.G.1b.1g(0))}6.G.1b.8p().2k().H(\'1H\',1);k(3t.5a){6.G.1b.H(\'69\',\'8A(1H=2W)\')}},5n:D(e){6(17).26(\'2l\',6.G.6q).26(\'4p\',6.G.5n);k(6.G.q==Y){E}C q=6.G.q;6.G.q=Y;k(q.7.5r==F){E F}k(q.7.2y==12){6(q).H(\'Q\',q.7.3s)}C 5m=q.18;k(q.2V){6.G.1b.H(\'6Q\',\'4Q\')}k(q.7.3X){6.G.1b.5I(q.7.3X)}k(q.7.67==F){k(q.7.O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6.B.S.I.8q){3u=6.B.S.I.8q.1A(6.B.S,[U,1o]);k(3u){k(3u.1v){6.1Q(U,3u.1v)}k(3u.Q){6.1Q(1o,3u.Q)}}}2K.L=1o.L+\'14\';2K.M=1o.M+\'14\';2K.Z=U.Z+\'14\';2K.V=U.V+\'14\';E F},2B:D(R){k(!R||!R.22||R.22.1D!=5C){E}E u.1L(D(){C A=u;A.I=R;A.I.57=R.57||10;A.I.4T=R.4T||10;A.I.5q=R.5q||4y;A.I.4W=R.4W||4y;A.I.3S=R.3S||-8s;A.I.44=R.44||-8s;A.I.4C=R.4C||4y;A.I.4D=R.4D||4y;6M=6(A).H(\'Q\');k(!(6M==\'2i\'||6M==\'2s\')){A.18.Q=\'2i\'}8B=/n|5p|e|8w|s|5k|w|3U/g;1B(i 1W A.I.22){k(i.5l().8C(8B)!=Y){k(A.I.22[i].1D==73){2z=6(A.I.22[i]);k(2z.4V()>0){A.I.22[i]=2z.1g(0)}}k(A.I.22[i].4I){A.I.22[i].S=A;A.I.22[i].20=i;6(A.I.22[i]).1S(\'2J\',6.B.5O)}}}k(A.I.2n){k(25 A.I.2n===\'5h\'){5t=6(A.I.2n);k(5t.4V()>0){5t.1L(D(){u.53=A});5t.1S(\'2J\',6.B.4h)}}P k(A.I.2n.4I){A.I.2n.53=A;6(A.I.2n).1S(\'2J\',6.B.4h)}P k(A.I.2n==12){6(u).1S(\'2J\',6.B.4h)}}})},4e:D(){E u.1L(D(){C A=u;1B(i 1W A.I.22){A.I.22[i].S=Y;A.I.22[i].20=Y;6(A.I.22[i]).26(\'2J\',6.B.5O)}k(A.I.2n){k(25 A.I.2n===\'5h\'){2z=6(A.I.2n);k(2z.4V()>0){2z.26(\'2J\',6.B.4h)}}P k(A.I.2n==12){6(u).26(\'2J\',6.B.4h)}}A.I=Y})}};6.3v.1Q({bu:6.B.2B,aA:6.B.4e});6.1M={6W:1,7n:D(1O){C 1O=1O;E u.1L(D(){u.2c.3M.1L(D(5U){6.1M.2F(u,1O[5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||!o.5K||!6.16||!6.G){E}u.N={a:o.5K,ac:o.9d||F,3N:o.a4||F,7j:o.8S||F,5w:o.9f||o.5w||F,5T:o.5T||o.bH||F,64:o.64||o.bL||F,60:o.60||F,t:o.5u&&(o.5u==\'7f\'||o.5u==\'7d\')?o.5u:\'1c\',O:o.O?o.O:F,m:F,h:F};k(o.b0==12&&6.1C){27=6.1N(u,\'27\');6.1C.7C[27]=u.N.a;u.N.s=12;k(o.1T){u.N.1T=o.1T;u.N.7r=6.1C.8j(27).7s}}u.5d=12;u.74=J(1t.7o()*78);6.T.1Z[\'d\'+u.74]=6(u);6.T.4Y++})}};6.3v.1Q({9U:6.T.4e,bm:6.T.2B});6.bc=6.T.7G;6.1q={3J:Y,48:F,5D:Y,6L:D(e){6.1q.48=12;6.1q.2t(e,u,12)},6S:D(e){k(6.1q.3J!=u)E;6.1q.48=F;6.1q.2k(e,u)},2t:D(e,A,48){k(6.1q.3J!=Y)E;k(!A){A=u}6.1q.3J=A;2p=6.1Q(6.16.3e(A),6.16.2d(A));4K=6(A);3p=4K.1N(\'3p\');5Q=4K.1N(\'5Q\');k(3p){6.1q.5D=3p;4K.1N(\'3p\',\'\');6(\'#7p\').6F(3p);k(5Q)6(\'#6R\').6F(5Q.3c(\'bN://\',\'\'));P 6(\'#6R\').6F(\'\');1b=6(\'#4F\');k(A.2m.2E){1b.1g(0).2E=A.2m.2E}P{1b.1g(0).2E=\'\'}6E=6.16.2d(1b.1g(0));7U=48&&A.2m.Q==\'6G\'?\'3y\':A.2m.Q;2Z(7U){1a\'M\':1z=2p.y-6E.1y;1x=2p.x;1p;1a\'L\':1z=2p.y;1x=2p.x-6E.1F;1p;1a\'43\':1z=2p.y;1x=2p.x+2p.1F;1p;1a\'6G\':6(\'1J\').1S(\'2l\',6.1q.2l);1c=6.16.30(e);1z=1c.y+15;1x=1c.x+15;1p;7e:1z=2p.y+2p.1y;1x=2p.x;1p}1b.H({M:1z+\'14\',L:1x+\'14\'});k(A.2m.4P==F){1b.2t()}P{1b.aT(A.2m.4P)}k(A.2m.3Z)A.2m.3Z.1A(A);4K.1S(\'7B\',6.1q.2k).1S(\'7w\',6.1q.6S)}},2l:D(e){k(6.1q.3J==Y){6(\'1J\').26(\'2l\',6.1q.2l);E}1c=6.16.30(e);6(\'#4F\').H({M:1c.y+15+\'14\',L:1c.x+15+\'14\'})},2k:D(e,A){k(!A){A=u}k(6.1q.48!=12&&6.1q.3J==A){6.1q.3J=Y;6(\'#4F\').aQ(1);6(A).1N(\'3p\',6.1q.5D).26(\'7B\',6.1q.2k).26(\'7w\',6.1q.6S);k(A.2m.3Y)A.2m.3Y.1A(A);6.1q.5D=Y}},2B:D(R){k(!6.1q.1b){6(\'1J\').4A(\'<2Y 27="4F"><2Y 27="7p"></2Y><2Y 27="6R"></2Y></2Y>\');6(\'#4F\').H({Q:\'2s\',2r:4y,1e:\'1k\'});6.1q.1b=12}E u.1L(D(){k(6.1N(u,\'3p\')){u.2m={Q:/M|3y|L|43|6G/.4d(R.Q)?R.Q:\'3y\',2E:R.2E?R.2E:F,4P:R.4P?R.4P:F,3Z:R.3Z&&R.3Z.1D==2G?R.3Z:F,3Y:R.3Y&&R.3Y.1D==2G?R.3Y:F};C A=6(u);A.1S(\'bP\',6.1q.2t);A.1S(\'6L\',6.1q.6L)}})}};6.3v.9m=6.1q.2B;6.3v.1Q({ad:D(1i,1r,19){E u.2j(\'3r\',D(){1I 6.O.32(u,1i,1r,\'2e\',\'3L\',19)})},ag:D(1i,1r,19){E u.2j(\'3r\',D(){1I 6.O.32(u,1i,1r,\'29\',\'3L\',19)})},9F:D(1i,1r,19){E u.2j(\'3r\',D(){k(6.H(u,\'1e\')==\'1k\'){1I 6.O.32(u,1i,1r,\'29\',\'49\',19)}P{1I 6.O.32(u,1i,1r,\'29\',\'3L\',19)}})},9y:D(1i,1r,19){E u.2j(\'3r\',D(){k(6.H(u,\'1e\')==\'1k\'){1I 6.O.32(u,1i,1r,\'2e\',\'49\',19)}P{1I 6.O.32(u,1i,1r,\'2e\',\'3L\',19)}})},am:D(1i,1r,19){E u.2j(\'3r\',D(){1I 6.O.32(u,1i,1r,\'2e\',\'49\',19)})},b2:D(1i,1r,19){E u.2j(\'3r\',D(){1I 6.O.32(u,1i,1r,\'29\',\'49\',19)})}});6.O.32=D(e,1i,1r,5S,3f,19){k(!6.6g(e)){6.6A(e,\'3r\');E F}C z=u;C 31=F;z.A=6(e);z.19=25 1r==\'5h\'?1r:19||Y;z.1r=25 1r==\'D\'?1r:Y;z.3f=3f;z.1i=1i;z.1w=6.16.2d(e);z.1d={};z.1d.Q=z.A.H(\'Q\');z.1d.1e=z.A.H(\'1e\');k(z.1d.1e==\'1k\'){3l=z.A.H(\'2o\');z.A.2t();31=12}z.1d.M=z.A.H(\'M\');z.1d.L=z.A.H(\'L\');k(31){z.A.2k();z.A.H(\'2o\',3l)}z.1d.Z=z.1w.w+\'14\';z.1d.V=z.1w.h+\'14\';z.1d.3m=z.A.H(\'3m\');z.1w.M=J(z.1d.M)||0;z.1w.L=J(z.1d.L)||0;k(z.1d.Q!=\'2i\'&&z.1d.Q!=\'2s\'){z.A.H(\'Q\',\'2i\')}z.A.H(\'3m\',\'3q\').H(\'V\',3f==\'49\'&&5S==\'2e\'?1:z.1w.h+\'14\').H(\'Z\',3f==\'49\'&&5S==\'29\'?1:z.1w.w+\'14\');z.3z=D(){z.A.H(z.1d);k(z.3f==\'3L\')z.A.2k();P z.A.2t();6.6A(z.A.1g(0),\'3r\')};2Z(5S){1a\'2e\':z.3T=1I 6.O(z.A.1g(0),6.1i(1i-15,z.19,1r),\'V\');z.41=1I 6.O(z.A.1g(0),6.1i(z.1i,z.19,z.3z),\'M\');k(z.3f==\'3L\'){z.3T.2w(z.1w.h,0);z.41.2w(z.1w.M,z.1w.M+z.1w.h/2)}P{z.3T.2w(0,z.1w.h);z.41.2w(z.1w.M+z.1w.h/2,z.1w.M)}1p;1a\'29\':z.3T=1I 6.O(z.A.1g(0),6.1i(1i-15,z.19,1r),\'Z\');z.41=1I 6.O(z.A.1g(0),6.1i(z.1i,z.19,z.3z),\'L\');k(z.3f==\'3L\'){z.3T.2w(z.1w.w,0);z.41.2w(z.1w.L,z.1w.L+z.1w.w/2)}P{z.3T.2w(0,z.1w.w);z.41.2w(z.1w.L+z.1w.w/2,z.1w.L)}1p}};',62,735,'||||||jQuery|dragCfg|elm||||||||||||if||||||dragged||||this||||||el|iResize|var|function|return|false|iDrag|css|resizeOptions|parseInt|iEL|left|top|dropCfg|fx|else|position|options|resizeElement|iDrop|newSizes|height|dx|dy|null|width||oC|true||px||iUtil|document|style|easing|case|helper|pointer|oldStyle|display|cont|get|oR|speed|es|none|elem|255|props|newPosition|break|iTooltip|callback|tp|Math|axis|sizes|oldP|nx|hb|ny|apply|for|iSort|constructor|containment|wb|fractions|opacity|new|body|result|each|iSlider|attr|values|newCoords|extend|cursorAt|bind|onChange|wrs|onSlide|in|dragElem|length|zones|resizeDirection|dhs|handlers|highlighted|vp|typeof|unbind|id|nWidth|horizontally|ratio|currentPointer|slideCfg|getSize|vertically|0px|parseFloat|params|relative|queue|hide|mousemove|tooltipCFG|dragHandle|visibility|pos|documentElement|zIndex|absolute|show|nodeEl|color|custom|step|so|handle|browser|build|duration|nHeight|className|dragmoveBy|Function|dhe|max|mousedown|elS|clientScroll|margins|gx|zonex|toDrag|newStyles|zoney|parentNode|clonedEl|els|si|100|onDragModifier|div|switch|getPointer|restoreStyle|OpenClose|gy|old||||||prop|nmp|replace|animationHandler|getPosition|type|styles|onStop|onStart|onDrag|grid|oldVisibility|overflow|cs|event|title|hidden|interfaceFX|oP|window|newDimensions|fn|getHeight|getWidth|bottom|complete|min|parseColor|curCSS|marginTop|block|scrollTop|marginRight|marginBottom|marginLeft|current|orig|close|sliders|hc|128|wr|overzone|dh|minTop|eh|nw|user|de|frameClass|onHide|onShow||et||right|minLeft|oldDisplay|rgb||focused|open|cssRules|np|currentStyle|test|destroy|newLeft|0x|startDrag|msie|newTop|oD|fA|iw|rule|F0|mouseup|ih|139|scrollLeft|zonew|toInteger|ghosting|zoneh|xproc|3000|timer|append|pr|maxRight|maxBottom|clientWidth|tooltipHelper|parentBorders|border|tagName|yproc|jEl|insideParent|firstChild|namedColors|newPos|delay|move|parent|Array|minHeight|clientHeight|size|maxHeight|cssSides|count|contBorders||nRy|nRx|dragEl|self||offsetLeft|minWidth|stop|side|ActiveXObject|diffY|select|isDroppable|oldPosition|isDraggable|snapDistance|string|offsetTop|diffX|sw|toLowerCase|dEs|dragstop|hidehelper|ne|maxWidth|init|prot|handleEl|tolerance|sideEnd|onDrop|SliderContainer|borderColor|padding|offsetWidth|styleSheets|Object|oldTitle|Draggable|getValues|margin|opt|removeClass|nodeName|accept|png|211|192|start|exec|href|addClass|direction|onHover|key|startTime|src|next|opera|prev|onActivate|2000|getBorder|offsetHeight|onOut|while|innerHeight|revert|scrollWidth|filter|oldBorder|169|borderLeftWidth|oldFloat|hpc|clnt|fxCheckTag|windowSize|autoSize|sliderSize|floatVal|Color|parseStyle|stopAnim|func|fontWeight|dragmove|object|innerWidth|cssSidesEnd|pValue|borderTopWidth|scrollHeight|unselectable|pause|borderWidth|dequeue|parentPos|traverseDOM|sliderPos|helperSize|html|mouse|slider|prevLeft|getContainment|oneIsSortable|focus|elPosition|checkhover|getSizeLite|prevTop|cursor|tooltipURL|hidefocused|fitToContainer|snapToGrid|modifyContainer|tabindex|isSlider|sliderEl|SliderIteration|restricted|lastSi|applyOnHover|String|idsa||stopDrag|draginit|10000|moveDrag|getScroll|Width|nr|intersect|default|fit|colorCssProps|linear|fxe|shc|cssProps|onslide|toggle|set|random|tooltipTitle|isFunction|os|hash|setInterval|offsetParent|oldOverflow|blur|dragmoveByKey|firstNum|Date|getTime|mouseout|collected|emptyGIF|insertBefore|165|remeasure|hlt|measure|styleFloat|224|144|245|107|changed|240|230|140|is|notColor|filteredPosition|DraggableDestroy|getMargins|delta|checkdrop|indexOf|paddingTop|paddingRight|img|wid|borderBottomWidth||borderRightWidth|paddingLeft|paddingBottom|images|highlight|fracW|xfrac|maxy|maxx|listStyle|userSelect|fracH|yfrac|serialize|getHeightMinMax|initialPosition|containerMaxx|auto|getClient|empty|onResize|abs|1000|pow|distance|dragstart|se|animate|dragHelper|on|alpha|directions|match|containerMaxy|KhtmlUserSelect|onDragStop|clearInterval|onDragStart|split|pressedKey|trim|darkmagenta|183|189|darkolivegreen|tbody|moz|DXImageTransform|helperclass|brown|darkkhaki|td|darkgrey|darkcyan|darkgreen|tr|progid|darkorange|cyan|darkblue|153|indigo|130|green|215|gold|prototype|khaki|lightblue|activeclass|Microsoft|ondrop|fuchsia|148|darkred|204|centerEl|blue|ToolTip|darksalmon|darkviolet|122|150|233|darkorchid|black|textarea|iframe|hr|input|SwitchVertically|frameset|button|script|table|frame|form|SwitchHorizontally|createElement|optgroup|removeChild|meta|destroyWrapper|option|buildWrapper|w_|float|onselectstart|ondragstart|header|th|wrapper|DroppableDestroy|mozUserSelect|appendChild|tfoot|aqua|azure|caption|220|thead|beige|hoverclass|cssFloat|dl|col|colgroup|ul|ol|fixPNG||CloseVertically|173|fxWrapper|CloseHorizontally|find|lime|Slider|SliderSetValues|SliderGetValues|OpenVertically|isNaN|cloneNode|solid|dashed|dotted|transparent|pageX|clientX|Bottom|Right|216|Top|Left|ResizableDestroy|PI|cos|khtml|stopAll|double|groove|cssText|MozUserSelect|RegExp|selectorText|off|keydown|toUpperCase|keyCode|charCode|fadeOut|rules|fromHandler|fadeIn|outset|inset|ridge|selectKeyHelper|getPadding|array|sortable|borderStyle|OpenHorizontally|outlineColor|pageY|olive|navy|maroon|magenta|orange|pink|red|recallDroppables|purple|203|AlphaImageLoader|sqrt|lightgrey|238|lightgreen|lightcyan|getPositionLite|Droppable|lightyellow|193|182|lightpink||silver|purgeEvents|Resizable|clientY|outlineWidth|outlineOffset|textIndent|backgroundColor|borderTopColor|borderRightColor|borderLeftColor|borderBottomColor|lineHeight|letterSpacing|check|onhover|nextSibling|yellow|white|onout|number|http|fontSize|mouseover|100000000'.split('|'),0,{}))

/*
 * jQuery form plugin
 * @requires jQuery v1.0.3
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 *
 * Revision: $Id$
 * Version: .97
 */

/**
 * ajaxSubmit() provides a mechanism for submitting an HTML form using AJAX.
 *
 * ajaxSubmit accepts a single argument which can be either a success callback function
 * or an options Object.  If a function is provided it will be invoked upon successful
 * completion of the submit and will be passed the response from the server.
 * If an options Object is provided, the following attributes are supported:
 *
 *  target:   Identifies the element(s) in the page to be updated with the server response.
 *            This value may be specified as a jQuery selection string, a jQuery object,
 *            or a DOM element.
 *            default value: null
 *
 *  url:      URL to which the form data will be submitted.
 *            default value: value of form's 'action' attribute
 *
 *  type:     The method in which the form data should be submitted, 'GET' or 'POST'.
 *            default value: value of form's 'method' attribute (or 'GET' if none found)
 *
 *  beforeSubmit:  Callback method to be invoked before the form is submitted.
 *            default value: null
 *
 *  success:  Callback method to be invoked after the form has been successfully submitted
 *            and the response has been returned from the server
 *            default value: null
 *
 *  dataType: Expected dataType of the response.  One of: null, 'xml', 'script', or 'json'
 *            default value: null
 *
 *  semantic: Boolean flag indicating whether data must be submitted in semantic order (slower).
 *            default value: false
 *
 *  resetForm: Boolean flag indicating whether the form should be reset if the submit is successful
 *
 *  clearForm: Boolean flag indicating whether the form should be cleared if the submit is successful
 *
 *
 * The 'beforeSubmit' callback can be provided as a hook for running pre-submit logic or for
 * validating the form data.  If the 'beforeSubmit' callback returns false then the form will
 * not be submitted. The 'beforeSubmit' callback is invoked with three arguments: the form data
 * in array format, the jQuery object, and the options object passed into ajaxSubmit.
 * The form data array takes the following form:
 *
 *     [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
 *
 * If a 'success' callback method is provided it is invoked after the response has been returned
 * from the server.  It is passed the responseText or responseXML value (depending on dataType).
 * See jQuery.ajax for further details.
 *
 *
 * The dataType option provides a means for specifying how the server response should be handled.
 * This maps directly to the jQuery.httpData method.  The following values are supported:
 *
 *      'xml':    if dataType == 'xml' the server response is treated as XML and the 'after'
 *                   callback method, if specified, will be passed the responseXML value
 *      'json':   if dataType == 'json' the server response will be evaluted and passed to
 *                   the 'after' callback, if specified
 *      'script': if dataType == 'script' the server response is evaluated in the global context
 *
 *
 * Note that it does not make sense to use both the 'target' and 'dataType' options.  If both
 * are provided the target will be ignored.
 *
 * The semantic argument can be used to force form serialization in semantic order.
 * This is normally true anyway, unless the form contains input elements of type='image'.
 * If your form must be submitted with name/value pairs in semantic order and your form
 * contains an input of type='image" then pass true for this arg, otherwise pass false
 * (or nothing) to avoid the overhead for this logic.
 *
 *
 * When used on its own, ajaxSubmit() is typically bound to a form's submit event like this:
 *
 * $("#form-id").submit(function() {
 *     $(this).ajaxSubmit(options);
 *     return false; // cancel conventional submit
 * });
 *
 * When using ajaxForm(), however, this is done for you.
 *
 * @example
 * $('#myForm').ajaxSubmit(function(data) {
 *     alert('Form submit succeeded! Server returned: ' + data);
 * });
 * @desc Submit form and alert server response
 *
 *
 * @example
 * var options = {
 *     target: '#myTargetDiv'
 * };
 * $('#myForm').ajaxSubmit(options);
 * @desc Submit form and update page element with server response
 *
 *
 * @example
 * var options = {
 *     success: function(responseText) {
 *         alert(responseText);
 *     }
 * };
 * $('#myForm').ajaxSubmit(options);
 * @desc Submit form and alert the server response
 *
 *
 * @example
 * var options = {
 *     beforeSubmit: function(formArray, jqForm) {
 *         if (formArray.length == 0) {
 *             alert('Please enter data.');
 *             return false;
 *         }
 *     }
 * };
 * $('#myForm').ajaxSubmit(options);
 * @desc Pre-submit validation which aborts the submit operation if form data is empty
 *
 *
 * @example
 * var options = {
 *     url: myJsonUrl.php,
 *     dataType: 'json',
 *     success: function(data) {
 *        // 'data' is an object representing the the evaluated json data
 *     }
 * };
 * $('#myForm').ajaxSubmit(options);
 * @desc json data returned and evaluated
 *
 *
 * @example
 * var options = {
 *     url: myXmlUrl.php,
 *     dataType: 'xml',
 *     success: function(responseXML) {
 *        // responseXML is XML document object
 *        var data = $('myElement', responseXML).text();
 *     }
 * };
 * $('#myForm').ajaxSubmit(options);
 * @desc XML data returned from server
 *
 *
 * @example
 * var options = {
 *     resetForm: true
 * };
 * $('#myForm').ajaxSubmit(options);
 * @desc submit form and reset it if successful
 *
 * @example
 * $('#myForm).submit(function() {
 *    $(this).ajaxSubmit();
 *    return false;
 * });
 * @desc Bind form's submit event to use ajaxSubmit
 *
 *
 * @name ajaxSubmit
 * @type jQuery
 * @param options  object literal containing options which control the form submission process
 * @cat Plugins/Form
 * @return jQuery
 * @see formToArray
 * @see ajaxForm
 * @see $.ajax
 * @author jQuery Community
 */
jQuery.fn.ajaxSubmit = function(options) {
    if (typeof options == 'function')
        options = { success: options };

    options = jQuery.extend({
        url:  this.attr('action') || window.location,
        type: this.attr('method') || 'GET'
    }, options || {});

    var a = this.formToArray(options.semantic);

    // give pre-submit callback an opportunity to abort the submit
    if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) return this;

    // fire vetoable 'validate' event
    var veto = {};
    jQuery.event.trigger('form.submit.validate', [a, this, options, veto]);
    if (veto.veto)
        return this;

    var q = jQuery.param(a);//.replace(/%20/g,'+');

    if (options.type.toUpperCase() == 'GET') {
        options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
        options.data = null;  // data is null for 'get'
    }
    else
        options.data = q; // data is the query string for 'post'

    var $form = this, callbacks = [];
    if (options.resetForm) callbacks.push(function() { $form.resetForm(); });
    if (options.clearForm) callbacks.push(function() { $form.clearForm(); });

    // perform a load on the target only if dataType is not provided
    if (!options.dataType && options.target) {
        var oldSuccess = options.success || function(){};
        callbacks.push(function(data, status) {
            jQuery(options.target).attr("innerHTML", data).evalScripts().each(oldSuccess, [data, status]);
        });
    }
    else if (options.success)
        callbacks.push(options.success);

    options.success = function(data, status) {
        for (var i=0, max=callbacks.length; i < max; i++)
            callbacks[i](data, status);
    };

    // are there files to upload?
    var files = jQuery('input:file', this).fieldValue();
    var found = false;
    for (var j=0; j < files.length; j++)
        if (files[j]) 
            found = true;

    if (options.iframe || found) // options.iframe allows user to force iframe mode
        fileUpload();
    else
        jQuery.ajax(options);

    // fire 'notify' event
    jQuery.event.trigger('form.submit.notify', [this, options]);
    return this;


    // private function for handling file uploads (hat tip to YAHOO!)
    function fileUpload() {
        var form = $form[0];
        var opts = jQuery.extend({}, jQuery.ajaxSettings, options);
        
        var id = 'jqFormIO' + jQuery.fn.ajaxSubmit.counter++;
        var $io = jQuery('<iframe id="' + id + '" name="' + id + '" />');
        var io = $io[0];
        var op8 = jQuery.browser.opera && window.opera.version() < 9;
        if (jQuery.browser.msie || op8) io.src = 'javascript:false;document.write("");';
        $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });

        // make sure form attrs are set
        form.method = 'POST';
        form.encoding ? form.encoding = 'multipart/form-data' : form.enctype = 'multipart/form-data';

        var xhr = { // mock object
            responseText: null,
            responseXML: null,
            status: 0,
            statusText: 'n/a',
            getAllResponseHeaders: function() {},
            getResponseHeader: function() {},
            setRequestHeader: function() {}
        };
        
        var g = opts.global;
        // trigger ajax global events so that activity/block indicators work like normal
        if (g && ! jQuery.active++) jQuery.event.trigger("ajaxStart");
        if (g) jQuery.event.trigger("ajaxSend", [xhr, opts]);
        
        var cbInvoked = 0;
        var timedOut = 0;
        
        // take a breath so that pending repaints get some cpu time before the upload starts
        setTimeout(function() {
            $io.appendTo('body');
            // jQuery's event binding doesn't work for iframe events in IE
            io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false);
            form.action = opts.url;
            var t = form.target;
            form.target = id;

            // support timout
            if (opts.timeout)
                setTimeout(function() { timedOut = true; cb(); }, opts.timeout);

            form.submit();
            form.target = t; // reset
        }, 10);
        
        function cb() {
            if (cbInvoked++) return;
            
            io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false);

            var ok = true;
            try {
                if (timedOut) throw 'timeout';
                // extract the server response from the iframe
                var data, doc;
                doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document;
                xhr.responseText = doc.body ? doc.body.innerHTML : null;
                xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
                
                if (opts.dataType == 'json' || opts.dataType == 'script') {
                    var ta = doc.getElementsByTagName('textarea')[0];
                    data = ta ? ta.value : xhr.responseText;
                    if (opts.dataType == 'json')
                        eval("data = " + data);
                    else
                        jQuery.globalEval(data);
                }
                else if (opts.dataType == 'xml') {
                    data = xhr.responseXML;
                    if (!data && xhr.responseText != null)
                        data = toXml(xhr.responseText);
                }
                else {
                    data = xhr.responseText;
                }
            }
            catch(e){
                ok = false;
                jQuery.handleError(opts, xhr, 'error', e);
            }

            // ordering of these callbacks/triggers is odd, but that's how $.ajax does it
            if (ok) {
                opts.success(data, 'success');
                if (g) jQuery.event.trigger("ajaxSuccess", [xhr, opts]);
            }
            if (g) jQuery.event.trigger("ajaxComplete", [xhr, opts]);
            if (g && ! --jQuery.active) jQuery.event.trigger("ajaxStop");
            if (opts.complete) opts.complete(xhr, ok ? 'success' : 'error');

            // clean up
            setTimeout(function() { 
                $io.remove(); 
                xhr.responseXML = null;
            }, 100);
        };
        
        function toXml(s, doc) {
            if (window.ActiveXObject) {
                doc = new ActiveXObject('Microsoft.XMLDOM');
                doc.async = 'false';
                doc.loadXML(s);
            }
            else
                doc = (new DOMParser()).parseFromString(s, 'text/xml');
            return (doc && doc.documentElement && doc.documentElement.tagName != 'parsererror') ? doc : null;
        }
    };
};
jQuery.fn.ajaxSubmit.counter = 0; // used to create unique iframe ids

/**
 * ajaxForm() provides a mechanism for fully automating form submission.
 *
 * The advantages of using this method instead of ajaxSubmit() are:
 *
 * 1: This method will include coordinates for <input type="image" /> elements (if the element
 *    is used to submit the form).
 * 2. This method will include the submit element's name/value data (for the element that was
 *    used to submit the form).
 * 3. This method binds the submit() method to the form for you.
 *
 * Note that for accurate x/y coordinates of image submit elements in all browsers
 * you need to also use the "dimensions" plugin (this method will auto-detect its presence).
 *
 * The options argument for ajaxForm works exactly as it does for ajaxSubmit.  ajaxForm merely
 * passes the options argument along after properly binding events for submit elements and
 * the form itself.  See ajaxSubmit for a full description of the options argument.
 *
 *
 * @example
 * var options = {
 *     target: '#myTargetDiv'
 * };
 * $('#myForm').ajaxSForm(options);
 * @desc Bind form's submit event so that 'myTargetDiv' is updated with the server response
 *       when the form is submitted.
 *
 *
 * @example
 * var options = {
 *     success: function(responseText) {
 *         alert(responseText);
 *     }
 * };
 * $('#myForm').ajaxSubmit(options);
 * @desc Bind form's submit event so that server response is alerted after the form is submitted.
 *
 *
 * @example
 * var options = {
 *     beforeSubmit: function(formArray, jqForm) {
 *         if (formArray.length == 0) {
 *             alert('Please enter data.');
 *             return false;
 *         }
 *     }
 * };
 * $('#myForm').ajaxSubmit(options);
 * @desc Bind form's submit event so that pre-submit callback is invoked before the form
 *       is submitted.
 *
 *
 * @name   ajaxForm
 * @param  options  object literal containing options which control the form submission process
 * @return jQuery
 * @cat    Plugins/Form
 * @type   jQuery
 * @see    ajaxSubmit
 * @author jQuery Community
 */
jQuery.fn.ajaxForm = function(options) {
    return this.each(function() {
        jQuery("input:submit,input:image,button:submit", this).click(function(ev) {
            var $form = this.form;
            $form.clk = this;
            if (this.type == 'image') {
                if (ev.offsetX != undefined) {
                    $form.clk_x = ev.offsetX;
                    $form.clk_y = ev.offsetY;
                } else if (typeof jQuery.fn.offset == 'function') { // try to use dimensions plugin
                    var offset = jQuery(this).offset();
                    $form.clk_x = ev.pageX - offset.left;
                    $form.clk_y = ev.pageY - offset.top;
                } else {
                    $form.clk_x = ev.pageX - this.offsetLeft;
                    $form.clk_y = ev.pageY - this.offsetTop;
                }
            }
            // clear form vars
            setTimeout(function() {
                $form.clk = $form.clk_x = $form.clk_y = null;
                }, 10);
        })
    }).submit(function(e) {
        jQuery(this).ajaxSubmit(options);
        return false;
    });
};


/**
 * formToArray() gathers form element data into an array of objects that can
 * be passed to any of the following ajax functions: $.get, $.post, or load.
 * Each object in the array has both a 'name' and 'value' property.  An example of
 * an array for a simple login form might be:
 *
 * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
 *
 * It is this array that is passed to pre-submit callback functions provided to the
 * ajaxSubmit() and ajaxForm() methods.
 *
 * The semantic argument can be used to force form serialization in semantic order.
 * This is normally true anyway, unless the form contains input elements of type='image'.
 * If your form must be submitted with name/value pairs in semantic order and your form
 * contains an input of type='image" then pass true for this arg, otherwise pass false
 * (or nothing) to avoid the overhead for this logic.
 *
 * @example var data = $("#myForm").formToArray();
 * $.post( "myscript.cgi", data );
 * @desc Collect all the data from a form and submit it to the server.
 *
 * @name formToArray
 * @param semantic true if serialization must maintain strict semantic ordering of elements (slower)
 * @type Array<Object>
 * @cat Plugins/Form
 * @see ajaxForm
 * @see ajaxSubmit
 * @author jQuery Community
 */
jQuery.fn.formToArray = function(semantic) {
    var a = [];
    if (this.length == 0) return a;

    var form = this[0];
    var els = semantic ? form.getElementsByTagName('*') : form.elements;
    if (!els) return a;
    for(var i=0, max=els.length; i < max; i++) {
        var el = els[i];
        var n = el.name;
        if (!n) continue;

        if (semantic && form.clk && el.type == "image") {
            // handle image inputs on the fly when semantic == true
            if(!el.disabled && form.clk == el)
                a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
            continue;
        }
        var v = jQuery.fieldValue(el, true);
        if (v === null) continue;
        if (v.constructor == Array) {
            for(var j=0, jmax=v.length; j < jmax; j++)
                a.push({name: n, value: v[j]});
        }
        else
            a.push({name: n, value: v});
    }

    if (!semantic && form.clk) {
        // input type=='image' are not found in elements array! handle them here
        var inputs = form.getElementsByTagName("input");
        for(var i=0, max=inputs.length; i < max; i++) {
            var input = inputs[i];
            var n = input.name;
            if(n && !input.disabled && input.type == "image" && form.clk == input)
                a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
        }
    }
    return a;
};


/**
 * Serializes form data into a 'submittable' string. This method will return a string
 * in the format: name1=value1&amp;name2=value2
 *
 * The semantic argument can be used to force form serialization in semantic order.
 * If your form must be submitted with name/value pairs in semantic order then pass
 * true for this arg, otherwise pass false (or nothing) to avoid the overhead for
 * this logic (which can be significant for very large forms).
 *
 * @example var data = $("#myForm").formSerialize();
 * $.ajax('POST', "myscript.cgi", data);
 * @desc Collect all the data from a form into a single string
 *
 * @name formSerialize
 * @param semantic true if serialization must maintain strict semantic ordering of elements (slower)
 * @type String
 * @cat Plugins/Form
 * @see formToArray
 * @author jQuery Community
 */
jQuery.fn.formSerialize = function(semantic) {
    //hand off to jQuery.param for proper encoding
    return jQuery.param(this.formToArray(semantic));
};


/**
 * Serializes all field elements in the jQuery object into a query string.
 * This method will return a string in the format: name1=value1&amp;name2=value2
 *
 * The successful argument controls whether or not serialization is limited to
 * 'successful' controls (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
 * The default value of the successful argument is true.
 *
 * @example var data = $("input").formSerialize();
 * @desc Collect the data from all successful input elements into a query string
 *
 * @example var data = $(":radio").formSerialize();
 * @desc Collect the data from all successful radio input elements into a query string
 *
 * @example var data = $("#myForm :checkbox").formSerialize();
 * @desc Collect the data from all successful checkbox input elements in myForm into a query string
 *
 * @example var data = $("#myForm :checkbox").formSerialize(false);
 * @desc Collect the data from all checkbox elements in myForm (even the unchecked ones) into a query string
 *
 * @example var data = $(":input").formSerialize();
 * @desc Collect the data from all successful input, select, textarea and button elements into a query string
 *
 * @name fieldSerialize
 * @param successful true if only successful controls should be serialized (default is true)
 * @type String
 * @cat Plugins/Form
 */
jQuery.fn.fieldSerialize = function(successful) {
    var a = [];
    this.each(function() {
        var n = this.name;
        if (!n) return;
        var v = jQuery.fieldValue(this, successful);
        if (v && v.constructor == Array) {
            for (var i=0,max=v.length; i < max; i++)
                a.push({name: n, value: v[i]});
        }
        else if (v !== null && typeof v != 'undefined')
            a.push({name: this.name, value: v});
    });
    //hand off to jQuery.param for proper encoding
    return jQuery.param(a);
};


/**
 * Returns the value(s) of the element in the matched set.  For example, consider the following form:
 *
 *  <form><fieldset>
 *      <input name="A" type="text" />
 *      <input name="A" type="text" />
 *      <input name="B" type="checkbox" value="B1" />
 *      <input name="B" type="checkbox" value="B2"/>
 *      <input name="C" type="radio" value="C1" />
 *      <input name="C" type="radio" value="C2" />
 *  </fieldset></form>
 *
 *  var v = $(':text').fieldValue();
 *  // if no values are entered into the text inputs
 *  v == ['','']
 *  // if values entered into the text inputs are 'foo' and 'bar'
 *  v == ['foo','bar']
 *
 *  var v = $(':checkbox').fieldValue();
 *  // if neither checkbox is checked
 *  v === undefined
 *  // if both checkboxes are checked
 *  v == ['B1', 'B2']
 *
 *  var v = $(':radio').fieldValue();
 *  // if neither radio is checked
 *  v === undefined
 *  // if first radio is checked
 *  v == ['C1']
 *
 * The successful argument controls whether or not the field element must be 'successful'
 * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
 * The default value of the successful argument is true.  If this value is false the value(s)
 * for each element is returned.
 *
 * Note: This method *always* returns an array.  If no valid value can be determined the
 *       array will be empty, otherwise it will contain one or more values.
 *
 * @example var data = $("#myPasswordElement").fieldValue();
 * alert(data[0]);
 * @desc Alerts the current value of the myPasswordElement element
 *
 * @example var data = $("#myForm :input").fieldValue();
 * @desc Get the value(s) of the form elements in myForm
 *
 * @example var data = $("#myForm :checkbox").fieldValue();
 * @desc Get the value(s) for the successful checkbox element(s) in the jQuery object.
 *
 * @example var data = $("#mySingleSelect").fieldValue();
 * @desc Get the value(s) of the select control
 *
 * @example var data = $(':text').fieldValue();
 * @desc Get the value(s) of the text input or textarea elements
 *
 * @example var data = $("#myMultiSelect").fieldValue();
 * @desc Get the values for the select-multiple control
 *
 * @name fieldValue
 * @param Boolean successful true if only the values for successful controls should be returned (default is true)
 * @type Array<String>
 * @cat Plugins/Form
 */
jQuery.fn.fieldValue = function(successful) {
    for (var val=[], i=0, max=this.length; i < max; i++) {
        var el = this[i];
        var v = jQuery.fieldValue(el, successful);
        if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length))
            continue;
        v.constructor == Array ? jQuery.merge(val, v) : val.push(v);
    }
    return val;
};

/**
 * Returns the value of the field element.
 *
 * The successful argument controls whether or not the field element must be 'successful'
 * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
 * The default value of the successful argument is true.  If the given element is not
 * successful and the successful arg is not false then the returned value will be null.
 *
 * Note: If the successful flag is true (default) but the element is not successful, the return will be null
 * Note: The value returned for a successful select-multiple element will always be an array.
 * Note: If the element has no value the return value will be undefined.
 *
 * @example var data = jQuery.fieldValue($("#myPasswordElement")[0]);
 * @desc Gets the current value of the myPasswordElement element
 *
 * @name fieldValue
 * @param Element el The DOM element for which the value will be returned
 * @param Boolean successful true if value returned must be for a successful controls (default is true)
 * @type String or Array<String> or null or undefined
 * @cat Plugins/Form
 */
jQuery.fieldValue = function(el, successful) {
    var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
    if (typeof successful == 'undefined') successful = true;

    if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
        (t == 'checkbox' || t == 'radio') && !el.checked ||
        (t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
        tag == 'select' && el.selectedIndex == -1))
            return null;

    if (tag == 'select') {
        var index = el.selectedIndex;
        if (index < 0) return null;
        var a = [], ops = el.options;
        var one = (t == 'select-one');
        var max = (one ? index+1 : ops.length);
        for(var i=(one ? index : 0); i < max; i++) {
            var op = ops[i];
            if (op.selected) {
                // extra pain for IE...
                var v = jQuery.browser.msie && !(op.attributes['value'].specified) ? op.text : op.value;
                if (one) return v;
                a.push(v);
            }
        }
        return a;
    }
    return el.value;
};


/**
 * Clears the form data.  Takes the following actions on the form's input fields:
 *  - input text fields will have their 'value' property set to the empty string
 *  - select elements will have their 'selectedIndex' property set to -1
 *  - checkbox and radio inputs will have their 'checked' property set to false
 *  - inputs of type submit, button, reset, and hidden will *not* be effected
 *  - button elements will *not* be effected
 *
 * @example $('form').clearForm();
 * @desc Clears all forms on the page.
 *
 * @name clearForm
 * @type jQuery
 * @cat Plugins/Form
 * @see resetForm
 */
jQuery.fn.clearForm = function() {
    return this.each(function() {
        jQuery('input,select,textarea', this).clearFields();
    });
};

/**
 * Clears the selected form elements.  Takes the following actions on the matched elements:
 *  - input text fields will have their 'value' property set to the empty string
 *  - select elements will have their 'selectedIndex' property set to -1
 *  - checkbox and radio inputs will have their 'checked' property set to false
 *  - inputs of type submit, button, reset, and hidden will *not* be effected
 *  - button elements will *not* be effected
 *
 * @example $('.myInputs').clearFields();
 * @desc Clears all inputs with class myInputs
 *
 * @name clearFields
 * @type jQuery
 * @cat Plugins/Form
 * @see clearForm
 */
jQuery.fn.clearFields = jQuery.fn.clearInputs = function() {
    return this.each(function() {
        var t = this.type, tag = this.tagName.toLowerCase();
        if (t == 'text' || t == 'password' || tag == 'textarea')
            this.value = '';
        else if (t == 'checkbox' || t == 'radio')
            this.checked = false;
        else if (tag == 'select')
            this.selectedIndex = -1;
    });
};


/**
 * Resets the form data.  Causes all form elements to be reset to their original value.
 *
 * @example $('form').resetForm();
 * @desc Resets all forms on the page.
 *
 * @name resetForm
 * @type jQuery
 * @cat Plugins/Form
 * @see clearForm
 */
jQuery.fn.resetForm = function() {
    return this.each(function() {
        // guard against an input with the name of 'reset'
        // note that IE reports the reset function as an 'object'
        if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType))
            this.reset();
    });
};

