/*	SWFObject v2.2 <http://code.google.com/p/swfobject/> 
	is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
*/
var swfobject=function(){
	var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){
		var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;
		if(typeof t.plugins!=D&&typeof t.plugins[S]==r){
			ab=t.plugins[S].description;
			if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){
				T=true;
				X=false;
				ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");
				ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);
				ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);
				ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0
				}
			}else{
		if(typeof O.ActiveXObject!=D){
			try{
				var ad=new ActiveXObject(W);
				if(ad){
					ab=ad.GetVariable("$version");
					if(ab){
						X=true;
						ab=ab.split(" ")[1].split(",");
						ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]
						}
					}
			}catch(Z){}
}
}
return{
	w3:aa,
	pv:ag,
	wk:af,
	ie:X,
	win:ae,
	mac:ac
}
}(),k=function(){
	if(!M.w3){
		return
	}
	if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){
		f()
		}
		if(!J){
		if(typeof j.addEventListener!=D){
			j.addEventListener("DOMContentLoaded",f,false)
			}
			if(M.ie&&M.win){
			j.attachEvent(x,function(){
				if(j.readyState=="complete"){
					j.detachEvent(x,arguments.callee);
					f()
					}
				});
		if(O==top){
			(function(){
				if(J){
					return
				}
				try{
					j.documentElement.doScroll("left")
					}catch(X){
					setTimeout(arguments.callee,0);
					return
				}
				f()
				})()
			}
		}
	if(M.wk){
	(function(){
		if(J){
			return
		}
		if(!/loaded|complete/.test(j.readyState)){
			setTimeout(arguments.callee,0);
			return
		}
		f()
		})()
	}
	s(f)
}
}();
function f(){
	if(J){
		return
	}
	try{
		var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));
		Z.parentNode.removeChild(Z)
		}catch(aa){
		return
	}
	J=true;
	var X=U.length;
	for(var Y=0;Y<X;Y++){
		U[Y]()
		}
	}
	function K(X){
	if(J){
		X()
		}else{
		U[U.length]=X
		}
	}
function s(Y){
	if(typeof O.addEventListener!=D){
		O.addEventListener("load",Y,false)
		}else{
		if(typeof j.addEventListener!=D){
			j.addEventListener("load",Y,false)
			}else{
			if(typeof O.attachEvent!=D){
				i(O,"onload",Y)
				}else{
				if(typeof O.onload=="function"){
					var X=O.onload;
					O.onload=function(){
						X();
						Y()
						}
					}else{
				O.onload=Y
				}
			}
	}
}
}
function h(){
	if(T){
		V()
		}else{
		H()
		}
	}
function V(){
	var X=j.getElementsByTagName("body")[0];
	var aa=C(r);
	aa.setAttribute("type",q);
	var Z=X.appendChild(aa);
	if(Z){
		var Y=0;
		(function(){
			if(typeof Z.GetVariable!=D){
				var ab=Z.GetVariable("$version");
				if(ab){
					ab=ab.split(" ")[1].split(",");
					M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]
					}
				}else{
			if(Y<10){
				Y++;
				setTimeout(arguments.callee,10);
				return
			}
		}
		X.removeChild(aa);
		Z=null;
		H()
		})()
}else{
	H()
	}
}
function H(){
	var ag=o.length;
	if(ag>0){
		for(var af=0;af<ag;af++){
			var Y=o[af].id;
			var ab=o[af].callbackFn;
			var aa={
				success:false,
				id:Y
			};
			
			if(M.pv[0]>0){
				var ae=c(Y);
				if(ae){
					if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){
						w(Y,true);
						if(ab){
							aa.success=true;
							aa.ref=z(Y);
							ab(aa)
							}
						}else{
					if(o[af].expressInstall&&A()){
						var ai={};
						
						ai.data=o[af].expressInstall;
						ai.width=ae.getAttribute("width")||"0";
						ai.height=ae.getAttribute("height")||"0";
						if(ae.getAttribute("class")){
							ai.styleclass=ae.getAttribute("class")
							}
							if(ae.getAttribute("align")){
							ai.align=ae.getAttribute("align")
							}
							var ah={};
						
						var X=ae.getElementsByTagName("param");
						var ac=X.length;
						for(var ad=0;ad<ac;ad++){
							if(X[ad].getAttribute("name").toLowerCase()!="movie"){
								ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")
								}
							}
						P(ai,ah,Y,ab)
					}else{
					p(ae);
					if(ab){
						ab(aa)
						}
					}
			}
		}
}else{
	w(Y,true);
	if(ab){
		var Z=z(Y);
		if(Z&&typeof Z.SetVariable!=D){
			aa.success=true;
			aa.ref=Z
			}
			ab(aa)
		}
	}
}
}
}
function z(aa){
	var X=null;
	var Y=c(aa);
	if(Y&&Y.nodeName=="OBJECT"){
		if(typeof Y.SetVariable!=D){
			X=Y
			}else{
			var Z=Y.getElementsByTagName(r)[0];
			if(Z){
				X=Z
				}
			}
	}
return X
}
function A(){
	return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)
	}
	function P(aa,ab,X,Z){
	a=true;
	E=Z||null;
	B={
		success:false,
		id:X
	};
	
	var ae=c(X);
	if(ae){
		if(ae.nodeName=="OBJECT"){
			l=g(ae);
			Q=null
			}else{
			l=ae;
			Q=X
			}
			aa.id=R;
		if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){
			aa.width="310"
			}
			if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){
			aa.height="137"
			}
			j.title=j.title.slice(0,47)+" - Flash Player Installation";
		var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;
		if(typeof ab.flashvars!=D){
			ab.flashvars+="&"+ac
			}else{
			ab.flashvars=ac
			}
			if(M.ie&&M.win&&ae.readyState!=4){
			var Y=C("div");
			X+="SWFObjectNew";
			Y.setAttribute("id",X);
			ae.parentNode.insertBefore(Y,ae);
			ae.style.display="none";
			(function(){
				if(ae.readyState==4){
					ae.parentNode.removeChild(ae)
					}else{
					setTimeout(arguments.callee,10)
					}
				})()
		}
		u(aa,ab,X)
	}
}
function p(Y){
	if(M.ie&&M.win&&Y.readyState!=4){
		var X=C("div");
		Y.parentNode.insertBefore(X,Y);
		X.parentNode.replaceChild(g(Y),X);
		Y.style.display="none";
		(function(){
			if(Y.readyState==4){
				Y.parentNode.removeChild(Y)
				}else{
				setTimeout(arguments.callee,10)
				}
			})()
	}else{
	Y.parentNode.replaceChild(g(Y),Y)
	}
}
function g(ab){
	var aa=C("div");
	if(M.win&&M.ie){
		aa.innerHTML=ab.innerHTML
		}else{
		var Y=ab.getElementsByTagName(r)[0];
		if(Y){
			var ad=Y.childNodes;
			if(ad){
				var X=ad.length;
				for(var Z=0;Z<X;Z++){
					if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){
						aa.appendChild(ad[Z].cloneNode(true))
						}
					}
				}
		}
}
return aa
}
function u(ai,ag,Y){
	var X,aa=c(Y);
	if(M.wk&&M.wk<312){
		return X
		}
		if(aa){
		if(typeof ai.id==D){
			ai.id=Y
			}
			if(M.ie&&M.win){
			var ah="";
			for(var ae in ai){
				if(ai[ae]!=Object.prototype[ae]){
					if(ae.toLowerCase()=="data"){
						ag.movie=ai[ae]
						}else{
						if(ae.toLowerCase()=="styleclass"){
							ah+=' class="'+ai[ae]+'"'
							}else{
							if(ae.toLowerCase()!="classid"){
								ah+=" "+ae+'="'+ai[ae]+'"'
								}
							}
					}
			}
			}
		var af="";
for(var ad in ag){
	if(ag[ad]!=Object.prototype[ad]){
		af+='<param name="'+ad+'" value="'+ag[ad]+'" />'
		}
	}
aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";
N[N.length]=ai.id;
X=c(ai.id)
}else{
	var Z=C(r);
	Z.setAttribute("type",q);
	for(var ac in ai){
		if(ai[ac]!=Object.prototype[ac]){
			if(ac.toLowerCase()=="styleclass"){
				Z.setAttribute("class",ai[ac])
				}else{
				if(ac.toLowerCase()!="classid"){
					Z.setAttribute(ac,ai[ac])
					}
				}
		}
	}
	for(var ab in ag){
	if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){
		e(Z,ab,ag[ab])
		}
	}
aa.parentNode.replaceChild(Z,aa);
X=Z
}
}
return X
}
function e(Z,X,Y){
	var aa=C("param");
	aa.setAttribute("name",X);
	aa.setAttribute("value",Y);
	Z.appendChild(aa)
	}
	function y(Y){
	var X=c(Y);
	if(X&&X.nodeName=="OBJECT"){
		if(M.ie&&M.win){
			X.style.display="none";
			(function(){
				if(X.readyState==4){
					b(Y)
					}else{
					setTimeout(arguments.callee,10)
					}
				})()
		}else{
		X.parentNode.removeChild(X)
		}
	}
}
function b(Z){
	var Y=c(Z);
	if(Y){
		for(var X in Y){
			if(typeof Y[X]=="function"){
				Y[X]=null
				}
			}
		Y.parentNode.removeChild(Y)
	}
}
function c(Z){
	var X=null;
	try{
		X=j.getElementById(Z)
		}catch(Y){}
	return X
	}
	function C(X){
	return j.createElement(X)
	}
	function i(Z,X,Y){
	Z.attachEvent(X,Y);
	I[I.length]=[Z,X,Y]
	}
	function F(Z){
	var Y=M.pv,X=Z.split(".");
	X[0]=parseInt(X[0],10);
	X[1]=parseInt(X[1],10)||0;
	X[2]=parseInt(X[2],10)||0;
	return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false
	}
	function v(ac,Y,ad,ab){
	if(M.ie&&M.mac){
		return
	}
	var aa=j.getElementsByTagName("head")[0];
	if(!aa){
		return
	}
	var X=(ad&&typeof ad=="string")?ad:"screen";
	if(ab){
		n=null;
		G=null
		}
		if(!n||G!=X){
		var Z=C("style");
		Z.setAttribute("type","text/css");
		Z.setAttribute("media",X);
		n=aa.appendChild(Z);
		if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){
			n=j.styleSheets[j.styleSheets.length-1]
			}
			G=X
		}
		if(M.ie&&M.win){
		if(n&&typeof n.addRule==r){
			n.addRule(ac,Y)
			}
		}else{
	if(n&&typeof j.createTextNode!=D){
		n.appendChild(j.createTextNode(ac+" {"+Y+"}"))
		}
	}
}
function w(Z,X){
	if(!m){
		return
	}
	var Y=X?"visible":"hidden";
	if(J&&c(Z)){
		c(Z).style.visibility=Y
		}else{
		v("#"+Z,"visibility:"+Y)
		}
	}
function L(Y){
	var Z=/[\\\"<>\.;]/;
	var X=Z.exec(Y)!=null;
	return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y
	}
	var d=function(){
	if(M.ie&&M.win){
		window.attachEvent("onunload",function(){
			var ac=I.length;
			for(var ab=0;ab<ac;ab++){
				I[ab][0].detachEvent(I[ab][1],I[ab][2])
				}
				var Z=N.length;
			for(var aa=0;aa<Z;aa++){
				y(N[aa])
				}
				for(var Y in M){
				M[Y]=null
				}
				M=null;
			for(var X in swfobject){
				swfobject[X]=null
				}
				swfobject=null
			})
		}
	}();
return{
	registerObject:function(ab,X,aa,Z){
		if(M.w3&&ab&&X){
			var Y={};
			
			Y.id=ab;
			Y.swfVersion=X;
			Y.expressInstall=aa;
			Y.callbackFn=Z;
			o[o.length]=Y;
			w(ab,false)
			}else{
			if(Z){
				Z({
					success:false,
					id:ab
				})
				}
			}
	},
getObjectById:function(X){
	if(M.w3){
		return z(X)
		}
	},
embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){
	var X={
		success:false,
		id:ah
	};
	
	if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){
		w(ah,false);
		K(function(){
			ae+="";
			ag+="";
			var aj={};
			
			if(af&&typeof af===r){
				for(var al in af){
					aj[al]=af[al]
					}
				}
				aj.data=ab;
		aj.width=ae;
		aj.height=ag;
		var am={};
		
		if(ad&&typeof ad===r){
			for(var ak in ad){
				am[ak]=ad[ak]
				}
			}
			if(Z&&typeof Z===r){
			for(var ai in Z){
				if(typeof am.flashvars!=D){
					am.flashvars+="&"+ai+"="+Z[ai]
					}else{
					am.flashvars=ai+"="+Z[ai]
					}
				}
			}
			if(F(Y)){
	var an=u(aj,am,ah);
	if(aj.id==ah){
		w(ah,true)
		}
		X.success=true;
	X.ref=an
	}else{
	if(aa&&A()){
		aj.data=aa;
		P(aj,am,ah,ac);
		return
	}else{
		w(ah,true)
		}
	}
if(ac){
	ac(X)
	}
})
}else{
	if(ac){
		ac(X)
		}
	}
},
switchOffAutoHideShow:function(){
	m=false
	},
ua:M,
getFlashPlayerVersion:function(){
	return{
		major:M.pv[0],
		minor:M.pv[1],
		release:M.pv[2]
		}
	},
hasFlashPlayerVersion:F,
createSWF:function(Z,Y,X){
	if(M.w3){
		return u(Z,Y,X)
		}else{
		return undefined
		}
	},
showExpressInstall:function(Z,aa,X,Y){
	if(M.w3&&A()){
		P(Z,aa,X,Y)
		}
	},
removeSWF:function(X){
	if(M.w3){
		y(X)
		}
	},
createCSS:function(aa,Z,Y,X){
	if(M.w3){
		v(aa,Z,Y,X)
		}
	},
addDomLoadEvent:K,
addLoadEvent:s,
getQueryParamValue:function(aa){
	var Z=j.location.search||j.location.hash;
	if(Z){
		if(/\?/.test(Z)){
			Z=Z.split("?")[1]
			}
			if(aa==null){
			return L(Z)
			}
			var Y=Z.split("&");
		for(var X=0;X<Y.length;X++){
			if(Y[X].substring(0,Y[X].indexOf("="))==aa){
				return L(Y[X].substring((Y[X].indexOf("=")+1)))
				}
			}
		}
	return""
},
expressInstallCallback:function(){
	if(a){
		var X=c(R);
		if(X&&l){
			X.parentNode.replaceChild(l,X);
			if(Q){
				w(Q,true);
				if(M.ie&&M.win){
					l.style.display="block"
					}
				}
			if(E){
			E(B)
			}
		}
	a=false
}
}
}
}();/*!
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */
(function(){

	var 
	// Will speed up references to window, and allows munging its name.
	window = this,
	// Will speed up references to undefined, and allows munging its name.
	undefined,
	// Map over jQuery in case of overwrite
	_jQuery = window.jQuery,
	// Map over the $ in case of overwrite
	_$ = window.$,

	jQuery = window.jQuery = window.$ = function( selector, context ) {
		// The jQuery object is actually just the init constructor 'enhanced'
		return new jQuery.fn.init( selector, context );
	},

	// A simple way to check for HTML strings or ID strings
	// (both of which we optimize for)
	quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,
	// Is it a simple selector
	isSimple = /^.[^:#\[\.,]*$/;

	jQuery.fn = jQuery.prototype = {
		init: function( selector, context ) {
			// Make sure that a selection was provided
			selector = selector || document;

			// Handle $(DOMElement)
			if ( selector.nodeType ) {
				this[0] = selector;
				this.length = 1;
				this.context = selector;
				return this;
			}
			// Handle HTML strings
			if ( typeof selector === "string" ) {
				// Are we dealing with HTML string or an ID?
				var match = quickExpr.exec( selector );

				// Verify a match, and that no context was specified for #id
				if ( match && (match[1] || !context) ) {

					// HANDLE: $(html) -> $(array)
					if ( match[1] )
						selector = jQuery.clean( [ match[1] ], context );

					// HANDLE: $("#id")
					else {
						var elem = document.getElementById( match[3] );

						// Handle the case where IE and Opera return items
						// by name instead of ID
						if ( elem && elem.id != match[3] )
							return jQuery().find( selector );

						// Otherwise, we inject the element directly into the jQuery object
						var ret = jQuery( elem || [] );
						ret.context = document;
						ret.selector = selector;
						return ret;
					}

				// HANDLE: $(expr, [context])
				// (which is just equivalent to: $(content).find(expr)
				} else
					return jQuery( context ).find( selector );

			// HANDLE: $(function)
			// Shortcut for document ready
			} else if ( jQuery.isFunction( selector ) )
				return jQuery( document ).ready( selector );

			// Make sure that old selector state is passed along
			if ( selector.selector && selector.context ) {
				this.selector = selector.selector;
				this.context = selector.context;
			}

			return this.setArray(jQuery.isArray( selector ) ?
				selector :
				jQuery.makeArray(selector));
		},

		// Start with an empty selector
		selector: "",

		// The current version of jQuery being used
		jquery: "1.3.2",

		// The number of elements contained in the matched element set
		size: function() {
			return this.length;
		},

		// Get the Nth element in the matched element set OR
		// Get the whole matched element set as a clean array
		get: function( num ) {
			return num === undefined ?

			// Return a 'clean' array
			Array.prototype.slice.call( this ) :

			// Return just the object
			this[ num ];
		},

		// Take an array of elements and push it onto the stack
		// (returning the new matched element set)
		pushStack: function( elems, name, selector ) {
			// Build a new jQuery matched element set
			var ret = jQuery( elems );

			// Add the old object onto the stack (as a reference)
			ret.prevObject = this;

			ret.context = this.context;

			if ( name === "find" )
				ret.selector = this.selector + (this.selector ? " " : "") + selector;
			else if ( name )
				ret.selector = this.selector + "." + name + "(" + selector + ")";

			// Return the newly-formed element set
			return ret;
		},

		// Force the current matched set of elements to become
		// the specified array of elements (destroying the stack in the process)
		// You should use pushStack() in order to do this, but maintain the stack
		setArray: function( elems ) {
			// Resetting the length to 0, then using the native Array push
			// is a super-fast way to populate an object with array-like properties
			this.length = 0;
			Array.prototype.push.apply( this, elems );

			return this;
		},

		// Execute a callback for every element in the matched set.
		// (You can seed the arguments with an array of args, but this is
		// only used internally.)
		each: function( callback, args ) {
			return jQuery.each( this, callback, args );
		},

		// Determine the position of an element within
		// the matched set of elements
		index: function( elem ) {
			// Locate the position of the desired element
			return jQuery.inArray(
				// If it receives a jQuery object, the first element is used
				elem && elem.jquery ? elem[0] : elem
				, this );
		},

		attr: function( name, value, type ) {
			var options = name;

			// Look for the case where we're accessing a style value
			if ( typeof name === "string" )
				if ( value === undefined )
					return this[0] && jQuery[ type || "attr" ]( this[0], name );

				else {
					options = {};
					options[ name ] = value;
				}

			// Check to see if we're setting style values
			return this.each(function(i){
				// Set all the styles
				for ( name in options )
					jQuery.attr(
						type ?
						this.style :
						this,
						name, jQuery.prop( this, options[ name ], type, i, name )
						);
			});
		},

		css: function( key, value ) {
			// ignore negative width and height values
			if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 )
				value = undefined;
			return this.attr( key, value, "curCSS" );
		},

		text: function( text ) {
			if ( typeof text !== "object" && text != null )
				return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );

			var ret = "";

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

			return ret;
		},

		wrapAll: function( html ) {
			if ( this[0] ) {
				// The elements to wrap the target around
				var wrap = jQuery( html, this[0].ownerDocument ).clone();

				if ( this[0].parentNode )
					wrap.insertBefore( this[0] );

				wrap.map(function(){
					var elem = this;

					while ( elem.firstChild )
						elem = elem.firstChild;

					return elem;
				}).append(this);
			}

			return this;
		},

		wrapInner: function( html ) {
			return this.each(function(){
				jQuery( this ).contents().wrapAll( html );
			});
		},

		wrap: function( html ) {
			return this.each(function(){
				jQuery( this ).wrapAll( html );
			});
		},

		append: function() {
			return this.domManip(arguments, true, function(elem){
				if (this.nodeType == 1)
					this.appendChild( elem );
			});
		},

		prepend: function() {
			return this.domManip(arguments, true, function(elem){
				if (this.nodeType == 1)
					this.insertBefore( elem, this.firstChild );
			});
		},

		before: function() {
			return this.domManip(arguments, false, function(elem){
				this.parentNode.insertBefore( elem, this );
			});
		},

		after: function() {
			return this.domManip(arguments, false, function(elem){
				this.parentNode.insertBefore( elem, this.nextSibling );
			});
		},

		end: function() {
			return this.prevObject || jQuery( [] );
		},

		// For internal use only.
		// Behaves like an Array's method, not like a jQuery method.
		push: [].push,
		sort: [].sort,
		splice: [].splice,

		find: function( selector ) {
			if ( this.length === 1 ) {
				var ret = this.pushStack( [], "find", selector );
				ret.length = 0;
				jQuery.find( selector, this[0], ret );
				return ret;
			} else {
				return this.pushStack( jQuery.unique(jQuery.map(this, function(elem){
					return jQuery.find( selector, elem );
				})), "find", selector );
			}
		},

		clone: function( events ) {
			// Do the clone
			var ret = this.map(function(){
				if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) {
					// IE copies events bound via attachEvent when
					// using cloneNode. Calling detachEvent on the
					// clone will also remove the events from the orignal
					// In order to get around this, we use innerHTML.
					// Unfortunately, this means some modifications to
					// attributes in IE that are actually only stored
					// as properties will not be copied (such as the
					// the name attribute on an input).
					var html = this.outerHTML;
					if ( !html ) {
						var div = this.ownerDocument.createElement("div");
						div.appendChild( this.cloneNode(true) );
						html = div.innerHTML;
					}

					return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g, "").replace(/^\s*/, "")])[0];
				} else
					return this.cloneNode(true);
			});

			// Copy the events from the original to the clone
			if ( events === true ) {
				var orig = this.find("*").andSelf(), i = 0;

				ret.find("*").andSelf().each(function(){
					if ( this.nodeName !== orig[i].nodeName )
						return;

					var events = jQuery.data( orig[i], "events" );

					for ( var type in events ) {
						for ( var handler in events[ type ] ) {
							jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data );
						}
					}

					i++;
				});
			}

			// Return the cloned set
			return ret;
		},

		filter: function( selector ) {
			return this.pushStack(
				jQuery.isFunction( selector ) &&
				jQuery.grep(this, function(elem, i){
					return selector.call( elem, i );
				}) ||

				jQuery.multiFilter( selector, jQuery.grep(this, function(elem){
					return elem.nodeType === 1;
				}) ), "filter", selector );
		},

		closest: function( selector ) {
			var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null,
			closer = 0;

			return this.map(function(){
				var cur = this;
				while ( cur && cur.ownerDocument ) {
					if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) {
						jQuery.data(cur, "closest", closer);
						return cur;
					}
					cur = cur.parentNode;
					closer++;
				}
			});
		},

		not: function( selector ) {
			if ( typeof selector === "string" )
				// test special case where just one selector is passed in
				if ( isSimple.test( selector ) )
					return this.pushStack( jQuery.multiFilter( selector, this, true ), "not", selector );
				else
					selector = jQuery.multiFilter( selector, this );

			var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType;
			return this.filter(function() {
				return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector;
			});
		},

		add: function( selector ) {
			return this.pushStack( jQuery.unique( jQuery.merge(
				this.get(),
				typeof selector === "string" ?
				jQuery( selector ) :
				jQuery.makeArray( selector )
				)));
		},

		is: function( selector ) {
			return !!selector && jQuery.multiFilter( selector, this ).length > 0;
		},

		hasClass: function( selector ) {
			return !!selector && this.is( "." + selector );
		},

		val: function( value ) {
			if ( value === undefined ) {			
				var elem = this[0];

				if ( elem ) {
					if( jQuery.nodeName( elem, 'option' ) )
						return (elem.attributes.value || {}).specified ? elem.value : elem.text;
				
					// We need to handle select boxes special
					if ( jQuery.nodeName( elem, "select" ) ) {
						var index = elem.selectedIndex,
						values = [],
						options = elem.options,
						one = elem.type == "select-one";

						// Nothing was selected
						if ( index < 0 )
							return null;

						// Loop through all the selected options
						for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
							var option = options[ i ];

							if ( option.selected ) {
								// Get the specifc value for the option
								value = jQuery(option).val();

								// We don't need an array for one selects
								if ( one )
									return value;

								// Multi-Selects return an array
								values.push( value );
							}
						}

						return values;				
					}

					// Everything else, we just grab the value
					return (elem.value || "").replace(/\r/g, "");

				}

				return undefined;
			}

			if ( typeof value === "number" )
				value += '';

			return this.each(function(){
				if ( this.nodeType != 1 )
					return;

				if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) )
					this.checked = (jQuery.inArray(this.value, value) >= 0 ||
						jQuery.inArray(this.name, value) >= 0);

				else if ( jQuery.nodeName( this, "select" ) ) {
					var values = jQuery.makeArray(value);

					jQuery( "option", this ).each(function(){
						this.selected = (jQuery.inArray( this.value, values ) >= 0 ||
							jQuery.inArray( this.text, values ) >= 0);
					});

					if ( !values.length )
						this.selectedIndex = -1;

				} else
					this.value = value;
			});
		},

		html: function( value ) {
			return value === undefined ?
			(this[0] ?
				this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") :
				null) :
			this.empty().append( value );
		},

		replaceWith: function( value ) {
			return this.after( value ).remove();
		},

		eq: function( i ) {
			return this.slice( i, +i + 1 );
		},

		slice: function() {
			return this.pushStack( Array.prototype.slice.apply( this, arguments ),
				"slice", Array.prototype.slice.call(arguments).join(",") );
		},

		map: function( callback ) {
			return this.pushStack( jQuery.map(this, function(elem, i){
				return callback.call( elem, i, elem );
			}));
		},

		andSelf: function() {
			return this.add( this.prevObject );
		},

		domManip: function( args, table, callback ) {
			if ( this[0] ) {
				var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(),
				scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ),
				first = fragment.firstChild;

				if ( first )
					for ( var i = 0, l = this.length; i < l; i++ )
						callback.call( root(this[i], first), this.length > 1 || i > 0 ?
							fragment.cloneNode(true) : fragment );
		
				if ( scripts )
					jQuery.each( scripts, evalScript );
			}

			return this;
		
			function root( elem, cur ) {
				return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ?
				(elem.getElementsByTagName("tbody")[0] ||
					elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
				elem;
			}
		}
	};

	// Give the init function the jQuery prototype for later instantiation
	jQuery.fn.init.prototype = jQuery.fn;

	function evalScript( i, elem ) {
		if ( elem.src )
			jQuery.ajax({
				url: elem.src,
				async: false,
				dataType: "script"
			});

		else
			jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );

		if ( elem.parentNode )
			elem.parentNode.removeChild( elem );
	}

	function now(){
		return +new Date;
	}

	jQuery.extend = jQuery.fn.extend = function() {
		// copy reference to target object
		var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options;

		// Handle a deep copy situation
		if ( typeof target === "boolean" ) {
			deep = target;
			target = arguments[1] || {};
			// skip the boolean and the target
			i = 2;
		}

		// Handle case when target is a string or something (possible in deep copy)
		if ( typeof target !== "object" && !jQuery.isFunction(target) )
			target = {};

		// extend jQuery itself if only one argument is passed
		if ( length == i ) {
			target = this;
			--i;
		}

		for ( ; i < length; i++ )
			// Only deal with non-null/undefined values
			if ( (options = arguments[ i ]) != null )
				// Extend the base object
				for ( var name in options ) {
					var src = target[ name ], copy = options[ name ];

					// Prevent never-ending loop
					if ( target === copy )
						continue;

					// Recurse if we're merging object values
					if ( deep && copy && typeof copy === "object" && !copy.nodeType )
						target[ name ] = jQuery.extend( deep, 
							// Never move original objects, clone them
							src || ( copy.length != null ? [ ] : { } )
							, copy );

					// Don't bring in undefined values
					else if ( copy !== undefined )
						target[ name ] = copy;

				}

		// Return the modified object
		return target;
	};

	// exclude the following css properties to add px
	var	exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,
	// cache defaultView
	defaultView = document.defaultView || {},
	toString = Object.prototype.toString;

	jQuery.extend({
		noConflict: function( deep ) {
			window.$ = _$;

			if ( deep )
				window.jQuery = _jQuery;

			return jQuery;
		},

		// See test/unit/core.js for details concerning isFunction.
		// Since version 1.3, DOM methods and functions like alert
		// aren't supported. They return false on IE (#2968).
		isFunction: function( obj ) {
			return toString.call(obj) === "[object Function]";
		},

		isArray: function( obj ) {
			return toString.call(obj) === "[object Array]";
		},

		// check if an element is in a (or is an) XML document
		isXMLDoc: function( elem ) {
			return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" ||
			!!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument );
		},

		// Evalulates a script in a global context
		globalEval: function( data ) {
			if ( data && /\S/.test(data) ) {
				// Inspired by code by Andrea Giammarchi
				// http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
				var head = document.getElementsByTagName("head")[0] || document.documentElement,
				script = document.createElement("script");

				script.type = "text/javascript";
				if ( jQuery.support.scriptEval )
					script.appendChild( document.createTextNode( data ) );
				else
					script.text = data;

				// Use insertBefore instead of appendChild  to circumvent an IE6 bug.
				// This arises when a base node is used (#2709).
				head.insertBefore( script, head.firstChild );
				head.removeChild( script );
			}
		},

		nodeName: function( elem, name ) {
			return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
		},

		// args is for internal usage only
		each: function( object, callback, args ) {
			var name, i = 0, length = object.length;

			if ( args ) {
				if ( length === undefined ) {
					for ( name in object )
						if ( callback.apply( object[ name ], args ) === false )
							break;
				} else
					for ( ; i < length; )
						if ( callback.apply( object[ i++ ], args ) === false )
							break;

			// A special, fast, case for the most common use of each
			} else {
				if ( length === undefined ) {
					for ( name in object )
						if ( callback.call( object[ name ], name, object[ name ] ) === false )
							break;
				} else
					for ( var value = object[0];
						i < length && callback.call( value, i, value ) !== false; value = object[++i] ){}
			}

			return object;
		},

		prop: function( elem, value, type, i, name ) {
			// Handle executable functions
			if ( jQuery.isFunction( value ) )
				value = value.call( elem, i );

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

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

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

			// internal only, use hasClass("class")
			has: function( elem, className ) {
				return elem && jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1;
			}
		},

		// A method for quickly swapping in/out CSS properties to get correct calculations
		swap: function( elem, options, callback ) {
			var old = {};
			// Remember the old values, and insert the new ones
			for ( var name in options ) {
				old[ name ] = elem.style[ name ];
				elem.style[ name ] = options[ name ];
			}

			callback.call( elem );

			// Revert the old values
			for ( var name in options )
				elem.style[ name ] = old[ name ];
		},

		css: function( elem, name, force, extra ) {
			if ( name == "width" || name == "height" ) {
				var val, props = {
					position: "absolute", 
					visibility: "hidden", 
					display:"block"
				}, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ];

				function getWH() {
					val = name == "width" ? elem.offsetWidth : elem.offsetHeight;

					if ( extra === "border" )
						return;

					jQuery.each( which, function() {
						if ( !extra )
							val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0;
						if ( extra === "margin" )
							val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0;
						else
							val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0;
					});
				}

				if ( elem.offsetWidth !== 0 )
					getWH();
				else
					jQuery.swap( elem, props, getWH );

				return Math.max(0, Math.round(val));
			}

			return jQuery.curCSS( elem, name, force );
		},

		curCSS: function( elem, name, force ) {
			var ret, style = elem.style;

			// We need to handle opacity special in IE
			if ( name == "opacity" && !jQuery.support.opacity ) {
				ret = jQuery.attr( style, "opacity" );

				return ret == "" ?
				"1" :
				ret;
			}

			// Make sure we're using the right name for getting the float value
			if ( name.match( /float/i ) )
				name = styleFloat;

			if ( !force && style && style[ name ] )
				ret = style[ name ];

			else if ( defaultView.getComputedStyle ) {

				// Only "float" is needed here
				if ( name.match( /float/i ) )
					name = "float";

				name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase();

				var computedStyle = defaultView.getComputedStyle( elem, null );

				if ( computedStyle )
					ret = computedStyle.getPropertyValue( name );

				// We should always get a number back from opacity
				if ( name == "opacity" && ret == "" )
					ret = "1";

			} else if ( elem.currentStyle ) {
				var camelCase = name.replace(/\-(\w)/g, function(all, letter){
					return letter.toUpperCase();
				});

				ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];

				// From the awesome hack by Dean Edwards
				// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291

				// If we're not dealing with a regular pixel number
				// but a number that has a weird ending, we need to convert it to pixels
				if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) {
					// Remember the original values
					var left = style.left, rsLeft = elem.runtimeStyle.left;

					// Put in the new values to get a computed value out
					elem.runtimeStyle.left = elem.currentStyle.left;
					style.left = ret || 0;
					ret = style.pixelLeft + "px";

					// Revert the changed values
					style.left = left;
					elem.runtimeStyle.left = rsLeft;
				}
			}

			return ret;
		},

		clean: function( elems, context, fragment ) {
			context = context || document;

			// !context.createElement fails in IE with an error but returns typeof 'object'
			if ( typeof context.createElement === "undefined" )
				context = context.ownerDocument || context[0] && context[0].ownerDocument || document;

			// If a single string is passed in and it's a single tag
			// just do a createElement and skip the rest
			if ( !fragment && elems.length === 1 && typeof elems[0] === "string" ) {
				var match = /^<(\w+)\s*\/?>$/.exec(elems[0]);
				if ( match )
					return [ context.createElement( match[1] ) ];
			}

			var ret = [], scripts = [], div = context.createElement("div");

			jQuery.each(elems, function(i, elem){
				if ( typeof elem === "number" )
					elem += '';

				if ( !elem )
					return;

				// Convert html string into DOM nodes
				if ( typeof elem === "string" ) {
					// Fix "XHTML"-style tags in all browsers
					elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){
						return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ?
						all :
						front + "></" + tag + ">";
					});

					// Trim whitespace, otherwise indexOf won't work as expected
					var tags = elem.replace(/^\s+/, "").substring(0, 10).toLowerCase();

					var wrap =
					// option or optgroup
					!tags.indexOf("<opt") &&
					[ 1, "<select multiple='multiple'>", "</select>" ] ||

					!tags.indexOf("<leg") &&
					[ 1, "<fieldset>", "</fieldset>" ] ||

					tags.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
					[ 1, "<table>", "</table>" ] ||

					!tags.indexOf("<tr") &&
					[ 2, "<table><tbody>", "</tbody></table>" ] ||

					// <thead> matched above
					(!tags.indexOf("<td") || !tags.indexOf("<th")) &&
					[ 3, "<table><tbody><tr>", "</tr></tbody></table>" ] ||

					!tags.indexOf("<col") &&
					[ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ] ||

					// IE can't serialize <link> and <script> tags normally
					!jQuery.support.htmlSerialize &&
					[ 1, "div<div>", "</div>" ] ||

					[ 0, "", "" ];

					// Go to html and back, then peel off extra wrappers
					div.innerHTML = wrap[1] + elem + wrap[2];

					// Move to the right depth
					while ( wrap[0]-- )
						div = div.lastChild;

					// Remove IE's autoinserted <tbody> from table fragments
					if ( !jQuery.support.tbody ) {

						// String was a <table>, *may* have spurious <tbody>
						var hasBody = /<tbody/i.test(elem),
						tbody = !tags.indexOf("<table") && !hasBody ?
						div.firstChild && div.firstChild.childNodes :

						// String was a bare <thead> or <tfoot>
						wrap[1] == "<table>" && !hasBody ?
						div.childNodes :
						[];

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

					}

					// IE completely kills leading whitespace when innerHTML is used
					if ( !jQuery.support.leadingWhitespace && /^\s/.test( elem ) )
						div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild );
				
					elem = jQuery.makeArray( div.childNodes );
				}

				if ( elem.nodeType )
					ret.push( elem );
				else
					ret = jQuery.merge( ret, elem );

			});

			if ( fragment ) {
				for ( var i = 0; ret[i]; i++ ) {
					if ( jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
						scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
					} else {
						if ( ret[i].nodeType === 1 )
							ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) );
						fragment.appendChild( ret[i] );
					}
				}
			
				return scripts;
			}

			return ret;
		},

		attr: function( elem, name, value ) {
			// don't set attributes on text and comment nodes
			if (!elem || elem.nodeType == 3 || elem.nodeType == 8)
				return undefined;

			var notxml = !jQuery.isXMLDoc( elem ),
			// Whether we are setting (or getting)
			set = value !== undefined;

			// Try to normalize/fix the name
			name = notxml && jQuery.props[ name ] || name;

			// Only do all the following if this is a node (faster for style)
			// IE elem.getAttribute passes even for style
			if ( elem.tagName ) {

				// These attributes require special treatment
				var special = /href|src|style/.test( name );

				// Safari mis-reports the default selected property of a hidden option
				// Accessing the parent's selectedIndex property fixes it
				if ( name == "selected" && elem.parentNode )
					elem.parentNode.selectedIndex;

				// If applicable, access the attribute via the DOM 0 way
				if ( name in elem && notxml && !special ) {
					if ( set ){
						// We can't allow the type property to be changed (since it causes problems in IE)
						if ( name == "type" && jQuery.nodeName( elem, "input" ) && elem.parentNode )
							throw "type property can't be changed";

						elem[ name ] = value;
					}

					// browsers index elements by id/name on forms, give priority to attributes.
					if( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) )
						return elem.getAttributeNode( name ).nodeValue;

					// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
					// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
					if ( name == "tabIndex" ) {
						var attributeNode = elem.getAttributeNode( "tabIndex" );
						return attributeNode && attributeNode.specified
						? attributeNode.value
						: elem.nodeName.match(/(button|input|object|select|textarea)/i)
						? 0
						: elem.nodeName.match(/^(a|area)$/i) && elem.href
						? 0
						: undefined;
					}

					return elem[ name ];
				}

				if ( !jQuery.support.style && notxml &&  name == "style" )
					return jQuery.attr( elem.style, "cssText", value );

				if ( set )
					// convert the value to a string (all browsers do this but IE) see #1070
					elem.setAttribute( name, "" + value );

				var attr = !jQuery.support.hrefNormalized && notxml && special
				// Some attributes require a special call on IE
				? elem.getAttribute( name, 2 )
				: elem.getAttribute( name );

				// Non-existent attributes return null, we normalize to undefined
				return attr === null ? undefined : attr;
			}

			// elem is actually elem.style ... set the style

			// IE uses filters for opacity
			if ( !jQuery.support.opacity && name == "opacity" ) {
				if ( set ) {
					// 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
					elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) +
					(parseInt( value ) + '' == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
				}

				return elem.filter && elem.filter.indexOf("opacity=") >= 0 ?
				(parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100) + '':
				"";
			}

			name = name.replace(/-([a-z])/ig, function(all, letter){
				return letter.toUpperCase();
			});

			if ( set )
				elem[ name ] = value;

			return elem[ name ];
		},

		trim: function( text ) {
			return (text || "").replace( /^\s+|\s+$/g, "" );
		},

		makeArray: function( array ) {
			var ret = [];

			if( array != null ){
				var i = array.length;
				// The window, strings (and functions) also have 'length'
				if( i == null || typeof array === "string" || jQuery.isFunction(array) || array.setInterval )
					ret[0] = array;
				else
					while( i )
						ret[--i] = array[i];
			}

			return ret;
		},

		inArray: function( elem, array ) {
			for ( var i = 0, length = array.length; i < length; i++ )
				// Use === because on IE, window == document
				if ( array[ i ] === elem )
					return i;

			return -1;
		},

		merge: function( first, second ) {
			// We have to loop this way because IE & Opera overwrite the length
			// expando of getElementsByTagName
			var i = 0, elem, pos = first.length;
			// Also, we need to make sure that the correct elements are being returned
			// (IE returns comment nodes in a '*' query)
			if ( !jQuery.support.getAll ) {
				while ( (elem = second[ i++ ]) != null )
					if ( elem.nodeType != 8 )
						first[ pos++ ] = elem;

			} else
				while ( (elem = second[ i++ ]) != null )
					first[ pos++ ] = elem;

			return first;
		},

		unique: function( array ) {
			var ret = [], done = {};

			try {

				for ( var i = 0, length = array.length; i < length; i++ ) {
					var id = jQuery.data( array[ i ] );

					if ( !done[ id ] ) {
						done[ id ] = true;
						ret.push( array[ i ] );
					}
				}

			} catch( e ) {
				ret = array;
			}

			return ret;
		},

		grep: function( elems, callback, inv ) {
			var ret = [];

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

			return ret;
		},

		map: function( elems, callback ) {
			var ret = [];

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

				if ( value != null )
					ret[ ret.length ] = value;
			}

			return ret.concat.apply( [], ret );
		}
	});

	// Use of jQuery.browser is deprecated.
	// It's included for backwards compatibility and plugins,
	// although they should work to migrate away.

	var userAgent = navigator.userAgent.toLowerCase();

	// Figure out what browser is being used
	jQuery.browser = {
		version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1],
		safari: /webkit/.test( userAgent ),
		opera: /opera/.test( userAgent ),
		msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),
		mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )
	};

	jQuery.each({
		parent: function(elem){
			return elem.parentNode;
		},
		parents: function(elem){
			return jQuery.dir(elem,"parentNode");
		},
		next: function(elem){
			return jQuery.nth(elem,2,"nextSibling");
		},
		prev: function(elem){
			return jQuery.nth(elem,2,"previousSibling");
		},
		nextAll: function(elem){
			return jQuery.dir(elem,"nextSibling");
		},
		prevAll: function(elem){
			return jQuery.dir(elem,"previousSibling");
		},
		siblings: function(elem){
			return jQuery.sibling(elem.parentNode.firstChild,elem);
		},
		children: function(elem){
			return jQuery.sibling(elem.firstChild);
		},
		contents: function(elem){
			return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);
		}
	}, function(name, fn){
		jQuery.fn[ name ] = function( selector ) {
			var ret = jQuery.map( this, fn );

			if ( selector && typeof selector == "string" )
				ret = jQuery.multiFilter( selector, ret );

			return this.pushStack( jQuery.unique( ret ), name, selector );
		};
	});

	jQuery.each({
		appendTo: "append",
		prependTo: "prepend",
		insertBefore: "before",
		insertAfter: "after",
		replaceAll: "replaceWith"
	}, function(name, original){
		jQuery.fn[ name ] = function( selector ) {
			var ret = [], insert = jQuery( selector );

			for ( var i = 0, l = insert.length; i < l; i++ ) {
				var elems = (i > 0 ? this.clone(true) : this).get();
				jQuery.fn[ original ].apply( jQuery(insert[i]), elems );
				ret = ret.concat( elems );
			}

			return this.pushStack( ret, name, selector );
		};
	});

	jQuery.each({
		removeAttr: function( name ) {
			jQuery.attr( this, name, "" );
			if (this.nodeType == 1)
				this.removeAttribute( name );
		},

		addClass: function( classNames ) {
			jQuery.className.add( this, classNames );
		},

		removeClass: function( classNames ) {
			jQuery.className.remove( this, classNames );
		},

		toggleClass: function( classNames, state ) {
			if( typeof state !== "boolean" )
				state = !jQuery.className.has( this, classNames );
			jQuery.className[ state ? "add" : "remove" ]( this, classNames );
		},

		remove: function( selector ) {
			if ( !selector || jQuery.filter( selector, [ this ] ).length ) {
				// Prevent memory leaks
				jQuery( "*", this ).add([this]).each(function(){
					jQuery.event.remove(this);
					jQuery.removeData(this);
				});
				if (this.parentNode)
					this.parentNode.removeChild( this );
			}
		},

		empty: function() {
			// Remove element nodes and prevent memory leaks
			jQuery(this).children().remove();

			// Remove any remaining nodes
			while ( this.firstChild )
				this.removeChild( this.firstChild );
		}
	}, function(name, fn){
		jQuery.fn[ name ] = function(){
			return this.each( fn, arguments );
		};
	});

	// Helper function used by the dimensions and offset modules
	function num(elem, prop) {
		return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0;
	}
	var expando = "jQuery" + now(), uuid = 0, windowData = {};

	jQuery.extend({
		cache: {},

		data: function( elem, name, data ) {
			elem = elem == window ?
			windowData :
			elem;

			var id = elem[ expando ];

			// Compute a unique ID for the element
			if ( !id )
				id = elem[ expando ] = ++uuid;

			// Only generate the data cache if we're
			// trying to access or manipulate it
			if ( name && !jQuery.cache[ id ] )
				jQuery.cache[ id ] = {};

			// Prevent overriding the named cache with undefined values
			if ( data !== undefined )
				jQuery.cache[ id ][ name ] = data;

			// Return the named cache data, or the ID for the element
			return name ?
			jQuery.cache[ id ][ name ] :
			id;
		},

		removeData: function( elem, name ) {
			elem = elem == window ?
			windowData :
			elem;

			var id = elem[ expando ];

			// If we want to remove a specific section of the element's data
			if ( name ) {
				if ( jQuery.cache[ id ] ) {
					// Remove the section of cache data
					delete jQuery.cache[ id ][ name ];

					// If we've removed all the data, remove the element's cache
					name = "";

					for ( name in jQuery.cache[ id ] )
						break;

					if ( !name )
						jQuery.removeData( elem );
				}

			// Otherwise, we want to remove all of the element's data
			} else {
				// Clean up the element expando
				try {
					delete elem[ expando ];
				} catch(e){
					// IE has trouble directly removing the expando
					// but it's ok with using removeAttribute
					if ( elem.removeAttribute )
						elem.removeAttribute( expando );
				}

				// Completely remove the data cache
				delete jQuery.cache[ id ];
			}
		},
		queue: function( elem, type, data ) {
			if ( elem ){
	
				type = (type || "fx") + "queue";
	
				var q = jQuery.data( elem, type );
	
				if ( !q || jQuery.isArray(data) )
					q = jQuery.data( elem, type, jQuery.makeArray(data) );
				else if( data )
					q.push( data );
	
			}
			return q;
		},

		dequeue: function( elem, type ){
			var queue = jQuery.queue( elem, type ),
			fn = queue.shift();
		
			if( !type || type === "fx" )
				fn = queue[0];
			
			if( fn !== undefined )
				fn.call(elem);
		}
	});

	jQuery.fn.extend({
		data: function( key, value ){
			var parts = key.split(".");
			parts[1] = parts[1] ? "." + parts[1] : "";

			if ( value === undefined ) {
				var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);

				if ( data === undefined && this.length )
					data = jQuery.data( this[0], key );

				return data === undefined && parts[1] ?
				this.data( parts[0] ) :
				data;
			} else
				return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){
					jQuery.data( this, key, value );
				});
		},

		removeData: function( key ){
			return this.each(function(){
				jQuery.removeData( this, key );
			});
		},
		queue: function(type, data){
			if ( typeof type !== "string" ) {
				data = type;
				type = "fx";
			}

			if ( data === undefined )
				return jQuery.queue( this[0], type );

			return this.each(function(){
				var queue = jQuery.queue( this, type, data );
			
				if( type == "fx" && queue.length == 1 )
					queue[0].call(this);
			});
		},
		dequeue: function(type){
			return this.each(function(){
				jQuery.dequeue( this, type );
			});
		}
	});/*!
 * Sizzle CSS Selector Engine - v0.9.3
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
	(function(){

		var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,
		done = 0,
		toString = Object.prototype.toString;

		var Sizzle = function(selector, context, results, seed) {
			results = results || [];
			context = context || document;

			if ( context.nodeType !== 1 && context.nodeType !== 9 )
				return [];
	
			if ( !selector || typeof selector !== "string" ) {
				return results;
			}

			var parts = [], m, set, checkSet, check, mode, extra, prune = true;
	
			// Reset the position of the chunker regexp (start from head)
			chunker.lastIndex = 0;
	
			while ( (m = chunker.exec(selector)) !== null ) {
				parts.push( m[1] );
		
				if ( m[2] ) {
					extra = RegExp.rightContext;
					break;
				}
			}

			if ( parts.length > 1 && origPOS.exec( selector ) ) {
				if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
					set = posProcess( parts[0] + parts[1], context );
				} else {
					set = Expr.relative[ parts[0] ] ?
					[ context ] :
					Sizzle( parts.shift(), context );

					while ( parts.length ) {
						selector = parts.shift();

						if ( Expr.relative[ selector ] )
							selector += parts.shift();

						set = posProcess( selector, set );
					}
				}
			} else {
				var ret = seed ?
				{
					expr: parts.pop(), 
					set: makeArray(seed)
				} :
				Sizzle.find( parts.pop(), parts.length === 1 && context.parentNode ? context.parentNode : context, isXML(context) );
				set = Sizzle.filter( ret.expr, ret.set );

				if ( parts.length > 0 ) {
					checkSet = makeArray(set);
				} else {
					prune = false;
				}

				while ( parts.length ) {
					var cur = parts.pop(), pop = cur;

					if ( !Expr.relative[ cur ] ) {
						cur = "";
					} else {
						pop = parts.pop();
					}

					if ( pop == null ) {
						pop = context;
					}

					Expr.relative[ cur ]( checkSet, pop, isXML(context) );
				}
			}

			if ( !checkSet ) {
				checkSet = set;
			}

			if ( !checkSet ) {
				throw "Syntax error, unrecognized expression: " + (cur || selector);
			}

			if ( toString.call(checkSet) === "[object Array]" ) {
				if ( !prune ) {
					results.push.apply( results, checkSet );
				} else if ( context.nodeType === 1 ) {
					for ( var i = 0; checkSet[i] != null; i++ ) {
						if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && contains(context, checkSet[i])) ) {
							results.push( set[i] );
						}
					}
				} else {
					for ( var i = 0; checkSet[i] != null; i++ ) {
						if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
							results.push( set[i] );
						}
					}
				}
			} else {
				makeArray( checkSet, results );
			}

			if ( extra ) {
				Sizzle( extra, context, results, seed );

				if ( sortOrder ) {
					hasDuplicate = false;
					results.sort(sortOrder);

					if ( hasDuplicate ) {
						for ( var i = 1; i < results.length; i++ ) {
							if ( results[i] === results[i-1] ) {
								results.splice(i--, 1);
							}
						}
					}
				}
			}

			return results;
		};

		Sizzle.matches = function(expr, set){
			return Sizzle(expr, null, null, set);
		};

		Sizzle.find = function(expr, context, isXML){
			var set, match;

			if ( !expr ) {
				return [];
			}

			for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
				var type = Expr.order[i], match;
		
				if ( (match = Expr.match[ type ].exec( expr )) ) {
					var left = RegExp.leftContext;

					if ( left.substr( left.length - 1 ) !== "\\" ) {
						match[1] = (match[1] || "").replace(/\\/g, "");
						set = Expr.find[ type ]( match, context, isXML );
						if ( set != null ) {
							expr = expr.replace( Expr.match[ type ], "" );
							break;
						}
					}
				}
			}

			if ( !set ) {
				set = context.getElementsByTagName("*");
			}

			return {
				set: set, 
				expr: expr
			};
		};

		Sizzle.filter = function(expr, set, inplace, not){
			var old = expr, result = [], curLoop = set, match, anyFound,
			isXMLFilter = set && set[0] && isXML(set[0]);

			while ( expr && set.length ) {
				for ( var type in Expr.filter ) {
					if ( (match = Expr.match[ type ].exec( expr )) != null ) {
						var filter = Expr.filter[ type ], found, item;
						anyFound = false;

						if ( curLoop == result ) {
							result = [];
						}

						if ( Expr.preFilter[ type ] ) {
							match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );

							if ( !match ) {
								anyFound = found = true;
							} else if ( match === true ) {
								continue;
							}
						}

						if ( match ) {
							for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
								if ( item ) {
									found = filter( item, match, i, curLoop );
									var pass = not ^ !!found;

									if ( inplace && found != null ) {
										if ( pass ) {
											anyFound = true;
										} else {
											curLoop[i] = false;
										}
									} else if ( pass ) {
										result.push( item );
										anyFound = true;
									}
								}
							}
						}

						if ( found !== undefined ) {
							if ( !inplace ) {
								curLoop = result;
							}

							expr = expr.replace( Expr.match[ type ], "" );

							if ( !anyFound ) {
								return [];
							}

							break;
						}
					}
				}

				// Improper expression
				if ( expr == old ) {
					if ( anyFound == null ) {
						throw "Syntax error, unrecognized expression: " + expr;
					} else {
						break;
					}
				}

				old = expr;
			}

			return curLoop;
		};

		var Expr = Sizzle.selectors = {
			order: [ "ID", "NAME", "TAG" ],
			match: {
				ID: /#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,
				CLASS: /\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,
				NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,
				ATTR: /\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
				TAG: /^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,
				CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,
				POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,
				PSEUDO: /:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/
			},
			attrMap: {
				"class": "className",
				"for": "htmlFor"
			},
			attrHandle: {
				href: function(elem){
					return elem.getAttribute("href");
				}
			},
			relative: {
				"+": function(checkSet, part, isXML){
					var isPartStr = typeof part === "string",
					isTag = isPartStr && !/\W/.test(part),
					isPartStrNotTag = isPartStr && !isTag;

					if ( isTag && !isXML ) {
						part = part.toUpperCase();
					}

					for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
						if ( (elem = checkSet[i]) ) {
							while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}

							checkSet[i] = isPartStrNotTag || elem && elem.nodeName === part ?
							elem || false :
							elem === part;
						}
					}

					if ( isPartStrNotTag ) {
						Sizzle.filter( part, checkSet, true );
					}
				},
				">": function(checkSet, part, isXML){
					var isPartStr = typeof part === "string";

					if ( isPartStr && !/\W/.test(part) ) {
						part = isXML ? part : part.toUpperCase();

						for ( var i = 0, l = checkSet.length; i < l; i++ ) {
							var elem = checkSet[i];
							if ( elem ) {
								var parent = elem.parentNode;
								checkSet[i] = parent.nodeName === part ? parent : false;
							}
						}
					} else {
						for ( var i = 0, l = checkSet.length; i < l; i++ ) {
							var elem = checkSet[i];
							if ( elem ) {
								checkSet[i] = isPartStr ?
								elem.parentNode :
								elem.parentNode === part;
							}
						}

						if ( isPartStr ) {
							Sizzle.filter( part, checkSet, true );
						}
					}
				},
				"": function(checkSet, part, isXML){
					var doneName = done++, checkFn = dirCheck;

					if ( !part.match(/\W/) ) {
						var nodeCheck = part = isXML ? part : part.toUpperCase();
						checkFn = dirNodeCheck;
					}

					checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML);
				},
				"~": function(checkSet, part, isXML){
					var doneName = done++, checkFn = dirCheck;

					if ( typeof part === "string" && !part.match(/\W/) ) {
						var nodeCheck = part = isXML ? part : part.toUpperCase();
						checkFn = dirNodeCheck;
					}

					checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML);
				}
			},
			find: {
				ID: function(match, context, isXML){
					if ( typeof context.getElementById !== "undefined" && !isXML ) {
						var m = context.getElementById(match[1]);
						return m ? [m] : [];
					}
				},
				NAME: function(match, context, isXML){
					if ( typeof context.getElementsByName !== "undefined" ) {
						var ret = [], results = context.getElementsByName(match[1]);

						for ( var i = 0, l = results.length; i < l; i++ ) {
							if ( results[i].getAttribute("name") === match[1] ) {
								ret.push( results[i] );
							}
						}

						return ret.length === 0 ? null : ret;
					}
				},
				TAG: function(match, context){
					return context.getElementsByTagName(match[1]);
				}
			},
			preFilter: {
				CLASS: function(match, curLoop, inplace, result, not, isXML){
					match = " " + match[1].replace(/\\/g, "") + " ";

					if ( isXML ) {
						return match;
					}

					for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
						if ( elem ) {
							if ( not ^ (elem.className && (" " + elem.className + " ").indexOf(match) >= 0) ) {
								if ( !inplace )
									result.push( elem );
							} else if ( inplace ) {
								curLoop[i] = false;
							}
						}
					}

					return false;
				},
				ID: function(match){
					return match[1].replace(/\\/g, "");
				},
				TAG: function(match, curLoop){
					for ( var i = 0; curLoop[i] === false; i++ ){}
					return curLoop[i] && isXML(curLoop[i]) ? match[1] : match[1].toUpperCase();
				},
				CHILD: function(match){
					if ( match[1] == "nth" ) {
						// parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
						var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
							match[2] == "even" && "2n" || match[2] == "odd" && "2n+1" ||
							!/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);

						// calculate the numbers (first)n+(last) including if they are negative
						match[2] = (test[1] + (test[2] || 1)) - 0;
						match[3] = test[3] - 0;
					}

					// TODO: Move to normal caching system
					match[0] = done++;

					return match;
				},
				ATTR: function(match, curLoop, inplace, result, not, isXML){
					var name = match[1].replace(/\\/g, "");
			
					if ( !isXML && Expr.attrMap[name] ) {
						match[1] = Expr.attrMap[name];
					}

					if ( match[2] === "~=" ) {
						match[4] = " " + match[4] + " ";
					}

					return match;
				},
				PSEUDO: function(match, curLoop, inplace, result, not){
					if ( match[1] === "not" ) {
						// If we're dealing with a complex expression, or a simple one
						if ( match[3].match(chunker).length > 1 || /^\w/.test(match[3]) ) {
							match[3] = Sizzle(match[3], null, null, curLoop);
						} else {
							var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
							if ( !inplace ) {
								result.push.apply( result, ret );
							}
							return false;
						}
					} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
						return true;
					}
			
					return match;
				},
				POS: function(match){
					match.unshift( true );
					return match;
				}
			},
			filters: {
				enabled: function(elem){
					return elem.disabled === false && elem.type !== "hidden";
				},
				disabled: function(elem){
					return elem.disabled === true;
				},
				checked: function(elem){
					return elem.checked === true;
				},
				selected: function(elem){
					// Accessing this property makes selected-by-default
					// options in Safari work properly
					elem.parentNode.selectedIndex;
					return elem.selected === true;
				},
				parent: function(elem){
					return !!elem.firstChild;
				},
				empty: function(elem){
					return !elem.firstChild;
				},
				has: function(elem, i, match){
					return !!Sizzle( match[3], elem ).length;
				},
				header: function(elem){
					return /h\d/i.test( elem.nodeName );
				},
				text: function(elem){
					return "text" === elem.type;
				},
				radio: function(elem){
					return "radio" === elem.type;
				},
				checkbox: function(elem){
					return "checkbox" === elem.type;
				},
				file: function(elem){
					return "file" === elem.type;
				},
				password: function(elem){
					return "password" === elem.type;
				},
				submit: function(elem){
					return "submit" === elem.type;
				},
				image: function(elem){
					return "image" === elem.type;
				},
				reset: function(elem){
					return "reset" === elem.type;
				},
				button: function(elem){
					return "button" === elem.type || elem.nodeName.toUpperCase() === "BUTTON";
				},
				input: function(elem){
					return /input|select|textarea|button/i.test(elem.nodeName);
				}
			},
			setFilters: {
				first: function(elem, i){
					return i === 0;
				},
				last: function(elem, i, match, array){
					return i === array.length - 1;
				},
				even: function(elem, i){
					return i % 2 === 0;
				},
				odd: function(elem, i){
					return i % 2 === 1;
				},
				lt: function(elem, i, match){
					return i < match[3] - 0;
				},
				gt: function(elem, i, match){
					return i > match[3] - 0;
				},
				nth: function(elem, i, match){
					return match[3] - 0 == i;
				},
				eq: function(elem, i, match){
					return match[3] - 0 == i;
				}
			},
			filter: {
				PSEUDO: function(elem, match, i, array){
					var name = match[1], filter = Expr.filters[ name ];

					if ( filter ) {
						return filter( elem, i, match, array );
					} else if ( name === "contains" ) {
						return (elem.textContent || elem.innerText || "").indexOf(match[3]) >= 0;
					} else if ( name === "not" ) {
						var not = match[3];

						for ( var i = 0, l = not.length; i < l; i++ ) {
							if ( not[i] === elem ) {
								return false;
							}
						}

						return true;
					}
				},
				CHILD: function(elem, match){
					var type = match[1], node = elem;
					switch (type) {
						case 'only':
						case 'first':
							while (node = node.previousSibling)  {
								if ( node.nodeType === 1 ) return false;
							}
							if ( type == 'first') return true;
							node = elem;
						case 'last':
							while (node = node.nextSibling)  {
								if ( node.nodeType === 1 ) return false;
							}
							return true;
						case 'nth':
							var first = match[2], last = match[3];

							if ( first == 1 && last == 0 ) {
								return true;
							}
					
							var doneName = match[0],
							parent = elem.parentNode;
	
							if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
								var count = 0;
								for ( node = parent.firstChild; node; node = node.nextSibling ) {
									if ( node.nodeType === 1 ) {
										node.nodeIndex = ++count;
									}
								} 
								parent.sizcache = doneName;
							}
					
							var diff = elem.nodeIndex - last;
							if ( first == 0 ) {
								return diff == 0;
							} else {
								return ( diff % first == 0 && diff / first >= 0 );
							}
					}
				},
				ID: function(elem, match){
					return elem.nodeType === 1 && elem.getAttribute("id") === match;
				},
				TAG: function(elem, match){
					return (match === "*" && elem.nodeType === 1) || elem.nodeName === match;
				},
				CLASS: function(elem, match){
					return (" " + (elem.className || elem.getAttribute("class")) + " ")
					.indexOf( match ) > -1;
				},
				ATTR: function(elem, match){
					var name = match[1],
					result = Expr.attrHandle[ name ] ?
					Expr.attrHandle[ name ]( elem ) :
					elem[ name ] != null ?
					elem[ name ] :
					elem.getAttribute( name ),
					value = result + "",
					type = match[2],
					check = match[4];

					return result == null ?
					type === "!=" :
					type === "=" ?
					value === check :
					type === "*=" ?
					value.indexOf(check) >= 0 :
					type === "~=" ?
					(" " + value + " ").indexOf(check) >= 0 :
					!check ?
					value && result !== false :
					type === "!=" ?
					value != check :
					type === "^=" ?
					value.indexOf(check) === 0 :
					type === "$=" ?
					value.substr(value.length - check.length) === check :
					type === "|=" ?
					value === check || value.substr(0, check.length + 1) === check + "-" :
					false;
				},
				POS: function(elem, match, i, array){
					var name = match[2], filter = Expr.setFilters[ name ];

					if ( filter ) {
						return filter( elem, i, match, array );
					}
				}
			}
		};

		var origPOS = Expr.match.POS;

		for ( var type in Expr.match ) {
			Expr.match[ type ] = RegExp( Expr.match[ type ].source + /(?![^\[]*\])(?![^\(]*\))/.source );
		}

		var makeArray = function(array, results) {
			array = Array.prototype.slice.call( array );

			if ( results ) {
				results.push.apply( results, array );
				return results;
			}
	
			return array;
		};

		// Perform a simple check to determine if the browser is capable of
		// converting a NodeList to an array using builtin methods.
		try {
			Array.prototype.slice.call( document.documentElement.childNodes );

		// Provide a fallback method if it does not work
		} catch(e){
			makeArray = function(array, results) {
				var ret = results || [];

				if ( toString.call(array) === "[object Array]" ) {
					Array.prototype.push.apply( ret, array );
				} else {
					if ( typeof array.length === "number" ) {
						for ( var i = 0, l = array.length; i < l; i++ ) {
							ret.push( array[i] );
						}
					} else {
						for ( var i = 0; array[i]; i++ ) {
							ret.push( array[i] );
						}
					}
				}

				return ret;
			};
		}

		var sortOrder;

		if ( document.documentElement.compareDocumentPosition ) {
			sortOrder = function( a, b ) {
				var ret = a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1;
				if ( ret === 0 ) {
					hasDuplicate = true;
				}
				return ret;
			};
		} else if ( "sourceIndex" in document.documentElement ) {
			sortOrder = function( a, b ) {
				var ret = a.sourceIndex - b.sourceIndex;
				if ( ret === 0 ) {
					hasDuplicate = true;
				}
				return ret;
			};
		} else if ( document.createRange ) {
			sortOrder = function( a, b ) {
				var aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange();
				aRange.selectNode(a);
				aRange.collapse(true);
				bRange.selectNode(b);
				bRange.collapse(true);
				var ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange);
				if ( ret === 0 ) {
					hasDuplicate = true;
				}
				return ret;
			};
		}

		// Check to see if the browser returns elements by name when
		// querying by getElementById (and provide a workaround)
		(function(){
			// We're going to inject a fake input element with a specified name
			var form = document.createElement("form"),
			id = "script" + (new Date).getTime();
			form.innerHTML = "<input name='" + id + "'/>";

			// Inject it into the root element, check its status, and remove it quickly
			var root = document.documentElement;
			root.insertBefore( form, root.firstChild );

			// The workaround has to do additional checks after a getElementById
			// Which slows things down for other browsers (hence the branching)
			if ( !!document.getElementById( id ) ) {
				Expr.find.ID = function(match, context, isXML){
					if ( typeof context.getElementById !== "undefined" && !isXML ) {
						var m = context.getElementById(match[1]);
						return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : [];
					}
				};

				Expr.filter.ID = function(elem, match){
					var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
					return elem.nodeType === 1 && node && node.nodeValue === match;
				};
			}

			root.removeChild( form );
		})();

		(function(){
			// Check to see if the browser returns only elements
			// when doing getElementsByTagName("*")

			// Create a fake element
			var div = document.createElement("div");
			div.appendChild( document.createComment("") );

			// Make sure no comments are found
			if ( div.getElementsByTagName("*").length > 0 ) {
				Expr.find.TAG = function(match, context){
					var results = context.getElementsByTagName(match[1]);

					// Filter out possible comments
					if ( match[1] === "*" ) {
						var tmp = [];

						for ( var i = 0; results[i]; i++ ) {
							if ( results[i].nodeType === 1 ) {
								tmp.push( results[i] );
							}
						}

						results = tmp;
					}

					return results;
				};
			}

			// Check to see if an attribute returns normalized href attributes
			div.innerHTML = "<a href='#'></a>";
			if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
				div.firstChild.getAttribute("href") !== "#" ) {
				Expr.attrHandle.href = function(elem){
					return elem.getAttribute("href", 2);
				};
			}
		})();

		if ( document.querySelectorAll ) (function(){
			var oldSizzle = Sizzle, div = document.createElement("div");
			div.innerHTML = "<p class='TEST'></p>";

			// Safari can't handle uppercase or unicode characters when
			// in quirks mode.
			if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
				return;
			}
	
			Sizzle = function(query, context, extra, seed){
				context = context || document;

				// Only use querySelectorAll on non-XML documents
				// (ID selectors don't work in non-HTML documents)
				if ( !seed && context.nodeType === 9 && !isXML(context) ) {
					try {
						return makeArray( context.querySelectorAll(query), extra );
					} catch(e){}
				}
		
				return oldSizzle(query, context, extra, seed);
			};

			Sizzle.find = oldSizzle.find;
			Sizzle.filter = oldSizzle.filter;
			Sizzle.selectors = oldSizzle.selectors;
			Sizzle.matches = oldSizzle.matches;
		})();

		if ( document.getElementsByClassName && document.documentElement.getElementsByClassName ) (function(){
			var div = document.createElement("div");
			div.innerHTML = "<div class='test e'></div><div class='test'></div>";

			// Opera can't find a second classname (in 9.6)
			if ( div.getElementsByClassName("e").length === 0 )
				return;

			// Safari caches class attributes, doesn't catch changes (in 3.2)
			div.lastChild.className = "e";

			if ( div.getElementsByClassName("e").length === 1 )
				return;

			Expr.order.splice(1, 0, "CLASS");
			Expr.find.CLASS = function(match, context, isXML) {
				if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
					return context.getElementsByClassName(match[1]);
				}
			};
		})();

		function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
			var sibDir = dir == "previousSibling" && !isXML;
			for ( var i = 0, l = checkSet.length; i < l; i++ ) {
				var elem = checkSet[i];
				if ( elem ) {
					if ( sibDir && elem.nodeType === 1 ){
						elem.sizcache = doneName;
						elem.sizset = i;
					}
					elem = elem[dir];
					var match = false;

					while ( elem ) {
						if ( elem.sizcache === doneName ) {
							match = checkSet[elem.sizset];
							break;
						}

						if ( elem.nodeType === 1 && !isXML ){
							elem.sizcache = doneName;
							elem.sizset = i;
						}

						if ( elem.nodeName === cur ) {
							match = elem;
							break;
						}

						elem = elem[dir];
					}

					checkSet[i] = match;
				}
			}
		}

		function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
			var sibDir = dir == "previousSibling" && !isXML;
			for ( var i = 0, l = checkSet.length; i < l; i++ ) {
				var elem = checkSet[i];
				if ( elem ) {
					if ( sibDir && elem.nodeType === 1 ) {
						elem.sizcache = doneName;
						elem.sizset = i;
					}
					elem = elem[dir];
					var match = false;

					while ( elem ) {
						if ( elem.sizcache === doneName ) {
							match = checkSet[elem.sizset];
							break;
						}

						if ( elem.nodeType === 1 ) {
							if ( !isXML ) {
								elem.sizcache = doneName;
								elem.sizset = i;
							}
							if ( typeof cur !== "string" ) {
								if ( elem === cur ) {
									match = true;
									break;
								}

							} else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
								match = elem;
								break;
							}
						}

						elem = elem[dir];
					}

					checkSet[i] = match;
				}
			}
		}

		var contains = document.compareDocumentPosition ?  function(a, b){
			return a.compareDocumentPosition(b) & 16;
		} : function(a, b){
			return a !== b && (a.contains ? a.contains(b) : true);
		};

		var isXML = function(elem){
			return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" ||
			!!elem.ownerDocument && isXML( elem.ownerDocument );
		};

		var posProcess = function(selector, context){
			var tmpSet = [], later = "", match,
			root = context.nodeType ? [context] : context;

			// Position selectors must be done after the filter
			// And so must :not(positional) so we move all PSEUDOs to the end
			while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
				later += match[0];
				selector = selector.replace( Expr.match.PSEUDO, "" );
			}

			selector = Expr.relative[selector] ? selector + "*" : selector;

			for ( var i = 0, l = root.length; i < l; i++ ) {
				Sizzle( selector, root[i], tmpSet );
			}

			return Sizzle.filter( later, tmpSet );
		};

		// EXPOSE
		jQuery.find = Sizzle;
		jQuery.filter = Sizzle.filter;
		jQuery.expr = Sizzle.selectors;
		jQuery.expr[":"] = jQuery.expr.filters;

		Sizzle.selectors.filters.hidden = function(elem){
			return elem.offsetWidth === 0 || elem.offsetHeight === 0;
		};

		Sizzle.selectors.filters.visible = function(elem){
			return elem.offsetWidth > 0 || elem.offsetHeight > 0;
		};

		Sizzle.selectors.filters.animated = function(elem){
			return jQuery.grep(jQuery.timers, function(fn){
				return elem === fn.elem;
			}).length;
		};

		jQuery.multiFilter = function( expr, elems, not ) {
			if ( not ) {
				expr = ":not(" + expr + ")";
			}

			return Sizzle.matches(expr, elems);
		};

		jQuery.dir = function( elem, dir ){
			var matched = [], cur = elem[dir];
			while ( cur && cur != document ) {
				if ( cur.nodeType == 1 )
					matched.push( cur );
				cur = cur[dir];
			}
			return matched;
		};

		jQuery.nth = function(cur, result, dir, elem){
			result = result || 1;
			var num = 0;

			for ( ; cur; cur = cur[dir] )
				if ( cur.nodeType == 1 && ++num == result )
					break;

			return cur;
		};

		jQuery.sibling = function(n, elem){
			var r = [];

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

			return r;
		};

		return;

		window.Sizzle = Sizzle;

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

		// Bind an event to an element
		// Original by Dean Edwards
		add: function(elem, types, handler, data) {
			if ( elem.nodeType == 3 || elem.nodeType == 8 )
				return;

			// For whatever reason, IE has trouble passing the window object
			// around, causing it to be cloned in the process
			if ( elem.setInterval && elem != window )
				elem = window;

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

			// if data is passed, bind to handler
			if ( data !== undefined ) {
				// Create temporary function pointer to original handler
				var fn = handler;

				// Create unique handler function, wrapped around original handler
				handler = this.proxy( fn );

				// Store data in unique handler
				handler.data = data;
			}

			// Init the element's event structure
			var events = jQuery.data(elem, "events") || jQuery.data(elem, "events", {}),
			handle = jQuery.data(elem, "handle") || jQuery.data(elem, "handle", function(){
				// Handle the second event of a trigger and when
				// an event is called after a page has unloaded
				return typeof jQuery !== "undefined" && !jQuery.event.triggered ?
				jQuery.event.handle.apply(arguments.callee.elem, arguments) :
				undefined;
			});
			// Add elem as a property of the handle function
			// This is to prevent a memory leak with non-native
			// event in IE.
			handle.elem = elem;

			// Handle multiple events separated by a space
			// jQuery(...).bind("mouseover mouseout", fn);
			jQuery.each(types.split(/\s+/), function(index, type) {
				// Namespaced event handlers
				var namespaces = type.split(".");
				type = namespaces.shift();
				handler.type = namespaces.slice().sort().join(".");

				// Get the current list of functions bound to this event
				var handlers = events[type];
			
				if ( jQuery.event.specialAll[type] )
					jQuery.event.specialAll[type].setup.call(elem, data, namespaces);

				// Init the event handler queue
				if (!handlers) {
					handlers = events[type] = {};

					// Check for a special event handler
					// Only use addEventListener/attachEvent if the special
					// events handler returns false
					if ( !jQuery.event.special[type] || jQuery.event.special[type].setup.call(elem, data, namespaces) === false ) {
						// Bind the global event handler to the element
						if (elem.addEventListener)
							elem.addEventListener(type, handle, false);
						else if (elem.attachEvent)
							elem.attachEvent("on" + type, handle);
					}
				}

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

				// Keep track of which events have been used, for global triggering
				jQuery.event.global[type] = true;
			});

			// Nullify elem to prevent memory leaks in IE
			elem = null;
		},

		guid: 1,
		global: {},

		// Detach an event or set of events from an element
		remove: function(elem, types, handler) {
			// don't do events on text and comment nodes
			if ( elem.nodeType == 3 || elem.nodeType == 8 )
				return;

			var events = jQuery.data(elem, "events"), ret, index;

			if ( events ) {
				// Unbind all events for the element
				if ( types === undefined || (typeof types === "string" && types.charAt(0) == ".") )
					for ( var type in events )
						this.remove( elem, type + (types || "") );
				else {
					// types is actually an event object here
					if ( types.type ) {
						handler = types.handler;
						types = types.type;
					}

					// Handle multiple events seperated by a space
					// jQuery(...).unbind("mouseover mouseout", fn);
					jQuery.each(types.split(/\s+/), function(index, type){
						// Namespaced event handlers
						var namespaces = type.split(".");
						type = namespaces.shift();
						var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)");

						if ( events[type] ) {
							// remove the given handler for the given type
							if ( handler )
								delete events[type][handler.guid];

							// remove all handlers for the given type
							else
								for ( var handle in events[type] )
									// Handle the removal of namespaced events
									if ( namespace.test(events[type][handle].type) )
										delete events[type][handle];
									
							if ( jQuery.event.specialAll[type] )
								jQuery.event.specialAll[type].teardown.call(elem, namespaces);

							// remove generic event handler if no more handlers exist
							for ( ret in events[type] ) break;
							if ( !ret ) {
								if ( !jQuery.event.special[type] || jQuery.event.special[type].teardown.call(elem, namespaces) === false ) {
									if (elem.removeEventListener)
										elem.removeEventListener(type, jQuery.data(elem, "handle"), false);
									else if (elem.detachEvent)
										elem.detachEvent("on" + type, jQuery.data(elem, "handle"));
								}
								ret = null;
								delete events[type];
							}
						}
					});
				}

				// Remove the expando if it's no longer used
				for ( ret in events ) break;
				if ( !ret ) {
					var handle = jQuery.data( elem, "handle" );
					if ( handle ) handle.elem = null;
					jQuery.removeData( elem, "events" );
					jQuery.removeData( elem, "handle" );
				}
			}
		},

		// bubbling is internal
		trigger: function( event, data, elem, bubbling ) {
			// Event object or event type
			var type = event.type || event;

			if( !bubbling ){
				event = typeof event === "object" ?
				// jQuery.Event object
				event[expando] ? event :
				// Object literal
				jQuery.extend( jQuery.Event(type), event ) :
				// Just the event type (string)
				jQuery.Event(type);

				if ( type.indexOf("!") >= 0 ) {
					event.type = type = type.slice(0, -1);
					event.exclusive = true;
				}

				// Handle a global trigger
				if ( !elem ) {
					// Don't bubble custom events when global (to avoid too much overhead)
					event.stopPropagation();
					// Only trigger if we've ever bound an event for it
					if ( this.global[type] )
						jQuery.each( jQuery.cache, function(){
							if ( this.events && this.events[type] )
								jQuery.event.trigger( event, data, this.handle.elem );
						});
				}

				// Handle triggering a single element

				// don't do events on text and comment nodes
				if ( !elem || elem.nodeType == 3 || elem.nodeType == 8 )
					return undefined;
			
				// Clean up in case it is reused
				event.result = undefined;
				event.target = elem;
			
				// Clone the incoming data, if any
				data = jQuery.makeArray(data);
				data.unshift( event );
			}

			event.currentTarget = elem;

			// Trigger the event, it is assumed that "handle" is a function
			var handle = jQuery.data(elem, "handle");
			if ( handle )
				handle.apply( elem, data );

			// Handle triggering native .onfoo handlers (and on links since we don't call .click() for links)
			if ( (!elem[type] || (jQuery.nodeName(elem, 'a') && type == "click")) && elem["on"+type] && elem["on"+type].apply( elem, data ) === false )
				event.result = false;

			// Trigger the native events (except for clicks on links)
			if ( !bubbling && elem[type] && !event.isDefaultPrevented() && !(jQuery.nodeName(elem, 'a') && type == "click") ) {
				this.triggered = true;
				try {
					elem[ type ]();
				// prevent IE from throwing an error for some hidden elements
				} catch (e) {}
			}

			this.triggered = false;

			if ( !event.isPropagationStopped() ) {
				var parent = elem.parentNode || elem.ownerDocument;
				if ( parent )
					jQuery.event.trigger(event, data, parent, true);
			}
		},

		handle: function(event) {
			// returned undefined or false
			var all, handlers;

			event = arguments[0] = jQuery.event.fix( event || window.event );
			event.currentTarget = this;
		
			// Namespaced event handlers
			var namespaces = event.type.split(".");
			event.type = namespaces.shift();

			// Cache this now, all = true means, any handler
			all = !namespaces.length && !event.exclusive;
		
			var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)");

			handlers = ( jQuery.data(this, "events") || {} )[event.type];

			for ( var j in handlers ) {
				var handler = handlers[j];

				// Filter the functions by class
				if ( all || namespace.test(handler.type) ) {
					// Pass in a reference to the handler function itself
					// So that we can later remove it
					event.handler = handler;
					event.data = handler.data;

					var ret = handler.apply(this, arguments);

					if( ret !== undefined ){
						event.result = ret;
						if ( ret === false ) {
							event.preventDefault();
							event.stopPropagation();
						}
					}

					if( event.isImmediatePropagationStopped() )
						break;

				}
			}
		},

		props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),

		fix: function(event) {
			if ( event[expando] )
				return event;

			// store a copy of the original event object
			// and "clone" to set read-only properties
			var originalEvent = event;
			event = jQuery.Event( originalEvent );

			for ( var i = this.props.length, prop; i; ){
				prop = this.props[ --i ];
				event[ prop ] = originalEvent[ prop ];
			}

			// Fix target property, if necessary
			if ( !event.target )
				event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either

			// check if target is a textnode (safari)
			if ( event.target.nodeType == 3 )
				event.target = event.target.parentNode;

			// Add relatedTarget, if necessary
			if ( !event.relatedTarget && event.fromElement )
				event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement;

			// Calculate pageX/Y if missing and clientX/Y available
			if ( event.pageX == null && event.clientX != null ) {
				var doc = document.documentElement, body = document.body;
				event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0);
				event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0);
			}

			// Add which for key events
			if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) )
				event.which = event.charCode || event.keyCode;

			// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
			if ( !event.metaKey && event.ctrlKey )
				event.metaKey = event.ctrlKey;

			// Add which for click: 1 == left; 2 == middle; 3 == right
			// Note: button is not normalized, so don't use it
			if ( !event.which && event.button )
				event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));

			return event;
		},

		proxy: function( fn, proxy ){
			proxy = proxy || function(){
				return fn.apply(this, arguments);
			};
			// Set the guid of unique handler to the same of original handler, so it can be removed
			proxy.guid = fn.guid = fn.guid || proxy.guid || this.guid++;
			// So proxy can be declared as an argument
			return proxy;
		},

		special: {
			ready: {
				// Make sure the ready event is setup
				setup: bindReady,
				teardown: function() {}
			}
		},
	
		specialAll: {
			live: {
				setup: function( selector, namespaces ){
					jQuery.event.add( this, namespaces[0], liveHandler );
				},
				teardown:  function( namespaces ){
					if ( namespaces.length ) {
						var remove = 0, name = RegExp("(^|\\.)" + namespaces[0] + "(\\.|$)");
					
						jQuery.each( (jQuery.data(this, "events").live || {}), function(){
							if ( name.test(this.type) )
								remove++;
						});
					
						if ( remove < 1 )
							jQuery.event.remove( this, namespaces[0], liveHandler );
					}
				}
			}
		}
	};

	jQuery.Event = function( src ){
		// Allow instantiation without the 'new' keyword
		if( !this.preventDefault )
			return new jQuery.Event(src);
	
		// Event object
		if( src && src.type ){
			this.originalEvent = src;
			this.type = src.type;
		// Event type
		}else
			this.type = src;

		// timeStamp is buggy for some events on Firefox(#3843)
		// So we won't rely on the native value
		this.timeStamp = now();
	
		// Mark it as fixed
		this[expando] = true;
	};

	function returnFalse(){
		return false;
	}
	function returnTrue(){
		return true;
	}

	// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
	// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
	jQuery.Event.prototype = {
		preventDefault: function() {
			this.isDefaultPrevented = returnTrue;

			var e = this.originalEvent;
			if( !e )
				return;
			// if preventDefault exists run it on the original event
			if (e.preventDefault)
				e.preventDefault();
			// otherwise set the returnValue property of the original event to false (IE)
			e.returnValue = false;
		},
		stopPropagation: function() {
			this.isPropagationStopped = returnTrue;

			var e = this.originalEvent;
			if( !e )
				return;
			// if stopPropagation exists run it on the original event
			if (e.stopPropagation)
				e.stopPropagation();
			// otherwise set the cancelBubble property of the original event to true (IE)
			e.cancelBubble = true;
		},
		stopImmediatePropagation:function(){
			this.isImmediatePropagationStopped = returnTrue;
			this.stopPropagation();
		},
		isDefaultPrevented: returnFalse,
		isPropagationStopped: returnFalse,
		isImmediatePropagationStopped: returnFalse
	};
	// Checks if an event happened on an element within another element
	// Used in jQuery.event.special.mouseenter and mouseleave handlers
	var withinElement = function(event) {
		// Check if mouse(over|out) are still within the same parent element
		var parent = event.relatedTarget;
		// Traverse up the tree
		while ( parent && parent != this )
			try {
				parent = parent.parentNode;
			}
			catch(e) {
				parent = this;
			}
	
		if( parent != this ){
			// set the correct event type
			event.type = event.data;
			// handle event if we actually just moused on to a non sub-element
			jQuery.event.handle.apply( this, arguments );
		}
	};
	
	jQuery.each({ 
		mouseover: 'mouseenter', 
		mouseout: 'mouseleave'
	}, function( orig, fix ){
		jQuery.event.special[ fix ] = {
			setup: function(){
				jQuery.event.add( this, orig, withinElement, fix );
			},
			teardown: function(){
				jQuery.event.remove( this, orig, withinElement );
			}
		};			   
	});

	jQuery.fn.extend({
		bind: function( type, data, fn ) {
			return type == "unload" ? this.one(type, data, fn) : this.each(function(){
				jQuery.event.add( this, type, fn || data, fn && data );
			});
		},

		one: function( type, data, fn ) {
			var one = jQuery.event.proxy( fn || data, function(event) {
				jQuery(this).unbind(event, one);
				return (fn || data).apply( this, arguments );
			});
			return this.each(function(){
				jQuery.event.add( this, type, one, fn && data);
			});
		},

		unbind: function( type, fn ) {
			return this.each(function(){
				jQuery.event.remove( this, type, fn );
			});
		},

		trigger: function( type, data ) {
			return this.each(function(){
				jQuery.event.trigger( type, data, this );
			});
		},

		triggerHandler: function( type, data ) {
			if( this[0] ){
				var event = jQuery.Event(type);
				event.preventDefault();
				event.stopPropagation();
				jQuery.event.trigger( event, data, this[0] );
				return event.result;
			}		
		},

		toggle: function( fn ) {
			// Save reference to arguments for access in closure
			var args = arguments, i = 1;

			// link all the functions, so any of them can unbind this click handler
			while( i < args.length )
				jQuery.event.proxy( fn, args[i++] );

			return this.click( jQuery.event.proxy( fn, function(event) {
				// Figure out which function to execute
				this.lastToggle = ( this.lastToggle || 0 ) % i;

				// Make sure that clicks stop
				event.preventDefault();

				// and execute the function
				return args[ this.lastToggle++ ].apply( this, arguments ) || false;
			}));
		},

		hover: function(fnOver, fnOut) {
			return this.mouseenter(fnOver).mouseleave(fnOut);
		},

		ready: function(fn) {
			// Attach the listeners
			bindReady();

			// If the DOM is already ready
			if ( jQuery.isReady )
				// Execute the function immediately
				fn.call( document, jQuery );

			// Otherwise, remember the function for later
			else
				// Add the function to the wait list
				jQuery.readyList.push( fn );

			return this;
		},
	
		live: function( type, fn ){
			var proxy = jQuery.event.proxy( fn );
			proxy.guid += this.selector + type;

			jQuery(document).bind( liveConvert(type, this.selector), this.selector, proxy );

			return this;
		},
	
		die: function( type, fn ){
			jQuery(document).unbind( liveConvert(type, this.selector), fn ? {
				guid: fn.guid + this.selector + type
			} : null );
			return this;
		}
	});

	function liveHandler( event ){
		var check = RegExp("(^|\\.)" + event.type + "(\\.|$)"),
		stop = true,
		elems = [];

		jQuery.each(jQuery.data(this, "events").live || [], function(i, fn){
			if ( check.test(fn.type) ) {
				var elem = jQuery(event.target).closest(fn.data)[0];
				if ( elem )
					elems.push({
						elem: elem, 
						fn: fn
					});
			}
		});

		elems.sort(function(a,b) {
			return jQuery.data(a.elem, "closest") - jQuery.data(b.elem, "closest");
		});
	
		jQuery.each(elems, function(){
			if ( this.fn.call(this.elem, event, this.fn.data) === false )
				return (stop = false);
		});

		return stop;
	}

	function liveConvert(type, selector){
		return ["live", type, selector.replace(/\./g, "`").replace(/ /g, "|")].join(".");
	}

	jQuery.extend({
		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.call( document, jQuery );
					});

					// Reset the list of functions
					jQuery.readyList = null;
				}

				// Trigger any bound ready events
				jQuery(document).triggerHandler("ready");
			}
		}
	});

	var readyBound = false;

	function bindReady(){
		if ( readyBound ) return;
		readyBound = true;

		// Mozilla, Opera and webkit nightlies currently support this event
		if ( document.addEventListener ) {
			// Use the handy event callback
			document.addEventListener( "DOMContentLoaded", function(){
				document.removeEventListener( "DOMContentLoaded", arguments.callee, false );
				jQuery.ready();
			}, false );

		// If IE event model is used
		} else if ( document.attachEvent ) {
			// ensure firing before onload,
			// maybe late but safe also for iframes
			document.attachEvent("onreadystatechange", function(){
				if ( document.readyState === "complete" ) {
					document.detachEvent( "onreadystatechange", arguments.callee );
					jQuery.ready();
				}
			});

			// If IE and not an iframe
			// continually check to see if the document is ready
			if ( document.documentElement.doScroll && window == window.top ) (function(){
				if ( jQuery.isReady ) return;

				try {
					// If IE is used, use the trick by Diego Perini
					// http://javascript.nwbox.com/IEContentLoaded/
					document.documentElement.doScroll("left");
				} catch( error ) {
					setTimeout( arguments.callee, 0 );
					return;
				}

				// and execute any waiting functions
				jQuery.ready();
			})();
		}

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

	jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
		"mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave," +
		"change,select,submit,keydown,keypress,keyup,error").split(","), function(i, name){

		// Handle event binding
		jQuery.fn[name] = function(fn){
			return fn ? this.bind(name, fn) : this.trigger(name);
		};
	});

	// Prevent memory leaks in IE
	// And prevent errors on refresh with events like mouseover in other browsers
	// Window isn't included so as not to unbind existing unload events
	jQuery( window ).bind( 'unload', function(){ 
		for ( var id in jQuery.cache )
			// Skip the window
			if ( id != 1 && jQuery.cache[ id ].handle )
				jQuery.event.remove( jQuery.cache[ id ].handle.elem );
	}); 
	(function(){

		jQuery.support = {};

		var root = document.documentElement,
		script = document.createElement("script"),
		div = document.createElement("div"),
		id = "script" + (new Date).getTime();

		div.style.display = "none";
		div.innerHTML = '   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';

		var all = div.getElementsByTagName("*"),
		a = div.getElementsByTagName("a")[0];

		// Can't get basic test support
		if ( !all || !all.length || !a ) {
			return;
		}

		jQuery.support = {
			// IE strips leading whitespace when .innerHTML is used
			leadingWhitespace: div.firstChild.nodeType == 3,
		
			// Make sure that tbody elements aren't automatically inserted
			// IE will insert them into empty tables
			tbody: !div.getElementsByTagName("tbody").length,
		
			// Make sure that you can get all elements in an <object> element
			// IE 7 always returns no results
			objectAll: !!div.getElementsByTagName("object")[0]
			.getElementsByTagName("*").length,
		
			// Make sure that link elements get serialized correctly by innerHTML
			// This requires a wrapper element in IE
			htmlSerialize: !!div.getElementsByTagName("link").length,
		
			// Get the style information from getAttribute
			// (IE uses .cssText insted)
			style: /red/.test( a.getAttribute("style") ),
		
			// Make sure that URLs aren't manipulated
			// (IE normalizes it by default)
			hrefNormalized: a.getAttribute("href") === "/a",
		
			// Make sure that element opacity exists
			// (IE uses filter instead)
			opacity: a.style.opacity === "0.5",
		
			// Verify style float existence
			// (IE uses styleFloat instead of cssFloat)
			cssFloat: !!a.style.cssFloat,

			// Will be defined later
			scriptEval: false,
			noCloneEvent: true,
			boxModel: null
		};
	
		script.type = "text/javascript";
		try {
			script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
		} catch(e){}

		root.insertBefore( script, root.firstChild );
	
		// Make sure that the execution of code works by injecting a script
		// tag with appendChild/createTextNode
		// (IE doesn't support this, fails, and uses .text instead)
		if ( window[ id ] ) {
			jQuery.support.scriptEval = true;
			delete window[ id ];
		}

		root.removeChild( script );

		if ( div.attachEvent && div.fireEvent ) {
			div.attachEvent("onclick", function(){
				// Cloning a node shouldn't copy over any
				// bound event handlers (IE does this)
				jQuery.support.noCloneEvent = false;
				div.detachEvent("onclick", arguments.callee);
			});
			div.cloneNode(true).fireEvent("onclick");
		}

		// Figure out if the W3C box model works as expected
		// document.body must exist before we can do this
		jQuery(function(){
			var div = document.createElement("div");
			div.style.width = div.style.paddingLeft = "1px";

			document.body.appendChild( div );
			jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
			document.body.removeChild( div ).style.display = 'none';
		});
	})();

	var styleFloat = jQuery.support.cssFloat ? "cssFloat" : "styleFloat";

	jQuery.props = {
		"for": "htmlFor",
		"class": "className",
		"float": styleFloat,
		cssFloat: styleFloat,
		styleFloat: styleFloat,
		readonly: "readOnly",
		maxlength: "maxLength",
		cellspacing: "cellSpacing",
		rowspan: "rowSpan",
		tabindex: "tabIndex"
	};
	jQuery.fn.extend({
		// Keep a copy of the old load
		_load: jQuery.fn.load,

		load: function( url, params, callback ) {
			if ( typeof url !== "string" )
				return this._load( url );

			var off = url.indexOf(" ");
			if ( off >= 0 ) {
				var selector = url.slice(off, url.length);
				url = url.slice(0, off);
			}

			// 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 if( typeof params === "object" ) {
					params = jQuery.param( params );
					type = "POST";
				}

			var self = this;

			// Request the remote document
			jQuery.ajax({
				url: url,
				type: type,
				dataType: "html",
				data: params,
				complete: function(res, status){
					// If successful, inject the HTML into all the matched elements
					if ( status == "success" || status == "notmodified" )
						// See if a selector was specified
						self.html( selector ?
							// Create a dummy div to hold the results
							jQuery("<div/>")
							// inject the contents of the document in, removing the scripts
							// to avoid any 'Permission Denied' errors in IE
							.append(res.responseText.replace(/<script(.|\s)*?\/script>/g, ""))

							// Locate the specified elements
							.find(selector) :

							// If not, just inject the full result
							res.responseText );

					if( callback )
						self.each( callback, [res.responseText, status, res] );
				}
			});
			return this;
		},

		serialize: function() {
			return jQuery.param(this.serializeArray());
		},
		serializeArray: function() {
			return this.map(function(){
				return this.elements ? jQuery.makeArray(this.elements) : this;
			})
			.filter(function(){
				return this.name && !this.disabled &&
				(this.checked || /select|textarea/i.test(this.nodeName) ||
					/text|hidden|password|search/i.test(this.type));
			})
			.map(function(i, elem){
				var val = jQuery(this).val();
				return val == null ? null :
				jQuery.isArray(val) ?
				jQuery.map( val, function(val, i){
					return {
						name: elem.name, 
						value: val
					};
				}) :
				{
					name: elem.name, 
					value: val
				};
			}).get();
		}
	});

	// 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);
		};
	});

	var jsc = now();

	jQuery.extend({
  
		get: function( url, data, callback, type ) {
			// shift arguments if data argument was ommited
			if ( jQuery.isFunction( data ) ) {
				callback = data;
				data = null;
			}

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

		getScript: function( url, callback ) {
			return jQuery.get(url, null, callback, "script");
		},

		getJSON: function( url, data, callback ) {
			return jQuery.get(url, data, callback, "json");
		},

		post: function( url, data, callback, type ) {
			if ( jQuery.isFunction( data ) ) {
				callback = data;
				data = {};
			}

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

		ajaxSetup: function( settings ) {
			jQuery.extend( jQuery.ajaxSettings, settings );
		},

		ajaxSettings: {
			url: location.href,
			global: true,
			type: "GET",
			contentType: "application/x-www-form-urlencoded",
			processData: true,
			async: true,
			/*
		timeout: 0,
		data: null,
		username: null,
		password: null,
		*/
			// Create the request object; Microsoft failed to properly
			// implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
			// This function can be overriden by calling jQuery.ajaxSetup
			xhr:function(){
				return window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
			},
			accepts: {
				xml: "application/xml, text/xml",
				html: "text/html",
				script: "text/javascript, application/javascript",
				json: "application/json, text/javascript",
				text: "text/plain",
				_default: "*/*"
			}
		},

		// Last-Modified header cache for next request
		lastModified: {},

		ajax: function( s ) {
			// Extend the settings, but re-extend 's' so that it can be
			// checked again later (in the test suite, specifically)
			s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s));

			var jsonp, jsre = /=\?(&|$)/g, status, data,
			type = s.type.toUpperCase();

			// convert data if not already a string
			if ( s.data && s.processData && typeof s.data !== "string" )
				s.data = jQuery.param(s.data);

			// Handle JSONP Parameter Callbacks
			if ( s.dataType == "jsonp" ) {
				if ( type == "GET" ) {
					if ( !s.url.match(jsre) )
						s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?";
				} else if ( !s.data || !s.data.match(jsre) )
					s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?";
				s.dataType = "json";
			}

			// Build temporary JSONP function
			if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) {
				jsonp = "jsonp" + jsc++;

				// Replace the =? sequence both in the query string and the data
				if ( s.data )
					s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1");
				s.url = s.url.replace(jsre, "=" + jsonp + "$1");

				// We need to make sure
				// that a JSONP style response is executed properly
				s.dataType = "script";

				// Handle JSONP-style loading
				window[ jsonp ] = function(tmp){
					data = tmp;
					success();
					complete();
					// Garbage collect
					window[ jsonp ] = undefined;
					try{
						delete window[ jsonp ];
					} catch(e){}
					if ( head )
						head.removeChild( script );
				};
			}

			if ( s.dataType == "script" && s.cache == null )
				s.cache = false;

			if ( s.cache === false && type == "GET" ) {
				var ts = now();
				// try replacing _= if it is there
				var ret = s.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + ts + "$2");
				// if nothing was replaced, add timestamp to the end
				s.url = ret + ((ret == s.url) ? (s.url.match(/\?/) ? "&" : "?") + "_=" + ts : "");
			}

			// If data is available, append data to url for get requests
			if ( s.data && type == "GET" ) {
				s.url += (s.url.match(/\?/) ? "&" : "?") + 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" );

			// Matches an absolute URL, and saves the domain
			var parts = /^(\w+:)?\/\/([^\/?#]+)/.exec( s.url );

			// If we're requesting a remote document
			// and trying to load JSON or Script with a GET
			if ( s.dataType == "script" && type == "GET" && parts
				&& ( parts[1] && parts[1] != location.protocol || parts[2] != location.host )){

				var head = document.getElementsByTagName("head")[0];
				var script = document.createElement("script");
				script.src = s.url;
				if (s.scriptCharset)
					script.charset = s.scriptCharset;

				// Handle Script loading
				if ( !jsonp ) {
					var done = false;

					// Attach handlers for all browsers
					script.onload = script.onreadystatechange = function(){
						if ( !done && (!this.readyState ||
							this.readyState == "loaded" || this.readyState == "complete") ) {
							done = true;
							success();
							complete();

							// Handle memory leak in IE
							script.onload = script.onreadystatechange = null;
							head.removeChild( script );
						}
					};
				}

				head.appendChild(script);

				// We handle everything using the script element injection
				return undefined;
			}

			var requestDone = false;

			// Create the request object
			var xhr = s.xhr();

			// Open the socket
			// Passing null username, generates a login popup on Opera (#2865)
			if( s.username )
				xhr.open(type, s.url, s.async, s.username, s.password);
			else
				xhr.open(type, s.url, s.async);

			// Need an extra try/catch for cross domain requests in Firefox 3
			try {
				// Set the correct header, if data is being sent
				if ( s.data )
					xhr.setRequestHeader("Content-Type", s.contentType);

				// Set the If-Modified-Since header, if ifModified mode.
				if ( s.ifModified )
					xhr.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
				xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");

				// Set the Accepts header for the server, depending on the dataType
				xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ?
					s.accepts[ s.dataType ] + ", */*" :
					s.accepts._default );
			} catch(e){}

			// Allow custom headers/mimetypes and early abort
			if ( s.beforeSend && s.beforeSend(xhr, s) === false ) {
				// Handle the global AJAX counter
				if ( s.global && ! --jQuery.active )
					jQuery.event.trigger( "ajaxStop" );
				// close opended socket
				xhr.abort();
				return false;
			}

			if ( s.global )
				jQuery.event.trigger("ajaxSend", [xhr, s]);

			// Wait for a response to come back
			var onreadystatechange = function(isTimeout){
				// The request was aborted, clear the interval and decrement jQuery.active
				if (xhr.readyState == 0) {
					if (ival) {
						// clear poll interval
						clearInterval(ival);
						ival = null;
						// Handle the global AJAX counter
						if ( s.global && ! --jQuery.active )
							jQuery.event.trigger( "ajaxStop" );
					}
				// The transfer is complete and the data is available, or the request timed out
				} else if ( !requestDone && xhr && (xhr.readyState == 4 || isTimeout == "timeout") ) {
					requestDone = true;

					// clear poll interval
					if (ival) {
						clearInterval(ival);
						ival = null;
					}

					status = isTimeout == "timeout" ? "timeout" :
					!jQuery.httpSuccess( xhr ) ? "error" :
					s.ifModified && jQuery.httpNotModified( xhr, s.url ) ? "notmodified" :
					"success";

					if ( status == "success" ) {
						// Watch for, and catch, XML document parse errors
						try {
							// process the data (runs the xml through httpData regardless of callback)
							data = jQuery.httpData( xhr, s.dataType, s );
						} catch(e) {
							status = "parsererror";
						}
					}

					// Make sure that the request was successful or notmodified
					if ( status == "success" ) {
						// Cache Last-Modified header, if ifModified mode.
						var modRes;
						try {
							modRes = xhr.getResponseHeader("Last-Modified");
						} catch(e) {} // swallow exception thrown by FF if header is not available

						if ( s.ifModified && modRes )
							jQuery.lastModified[s.url] = modRes;

						// JSONP handles its own success callback
						if ( !jsonp )
							success();
					} else
						jQuery.handleError(s, xhr, status);

					// Fire the complete handlers
					complete();

					if ( isTimeout )
						xhr.abort();

					// Stop memory leaks
					if ( s.async )
						xhr = null;
				}
			};

			if ( s.async ) {
				// don't attach the handler to the request, just poll it instead
				var ival = setInterval(onreadystatechange, 13);

				// Timeout checker
				if ( s.timeout > 0 )
					setTimeout(function(){
						// Check to see if the request is still happening
						if ( xhr && !requestDone )
							onreadystatechange( "timeout" );
					}, s.timeout);
			}

			// Send the data
			try {
				xhr.send(s.data);
			} catch(e) {
				jQuery.handleError(s, xhr, null, e);
			}

			// firefox 1.5 doesn't fire statechange for sync requests
			if ( !s.async )
				onreadystatechange();

			function success(){
				// 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", [xhr, s] );
			}

			function complete(){
				// Process result
				if ( s.complete )
					s.complete(xhr, status);

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

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

			// return XMLHttpRequest to allow aborting the request etc.
			return xhr;
		},

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

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

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

		// Determines if an XMLHttpRequest was successful or not
		httpSuccess: function( xhr ) {
			try {
				// IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450
				return !xhr.status && location.protocol == "file:" ||
				( xhr.status >= 200 && xhr.status < 300 ) || xhr.status == 304 || xhr.status == 1223;
			} catch(e){}
			return false;
		},

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

				// Firefox always returns 200. check Last-Modified date
				return xhr.status == 304 || xhrRes == jQuery.lastModified[url];
			} catch(e){}
			return false;
		},

		httpData: function( xhr, type, s ) {
			var ct = xhr.getResponseHeader("content-type"),
			xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0,
			data = xml ? xhr.responseXML : xhr.responseText;

			if ( xml && data.documentElement.tagName == "parsererror" )
				throw "parsererror";
			
			// Allow a pre-filtering function to sanitize the response
			// s != null is checked to keep backwards compatibility
			if( s && s.dataFilter )
				data = s.dataFilter( data, type );

			// The filter can actually parse the response
			if( typeof data === "string" ){

				// 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" )
					data = window["eval"]("(" + data + ")");
			}
		
			return data;
		},

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

			function add( key, value ){
				s[ s.length ] = encodeURIComponent(key) + '=' + encodeURIComponent(value);
			};

			// If an array was passed in, assume that it is an array
			// of form elements
			if ( jQuery.isArray(a) || a.jquery )
				// Serialize the form elements
				jQuery.each( a, function(){
					add( this.name, 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 ( jQuery.isArray(a[j]) )
						jQuery.each( a[j], function(){
							add( j, this );
						});
					else
						add( j, jQuery.isFunction(a[j]) ? a[j]() : a[j] );

			// Return the resulting serialization
			return s.join("&").replace(/%20/g, "+");
		}

	});
	var elemdisplay = {},
	timerId,
	fxAttrs = [
	// height animations
	[ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
	// width animations
	[ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
	// opacity animations
	[ "opacity" ]
	];

	function genFx( type, num ){
		var obj = {};
		jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function(){
			obj[ this ] = type;
		});
		return obj;
	}

	jQuery.fn.extend({
		show: function(speed,callback){
			if ( speed ) {
				return this.animate( genFx("show", 3), speed, callback);
			} else {
				for ( var i = 0, l = this.length; i < l; i++ ){
					var old = jQuery.data(this[i], "olddisplay");
				
					this[i].style.display = old || "";
				
					if ( jQuery.css(this[i], "display") === "none" ) {
						var tagName = this[i].tagName, display;
					
						if ( elemdisplay[ tagName ] ) {
							display = elemdisplay[ tagName ];
						} else {
							var elem = jQuery("<" + tagName + " />").appendTo("body");
						
							display = elem.css("display");
							if ( display === "none" )
								display = "block";
						
							elem.remove();
						
							elemdisplay[ tagName ] = display;
						}
					
						jQuery.data(this[i], "olddisplay", display);
					}
				}

				// Set the display of the elements in a second loop
				// to avoid the constant reflow
				for ( var i = 0, l = this.length; i < l; i++ ){
					this[i].style.display = jQuery.data(this[i], "olddisplay") || "";
				}
			
				return this;
			}
		},

		hide: function(speed,callback){
			if ( speed ) {
				return this.animate( genFx("hide", 3), speed, callback);
			} else {
				for ( var i = 0, l = this.length; i < l; i++ ){
					var old = jQuery.data(this[i], "olddisplay");
					if ( !old && old !== "none" )
						jQuery.data(this[i], "olddisplay", jQuery.css(this[i], "display"));
				}

				// Set the display of the elements in a second loop
				// to avoid the constant reflow
				for ( var i = 0, l = this.length; i < l; i++ ){
					this[i].style.display = "none";
				}

				return this;
			}
		},

		// Save the old toggle function
		_toggle: jQuery.fn.toggle,

		toggle: function( fn, fn2 ){
			var bool = typeof fn === "boolean";

			return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
			this._toggle.apply( this, arguments ) :
			fn == null || bool ?
			this.each(function(){
				var state = bool ? fn : jQuery(this).is(":hidden");
				jQuery(this)[ state ? "show" : "hide" ]();
			}) :
			this.animate(genFx("toggle", 3), fn, fn2);
		},

		fadeTo: function(speed,to,callback){
			return this.animate({
				opacity: to
			}, speed, callback);
		},

		animate: function( prop, speed, easing, callback ) {
			var optall = jQuery.speed(speed, easing, callback);

			return this[ optall.queue === false ? "each" : "queue" ](function(){
		
				var opt = jQuery.extend({}, optall), p,
				hidden = this.nodeType == 1 && jQuery(this).is(":hidden"),
				self = this;
	
				for ( p in prop ) {
					if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
						return opt.complete.call(this);

					if ( ( p == "height" || p == "width" ) && this.style ) {
						// Store display property
						opt.display = jQuery.css(this, "display");

						// Make sure that nothing sneaks out
						opt.overflow = this.style.overflow;
					}
				}

				if ( opt.overflow != null )
					this.style.overflow = "hidden";

				opt.curAnim = jQuery.extend({}, prop);

				jQuery.each( prop, function(name, val){
					var e = new jQuery.fx( self, opt, name );

					if ( /toggle|show|hide/.test(val) )
						e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop );
					else {
						var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),
						start = e.cur(true) || 0;

						if ( parts ) {
							var end = parseFloat(parts[2]),
							unit = parts[3] || "px";

							// We need to compute starting value
							if ( unit != "px" ) {
								self.style[ name ] = (end || 1) + unit;
								start = ((end || 1) / e.cur(true)) * start;
								self.style[ name ] = start + unit;
							}

							// If a +=/-= token was provided, we're doing a relative animation
							if ( parts[1] )
								end = ((parts[1] == "-=" ? -1 : 1) * end) + start;

							e.custom( start, end, unit );
						} else
							e.custom( start, val, "" );
					}
				});

				// For JS strict compliance
				return true;
			});
		},

		stop: function(clearQueue, gotoEnd){
			var timers = jQuery.timers;

			if (clearQueue)
				this.queue([]);

			this.each(function(){
				// go in reverse order so anything added to the queue during the loop is ignored
				for ( var i = timers.length - 1; i >= 0; i-- )
					if ( timers[i].elem == this ) {
						if (gotoEnd)
							// force the next step to be the last
							timers[i](true);
						timers.splice(i, 1);
					}
			});

			// start the next in the queue if the last step wasn't forced
			if (!gotoEnd)
				this.dequeue();

			return this;
		}

	});

	// Generate shortcuts for custom animations
	jQuery.each({
		slideDown: genFx("show", 1),
		slideUp: genFx("hide", 1),
		slideToggle: genFx("toggle", 1),
		fadeIn: {
			opacity: "show"
		},
		fadeOut: {
			opacity: "hide"
		}
	}, function( name, props ){
		jQuery.fn[ name ] = function( speed, callback ){
			return this.animate( props, speed, callback );
		};
	});

	jQuery.extend({

		speed: function(speed, easing, fn) {
			var opt = typeof speed === "object" ? speed : {
				complete: fn || !fn && easing ||
				jQuery.isFunction( speed ) && speed,
				duration: speed,
				easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
			};

			opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
			jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default;

			// Queueing
			opt.old = opt.complete;
			opt.complete = function(){
				if ( opt.queue !== false )
					jQuery(this).dequeue();
				if ( jQuery.isFunction( opt.old ) )
					opt.old.call( this );
			};

			return opt;
		},

		easing: {
			linear: function( p, n, firstNum, diff ) {
				return firstNum + diff * p;
			},
			swing: function( p, n, firstNum, diff ) {
				return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
			}
		},

		timers: [],

		fx: function( elem, options, prop ){
			this.options = options;
			this.elem = elem;
			this.prop = prop;

			if ( !options.orig )
				options.orig = {};
		}

	});

	jQuery.fx.prototype = {

		// Simple function for setting a style value
		update: function(){
			if ( this.options.step )
				this.options.step.call( this.elem, this.now, this );

			(jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );

			// Set display property to block for height/width animations
			if ( ( this.prop == "height" || this.prop == "width" ) && this.elem.style )
				this.elem.style.display = "block";
		},

		// Get the current size
		cur: function(force){
			if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) )
				return this.elem[ this.prop ];

			var r = parseFloat(jQuery.css(this.elem, this.prop, force));
			return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0;
		},

		// Start an animation from one number to another
		custom: function(from, to, unit){
			this.startTime = now();
			this.start = from;
			this.end = to;
			this.unit = unit || this.unit || "px";
			this.now = this.start;
			this.pos = this.state = 0;

			var self = this;
			function t(gotoEnd){
				return self.step(gotoEnd);
			}

			t.elem = this.elem;

			if ( t() && jQuery.timers.push(t) && !timerId ) {
				timerId = setInterval(function(){
					var timers = jQuery.timers;

					for ( var i = 0; i < timers.length; i++ )
						if ( !timers[i]() )
							timers.splice(i--, 1);

					if ( !timers.length ) {
						clearInterval( timerId );
						timerId = undefined;
					}
				}, 13);
			}
		},

		// Simple 'show' function
		show: function(){
			// Remember where we started, so that we can go back to it later
			this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
			this.options.show = true;

			// Begin the animation
			// Make sure that we start at a small width/height to avoid any
			// flash of content
			this.custom(this.prop == "width" || this.prop == "height" ? 1 : 0, this.cur());

			// Start by showing the element
			jQuery(this.elem).show();
		},

		// Simple 'hide' function
		hide: function(){
			// Remember where we started, so that we can go back to it later
			this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
			this.options.hide = true;

			// Begin the animation
			this.custom(this.cur(), 0);
		},

		// Each step of an animation
		step: function(gotoEnd){
			var t = now();

			if ( gotoEnd || t >= this.options.duration + this.startTime ) {
				this.now = this.end;
				this.pos = this.state = 1;
				this.update();

				this.options.curAnim[ this.prop ] = true;

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

				if ( done ) {
					if ( this.options.display != null ) {
						// Reset the overflow
						this.elem.style.overflow = this.options.overflow;

						// Reset the display
						this.elem.style.display = this.options.display;
						if ( jQuery.css(this.elem, "display") == "none" )
							this.elem.style.display = "block";
					}

					// Hide the element if the "hide" operation was done
					if ( this.options.hide )
						jQuery(this.elem).hide();

					// Reset the properties, if the item has been hidden or shown
					if ( this.options.hide || this.options.show )
						for ( var p in this.options.curAnim )
							jQuery.attr(this.elem.style, p, this.options.orig[p]);
					
					// Execute the complete function
					this.options.complete.call( this.elem );
				}

				return false;
			} else {
				var n = t - this.startTime;
				this.state = n / this.options.duration;

				// Perform the easing function, defaults to swing
				this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration);
				this.now = this.start + ((this.end - this.start) * this.pos);

				// Perform the next step of the animation
				this.update();
			}

			return true;
		}

	};

	jQuery.extend( jQuery.fx, {
		speeds:{
			slow: 600,
			fast: 200,
			// Default speed
			_default: 400
		},
		step: {

			opacity: function(fx){
				jQuery.attr(fx.elem.style, "opacity", fx.now);
			},

			_default: function(fx){
				if ( fx.elem.style && fx.elem.style[ fx.prop ] != null )
					fx.elem.style[ fx.prop ] = fx.now + fx.unit;
				else
					fx.elem[ fx.prop ] = fx.now;
			}
		}
	});
	if ( document.documentElement["getBoundingClientRect"] )
		jQuery.fn.offset = function() {
			if ( !this[0] ) return {
				top: 0, 
				left: 0
			};
			if ( this[0] === this[0].ownerDocument.body ) return jQuery.offset.bodyOffset( this[0] );
			var box  = this[0].getBoundingClientRect(), doc = this[0].ownerDocument, body = doc.body, docElem = doc.documentElement,
			clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0,
			top  = box.top  + (self.pageYOffset || jQuery.boxModel && docElem.scrollTop  || body.scrollTop ) - clientTop,
			left = box.left + (self.pageXOffset || jQuery.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft;
			return {
				top: top, 
				left: left
			};
		};
	else 
		jQuery.fn.offset = function() {
			if ( !this[0] ) return {
				top: 0, 
				left: 0
			};
			if ( this[0] === this[0].ownerDocument.body ) return jQuery.offset.bodyOffset( this[0] );
			jQuery.offset.initialized || jQuery.offset.initialize();

			var elem = this[0], offsetParent = elem.offsetParent, prevOffsetParent = elem,
			doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement,
			body = doc.body, defaultView = doc.defaultView,
			prevComputedStyle = defaultView.getComputedStyle(elem, null),
			top = elem.offsetTop, left = elem.offsetLeft;

			while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
				computedStyle = defaultView.getComputedStyle(elem, null);
				top -= elem.scrollTop, left -= elem.scrollLeft;
				if ( elem === offsetParent ) {
					top += elem.offsetTop, left += elem.offsetLeft;
					if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(elem.tagName)) )
						top  += parseInt( computedStyle.borderTopWidth,  10) || 0,
						left += parseInt( computedStyle.borderLeftWidth, 10) || 0;
					prevOffsetParent = offsetParent, offsetParent = elem.offsetParent;
				}
				if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" )
					top  += parseInt( computedStyle.borderTopWidth,  10) || 0,
					left += parseInt( computedStyle.borderLeftWidth, 10) || 0;
				prevComputedStyle = computedStyle;
			}

			if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" )
				top  += body.offsetTop,
				left += body.offsetLeft;

			if ( prevComputedStyle.position === "fixed" )
				top  += Math.max(docElem.scrollTop, body.scrollTop),
				left += Math.max(docElem.scrollLeft, body.scrollLeft);

			return {
				top: top, 
				left: left
			};
		};

	jQuery.offset = {
		initialize: function() {
			if ( this.initialized ) return;
			var body = document.body, container = document.createElement('div'), innerDiv, checkDiv, table, td, rules, prop, bodyMarginTop = body.style.marginTop,
			html = '<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';

			rules = {
				position: 'absolute', 
				top: 0, 
				left: 0, 
				margin: 0, 
				border: 0, 
				width: '1px', 
				height: '1px', 
				visibility: 'hidden'
			};
			for ( prop in rules ) container.style[prop] = rules[prop];

			container.innerHTML = html;
			body.insertBefore(container, body.firstChild);
			innerDiv = container.firstChild, checkDiv = innerDiv.firstChild, td = innerDiv.nextSibling.firstChild.firstChild;

			this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
			this.doesAddBorderForTableAndCells = (td.offsetTop === 5);

			innerDiv.style.overflow = 'hidden', innerDiv.style.position = 'relative';
			this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);

			body.style.marginTop = '1px';
			this.doesNotIncludeMarginInBodyOffset = (body.offsetTop === 0);
			body.style.marginTop = bodyMarginTop;

			body.removeChild(container);
			this.initialized = true;
		},

		bodyOffset: function(body) {
			jQuery.offset.initialized || jQuery.offset.initialize();
			var top = body.offsetTop, left = body.offsetLeft;
			if ( jQuery.offset.doesNotIncludeMarginInBodyOffset )
				top  += parseInt( jQuery.curCSS(body, 'marginTop',  true), 10 ) || 0,
				left += parseInt( jQuery.curCSS(body, 'marginLeft', true), 10 ) || 0;
			return {
				top: top, 
				left: left
			};
		}
	};


	jQuery.fn.extend({
		position: function() {
			var left = 0, top = 0, results;

			if ( this[0] ) {
				// Get *real* offsetParent
				var offsetParent = this.offsetParent(),

				// Get correct offsets
				offset       = this.offset(),
				parentOffset = /^body|html$/i.test(offsetParent[0].tagName) ? {
					top: 0, 
					left: 0
				} : offsetParent.offset();

				// Subtract element margins
				// note: when an element has margin: auto the offsetLeft and marginLeft 
				// are the same in Safari causing offset.left to incorrectly be 0
				offset.top  -= num( this, 'marginTop'  );
				offset.left -= num( this, 'marginLeft' );

				// Add offsetParent borders
				parentOffset.top  += num( offsetParent, 'borderTopWidth'  );
				parentOffset.left += num( offsetParent, 'borderLeftWidth' );

				// Subtract the two offsets
				results = {
					top:  offset.top  - parentOffset.top,
					left: offset.left - parentOffset.left
				};
			}

			return results;
		},

		offsetParent: function() {
			var offsetParent = this[0].offsetParent || document.body;
			while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && jQuery.css(offsetParent, 'position') == 'static') )
				offsetParent = offsetParent.offsetParent;
			return jQuery(offsetParent);
		}
	});


	// Create scrollLeft and scrollTop methods
	jQuery.each( ['Left', 'Top'], function(i, name) {
		var method = 'scroll' + name;
	
		jQuery.fn[ method ] = function(val) {
			if (!this[0]) return null;

			return val !== undefined ?

			// Set the scroll offset
			this.each(function() {
				this == window || this == document ?
				window.scrollTo(
					!i ? val : jQuery(window).scrollLeft(),
					i ? val : jQuery(window).scrollTop()
					) :
				this[ method ] = val;
			}) :

			// Return the scroll offset
			this[0] == window || this[0] == document ?
			self[ i ? 'pageYOffset' : 'pageXOffset' ] ||
			jQuery.boxModel && document.documentElement[ method ] ||
			document.body[ method ] :
			this[0][ method ];
		};
	});
	// Create innerHeight, innerWidth, outerHeight and outerWidth methods
	jQuery.each([ "Height", "Width" ], function(i, name){

		var tl = i ? "Left"  : "Top",  // top or left
		br = i ? "Right" : "Bottom", // bottom or right
		lower = name.toLowerCase();

		// innerHeight and innerWidth
		jQuery.fn["inner" + name] = function(){
			return this[0] ?
			jQuery.css( this[0], lower, false, "padding" ) :
			null;
		};

		// outerHeight and outerWidth
		jQuery.fn["outer" + name] = function(margin) {
			return this[0] ?
			jQuery.css( this[0], lower, false, margin ? "margin" : "border" ) :
			null;
		};
	
		var type = name.toLowerCase();

		jQuery.fn[ type ] = function( size ) {
			// Get window width or height
			return this[0] == window ?
			// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
			document.compatMode == "CSS1Compat" && document.documentElement[ "client" + name ] ||
			document.body[ "client" + name ] :

			// Get document width or height
			this[0] == document ?
			// Either scroll[Width/Height] or offset[Width/Height], whichever is greater
			Math.max(
				document.documentElement["client" + name],
				document.body["scroll" + name], document.documentElement["scroll" + name],
				document.body["offset" + name], document.documentElement["offset" + name]
				) :

			// Get or set width or height on the element
			size === undefined ?
			// Get width or height on the element
			(this.length ? jQuery.css( this[0], type ) : null) :

			// Set the width or height on the element (default to pixels if value is unitless)
			this.css( type, typeof size === "string" ? size : size + "px" );
		};

	});
})();
/*
 * jQuery UI 1.7.2
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI
 */
;
jQuery.ui || (function($) {

	var _remove = $.fn.remove,
	isFF2 = $.browser.mozilla && (parseFloat($.browser.version) < 1.9);

	//Helper functions and ui object
	$.ui = {
		version: "1.7.2",

		// $.ui.plugin is deprecated.  Use the proxy pattern instead.
		plugin: {
			add: function(module, option, set) {
				var proto = $.ui[module].prototype;
				for(var i in set) {
					proto.plugins[i] = proto.plugins[i] || [];
					proto.plugins[i].push([option, set[i]]);
				}
			},
			call: function(instance, name, args) {
				var set = instance.plugins[name];
				if(!set || !instance.element[0].parentNode) {
					return;
				}

				for (var i = 0; i < set.length; i++) {
					if (instance.options[set[i][0]]) {
						set[i][1].apply(instance.element, args);
					}
				}
			}
		},

		contains: function(a, b) {
			return document.compareDocumentPosition
			? a.compareDocumentPosition(b) & 16
			: a !== b && a.contains(b);
		},

		hasScroll: function(el, a) {

			//If overflow is hidden, the element might have extra content, but the user wants to hide it
			if ($(el).css('overflow') == 'hidden') {
				return false;
			}

			var scroll = (a && a == 'left') ? 'scrollLeft' : 'scrollTop',
			has = false;

			if (el[scroll] > 0) {
				return true;
			}

			// TODO: determine which cases actually cause this to happen
			// if the element doesn't have the scroll set, see if it's possible to
			// set the scroll
			el[scroll] = 1;
			has = (el[scroll] > 0);
			el[scroll] = 0;
			return has;
		},

		isOverAxis: function(x, reference, size) {
			//Determines when x coordinate is over "b" element axis
			return (x > reference) && (x < (reference + size));
		},

		isOver: function(y, x, top, left, height, width) {
			//Determines when x, y coordinates is over "b" element
			return $.ui.isOverAxis(y, top, height) && $.ui.isOverAxis(x, left, width);
		},

		keyCode: {
			BACKSPACE: 8,
			CAPS_LOCK: 20,
			COMMA: 188,
			CONTROL: 17,
			DELETE: 46,
			DOWN: 40,
			END: 35,
			ENTER: 13,
			ESCAPE: 27,
			HOME: 36,
			INSERT: 45,
			LEFT: 37,
			NUMPAD_ADD: 107,
			NUMPAD_DECIMAL: 110,
			NUMPAD_DIVIDE: 111,
			NUMPAD_ENTER: 108,
			NUMPAD_MULTIPLY: 106,
			NUMPAD_SUBTRACT: 109,
			PAGE_DOWN: 34,
			PAGE_UP: 33,
			PERIOD: 190,
			RIGHT: 39,
			SHIFT: 16,
			SPACE: 32,
			TAB: 9,
			UP: 38
		}
	};

	// WAI-ARIA normalization
	if (isFF2) {
		var attr = $.attr,
		removeAttr = $.fn.removeAttr,
		ariaNS = "http://www.w3.org/2005/07/aaa",
		ariaState = /^aria-/,
		ariaRole = /^wairole:/;

		$.attr = function(elem, name, value) {
			var set = value !== undefined;

			return (name == 'role'
				? (set
					? attr.call(this, elem, name, "wairole:" + value)
					: (attr.apply(this, arguments) || "").replace(ariaRole, ""))
				: (ariaState.test(name)
					? (set
						? elem.setAttributeNS(ariaNS,
							name.replace(ariaState, "aaa:"), value)
						: attr.call(this, elem, name.replace(ariaState, "aaa:")))
					: attr.apply(this, arguments)));
		};

		$.fn.removeAttr = function(name) {
			return (ariaState.test(name)
				? this.each(function() {
					this.removeAttributeNS(ariaNS, name.replace(ariaState, ""));
				}) : removeAttr.call(this, name));
		};
	}

	//jQuery plugins
	$.fn.extend({
		remove: function() {
			// Safari has a native remove event which actually removes DOM elements,
			// so we have to use triggerHandler instead of trigger (#3037).
			$("*", this).add(this).each(function() {
				$(this).triggerHandler("remove");
			});
			return _remove.apply(this, arguments );
		},

		enableSelection: function() {
			return this
			.attr('unselectable', 'off')
			.css('MozUserSelect', '')
			.unbind('selectstart.ui');
		},

		disableSelection: function() {
			return this
			.attr('unselectable', 'on')
			.css('MozUserSelect', 'none')
			.bind('selectstart.ui', function() {
				return false;
			});
		},

		scrollParent: function() {
			var scrollParent;
			if(($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
				scrollParent = this.parents().filter(function() {
					return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
				}).eq(0);
			} else {
				scrollParent = this.parents().filter(function() {
					return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
				}).eq(0);
			}

			return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
		}
	});


	//Additional selectors
	$.extend($.expr[':'], {
		data: function(elem, i, match) {
			return !!$.data(elem, match[3]);
		},

		focusable: function(element) {
			var nodeName = element.nodeName.toLowerCase(),
			tabIndex = $.attr(element, 'tabindex');
			return (/input|select|textarea|button|object/.test(nodeName)
				? !element.disabled
				: 'a' == nodeName || 'area' == nodeName
				? element.href || !isNaN(tabIndex)
				: !isNaN(tabIndex))
			// the element and all of its ancestors must be visible
			// the browser may report that the area is hidden
			&& !$(element)['area' == nodeName ? 'parents' : 'closest'](':hidden').length;
		},

		tabbable: function(element) {
			var tabIndex = $.attr(element, 'tabindex');
			return (isNaN(tabIndex) || tabIndex >= 0) && $(element).is(':focusable');
		}
	});


	// $.widget is a factory to create jQuery plugins
	// taking some boilerplate code out of the plugin code
	function getter(namespace, plugin, method, args) {
		function getMethods(type) {
			var methods = $[namespace][plugin][type] || [];
			return (typeof methods == 'string' ? methods.split(/,?\s+/) : methods);
		}

		var methods = getMethods('getter');
		if (args.length == 1 && typeof args[0] == 'string') {
			methods = methods.concat(getMethods('getterSetter'));
		}
		return ($.inArray(method, methods) != -1);
	}

	$.widget = function(name, prototype) {
		var namespace = name.split(".")[0];
		name = name.split(".")[1];

		// create plugin method
		$.fn[name] = function(options) {
			var isMethodCall = (typeof options == 'string'),
			args = Array.prototype.slice.call(arguments, 1);

			// prevent calls to internal methods
			if (isMethodCall && options.substring(0, 1) == '_') {
				return this;
			}

			// handle getter methods
			if (isMethodCall && getter(namespace, name, options, args)) {
				var instance = $.data(this[0], name);
				return (instance ? instance[options].apply(instance, args)
					: undefined);
			}

			// handle initialization and non-getter methods
			return this.each(function() {
				var instance = $.data(this, name);

				// constructor
				(!instance && !isMethodCall &&
					$.data(this, name, new $[namespace][name](this, options))._init());

				// method call
				(instance && isMethodCall && $.isFunction(instance[options]) &&
					instance[options].apply(instance, args));
			});
		};

		// create widget constructor
		$[namespace] = $[namespace] || {};
		$[namespace][name] = function(element, options) {
			var self = this;

			this.namespace = namespace;
			this.widgetName = name;
			this.widgetEventPrefix = $[namespace][name].eventPrefix || name;
			this.widgetBaseClass = namespace + '-' + name;

			this.options = $.extend({},
				$.widget.defaults,
				$[namespace][name].defaults,
				$.metadata && $.metadata.get(element)[name],
				options);

			this.element = $(element)
			.bind('setData.' + name, function(event, key, value) {
				if (event.target == element) {
					return self._setData(key, value);
				}
			})
			.bind('getData.' + name, function(event, key) {
				if (event.target == element) {
					return self._getData(key);
				}
			})
			.bind('remove', function() {
				return self.destroy();
			});
		};

		// add widget prototype
		$[namespace][name].prototype = $.extend({}, $.widget.prototype, prototype);

		// TODO: merge getter and getterSetter properties from widget prototype
		// and plugin prototype
		$[namespace][name].getterSetter = 'option';
	};

	$.widget.prototype = {
		_init: function() {},
		destroy: function() {
			this.element.removeData(this.widgetName)
			.removeClass(this.widgetBaseClass + '-disabled' + ' ' + this.namespace + '-state-disabled')
			.removeAttr('aria-disabled');
		},

		option: function(key, value) {
			var options = key,
			self = this;

			if (typeof key == "string") {
				if (value === undefined) {
					return this._getData(key);
				}
				options = {};
				options[key] = value;
			}

			$.each(options, function(key, value) {
				self._setData(key, value);
			});
		},
		_getData: function(key) {
			return this.options[key];
		},
		_setData: function(key, value) {
			this.options[key] = value;

			if (key == 'disabled') {
				this.element
				[value ? 'addClass' : 'removeClass'](
					this.widgetBaseClass + '-disabled' + ' ' +
					this.namespace + '-state-disabled')
				.attr("aria-disabled", value);
			}
		},

		enable: function() {
			this._setData('disabled', false);
		},
		disable: function() {
			this._setData('disabled', true);
		},

		_trigger: function(type, event, data) {
			var callback = this.options[type],
			eventName = (type == this.widgetEventPrefix
				? type : this.widgetEventPrefix + type);

			event = $.Event(event);
			event.type = eventName;

			// copy original event properties over to the new event
			// this would happen if we could call $.event.fix instead of $.Event
			// but we don't have a way to force an event to be fixed multiple times
			if (event.originalEvent) {
				for (var i = $.event.props.length, prop; i;) {
					prop = $.event.props[--i];
					event[prop] = event.originalEvent[prop];
				}
			}

			this.element.trigger(event, data);

			return !($.isFunction(callback) && callback.call(this.element[0], event, data) === false
				|| event.isDefaultPrevented());
		}
	};

	$.widget.defaults = {
		disabled: false
	};


	/** Mouse Interaction Plugin **/

	$.ui.mouse = {
		_mouseInit: function() {
			var self = this;

			this.element
			.bind('mousedown.'+this.widgetName, function(event) {
				return self._mouseDown(event);
			})
			.bind('click.'+this.widgetName, function(event) {
				if(self._preventClickEvent) {
					self._preventClickEvent = false;
					event.stopImmediatePropagation();
					return false;
				}
			});

			// Prevent text selection in IE
			if ($.browser.msie) {
				this._mouseUnselectable = this.element.attr('unselectable');
				this.element.attr('unselectable', 'on');
			}

			this.started = false;
		},

		// TODO: make sure destroying one instance of mouse doesn't mess with
		// other instances of mouse
		_mouseDestroy: function() {
			this.element.unbind('.'+this.widgetName);

			// Restore text selection in IE
			($.browser.msie
				&& this.element.attr('unselectable', this._mouseUnselectable));
		},

		_mouseDown: function(event) {
			// don't let more than one widget handle mouseStart
			// TODO: figure out why we have to use originalEvent
			event.originalEvent = event.originalEvent || {};
			if (event.originalEvent.mouseHandled) {
				return;
			}

			// we may have missed mouseup (out of window)
			(this._mouseStarted && this._mouseUp(event));

			this._mouseDownEvent = event;

			var self = this,
			btnIsLeft = (event.which == 1),
			elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).parents().add(event.target).filter(this.options.cancel).length : false);
			if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
				return true;
			}

			this.mouseDelayMet = !this.options.delay;
			if (!this.mouseDelayMet) {
				this._mouseDelayTimer = setTimeout(function() {
					self.mouseDelayMet = true;
				}, this.options.delay);
			}

			if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
				this._mouseStarted = (this._mouseStart(event) !== false);
				if (!this._mouseStarted) {
					event.preventDefault();
					return true;
				}
			}

			// these delegates are required to keep context
			this._mouseMoveDelegate = function(event) {
				return self._mouseMove(event);
			};
			this._mouseUpDelegate = function(event) {
				return self._mouseUp(event);
			};
			$(document)
			.bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
			.bind('mouseup.'+this.widgetName, this._mouseUpDelegate);

			// preventDefault() is used to prevent the selection of text here -
			// however, in Safari, this causes select boxes not to be selectable
			// anymore, so this fix is needed
			($.browser.safari || event.preventDefault());

			event.originalEvent.mouseHandled = true;
			return true;
		},

		_mouseMove: function(event) {
			// IE mouseup check - mouseup happened when mouse was out of window
			if ($.browser.msie && !event.button) {
				return this._mouseUp(event);
			}

			if (this._mouseStarted) {
				this._mouseDrag(event);
				return event.preventDefault();
			}

			if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
				this._mouseStarted =
				(this._mouseStart(this._mouseDownEvent, event) !== false);
				(this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
			}

			return !this._mouseStarted;
		},

		_mouseUp: function(event) {
			$(document)
			.unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
			.unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);

			if (this._mouseStarted) {
				this._mouseStarted = false;
				this._preventClickEvent = (event.target == this._mouseDownEvent.target);
				this._mouseStop(event);
			}

			return false;
		},

		_mouseDistanceMet: function(event) {
			return (Math.max(
				Math.abs(this._mouseDownEvent.pageX - event.pageX),
				Math.abs(this._mouseDownEvent.pageY - event.pageY)
				) >= this.options.distance
			);
		},

		_mouseDelayMet: function(event) {
			return this.mouseDelayMet;
		},

		// These are placeholder methods, to be overriden by extending plugin
		_mouseStart: function(event) {},
		_mouseDrag: function(event) {},
		_mouseStop: function(event) {},
		_mouseCapture: function(event) {
			return true;
		}
	};

	$.ui.mouse.defaults = {
		cancel: null,
		distance: 1,
		delay: 0
	};

})(jQuery);
/*
 * jQuery UI Datepicker 1.7.2
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Datepicker
 *
 * Depends:
 *	ui.core.js
 */

(function($) { // hide the namespace

	$.extend($.ui, {
		datepicker: {
			version: "1.7.2"
		}
	});

var PROP_NAME = 'datepicker';

/* Date picker manager.
   Use the singleton instance of this class, $.datepicker, to interact with the date picker.
   Settings for (groups of) date pickers are maintained in an instance object,
   allowing multiple different settings on the same page. */

function Datepicker() {
	this.debug = false; // Change this to true to start debugging
	this._curInst = null; // The current instance in use
	this._keyEvent = false; // If the last event was a key event
	this._disabledInputs = []; // List of date picker inputs that have been disabled
	this._datepickerShowing = false; // True if the popup picker is showing , false if not
	this._inDialog = false; // True if showing within a "dialog", false if not
	this._mainDivId = 'ui-datepicker-div'; // The ID of the main datepicker division
	this._inlineClass = 'ui-datepicker-inline'; // The name of the inline marker class
	this._appendClass = 'ui-datepicker-append'; // The name of the append marker class
	this._triggerClass = 'ui-datepicker-trigger'; // The name of the trigger marker class
	this._dialogClass = 'ui-datepicker-dialog'; // The name of the dialog marker class
	this._disableClass = 'ui-datepicker-disabled'; // The name of the disabled covering marker class
	this._unselectableClass = 'ui-datepicker-unselectable'; // The name of the unselectable cell marker class
	this._currentClass = 'ui-datepicker-current-day'; // The name of the current day marker class
	this._dayOverClass = 'ui-datepicker-days-cell-over'; // The name of the day hover marker class
	this.regional = []; // Available regional settings, indexed by language code
	this.regional[''] = { // Default regional settings
		closeText: 'Done', // Display text for close link
		prevText: 'Prev', // Display text for previous month link
		nextText: 'Next', // Display text for next month link
		currentText: 'Today', // Display text for current month link
		monthNames: ['January','February','March','April','May','June',
		'July','August','September','October','November','December'], // Names of months for drop-down and formatting
		monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], // For formatting
		dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formatting
		dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formatting
		dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at Sunday
		dateFormat: 'mm/dd/yy', // See format options on parseDate
		firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
		isRTL: false // True if right-to-left language, false if left-to-right
	};
	this._defaults = { // Global defaults for all the date picker instances
		showOn: 'focus', // 'focus' for popup on focus,
		// 'button' for trigger button, or 'both' for either
		showAnim: 'show', // Name of jQuery animation for popup
		showOptions: {}, // Options for enhanced animations
		defaultDate: null, // Used when field is blank: actual date,
		// +/-number for offset from today, null for today
		appendText: '', // Display text following the input box, e.g. showing the format
		buttonText: '...', // Text for trigger button
		buttonImage: '', // URL for trigger button image
		buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
		hideIfNoPrevNext: false, // True to hide next/previous month links
		// if not applicable, false to just disable them
		navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
		gotoCurrent: false, // True if today link goes back to current selection instead
		changeMonth: false, // True if month can be selected directly, false if only prev/next
		changeYear: false, // True if year can be selected directly, false if only prev/next
		showMonthAfterYear: false, // True if the year select precedes month, false for month then year
		yearRange: '-10:+10', // Range of years to display in drop-down,
		// either relative to current year (-nn:+nn) or absolute (nnnn:nnnn)
		showOtherMonths: false, // True to show dates in other months, false to leave blank
		calculateWeek: this.iso8601Week, // How to calculate the week of the year,
		// takes a Date and returns the number of the week for it
		shortYearCutoff: '+10', // Short year values < this are in the current century,
		// > this are in the previous century,
		// string value starting with '+' for current year + value
		minDate: null, // The earliest selectable date, or null for no limit
		maxDate: null, // The latest selectable date, or null for no limit
		duration: 'normal', // Duration of display/closure
		beforeShowDay: null, // Function that takes a date and returns an array with
		// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '',
		// [2] = cell title (optional), e.g. $.datepicker.noWeekends
		beforeShow: null, // Function that takes an input field and
		// returns a set of custom settings for the date picker
		onSelect: null, // Define a callback function when a date is selected
		onChangeMonthYear: null, // Define a callback function when the month or year is changed
		onClose: null, // Define a callback function when the datepicker is closed
		numberOfMonths: 1, // Number of months to show at a time
		showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
		stepMonths: 1, // Number of months to step back/forward
		stepBigMonths: 12, // Number of months to step back/forward for the big links
		altField: '', // Selector for an alternate field to store selected dates into
		altFormat: '', // The date format to use for the alternate field
		constrainInput: true, // The input is constrained by the current date format
		showButtonPanel: false // True to show button panel, false to not show it
	};
	$.extend(this._defaults, this.regional['']);
	this.dpDiv = $('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>');
}

$.extend(Datepicker.prototype, {
	/* Class name added to elements to indicate already configured with a date picker. */
	markerClassName: 'hasDatepicker',

	/* Debug logging (if enabled). */
	log: function () {
		if (this.debug)
			console.log.apply('', arguments);
	},

	/* Override the default settings for all instances of the date picker.
	   @param  settings  object - the new settings to use as defaults (anonymous object)
	   @return the manager object */
	setDefaults: function(settings) {
		extendRemove(this._defaults, settings || {});
		return this;
	},

	/* Attach the date picker to a jQuery selection.
	   @param  target    element - the target input field or division or span
	   @param  settings  object - the new settings to use for this date picker instance (anonymous) */
	_attachDatepicker: function(target, settings) {
		// check for settings on the control itself - in namespace 'date:'
		var inlineSettings = null;
		for (var attrName in this._defaults) {
			var attrValue = target.getAttribute('date:' + attrName);
			if (attrValue) {
				inlineSettings = inlineSettings || {};
				try {
					inlineSettings[attrName] = eval(attrValue);
				} catch (err) {
					inlineSettings[attrName] = attrValue;
				}
			}
		}
		var nodeName = target.nodeName.toLowerCase();
		var inline = (nodeName == 'div' || nodeName == 'span');
		if (!target.id)
			target.id = 'dp' + (++this.uuid);
		var inst = this._newInst($(target), inline);
		inst.settings = $.extend({}, settings || {}, inlineSettings || {});
		if (nodeName == 'input') {
			this._connectDatepicker(target, inst);
		} else if (inline) {
			this._inlineDatepicker(target, inst);
		}
	},

	/* Create a new instance object. */
	_newInst: function(target, inline) {
		var id = target[0].id.replace(/([:\[\]\.])/g, '\\\\$1'); // escape jQuery meta chars
		return {
			id: id, 
			input: target, // associated target
			selectedDay: 0, 
			selectedMonth: 0, 
			selectedYear: 0, // current selection
			drawMonth: 0, 
			drawYear: 0, // month being drawn
			inline: inline, // is datepicker inline or not
			dpDiv: (!inline ? this.dpDiv : // presentation div
				$('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))
			};
	},

	/* Attach the date picker to an input field. */
	_connectDatepicker: function(target, inst) {
		var input = $(target);
		inst.append = $([]);
		inst.trigger = $([]);
		if (input.hasClass(this.markerClassName))
			return;
		var appendText = this._get(inst, 'appendText');
		var isRTL = this._get(inst, 'isRTL');
		if (appendText) {
			inst.append = $('<span class="' + this._appendClass + '">' + appendText + '</span>');
			input[isRTL ? 'before' : 'after'](inst.append);
		}
		var showOn = this._get(inst, 'showOn');
		if (showOn == 'focus' || showOn == 'both') // pop-up date picker when in the marked field
			input.focus(this._showDatepicker);
		if (showOn == 'button' || showOn == 'both') { // pop-up date picker when button clicked
			var buttonText = this._get(inst, 'buttonText');
			var buttonImage = this._get(inst, 'buttonImage');
			inst.trigger = $(this._get(inst, 'buttonImageOnly') ?
				$('<img/>').addClass(this._triggerClass).
				attr({
					src: buttonImage, 
					alt: buttonText, 
					title: buttonText
				}) :
				$('<button type="button"></button>').addClass(this._triggerClass).
				html(buttonImage == '' ? buttonText : $('<img/>').attr(
				{
					src:buttonImage, 
					alt:buttonText, 
					title:buttonText
				})));
			input[isRTL ? 'before' : 'after'](inst.trigger);
			inst.trigger.click(function() {
				if ($.datepicker._datepickerShowing && $.datepicker._lastInput == target)
					$.datepicker._hideDatepicker();
				else
					$.datepicker._showDatepicker(target);
				return false;
			});
		}
		input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).
		bind("setData.datepicker", function(event, key, value) {
			inst.settings[key] = value;
		}).bind("getData.datepicker", function(event, key) {
			return this._get(inst, key);
		});
		$.data(target, PROP_NAME, inst);
	},

	/* Attach an inline date picker to a div. */
	_inlineDatepicker: function(target, inst) {
		var divSpan = $(target);
		if (divSpan.hasClass(this.markerClassName))
			return;
		divSpan.addClass(this.markerClassName).append(inst.dpDiv).
		bind("setData.datepicker", function(event, key, value){
			inst.settings[key] = value;
		}).bind("getData.datepicker", function(event, key){
			return this._get(inst, key);
		});
		$.data(target, PROP_NAME, inst);
		this._setDate(inst, this._getDefaultDate(inst));
		this._updateDatepicker(inst);
		this._updateAlternate(inst);
	},

	/* Pop-up the date picker in a "dialog" box.
	   @param  input     element - ignored
	   @param  dateText  string - the initial date to display (in the current format)
	   @param  onSelect  function - the function(dateText) to call when a date is selected
	   @param  settings  object - update the dialog date picker instance's settings (anonymous object)
	   @param  pos       int[2] - coordinates for the dialog's position within the screen or
	                     event - with x/y coordinates or
	                     leave empty for default (screen centre)
	   @return the manager object */
	_dialogDatepicker: function(input, dateText, onSelect, settings, pos) {
		var inst = this._dialogInst; // internal instance
		if (!inst) {
			var id = 'dp' + (++this.uuid);
			this._dialogInput = $('<input type="text" id="' + id +
				'" size="1" style="position: absolute; top: -100px;"/>');
			this._dialogInput.keydown(this._doKeyDown);
			$('body').append(this._dialogInput);
			inst = this._dialogInst = this._newInst(this._dialogInput, false);
			inst.settings = {};
			$.data(this._dialogInput[0], PROP_NAME, inst);
		}
		extendRemove(inst.settings, settings || {});
		this._dialogInput.val(dateText);

		this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
		if (!this._pos) {
			var browserWidth = window.innerWidth || document.documentElement.clientWidth ||	document.body.clientWidth;
			var browserHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
			var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
			var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
			this._pos = // should use actual width/height below
			[(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
		}

		// move input on screen for focus, but hidden behind dialog
		this._dialogInput.css('left', this._pos[0] + 'px').css('top', this._pos[1] + 'px');
		inst.settings.onSelect = onSelect;
		this._inDialog = true;
		this.dpDiv.addClass(this._dialogClass);
		this._showDatepicker(this._dialogInput[0]);
		if ($.blockUI)
			$.blockUI(this.dpDiv);
		$.data(this._dialogInput[0], PROP_NAME, inst);
		return this;
	},

	/* Detach a datepicker from its control.
	   @param  target    element - the target input field or division or span */
	_destroyDatepicker: function(target) {
		var $target = $(target);
		var inst = $.data(target, PROP_NAME);
		if (!$target.hasClass(this.markerClassName)) {
			return;
		}
		var nodeName = target.nodeName.toLowerCase();
		$.removeData(target, PROP_NAME);
		if (nodeName == 'input') {
			inst.append.remove();
			inst.trigger.remove();
			$target.removeClass(this.markerClassName).
			unbind('focus', this._showDatepicker).
			unbind('keydown', this._doKeyDown).
			unbind('keypress', this._doKeyPress);
		} else if (nodeName == 'div' || nodeName == 'span')
			$target.removeClass(this.markerClassName).empty();
	},

	/* Enable the date picker to a jQuery selection.
	   @param  target    element - the target input field or division or span */
	_enableDatepicker: function(target) {
		var $target = $(target);
		var inst = $.data(target, PROP_NAME);
		if (!$target.hasClass(this.markerClassName)) {
			return;
		}
		var nodeName = target.nodeName.toLowerCase();
		if (nodeName == 'input') {
			target.disabled = false;
			inst.trigger.filter('button').
			each(function() {
				this.disabled = false;
			}).end().
			filter('img').css({
				opacity: '1.0', 
				cursor: ''
			});
		}
		else if (nodeName == 'div' || nodeName == 'span') {
			var inline = $target.children('.' + this._inlineClass);
			inline.children().removeClass('ui-state-disabled');
		}
		this._disabledInputs = $.map(this._disabledInputs,
			function(value) {
				return (value == target ? null : value);
			}); // delete entry
	},

	/* Disable the date picker to a jQuery selection.
	   @param  target    element - the target input field or division or span */
	_disableDatepicker: function(target) {
		var $target = $(target);
		var inst = $.data(target, PROP_NAME);
		if (!$target.hasClass(this.markerClassName)) {
			return;
		}
		var nodeName = target.nodeName.toLowerCase();
		if (nodeName == 'input') {
			target.disabled = true;
			inst.trigger.filter('button').
			each(function() {
				this.disabled = true;
			}).end().
			filter('img').css({
				opacity: '0.5', 
				cursor: 'default'
			});
		}
		else if (nodeName == 'div' || nodeName == 'span') {
			var inline = $target.children('.' + this._inlineClass);
			inline.children().addClass('ui-state-disabled');
		}
		this._disabledInputs = $.map(this._disabledInputs,
			function(value) {
				return (value == target ? null : value);
			}); // delete entry
		this._disabledInputs[this._disabledInputs.length] = target;
	},

	/* Is the first field in a jQuery collection disabled as a datepicker?
	   @param  target    element - the target input field or division or span
	   @return boolean - true if disabled, false if enabled */
	_isDisabledDatepicker: function(target) {
		if (!target) {
			return false;
		}
		for (var i = 0; i < this._disabledInputs.length; i++) {
			if (this._disabledInputs[i] == target)
				return true;
		}
		return false;
	},

	/* Retrieve the instance data for the target control.
	   @param  target  element - the target input field or division or span
	   @return  object - the associated instance data
	   @throws  error if a jQuery problem getting data */
	_getInst: function(target) {
		try {
			return $.data(target, PROP_NAME);
		}
		catch (err) {
			throw 'Missing instance data for this datepicker';
		}
	},

	/* Update or retrieve the settings for a date picker attached to an input field or division.
	   @param  target  element - the target input field or division or span
	   @param  name    object - the new settings to update or
	                   string - the name of the setting to change or retrieve,
	                   when retrieving also 'all' for all instance settings or
	                   'defaults' for all global defaults
	   @param  value   any - the new value for the setting
	                   (omit if above is an object or to retrieve a value) */
	_optionDatepicker: function(target, name, value) {
		var inst = this._getInst(target);
		if (arguments.length == 2 && typeof name == 'string') {
			return (name == 'defaults' ? $.extend({}, $.datepicker._defaults) :
				(inst ? (name == 'all' ? $.extend({}, inst.settings) :
					this._get(inst, name)) : null));
		}
		var settings = name || {};
		if (typeof name == 'string') {
			settings = {};
			settings[name] = value;
		}
		if (inst) {
			if (this._curInst == inst) {
				this._hideDatepicker(null);
			}
			var date = this._getDateDatepicker(target);
			extendRemove(inst.settings, settings);
			this._setDateDatepicker(target, date);
			this._updateDatepicker(inst);
		}
	},

	// change method deprecated
	_changeDatepicker: function(target, name, value) {
		this._optionDatepicker(target, name, value);
	},

	/* Redraw the date picker attached to an input field or division.
	   @param  target  element - the target input field or division or span */
	_refreshDatepicker: function(target) {
		var inst = this._getInst(target);
		if (inst) {
			this._updateDatepicker(inst);
		}
	},

	/* Set the dates for a jQuery selection.
	   @param  target   element - the target input field or division or span
	   @param  date     Date - the new date
	   @param  endDate  Date - the new end date for a range (optional) */
	_setDateDatepicker: function(target, date, endDate) {
		var inst = this._getInst(target);
		if (inst) {
			this._setDate(inst, date, endDate);
			this._updateDatepicker(inst);
			this._updateAlternate(inst);
		}
	},

	/* Get the date(s) for the first entry in a jQuery selection.
	   @param  target  element - the target input field or division or span
	   @return Date - the current date or
	           Date[2] - the current dates for a range */
	_getDateDatepicker: function(target) {
		var inst = this._getInst(target);
		if (inst && !inst.inline)
			this._setDateFromField(inst);
		return (inst ? this._getDate(inst) : null);
	},

	/* Handle keystrokes. */
	_doKeyDown: function(event) {
		var inst = $.datepicker._getInst(event.target);
		var handled = true;
		var isRTL = inst.dpDiv.is('.ui-datepicker-rtl');
		inst._keyEvent = true;
		if ($.datepicker._datepickerShowing)
			switch (event.keyCode) {
				case 9:
					$.datepicker._hideDatepicker(null, '');
					break; // hide on tab out
				case 13:
					var sel = $('td.' + $.datepicker._dayOverClass +
					', td.' + $.datepicker._currentClass, inst.dpDiv);
				if (sel[0])
					$.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
				else
					$.datepicker._hideDatepicker(null, $.datepicker._get(inst, 'duration'));
				return false; // don't submit the form
				break; // select the value on enter
				case 27:
					$.datepicker._hideDatepicker(null, $.datepicker._get(inst, 'duration'));
					break; // hide on escape
				case 33:
					$.datepicker._adjustDate(event.target, (event.ctrlKey ?
					-$.datepicker._get(inst, 'stepBigMonths') :
					-$.datepicker._get(inst, 'stepMonths')), 'M');
				break; // previous month/year on page up/+ ctrl
				case 34:
					$.datepicker._adjustDate(event.target, (event.ctrlKey ?
					+$.datepicker._get(inst, 'stepBigMonths') :
					+$.datepicker._get(inst, 'stepMonths')), 'M');
				break; // next month/year on page down/+ ctrl
				case 35:
					if (event.ctrlKey || event.metaKey) $.datepicker._clearDate(event.target);
					handled = event.ctrlKey || event.metaKey;
					break; // clear on ctrl or command +end
				case 36:
					if (event.ctrlKey || event.metaKey) $.datepicker._gotoToday(event.target);
					handled = event.ctrlKey || event.metaKey;
					break; // current on ctrl or command +home
				case 37:
					if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), 'D');
					handled = event.ctrlKey || event.metaKey;
					// -1 day on ctrl or command +left
					if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
						-$.datepicker._get(inst, 'stepBigMonths') :
						-$.datepicker._get(inst, 'stepMonths')), 'M');
					// next month/year on alt +left on Mac
					break;
				case 38:
					if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, -7, 'D');
					handled = event.ctrlKey || event.metaKey;
					break; // -1 week on ctrl or command +up
				case 39:
					if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), 'D');
					handled = event.ctrlKey || event.metaKey;
					// +1 day on ctrl or command +right
					if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
						+$.datepicker._get(inst, 'stepBigMonths') :
						+$.datepicker._get(inst, 'stepMonths')), 'M');
					// next month/year on alt +right
					break;
				case 40:
					if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, +7, 'D');
					handled = event.ctrlKey || event.metaKey;
					break; // +1 week on ctrl or command +down
				default:
					handled = false;
			}
		else if (event.keyCode == 36 && event.ctrlKey) // display the date picker on ctrl+home
			$.datepicker._showDatepicker(this);
		else {
			handled = false;
		}
		if (handled) {
			event.preventDefault();
			event.stopPropagation();
		}
	},

	/* Filter entered characters - based on date format. */
	_doKeyPress: function(event) {
		var inst = $.datepicker._getInst(event.target);
		if ($.datepicker._get(inst, 'constrainInput')) {
			var chars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat'));
			var chr = String.fromCharCode(event.charCode == undefined ? event.keyCode : event.charCode);
			return event.ctrlKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1);
		}
	},

	/* Pop-up the date picker for a given input field.
	   @param  input  element - the input field attached to the date picker or
	                  event - if triggered by focus */
	_showDatepicker: function(input) {
		input = input.target || input;

		if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger
			input = $('input', input.parentNode)[0];
		if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here
			return;
		var inst = $.datepicker._getInst(input);
		var beforeShow = $.datepicker._get(inst, 'beforeShow');
		extendRemove(inst.settings, (beforeShow ? beforeShow.apply(input, [input, inst]) : {}));
		$.datepicker._hideDatepicker(null, '');
		$.datepicker._lastInput = input;
		$.datepicker._setDateFromField(inst);
		if ($.datepicker._inDialog) // hide cursor
			input.value = '';
		if (!$.datepicker._pos) { // position below input
			$.datepicker._pos = $.datepicker._findPos(input);
			$.datepicker._pos[1] += input.offsetHeight; // add the height
		}
		var isFixed = false;
		$(input).parents().each(function() {
			isFixed |= $(this).css('position') == 'fixed';
			return !isFixed;
		});
		if (isFixed && $.browser.opera) { // correction for Opera when fixed and scrolled
			$.datepicker._pos[0] -= document.documentElement.scrollLeft;
			$.datepicker._pos[1] -= document.documentElement.scrollTop;
		}
		var offset = {
			left: $.datepicker._pos[0], 
			top: $.datepicker._pos[1]
			};
		$.datepicker._pos = null;
		inst.rangeStart = null;
		// determine sizing offscreen
		inst.dpDiv.css({
			position: 'absolute', 
			display: 'block', 
			top: '-1000px'
		});
		$.datepicker._updateDatepicker(inst);
		// fix width for dynamic number of date pickers
		// and adjust position before showing
		offset = $.datepicker._checkOffset(inst, offset, isFixed);
		inst.dpDiv.css({
			position: ($.datepicker._inDialog && $.blockUI ?
				'static' : (isFixed ? 'fixed' : 'absolute')), 
			display: 'none',
			left: offset.left + 'px', 
			top: offset.top + 'px'
			});
		if (!inst.inline) {
			var showAnim = $.datepicker._get(inst, 'showAnim') || 'show';
			var duration = $.datepicker._get(inst, 'duration');
			var postProcess = function() {
				$.datepicker._datepickerShowing = true;
				if ($.browser.msie && parseInt($.browser.version,10) < 7) // fix IE < 7 select problems
					$('iframe.ui-datepicker-cover').css({
						width: inst.dpDiv.width() + 4,
						height: inst.dpDiv.height() + 4
						});
			};
			if ($.effects && $.effects[showAnim])
				inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
			else
				inst.dpDiv[showAnim](duration, postProcess);
			if (duration == '')
				postProcess();
			if (inst.input[0].type != 'hidden')
				inst.input[0].focus();
			$.datepicker._curInst = inst;
		}
	},

	/* Generate the date picker content. */
	_updateDatepicker: function(inst) {
		var dims = {
			width: inst.dpDiv.width() + 4,
			height: inst.dpDiv.height() + 4
			};
		var self = this;
		inst.dpDiv.empty().append(this._generateHTML(inst))
		.find('iframe.ui-datepicker-cover').
		css({
			width: dims.width, 
			height: dims.height
			})
		.end()
		.find('button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a')
		.bind('mouseout', function(){
			$(this).removeClass('ui-state-hover');
			if(this.className.indexOf('ui-datepicker-prev') != -1) $(this).removeClass('ui-datepicker-prev-hover');
			if(this.className.indexOf('ui-datepicker-next') != -1) $(this).removeClass('ui-datepicker-next-hover');
		})
		.bind('mouseover', function(){
			if (!self._isDisabledDatepicker( inst.inline ? inst.dpDiv.parent()[0] : inst.input[0])) {
				$(this).parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover');
				$(this).addClass('ui-state-hover');
				if(this.className.indexOf('ui-datepicker-prev') != -1) $(this).addClass('ui-datepicker-prev-hover');
				if(this.className.indexOf('ui-datepicker-next') != -1) $(this).addClass('ui-datepicker-next-hover');
			}
		})
		.end()
		.find('.' + this._dayOverClass + ' a')
		.trigger('mouseover')
		.end();
		var numMonths = this._getNumberOfMonths(inst);
		var cols = numMonths[1];
		var width = 17;
		if (cols > 1) {
			inst.dpDiv.addClass('ui-datepicker-multi-' + cols).css('width', (width * cols) + 'em');
		} else {
			inst.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4').width('');
		}
		inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? 'add' : 'remove') +
		'Class']('ui-datepicker-multi');
		inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') +
		'Class']('ui-datepicker-rtl');
		if (inst.input && inst.input[0].type != 'hidden' && inst == $.datepicker._curInst)
			$(inst.input[0]).focus();
	},

	/* Check positioning to remain on screen. */
	_checkOffset: function(inst, offset, isFixed) {
		var dpWidth = inst.dpDiv.outerWidth();
		var dpHeight = inst.dpDiv.outerHeight();
		var inputWidth = inst.input ? inst.input.outerWidth() : 0;
		var inputHeight = inst.input ? inst.input.outerHeight() : 0;
		var viewWidth = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) + $(document).scrollLeft();
		var viewHeight = (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight) + $(document).scrollTop();

		offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0);
		offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;
		offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;

		// now check if datepicker is showing outside window viewport - move to a better place if so.
		offset.left -= (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ? Math.abs(offset.left + dpWidth - viewWidth) : 0;
		offset.top -= (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ? Math.abs(offset.top + dpHeight + inputHeight*2 - viewHeight) : 0;

		return offset;
	},

	/* Find an object's position on the screen. */
	_findPos: function(obj) {
		while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) {
			obj = obj.nextSibling;
		}
		var position = $(obj).offset();
		return [position.left, position.top];
	},

	/* Hide the date picker from view.
	   @param  input  element - the input field attached to the date picker
	   @param  duration  string - the duration over which to close the date picker */
	_hideDatepicker: function(input, duration) {
		var inst = this._curInst;
		if (!inst || (input && inst != $.data(input, PROP_NAME)))
			return;
		if (inst.stayOpen)
			this._selectDate('#' + inst.id, this._formatDate(inst,
				inst.currentDay, inst.currentMonth, inst.currentYear));
		inst.stayOpen = false;
		if (this._datepickerShowing) {
			duration = (duration != null ? duration : this._get(inst, 'duration'));
			var showAnim = this._get(inst, 'showAnim');
			var postProcess = function() {
				$.datepicker._tidyDialog(inst);
			};
			if (duration != '' && $.effects && $.effects[showAnim])
				inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'),
					duration, postProcess);
			else
				inst.dpDiv[(duration == '' ? 'hide' : (showAnim == 'slideDown' ? 'slideUp' :
					(showAnim == 'fadeIn' ? 'fadeOut' : 'hide')))](duration, postProcess);
			if (duration == '')
				this._tidyDialog(inst);
			var onClose = this._get(inst, 'onClose');
			if (onClose)
				onClose.apply((inst.input ? inst.input[0] : null),
					[(inst.input ? inst.input.val() : ''), inst]);  // trigger custom callback
			this._datepickerShowing = false;
			this._lastInput = null;
			if (this._inDialog) {
				this._dialogInput.css({
					position: 'absolute', 
					left: '0', 
					top: '-100px'
				});
				if ($.blockUI) {
					$.unblockUI();
					$('body').append(this.dpDiv);
				}
			}
			this._inDialog = false;
		}
		this._curInst = null;
	},

	/* Tidy up after a dialog display. */
	_tidyDialog: function(inst) {
		inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker-calendar');
	},

	/* Close date picker if clicked elsewhere. */
	_checkExternalClick: function(event) {
		if (!$.datepicker._curInst)
			return;
		var $target = $(event.target);
		if (($target.parents('#' + $.datepicker._mainDivId).length == 0) &&
			!$target.hasClass($.datepicker.markerClassName) &&
			!$target.hasClass($.datepicker._triggerClass) &&
			$.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI))
			$.datepicker._hideDatepicker(null, '');
	},

	/* Adjust one of the date sub-fields. */
	_adjustDate: function(id, offset, period) {
		var target = $(id);
		var inst = this._getInst(target[0]);
		if (this._isDisabledDatepicker(target[0])) {
			return;
		}
		this._adjustInstDate(inst, offset +
			(period == 'M' ? this._get(inst, 'showCurrentAtPos') : 0), // undo positioning
			period);
		this._updateDatepicker(inst);
	},

	/* Action for current link. */
	_gotoToday: function(id) {
		var target = $(id);
		var inst = this._getInst(target[0]);
		if (this._get(inst, 'gotoCurrent') && inst.currentDay) {
			inst.selectedDay = inst.currentDay;
			inst.drawMonth = inst.selectedMonth = inst.currentMonth;
			inst.drawYear = inst.selectedYear = inst.currentYear;
		}
		else {
			var date = new Date();
			inst.selectedDay = date.getDate();
			inst.drawMonth = inst.selectedMonth = date.getMonth();
			inst.drawYear = inst.selectedYear = date.getFullYear();
		}
		this._notifyChange(inst);
		this._adjustDate(target);
	},

	/* Action for selecting a new month/year. */
	_selectMonthYear: function(id, select, period) {
		var target = $(id);
		var inst = this._getInst(target[0]);
		inst._selectingMonthYear = false;
		inst['selected' + (period == 'M' ? 'Month' : 'Year')] =
		inst['draw' + (period == 'M' ? 'Month' : 'Year')] =
		parseInt(select.options[select.selectedIndex].value,10);
		this._notifyChange(inst);
		this._adjustDate(target);
	},

	/* Restore input focus after not changing month/year. */
	_clickMonthYear: function(id) {
		var target = $(id);
		var inst = this._getInst(target[0]);
		if (inst.input && inst._selectingMonthYear && !$.browser.msie)
			inst.input[0].focus();
		inst._selectingMonthYear = !inst._selectingMonthYear;
	},

	/* Action for selecting a day. */
	_selectDay: function(id, month, year, td) {
		var target = $(id);
		if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
			return;
		}
		var inst = this._getInst(target[0]);
		inst.selectedDay = inst.currentDay = $('a', td).html();
		inst.selectedMonth = inst.currentMonth = month;
		inst.selectedYear = inst.currentYear = year;
		if (inst.stayOpen) {
			inst.endDay = inst.endMonth = inst.endYear = null;
		}
		this._selectDate(id, this._formatDate(inst,
			inst.currentDay, inst.currentMonth, inst.currentYear));
		if (inst.stayOpen) {
			inst.rangeStart = this._daylightSavingAdjust(
				new Date(inst.currentYear, inst.currentMonth, inst.currentDay));
			this._updateDatepicker(inst);
		}
	},

	/* Erase the input field and hide the date picker. */
	_clearDate: function(id) {
		var target = $(id);
		var inst = this._getInst(target[0]);
		inst.stayOpen = false;
		inst.endDay = inst.endMonth = inst.endYear = inst.rangeStart = null;
		this._selectDate(target, '');
	},

	/* Update the input field with the selected date. */
	_selectDate: function(id, dateStr) {
		var target = $(id);
		var inst = this._getInst(target[0]);
		dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
		if (inst.input)
			inst.input.val(dateStr);
		this._updateAlternate(inst);
		var onSelect = this._get(inst, 'onSelect');
		if (onSelect)
			onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);  // trigger custom callback
		else if (inst.input)
			inst.input.trigger('change'); // fire the change event
		if (inst.inline)
			this._updateDatepicker(inst);
		else if (!inst.stayOpen) {
			this._hideDatepicker(null, this._get(inst, 'duration'));
			this._lastInput = inst.input[0];
			if (typeof(inst.input[0]) != 'object')
				inst.input[0].focus(); // restore focus
			this._lastInput = null;
		}
	},

	/* Update any alternate field to synchronise with the main field. */
	_updateAlternate: function(inst) {
		var altField = this._get(inst, 'altField');
		if (altField) { // update alternate field too
			var altFormat = this._get(inst, 'altFormat') || this._get(inst, 'dateFormat');
			var date = this._getDate(inst);
			dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
			$(altField).each(function() {
				$(this).val(dateStr);
			});
		}
	},

	/* Set as beforeShowDay function to prevent selection of weekends.
	   @param  date  Date - the date to customise
	   @return [boolean, string] - is this date selectable?, what is its CSS class? */
	noWeekends: function(date) {
		var day = date.getDay();
		return [(day > 0 && day < 6), ''];
	},

	/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
	   @param  date  Date - the date to get the week for
	   @return  number - the number of the week within the year that contains this date */
	iso8601Week: function(date) {
		var checkDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
		var firstMon = new Date(checkDate.getFullYear(), 1 - 1, 4); // First week always contains 4 Jan
		var firstDay = firstMon.getDay() || 7; // Day of week: Mon = 1, ..., Sun = 7
		firstMon.setDate(firstMon.getDate() + 1 - firstDay); // Preceding Monday
		if (firstDay < 4 && checkDate < firstMon) { // Adjust first three days in year if necessary
			checkDate.setDate(checkDate.getDate() - 3); // Generate for previous year
			return $.datepicker.iso8601Week(checkDate);
		} else if (checkDate > new Date(checkDate.getFullYear(), 12 - 1, 28)) { // Check last three days in year
			firstDay = new Date(checkDate.getFullYear() + 1, 1 - 1, 4).getDay() || 7;
			if (firstDay > 4 && (checkDate.getDay() || 7) < firstDay - 3) { // Adjust if necessary
				return 1;
			}
		}
		return Math.floor(((checkDate - firstMon) / 86400000) / 7) + 1; // Weeks to given date
	},

	/* Parse a string value into a date object.
	   See formatDate below for the possible formats.

	   @param  format    string - the expected format of the date
	   @param  value     string - the date in the above format
	   @param  settings  Object - attributes include:
	                     shortYearCutoff  number - the cutoff year for determining the century (optional)
	                     dayNamesShort    string[7] - abbreviated names of the days from Sunday (optional)
	                     dayNames         string[7] - names of the days from Sunday (optional)
	                     monthNamesShort  string[12] - abbreviated names of the months (optional)
	                     monthNames       string[12] - names of the months (optional)
	   @return  Date - the extracted date value or null if value is blank */
	parseDate: function (format, value, settings) {
		if (format == null || value == null)
			throw 'Invalid arguments';
		value = (typeof value == 'object' ? value.toString() : value + '');
		if (value == '')
			return null;
		var shortYearCutoff = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff;
		var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
		var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
		var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
		var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
		var year = -1;
		var month = -1;
		var day = -1;
		var doy = -1;
		var literal = false;
		// Check whether a format character is doubled
		var lookAhead = function(match) {
			var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
			if (matches)
				iFormat++;
			return matches;
		};
		// Extract a number from the string value
		var getNumber = function(match) {
			lookAhead(match);
			var origSize = (match == '@' ? 14 : (match == 'y' ? 4 : (match == 'o' ? 3 : 2)));
			var size = origSize;
			var num = 0;
			while (size > 0 && iValue < value.length &&
				value.charAt(iValue) >= '0' && value.charAt(iValue) <= '9') {
				num = num * 10 + parseInt(value.charAt(iValue++),10);
				size--;
			}
			if (size == origSize)
				throw 'Missing number at position ' + iValue;
			return num;
		};
		// Extract a name from the string value and convert to an index
		var getName = function(match, shortNames, longNames) {
			var names = (lookAhead(match) ? longNames : shortNames);
			var size = 0;
			for (var j = 0; j < names.length; j++)
				size = Math.max(size, names[j].length);
			var name = '';
			var iInit = iValue;
			while (size > 0 && iValue < value.length) {
				name += value.charAt(iValue++);
				for (var i = 0; i < names.length; i++)
					if (name == names[i])
						return i + 1;
				size--;
			}
			throw 'Unknown name at position ' + iInit;
		};
		// Confirm that a literal character matches the string value
		var checkLiteral = function() {
			if (value.charAt(iValue) != format.charAt(iFormat))
				throw 'Unexpected literal at position ' + iValue;
			iValue++;
		};
		var iValue = 0;
		for (var iFormat = 0; iFormat < format.length; iFormat++) {
			if (literal)
				if (format.charAt(iFormat) == "'" && !lookAhead("'"))
					literal = false;
				else
					checkLiteral();
			else
				switch (format.charAt(iFormat)) {
					case 'd':
						day = getNumber('d');
						break;
					case 'D':
						getName('D', dayNamesShort, dayNames);
						break;
					case 'o':
						doy = getNumber('o');
						break;
					case 'm':
						month = getNumber('m');
						break;
					case 'M':
						month = getName('M', monthNamesShort, monthNames);
						break;
					case 'y':
						year = getNumber('y');
						break;
					case '@':
						var date = new Date(getNumber('@'));
						year = date.getFullYear();
						month = date.getMonth() + 1;
						day = date.getDate();
						break;
					case "'":
						if (lookAhead("'"))
							checkLiteral();
						else
							literal = true;
						break;
					default:
						checkLiteral();
				}
		}
		if (year == -1)
			year = new Date().getFullYear();
		else if (year < 100)
			year += new Date().getFullYear() - new Date().getFullYear() % 100 +
			(year <= shortYearCutoff ? 0 : -100);
		if (doy > -1) {
			month = 1;
			day = doy;
			do {
				var dim = this._getDaysInMonth(year, month - 1);
				if (day <= dim)
					break;
				month++;
				day -= dim;
			} while (true);
		}
		var date = this._daylightSavingAdjust(new Date(year, month - 1, day));
		if (date.getFullYear() != year || date.getMonth() + 1 != month || date.getDate() != day)
			throw 'Invalid date'; // E.g. 31/02/*
		return date;
	},

	/* Standard date formats. */
	ATOM: 'yy-mm-dd', // RFC 3339 (ISO 8601)
	COOKIE: 'D, dd M yy',
	ISO_8601: 'yy-mm-dd',
	RFC_822: 'D, d M y',
	RFC_850: 'DD, dd-M-y',
	RFC_1036: 'D, d M y',
	RFC_1123: 'D, d M yy',
	RFC_2822: 'D, d M yy',
	RSS: 'D, d M y', // RFC 822
	TIMESTAMP: '@',
	W3C: 'yy-mm-dd', // ISO 8601

	/* Format a date object into a string value.
	   The format can be combinations of the following:
	   d  - day of month (no leading zero)
	   dd - day of month (two digit)
	   o  - day of year (no leading zeros)
	   oo - day of year (three digit)
	   D  - day name short
	   DD - day name long
	   m  - month of year (no leading zero)
	   mm - month of year (two digit)
	   M  - month name short
	   MM - month name long
	   y  - year (two digit)
	   yy - year (four digit)
	   @ - Unix timestamp (ms since 01/01/1970)
	   '...' - literal text
	   '' - single quote

	   @param  format    string - the desired format of the date
	   @param  date      Date - the date value to format
	   @param  settings  Object - attributes include:
	                     dayNamesShort    string[7] - abbreviated names of the days from Sunday (optional)
	                     dayNames         string[7] - names of the days from Sunday (optional)
	                     monthNamesShort  string[12] - abbreviated names of the months (optional)
	                     monthNames       string[12] - names of the months (optional)
	   @return  string - the date in the above format */
	formatDate: function (format, date, settings) {
		if (!date)
			return '';
		var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
		var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
		var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
		var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
		// Check whether a format character is doubled
		var lookAhead = function(match) {
			var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
			if (matches)
				iFormat++;
			return matches;
		};
		// Format a number, with leading zero if necessary
		var formatNumber = function(match, value, len) {
			var num = '' + value;
			if (lookAhead(match))
				while (num.length < len)
					num = '0' + num;
			return num;
		};
		// Format a name, short or long as requested
		var formatName = function(match, value, shortNames, longNames) {
			return (lookAhead(match) ? longNames[value] : shortNames[value]);
		};
		var output = '';
		var literal = false;
		if (date)
			for (var iFormat = 0; iFormat < format.length; iFormat++) {
				if (literal)
					if (format.charAt(iFormat) == "'" && !lookAhead("'"))
						literal = false;
					else
						output += format.charAt(iFormat);
				else
					switch (format.charAt(iFormat)) {
						case 'd':
							output += formatNumber('d', date.getDate(), 2);
							break;
						case 'D':
							output += formatName('D', date.getDay(), dayNamesShort, dayNames);
							break;
						case 'o':
							var doy = date.getDate();
							for (var m = date.getMonth() - 1; m >= 0; m--)
								doy += this._getDaysInMonth(date.getFullYear(), m);
							output += formatNumber('o', doy, 3);
							break;
						case 'm':
							output += formatNumber('m', date.getMonth() + 1, 2);
							break;
						case 'M':
							output += formatName('M', date.getMonth(), monthNamesShort, monthNames);
							break;
						case 'y':
							output += (lookAhead('y') ? date.getFullYear() :
								(date.getYear() % 100 < 10 ? '0' : '') + date.getYear() % 100);
							break;
						case '@':
							output += date.getTime();
							break;
						case "'":
							if (lookAhead("'"))
								output += "'";
							else
								literal = true;
							break;
						default:
							output += format.charAt(iFormat);
					}
			}
		return output;
	},

	/* Extract all possible characters from the date format. */
	_possibleChars: function (format) {
		var chars = '';
		var literal = false;
		for (var iFormat = 0; iFormat < format.length; iFormat++)
			if (literal)
				if (format.charAt(iFormat) == "'" && !lookAhead("'"))
					literal = false;
				else
					chars += format.charAt(iFormat);
			else
				switch (format.charAt(iFormat)) {
					case 'd': case 'm': case 'y': case '@':
						chars += '0123456789';
						break;
					case 'D': case 'M':
						return null; // Accept anything
					case "'":
						if (lookAhead("'"))
							chars += "'";
						else
							literal = true;
						break;
					default:
						chars += format.charAt(iFormat);
				}
		return chars;
	},

	/* Get a setting value, defaulting if necessary. */
	_get: function(inst, name) {
		return inst.settings[name] !== undefined ?
		inst.settings[name] : this._defaults[name];
	},

	/* Parse existing date and initialise date picker. */
	_setDateFromField: function(inst) {
		var dateFormat = this._get(inst, 'dateFormat');
		var dates = inst.input ? inst.input.val() : null;
		inst.endDay = inst.endMonth = inst.endYear = null;
		var date = defaultDate = this._getDefaultDate(inst);
		var settings = this._getFormatConfig(inst);
		try {
			date = this.parseDate(dateFormat, dates, settings) || defaultDate;
		} catch (event) {
			this.log(event);
			date = defaultDate;
		}
		inst.selectedDay = date.getDate();
		inst.drawMonth = inst.selectedMonth = date.getMonth();
		inst.drawYear = inst.selectedYear = date.getFullYear();
		inst.currentDay = (dates ? date.getDate() : 0);
		inst.currentMonth = (dates ? date.getMonth() : 0);
		inst.currentYear = (dates ? date.getFullYear() : 0);
		this._adjustInstDate(inst);
	},

	/* Retrieve the default date shown on opening. */
	_getDefaultDate: function(inst) {
		var date = this._determineDate(this._get(inst, 'defaultDate'), new Date());
		var minDate = this._getMinMaxDate(inst, 'min', true);
		var maxDate = this._getMinMaxDate(inst, 'max');
		date = (minDate && date < minDate ? minDate : date);
		date = (maxDate && date > maxDate ? maxDate : date);
		return date;
	},

	/* A date may be specified as an exact value or a relative one. */
	_determineDate: function(date, defaultDate) {
		var offsetNumeric = function(offset) {
			var date = new Date();
			date.setDate(date.getDate() + offset);
			return date;
		};
		var offsetString = function(offset, getDaysInMonth) {
			var date = new Date();
			var year = date.getFullYear();
			var month = date.getMonth();
			var day = date.getDate();
			var pattern = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;
			var matches = pattern.exec(offset);
			while (matches) {
				switch (matches[2] || 'd') {
					case 'd' : case 'D' :
						day += parseInt(matches[1],10);
						break;
					case 'w' : case 'W' :
						day += parseInt(matches[1],10) * 7;
						break;
					case 'm' : case 'M' :
						month += parseInt(matches[1],10);
						day = Math.min(day, getDaysInMonth(year, month));
						break;
					case 'y': case 'Y' :
						year += parseInt(matches[1],10);
						day = Math.min(day, getDaysInMonth(year, month));
						break;
				}
				matches = pattern.exec(offset);
			}
			return new Date(year, month, day);
		};
		date = (date == null ? defaultDate :
			(typeof date == 'string' ? offsetString(date, this._getDaysInMonth) :
				(typeof date == 'number' ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : date)));
		date = (date && date.toString() == 'Invalid Date' ? defaultDate : date);
		if (date) {
			date.setHours(0);
			date.setMinutes(0);
			date.setSeconds(0);
			date.setMilliseconds(0);
		}
		return this._daylightSavingAdjust(date);
	},

	/* Handle switch to/from daylight saving.
	   Hours may be non-zero on daylight saving cut-over:
	   > 12 when midnight changeover, but then cannot generate
	   midnight datetime, so jump to 1AM, otherwise reset.
	   @param  date  (Date) the date to check
	   @return  (Date) the corrected date */
	_daylightSavingAdjust: function(date) {
		if (!date) return null;
		date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
		return date;
	},

	/* Set the date(s) directly. */
	_setDate: function(inst, date, endDate) {
		var clear = !(date);
		var origMonth = inst.selectedMonth;
		var origYear = inst.selectedYear;
		date = this._determineDate(date, new Date());
		inst.selectedDay = inst.currentDay = date.getDate();
		inst.drawMonth = inst.selectedMonth = inst.currentMonth = date.getMonth();
		inst.drawYear = inst.selectedYear = inst.currentYear = date.getFullYear();
		if (origMonth != inst.selectedMonth || origYear != inst.selectedYear)
			this._notifyChange(inst);
		this._adjustInstDate(inst);
		if (inst.input) {
			inst.input.val(clear ? '' : this._formatDate(inst));
		}
	},

	/* Retrieve the date(s) directly. */
	_getDate: function(inst) {
		var startDate = (!inst.currentYear || (inst.input && inst.input.val() == '') ? null :
			this._daylightSavingAdjust(new Date(
				inst.currentYear, inst.currentMonth, inst.currentDay)));
		return startDate;
	},

	/* Generate the HTML for the current state of the date picker. */
	_generateHTML: function(inst) {
		var today = new Date();
		today = this._daylightSavingAdjust(
			new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time
		var isRTL = this._get(inst, 'isRTL');
		var showButtonPanel = this._get(inst, 'showButtonPanel');
		var hideIfNoPrevNext = this._get(inst, 'hideIfNoPrevNext');
		var navigationAsDateFormat = this._get(inst, 'navigationAsDateFormat');
		var numMonths = this._getNumberOfMonths(inst);
		var showCurrentAtPos = this._get(inst, 'showCurrentAtPos');
		var stepMonths = this._get(inst, 'stepMonths');
		var stepBigMonths = this._get(inst, 'stepBigMonths');
		var isMultiMonth = (numMonths[0] != 1 || numMonths[1] != 1);
		var currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
			new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
		var minDate = this._getMinMaxDate(inst, 'min', true);
		var maxDate = this._getMinMaxDate(inst, 'max');
		var drawMonth = inst.drawMonth - showCurrentAtPos;
		var drawYear = inst.drawYear;
		if (drawMonth < 0) {
			drawMonth += 12;
			drawYear--;
		}
		if (maxDate) {
			var maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
				maxDate.getMonth() - numMonths[1] + 1, maxDate.getDate()));
			maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
			while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
				drawMonth--;
				if (drawMonth < 0) {
					drawMonth = 11;
					drawYear--;
				}
			}
		}
		inst.drawMonth = drawMonth;
		inst.drawYear = drawYear;
		var prevText = this._get(inst, 'prevText');
		prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
			this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
			this._getFormatConfig(inst)));
		var prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
			'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#' + inst.id + '\', -' + stepMonths + ', \'M\');"' +
			' title="' + prevText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>' :
			(hideIfNoPrevNext ? '' : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+ prevText +'"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>'));
		var nextText = this._get(inst, 'nextText');
		nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
			this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
			this._getFormatConfig(inst)));
		var next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
			'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#' + inst.id + '\', +' + stepMonths + ', \'M\');"' +
			' title="' + nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>' :
			(hideIfNoPrevNext ? '' : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+ nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>'));
		var currentText = this._get(inst, 'currentText');
		var gotoDate = (this._get(inst, 'gotoCurrent') && inst.currentDay ? currentDate : today);
		currentText = (!navigationAsDateFormat ? currentText :
			this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
		var controls = (!inst.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">' + this._get(inst, 'closeText') + '</button>' : '');
		var buttonPanel = (showButtonPanel) ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (isRTL ? controls : '') +
		(this._isInRange(inst, gotoDate) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#' + inst.id + '\');"' +
			'>' + currentText + '</button>' : '') + (isRTL ? '' : controls) + '</div>' : '';
		var firstDay = parseInt(this._get(inst, 'firstDay'),10);
		firstDay = (isNaN(firstDay) ? 0 : firstDay);
		var dayNames = this._get(inst, 'dayNames');
		var dayNamesShort = this._get(inst, 'dayNamesShort');
		var dayNamesMin = this._get(inst, 'dayNamesMin');
		var monthNames = this._get(inst, 'monthNames');
		var monthNamesShort = this._get(inst, 'monthNamesShort');
		var beforeShowDay = this._get(inst, 'beforeShowDay');
		var showOtherMonths = this._get(inst, 'showOtherMonths');
		var calculateWeek = this._get(inst, 'calculateWeek') || this.iso8601Week;
		var endDate = inst.endDay ? this._daylightSavingAdjust(
			new Date(inst.endYear, inst.endMonth, inst.endDay)) : currentDate;
		var defaultDate = this._getDefaultDate(inst);
		var html = '';
		for (var row = 0; row < numMonths[0]; row++) {
			var group = '';
			for (var col = 0; col < numMonths[1]; col++) {
				var selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
				var cornerClass = ' ui-corner-all';
				var calender = '';
				if (isMultiMonth) {
					calender += '<div class="ui-datepicker-group ui-datepicker-group-';
					switch (col) {
						case 0:
							calender += 'first';
							cornerClass = ' ui-corner-' + (isRTL ? 'right' : 'left');
							break;
						case numMonths[1]-1:
							calender += 'last';
							cornerClass = ' ui-corner-' + (isRTL ? 'left' : 'right');
							break;
						default:
							calender += 'middle';
							cornerClass = '';
							break;
					}
					calender += '">';
				}
				calender += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + cornerClass + '">' +
				(/all|left/.test(cornerClass) && row == 0 ? (isRTL ? next : prev) : '') +
				(/all|right/.test(cornerClass) && row == 0 ? (isRTL ? prev : next) : '') +
				this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
					selectedDate, row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers
				'</div><table class="ui-datepicker-calendar"><thead>' +
				'<tr>';
				var thead = '';
				for (var dow = 0; dow < 7; dow++) { // days of the week
					var day = (dow + firstDay) % 7;
					thead += '<th' + ((dow + firstDay + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : '') + '>' +
					'<span title="' + dayNames[day] + '">' + dayNamesMin[day] + '</span></th>';
				}
				calender += thead + '</tr></thead><tbody>';
				var daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
				if (drawYear == inst.selectedYear && drawMonth == inst.selectedMonth)
					inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
				var leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
				var numRows = (isMultiMonth ? 6 : Math.ceil((leadDays + daysInMonth) / 7)); // calculate the number of rows to generate
				var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
				for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows
					calender += '<tr>';
					var tbody = '';
					for (var dow = 0; dow < 7; dow++) { // create date picker days
						var daySettings = (beforeShowDay ?
							beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, '']);
						var otherMonth = (printDate.getMonth() != drawMonth);
						var unselectable = otherMonth || !daySettings[0] ||
						(minDate && printDate < minDate) || (maxDate && printDate > maxDate);
						tbody += '<td class="' +
						((dow + firstDay + 6) % 7 >= 5 ? ' ui-datepicker-week-end' : '') + // highlight weekends
						(otherMonth ? ' ui-datepicker-other-month' : '') + // highlight days from other months
						((printDate.getTime() == selectedDate.getTime() && drawMonth == inst.selectedMonth && inst._keyEvent) || // user pressed key
							(defaultDate.getTime() == printDate.getTime() && defaultDate.getTime() == selectedDate.getTime()) ?
							// or defaultDate is current printedDate and defaultDate is selectedDate
							' ' + this._dayOverClass : '') + // highlight selected day
						(unselectable ? ' ' + this._unselectableClass + ' ui-state-disabled': '') +  // highlight unselectable days
						(otherMonth && !showOtherMonths ? '' : ' ' + daySettings[1] + // highlight custom dates
							(printDate.getTime() >= currentDate.getTime() && printDate.getTime() <= endDate.getTime() ? // in current range
								' ' + this._currentClass : '') + // highlight selected day
							(printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different)
						((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title
						(unselectable ? '' : ' onclick="DP_jQuery.datepicker._selectDay(\'#' +
							inst.id + '\',' + drawMonth + ',' + drawYear + ', this);return false;"') + '>' + // actions
						(otherMonth ? (showOtherMonths ? printDate.getDate() : '&#xa0;') : // display for other months
							(unselectable ? '<span class="ui-state-default">' + printDate.getDate() + '</span>' : '<a class="ui-state-default' +
								(printDate.getTime() == today.getTime() ? ' ui-state-highlight' : '') +
								(printDate.getTime() >= currentDate.getTime() && printDate.getTime() <= endDate.getTime() ? // in current range
									' ui-state-active' : '') + // highlight selected day
								'" href="#">' + printDate.getDate() + '</a>')) + '</td>'; // display for this month
						printDate.setDate(printDate.getDate() + 1);
						printDate = this._daylightSavingAdjust(printDate);
					}
					calender += tbody + '</tr>';
				}
				drawMonth++;
				if (drawMonth > 11) {
					drawMonth = 0;
					drawYear++;
				}
				calender += '</tbody></table>' + (isMultiMonth ? '</div>' +
					((numMonths[0] > 0 && col == numMonths[1]-1) ? '<div class="ui-datepicker-row-break"></div>' : '') : '');
				group += calender;
			}
			html += group;
		}
		html += buttonPanel + ($.browser.msie && parseInt($.browser.version,10) < 7 && !inst.inline ?
			'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : '');
		inst._keyEvent = false;
		return html;
	},

	/* Generate the month and year header. */
	_generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
		selectedDate, secondary, monthNames, monthNamesShort) {
		minDate = (inst.rangeStart && minDate && selectedDate < minDate ? selectedDate : minDate);
		var changeMonth = this._get(inst, 'changeMonth');
		var changeYear = this._get(inst, 'changeYear');
		var showMonthAfterYear = this._get(inst, 'showMonthAfterYear');
		var html = '<div class="ui-datepicker-title">';
		var monthHtml = '';
		// month selection
		if (secondary || !changeMonth)
			monthHtml += '<span class="ui-datepicker-month">' + monthNames[drawMonth] + '</span> ';
		else {
			var inMinYear = (minDate && minDate.getFullYear() == drawYear);
			var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear);
			monthHtml += '<select class="ui-datepicker-month" ' +
			'onchange="DP_jQuery.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'M\');" ' +
			'onclick="DP_jQuery.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
			'>';
			for (var month = 0; month < 12; month++) {
				if ((!inMinYear || month >= minDate.getMonth()) &&
					(!inMaxYear || month <= maxDate.getMonth()))
					monthHtml += '<option value="' + month + '"' +
					(month == drawMonth ? ' selected="selected"' : '') +
					'>' + monthNamesShort[month] + '</option>';
			}
			monthHtml += '</select>';
		}
		if (!showMonthAfterYear)
			html += monthHtml + ((secondary || changeMonth || changeYear) && (!(changeMonth && changeYear)) ? '&#xa0;' : '');
		// year selection
		if (secondary || !changeYear)
			html += '<span class="ui-datepicker-year">' + drawYear + '</span>';
		else {
			// determine range of years to display
			var years = this._get(inst, 'yearRange').split(':');
			var year = 0;
			var endYear = 0;
			if (years.length != 2) {
				year = drawYear - 10;
				endYear = drawYear + 10;
			} else if (years[0].charAt(0) == '+' || years[0].charAt(0) == '-') {
				year = drawYear + parseInt(years[0], 10);
				endYear = drawYear + parseInt(years[1], 10);
			} else {
				year = parseInt(years[0], 10);
				endYear = parseInt(years[1], 10);
			}
			year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
			endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
			html += '<select class="ui-datepicker-year" ' +
			'onchange="DP_jQuery.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'Y\');" ' +
			'onclick="DP_jQuery.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
			'>';
			for (; year <= endYear; year++) {
				html += '<option value="' + year + '"' +
				(year == drawYear ? ' selected="selected"' : '') +
				'>' + year + '</option>';
			}
			html += '</select>';
		}
		if (showMonthAfterYear)
			html += (secondary || changeMonth || changeYear ? '&#xa0;' : '') + monthHtml;
		html += '</div>'; // Close datepicker_header
		return html;
	},

	/* Adjust one of the date sub-fields. */
	_adjustInstDate: function(inst, offset, period) {
		var year = inst.drawYear + (period == 'Y' ? offset : 0);
		var month = inst.drawMonth + (period == 'M' ? offset : 0);
		var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) +
		(period == 'D' ? offset : 0);
		var date = this._daylightSavingAdjust(new Date(year, month, day));
		// ensure it is within the bounds set
		var minDate = this._getMinMaxDate(inst, 'min', true);
		var maxDate = this._getMinMaxDate(inst, 'max');
		date = (minDate && date < minDate ? minDate : date);
		date = (maxDate && date > maxDate ? maxDate : date);
		inst.selectedDay = date.getDate();
		inst.drawMonth = inst.selectedMonth = date.getMonth();
		inst.drawYear = inst.selectedYear = date.getFullYear();
		if (period == 'M' || period == 'Y')
			this._notifyChange(inst);
	},

	/* Notify change of month/year. */
	_notifyChange: function(inst) {
		var onChange = this._get(inst, 'onChangeMonthYear');
		if (onChange)
			onChange.apply((inst.input ? inst.input[0] : null),
				[inst.selectedYear, inst.selectedMonth + 1, inst]);
	},

	/* Determine the number of months to show. */
	_getNumberOfMonths: function(inst) {
		var numMonths = this._get(inst, 'numberOfMonths');
		return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths));
	},

	/* Determine the current maximum date - ensure no time components are set - may be overridden for a range. */
	_getMinMaxDate: function(inst, minMax, checkRange) {
		var date = this._determineDate(this._get(inst, minMax + 'Date'), null);
		return (!checkRange || !inst.rangeStart ? date :
			(!date || inst.rangeStart > date ? inst.rangeStart : date));
	},

	/* Find the number of days in a given month. */
	_getDaysInMonth: function(year, month) {
		return 32 - new Date(year, month, 32).getDate();
	},

	/* Find the day of the week of the first of a month. */
	_getFirstDayOfMonth: function(year, month) {
		return new Date(year, month, 1).getDay();
	},

	/* Determines if we should allow a "next/prev" month display change. */
	_canAdjustMonth: function(inst, offset, curYear, curMonth) {
		var numMonths = this._getNumberOfMonths(inst);
		var date = this._daylightSavingAdjust(new Date(
			curYear, curMonth + (offset < 0 ? offset : numMonths[1]), 1));
		if (offset < 0)
			date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
		return this._isInRange(inst, date);
	},

	/* Is the given date in the accepted range? */
	_isInRange: function(inst, date) {
		// during range selection, use minimum of selected date and range start
		var newMinDate = (!inst.rangeStart ? null : this._daylightSavingAdjust(
			new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay)));
		newMinDate = (newMinDate && inst.rangeStart < newMinDate ? inst.rangeStart : newMinDate);
		var minDate = newMinDate || this._getMinMaxDate(inst, 'min');
		var maxDate = this._getMinMaxDate(inst, 'max');
		return ((!minDate || date >= minDate) && (!maxDate || date <= maxDate));
	},

	/* Provide the configuration settings for formatting/parsing. */
	_getFormatConfig: function(inst) {
		var shortYearCutoff = this._get(inst, 'shortYearCutoff');
		shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
			new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
		return {
			shortYearCutoff: shortYearCutoff,
			dayNamesShort: this._get(inst, 'dayNamesShort'), 
			dayNames: this._get(inst, 'dayNames'),
			monthNamesShort: this._get(inst, 'monthNamesShort'), 
			monthNames: this._get(inst, 'monthNames')
			};
	},

	/* Format the given date for display. */
	_formatDate: function(inst, day, month, year) {
		if (!day) {
			inst.currentDay = inst.selectedDay;
			inst.currentMonth = inst.selectedMonth;
			inst.currentYear = inst.selectedYear;
		}
		var date = (day ? (typeof day == 'object' ? day :
			this._daylightSavingAdjust(new Date(year, month, day))) :
		this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
		return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst));
	}
});

/* jQuery extend now ignores nulls! */
function extendRemove(target, props) {
	$.extend(target, props);
	for (var name in props)
		if (props[name] == null || props[name] == undefined)
			target[name] = props[name];
	return target;
};

/* Determine whether an object is an array. */
function isArray(a) {
	return (a && (($.browser.safari && typeof a == 'object' && a.length) ||
		(a.constructor && a.constructor.toString().match(/\Array\(\)/))));
};

/* Invoke the datepicker functionality.
   @param  options  string - a command, optionally followed by additional parameters or
                    Object - settings for attaching new datepicker functionality
   @return  jQuery object */
$.fn.datepicker = function(options){

	/* Initialise the date picker. */
	if (!$.datepicker.initialized) {
		$(document).mousedown($.datepicker._checkExternalClick).
		find('body').append($.datepicker.dpDiv);
		$.datepicker.initialized = true;
	}

	var otherArgs = Array.prototype.slice.call(arguments, 1);
	if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate'))
		return $.datepicker['_' + options + 'Datepicker'].
		apply($.datepicker, [this[0]].concat(otherArgs));
	if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string')
		return $.datepicker['_' + options + 'Datepicker'].
		apply($.datepicker, [this[0]].concat(otherArgs));
	return this.each(function() {
		typeof options == 'string' ?
		$.datepicker['_' + options + 'Datepicker'].
		apply($.datepicker, [this].concat(otherArgs)) :
		$.datepicker._attachDatepicker(this, options);
	});
};

$.datepicker = new Datepicker(); // singleton instance
	$.datepicker.initialized = false;
	$.datepicker.uuid = new Date().getTime();
	$.datepicker.version = "1.7.2";

	// Workaround for #4055
	// Add another global to avoid noConflict issues with inline event handlers
	window.DP_jQuery = $;

})(jQuery);
(function(A){
	A.jScrollPane={
		active:[]
	};
	
	A.fn.jScrollPane=function(C){
		C=A.extend({},A.fn.jScrollPane.defaults,C);
		var B=function(){
			return false
			};
			
		return this.each(function(){
			var O=A(this);
			O.css("overflow","hidden");
			var X=this;
			if(A(this).parent().is(".jScrollPaneContainer")){
				var Ac=C.maintainPosition?O.position().top:0;
				var L=A(this).parent();
				var d=L.innerWidth();
				var Ad=L.outerHeight();
				var M=Ad;
				A(">.jScrollPaneTrack, >.jScrollArrowUp, >.jScrollArrowDown",L).remove();
				O.css({
					top:0
				})
				}else{
				var Ac=0;
				this.originalPadding=O.css("paddingTop")+" "+O.css("paddingRight")+" "+O.css("paddingBottom")+" "+O.css("paddingLeft");
				this.originalSidePaddingTotal=(parseInt(O.css("paddingLeft"))||0)+(parseInt(O.css("paddingRight"))||0);
				var d=O.innerWidth();
				var Ad=O.innerHeight();
				var M=Ad;
				O.wrap(A("<div></div>").attr({
					className:"jScrollPaneContainer"
				}).css({
					height:Ad+"px",
					width:d+"px"
					}));
				A(document).bind("emchange",function(Ae,Af,p){
					O.jScrollPane(C)
					})
				}
				if(C.reinitialiseOnImageLoad){
				var N=A.data(X,"jScrollPaneImagesToLoad")||A("img",O);
				var G=[];
				if(N.length){
					N.each(function(p,Ae){
						A(this).bind("load",function(){
							if(A.inArray(p,G)==-1){
								G.push(Ae);
								N=A.grep(N,function(Ag,Af){
									return Ag!=Ae
									});
								A.data(X,"jScrollPaneImagesToLoad",N);
								C.reinitialiseOnImageLoad=false;
								O.jScrollPane(C)
								}
							}).each(function(Af,Ag){
						if(this.complete||this.complete===undefined){
							this.src=this.src
							}
						})
					})
			}
		}
		var o=this.originalSidePaddingTotal;
	var l={
		height:"auto",
		width:d-C.scrollbarWidth-C.scrollbarMargin-o+"px"
		};
		
	if(C.scrollbarOnLeft){
		l.paddingLeft=C.scrollbarMargin+C.scrollbarWidth+"px"
		}else{
		l.paddingRight=C.scrollbarMargin+"px"
		}
		O.css(l);
	var m=O.outerHeight();
	var i=Ad/m;
	if(i<0.99){
		var H=O.parent();
		H.append(A("<div></div>").attr({
			className:"jScrollPaneTrack"
		}).css({
			width:C.scrollbarWidth+"px"
			}).append(A("<div></div>").attr({
			className:"jScrollPaneDrag"
		}).css({
			width:(C.scrollbarWidth-C.borderCorrecture)+"px"
			}).append(A("<div></div>").attr({
			className:"jScrollPaneDragTop"
		}).css({
			width:C.scrollbarWidth+"px"
			}),A("<div></div>").attr({
			className:"jScrollPaneDragBottom"
		}).css({
			width:C.scrollbarWidth+"px"
			}))));
		var z=A(">.jScrollPaneTrack",H);
		var P=A(">.jScrollPaneTrack .jScrollPaneDrag",H);
		if(C.showArrows){
			var g;
			var Ab;
			var S;
			var r;
			var j=function(){
				if(r>4||r%4==0){
					y(u+Ab*b)
					}
					r++
			};
			
			var K=function(p){
				A("html").unbind("mouseup",K);
				g.removeClass("jScrollActiveArrowButton");
				clearInterval(S)
				};
				
			var Z=function(){
				A("html").bind("mouseup",K);
				g.addClass("jScrollActiveArrowButton");
				r=0;
				j();
				S=setInterval(j,100)
				};
				
			H.append(A("<a></a>").attr({
				href:"javascript:;",
				className:"jScrollArrowUp"
			}).css({
				width:(C.scrollbarWidth + C.borderCorrecture)+"px"
				}).html("Scroll up").bind("mousedown",function(){
				g=A(this);
				Ab=-1;
				Z();
				this.blur();
				return false
				}).bind("click",B),A("<a></a>").attr({
				href:"javascript:;",
				className:"jScrollArrowDown"
			}).css({
				width:(C.scrollbarWidth + C.borderCorrecture)+"px"
				}).html("Scroll down").bind("mousedown",function(){
				g=A(this);
				Ab=1;
				Z();
				this.blur();
				return false
				}).bind("click",B));
			var Q=A(">.jScrollArrowUp",H);
			var J=A(">.jScrollArrowDown",H);
			if(C.arrowSize){
				M=Ad-C.arrowSize-C.arrowSize;
				z.css({
					height:M+"px",
					top:C.arrowSize+"px"
					})
				}else{
				var s=Q.height();
				C.arrowSize=s;
				M=Ad-s-J.height();
				z.css({
					height:M+"px",
					top:s+"px"
					})
				}
			}
		var w=A(this).css({
		position:"absolute",
		overflow:"visible"
	});
	var D;
	var Y;
	var b;
	var u=0;
	var V=i*Ad/2;
	var a=function(Ae,Ag){
		var Af=Ag=="X"?"Left":"Top";
		return Ae["page"+Ag]||(Ae["client"+Ag]+(document.documentElement["scroll"+Af]||document.body["scroll"+Af]))||0
		};
		
	var f=function(){
		return false
		};
		
	var v=function(){
		n();
		D=P.offset(false);
		D.top-=u;
		Y=M-P[0].offsetHeight;
		b=2*C.wheelSpeed*Y/m
		};
		
	var E=function(p){
		v();
		V=a(p,"Y")-u-D.top;
		A("html").bind("mouseup",T).bind("mousemove",h);
		if(A.browser.msie){
			A("html").bind("dragstart",f).bind("selectstart",f)
			}
			return false
		};
		
	var T=function(){
		A("html").unbind("mouseup",T).unbind("mousemove",h);
		V=i*Ad/2;
		if(A.browser.msie){
			A("html").unbind("dragstart",f).unbind("selectstart",f)
			}
		};
	
var y=function(Ae){
	Ae=Ae<0?0:(Ae>Y?Y:Ae);
	u=Ae;
	P.css({
		top:Ae+"px"
		});
	var Af=Ae/Y;
	w.css({
		top:((Ad-m)*Af)+"px"
		});
	O.trigger("scroll");
	if(C.showArrows){
		Q[Ae==0?"addClass":"removeClass"]("disabled");
		J[Ae==Y?"addClass":"removeClass"]("disabled")
		}
	};

var h=function(p){
	y(a(p,"Y")-D.top-V)
	};
	
var q=Math.max(Math.min(i*(Ad-C.arrowSize*2),C.dragMaxHeight),C.dragMinHeight);
	P.css({
	height:q+"px"
	}).bind("mousedown",E);
	var k;
	var R;
	var I;
	var t=function(){
	if(R>8||R%4==0){
		y((u-((u-I)/2)))
		}
		R++
};

var Aa=function(){
	clearInterval(k);
	A("html").unbind("mouseup",Aa).unbind("mousemove",e)
	};
	
var e=function(p){
	I=a(p,"Y")-D.top-V
	};
	
var U=function(p){
	v();
	e(p);
	R=0;
	A("html").bind("mouseup",Aa).bind("mousemove",e);
	k=setInterval(t,100);
	t()
	};
	
z.bind("mousedown",U);
	var F;
	var W;
	function c(){
	var p=(F-u)/C.animateStep;
	if(p>1||p<-1){
		y(u+p)
		}else{
		y(F);
		n()
		}
	}
var n=function(){
	if(W){
		clearInterval(W);
		delete F
		}
	};

var x=function(Af,p){
	if(typeof Af=="string"){
		$e=A(Af,O);
		if(!$e.length){
			return
		}
		Af=$e.offset().top-O.offset().top
		}
		H.scrollTop(0);
	n();
	var Ae=-Af/(Ad-m)*Y;
	if(p||!C.animateTo){
		y(Ae)
		}else{
		F=Ae;
		W=setInterval(c,C.animateInterval)
		}
	};

O[0].scrollTo=x;
O[0].scrollBy=function(Ae){
	var p=-parseInt(w.css("top"))||0;
	x(p+Ae)
	};
	
v();
x(-Ac,true);
A("*",this).bind("focus",function(Ah){
	var Ag=A(this);
	var Aj=0;
	while(Ag[0]!=O[0]){
		Aj+=Ag.position().top;
		Ag=Ag.offsetParent()
		}
		var p=-parseInt(w.css("top"))||0;
	var Ai=p+Ad;
	var Af=Aj>p&&Aj<Ai;
	if(!Af){
		var Ae=Aj-C.scrollbarMargin;
		if(Aj>p){
			Ae+=A(this).height()+15+C.scrollbarMargin-Ad
			}
			x(Ae)
		}
	});
if(location.hash){
	x(location.hash)
	}
	A(document).bind("click",function(Ae){
	$target=A(Ae.target);
	if($target.is("a")){
		var p=$target.attr("href");
		if(p.substr(0,1)=="#"){
			x(p)
			}
		}
});
A.jScrollPane.active.push(O[0])
}else{
	O.css({
		height:Ad+"px",
		width:d-this.originalSidePaddingTotal+"px",
		padding:this.originalPadding
		});
	O.parent().unbind("mousewheel")
	}
})
};

A.fn.jScrollPane.defaults={
	scrollbarWidth:10,
	scrollbarMargin:5,
	wheelSpeed:18,
	showArrows:false,
	arrowSize:0,
	animateTo:false,
	dragMinHeight:1,
	dragMaxHeight:99999,
	animateInterval:100,
	animateStep:3,
	maintainPosition:true,
	scrollbarOnLeft:false,
	reinitialiseOnImageLoad:false, 
	borderCorrecture:0
};

A(window).bind("unload",function(){
	var C=A.jScrollPane.active;
	for(var B=0;B<C.length;B++){
		C[B].scrollTo=C[B].scrollBy=null
		}
	})
})(jQuery);﻿/* German initialisation for the jQuery UI date picker plugin. */
/* Written by Milian Wolff (mail@milianw.de). */
jQuery(function($){
	$.datepicker.regional['de'] = {
		closeText: 'schließen',
		prevText: '',
		nextText: '',
		currentText: 'heute',
		monthNames: ['Januar','Februar','März','April','Mai','Juni',
		'Juli','August','September','Oktober','November','Dezember'],
		monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
		'Jul','Aug','Sep','Okt','Nov','Dez'],
		dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
		dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
		dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
		dateFormat: 'dd.mm.yy', 
		firstDay: 1,
		isRTL: false
	};
	$.datepicker.setDefaults($.datepicker.regional['de']);
});
/*
 * nyroModal - jQuery Plugin
 * http://nyromodal.nyrodev.com
 *
 * Copyright (c) 2010 Cedric Nirousset (nyrodev.com)
 * Licensed under the MIT license
 *
 * $Date: 2010-02-23 (Tue, 23 Feb 2010) $
 * $version: 1.6.2
 */
eval(function(p,a,c,k,e,r){
	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--)r[e(c)]=k[c]||e(c);
		k=[function(e){
			return r[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
	}('6o(k($){c 1F=6F.1F.2F();c 58=(1F.6i(/.+(?:7N|6h|7w|6g|44)[\\/: ]([\\d.]+)/)||[0,\'0\'])[1];c 26=(/44/.22(1F)&&!/6g/.22(1F)&&6b(58)<7&&(!14.67||3Z(67)===\'k\'));c U=$(\'U\');c 4;c 4X;c 32=m;c W={};c 2r=m;c 2g;c 30;c 5={3W:m,1N:m,1q:m,16:m,2p:m,1G:m,1r:m,1K:m,3V:m,1B:m,1g:D,2a:D,1n:D,15:D,P:D,j:D,l:D,N:D,C:D,3S:1S 2X(),3R:1S 2X()};c 1o={8:m,b:m,2K:m};c 1j={8:D,b:D,2K:p};c 4M;$.1C.K=k(f){6(!R)u m;u R.3Q(k(){c 3P=$(R);6(R.3k.2F()==\'23\'){3P.1D(\'4J.K\').1Y(\'4J.K\',k(e){6(e.5E())u m;6(3P.L(\'4H\'))u p;6(R.5A==\'5y/23-L\'){1O($.Q(f,{E:R}));u p}e.1U();1O($.Q(f,{E:R}));u m})}q{3P.1D(\'1u.K\').1Y(\'1u.K\',k(e){6(e.5E())u m;e.1U();1O($.Q(f,{E:R}));u m})}})};$.1C.3O=k(f){6(!R.1i)1O(f);u R.3Q(k(){1O($.Q(f,{E:R}))})};$.3O=k(f){1O(f)};$.3N=k(f,1m,28){Z(f,1m,28);6(!1m&&5.3W){6(5.15&&f.2Y)4.3L(5,4,k(){});6(5.C&&f.O)4v();6(!5.1B&&(f.2K||(!5.1K&&((\'8\'3I f&&f.8==4.8)||(\'b\'3I f&&f.b==4.b))))){5.1K=p;6(5.C)3H(p);6(5.C&&5.C.6C(\':4q\')&&!5.2p){6(2r)5.l.o({12:\'\'});4.2A(5,4,k(){4.2K=m;5.1K=m;6(2r)5.l.o({12:\'4n\'});6($.1J(4.4k))4.4k(5,4)})}}}};$.7J=k(){1V()};$.2B=k(){c 2D=2W(1);6(2D)u 2D.3O(2L());u m};$.2I=k(){c 2D=2W(-1);6(2D)u 2D.3O(2L());u m};$.1C.K.f={H:m,1g:m,6j:p,5:m,F:\'\',3G:D,E:\'\',34:\'\',4h:D,3c:\'7M\',3F:\'K\',l:D,2Y:\'#6y\',21:{},1e:{6U:\'7p\'},8:D,b:D,4b:2n,4a:5I,5H:p,5D:p,1l:25,5s:\'[^\\.]\\.(74|7b|7c|7d|7e|7l)\\s*$\',5h:m,54:\'51\',5d:p,5c:p,W:D,59:\'<a 1a="#" 11="2I">6W</a><a 1a="#"  11="2B">72</a>\',2t:2t,6d:m,33:1p,1b:{15:{12:\'36\',1E:\'2b\',1f:0,1h:0,b:\'1p%\',8:\'1p%\'},N:{12:\'36\',1f:\'50%\',1h:\'50%\'},3i:{},l:{},P:{12:\'36\',1f:\'50%\',1h:\'50%\',V:\'-3A\',S:\'-3A\'}},3m:{v:\'<v 11="N"></v>\',21:\'<v 11="N"></v>\',23:\'<v 11="N"></v>\',4Q:\'<v 11="N"></v>\',1v:\'<v 11="76"></v>\',1e:\'<v 11="7a"></v>\',B:\'<v 11="5u"></v>\',3x:\'<v 11="5u"></v>\',6f:\'<v 11="N"></v>\'},5a:\'<a 1a="#" 11="3w" 1d="7E" O="7I">5X</a>\',O:D,5Q:p,4r:\'.K\',3v:\'.3w\',5r:\'<a 1a="#" 11="3w">6A</a>\',5q:\'1B\',60:\'6I 6K l 6N 6Q 6T.<3u />6V 5C 6X 6Y.<3u /><a 1a="#" 11="3w">5X</a>\',4T:D,3t:3t,2v:2v,4N:D,3s:3s,2f:D,4u:D,3b:3b,3r:3r,3q:3q,3p:3p,3f:3f,2A:2A,4k:D,3L:3L,1Z:D};k 1O(f){6(5.1G||5.1r||5.16)u;H(\'1O\');5.3W=p;4X=$.Q(p,f);4Z(f);6(!5.1n)5.2a=5.1g=D;5.1B=m;5.3V=m;5.1q=m;5.3S=1S 2X();5.3R=1S 2X();4.F=5w();6(4.3G){6(!4.l)4.E=p;4.F=4.3G;4.3G=D}6($.1J(4.4h))4.4h(4);c E=4.E;c t=4.t;1j.8=4.8;1j.b=4.b;6(4.F==\'1e\'){Z({1E:\'4q\'},\'1b\',\'l\');4.l=\'<4S 7O="7T:7K-6p-6s-6t-6w" 8="\'+4.8+\'" b="\'+4.b+\'"><3o 1c="6B" 2H="\'+t+\'"></3o>\';c j=\'\';$.3Q(4.1e,k(1c,4l){4.l+=\'<3o 1c="\'+1c+\'" 2H="\'+4l+\'"></3o>\';j+=\' \'+1c+\'="\'+4l+\'"\'});4.l+=\'<4C 1k="\'+t+\'" F="6M/x-6O-6P" 8="\'+4.8+\'" b="\'+4.b+\'"\'+j+\'></4C></4S>\'}6(E){c X=$(E).6R();6(4.F==\'23\'){c L=$(E).6S();L.3h({1c:4.3F,2H:1});6(4.19)L.3h({1c:4.3c,2H:4.19.1Q(1)});1x();$.21($.Q({},4.21,{t:t,L:L,F:X.I(\'5j\')?X.I(\'5j\'):\'3a\',5Z:4m,1B:1t}));H(\'4D 5P 2w: \'+X.I(\'2u\'))}q 6(4.F==\'4Q\'){1L();X.I(\'2s\',\'2c\');X.I(\'2u\',t);X.2Z(\'<48 F="2b" 1c="\'+4.3F+\'" 2H="1" />\');6(4.19)X.2Z(\'<48 F="2b" 1c="\'+4.3c+\'" 2H="\'+4.19.1Q(1)+\'" />\');5.j.M(\'<B 4c="0" 4e="0" 1c="2c" 1k="2y:\\\'\\\';"></B>\');$(\'B\',5.j).o({8:4.8,b:4.b}).1B(1t).2o(4j);H(\'4D 6m 2w: \'+X.I(\'2u\'));1x();1z()}q 6(4.F==\'1v\'){H(\'51 2w: \'+t);c O=X.I(\'O\')||4.54;1L();5.j.M(\'<2U 1d="6r" />\').29(\'2U\').I(\'5R\',O);5.j.o({5S:0});$(\'2U\',5.j).1B(1t).2o(k(){H(\'51 6x: \'+R.1k);$(R).1D(\'2o\');c w=5.j.8();c h=5.j.b();5.j.o({5S:\'\'});1o.8=w;1o.b=h;Z({8:w,b:h,4x:w,4y:h});1j.8=w;1j.b=h;Z({1E:\'4q\'},\'1b\',\'l\');5.1q=p;6(5.1G||5.1r)1z()}).I(\'1k\',t);1x()}q 6(4.F==\'3x\'){1L();5.j.M(\'<B 4c="0" 4e="0" 1k="2y:\\\'\\\';" 1c="2c" 1d="2c"></B>\');H(\'6l 4D 2w: \'+t);$(\'B\',5.j).2P(0).o({8:\'1p%\',b:$.5b.5f?\'5g%\':\'1p%\'}).2o(4B);5.1q=p;1x()}q 6(4.F==\'B\'){1L();5.j.M(\'<B 4c="0" 4e="0" 1k="2y:\\\'\\\';" 1c="2c" 1d="2c"></B>\');H(\'6l 2w: \'+t);$(\'B\',5.j).2P(0).o({8:\'1p%\',b:$.5b.5f?\'5g%\':\'1p%\'}).2o(4B);5.1q=p;1x()}q 6(4.F){H(\'5n: \'+4.F);1L();5.j.M(4.l);c w=5.j.8();c h=5.j.b();c v=$(4.F);6(v.1i){Z({F:\'v\'});w=v.8();h=v.b();6(2g)30=2g;2g=v;5.j.1A(v.24())}1j.8=w;1j.b=h;Z({8:w,b:h});6(5.j.M())5.1q=p;q 1t();6(!5.1N)1x();q 2x()}q{H(\'5P 2w: \'+t);Z({F:\'21\'});c L=4.21.L||{};6(4.19){6(3Z L=="4E"){L+=\'&\'+4.3c+\'=\'+4.19.1Q(1)}q{L[4.3c]=4.19.1Q(1)}}1x();$.21($.Q(p,4.21,{t:t,5Z:4m,1B:1t,L:L}))}}q 6(4.l){H(\'5n: \'+4.F);Z({F:\'6f\'});1L();5.j.M($(\'<v/>\').M(4.l).24());6(5.j.M())5.1q=p;q 1t();1x()}q{}}k 4Z(f){H(\'4Z\');4=$.Q(p,{},$.1C.K.f,f);3y()}k Z(f,1m,28){6(5.3W){6(1m&&28){$.Q(p,4[1m][28],f)}q 6(1m){$.Q(p,4[1m],f)}q{6(5.2p){6(\'8\'3I f){6(!5.1K){f.4L=f.8;32=p}3z f[\'8\']}6(\'b\'3I f){6(!5.1K){f.4O=f.b;32=p}3z f[\'b\']}}$.Q(p,4,f)}}q{6(1m&&28){$.Q(p,$.1C.K.f[1m][28],f)}q 6(1m){$.Q(p,$.1C.K.f[1m],f)}q{$.Q(p,$.1C.K.f,f)}}}k 4P(){6(26&&!5.1g){6(1X.4R){4.2m=1X.4R.61;4.2i=1X.4R.3B}q{4.2m=1X.U.61;4.2i=1X.U.3B}}q{4.2m=0;4.2i=0}}k 3y(){4P();4.S=-(4.8+4.4U)/2;4.V=-(4.b+4.4Y)/2;6(!5.1g){4.S+=4.2m;4.V+=4.2i}}k 3C(){4P();c 1M=2C(5.P);4.2S=-(5.P.b()+1M.h.18+1M.h.1l)/2;4.2Q=-(5.P.8()+1M.w.18+1M.w.1l)/2;6(!5.1g){4.2Q+=4.2m;4.2S+=4.2i}}k 4v(){c O=$(\'55#5l\',5.C);6(O.1i)O.5m(4.O);q 5.C.2Z(\'<55 1d="5l">\'+4.O+\'</55>\')}k 1L(){H(\'1L\');6(!5.1n){6(4.H)Z({7P:\'7Q\'},\'1b\',\'15\');c 1n={2O:4.33,12:\'4n\',1f:0,1h:0,8:\'1p%\',b:\'1p%\'};c 46=U;c 47=\'\';6(4.1g){5.1g=46=$(4.1g);c 2N=5.1g.6q();c w=5.1g.5t();c h=5.1g.3D();6(26){Z({b:\'1p%\',8:\'1p%\',1f:0,1h:0},\'1b\',\'15\')}5.2a={1f:2N.1f,1h:2N.1h,8:w,b:h};c 5v=(/44/.22(1F)?0:17(U.3a(0),\'5x\'));c 5z=(/44/.22(1F)?0:17(U.3a(0),\'5B\'));1n={12:\'36\',1f:2N.1f+5v,1h:2N.1h+5z,8:w,b:h}}q 6(26){U.o({S:0,49:0});c w=U.8();c h=$(14).b()+\'G\';6($(14).b()>=U.3D()){h=U.3D()+\'G\'}q w+=20;w+=\'G\';U.o({8:w,b:h,12:\'6E\',1E:\'2b\'});$(\'M\').o({1E:\'2b\'});Z({1b:{15:{12:\'36\',2O:4.33+1,b:\'5G%\',8:\'5G%\',1f:4.2i+\'G\',1h:4.2m+\'G\'},N:{2O:4.33+2},P:{2O:4.33+3}}});47=$(\'<B 1d="6H" 1k="2y:\\\'\\\';"></B>\').o($.Q({},4.1b.15,{1s:0,2O:50,18:\'3l\'}))}46.1A($(\'<v 1d="5J"><v 1d="5K"></v><v 1d="5L"><v 1d="5M"></v></v><v 1d="5N"></v><v 1d="5O"></v></v>\').13());5.1n=$(\'#5J\').o(1n).2j();5.15=$(\'#5K\').o($.Q({3E:4.2Y},4.1b.15)).4d(47);5.15.1Y(\'1u.K\',5T);5.P=$(\'#5O\').o(4.1b.P).13();5.C=$(\'#5L\').o(4.1b.N).13();5.l=$(\'#5M\');5.j=$(\'#5N\').13();6($.1J($.1C.5V)){5.l.5V(k(e,d){c 35=5.l.3a(0);6((d>0&&35.3B==0)||(d<0&&35.6Z-35.3B==35.70)){e.1U();e.71()}})}$(1X).1Y(\'4f.K\',4g);5.l.o({8:\'1I\',b:\'1I\'});5.C.o({8:\'1I\',b:\'1I\'});6(!4.1g&&4.6j){$(14).1Y(\'2A.K\',k(){14.78(4M);4M=14.79(68,69)})}}}k 68(){$.3N(1j)}k 1x(){H(\'1x\');6(!5.1N){1L();5.16=p;4.3t(5,4,4i)}q{5.16=p;5.1r=p;4.3r(5,4,k(){2x();5.16=m;1z()})}}k 5T(e){6(!4.5)1V()}k 4g(e){6(e.31==27){6(!4.5)1V()}q 6(4.W&&5.1N&&5.1q&&!5.16&&!5.1r){6(e.31==39||e.31==40){e.1U();$.2B();u m}q 6(e.31==37||e.31==38){e.1U();$.2I();u m}}}k 5w(){c E=4.E;c t;6(E&&E.3k){c X=$(E);t=X.I(E.3k.2F()==\'23\'?\'2u\':\'1a\');6(!t)t=1P.1a.1Q(14.1P.7k.1i+7);4.t=t;6(X.I(\'6k\')==\'5\')4.5=p;4.O=X.I(\'O\');6(E&&E.1w&&E.1w.2F()!=\'7v\'){c 4K=E.1w.3n(\' \');4.W=4K>0?E.1w.7H(0,4K):E.1w}c 2G=4o(t,E);6(2G)u 2G;6(4p(t))u\'1e\';c B=m;6(E.2s&&E.2s.2F()==\'5e\'||(E.3e&&E.3e.2e(/:\\d*$/,\'\')!=14.1P.3e.2e(/:\\d*$/,\'\'))){B=p}6(E.3k.2F()==\'23\'){6(B)u\'3x\';Z(4s(t));6(X.I(\'5A\')==\'5y/23-L\')u\'4Q\';u\'23\'}6(B)u\'B\'}q{t=4.t;6(!4.l)4.E=p;6(!t)u D;6(4p(t))u\'1e\';c 5i=1S 4t("^5k://|6n://","g");6(t.6i(5i))u\'B\'}c 2G=4o(t,E);6(2G)u 2G;c j=4s(t);Z(j);6(!j.t)u j.19}k 4o(t,E){c 1v=1S 4t(4.5s,\'i\');6(1v.22(t)){u\'1v\'}}k 4p(t){c 1e=1S 4t(\'[^\\.]\\.(1e)\\s*$\',\'i\');u 1e.22(t)}k 4s(t){c J={t:D,19:D};6(t){c 34=4w(t);c 5o=4w(14.1P.1a);c 5p=14.1P.1a.1Q(0,14.1P.1a.1i-5o.1i);c 3J=t.1Q(0,t.1i-34.1i);6(3J==5p||3J==$(\'6u\').I(\'1a\')){J.19=34}q{J.t=3J;J.19=34}}u J}k 1t(){H(\'1t\');5.1B=p;6(!5.1N)u;6($.1J(4.4T))4.4T(5,4);5.P.6v(4.5q).M(4.60);$(4.3v,5.P).1D(\'1u.K\').1Y(\'1u.K\',1V);3C();5.P.o({V:4.2S+\'G\',S:4.2Q+\'G\'})}k 3K(){H(\'3K\');6(!5.j.M())u;5.l.M(5.j.24());5.j.4z();4A();6(4.F==\'3x\'){$(4.E).I(\'2s\',\'2c\').L(\'4H\',1).4J().I(\'2s\',\'5e\').6z(\'4H\')}6(!4.5)5.N.2Z(4.5a);6($.1J(4.4N))4.4N(5,4);5.l.1A(5.3S);$(4.3v,5.C).1D(\'1u.K\').1Y(\'1u.K\',1V);$(4.4r,5.C).K(2L())}k 2L(){u 4X;c 1T=$.Q(p,{},4);6(1o.8)1T.8=D;q 1T.8=1j.8;6(1o.b)1T.b=D;q 1T.b=1j.b;1T.1b.l.1E=\'1I\';u 1T}k 4A(){H(\'4A\');c 3m=$(4.3m[4.F]);5.l.1A(3m.3M().2h());5.C.6D(3m);6(4.W){5.l.1A(4.59);W.1R=$(\'[1w="\'+4.W+\'"], [1w^="\'+4.W+\' "]\');W.1H=W.1R.1H(4.E);6(4.2t&&$.1J(4.2t))4.2t(W.1H+1,W.1R.1i,5,4);c 1T=2L();c 4F=2W(-1);6(4F){c 2l=$(\'.2I\',5.C).I(\'1a\',4F.I(\'1a\')).1u(k(e){e.1U();$.2I();u m});6(26&&4.F==\'1e\'){2l.4d($(\'<B 1d="6G" 1k="2y:\\\'\\\';"></B>\').o({12:2l.o(\'12\'),1f:2l.o(\'1f\'),1h:2l.o(\'1h\'),8:2l.8(),b:2l.b(),1s:0,18:\'3l\'}))}}q{$(\'.2I\',5.C).2h()}c 4G=2W(1);6(4G){c 2d=$(\'.2B\',5.C).I(\'1a\',4G.I(\'1a\')).1u(k(e){e.1U();$.2B();u m});6(26&&4.F==\'1e\'){2d.4d($(\'<B 1d="6J" 1k="2y:\\\'\\\';"></B>\').o($.Q({},{12:2d.o(\'12\'),1f:2d.o(\'1f\'),1h:2d.o(\'1h\'),8:2d.8(),b:2d.b(),1s:0,18:\'3l\'})))}}q{$(\'.2B\',5.C).2h()}}3H()}k 2W(4I){6(4.W){6(!4.5c)4I*=-1;c 1H=W.1H+4I;6(1H>=0&&1H<W.1R.1i)u W.1R.2P(1H);q 6(4.6d){6(1H<0)u W.1R.2P(W.1R.1i-1);q u W.1R.2P(0)}}u m}k 3H(1K){H(\'3H\');5.N=5.C.3M(\'v:6L\');1o.8=m;1o.b=m;6(m&&!4.2K){1j.8=4.8;1j.b=4.b}6(4.5D&&(!4.8||!4.b)){5.C.o({1s:0,8:\'1I\',b:\'1I\'}).2j();c j={8:\'1I\',b:\'1I\'};6(4.8){j.8=4.8}q 6(4.F==\'B\'){j.8=4.4b}6(4.b){j.b=4.b}q 6(4.F==\'B\'){j.b=4.4a}5.l.o(j);6(!4.8){4.8=5.l.5t(p);1o.8=p}6(!4.b){4.b=5.l.3D(p);1o.b=p}5.C.o({1s:1});6(!1K)5.C.13()}6(4.F!=\'1v\'&&4.F!=\'1e\'){4.8=2k.5F(4.8,4.4b);4.b=2k.5F(4.b,4.4a)}c 3j=2C(5.C);c 3g=2C(5.N);c 1y=2C(5.l);c j={l:{8:4.8,b:4.b},3i:{8:4.8+1y.w.Y,b:4.b+1y.h.Y},N:{8:4.8+1y.w.Y+3g.w.Y,b:4.b+1y.h.Y+3g.h.Y}};6(4.5H){c 2T=5.2a?5.2a.b:$(14).b()-3j.h.18-(j.N.b-4.b);c 2J=5.2a?5.2a.8:$(14).8()-3j.w.18-(j.N.8-4.8);2T-=4.1l*2;2J-=4.1l*2;6(j.l.b>2T||j.l.8>2J){6(4.F==\'1v\'||4.F==\'1e\'){c 3T=4.4x?4.4x:4.8;c 3U=4.4y?4.4y:4.b;c 3d=j.l.8-3T;c 2V=j.l.b-3U;6(2V<0)2V=0;6(3d<0)3d=0;c 3X=2T-2V;c 3Y=2J-3d;c 4V=2k.4W(3X/3U,3Y/3T);3Y=2k.5U(3T*4V);3X=2k.5U(3U*4V);j.l.b=3X+2V;j.l.8=3Y+3d}q{j.l.b=2k.4W(j.l.b,2T);j.l.8=2k.4W(j.l.8,2J)}j.3i={8:j.l.8+1y.w.Y,b:j.l.b+1y.h.Y};j.N={8:j.l.8+1y.w.Y+3g.w.Y,b:j.l.b+1y.h.Y+3g.h.Y}}}6(4.F==\'1e\'){$(\'4S, 4C\',5.l).I(\'8\',j.l.8).I(\'b\',j.l.b)}q 6(4.F==\'1v\'){$(\'2U\',5.l).o({8:j.l.8,b:j.l.b})}5.l.o($.Q({},j.l,4.1b.l));5.N.o($.Q({},j.3i,4.1b.3i));6(!1K)5.C.o($.Q({},j.N,4.1b.N));6(4.F==\'1v\'&&4.5h){$(\'2U\',5.l).73(\'5R\');c 1W=$(\'v\',5.l);6(4.O!=4.54&&4.O){6(1W.1i==0){1W=$(\'<v>\'+4.O+\'</v>\');5.l.1A(1W)}6(4.5d){c 5W=2C(1W);1W.o({8:(j.l.8+1y.w.1l-5W.w.Y)+\'G\'})}}q 6(1W.1i=0){1W.2h()}}6(4.O)4v();j.N.4U=3j.w.18;j.N.4Y=3j.h.18;Z(j.N);3y()}k 1V(e){H(\'1V\');6(e)e.1U();6(5.1n&&5.1N){$(1X).1D(\'4f.K\');6(!4.1g)$(14).1D(\'2A.K\');5.1N=m;5.16=p;5.3V=p;6(5.1G||5.1r){4.3f(5,4,k(){5.P.13();5.1G=m;5.1r=m;4.2v(5,4,1Z)})}q{6(2r)5.l.o({12:\'\'});5.N.o({1E:\'2b\'});5.l.o({1E:\'2b\'});$(\'B\',5.l).13();6($.1J(4.4u)){4.4u(5,4,k(){4.3b(5,4,k(){2x();4.2v(5,4,1Z)})})}q{4.3b(5,4,k(){2x();4.2v(5,4,1Z)})}}}6(e)u m}k 1z(){H(\'1z\');6(5.1N&&!5.16){6(5.1q){6(5.j.M()){5.16=p;6(5.1r){3K();5.2p=p;4.3q(5,4,k(){5.P.13();5.1r=m;5.1G=m;2f()})}q{4.3f(5,4,k(){5.P.13();5.1G=m;3K();3C();3y();5.2p=p;4.3s(5,4,2f)})}}}q 6(!5.1G&&!5.1r){5.16=p;5.1G=p;6(5.1B)1t();q 5.P.M(4.5r);$(4.3v,5.P).1D(\'1u.K\').1Y(\'1u.K\',1V);3C();4.3p(5,4,k(){5.16=m;1z()})}}}k 4m(L){H(\'77: \'+R.t);6(4.19){c j={};c i=0;L=L.2e(/\\r\\n/2R,\'5Y\').2e(/<41(.|\\s)*?\\/41>/2R,k(x){j[i]=x;u\'<42 52="62: 3l" 11=63 1w="\'+(i++)+\'"></42>\'});L=$(\'<v>\'+L+\'</v>\').29(4.19).M().2e(/<42 52="62: 3l;?" 11="?63"? 1w="(.?)"><\\/42>/2R,k(x,y,z){u j[y]}).2e(/5Y/2R,"\\r\\n")}5.j.M(64(L));6(5.j.M()){5.1q=p;1z()}q 1t()}k 4j(){H(\'4j\');c X=$(4.E);X.I(\'2u\',X.I(\'2u\')+4.19);X.I(\'2s\',\'\');$(\'48[1c=\'+4.3F+\']\',4.E).2h();c B=5.j.3M(\'B\');c 65=B.1D(\'2o\').24().29(4.19||\'U\').7f(\'41[1k]\');B.I(\'1k\',\'7g:7h\');5.j.M(65.M());6(5.j.M()){5.1q=p;1z()}q 1t()}k 4B(){6((14.1P.3e&&4.t.3n(14.1P.3e)>-1)||4.t.3n(\'5k://\')){c B=$(\'B\',5.1n).24();c j={};6(4.5Q){j.O=B.29(\'O\').5m();6(!j.O){5C{j.O=B.29(\'O\').M()}7i(7j){}}}c U=B.29(\'U\');6(!4.b&&U.b())j.b=U.b();6(!4.8&&U.8())j.8=U.8();$.Q(1j,j);$.3N(j)}}k 2t(66,Y,A,f){6(Y>1)f.O+=(f.O?\' - \':\'\')+66+\'/\'+Y}k 2x(){H(\'2x\');5.16=m;6(30){30.1A(5.l.24());30=D}q 6(2g){2g.1A(5.l.24());2g=D}5.l.4z();W={};5.C.13().3M().2h().4z().I(\'52\',\'\').13();6(5.3V||5.1r)5.C.13();5.C.o(4.1b.N).1A(5.l);1z()}k 1Z(){H(\'1Z\');$(1X).1D(\'4f\',4g);5.16=m;5.1n.2h();5.1n=D;6(26){U.o({b:\'\',8:\'\',12:\'\',1E:\'\',S:\'\',49:\'\'});$(\'M\').o({1E:\'\'})}6($.1J(4.1Z))4.1Z(5,4)}k 4i(){H(\'4i\');5.1N=p;5.16=m;1z()}k 2f(){H(\'2f\');5.16=m;5.2p=m;5.C.o({1s:\'\'});2r=/7m/.22(1F)&&!/(7n|6h)/.22(1F)&&7o(58)<1.9&&4.F!=\'1v\';6(2r)5.l.o({12:\'4n\'});5.l.1A(5.3R);6(4.F==\'B\')5.l.29(\'B\').I(\'1k\',4.t);6($.1J(4.2f))4.2f(5,4);6(32){32=m;$.3N({8:4.4L,b:4.4O});3z 4[\'4L\'];3z 4[\'4O\']}6(1o.8)Z({8:D});6(1o.b)Z({b:D})}k 4w(t){6(3Z t==\'4E\'){c 53=t.3n(\'#\');6(53>-1)u t.1Q(53)}u\'\'}k 64(L){6(3Z L==\'4E\')L=L.2e(/<\\/?(M|7q|U)([^>]*)>/2R,\'\');c j=1S 2X();$.3Q($.7r({0:L},R.7s),k(){6($.3k(R,"41")){6(!R.1k||$(R).I(\'1w\')==\'7t\'){6($(R).I(\'6k\')==\'7u\')5.3R.3h(R);q 5.3S.3h(R)}}q j.3h(R)});u j}k 2C(10){10=10.3a(0);c J={h:{43:17(10,\'V\')+17(10,\'7x\'),18:17(10,\'5x\')+17(10,\'7y\'),1l:17(10,\'7z\')+17(10,\'7A\')},w:{43:17(10,\'S\')+17(10,\'49\'),18:17(10,\'5B\')+17(10,\'7B\'),1l:17(10,\'7C\')+17(10,\'7D\')}};J.h.1M=J.h.43+J.h.18;J.w.1M=J.w.43+J.w.18;J.h.6a=J.h.1l+J.h.18;J.w.6a=J.w.1l+J.w.18;J.h.Y=J.h.1M+J.h.1l;J.w.Y=J.w.1M+J.w.1l;u J}k 17(10,1c){c J=6b($.7F(10,1c,p));6(7G(J))J=0;u J}k H(2M){6($.1C.K.f.H||4&&4.H)6c(2M,5,4||{})}k 3t(A,f,T){A.15.o({1s:0}).6e(7L,0.75,T)}k 2v(A,f,T){A.15.56(5I,T)}k 3p(A,f,T){A.P.o({V:f.2S+\'G\',S:f.2Q+\'G\',1s:0}).2j().2q({1s:1},{2z:T,2E:2n})}k 3f(A,f,T){T()}k 3s(A,f,T){A.P.o({V:f.2S+\'G\',S:f.2Q+\'G\'}).2j().2q({8:f.8+\'G\',b:f.b+\'G\',V:f.V+\'G\',S:f.S+\'G\'},{2E:57,2z:k(){A.C.o({8:f.8+\'G\',b:f.b+\'G\',V:f.V+\'G\',S:f.S+\'G\'}).2j();A.P.56(69,T)}})}k 3b(A,f,T){A.C.2q({b:\'3A\',8:\'3A\',V:(-(25+f.4Y)/2+f.2i)+\'G\',S:(-(25+f.4U)/2+f.2m)+\'G\'},{2E:57,2z:k(){A.C.13();T()}})}k 3r(A,f,T){A.P.o({V:A.C.o(\'V\'),S:A.C.o(\'S\'),b:A.C.o(\'b\'),8:A.C.o(\'8\'),1s:0}).2j().6e(2n,1,k(){A.C.13();T()})}k 3q(A,f,T){A.C.13().o({8:f.8+\'G\',b:f.b+\'G\',S:f.S+\'G\',V:f.V+\'G\',1s:1});A.P.2q({8:f.8+\'G\',b:f.b+\'G\',S:f.S+\'G\',V:f.V+\'G\'},{2z:k(){A.C.2j();A.P.56(2n,k(){A.P.13();T()})},2E:57})}k 2A(A,f,T){A.C.2q({8:f.8+\'G\',b:f.b+\'G\',S:f.S+\'G\',V:f.V+\'G\'},{2z:T,2E:2n})}k 3L(A,f,T){6(!$.7R.7S.3E){A.15.o({3E:f.2Y});T()}q A.15.2q({3E:f.2Y},{2z:T,2E:2n})}$($.1C.K.f.4r).K()});c 45=\'\';k 6c(2M,A,f){6(A.1n&&A.15){A.15.2Z(2M+\'<3u />\'+45);45=\'\'}q 45+=2M+\'<3u />\'}',62,490,'||||currentSettings|modal|if||width|||height|var|||settings||||tmp|function|content|false||css|true|else|||url|return|div|||||elts|iframe|contentWrapper|null|from|type|px|debug|attr|ret|nyroModal|data|html|wrapper|title|loading|extend|this|marginLeft|callback|body|marginTop|gallery|jFrom|total|setCurrentSettings|elm|class|position|hide|window|bg|anim|getCurCSS|border|selector|href|cssOpt|name|id|swf|top|blocker|left|length|initSettingsSize|src|padding|deep1|full|resized|100|dataReady|transition|opacity|loadingError|click|image|rel|showModal|outerContent|showContentOrLoading|append|error|fn|unbind|overflow|userAgent|loadingShown|index|auto|isFunction|resizing|initModal|outer|ready|processModal|location|substring|links|new|currentSettingsNew|preventDefault|removeModal|divTitle|document|bind|endRemove||ajax|test|form|contents||isIE6||deep2|find|blockerVars|hidden|nyroModalIframe|next|replace|endShowContent|contentElt|remove|marginScrollTop|show|Math|prev|marginScrollLeft|400|load|animContent|animate|fixFF|target|galleryCounts|action|hideBackground|Load|endHideContent|javascript|complete|resize|nyroModalNext|getOuter|link|duration|toLowerCase|imgType|value|nyroModalPrev|maxWidth|windowResizing|getCurrentSettingsNew|msg|pos|zIndex|eq|marginLeftLoading|gi|marginTopLoading|maxHeight|img|diffH|getGalleryLink|Array|bgColor|prepend|contentEltLast|keyCode|shouldResize|zIndexStart|hash|elt|absolute||||get|hideContent|selIndicator|diffW|hostname|hideLoading|outerWrapper2|push|wrapper2|outerWrapper|nodeName|none|wrap|indexOf|param|showLoading|hideTransition|showTransition|showContent|showBackground|br|closeSelector|nyroModalClose|iframeForm|setMargin|delete|50px|scrollTop|setMarginLoading|outerHeight|backgroundColor|formIndicator|forceType|calculateSize|in|req|fillContent|updateBgColor|children|nyroModalSettings|nyroModalManual|me|each|scriptsShown|scripts|useW|useH|closing|started|calcH|calcW|typeof||script|pre|margin|msie|tmpDebug|contain|iframeHideIE|input|marginRight|minHeight|minWidth|frameborder|before|hspace|keydown|keyHandler|processHandler|endBackground|formDataLoaded|endResize|val|ajaxLoaded|fixed|imageType|isSwf|visible|openSelector|extractUrlSel|RegExp|beforeHideContent|setTitle|getHash|imgWidth|imgHeight|empty|wrapContent|iframeLoaded|embed|Form|string|linkPrev|linkNext|nyroModalprocessing|dir|submit|indexSpace|setWidth|windowResizeTimeout|endFillContent|setHeight|setMarginScroll|formData|documentElement|object|handleError|borderW|ratio|min|callingSettings|borderH|setDefaultCurrentSettings||Image|style|hashPos|defaultImgAlt|h1|fadeOut|350|browserVersion|galleryLinks|closeButton|support|ltr|setWidthImgTitle|_blank|boxModel|99|addImageDivTitle|reg1|method|http|nyroModalTitle|text|Content|hashLoc|curLoc|errorClass|contentLoading|regexImg|outerWidth|wrapperIframe|plusTop|fileType|borderTopWidth|multipart|plusLeft|enctype|borderLeftWidth|try|autoSizable|isDefaultPrevented|max|110|resizable|300|nyroModalFull|nyroModalBg|nyroModalWrapper|nyroModalContent|nyrModalTmp|nyroModalLoading|Ajax|titleFromIframe|alt|lineHeight|clickBg|floor|mousewheel|outerDivTitle|Close|nyroModalLN|success|contentError|scrollLeft|display|nyroModalScript|filterScripts|iframeContent|nb|XMLHttpRequest|windowResizeHandler|200|inner|parseInt|nyroModalDebug|galleryLoop|fadeTo|manual|opera|webkit|match|windowResize|rev|Iframe|Data|https|jQuery|AE6D|offset|nyroModalImg|11cf|96B8|base|addClass|444553540000|Loaded|000000|removeData|Cancel|movie|is|wrapInner|static|navigator|nyroModalIframeHideIeGalleryPrev|nyroModalIframeHideIe|The|nyroModalIframeHideIeGalleryNext|requested|first|application|cannot|shockwave|flash|be|blur|serializeArray|loaded|wmode|Please|Prev|again|later|scrollHeight|clientHeight|stopPropagation|Next|removeAttr|jpg||wrapperImg|AjaxLoaded|clearTimeout|setTimeout|wrapperSwf|jpeg|png|tiff|gif|not|about|blank|catch|err|host|bmp|mozilla|compatible|parseFloat|transparent|head|clean|ownerDocument|forceLoad|shown|nofollow|khtml|marginBottom|borderBottomWidth|paddingTop|paddingBottom|borderRightWidth|paddingLeft|paddingRight|closeBut|curCSS|isNaN|substr|close|nyroModalRemove|D27CDB6E|500|nyroModalSel|rv|classid|color|white|fx|step|clsid'.split('|'),0,{})); var transparentImage = "/images/none.gif";
function fixTrans(){
	if (typeof document.body.style.maxHeight == 'undefined') {
		var imgs = document.getElementsByTagName("img");
		for (i = 0; i < imgs.length; i++){
			if (imgs[i].src.indexOf(transparentImage) != -1){
				return;
			}
			if (imgs[i].src.indexOf(".png") != -1){
				var src = imgs[i].src;
				imgs[i].src = transparentImage;
				imgs[i].runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')";
				imgs[i].style.display = "block";
			}
		}
	}
}
function initHover(){
	var nodes = document.getElementById("quicklinks");
	if (nodes)
	{
		nodes.onmouseover = function()
		{
			this.className += " hover";
		}
		nodes.onmouseout = function()
		{
			this.className = this.className.replace("hover", "");
		}
	}
	$j('ul#navigation > li').each(function(){
		$j(this).hover(function(){
			$j(this).addClass('hover');
		}, function(){
			$j(this).removeClass('hover');
		});
	});
	$j('#contentNav td').each(function(){
		$j(this).hover(function(){
			$j(this).addClass('hover');
		}, function(){
			$j(this).removeClass('hover');
		});
	});


}
function initInputs(){
	var par = document.getElementsByTagName("fieldset");
	for (j=0; j<par.length; j++)
	{
		if (par[j].className.indexOf("inp-change") != -1)
		{
			inp = par[j].getElementsByTagName("input");
			for (i=0; i<inp.length; i++)
			{
				if (inp[i].type == "text" || inp[i].type == "password")
				{
					inp[i].onfocus = function()
					{
						this.parentNode.className += " active";
					}
					inp[i].onblur = function()
					{
						this.parentNode.className = this.parentNode.className.replace(" active", "");
					}
				}
			}
		}
	}
}
function initHideBox(){
	var _link = document.getElementById("open-close");
	if (_link)
	{
		_link.onclick = function()
		{
			if (_link.parentNode.parentNode.className.indexOf("hide") == -1)
			{
				_link.parentNode.parentNode.className += " hide";
			}
			else
			{
				_link.parentNode.parentNode.className = _link.parentNode.parentNode.className.replace(" hide", "");
			}
			return false;
		}
	}
}
function initAll(){
	initInputs();
	initHideBox();
	initHover();
}

function tooltips(){
	/* CONFIG */
	xOffset = 6;
	yOffset = -24;
	// these 2 variable determine tooltips distance from the cursor
	/* END CONFIG */
	$j("a.tooltip").hover(function(e){
		var t = $j(this).find('span.popup').html();
		$j("body").append("<div id='tooltip_container'><div id='tooltip'>"+ t +"</div><div id='tooltip_bottom'></div></div>");
		var tooltipHeight = $j('#tooltip_container').height();
		$j("#tooltip_container")
		.css("top",(e.pageY - tooltipHeight - xOffset) + "px")
		.css("left",(e.pageX + yOffset) + "px")
		.fadeIn("fast");
	},
	function(){
		$j("#tooltip_container").remove();
	});
	$j("a.tooltip").mousemove(function(e){
		var tooltipHeight = $j('#tooltip_container').height();
		$j("#tooltip_container")
		.css("top",(e.pageY - tooltipHeight - xOffset) + "px")
		.css("left",(e.pageX + yOffset) + "px");
	});
};

function modalWindow(){
	$j.nyroModalSettings({
		closeButton: ''
	});

	// the onclick event for the modal-links
	$j('a.modal').click(function(e){
		e.preventDefault;
		$j.nyroModalManual({
			url: $j(this).attr('href')
		});
		return false;
	});


	$j('a.modalScroll').click(function(e){
		e.preventDefault;
		$j.nyroModalManual({
			url: $j(this).attr('href')
		});
		return false;
	});


	$j('a.modalImage').click(function(e){
		e.preventDefault;
		var $imageContainer = $j(this).parent().parent().find('.hiddenImage');
		var $title = $j(this).attr('title');
		var header = '<div id="modalContainer"><div id="modalHeader"><div class="modalHeaderLeft">' +  $title +'</div><div class="modalHeaderRight"><a href="javascript:;" id="modal-close" class="nyroModalClose"><img src="/images/modal_close.gif"/></a></div><div class="clear-both"></div></div>';
		var content = '<div id="modalContent">';
		var footer = '</div></div>';
		$j.nyroModalManual({
			content: (header + content +  $imageContainer.html() + footer),
			width: $imageContainer.width() + 30,
			minWidth: 700
		});
		return false;
	});

	$j('div.entryImage').click(function(){
		$j(this).find('a').click();
	});
};

function addFavorite(){
	var title = document.title;
	var url = location.href;
	if (window.sidebar){ // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	}
	else if( window.external ){ // IE Favorites
		window.external.AddFavorite( url, title);
	}
}

$j = jQuery.noConflict();

$j(document).ready(function() {
	tooltips();
	initAll();
	modalWindow();
	$j("#timetable-date:not(:disabled), #inp-11:not(:disabled), .datePicker:not(:disabled)").each(function(){
		$j(this).datepicker(
		{
			showOn: 'both',
			buttonText: 'Datum auswählen',
			buttonImage: '/images/lnk-calendar.gif',
			buttonImageOnly: true,
			hideIfNoPrevNext: true
		});
	});
	$j('input.hint').each(function(){
		var _oldVal = $j(this).val();
		$j(this).focus(function(){
			if($j(this).val() == _oldVal || $j(this).val() == ''){
				$j(this).val('');
			}
			$j(this).addClass('active');
		}).blur(function(){
			if($j(this).val() == _oldVal || $j(this).val() == ''){
				$j(this).val(_oldVal);
				$j(this).removeClass('active');
			}
		});
	});
	$j('#navigation > li').hover(
		function () {
			$j(this).find('div.nav-drop').css('top', $j(this).height() + 'px');
		}
		)
});

function disablePage() {
	var blurDiv = document.createElement("div");
	blurDiv.id = "blurDiv";
	blurDiv.style.cssText = "position:absolute; top:0; right:0; width:" + screen.width + "px; height:" + screen.height + "px; background-color: #000000; opacity:0.5; filter:alpha(opacity=50); z-index:5;";		
	var innerDiv = document.createElement("div");
	innerDiv.id = "innerDiv";
	innerDiv.style.cssText = "position:absolute; height:48px; width:48px; margin:0px 0px 0px 0px; top: 300px; left: 50%; font-size: 200%; color: #FFFFFF; z-index:2;";
	var imgDiv = document.createElement("img");
	imgDiv.id = "ajaxloader";
	imgDiv.src = "/images/loadinfo.gif";
	innerDiv.appendChild(imgDiv);
	blurDiv.appendChild(innerDiv);		
	document.getElementsByTagName("body")[0].appendChild(blurDiv);
}

function enablePage() {
	var blurDiv = document.getElementById("blurDiv");
	blurDiv.parentNode.removeChild(blurDiv);
}
/* Text changer - light version.
Let your text's font size customizable.
by Marco Rosella - http://www.centralscrutinizer.it/en/design/js-php/text-changer
                v0.2 - May 18, 2006
*/

window.onload = function(){
	textChanger.init();
}

var textChanger = {
	cpanel : 'textchanger',  //set here the id of the element (div, p) within you want to insert the control panel
	element : 'page-holder',   	 //set here the id of the element (div, p) within you want to change the text
	defaultFS : 1,         //set here the default font size in 'em'
	init: function() {
		var cpel = document.getElementById(textChanger.cpanel);
		var el = document.getElementById(textChanger.element);
		if (cpel == null || el == null) {
		//alert('The elements with the \"'+textChanger.cpanel+'\" and/or \"'+textChanger.element+'\" ID do not exist in HTML source.');
		} else {
			var u = document.createElement('ul');
			cpel.appendChild(u);
			u.innerHTML =
			'<li id="decrease"><a href="#" title="Schrift verkleinern" alt="Schrift verkleinern"><img src="/images/btn-decrease.gif" title="Schrift verkleinern" alt="Schrift verkleinern" /></a></li>'+
			'<li id="reset"><a href="#" title="Standard Schriftgröße" alt="Standard Schriftgröße"><img src="/images/btn-reset.gif" title="Standard Schriftgröße" alt="Standard Schriftgröße" /></a></li>'+
			'<li id="increase"><a href="#" title="Schrift vergrößern" alt="Schrift vergrößern"><img src="/images/btn-increase.gif" title="Schrift vergrößern" alt="Schrift vergrößern" /></a></li>'
			var sz = textChanger.getCookie();
			el.style.fontSize = sz ? sz + 'em' : textChanger.defaultFS + 'em';
			var incr = document.getElementById('increase');
			incr.onclick = function(){
				textChanger.changeSize(1);
				return false;
			};
			var decr = document.getElementById('decrease');
			decr.onclick = function(){
				textChanger.changeSize(-1);
				return false;
			};
			var reset= document.getElementById('reset');
			reset.onclick = function(){
				textChanger.changeSize(0);
				return false;
			};
		}
	} ,

	changeSize: function(val) {
		var el = document.getElementById(textChanger.element);

		var size = el.style.fontSize.substring(0,3);
		var fSize = parseFloat(size,10);
		if (val == 1) {
			fSize += 0.11;
			if (fSize > 1.2) fSize = 1.2;
			if(fSize > 1){
				$j('div.nav-drop').css('top', '2.366em');
			}
		}
		if (val == -1) {
			fSize -= 0.11;
			if (fSize < 0.9) fSize = 0.9;
			$j('div.nav-drop').css('top', '2.766em');
		}
		if (val == 0) {
			fSize = textChanger.defaultFS;
			$j('div.nav-drop').css('top', '2.666em');
		}
		el.style.fontSize = fSize + 'em';
		textChanger.updateCookie(fSize);
	} ,

	updateCookie: function(vl) {
		var today = new Date();
		var exp = new Date(today.getTime() + (365*24*60*60*1000)); //the cookie will expire in one year
		document.cookie = 'textChangerL=size=' + vl + ';' +'expires=' + exp.toGMTString() + ';' +'path=/';
	} ,

	getCookie: function() {
		var cname = 'textChangerL=size=';
		var start = document.cookie.indexOf(cname);
		var len = start + cname.length;
		if ((!start) && (cname != document.cookie.substring(0,cname.length))) {
			return null;
		}
		if (start == -1) return null;
		var end = document.cookie.indexOf(";",len);
		if (end == -1) end = document.cookie.length;
		return unescape(document.cookie.substring(len, end));
	}
}
function entry(block) {
	$j(document).mousemove(function(event){
		showblock(block, event);
	});
	$j('#'+block).css('visibility', 'visible');
}

function leave(block) {
	$j(document).unbind('mousemove');
	$j('#'+block).css('visibility', 'hidden');
	$j('#'+block).css('left', 0 + 'px');
	$j('#'+block).css('top', 0 + 'px');
}

function fromleft(block, n) {
	$j('#'+block).css('left', n + 'px');
}
function fromtop(block, n) {
	$j('#'+block).css('top', n + 'px');
}
function showblock(block, e) {
	
	var pos = $j('#page-holder').position();
	var x = e.pageX - pos.left + 30;
	var y = e.pageY - 30;
	fromleft(block, parseInt(x));
	fromtop(block, parseInt(y));
}
