/*!
 * 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 foo(){

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

});
}

foo();
var $j = jQuery.noConflict();
;
(function(a){a.extend(a.fn,{livequery:function(f,e,d){var c=this,g;if(a.isFunction(f)){d=e,e=f,f=undefined}a.each(a.livequery.queries,function(h,j){if(c.selector==j.selector&&c.context==j.context&&f==j.type&&(!e||e.$lqguid==j.fn.$lqguid)&&(!d||d.$lqguid==j.fn2.$lqguid)){return(g=j)&&false}});g=g||new a.livequery(this.selector,this.context,f,e,d);g.stopped=false;a.livequery.run(g.id);return this},expire:function(f,e,d){var c=this;if(a.isFunction(f)){d=e,e=f,f=undefined}a.each(a.livequery.queries,function(g,h){if(c.selector==h.selector&&c.context==h.context&&(!f||f==h.type)&&(!e||e.$lqguid==h.fn.$lqguid)&&(!d||d.$lqguid==h.fn2.$lqguid)&&!this.stopped){a.livequery.stop(h.id)}});return this}});a.livequery=function(c,e,g,f,d){this.selector=c;this.context=e||document;this.type=g;this.fn=f;this.fn2=d;this.elements=[];this.stopped=false;this.id=a.livequery.queries.push(this)-1;f.$lqguid=f.$lqguid||a.livequery.guid++;if(d){d.$lqguid=d.$lqguid||a.livequery.guid++}return this};a.livequery.prototype={stop:function(){var c=this;if(this.type){this.elements.unbind(this.type,this.fn)}else{if(this.fn2){this.elements.each(function(d,e){c.fn2.apply(e)})}}this.elements=[];this.stopped=true},run:function(){if(this.stopped){return}var e=this;var f=this.elements,d=a(this.selector,this.context),c=d.not(f);this.elements=d;if(this.type){c.bind(this.type,this.fn);if(f.length>0){a.each(f,function(g,h){if(a.inArray(h,d)<0){a.event.remove(h,e.type,e.fn)}})}}else{c.each(function(){e.fn.apply(this)});if(this.fn2&&f.length>0){a.each(f,function(g,h){if(a.inArray(h,d)<0){e.fn2.apply(h)}})}}}};a.extend(a.livequery,{guid:0,queries:[],queue:[],running:false,timeout:null,checkQueue:function(){if(a.livequery.running&&a.livequery.queue.length){var c=a.livequery.queue.length;while(c--){a.livequery.queries[a.livequery.queue.shift()].run()}}},pause:function(){a.livequery.running=false},play:function(){a.livequery.running=true;a.livequery.run()},registerPlugin:function(){a.each(arguments,function(d,e){if(!a.fn[e]){return}var c=a.fn[e];a.fn[e]=function(){var f=c.apply(this,arguments);a.livequery.run();return f}})},run:function(c){if(c!=undefined){if(a.inArray(c,a.livequery.queue)<0){a.livequery.queue.push(c)}}else{a.each(a.livequery.queries,function(d){if(a.inArray(d,a.livequery.queue)<0){a.livequery.queue.push(d)}})}if(a.livequery.timeout){clearTimeout(a.livequery.timeout)}a.livequery.timeout=setTimeout(a.livequery.checkQueue,20)},stop:function(c){if(c!=undefined){a.livequery.queries[c].stop()}else{a.each(a.livequery.queries,function(d){a.livequery.queries[d].stop()})}}});a.livequery.registerPlugin("append","prepend","after","before","wrap","attr","removeAttr","addClass","removeClass","toggleClass","empty","remove");a(function(){a.livequery.play()});var b=a.prototype.init;a.prototype.init=function(d,f){var e=b.apply(this,arguments);if(d&&d.selector){e.context=d.context,e.selector=d.selector}if(typeof d=="string"){e.context=f||document,e.selector=d}return e};a.prototype.init.prototype=a.prototype})(jQuery);
;
(function(b){b.fn.ajaxSubmit=function(s){if(!this.length){a("ajaxSubmit: skipping submit process - no element selected");return this}if(typeof s=="function"){s={success:s}}var e=b.trim(this.attr("action"));if(e){e=(e.match(/^([^#]+)/)||[])[1]}e=e||window.location.href||"";s=b.extend({url:e,type:this.attr("method")||"GET"},s||{});var u={};this.trigger("form-pre-serialize",[this,s,u]);if(u.veto){a("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(s.beforeSerialize&&s.beforeSerialize(this,s)===false){a("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var m=this.formToArray(s.semantic);if(s.data){s.extraData=s.data;for(var f in s.data){if(s.data[f] instanceof Array){for(var g in s.data[f]){m.push({name:f,value:s.data[f][g]})}}else{m.push({name:f,value:s.data[f]})}}}if(s.beforeSubmit&&s.beforeSubmit(m,this,s)===false){a("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[m,this,s,u]);if(u.veto){a("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var d=b.param(m);if(s.type.toUpperCase()=="GET"){s.url+=(s.url.indexOf("?")>=0?"&":"?")+d;s.data=null}else{s.data=d}var t=this,l=[];if(s.resetForm){l.push(function(){t.resetForm()})}if(s.clearForm){l.push(function(){t.clearForm()})}if(!s.dataType&&s.target){var p=s.success||function(){};l.push(function(j){b(s.target).html(j).each(p,arguments)})}else{if(s.success){l.push(s.success)}}s.success=function(q,k){for(var n=0,j=l.length;n<j;n++){l[n].apply(s,[q,k,t])}};var c=b("input:file",this).fieldValue();var r=false;for(var i=0;i<c.length;i++){if(c[i]){r=true}}var h=false;if(s.iframe||r||h){if(s.closeKeepAlive){b.get(s.closeKeepAlive,o)}else{o()}}else{b.ajax(s)}this.trigger("form-submit-notify",[this,s]);return this;function o(){var w=t[0];if(b(":input[name=submit]",w).length){alert('Error: Form elements must not be named "submit".');return}var q=b.extend({},b.ajaxSettings,s);var G=b.extend(true,{},b.extend(true,{},b.ajaxSettings),q);var v="jqFormIO"+(new Date().getTime());var C=b('<iframe id="'+v+'" name="'+v+'" src="about:blank" />');var E=C[0];C.css({position:"absolute",top:"-1000px",left:"-1000px"});var F={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;C.attr("src","about:blank")}};var D=q.global;if(D&&!b.active++){b.event.trigger("ajaxStart")}if(D){b.event.trigger("ajaxSend",[F,q])}if(G.beforeSend&&G.beforeSend(F,G)===false){G.global&&b.active--;return}if(F.aborted){return}var k=0;var y=0;var j=w.clk;if(j){var x=j.name;if(x&&!j.disabled){s.extraData=s.extraData||{};s.extraData[x]=j.value;if(j.type=="image"){s.extraData[name+".x"]=w.clk_x;s.extraData[name+".y"]=w.clk_y}}}setTimeout(function(){var J=t.attr("target"),H=t.attr("action");w.setAttribute("target",v);if(w.getAttribute("method")!="POST"){w.setAttribute("method","POST")}if(w.getAttribute("action")!=q.url){w.setAttribute("action",q.url)}if(!s.skipEncodingOverride){t.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(q.timeout){setTimeout(function(){y=true;z()},q.timeout)}var I=[];try{if(s.extraData){for(var K in s.extraData){I.push(b('<input type="hidden" name="'+K+'" value="'+s.extraData[K]+'" />').appendTo(w)[0])}}C.appendTo("body");E.attachEvent?E.attachEvent("onload",z):E.addEventListener("load",z,false);w.submit()}finally{w.setAttribute("action",H);J?w.setAttribute("target",J):t.removeAttr("target");b(I).remove()}},10);var A=0;function z(){if(k++){return}E.detachEvent?E.detachEvent("onload",z):E.removeEventListener("load",z,false);var H=true;try{if(y){throw"timeout"}var I,K;K=E.contentWindow?E.contentWindow.document:E.contentDocument?E.contentDocument:E.document;if((K.body==null||K.body.innerHTML=="")&&!A){A=1;k--;setTimeout(z,100);return}F.responseText=K.body?K.body.innerHTML:null;F.responseXML=K.XMLDocument?K.XMLDocument:K;F.getResponseHeader=function(M){var L={"content-type":q.dataType};return L[M]};if(q.dataType=="json"||q.dataType=="script"){var n=K.getElementsByTagName("textarea")[0];F.responseText=n?n.value:F.responseText}else{if(q.dataType=="xml"&&!F.responseXML&&F.responseText!=null){F.responseXML=B(F.responseText)}}I=b.httpData(F,q.dataType)}catch(J){H=false;b.handleError(q,F,"error",J)}if(H){q.success(I,"success");if(D){b.event.trigger("ajaxSuccess",[F,q])}}if(D){b.event.trigger("ajaxComplete",[F,q])}if(D&&!--b.active){b.event.trigger("ajaxStop")}if(q.complete){q.complete(F,H?"success":"error")}setTimeout(function(){C.remove();F.responseXML=null},100)}function B(n,H){if(window.ActiveXObject){H=new ActiveXObject("Microsoft.XMLDOM");H.async="false";H.loadXML(n)}else{H=(new DOMParser()).parseFromString(n,"text/xml")}return(H&&H.documentElement&&H.documentElement.tagName!="parsererror")?H:null}}};b.fn.ajaxForm=function(c){return this.ajaxFormUnbind().bind("submit.form-plugin",function(){b(this).ajaxSubmit(c);return false}).each(function(){b(":submit,input:image",this).bind("click.form-plugin",function(f){var d=this.form;d.clk=this;if(this.type=="image"){if(f.offsetX!=undefined){d.clk_x=f.offsetX;d.clk_y=f.offsetY}else{if(typeof b.fn.offset=="function"){var g=b(this).offset();d.clk_x=f.pageX-g.left;d.clk_y=f.pageY-g.top}else{d.clk_x=f.pageX-this.offsetLeft;d.clk_y=f.pageY-this.offsetTop}}}setTimeout(function(){d.clk=d.clk_x=d.clk_y=null},10)})})};b.fn.ajaxFormUnbind=function(){this.unbind("submit.form-plugin");return this.each(function(){b(":submit,input:image",this).unbind("click.form-plugin")})};b.fn.formToArray=function(q){var p=[];if(this.length==0){return p}var d=this[0];var h=q?d.getElementsByTagName("*"):d.elements;if(!h){return p}for(var k=0,m=h.length;k<m;k++){var e=h[k];var f=e.name;if(!f){continue}if(q&&d.clk&&e.type=="image"){if(!e.disabled&&d.clk==e){p.push({name:f,value:b(e).val()});p.push({name:f+".x",value:d.clk_x},{name:f+".y",value:d.clk_y})}continue}var r=b.fieldValue(e,true);if(r&&r.constructor==Array){for(var g=0,c=r.length;g<c;g++){p.push({name:f,value:r[g]})}}else{if(r!==null&&typeof r!="undefined"){p.push({name:f,value:r})}}}if(!q&&d.clk){var l=b(d.clk),o=l[0],f=o.name;if(f&&!o.disabled&&o.type=="image"){p.push({name:f,value:l.val()});p.push({name:f+".x",value:d.clk_x},{name:f+".y",value:d.clk_y})}}return p};b.fn.formSerialize=function(c){return b.param(this.formToArray(c))};b.fn.fieldSerialize=function(d){var c=[];this.each(function(){var h=this.name;if(!h){return}var f=b.fieldValue(this,d);if(f&&f.constructor==Array){for(var g=0,e=f.length;g<e;g++){c.push({name:h,value:f[g]})}}else{if(f!==null&&typeof f!="undefined"){c.push({name:this.name,value:f})}}});return b.param(c)};b.fn.fieldValue=function(h){for(var g=[],e=0,c=this.length;e<c;e++){var f=this[e];var d=b.fieldValue(f,h);if(d===null||typeof d=="undefined"||(d.constructor==Array&&!d.length)){continue}d.constructor==Array?b.merge(g,d):g.push(d)}return g};b.fieldValue=function(c,j){var e=c.name,p=c.type,q=c.tagName.toLowerCase();if(typeof j=="undefined"){j=true}if(j&&(!e||c.disabled||p=="reset"||p=="button"||(p=="checkbox"||p=="radio")&&!c.checked||(p=="submit"||p=="image")&&c.form&&c.form.clk!=c||q=="select"&&c.selectedIndex==-1)){return null}if(q=="select"){var k=c.selectedIndex;if(k<0){return null}var m=[],d=c.options;var g=(p=="select-one");var l=(g?k+1:d.length);for(var f=(g?k:0);f<l;f++){var h=d[f];if(h.selected){var o=h.value;if(!o){o=(h.attributes&&h.attributes.value&&!(h.attributes.value.specified))?h.text:h.value}if(g){return o}m.push(o)}}return m}return c.value};b.fn.clearForm=function(){return this.each(function(){b("input,select,textarea",this).clearFields()})};b.fn.clearFields=b.fn.clearInputs=function(){return this.each(function(){var d=this.type,c=this.tagName.toLowerCase();if(d=="text"||d=="password"||c=="textarea"){this.value=""}else{if(d=="checkbox"||d=="radio"){this.checked=false}else{if(c=="select"){this.selectedIndex=-1}}}})};b.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};b.fn.enable=function(c){if(c==undefined){c=true}return this.each(function(){this.disabled=!c})};b.fn.selected=function(c){if(c==undefined){c=true}return this.each(function(){var d=this.type;if(d=="checkbox"||d=="radio"){this.checked=c}else{if(this.tagName.toLowerCase()=="option"){var e=b(this).parent("select");if(c&&e[0]&&e[0].type=="select-one"){e.find("option").selected(false)}this.selected=c}}})};function a(){if(b.fn.ajaxSubmit.debug&&window.console&&window.console.log){window.console.log("[jquery.form] "+Array.prototype.join.call(arguments,""))}}})(jQuery);
;
(function(a){a.extend(a.fn,{delayedObserver:function(d,c,b){this.each(function(){var f=a(this);var e=e||{};f.data("oldval",f.val()).data("delay",c||0.5).data("condition",e.condition||function(){return(a(this).data("oldval")==a(this).val())}).data("callback",d)[(e.event||"keyup")](function(){if(f.data("condition").apply(f)){return}else{if(f.data("timer")){clearTimeout(f.data("timer"))}f.data("timer",setTimeout(function(){f.data("callback").apply(f)},f.data("delay")*1000));f.data("oldval",f.val())}})})}})})(jQuery);
;
jQuery.extend({historyCurrentHash:undefined,historyCallback:undefined,historyInit:function(d){jQuery.historyCallback=d;var c=location.hash;jQuery.historyCurrentHash=c;if(jQuery.browser.msie){if(jQuery.historyCurrentHash==""){jQuery.historyCurrentHash="#"}jQuery("body").prepend('<iframe id="jQuery_history" style="display: none;"></iframe>');var a=jQuery("#jQuery_history")[0];var b=a.contentWindow.document;b.open();b.close();b.location.hash=c}else{if(jQuery.browser.safari){jQuery.historyBackStack=[];jQuery.historyBackStack.length=history.length;jQuery.historyForwardStack=[];jQuery.isFirst=true}}jQuery.historyCallback(c.replace(/^#/,""));setInterval(jQuery.historyCheck,100)},historyAddHistory:function(a){jQuery.historyBackStack.push(a);jQuery.historyForwardStack.length=0;this.isFirst=true},historyCheck:function(){if(jQuery.browser.msie){var a=jQuery("#jQuery_history")[0];var d=a.contentDocument||a.contentWindow.document;var f=d.location.hash;if(f!=jQuery.historyCurrentHash){location.hash=f;jQuery.historyCurrentHash=f;jQuery.historyCallback(f.replace(/^#/,""))}}else{if(jQuery.browser.safari){if(!jQuery.dontCheck){var b=history.length-jQuery.historyBackStack.length;if(b){jQuery.isFirst=false;if(b<0){for(var c=0;c<Math.abs(b);c++){jQuery.historyForwardStack.unshift(jQuery.historyBackStack.pop())}}else{for(var c=0;c<b;c++){jQuery.historyBackStack.push(jQuery.historyForwardStack.shift())}}var e=jQuery.historyBackStack[jQuery.historyBackStack.length-1];if(e!=undefined){jQuery.historyCurrentHash=location.hash;jQuery.historyCallback(e)}}else{if(jQuery.historyBackStack[jQuery.historyBackStack.length-1]==undefined&&!jQuery.isFirst){if(document.URL.indexOf("#")>=0){jQuery.historyCallback(document.URL.split("#")[1])}else{var f=location.hash;jQuery.historyCallback("")}jQuery.isFirst=true}}}}else{var f=location.hash;if(f!=jQuery.historyCurrentHash){jQuery.historyCurrentHash=f;jQuery.historyCallback(f.replace(/^#/,""))}}}},historyLoad:function(d){var e;if(jQuery.browser.safari){e=d}else{e="#"+d;location.hash=e}jQuery.historyCurrentHash=e;if(jQuery.browser.msie){var a=jQuery("#jQuery_history")[0];var c=a.contentWindow.document;c.open();c.close();c.location.hash=e;jQuery.historyCallback(d)}else{if(jQuery.browser.safari){jQuery.dontCheck=true;this.historyAddHistory(d);var b=function(){jQuery.dontCheck=false};window.setTimeout(b,200);jQuery.historyCallback(d);location.hash=e}else{jQuery.historyCallback(d)}}}});
;
(function(b){var a=null;b.fn.autogrow=function(c){return this.each(function(){new b.autogrow(this,c)})};b.autogrow=function(c,d){this.options=d||{};this.dummy=null;this.interval=null;this.line_height=this.options.lineHeight||parseInt(b(c).css("line-height"));this.min_height=this.options.minHeight||parseInt(b(c).css("min-height"));this.max_height=this.options.maxHeight||parseInt(b(c).css("max-height"));this.textarea=b(c);if(this.line_height==NaN){this.line_height=0}this.init()};b.autogrow.fn=b.autogrow.prototype={autogrow:"1.2.2"};b.autogrow.fn.extend=b.autogrow.extend=b.extend;b.autogrow.fn.extend({init:function(){var c=this;this.textarea.css({overflow:"hidden",display:"block"});this.textarea.bind("focus",function(){c.startExpand()}).bind("blur",function(){c.stopExpand()});this.checkExpand()},startExpand:function(){var c=this;this.interval=window.setInterval(function(){c.checkExpand()},400)},stopExpand:function(){clearInterval(this.interval)},checkExpand:function(){if(this.dummy==null){this.dummy=b("<div></div>");this.dummy.css({"font-size":this.textarea.css("font-size"),"font-family":this.textarea.css("font-family"),width:this.textarea.css("width"),padding:this.textarea.css("padding"),"line-height":this.line_height+"px","overflow-x":"hidden",position:"absolute",top:0,left:-9999}).appendTo("body")}var c=this.textarea.val().replace(/(<|>)/g,"");if(b.browser.msie){c=c.replace(/\n/g,"<BR>new")}else{c=c.replace(/\n/g,"<br>new")}if(this.dummy.html()!=c){this.dummy.html(c);if(this.max_height>0&&(this.dummy.height()+this.line_height>this.max_height)){this.textarea.css("overflow-y","auto")}else{this.textarea.css("overflow-y","hidden");if(this.textarea.height()<this.dummy.height()+this.line_height||(this.dummy.height()<this.textarea.height())){this.textarea.animate({height:(this.dummy.height()+this.line_height)+"px"},100)}}}}})})(jQuery);
;
(function(a){a.fn.lightbox_me=function(b){var c={prefix:"lb",loaded:function(){},callback:function(){},opacity:0.6,zIndex:999,closeButton:"#close",overlayspeed:"slow",Lightboxspeed:"fast",scrollWithPage:true,show:"show",clickOverlayToClose:false,destroyOnClose:false};var d=a.extend(c,b);return this.each(function(){var j=(a.browser.msie&&a.browser.version<7);var l=a(this);var p=a('<div id="'+d.prefix+'_container"></div>');var o=a('<div class="'+d.prefix+'_overlay" id="'+d.prefix+'_overlay"></div>');var f=l.attr("id");if(j){a("select").css("visibility","hidden");l.find("select").css("visibility","visible")}p.append(l).append(o);a(document.body).append(p);var i=function(){return(document.documentElement.scrollTop||document.body.scrollTop)+"px"};var h=function(){var q={width:window.innerWidth||(window.document.documentElement.clientWidth||window.document.body.clientWidth),height:window.innerHeight||(window.document.documentElement.clientHeight||window.document.body.clientHeight)};return q};var k=function(){p.css({top:i()})};var n=function(q){if(q.keyCode==27||(q.DOM_VK_ESCAPE==27&&q.which==0)){m()}};var g=function(){var q=h();p.css({position:"absolute",width:"100%",height:q.height,top:(j)?i():0,left:0,right:0,bottom:0,zIndex:d.zIndex});if(d.scrollWithPage){p.css({position:(j)?"absolute":"fixed"})}var r=((!d.scrollWithPage)?a(document.body).height()+16:q.height);if(a(document.body).height()<l.height()){r=l.height()+80}o.css({position:"absolute",height:r,width:"100%",top:0,left:0,right:0,bottom:0});l.css({position:"absolute",top:"40px",left:"50%",marginLeft:(l.outerWidth()/2)*-1})};var e=function(){o.css({zIndex:d.zIndex,display:"none",opacity:d.opacity});l.css({zIndex:d.zIndex+1,display:"none"})};var m=function(){if(!d.destroyOnClose){a("body").prepend(l.hide())}else{l.remove()}if(j&&d.scrollWithPage){a(document.body).unbind("scroll",k)}a(window).unbind("resize",g).unbind("keypress",n);l.unbind("click",m);o.fadeOut("normal",function(){d.callback();if(j){a("select").css("visibility","visible")}p.remove()});return false};g();e();if(j&&d.scrollWithPage){a(window).scroll(k)}a(window).resize(g).keypress(n);l.find(d.closeButton).click(m);if(d.clickOverlayToClose){o.click(m)}l.bind("close",m);l.bind("reposition",g);o.fadeIn(d.overlayspeed);l[d.show](d.Lightboxspeed,d.loaded)})}})(jQuery);
;
(function(){var b;b=jQuery.fn.flash=function(g,f,d,i){var h=d||b.replace;f=b.copy(b.pluginOptions,f);if(!b.hasFlash(f.version)){if(f.expressInstall&&b.hasFlash(6,0,65)){var e={flashvars:{MMredirectURL:location,MMplayerType:"PlugIn",MMdoctitle:jQuery("title").text()}}}else{if(f.update){h=i||b.update}else{return this}}}g=b.copy(b.htmlOptions,e,g);return this.each(function(){h.call(this,b.copy(g))})};b.copy=function(){var f={},e={};for(var g=0;g<arguments.length;g++){var d=arguments[g];if(d==undefined){continue}jQuery.extend(f,d);if(d.flashvars==undefined){continue}jQuery.extend(e,d.flashvars)}f.flashvars=e;return f};b.hasFlash=function(){if(/hasFlash\=true/.test(location)){return true}if(/hasFlash\=false/.test(location)){return false}var e=b.hasFlash.playerVersion().match(/\d+/g);var f=String([arguments[0],arguments[1],arguments[2]]).match(/\d+/g)||String(b.pluginOptions.version).match(/\d+/g);for(var d=0;d<3;d++){e[d]=parseInt(e[d]||0);f[d]=parseInt(f[d]||0);if(e[d]<f[d]){return false}if(e[d]>f[d]){return true}}return true};b.hasFlash.playerVersion=function(){try{try{var d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");try{d.AllowScriptAccess="always"}catch(f){return"6,0,0"}}catch(f){}return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(f){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){return(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}}catch(f){}}return"0,0,0"};b.htmlOptions={height:240,flashvars:{},pluginspage:"http://www.adobe.com/go/getflashplayer",src:"#",type:"application/x-shockwave-flash",width:320};b.pluginOptions={expressInstall:false,update:true,version:"6.0.65"};b.replace=function(d){this.innerHTML='<div class="alt">'+this.innerHTML+"</div>";jQuery(this).addClass("flash-replaced").prepend(b.transform(d))};b.update=function(e){var d=String(location).split("?");d.splice(1,0,"?hasFlash=true&");d=d.join("");var f='<p>This content requires the Flash Player. <a href="http://www.adobe.com/go/getflashplayer">Download Flash Player</a>. Already have Flash Player? <a href="'+d+'">Click here.</a></p>';this.innerHTML='<span class="alt">'+this.innerHTML+"</span>";jQuery(this).addClass("flash-update").prepend(f)};function a(){var e="";for(var d in this){if(typeof this[d]!="function"){e+=d+'="'+this[d]+'" '}}return e}function c(){var e="";for(var d in this){if(typeof this[d]!="function"){e+=d+"="+encodeURIComponent(this[d])+"&"}}return e.replace(/&$/,"")}b.transform=function(d){d.toString=a;if(d.flashvars){d.flashvars.toString=c}return"<embed "+String(d)+"/>"};if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}})();
;
var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);
/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/
return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return}f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return}if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return}}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return}var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return}var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return}AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();
;
(function($){$.extend({metadata:{defaults:{type:"class",name:"metadata",cre:/({.*})/,single:"metadata"},setType:function(type,name){this.defaults.type=type;this.defaults.name=name},get:function(elem,opts){var settings=$.extend({},this.defaults,opts);if(!settings.single.length){settings.single="metadata"}var data=$.data(elem,settings.single);if(data){return data}data="{}";if(settings.type=="class"){var m=settings.cre.exec(elem.className);if(m){data=m[1]}}else{if(settings.type=="elem"){if(!elem.getElementsByTagName){return}var e=elem.getElementsByTagName(settings.name);if(e.length){data=$.trim(e[0].innerHTML)}}else{if(elem.getAttribute!=undefined){var attr=elem.getAttribute(settings.name);if(attr){data=attr}}}}if(data.indexOf("{")<0){data="{"+data+"}"}data=eval("("+data+")");$.data(elem,settings.single,data);return data}}});$.fn.metadata=function(opts){return $.metadata.get(this[0],opts)}})(jQuery);
;
(function(c){c.fn.media=function(m,l,n){return this.each(function(){if(typeof m=="function"){n=l;l=m;m={}}var w=g(this,m);if(typeof l=="function"){l(this,w)}var v=j();var p=v.exec(w.src)||[""];w.type?p[0]=w.type:p.shift();for(var u=0;u<p.length;u++){fn=p[u].toLowerCase();if(e(fn[0])){fn="fn"+fn}if(!c.fn.media[fn]){continue}var t=c.fn.media[fn+"_player"];if(!w.params){w.params={}}if(t){var s=t.autoplayAttr=="autostart";w.params[t.autoplayAttr||"autoplay"]=s?(w.autoplay?1:0):w.autoplay?true:false}var q=c.fn.media[fn](this,w);q.css("backgroundColor",w.bgColor).width(w.width);if(typeof n=="function"){n(this,q[0],w,t.name)}break}})};c.fn.media.mapFormat=function(m,l){if(!m||!l||!c.fn.media.defaults.players[l]){return}m=m.toLowerCase();if(e(m[0])){m="fn"+m}c.fn.media[m]=c.fn.media[l];c.fn.media[m+"_player"]=c.fn.media.defaults.players[l]};c.fn.media.defaults={width:400,height:400,autoplay:0,bgColor:"#ffffff",params:{wmode:"transparent"},attrs:{},flvKeyName:"file",flashvars:{},flashVersion:"7",expressInstaller:null,flvPlayer:"mediaplayer.swf",mp3Player:"mediaplayer.swf",silverlight:{inplaceInstallPrompt:"true",isWindowless:"true",framerate:"24",version:"0.9",onError:null,onLoad:null,initParams:null,userContext:null}};c.fn.media.defaults.players={flash:{name:"flash",types:"flv,mp3,swf",oAttrs:{classid:"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",type:"application/x-oleobject",codebase:"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+c.fn.media.defaults.flashVersion},eAttrs:{type:"application/x-shockwave-flash",pluginspage:"http://www.adobe.com/go/getflashplayer"}},quicktime:{name:"quicktime",types:"aif,aiff,aac,au,bmp,gsm,mov,mid,midi,mpg,mpeg,mp4,m4a,psd,qt,qtif,qif,qti,snd,tif,tiff,wav,3g2,3gp",oAttrs:{classid:"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B",codebase:"http://www.apple.com/qtactivex/qtplugin.cab"},eAttrs:{pluginspage:"http://www.apple.com/quicktime/download/"}},realplayer:{name:"real",types:"ra,ram,rm,rpm,rv,smi,smil",autoplayAttr:"autostart",oAttrs:{classid:"clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"},eAttrs:{type:"audio/x-pn-realaudio-plugin",pluginspage:"http://www.real.com/player/"}},winmedia:{name:"winmedia",types:"asx,asf,avi,wma,wmv",autoplayAttr:"autostart",oUrl:"url",oAttrs:{classid:"clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6",type:"application/x-oleobject"},eAttrs:{type:c.browser.mozilla&&k()?"application/x-ms-wmp":"application/x-mplayer2",pluginspage:"http://www.microsoft.com/Windows/MediaPlayer/"}},iframe:{name:"iframe",types:"html,pdf"},silverlight:{name:"silverlight",types:"xaml"}};function k(){var l=navigator.plugins;for(i=0;i<l.length;i++){var m=l[i];if(m.filename=="np-mswmp.dll"){return true}}return false}var a=1;for(var h in c.fn.media.defaults.players){var d=c.fn.media.defaults.players[h].types;c.each(d.split(","),function(l,m){if(e(m[0])){m="fn"+m}c.fn.media[m]=c.fn.media[h]=b(h);c.fn.media[m+"_player"]=c.fn.media.defaults.players[h]})}function j(){var m="";for(var l in c.fn.media.defaults.players){if(m.length){m+=","}m+=c.fn.media.defaults.players[l].types}return new RegExp("\\.("+m.replace(/,/g,"|")+")$\\b")}function b(l){return function(n,m){return f(n,m,l)}}function e(l){return"0123456789".indexOf(l)>-1}function g(n,y){y=y||{};var x=c(n);var v=n.className||"";var u=c.metadata?x.metadata():c.meta?x.data():{};u=u||{};var t=u.width||parseInt(((v.match(/w:(\d+)/)||[])[1]||0));var o=u.height||parseInt(((v.match(/h:(\d+)/)||[])[1]||0));if(t){u.width=t}if(o){u.height=o}if(v){u.cls=v}var s=c.fn.media.defaults;var r=y;var q=u;var m={params:{bgColor:y.bgColor||c.fn.media.defaults.bgColor}};var l=c.extend({},s,r,q);c.each(["attrs","params","flashvars","silverlight"],function(p,w){l[w]=c.extend({},m[w]||{},s[w]||{},r[w]||{},q[w]||{})});if(typeof l.caption=="undefined"){l.caption=x.text()}l.src=l.src||x.attr("href")||x.attr("src")||"unknown";return l}c.fn.media.swf=function(q,l){if(!window.SWFObject&&!window.swfobject){if(l.flashvars){var t=[];for(var r in l.flashvars){t.push(r+"="+l.flashvars[r])}if(!l.params){l.params={}}l.params.flashvars=t.join("&")}return f(q,l,"flash")}var n=q.id?(' id="'+q.id+'"'):"";var u=l.cls?(' class="'+l.cls+'"'):"";var s=c("<div"+n+u+">");if(window.swfobject){c(q).after(s).appendTo(s);if(!q.id){q.id="movie_player_"+a++}swfobject.embedSWF(l.src,q.id,l.width,l.height,l.flashVersion,l.expressInstaller,l.flashvars,l.params,l.attrs)}else{c(q).after(s).remove();var o=new SWFObject(l.src,"movie_player_"+a++,l.width,l.height,l.flashVersion,l.bgColor);if(l.expressInstaller){o.useExpressInstall(l.expressInstaller)}for(var m in l.params){if(m!="bgColor"){o.addParam(m,l.params[m])}}for(var r in l.flashvars){o.addVariable(r,l.flashvars[r])}o.write(s[0])}if(l.caption){c("<div>").appendTo(s).html(l.caption)}return s};c.fn.media.flv=c.fn.media.mp3=function(o,p){var q=p.src;var n=/\.mp3\b/i.test(q)?c.fn.media.defaults.mp3Player:c.fn.media.defaults.flvPlayer;var m=p.flvKeyName;q=encodeURIComponent(q);p.src=n;p.src=p.src+"?"+m+"="+(q);var l={};l[m]=q;p.flashvars=c.extend({},l,p.flashvars);return c.fn.media.swf(o,p)};c.fn.media.xaml=function(r,s){if(!window.Sys||!window.Sys.Silverlight){if(c.fn.media.xaml.warning){return}c.fn.media.xaml.warning=1;alert("You must include the Silverlight.js script.");return}var q={width:s.width,height:s.height,background:s.bgColor,inplaceInstallPrompt:s.silverlight.inplaceInstallPrompt,isWindowless:s.silverlight.isWindowless,framerate:s.silverlight.framerate,version:s.silverlight.version};var o={onError:s.silverlight.onError,onLoad:s.silverlight.onLoad};var p=r.id?(' id="'+r.id+'"'):"";var n=s.id||"AG"+a++;var m=s.cls?(' class="'+s.cls+'"'):"";var l=c("<div"+p+m+">");c(r).after(l).remove();Sys.Silverlight.createObjectEx({source:s.src,initParams:s.silverlight.initParams,userContext:s.silverlight.userContext,id:n,parentElement:l[0],properties:q,events:o});if(s.caption){c("<div>").appendTo(l).html(s.caption)}return l};function f(r,l,w){var A=c(r);var q=c.fn.media.defaults.players[w];if(w=="iframe"){var q=c('<iframe width="'+l.width+'" height="'+l.height+'" >');q.attr("src",l.src);q.css("backgroundColor",q.bgColor)}else{if(c.browser.msie){var u=['<object width="'+l.width+'" height="'+l.height+'" '];for(var x in l.attrs){u.push(x+'="'+l.attrs[x]+'" ')}for(var x in q.oAttrs||{}){var y=q.oAttrs[x];if(x=="codebase"&&window.location.protocol=="https"){y=y.replace("http","https")}u.push(x+'="'+y+'" ')}u.push("></object>");var n=['<param name="'+(q.oUrl||"src")+'" value="'+l.src+'">'];for(var x in l.params){n.push('<param name="'+x+'" value="'+l.params[x]+'">')}var q=document.createElement(u.join(""));for(var s=0;s<n.length;s++){q.appendChild(document.createElement(n[s]))}}else{var u=['<embed width="'+l.width+'" height="'+l.height+'" style="display:block"'];if(l.src){u.push(' src="'+l.src+'" ')}for(var x in l.attrs){u.push(x+'="'+l.attrs[x]+'" ')}for(var x in q.eAttrs||{}){u.push(x+'="'+q.eAttrs[x]+'" ')}for(var x in l.params){if(x!="wmode"){u.push(x+'="'+l.params[x]+'" ')}}u.push("></embed>")}}var m=r.id?(' id="'+r.id+'"'):"";var z=l.cls?(' class="'+l.cls+'"'):"";var t=c("<div"+m+z+">");A.after(t).remove();(c.browser.msie||w=="iframe")?t.append(q):t.html(u.join(""));if(l.caption){c("<div>").appendTo(t).html(l.caption)}return t}})(jQuery);
;
(function(a){a.bind=function(c,d){var b=Array.prototype.slice.call(arguments,2);if(b.length){return function(){var e=[this].concat(b,a.makeArray(arguments));return d.apply(c,e)}}else{return function(){var e=a.makeArray(arguments);return d.apply(c,e)}}}})(jQuery);
;
(function(){var a=false,b=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.$Class=function(){};$Class.extend=function(g){var f=this.prototype;a=true;var e=new this();a=false;for(var d in g){e[d]=typeof g[d]=="function"&&typeof f[d]=="function"&&b.test(g[d])?(function(h,i){return function(){var k=this._super;this._super=f[h];var j=i.apply(this,arguments);this._super=k;return j}})(d,g[d]):g[d]}function c(){if(!a&&this.init){this.init.apply(this,arguments)}}c.prototype=e;c.constructor=c;c.extend=arguments.callee;return c}})();
;
(function(a){a.extend(a.expr[":"],{icontains:function(c,d,b){return(c.textContent||c.innerText||jQuery(c).text()||"").toLowerCase().indexOf(b[3].toLowerCase())>=0}});a.iterators={getText:function(){return a(this).text()},parseInt:function(b){return parseInt(b,10)}};a.extend({range:function(){if(!arguments.length){return[]}var f,b,g;if(arguments.length==1){f=0;b=arguments[0]-1;g=1}else{f=arguments[0];b=arguments[1]-1;g=arguments[2]||1}if(g<0&&f>=b){g*=-1;var e=f;f=b;b=e;f+=((b-f)%g)}var c=[];for(var d=f;d<=b;d+=g){c.push(d)}return c},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},keyIs:function(b,c){return parseInt(a.keyCode[b.toUpperCase()],10)==parseInt((typeof(c)=="number")?c:c.keyCode,10)},keys:function(b){var c=[];for(k in b){c.push(k)}return c},redirect:function(b){window.location.href=b;return b},stop:function(d,c,b){if(c){d.preventDefault()}if(b){d.stopPropagation()}return c&&false||true},basename:function(c){var b=c.split("/");return b[b.length]===""&&s||b.slice(0,b.length).join("/")},filename:function(b){return b.split("/").pop()},filesizeformat:function(d,e){var c=parseInt(d,10);var f=e||["byte","bytes","KB","MB","GB"];if(isNaN(c)||c===0){return"0 "+f[0]}if(c==1){return"1 "+f[0]}if(c<1024){return c.toFixed(2)+" "+f[1]}if(c<1048576){return(c/1024).toFixed(2)+" "+f[2]}if(c<1073741824){return(c/1048576).toFixed(2)+" "+f[3]}else{return(c/1073741824).toFixed(2)+" "+f[4]}},fileExtension:function(b){var c=b.split(".");return c[c.length-1]||false},isString:function(b){return typeof(b)=="string"&&true||false},isRegExp:function(b){return b&&b.constructor.toString().indexOf("RegExp()")!=-1||false},isArray:function(b){if(!b){return false}return b.constructor&&Object.prototype.toString.apply(b.constructor.prototype)==="[object Array]"},isObject:function(b){return(typeof(b)=="object")},toCurrency:function(b){b=parseFloat(b,10).toFixed(2);return(b=="NaN")?"0.00":b},pxToEm:function(c,d){d=jQuery.extend({scope:"body",reverse:false},d);var g=(c==="")?0:parseFloat(c);var f;var e=function(){var i=document.documentElement;return self.innerWidth||(i&&i.clientWidth)||document.body.clientWidth};if(d.scope=="body"&&a.browser.msie&&(parseFloat(a("body").css("font-size"))/e()).toFixed(1)>0){var h=function(){return(parseFloat(a("body").css("font-size"))/e()).toFixed(3)*16};f=h()}else{f=parseFloat(jQuery(d.scope).css("font-size"))}var b=(d.reverse===true)?(g*f).toFixed(2)+"px":(g/f).toFixed(2)+"em";return b}});a.extend(a.fn,{selectRange:function(d,b){if(a(this).get(0).createTextRange){var c=a(this).get(0).createTextRange();c.collapse(true);c.moveEnd("character",b);c.moveStart("character",d);c.select()}else{if(a(this).get(0).setSelectionRange){a(this).bind("focus",function(f){f.preventDefault()}).get(0).setSelectionRange(d,b)}}return a(this)},equalHeights:function(b){a(this).each(function(){var c=0;a(this).children().each(function(d){if(a(this).height()>c){c=a(this).height()}});if(!b||!a.pxToEm){c=a.pxToEm(c)}if(a.browser.msie&&a.browser.version==6){a(this).children().css({height:c})}a(this).children().css({"min-height":c})});return this},delay:function(b,c){jQuery.fx.step.delay=function(){};return this.animate({delay:1},b,c)}})})(jQuery);
;
if(!window.CanvasRenderingContext2D){(function(){var q=Math;var r=q.round;var o=q.sin;var x=q.cos;var a=10;var k=a/2;var g={init:function(j){var m=j||document;if(/MSIE/.test(navigator.userAgent)&&!window.opera){var i=this;m.attachEvent("onreadystatechange",function(){i.init_(m)})}},init_:function(z){if(z.readyState=="complete"){if(!z.namespaces.g_vml_){z.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml")}var y=z.createStyleSheet();y.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}";var m=z.getElementsByTagName("canvas");for(var j=0;j<m.length;j++){if(!m[j].getContext){this.initElement(m[j])}}}},fixElement_:function(m){var z=m.outerHTML;var y=m.ownerDocument.createElement(z);if(z.slice(-2)!="/>"){var i="/"+m.tagName;var j;while((j=m.nextSibling)&&j.tagName!=i){j.removeNode()}if(j){j.removeNode()}}m.parentNode.replaceChild(y,m);return y},initElement:function(j){j=this.fixElement_(j);j.getContext=function(){if(this.context_){return this.context_}return this.context_=new l(this)};j.attachEvent("onpropertychange",w);j.attachEvent("onresize",b);var i=j.attributes;if(i.width&&i.width.specified){j.style.width=i.width.nodeValue+"px"}else{j.width=j.clientWidth}if(i.height&&i.height.specified){j.style.height=i.height.nodeValue+"px"}else{j.height=j.clientHeight}return j}};function w(j){var i=j.srcElement;switch(j.propertyName){case"width":i.style.width=i.attributes.width.nodeValue+"px";i.getContext().clearRect();break;case"height":i.style.height=i.attributes.height.nodeValue+"px";i.getContext().clearRect();break}}function b(j){var i=j.srcElement;if(i.firstChild){i.firstChild.style.width=i.clientWidth+"px";i.firstChild.style.height=i.clientHeight+"px"}}g.init();var d=[];for(var u=0;u<16;u++){for(var t=0;t<16;t++){d[u*16+t]=u.toString(16)+t.toString(16)}}function n(){return[[1,0,0],[0,1,0],[0,0,1]]}function e(A,m){var j=n();for(var i=0;i<3;i++){for(var D=0;D<3;D++){var B=0;for(var C=0;C<3;C++){B+=A[i][C]*m[C][D]}j[i][D]=B}}return j}function s(j,i){i.fillStyle=j.fillStyle;i.lineCap=j.lineCap;i.lineJoin=j.lineJoin;i.lineWidth=j.lineWidth;i.miterLimit=j.miterLimit;i.shadowBlur=j.shadowBlur;i.shadowColor=j.shadowColor;i.shadowOffsetX=j.shadowOffsetX;i.shadowOffsetY=j.shadowOffsetY;i.strokeStyle=j.strokeStyle;i.arcScaleX_=j.arcScaleX_;i.arcScaleY_=j.arcScaleY_}function c(m){var A,z=1;m=String(m);if(m.substring(0,3)=="rgb"){var C=m.indexOf("(",3);var j=m.indexOf(")",C+1);var B=m.substring(C+1,j).split(",");A="#";for(var y=0;y<3;y++){A+=d[Number(B[y])]}if((B.length==4)&&(m.substr(3,1)=="a")){z=B[3]}}else{A=m}return[A,z]}function p(i){switch(i){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function l(j){this.m_=n();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=a*1;this.globalAlpha=1;this.canvas=j;var i=j.ownerDocument.createElement("div");i.style.width=j.clientWidth+"px";i.style.height=j.clientHeight+"px";i.style.overflow="hidden";i.style.position="absolute";j.appendChild(i);this.element_=i;this.arcScaleX_=1;this.arcScaleY_=1}var h=l.prototype;h.clearRect=function(){this.element_.innerHTML="";this.currentPath_=[]};h.beginPath=function(){this.currentPath_=[]};h.moveTo=function(j,i){this.currentPath_.push({type:"moveTo",x:j,y:i});this.currentX_=j;this.currentY_=i};h.lineTo=function(j,i){this.currentPath_.push({type:"lineTo",x:j,y:i});this.currentX_=j;this.currentY_=i};h.bezierCurveTo=function(m,i,A,z,y,j){this.currentPath_.push({type:"bezierCurveTo",cp1x:m,cp1y:i,cp2x:A,cp2y:z,x:y,y:j});this.currentX_=y;this.currentY_=j};h.quadraticCurveTo=function(C,B,A,z){var j=this.currentX_+2/3*(C-this.currentX_);var i=this.currentY_+2/3*(B-this.currentY_);var y=j+(A-this.currentX_)/3;var m=i+(z-this.currentY_)/3;this.bezierCurveTo(j,i,y,m,A,z)};h.arc=function(B,z,A,y,j,m){A*=a;var F=m?"at":"wa";var C=B+(x(y)*A)-k;var E=z+(o(y)*A)-k;var i=B+(x(j)*A)-k;var D=z+(o(j)*A)-k;if(C==i&&!m){C+=0.125}this.currentPath_.push({type:F,x:B,y:z,radius:A,xStart:C,yStart:E,xEnd:i,yEnd:D})};h.rect=function(m,j,i,y){this.moveTo(m,j);this.lineTo(m+i,j);this.lineTo(m+i,j+y);this.lineTo(m,j+y);this.closePath()};h.strokeRect=function(m,j,i,y){this.beginPath();this.moveTo(m,j);this.lineTo(m+i,j);this.lineTo(m+i,j+y);this.lineTo(m,j+y);this.closePath();this.stroke()};h.fillRect=function(m,j,i,y){this.beginPath();this.moveTo(m,j);this.lineTo(m+i,j);this.lineTo(m+i,j+y);this.lineTo(m,j+y);this.closePath();this.fill()};h.createLinearGradient=function(j,y,i,m){var z=new v("gradient");return z};h.createRadialGradient=function(y,A,m,j,z,i){var B=new v("gradientradial");B.radius1_=m;B.radius2_=i;B.focus_.x=y;B.focus_.y=A;return B};h.drawImage=function(L,m){var D,B,F,S,J,G,N,U;var E=L.runtimeStyle.width;var K=L.runtimeStyle.height;L.runtimeStyle.width="auto";L.runtimeStyle.height="auto";var C=L.width;var Q=L.height;L.runtimeStyle.width=E;L.runtimeStyle.height=K;if(arguments.length==3){D=arguments[1];B=arguments[2];J=G=0;N=F=C;U=S=Q}else{if(arguments.length==5){D=arguments[1];B=arguments[2];F=arguments[3];S=arguments[4];J=G=0;N=C;U=Q}else{if(arguments.length==9){J=arguments[1];G=arguments[2];N=arguments[3];U=arguments[4];D=arguments[5];B=arguments[6];F=arguments[7];S=arguments[8]}else{throw"Invalid number of arguments"}}}var T=this.getCoords_(D,B);var y=N/2;var j=U/2;var R=[];var i=10;var A=10;R.push(" <g_vml_:group",' coordsize="',a*i,",",a*A,'"',' coordorigin="0,0"',' style="width:',i,";height:",A,";position:absolute;");if(this.m_[0][0]!=1||this.m_[0][1]){var z=[];z.push("M11='",this.m_[0][0],"',","M12='",this.m_[1][0],"',","M21='",this.m_[0][1],"',","M22='",this.m_[1][1],"',","Dx='",r(T.x/a),"',","Dy='",r(T.y/a),"'");var P=T;var O=this.getCoords_(D+F,B);var M=this.getCoords_(D,B+S);var I=this.getCoords_(D+F,B+S);P.x=Math.max(P.x,O.x,M.x,I.x);P.y=Math.max(P.y,O.y,M.y,I.y);R.push("padding:0 ",r(P.x/a),"px ",r(P.y/a),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",z.join(""),", sizingmethod='clip');")}else{R.push("top:",r(T.y/a),"px;left:",r(T.x/a),"px;")}R.push(' ">','<g_vml_:image src="',L.src,'"',' style="width:',a*F,";"," height:",a*S,';"',' cropleft="',J/C,'"',' croptop="',G/Q,'"',' cropright="',(C-J-N)/C,'"',' cropbottom="',(Q-G-U)/Q,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",R.join(""))};h.stroke=function(V){var C=[];var B=false;var Z=c(V?this.fillStyle:this.strokeStyle);var R=Z[0];var y=Z[1]*this.globalAlpha;var m=10;var G=10;C.push("<g_vml_:shape",' fillcolor="',R,'"',' filled="',Boolean(V),'"',' style="position:absolute;width:',m,";height:",G,';"',' coordorigin="0 0" coordsize="',a*m," ",a*G,'"',' stroked="',!V,'"',' strokeweight="',this.lineWidth,'"',' strokecolor="',R,'"',' path="');var F=false;var Q={x:null,y:null};var S={x:null,y:null};for(var T=0;T<this.currentPath_.length;T++){var M=this.currentPath_[T];if(M.type=="moveTo"){C.push(" m ");var Y=this.getCoords_(M.x,M.y);C.push(r(Y.x),",",r(Y.y))}else{if(M.type=="lineTo"){C.push(" l ");var Y=this.getCoords_(M.x,M.y);C.push(r(Y.x),",",r(Y.y))}else{if(M.type=="close"){C.push(" x ")}else{if(M.type=="bezierCurveTo"){C.push(" c ");var Y=this.getCoords_(M.x,M.y);var P=this.getCoords_(M.cp1x,M.cp1y);var N=this.getCoords_(M.cp2x,M.cp2y);C.push(r(P.x),",",r(P.y),",",r(N.x),",",r(N.y),",",r(Y.x),",",r(Y.y))}else{if(M.type=="at"||M.type=="wa"){C.push(" ",M.type," ");var Y=this.getCoords_(M.x,M.y);var I=this.getCoords_(M.xStart,M.yStart);var A=this.getCoords_(M.xEnd,M.yEnd);C.push(r(Y.x-this.arcScaleX_*M.radius),",",r(Y.y-this.arcScaleY_*M.radius)," ",r(Y.x+this.arcScaleX_*M.radius),",",r(Y.y+this.arcScaleY_*M.radius)," ",r(I.x),",",r(I.y)," ",r(A.x),",",r(A.y))}}}}}if(Y){if(Q.x==null||Y.x<Q.x){Q.x=Y.x}if(S.x==null||Y.x>S.x){S.x=Y.x}if(Q.y==null||Y.y<Q.y){Q.y=Y.y}if(S.y==null||Y.y>S.y){S.y=Y.y}}}C.push(' ">');if(typeof this.fillStyle=="object"){var L={x:"50%",y:"50%"};var O=(S.x-Q.x);var J=(S.y-Q.y);var X=(O>J)?O:J;L.x=r((this.fillStyle.focus_.x/O)*100+50)+"%";L.y=r((this.fillStyle.focus_.y/J)*100+50)+"%";var E=[];if(this.fillStyle.type_=="gradientradial"){var U=(this.fillStyle.radius1_/X*100);var K=(this.fillStyle.radius2_/X*100)-U}else{var U=0;var K=100}var j={offset:null,color:null};var z={offset:null,color:null};this.fillStyle.colors_.sort(function(H,i){return H.offset-i.offset});for(var T=0;T<this.fillStyle.colors_.length;T++){var D=this.fillStyle.colors_[T];E.push((D.offset*K)+U,"% ",D.color,",");if(D.offset>j.offset||j.offset==null){j.offset=D.offset;j.color=D.color}if(D.offset<z.offset||z.offset==null){z.offset=D.offset;z.color=D.color}}E.pop();C.push("<g_vml_:fill",' color="',z.color,'"',' color2="',j.color,'"',' type="',this.fillStyle.type_,'"',' focusposition="',L.x,", ",L.y,'"',' colors="',E.join(""),'"',' opacity="',y,'" />')}else{if(V){C.push('<g_vml_:fill color="',R,'" opacity="',y,'" />')}else{C.push("<g_vml_:stroke",' opacity="',y,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit,'"',' endcap="',p(this.lineCap),'"',' weight="',this.lineWidth,'px"',' color="',R,'" />')}}C.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",C.join(""))};h.fill=function(){this.stroke(true)};h.closePath=function(){this.currentPath_.push({type:"close"})};h.getCoords_=function(j,i){return{x:a*(j*this.m_[0][0]+i*this.m_[1][0]+this.m_[2][0])-k,y:a*(j*this.m_[0][1]+i*this.m_[1][1]+this.m_[2][1])-k}};h.save=function(){var i={};s(this,i);this.aStack_.push(i);this.mStack_.push(this.m_);this.m_=e(n(),this.m_)};h.restore=function(){s(this.aStack_.pop(),this);this.m_=this.mStack_.pop()};h.translate=function(m,j){var i=[[1,0,0],[0,1,0],[m,j,1]];this.m_=e(i,this.m_)};h.rotate=function(j){var y=x(j);var m=o(j);var i=[[y,m,0],[-m,y,0],[0,0,1]];this.m_=e(i,this.m_)};h.scale=function(m,j){this.arcScaleX_*=m;this.arcScaleY_*=j;var i=[[m,0,0],[0,j,0],[0,0,1]];this.m_=e(i,this.m_)};h.clip=function(){};h.arcTo=function(){};h.createPattern=function(){return new f};function v(i){this.type_=i;this.radius1_=0;this.radius2_=0;this.colors_=[];this.focus_={x:0,y:0}}v.prototype.addColorStop=function(j,i){i=c(i);this.colors_.push({offset:1-j,color:i})};function f(){}G_vmlCanvasManager=g;CanvasRenderingContext2D=l;CanvasGradient=v;CanvasPattern=f})()};
;
(function(f){function d(ao,G,H){var y=[],O={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:true,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:0.85},xaxis:{mode:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,tickDecimals:null,tickSize:null,minTickSize:null,monthNames:null,timeformat:null},yaxis:{autoscaleMargin:0.02},x2axis:{autoscaleMargin:null},y2axis:{autoscaleMargin:0.02},points:{show:false,radius:3,lineWidth:2,fill:true,fillColor:"#ffffff"},lines:{show:false,lineWidth:2,fill:false,fillColor:null},bars:{show:false,lineWidth:2,barWidth:1,fill:true,fillColor:null,align:"left"},grid:{color:"#545454",backgroundColor:null,tickColor:"#dddddd",labelMargin:5,borderWidth:2,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:false,hoverable:false,autoHighlight:true,mouseActiveRadius:10},selection:{mode:null,color:"#e8cfac"},shadowSize:4},z=null,ap=null,aq=null,I=null,ay=null,m=ao,aa={xaxis:{},yaxis:{},x2axis:{},y2axis:{}},M={left:0,right:0,top:0,bottom:0},ai=0,B=0,p=0,ab=0,u={};this.setData=N;this.setupGrid=S;this.draw=av;this.clearSelection=j;this.setSelection=ac;this.getCanvas=function(){return z};this.getPlotOffset=function(){return M};this.getData=function(){return y};this.getAxes=function(){return aa};this.highlight=at;this.unhighlight=ah;Y(H);N(G);K();S();av();function N(az){y=w(az);E();T()}function w(aD){var aB=[];for(var aA=0;aA<aD.length;++aA){var aC;if(aD[aA].data){aC={};for(var az in aD[aA]){aC[az]=aD[aA][az]}}else{aC={data:aD[aA]}}aB.push(aC)}return aB}function Y(az){f.extend(true,O,az);if(O.xaxis.noTicks&&O.xaxis.ticks==null){O.xaxis.ticks=O.xaxis.noTicks}if(O.yaxis.noTicks&&O.yaxis.ticks==null){O.yaxis.ticks=O.yaxis.noTicks}if(O.grid.coloredAreas){O.grid.markings=O.grid.coloredAreas}if(O.grid.coloredAreasColor){O.grid.markingsColor=O.grid.coloredAreasColor}}function E(){var aE;var aJ=y.length,az=[],aC=[];for(aE=0;aE<y.length;++aE){var aI=y[aE].color;if(aI!=null){--aJ;if(typeof aI=="number"){aC.push(aI)}else{az.push(e(y[aE].color))}}}for(aE=0;aE<aC.length;++aE){aJ=Math.max(aJ,aC[aE]+1)}var aA=[],aD=0;aE=0;while(aA.length<aJ){var aH;if(O.colors.length==aE){aH=new g(100,100,100)}else{aH=e(O.colors[aE])}var aB=aD%2==1?-1:1;var aG=1+aB*Math.ceil(aD/2)*0.2;aH.scale(aG,aG,aG);aA.push(aH);++aE;if(aE>=O.colors.length){aE=0;++aD}}var aF=0,aK;for(aE=0;aE<y.length;++aE){aK=y[aE];if(aK.color==null){aK.color=aA[aF].toString();++aF}else{if(typeof aK.color=="number"){aK.color=aA[aK.color].toString()}}aK.lines=f.extend(true,{},O.lines,aK.lines);aK.points=f.extend(true,{},O.points,aK.points);aK.bars=f.extend(true,{},O.bars,aK.bars);if(aK.shadowSize==null){aK.shadowSize=O.shadowSize}if(aK.xaxis&&aK.xaxis==2){aK.xaxis=aa.x2axis}else{aK.xaxis=aa.xaxis}if(aK.yaxis&&aK.yaxis==2){aK.yaxis=aa.y2axis}else{aK.yaxis=aa.yaxis}}}function T(){var aB=Number.POSITIVE_INFINITY,aA=Number.NEGATIVE_INFINITY,aC;for(aC in aa){aa[aC].datamin=aB;aa[aC].datamax=aA;aa[aC].used=false}for(var aF=0;aF<y.length;++aF){var aE=y[aF].data,aK=y[aF].xaxis,aJ=y[aF].yaxis,az=0,aI=0;if(y[aF].bars.show){az=y[aF].bars.align=="left"?0:-y[aF].bars.barWidth/2;aI=az+y[aF].bars.barWidth}aK.used=aJ.used=true;for(var aD=0;aD<aE.length;++aD){if(aE[aD]==null){continue}var aH=aE[aD][0],aG=aE[aD][1];if(aH!=null&&!isNaN(aH=+aH)){if(aH+az<aK.datamin){aK.datamin=aH+az}if(aH+aI>aK.datamax){aK.datamax=aH+aI}}if(aG!=null&&!isNaN(aG=+aG)){if(aG<aJ.datamin){aJ.datamin=aG}if(aG>aJ.datamax){aJ.datamax=aG}}if(aH==null||aG==null||isNaN(aH)||isNaN(aG)){aE[aD]=null}}}for(aC in aa){if(aa[aC].datamin==aB){aa[aC].datamin=0}if(aa[aC].datamax==aA){aa[aC].datamax=1}}}function K(){ai=m.width();B=m.height();m.html("");m.css("position","relative");if(ai<=0||B<=0){throw"Invalid dimensions for plot, width = "+ai+", height = "+B}z=f('<canvas width="'+ai+'" height="'+B+'"></canvas>').appendTo(m).get(0);if(f.browser.msie){z=window.G_vmlCanvasManager.initElement(z)}I=z.getContext("2d");ap=f('<canvas style="position:absolute;left:0px;top:0px;" width="'+ai+'" height="'+B+'"></canvas>').appendTo(m).get(0);if(f.browser.msie){ap=window.G_vmlCanvasManager.initElement(ap)}ay=ap.getContext("2d");aq=f([ap,z]);if(O.selection.mode!=null||O.grid.hoverable){aq.each(function(){this.onmousemove=k});if(O.selection.mode!=null){aq.mousedown(an)}}if(O.grid.clickable){aq.click(L)}}function S(){function az(aC,aB){s(aC,aB);n(aC,aB);W(aC,aB);if(aC==aa.xaxis||aC==aa.x2axis){aC.p2c=function(aD){return(aD-aC.min)*aC.scale};aC.c2p=function(aD){return aC.min+aD/aC.scale}}else{aC.p2c=function(aD){return(aC.max-aD)*aC.scale};aC.c2p=function(aD){return aC.max-aD/aC.scale}}}for(var aA in aa){az(aa[aA],O[aA])}ax();P();aw()}function s(aC,aE){var aB=aE.min!=null?aE.min:aC.datamin;var az=aE.max!=null?aE.max:aC.datamax;if(az-aB==0){var aA;if(az==0){aA=1}else{aA=0.01}aB-=aA;az+=aA}else{var aD=aE.autoscaleMargin;if(aD!=null){if(aE.min==null){aB-=(az-aB)*aD;if(aB<0&&aC.datamin>=0){aB=0}}if(aE.max==null){az+=(az-aB)*aD;if(az>0&&aC.datamax<=0){az=0}}}}aC.min=aB;aC.max=az}function n(aE,aH){var aD;if(typeof aH.ticks=="number"&&aH.ticks>0){aD=aH.ticks}else{if(aE==aa.xaxis||aE==aa.x2axis){aD=ai/100}else{aD=B/60}}var aM=(aE.max-aE.min)/aD;var aP,aI,aK,aL,aG,aB,aA;if(aH.mode=="time"){function aO(aW,aQ,aS){var aR=function(aY){aY=""+aY;return aY.length==1?"0"+aY:aY};var aV=[];var aU=false;if(aS==null){aS=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}for(var aT=0;aT<aQ.length;++aT){var aX=aQ.charAt(aT);if(aU){switch(aX){case"h":aX=""+aW.getUTCHours();break;case"H":aX=aR(aW.getUTCHours());break;case"M":aX=aR(aW.getUTCMinutes());break;case"S":aX=aR(aW.getUTCSeconds());break;case"d":aX=""+aW.getUTCDate();break;case"m":aX=""+(aW.getUTCMonth()+1);break;case"y":aX=""+aW.getUTCFullYear();break;case"b":aX=""+aS[aW.getUTCMonth()];break}aV.push(aX);aU=false}else{if(aX=="%"){aU=true}else{aV.push(aX)}}}return aV.join("")}var aJ={second:1000,minute:60*1000,hour:60*60*1000,day:24*60*60*1000,month:30*24*60*60*1000,year:365.2425*24*60*60*1000};var aN=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[0.25,"month"],[0.5,"month"],[1,"month"],[2,"month"],[3,"month"],[6,"month"],[1,"year"]];var aC=0;if(aH.minTickSize!=null){if(typeof aH.tickSize=="number"){aC=aH.tickSize}else{aC=aH.minTickSize[0]*aJ[aH.minTickSize[1]]}}for(aG=0;aG<aN.length-1;++aG){if(aM<(aN[aG][0]*aJ[aN[aG][1]]+aN[aG+1][0]*aJ[aN[aG+1][1]])/2&&aN[aG][0]*aJ[aN[aG][1]]>=aC){break}}aP=aN[aG][0];aK=aN[aG][1];if(aK=="year"){aB=Math.pow(10,Math.floor(Math.log(aM/aJ.year)/Math.LN10));aA=(aM/aJ.year)/aB;if(aA<1.5){aP=1}else{if(aA<3){aP=2}else{if(aA<7.5){aP=5}else{aP=10}}}aP*=aB}if(aH.tickSize){aP=aH.tickSize[0];aK=aH.tickSize[1]}aI=function(aS){var aX=[],aV=aS.tickSize[0],aY=aS.tickSize[1],aW=new Date(aS.min);var aR=aV*aJ[aY];if(aY=="second"){aW.setUTCSeconds(c(aW.getUTCSeconds(),aV))}if(aY=="minute"){aW.setUTCMinutes(c(aW.getUTCMinutes(),aV))}if(aY=="hour"){aW.setUTCHours(c(aW.getUTCHours(),aV))}if(aY=="month"){aW.setUTCMonth(c(aW.getUTCMonth(),aV))}if(aY=="year"){aW.setUTCFullYear(c(aW.getUTCFullYear(),aV))}aW.setUTCMilliseconds(0);if(aR>=aJ.minute){aW.setUTCSeconds(0)}if(aR>=aJ.hour){aW.setUTCMinutes(0)}if(aR>=aJ.day){aW.setUTCHours(0)}if(aR>=aJ.day*4){aW.setUTCDate(1)}if(aR>=aJ.year){aW.setUTCMonth(0)}var a0=0,aZ=Number.NaN,aT;do{aT=aZ;aZ=aW.getTime();aX.push({v:aZ,label:aS.tickFormatter(aZ,aS)});if(aY=="month"){if(aV<1){aW.setUTCDate(1);var aQ=aW.getTime();aW.setUTCMonth(aW.getUTCMonth()+1);var aU=aW.getTime();aW.setTime(aZ+a0*aJ.hour+(aU-aQ)*aV);a0=aW.getUTCHours();aW.setUTCHours(0)}else{aW.setUTCMonth(aW.getUTCMonth()+aV)}}else{if(aY=="year"){aW.setUTCFullYear(aW.getUTCFullYear()+aV)}else{aW.setTime(aZ+aR)}}}while(aZ<aS.max&&aZ!=aT);return aX};aL=function(aQ,aT){var aU=new Date(aQ);if(aH.timeformat!=null){return aO(aU,aH.timeformat,aH.monthNames)}var aR=aT.tickSize[0]*aJ[aT.tickSize[1]];var aS=aT.max-aT.min;if(aR<aJ.minute){fmt="%h:%M:%S"}else{if(aR<aJ.day){if(aS<2*aJ.day){fmt="%h:%M"}else{fmt="%b %d %h:%M"}}else{if(aR<aJ.month){fmt="%b %d"}else{if(aR<aJ.year){if(aS<aJ.year){fmt="%b"}else{fmt="%b %y"}}else{fmt="%y"}}}}return aO(aU,fmt,aH.monthNames)}}else{var az=aH.tickDecimals;var aF=-Math.floor(Math.log(aM)/Math.LN10);if(az!=null&&aF>az){aF=az}aB=Math.pow(10,-aF);aA=aM/aB;if(aA<1.5){aP=1}else{if(aA<3){aP=2;if(aA>2.25&&(az==null||aF+1<=az)){aP=2.5;++aF}}else{if(aA<7.5){aP=5}else{aP=10}}}aP*=aB;if(aH.minTickSize!=null&&aP<aH.minTickSize){aP=aH.minTickSize}if(aH.tickSize!=null){aP=aH.tickSize}aE.tickDecimals=Math.max(0,(az!=null)?az:aF);aI=function(aS){var aU=[];var aV=c(aS.min,aS.tickSize),aR=0,aQ=Number.NaN,aT;do{aT=aQ;aQ=aV+aR*aS.tickSize;aU.push({v:aQ,label:aS.tickFormatter(aQ,aS)});++aR}while(aQ<aS.max&&aQ!=aT);return aU};aL=function(aQ,aR){return aQ.toFixed(aR.tickDecimals)}}aE.tickSize=aK?[aP,aK]:aP;aE.tickGenerator=aI;if(f.isFunction(aH.tickFormatter)){aE.tickFormatter=function(aQ,aR){return""+aH.tickFormatter(aQ,aR)}}else{aE.tickFormatter=aL}if(aH.labelWidth!=null){aE.labelWidth=aH.labelWidth}if(aH.labelHeight!=null){aE.labelHeight=aH.labelHeight}}function W(aD,aF){aD.ticks=[];if(!aD.used){return}if(aF.ticks==null){aD.ticks=aD.tickGenerator(aD)}else{if(typeof aF.ticks=="number"){if(aF.ticks>0){aD.ticks=aD.tickGenerator(aD)}}else{if(aF.ticks){var aE=aF.ticks;if(f.isFunction(aE)){aE=aE({min:aD.min,max:aD.max})}var aC,az;for(aC=0;aC<aE.length;++aC){var aA=null;var aB=aE[aC];if(typeof aB=="object"){az=aB[0];if(aB.length>1){aA=aB[1]}}else{az=aB}if(aA==null){aA=aD.tickFormatter(az,aD)}aD.ticks[aC]={v:az,label:aA}}}}}if(aF.autoscaleMargin!=null&&aD.ticks.length>0){if(aF.min==null){aD.min=Math.min(aD.min,aD.ticks[0].v)}if(aF.max==null&&aD.ticks.length>1){aD.max=Math.min(aD.max,aD.ticks[aD.ticks.length-1].v)}}}function ax(){function aA(aD){if(aD.labelWidth==null){aD.labelWidth=ai/6}if(aD.labelHeight==null){labels=[];for(i=0;i<aD.ticks.length;++i){l=aD.ticks[i].label;if(l){labels.push('<div class="tickLabel" style="float:left;width:'+aD.labelWidth+'px">'+l+"</div>")}}aD.labelHeight=0;if(labels.length>0){var aC=f('<div style="position:absolute;top:-10000px;width:10000px;font-size:smaller">'+labels.join("")+'<div style="clear:left"></div></div>').appendTo(m);aD.labelHeight=aC.height();aC.remove()}}}function az(aF){if(aF.labelWidth==null||aF.labelHeight==null){var aE,aG=[],aD;for(aE=0;aE<aF.ticks.length;++aE){aD=aF.ticks[aE].label;if(aD){aG.push('<div class="tickLabel">'+aD+"</div>")}}if(aG.length>0){var aC=f('<div style="position:absolute;top:-10000px;font-size:smaller">'+aG.join("")+"</div>").appendTo(m);if(aF.labelWidth==null){aF.labelWidth=aC.width()}if(aF.labelHeight==null){aF.labelHeight=aC.find("div").height()}aC.remove()}if(aF.labelWidth==null){aF.labelWidth=0}if(aF.labelHeight==null){aF.labelHeight=0}}}aA(aa.xaxis);az(aa.yaxis);aA(aa.x2axis);az(aa.y2axis);var aB=O.grid.borderWidth/2;for(i=0;i<y.length;++i){aB=Math.max(aB,2*(y[i].points.radius+y[i].points.lineWidth/2))}M.left=M.right=M.top=M.bottom=aB;if(aa.xaxis.labelHeight>0){M.bottom=Math.max(aB,aa.xaxis.labelHeight+O.grid.labelMargin)}if(aa.yaxis.labelWidth>0){M.left=Math.max(aB,aa.yaxis.labelWidth+O.grid.labelMargin)}if(aa.x2axis.labelHeight>0){M.top=Math.max(aB,aa.x2axis.labelHeight+O.grid.labelMargin)}if(aa.y2axis.labelWidth>0){M.right=Math.max(aB,aa.y2axis.labelWidth+O.grid.labelMargin)}p=ai-M.left-M.right;ab=B-M.bottom-M.top;aa.xaxis.scale=p/(aa.xaxis.max-aa.xaxis.min);aa.yaxis.scale=ab/(aa.yaxis.max-aa.yaxis.min);aa.x2axis.scale=p/(aa.x2axis.max-aa.x2axis.min);aa.y2axis.scale=ab/(aa.y2axis.max-aa.y2axis.min)}function av(){C();for(var az=0;az<y.length;az++){ak(y[az])}}function x(aA,aG){var aD=aG+"axis",az=aG+"2axis",aC,aF,aE,aB;if(aA[aD]){aC=aa[aD];aF=aA[aD].from;aE=aA[aD].to}else{if(aA[az]){aC=aa[az];aF=aA[az].from;aE=aA[az].to}else{aC=aa[aD];aF=aA[aG+"1"];aE=aA[aG+"2"]}}if(aF!=null&&aE!=null&&aF>aE){return{from:aE,to:aF,axis:aC}}return{from:aF,to:aE,axis:aC}}function C(){var aD;I.save();I.clearRect(0,0,ai,B);I.translate(M.left,M.top);if(O.grid.backgroundColor){I.fillStyle=O.grid.backgroundColor;I.fillRect(0,0,p,ab)}if(O.grid.markings){var aA=O.grid.markings;if(f.isFunction(aA)){aA=aA({xmin:aa.xaxis.min,xmax:aa.xaxis.max,ymin:aa.yaxis.min,ymax:aa.yaxis.max,xaxis:aa.xaxis,yaxis:aa.yaxis,x2axis:aa.x2axis,y2axis:aa.y2axis})}for(aD=0;aD<aA.length;++aD){var az=aA[aD],aF=x(az,"x"),aC=x(az,"y");if(aF.from==null){aF.from=aF.axis.min}if(aF.to==null){aF.to=aF.axis.max}if(aC.from==null){aC.from=aC.axis.min}if(aC.to==null){aC.to=aC.axis.max}if(aF.to<aF.axis.min||aF.from>aF.axis.max||aC.to<aC.axis.min||aC.from>aC.axis.max){continue}aF.from=Math.max(aF.from,aF.axis.min);aF.to=Math.min(aF.to,aF.axis.max);aC.from=Math.max(aC.from,aC.axis.min);aC.to=Math.min(aC.to,aC.axis.max);if(aF.from==aF.to&&aC.from==aC.to){continue}aF.from=aF.axis.p2c(aF.from);aF.to=aF.axis.p2c(aF.to);aC.from=aC.axis.p2c(aC.from);aC.to=aC.axis.p2c(aC.to);if(aF.from==aF.to||aC.from==aC.to){I.strokeStyle=az.color||O.grid.markingsColor;I.lineWidth=az.lineWidth||O.grid.markingsLineWidth;I.moveTo(Math.floor(aF.from),Math.floor(aC.from));I.lineTo(Math.floor(aF.to),Math.floor(aC.to));I.stroke()}else{I.fillStyle=az.color||O.grid.markingsColor;I.fillRect(Math.floor(aF.from),Math.floor(aC.to),Math.floor(aF.to-aF.from),Math.floor(aC.from-aC.to))}}}I.lineWidth=1;I.strokeStyle=O.grid.tickColor;I.beginPath();var aB,aE=aa.xaxis;for(aD=0;aD<aE.ticks.length;++aD){aB=aE.ticks[aD].v;if(aB<=aE.min||aB>=aa.xaxis.max){continue}I.moveTo(Math.floor(aE.p2c(aB))+I.lineWidth/2,0);I.lineTo(Math.floor(aE.p2c(aB))+I.lineWidth/2,ab)}aE=aa.yaxis;for(aD=0;aD<aE.ticks.length;++aD){aB=aE.ticks[aD].v;if(aB<=aE.min||aB>=aE.max){continue}I.moveTo(0,Math.floor(aE.p2c(aB))+I.lineWidth/2);I.lineTo(p,Math.floor(aE.p2c(aB))+I.lineWidth/2)}aE=aa.x2axis;for(aD=0;aD<aE.ticks.length;++aD){aB=aE.ticks[aD].v;if(aB<=aE.min||aB>=aE.max){continue}I.moveTo(Math.floor(aE.p2c(aB))+I.lineWidth/2,-5);I.lineTo(Math.floor(aE.p2c(aB))+I.lineWidth/2,5)}aE=aa.y2axis;for(aD=0;aD<aE.ticks.length;++aD){aB=aE.ticks[aD].v;if(aB<=aE.min||aB>=aE.max){continue}I.moveTo(p-5,Math.floor(aE.p2c(aB))+I.lineWidth/2);I.lineTo(p+5,Math.floor(aE.p2c(aB))+I.lineWidth/2)}I.stroke();if(O.grid.borderWidth){I.lineWidth=O.grid.borderWidth;I.strokeStyle=O.grid.color;I.lineJoin="round";I.strokeRect(0,0,p,ab)}I.restore()}function P(){m.find(".tickLabels").remove();var az='<div class="tickLabels" style="font-size:smaller;color:'+O.grid.color+'">';function aA(aD,aE){for(var aC=0;aC<aD.ticks.length;++aC){var aB=aD.ticks[aC];if(!aB.label||aB.v<aD.min||aB.v>aD.max){continue}az+=aE(aB,aD)}}aA(aa.xaxis,function(aB,aC){return'<div style="position:absolute;top:'+(M.top+ab+O.grid.labelMargin)+"px;left:"+(M.left+aC.p2c(aB.v)-aC.labelWidth/2)+"px;width:"+aC.labelWidth+'px;text-align:center" class="tickLabel">'+aB.label+"</div>"});aA(aa.yaxis,function(aB,aC){return'<div style="position:absolute;top:'+(M.top+aC.p2c(aB.v)-aC.labelHeight/2)+"px;right:"+(M.right+p+O.grid.labelMargin)+"px;width:"+aC.labelWidth+'px;text-align:right" class="tickLabel">'+aB.label+"</div>"});aA(aa.x2axis,function(aB,aC){return'<div style="position:absolute;bottom:'+(M.bottom+ab+O.grid.labelMargin)+"px;left:"+(M.left+aC.p2c(aB.v)-aC.labelWidth/2)+"px;width:"+aC.labelWidth+'px;text-align:center" class="tickLabel">'+aB.label+"</div>"});aA(aa.y2axis,function(aB,aC){return'<div style="position:absolute;top:'+(M.top+aC.p2c(aB.v)-aC.labelHeight/2)+"px;left:"+(M.left+p+O.grid.labelMargin)+"px;width:"+aC.labelWidth+'px;text-align:left" class="tickLabel">'+aB.label+"</div>"});az+="</div>";m.append(az)}function ak(az){if(az.lines.show||(!az.bars.show&&!az.points.show)){J(az)}if(az.bars.show){U(az)}if(az.points.show){V(az)}}function J(aB){function aA(aK,aI,aO,aN){var aH,aP=null,aE=null,aQ=null;I.beginPath();for(var aJ=0;aJ<aK.length;++aJ){aH=aP;aP=aK[aJ];if(aH==null||aP==null){continue}var aG=aH[0],aM=aH[1],aF=aP[0],aL=aP[1];if(aM<=aL&&aM<aN.min){if(aL<aN.min){continue}aG=(aN.min-aM)/(aL-aM)*(aF-aG)+aG;aM=aN.min}else{if(aL<=aM&&aL<aN.min){if(aM<aN.min){continue}aF=(aN.min-aM)/(aL-aM)*(aF-aG)+aG;aL=aN.min}}if(aM>=aL&&aM>aN.max){if(aL>aN.max){continue}aG=(aN.max-aM)/(aL-aM)*(aF-aG)+aG;aM=aN.max}else{if(aL>=aM&&aL>aN.max){if(aM>aN.max){continue}aF=(aN.max-aM)/(aL-aM)*(aF-aG)+aG;aL=aN.max}}if(aG<=aF&&aG<aO.min){if(aF<aO.min){continue}aM=(aO.min-aG)/(aF-aG)*(aL-aM)+aM;aG=aO.min}else{if(aF<=aG&&aF<aO.min){if(aG<aO.min){continue}aL=(aO.min-aG)/(aF-aG)*(aL-aM)+aM;aF=aO.min}}if(aG>=aF&&aG>aO.max){if(aF>aO.max){continue}aM=(aO.max-aG)/(aF-aG)*(aL-aM)+aM;aG=aO.max}else{if(aF>=aG&&aF>aO.max){if(aG>aO.max){continue}aL=(aO.max-aG)/(aF-aG)*(aL-aM)+aM;aF=aO.max}}if(aE!=aO.p2c(aG)||aQ!=aN.p2c(aM)+aI){I.moveTo(aO.p2c(aG),aN.p2c(aM)+aI)}aE=aO.p2c(aF);aQ=aN.p2c(aL)+aI;I.lineTo(aE,aQ)}I.stroke()}function aC(aK,aR,aP){var aI,aS=null;var aE=Math.min(Math.max(0,aP.min),aP.max);var aN,aH=0;var aQ=false;for(var aJ=0;aJ<aK.length;++aJ){aI=aS;aS=aK[aJ];if(aQ&&aI!=null&&aS==null){I.lineTo(aR.p2c(aH),aP.p2c(aE));I.fill();aQ=false;continue}if(aI==null||aS==null){continue}var aG=aI[0],aO=aI[1],aF=aS[0],aM=aS[1];if(aG<=aF&&aG<aR.min){if(aF<aR.min){continue}aO=(aR.min-aG)/(aF-aG)*(aM-aO)+aO;aG=aR.min}else{if(aF<=aG&&aF<aR.min){if(aG<aR.min){continue}aM=(aR.min-aG)/(aF-aG)*(aM-aO)+aO;aF=aR.min}}if(aG>=aF&&aG>aR.max){if(aF>aR.max){continue}aO=(aR.max-aG)/(aF-aG)*(aM-aO)+aO;aG=aR.max}else{if(aF>=aG&&aF>aR.max){if(aG>aR.max){continue}aM=(aR.max-aG)/(aF-aG)*(aM-aO)+aO;aF=aR.max}}if(!aQ){I.beginPath();I.moveTo(aR.p2c(aG),aP.p2c(aE));aQ=true}if(aO>=aP.max&&aM>=aP.max){I.lineTo(aR.p2c(aG),aP.p2c(aP.max));I.lineTo(aR.p2c(aF),aP.p2c(aP.max));continue}else{if(aO<=aP.min&&aM<=aP.min){I.lineTo(aR.p2c(aG),aP.p2c(aP.min));I.lineTo(aR.p2c(aF),aP.p2c(aP.min));continue}}var aT=aG,aL=aF;if(aO<=aM&&aO<aP.min&&aM>=aP.min){aG=(aP.min-aO)/(aM-aO)*(aF-aG)+aG;aO=aP.min}else{if(aM<=aO&&aM<aP.min&&aO>=aP.min){aF=(aP.min-aO)/(aM-aO)*(aF-aG)+aG;aM=aP.min}}if(aO>=aM&&aO>aP.max&&aM<=aP.max){aG=(aP.max-aO)/(aM-aO)*(aF-aG)+aG;aO=aP.max}else{if(aM>=aO&&aM>aP.max&&aO<=aP.max){aF=(aP.max-aO)/(aM-aO)*(aF-aG)+aG;aM=aP.max}}if(aG!=aT){if(aO<=aP.min){aN=aP.min}else{aN=aP.max}I.lineTo(aR.p2c(aT),aP.p2c(aN));I.lineTo(aR.p2c(aG),aP.p2c(aN))}I.lineTo(aR.p2c(aG),aP.p2c(aO));I.lineTo(aR.p2c(aF),aP.p2c(aM));if(aF!=aL){if(aM<=aP.min){aN=aP.min}else{aN=aP.max}I.lineTo(aR.p2c(aL),aP.p2c(aN));I.lineTo(aR.p2c(aF),aP.p2c(aN))}aH=Math.max(aF,aL)}if(aQ){I.lineTo(aR.p2c(aH),aP.p2c(aE));I.fill()}}I.save();I.translate(M.left,M.top);I.lineJoin="round";var aD=aB.lines.lineWidth;var az=aB.shadowSize;if(az>0){I.lineWidth=az/2;I.strokeStyle="rgba(0,0,0,0.1)";aA(aB.data,aD/2+az/2+I.lineWidth/2,aB.xaxis,aB.yaxis);I.lineWidth=az/2;I.strokeStyle="rgba(0,0,0,0.2)";aA(aB.data,aD/2+I.lineWidth/2,aB.xaxis,aB.yaxis)}I.lineWidth=aD;I.strokeStyle=aB.color;ad(aB.lines,aB.color);if(aB.lines.fill){aC(aB.data,aB.xaxis,aB.yaxis)}aA(aB.data,0,aB.xaxis,aB.yaxis);I.restore()}function V(aA){function aD(aH,aF,aI,aL,aJ){for(var aG=0;aG<aH.length;++aG){if(aH[aG]==null){continue}var aE=aH[aG][0],aK=aH[aG][1];if(aE<aL.min||aE>aL.max||aK<aJ.min||aK>aJ.max){continue}I.beginPath();I.arc(aL.p2c(aE),aJ.p2c(aK),aF,0,2*Math.PI,true);if(aI){I.fill()}I.stroke()}}function aC(aH,aJ,aF,aL,aI){for(var aG=0;aG<aH.length;++aG){if(aH[aG]==null){continue}var aE=aH[aG][0],aK=aH[aG][1];if(aE<aL.min||aE>aL.max||aK<aI.min||aK>aI.max){continue}I.beginPath();I.arc(aL.p2c(aE),aI.p2c(aK)+aJ,aF,0,Math.PI,false);I.stroke()}}I.save();I.translate(M.left,M.top);var aB=aA.lines.lineWidth;var az=aA.shadowSize;if(az>0){I.lineWidth=az/2;I.strokeStyle="rgba(0,0,0,0.1)";aC(aA.data,az/2+I.lineWidth/2,aA.points.radius,aA.xaxis,aA.yaxis);I.lineWidth=az/2;I.strokeStyle="rgba(0,0,0,0.2)";aC(aA.data,I.lineWidth/2,aA.points.radius,aA.xaxis,aA.yaxis)}I.lineWidth=aA.points.lineWidth;I.strokeStyle=aA.color;ad(aA.points,aA.color);aD(aA.data,aA.points.radius,aA.points.fill,aA.xaxis,aA.yaxis);I.restore()}function am(aK,aI,aD,aJ,aB,aP,aO,aL,aG){var aN=true,aF=true,aC=true,aE=false,aA=aK+aD,aM=aK+aJ,az=0,aH=aI;if(aH<az){aH=0;az=aI;aE=true;aC=false}if(aM<aO.min||aA>aO.max||aH<aL.min||az>aL.max){return}if(aA<aO.min){aA=aO.min;aN=false}if(aM>aO.max){aM=aO.max;aF=false}if(az<aL.min){az=aL.min;aE=false}if(aH>aL.max){aH=aL.max;aC=false}if(aP){aG.beginPath();aG.moveTo(aO.p2c(aA),aL.p2c(az)+aB);aG.lineTo(aO.p2c(aA),aL.p2c(aH)+aB);aG.lineTo(aO.p2c(aM),aL.p2c(aH)+aB);aG.lineTo(aO.p2c(aM),aL.p2c(az)+aB);aG.fill()}if(aN||aF||aC||aE){aG.beginPath();aA=aO.p2c(aA);az=aL.p2c(az);aM=aO.p2c(aM);aH=aL.p2c(aH);aG.moveTo(aA,az+aB);if(aN){aG.lineTo(aA,aH+aB)}else{aG.moveTo(aA,aH+aB)}if(aC){aG.lineTo(aM,aH+aB)}else{aG.moveTo(aM,aH+aB)}if(aF){aG.lineTo(aM,az+aB)}else{aG.moveTo(aM,az+aB)}if(aE){aG.lineTo(aA,az+aB)}else{aG.moveTo(aA,az+aB)}aG.stroke()}}function U(aB){function aA(aF,aC,aE,aI,aG,aJ,aH){for(var aD=0;aD<aF.length;aD++){if(aF[aD]==null){continue}am(aF[aD][0],aF[aD][1],aC,aE,aI,aG,aJ,aH,I)}}I.save();I.translate(M.left,M.top);I.lineJoin="round";I.lineWidth=aB.bars.lineWidth;I.strokeStyle=aB.color;ad(aB.bars,aB.color);var az=aB.bars.align=="left"?0:-aB.bars.barWidth/2;aA(aB.data,az,az+aB.bars.barWidth,0,aB.bars.fill,aB.xaxis,aB.yaxis);I.restore()}function ad(aB,az){var aA=aB.fill;if(!aA){return}if(aB.fillColor){I.fillStyle=aB.fillColor}else{var aC=e(az);aC.a=typeof aA=="number"?aA:0.4;aC.normalize();I.fillStyle=aC.toString()}}function aw(){m.find(".legend").remove();if(!O.legend.show){return}var aF=[];var aD=false;for(i=0;i<y.length;++i){if(!y[i].label){continue}if(i%O.legend.noColumns==0){if(aD){aF.push("</tr>")}aF.push("<tr>");aD=true}var aH=y[i].label;if(O.legend.labelFormatter!=null){aH=O.legend.labelFormatter(aH)}aF.push('<td class="legendColorBox"><div style="border:1px solid '+O.legend.labelBoxBorderColor+';padding:1px"><div style="width:14px;height:10px;background-color:'+y[i].color+';overflow:hidden"></div></div></td><td class="legendLabel">'+aH+"</td>")}if(aD){aF.push("</tr>")}if(aF.length==0){return}var aJ='<table style="font-size:smaller;color:'+O.grid.color+'">'+aF.join("")+"</table>";if(O.legend.container!=null){O.legend.container.html(aJ)}else{var aG="";var aA=O.legend.position,aB=O.legend.margin;if(aA.charAt(0)=="n"){aG+="top:"+(aB+M.top)+"px;"}else{if(aA.charAt(0)=="s"){aG+="bottom:"+(aB+M.bottom)+"px;"}}if(aA.charAt(1)=="e"){aG+="right:"+(aB+M.right)+"px;"}else{if(aA.charAt(1)=="w"){aG+="left:"+(aB+M.left)+"px;"}}var aI=f('<div class="legend">'+aJ.replace('style="','style="position:absolute;'+aG+";")+"</div>").appendTo(m);if(O.legend.backgroundOpacity!=0){var aE=O.legend.backgroundColor;if(aE==null){var aC;if(O.grid.backgroundColor){aC=O.grid.backgroundColor}else{aC=a(aI)}aE=e(aC).adjust(null,null,null,1).toString()}var az=aI.children();f('<div style="position:absolute;width:'+az.width()+"px;height:"+az.height()+"px;"+aG+"background-color:"+aE+';"> </div>').prependTo(aI).css("opacity",O.legend.backgroundOpacity)}}}var ag={pageX:null,pageY:null},F={first:{x:-1,y:-1},second:{x:-1,y:-1},show:false,active:false},af=[],r=false,q=null,Z=null;function au(aF,aD){var aM=O.grid.mouseActiveRadius,aS=aM*aM+1,aU=null,aO=false;function aJ(aZ,aY){return{datapoint:y[aZ].data[aY],dataIndex:aY,series:y[aZ],seriesIndex:aZ}}for(var aR=0;aR<y.length;++aR){var aX=y[aR].data,aE=y[aR].xaxis,aC=y[aR].yaxis,aN=aE.c2p(aF),aL=aC.c2p(aD),aA=aM/aE.scale,az=aM/aC.scale,aW=y[aR].bars.show,aV=!(y[aR].bars.show&&!(y[aR].lines.show||y[aR].points.show)),aB=y[aR].bars.align=="left"?0:-y[aR].bars.barWidth/2,aT=aB+y[aR].bars.barWidth;for(var aQ=0;aQ<aX.length;++aQ){if(aX[aQ]==null){continue}var aH=aX[aQ][0],aG=aX[aQ][1];if(aW){if(!aO&&aN>=aH+aB&&aN<=aH+aT&&aL>=Math.min(0,aG)&&aL<=Math.max(0,aG)){aU=aJ(aR,aQ)}}if(aV){if((aH-aN>aA||aH-aN<-aA)||(aG-aL>az||aG-aL<-az)){continue}var aK=Math.abs(aE.p2c(aH)-aF),aI=Math.abs(aC.p2c(aG)-aD),aP=aK*aK+aI*aI;if(aP<aS){aS=aP;aO=true;aU=aJ(aR,aQ)}}}}return aU}function k(aA){var aB=aA||window.event;if(aB.pageX==null&&aB.clientX!=null){var aC=document.documentElement,az=document.body;ag.pageX=aB.clientX+(aC&&aC.scrollLeft||az.scrollLeft||0);ag.pageY=aB.clientY+(aC&&aC.scrollTop||az.scrollTop||0)}else{ag.pageX=aB.pageX;ag.pageY=aB.pageY}if(O.grid.hoverable&&!Z){Z=setTimeout(t,100)}if(F.active){al(ag)}}function an(az){if(az.which!=1){return}document.body.focus();if(document.onselectstart!==undefined&&u.onselectstart==null){u.onselectstart=document.onselectstart;document.onselectstart=function(){return false}}if(document.ondrag!==undefined&&u.ondrag==null){u.ondrag=document.ondrag;document.ondrag=function(){return false}}ar(F.first,az);ag.pageX=null;F.active=true;f(document).one("mouseup",A)}function L(az){if(r){r=false;return}o("plotclick",az)}function t(){o("plothover",ag);Z=null}function o(aA,az){var aB=aq.offset(),aG={pageX:az.pageX,pageY:az.pageY},aE=az.pageX-aB.left-M.left,aC=az.pageY-aB.top-M.top;if(aa.xaxis.used){aG.x=aa.xaxis.c2p(aE)}if(aa.yaxis.used){aG.y=aa.yaxis.c2p(aC)}if(aa.x2axis.used){aG.x2=aa.x2axis.c2p(aE)}if(aa.y2axis.used){aG.y2=aa.y2axis.c2p(aC)}var aH=au(aE,aC);if(aH){aH.pageX=parseInt(aH.series.xaxis.p2c(aH.datapoint[0])+aB.left+M.left);aH.pageY=parseInt(aH.series.yaxis.p2c(aH.datapoint[1])+aB.top+M.top)}if(O.grid.autoHighlight){for(var aD=0;aD<af.length;++aD){var aF=af[aD];if(aF.auto&&!(aH&&aF.series==aH.series&&aF.point==aH.datapoint)){ah(aF.series,aF.point)}}if(aH){at(aH.series,aH.datapoint,true)}}m.trigger(aA,[aG,aH])}function X(){if(!q){q=setTimeout(v,50)}}function v(){q=null;ay.save();ay.clearRect(0,0,ai,B);ay.translate(M.left,M.top);var aC,aB;for(aC=0;aC<af.length;++aC){aB=af[aC];if(aB.series.bars.show){aj(aB.series,aB.point)}else{ae(aB.series,aB.point)}}ay.restore();if(F.show&&D()){ay.strokeStyle=e(O.selection.color).scale(null,null,null,0.8).toString();ay.lineWidth=1;I.lineJoin="round";ay.fillStyle=e(O.selection.color).scale(null,null,null,0.4).toString();var az=Math.min(F.first.x,F.second.x),aE=Math.min(F.first.y,F.second.y),aA=Math.abs(F.second.x-F.first.x),aD=Math.abs(F.second.y-F.first.y);ay.fillRect(az+M.left,aE+M.top,aA,aD);ay.strokeRect(az+M.left,aE+M.top,aA,aD)}}function at(aB,az,aC){if(typeof aB=="number"){aB=y[aB]}if(typeof az=="number"){az=aB.data[az]}var aA=Q(aB,az);if(aA==-1){af.push({series:aB,point:az,auto:aC});X()}else{if(!aC){af[aA].auto=false}}}function ah(aB,az){if(typeof aB=="number"){aB=y[aB]}if(typeof az=="number"){az=aB.data[az]}var aA=Q(aB,az);if(aA!=-1){af.splice(aA,1);X()}}function Q(aB,aC){for(var az=0;az<af.length;++az){var aA=af[az];if(aA.series==aB&&aA.point[0]==aC[0]&&aA.point[1]==aC[1]){return az}}return -1}function ae(aC,aB){var aA=aB[0],aG=aB[1],aF=aC.xaxis,aE=aC.yaxis;if(aA<aF.min||aA>aF.max||aG<aE.min||aG>aE.max){return}var aD=aC.points.radius+aC.points.lineWidth/2;ay.lineWidth=aD;ay.strokeStyle=e(aC.color).scale(1,1,1,0.5).toString();var az=1.5*aD;ay.beginPath();ay.arc(aF.p2c(aA),aE.p2c(aG),az,0,2*Math.PI,true);ay.stroke()}function aj(aB,az){ay.lineJoin="round";ay.lineWidth=aB.bars.lineWidth;ay.strokeStyle=e(aB.color).scale(1,1,1,0.5).toString();ay.fillStyle=e(aB.color).scale(1,1,1,0.5).toString();var aA=aB.bars.align=="left"?0:-aB.bars.barWidth/2;am(az[0],az[1],aA,aA+aB.bars.barWidth,0,true,aB.xaxis,aB.yaxis,ay)}function R(){var aA=Math.min(F.first.x,F.second.x),az=Math.max(F.first.x,F.second.x),aC=Math.max(F.first.y,F.second.y),aB=Math.min(F.first.y,F.second.y);var aD={};if(aa.xaxis.used){aD.xaxis={from:aa.xaxis.c2p(aA),to:aa.xaxis.c2p(az)}}if(aa.x2axis.used){aD.x2axis={from:aa.x2axis.c2p(aA),to:aa.x2axis.c2p(az)}}if(aa.yaxis.used){aD.yaxis={from:aa.yaxis.c2p(aC),to:aa.yaxis.c2p(aB)}}if(aa.y2axis.used){aD.yaxis={from:aa.y2axis.c2p(aC),to:aa.y2axis.c2p(aB)}}m.trigger("plotselected",[aD]);if(aa.xaxis.used&&aa.yaxis.used){m.trigger("selected",[{x1:aD.xaxis.from,y1:aD.yaxis.from,x2:aD.xaxis.to,y2:aD.yaxis.to}])}}function A(az){if(document.onselectstart!==undefined){document.onselectstart=u.onselectstart}if(document.ondrag!==undefined){document.ondrag=u.ondrag}F.active=false;al(az);if(D()){R();r=true}return false}function ar(aB,az){var aA=aq.offset();if(O.selection.mode=="y"){if(aB==F.first){aB.x=0}else{aB.x=p}}else{aB.x=az.pageX-aA.left-M.left;aB.x=Math.min(Math.max(0,aB.x),p)}if(O.selection.mode=="x"){if(aB==F.first){aB.y=0}else{aB.y=ab}}else{aB.y=az.pageY-aA.top-M.top;aB.y=Math.min(Math.max(0,aB.y),ab)}}function al(az){if(az.pageX==null){return}ar(F.second,az);if(D()){F.show=true;X()}else{j()}}function j(){if(F.show){F.show=false;X()}}function ac(aA,az){var aB;if(O.selection.mode=="y"){F.first.x=0;F.second.x=p}else{aB=x(aA,"x");F.first.x=aB.axis.p2c(aB.from);F.second.x=aB.axis.p2c(aB.to)}if(O.selection.mode=="x"){F.first.y=0;F.second.y=ab}else{aB=x(aA,"y");F.first.y=aB.axis.p2c(aB.from);F.second.y=aB.axis.p2c(aB.to)}F.show=true;X();if(!az){R()}}function D(){var az=5;return Math.abs(F.second.x-F.first.x)>=az&&Math.abs(F.second.y-F.first.y)>=az}}f.plot=function(n,k,j){var m=new d(n,k,j);return m};function c(k,j){return j*Math.floor(k/j)}function h(k,m,j){if(m<k){return m}else{if(m>j){return j}else{return m}}}function g(q,p,k,n){var o=["r","g","b","a"];var j=4;while(-1<--j){this[o[j]]=arguments[j]||((j==3)?1:0)}this.toString=function(){if(this.a>=1){return"rgb("+[this.r,this.g,this.b].join(",")+")"}else{return"rgba("+[this.r,this.g,this.b,this.a].join(",")+")"}};this.scale=function(t,s,u,r){j=4;while(-1<--j){if(arguments[j]!=null){this[o[j]]*=arguments[j]}}return this.normalize()};this.adjust=function(t,s,u,r){j=4;while(-1<--j){if(arguments[j]!=null){this[o[j]]+=arguments[j]}}return this.normalize()};this.clone=function(){return new g(this.r,this.b,this.g,this.a)};var m=function(s,r,t){return Math.max(Math.min(s,t),r)};this.normalize=function(){this.r=m(parseInt(this.r),0,255);this.g=m(parseInt(this.g),0,255);this.b=m(parseInt(this.b),0,255);this.a=m(this.a,0,1);return this};this.normalize()}var b={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]};function a(k){var j,m=k;do{j=m.css("background-color").toLowerCase();if(j!=""&&j!="transparent"){break}m=m.parent()}while(!f.nodeName(m.get(0),"body"));if(j=="rgba(0, 0, 0, 0)"){return"transparent"}return j}function e(m){var j;if(j=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(m)){return new g(parseInt(j[1],10),parseInt(j[2],10),parseInt(j[3],10))}if(j=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(m)){return new g(parseInt(j[1],10),parseInt(j[2],10),parseInt(j[3],10),parseFloat(j[4]))}if(j=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(m)){return new g(parseFloat(j[1])*2.55,parseFloat(j[2])*2.55,parseFloat(j[3])*2.55)}if(j=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(m)){return new g(parseFloat(j[1])*2.55,parseFloat(j[2])*2.55,parseFloat(j[3])*2.55,parseFloat(j[4]))}if(j=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(m)){return new g(parseInt(j[1],16),parseInt(j[2],16),parseInt(j[3],16))}if(j=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(m)){return new g(parseInt(j[1]+j[1],16),parseInt(j[2]+j[2],16),parseInt(j[3]+j[3],16))}var k=f.trim(m).toLowerCase();if(k=="transparent"){return new g(255,255,255,0)}else{j=b[k];return new g(j[0],j[1],j[2])}}})(jQuery);
;
(function($){$.template=function(html,options){return new $.template.instance(html,options)};$.template.instance=function(html,options){if(options&&options.regx){options.regx=this.regx[options.regx]}this.options=$.extend({compile:false,regx:this.regx.standard},options||{});this.html=html;if(this.options.compile){this.compile()}this.isTemplate=true};$.template.regx=$.template.instance.prototype.regx={jsp:/\$\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,ext:/\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,jtemplates:/\{\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}\}/g};$.template.regx.standard=$.template.regx.jsp;$.template.helpers=$.template.instance.prototype.helpers={substr:function(value,start,length){return String(value).substr(start,length)}};$.extend($.template.instance.prototype,{apply:function(values){if(this.options.compile){return this.compiled(values)}else{var tpl=this;var fm=this.helpers;var fn=function(m,name,format,args){if(format){if(format.substr(0,5)=="this."){return tpl.call(format.substr(5),values[name],values)}else{if(args){var re=/^\s*['"](.*)["']\s*$/;args=args.split(",");for(var i=0,len=args.length;i<len;i++){args[i]=args[i].replace(re,"$1")}args=[values[name]].concat(args)}else{args=[values[name]]}return fm[format].apply(fm,args)}}else{return values[name]!==undefined?values[name]:""}};return this.html.replace(this.options.regx,fn)}},compile:function(){var sep=$.browser.mozilla?"+":",";var fm=this.helpers;var fn=function(m,name,format,args){if(format){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format='this.call("'+format.substr(5)+'", ';args=", values"}}else{args="";format="(values['"+name+"'] == undefined ? '' : "}return"'"+sep+format+"values['"+name+"']"+args+")"+sep+"'"};var body;if($.browser.mozilla){body="this.compiled = function(values){ return '"+this.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.options.regx,fn)+"';};"}else{body=["this.compiled = function(values){ return ['"];body.push(this.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.options.regx,fn));body.push("'].join('');};");body=body.join("")}eval(body);return this}});var $_old={domManip:$.fn.domManip,text:$.fn.text,html:$.fn.html};$.fn.domManip=function(args,table,reverse,callback){if(args[0].isTemplate){args[0]=args[0].apply(args[1]);delete args[1]}var r=$_old.domManip.apply(this,arguments);return r};$.fn.html=function(value,o){if(value&&value.isTemplate){var value=value.apply(o)}var r=$_old.html.apply(this,[value]);return r};$.fn.text=function(value,o){if(value&&value.isTemplate){var value=value.apply(o)}var r=$_old.text.apply(this,[value]);return r}})(jQuery);
;
jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.1",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m<n.length;m++){if(j.options[n[m][0]]){n[m][1].apply(j.element,k)}}}},contains:function(k,j){return document.compareDocumentPosition?k.compareDocumentPosition(j)&16:k!==j&&k.contains(j)},hasScroll:function(m,k){if(c(m).css("overflow")=="hidden"){return false}var j=(k&&k=="left")?"scrollLeft":"scrollTop",l=false;if(m[j]>0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},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}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.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 j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);
;
jQuery.effects||(function(d){d.effects={version:"1.7.1",save:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){g.data("ec.storage."+h[f],g[0].style[h[f]])}}},restore:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){g.css(h[f],g.data("ec.storage."+h[f]))}}},setMode:function(f,g){if(g=="toggle"){g=f.is(":hidden")?"show":"hide"}return g},getBaseline:function(g,h){var i,f;switch(g[0]){case"top":i=0;break;case"middle":i=0.5;break;case"bottom":i=1;break;default:i=g[0]/h.height}switch(g[1]){case"left":f=0;break;case"center":f=0.5;break;case"right":f=1;break;default:f=g[1]/h.width}return{x:f,y:i}},createWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent()}var g={width:f.outerWidth(true),height:f.outerHeight(true),"float":f.css("float")};f.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var j=f.parent();if(f.css("position")=="static"){j.css({position:"relative"});f.css({position:"relative"})}else{var i=f.css("top");if(isNaN(parseInt(i,10))){i="auto"}var h=f.css("left");if(isNaN(parseInt(h,10))){h="auto"}j.css({position:f.css("position"),top:i,left:h,zIndex:f.css("z-index")}).show();f.css({position:"relative",top:0,left:0})}j.css(g);return j},removeWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent().replaceWith(f)}return f},setTransition:function(g,i,f,h){h=h||{};d.each(i,function(k,j){unit=g.cssUnit(j);if(unit[0]>0){h[j]=unit[0]*f+unit[1]}});return h},animateClass:function(h,i,k,j){var f=(typeof k=="function"?k:(j?j:null));var g=(typeof k=="string"?k:null);return this.each(function(){var q={};var o=d(this);var p=o.attr("style")||"";if(typeof p=="object"){p=p.cssText}if(h.toggle){o.hasClass(h.toggle)?h.remove=h.toggle:h.add=h.toggle}var l=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.addClass(h.add)}if(h.remove){o.removeClass(h.remove)}var m=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.removeClass(h.add)}if(h.remove){o.addClass(h.remove)}for(var r in m){if(typeof m[r]!="function"&&m[r]&&r.indexOf("Moz")==-1&&r.indexOf("length")==-1&&m[r]!=l[r]&&(r.match(/color/i)||(!r.match(/color/i)&&!isNaN(parseInt(m[r],10))))&&(l.position!="static"||(l.position=="static"&&!r.match(/left|top|bottom|right/)))){q[r]=m[r]}}o.animate(q,i,g,function(){if(typeof d(this).attr("style")=="object"){d(this).attr("style")["cssText"]="";d(this).attr("style")["cssText"]=p}else{d(this).attr("style",p)}if(h.add){d(this).addClass(h.add)}if(h.remove){d(this).removeClass(h.remove)}if(f){f.apply(this,arguments)}})})}};function c(g,f){var i=g[1]&&g[1].constructor==Object?g[1]:{};if(f){i.mode=f}var h=g[1]&&g[1].constructor!=Object?g[1]:(i.duration?i.duration:g[2]);h=d.fx.off?0:typeof h==="number"?h:d.fx.speeds[h]||d.fx.speeds._default;var j=i.callback||(d.isFunction(g[1])&&g[1])||(d.isFunction(g[2])&&g[2])||(d.isFunction(g[3])&&g[3]);return[g[0],i,h,j]}d.fn.extend({_show:d.fn.show,_hide:d.fn.hide,__toggle:d.fn.toggle,_addClass:d.fn.addClass,_removeClass:d.fn.removeClass,_toggleClass:d.fn.toggleClass,effect:function(g,f,h,i){return d.effects[g]?d.effects[g].call(this,{method:g,options:f||{},duration:h,callback:i}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"show"))}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"hide"))}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||(arguments[0].constructor==Function)){return this.__toggle.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"toggle"))}},addClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{add:g},f,i,h]):this._addClass(g)},removeClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{remove:g},f,i,h]):this._removeClass(g)},toggleClass:function(g,f,i,h){return((typeof f!=="boolean")&&f)?d.effects.animateClass.apply(this,[{toggle:g},f,i,h]):this._toggleClass(g,f)},morph:function(f,h,g,j,i){return d.effects.animateClass.apply(this,[{add:h,remove:f},g,j,i])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(f){var g=this.css(f),h=[];d.each(["em","px","%","pt"],function(j,k){if(g.indexOf(k)>0){h=[parseFloat(g),k]}});return h}});d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(g,f){d.fx.step[f]=function(h){if(h.state==0){h.start=e(h.elem,f);h.end=b(h.end)}h.elem.style[f]="rgb("+[Math.max(Math.min(parseInt((h.pos*(h.end[0]-h.start[0]))+h.start[0],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[1]-h.start[1]))+h.start[1],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[2]-h.start[2]))+h.start[2],10),255),0)].join(",")+")"}});function b(g){var f;if(g&&g.constructor==Array&&g.length==3){return g}if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(g)){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)]}if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(g)){return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55]}if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(g)){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(g)){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}if(f=/rgba\(0, 0, 0, 0\)/.exec(g)){return a.transparent}return a[d.trim(g).toLowerCase()]}function e(h,f){var g;do{g=d.curCSS(h,f);if(g!=""&&g!="transparent"||d.nodeName(h,"body")){break}f="backgroundColor"}while(h=h.parentNode);return b(g)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};d.easing.jswing=d.easing.swing;d.extend(d.easing,{def:"easeOutQuad",swing:function(g,h,f,j,i){return d.easing[d.easing.def](g,h,f,j,i)},easeInQuad:function(g,h,f,j,i){return j*(h/=i)*h+f},easeOutQuad:function(g,h,f,j,i){return -j*(h/=i)*(h-2)+f},easeInOutQuad:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h+f}return -j/2*((--h)*(h-2)-1)+f},easeInCubic:function(g,h,f,j,i){return j*(h/=i)*h*h+f},easeOutCubic:function(g,h,f,j,i){return j*((h=h/i-1)*h*h+1)+f},easeInOutCubic:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h+f}return j/2*((h-=2)*h*h+2)+f},easeInQuart:function(g,h,f,j,i){return j*(h/=i)*h*h*h+f},easeOutQuart:function(g,h,f,j,i){return -j*((h=h/i-1)*h*h*h-1)+f},easeInOutQuart:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h+f}return -j/2*((h-=2)*h*h*h-2)+f},easeInQuint:function(g,h,f,j,i){return j*(h/=i)*h*h*h*h+f},easeOutQuint:function(g,h,f,j,i){return j*((h=h/i-1)*h*h*h*h+1)+f},easeInOutQuint:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h*h+f}return j/2*((h-=2)*h*h*h*h+2)+f},easeInSine:function(g,h,f,j,i){return -j*Math.cos(h/i*(Math.PI/2))+j+f},easeOutSine:function(g,h,f,j,i){return j*Math.sin(h/i*(Math.PI/2))+f},easeInOutSine:function(g,h,f,j,i){return -j/2*(Math.cos(Math.PI*h/i)-1)+f},easeInExpo:function(g,h,f,j,i){return(h==0)?f:j*Math.pow(2,10*(h/i-1))+f},easeOutExpo:function(g,h,f,j,i){return(h==i)?f+j:j*(-Math.pow(2,-10*h/i)+1)+f},easeInOutExpo:function(g,h,f,j,i){if(h==0){return f}if(h==i){return f+j}if((h/=i/2)<1){return j/2*Math.pow(2,10*(h-1))+f}return j/2*(-Math.pow(2,-10*--h)+2)+f},easeInCirc:function(g,h,f,j,i){return -j*(Math.sqrt(1-(h/=i)*h)-1)+f},easeOutCirc:function(g,h,f,j,i){return j*Math.sqrt(1-(h=h/i-1)*h)+f},easeInOutCirc:function(g,h,f,j,i){if((h/=i/2)<1){return -j/2*(Math.sqrt(1-h*h)-1)+f}return j/2*(Math.sqrt(1-(h-=2)*h)+1)+f},easeInElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}return -(h*Math.pow(2,10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k))+f},easeOutElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}return h*Math.pow(2,-10*i)*Math.sin((i*l-j)*(2*Math.PI)/k)+m+f},easeInOutElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l/2)==2){return f+m}if(!k){k=l*(0.3*1.5)}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}if(i<1){return -0.5*(h*Math.pow(2,10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k))+f}return h*Math.pow(2,-10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k)*0.5+m+f},easeInBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}return k*(h/=j)*h*((i+1)*h-i)+f},easeOutBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}return k*((h=h/j-1)*h*((i+1)*h+i)+1)+f},easeInOutBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}if((h/=j/2)<1){return k/2*(h*h*(((i*=(1.525))+1)*h-i))+f}return k/2*((h-=2)*h*(((i*=(1.525))+1)*h+i)+2)+f},easeInBounce:function(g,h,f,j,i){return j-d.easing.easeOutBounce(g,i-h,0,j,i)+f},easeOutBounce:function(g,h,f,j,i){if((h/=i)<(1/2.75)){return j*(7.5625*h*h)+f}else{if(h<(2/2.75)){return j*(7.5625*(h-=(1.5/2.75))*h+0.75)+f}else{if(h<(2.5/2.75)){return j*(7.5625*(h-=(2.25/2.75))*h+0.9375)+f}else{return j*(7.5625*(h-=(2.625/2.75))*h+0.984375)+f}}}},easeInOutBounce:function(g,h,f,j,i){if(h<i/2){return d.easing.easeInBounce(g,h*2,0,j,i)*0.5+f}return d.easing.easeOutBounce(g,h*2-i,0,j,i)*0.5+j*0.5+f}})})(jQuery);
;
(function(a){a.effects.bounce=function(b){return this.queue(function(){var e=a(this),l=["position","top","left"];var k=a.effects.setMode(e,b.options.mode||"effect");var n=b.options.direction||"up";var c=b.options.distance||20;var d=b.options.times||5;var g=b.duration||250;if(/show|hide/.test(k)){l.push("opacity")}a.effects.save(e,l);e.show();a.effects.createWrapper(e);var f=(n=="up"||n=="down")?"top":"left";var p=(n=="up"||n=="left")?"pos":"neg";var c=b.options.distance||(f=="top"?e.outerHeight({margin:true})/3:e.outerWidth({margin:true})/3);if(k=="show"){e.css("opacity",0).css(f,p=="pos"?-c:c)}if(k=="hide"){c=c/(d*2)}if(k!="hide"){d--}if(k=="show"){var h={opacity:1};h[f]=(p=="pos"?"+=":"-=")+c;e.animate(h,g/2,b.options.easing);c=c/2;d--}for(var j=0;j<d;j++){var o={},m={};o[f]=(p=="pos"?"-=":"+=")+c;m[f]=(p=="pos"?"+=":"-=")+c;e.animate(o,g/2,b.options.easing).animate(m,g/2,b.options.easing);c=(k=="hide")?c*2:c/2}if(k=="hide"){var h={opacity:0};h[f]=(p=="pos"?"-=":"+=")+c;e.animate(h,g/2,b.options.easing,function(){e.hide();a.effects.restore(e,l);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}})}else{var o={},m={};o[f]=(p=="pos"?"-=":"+=")+c;m[f]=(p=="pos"?"+=":"-=")+c;e.animate(o,g/2,b.options.easing).animate(m,g/2,b.options.easing,function(){a.effects.restore(e,l);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}})}e.queue("fx",function(){e.dequeue()});e.dequeue()})}})(jQuery);
;
jQuery.fn.fadeToggle=function(a,c,b){return this.animate({opacity:"toggle"},a,c,b)};
;
var GlobalAjaxErrorHandler=function(a,c,b){var d;if(typeof(b)!="undefined"){d=b}else{d=_jive_base_url}a.bind("ajaxError",function(g,f){if($j.inArray("unauthenticated",c)>-1&&f.status==403){top.location=d+"/login.jspa";return false}else{if($j.inArray("notfound",c)>-1&&f.status==404){top.location=d+"/404.jsp";return false}else{if($j.inArray("error",c)>-1&&f.status==500){top.location=d+"/500.jsp";return false}}}});if($j.inArray("login",c)>-1){a.bind("ajaxComplete",function(g,f){if($j("#loginform",f.responseText).length>0){top.location=_jive_base_url+"/login.jspa";return false}else{if($j("#jive-loginBox",f.responseText).length>0){top.location=_jive_base_url+"/admin/login.jsp";return false}}})}};
;
(function(a){a.fn.safelyLoad=function(d,h,i){var e="GET",c=[],g,b,f=this;if(a.browser.msie&&a.browser.version<7){g=d.indexOf(" ");if(g>=0){b=d.slice(g,d.length);d=d.slice(0,g)}if(h){if(a.isFunction(h)){i=h;h=null}else{if(typeof h==="object"){h=a.param(h);e="POST"}}}a.ajax({url:d,type:e,data:h,dataType:"html",dataFilter:function(k,j){return k.replace(/<script\s+[^>]*src=['"]([^'">]+)['"][^>]*>\s*<\/script>/g,function(m,l){c.push(l);return""})},success:function(m,j){var n,k,l;n=function(){var o=c.shift();if(o){window.setTimeout(function(){k(o)},0)}else{window.setTimeout(l,0)}};k=function(o){a("head").append(a(document.createElement("script")).attr("type","text/javascript").attr("src",o).attr("onreadystatechange",n))};l=function(){f.html(b?jQuery("<div/>").append(m.replace(/<script(.|\s)*?\/script>/g,"")).find(b):m);if(i){f.each(i,[m,j])}};n()},error:function(k,j){if(i){f.each(i,[k.responseText,j,k])}}});return this}else{return this.load(d,h,i)}}})(jQuery);
;
if(typeof addEvent!="function"){var addEvent=function(b,m,h,g){var i="addEventListener",c="on"+m,k=b,j=m,e=h,a=g;if(b[i]&&!g){return b[i](m,h,false)}if(!b._evts){b._evts={}}if(!b._evts[m]){b._evts[m]=b[c]?{b:b[c]}:{};b[c]=new Function("e",'var r = true,o = this,a = o._evts["'+m+'"],i;             for(i in a) {                 o._f = a[i];                 r = o._f(e||window.event)!=false&&r;                 o._f = null             }             return r');if(m!="unload"){addEvent(window,"unload",function(){removeEvent(k,j,e,a)})}}if(!h._i){h._i=addEvent._i++}b._evts[m][h._i]=h};addEvent._i=1;var removeEvent=function(g,b,c,a){var e="removeEventListener";if(g[e]&&!a){return g[e](b,c,false)}if(g._evts&&g._evts[b]&&c._i){delete g._evts[b][c._i]}}}function cancelEvent(a,b){a.returnValue=false;if(a.preventDefault){a.preventDefault()}if(b){a.cancelBubble=true;if(a.stopPropagation){a.stopPropagation()}}}function SuperNote(b,a){var e={myName:b,allowNesting:false,cssProp:"visibility",cssVis:"inherit",cssHid:"hidden",IESelectBoxFix:true,showDelay:0,hideDelay:500,animInSpeed:0.1,animOutSpeed:0.1,animations:[],mouseX:0,mouseY:0,notes:{},rootElm:null,onshow:null,onhide:null};for(var d in e){this[d]=(typeof a[d]=="undefined")?e[d]:a[d]}var c=this;addEvent(document,"mouseover",function(f){c.mouseHandler(f,1)});addEvent(document,"mousemove",function(f){c.mouseTrack(f)});addEvent(document,"mouseout",function(f){c.mouseHandler(f,0)});this.instance=SuperNote.instances.length;SuperNote.instances[this.instance]=this}SuperNote.instances=[];SuperNote.prototype.bTypes={};SuperNote.prototype.pTypes={};SuperNote.prototype.pTypes.mouseoffset=function(obj,noteID,nextVis,nextAnim){with(obj){var note=notes[noteID];if(nextVis&&!note.animating&&!note.visible){note.ref.style.left=checkWinX(mouseX,note)+"px";note.ref.style.top=checkWinY(mouseY,note)+"px"}}};SuperNote.prototype.pTypes.mousetrack=function(obj,noteID,nextVis,nextAnim){with(obj){var note=notes[noteID];if(nextVis&&!note.animating&&!note.visible){var posString="with("+myName+') {                  var note = notes["'+noteID+'"];                  note.ref.style.left = checkWinX(mouseX,note)+"px";                  note.ref.style.top = checkWinY(mouseY,note)+"px"              }';eval(posString);obj.IEFrameFix(noteID,1);if(!note.trackTimer){note.trackTimer=setInterval(posString,50)}}else{if(!nextVis&&!nextAnim){clearInterval(note.trackTimer);note.trackTimer=null}}}};SuperNote.prototype.pTypes.triggeroffset=function(obj,noteID,nextVis,nextAnim){with(obj){var note=notes[noteID];if(nextVis&&!note.animating&&!note.visible){var x=0,y=0,elm=note.trigRef;while(elm){x+=elm.offsetLeft;y+=elm.offsetTop;elm=elm.offsetParent}note.ref.style.left=checkWinX(x,note)+"px";note.ref.style.top=checkWinY(y,note)+"px"}}};SuperNote.prototype.bTypes.pinned=function(obj,noteID,nextVis){with(obj){return(!nextVis)?false:true}};SuperNote.prototype.docBody=function(){return document[(document.compatMode&&document.compatMode.indexOf("CSS")>-1)?"documentElement":"body"]};SuperNote.prototype.getWinW=function(){return this.docBody().clientWidth||window.innerWidth||0};SuperNote.prototype.getWinH=function(){return this.docBody().clientHeight||window.innerHeight||0};SuperNote.prototype.getScrX=function(){return this.docBody().scrollLeft||window.scrollX||0};SuperNote.prototype.getScrY=function(){return this.docBody().scrollTop||window.scrollY||0};SuperNote.prototype.checkWinX=function(newX,note){with(this){return Math.max(getScrX(),Math.min(newX,getScrX()+getWinW()-note.ref.offsetWidth-8))}};SuperNote.prototype.checkWinY=function(newY,note){with(this){return Math.max(getScrY(),Math.min(newY,getScrY()+getWinH()-note.ref.offsetHeight-8))}};SuperNote.prototype.mouseTrack=function(evt){with(this){mouseX=evt.pageX||evt.clientX+getScrX()||0;mouseY=evt.pageY||evt.clientY+getScrY()||0}};SuperNote.prototype.mouseHandler=function(evt,show){with(this){if(!document.documentElement){return true}var srcElm=evt.target||evt.srcElement,trigRE=new RegExp(myName+"-(hover|click)-([a-z0-9]+)","i"),targRE=new RegExp(myName+"-(note)-([a-z0-9]+)","i"),trigFind=1,foundNotes={};if(srcElm&&srcElm.nodeType!=1){srcElm=srcElm.parentNode}var elm=srcElm;while(elm&&elm!=rootElm){if(targRE.test(elm.id)||(trigFind&&trigRE.test(elm.className))){if(!allowNesting){trigFind=0}var click=RegExp.$1=="click"?1:0,noteID=RegExp.$2,ref=document.getElementById(myName+"-note-"+noteID),trigRef=trigRE.test(elm.className)?elm:null;if(ref){if(!notes[noteID]){notes[noteID]={click:click,ref:ref,trigRef:null,visible:0,animating:0,timer:null};ref._sn_obj=this;ref._sn_id=noteID}var note=notes[noteID];if(!note.click||(trigRef!=srcElm)){foundNotes[noteID]=true}if(!note.click||(show==2)){if(trigRef){notes[noteID].trigRef=notes[noteID].ref._sn_trig=elm}display(noteID,show);if(note.click&&(srcElm==trigRef)){cancelEvent(evt)}}}}if(elm._sn_trig){trigFind=1;elm=elm._sn_trig}else{elm=elm.parentNode}}if(show==2){for(var n in notes){if(notes[n].click&&notes[n].visible&&!foundNotes[n]){display(n,0)}}}}};SuperNote.prototype.display=function(noteID,show){with(this){with(notes[noteID]){clearTimeout(timer);if(!animating||(show?!visible:visible)){var tmt=animating?1:(show?showDelay||1:hideDelay||1);timer=setTimeout("SuperNote.instances["+instance+'].setVis("'+noteID+'",'+show+",false)",tmt)}}}};SuperNote.prototype.checkType=function(noteID,nextVis,nextAnim){with(this){var note=notes[noteID],bType,pType;if((/snp-([a-z]+)/).test(note.ref.className)){pType=RegExp.$1}if((/snb-([a-z]+)/).test(note.ref.className)){bType=RegExp.$1}if(nextAnim&&bType&&bTypes[bType]&&(bTypes[bType](this,noteID,nextVis)==false)){return false}if(pType&&pTypes[pType]){pTypes[pType](this,noteID,nextVis,nextAnim)}return true}};SuperNote.prototype.setVis=function(noteID,show,now){with(this){var note=notes[noteID];if(note&&checkType(noteID,show,1)||now){note.visible=show;note.animating=1;animate(noteID,show,now)}}};SuperNote.prototype.animate=function(noteID,show,now){with(this){var note=notes[noteID];if(!note.animTimer){note.animTimer=0}if(!note.animC){note.animC=0}with(note){clearTimeout(animTimer);var speed=(animations.length&&!now)?(show?animInSpeed:animOutSpeed):1;if(show&&!animC){if(onshow){this.onshow(noteID)}IEFrameFix(noteID,1);ref.style[cssProp]=cssVis}animC=Math.max(0,Math.min(1,animC+speed*(show?1:-1)));if(document.getElementById&&speed<1){for(var a=0;a<animations.length;a++){animations[a](ref,animC)}}if(!show&&!animC){if(onhide){this.onhide(noteID)}IEFrameFix(noteID,0);ref.style[cssProp]=cssHid}if(animC!=parseInt(animC)){animTimer=setTimeout(myName+'.animate("'+noteID+'",'+show+")",50)}else{checkType(noteID,animC?1:0,0);note.animating=0}}}};SuperNote.prototype.IEFrameFix=function(noteID,show){with(this){if(!window.createPopup||!IESelectBoxFix){return}var note=notes[noteID],ifr=note.iframe;if(!ifr){ifr=notes[noteID].iframe=document.createElement("iframe");ifr.setAttribute("src","javascript:false;");ifr.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=0)";ifr.style.position="absolute";ifr.style.borderWidth="0";note.ref.parentNode.insertBefore(ifr,note.ref.parentNode.firstChild)}if(show){ifr.style.left=note.ref.offsetLeft+"px";ifr.style.top=note.ref.offsetTop+"px";ifr.style.width=note.ref.offsetWidth+"px";ifr.style.height=note.ref.offsetHeight+"px";ifr.style.visibility="inherit"}else{ifr.style.visibility="hidden"}}};
;
var HOSTURL="/";var AJAXPATH="";if(typeof(jive)=="undefined"){jive={namespace:function(a,e){var d=a.split("."),c=this,b;for(b=0;b<d.length;b+=1){if(typeof(c[d[b]])==="undefined"){if(b==d.length-1&&typeof(e)!="undefined"){c[d[b]]=e}else{c[d[b]]={}}}c=c[d[b]]}return c}}}jive.namespace("gui");jive.namespace("model");jive.namespace("ext.y");jive.namespace("ext.x");jive.namespace("xml");jive.namespace("rte.macros",[]);jive.namespace("rte.plugin");if(typeof(console)=="undefined"){console={}}if(typeof(console.log)!="function"){console.log=function(){}}if(typeof(console.debug)!="function"){console.debug=console.log};
;
jive.ext.x.xMac=(navigator.appVersion.indexOf("Mac")!=-1);jive.ext.x.xWindows=!jive.ext.x.xMac;jive.ext.x.xVersion="3.15.1";jive.ext.x.xNN4=false;jive.ext.x.xOp7=false;jive.ext.x.xOp5or6=false;jive.ext.x.xIE4Up=false;jive.ext.x.xIE4=false;jive.ext.x.xIE5=false;jive.ext.x.xUA=navigator.userAgent.toLowerCase();jive.ext.x.xIE=false;jive.ext.x.xSafari=false;if(window.opera){jive.ext.x.xOp7=(jive.ext.x.xUA.indexOf("opera 7")!=-1||jive.ext.x.xUA.indexOf("opera/7")!=-1);if(!jive.ext.x.xOp7){jive.ext.x.xOp5or6=(jive.ext.x.xUA.indexOf("opera 5")!=-1||jive.ext.x.xUA.indexOf("opera/5")!=-1||jive.ext.x.xUA.indexOf("opera 6")!=-1||jive.ext.x.xUA.indexOf("opera/6")!=-1)}}else{if(document.all){jive.ext.x.xIE4Up=jive.ext.x.xUA.indexOf("msie")!=-1&&parseInt(navigator.appVersion)>=4;jive.ext.x.xIE4=jive.ext.x.xUA.indexOf("msie 4")!=-1;jive.ext.x.xIE5=jive.ext.x.xUA.indexOf("msie 5")!=-1;jive.ext.x.xIE6=jive.ext.x.xUA.indexOf("msie 6")!=-1;jive.ext.x.xIE7=jive.ext.x.xUA.indexOf("msie 7")!=-1;jive.ext.x.xIE4Up=jive.ext.x.xIE4||jive.ext.x.xIE5||jive.ext.x.xIE6;jive.ext.x.xIE=true}}if(jive.ext.x.xUA.indexOf("safari")!=-1||jive.ext.x.xUA.indexOf("Safari")!=-1){jive.ext.x.xSafari=true}jive.ext.x.xGetElementById=function(b,a){if(!$obj(a)){a=b.ownerDocument}if(b==null){return b}if(typeof(b)!="string"){return b}if(a.getElementById){b=a.getElementById(b)}else{if(a.all){b=a.all[b]}else{b=null}}return b};jive.ext.x.xParent=function(c,b){if(!(c=jive.ext.x.xGetElementById(c))){return null}var a=null;if(!b&&$def(c.offsetParent)){a=c.offsetParent}else{if($def(c.parentNode)){a=c.parentNode}else{if($def(c.parentElement)){a=c.parentElement}}}return a};var $def=function(a){return(typeof(a)!="undefined")};var $obj=function(a){return(typeof(a)=="object")};var $arr=function(a){return a!=null&&$obj(a)&&$def(a.splice)};$str=function(a){return typeof(a)=="string"};var $num=function(a){return typeof(a)=="number"};jive.ext.x.xShow=function(a){if(!(a=jive.ext.x.xGetElementById(a))){return}if(a.style&&$def(a.style.visibility)){a.style.visibility="visible"}};jive.ext.x.xHide=function(a){if(!(a=jive.ext.x.xGetElementById(a))){return}if(a.style&&$def(a.style.visibility)){a.style.visibility="hidden"}};jive.ext.x.xDisplay=function(b,a){if(!(b=jive.ext.x.xGetElementById(b))){return null}if(b.style&&$def(b.style.display)){if($str(a)){b.style.display=a}return b.style.display}return null};jive.ext.x.xDisplayNone=function(a){if(!(a=jive.ext.x.xGetElementById(a))){return}if(a.style&&$def(a.style.display)){a.style.display="none"}};jive.ext.x.xDisplayBlock=function(a){if(!(a=jive.ext.x.xGetElementById(a))){return}if(a.style&&$def(a.style.display)){a.style.display="block"}};jive.ext.x.xDisplayInline=function(a){if(!(a=jive.ext.x.xGetElementById(a))){return}if(a.style&&$def(a.style.display)){a.style.display="inline"}};jive.ext.x.xZIndex=function(b,a){if(!(b=jive.ext.x.xGetElementById(b))){return 0}if(b.style&&$def(b.style.zIndex)){if($num(a)){b.style.zIndex=a}a=parseInt(b.style.zIndex)}return a};jive.ext.x.xMoveTo=function(b,a,c){jive.ext.x.xLeft(b,a);jive.ext.x.xTop(b,c)};jive.ext.x.xLeft=function(c,a){if(!(c=jive.ext.x.xGetElementById(c))){return 0}var b=$def(c.style);if(b&&$str(c.style.left)){if($num(a)){c.style.left=a+"px"}else{a=parseInt(c.style.left);if(isNaN(a)){a=0}}}else{if(b&&$def(c.style.pixelLeft)){if($num(a)){c.style.pixelLeft=a}else{a=c.style.pixelLeft}}}return a};jive.ext.x.xTop=function(b,c){if(!(b=jive.ext.x.xGetElementById(b))){return 0}var a=$def(b.style);if(a&&$str(b.style.top)){if($num(c)){b.style.top=c+"px"}else{c=parseInt(b.style.top);if(isNaN(c)){c=0}}}else{if(a&&$def(b.style.pixelTop)){if($num(c)){b.style.pixelTop=c}else{c=b.style.pixelTop}}}return c};jive.ext.x.xPageX=function(a){var b=0;if(a.offsetParent){while(1){b+=a.offsetLeft;if(!a.offsetParent){break}a=a.offsetParent}}else{if(a.x){b+=a.x}}return b};jive.ext.x.xPageY=function(b){var a=0;if(b.offsetParent){while(1){a+=b.offsetTop;if(!b.offsetParent){break}b=b.offsetParent}}else{if(b.y){a+=b.y}}return a};jive.ext.x.xScrollLeft=function(b){var c=0,a=b.ownerDocument;if(!(b=jive.ext.x.xGetElementById(b))){if(a.documentElement&&a.documentElement.scrollLeft){c=a.documentElement.scrollLeft}else{if(a.body&&$def(a.body.scrollLeft)){c=a.body.scrollLeft}}}else{if($num(b.scrollLeft)){c=b.scrollLeft}}return c};jive.ext.x.xScrollTop=function(b){var c=0,a=b.ownerDocument;if(!(b=jive.ext.x.xGetElementById(b))){if(a.documentElement&&a.documentElement.scrollTop){c=a.documentElement.scrollTop}else{if(a.body&&$def(a.body.scrollTop)){c=a.body.scrollTop}}}else{if($num(b.scrollTop)){c=b.scrollTop}}return c};jive.ext.x.xWidth=function(g,b){if(!(g=jive.ext.x.xGetElementById(g))){return 0}if($num(b)){if(b<0){b=0}else{b=Math.round(b)}}else{b=-1}var d=$def(g.style);if(g==document||g.tagName.toLowerCase()=="html"||g.tagName.toLowerCase()=="body"){b=jive.ext.x.xClientWidth()}else{if(d&&$def(g.offsetWidth)&&$str(g.style.width)){if(b>=0){var f=0,i=0,h=0,c=0;if(document.compatMode=="CSS1Compat"){var a=jive.ext.x.xGetCS;f=a(g,"padding-left",1);if(f!==null){i=a(g,"padding-right",1);h=a(g,"border-left-width",1);c=a(g,"border-right-width",1)}else{if($def(g.offsetWidth,g.style.width)){g.style.width=b+"px";f=g.offsetWidth-b}}}b-=(f+i+h+c);if(isNaN(b)||b<0){return}else{g.style.width=b+"px"}}b=g.offsetWidth}else{if(d&&$def(g.style.pixelWidth)){if(b>=0){g.style.pixelWidth=b}b=g.style.pixelWidth}}}return b};jive.ext.x.xCamelize=function(d){var e,g,b=d.split("-");var f=b[0];for(e=1;e<b.length;++e){g=b[e].charAt(0);f+=b[e].replace(g,g.toUpperCase())}return f};jive.ext.x.xGetCS=function(f,d){try{if(!(f=jive.ext.x.xGetElementById(f))){return null}var c,a="undefined",b=f.ownerDocument.defaultView;if(b&&b.getComputedStyle){c=b.getComputedStyle(f,"");if(c){a=c.getPropertyValue(d)}}else{if(f.currentStyle){a=f.currentStyle[jive.ext.x.xCamelize(d)]}else{return null}}if($str(a)&&a.indexOf("px")>0){a=a.substr(0,a.indexOf("px"));a=parseInt(a)}return a}catch(f){return""}};jive.ext.x.xGetCSFunc=function(f,d){try{if(!(f=jive.ext.x.xGetElementById(f))){return null}var c,a="undefined",b=f.ownerDocument.defaultView;if(b&&b.getComputedStyle){c=b.getComputedStyle(f,"");if(c){return function(e){return function(h){var g=e.getPropertyValue(h);if($str(g)&&g.indexOf("px")>0){g=g.substr(0,g.indexOf("px"));g=parseInt(g)}return g}}(c)}}else{if(f.currentStyle){return function(e){return function(h){var g=e[jive.ext.x.xCamelize(h)];if($str(g)&&g.indexOf("px")>0){g=g.substr(0,g.indexOf("px"));g=parseInt(g)}return g}}(f.currentStyle)}else{return function(){return"undefined"}}}}catch(f){return function(){return"undefined"}}};jive.ext.x.xSetCH=function(e,d){var g=0,b=0,a=0,h=0,f=e.ownerDocument;if($def(f.defaultView)&&$def(f.defaultView.getComputedStyle)){g=jive.ext.x.xGetCS(e,"padding-top");b=jive.ext.x.xGetCS(e,"padding-bottom");a=jive.ext.x.xGetCS(e,"border-top-width");h=jive.ext.x.xGetCS(e,"border-bottom-width")}else{if($def(e.currentStyle,f.compatMode)){if(f.compatMode=="CSS1Compat"){g=parseInt(e.currentStyle.paddingTop);b=parseInt(e.currentStyle.paddingBottom);a=parseInt(e.currentStyle.borderTopWidth);h=parseInt(e.currentStyle.borderBottomWidth)}}else{if($def(e.offsetHeight,e.style.height)){e.style.height=d+"px";g=e.offsetHeight-d}}}if(isNaN(g)){g=0}if(isNaN(b)){b=0}if(isNaN(a)){a=0}if(isNaN(h)){h=0}var c=d-(g+b+a+h);if(isNaN(c)||c<0){return}else{e.style.height=c+"px"}};jive.ext.x.xHeight=function(c,b){if(!(c=jive.ext.x.xGetElementById(c))){return 0}if($num(b)){if(b<0){b=0}else{b=Math.round(b)}}else{b=0}var a=$def(c.style);if(a&&$def(c.offsetHeight)&&$str(c.style.height)){if(b){jive.ext.x.xSetCH(c,b)}b=c.offsetHeight}else{if(a&&$def(c.style.pixelHeight)){if(b){c.style.pixelHeight=b}b=c.style.pixelHeight}}return b};jive.ext.x.xHasPoint=function(i,e,d,b,c,a,f){if(!$num(b)){b=c=a=f=0}else{if(!$num(c)){c=a=f=b}else{if(!$num(a)){f=c;a=b}}}var h=jive.ext.x.xPageX(i),g=jive.ext.x.xPageY(i);return(e>=h+f&&e<=h+jive.ext.x.xWidth(i)-c&&d>=g+b&&d<=g+jive.ext.x.xHeight(i)-a)};jive.ext.x.xClientWidth=function(){var a=0;if(jive.ext.x.xOp5or6){a=window.innerWidth}else{if(!window.opera&&document.documentElement&&document.documentElement.clientWidth){a=document.documentElement.clientWidth}else{if(document.body&&document.body.clientWidth){a=document.body.clientWidth}else{if($def(window.innerWidth,window.innerHeight,document.height)){a=window.innerWidth;if(document.height>window.innerHeight){a-=16}}}}}return a};jive.ext.x.xClientHeight=function(){var a=0;if(jive.ext.x.xOp5or6){a=window.innerHeight}else{if(!window.opera&&document.documentElement&&document.documentElement.clientHeight){a=document.documentElement.clientHeight}else{if(document.body&&document.body.clientHeight){a=document.body.clientHeight}else{if($def(window.innerWidth,window.innerHeight,document.width)){a=window.innerHeight;if(document.width>window.innerWidth){a-=16}}}}}return a};jive.ext.x.xDocHeight=function(h){if(h){var c=h.body,g=h.documentElement}else{var c=document.body,g=document.documentElement}var d=0,i=0,f=0,a=0;if(g){d=g.scrollHeight;i=g.offsetHeight}if(c){f=c.scrollHeight;a=c.offsetHeight}return Math.max(d,i,f,a)};
;
jive.ext.x.xAddEventListener=function(e,eventType,eventListener,useCapture){if(!(e=jive.ext.x.xGetElementById(e))){return}eventType=eventType.toLowerCase();if((!jive.ext.x.xIE4Up&&!jive.ext.x.xOp7)&&e==window){if(eventType=="resize"){jive.ext.x.xPCW=jive.ext.x.xClientWidth();jive.ext.x.xPCH=jive.ext.x.xClientHeight();jive.ext.x.xREL=eventListener;jive.ext.x.xResizeEvent();return}if(eventType=="scroll"){jive.ext.x.xPSL=jive.ext.x.xScrollLeft();jive.ext.x.xPST=jive.ext.x.xScrollTop();jive.ext.x.xSEL=eventListener;jive.ext.x.xScrollEvent();return}}if(e.addEventListener){e.addEventListener(eventType,eventListener,useCapture)}else{if(e.attachEvent){e.attachEvent("on"+eventType,eventListener)}else{if(e.captureEvents){if(useCapture||(eventType.indexOf("mousemove")!=-1)){e.captureEvents(eval("Event."+eventType.toUpperCase()))}var eh="e.on"+eventType+"=eventListener";eval(eh)}else{var eh="e.on"+eventType+"=eventListener";eval(eh)}}}};jive.ext.x.xRemoveEventListener=function(e,eventType,eventListener,useCapture){if(!(e=jive.ext.x.xGetElementById(e))){return}eventType=eventType.toLowerCase();if((!jive.ext.x.xIE4Up&&!jive.ext.x.xOp7)&&e==window){if(eventType=="resize"){jive.ext.x.xREL=null;return}if(eventType=="scroll"){jive.ext.x.xSEL=null;return}}var eh="e.on"+eventType+"=null";if(e.removeEventListener){e.removeEventListener(eventType,eventListener,useCapture)}else{if(e.detachEvent){e.detachEvent("on"+eventType,eventListener)}else{if(e.releaseEvents){if(useCapture||(eventType.indexOf("mousemove")!=-1)){e.releaseEvents(eval("Event."+eventType.toUpperCase()))}eval(eh)}else{eval(eh)}}}};jive.ext.x.xStopPropagation=function(a){if(a&&a.stopPropagation){a.stopPropagation()}else{if(window.event){window.event.cancelBubble=true}}};jive.ext.x.xEvent=function(b){this.type="";this.target=null;this.keyCode=0;var f=b?b:window.event;if(!f){return}if(f.type){this.type=f.type}if(f.target){this.target=f.target}else{if(f.srcElement){this.target=f.srcElement}}var d=null;var c=null;this.pageX=function(){if(d==null){if(jive.ext.x.xOp5or6){d=f.clientX;c=f.clientY}else{if(jive.ext.x.xDef(f.clientX,f.clientY)){d=f.clientX+jive.ext.x.xScrollLeft();c=f.clientY+jive.ext.x.xScrollTop()}}}return d};this.pageY=function(){if(c==null){if(jive.ext.x.xOp5or6){d=f.clientX;c=f.clientY}else{if(jive.ext.x.xDef(f.clientX,f.clientY)){d=f.clientX+jive.ext.x.xScrollLeft();c=f.clientY+jive.ext.x.xScrollTop()}}}return c};var a=null;var g=null;this.offsetX=function(){if(a==null){if(jive.ext.x.xDef(f.layerX,f.layerY)){a=f.layerX;g=f.layerY}else{if(jive.ext.x.xDef(f.offsetX,f.offsetY)){a=f.offsetX;g=f.offsetY}else{a=this.pageX-jive.ext.x.xPageX(this.target);g=this.pageY-jive.ext.x.xPageY(this.target)}}}return a};this.offsetY=function(){if(g==null){if(jive.ext.x.xDef(f.layerX,f.layerY)){a=f.layerX;g=f.layerY}else{if(jive.ext.x.xDef(f.offsetX,f.offsetY)){a=f.offsetX;g=f.offsetY}else{a=this.pageX-jive.ext.x.xPageX(this.target);g=this.pageY-jive.ext.x.xPageY(this.target)}}}return g};if(f.keyCode){this.keyCode=f.keyCode}else{if(jive.ext.x.xDef(f.which)){this.keyCode=f.which}}};jive.ext.x.xResizeEvent=function(){if(jive.ext.x.xREL){setTimeout("jive.ext.x.xResizeEvent()",250)}var a=jive.ext.x.xClientWidth(),b=jive.ext.x.xClientHeight();if(jive.ext.x.xPCW!=a||jive.ext.x.xPCH!=b){jive.ext.x.xPCW=a;jive.ext.x.xPCH=b;if(jive.ext.x.xREL){jive.ext.x.xREL()}}};jive.ext.x.xScrollEvent=function(){if(jive.ext.x.xSEL){setTimeout("jive.ext.x.xScrollEvent()",250)}var a=jive.ext.x.xScrollLeft(),b=jive.ext.x.xScrollTop();if(jive.ext.x.xPSL!=a||jive.ext.x.xPST!=b){jive.ext.x.xPSL=a;jive.ext.x.xPST=b;if(jive.ext.x.xSEL){jive.ext.x.xSEL()}}};
;
jive.ext.x.xTimerMgr=function(){this.set=function(d,f,c,b,e){return(this.timers[this.timers.length]=new a(d,f,c,b,e))};this.timers=new Array();this.running=false;this.run=function(){if(this.running){return}this.running=true;var e,c,f=new Date(),b=f.getTime();for(e=0;e<this.timers.length;++e){c=this.timers[e];if(c&&c.running){c.elapsed=b-c.time0;if(c.elapsed>=c.preset){c.obj[c.mthd](c);if(c.type.charAt(0)=="i"){c.time0=b}else{c.stop()}}}}this.running=false};function a(b,e,f,c,d){this.stop=function(){this.running=false};this.start=function(){this.running=true};this.reset=function(){var g=new Date();this.time0=g.getTime();this.elapsed=0;this.running=true};this.data=d;this.type=b;this.obj=e;this.mthd=f;this.preset=c;this.reset()}};jive.ext.x.xTimer=new jive.ext.x.xTimerMgr();jive.ext.x.xAddEventListener(window,"load",function(){setInterval("jive.ext.x.xTimer.run()",250)});
;
jive.ext.y.HashTable=function(){var b=this;var a=0;this.getCount=function(){return a};this.undefined=new Object();this.cache=new Array();this.put=function(c,d){b.clear(c);b.cache[c]=d;a=a+1};this.get=function(c){if(typeof(b.cache[c])!="undefined"&&b.cache[c]!=b.undefined){return b.cache[c]}else{return false}};this.clear=function(c){if(b.cache[c]!=b.undefined&&b.cache[c]!=null){a=a-1}b.cache[c]=b.undefined};this.toArray=function(e){var c=new Array();for(var d in b.cache){if(typeof(e)=="function"&&e(b.cache[d])){c.push(b.cache[d])}else{if(typeof(e)!="function"&&b.cache[d]!=b.undefined&&b.cache[d]!=Array.prototype.find&&b.cache[d]!=Array.prototype.jFind&&b.cache[d]!=Array.prototype.remove&&b.cache[d]!=Array.prototype.______array&&b.cache[d]!=null){c.push(b.cache[d])}}}return c};this.toKeysArray=function(e){var c=new Array();for(var d in b.cache){c.push(d)}return c}};jive.ext.y.yBottom=function(b,c){if(!(b=jive.ext.x.xGetElementById(b))){return 0}var a=$def(b.style);if(a&&$str(b.style.bottom)){if($num(c)){b.style.bottom=c+"px"}else{c=parseInt(b.style.bottom);if(isNaN(c)){c=0}}}else{if(a&&$def(b.style.pixelBottom)){if($num(c)){b.style.pixelBottom=c}else{c=b.style.pixelBottom}}}return c};jive.ext.y.yOpacity=function(a,b){if(!(a=jive.ext.x.xGetElementById(a))){return}if(jotlet.external.x.xNum(b)){if(b<0){b=0}else{if(b>100){b=100}else{b=Math.round(b)}}if(jotlet.external.x.xDef(a.style.MozOpacity)){a.style.MozOpacity=(b/100);return a.style.MozOpacity*100}if(jotlet.external.x.xDef(a.style.opacity)){a.style.opacity=(b/100);return a.style.opacity*100}if(jotlet.external.x.xStr(a.style.filter)){a.style.filter="alpha(opacity="+(b)+")";a.yOpacity=b;return a.yOpacity}}if(jotlet.external.x.xDef(a.style.MozOpacity)){return a.style.MozOpacity*100}if(jotlet.external.x.xDef(a.style.opacity)){return a.style.opacity*100}if(jotlet.external.x.xDef(a.filters)&&jotlet.external.x.xDef(a.filters.alpha)&&jotlet.external.x.xDef(a.filters.alpha.opacity)){return a.filters.alpha.opacity}};
;
jive.ext.y.yAjax=function(a,d){var f=false;if(window.XMLHttpRequest){f=new XMLHttpRequest();if(f.overrideMimeType){f.overrideMimeType("text/xml")}}else{if(window.ActiveXObject){try{f=new ActiveXObject("Msxml2.XMLHTTP")}catch(c){try{f=new ActiveXObject("Microsoft.XMLHTTP")}catch(c){}}}}if(!f){return false}f.onreadystatechange=b;function b(){try{if(f.readyState==4){if(f.status==200){a(f.responseText)}else{d()}}}catch(g){}}this.POST=function(e,g){f.open("POST",e,true);f.setRequestHeader("Content-type","application/x-www-form-urlencoded");f.setRequestHeader("Content-length",g.length);f.setRequestHeader("Connection","close");f.send(g)}};
;
jive.xml._Xparse_count=0;jive.xml._Xparse_index=new Array();jive.xml._entity=function(b){var a=new Array();a=b.split("&lt;");b=a.join("<");a=b.split("&gt;");b=a.join(">");a=b.split("&quot;");b=a.join('"');a=b.split("&apos;");b=a.join("'");a=b.split("&amp;");b=a.join("&");return b};jive.xml._strip=function(b){var a=new Array();a=b.split("\n");b=a.join("");a=b.split(" ");b=a.join("");a=b.split("\t");b=a.join("");return b};jive.xml._normalize=function(b){var a=new Array();a=b.split("\n");b=a.join(" ");a=b.split("\t");b=a.join(" ");return b};jive.xml._element=function(){this.type="element";this.tagName=new String();this.attributes=new Array();this.childNodes=new Array();this.nodeValue="";this.uid=jive.xml._Xparse_count++;jive.xml._Xparse_index[this.uid]=this};jive.xml._chardata=function(){this.type="chardata";this.value=new String()};jive.xml._pi=function(){this.type="pi";this.value=new String()};jive.xml._comment=function(){this.type="comment";this.value=new String()};jive.xml._frag=function(){this.str=new String();this.ary=new Array();this.end=new String()};jive.xml._tag_element=function(i){var j=i.str.indexOf(">");var f=(i.str.substring(j-1,j)=="/");if(f){j-=1}var g=jive.xml._normalize(i.str.substring(1,j));var c=g.indexOf(" ");var a=new String();var b=new String();if(c!=-1){b=g.substring(0,c);a=g.substring(c+1,g.length)}else{b=g}var h=i.ary.length;i.ary[h]=new jive.xml._element();i.ary[h].tagName=jive.xml._strip(b);if(a.length>0){i.ary[h].attributes=jive.xml._attribution(a)}if(!f){var e=new jive.xml._frag();e.str=i.str.substring(j+1,i.str.length);e.end=b;var d=e;e=jive.xml._compile(e);i.ary[h].childNodes=e.ary;i.ary[h].nodeValue=d;i.str=e.str}else{i.str=i.str.substring(j+2,i.str.length)}return i};jive.xml._tag_pi=function(d){var c=d.str.indexOf("?>");var b=d.str.substring(2,c);var a=d.ary.length;d.ary[a]=new jive.xml._pi();d.ary[a].nodeValue=b;d.str=d.str.substring(c+2,d.str.length);return d};jive.xml._tag_comment=function(d){var c=d.str.indexOf("-->");var b=d.str.substring(4,c);var a=d.ary.length;d.ary[a]=new jive.xml._comment();d.ary[a].nodeValue=b;d.str=d.str.substring(c+3,d.str.length);return d};jive.xml._tag_cdata=function(d){var c=d.str.indexOf("]]>");var b=d.str.substring(9,c);var a=d.ary.length;d.ary[a]=new jive.xml._chardata();d.ary[a].nodeValue=b;d.str=d.str.substring(c+3,d.str.length);return d};jive.xml._attribution=function(e){var f=new Array();while(1){var i=e.indexOf("=");if(e.length==0||i==-1){return f}var h=e.indexOf("'");var g=e.indexOf('"');var a=new Number();var c=new String();if((h<g&&h!=-1)||g==-1){a=h;c="'"}if((g<h||h==-1)&&g!=-1){a=g;c='"'}var j=e.indexOf(c,a+1);var d=e.substring(a+1,j);var b=jive.xml._strip(e.substring(0,i));f[b]=jive.xml._entity(d);e=e.substring(j+1,e.length)}return""};jive.xml._compile=function(c){while(1){if(c.str.length==0){return c}var a=c.str.indexOf("<");if(a!=0){var b=c.ary.length;c.ary[b]=new jive.xml._chardata();if(a==-1){c.ary[b].nodeValue=jive.xml._entity(c.str);c.str=""}else{c.ary[b].nodeValue=jive.xml._entity(c.str.substring(0,a));c.str=c.str.substring(a,c.str.length)}}else{if(c.str.substring(1,2)=="?"){c=jive.xml._tag_pi(c)}else{if(c.str.substring(1,4)=="!--"){c=jive.xml._tag_comment(c)}else{if(c.str.substring(1,9)=="![CDATA["){c=jive.xml._tag_cdata(c)}else{if(c.str.substring(1,c.end.length+3)=="/"+c.end+">"||jive.xml._strip(c.str.substring(1,c.end.length+3))=="/"+c.end){c.str=c.str.substring(c.end.length+3,c.str.length);c.end="";return c}else{c=jive.xml._tag_element(c)}}}}}}return""};jive.xml._prolog=function(c){var a=new Array();a=c.split("\r\n");c=a.join("\n");a=c.split("\r");c=a.join("\n");var e=c.indexOf("<");if(c.substring(e,e+3)=="<?x"||c.substring(e,e+3)=="<?X"){var b=c.indexOf("?>");c=c.substring(b+2,c.length)}var e=c.indexOf("<!DOCTYPE");if(e!=-1){var b=c.indexOf(">",e)+1;var d=c.indexOf("[",e);if(d<b&&d!=-1){b=c.indexOf("]>",e)+2}c=c.substring(b,c.length)}return c};jive.xml.Xparse=function(b){var c=new jive.xml._frag();c.str=jive.xml._prolog(b);var a=new Object();c=jive.xml._compile(c);if(c.ary.length>0){a.documentElement=c.ary[0]}else{a.documentElement=null}a.tagName="ROOT";a.index=jive.xml._Xparse_index;jive.xml._Xparse_index=new Array();return a};
;
jive.xml.XMLParser=function(){var g=null;if(window.ActiveXObject){var a=["MSXML4.DOMDocument","MSXML3.DOMDocument","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XmlDom"];var d=null;if(d==null){var c=false;for(var b=0;b<a.length&&!c;b++){try{d=new ActiveXObject(a[b]);c=true}catch(f){}}}if(d==null){alert("No XML parser available");return}g=function(e){d.async="false";d.loadXML(e);return d}}if(g==null&&window.DOMParser){var d=new DOMParser();g=function(i){var h=d.parseFromString(i,"text/xml");var e=h.documentElement;if((e.tagName=="parserError")||(e.namespaceURI=="http://www.mozilla.org/newlayout/xml/parsererror.xml")){return null}return h}}else{if(g==null&&document.implementation&&document.implementation.createDocument){var d=document.implementation.createDocument("","",null);g=function(e){d.async="false";d.loadXML(e);return d}}else{g=function(e){return jive.xml.Xparse(e)}}}this.parse=function(e){if(g!=null){return g(e)}else{throw"no xml parser defined"}}};
;
jive.model.Ajax=function(c,a,d){var b=this;this.POST=function(f,g){var e=function(j){try{var k=null;if(!$obj(k)||k==null||!$obj(k.documentElement)||k.documentElement==null){var m=new jive.xml.XMLParser();try{k=m.parse(j)}catch(l){d("XML Parse exception");return}}if($obj(k)&&k!=null&&$obj(k.documentElement)&&k.documentElement!=null){k=k.documentElement}else{d("XML Parse exception");return}if(k.tagName=="br"){d("Server Exception")}else{if(k.tagName=="NotLoggedInException"){c.handleLogIn(function(){b.POST(f,g)})}else{c.poke();a(k)}}}catch(l){alert("ajax error:"+l)}};var i=function(){d("500 Status")};var h=new jive.ext.y.yAjax(e,i);h.POST(f,g)}};
;
jive.model.Controller=function(){var f=this;var a=new Object();a.childNodes=new Array();this.newAjax=function(m,n){return new jive.model.Ajax(f,m,n)};var c=new jive.model.LoginManager(f);this.getLoginManager=function(){return c};var d=new jive.model.SettingsManager(f);this.getSettingsManager=function(){return d};var i=new jive.model.RefreshManager(f);this.getRefreshManager=function(){return i};var e=new jive.model.LanguageManager(f,default_lang);this.getLanguageManager=function(){return e};var l=new jive.model.ProjectCache(f);this.getProjectCache=function(){return l};var g=new jive.model.UserCache(f);this.getUserCache=function(){return g};var b=new jive.model.TaskCache(f);this.getTaskCache=function(){return b};var j=new jive.model.PlacesCache(f);this.getPlacesCache=function(){return j};this.handleLogIn=function(m){f.getRefreshManager().loggedOut()};this.poke=function(){f.getRefreshManager().poke()};this.isCalendarVisibleHuh=function(m){return true};this.isReadOnly=function(){return false};this.addListener=function(m){h.push(m)};var h=new Array();var k=new Array();this.addListenerAction=function(m){k.push(m)};this.executeListenerActions=function(){while(k.length>0){k[0]();k.splice(0,1)}};this.removeListener=function(n){for(var m=0;m<h.length;m++){if(h[m]==n){h.splice(m,1)}}};this.notifyTinyMCELoaded=function(){for(var m=0;m<h.length;m++){h[m].tinyMCELoaded()}f.executeListenerActions()}};
;
jive.model.dateLTEQ=function(b,a){return(b.getFullYear()<a.getFullYear()||b.getFullYear()==a.getFullYear()&&(b.getMonth()<a.getMonth()||b.getMonth()==a.getMonth()&&(b.getDate()<=a.getDate())))};jive.model.dateLT=function(b,a){return(b.getFullYear()<a.getFullYear()||b.getFullYear()==a.getFullYear()&&(b.getMonth()<a.getMonth()||b.getMonth()==a.getMonth()&&(b.getDate()<a.getDate())))};jive.model.dateGT=function(b,a){return jive.model.dateLT(a,b)};jive.model.dateGTEQ=function(b,a){return jive.model.dateLTEQ(a,b)};jive.model.monthYearEQ=function(b,a){return b.getMonth()==a.getMonth()&&b.getFullYear()==a.getFullYear()};jive.model.dateEQ=function(b,a){return(b.getDate()==a.getDate()&&b.getMonth()==a.getMonth()&&b.getFullYear()==a.getFullYear())};jive.model.datetimeEQ=function(b,a){return(b.getFullYear()==a.getFullYear()&&b.getMonth()==a.getMonth()&&b.getDate()==a.getDate()&&b.getHours()==a.getHours()&&b.getMinutes()==a.getMinutes())};jive.model.datetimeLTEQ=function(b,a){return(b.getFullYear()<a.getFullYear()||(b.getFullYear()==a.getFullYear()&&(b.getMonth()<a.getMonth()||b.getMonth()==a.getMonth()&&(b.getDate()<a.getDate()||b.getDate()==a.getDate()&&(b.getHours()<a.getHours()||b.getHours()==a.getHours()&&b.getMinutes()<=a.getMinutes())))))};jive.model.dateMinusMonth=function(b){var a=b.getMonth();if(b.getMonth()==0){b.setFullYear(b.getFullYear()-1);b.setMonth(11)}else{b.setMonth(b.getMonth()-1)}while(b.getMonth()==a){b.setDate(b.getDate()-1)}};jive.model.dateMinusWeek=function(a){a.setDate(a.getDate()-7)};jive.model.dateMinusDay=function(a){if(a.getDate()==0&&a.getDate()==1){a.setFullYear(a.getFullYear()-1);a.setMonth(11);a.setDate(31)}else{a.setDate(a.getDate()-1)}};jive.model.DateHelper=function(d){var a=d.getSettingsManager();var c=d.getLanguageManager();var b=this;this.readableDifference=function(g,f){var j=g.getTime()-f.getTime();j=j/1000;var i=false;if(j<=0){i=true;j=-1*j}var k="";if(j<10){return"just now"}else{if(j<20){k="a few seconds"}else{if(j<60){k="less than a minute"}else{if(j<90){k="about a minute"}else{var h=Math.ceil(j/60);if(h<=50){var n=(h==1)?"":"s";k=h+" minute"+n}else{var l=Math.ceil(h/60);if(l<20){var n=(l==1)?"":"s";k=l+" hour"+n}else{var m=Math.round(l/24);if(m<7){var n=(m==1)?"":"s";k=m+" day"+n}else{var e=Math.ceil(m/7);var n=(e==1)?"":"s";k=e+" week"+n}}}}}}}if(i){return k+" ago"}else{return"in "+k}};this.readableDateDifference=function(l,i){var g=new Date();g.setTime(l.getTime());g.setHours(0);g.setMinutes(0);g.setSeconds(0);g.setMilliseconds(0);var f=new Date();f.setTime(i.getTime());f.setHours(0);f.setMinutes(0);f.setSeconds(0);f.setMilliseconds(0);var k=g.getTime()-f.getTime();k=k/1000;var j=false;if(jive.model.dateLT(g,f)){j=true}k=Math.abs(k);var m="";var h=Math.ceil(k/60);var n=Math.ceil(h/60);var o=Math.floor(n/24);if(o==0){m="today"}else{if(o==1&&j){m="yesterday"}else{if(o==1&&!j){m="tomorrow"}else{if(o<7){var p=(o==1)?"":"s";m=o+" day"+p;if(j){m=m+" ago"}else{m="in "+m}}else{var e=Math.ceil(o/7);var p=(e==1)?"":"s";m=e+" week"+p;if(j){m=m+" ago"}else{m="in "+m}}}}}return m};this.formatToDateTime=function(k){var h=k.getFullYear();var i=k.getMonth()+1;if(i<10){i="0"+i}var f=k.getDate();if(f<10){f="0"+f}var e=k.getHours();if(e<10){e="0"+e}var j=k.getMinutes();if(j<10){j="0"+j}var g=k.getSeconds();if(g<10){g="0"+g}return h+"-"+i+"-"+f+" "+e+":"+j+":"+g};this.formatTo12HourTime=function(i){var g=a.getTimeFormat();if(g=="3:00p"){var e=i.getHours();var h=i.getMinutes();if(h<10){h="0"+h}var f="a";if(e>=12){f="p";e-=12}if(e==0){e=12}return e+":"+h+f}else{var e=i.getHours();var h=i.getMinutes();if(h<10){h="0"+h}return e+":"+h}};this.formatToHourTime=function(h){var g=a.getTimeFormat();if(g=="3:00p"){var e=h.getHours();var f="a";if(e>=12){f="p";e-=12}if(e==0){e=12}return e+f}else{var e=h.getHours();return e}};this.formatToStandardTime=function(k){var h=""+k.getFullYear();var i=k.getMonth()+1;if(i<10){i="0"+i}var f=k.getDate();if(f<10){f="0"+f}var e=k.getHours();if(e<10){e="0"+e}var j=k.getMinutes();if(j<10){j="0"+j}var g=k.getSeconds();if(g<10){g="0"+g}return h+"-"+i+"-"+f};this.formatToShortDate=function(h){var g=h.getMonth()+1;var e=h.getDate();var f=a.getDateFormat();if(f=="4/30"){return g+"/"+e}else{return e+"/"+g}};this.formatToLongDate=function(j){var e=c.getActiveLanguage();var i=e.longDay(j.getDay())+", ";var h=e.longMonth(j.getMonth());var f=j.getDate();var g=a.getDateFormat();if(g=="4/30"){if(j.getDate()==1||j.getDate()==21||j.getDate()==31){f+="st"}else{if(j.getDate()==2||j.getDate()==22){f+="nd"}else{if(j.getDate()==3||j.getDate()==23){f+="rd"}else{f+="th"}}}i+=h+" "+f}else{i+=f+" "+h}i+=", "+j.getFullYear();return i};this.formatToMediumDate=function(f){var e=b.formatToMediumDateNoYear(f);e+=", "+f.getFullYear();return e};this.formatToMediumDateNoYear=function(j){var e=c.getActiveLanguage();var i=e.shortDay(j.getDay())+", ";var h=e.shortMonth(j.getMonth());var f=j.getDate();var g=a.getDateFormat();if(g=="4/30"){if(j.getDate()==1||j.getDate()==21||j.getDate()==31){f+="st"}else{if(j.getDate()==2||j.getDate()==22){f+="nd"}else{if(j.getDate()==3||j.getDate()==23){f+="rd"}else{f+="th"}}}i+=h+" "+f}else{i+=f+" "+h}return i};this.formatToMedDate=function(k){var e=c.getActiveLanguage();var i=e.shortMonth(k.getMonth());var f=k.getDate();var j="";var h=a.getDateFormat();if(h=="4/30"){var g="";if(k.getDate()==1||k.getDate()==21||k.getDate()==31){g="st"}else{if(k.getDate()==2||k.getDate()==22){g="nd"}else{if(k.getDate()==3||k.getDate()==23){g="rd"}else{g="th"}}}j=i+" "+f+g}else{j=f+" "+i}return j};this.formatToMedLongDate=function(k){var e=c.getActiveLanguage();var i=e.longMonth(k.getMonth());var f=k.getDate();var j="";var h=a.getDateFormat();if(h=="4/30"){var g="";if(k.getDate()==1||k.getDate()==21||k.getDate()==31){g="st"}else{if(k.getDate()==2||k.getDate()==22){g="nd"}else{if(k.getDate()==3||k.getDate()==23){g="rd"}else{g="th"}}}j=i+" "+f+g}else{j=f+" "+i}return j};this.getMonthName=function(f){var e=c.getActiveLanguage();return e.longMonth(f.getMonth())}};
;
var default_lang = {
"childNodes": [
	{
	"childNodes": [
		{
		"tagName": "lang_id",
		"childNodes": [{ "nodeValue": "1"
}]
		},
		{
		"tagName": "name",
		"childNodes": [{ "nodeValue": "English"
}]
		},
		{
		"childNodes": [
			{
			"tagName": "eng_name",
			"childNodes": [{ "nodeValue": "English"
}]
			},
			{
			"tagName": "name",
			"childNodes": [{ "nodeValue": "English"
}]
			},
			{
			"tagName": "january",
			"childNodes": [{ "nodeValue": "January"
}]
			},
			{
			"tagName": "february",
			"childNodes": [{ "nodeValue": "February"
}]
			},
			{
			"tagName": "march",
			"childNodes": [{ "nodeValue": "March"
}]
			},
			{
			"tagName": "april",
			"childNodes": [{ "nodeValue": "April"
}]
			},
			{
			"tagName": "may",
			"childNodes": [{ "nodeValue": "May"
}]
			},
			{
			"tagName": "june",
			"childNodes": [{ "nodeValue": "June"
}]
			},
			{
			"tagName": "july",
			"childNodes": [{ "nodeValue": "July"
}]
			},
			{
			"tagName": "august",
			"childNodes": [{ "nodeValue": "August"
}]
			},
			{
			"tagName": "september",
			"childNodes": [{ "nodeValue": "September"
}]
			},
			{
			"tagName": "october",
			"childNodes": [{ "nodeValue": "October"
}]
			},
			{
			"tagName": "november",
			"childNodes": [{ "nodeValue": "November"
}]
			},
			{
			"tagName": "december",
			"childNodes": [{ "nodeValue": "December"
}]
			},
			{
			"tagName": "sunday",
			"childNodes": [{ "nodeValue": "Sunday"
}]
			},
			{
			"tagName": "monday",
			"childNodes": [{ "nodeValue": "Monday"
}]
			},
			{
			"tagName": "tuesday",
			"childNodes": [{ "nodeValue": "Tuesday"
}]
			},
			{
			"tagName": "wednesday",
			"childNodes": [{ "nodeValue": "Wednesday"
}]
			},
			{
			"tagName": "thursday",
			"childNodes": [{ "nodeValue": "Thursday"
}]
			},
			{
			"tagName": "friday",
			"childNodes": [{ "nodeValue": "Friday"
}]
			},
			{
			"tagName": "saturday",
			"childNodes": [{ "nodeValue": "Saturday"
}]
			},
			{
			"tagName": "sh_january",
			"childNodes": [{ "nodeValue": "Jan"
}]
			},
			{
			"tagName": "sh_february",
			"childNodes": [{ "nodeValue": "Feb"
}]
			},
			{
			"tagName": "sh_march",
			"childNodes": [{ "nodeValue": "Mar"
}]
			},
			{
			"tagName": "sh_april",
			"childNodes": [{ "nodeValue": "Apr"
}]
			},
			{
			"tagName": "sh_may",
			"childNodes": [{ "nodeValue": "May"
}]
			},
			{
			"tagName": "sh_june",
			"childNodes": [{ "nodeValue": "Jun"
}]
			},
			{
			"tagName": "sh_july",
			"childNodes": [{ "nodeValue": "Jul"
}]
			},
			{
			"tagName": "sh_august",
			"childNodes": [{ "nodeValue": "Aug"
}]
			},
			{
			"tagName": "sh_september",
			"childNodes": [{ "nodeValue": "Sep"
}]
			},
			{
			"tagName": "sh_october",
			"childNodes": [{ "nodeValue": "Oct"
}]
			},
			{
			"tagName": "sh_november",
			"childNodes": [{ "nodeValue": "Nov"
}]
			},
			{
			"tagName": "sh_december",
			"childNodes": [{ "nodeValue": "Dec"
}]
			},
			{
			"tagName": "sh_sunday",
			"childNodes": [{ "nodeValue": "Sun"
}]
			},
			{
			"tagName": "sh_monday",
			"childNodes": [{ "nodeValue": "Mon"
}]
			},
			{
			"tagName": "sh_tuesday",
			"childNodes": [{ "nodeValue": "Tue"
}]
			},
			{
			"tagName": "sh_wednesday",
			"childNodes": [{ "nodeValue": "Wed"
}]
			},
			{
			"tagName": "sh_thursday",
			"childNodes": [{ "nodeValue": "Thu"
}]
			},
			{
			"tagName": "sh_friday",
			"childNodes": [{ "nodeValue": "Fri"
}]
			},
			{
			"tagName": "sh_saturday",
			"childNodes": [{ "nodeValue": "Sat"
}]
			},
			{
			"tagName": "loading",
			"childNodes": [{ "nodeValue": "Loading..."
}]
			},
			{
			"tagName": "sb_actions",
			"childNodes": [{ "nodeValue": "Actions"
}]
			},
			{
			"tagName": "sb_my_calendars",
			"childNodes": [{ "nodeValue": "My Calendars"
}]
			},
			{
			"tagName": "sb_other_calendars",
			"childNodes": [{ "nodeValue": "Other Calendars"
}]
			},
			{
			"tagName": "sb_alerts",
			"childNodes": [{ "nodeValue": "Alerts"
}]
			},
			{
			"tagName": "sb_general_tasks",
			"childNodes": [{ "nodeValue": "General Tasks"
}]
			},
			{
			"tagName": "sb_no_tasks",
			"childNodes": [{ "nodeValue": "no tasks"
}]
			},
			{
			"tagName": "sb_reminder",
			"childNodes": [{ "nodeValue": "Reminder"
}]
			},
			{
			"tagName": "sb_reminders",
			"childNodes": [{ "nodeValue": "Reminders"
}]
			},
			{
			"tagName": "sb_alert",
			"childNodes": [{ "nodeValue": "Alert"
}]
			},
			{
			"tagName": "motto",
			"childNodes": [{ "nodeValue": "Simply Spectacular Time Management"
}]
			},
			{
			"tagName": "nav_month",
			"childNodes": [{ "nodeValue": "month"
}]
			},
			{
			"tagName": "nav_week",
			"childNodes": [{ "nodeValue": "week"
}]
			},
			{
			"tagName": "nav_day",
			"childNodes": [{ "nodeValue": "day"
}]
			},
			{
			"tagName": "nav_today",
			"childNodes": [{ "nodeValue": "today"
}]
			},
			{
			"tagName": "nav_tomorrow",
			"childNodes": [{ "nodeValue": "tomorrow"
}]
			},
			{
			"tagName": "nav_refresh",
			"childNodes": [{ "nodeValue": "refresh"
}]
			},
			{
			"tagName": "nav_list",
			"childNodes": [{ "nodeValue": "list"
}]
			},
			{
			"tagName": "nav_overview",
			"childNodes": [{ "nodeValue": "overview"
}]
			},
			{
			"tagName": "nav_feedback",
			"childNodes": [{ "nodeValue": "feedback"
}]
			},
			{
			"tagName": "nav_send",
			"childNodes": [{ "nodeValue": "Send"
}]
			},
			{
			"tagName": "nav_settings",
			"childNodes": [{ "nodeValue": "settings"
}]
			},
			{
			"tagName": "nav_advanced",
			"childNodes": [{ "nodeValue": "advanced"
}]
			},
			{
			"tagName": "nav_logout",
			"childNodes": [{ "nodeValue": "logout"
}]
			},
			{
			"tagName": "nav_prelogout",
			"childNodes": [{ "nodeValue": "Any unsaved changes will be lost!"
}]
			},
			{
			"tagName": "nav_back",
			"childNodes": [{ "nodeValue": "Back to:"
}]
			},
			{
			"tagName": "nav_event",
			"childNodes": [{ "nodeValue": "event"
}]
			},
			{
			"tagName": "nav_task",
			"childNodes": [{ "nodeValue": "task"
}]
			},
			{
			"tagName": "nav_invite",
			"childNodes": [{ "nodeValue": "Invite!"
}]
			},
			{
			"tagName": "nav_save",
			"childNodes": [{ "nodeValue": "Save"
}]
			},
			{
			"tagName": "nav_filter",
			"childNodes": [{ "nodeValue": "filter"
}]
			},
			{
			"tagName": "feedback_title",
			"childNodes": [{ "nodeValue": "What do you think about Jotlet?"
}]
			},
			{
			"tagName": "feedback_name",
			"childNodes": [{ "nodeValue": "your name:"
}]
			},
			{
			"tagName": "feedback_body",
			"childNodes": [{ "nodeValue": "we welcome brutal honesty:"
}]
			},
			{
			"tagName": "feedback_error",
			"childNodes": [{ "nodeValue": "There was an error sending your feedback. Please try again in a few minutes."
}]
			},
			{
			"tagName": "feedback_thanks",
			"childNodes": [{ "nodeValue": "Thanks for your feedback!"
}]
			},
			{
			"tagName": "cal_create",
			"childNodes": [{ "nodeValue": "create a calendar"
}]
			},
			{
			"tagName": "cal_add",
			"childNodes": [{ "nodeValue": "Add Calendar"
}]
			},
			{
			"tagName": "cal_edit",
			"childNodes": [{ "nodeValue": "Edit Calendar"
}]
			},
			{
			"tagName": "cal_delete",
			"childNodes": [{ "nodeValue": "Delete Calendar"
}]
			},
			{
			"tagName": "cal_remove",
			"childNodes": [{ "nodeValue": "Remove Calendar"
}]
			},
			{
			"tagName": "cal_name",
			"childNodes": [{ "nodeValue": "calendar name"
}]
			},
			{
			"tagName": "cal_color",
			"childNodes": [{ "nodeValue": "select a color for this calendar:"
}]
			},
			{
			"tagName": "color_red",
			"childNodes": [{ "nodeValue": "red"
}]
			},
			{
			"tagName": "color_blue",
			"childNodes": [{ "nodeValue": "blue"
}]
			},
			{
			"tagName": "color_green",
			"childNodes": [{ "nodeValue": "green"
}]
			},
			{
			"tagName": "color_pink",
			"childNodes": [{ "nodeValue": "pink"
}]
			},
			{
			"tagName": "color_purple",
			"childNodes": [{ "nodeValue": "purple"
}]
			},
			{
			"tagName": "color_orange",
			"childNodes": [{ "nodeValue": "orange"
}]
			},
			{
			"tagName": "color_yellow",
			"childNodes": [{ "nodeValue": "yellow"
}]
			},
			{
			"tagName": "color_grey",
			"childNodes": [{ "nodeValue": "grey"
}]
			},
			{
			"tagName": "nav_close",
			"childNodes": [{ "nodeValue": "Close"
}]
			},
			{
			"tagName": "nav_cancel",
			"childNodes": [{ "nodeValue": "Cancel"
}]
			},
			{
			"tagName": "event_menu",
			"childNodes": [{ "nodeValue": "Add Event to..."
}]
			},
			{
			"tagName": "event_edit",
			"childNodes": [{ "nodeValue": "edit event"
}]
			},
			{
			"tagName": "event_edit_cap",
			"childNodes": [{ "nodeValue": "Edit Event"
}]
			},
			{
			"tagName": "event_loading",
			"childNodes": [{ "nodeValue": "Loading Add Event Page..."
}]
			},
			{
			"tagName": "event_add",
			"childNodes": [{ "nodeValue": "add event"
}]
			},
			{
			"tagName": "event_title",
			"childNodes": [{ "nodeValue": "event title"
}]
			},
			{
			"tagName": "event_dt",
			"childNodes": [{ "nodeValue": "date &amp; time"
}]
			},
			{
			"tagName": "event_begins",
			"childNodes": [{ "nodeValue": "begins"
}]
			},
			{
			"tagName": "event_ends",
			"childNodes": [{ "nodeValue": "ends"
}]
			},
			{
			"tagName": "event_at",
			"childNodes": [{ "nodeValue": "at"
}]
			},
			{
			"tagName": "event_allday",
			"childNodes": [{ "nodeValue": "This event is an all day event"
}]
			},
			{
			"tagName": "event_repeats",
			"childNodes": [{ "nodeValue": "This event repeats"
}]
			},
			{
			"tagName": "event_desc",
			"childNodes": [{ "nodeValue": "description"
}]
			},
			{
			"tagName": "event_add_cap",
			"childNodes": [{ "nodeValue": "Add Event"
}]
			},
			{
			"tagName": "event_update",
			"childNodes": [{ "nodeValue": "Update Event"
}]
			},
			{
			"tagName": "event_remind",
			"childNodes": [{ "nodeValue": "Add Reminder"
}]
			},
			{
			"tagName": "event_sb_delete",
			"childNodes": [{ "nodeValue": "Delete this event"
}]
			},
			{
			"tagName": "event_sb_delete_series",
			"childNodes": [{ "nodeValue": "Delete this series"
}]
			},
			{
			"tagName": "event_sb_edit",
			"childNodes": [{ "nodeValue": "Edit this event"
}]
			},
			{
			"tagName": "event_sb_export",
			"childNodes": [{ "nodeValue": "Download this event"
}]
			},
			{
			"tagName": "event_sb_perm",
			"childNodes": [{ "nodeValue": "This is a shared calendar. You do not have permission to edit or delete information."
}]
			},
			{
			"tagName": "task_menu",
			"childNodes": [{ "nodeValue": "Add Task to..."
}]
			},
			{
			"tagName": "task_edit",
			"childNodes": [{ "nodeValue": "edit task"
}]
			},
			{
			"tagName": "task_loading",
			"childNodes": [{ "nodeValue": "Loading Add Task Page..."
}]
			},
			{
			"tagName": "task_title",
			"childNodes": [{ "nodeValue": "task title"
}]
			},
			{
			"tagName": "task_due_date",
			"childNodes": [{ "nodeValue": "due date"
}]
			},
			{
			"tagName": "task_due",
			"childNodes": [{ "nodeValue": "due"
}]
			},
			{
			"tagName": "task_no_due",
			"childNodes": [{ "nodeValue": "This task does not have a due date"
}]
			},
			{
			"tagName": "task_repeats",
			"childNodes": [{ "nodeValue": "This task repeats"
}]
			},
			{
			"tagName": "task_add_cap",
			"childNodes": [{ "nodeValue": "Add Task"
}]
			},
			{
			"tagName": "task_update",
			"childNodes": [{ "nodeValue": "Update Task"
}]
			},
			{
			"tagName": "task_add",
			"childNodes": [{ "nodeValue": "add task"
}]
			},
			{
			"tagName": "task_sb_delete",
			"childNodes": [{ "nodeValue": "Delete this task"
}]
			},
			{
			"tagName": "task_sb_delete_series",
			"childNodes": [{ "nodeValue": "Delete this series"
}]
			},
			{
			"tagName": "task_sb_edit",
			"childNodes": [{ "nodeValue": "Edit this task"
}]
			},
			{
			"tagName": "task_sb_export",
			"childNodes": [{ "nodeValue": "Download this task"
}]
			},
			{
			"tagName": "task_sb_perm",
			"childNodes": [{ "nodeValue": "This is a shared calendar. You do not have permission to edit   or delete information."
}]
			},
			{
			"tagName": "info_in_cal",
			"childNodes": [{ "nodeValue": "in the %sub% calendar"
}]
			},
			{
			"tagName": "info_no_desc",
			"childNodes": [{ "nodeValue": "no description"
}]
			},
			{
			"tagName": "info_on",
			"childNodes": [{ "nodeValue": "on"
}]
			},
			{
			"tagName": "info_never",
			"childNodes": [{ "nodeValue": "never"
}]
			},
			{
			"tagName": "info_no_title",
			"childNodes": [{ "nodeValue": "no title"
}]
			},
			{
			"tagName": "info_more",
			"childNodes": [{ "nodeValue": "More Info"
}]
			},
			{
			"tagName": "info_allday",
			"childNodes": [{ "nodeValue": "All Day"
}]
			},
			{
			"tagName": "info_minutes",
			"childNodes": [{ "nodeValue": "minutes"
}]
			},
			{
			"tagName": "info_hours",
			"childNodes": [{ "nodeValue": "hours"
}]
			},
			{
			"tagName": "info_duration",
			"childNodes": [{ "nodeValue": "duration"
}]
			},
			{
			"tagName": "day_notes",
			"childNodes": [{ "nodeValue": "click to add daily notes"
}]
			},
			{
			"tagName": "day_tasks",
			"childNodes": [{ "nodeValue": "Tasks for the Day"
}]
			},
			{
			"tagName": "day_add_task",
			"childNodes": [{ "nodeValue": "add new task"
}]
			},
			{
			"tagName": "day_all_day",
			"childNodes": [{ "nodeValue": "All Day Events"
}]
			},
			{
			"tagName": "day_click",
			"childNodes": [{ "nodeValue": "click here to add some notes"
}]
			},
			{
			"tagName": "day_saving",
			"childNodes": [{ "nodeValue": "saving..."
}]
			},
			{
			"tagName": "day_loading",
			"childNodes": [{ "nodeValue": "loading..."
}]
			},
			{
			"tagName": "manage_cal",
			"childNodes": [{ "nodeValue": "Calendar Management"
}]
			},
			{
			"tagName": "manage_prop",
			"childNodes": [{ "nodeValue": "calendar properties"
}]
			},
			{
			"tagName": "manage_share",
			"childNodes": [{ "nodeValue": "share calendar"
}]
			},
			{
			"tagName": "manage_export",
			"childNodes": [{ "nodeValue": "export calendar"
}]
			},
			{
			"tagName": "manage_delete",
			"childNodes": [{ "nodeValue": "delete calendar: "
}]
			},
			{
			"tagName": "manage_remove",
			"childNodes": [{ "nodeValue": "remove calendar: "
}]
			},
			{
			"tagName": "manage_edit",
			"childNodes": [{ "nodeValue": "edit a calendar"
}]
			},
			{
			"tagName": "manage_select_buddies",
			"childNodes": [{ "nodeValue": "Select which buddies to share with from the list on the right"
}]
			},
			{
			"tagName": "manage_add_buddy",
			"childNodes": [{ "nodeValue": "Add Buddy"
}]
			},
			{
			"tagName": "manage_add_buddy_link",
			"childNodes": [{ "nodeValue": "Add a Buddy!"
}]
			},
			{
			"tagName": "manage_no_buddies",
			"childNodes": [{ "nodeValue": "No Buddies Here :("
}]
			},
			{
			"tagName": "manage_buddy_email",
			"childNodes": [{ "nodeValue": "enter buddy's email address"
}]
			},
			{
			"tagName": "manage_buddy_name",
			"childNodes": [{ "nodeValue": "Buddy Name:"
}]
			},
			{
			"tagName": "manage_invite_buddy",
			"childNodes": [{ "nodeValue": "Invite Your Buddy!"
}]
			},
			{
			"tagName": "manage_invite_buddy_to",
			"childNodes": [{ "nodeValue": "Invite %sub% to Jotlet!"
}]
			},
			{
			"tagName": "manage_go_back",
			"childNodes": [{ "nodeValue": "Go Back"
}]
			},
			{
			"tagName": "manage_share_bang",
			"childNodes": [{ "nodeValue": "Share!"
}]
			},
			{
			"tagName": "manage_share_self",
			"childNodes": [{ "nodeValue": "You can't share with yourself! :)"
}]
			},
			{
			"tagName": "manage_buddy_in_list",
			"childNodes": [{ "nodeValue": "%sub% is already in your buddy list"
}]
			},
			{
			"tagName": "manage_valid_email",
			"childNodes": [{ "nodeValue": "Please enter a valid email address"
}]
			},
			{
			"tagName": "manage_searching",
			"childNodes": [{ "nodeValue": "Searching..."
}]
			},
			{
			"tagName": "manage_adding_buddy",
			"childNodes": [{ "nodeValue": "Adding Buddy..."
}]
			},
			{
			"tagName": "manage_done_sharing",
			"childNodes": [{ "nodeValue": "Done Sharing!"
}]
			},
			{
			"tagName": "manage_error",
			"childNodes": [{ "nodeValue": "There was an error trying to share"
}]
			},
			{
			"tagName": "manage_sharing",
			"childNodes": [{ "nodeValue": "Sharing with Buddy..."
}]
			},
			{
			"tagName": "manage_add_fail",
			"childNodes": [{ "nodeValue": "could not add buddy :("
}]
			},
			{
			"tagName": "manage_inviting",
			"childNodes": [{ "nodeValue": "Inviting Buddy..."
}]
			},
			{
			"tagName": "manage_done_inviting",
			"childNodes": [{ "nodeValue": "Done Inviting!"
}]
			},
			{
			"tagName": "manage_fail_inviting",
			"childNodes": [{ "nodeValue": "Error Inviting"
}]
			},
			{
			"tagName": "manage_done_invite_msg",
			"childNodes": [{ "nodeValue": "We'll let you know when your buddy has accepted the invitation to Jotlet."
}]
			},
			{
			"tagName": "manage_fail_invite_msg",
			"childNodes": [{ "nodeValue": "There was an error inviting your buddy. Please try again in a few minutes."
}]
			},
			{
			"tagName": "manage_subscribe",
			"childNodes": [{ "nodeValue": "Subscribe"
}]
			},
			{
			"tagName": "manage_export_bang",
			"childNodes": [{ "nodeValue": "Export"
}]
			},
			{
			"tagName": "confirm_del_cal",
			"childNodes": [{ "nodeValue": "Delete calendar \"%sub%\"?\nThis cannot be undone!"
}]
			},
			{
			"tagName": "confirm_rem_cal",
			"childNodes": [{ "nodeValue": "Remove calendar \"%sub%\"?\nThis cannot be undone!"
}]
			},
			{
			"tagName": "confirm_del_event",
			"childNodes": [{ "nodeValue": "Delete event \"%sub%\"?\nThis cannot be undone!"
}]
			},
			{
			"tagName": "confirm_del_event_s",
			"childNodes": [{ "nodeValue": "Delete event series containing \"%sub%\"?\nThis cannot be undone!"
}]
			},
			{
			"tagName": "confirm_del_task",
			"childNodes": [{ "nodeValue": "Delete task \"%sub%\"?\nThis cannot be undone!"
}]
			},
			{
			"tagName": "confirm_del_task_s",
			"childNodes": [{ "nodeValue": "Delete task series containing \"%sub%\"?\nThis cannot be undone!"
}]
			},
			{
			"tagName": "setting_title",
			"childNodes": [{ "nodeValue": "Personal Settings"
}]
			},
			{
			"tagName": "setting_first",
			"childNodes": [{ "nodeValue": "First Name"
}]
			},
			{
			"tagName": "setting_last",
			"childNodes": [{ "nodeValue": "Last Name"
}]
			},
			{
			"tagName": "setting_email",
			"childNodes": [{ "nodeValue": "Email"
}]
			},
			{
			"tagName": "setting_sms",
			"childNodes": [{ "nodeValue": "SMS"
}]
			},
			{
			"tagName": "setting_zip",
			"childNodes": [{ "nodeValue": "Postal Code"
}]
			},
			{
			"tagName": "setting_language",
			"childNodes": [{ "nodeValue": "Language"
}]
			},
			{
			"tagName": "setting_save",
			"childNodes": [{ "nodeValue": "Save Profile"
}]
			},
			{
			"tagName": "setting_old_pass",
			"childNodes": [{ "nodeValue": "Old Password"
}]
			},
			{
			"tagName": "setting_new_pass",
			"childNodes": [{ "nodeValue": "New Password"
}]
			},
			{
			"tagName": "setting_confirm",
			"childNodes": [{ "nodeValue": "Confirm"
}]
			},
			{
			"tagName": "setting_save_pass",
			"childNodes": [{ "nodeValue": "Update Password"
}]
			},
			{
			"tagName": "setting_zone",
			"childNodes": [{ "nodeValue": "Time zone"
}]
			},
			{
			"tagName": "setting_zone_desc",
			"childNodes": [{ "nodeValue": "Time zones are listed with an * if they respect Daylight Savings Time"
}]
			},
			{
			"tagName": "setting_save_zone",
			"childNodes": [{ "nodeValue": "Save Local Settings"
}]
			},
			{
			"tagName": "setting_zoom",
			"childNodes": [{ "nodeValue": "Zoom Level"
}]
			},
			{
			"tagName": "setting_zoom_desc",
			"childNodes": [{ "nodeValue": "The zoom level affects how much time each row in day view represents. The 1 hour zoom will show a compact view, while the 15 minute zoom will show more detail."
}]
			},
			{
			"tagName": "setting_zoom_15_min",
			"childNodes": [{ "nodeValue": "15 minutes"
}]
			},
			{
			"tagName": "setting_zoom_30_min",
			"childNodes": [{ "nodeValue": "30 minutes"
}]
			},
			{
			"tagName": "setting_zoom_1_hour",
			"childNodes": [{ "nodeValue": "1 hour"
}]
			},
			{
			"tagName": "setting_save_zoom",
			"childNodes": [{ "nodeValue": "Save Zoom"
}]
			},
			{
			"tagName": "setting_shade",
			"childNodes": [{ "nodeValue": "Smart-Shading day cells"
}]
			},
			{
			"tagName": "setting_shade_desc",
			"childNodes": [{ "nodeValue": "Smart-Shading will automatically darken the background of busier days in month view. The busier the day, the darker the cell."
}]
			},
			{
			"tagName": "setting_save_shade",
			"childNodes": [{ "nodeValue": "Save Month Settings"
}]
			},
			{
			"tagName": "setting_profile",
			"childNodes": [{ "nodeValue": "user profile"
}]
			},
			{
			"tagName": "setting_change_pass",
			"childNodes": [{ "nodeValue": "change password"
}]
			},
			{
			"tagName": "setting_time_zones",
			"childNodes": [{ "nodeValue": "time zones"
}]
			},
			{
			"tagName": "setting_day_view",
			"childNodes": [{ "nodeValue": "day view"
}]
			},
			{
			"tagName": "setting_month_view",
			"childNodes": [{ "nodeValue": "month view"
}]
			},
			{
			"tagName": "setting_start_week",
			"childNodes": [{ "nodeValue": "Start of Week:  "
}]
			},
			{
			"tagName": "err_cal_name",
			"childNodes": [{ "nodeValue": "Please enter a name for the calendar"
}]
			},
			{
			"tagName": "email_invite",
			"childNodes": [{ "nodeValue": "Hey!\n\nCheck out Jotlet Calendar at www.jotlet.net! It's a great looking and easy to use online calendar.\n\nSign up so I can share my schedule with you!"
}]
			},
			{
			"tagName": "err_task_title",
			"childNodes": [{ "nodeValue": "Please enter a title for your task."
}]
			},
			{
			"tagName": "err_event_title",
			"childNodes": [{ "nodeValue": "Please enter a title for your event."
}]
			},
			{
			"tagName": "remind_adding",
			"childNodes": [{ "nodeValue": "Adding Reminder..."
}]
			},
			{
			"tagName": "remind_loading",
			"childNodes": [{ "nodeValue": "Loading Reminder..."
}]
			},
			{
			"tagName": "remind_email",
			"childNodes": [{ "nodeValue": "Email"
}]
			},
			{
			"tagName": "remind_sms",
			"childNodes": [{ "nodeValue": "Text Message"
}]
			},
			{
			"tagName": "remind_both",
			"childNodes": [{ "nodeValue": "Both"
}]
			},
			{
			"tagName": "remind_5_min",
			"childNodes": [{ "nodeValue": "5 minutes"
}]
			},
			{
			"tagName": "remind_4_hour",
			"childNodes": [{ "nodeValue": "4 hours"
}]
			},
			{
			"tagName": "remind_0_day",
			"childNodes": [{ "nodeValue": "the same day"
}]
			},
			{
			"tagName": "remind_1_day",
			"childNodes": [{ "nodeValue": "the day before"
}]
			},
			{
			"tagName": "remind_2_day",
			"childNodes": [{ "nodeValue": "2 days before"
}]
			},
			{
			"tagName": "remind_3_day",
			"childNodes": [{ "nodeValue": "3 days before"
}]
			},
			{
			"tagName": "remind_4_day",
			"childNodes": [{ "nodeValue": "4 days before"
}]
			},
			{
			"tagName": "remind_5_day",
			"childNodes": [{ "nodeValue": "5 days before"
}]
			},
			{
			"tagName": "remind_1_week",
			"childNodes": [{ "nodeValue": "1 week before"
}]
			},
			{
			"tagName": "remind_2_week",
			"childNodes": [{ "nodeValue": "2 weeks before"
}]
			},
			{
			"tagName": "remind_event",
			"childNodes": [{ "nodeValue": "%email% me %time% before this event"
}]
			},
			{
			"tagName": "remind_task_due",
			"childNodes": [{ "nodeValue": "%email% me at %time%%date% its due"
}]
			},
			{
			"tagName": "remind_task_no",
			"childNodes": [{ "nodeValue": "%email% me at %time% on %date%"
}]
			},
			{
			"tagName": "recur_daily",
			"childNodes": [{ "nodeValue": "daily"
}]
			},
			{
			"tagName": "recur_daily_num",
			"childNodes": [{ "nodeValue": "every %num% days"
}]
			},
			{
			"tagName": "recur_daily_weekday",
			"childNodes": [{ "nodeValue": "every weekday"
}]
			},
			{
			"tagName": "recur_weekly",
			"childNodes": [{ "nodeValue": "weekly"
}]
			},
			{
			"tagName": "recur_weekly_num",
			"childNodes": [{ "nodeValue": "every %num% weeks on:"
}]
			},
			{
			"tagName": "recur_monthly",
			"childNodes": [{ "nodeValue": "monthly"
}]
			},
			{
			"tagName": "recur_monthly_num",
			"childNodes": [{ "nodeValue": "day %num% of every %num2% months"
}]
			},
			{
			"tagName": "recur_monthly_date",
			"childNodes": [{ "nodeValue": "the %first% %weekday% of every %num% months"
}]
			},
			{
			"tagName": "recur_yearly",
			"childNodes": [{ "nodeValue": "yearly"
}]
			},
			{
			"tagName": "recur_yearly_exact",
			"childNodes": [{ "nodeValue": "every %month% %day%"
}]
			},
			{
			"tagName": "recur_yearly_rel",
			"childNodes": [{ "nodeValue": "the %first% %weekday% of %month%"
}]
			},
			{
			"tagName": "recur_custom",
			"childNodes": [{ "nodeValue": "custom"
}]
			},
			{
			"tagName": "recur_custom_desc",
			"childNodes": [{ "nodeValue": "Select your custom series of dates from the small calendar on the left."
}]
			},
			{
			"tagName": "recur_custom_dates",
			"childNodes": [{ "nodeValue": "Selected Dates: "
}]
			},
			{
			"tagName": "recur_end",
			"childNodes": [{ "nodeValue": "End Series:"
}]
			},
			{
			"tagName": "recur_end_after_e",
			"childNodes": [{ "nodeValue": "End after %num% events"
}]
			},
			{
			"tagName": "recur_end_after_t",
			"childNodes": [{ "nodeValue": "End after %num% tasks"
}]
			},
			{
			"tagName": "recur_end_by",
			"childNodes": [{ "nodeValue": "by %date%"
}]
			},
			{
			"tagName": "recur_event",
			"childNodes": [{ "nodeValue": "Repeat this event: "
}]
			},
			{
			"tagName": "recur_task",
			"childNodes": [{ "nodeValue": "Repeat this task: "
}]
			},
			{
			"tagName": "recur_first",
			"childNodes": [{ "nodeValue": "first"
}]
			},
			{
			"tagName": "recur_second",
			"childNodes": [{ "nodeValue": "second"
}]
			},
			{
			"tagName": "recur_third",
			"childNodes": [{ "nodeValue": "third"
}]
			},
			{
			"tagName": "recur_fourth",
			"childNodes": [{ "nodeValue": "fourth"
}]
			},
			{
			"tagName": "recur_fifth",
			"childNodes": [{ "nodeValue": "fifth"
}]
			},
			{
			"tagName": "recur_last",
			"childNodes": [{ "nodeValue": "last"
}]
			}
		],
		"tagName": "lang_table"
		}
	],
	"tagName": "language"
	}
],
"tagName": "languages"
};
;
jive.model.isLanguage=function(a){return $def(a)&&$obj(a)&&a!=null&&$def(a.translate)&&$def(a.getId)};jive.model.Language=function(e,b,d){var c=this;this.getId=function(){return e};this.getName=function(){return b};this.translate=function(f){var g=d.get(f);if(g==false){alert('Language Exception: key "'+f+'" not found')}else{if(g=="_"){return" "}else{g=g.replace(/#xD#xA/g,"\r\n");return g}}};var a=new Array();a.push("red"),a.push("blue"),a.push("green"),a.push("pink"),a.push("purple"),a.push("orange"),a.push("yellow"),a.push("grey");this.color=function(f){return c.translate("color_"+a[f])};this.longMonth=function(f){var g=new Array();g.push("january");g.push("february");g.push("march");g.push("april");g.push("may");g.push("june");g.push("july");g.push("august");g.push("september");g.push("october");g.push("november");g.push("december");return c.translate(g[f])};this.shortMonth=function(f){var g=new Array();g.push("sh_january");g.push("sh_february");g.push("sh_march");g.push("sh_april");g.push("sh_may");g.push("sh_june");g.push("sh_july");g.push("sh_august");g.push("sh_september");g.push("sh_october");g.push("sh_november");g.push("sh_december");return c.translate(g[f])};this.longDay=function(f){var g=new Array();g.push("sunday");g.push("monday");g.push("tuesday");g.push("wednesday");g.push("thursday");g.push("friday");g.push("saturday");return c.translate(g[f])};this.shortDay=function(f){var g=new Array();g.push("sh_sunday");g.push("sh_monday");g.push("sh_tuesday");g.push("sh_wednesday");g.push("sh_thursday");g.push("sh_friday");g.push("sh_saturday");return c.translate(g[f])};this.weekNumber=function(f){var g=new Array();g.push("recur_first");g.push("recur_second");g.push("recur_third");g.push("recur_fourth");g.push("recur_fifth");g.push("recur_last");return c.translate(g[f])}};jive.model.LanguageManager=function(d,k){var h=this;var f=null;var g=new Array();var a=new jive.ext.y.HashTable();var j=new Array();this.getActiveLanguage=function(){return f};this.setActiveLanguage=function(e){if(jive.model.isLanguage(e)){f=e;h.notifyLanguageChanged(f)}else{return false}};this.getLanguageList=function(){return a.toArray()};this.getSilentLanguages=function(){return g};this.loadLanguage=function(l){h.notifyLoadBegin();var e=d.newAjax(h.loadOk,h.loadFail);e.POST(HOSTURL+AJAXPATH+"?load_language","lang_id="+l)};this.saveLanguage=function(l){h.notifyLoadBegin();var m=function(o){return function(p){h.loadOk(p);var q=a.get(o);if($obj(q)&&q!=null){h.setActiveLanguage(q)}}}(l);var n=a.get(l);if($obj(n)&&n!=null){m=function(o){return function(p){h.setActiveLanguage(a.get(o))}}(l)}var e=d.newAjax(m,h.loadFail);e.POST(HOSTURL+AJAXPATH+"?save_language","lang_id="+l)};function c(p){var e;if(p.childNodes.length>0){if(p.childNodes[0].tagName=="language"){if(p.childNodes[0].childNodes.length>0){b=p.childNodes[0];var n="";var r=0;var q=new jive.ext.y.HashTable();for(var m=0;m<b.childNodes.length;m++){if(b.childNodes[m].tagName=="name"){n=b.childNodes[m].childNodes[0].nodeValue}else{if(b.childNodes[m].tagName=="lang_id"){r=b.childNodes[m].childNodes[0].nodeValue}else{if(b.childNodes[m].tagName=="lang_table"){var o=b.childNodes[m];for(var l=0;l<o.childNodes.length;l++){q.put(o.childNodes[l].tagName,o.childNodes[l].childNodes[0].nodeValue)}}}}}b=new jive.model.Language(r,n,q);a.put(b.getId(),b)}else{return false}}else{return false}}else{return false}return b}this.loadOk=function(e){if(!c(e)){h.notifyLoadFail()}else{h.notifyLoadFinish()}};this.loadFail=function(){h.notifyLoadFail()};this.addListener=function(e){j.push(e)};this.removeListener=function(l){for(var e=0;e<j.length;e++){if(j[e]==l){j.splice(e,1)}}};this.notifyLoadBegin=function(){for(var e=0;e<j.length;e++){j[e].beginLoadingLanguages()}};this.notifyLoad=function(l){for(var e=0;e<j.length;e++){j[e].loadLanguage(l)}};this.notifyLoadFinish=function(){for(var e=0;e<j.length;e++){j[e].doneLoadingLanguages()}};this.notifyLoadFail=function(){for(var e=0;e<j.length;e++){j[e].loadingLanguagesFailed()}};this.notifyLanguageChanged=function(l){for(var e=0;e<j.length;e++){j[e].languageChanged(l)}};try{if($def(k)){var b=c(k);if($obj(b)&&b!=null){h.setActiveLanguage(b)}else{alert("error parsing")}}else{alert("no default langauge")}}catch(i){alert("language: "+i)}};
;
jive.model.LoginManager=function(h){var f=this;var e=new Array();var b=new Array();function a(i){try{var l=new jive.xml.XMLParser();var j=l.parse(i);if($obj(j.documentElement)&&j.documentElement!=null){j=j.documentElement}else{j=new Object();j.childNodes=new Array();j.tagName="failed"}if(j.tagName=="success"){f.notifyLoginOk()}else{f.notifyLoginFail()}}catch(k){alert(k)}}function d(){f.notifyLoginFail()}this.login=function(j){var i=new jotlet.external.y.yAjax(a,d);alert("logging in via ajax")};var c=false;function g(){while(b.length>0){b[0]();b.splice(0,1)}}this.addListener=function(i){if(!c){e.push(i)}else{b.push(function(){f.addListener(i)})}};this.removeListener=function(k){if(!c){for(var j=0;j<e.length;j++){if(e[j]==k){e.splice(j,1)}}}else{b.push(function(){f.removeListener(k)})}};this.notifyLoginOk=function(){c=true;for(var j=0;j<e.length;j++){e[j].loginOk()}c=false;g()};this.notifyLoginFail=function(){c=true;for(var j=0;j<e.length;j++){e[j].loginFail()}c=false;g()}};
;
jive.model.RefreshManager=function(h){var i=this;var l=new Array();var a=h.getSettingsManager().getGMT();var d=h.getSettingsManager().getGMT();var b=true;this.poke=function(){try{if(b){a=h.getSettingsManager().getGMT()}}catch(n){alert("refresh error:"+n)}};this.loggedOut=function(){b=false};function f(s,q){try{i.notifyRefreshing();s.setTime(s.getTime()-5);var t=new jive.model.DateHelper(h);var r=t.formatToDateTime(s);var o=h.newAjax(e,g);var p=t.formatToDateTime(h.getEventCache().getMinTime());var n=t.formatToDateTime(h.getEventCache().getMaxTime());o.POST(HOSTURL+AJAXPATH+"?refresh","dt="+encodeURIComponent(r)+"&mindt="+p+"&maxdt="+n+(q?"&all":""))}catch(u){alert("refreshing: "+u)}}this.refresh=function(){if(b){f(d,false)}};this.reload=function(o){var n=d;i.notifyRefreshing();e(o);d=n};var k=new jive.ext.y.HashTable();this.getCustomCache=function(n){var o=k.get(n);if(!$obj(o)){o=new jive.ext.y.HashTable();k.put(n,o)}return o};function c(n){var o=new jive.ext.y.HashTable();k.put(n,o);return o}function m(p){for(var o=0;o<p.childNodes.length;o++){var r=c(p.childNodes[o].tagName);for(var n=0;n<p.childNodes[o].childNodes.length;n++){var q=parseInt(p.childNodes[o].childNodes[n].childNodes[0].nodeValue);r.put(q,true)}}}function e(u){try{b=true;for(var r=0;r<u.childNodes.length;r++){if(u.childNodes[r].tagName=="projects"){if(u.childNodes[r].childNodes.length>0){h.getProjectCache().loadExternalProjects(u.childNodes[r])}}else{if(u.childNodes[r].tagName=="events"){if(u.childNodes[r].childNodes.length>0){h.getEventCache().reloadEvents(u.childNodes[r])}}else{if(u.childNodes[r].tagName=="del_cals"){try{if(u.childNodes[r].childNodes.length>0){h.getCalendarCache().unloadCalendars(u.childNodes[r])}}catch(t){alert("error unloading calendars: "+t)}}else{if(u.childNodes[r].tagName=="del_events"){try{if(u.childNodes[r].childNodes.length>0){h.getEventCache().unloadEvents(u.childNodes[r])}}catch(t){alert("error unloading calendars: "+t)}}else{if(u.childNodes[r].tagName=="event_cache"){try{if(u.childNodes[r].childNodes.length>0){m(u.childNodes[r])}}catch(t){alert("error unloading calendars: "+t)}}else{if(u.childNodes[r].tagName=="reminders"){if(u.childNodes[r].childNodes.length>0){h.getReminderCache().reloadReminders(u.childNodes[r])}}else{if(u.childNodes[r].tagName=="comments"){if(u.childNodes[r].childNodes.length>0){h.getCommentCache().reloadComments(u.childNodes[r])}}else{if(u.childNodes[r].tagName=="forms"){if(u.childNodes[r].childNodes.length>0){h.getFormManager().reloadForms(u.childNodes[r])}}else{if(u.childNodes[r].tagName=="sync"){if($def(h.getSyncManager)){h.getSyncManager().reloadSync(u.childNodes[r])}}else{if(u.childNodes[r].tagName=="calendars"){if(u.childNodes[r].childNodes.length>0){h.getCalendarCache().reloadCalendars(u.childNodes[r])}}else{if(u.childNodes[r].tagName=="settings"){h.getSettingsManager().reloadSettings(u.childNodes[r])}else{if(u.childNodes[r].tagName=="deleted"){try{var w=u.childNodes[r];for(var q=0;q<w.childNodes.length;q++){if(w.childNodes[r].tagName=="event"){var x=parseInt(w.childNodes[q].nodeValue);var o=h.getEventCache().getTaskSilent(v);h.getEventCache().notifyDeletingEvent(o);h.getEventCache().notifyDoneDeletingEvent(o)}else{if(w.childNodes[r].tagName=="task"){var v=parseInt(w.childNodes[q].nodeValue);var p=h.getEventCache().getTaskSilent(v);h.getEventCache().notifyDeletingTask(p);h.getEventCache().notifyDoneDeletingTask(p)}else{if(w.childNodes[r].tagName=="calendar"){var s=parseInt(w.childNodes[q].nodeValue);var n=h.getCalendarCache().getCalendar(s);if($obj(n)&&n!=null){h.getCalendarCache().notifyDeletingCalendar(n);h.getCalendarCache().notifyDoneDeletingCalendar(n)}}}}}}catch(t){alert("exception refreshing deleted items: "+t)}}}}}}}}}}}}}}d=h.getSettingsManager().getGMT();i.notifyDoneRefreshing()}catch(t){alert("refresh.js:loadXML: "+t)}}function g(){i.notifyRefreshingFailed()}this.loadRemoteXML=function(n){i.notifyRefreshing();e(n)};this.addListener=function(n){l.push(n)};this.removeListener=function(o){for(var n=0;n<l.length;n++){if(l[n]==o){l.splice(n,1)}}};this.notifyRefreshing=function(){for(var n=0;n<l.length;n++){l[n].refreshing()}};this.notifyDoneRefreshing=function(){for(var n=0;n<l.length;n++){l[n].doneRefreshing()}};this.notifyRefreshingFailed=function(){for(var n=0;n<l.length;n++){l[n].refreshingFailed()}};var j=new Object();j.loginOk=function(){var o=new jive.model.DateHelper(h);if(a.getTime()<d.getTime()){var n=a}else{var n=d}f(n,true)};j.loginFail=function(){};h.getLoginManager().addListener(j)};
;
jive.model.SettingsManager=function(d){var c="rawhtml";var a=null;var b=(new Date()).getTime();this.getGMT=function(){var f=new Date();if(a!=null&&f.getTime()<b+500){return a}var f=new Date();var e=new Date();e.setTime(Date.parse(f.toUTCString().substring(0,f.toUTCString().length-3)));a=e;return e};this.getNOW=function(){return new Date()};this.getStartWeekOn=function(){return 1};this.getSmartShading=function(){return true};this.getWeatherImage=function(e){return""};this.getDateFormat=function(){return"4/30"}};
;
jive.model.User=function(){var e=this;var d=new Array();function b(h,i){return function(){h(i)}}this.clearRevertActions=function(){d=new Array()};this.revert=function(){while(d.length>0){d[0]();d.splice(0,1)}};var g;var f;var a;var c;this.getID=function(){return g};this.getUsername=function(){return f};this.getFullName=function(){return a};this.getURL=function(){return c};this.setID=function(h){g=h};this.setUsername=function(h){f=h};this.setFullName=function(h){d.push(b(function(i){a=i},a));a=h};this.setURL=function(h){c=h};this.cleanAfterInit=function(){e.clearRevertActions();e.setID=null;e.setUsername=null;this.setURL=null}};jive.model.UserCache=function(f){var e=this;var b=new jive.ext.y.HashTable();function g(h){var i=b.get(h.getID());if($obj(i)){i.setFullName(h.getFullName());i.clearRevertActions()}else{b.put(h.getID(),h)}e.notifyLoadUser(h)}function a(k){var h=new jive.model.User();for(var i=0;i<k.childNodes.length;i++){if(k.childNodes[i].tagName=="i"){if(k.childNodes[i].childNodes.length>0){h.setID(parseInt(k.childNodes[i].childNodes[0].nodeValue))}}else{if(k.childNodes[i].tagName=="u"){h.setUsername(k.childNodes[i].childNodes[0].nodeValue)}else{if(k.childNodes[i].tagName=="n"){h.setFullName(k.childNodes[i].childNodes[0].nodeValue)}else{if(k.childNodes[i].tagName=="url"){h.setURL(k.childNodes[i].childNodes[0].nodeValue)}}}}}h.cleanAfterInit();g(h);return h}this.loadExternalUser=function(i){e.notifyLoadBegin();try{var h=a(i);e.notifyLoadFinish();return h}catch(j){e.notifyLoadFail()}return null};this.addListener=function(h){d.push(h)};var d=new Array();var c=new Array();this.addListenerAction=function(h){c.push(h)};this.executeListenerActions=function(){while(c.length>0){c[0]();c.splice(0,1)}};this.removeListener=function(j){for(var h=0;h<d.length;h++){if(d[h]==j){d.splice(h,1)}}};this.notifyLoadUser=function(j){for(var h=0;h<d.length;h++){d[h].loadUser(j)}e.executeListenerActions()};this.notifyLoadBegin=function(){for(var h=0;h<d.length;h++){d[h].beginLoadingUsers()}e.executeListenerActions()};this.notifyLoadFinish=function(){for(var h=0;h<d.length;h++){d[h].doneLoadingUsers()}e.executeListenerActions()};this.notifyLoadFail=function(){for(var h=0;h<d.length;h++){d[h].loadingUsersFailed()}e.executeListenerActions()}};
;
jive.model.PlacesCache=function(g){var f=this;var d;var b;this.initCacheData=function(k){b=new jive.ext.y.HashTable();for(var j=0;j<k.length;j++){b.put(k[j],new Array())}};this.getPlaceTypeDefaults=function(){var i=new Array();i.push("FOLLOWED_ALL");i.push("FOLLOWED_COMMUNITY");i.push("FOLLOWED_PROJECT");i.push("FOLLOWED_GROUP");i.push("COMMUNITY");i.push("PROJECT");i.push("GROUP");return i};this.loadPlacesCache=function(n,l){var m=b.get(l).length;for(var k=0;k<n.length;k++){var j=n[k];var o=b.get(j.type);o.push(j);b.put(j.type,o)}return m};this.doLoadExternalPlaces=function(n){try{var m=n.toKeysArray();for(var l=0;l<m.length;l++){for(var k=0;k<d.length;k++){if(m[l]==d[k]){f.loadPlaces(n.get(m[l]),m[l]);f.notifyLoadPlaces(m[l])}}}}catch(o){f.notifyLoadFail()}h=true;return null};this.getPlaces=function(i){if(!b){PlacesActionBean.getOrderedPlaceTypes({callback:function(j){d=j;f.initCacheData(d);return b.get(i)},errorHandler:function(k,j){f.getPlaceTypeDefaults();f.initCacheData(d);return b.get(i)},timeout:15000})}else{return b.get(i)}};var h=false;this.isInitialized=function(){return h};this.loadPlaces=function(j,i){if(!b){PlacesActionBean.getOrderedPlaceTypes({callback:function(k){d=k;f.initCacheData(d);return f.loadPlacesCache(j,i)},errorHandler:function(l,k){d=f.getPlaceTypeDefaults();f.initCacheData(d);return f.loadPlacesCache(j,i)},timeout:15000})}else{return f.loadPlacesCache(j,i)}};this.morePlaces=function(i){f.notifyLoadBegin();if(i.type.startsWith("FOLLOWED")){PlacesActionBean.getFollowedPlaces(i.page,{callback:function(k){var j=f.loadPlaces(k,i.type);if(i.refreshAllFollowedTypes){PlacesActionBean.getFollowedPlaceTypes({callback:function(m){for(var l=0;l<m.length;l++){f.notifyLoadFinish({type:m[l],startIndex:0})}},errorHandler:function(m,l){f.notifyLoadFinish({type:"FOLLOWED_ALL",startIndex:0});f.notifyLoadFinish({type:"FOLLOWED_COMMUNITY",startIndex:0});f.notifyLoadFinish({type:"FOLLOWED_PROJECT",startIndex:0});f.notifyLoadFinish({type:"FOLLOWED_GROUP",startIndex:0})},timeout:15000})}else{f.notifyLoadFinish(i,j)}},errorHandler:function(k,j){f.notifyLoadFail()}})}else{if("COMMUNITY"==i.type){PlacesActionBean.getCommunities(i.communityID,i.page,{callback:function(k){var j=f.loadPlaces(k,i.type);f.notifyLoadFinish(i,j)},errorHandler:function(k,j){f.notifyLoadFail()}})}else{PlacesActionBean.getPlacesOfType(i.type,i.page,{callback:function(k){var j=f.loadPlaces(k,i.type);f.notifyLoadFinish(i,j)},errorHandler:function(k,j){f.notifyLoadFail()}})}}};this.loadExternalPlaces=function(i){if(!d){PlacesActionBean.getOrderedPlaceTypes({callback:function(j){d=j;f.initCacheData(d);return f.doLoadExternalPlaces(i)},errorHandler:function(k,j){d=f.getPlaceTypeDefaults();f.initCacheData(d);return f.doLoadExternalPlaces(i)},timeout:15000})}else{return f.doLoadExternalPlaces(i)}};this.doReloadPlaces=function(){PlacesActionBean.getFollowedPlaceTypes({callback:function(k){f.notifyResetPlaces("FOLLOWED_ALL");for(var j=0;j<k.length;j++){b.put(k[j],new Array())}f.morePlaces({type:"FOLLOWED_ALL",page:-1,refreshAllFollowedTypes:true})},errorHandler:function(j,i){f.notifyResetPlaces("FOLLOWED_ALL");b.put("FOLLOWED_ALL",new Array());b.put("FOLLOWED_COMMUNITY",new Array());b.put("FOLLOWED_GROUP",new Array());b.put("FOLLOWED_PROJECT",new Array());f.morePlaces({type:"FOLLOWED_ALL",page:-1,refreshAllFollowedTypes:true})},timeout:10000})};this.reloadPlaces=function(i){if(i.startsWith("FOLLOWED")){if(!b){PlacesActionBean.getOrderedPlaceTypes({callback:function(j){d=j;f.initCacheData(d);f.doReloadPlaces()},errorHandler:function(k,j){d=f.getPlaceTypeDefaults();f.initCacheData(d);return f.doReloadPlaces()},timeout:10000})}else{f.doReloadPlaces()}}};this.addListener=function(i){e.push(i)};var e=new Array();var a=0;var c=new Array();this.addListenerAction=function(i){c.push(i)};this.executeListenerActions=function(){while(c.length>0){c[0]();c.splice(0,1)}};this.removeListener=function(k){if(a==0){for(var j=0;j<e.length;j++){if(e[j]==k){e.splice(j,1)}}}else{f.addListenerAction(function(i){return function(){f.removeListener(i)}}(k))}};this.notifyLoadPlaces=function(k){a++;for(var j=0;j<e.length;j++){e[j].loadPlaces(k)}a--;f.executeListenerActions()};this.notifyLoadBegin=function(){a++;for(var j=0;j<e.length;j++){e[j].beginLoadingPlaces()}a--;f.executeListenerActions()};this.notifyLoadFinish=function(k,l){a++;for(var j=0;j<e.length;j++){e[j].doneLoadingPlaces(k,l)}a--;f.executeListenerActions()};this.notifyLoadFail=function(){a++;for(var j=0;j<e.length;j++){e[j].loadingPlacesFailed()}a--;f.executeListenerActions()};this.notifyResetPlaces=function(k){a++;for(var j=0;j<e.length;j++){e[j].resetPlaces(k)}a--;f.executeListenerActions()}};
;
jive.model.isCheckPoint=function(a){return $def(a)&&$obj(a)&&a!=null&&$def(a.isCheckPoint)};jive.model.CheckPoint=function(c){var i=this;var e=new Array();function k(l,m){return function(){l(m)}}this.clearRevertActions=function(){e=new Array()};this.revert=function(){while(e.length>0){e[0]();e.splice(0,1)}};var f=c;this.getProject=function(){return f};var b;var g=null;var d=null;var a="";var h="";var j=null;this.isCheckPoint=function(){return true};this.getID=function(){return b};this.getCreatedOn=function(){return g};this.getLastModifiedOn=function(){return d};this.getName=function(){return a};this.getDescription=function(){return h};this.getDueDate=function(){return j};this.setID=function(l){b=l};this.setCreatedOn=function(l){g=l};this.setLastModifiedOn=function(l){d=l};this.setName=function(l){e.push(k(function(m){a=m},a));a=l};this.setDescription=function(l){e.push(k(function(m){h=m},h));h=l};this.setDueDate=function(l){e.push(k(function(m){j=m},j));j=l};this.cleanAfterInit=function(){i.clearRevertActions();i.setID=null;i.setCreatedOn=null;i.setLastModifiedOn=null}};jive.model.Project=function(){var j=this;var f=new Array();function l(m,n){return function(){m(n)}}this.clearRevertActions=function(){f=new Array()};this.revert=function(){while(f.length>0){f[0]();f.splice(0,1)}};var c;var a="";var i="";var e;var k;var b;var g;var d=false;var h=new Array();this.getID=function(){return c};this.getCreator=function(){return e};this.getLastModifiedOn=function(){return b};this.getName=function(){return a};this.getDescription=function(){return i};this.getDueDate=function(){return k};this.getTasks=function(){return g};this.isEditable=function(){return d};this.getCheckPoints=function(){return h};this.setID=function(m){c=m};this.setCreator=function(m){e=m};this.setEditable=function(m){d=m};this.setLastModifiedOn=function(m){b=m};this.setName=function(m){f.push(l(function(n){a=n},a));a=m};this.setDescription=function(m){f.push(l(function(n){i=n},i));i=m};this.setDueDate=function(m){f.push(l(function(n){k=n},k));k=m};this.setTasks=function(m){g=m};this.setCheckPoints=function(m){h=m};this.cleanAfterInit=function(){j.clearRevertActions();j.setID=null;j.setCreator=null;j.setEditable=null;j.setLastModifiedOn=null;j.setCheckPoints=null}};jive.model.ProjectCache=function(g){var f=this;var c=new jive.ext.y.HashTable();this.getProject=function(i){return c.get(i)};function b(i){var j=c.get(i.getID());if($obj(j)){j.setCreator(i.getCreator());j.setDescription(i.getDescription());j.setDueDate(i.getDueDate());j.clearRevertActions()}else{c.put(i.getID(),i)}f.notifyLoadProject(i)}function h(t){var v=new Array();for(var r=0;r<t.childNodes.length;r++){var p=new jive.model.Project();var y=t.childNodes[r];var s=new Array();for(var q=0;q<y.childNodes.length;q++){if(y.childNodes[q].tagName=="id"){if(y.childNodes[q].childNodes.length>0){p.setID(y.childNodes[q].childNodes[0].nodeValue)}}else{if(y.childNodes[q].tagName=="name"){if(y.childNodes[q].childNodes.length>0){p.setName(y.childNodes[q].childNodes[0].nodeValue)}}else{if(y.childNodes[q].tagName=="desc"){if(y.childNodes[q].childNodes.length>0){p.setDescription(y.childNodes[q].childNodes[0].nodeValue)}}else{if(y.childNodes[q].tagName=="creator"){var w=y.childNodes[q];var A=g.getUserCache().loadExternalUser(w.childNodes[0]);p.setCreator(A)}else{if(y.childNodes[q].tagName=="d_on"){var m=y.childNodes[q].childNodes[0].nodeValue;if(m!=null){p.setDueDate(new Date(m.replace(/-/g,"/")))}else{p.setDueDate(null)}}else{if(y.childNodes[q].tagName=="m_on"){var m=y.childNodes[q].childNodes[0].nodeValue;if(m!=null){p.setLastModifiedOn(new Date(m.replace(/-/g,"/")))}else{p.setLastModifiedOn(null)}}else{if(y.childNodes[q].tagName=="editable"){p.setEditable(true)}else{if(y.childNodes[q].tagName=="tasks"){var w=y.childNodes[q];var A=g.getTaskCache().loadExternalTasks(w);p.setTasks(A)}else{if(y.childNodes[q].tagName=="cps"){var w=y.childNodes[q];for(var o=0;o<w.childNodes.length;o++){var z=w.childNodes[o];var x=new jive.model.CheckPoint(p);for(var n=0;n<z.childNodes.length;n++){if(z.childNodes[n].tagName=="id"){if(z.childNodes[n].childNodes.length>0){x.setID(z.childNodes[n].childNodes[0].nodeValue)}}else{if(z.childNodes[n].tagName=="c_on"){var m=z.childNodes[n].childNodes[0].nodeValue;if(m!=null){x.setCreatedOn(new Date(m.replace(/-/g,"/")))}else{x.setCreatedOn(null)}}else{if(z.childNodes[n].tagName=="m_on"){var m=z.childNodes[n].childNodes[0].nodeValue;if(m!=null){x.setLastModifiedOn(new Date(m.replace(/-/g,"/")))}else{x.setLastModifiedOn(null)}}else{if(z.childNodes[n].tagName=="nm"){if(z.childNodes[n].childNodes.length>0){x.setName(z.childNodes[n].childNodes[0].nodeValue)}}else{if(z.childNodes[n].tagName=="desc"){if(z.childNodes[n].childNodes.length>0){x.setName(z.childNodes[n].childNodes[0].nodeValue)}}else{if(z.childNodes[n].tagName=="due"){if(z.childNodes[n].childNodes.length>0){var m=z.childNodes[n].childNodes[0].nodeValue;if(m!=null){x.setDueDate(new Date(m.replace(/-/g,"/")))}else{x.setDueDate(null)}}}}}}}}}s.push(x);p.setCheckPoints(s)}}}}}}}}}}}p.cleanAfterInit();b(p);v.push(p)}return v}this.loadExternalProjects=function(j){f.notifyLoadBegin();try{var i=h(j);f.notifyLoadFinish();return i}catch(k){f.notifyLoadFail()}return null};this.canEditProjectHuh=function(i){if(i==0){return true}};this.addListener=function(i){e.push(i)};var e=new Array();var a=0;var d=new Array();this.addListenerAction=function(i){d.push(i)};this.executeListenerActions=function(){while(d.length>0){d[0]();d.splice(0,1)}};this.removeListener=function(k){if(a==0){for(var j=0;j<e.length;j++){if(e[j]==k){e.splice(j,1)}}}else{f.addListenerAction(function(i){return function(){f.removeListener(i)}}(k))}};this.notifyLoadProject=function(k){a++;for(var j=0;j<e.length;j++){e[j].loadProject(k)}a--;f.executeListenerActions()};this.notifyLoadBegin=function(){a++;for(var j=0;j<e.length;j++){e[j].beginLoadingProjects()}a--;f.executeListenerActions()};this.notifyLoadFinish=function(){a++;for(var j=0;j<e.length;j++){e[j].doneLoadingProjects()}a--;f.executeListenerActions()};this.notifyLoadFail=function(){a++;for(var j=0;j<e.length;j++){e[j].loadingProjectsFailed()}a--;f.executeListenerActions()}};
;
jive.model.ProjectCacheListener=function(){this.loadProject=function(a){};this.beginLoadingProjects=function(){};this.doneLoadingProjects=function(){};this.loadingProjectsFailed=function(){}};
;
jive.model.isDocument=function(a){return $obj(a)&&a!=null&&$def(a.getBody)&&$def(a.getSubject)};jive.model.Document=function(){var e=this;var d=new Array();function a(g,h){return function(){g(h)}}this.clearRevertActions=function(){d=new Array()};this.revert=function(){while(d.length>0){d[0]();d.splice(0,1)}};this.confirm=function(){e.notifyTaskChanged()};var f;var b;this.getID=function(){return f};this.getHTML=function(){return b};this.setID=function(g){f=g};this.setHTML=function(g){d.push(a(function(h){b=h},b));b=g};this.cleanAfterInit=function(){e.clearRevertActions();e.setID=null};this.convertToWiki=function(){objectLookupSessionKey};var c=new Array();this.addListener=function(g){c.push(g)};this.removeListener=function(h){for(var g=0;g<c.length;g++){if(c[g]==h){c.splice(g,1)}}};this.notifyDocumentChanged=function(){for(var g=0;g<c.length;g++){c[g].documentChanged(e)}}};jive.model.DocumentCache=function(d){var f=this;var a=new jive.ext.y.HashTable();function j(){this.documentChanged=function(k){f.notifyDocumentChanged(k)}}function e(l){var k=a.get(l.getID());if($obj(k)){k.clearRevertActions()}else{l.addListener(new j());a.put(l.getID(),l)}f.notifyLoadDocument(l)}this.saveDocument=function(m){f.notifySavingDocument(m);try{var l=d.getSettingsManager();var n=new jive.model.DateHelper(d);var k=d.newAjax(function(q){try{if(q.tagName=="success"){f.notifyDoneSavingDocument(m)}else{f.notifySavingDocumentFailed(m)}}catch(r){alert(r)}},function(){try{f.notifySavingDocumentFailed(m)}catch(q){alert("saving failed: "+q)}})}catch(o){f.notifySavingDocumentFailed(m)}};function c(k){f.notifyNewDocumentFromWiki(new jive.model.Document("",k))}this.newDocumentFromWiki=function(k){if(!$def(window.objectLookupSessionKey)){throw"window.objectLookupSessionKey must be defined to use newDocumentFromWiki()"}if(!$def(WikiTextConverter)){throw"WikiTextConverter must be defined to use newDocumentFromWiki()"}WikiTextConverter.convertFromWiki(k,window.objectLookupSessionKey,{callback:c,timeout:DWRTimeout,errorHandler:f.notifyNewDocumentFromWikiFailed})};function b(o){var m=new Array();for(var n=0;n<o.childNodes.length;n++){var k=new jive.model.Document();var q=o.childNodes[n];for(var l=0;l<q.childNodes.length;l++){if(q.childNodes[l].tagName=="id"){if(q.childNodes[l].childNodes.length>0){k.setID(q.childNodes[l].childNodes[0].nodeValue)}}}m.push(k);k.cleanAfterInit();e(k)}return m}this.loadExternalDocuments=function(l){f.notifyLoadBegin();try{var k=loadDocumentsXML(l);f.notifyLoadFinish();return k}catch(m){f.notifyLoadFail()}return null};this.addListener=function(k){h.push(k)};var h=new Array();var i=new Array();this.addListenerAction=function(k){i.push(k)};this.executeListenerActions=function(){while(i.length>0){i[0]();i.splice(0,1)}};this.removeListener=function(l){for(var k=0;k<h.length;k++){if(h[k]==l){h.splice(k,1)}}};this.notifyDocumentChanged=function(l){for(var k=0;k<h.length;k++){h[k].documentChanged(l)}f.executeListenerActions()};this.notifyLoadDocument=function(l){for(var k=0;k<h.length;k++){h[k].loadDocument(l)}f.executeListenerActions()};this.notifyLoadBegin=function(){for(var k=0;k<h.length;k++){h[k].beginLoadingDocuments()}f.executeListenerActions()};this.notifyLoadFinish=function(){for(var k=0;k<h.length;k++){h[k].doneLoadingDocuments()}f.executeListenerActions()};this.notifyLoadFail=function(){for(var k=0;k<h.length;k++){h[k].loadingDocumentsFailed()}f.executeListenerActions()};this.notifySavingDocument=function(l){for(var k=0;k<h.length;k++){h[k].savingDocument(l)}f.executeListenerActions()};this.notifyDoneSavingDocument=function(l){for(var k=0;k<h.length;k++){h[k].doneSavingDocument(l)}f.executeListenerActions()};this.notifySavingDocumentFailed=function(l){for(var k=0;k<h.length;k++){h[k].savingDocumentFailed(l)}f.executeListenerActions()};this.notifyNewDocumentFromWiki=function(l){for(var k=0;k<h.length;k++){h[k].newDocumentFromWiki(l)}f.executeListenerActions()};this.notifyNewDocumentFromWikiFailed=function(){for(var k=0;k<h.length;k++){h[k].newDocumentFromWikiFailed(p)}f.executeListenerActions()};var g=new jive.model.DocumentCacheListener();g.documentChanged=function(k){f.saveDocument(k)};f.addListener(g)};
;
jive.model.DocumentCacheListener=function(){this.loadingDocumentsFailed=function(){};this.doneLoadingDocuments=function(){};this.beginLoadingDocuments=function(){};this.loadDocument=function(){};this.documentChanged=function(){};this.savingDocument=function(){};this.doneSavingDocument=function(){};this.savingDocumentFailed=function(){};this.newDocumentFromWikiFailed=function(){}};
;
jive.model.TaskCacheListener=function(){this.loadingTasksFailed=function(){};this.doneLoadingTasks=function(){};this.beginLoadingTasks=function(){};this.loadTask=function(){};this.taskChanged=function(){}};
;
jive.model.isEvent=function(a){return $obj(a)&&a!=null&&$def(a.getStart)&&$def(a.getEnd)};jive.model.isTask=function(a){return $obj(a)&&a!=null&&$def(a.getDueDate)&&$def(a.getProjectID)};jive.model.Task=function(){var h=this;var e=0;var d=new Array();function p(q,r){return function(){q(r)}}this.clearRevertActions=function(){d=new Array()};this.revert=function(){while(d.length>0){d[0]();d.splice(0,1)}};this.confirm=function(){h.notifyTaskChanged()};var c;var o=e;var i=null;var k;var m;var g;var f;var n;var l;var b;var a;this.getID=function(){return c};this.getProjectID=function(){return o};this.getDueDate=function(){return i};this.hasDueDate=function(){return i!=null};this.getSubject=function(){return k};this.getDescription=function(){return m};this.getCreatedBy=function(){return g};this.getCreatedOn=function(){return f};this.getAssignedBy=function(){return l};this.getAssignedTo=function(){return n};this.getURL=function(){return a};this.isComplete=function(){return b};this.setID=function(q){c=q};this.setProjectID=function(q){o=q};this.setCreatedBy=function(q){g=q};this.setCreatedOn=function(q){f=q};this.setComplete=function(q){b=q};this.setURL=function(q){a=q};this.setDueDate=function(q){d.push(p(function(r){i=r},i));i=q};this.setSubject=function(q){d.push(p(function(r){k=r},k));k=q};this.setDescription=function(q){d.push(p(function(r){m=r},m));m=q};this.setAssignedBy=function(q){d.push(p(function(r){l=r},l));l=q};this.setAssignedTo=function(q){d.push(p(function(r){n=r},n));n=q};this.cleanAfterInit=function(){h.clearRevertActions();h.setID=null;h.setCreatedBy=null;h.setCreatedOn=null;h.setURL=null};var j=new Array();this.addListener=function(q){j.push(q)};this.removeListener=function(r){for(var q=0;q<j.length;q++){if(j[q]==r){j.splice(q,1)}}};this.notifyTaskChanged=function(){for(var q=0;q<j.length;q++){j[q].taskChanged(h)}}};jive.model.TaskCache=function(d){var f=this;var a=new jive.ext.y.HashTable();function c(){this.taskChanged=function(j){f.notifyTaskChanged(j)}}function e(k){var j=a.get(k.getID());if($obj(j)){j.setDueDate(k.getDueDate());j.setSubject(k.getSubject());j.setDescription(k.getDescription());j.setAssignedTo(k.getAssignedTo());j.setAssignedBy(k.getAssignedBy());j.clearRevertActions()}else{k.addListener(new c());a.put(k.getID(),k)}f.notifyLoadTask(k)}this.saveTask=function(j){f.notifySavingTask(j);try{var l=d.getSettingsManager();var q=new jive.model.DateHelper(d);var s=d.newAjax(function(u){try{if(u.tagName=="success"){f.notifyDoneSavingTask(j)}else{f.notifySavingTaskFailed(j)}}catch(v){alert(v)}},function(){try{f.notifySavingTaskFailed(j)}catch(u){alert("saving failed: "+u)}});var p=j.getDueDate();p=(p!=null)?q.formatToDateTime(p):"";var m=!j.hasDueDate();var n=j.getStatus();var r=j.getSubject();var t=j.getDescription();var k=j.getProjectID();s.POST(HOSTURL+AJAXPATH+"?save_task","task_id="+encodeURIComponent(j.getID())+"&due="+encodeURIComponent(p)+"&status="+encodeURIComponent(n)+"&title="+encodeURIComponent(r)+"&description="+encodeURIComponent(t)+"&never_due="+encodeURIComponent(m?"1":"0")+"&project_id="+k)}catch(o){f.notifySavingTaskFailed(j)}};function b(p){var m=new Array();for(var n=0;n<p.childNodes.length;n++){var k=new jive.model.Task();var q=p.childNodes[n];for(var l=0;l<q.childNodes.length;l++){if(q.childNodes[l].tagName=="id"){if(q.childNodes[l].childNodes.length>0){k.setID(q.childNodes[l].childNodes[0].nodeValue)}}else{if(q.childNodes[l].tagName=="pid"){if(q.childNodes[l].childNodes.length>0){k.setProjectID(q.childNodes[l].childNodes[0].nodeValue)}}else{if(q.childNodes[l].tagName=="due"){var o=q.childNodes[l].childNodes[0].nodeValue;if(o!=null){k.setDueDate(new Date(o.replace(/-/g,"/")))}else{k.setDueDate(null)}}else{if(q.childNodes[l].tagName=="subj"){k.setSubject(q.childNodes[l].childNodes[0].nodeValue)}else{if(q.childNodes[l].tagName=="desc"){k.setDescription(q.childNodes[l].childNodes[0].nodeValue)}else{if(q.childNodes[l].tagName=="c_on"){var o=q.childNodes[l].childNodes[0].nodeValue;if(o!=null){k.setCreatedOn(new Date(o.replace(/-/g,"/")))}else{k.setCreatedOn(null)}}else{if(q.childNodes[l].tagName=="c_by"){k.setCreatedBy(d.getUserCache().loadExternalUser(q.childNodes[l].childNodes[0]))}else{if(q.childNodes[l].tagName=="a_by"){k.setAssignedBy(d.getUserCache().loadExternalUser(q.childNodes[l].childNodes[0]))}else{if(q.childNodes[l].tagName=="a_to"){k.setAssignedTo(d.getUserCache().loadExternalUser(q.childNodes[l].childNodes[0]))}else{if(q.childNodes[l].tagName=="url"){k.setURL(q.childNodes[l].childNodes[0].nodeValue)}else{if(q.childNodes[l].tagName=="status"){k.setComplete(q.childNodes[l].nodeValue=="c")}}}}}}}}}}}}m.push(k);k.cleanAfterInit();e(k)}return m}this.loadExternalTasks=function(k){f.notifyLoadBegin();try{var j=b(k);f.notifyLoadFinish();return j}catch(l){f.notifyLoadFail()}return null};this.addListener=function(j){h.push(j)};var h=new Array();var i=new Array();this.addListenerAction=function(j){i.push(j)};this.executeListenerActions=function(){while(i.length>0){i[0]();i.splice(0,1)}};this.removeListener=function(k){for(var j=0;j<h.length;j++){if(h[j]==k){h.splice(j,1)}}};this.notifyTaskChanged=function(k){for(var j=0;j<h.length;j++){h[j].taskChanged(k)}f.executeListenerActions()};this.notifyLoadTask=function(k){for(var j=0;j<h.length;j++){h[j].loadTask(k)}f.executeListenerActions()};this.notifyLoadBegin=function(){for(var j=0;j<h.length;j++){h[j].beginLoadingTasks()}f.executeListenerActions()};this.notifyLoadFinish=function(){for(var j=0;j<h.length;j++){h[j].doneLoadingTasks()}f.executeListenerActions()};this.notifyLoadFail=function(){for(var j=0;j<h.length;j++){h[j].loadingTasksFailed()}f.executeListenerActions()};var g=new jive.model.TaskCacheListener();g.taskChanged=function(j){f.saveTask(j)};f.addListener(g)};
;
jive.rte.settings=function(e){function c(f){return computeRTEPluginStyle(f)}if(e=="mini-w-quote"){var b=false;var d=false;var a=jive.rte.settings(0);a.theme_advanced_statusbar_location="none";a.theme_advanced_buttons1="bold,italic,underline,strikethrough,spacerbutton,bullist,numlist,spacerbutton,jiveimage,jivevideo,spacerbutton,jivelink,jiveemoticons,jivequote,spellchecker,html";delete a.theme_advanced_buttons2;delete a.theme_advanced_buttons3;a.default_height=29;return a}else{if(e=="mini"){var b=false;var d=d;var a=jive.rte.settings(0);a.theme_advanced_statusbar_location="none";a.theme_advanced_buttons1="bold,italic,underline,strikethrough,spacerbutton,bullist,numlist,spacerbutton,jiveimage,jivevideo,spacerbutton,jivelink,jiveemoticons,spellchecker,html";delete a.theme_advanced_buttons2;delete a.theme_advanced_buttons3;a.default_height=29;return a}else{if(e=="widget"){var b=false;var a=jive.rte.settings(0);a.theme_advanced_statusbar_location="none";return a}else{if(e=="wiki"){var a=jive.rte.settings(0);return a}else{if(e=="blog"){var a=jive.rte.settings(0);return a}else{if(e=="thread"){var a=jive.rte.settings(0);if(_jive_gui_quote_text&&_jive_gui_quote_text.length>0){a.theme_advanced_buttons1="fontselect, fontsizeselect, removeformat, magicspacer, spacerbutton,bullist, numlist, outdent, indent, spacerbutton,jivevideo,spacerbutton,jivelink,tabletoolbar,extra,jivequote,spellchecker,html"}return a}else{if(e==0){return{ie7_css:"a{\nborder: 1px solid transparent;\n}\nspan.jive_macro.active_link, a.jive_macro.active_link, a.active_link{\nborder: 1px solid blue;\n}\nspan.jive_macro, a.jive_macro{\nborder: 1px solid transparent;\n}",keep_values:true,convert_urls:false,default_height:58,theme_advanced_buttons1:"fontselect, fontsizeselect, removeformat, magicspacer, spacerbutton,bullist, numlist, outdent, indent, spacerbutton,jivevideo,spacerbutton,jivelink,tabletoolbar,extra,spellchecker,html",theme_advanced_buttons2:"bold,italic,underline,strikethrough,forecolor,jivestyle, magicspacer, spacerbutton, justifyleft,justifycenter,justifyright,justifyfull, spacerbutton,jiveimage,spacerbutton,jiveemoticons, jivemacros ",theme_advanced_buttons3:"tablecontrols",fix_list_elements:false,save_callback:"RawHTMLSaveFunction",convert_fonts_to_spans:true,font_size_style_values:"8pt,10pt,12pt,14pt,18pt,24pt,36pt",strict_loading_mode:true,body_class:"jive-widget-formattedtext",theme:"advanced",plugins:"jivebuttons,jiveemoticons,jivestyle,jivelink,jivequote,jivevideo,jiveimage,alignment,safari,spellchecker,html,style,jivelists,table,save,advimage,advlink,iespell,inlinepopups,contextmenu,tabletoolbar,jivemacros,jiveutil,paste",paste_auto_cleanup_on_paste:true,paste_conheadvert_middot_lists:true,paste_retain_style_properties:false,paste_strip_class_attributes:"all",paste_remove_spans:true,paste_remove_styles:false,paste_block_drop:false,doctype:'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"left",theme_advanced_statusbar_location:"bottom",content_css:c(CS_RESOURCE_BASE_URL+"/styles/tiny_mce3/themes/advanced/skins/default/content.css"),theme_advanced_resize_horizontal:false,theme_advanced_resizing:true,apply_source_formatting:true,spellchecker_languages:SPELL_LANGS,spellchecker_rpc_url:CS_BASE_URL+"/spellcheck.jspa",jive_image_picker_url:b,jive_video_picker_url:d,relative_urls:false,valid_elements:"a[accesskey|charset|class|coords|dir<ltr?rtl|href|hreflang|id|lang|name|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|rel|rev|shape<circle?default?poly?rect|style|tabindex|title|target|type|jivemacro|_.*],abbr[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],acronym[class|dir<ltr?rtl|id|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],address[class|align|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],applet[align<bottom?left?middle?right?top|alt|archive|class|code|codebase|height|hspace|id|name|object|style|title|vspace|width],area[accesskey|alt|class|coords|dir<ltr?rtl|href|id|lang|nohref<nohref|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|shape<circle?default?poly?rect|style|tabindex|title|target],base[href|target],basefont[color|face|id|size],bdo[class|dir<ltr?rtl|id|lang|style|title],big[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],blockquote[cite|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],body[alink|background|bgcolor|class|dir<ltr?rtl|id|lang|link|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onload|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onunload|style|title|text|vlink],br[class|clear<all?left?none?right|id|style|title],button[accesskey|class|dir<ltr?rtl|disabled<disabled|id|lang|name|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|tabindex|title|type|value],caption[align<bottom?left?right?top|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],center[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],cite[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],code[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],col[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|span|style|title|valign<baseline?bottom?middle?top|width],colgroup[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|span|style|title|valign<baseline?bottom?middle?top|width],dd[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],del[cite|class|datetime|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],dfn[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],dir[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],div[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],dl[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],dt[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],em/i[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],embed[width|height|src|pluginspage|name|swliveconnect|play<true?false|loop<true?false|menu<true?false|quality<low?autolow?autohigh?high?medium?high?best|scale<default?exact?noorder|salign<l?t?r?b?tl?tr?bl?br|wmode<window?opaque?transparent|bgcolor|base|flashvars|type|allowfullscreen],fieldset[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],font[class|color|dir<ltr?rtl|face|id|lang|size|style|title],form[accept|accept-charset|action|class|dir<ltr?rtl|enctype|id|lang|method<get?post|name|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onreset|onsubmit|style|title|target],frame[class|frameborder|id|longdesc|marginheight|marginwidth|name|noresize<noresize|scrolling<auto?no?yes|src|style|title],frameset[class|cols|id|onload|onunload|rows|style|title],h1[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],h2[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],h3[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],h4[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],h5[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],h6[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],head[dir<ltr?rtl|lang|profile],hr[align<center?left?right|class|dir<ltr?rtl|id|lang|noshade<noshade|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|size|style|title|width],html[dir<ltr?rtl|lang|version],iframe[align<bottom?left?middle?right?top|class|frameborder|height|id|longdesc|marginheight|marginwidth|name|scrolling<auto?no?yes|src|style|title|width],img[align<bottom?left?middle?right?top|alt|border|class|dir<ltr?rtl|height|hspace|id|ismap<ismap|lang|longdesc|name|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|src|style|title|usemap|vspace|width|jivemacro|_.*|param_.*],input[accept|accesskey|align<bottom?left?middle?right?top|alt|checked<checked|class|dir<ltr?rtl|disabled<disabled|id|ismap<ismap|lang|maxlength|name|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onselect|readonly<readonly|size|src|style|tabindex|title|type<button?checkbox?file?hidden?image?password?radio?reset?submit?text|usemap|value],ins[cite|class|datetime|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],isindex[class|dir<ltr?rtl|id|lang|prompt|style|title],kbd[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],label[accesskey|class|dir<ltr?rtl|for|id|lang|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],legend[align<bottom?left?right?top|accesskey|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],li[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title|type],link[charset|class|dir<ltr?rtl|href|hreflang|id|lang|media|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|rel|rev|style|title|target|type],map[class|dir<ltr?rtl|id|lang|name|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],menu[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],meta[content|dir<ltr?rtl|http-equiv|lang|name|scheme],noframes[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],noscript[class|dir<ltr?rtl|id|lang|style|title],object[align<bottom?left?middle?right?top|archive|border|class|classid|codebase|codetype|data|declare|dir<ltr?rtl|height|hspace|id|lang|name|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|standby|style|tabindex|title|type|usemap|vspace|width],ol[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|start|style|title|type],optgroup[class|dir<ltr?rtl|disabled<disabled|id|label|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],option[class|dir<ltr?rtl|disabled<disabled|id|label|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|selected<selected|style|title|value],p[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],param[id|name|type|value|valuetype<DATA?OBJECT?REF],pre/listing/plaintext/xmp[align|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title|width|jivemacro|_.*],q[cite|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],s[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],samp[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],script[charset|defer|language|src|type],select[class|dir<ltr?rtl|disabled<disabled|id|lang|multiple<multiple|name|onblur|onchange|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|size|style|tabindex|title],small[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],span[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title|jivemacro|_.*],strike[class|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],strong/b[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],style[dir<ltr?rtl|lang|media|title|type],sub[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],sup[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],table[align<center?left?right|bgcolor|border|cellpadding|cellspacing|class|dir<ltr?rtl|frame|height|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|rules|style|summary|title|width],tbody[align<center?char?justify?left?right|char|class|charoff|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title|valign<baseline?bottom?middle?top],td[abbr|align<center?char?justify?left?right|axis|bgcolor|char|charoff|class|colspan|dir<ltr?rtl|headers|height|id|lang|nowrap<nowrap|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|rowspan|scope<col?colgroup?row?rowgroup|style|title|valign<baseline?bottom?middle?top|width],textarea[accesskey|class|cols|dir<ltr?rtl|disabled<disabled|id|lang|name|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onselect|readonly<readonly|rows|style|tabindex|title],tfoot[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title|valign<baseline?bottom?middle?top],th[abbr|align<center?char?justify?left?right|axis|bgcolor|char|charoff|class|colspan|dir<ltr?rtl|headers|height|id|lang|nowrap<nowrap|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|rowspan|scope<col?colgroup?row?rowgroup|style|title|valign<baseline?bottom?middle?top|width],thead[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title|valign<baseline?bottom?middle?top],title[dir<ltr?rtl|lang],tr[abbr|align<center?char?justify?left?right|bgcolor|char|charoff|class|rowspan|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title|valign<baseline?bottom?middle?top],tt[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],u[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],ul[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title|type],var[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title]"}}else{return e}}}}}}}};function computeRTEPluginStyle(b){for(var a=0;a<jive.rte.defaultStyles.length;a++){b+=","+jive.rte.defaultStyles[a]}return b};
;
jive.rte.ParamSet=function(){var a=this;this.name="";this.deleteAll=false;this.params=new Array();this.addParam=function(c,b){a.params.push({name:c,value:b})}};
;
jive.rte.RTE=function(h,t,c){var g=this;var f=false;var a=$(t);if(a.value==""){a.value="<p></p>"}var n=document.createElement("TEXTAREA");n.style.display="none";a.parentNode.insertBefore(n,a);var l=document.createElement("DIV");l.setAttribute("class","superRichContent");l.className="superRichContent";var v=document.createElement("DIV");v.setAttribute("class","rte_wrap");v.className="rte_wrap";if(!$def(c)){c=0}var r=jive.rte.settings(c);r.mode="exact";r.elements=t;r.images_enabled=window._jive_images_enabled;try{if(typeof(window._editor_lang)!="undefined"){r.language=_editor_lang}if(!r.jive_image_picker_url&&typeof(window._jive_image_picker_url)!="undefined"){r.jive_image_picker_url=_jive_image_picker_url}}catch(q){}if(typeof(tinyMCE)=="undefined"){f=true;n.style.display="none";a.style.display="block";a.style.height="200px"}else{try{tinyMCE.init(r)}catch(q){f=true;n.style.display="none";a.style.display="block";a.style.height="200px"}}this.isTextOnly=function(){return f};var s=null;var u=true;var m=false;var j=true;function b(){if(!g.isTextOnly()&&s==null){s=tinyMCE.getInstanceById(t);if(!$def(s)||s==null){return null}s.getContainer().childNodes[0].style.width="";s.onKeyUp.add(function(w,x){g.notifyOnKeyUp(x.keyCode)});s.onChange.add(function(w,x){g.notifyOnChange(x.keyCode)});s.onNodeChange.add(function(w,x){g.notifyOnNodeChange()});s.onInit.add(function(w){return function(y,z){if(y.id==t){w.notifyInitFinished(w)}var x=y.getBody();if(x.childNodes.length==0){x.appendChild(y.plugins.jivemacros.createEmptyPara(y.getDoc()))}}}(g));s.onBeginSpelling.add(function(){m=true});s.onEndSpelling.add(function(){m=false});s.theme.onResize.add(function(){if(j){j=false;g.resizeTo(g.getHeight()+g.getToolbarHeight()+1);s.theme.onResize.dispatch()}else{j=true;g.notifyResized()}});s.plugins.html.registerToggleFunction(g.toggleEditorMode);window.setTimeout(function(){g.notifyInitFinished(g)},5000);if(window.autoSave){var e={navigateAway:function(){if(window&&window.autoSave&&g.restoreNavigateAway){window.autoSave.confirmation=g.restoreNavigateAway;g.restoreNavigateAway=false}}};window.autoSave.addListener(e)}$j(v).append(l);$j("#"+t+"_tbl td.mceIframeContainer").prepend(v)}return s}this.isSpellChecking=function(){return m};this.toggleSpellChecker=function(){b().execCommand("mceSpellCheck")};this.closeAllDialogs=function(){var x=b().windowManager.windows;var w=Object.keys(x);for(var e=0;e<w.length;e++){b().windowManager.close(null,x[w[e]].id)}return x};this.getMacroForName=function(e){var x=window.jive.rte.macros;var y=null;for(var w=0;w<x.length;w++){if(x[w].getName()==e){return x[w]}}return null};this.addMacro=function(e,y,D){var z=b();if(z.selection.getNode().nodeName.toLowerCase()=="html"){var A=z.getBody();if(A.childNodes.length){A=A.childNodes[0]}z.selection.select(A);z.selection.collapse(true)}var x=z.selection.isCollapsed();var w=z.plugins.jivemacros.insertMacro(e,null,D);z.plugins.jivemacros.applyParameterSet(w,e,y);if(x){w.setAttribute("id","__sel_me__");z.selection.setNode(w);w=z.getDoc().getElementById("__sel_me__");w.removeAttribute("id")}z.plugins.jivemacros.validateMacroElements(g,$j(w));var B=g.getUIDForElement($j(w));var C=g.getHiddenElementFor(B);e.refreshPosition(g,w,C);e.refresh(g,w);z.nodeChanged();return w};this.applyParamSet=function(y,x,e){var w=b();w.plugins.jivemacros.applyParameterSet(y,x,e)};this.addTable=function(B,z){var e=b();var x="";x+="<table";for(var w=0;w<B.length;w++){x+=" "+B[w].name+"='"+B[w].value+"'"}x+=">";x+="<tbody>";for(var y=0;y<z.length;y++){var A=z[y];x+="<tr>";if(y==0){for(var C=0;C<A.length;C++){x+='<th align="center" valign="middle" style="background-color:#6690BC;"><font color="#ffffff"><strong>'+(A[C])+"</strong></font></th>"}}else{for(var C=0;C<A.length;C++){x+="<td><p>"+(A[C])+'<br mce_bogus="1"/></p></td>'}}x+="</tr>"}x+="</tbody>";x+="</table>";e.execCommand("mceBeginUndoLevel");e.execCommand("mceInsertContent",false,x);e.addVisual();e.execCommand("mceEndUndoLevel")};this.getCurrentNode=function(){return $j(b().selection.getNode())};this.destroy=function(){tinyMCE.remove(t);n.parentNode.removeChild(n);b().getContainer().parentNode.removeChild(s.getContainer())};this.getLang=function(w,e){return b().getLang(w,e)};this.isReady=function(){if(g.isTextOnly()){return true}var e=b();return e!=null};this.getDOM=function(){return b().getContainer()};this.getID=function(){return t};this.setHTML=function(e){if(g.isTextOnly()){return a.value=e}n.value=e.replace(/>\n/g,">");return b().setContent(n.value)};this.getHTML=function(){if(g.isTextOnly()){return a.value}if(this.isHidden()){this.setHTML(n.value)}var e=b().getContent();if((this.trim(e).length>0)&&e.indexOf("<body")!=0){e="<body>"+e+"</body>"}return this.replaceWhiteSpace(e)};this.replaceWhiteSpace=function(x){var w=[];var y=0;var e=-1;while((e=x.indexOf("  ",y))>=0){if(e<y){break}w.push(x.substring(y,e));w.push("&nbsp;");y=e+1}if(y<x.length){w.push(x.substring(y))}return w.join("")};this.trim=function(w){var y=w.replace(/^\s\s*/,"");var e=/\s/;var x=y.length;while(e.test(y.charAt(--x))){}return y.slice(0,x+1)};this.show=function(){b().show();g.notifyShowing()};this.getWindow=function(){return b().getWin()};this.getDoc=function(){return b().getDoc()};var p=null;this.getHiddenContainer=function(){if(p!=null){return p}p=$j("#"+g.getID()+"_tbl div.superRichContent");return p};this.getHiddenElementFor=function(e){var w=g.getHiddenContainer();var x=w.find("#"+e);if(x.length){return x}return null};function d(w){var e="_jivemacro_uid".length;if(w.length>=e&&w.substr(0,e)=="_jivemacro_uid"){return true}return false}this.getUIDForElement=function(z){var e="_jivemacro_uid".length;var y=z.attr("class").split(" ");var x=null;for(var w=0;w<y.length;w++){if(d(y[w])){x=y[w].substr(e)}}return x};var k=new jive.ext.y.HashTable();this.getRTEElementFor=function(e){if(e!=null){var w=k.get(e);if(w&&w.get(0).parentNode!=null){return w}if(w){k.clear(e);return null}w=$j(g.getBody()).find("._jivemacro_uid"+e);k.put(e,w);return w}return null};this.removeMacroWithUID=function(e){var x=k.get(e);if(x&&x.length&&x.get(0).parentNode!=null){x.get(0).parentNode.removeChild(x.get(0))}k.clear(e);var w=g.getHiddenContainer();w.children("#"+e).remove()};this.setAttributeForMacroWithUID=function(e,w,x){var y=k.get(e);if(y&&y.length&&y.get(0).parentNode!=null){$j(y.get(0)).attr(w,x)}};this.generateUID=function(){return"_"+(new Date()).getTime()+Math.round(Math.random()*10000)};this.getBody=function(){return b().getBody()};this.appendHTML=function(e){$j(b().getBody()).append(e)};this.insertHTMLAtCursor=function(e){if(e.indexOf("<body>")>=0){e=e.replace(/<body>/g,"")}if(e.indexOf("</body>")>=0){e=e.replace(/<\/body>/g,"")}if(b().selection.getNode().nodeName.toLowerCase()=="body"){g.appendHTML(e)}else{$j(b().selection.getNode()).after(e)}};this.focus=function(z){try{if(typeof(z)=="undefined"){z=false}if(this.isHidden()){n.focus()}else{var w=g.getBody();if(w.childNodes.length==0){w.appendChild(b().plugins.jivemacros.createEmptyPara(g.getDoc()));b().selection.select(w.childNodes[0].childNodes[0]);b().selection.collapse(true);return}else{if(w.childNodes.length==1){var B=w.childNodes[0];var x;if(B.childNodes.length==1&&(x=B.childNodes[0])&&x.nodeName.toLowerCase()=="br"){b().selection.select(x);b().selection.collapse(true);return}}}b().focus();if(g.getCurrentNode()[0].nodeName.toLowerCase()=="body"){var y=g.getBody();while(y.nodeType==1&&y.childNodes.length>0){y=y.childNodes[0]}b().selection.select(y);b().selection.collapse(true)}}}catch(A){console.log(A)}};this.collapseSelection=function(){var e=b();e.selection.select(e.selection.getNode());e.selection.collapse()};this.select=function(w){var e=b();e.selection.select(w)};this.hide=function(){b().hide()};this.isHidden=function(){return n.style.display=="block"};this.resizeTo=function(e){var y=b().getContainer();var x=y.firstChild;if(x.nodeName.toLowerCase()!="table"){x=x.childNodes[0]}var w=jive.ext.x.xHeight(x.rows[0].cells[0]);if(x.rows.length>2){w+=jive.ext.x.xHeight(x.rows[x.rows.length-1].cells[0])}var z=$j(b().getContentAreaContainer()).find("iframe");tinymce.DOM.setStyle(z[0],"height",e-w);tinymce.DOM.setStyle(l,"height",e-w);tinymce.DOM.setStyle(x,"height",e)};this.getHeight=function(){var e=$j(b().getContentAreaContainer()).find("iframe").get(0);if(e){return jive.ext.x.xHeight(e)}else{return 100}};this.getToolbarHeight=function(){var x=b().getContainer();var w=x.firstChild;if(w.nodeName.toLowerCase()!="table"){w=w.childNodes[0]}var e=jive.ext.x.xHeight(w.rows[0].cells[0]);if(w.rows.length>2){e+=jive.ext.x.xHeight(w.rows[w.rows.length-1].cells[0])}return e};this.killYourself=function(){b().plugins.jivemacros.killYourself()};this.toggleEditorMode=function(w){if(w==t){if(window&&window.autoSave){g.restoreNavigateAway=window.autoSave.confirmation;window.autoSave.confirmation=false}var x=$(t+"_parent");if(g.isHidden()){var y=jive.ext.x.xHeight(n);n.style.display="none";g.show();g.setHTML(n.value);g.focus();g.resizeTo(y);b().plugins.jivemacros.removeDuplicateMacros(b(),false);b().plugins.jivemacros.fixBodyParagraphs()}else{var e=$(t+"_tbl");var y=jive.ext.x.xHeight(e);n.value=g.getHTML(true);g.hide();n.style.display="block";a.style.display="none";jive.ext.x.xHeight(n,y);g.focus()}g.notifyDoneTogglingMode()}};this.i18n=function(w,x){if(typeof(x)=="undefined"){x=w}var e=b();return e.getLang(w,x)};this.addListener=function(e){if($def(e.onShow)){e.onShow()}o.push(e)};var o=new Array();var i=new Array();this.addListenerAction=function(e){i.push(e)};this.executeListenerActions=function(){while(i.length>0){i[0]();i.splice(0,1)}};this.removeListener=function(w){for(var e=0;e<o.length;e++){if(o[e]==w){o.splice(e,1)}}};this.initted=false;this.notifyInitFinished=function(w){if(!g.initted){g.initted=true;for(var e=0;e<o.length;e++){o[e].initFinished(w)}g.executeListenerActions()}};this.notifyOnKeyUp=function(w){for(var e=0;e<o.length;e++){o[e].onKeyUp(w)}g.executeListenerActions()};this.notifyOnChange=function(){if(u){u=false;return}for(var e=0;e<o.length;e++){o[e].onChange()}g.executeListenerActions()};this.notifyResized=function(){for(var e=0;e<o.length;e++){o[e].onResize()}g.executeListenerActions()};this.notifyShowing=function(){for(var e=0;e<o.length;e++){o[e].onShow()}g.executeListenerActions()};this.notifyOnNodeChange=function(){for(var e=0;e<o.length;e++){o[e].onNodeChange()}g.executeListenerActions()};this.notifyDoneTogglingMode=function(){for(var e=0;e<o.length;e++){o[e].doneTogglingMode()}g.executeListenerActions()}};
;
jive.rte.Macro=function(e,b,f,j,c,k,d,i,g){var h=this;var a=null;if(typeof(jive.rte.plugin[e])!="undefined"){a=new jive.rte.plugin[e](e,b,f,j,c,k,d,i,g)}this.getName=function(){if(a!=null){return a.getName()}return e};this.getUrl=function(){if(a!=null){return a.getUrl()}return b};this.isButton=function(){if(a!=null){return a.isButton()}return g};this.isEnabled=function(){if(a!=null){return a.isEnabled()}return i};this.isShowSettings=function(){if(a!=null){return a.isShowSettings()}return j};this.isShowInMacroList=function(){if(a!=null){return a.isShowInMacroList()}return c};this.getMacroType=function(){if(a!=null){return a.getMacroType()}return f};this.getParameterSets=function(){if(a!=null){return a.getParameterSets()}return k};this.getAllowedParameters=function(){if(a!=null){return a.getAllowedParameters()}return d};this.refreshPosition=function(l,m,n){if(a!=null){return a.refreshPosition(l,m,n)}};this.usesCustomBackground=function(){if(a!=null){return a.usesCustomBackground()}return false};this.refresh=function(l,n){if(a!=null){return a.refresh(l,n)}if(n.getAttribute("jivemacro")==this.getName()){if(this.getMacroType().toLowerCase()=="inline"){var q=n.getAttribute("_title");if($def(q)&&q!=null&&q.length>0){if(!q.match(/<[^<]+=/)){n.innerHTML=q}n.attributes.removeNamedItem("_title")}else{if(tinyMCE.activeEditor.dom.hasClass(n,"default_title")){var m=n.getAttribute("jivemacro");var r=n.getAttribute("___default_attr");var p=tinyMCE.activeEditor.plugins.jivemacros.getTitleFor(m,r);if(p&&n.innerHTML!=p[0]){n.innerHTML="";n.appendChild(l.getDoc().createTextNode(p[0]))}if(n.innerHTML==""){n.innerHTML="unknown"}}}}else{if(this.getMacroType().toLowerCase()=="image"){if(n.src==""){var o=window.CS_RESOURCE_BASE_URL+"/images/tiny_mce3/plugins/jiveemoticons/images/spacer.gif";n.setAttribute("src",o);n.setAttribute("mce_src",o)}}}}}};
;
jive.rte.EmoticonMacro=function(){var c=this;var d=new Array();var e=new Array();d.push({name:"__jive_emoticon_name",value:["happy","laugh","silly","wink","plain","angry","blush","confused","cool","cry","devil","grin","love","mischief","sad","shocked"]});for(var a=0;a<d[0].value.length;a++){e.push({name:d[0].value[a],deleteAll:true,params:[{name:d[0].name,value:d[0].value[a]}]})}var b=new jive.rte.Macro("emoticon","","img",false,true,e,d,true,false);this.getName=b.getName;this.getUrl=b.getUrl;this.isShowInMacroList=b.isShowInMacroList;this.isShowSettings=b.isShowSettings;this.getMacroType=b.getMacroType;this.getParameterSets=b.getParameterSets;this.getAllowedParameters=b.getAllowedParameters;this.usesCustomBackground=function(){return false};this.refresh=function(f,h){b.refresh(f,h);var g=h.getAttribute("_"+d[0].name);h.setAttribute("class","jive_macro jive_emote");h.setAttribute("src",window.CS_RESOURCE_BASE_URL+"/images/emoticons/"+g+".gif");h.setAttribute("mce_src",window.CS_RESOURCE_BASE_URL+"/images/emoticons/"+g+".gif")}};jive.rte.macros.push(new jive.rte.EmoticonMacro());
;
jive.rte.RTEListener=function(){this.onKeyUp=function(a){};this.onChange=function(){};this.onResize=function(){};this.onShow=function(){};this.doneTogglingMode=function(){};this.initFinished=function(){};this.onNodeChange=function(){}};
;
jive.gui.CPDOM=function(d,h,a,g){var f=this;var i=document.createElement("DIV");i.setAttribute("class","jive-link-checkpoint jiveTT-hover-checkpoint");i.className="jive-link-checkpoint jiveTT-hover-checkpoint";var j=document.createElement("SPAN");var c=h.getName();if(c.length==0){c="(no title)"}var b=document.createTextNode(c);var e=document.createElement("SPAN");e.setAttribute("class","month_day_cell_event_desc");e.className="month_day_cell_event_desc";var k="";if(h.getDescription().unescapeHTML().length>0){k=": "+h.getDescription().unescapeHTML()}e.appendChild(document.createTextNode(k));j.appendChild(b);j.appendChild(e);i.appendChild(j);i.getCheckPoint=function(l){return function(){return l}}(h);this.lighten=function(){i.setAttribute("class","month_day_cell_item month_lighten_dom");i.className="month_day_cell_item month_lighten_dom"};this.darken=function(){i.setAttribute("class","month_day_cell_item");i.className="month_day_cell_item"};this.refresh=function(){j.removeChild(j.childNodes[1]);j.removeChild(j.childNodes[0]);j.appendChild(document.createTextNode(h.getName()));var l="";if(h.getDescription().unescapeHTML().length>0){l=": "+h.getDescription().unescapeHTML()}e.removeChild(e.childNodes[0]);e.appendChild(document.createTextNode(l));j.appendChild(e)};this.showDescription=function(l){if(l){jive.ext.x.xDisplayInline(e)}else{jive.ext.x.xDisplayNone(e)}};jive.ext.x.xAddEventListener(i,"click",function(l,m,n){return function(o){l(m);jive.ext.x.xStopPropagation(o);n.setAttribute("class","month_view_day_task_title");n.className="month_view_day_task_title"}}(a,h,j));jive.ext.x.xAddEventListener(i,"dblclick",function(l,m,n){return function(o){l(m);jive.ext.x.xStopPropagation(o);n.setAttribute("class","month_view_day_task_title");n.className="month_view_day_task_title"}}(g,h,j));this.getDOM=function(){return i};this.killYourself=function(){h=null;d=null};this.getCheckPoint=i.getCheckPoint;this.setHighlight=function(l){if(l){i.setAttribute("class","month_day_cell_item_highlight");i.className="month_day_cell_item_highlight"}else{i.setAttribute("class","month_day_cell_item");i.className="month_day_cell_item"}}};
;
jive.gui.TaskDOM=function(g,a,c,j){var i=this;var m=document.createElement("A");m.setAttribute("class","month_day_cell_item");m.className="month_day_cell_item";var o=document.createElement("SPAN");o.setAttribute("class","month_view_day_task_title");o.className="month_view_day_task_title";var e=a.getSubject();if(e.length==0){e="(no title)"}var d=document.createTextNode(e);var h=document.createElement("SPAN");h.setAttribute("class","month_day_cell_event_desc");h.className="month_day_cell_event_desc";var p="";if(a.getDescription().unescapeHTML().length>0){p=": "+a.getDescription().unescapeHTML()}h.appendChild(document.createTextNode(p));var b=document.createElement("INPUT");b.setAttribute("type","checkbox");b.type="checkbox";if(a.isComplete()){b.checked=true;b.checkedCache=true}else{b.checkedCache=false}jive.ext.x.xAddEventListener(b,"click",function(n,q){return function(r){try{if(n.checkedCache==n.checked){n.checkedCache=!n.checkedCache;n.checked=!n.checked}else{n.checkedCache=!n.checkedCache}if(n.checked){q.setComplete(true)}else{q.setComplete(false)}q.confirm();jive.ext.x.xStopPropagation(r)}catch(r){alert(r)}}}(b,a));m.appendChild(b);o.appendChild(d);o.appendChild(h);m.appendChild(o);m.getTask=function(n){return function(){return n}}(a);m.setDisabled=function(n){return function(q){n.disabled=q}}(b);m.isDisabledHuh=function(n){return function(){return n.disabled}}(b);m.setChecked=function(n){return function(q){n.checked=q}}(b);m.isCheckedHuh=function(n){return function(){return n.checked}}(b);this.lighten=function(){m.setAttribute("class","month_day_cell_item month_lighten_dom");m.className="month_day_cell_item month_lighten_dom"};this.darken=function(){m.setAttribute("class","month_day_cell_item");m.className="month_day_cell_item"};this.refresh=function(){o.removeChild(o.childNodes[1]);o.removeChild(o.childNodes[0]);o.appendChild(document.createTextNode(a.getSubject()));var n="";if(a.getDescription().unescapeHTML().length>0){n=": "+a.getDescription().unescapeHTML()}h.removeChild(h.childNodes[0]);h.appendChild(document.createTextNode(n));o.appendChild(h);if(a.isComplete()){m.setChecked(true)}else{m.setChecked(false)}};this.showDescription=function(n){if(n){jive.ext.x.xDisplayInline(h)}else{jive.ext.x.xDisplayNone(h)}};m.setChecked(a.isComplete());jive.ext.x.xAddEventListener(m,"click",function(n,q,r){return function(s){n(q);jive.ext.x.xStopPropagation(s);r.setAttribute("class","month_view_day_task_title");r.className="month_view_day_task_title"}}(c,a,o));jive.ext.x.xAddEventListener(m,"dblclick",function(n,q,r){return function(s){n(q);jive.ext.x.xStopPropagation(s);r.setAttribute("class","month_view_day_task_title");r.className="month_view_day_task_title"}}(j,a,o));this.getDOM=function(){return m};this.killYourself=function(){a=null;g=null};this.getTask=m.getTask;this.setDisabled=m.setDisabled;this.isDisabledHuh=m.isDisabledHuh;this.setChecked=m.setChecked;this.isCheckedHuh=m.isCheckedHuh;this.setHighlight=function(n){if(n){m.setAttribute("class","month_day_cell_item_highlight");m.className="month_day_cell_item_highlight"}else{m.setAttribute("class","month_day_cell_item");m.className="month_day_cell_item"}};function l(n){if(n==null||n.isEditable()){m.setDisabled(false)}else{m.setDisabled(true)}}if(a.getProjectID()==0){l(null)}else{var f=g.getProjectCache().getProject(a.getProjectID());if($obj(f)&&f!=null){l(f)}else{var k=new jive.model.ProjectCacheListener();k.loadProject=function(n){if(n.getID()==a.getProjectID()){l(n);g.getProjectCache().removeListener(this)}};g.getProjectCache().addListener(k)}}};
;
jive.gui.isMonthEventDOM=function(a){return $def(a)&&$def(a.getEvent)};jive.gui.isMonthTaskDOM=function(a){return $def(a)&&$def(a.getTask)};jive.gui.MonthView=function(l,g){var k=this;var r=false;var e=null;this.hasAddView=function(){if(e==null){e=$obj(g.getView("add_event"))}return e};this.dayCells=new jive.ext.y.HashTable();this.eventDOMHolders=new jive.ext.y.HashTable();this.taskDOMHolders=new jive.ext.y.HashTable();var C=false;var c=new jive.ext.y.HashTable();var i=new jive.ext.y.HashTable();var t=new jive.ext.y.HashTable();var D=new jive.ext.y.HashTable();var d=document.createElement("DIV");d.setAttribute("class","month_view_holder");d.className="month_view_holder";var p=true;this.setItemVisibility=function(E){p=E};this.getItemVisibility=function(){return p};this.hasPrintView=function(){return true};this.isExpandedHuh=function(){return r};this.expand=function(){r=true;g.showArrows();jive.ext.x.xDisplayBlock(d)};this.collapse=function(){r=false;jive.ext.x.xDisplayNone(d)};function B(){var E=new Date();E.setTime(g.getCurrentDate().getTime());jive.model.dateMinusMonth(E);g.setCurrentDate(E);g.notifyMonthClicked(E)}function o(){var E=new Date();E.setTime(g.getCurrentDate().getTime());E.setMonth(E.getMonth()+1);while(E.getMonth()>g.getCurrentDate().getMonth()+1){jive.model.dateMinusDay(E)}g.setCurrentDate(E);g.notifyMonthClicked(E)}this.getPrevViewFunc=function(){return B};this.getNextViewFunc=function(){return o};this.getMinDate=function(){return g.getMinDate()};this.getMaxDate=function(){return g.getMaxDate()};this.getHeaderText=function(){var F=l.getLanguageManager().getActiveLanguage();var E=new Date();E.setTime(g.getCurrentDate().getTime());return F.longMonth(E.getMonth())};this.go=function(E){g.setCurrentDate(E);k.showMonth(g.getCurrentDate())};this.getName=function(){return"month"};this.getHash=function(){return"month"};this.updateText=function(){if(d.childNodes.length>0){var E=l.getSettingsManager().getStartWeekOn();var G=l.getLanguageManager().getActiveLanguage();for(var F=E;F-E<7;F++){var H=d.childNodes[0].childNodes[0].childNodes[(F-E)%7];if(H.childNodes.length>0){H.removeChild(H.childNodes[0])}H.appendChild(document.createTextNode(G.longDay(F%7)));H.setAttribute("height","2");H.height="2"}}};this.getDOM=function(){return d};var A;function u(H,K){var J;var I;var E;if($def(H.getEvent)){var G=H.getEvent();J=G.getSubject().toLowerCase();I=G.getDescription().toLowerCase();E=G.getCalendarId()}else{if($def(H.getTask)){var F=H.getTask();J=F.getSubject().toLowerCase();I=F.getDescription().toLowerCase();E=F.getProjectID()}}if(l.isCalendarVisibleHuh(E)){if(K.length==0||K.length>0&&(J.indexOf(K)>=0||I.indexOf(K)>=0)){H.darken()}else{H.lighten()}}}var a="";var h=(new Date()).getMonth();this.filter=function(K){if(a!=K||h!=g.getCurrentDate().getMonth()){a=K;h=g.getCurrentDate().getMonth();if(k.isExpandedHuh()){A=""+(new Date()).getTime()+""+Math.random();var J=A;var I=new Date();var H=g.getMinDate();var F=g.getMaxDate();I.setTime(H.getTime());K=K.toLowerCase();while(J==A&&(I.getTime()<F.getTime()+24*60*60*1000)){var E=n(I);for(var G=1;G<E.childNodes.length;G++){u(E.childNodes[G],K)}I.setTime(I.getTime()+24*60*60*1000)}}}};this.addEvent=function(L){try{var F=l.getSettingsManager();var N=f(L);var M=new Date();if(L.isAllDay()){M.setTime(L.getStart().getTime())}else{M.setTime(F.adjustDate(L.getStart()).getTime())}var G=0;var J=new Date();if(L.isAllDay()){J.setTime(L.getEnd().getTime())}else{J.setTime(F.adjustDate(L.getEnd()).getTime())}if(jive.model.dateLT(M,l.getEventCache().getMinTime())){M.setTime(l.getEventCache().getMinTime().getTime())}if(jive.model.dateGT(J,l.getEventCache().getMaxTime())){J.setTime(l.getEventCache().getMaxTime().getTime())}while(jive.model.dateLTEQ(M,J)){var K=n(M);if($def(l.getDragManager)){var H=l.getDragManager();var E=new Date();E.setTime(M.getTime());var O=new jive.gui.CellDragListener(l,L,E,l.notifyStopDrag,l.notifyDragging);if($obj(N[G].monthViewDList)&&N[G].monthViewDList!=null){H.removeDragListener(N[G],N[G].monthViewDList)}N[G].monthViewDList=O;H.enableDrag(N[G]);H.addDragListener(N[G],O)}if(!l.isCalendarVisibleHuh(L.getCalendarId())){jive.ext.x.xDisplayNone(N[G])}else{jive.ext.x.xDisplayBlock(N[G])}var P=g.getFilterText();u(N[G],P);K.appendEventDOM(N[G]);N[G].myParent=K;G++;M.setDate(M.getDate()+1)}}catch(I){alert("error adding event to month view: "+I)}};this.addTask=function(I){try{var H=l.getSettingsManager();var L=j(I);var K=n(I.getDueDate());K.appendTaskDOM(L);L.myParent=K;L.refresh();if($def(l.getDragManager)){var F=l.getDragManager();var G=new Date();G.setTime(I.getDueDate());var E=new jive.gui.CellDragListener(l,I,G,l.notifyStopDrag,l.notifyDragging);if($obj(L.monthViewDList)&&L.monthViewDList!=null){F.removeDragListener(L,L.monthViewDList)}L.monthViewDList=E;F.enableDrag(L);F.addDragListener(L,E)}if(!l.isCalendarVisibleHuh(I.getProjectID())){jive.ext.x.xDisplayNone(L)}else{jive.ext.x.xDisplayBlock(L)}}catch(J){alert(J)}};this.removeEvent=function(G){try{var I=l.getSettingsManager();var E=f(G,true);if(jive.ext.y.yArr(E)){for(var H=0;H<E.length;H++){if($def(l.getDragManager())){var F=l.getDragManager();F.removeDragListener(E[H],E[H].monthViewDList);F.disableDrag(E[H])}if($obj(jive.ext.x.xParent(E[H]))&&jive.ext.x.xParent(E[H])!=null){jive.ext.x.xParent(E[H]).removeChild(E[H]);E[H].myParent=null}else{if($obj(E[H].myParent)&&E[H].myParent!=null){E[H].myParent.removeChild(E[H]);E[H].myParent=null}}E[H].killYourself()}}}catch(J){alert("error removing event: "+J)}};this.removeTask=function(H){try{var G=l.getSettingsManager();var E=j(H);if($obj(E)){if($def(l.getDragManager)){var F=l.getDragManager();F.removeDragListener(E,E.monthViewDList);F.disableDrag(E)}var J=n(H.getDueDate());J.removeTaskDOM(E);E.myParent=null;E.killYourself()}}catch(I){alert("error removing task: "+H.getSubject()+"\nexception: "+I)}};this.flushCalendar=function(G){var F=k.eventDOMHolders.toArray(jive.gui.isMonthEventDOM);for(var E=0;E<F.length;E++){if(F[E].getEvent().getCalendarId()==G.getId()){k.flushEvent(F[E].getEvent())}}var H=k.taskDOMHolders.toArray(jive.gui.isMonthTaskDOM);for(var E=0;E<H.length;E++){if(H[E].getTask().getCalendarId()==G.getId()){k.flushTask(H[E].getTask())}}};this.flushEvent=function(G){try{k.removeEvent(G);k.eventDOMHolders.clear(G.getId());var E=D.get(G.getId());var F=i.get(E);F.clear(G.getId())}catch(H){alert("error flushing event")}};this.flushTask=function(G){try{k.removeTask(G);k.taskDOMHolders.clear(G.getID());var E=t.get(G.getID());var F=c.get(E);F.clear(G.getID())}catch(H){alert("flushEvent: "+H)}};this.refresh=function(){var I=l.getSettingsManager();var E=k.eventDOMHolders.toArray(jive.gui.isMonthEventDOM);try{for(var G=0;G<E.length;G++){var H=E[G].getEvent();var F=I.getOldTimezone();if(!jive.model.dateEQ(I.adjustDate(H.getStart()),I.adjustDate(H.getStart(),F))||!jive.model.dateEQ(I.adjustDate(H.getEnd()),I.adjustDate(H.getEnd(),F))){k.flushEvent(H);k.addEvent(H)}}}catch(J){alert(J)}if(k.isExpandedHuh()){k.showMonth(g.getCurrentDate())}k.refreshShading()};this.init=function(E){E.appendChild(d)};this.killYourself=function(){l=null;g=null};this.refreshWeather=function(){var G=new Date();G.setTime(g.getMinDate().getTime());while(jive.model.dateLTEQ(G,g.getMaxDate())){var E=n(G);var I=l.getSettingsManager().getWeatherImage(G);var F=E.style.backgroundColor;if(I.length>0){var H=22;if(G.getDate()==1){H=42}else{H=22}E.style.background="url("+I+") "+H+"px 2px no-repeat "+E.style.backgroundColor}else{E.style.background=""}E.style.backgroundColor=F;G.setDate(G.getDate()+1)}};this.refreshShading=function(){var L=l.getSettingsManager();var G=L.getStartWeekOn();var K=new Date();K.setTime(g.getMaxDate().getTime());var J=new Date();J.setTime(g.getMinDate().getTime());J.setHours(17);J.setDate(1);var E=J.getDay();if(G!=0&&E==0){E=7}J.setDate(J.getDate()-E+G);var H=new Date();H.setTime(J.getTime());var N=new Array();N[0]="#FFFFFF";N[1]="#EFEFEF";N[2]="#DFDFDF";N[3]="#CFCFCF";N[4]="#BFBFBF";var I=L.getNOW();var Q=L.getSmartShading();var F=g.getCurrentDate().getMonth();while(H.getMonth()<=K.getMonth()&&H.getYear()==K.getYear()||H.getYear()<K.getYear()){var S=n(J);var R=jive.model.dateEQ(J,I);if(Q){var O=S.childNodes.length-1;var P=0;for(var M=0;M<O&&P<=4;M++){if(jive.ext.x.xDisplay(S.childNodes[M+1])=="block"){P++}}if(P>4){P=4}else{if(P<0){P=0}}if(R){S.style.backgroundColor="#e4f6e7";S.outColor="#e4f6e7"}else{S.style.backgroundColor=N[O];S.outColor=N[O]}}else{if(S.getDate().getMonth()!=F){S.style.backgroundColor=N[2];S.outColor=N[2]}else{S.style.backgroundColor=N[0];S.outColor=N[0]}}if(R){S.style.backgroundColor="#e4f6e7";S.setAttribute("class","month_cell month_today_cell");S.className="month_cell month_today_cell";S.overColor="#ffffda"}else{S.setAttribute("class","month_cell month_day_cell");S.className="month_cell month_day_cell";S.overColor="#ffffda"}J.setDate(J.getDate()+1);if(J.getDay()==0){H.setTime(J.getTime())}}k.refreshWeather()};this.calendarVisible=function(I,G){var H=l.getSettingsManager().getShowTasks();var J=c.get(I.getId());if($obj(J)&&J!=null){J=J.toArray();for(var F=0;F<J.length;F++){if(G&&H){jive.ext.x.xDisplayBlock(J[F])}else{jive.ext.x.xDisplayNone(J[F])}}}var J=i.get(I.getId());if($obj(J)&&J!=null){J=J.toArray();for(var F=0;F<J.length;F++){for(var E=0;E<J[F].length;E++){if(G){jive.ext.x.xDisplayBlock(J[F][E])}else{jive.ext.x.xDisplayNone(J[F][E])}}}}k.refreshShading()};this.stopDrag=function(I,E,F,K){var L=false;if(k.isExpandedHuh()){if(d.childNodes.length>0){var M=d.childNodes[0];for(var H=1;H<M.childNodes.length;H++){tr=M.childNodes[H];for(var G=0;G<tr.childNodes.length;G++){if(tr.childNodes[G].childNodes.length>0){var J=tr.childNodes[G];if(jive.ext.x.xHasPoint(J,F,K)){if($def(J.dropPoint)){J.dropPoint(I,E);L=true}}}}}}}return L};var x=null;var b=0;this.dragging=function(J,E,F,L){b++;var N=b;var I=false;if(x!=null){if(jive.ext.x.xHasPoint(x,F,L)){var M=Math.floor(0.95*jive.ext.x.xWidth(x));l.showHoverOver(jive.ext.x.xPageX(x),jive.ext.x.xPageY(x),M,jive.ext.x.xHeight(x));I=true}}if(d.childNodes.length>0&&!I){var O=d.childNodes[0];for(var H=1;H<O.childNodes.length&&N==b&&!I;H++){tr=O.childNodes[H];for(var G=0;G<tr.childNodes.length&&N==b&&!I;G++){var K=tr.childNodes[G];if(jive.ext.x.xHasPoint(K,F,L)){if($def(K.dropPoint)){var M=Math.floor(0.95*jive.ext.x.xWidth(K));l.showHoverOver(jive.ext.x.xPageX(K),jive.ext.x.xPageY(K),M,jive.ext.x.xHeight(K));x=K;I=true}}}}if(N!=b){return}}if(!I){l.hideHover()}return I};this.fixHeight=function(G){try{jive.ext.x.xHeight(d,G);var G=G-20;if(d.childNodes.length>0){var H=d.childNodes[0];G+=G%(H.childNodes.length-1);for(var F=1;F<H.childNodes.length;F++){var I=H.childNodes[F];jive.ext.x.xHeight(I,Math.floor(G/(H.childNodes.length-1)));if(jive.ext.x.xIE4Up){for(var E=0;E<I.childNodes.length;E++){jive.ext.x.xDisplayNone(I.childNodes[E]);jive.ext.x.xDisplayBlock(I.childNodes[E])}}}}}catch(J){alert(J)}};this.getEventsOn=function(H){var G=new Array();var E=n(H);for(var F=1;F<E.childNodes.length;F++){if($def(E.childNodes[F].getEvent)){G.push(E.childNodes[F].getEvent())}}return G};this.getTasksOn=function(F){var G=new Array();var E=n(F);return E.getTasks()};function f(J,M){try{var E=l.getSettingsManager();var K=new Date();var H=new Date();if(J.isAllDay()){K.setTime(J.getStart().getTime());H.setTime(J.getEnd().getTime())}else{K.setTime(E.adjustDate(J.getStart()).getTime());H.setTime(E.adjustDate(J.getEnd()).getTime())}if(jive.model.dateLT(K,l.getEventCache().getMinTime())){K.setTime(l.getEventCache().getMinTime().getTime())}if(jive.model.dateGT(H,l.getEventCache().getMaxTime())){H.setTime(l.getEventCache().getMaxTime().getTime())}}catch(I){alert("top of getdomarray: "+I)}try{var L=k.eventDOMHolders.get(J.getId());if(!$obj(L)){if($def(M)&&M){return null}L=new Array();L.getEvent=function(){return J};k.eventDOMHolders.put(J.getId(),L);D.put(J.getId(),J.getCalendarId());var N=i.get(J.getCalendarId());if(!$obj(N)||N==null){N=new jive.ext.y.HashTable();i.put(J.getCalendarId(),N)}N.put(J.getId(),L)}var G=0;while(jive.model.dateLTEQ(K,H)){if(L.length<=G){var O=function(P){return function(Q){var R=new jive.model.DateHelper(l);if(jive.model.dateEQ(E.adjustDate(Q),P)){return R.formatTo12HourTime(E.adjustDate(Q))}else{return R.formatToShortDate(E.adjustDate(Q))}}}(K);var F=l.getEventDOMFactory().getEventDOM(J,g.notifyEventClicked,g.notifyEventDblClicked,O);F.showTimes(false);F.getDOM().myParent=null;F.getDOM().killYourself=F.killYourself;F.getDOM().refresh=F.refresh;F.getDOM().lighten=F.lighten;F.getDOM().darken=F.darken;F=F.getDOM();L[G]=F}else{L[G].refresh()}G++;K.setDate(K.getDate()+1)}while(L.length>G){if($obj(jive.ext.x.xParent(L[G]))&&jive.ext.x.xParent(L[G])!=null){jive.ext.x.xParent(L[G]).removeChild(L[G]);L[G].myParent=null}else{if($obj(L[G].myParent)&&L[G].myParent!=null){L[G].myParent.removeChild(L[G]);L[G].myParent=null}}L[G].killYourself();L.splice(G,1)}for(var G=0;G<L.length;G++){if(k.getItemVisibility()){L[G].style.visibility="visible"}else{L[G].style.visibility="hidden"}}return L}catch(I){alert("getting array dom in month: "+I)}}function j(H){var G=l.getSettingsManager();var F=k.taskDOMHolders.get(H.getID());if($obj(F)&&F!=null){F.refresh();return F}var I=new jive.gui.TaskDOM(l,H,g.notifyTaskClicked,g.notifyTaskDblClicked);var F=I.getDOM();F.refresh=I.refresh;F.lighten=I.lighten;F.darken=I.darken;F.getTask=I.getTask;F.killYourself=I.killYourself;F.myParent=null;k.taskDOMHolders.put(H.getID(),F);t.put(H.getID(),H.getProjectID());var E=c.get(H.getProjectID());if(!$obj(E)||E==null){E=new jive.ext.y.HashTable();c.put(H.getProjectID(),E)}E.put(H.getID(),F);if(k.getItemVisibility()){F.style.visibility="visible"}else{F.style.visibility="hidden"}return F}function n(H){var J=new Date();J.setTime(H.getTime());var I=J.getDate();var G=k.dayCells.get(I);if($arr(G)){for(var F=0;F<G.length;F++){if(jive.model.monthYearEQ(G[F].getDate(),J)){return G[F].getDOM()}}}else{G=new Array();k.dayCells.put(I,G)}var E=new jive.gui.MonthDayCell(l,g,k,J);G.push(E);return E.getDOM()}var s=null;var w=null;var m=0;this.showMonth=function(P){var X=l.getSettingsManager();var M=X.getStartWeekOn();m++;r=true;var Y=new Date();Y.setTime(P.getTime());Y.setHours(17);Y.setDate(1);var L=Y.getDay();if(M!=0&&L==0){L=7}Y.setDate(Y.getDate()-L+M);var J=new Date();J.setTime(P.getTime());var Z=l.getLanguageManager().getActiveLanguage();var H=new Array();if(C||s==null||!jive.model.dateEQ(s,Y)){C=false;var U=new Date();U.setTime(Y.getTime());g.setMinDate(U);var F;var K;var E;var V=document.createElement("DIV");V.setAttribute("class","month_table");V.className="month_table";while(d.childNodes.length>0){d.removeChild(d.childNodes[0])}E=document.createElement("DIV");V.appendChild(E);jive.ext.x.xHeight(E,20);for(var S=M;S-M<7;S++){K=document.createElement("DIV");E.appendChild(K);K.setAttribute("class","month_table_th");K.className="month_table_th";if(jive.ext.x.xWidth(d)>640){K.appendChild(document.createTextNode(Z.longDay(S%7)))}else{K.appendChild(document.createTextNode(Z.shortDay(S%7)))}K.style.left=((S-M)*14.2857)+"%"}var N=new Array();var G=0;while(J.getMonth()<=P.getMonth()&&J.getYear()==P.getYear()||J.getYear()<P.getYear()){if(Y.getDay()==M){E=document.createElement("DIV");E.setAttribute("class","month_table_row");E.className="month_table_row";N.push(E);G=0}K=n(Y);K.updateText();K.over=false;E.appendChild(K);K.style.left=(G*14.2857)+"%";G++;var W=new Date();W.setTime(Y.getTime());Y=W;Y.setDate(Y.getDate()+1);if(Y.getDay()==M){J.setTime(Y.getTime())}if(jive.ext.x.xIE4Up){var Q=k.getTasksOn(Y);H=H.concat(Q)}}for(var S=0;S<N.length;S++){V.appendChild(N[S])}g.setMaxDate(Y);var I=new Date();I.setTime(P.getTime());I.setHours(17);g.setCurrentDate(I);var Z=l.getLanguageManager().getActiveLanguage();d.appendChild(V);for(var S=1;S<V.childNodes.length;S++){var E=V.childNodes[S];for(var R=0;R<E.childNodes.length;R++){var F=E.childNodes[R];if(F.childNodes.length>0){jive.ext.x.xZIndex(F.childNodes[0],10+S)}}}s=new Date();w=new Date();s.setTime(g.getMinDate().getTime());w.setTime(g.getMaxDate().getTime())}else{if(jive.ext.x.xIE4Up){while(J.getMonth()<=P.getMonth()&&J.getYear()==P.getYear()||J.getYear()<P.getYear()){var W=new Date();W.setTime(Y.getTime());Y=W;Y.setDate(Y.getDate()+1);if(Y.getDay()==M){J.setTime(Y.getTime())}var Q=k.getTasksOn(Y);H=H.concat(Q)}}g.setMinDate(s);g.setMaxDate(w)}if(jive.ext.x.xIE4Up){for(var S=0;S<H.length;S++){var T=j(H[S]);T.refresh()}}k.refreshShading();var O=g.getFilterText();k.filter(O);g.fixHeight()};function v(){if(jive.model.isEvent(g.getSelectedItem())){var F=f(g.getSelectedItem());for(var E=0;E<F.length;E++){u(F[E],g.getFilterText())}}if(jive.model.isTask(g.getSelectedItem())){var F=j(g.getSelectedItem());u(F,g.getFilterText())}}function z(){var F=l.getSettingsManager().getStartWeekOn();var J=g.getCurrentDate();var K=new Date();K.setTime(J.getTime());K.setHours(17);K.setDate(1);var G=K.getDay();if(F!=0&&G==0){G=7}K.setDate(K.getDate()-G+F);var E=new Date();E.setTime(J.getTime());g.setMinDate(K);while(E.getMonth()<=J.getMonth()&&E.getYear()==J.getYear()||E.getYear()<J.getYear()){var L=new Date();L.setTime(K.getTime());K=L;K.setDate(K.getDate()+1);if(K.getDay()==F){E.setTime(K.getTime())}}var I=new Date();I.setTime(K.getTime());I.setDate(I.getDate()+1);g.setMaxDate(I);var H=new Date();H.setTime(J.getTime());H.setHours(17);g.setCurrentDate(H);s=new Date();w=new Date();s.setTime(g.getMinDate().getTime());w.setTime(g.getMaxDate().getTime());C=true}function q(){var H=l.getSettingsManager().getShowTasks();if(H){var I=l.getCalendarCache().getCalendars();for(var G=0;G<I.length;G++){if(l.isCalendarVisibleHuh(I[G].getId())){var E=c.get(I[G].getId());if($obj(E)){var J=E.toArray();for(var F=0;F<J.length;F++){if($def(J[F].getTask)){jive.ext.x.xDisplayBlock(J[F])}}}}}}else{var J=k.taskDOMHolders.toArray(jive.gui.isMonthTaskDOM);for(var G=0;G<J.length;G++){if($def(J[G].getTask)){jive.ext.x.xDisplayNone(J[G])}}}}var y=new Object();y.eventClicked=function(E){v();var G=f(E);if($obj(G)){for(var F=0;F<G.length;F++){G[F].setAttribute("class","month_day_cell_item_highlight");G[F].className="month_day_cell_item_highlight"}}};y.eventDblClicked=function(E){};y.taskClicked=function(E){v();var F=j(E);if($obj(F)){F.setAttribute("class","month_day_cell_item_highlight");F.className="month_day_cell_item_highlight"}};y.taskDblClicked=function(E){};y.unselectAll=function(){v()};g.addEventListener(y);var y=new jive.model.TaskCacheListener();y.loadTask=function(E){if(E.hasDueDate()){k.addTask(E)}};y.doneLoadingTasks=function(){k.refreshShading()};y.taskChanged=function(E){k.refreshShading()};y.savingTask=function(E){var F=j(E);F.setDisabled(true)};y.doneSavingTask=function(G){m++;k.refreshShading();if(G.hasDueDate()){var H=j(G);H.refresh();H.setDisabled(false)}var F=t.get(G.getID());if(F!=G.getProjectID()){var E=c.get(F);E.clear(G.getID());var E=c.get(G.getProjectID());if(!$obj(E)||E==null){E=new jive.ext.y.HashTable();c.put(G.getProjectID(),E)}E.put(G.getID(),H)}};y.savingTaskFailed=function(E){k.refreshShading();var F=j(E);F.setDisabled(false);F.setChecked(E.getStatus()=="Complete")};y.deletingTask=function(E){k.refreshShading()};y.doneDeletingTask=function(E){k.refreshShading()};y.deletingTaskFailed=function(E){k.refreshShading()};y.deletingTaskSeries=function(E){k.refreshShading()};y.doneDeletingTaskSeries=function(E){k.refreshShading()};y.deletingTaskSeriesFailed=function(E){k.refreshShading()};l.getTaskCache().addListener(y);z();jive.ext.x.xDisplayNone(d)};
;
jive.gui.isMonthEventDOM=function(a){return $def(a)&&$def(a.getEvent)};jive.gui.isMonthTaskDOM=function(a){return $def(a)&&$def(a.getTask)};jive.gui.MiniMonthView=function(o,i){var n=this;var u=false;var f=null;this.hasAddView=function(){if(f==null){f=$obj(i.getView("add_event"))}return f};this.dayCells=new jive.ext.y.HashTable();this.eventDOMHolders=new jive.ext.y.HashTable();this.taskDOMHolders=new jive.ext.y.HashTable();this.cpDOMHolders=new jive.ext.y.HashTable();var G=false;var c=new jive.ext.y.HashTable();var k=new jive.ext.y.HashTable();var F=new jive.ext.y.HashTable();var x=new jive.ext.y.HashTable();var d=new jive.ext.y.HashTable();var H=new jive.ext.y.HashTable();var e=document.createElement("DIV");e.setAttribute("class","month_view_holder");e.className="month_view_holder";var s=true;this.setItemVisibility=function(I){s=I};this.getItemVisibility=function(){return s};function m(K){var J=n.taskDOMHolders.get(K.getID());if($obj(J)&&J!=null){J.refresh();return J}var L=new jive.gui.TaskDOM(o,K,i.notifyTaskClicked,i.notifyTaskDblClicked);J=L.getDOM();J.refresh=L.refresh;J.lighten=L.lighten;J.darken=L.darken;J.getTask=L.getTask;J.killYourself=L.killYourself;J.myParent=null;n.taskDOMHolders.put(K.getID(),J);x.put(K.getID(),K.getProjectID());var I=c.get(K.getProjectID());if(!$obj(I)||I==null){I=new jive.ext.y.HashTable();c.put(K.getProjectID(),I)}I.put(K.getID(),J);if(n.getItemVisibility()){J.style.visibility="visible"}else{J.style.visibility="hidden"}return J}function l(L){var K=n.cpDOMHolders.get(L.getID());if($obj(K)&&K!=null){K.refresh();return K}var J=new jive.gui.CPDOM(o,L,i.notifyCheckPointClicked,i.notifyCheckPointDblClicked);K=J.getDOM();K.refresh=J.refresh;K.lighten=J.lighten;K.darken=J.darken;K.getCheckPoint=J.getCheckPoint;K.killYourself=J.killYourself;K.myParent=null;n.cpDOMHolders.put(L.getID(),K);d.put(L.getID(),L.getProject().getID());var I=F.get(L.getProject().getID());if(!$obj(I)||I==null){I=new jive.ext.y.HashTable();F.put(L.getProject().getID(),I)}I.put(L.getID(),K);if(n.getItemVisibility()){K.style.visibility="visible"}else{K.style.visibility="hidden"}return K}function r(L){var N=new Date();N.setTime(L.getTime());var M=N.getDate();var K=n.dayCells.get(M);if($arr(K)){for(var J=0;J<K.length;J++){if(jive.model.monthYearEQ(K[J].getDate(),N)){return K[J].getDOM()}}}else{K=new Array();n.dayCells.put(M,K)}var I=new jive.gui.MonthDayGroupedCell(o,i,n,N);K.push(I);return I.getDOM()}this.hasPrintView=function(){return true};this.isExpandedHuh=function(){return u};this.expand=function(){u=true;i.showArrows();jive.ext.x.xDisplayBlock(e)};this.collapse=function(){u=false;jive.ext.x.xDisplayNone(e)};function E(){var I=new Date();I.setTime(i.getCurrentDate().getTime());jive.model.dateMinusMonth(I);i.setCurrentDate(I);i.notifyMonthClicked(I)}function q(){var I=new Date();I.setTime(i.getCurrentDate().getTime());I.setMonth(I.getMonth()+1);while(I.getMonth()>i.getCurrentDate().getMonth()+1){jive.model.dateMinusDay(I)}i.setCurrentDate(I);i.notifyMonthClicked(I)}this.getPrevViewFunc=function(){return E};this.getNextViewFunc=function(){return q};this.getMinDate=function(){return i.getMinDate()};this.getMaxDate=function(){return i.getMaxDate()};this.getHeaderText=function(){var J=o.getLanguageManager().getActiveLanguage();var I=new Date();I.setTime(i.getCurrentDate().getTime());return J.longMonth(I.getMonth())};this.go=function(I){i.setCurrentDate(I);n.showMonth(i.getCurrentDate())};this.getName=function(){return"month"};this.getHash=function(){return"month"};this.updateText=function(){if(e.childNodes.length>0){var I=o.getSettingsManager().getStartWeekOn();var K=o.getLanguageManager().getActiveLanguage();for(var J=I;J-I<7;J++){var L=e.childNodes[0].childNodes[0].childNodes[(J-I)%7];if(L.childNodes.length>0){L.removeChild(L.childNodes[0])}L.appendChild(document.createTextNode(K.longDay(J%7)));L.setAttribute("height","2");L.height="2"}}};this.getDOM=function(){return e};var D;function w(L,O){var N;var M;var I;if($def(L.getEvent)){var K=L.getEvent();N=K.getSubject().toLowerCase();M=K.getDescription().toLowerCase();I=K.getCalendarId()}else{if($def(L.getTask)){var J=L.getTask();N=J.getSubject().toLowerCase();M=J.getDescription().toLowerCase();I=J.getProjectID()}}if(o.isCalendarVisibleHuh(I)){if(O.length==0||O.length>0&&(N.indexOf(O)>=0||M.indexOf(O)>=0)){L.darken()}else{L.lighten()}}}var a="";var j=(new Date()).getMonth();this.filter=function(O){if(a!=O||j!=i.getCurrentDate().getMonth()){a=O;j=i.getCurrentDate().getMonth();if(n.isExpandedHuh()){D=""+(new Date()).getTime()+""+Math.random();var N=D;var M=new Date();var L=i.getMinDate();var J=i.getMaxDate();M.setTime(L.getTime());O=O.toLowerCase();while(N==D&&(M.getTime()<J.getTime()+24*60*60*1000)){var I=r(M);for(var K=1;K<I.childNodes.length;K++){w(I.childNodes[K],O)}M.setTime(M.getTime()+24*60*60*1000)}}}};this.addEvent=function(P){try{var J=o.getSettingsManager();var R=h(P);var Q=new Date();if(P.isAllDay()){Q.setTime(P.getStart().getTime())}else{Q.setTime(J.adjustDate(P.getStart()).getTime())}var K=0;var N=new Date();if(P.isAllDay()){N.setTime(P.getEnd().getTime())}else{N.setTime(J.adjustDate(P.getEnd()).getTime())}if(jive.model.dateLT(Q,o.getEventCache().getMinTime())){Q.setTime(o.getEventCache().getMinTime().getTime())}if(jive.model.dateGT(N,o.getEventCache().getMaxTime())){N.setTime(o.getEventCache().getMaxTime().getTime())}while(jive.model.dateLTEQ(Q,N)){var O=r(Q);if($def(o.getDragManager)){var L=o.getDragManager();var I=new Date();I.setTime(Q.getTime());var S=new jive.gui.CellDragListener(o,P,I,o.notifyStopDrag,o.notifyDragging);if($obj(R[K].monthViewDList)&&R[K].monthViewDList!=null){L.removeDragListener(R[K],R[K].monthViewDList)}R[K].monthViewDList=S;L.enableDrag(R[K]);L.addDragListener(R[K],S)}if(!o.isCalendarVisibleHuh(P.getCalendarId())){jive.ext.x.xDisplayNone(R[K])}else{jive.ext.x.xDisplayBlock(R[K])}var T=i.getFilterText();w(R[K],T);O.appendEventDOM(R[K]);R[K].myParent=O;K++;Q.setDate(Q.getDate()+1)}}catch(M){alert("error adding event to month view: "+M)}};this.addCheckPoint=function(M){try{var O=l(M);var N=r(M.getDueDate());N.appendCheckPointDOM(O);O.myParent=N;O.refresh();if($def(o.getDragManager)){var J=o.getDragManager();var K=new Date();K.setTime(ttask.getDueDate());var I=new jive.gui.CellDragListener(o,ttask,K,o.notifyStopDrag,o.notifyDragging);if($obj(O.monthViewDList)&&O.monthViewDList!=null){J.removeDragListener(O,O.monthViewDList)}O.monthViewDList=I;J.enableDrag(O);J.addDragListener(O,I)}if(!o.isCalendarVisibleHuh(M.getProject().getID())){jive.ext.x.xDisplayNone(O)}else{jive.ext.x.xDisplayBlock(O)}}catch(L){alert(L)}};this.addTask=function(L){try{var O=m(L);var N=r(L.getDueDate());N.appendTaskDOM(O);O.myParent=N;O.refresh();if($def(o.getDragManager)){var J=o.getDragManager();var K=new Date();K.setTime(L.getDueDate());var I=new jive.gui.CellDragListener(o,L,K,o.notifyStopDrag,o.notifyDragging);if($obj(O.monthViewDList)&&O.monthViewDList!=null){J.removeDragListener(O,O.monthViewDList)}O.monthViewDList=I;J.enableDrag(O);J.addDragListener(O,I)}if(!o.isCalendarVisibleHuh(L.getProjectID())){jive.ext.x.xDisplayNone(O)}else{jive.ext.x.xDisplayBlock(O)}}catch(M){alert(M)}};this.removeEvent=function(K){try{var M=o.getSettingsManager();var I=h(K,true);if(jive.ext.y.yArr(I)){for(var L=0;L<I.length;L++){if($def(o.getDragManager())){var J=o.getDragManager();J.removeDragListener(I[L],I[L].monthViewDList);J.disableDrag(I[L])}if($obj(jive.ext.x.xParent(I[L]))&&jive.ext.x.xParent(I[L])!=null){jive.ext.x.xParent(I[L]).removeChild(I[L]);I[L].myParent=null}else{if($obj(I[L].myParent)&&I[L].myParent!=null){I[L].myParent.removeChild(I[L]);I[L].myParent=null}}I[L].killYourself()}}}catch(N){alert("error removing event: "+N)}};this.removeTask=function(L){try{var K=o.getSettingsManager();var I=m(L);if($obj(I)){if($def(o.getDragManager)){var J=o.getDragManager();J.removeDragListener(I,I.monthViewDList);J.disableDrag(I)}if($obj(jive.ext.x.xParent(I))&&jive.ext.x.xParent(I)!=null){jive.ext.x.xParent(I).removeChild(I);I.myParent=null}else{if($obj(I.myParent)&&I.myParent!=null){I.myParent.removeChild(I);I.myParent=null}}I.killYourself()}}catch(M){alert("error removing task: "+L.getSubject()+"\nexception: "+M)}};this.flushCalendar=function(K){var J=n.eventDOMHolders.toArray(jive.gui.isMonthEventDOM);for(var I=0;I<J.length;I++){if(J[I].getEvent().getCalendarId()==K.getId()){n.flushEvent(J[I].getEvent())}}var L=n.taskDOMHolders.toArray(jive.gui.isMonthTaskDOM);for(var I=0;I<L.length;I++){if(L[I].getTask().getCalendarId()==K.getId()){n.flushTask(L[I].getTask())}}};this.flushEvent=function(K){try{n.removeEvent(K);n.eventDOMHolders.clear(K.getId());var I=H.get(K.getId());var J=k.get(I);J.clear(K.getId())}catch(L){alert("error flushing event")}};this.flushTask=function(K){try{n.removeTask(K);n.taskDOMHolders.clear(K.getID());var I=x.get(K.getID());var J=c.get(I);J.clear(K.getID())}catch(L){alert("flushEvent: "+L)}};this.refresh=function(){var M=o.getSettingsManager();var I=n.eventDOMHolders.toArray(jive.gui.isMonthEventDOM);try{for(var K=0;K<I.length;K++){var L=I[K].getEvent();var J=M.getOldTimezone();if(!jive.model.dateEQ(M.adjustDate(L.getStart()),M.adjustDate(L.getStart(),J))||!jive.model.dateEQ(M.adjustDate(L.getEnd()),M.adjustDate(L.getEnd(),J))){n.flushEvent(L);n.addEvent(L)}}}catch(N){alert(N)}if(n.isExpandedHuh()){n.showMonth(i.getCurrentDate())}n.refreshShading()};this.init=function(I){I.appendChild(e)};this.killYourself=function(){o=null;i=null};this.refreshWeather=function(){var K=new Date();K.setTime(i.getMinDate().getTime());while(jive.model.dateLTEQ(K,i.getMaxDate())){var I=r(K);var M=o.getSettingsManager().getWeatherImage(K);var J=I.style.backgroundColor;if(M.length>0){var L=22;if(K.getDate()==1){L=42}else{L=22}I.style.background="url("+M+") "+L+"px 2px no-repeat "+I.style.backgroundColor}else{I.style.background=""}I.style.backgroundColor=J;K.setDate(K.getDate()+1)}};this.refreshShading=function(){var P=o.getSettingsManager();var K=P.getStartWeekOn();var O=new Date();O.setTime(i.getMaxDate().getTime());var N=new Date();N.setTime(i.getMinDate().getTime());N.setHours(17);N.setDate(1);var I=N.getDay();if(K!=0&&I==0){I=7}N.setDate(N.getDate()-I+K);var L=new Date();L.setTime(N.getTime());var Q=new Array();Q[0]="#FFFFFF";Q[1]="#EFEFEF";Q[2]="#DFDFDF";Q[3]="#CFCFCF";Q[4]="#BFBFBF";var M=P.getNOW();var S=P.getSmartShading();var J=i.getCurrentDate().getMonth();while(L.getMonth()<=O.getMonth()&&L.getYear()==O.getYear()||L.getYear()<O.getYear()){var U=r(N);var T=jive.model.dateEQ(N,M);if(S){var R=U.countVisibleItems();if(R>4){R=4}else{if(R<0){R=0}}if(T){U.style.backgroundColor="#e4f6e7";U.outColor="#e4f6e7"}else{U.style.backgroundColor=Q[R];U.outColor=Q[R]}}else{if(U.getDate().getMonth()!=J){U.style.backgroundColor=Q[2];U.outColor=Q[2]}else{U.style.backgroundColor=Q[0];U.outColor=Q[0]}}if(T){U.style.backgroundColor="#e4f6e7";U.setAttribute("class","month_cell month_today_cell");U.className="month_cell month_today_cell";U.overColor="#ffffda"}else{U.setAttribute("class","month_cell month_day_cell");U.className="month_cell month_day_cell";U.overColor="#ffffda"}N.setDate(N.getDate()+1);if(N.getDay()==0){L.setTime(N.getTime())}}n.refreshWeather()};this.calendarVisible=function(M,K){var L=o.getSettingsManager().getShowTasks();var N=c.get(M.getId());if($obj(N)&&N!=null){N=N.toArray();for(var J=0;J<N.length;J++){if(K&&L){jive.ext.x.xDisplayBlock(N[J])}else{jive.ext.x.xDisplayNone(N[J])}}}var N=k.get(M.getId());if($obj(N)&&N!=null){N=N.toArray();for(var J=0;J<N.length;J++){for(var I=0;I<N[J].length;I++){if(K){jive.ext.x.xDisplayBlock(N[J][I])}else{jive.ext.x.xDisplayNone(N[J][I])}}}}n.refreshShading()};this.stopDrag=function(M,I,J,O){var P=false;if(n.isExpandedHuh()){if(e.childNodes.length>0){var Q=e.childNodes[0];for(var L=1;L<Q.childNodes.length;L++){tr=Q.childNodes[L];for(var K=0;K<tr.childNodes.length;K++){if(tr.childNodes[K].childNodes.length>0){var N=tr.childNodes[K];if(jive.ext.x.xHasPoint(N,J,O)){if($def(N.dropPoint)){N.dropPoint(M,I);P=true}}}}}}}return P};var A=null;var b=0;this.dragging=function(N,I,J,P){b++;var R=b;var M=false;if(A!=null){if(jive.ext.x.xHasPoint(A,J,P)){var Q=Math.floor(0.95*jive.ext.x.xWidth(A));o.showHoverOver(jive.ext.x.xPageX(A),jive.ext.x.xPageY(A),Q,jive.ext.x.xHeight(A));M=true}}if(e.childNodes.length>0&&!M){var S=e.childNodes[0];for(var L=1;L<S.childNodes.length&&R==b&&!M;L++){tr=S.childNodes[L];for(var K=0;K<tr.childNodes.length&&R==b&&!M;K++){var O=tr.childNodes[K];if(jive.ext.x.xHasPoint(O,J,P)){if($def(O.dropPoint)){var Q=Math.floor(0.95*jive.ext.x.xWidth(O));o.showHoverOver(jive.ext.x.xPageX(O),jive.ext.x.xPageY(O),Q,jive.ext.x.xHeight(O));A=O;M=true}}}}if(R!=b){return}}if(!M){o.hideHover()}return M};this.fixHeight=function(K){try{jive.ext.x.xHeight(e,K);var K=K-20;if(e.childNodes.length>0){var L=e.childNodes[0];K+=K%(L.childNodes.length-1);for(var J=1;J<L.childNodes.length;J++){var M=L.childNodes[J];jive.ext.x.xHeight(M,Math.floor(K/(L.childNodes.length-1)));if(jive.ext.x.xIE4Up){for(var I=0;I<M.childNodes.length;I++){jive.ext.x.xDisplayNone(M.childNodes[I]);jive.ext.x.xDisplayBlock(M.childNodes[I])}}}}}catch(N){alert(N)}};this.getEventsOn=function(L){var K=new Array();var I=r(L);for(var J=1;J<I.childNodes.length;J++){if($def(I.childNodes[J].getEvent)){K.push(I.childNodes[J].getEvent())}}return K};this.getTasksOn=function(K){var L=new Array();var I=r(K);for(var J=1;J<I.childNodes.length;J++){if($def(I.childNodes[J].getTask)){L.push(I.childNodes[J].getTask())}}return L};function h(N,Q){try{var I=o.getSettingsManager();var O=new Date();var L=new Date();if(N.isAllDay()){O.setTime(N.getStart().getTime());L.setTime(N.getEnd().getTime())}else{O.setTime(I.adjustDate(N.getStart()).getTime());L.setTime(I.adjustDate(N.getEnd()).getTime())}if(jive.model.dateLT(O,o.getEventCache().getMinTime())){O.setTime(o.getEventCache().getMinTime().getTime())}if(jive.model.dateGT(L,o.getEventCache().getMaxTime())){L.setTime(o.getEventCache().getMaxTime().getTime())}}catch(M){alert("top of getdomarray: "+M)}try{var P=n.eventDOMHolders.get(N.getId());if(!$obj(P)){if($def(Q)&&Q){return null}P=new Array();P.getEvent=function(){return N};n.eventDOMHolders.put(N.getId(),P);H.put(N.getId(),N.getCalendarId());var R=k.get(N.getCalendarId());if(!$obj(R)||R==null){R=new jive.ext.y.HashTable();k.put(N.getCalendarId(),R)}R.put(N.getId(),P)}var K=0;while(jive.model.dateLTEQ(O,L)){if(P.length<=K){var S=function(T){return function(U){var V=new jive.model.DateHelper(o);if(jive.model.dateEQ(I.adjustDate(U),T)){return V.formatTo12HourTime(I.adjustDate(U))}else{return V.formatToShortDate(I.adjustDate(U))}}}(O);var J=o.getEventDOMFactory().getEventDOM(N,i.notifyEventClicked,i.notifyEventDblClicked,S);J.showTimes(false);J.getDOM().myParent=null;J.getDOM().killYourself=J.killYourself;J.getDOM().refresh=J.refresh;J.getDOM().lighten=J.lighten;J.getDOM().darken=J.darken;J=J.getDOM();P[K]=J}else{P[K].refresh()}K++;O.setDate(O.getDate()+1)}while(P.length>K){if($obj(jive.ext.x.xParent(P[K]))&&jive.ext.x.xParent(P[K])!=null){jive.ext.x.xParent(P[K]).removeChild(P[K]);P[K].myParent=null}else{if($obj(P[K].myParent)&&P[K].myParent!=null){P[K].myParent.removeChild(P[K]);P[K].myParent=null}}P[K].killYourself();P.splice(K,1)}for(var K=0;K<P.length;K++){if(n.getItemVisibility()){P[K].style.visibility="visible"}else{P[K].style.visibility="hidden"}}return P}catch(M){alert("getting array dom in month: "+M)}}var g=2;this.setNumWeeks=function(I){g=I};var v=null;var z=null;var p=0;this.showMonth=function(S){var aa=o.getSettingsManager();var P=aa.getStartWeekOn();p++;u=true;var ab=new Date();ab.setTime(S.getTime());ab.setHours(17);P=ab.getDay();var N=new Date();N.setTime(S.getTime());var ac=o.getLanguageManager().getActiveLanguage();var L=new Array();if(G||v==null||!jive.model.dateEQ(v,ab)){G=false;var X=new Date();X.setTime(ab.getTime());i.setMinDate(X);var J;var O;var I;var Y=document.createElement("DIV");Y.setAttribute("class","month_table");Y.className="month_table";while(e.childNodes.length>0){e.removeChild(e.childNodes[0])}I=document.createElement("DIV");Y.appendChild(I);jive.ext.x.xHeight(I,20);for(var V=P;V-P<7;V++){O=document.createElement("DIV");I.appendChild(O);O.setAttribute("class","month_table_th");O.className="month_table_th";if(jive.ext.x.xWidth(e)>640){O.appendChild(document.createTextNode(ac.longDay(V%7)))}else{O.appendChild(document.createTextNode(ac.shortDay(V%7)))}O.style.left=((V-P)*14.2857)+"%"}var Q=new Array();var K=0;for(var V=0;V<g*7;V++){if(ab.getDay()==P){I=document.createElement("DIV");I.setAttribute("class","month_table_row");I.className="month_table_row";Q.push(I);K=0}O=r(ab);O.updateText();O.over=false;I.appendChild(O);O.style.left=(K*14.2857)+"%";K++;var Z=new Date();Z.setTime(ab.getTime());ab=Z;ab.setDate(ab.getDate()+1);if(ab.getDay()==P){N.setTime(ab.getTime())}if(jive.ext.x.xIE4Up){var T=n.getTasksOn(ab);L=L.concat(T)}}for(var V=0;V<Q.length;V++){Y.appendChild(Q[V])}i.setMaxDate(ab);var M=new Date();M.setTime(S.getTime());M.setHours(17);i.setCurrentDate(M);var ac=o.getLanguageManager().getActiveLanguage();e.appendChild(Y);for(var V=1;V<Y.childNodes.length;V++){var I=Y.childNodes[V];for(var U=0;U<I.childNodes.length;U++){var J=I.childNodes[U];if(J.childNodes.length>0){jive.ext.x.xZIndex(J.childNodes[0],10+V)}}}v=new Date();z=new Date();v.setTime(i.getMinDate().getTime());z.setTime(i.getMaxDate().getTime())}else{if(jive.ext.x.xIE4Up){while(N.getMonth()<=S.getMonth()&&N.getYear()==S.getYear()||N.getYear()<S.getYear()){var Z=new Date();Z.setTime(ab.getTime());ab=Z;ab.setDate(ab.getDate()+1);if(ab.getDay()==P){N.setTime(ab.getTime())}var T=n.getTasksOn(ab);L=L.concat(T)}}i.setMinDate(v);i.setMaxDate(z)}if(jive.ext.x.xIE4Up){for(var V=0;V<L.length;V++){var W=m(L[V]);W.refresh()}}n.refreshShading();var R=i.getFilterText();n.filter(R);i.fixHeight()};function y(){if(jive.model.isEvent(i.getSelectedItem())){var J=h(i.getSelectedItem());for(var I=0;I<J.length;I++){w(J[I],i.getFilterText())}}if(jive.model.isTask(i.getSelectedItem())){var J=m(i.getSelectedItem());w(J,i.getFilterText())}}function C(){var J=o.getSettingsManager().getStartWeekOn();var N=i.getCurrentDate();var O=new Date();O.setTime(N.getTime());O.setHours(17);O.setDate(1);var K=O.getDay();if(J!=0&&K==0){K=7}O.setDate(O.getDate()-K+J);var I=new Date();I.setTime(N.getTime());i.setMinDate(O);while(I.getMonth()<=N.getMonth()&&I.getYear()==N.getYear()||I.getYear()<N.getYear()){var P=new Date();P.setTime(O.getTime());O=P;O.setDate(O.getDate()+1);if(O.getDay()==J){I.setTime(O.getTime())}}var M=new Date();M.setTime(O.getTime());M.setDate(M.getDate()+1);i.setMaxDate(M);var L=new Date();L.setTime(N.getTime());L.setHours(17);i.setCurrentDate(L);v=new Date();z=new Date();v.setTime(i.getMinDate().getTime());z.setTime(i.getMaxDate().getTime());G=true}function t(){var L=o.getSettingsManager().getShowTasks();if(L){var M=o.getCalendarCache().getCalendars();for(var K=0;K<M.length;K++){if(o.isCalendarVisibleHuh(M[K].getId())){var I=c.get(M[K].getId());if($obj(I)){var N=I.toArray();for(var J=0;J<N.length;J++){if($def(N[J].getTask)){jive.ext.x.xDisplayBlock(N[J])}}}}}}else{var N=n.taskDOMHolders.toArray(jive.gui.isMonthTaskDOM);for(var K=0;K<N.length;K++){if($def(N[K].getTask)){jive.ext.x.xDisplayNone(N[K])}}}}var B=new Object();B.eventClicked=function(I){y();var K=h(I);if($obj(K)){for(var J=0;J<K.length;J++){K[J].setAttribute("class","month_day_cell_item_highlight");K[J].className="month_day_cell_item_highlight"}}};B.eventDblClicked=function(I){};B.taskClicked=function(I){y();var J=m(I);if($obj(J)){J.setAttribute("class","month_day_cell_item_highlight");J.className="month_day_cell_item_highlight"}};B.taskDblClicked=function(I){};B.unselectAll=function(){y()};i.addEventListener(B);var B=new jive.model.ProjectCacheListener();B.loadProject=function(J){var K=J.getCheckPoints();for(var I=0;I<K.length;I++){n.addCheckPoint(K[I])}};o.getProjectCache().addListener(B);var B=new jive.model.TaskCacheListener();B.loadTask=function(I){if(I.hasDueDate()){n.addTask(I)}};B.doneLoadingTasks=function(){n.refreshShading()};B.taskChanged=function(I){n.refreshShading()};B.savingTask=function(I){var J=m(I);J.setDisabled(true)};B.doneSavingTask=function(K){p++;n.refreshShading();if(K.hasDueDate()){var L=m(K);L.refresh();L.setDisabled(false)}var J=x.get(K.getID());if(J!=K.getProjectID()){var I=c.get(J);I.clear(K.getID());var I=c.get(K.getProjectID());if(!$obj(I)||I==null){I=new jive.ext.y.HashTable();c.put(K.getProjectID(),I)}I.put(K.getID(),L)}};B.savingTaskFailed=function(I){n.refreshShading();var J=m(I);J.setDisabled(false);J.setChecked(I.getStatus()=="Complete")};B.deletingTask=function(I){n.refreshShading()};B.doneDeletingTask=function(I){n.refreshShading()};B.deletingTaskFailed=function(I){n.refreshShading()};B.deletingTaskSeries=function(I){n.refreshShading()};B.doneDeletingTaskSeries=function(I){n.refreshShading()};B.deletingTaskSeriesFailed=function(I){n.refreshShading()};o.getTaskCache().addListener(B);C();jive.ext.x.xDisplayNone(e)};
;
jive.gui.MonthDayCell=function(e,c,f,d){var a=new jive.gui.MonthDayGroupedCell(e,c,f,d);var b=a.getDOM();this.getTasks=b.getTasks;b.appendTaskDOM=function(g){var j=g.getTask().getSubject().toLowerCase();for(var h=0;h<b.childNodes.length;h++){if($def(b.childNodes[h].getEvent)){b.insertBefore(g,b.childNodes[h]);break}else{if($def(b.childNodes[h].getTask)){if(b.childNodes[h].getTask().getSubject().toLowerCase()>j){b.insertBefore(g,b.childNodes[h]);break}}}}if(h==b.childNodes.length){b.appendChild(g)}};this.appendTaskDOM=b.appendTaskDOM;b.removeTaskDOM=function(g){b.removeChild(g)};this.removeTaskDOM=b.removeTaskDOM;b.getTasks=function(){var g=b;var j=new Array();for(var h=1;h<g.childNodes.length;h++){if($def(g.childNodes[h].getTask)){j.push(g.childNodes[h].getTask())}}return j};this.getDOM=function(){return b}};
;
jive.gui.MonthDayGroupedCell=function(g,c,q,i){var e=this;var h;var j=g.getLanguageManager().getActiveLanguage();var p=document.createElement("DIV");var o=i.getDate();if(i.getDate()==1){o=j.shortMonth(i.getMonth())+" "+o}var r=new jive.ext.y.HashTable();var f=new jive.ext.y.HashTable();var b=document.createElement("SPAN");b.getDate=function(t){return function(){return t}}(i);b.setAttribute("class","month_day_cell_number");b.className="month_day_cell_number";var n=document.createElement("SPAN");n.id="add_link";n.setAttribute("class","month_day_cell_number_link");n.className="month_day_cell_number_link";n.appendChild(document.createTextNode("[ + ]"));jive.ext.x.xDisplayNone(n);b.appendChild(n);b.appendChild(document.createTextNode(o));p.appendChild(b);var m=0;var l=document.createElement("DIV");var s=document.createElement("span");l.appendChild(s);s.className="jive-icon-med jive-icon-checkpoint";s.setAttribute("class","jive-icon-med jive-icon-checkpoint");l.href="javascript:;";l.className="jive-cal-checkpoint jiveTT-hover-tasks";l.setAttribute("class","jive-cal-checkpoint jiveTT-hover-tasks");p.appendChild(l);jive.ext.x.xDisplayNone(l);var a=0;var d=document.createElement("DIV");var k=document.createElement("span");d.appendChild(k);k.className="jive-icon-med jive-icon-checkpoint";k.setAttribute("class","jive-icon-med jive-icon-task");d.href="javascript:;";d.className="jiveTT-hover-tasks";d.setAttribute("class","jiveTT-hover-tasks");p.appendChild(d);jive.ext.x.xDisplayNone(d);jive.ext.x.xAddEventListener(d,"mouseover",function(t){return function(B){var y=h.getDOM();while(y.childNodes.length>0){y.removeChild(y.childNodes[0])}var F=document.createElement("strong");var I=(d!=1)?"s":"";var D=new jive.model.DateHelper(g);F.appendChild(document.createTextNode(D.formatToMedDate(e.getDate())+", "+e.getDate().getFullYear()+" - "+a+" task"+I));var C=document.createElement("UL");var x=e.getTasks();for(var A=0;A<x.length;A++){var v=x[A];var H=document.createElement("LI");var E=document.createElement("A");E.className="jiveTT-hover-user jive-username-link";E.href=v.getAssignedTo().getURL();var z=document.createElement("IMG");z.className="jive-avatar";z.setAttribute("class","jive-avatar");z.src=CS_BASE_URL+"/people/"+v.getAssignedTo().getUsername()+"/avatar/22.png";E.appendChild(z);var G=document.createElement("SPAN");var u=document.createElement("A");u.href=v.getAssignedTo().getURL();u.className="jiveTT-hover-user jive-username-link";u.setAttribute("class","jiveTT-hover-user jive-username-link");u.appendChild(document.createTextNode(v.getAssignedTo().getFullName()));jive.ext.x.xAddEventListener(u,"mouseover",function(J){return function(){quickuserprofile.getUserProfileTooltip(J)}}(v.getAssignedTo().getID()));jive.ext.x.xAddEventListener(u,"mouseout",function(){quickuserprofile.cancelTooltip()});var w=document.createElement("A");w.href=v.getURL();w.appendChild(document.createTextNode(v.getSubject()));G.appendChild(w);G.appendChild(document.createTextNode(" : "));G.appendChild(u);H.appendChild(E);H.appendChild(G);C.appendChild(H)}y.appendChild(F);y.appendChild(C)}}(i));jive.ext.x.xAddEventListener(l,"mouseover",function(t){return function(A){var x=h.getDOM();while(x.childNodes.length>0){x.removeChild(x.childNodes[0])}var E=document.createElement("strong");var J=(m!=1)?"s":"";var D=new jive.model.DateHelper(g);E.appendChild(document.createTextNode(D.formatToMedDate(e.getDate())+", "+e.getDate().getFullYear()+" - "+m+" checkpoint"+J));var B=document.createElement("UL");var z=e.getCheckPoints();for(var y=0;y<z.length;y++){var C=z[y];var H=document.createElement("LI");var G=document.createElement("SPAN");G.id="jive-note-checkpoint-body";var u=document.createElement("STRONG");var w=document.createElement("span");u.appendChild(w);w.className="jive-icon-med jive-icon-checkpoint";w.setAttribute("class","jive-icon-med jive-icon-checkpoint");u.appendChild(document.createTextNode(C.getName()));G.appendChild(u);if(C.getProject().isEditable()){var v=document.createElement("P");var F=document.createElement("A");F.href=CS_BASE_URL+"/edit-checkpoint!input.jspa?project="+C.getProject().getID()+"&checkPointID="+C.getID();F.appendChild(document.createTextNode("Edit"));var I=document.createElement("A");I.href=CS_BASE_URL+"/delete-checkpoint!input.jspa?project="+C.getProject().getID()+"&checkPointID="+C.getID();I.appendChild(document.createTextNode("Delete"));v.appendChild(F);v.appendChild(I);G.appendChild(v)}H.appendChild(G);B.appendChild(H)}x.appendChild(E);x.appendChild(B)}}(i));p.mouseover=function(){if(typeof(jive)!="undefined"){try{if(!p.overed){p.outColor=p.style.backgroundColor}if(!g.isReadOnly()&&q.getItemVisibility()&&q.hasAddView()){jive.ext.x.xDisplayBlock(n)}p.style.backgroundColor=p.overColor;p.overed=true}catch(t){}}};p.mouseout=function(){if(typeof(jive)!="undefined"){try{jive.ext.x.xDisplayNone(n);p.style.backgroundColor=p.outColor;p.overed=false}catch(t){}}};p.updateText=function(){var t=g.getLanguageManager().getActiveLanguage();var v=i.getDate();if(i.getDate()==1){var u=b.childNodes[0];v=t.shortMonth(i.getMonth())+" "+v;while(b.childNodes.length>0){b.removeChild(b.childNodes[0])}b.appendChild(u);b.appendChild(document.createTextNode(v))}};p.getDate=function(t){return function(){return t}}(i);p.dropPoint=function(t,w){if(w!=null){var y=new Date();y.setTime(p.getDate().getTime());y.setHours(w.getHours());y.setMinutes(w.getMinutes());y.setSeconds(w.getSeconds());y.setMilliseconds(w.getMilliseconds());var z=y.getTime()-w.getTime()}if(w!=null&&z!=0&&jive.model.isEvent(t)){var v=new Date();v.setTime(t.getStart().getTime());var x=new Date();x.setTime(t.getEnd().getTime());var u=x.getTime()-v.getTime();v.setTime(v.getTime()+z);x.setTime(v.getTime()+u);t.setStart(v);t.setEnd(x);t.confirm()}else{if((w==null||z!=0)&&jive.model.isTask(t)){if(w!=null){var y=new Date();y.setTime(t.getDueDate().getTime()+z);t.setDueDate(y)}else{var y=new Date();y.setTime(p.getDate().getTime());t.setDueDate(y)}t.confirm()}}};p.appendTaskDOM=function(t){r.put(t.getTask().getID(),t.getTask());h=new JiveProjectTooltip(t.getTask().getProjectID(),"jive-note-checkpoint-body","jive-note-tasks-body","","","","","");jive.ext.x.xAddEventListener(d,"mouseout",h.cancelTooltip);a++;jive.ext.x.xDisplayNone(t);while(d.childNodes.length>1){d.removeChild(d.childNodes[1])}d.appendChild(document.createTextNode(a+" tasks"));jive.ext.x.xDisplayBlock(d)};this.appendTaskDOM=p.appendTaskDOM;p.removeTaskDOM=function(t){r.clear(t.getTask().getID());a--;if(a==0){jive.ext.x.xDisplayNone(d)}};this.removeTaskDOM=p.removeTaskDOM;p.getTasks=function(){return r.toArray(jive.model.isTask)};this.getTasks=p.getTasks;d.getTasks=e.getTasks;p.getCheckPoints=function(){return f.toArray(jive.model.isCheckPoint)};this.getCheckPoints=p.getCheckPoints;l.getCheckPoints=p.getCheckPoints;p.appendEventDOM=function(t){var u=t.getEvent();for(var v=0;v<p.childNodes.length;v++){if($def(p.childNodes[v].getEvent)){if(p.childNodes[v].getEvent().getStart()>u.getStart()){p.insertBefore(t,p.childNodes[v]);break}}}if(v==p.childNodes.length){p.appendChild(t)}};p.appendCheckPointDOM=function(t){f.put(t.getCheckPoint().getID(),t.getCheckPoint());h=new JiveProjectTooltip(t.getCheckPoint().getProject().getID(),"jive-note-checkpoint-body","jive-note-tasks-body","","","","","");jive.ext.x.xAddEventListener(l,"mouseout",h.cancelTooltip);m++;jive.ext.x.xDisplayNone(t);while(l.childNodes.length>1){l.removeChild(l.childNodes[1])}var u=(m!=1)?"s":"";l.appendChild(document.createTextNode(m+" checkpoint"+u));jive.ext.x.xDisplayBlock(l)};p.countVisibleItems=function(){return e.getTasks().length+e.getCheckPoints().length};this.countVisibleItems=p.countVisibleItems;jive.ext.x.xAddEventListener(n,"click",function(t,u){return function(v){t.notifyAddEventClicked(u.getDate());jive.ext.x.xStopPropagation(v)}}(c,b),true);jive.ext.x.xAddEventListener(p,"click",function(t,u){return function(){t.notifyDayClicked(u.getDate())}}(c,b),false);jive.ext.x.xAddEventListener(p,"mouseover",p.mouseover);jive.ext.x.xAddEventListener(p,"mouseout",p.mouseout);this.getDate=p.getDate;this.getDOM=function(){return p}};
;
jive.gui.BasicGui=function(l){var b=null;var o=new Array();var p=new Array();this.addPriorityEventListener=function(z){p.splice(0,0,z)};this.addEventListener=function(z){p.push(z)};var h=new Date();h.setHours(17);var u=new Date();u.setHours(17);var x=new Date();x.setHours(17);var i=this;var q=false;this.hasInitHuh=function(){return q};var e=document.createElement("DIV");e.className="month_view_very_inner";var m=document.createElement("DIV");m.setAttribute("class","month_view_main");m.className="month_view_main";var s=new jive.gui.SimpleHeader(l);var y=document.createElement("DIV");y.setAttribute("class","month_view_inner");y.className="month_view_inner";var n=true;this.showPrintHuh=function(z){n=z;if(z&&i.getActiveView().hasPrintView()){i.getHeader().showPrintHuh(true)}else{i.getHeader().showPrintHuh(false)}};this.shouldShowPrintHuh=function(){return n};this.setNavFilter=function(z){i.getHeader().setNavFilter(z)};this.showFilterHuh=function(z){i.getHeader().showFilterHuh(z)};this.getFilterText=function(){return i.getHeader().getFilterText()};this.getHeaderFooterHeight=function(){return i.getHeader().getHeight()};var w=function(){};var f=function(){};function d(){return w}function a(){return f}var j=new jive.ext.y.HashTable();this.isViewHuh=function(z){return z!=null&&$obj(z)&&$def(z.isExpandedHuh)};this.addView=function(z){var A=i.getView(z.getName());if(!$obj(A)||A==null){j.put(z.getHash(),z);if(i.hasInitHuh()){z.init(e);z.collapse()}}};this.removeView=function(z){j.clear(z)};this.getAllViews=function(){return j.toArray(i.isViewHuh)};this.getView=function(z){return j.get(z)};this.showView=function(D,C){var A=i.getAllViews();var z=false;for(var B=0;B<A.length;B++){if(A[B].getHash()==C){z=true}}if(!z){return i.showView(D,"month")}for(var B=0;B<A.length;B++){if(A[B].getHash()==C){if(!A[B].isExpandedHuh()){A[B].expand()}if(A[B].hasPrintView()&&n){i.getHeader().showPrintHuh(true)}else{i.getHeader().showPrintHuh(false)}A[B].go(D);i.getHeader().setTitleText(A[B].getHeaderText(D).escapeHTML());w=A[B].getPrevViewFunc();f=A[B].getNextViewFunc();u.setTime(A[B].getMinDate());x.setTime(A[B].getMaxDate());i.notifyTimesChanged(A[B].getMinDate(),A[B].getMaxDate())}else{if(A[B].isExpandedHuh()){A[B].collapse()}}}i.fixHeight()};this.getCurrentDate=function(){var z=new Date();z.setTime(h.getTime());return z};this.setCurrentDate=function(z){h.setTime(z.getTime())};this.notifyPrintClicked=function(A){var B=new Date();B.setTime(A.getTime());for(var z=0;z<o.length;z++){o[z].printClicked(B)}};this.hideArrows=function(){i.getHeader().showArrowsHuh(false)};this.showArrows=function(){i.getHeader().showArrowsHuh(true)};this.ensureMinDate=function(z){if(jive.model.dateLT(z,u)){u.setTime(z.getTime())}};this.ensureMaxDate=function(z){if(jive.model.dateGT(z,x)){x.setTime(z.getTime())}};this.getMinDate=function(){return u};this.setMinDate=function(z){u.setTime(z.getTime())};this.getMaxDate=function(){return x};this.setMaxDate=function(z){x.setTime(z.getTime())};var r=new jive.gui.MiniMonthView(l,i);this.updateText=function(){var A=i.getAllViews();for(var B=0;B<A.length;B++){A[B].updateText()}var z=l.getLanguageManager().getActiveLanguage();i.getHeader().updateText();i.getHeader().setTitleText(i.getActiveView().getHeaderText(i.getCurrentDate()).escapeHTML())};m.appendChild(s.getDOM());m.appendChild(y);y.appendChild(e);this.getDOM=function(){return m};this.getEventsOn=function(z){return i.getView("month").getEventsOn(z)};this.getTasksOn=function(z){return i.getView("month").getTasksOn(z)};this.addEvent=function(A){var z=i.getAllViews();for(var B=0;B<z.length;B++){z[B].addEvent(A)}};this.addTask=function(B){var z=i.getAllViews();for(var A=0;A<z.length;A++){z[A].addTask(B)}};this.removeEvent=function(A){var z=i.getAllViews();for(var B=0;B<z.length;B++){z[B].removeEvent(A)}};this.removeTask=function(B){var z=i.getAllViews();for(var A=0;A<z.length;A++){z[A].removeTask(B)}};this.flushCalendar=function(B){var z=i.getAllViews();for(var A=0;A<z.length;A++){z[A].flushCalendar(B)}};this.flushEvent=function(A){var z=i.getAllViews();for(var B=0;B<z.length;B++){z[B].flushEvent(A)}if(jotlet.model.isEvent(b)&&b.getId()==A.getId()){b=null}};this.flushTask=function(B){var z=i.getAllViews();for(var A=0;A<z.length;A++){z[A].flushTask(B)}if(jotlet.model.isTask(b)&&b.getId()==B.getId()){b=null}};this.refreshWeather=function(){var z=i.getAllViews();for(var A=0;A<z.length;A++){if($def(z[A].refreshWeather)){z[A].refreshWeather()}}};this.refreshShading=function(){var z=i.getAllViews();for(var A=0;A<z.length;A++){if($def(z[A].refreshShading)){z[A].refreshShading()}}};this.getActiveView=function(){var z=i.getAllViews();for(var A=0;A<z.length;A++){if(z[A].isExpandedHuh()){return z[A]}}return i.getView("month")};this.showMonth=function(z){i.showView(z,"month")};this.showWeek=function(z){i.showView(z,"week")};this.showDay=function(z){i.showView(z,"day")};this.showList=function(z){i.showView(z,"list")};this.refresh=function(){var z=i.getAllViews();for(var A=0;A<z.length;A++){if(z[A].isExpandedHuh()){z[A].refresh();i.refreshShading();return}}i.showMonth(i.getCurrentDate());i.refreshShading()};this.fixHeight=function(){try{if(jive.ext.x.xParent(m)!=null){var z=jive.ext.x.xHeight(jive.ext.x.xParent(m))-i.getHeaderFooterHeight();jive.ext.x.xHeight(y,z);i.getView("month").fixHeight(z)}}catch(A){alert(A)}};this.init=function(){q=true;var z=i.getAllViews();for(var A=0;A<z.length;A++){z[A].init(e)}};this.isShowingDay=function(){return i.getView("day").isExpandedHuh()};this.isShowingWeek=function(){return i.getView("week").isExpandedHuh()};this.killYourself=function(){l=null;for(var z=0;z<j.length;z++){j[z].killYourself()}};i.addView(r);this.addListener=function(z){o.push(z)};this.notifyStopDrag=function(A,C,E,F){var D=false;var z=i.getAllViews();for(var B=0;B<z.length;B++){if(z[B].isExpandedHuh()&&$def(z[B].stopDrag)){D=z[B].stopDrag(A,C,E,F)}}if(!D){for(var B=0;B<o.length&&!D;B++){D=o[B].stopDrag(A,C,E,F)}}return D};var t=null;var c=0;this.notifyDragging=function(B,D,E,F){c++;var A=c;var G=false;var z=i.getAllViews();for(var C=0;C<z.length;C++){if(z[C].isExpandedHuh()){if($def(z[C].dragging)){G=z[C].dragging(B,D,E,F)}}}if(!G){for(var C=0;C<o.length&&!G;C++){G=G||o[C].dragging(B,D,E,F)}if(!G){l.hideHover()}}return G};this.notifyDayClicked=function(A){var B=new Date();B.setTime(A.getTime());for(var z=0;z<o.length;z++){o[z].dayClicked(B)}};this.notifyTimesChanged=function(B,A){for(var z=0;z<o.length;z++){o[z].timesChanged(B,A)}};this.notifyQuickAddTask=function(C,B,z){for(var A=0;A<o.length;A++){o[A].quickAddTask(C,B,z)}};this.filter=function(B){var z=i.getAllViews();for(var A=0;A<z.length;A++){if(z[A].isExpandedHuh()){if($def(z[A].filter)){z[A].filter(B)}}}};this.calendarVisible=function(C,B){var z=i.getAllViews();for(var A=0;A<z.length;A++){if($def(z[A].calendarVisible)){z[A].calendarVisible(C,B)}}i.refreshShading()};this.notifyEventClicked=function(z){for(var A=0;A<p.length;A++){p[A].eventClicked(z)}};this.notifyTaskClicked=function(A){try{for(var z=0;z<p.length;z++){p[z].taskClicked(A)}}catch(B){alert(B)}};this.notifyCheckPointClicked=function(B){try{for(var z=0;z<p.length;z++){p[z].checkPointClicked(B)}}catch(A){alert(A)}};this.notifyEventDblClicked=function(z){for(var A=0;A<p.length;A++){p[A].eventDblClicked(z)}};this.notifyTaskDblClicked=function(A){for(var z=0;z<p.length;z++){p[z].taskDblClicked(A)}};this.notifyCheckPointDblClicked=function(A){for(var z=0;z<p.length;z++){p[z].checkPointDblClicked(A)}};this.notifyUnselectAll=function(){for(var z=0;z<p.length;z++){p[z].unselectAll()}};var g=new Array();this.addNavListener=function(z){g.push(z)};this.removeNavListener=function(A){for(var z=0;z<g.length;z++){if(g[z]==A){g.splice(z,1)}}};this.notifyMonthClicked=function(A){for(var z=0;z<g.length;z++){g[z].monthClicked(A)}};this.notifyWeekClicked=function(A){for(var z=0;z<g.length;z++){g[z].weekClicked(A)}};this.notifyDayClicked=function(A){for(var z=0;z<g.length;z++){g[z].dayClicked(A)}};this.notifyListClicked=function(){for(var z=0;z<g.length;z++){g[z].listClicked()}};this.notifyAddEventClicked=function(A){for(var z=0;z<g.length;z++){g[z].addEventClicked(A)}};this.notifyBackClicked=function(){for(var z=0;z<g.length;z++){g[z].backClicked()}};var v=new Object();v.eventClicked=function(z){b=z};v.eventDblClicked=function(z){};v.taskClicked=function(z){b=z};v.taskDblClicked=function(z){};v.checkPointClicked=function(z){b=z};v.checkPointDblClicked=function(z){};v.unselectAll=function(){b=null};this.addEventListener(v);this.unselectAll=function(){i.notifyUnselectAll()};this.getSelectedItem=function(){return b};var k=new Object();k.printClicked=function(A,z){return function(){A(z())}}(i.notifyPrintClicked,i.getCurrentDate);k.leftClicked=function(z){return function(){var A=z();A()}}(d);k.rightClicked=function(z){return function(){var A=z();A()}}(a);k.searchByText=function(B){var z=i.getAllViews();for(var A=0;A<z.length;A++){if($def(z[A].filter)){z[A].filter(B)}}};s.addListener(k);this.setHeader=function(z){m.removeChild(s.getDOM());s.killYourself();s=z;s.addListener(k);m.insertBefore(s.getDOM(),y)};this.getHeader=function(){return s}};
;
jive.gui.SimpleHeader=function(b,e){var d;if($obj(e)){d=e}else{d=this}var g=document.createElement("DIV");g.setAttribute("class","month_view_header_button_wrap");g.className="month_view_header_button_wrap";var c=document.createElement("DIV");c.setAttribute("class","month_view_header color_header");c.className="month_view_header color_header";c.appendChild(document.createElement("DIV"));var a=document.createElement("span");a.setAttribute("class","month_view_header_link");a.className="month_view_header_link";g.appendChild(a);a.appendChild(document.createTextNode("<"));var h=document.createElement("span");h.setAttribute("class","month_view_float_r month_view_header_link");h.className="month_view_float_r month_view_header_link";h.appendChild(document.createTextNode(">"));g.appendChild(h);var i=document.createElement("SPAN");i.setAttribute("class","month_view_headerc");i.className="month_view_headerc";g.appendChild(i);c.appendChild(g);jive.ext.x.xDisplayBlock(c);this.getDOM=function(){return c};this.showArrowsHuh=function(j){if(j){jive.ext.x.xDisplayBlock(a);jive.ext.x.xShow(h)}else{jive.ext.x.xDisplayNone(a);jive.ext.x.xHide(h)}};this.showPrintHuh=function(j){};this.showFilterHuh=function(j){};this.getHeight=function(){return(jive.ext.x.xDisplay(c)=="block")?jive.ext.x.xHeight(c):0};this.setTitleText=function(j){while(i.childNodes.length>0){i.removeChild(i.childNodes[0])}i.appendChild(document.createTextNode(j))};this.setNavFilter=function(j){};this.updateText=function(){};this.getFilterText=function(){return""};var f=new Array();this.addListener=function(j){f.push(j)};this.notifyPrintClicked=function(){for(var j=0;j<f.length;j++){f[j].printClicked()}};this.notifyLeftClicked=function(){for(var j=0;j<f.length;j++){f[j].leftClicked()}};this.notifyRightClicked=function(){for(var j=0;j<f.length;j++){f[j].rightClicked()}};this.notifySearchByText=function(k){for(var j=0;j<f.length;j++){f[j].searchByText(k)}};jive.ext.x.xAddEventListener(a,"click",function(j){return function(){j.notifyLeftClicked()}}(d));jive.ext.x.xAddEventListener(h,"click",function(j){return function(){j.notifyRightClicked()}}(d));this.killYourself=function(){}};
;
jive.gui.NullHeader=function(c){var b=this;var d=document.createElement("DIV");jive.ext.x.xDisplayNone(d);this.getDOM=function(){return d};this.showArrowsHuh=function(e){};this.showPrintHuh=function(e){};this.showFilterHuh=function(e){};this.getHeight=function(){return 0};this.setTitleText=function(e){};this.setNavFilter=function(e){};this.updateText=function(){};this.getFilterText=function(){return""};var a=new Array();this.addListener=function(e){a.push(e)};this.notifyPrintClicked=function(){for(var e=0;e<a.length;e++){a[e].printClicked()}};this.notifyLeftClicked=function(){for(var e=0;e<a.length;e++){a[e].leftClicked()}};this.notifyRightClicked=function(){for(var e=0;e<a.length;e++){a[e].rightClicked()}};this.notifySearchByText=function(f){for(var e=0;e<a.length;e++){a[e].searchByText(f)}};this.killYourself=function(){}};
;
var pc=navigator.userAgent.toLowerCase();var ie4_win=(pc.indexOf("win")!=-1)&&(pc.indexOf("msie")!=-1)&&(parseInt(navigator.appVersion)>=4);var is_gecko=pc.indexOf("gecko/")!=-1&&parseFloat(pc.substring(pc.indexOf("gecko/")+6,pc.indexOf("gecko/")+14))>20030108;function styleTag(m,d,h){var e=0;var c=h.scrollTop;var a;if(document.selection){if(document.selection.createRange().parentElement().tagName=="TEXTAREA"){var f=document.selection.createRange().text;e=getSelectionRangeEnd(h);a=_markupText(f,m,d);document.selection.createRange().text=a[0];e+=a[1]}}else{if(typeof(h.selectionStart)!="undefined"&&typeof(h.selectionEnd)!="undefined"){if(h.selectionStart==h.selectionEnd){return}var g=h.textLength;var b=h.selectionStart;var i=h.selectionEnd;if(i==1||i==2){i=g}var l=(h.value).substring(0,b);var k=(h.value).substring(b,i);var j=(h.value).substring(i,g);a=_markupText(k,m,d);h.value=l+a[0]+j;e=i+a[1]}else{return}}if(e>0){setCaretTo(h,e,c)}}function _markupText(k,n,e){var a=trimLeadingSpace(k);k=a[0];var j=a[1];a=trimTrailingSpace(k);k=a[0];var f=a[1];var d=0;if(k.indexOf("\n")>0){var m=k.split("\n");var h="";for(var g=0;g<m.length;g++){var l=m[g];a=trimLeadingSpace(l);l=a[0];var c=a[1];a=trimTrailingSpace(l);l=a[0];var b=a[1];if(l==""){h+=c+l+b}else{h+=c+n+l+e+b;d+=(n.length+e.length)}if(g<m.length-1){h+="\n"}}k=j+h+f}else{k=j+n+k+e+f}a=new Array(2);a[0]=k;a[1]=d;return a}function trimLeadingSpace(c){var b="";while(c.length>0&&(c.charAt(0)==" "||c.charAt(0)=="\n"||c.charAt(0)=="\r")){b+=c.charAt(0);c=c.substring(1)}var a=new Array(2);a[0]=c;a[1]=b;return a}function trimTrailingSpace(c){var b="";while(c.length>0&&(c.charAt(c.length-1)==" "||c.charAt(c.length-1)=="\n"||c.charAt(c.length-1)=="\r")){b+=c.charAt(c.length-1);c=c.substring(0,c.length-1)}var a=new Array(2);a[0]=c;a[1]=b;return a}function getSelectionRangeText(b){if(document.selection){return document.selection.createRange().text}else{if(is_gecko){var c=b.selectionStart;var a=b.selectionEnd;return b.value.substr(c,a-c)}else{return""}}}function getSelectionRangeEnd(b){if(document.selection){var a=document.selection.createRange();var c=a.duplicate();c.moveToElementText(b);c.setEndPoint("EndToEnd",a);var d=c.text.length-a.text.length;return d+a.text.length}else{if(is_gecko){return b.selectionEnd}else{return 0}}}function setCaretTo(b,g,e){b.focus();if(b.createTextRange){var c=0;var d=0;var f=b.value;while(c>-1&&c<g){c=f.indexOf("\r\n",c);if(c>=0){d++;c+=2}}if(d>1){d--}var a=b.createTextRange();a.move("character",(g-d));a.select()}else{if(b.selectionStart){b.setSelectionRange(g,g)}}if(e>0){b.scrollTop=e}}function caret(a){if(ie4_win&&a.createTextRange&&document.selection.createRange().parentElement().tagName=="TEXTAREA"){a.caretPos=document.selection.createRange().duplicate()}}function funcname(b){var a=b.toString().match(/function (\w*)/)[1];if((a==null)||(a.length==0)){return"anonymous"}return a}function stacktrace(){var c="";for(var b=arguments.caller;b!=null;b=b.caller){c+=funcname(b.callee)+"\n";if(b.caller==b){break}}return c}function printStackTrace(){alert("stack trace is "+stacktrace())};
;
var Prototype={Version:"1.6.0.2",Browser:{IE:!!(window.attachEvent&&!window.opera),Opera:!!window.opera,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Gecko:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")==-1,MobileSafari:!!navigator.userAgent.match(/Apple.*Mobile.*Safari/)},BrowserFeatures:{XPath:!!document.evaluate,ElementExtensions:!!window.HTMLElement,SpecificElementExtensions:document.createElement("div").__proto__&&document.createElement("div").__proto__!==document.createElement("form").__proto__},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Class={create:function(){var e=null,d=$A(arguments);if(Object.isFunction(d[0])){e=d.shift()}function a(){this.initialize.apply(this,arguments)}Object.extend(a,Class.Methods);a.superclass=e;a.subclasses=[];if(e){var b=function(){};b.prototype=e.prototype;a.prototype=new b;e.subclasses.push(a)}for(var c=0;c<d.length;c++){a.addMethods(d[c])}if(!a.prototype.initialize){a.prototype.initialize=Prototype.emptyFunction}a.prototype.constructor=a;return a}};Class.Methods={addMethods:function(g){var c=this.superclass&&this.superclass.prototype;var b=Object.keys(g);if(!Object.keys({toString:true}).length){b.push("toString","valueOf")}for(var a=0,d=b.length;a<d;a++){var f=b[a],e=g[f];if(c&&Object.isFunction(e)&&e.argumentNames().first()=="$super"){var h=e,e=Object.extend((function(i){return function(){return c[i].apply(this,arguments)}})(f).wrap(h),{valueOf:function(){return h},toString:function(){return h.toString()}})}this.prototype[f]=e}return this}};var Abstract={};Object.extend=function(a,c){for(var b in c){a[b]=c[b]}return a};Object.extend(Object,{inspect:function(a){try{if(Object.isUndefined(a)){return"undefined"}if(a===null){return"null"}return a.inspect?a.inspect():String(a)}catch(b){if(b instanceof RangeError){return"..."}throw b}},toJSON:function(a){var c=typeof a;switch(c){case"undefined":case"function":case"unknown":return;case"boolean":return a.toString()}if(a===null){return"null"}if(a.toJSON){return a.toJSON()}if(Object.isElement(a)){return}var b=[];for(var e in a){var d=Object.toJSON(a[e]);if(!Object.isUndefined(d)){b.push(e.toJSON()+": "+d)}}return"{"+b.join(", ")+"}"},toQueryString:function(a){return $H(a).toQueryString()},toHTML:function(a){return a&&a.toHTML?a.toHTML():String.interpret(a)},keys:function(a){var b=[];for(var c in a){b.push(c)}return b},values:function(b){var a=[];for(var c in b){a.push(b[c])}return a},clone:function(a){return Object.extend({},a)},isElement:function(a){return a&&a.nodeType==1},isArray:function(a){return a!=null&&typeof a=="object"&&"splice" in a&&"join" in a},isHash:function(a){return a instanceof Hash},isFunction:function(a){return typeof a=="function"},isString:function(a){return typeof a=="string"},isNumber:function(a){return typeof a=="number"},isUndefined:function(a){return typeof a=="undefined"}});Object.extend(Function.prototype,{argumentNames:function(){var a=this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(",").invoke("strip");return a.length==1&&!a[0]?[]:a},bind:function(){if(arguments.length<2&&Object.isUndefined(arguments[0])){return this}var a=this,c=$A(arguments),b=c.shift();return function(){return a.apply(b,c.concat($A(arguments)))}},bindAsEventListener:function(){var a=this,c=$A(arguments),b=c.shift();return function(d){return a.apply(b,[d||window.event].concat(c))}},curry:function(){if(!arguments.length){return this}var a=this,b=$A(arguments);return function(){return a.apply(this,b.concat($A(arguments)))}},delay:function(){var a=this,b=$A(arguments),c=b.shift()*1000;return window.setTimeout(function(){return a.apply(a,b)},c)},wrap:function(b){var a=this;return function(){return b.apply(this,[a.bind(this)].concat($A(arguments)))}},methodize:function(){if(this._methodized){return this._methodized}var a=this;return this._methodized=function(){return a.apply(null,[this].concat($A(arguments)))}}});Function.prototype.defer=Function.prototype.delay.curry(0.01);Date.prototype.toJSON=function(){return'"'+this.getUTCFullYear()+"-"+(this.getUTCMonth()+1).toPaddedString(2)+"-"+this.getUTCDate().toPaddedString(2)+"T"+this.getUTCHours().toPaddedString(2)+":"+this.getUTCMinutes().toPaddedString(2)+":"+this.getUTCSeconds().toPaddedString(2)+'Z"'};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};RegExp.prototype.match=RegExp.prototype.test;RegExp.escape=function(a){return String(a).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};var PeriodicalExecuter=Class.create({initialize:function(b,a){this.callback=b;this.frequency=a;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},execute:function(){this.callback(this)},stop:function(){if(!this.timer){return}clearInterval(this.timer);this.timer=null},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.execute()}finally{this.currentlyExecuting=false}}}});Object.extend(String,{interpret:function(a){return a==null?"":String(a)},specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"}});Object.extend(String.prototype,{gsub:function(e,c){var a="",d=this,b;c=arguments.callee.prepareReplacement(c);while(d.length>0){if(b=d.match(e)){a+=d.slice(0,b.index);a+=String.interpret(c(b));d=d.slice(b.index+b[0].length)}else{a+=d,d=""}}return a},sub:function(c,a,b){a=this.gsub.prepareReplacement(a);b=Object.isUndefined(b)?1:b;return this.gsub(c,function(d){if(--b<0){return d[0]}return a(d)})},scan:function(b,a){this.gsub(b,a);return String(this)},truncate:function(b,a){b=b||30;a=Object.isUndefined(a)?"...":a;return this.length>b?this.slice(0,b-a.length)+a:String(this)},strip:function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var b=new RegExp(Prototype.ScriptFragment,"img");var a=new RegExp(Prototype.ScriptFragment,"im");return(this.match(b)||[]).map(function(c){return(c.match(a)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)})},escapeHTML:function(){var a=arguments.callee;a.text.data=this;return a.div.innerHTML},unescapeHTML:function(){var a=new Element("div");a.innerHTML=this.stripTags();return a.childNodes[0]?(a.childNodes.length>1?$A(a.childNodes).inject("",function(b,c){return b+c.nodeValue}):a.childNodes[0].nodeValue):""},toQueryParams:function(b){var a=this.strip().match(/([^?#]*)(#.*)?$/);if(!a){return{}}return a[1].split(b||"&").inject({},function(e,f){if((f=f.split("="))[0]){var c=decodeURIComponent(f.shift());var d=f.length>1?f.join("="):f[0];if(d!=undefined){d=decodeURIComponent(d)}if(c in e){if(!Object.isArray(e[c])){e[c]=[e[c]]}e[c].push(d)}else{e[c]=d}}return e})},toArray:function(){return this.split("")},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},times:function(a){return a<1?"":new Array(a+1).join(this)},camelize:function(){var d=this.split("-"),a=d.length;if(a==1){return d[0]}var c=this.charAt(0)=="-"?d[0].charAt(0).toUpperCase()+d[0].substring(1):d[0];for(var b=1;b<a;b++){c+=d[b].charAt(0).toUpperCase()+d[b].substring(1)}return c},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},underscore:function(){return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase()},dasherize:function(){return this.gsub(/_/,"-")},inspect:function(b){var a=this.gsub(/[\x00-\x1f\\]/,function(c){var d=String.specialChar[c[0]];return d?d:"\\u00"+c[0].charCodeAt().toPaddedString(2,16)});if(b){return'"'+a.replace(/"/g,'\\"')+'"'}return"'"+a.replace(/'/g,"\\'")+"'"},toJSON:function(){return this.inspect(true)},unfilterJSON:function(a){return this.sub(a||Prototype.JSONFilter,"#{1}")},isJSON:function(){var a=this;if(a.blank()){return false}a=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(a)},evalJSON:function(sanitize){var json=this.unfilterJSON();try{if(!sanitize||json.isJSON()){return eval("("+json+")")}}catch(e){}throw new SyntaxError("Badly formed JSON string: "+this.inspect())},include:function(a){return this.indexOf(a)>-1},startsWith:function(a){return this.indexOf(a)===0},endsWith:function(a){var b=this.length-a.length;return b>=0&&this.lastIndexOf(a)===b},empty:function(){return this==""},blank:function(){return/^\s*$/.test(this)},interpolate:function(a,b){return new Template(this,b).evaluate(a)}});if(Prototype.Browser.WebKit||Prototype.Browser.IE){Object.extend(String.prototype,{escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")}})}String.prototype.gsub.prepareReplacement=function(b){if(Object.isFunction(b)){return b}var a=new Template(b);return function(c){return a.evaluate(c)}};String.prototype.parseQuery=String.prototype.toQueryParams;Object.extend(String.prototype.escapeHTML,{div:document.createElement("div"),text:document.createTextNode("")});with(String.prototype.escapeHTML){div.appendChild(text)}var Template=Class.create({initialize:function(a,b){this.template=a.toString();this.pattern=b||Template.Pattern},evaluate:function(a){if(Object.isFunction(a.toTemplateReplacements)){a=a.toTemplateReplacements()}return this.template.gsub(this.pattern,function(d){if(a==null){return""}var f=d[1]||"";if(f=="\\"){return d[2]}var b=a,g=d[3];var e=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;d=e.exec(g);if(d==null){return f}while(d!=null){var c=d[1].startsWith("[")?d[2].gsub("\\\\]","]"):d[1];b=b[c];if(null==b||""==d[3]){break}g=g.substring("["==d[3]?d[1].length:d[0].length);d=e.exec(g)}return f+String.interpret(b)})}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;var $break={};var Enumerable={each:function(c,b){var a=0;c=c.bind(b);try{this._each(function(e){c(e,a++)})}catch(d){if(d!=$break){throw d}}return this},eachSlice:function(d,c,b){c=c?c.bind(b):Prototype.K;var a=-d,e=[],f=this.toArray();while((a+=d)<f.length){e.push(f.slice(a,a+d))}return e.collect(c,b)},all:function(c,b){c=c?c.bind(b):Prototype.K;var a=true;this.each(function(e,d){a=a&&!!c(e,d);if(!a){throw $break}});return a},any:function(c,b){c=c?c.bind(b):Prototype.K;var a=false;this.each(function(e,d){if(a=!!c(e,d)){throw $break}});return a},collect:function(c,b){c=c?c.bind(b):Prototype.K;var a=[];this.each(function(e,d){a.push(c(e,d))});return a},detect:function(c,b){c=c.bind(b);var a;this.each(function(e,d){if(c(e,d)){a=e;throw $break}});return a},findAll:function(c,b){c=c.bind(b);var a=[];this.each(function(e,d){if(c(e,d)){a.push(e)}});return a},grep:function(d,c,b){c=c?c.bind(b):Prototype.K;var a=[];if(Object.isString(d)){d=new RegExp(d)}this.each(function(f,e){if(d.match(f)){a.push(c(f,e))}});return a},include:function(a){if(Object.isFunction(this.indexOf)){if(this.indexOf(a)!=-1){return true}}var b=false;this.each(function(c){if(c==a){b=true;throw $break}});return b},inGroupsOf:function(b,a){a=Object.isUndefined(a)?null:a;return this.eachSlice(b,function(c){while(c.length<b){c.push(a)}return c})},inject:function(a,c,b){c=c.bind(b);this.each(function(e,d){a=c(a,e,d)});return a},invoke:function(b){var a=$A(arguments).slice(1);return this.map(function(c){return c[b].apply(c,a)})},max:function(c,b){c=c?c.bind(b):Prototype.K;var a;this.each(function(e,d){e=c(e,d);if(a==null||e>=a){a=e}});return a},min:function(c,b){c=c?c.bind(b):Prototype.K;var a;this.each(function(e,d){e=c(e,d);if(a==null||e<a){a=e}});return a},partition:function(d,b){d=d?d.bind(b):Prototype.K;var c=[],a=[];this.each(function(f,e){(d(f,e)?c:a).push(f)});return[c,a]},pluck:function(b){var a=[];this.each(function(c){a.push(c[b])});return a},reject:function(c,b){c=c.bind(b);var a=[];this.each(function(e,d){if(!c(e,d)){a.push(e)}});return a},sortBy:function(b,a){b=b.bind(a);return this.map(function(d,c){return{value:d,criteria:b(d,c)}}).sort(function(f,e){var d=f.criteria,c=e.criteria;return d<c?-1:d>c?1:0}).pluck("value")},toArray:function(){return this.map()},zip:function(){var b=Prototype.K,a=$A(arguments);if(Object.isFunction(a.last())){b=a.pop()}var c=[this].concat(a).map($A);return this.map(function(e,d){return b(c.pluck(d))})},size:function(){return this.toArray().length},inspect:function(){return"#<Enumerable:"+this.toArray().inspect()+">"}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,filter:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray,every:Enumerable.all,some:Enumerable.any});function $A(c){if(!c){return[]}if(c.toArray){return c.toArray()}var b=c.length||0,a=new Array(b);while(b--){a[b]=c[b]}return a}if(Prototype.Browser.WebKit){$A=function(c){if(!c){return[]}if(!(Object.isFunction(c)&&c=="[object NodeList]")&&c.toArray){return c.toArray()}var b=c.length||0,a=new Array(b);while(b--){a[b]=c[b]}return a}}Array.from=$A;Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse){Array.prototype._reverse=Array.prototype.reverse}Object.extend(Array.prototype,{_each:function(b){for(var a=0,c=this.length;a<c;a++){b(this[a])}},clear:function(){this.length=0;return this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(a){return a!=null})},flatten:function(){return this.inject([],function(b,a){return b.concat(Object.isArray(a)?a.flatten():[a])})},without:function(){var a=$A(arguments);return this.select(function(b){return !a.include(b)})},reverse:function(a){return(a!==false?this:this.toArray())._reverse()},reduce:function(){return this.length>1?this:this[0]},uniq:function(a){return this.inject([],function(d,c,b){if(0==b||(a?d.last()!=c:!d.include(c))){d.push(c)}return d})},intersect:function(a){return this.uniq().findAll(function(b){return a.detect(function(c){return b===c})})},clone:function(){return[].concat(this)},size:function(){return this.length},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"},toJSON:function(){var a=[];this.each(function(b){var c=Object.toJSON(b);if(!Object.isUndefined(c)){a.push(c)}});return"["+a.join(", ")+"]"}});if(Object.isFunction(Array.prototype.forEach)){Array.prototype._each=Array.prototype.forEach}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(c,a){a||(a=0);var b=this.length;if(a<0){a=b+a}for(;a<b;a++){if(this[a]===c){return a}}return -1}}if(!Array.prototype.lastIndexOf){Array.prototype.lastIndexOf=function(b,a){a=isNaN(a)?this.length:(a<0?this.length+a:a)+1;var c=this.slice(0,a).reverse().indexOf(b);return(c<0)?c:a-c-1}}Array.prototype.toArray=Array.prototype.clone;function $w(a){if(!Object.isString(a)){return[]}a=a.strip();return a?a.split(/\s+/):[]}if(Prototype.Browser.Opera){Array.prototype.concat=function(){var e=[];for(var b=0,c=this.length;b<c;b++){e.push(this[b])}for(var b=0,c=arguments.length;b<c;b++){if(Object.isArray(arguments[b])){for(var a=0,d=arguments[b].length;a<d;a++){e.push(arguments[b][a])}}else{e.push(arguments[b])}}return e}}Object.extend(Number.prototype,{toColorPart:function(){return this.toPaddedString(2,16)},succ:function(){return this+1},times:function(a){$R(0,this,true).each(a);return this},toPaddedString:function(c,b){var a=this.toString(b||10);return"0".times(c-a.length)+a},toJSON:function(){return isFinite(this)?this.toString():"null"}});$w("abs round ceil floor").each(function(a){Number.prototype[a]=Math[a].methodize()});function $H(a){return new Hash(a)}var Hash=Class.create(Enumerable,(function(){function a(b,c){if(Object.isUndefined(c)){return b}return b+"="+encodeURIComponent(String.interpret(c))}return{initialize:function(b){this._object=Object.isHash(b)?b.toObject():Object.clone(b)},_each:function(c){for(var b in this._object){var d=this._object[b],e=[b,d];e.key=b;e.value=d;c(e)}},set:function(b,c){return this._object[b]=c},get:function(b){return this._object[b]},unset:function(b){var c=this._object[b];delete this._object[b];return c},toObject:function(){return Object.clone(this._object)},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},index:function(c){var b=this.detect(function(d){return d.value===c});return b&&b.key},merge:function(b){return this.clone().update(b)},update:function(b){return new Hash(b).inject(this,function(c,d){c.set(d.key,d.value);return c})},toQueryString:function(){return this.map(function(d){var c=encodeURIComponent(d.key),b=d.value;if(b&&typeof b=="object"){if(Object.isArray(b)){return b.map(a.curry(c)).join("&")}}return a(c,b)}).join("&")},inspect:function(){return"#<Hash:{"+this.map(function(b){return b.map(Object.inspect).join(": ")}).join(", ")+"}>"},toJSON:function(){return Object.toJSON(this.toObject())},clone:function(){return new Hash(this)}}})());Hash.prototype.toTemplateReplacements=Hash.prototype.toObject;Hash.from=$H;var ObjectRange=Class.create(Enumerable,{initialize:function(c,a,b){this.start=c;this.end=a;this.exclusive=b},_each:function(a){var b=this.start;while(this.include(b)){a(b);b=b.succ()}},include:function(a){if(a<this.start){return false}if(this.exclusive){return a<this.end}return a<=this.end}});var $R=function(c,a,b){return new ObjectRange(c,a,b)};var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(a){this.responders._each(a)},register:function(a){if(!this.include(a)){this.responders.push(a)}},unregister:function(a){this.responders=this.responders.without(a)},dispatch:function(d,b,c,a){this.each(function(f){if(Object.isFunction(f[d])){try{f[d].apply(f,[b,c,a])}catch(g){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=Class.create({initialize:function(a){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:"",evalJSON:true,evalJS:true};Object.extend(this.options,a||{});this.options.method=this.options.method.toLowerCase();if(Object.isString(this.options.parameters)){this.options.parameters=this.options.parameters.toQueryParams()}else{if(Object.isHash(this.options.parameters)){this.options.parameters=this.options.parameters.toObject()}}}});Ajax.Request=Class.create(Ajax.Base,{_complete:false,initialize:function($super,b,a){$super(a);this.transport=Ajax.getTransport();this.request(b)},request:function(b){this.url=b;this.method=this.options.method;var d=Object.clone(this.options.parameters);if(!["get","post"].include(this.method)){d._method=this.method;this.method="post"}this.parameters=d;if(d=Object.toQueryString(d)){if(this.method=="get"){this.url+=(this.url.include("?")?"&":"?")+d}else{if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){d+="&_="}}}try{var a=new Ajax.Response(this);if(this.options.onCreate){this.options.onCreate(a)}Ajax.Responders.dispatch("onCreate",this,a);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous){this.respondToReadyState.bind(this).defer(1)}this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=="post"?(this.options.postBody||d):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange()}}catch(c){this.dispatchException(c)}},onStateChange:function(){var a=this.transport.readyState;if(a>1&&!((a==4)&&this._complete)){this.respondToReadyState(this.transport.readyState)}},setRequestHeaders:function(){var e={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,Accept:"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){e["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:"");if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005){e.Connection="close"}}if(typeof this.options.requestHeaders=="object"){var c=this.options.requestHeaders;if(Object.isFunction(c.push)){for(var b=0,d=c.length;b<d;b+=2){e[c[b]]=c[b+1]}}else{$H(c).each(function(f){e[f.key]=f.value})}}for(var a in e){this.transport.setRequestHeader(a,e[a])}},success:function(){var a=this.getStatus();return !a||(a>=200&&a<300)},getStatus:function(){try{return this.transport.status||0}catch(a){return 0}},respondToReadyState:function(a){var c=Ajax.Request.Events[a],b=new Ajax.Response(this);if(c=="Complete"){try{this._complete=true;(this.options["on"+b.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(b,b.headerJSON)}catch(d){this.dispatchException(d)}var f=b.getHeader("Content-type");if(this.options.evalJS=="force"||(this.options.evalJS&&this.isSameOrigin()&&f&&f.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))){this.evalResponse()}}try{(this.options["on"+c]||Prototype.emptyFunction)(b,b.headerJSON);Ajax.Responders.dispatch("on"+c,this,b,b.headerJSON)}catch(d){this.dispatchException(d)}if(c=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}},isSameOrigin:function(){var a=this.url.match(/^\s*https?:\/\/[^\/]*/);return !a||(a[0]=="#{protocol}//#{domain}#{port}".interpolate({protocol:location.protocol,domain:document.domain,port:location.port?":"+location.port:""}))},getHeader:function(a){try{return this.transport.getResponseHeader(a)||null}catch(b){return null}},evalResponse:function(){try{return eval((this.transport.responseText||"").unfilterJSON())}catch(e){this.dispatchException(e)}},dispatchException:function(a){(this.options.onException||Prototype.emptyFunction)(this,a);Ajax.Responders.dispatch("onException",this,a)}});Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Response=Class.create({initialize:function(c){this.request=c;var d=this.transport=c.transport,a=this.readyState=d.readyState;if((a>2&&!Prototype.Browser.IE)||a==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=String.interpret(d.responseText);this.headerJSON=this._getHeaderJSON()}if(a==4){var b=d.responseXML;this.responseXML=Object.isUndefined(b)?null:b;this.responseJSON=this._getResponseJSON()}},status:0,statusText:"",getStatus:Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||""}catch(a){return""}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders()}catch(a){return null}},getResponseHeader:function(a){return this.transport.getResponseHeader(a)},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders()},_getHeaderJSON:function(){var a=this.getHeader("X-JSON");if(!a){return null}a=decodeURIComponent(escape(a));try{return a.evalJSON(this.request.options.sanitizeJSON||!this.request.isSameOrigin())}catch(b){this.request.dispatchException(b)}},_getResponseJSON:function(){var a=this.request.options;if(!a.evalJSON||(a.evalJSON!="force"&&!(this.getHeader("Content-type")||"").include("application/json"))||this.responseText.blank()){return null}try{return this.responseText.evalJSON(a.sanitizeJSON||!this.request.isSameOrigin())}catch(b){this.request.dispatchException(b)}}});Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,a,c,b){this.container={success:(a.success||a),failure:(a.failure||(a.success?null:a))};b=Object.clone(b);var d=b.onComplete;b.onComplete=(function(e,f){this.updateContent(e.responseText);if(Object.isFunction(d)){d(e,f)}}).bind(this);$super(c,b)},updateContent:function(d){var c=this.container[this.success()?"success":"failure"],a=this.options;if(!a.evalScripts){d=d.stripScripts()}if(c=$(c)){if(a.insertion){if(Object.isString(a.insertion)){var b={};b[a.insertion]=d;c.insert(b)}else{a.insertion(c,d)}}else{c.update(d)}}}});Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,a,c,b){$super(b);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=a;this.url=c;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(a){if(this.options.decay){this.decay=(a.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=a.responseText}this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});function $(b){if(arguments.length>1){for(var a=0,d=[],c=arguments.length;a<c;a++){d.push($(arguments[a]))}return d}if(Object.isString(b)){b=document.getElementById(b)}return Element.extend(b)}if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(f,a){var c=[];var e=document.evaluate(f,$(a)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var b=0,d=e.snapshotLength;b<d;b++){c.push(Element.extend(e.snapshotItem(b)))}return c}}if(!window.Node){var Node={}}if(!Node.ELEMENT_NODE){Object.extend(Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12})}(function(){var a=this.Element;this.Element=function(d,c){c=c||{};d=d.toLowerCase();var b=Element.cache;if(Prototype.Browser.IE&&c.name){d="<"+d+' name="'+c.name+'">';delete c.name;return Element.writeAttribute(document.createElement(d),c)}if(!b[d]){b[d]=Element.extend(document.createElement(d))}return Element.writeAttribute(b[d].cloneNode(false),c)};Object.extend(this.Element,a||{})}).call(window);Element.cache={};Element.Methods={visible:function(a){return $(a).style.display!="none"},toggle:function(a){a=$(a);Element[Element.visible(a)?"hide":"show"](a);return a},hide:function(a){$(a).style.display="none";return a},show:function(a){$(a).style.display="";return a},remove:function(a){a=$(a);a.parentNode.removeChild(a);return a},update:function(a,b){a=$(a);if(b&&b.toElement){b=b.toElement()}if(Object.isElement(b)){return a.update().insert(b)}b=Object.toHTML(b);a.innerHTML=b.stripScripts();b.evalScripts.bind(b).defer();return a},replace:function(b,c){b=$(b);if(c&&c.toElement){c=c.toElement()}else{if(!Object.isElement(c)){c=Object.toHTML(c);var a=b.ownerDocument.createRange();a.selectNode(b);c.evalScripts.bind(c).defer();c=a.createContextualFragment(c.stripScripts())}}b.parentNode.replaceChild(c,b);return b},insert:function(c,e){c=$(c);if(Object.isString(e)||Object.isNumber(e)||Object.isElement(e)||(e&&(e.toElement||e.toHTML))){e={bottom:e}}var d,f,b,g;for(var a in e){d=e[a];a=a.toLowerCase();f=Element._insertionTranslations[a];if(d&&d.toElement){d=d.toElement()}if(Object.isElement(d)){f(c,d);continue}d=Object.toHTML(d);b=((a=="before"||a=="after")?c.parentNode:c).tagName.toUpperCase();g=Element._getContentFromAnonymousElement(b,d.stripScripts());if(a=="top"||a=="after"){g.reverse()}g.each(f.curry(c));d.evalScripts.bind(d).defer()}return c},wrap:function(b,c,a){b=$(b);if(Object.isElement(c)){$(c).writeAttribute(a||{})}else{if(Object.isString(c)){c=new Element(c,a)}else{c=new Element("div",c)}}if(b.parentNode){b.parentNode.replaceChild(c,b)}c.appendChild(b);return c},inspect:function(b){b=$(b);var a="<"+b.tagName.toLowerCase();$H({id:"id",className:"class"}).each(function(f){var e=f.first(),c=f.last();var d=(b[e]||"").toString();if(d){a+=" "+c+"="+d.inspect(true)}});return a+">"},recursivelyCollect:function(a,c){a=$(a);var b=[];while(a=a[c]){if(a.nodeType==1){b.push(Element.extend(a))}}return b},ancestors:function(a){return $(a).recursivelyCollect("parentNode")},descendants:function(a){return $(a).select("*")},firstDescendant:function(a){a=$(a).firstChild;while(a&&a.nodeType!=1){a=a.nextSibling}return $(a)},immediateDescendants:function(a){if(!(a=$(a).firstChild)){return[]}while(a&&a.nodeType!=1){a=a.nextSibling}if(a){return[a].concat($(a).nextSiblings())}return[]},previousSiblings:function(a){return $(a).recursivelyCollect("previousSibling")},nextSiblings:function(a){return $(a).recursivelyCollect("nextSibling")},siblings:function(a){a=$(a);return a.previousSiblings().reverse().concat(a.nextSiblings())},match:function(b,a){if(Object.isString(a)){a=new Selector(a)}return a.match($(b))},up:function(b,d,a){b=$(b);if(arguments.length==1){return $(b.parentNode)}var c=b.ancestors();return Object.isNumber(d)?c[d]:Selector.findElement(c,d,a)},down:function(b,c,a){b=$(b);if(arguments.length==1){return b.firstDescendant()}return Object.isNumber(c)?b.descendants()[c]:b.select(c)[a||0]},previous:function(b,d,a){b=$(b);if(arguments.length==1){return $(Selector.handlers.previousElementSibling(b))}var c=b.previousSiblings();return Object.isNumber(d)?c[d]:Selector.findElement(c,d,a)},next:function(c,d,b){c=$(c);if(arguments.length==1){return $(Selector.handlers.nextElementSibling(c))}var a=c.nextSiblings();return Object.isNumber(d)?a[d]:Selector.findElement(a,d,b)},select:function(){var a=$A(arguments),b=$(a.shift());return Selector.findChildElements(b,a)},adjacent:function(){var a=$A(arguments),b=$(a.shift());return Selector.findChildElements(b.parentNode,a).without(b)},identify:function(b){b=$(b);var c=b.readAttribute("id"),a=arguments.callee;if(c){return c}do{c="anonymous_element_"+a.counter++}while($(c));b.writeAttribute("id",c);return c},readAttribute:function(c,a){c=$(c);if(Prototype.Browser.IE){var b=Element._attributeTranslations.read;if(b.values[a]){return b.values[a](c,a)}if(b.names[a]){a=b.names[a]}if(a.include(":")){return(!c.attributes||!c.attributes[a])?null:c.attributes[a].value}}return c.getAttribute(a)},writeAttribute:function(e,c,f){e=$(e);var b={},d=Element._attributeTranslations.write;if(typeof c=="object"){b=c}else{b[c]=Object.isUndefined(f)?true:f}for(var a in b){c=d.names[a]||a;f=b[a];if(d.values[a]){c=d.values[a](e,f)}if(f===false||f===null){e.removeAttribute(c)}else{if(f===true){e.setAttribute(c,c)}else{e.setAttribute(c,f)}}}return e},getHeight:function(a){return $(a).getDimensions().height},getWidth:function(a){return $(a).getDimensions().width},classNames:function(a){return new Element.ClassNames(a)},hasClassName:function(a,b){if(!(a=$(a))){return}var c=a.className;return(c.length>0&&(c==b||new RegExp("(^|\\s)"+b+"(\\s|$)").test(c)))},addClassName:function(a,b){if(!(a=$(a))){return}if(!a.hasClassName(b)){a.className+=(a.className?" ":"")+b}return a},removeClassName:function(a,b){if(!(a=$(a))){return}a.className=a.className.replace(new RegExp("(^|\\s+)"+b+"(\\s+|$)")," ").strip();return a},toggleClassName:function(a,b){if(!(a=$(a))){return}return a[a.hasClassName(b)?"removeClassName":"addClassName"](b)},cleanWhitespace:function(b){b=$(b);var c=b.firstChild;while(c){var a=c.nextSibling;if(c.nodeType==3&&!/\S/.test(c.nodeValue)){b.removeChild(c)}c=a}return b},empty:function(a){return $(a).innerHTML.blank()},descendantOf:function(f,d){f=$(f),d=$(d);var h=d;if(f.compareDocumentPosition){return(f.compareDocumentPosition(d)&8)===8}if(f.sourceIndex&&!Prototype.Browser.Opera){var g=f.sourceIndex,c=d.sourceIndex,b=d.nextSibling;if(!b){do{d=d.parentNode}while(!(b=d.nextSibling)&&d.parentNode)}if(b&&b.sourceIndex){return(g>c&&g<b.sourceIndex)}}while(f=f.parentNode){if(f==h){return true}}return false},scrollTo:function(a){a=$(a);var b=a.cumulativeOffset();window.scrollTo(b[0],b[1]);return a},getStyle:function(b,c){b=$(b);c=c=="float"?"cssFloat":c.camelize();var d=b.style[c];if(!d){var a=document.defaultView.getComputedStyle(b,null);d=a?a[c]:null}if(c=="opacity"){return d?parseFloat(d):1}return d=="auto"?null:d},getOpacity:function(a){return $(a).getStyle("opacity")},setStyle:function(b,c){b=$(b);var e=b.style,a;if(Object.isString(c)){b.style.cssText+=";"+c;return c.include("opacity")?b.setOpacity(c.match(/opacity:\s*(\d?\.?\d*)/)[1]):b}for(var d in c){if(d=="opacity"){b.setOpacity(c[d])}else{e[(d=="float"||d=="cssFloat")?(Object.isUndefined(e.styleFloat)?"cssFloat":"styleFloat"):d]=c[d]}}return b},setOpacity:function(a,b){a=$(a);a.style.opacity=(b==1||b==="")?"":(b<0.00001)?0:b;return a},getDimensions:function(c){c=$(c);var g=$(c).getStyle("display");if(g!="none"&&g!=null){return{width:c.offsetWidth,height:c.offsetHeight}}var b=c.style;var f=b.visibility;var d=b.position;var a=b.display;b.visibility="hidden";b.position="absolute";b.display="block";var h=c.clientWidth;var e=c.clientHeight;b.display=a;b.position=d;b.visibility=f;return{width:h,height:e}},makePositioned:function(a){a=$(a);var b=Element.getStyle(a,"position");if(b=="static"||!b){a._madePositioned=true;a.style.position="relative";if(window.opera){a.style.top=0;a.style.left=0}}return a},undoPositioned:function(a){a=$(a);if(a._madePositioned){a._madePositioned=undefined;a.style.position=a.style.top=a.style.left=a.style.bottom=a.style.right=""}return a},makeClipping:function(a){a=$(a);if(a._overflow){return a}a._overflow=Element.getStyle(a,"overflow")||"auto";if(a._overflow!=="hidden"){a.style.overflow="hidden"}return a},undoClipping:function(a){a=$(a);if(!a._overflow){return a}a.style.overflow=a._overflow=="auto"?"":a._overflow;a._overflow=null;return a},cumulativeOffset:function(b){var a=0,c=0;do{a+=b.offsetTop||0;c+=b.offsetLeft||0;b=b.offsetParent}while(b);return Element._returnOffset(c,a)},positionedOffset:function(b){var a=0,d=0;do{a+=b.offsetTop||0;d+=b.offsetLeft||0;b=b.offsetParent;if(b){if(b.tagName=="BODY"){break}var c=Element.getStyle(b,"position");if(c!=="static"){break}}}while(b);return Element._returnOffset(d,a)},absolutize:function(b){b=$(b);if(b.getStyle("position")=="absolute"){return}var d=b.positionedOffset();var f=d[1];var e=d[0];var c=b.clientWidth;var a=b.clientHeight;b._originalLeft=e-parseFloat(b.style.left||0);b._originalTop=f-parseFloat(b.style.top||0);b._originalWidth=b.style.width;b._originalHeight=b.style.height;b.style.position="absolute";b.style.top=f+"px";b.style.left=e+"px";b.style.width=c+"px";b.style.height=a+"px";return b},relativize:function(a){a=$(a);if(a.getStyle("position")=="relative"){return}a.style.position="relative";var c=parseFloat(a.style.top||0)-(a._originalTop||0);var b=parseFloat(a.style.left||0)-(a._originalLeft||0);a.style.top=c+"px";a.style.left=b+"px";a.style.height=a._originalHeight;a.style.width=a._originalWidth;return a},cumulativeScrollOffset:function(b){var a=0,c=0;do{a+=b.scrollTop||0;c+=b.scrollLeft||0;b=b.parentNode}while(b);return Element._returnOffset(c,a)},getOffsetParent:function(a){if(a.offsetParent){return $(a.offsetParent)}if(a==document.body){return $(a)}while((a=a.parentNode)&&a!=document.body){if(Element.getStyle(a,"position")!="static"){return $(a)}}return $(document.body)},viewportOffset:function(d){var a=0,c=0;var b=d;do{a+=b.offsetTop||0;c+=b.offsetLeft||0;if(b.offsetParent==document.body&&Element.getStyle(b,"position")=="absolute"){break}}while(b=b.offsetParent);b=d;do{if(!Prototype.Browser.Opera||b.tagName=="BODY"){a-=b.scrollTop||0;c-=b.scrollLeft||0}}while(b=b.parentNode);return Element._returnOffset(c,a)},clonePosition:function(b,d){var a=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});d=$(d);var e=d.viewportOffset();b=$(b);var f=[0,0];var c=null;if(Element.getStyle(b,"position")=="absolute"){c=b.getOffsetParent();f=c.viewportOffset()}if(c==document.body){f[0]-=document.body.offsetLeft;f[1]-=document.body.offsetTop}if(a.setLeft){b.style.left=(e[0]-f[0]+a.offsetLeft)+"px"}if(a.setTop){b.style.top=(e[1]-f[1]+a.offsetTop)+"px"}if(a.setWidth){b.style.width=d.offsetWidth+"px"}if(a.setHeight){b.style.height=d.offsetHeight+"px"}return b}};Element.Methods.identify.counter=1;Object.extend(Element.Methods,{getElementsBySelector:Element.Methods.select,childElements:Element.Methods.immediateDescendants});Element._attributeTranslations={write:{names:{className:"class",htmlFor:"for"},values:{}}};if(Prototype.Browser.Opera){Element.Methods.getStyle=Element.Methods.getStyle.wrap(function(d,b,c){switch(c){case"left":case"top":case"right":case"bottom":if(d(b,"position")==="static"){return null}case"height":case"width":if(!Element.visible(b)){return null}var e=parseInt(d(b,c),10);if(e!==b["offset"+c.capitalize()]){return e+"px"}var a;if(c==="height"){a=["border-top-width","padding-top","padding-bottom","border-bottom-width"]}else{a=["border-left-width","padding-left","padding-right","border-right-width"]}return a.inject(e,function(f,g){var h=d(b,g);return h===null?f:f-parseInt(h,10)})+"px";default:return d(b,c)}});Element.Methods.readAttribute=Element.Methods.readAttribute.wrap(function(c,a,b){if(b==="title"){return a.title}return c(a,b)})}else{if(Prototype.Browser.IE){Element.Methods.getOffsetParent=Element.Methods.getOffsetParent.wrap(function(c,b){b=$(b);var a=b.getStyle("position");if(a!=="static"){return c(b)}b.setStyle({position:"relative"});var d=c(b);b.setStyle({position:a});return d});$w("positionedOffset viewportOffset").each(function(a){Element.Methods[a]=Element.Methods[a].wrap(function(e,c){c=$(c);var b=c.getStyle("position");if(b!=="static"){return e(c)}var d=c.getOffsetParent();if(d&&d.getStyle("position")==="fixed"){d.setStyle({zoom:1})}c.setStyle({position:"relative"});var f=e(c);c.setStyle({position:b});return f})});Element.Methods.getStyle=function(a,b){a=$(a);b=(b=="float"||b=="cssFloat")?"styleFloat":b.camelize();var c=a.style[b];if(!c&&a.currentStyle){c=a.currentStyle[b]}if(b=="opacity"){if(c=(a.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(c[1]){return parseFloat(c[1])/100}}return 1}if(c=="auto"){if((b=="width"||b=="height")&&(a.getStyle("display")!="none")){return a["offset"+b.capitalize()]+"px"}return null}return c};Element.Methods.setOpacity=function(b,e){function f(g){return g.replace(/alpha\([^\)]*\)/gi,"")}b=$(b);var a=b.currentStyle;if((a&&!a.hasLayout)||(!a&&b.style.zoom=="normal")){b.style.zoom=1}var d=b.getStyle("filter"),c=b.style;if(e==1||e===""){(d=f(d))?c.filter=d:c.removeAttribute("filter");return b}else{if(e<0.00001){e=0}}c.filter=f(d)+"alpha(opacity="+(e*100)+")";return b};Element._attributeTranslations={read:{names:{"class":"className","for":"htmlFor"},values:{_getAttr:function(a,b){return a.getAttribute(b,2)},_getAttrNode:function(a,c){var b=a.getAttributeNode(c);return b?b.value:""},_getEv:function(a,b){b=a.getAttribute(b);return b?b.toString().slice(23,-2):null},_flag:function(a,b){return $(a).hasAttribute(b)?b:null},style:function(a){return a.style.cssText.toLowerCase()},title:function(a){return a.title}}}};Element._attributeTranslations.write={names:Object.extend({cellpadding:"cellPadding",cellspacing:"cellSpacing"},Element._attributeTranslations.read.names),values:{checked:function(a,b){a.checked=!!b},style:function(a,b){a.style.cssText=b?b:""}}};Element._attributeTranslations.has={};$w("colSpan rowSpan vAlign dateTime accessKey tabIndex encType maxLength readOnly longDesc").each(function(a){Element._attributeTranslations.write.names[a.toLowerCase()]=a;Element._attributeTranslations.has[a.toLowerCase()]=a});(function(a){Object.extend(a,{href:a._getAttr,src:a._getAttr,type:a._getAttr,action:a._getAttrNode,disabled:a._flag,checked:a._flag,readonly:a._flag,multiple:a._flag,onload:a._getEv,onunload:a._getEv,onclick:a._getEv,ondblclick:a._getEv,onmousedown:a._getEv,onmouseup:a._getEv,onmouseover:a._getEv,onmousemove:a._getEv,onmouseout:a._getEv,onfocus:a._getEv,onblur:a._getEv,onkeypress:a._getEv,onkeydown:a._getEv,onkeyup:a._getEv,onsubmit:a._getEv,onreset:a._getEv,onselect:a._getEv,onchange:a._getEv})})(Element._attributeTranslations.read.values)}else{if(Prototype.Browser.Gecko&&/rv:1\.8\.0/.test(navigator.userAgent)){Element.Methods.setOpacity=function(a,b){a=$(a);a.style.opacity=(b==1)?0.999999:(b==="")?"":(b<0.00001)?0:b;return a}}else{if(Prototype.Browser.WebKit){Element.Methods.setOpacity=function(a,b){a=$(a);a.style.opacity=(b==1||b==="")?"":(b<0.00001)?0:b;if(b==1){if(a.tagName=="IMG"&&a.width){a.width++;a.width--}else{try{var d=document.createTextNode(" ");a.appendChild(d);a.removeChild(d)}catch(c){}}}return a};Element.Methods.cumulativeOffset=function(b){var a=0,c=0;do{a+=b.offsetTop||0;c+=b.offsetLeft||0;if(b.offsetParent==document.body){if(Element.getStyle(b,"position")=="absolute"){break}}b=b.offsetParent}while(b);return Element._returnOffset(c,a)}}}}}if(Prototype.Browser.IE||Prototype.Browser.Opera){Element.Methods.update=function(b,c){b=$(b);if(c&&c.toElement){c=c.toElement()}if(Object.isElement(c)){return b.update().insert(c)}c=Object.toHTML(c);var a=b.tagName.toUpperCase();if(a in Element._insertionTranslations.tags){$A(b.childNodes).each(function(d){b.removeChild(d)});Element._getContentFromAnonymousElement(a,c.stripScripts()).each(function(d){b.appendChild(d)})}else{b.innerHTML=c.stripScripts()}c.evalScripts.bind(c).defer();return b}}if("outerHTML" in document.createElement("div")){Element.Methods.replace=function(c,e){c=$(c);if(e&&e.toElement){e=e.toElement()}if(Object.isElement(e)){c.parentNode.replaceChild(e,c);return c}e=Object.toHTML(e);var d=c.parentNode,b=d.tagName.toUpperCase();if(Element._insertionTranslations.tags[b]){var f=c.next();var a=Element._getContentFromAnonymousElement(b,e.stripScripts());d.removeChild(c);if(f){a.each(function(g){d.insertBefore(g,f)})}else{a.each(function(g){d.appendChild(g)})}}else{c.outerHTML=e.stripScripts()}e.evalScripts.bind(e).defer();return c}}Element._returnOffset=function(b,c){var a=[b,c];a.left=b;a.top=c;return a};Element._getContentFromAnonymousElement=function(c,b){var d=new Element("div"),a=Element._insertionTranslations.tags[c];if(a){d.innerHTML=a[0]+b+a[1];a[2].times(function(){d=d.firstChild})}else{d.innerHTML=b}return $A(d.childNodes)};Element._insertionTranslations={before:function(a,b){a.parentNode.insertBefore(b,a)},top:function(a,b){a.insertBefore(b,a.firstChild)},bottom:function(a,b){a.appendChild(b)},after:function(a,b){a.parentNode.insertBefore(b,a.nextSibling)},tags:{TABLE:["<table>","</table>",1],TBODY:["<table><tbody>","</tbody></table>",2],TR:["<table><tbody><tr>","</tr></tbody></table>",3],TD:["<table><tbody><tr><td>","</td></tr></tbody></table>",4],SELECT:["<select>","</select>",1]}};(function(){Object.extend(this.tags,{THEAD:this.tags.TBODY,TFOOT:this.tags.TBODY,TH:this.tags.TD})}).call(Element._insertionTranslations);Element.Methods.Simulated={hasAttribute:function(a,c){c=Element._attributeTranslations.has[c]||c;var b=$(a).getAttributeNode(c);return b&&b.specified}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);if(!Prototype.BrowserFeatures.ElementExtensions&&document.createElement("div").__proto__){window.HTMLElement={};window.HTMLElement.prototype=document.createElement("div").__proto__;Prototype.BrowserFeatures.ElementExtensions=true}Element.extend=(function(){if(Prototype.BrowserFeatures.SpecificElementExtensions){return Prototype.K}var a={},b=Element.Methods.ByTag;var c=Object.extend(function(f){if(!f||f._extendedByPrototype||f.nodeType!=1||f==window){return f}var d=Object.clone(a),e=f.tagName,h,g;if(b[e]){Object.extend(d,b[e])}for(h in d){g=d[h];if(Object.isFunction(g)&&!(h in f)){f[h]=g.methodize()}}f._extendedByPrototype=Prototype.emptyFunction;return f},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(a,Element.Methods);Object.extend(a,Element.Methods.Simulated)}}});c.refresh();return c})();Element.hasAttribute=function(a,b){if(a.hasAttribute){return a.hasAttribute(b)}return Element.Methods.Simulated.hasAttribute(a,b)};Element.addMethods=function(c){var h=Prototype.BrowserFeatures,d=Element.Methods.ByTag;if(!c){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{FORM:Object.clone(Form.Methods),INPUT:Object.clone(Form.Element.Methods),SELECT:Object.clone(Form.Element.Methods),TEXTAREA:Object.clone(Form.Element.Methods)})}if(arguments.length==2){var b=c;c=arguments[1]}if(!b){Object.extend(Element.Methods,c||{})}else{if(Object.isArray(b)){b.each(g)}else{g(b)}}function g(j){j=j.toUpperCase();if(!Element.Methods.ByTag[j]){Element.Methods.ByTag[j]={}}Object.extend(Element.Methods.ByTag[j],c)}function a(l,k,j){j=j||false;for(var n in l){var m=l[n];if(!Object.isFunction(m)){continue}if(!j||!(n in k)){k[n]=m.methodize()}}}function e(l){var j;var k={OPTGROUP:"OptGroup",TEXTAREA:"TextArea",P:"Paragraph",FIELDSET:"FieldSet",UL:"UList",OL:"OList",DL:"DList",DIR:"Directory",H1:"Heading",H2:"Heading",H3:"Heading",H4:"Heading",H5:"Heading",H6:"Heading",Q:"Quote",INS:"Mod",DEL:"Mod",A:"Anchor",IMG:"Image",CAPTION:"TableCaption",COL:"TableCol",COLGROUP:"TableCol",THEAD:"TableSection",TFOOT:"TableSection",TBODY:"TableSection",TR:"TableRow",TH:"TableCell",TD:"TableCell",FRAMESET:"FrameSet",IFRAME:"IFrame"};if(k[l]){j="HTML"+k[l]+"Element"}if(window[j]){return window[j]}j="HTML"+l+"Element";if(window[j]){return window[j]}j="HTML"+l.capitalize()+"Element";if(window[j]){return window[j]}window[j]={};window[j].prototype=document.createElement(l).__proto__;return window[j]}if(h.ElementExtensions){a(Element.Methods,HTMLElement.prototype);a(Element.Methods.Simulated,HTMLElement.prototype,true)}if(h.SpecificElementExtensions){for(var i in Element.Methods.ByTag){var f=e(i);if(Object.isUndefined(f)){continue}a(d[i],f.prototype)}}Object.extend(Element,Element.Methods);delete Element.ByTag;if(Element.extend.refresh){Element.extend.refresh()}Element.cache={}};document.viewport={getDimensions:function(){var a={};var b=Prototype.Browser;$w("width height").each(function(e){var c=e.capitalize();a[e]=(b.WebKit&&!document.evaluate)?self["inner"+c]:(b.Opera)?document.body["client"+c]:document.documentElement["client"+c]});return a},getWidth:function(){return this.getDimensions().width},getHeight:function(){return this.getDimensions().height},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop)}};var Selector=Class.create({initialize:function(a){this.expression=a.strip();this.compileMatcher()},shouldUseXPath:function(){if(!Prototype.BrowserFeatures.XPath){return false}var a=this.expression;if(Prototype.Browser.WebKit&&(a.include("-of-type")||a.include(":empty"))){return false}if((/(\[[\w-]*?:|:checked)/).test(this.expression)){return false}return true},compileMatcher:function(){if(this.shouldUseXPath()){return this.compileXPathMatcher()}var e=this.expression,ps=Selector.patterns,h=Selector.handlers,c=Selector.criteria,le,p,m;if(Selector._cache[e]){this.matcher=Selector._cache[e];return}this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in ps){p=ps[i];if(m=e.match(p)){this.matcher.push(Object.isFunction(c[i])?c[i](m):new Template(c[i]).evaluate(m));e=e.replace(m[0],"");break}}}this.matcher.push("return h.unique(n);\n}");eval(this.matcher.join("\n"));Selector._cache[this.expression]=this.matcher},compileXPathMatcher:function(){var f=this.expression,g=Selector.patterns,b=Selector.xpath,d,a;if(Selector._cache[f]){this.xpath=Selector._cache[f];return}this.matcher=[".//*"];while(f&&d!=f&&(/\S/).test(f)){d=f;for(var c in g){if(a=f.match(g[c])){this.matcher.push(Object.isFunction(b[c])?b[c](a):new Template(b[c]).evaluate(a));f=f.replace(a[0],"");break}}}this.xpath=this.matcher.join("");Selector._cache[this.expression]=this.xpath},findElements:function(a){a=a||document;if(this.xpath){return document._getElementsByXPath(this.xpath,a)}return this.matcher(a)},match:function(j){this.tokens=[];var o=this.expression,a=Selector.patterns,f=Selector.assertions;var b,d,g;while(o&&b!==o&&(/\S/).test(o)){b=o;for(var k in a){d=a[k];if(g=o.match(d)){if(f[k]){this.tokens.push([k,Object.clone(g)]);o=o.replace(g[0],"")}else{return this.findElements(document).include(j)}}}}var n=true,c,l;for(var k=0,h;h=this.tokens[k];k++){c=h[0],l=h[1];if(!Selector.assertions[c](j,l)){n=false;break}}return n},toString:function(){return this.expression},inspect:function(){return"#<Selector:"+this.expression.inspect()+">"}});Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:"/following-sibling::*",tagName:function(a){if(a[1]=="*"){return""}return"[local-name()='"+a[1].toLowerCase()+"' or local-name()='"+a[1].toUpperCase()+"']"},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:function(a){a[1]=a[1].toLowerCase();return new Template("[@#{1}]").evaluate(a)},attr:function(a){a[1]=a[1].toLowerCase();a[3]=a[5]||a[6];return new Template(Selector.xpath.operators[a[2]]).evaluate(a)},pseudo:function(a){var b=Selector.xpath.pseudos[a[1]];if(!b){return""}if(Object.isFunction(b)){return b(a)}return new Template(Selector.xpath.pseudos[a[1]]).evaluate(a)},operators:{"=":"[@#{1}='#{3}']","!=":"[@#{1}!='#{3}']","^=":"[starts-with(@#{1}, '#{3}')]","$=":"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']","*=":"[contains(@#{1}, '#{3}')]","~=":"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]","|=":"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},pseudos:{"first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]","only-child":"[not(preceding-sibling::* or following-sibling::*)]",empty:"[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]",checked:"[@checked]",disabled:"[@disabled]",enabled:"[not(@disabled)]",not:function(b){var j=b[6],h=Selector.patterns,a=Selector.xpath,f,c;var g=[];while(j&&f!=j&&(/\S/).test(j)){f=j;for(var d in h){if(b=j.match(h[d])){c=Object.isFunction(a[d])?a[d](b):new Template(a[d]).evaluate(b);g.push("("+c.substring(1,c.length-1)+")");j=j.replace(b[0],"");break}}}return"[not("+g.join(" and ")+")]"},"nth-child":function(a){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",a)},"nth-last-child":function(a){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",a)},"nth-of-type":function(a){return Selector.xpath.pseudos.nth("position() ",a)},"nth-last-of-type":function(a){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",a)},"first-of-type":function(a){a[6]="1";return Selector.xpath.pseudos["nth-of-type"](a)},"last-of-type":function(a){a[6]="1";return Selector.xpath.pseudos["nth-last-of-type"](a)},"only-of-type":function(a){var b=Selector.xpath.pseudos;return b["first-of-type"](a)+b["last-of-type"](a)},nth:function(g,e){var h,i=e[6],d;if(i=="even"){i="2n+0"}if(i=="odd"){i="2n+1"}if(h=i.match(/^(\d+)$/)){return"["+g+"= "+h[1]+"]"}if(h=i.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(h[1]=="-"){h[1]=-1}var f=h[1]?Number(h[1]):1;var c=h[2]?Number(h[2]):0;d="[((#{fragment} - #{b}) mod #{a} = 0) and ((#{fragment} - #{b}) div #{a} >= 0)]";return new Template(d).evaluate({fragment:g,a:f,b:c})}}}},criteria:{tagName:'n = h.tagName(n, r, "#{1}", c);      c = false;',className:'n = h.className(n, r, "#{1}", c);    c = false;',id:'n = h.id(n, r, "#{1}", c);           c = false;',attrPresence:'n = h.attrPresence(n, r, "#{1}", c); c = false;',attr:function(a){a[3]=(a[5]||a[6]);return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(a)},pseudo:function(a){if(a[6]){a[6]=a[6].replace(/"/g,'\\"')}return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(a)},descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:{laterSibling:/^\s*~\s*/,child:/^\s*>\s*/,adjacent:/^\s*\+\s*/,descendant:/^\s/,tagName:/^\s*(\*|[\w\-]+)(\b|$)?/,id:/^#([\w\-\*]+)(\b|$)/,className:/^\.([\w\-\*]+)(\b|$)/,pseudo:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/,attrPresence:/^\[([\w]+)\]/,attr:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/},assertions:{tagName:function(a,b){return b[1].toUpperCase()==a.tagName.toUpperCase()},className:function(a,b){return Element.hasClassName(a,b[1])},id:function(a,b){return a.id===b[1]},attrPresence:function(a,b){return Element.hasAttribute(a,b[1])},attr:function(b,c){var a=Element.readAttribute(b,c[1]);return a&&Selector.operators[c[2]](a,c[5]||c[6])}},handlers:{concat:function(d,c){for(var e=0,f;f=c[e];e++){d.push(f)}return d},mark:function(a){var d=Prototype.emptyFunction;for(var b=0,c;c=a[b];b++){c._countedByPrototype=d}return a},unmark:function(a){for(var b=0,c;c=a[b];b++){c._countedByPrototype=undefined}return a},index:function(a,d,g){a._countedByPrototype=Prototype.emptyFunction;if(d){for(var b=a.childNodes,e=b.length-1,c=1;e>=0;e--){var f=b[e];if(f.nodeType==1&&(!g||f._countedByPrototype)){f.nodeIndex=c++}}}else{for(var e=0,c=1,b=a.childNodes;f=b[e];e++){if(f.nodeType==1&&(!g||f._countedByPrototype)){f.nodeIndex=c++}}}},unique:function(b){if(b.length==0){return b}var d=[],e;for(var c=0,a=b.length;c<a;c++){if(!(e=b[c])._countedByPrototype){e._countedByPrototype=Prototype.emptyFunction;d.push(Element.extend(e))}}return Selector.handlers.unmark(d)},descendant:function(a){var d=Selector.handlers;for(var c=0,b=[],e;e=a[c];c++){d.concat(b,e.getElementsByTagName("*"))}return b},child:function(a){var e=Selector.handlers;for(var d=0,c=[],f;f=a[d];d++){for(var b=0,g;g=f.childNodes[b];b++){if(g.nodeType==1&&g.tagName!="!"){c.push(g)}}}return c},adjacent:function(a){for(var c=0,b=[],e;e=a[c];c++){var d=this.nextElementSibling(e);if(d){b.push(d)}}return b},laterSibling:function(a){var d=Selector.handlers;for(var c=0,b=[],e;e=a[c];c++){d.concat(b,Element.nextSiblings(e))}return b},nextElementSibling:function(a){while(a=a.nextSibling){if(a.nodeType==1){return a}}return null},previousElementSibling:function(a){while(a=a.previousSibling){if(a.nodeType==1){return a}}return null},tagName:function(a,j,c,b){var k=c.toUpperCase();var e=[],g=Selector.handlers;if(a){if(b){if(b=="descendant"){for(var f=0,d;d=a[f];f++){g.concat(e,d.getElementsByTagName(c))}return e}else{a=this[b](a)}if(c=="*"){return a}}for(var f=0,d;d=a[f];f++){if(d.tagName.toUpperCase()===k){e.push(d)}}return e}else{return j.getElementsByTagName(c)}},id:function(b,a,j,f){var g=$(j),d=Selector.handlers;if(!g){return[]}if(!b&&a==document){return[g]}if(b){if(f){if(f=="child"){for(var c=0,e;e=b[c];c++){if(g.parentNode==e){return[g]}}}else{if(f=="descendant"){for(var c=0,e;e=b[c];c++){if(Element.descendantOf(g,e)){return[g]}}}else{if(f=="adjacent"){for(var c=0,e;e=b[c];c++){if(Selector.handlers.previousElementSibling(g)==e){return[g]}}}else{b=d[f](b)}}}}for(var c=0,e;e=b[c];c++){if(e==g){return[g]}}return[]}return(g&&Element.descendantOf(g,a))?[g]:[]},className:function(b,a,c,d){if(b&&d){b=this[d](b)}return Selector.handlers.byClassName(b,a,c)},byClassName:function(c,b,f){if(!c){c=Selector.handlers.descendant([b])}var h=" "+f+" ";for(var e=0,d=[],g,a;g=c[e];e++){a=g.className;if(a.length==0){continue}if(a==f||(" "+a+" ").include(h)){d.push(g)}}return d},attrPresence:function(c,b,a,g){if(!c){c=b.getElementsByTagName("*")}if(c&&g){c=this[g](c)}var e=[];for(var d=0,f;f=c[d];d++){if(Element.hasAttribute(f,a)){e.push(f)}}return e},attr:function(a,j,h,k,c,b){if(!a){a=j.getElementsByTagName("*")}if(a&&b){a=this[b](a)}var l=Selector.operators[c],f=[];for(var e=0,d;d=a[e];e++){var g=Element.readAttribute(d,h);if(g===null){continue}if(l(g,k)){f.push(d)}}return f},pseudo:function(b,c,e,a,d){if(b&&d){b=this[d](b)}if(!b){b=a.getElementsByTagName("*")}return Selector.pseudos[c](b,e,a)}},pseudos:{"first-child":function(b,f,a){for(var d=0,c=[],e;e=b[d];d++){if(Selector.handlers.previousElementSibling(e)){continue}c.push(e)}return c},"last-child":function(b,f,a){for(var d=0,c=[],e;e=b[d];d++){if(Selector.handlers.nextElementSibling(e)){continue}c.push(e)}return c},"only-child":function(b,g,a){var e=Selector.handlers;for(var d=0,c=[],f;f=b[d];d++){if(!e.previousElementSibling(f)&&!e.nextElementSibling(f)){c.push(f)}}return c},"nth-child":function(b,c,a){return Selector.pseudos.nth(b,c,a)},"nth-last-child":function(b,c,a){return Selector.pseudos.nth(b,c,a,true)},"nth-of-type":function(b,c,a){return Selector.pseudos.nth(b,c,a,false,true)},"nth-last-of-type":function(b,c,a){return Selector.pseudos.nth(b,c,a,true,true)},"first-of-type":function(b,c,a){return Selector.pseudos.nth(b,"1",a,false,true)},"last-of-type":function(b,c,a){return Selector.pseudos.nth(b,"1",a,true,true)},"only-of-type":function(b,d,a){var c=Selector.pseudos;return c["last-of-type"](c["first-of-type"](b,d,a),d,a)},getIndices:function(d,c,e){if(d==0){return c>0?[c]:[]}return $R(1,e).inject([],function(a,b){if(0==(b-c)%d&&(b-c)/d>=0){a.push(b)}return a})},nth:function(c,s,u,r,e){if(c.length==0){return[]}if(s=="even"){s="2n+0"}if(s=="odd"){s="2n+1"}var q=Selector.handlers,p=[],d=[],g;q.mark(c);for(var o=0,f;f=c[o];o++){if(!f.parentNode._countedByPrototype){q.index(f.parentNode,r,e);d.push(f.parentNode)}}if(s.match(/^\d+$/)){s=Number(s);for(var o=0,f;f=c[o];o++){if(f.nodeIndex==s){p.push(f)}}}else{if(g=s.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(g[1]=="-"){g[1]=-1}var v=g[1]?Number(g[1]):1;var t=g[2]?Number(g[2]):0;var w=Selector.pseudos.getIndices(v,t,c.length);for(var o=0,f,k=w.length;f=c[o];o++){for(var n=0;n<k;n++){if(f.nodeIndex==w[n]){p.push(f)}}}}}q.unmark(c);q.unmark(d);return p},empty:function(b,f,a){for(var d=0,c=[],e;e=b[d];d++){if(e.tagName=="!"||(e.firstChild&&!e.innerHTML.match(/^\s*$/))){continue}c.push(e)}return c},not:function(a,d,k){var g=Selector.handlers,l,c;var j=new Selector(d).findElements(k);g.mark(j);for(var f=0,e=[],b;b=a[f];f++){if(!b._countedByPrototype){e.push(b)}}g.unmark(j);return e},enabled:function(b,f,a){for(var d=0,c=[],e;e=b[d];d++){if(!e.disabled){c.push(e)}}return c},disabled:function(b,f,a){for(var d=0,c=[],e;e=b[d];d++){if(e.disabled){c.push(e)}}return c},checked:function(b,f,a){for(var d=0,c=[],e;e=b[d];d++){if(e.checked){c.push(e)}}return c}},operators:{"=":function(b,a){return b==a},"!=":function(b,a){return b!=a},"^=":function(b,a){return b.startsWith(a)},"$=":function(b,a){return b.endsWith(a)},"*=":function(b,a){return b.include(a)},"~=":function(b,a){return(" "+b+" ").include(" "+a+" ")},"|=":function(b,a){return("-"+b.toUpperCase()+"-").include("-"+a.toUpperCase()+"-")}},split:function(b){var a=[];b.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(c){a.push(c[1].strip())});return a},matchElements:function(f,g){var e=$$(g),d=Selector.handlers;d.mark(e);for(var c=0,b=[],a;a=f[c];c++){if(a._countedByPrototype){b.push(a)}}d.unmark(e);return b},findElement:function(b,c,a){if(Object.isNumber(c)){a=c;c=false}return Selector.matchElements(b,c||"*")[a||0]},findChildElements:function(e,g){g=Selector.split(g.join(","));var d=[],f=Selector.handlers;for(var c=0,b=g.length,a;c<b;c++){a=new Selector(g[c].strip());f.concat(d,a.findElements(e))}return(b>1)?f.unique(d):d}});if(Prototype.Browser.IE){Object.extend(Selector.handlers,{concat:function(d,c){for(var e=0,f;f=c[e];e++){if(f.tagName!=="!"){d.push(f)}}return d},unmark:function(a){for(var b=0,c;c=a[b];b++){c.removeAttribute("_countedByPrototype")}return a}})}function $$(){return Selector.findChildElements(document,$A(arguments))}var Form={reset:function(a){$(a).reset();return a},serializeElements:function(g,b){if(typeof b!="object"){b={hash:!!b}}else{if(Object.isUndefined(b.hash)){b.hash=true}}var c,f,a=false,e=b.submit;var d=g.inject({},function(h,i){if(!i.disabled&&i.name){c=i.name;f=$(i).getValue();if(f!=null&&(i.type!="submit"||(!a&&e!==false&&(!e||c==e)&&(a=true)))){if(c in h){if(!Object.isArray(h[c])){h[c]=[h[c]]}h[c].push(f)}else{h[c]=f}}}return h});return b.hash?d:Object.toQueryString(d)}};Form.Methods={serialize:function(b,a){return Form.serializeElements(Form.getElements(b),a)},getElements:function(a){return $A($(a).getElementsByTagName("*")).inject([],function(b,c){if(Form.Element.Serializers[c.tagName.toLowerCase()]){b.push(Element.extend(c))}return b})},getInputs:function(g,c,d){g=$(g);var a=g.getElementsByTagName("input");if(!c&&!d){return $A(a).map(Element.extend)}for(var e=0,h=[],f=a.length;e<f;e++){var b=a[e];if((c&&b.type!=c)||(d&&b.name!=d)){continue}h.push(Element.extend(b))}return h},disable:function(a){a=$(a);Form.getElements(a).invoke("disable");return a},enable:function(a){a=$(a);Form.getElements(a).invoke("enable");return a},findFirstElement:function(b){var c=$(b).getElements().findAll(function(d){return"hidden"!=d.type&&!d.disabled});var a=c.findAll(function(d){return d.hasAttribute("tabIndex")&&d.tabIndex>=0}).sortBy(function(d){return d.tabIndex}).first();return a?a:c.find(function(d){return["input","select","textarea"].include(d.tagName.toLowerCase())})},focusFirstElement:function(a){a=$(a);a.findFirstElement().activate();return a},request:function(b,a){b=$(b),a=Object.clone(a||{});var d=a.parameters,c=b.readAttribute("action")||"";if(c.blank()){c=window.location.href}a.parameters=b.serialize(true);if(d){if(Object.isString(d)){d=d.toQueryParams()}Object.extend(a.parameters,d)}if(b.hasAttribute("method")&&!a.method){a.method=b.method}return new Ajax.Request(c,a)}};Form.Element={focus:function(a){$(a).focus();return a},select:function(a){$(a).select();return a}};Form.Element.Methods={serialize:function(a){a=$(a);if(!a.disabled&&a.name){var b=a.getValue();if(b!=undefined){var c={};c[a.name]=b;return Object.toQueryString(c)}}return""},getValue:function(a){a=$(a);var b=a.tagName.toLowerCase();return Form.Element.Serializers[b](a)},setValue:function(a,b){a=$(a);var c=a.tagName.toLowerCase();Form.Element.Serializers[c](a,b);return a},clear:function(a){$(a).value="";return a},present:function(a){return $(a).value!=""},activate:function(a){a=$(a);try{a.focus();if(a.select&&(a.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(a.type))){a.select()}}catch(b){}return a},disable:function(a){a=$(a);a.blur();a.disabled=true;return a},enable:function(a){a=$(a);a.disabled=false;return a}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers={input:function(a,b){switch(a.type.toLowerCase()){case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(a,b);default:return Form.Element.Serializers.textarea(a,b)}},inputSelector:function(a,b){if(Object.isUndefined(b)){return a.checked?a.value:null}else{a.checked=!!b}},textarea:function(a,b){if(Object.isUndefined(b)){return a.value}else{a.value=b}},select:function(d,a){if(Object.isUndefined(a)){return this[d.type=="select-one"?"selectOne":"selectMany"](d)}else{var c,f,g=!Object.isArray(a);for(var b=0,e=d.length;b<e;b++){c=d.options[b];f=this.optionValue(c);if(g){if(f==a){c.selected=true;return}}else{c.selected=a.include(f)}}}},selectOne:function(b){var a=b.selectedIndex;return a>=0?this.optionValue(b.options[a]):null},selectMany:function(d){var a,e=d.length;if(!e){return null}for(var c=0,a=[];c<e;c++){var b=d.options[c];if(b.selected){a.push(this.optionValue(b))}}return a},optionValue:function(a){return Element.extend(a).hasAttribute("value")?a.value:a.text}};Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,a,b,c){$super(c,b);this.element=$(a);this.lastValue=this.getValue()},execute:function(){var a=this.getValue();if(Object.isString(this.lastValue)&&Object.isString(a)?this.lastValue!=a:String(this.lastValue)!=String(a)){this.callback(this.element,a);this.lastValue=a}}});Form.Element.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=Class.create({initialize:function(a,b){this.element=$(a);this.callback=b;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks()}else{this.registerCallback(this.element)}},onElementEvent:function(){var a=this.getValue();if(this.lastValue!=a){this.callback(this.element,a);this.lastValue=a}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback,this)},registerCallback:function(a){if(a.type){switch(a.type.toLowerCase()){case"checkbox":case"radio":Event.observe(a,"click",this.onElementEvent.bind(this));break;default:Event.observe(a,"change",this.onElementEvent.bind(this));break}}}});Form.Element.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element)}});if(!window.Event){var Event={}}Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_INSERT:45,cache:{},relatedTarget:function(b){var a;switch(b.type){case"mouseover":a=b.fromElement;break;case"mouseout":a=b.toElement;break;default:return null}return Element.extend(a)}});Event.Methods=(function(){var a;if(Prototype.Browser.IE){var b={0:1,1:4,2:2};a=function(d,c){return d.button==b[c]}}else{if(Prototype.Browser.WebKit){a=function(d,c){switch(c){case 0:return d.which==1&&!d.metaKey;case 1:return d.which==1&&d.metaKey;default:return false}}}else{a=function(d,c){return d.which?(d.which===c+1):(d.button===c)}}}return{isLeftClick:function(c){return a(c,0)},isMiddleClick:function(c){return a(c,1)},isRightClick:function(c){return a(c,2)},element:function(d){var c=Event.extend(d).target;return Element.extend(c.nodeType==Node.TEXT_NODE?c.parentNode:c)},findElement:function(d,f){var c=Event.element(d);if(!f){return c}var e=[c].concat(c.ancestors());return Selector.findElement(e,f,0)},pointer:function(c){return{x:c.pageX||(c.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)),y:c.pageY||(c.clientY+(document.documentElement.scrollTop||document.body.scrollTop))}},pointerX:function(c){return Event.pointer(c).x},pointerY:function(c){return Event.pointer(c).y},stop:function(c){Event.extend(c);c.preventDefault();c.stopPropagation();c.stopped=true}}})();Event.extend=(function(){var a=Object.keys(Event.Methods).inject({},function(b,c){b[c]=Event.Methods[c].methodize();return b});if(Prototype.Browser.IE){Object.extend(a,{stopPropagation:function(){this.cancelBubble=true},preventDefault:function(){this.returnValue=false},inspect:function(){return"[object Event]"}});return function(b){if(!b){return false}if(b._extendedByPrototype){return b}b._extendedByPrototype=Prototype.emptyFunction;var c=Event.pointer(b);Object.extend(b,{target:b.srcElement,relatedTarget:Event.relatedTarget(b),pageX:c.x,pageY:c.y});return Object.extend(b,a)}}else{Event.prototype=Event.prototype||document.createEvent("HTMLEvents").__proto__;Object.extend(Event.prototype,a);return Prototype.K}})();Object.extend(Event,(function(){var b=Event.cache;function c(j){if(j._prototypeEventID){return j._prototypeEventID[0]}arguments.callee.id=arguments.callee.id||1;return j._prototypeEventID=[++arguments.callee.id]}function g(j){if(j&&j.include(":")){return"dataavailable"}return j}function a(j){return b[j]=b[j]||{}}function f(l,j){var k=a(l);return k[j]=k[j]||[]}function h(k,j,l){var o=c(k);var n=f(o,j);if(n.pluck("handler").include(l)){return false}var m=function(p){if(!Event||!Event.extend||(p.eventName&&p.eventName!=j)){return false}Event.extend(p);l.call(k,p)};m.handler=l;n.push(m);return m}function i(m,j,k){var l=f(m,j);return l.find(function(n){return n.handler==k})}function d(m,j,k){var l=a(m);if(!l[j]){return false}l[j]=l[j].without(i(m,j,k))}function e(){for(var k in b){for(var j in b[k]){b[k][j]=null}}}if(window.attachEvent){window.attachEvent("onunload",e)}return{observe:function(l,j,m){l=$(l);var k=g(j);var n=h(l,j,m);if(!n){return l}if(l.addEventListener){l.addEventListener(k,n,false)}else{l.attachEvent("on"+k,n)}return l},stopObserving:function(l,j,m){l=$(l);var o=c(l),k=g(j);if(!m&&j){f(o,j).each(function(p){if(l&&l.stopObserving){l.stopObserving(j,p.handler)}});return l}else{if(!j){Object.keys(a(o)).each(function(p){l.stopObserving(p)});return l}}var n=i(o,j,m);if(!n){return l}if(l.removeEventListener){l.removeEventListener(k,n,false)}else{l.detachEvent("on"+k,n)}d(o,j,m);return l},fire:function(l,k,j){l=$(l);if(l==document&&document.createEvent&&!l.dispatchEvent){l=document.documentElement}var m;if(document.createEvent){m=document.createEvent("HTMLEvents");m.initEvent("dataavailable",true,true)}else{m=document.createEventObject();m.eventType="ondataavailable"}m.eventName=k;m.memo=j||{};if(document.createEvent){l.dispatchEvent(m)}else{l.fireEvent(m.eventType,m)}return Event.extend(m)}}})());Object.extend(Event,Event.Methods);Element.addMethods({fire:Event.fire,observe:Event.observe,stopObserving:Event.stopObserving});Object.extend(document,{fire:Element.Methods.fire.methodize(),observe:Element.Methods.observe.methodize(),stopObserving:Element.Methods.stopObserving.methodize(),loaded:false});(function(){var b;function a(){if(document.loaded){return}if(b){window.clearInterval(b)}document.fire("dom:loaded");document.loaded=true}if(document.addEventListener){if(Prototype.Browser.WebKit){b=window.setInterval(function(){if(/loaded|complete/.test(document.readyState)){a()}},0);Event.observe(window,"load",a)}else{document.addEventListener("DOMContentLoaded",a,false)}}else{document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>");$("__onDOMContentLoaded").onreadystatechange=function(){if(this.readyState=="complete"){this.onreadystatechange=null;a()}}}})();Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;var Insertion={Before:function(a,b){return Element.insert(a,{before:b})},Top:function(a,b){return Element.insert(a,{top:b})},Bottom:function(a,b){return Element.insert(a,{bottom:b})},After:function(a,b){return Element.insert(a,{after:b})}};var $continue=new Error('"throw $continue" is deprecated, use "return" instead');var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},within:function(b,a,c){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(b,a,c)}this.xcomp=a;this.ycomp=c;this.offset=Element.cumulativeOffset(b);return(c>=this.offset[1]&&c<this.offset[1]+b.offsetHeight&&a>=this.offset[0]&&a<this.offset[0]+b.offsetWidth)},withinIncludingScrolloffsets:function(b,a,d){var c=Element.cumulativeScrollOffset(b);this.xcomp=a+c[0]-this.deltaX;this.ycomp=d+c[1]-this.deltaY;this.offset=Element.cumulativeOffset(b);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+b.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+b.offsetWidth)},overlap:function(b,a){if(!b){return 0}if(b=="vertical"){return((this.offset[1]+a.offsetHeight)-this.ycomp)/a.offsetHeight}if(b=="horizontal"){return((this.offset[0]+a.offsetWidth)-this.xcomp)/a.offsetWidth}},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(a){Position.prepare();return Element.absolutize(a)},relativize:function(a){Position.prepare();return Element.relativize(a)},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(b,c,a){a=a||{};return Element.clonePosition(c,b,a)}};if(!document.getElementsByClassName){document.getElementsByClassName=function(b){function a(c){return c.blank()?null:"[contains(concat(' ', @class, ' '), ' "+c+" ')]"}b.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(c,e){e=e.toString().strip();var d=/\s/.test(e)?$w(e).map(a).join(""):a(e);return d?document._getElementsByXPath(".//*"+d,c):[]}:function(e,f){f=f.toString().strip();var g=[],h=(/\s/.test(f)?$w(f):null);if(!h&&!f){return g}var c=$(e).getElementsByTagName("*");f=" "+f+" ";for(var d=0,k,j;k=c[d];d++){if(k.className&&(j=" "+k.className+" ")&&(j.include(f)||(h&&h.all(function(i){return !i.toString().blank()&&j.include(" "+i+" ")})))){g.push(Element.extend(k))}}return g};return function(d,c){return $(c||document.body).getElementsByClassName(d)}}(Element.Methods)}Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(a){this.element=$(a)},_each:function(a){this.element.className.split(/\s+/).select(function(b){return b.length>0})._each(a)},set:function(a){this.element.className=a},add:function(a){if(this.include(a)){return}this.set($A(this).concat(a).join(" "))},remove:function(a){if(!this.include(a)){return}this.set($A(this).without(a).join(" "))},toString:function(){return $A(this).join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);Element.addMethods();
;
var Scriptaculous={Version:"1.8.1",require:function(a){document.write('<script type="text/javascript" src="'+a+'"><\/script>')},REQUIRED_PROTOTYPE:"1.6.0",load:function(){function a(b){var c=b.split(".");return parseInt(c[0])*100000+parseInt(c[1])*1000+parseInt(c[2])}if((typeof Prototype=="undefined")||(typeof Element=="undefined")||(typeof Element.Methods=="undefined")||(a(Prototype.Version)<a(Scriptaculous.REQUIRED_PROTOTYPE))){throw ("script.aculo.us requires the Prototype JavaScript framework >= "+Scriptaculous.REQUIRED_PROTOTYPE)}$A(document.getElementsByTagName("script")).findAll(function(b){return(b.src&&b.src.match(/scriptaculous\.js(\?.*)?$/))}).each(function(c){var d=c.src.replace(/scriptaculous\.js(\?.*)?$/,"");var b=c.src.match(/\?.*load=([a-z,]*)/);(b?b[1]:"builder,effects,dragdrop,controls,slider").split(",").each(function(e){Scriptaculous.require(d+e+".js")})})}};Scriptaculous.load();
;
String.prototype.parseColor=function(){var a="#";if(this.slice(0,4)=="rgb("){var c=this.slice(4,this.length-1).split(",");var b=0;do{a+=parseInt(c[b]).toColorPart()}while(++b<3)}else{if(this.slice(0,1)=="#"){if(this.length==4){for(var b=1;b<4;b++){a+=(this.charAt(b)+this.charAt(b)).toLowerCase()}}if(this.length==7){a=this.toLowerCase()}}}return(a.length==7?a:(arguments[0]||this))};Element.collectTextNodes=function(a){return $A($(a).childNodes).collect(function(b){return(b.nodeType==3?b.nodeValue:(b.hasChildNodes()?Element.collectTextNodes(b):""))}).flatten().join("")};Element.collectTextNodesIgnoreClass=function(a,b){return $A($(a).childNodes).collect(function(c){return(c.nodeType==3?c.nodeValue:((c.hasChildNodes()&&!Element.hasClassName(c,b))?Element.collectTextNodesIgnoreClass(c,b):""))}).flatten().join("")};Element.setContentZoom=function(a,b){a=$(a);a.setStyle({fontSize:(b/100)+"em"});if(Prototype.Browser.WebKit){window.scrollBy(0,0)}return a};Element.getInlineOpacity=function(a){return $(a).style.opacity||""};Element.forceRerendering=function(a){try{a=$(a);var c=document.createTextNode(" ");a.appendChild(c);a.removeChild(c)}catch(b){}};var Effect={_elementDoesNotExistError:{name:"ElementDoesNotExistError",message:"The specified DOM element does not exist, but is required for this effect to operate"},Transitions:{linear:Prototype.K,sinoidal:function(a){return(-Math.cos(a*Math.PI)/2)+0.5},reverse:function(a){return 1-a},flicker:function(a){var a=((-Math.cos(a*Math.PI)/4)+0.75)+Math.random()/4;return a>1?1:a},wobble:function(a){return(-Math.cos(a*Math.PI*(9*a))/2)+0.5},pulse:function(b,a){a=a||5;return(((b%(1/a))*a).round()==0?((b*a*2)-(b*a*2).floor()):1-((b*a*2)-(b*a*2).floor()))},spring:function(a){return 1-(Math.cos(a*4.5*Math.PI)*Math.exp(-a*6))},none:function(a){return 0},full:function(a){return 1}},DefaultOptions:{duration:1,fps:100,sync:false,from:0,to:1,delay:0,queue:"parallel"},tagifyText:function(a){var b="position:relative";if(Prototype.Browser.IE){b+=";zoom:1"}a=$(a);$A(a.childNodes).each(function(c){if(c.nodeType==3){c.nodeValue.toArray().each(function(d){a.insertBefore(new Element("span",{style:b}).update(d==" "?String.fromCharCode(160):d),c)});Element.remove(c)}})},multiple:function(b,c){var e;if(((typeof b=="object")||Object.isFunction(b))&&(b.length)){e=b}else{e=$(b).childNodes}var a=Object.extend({speed:0.1,delay:0},arguments[2]||{});var d=a.delay;$A(e).each(function(g,f){new c(g,Object.extend(a,{delay:f*a.speed+d}))})},PAIRS:{slide:["SlideDown","SlideUp"],blind:["BlindDown","BlindUp"],appear:["Appear","Fade"]},toggle:function(b,c){b=$(b);c=(c||"appear").toLowerCase();var a=Object.extend({queue:{position:"end",scope:(b.id||"global"),limit:1}},arguments[2]||{});Effect[b.visible()?Effect.PAIRS[c][1]:Effect.PAIRS[c][0]](b,a)}};Effect.DefaultOptions.transition=Effect.Transitions.sinoidal;Effect.ScopedQueue=Class.create(Enumerable,{initialize:function(){this.effects=[];this.interval=null},_each:function(a){this.effects._each(a)},add:function(b){var c=new Date().getTime();var a=Object.isString(b.options.queue)?b.options.queue:b.options.queue.position;switch(a){case"front":this.effects.findAll(function(d){return d.state=="idle"}).each(function(d){d.startOn+=b.finishOn;d.finishOn+=b.finishOn});break;case"with-last":c=this.effects.pluck("startOn").max()||c;break;case"end":c=this.effects.pluck("finishOn").max()||c;break}b.startOn+=c;b.finishOn+=c;if(!b.options.queue.limit||(this.effects.length<b.options.queue.limit)){this.effects.push(b)}if(!this.interval){this.interval=setInterval(this.loop.bind(this),15)}},remove:function(a){this.effects=this.effects.reject(function(b){return b==a});if(this.effects.length==0){clearInterval(this.interval);this.interval=null}},loop:function(){var c=new Date().getTime();for(var b=0,a=this.effects.length;b<a;b++){this.effects[b]&&this.effects[b].loop(c)}}});Effect.Queues={instances:$H(),get:function(a){if(!Object.isString(a)){return a}return this.instances.get(a)||this.instances.set(a,new Effect.ScopedQueue())}};Effect.Queue=Effect.Queues.get("global");Effect.Base=Class.create({position:null,start:function(options){function codeForEvent(options,eventName){return((options[eventName+"Internal"]?"this.options."+eventName+"Internal(this);":"")+(options[eventName]?"this.options."+eventName+"(this);":""))}if(options&&options.transition===false){options.transition=Effect.Transitions.linear}this.options=Object.extend(Object.extend({},Effect.DefaultOptions),options||{});this.currentFrame=0;this.state="idle";this.startOn=this.options.delay*1000;this.finishOn=this.startOn+(this.options.duration*1000);this.fromToDelta=this.options.to-this.options.from;this.totalTime=this.finishOn-this.startOn;this.totalFrames=this.options.fps*this.options.duration;eval('this.render = function(pos){ if (this.state=="idle"){this.state="running";'+codeForEvent(this.options,"beforeSetup")+(this.setup?"this.setup();":"")+codeForEvent(this.options,"afterSetup")+'};if (this.state=="running"){pos=this.options.transition(pos)*'+this.fromToDelta+"+"+this.options.from+";this.position=pos;"+codeForEvent(this.options,"beforeUpdate")+(this.update?"this.update(pos);":"")+codeForEvent(this.options,"afterUpdate")+"}}");this.event("beforeStart");if(!this.options.sync){Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).add(this)}},loop:function(c){if(c>=this.startOn){if(c>=this.finishOn){this.render(1);this.cancel();this.event("beforeFinish");if(this.finish){this.finish()}this.event("afterFinish");return}var b=(c-this.startOn)/this.totalTime,a=(b*this.totalFrames).round();if(a>this.currentFrame){this.render(b);this.currentFrame=a}}},cancel:function(){if(!this.options.sync){Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).remove(this)}this.state="finished"},event:function(a){if(this.options[a+"Internal"]){this.options[a+"Internal"](this)}if(this.options[a]){this.options[a](this)}},inspect:function(){var a=$H();for(property in this){if(!Object.isFunction(this[property])){a.set(property,this[property])}}return"#<Effect:"+a.inspect()+",options:"+$H(this.options).inspect()+">"}});Effect.Parallel=Class.create(Effect.Base,{initialize:function(a){this.effects=a||[];this.start(arguments[1])},update:function(a){this.effects.invoke("render",a)},finish:function(a){this.effects.each(function(b){b.render(1);b.cancel();b.event("beforeFinish");if(b.finish){b.finish(a)}b.event("afterFinish")})}});Effect.Tween=Class.create(Effect.Base,{initialize:function(c,f,e){c=Object.isString(c)?$(c):c;var b=$A(arguments),d=b.last(),a=b.length==5?b[3]:null;this.method=Object.isFunction(d)?d.bind(c):Object.isFunction(c[d])?c[d].bind(c):function(g){c[d]=g};this.start(Object.extend({from:f,to:e},a||{}))},update:function(a){this.method(a)}});Effect.Event=Class.create(Effect.Base,{initialize:function(){this.start(Object.extend({duration:0},arguments[0]||{}))},update:Prototype.emptyFunction});Effect.Opacity=Class.create(Effect.Base,{initialize:function(b){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError)}if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}var a=Object.extend({from:this.element.getOpacity()||0,to:1},arguments[1]||{});this.start(a)},update:function(a){this.element.setOpacity(a)}});Effect.Move=Class.create(Effect.Base,{initialize:function(b){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError)}var a=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});this.start(a)},setup:function(){this.element.makePositioned();this.originalLeft=parseFloat(this.element.getStyle("left")||"0");this.originalTop=parseFloat(this.element.getStyle("top")||"0");if(this.options.mode=="absolute"){this.options.x=this.options.x-this.originalLeft;this.options.y=this.options.y-this.originalTop}},update:function(a){this.element.setStyle({left:(this.options.x*a+this.originalLeft).round()+"px",top:(this.options.y*a+this.originalTop).round()+"px"})}});Effect.MoveBy=function(b,a,c){return new Effect.Move(b,Object.extend({x:c,y:a},arguments[3]||{}))};Effect.Scale=Class.create(Effect.Base,{initialize:function(b,c){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError)}var a=Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:c},arguments[2]||{});this.start(a)},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||false;this.elementPositioning=this.element.getStyle("position");this.originalStyle={};["top","left","width","height","fontSize"].each(function(b){this.originalStyle[b]=this.element.style[b]}.bind(this));this.originalTop=this.element.offsetTop;this.originalLeft=this.element.offsetLeft;var a=this.element.getStyle("font-size")||"100%";["em","px","%","pt"].each(function(b){if(a.indexOf(b)>0){this.fontSize=parseFloat(a);this.fontSizeType=b}}.bind(this));this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;this.dims=null;if(this.options.scaleMode=="box"){this.dims=[this.element.offsetHeight,this.element.offsetWidth]}if(/^content/.test(this.options.scaleMode)){this.dims=[this.element.scrollHeight,this.element.scrollWidth]}if(!this.dims){this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth]}},update:function(a){var b=(this.options.scaleFrom/100)+(this.factor*a);if(this.options.scaleContent&&this.fontSize){this.element.setStyle({fontSize:this.fontSize*b+this.fontSizeType})}this.setDimensions(this.dims[0]*b,this.dims[1]*b)},finish:function(a){if(this.restoreAfterFinish){this.element.setStyle(this.originalStyle)}},setDimensions:function(a,e){var f={};if(this.options.scaleX){f.width=e.round()+"px"}if(this.options.scaleY){f.height=a.round()+"px"}if(this.options.scaleFromCenter){var c=(a-this.dims[0])/2;var b=(e-this.dims[1])/2;if(this.elementPositioning=="absolute"){if(this.options.scaleY){f.top=this.originalTop-c+"px"}if(this.options.scaleX){f.left=this.originalLeft-b+"px"}}else{if(this.options.scaleY){f.top=-c+"px"}if(this.options.scaleX){f.left=-b+"px"}}}this.element.setStyle(f)}});Effect.Highlight=Class.create(Effect.Base,{initialize:function(b){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError)}var a=Object.extend({startcolor:"#ffff99"},arguments[1]||{});this.start(a)},setup:function(){if(this.element.getStyle("display")=="none"){this.cancel();return}this.oldStyle={};if(!this.options.keepBackgroundImage){this.oldStyle.backgroundImage=this.element.getStyle("background-image");this.element.setStyle({backgroundImage:"none"})}if(!this.options.endcolor){this.options.endcolor=this.element.getStyle("background-color").parseColor("#ffffff")}if(!this.options.restorecolor){this.options.restorecolor=this.element.getStyle("background-color")}this._base=$R(0,2).map(function(a){return parseInt(this.options.startcolor.slice(a*2+1,a*2+3),16)}.bind(this));this._delta=$R(0,2).map(function(a){return parseInt(this.options.endcolor.slice(a*2+1,a*2+3),16)-this._base[a]}.bind(this))},update:function(a){this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(b,c,d){return b+((this._base[d]+(this._delta[d]*a)).round().toColorPart())}.bind(this))})},finish:function(){this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}))}});Effect.ScrollTo=function(d){var c=arguments[1]||{},b=document.viewport.getScrollOffsets(),e=$(d).cumulativeOffset(),a=(window.height||document.body.scrollHeight)-document.viewport.getHeight();if(c.offset){e[1]+=c.offset}return new Effect.Tween(null,b.top,e[1]>a?a:e[1],c,function(f){scrollTo(b.left,f.round())})};Effect.Fade=function(c){c=$(c);var a=c.getInlineOpacity();var b=Object.extend({from:c.getOpacity()||1,to:0,afterFinishInternal:function(d){if(d.options.to!=0){return}d.element.hide().setStyle({opacity:a})}},arguments[1]||{});return new Effect.Opacity(c,b)};Effect.Appear=function(b){b=$(b);var a=Object.extend({from:(b.getStyle("display")=="none"?0:b.getOpacity()||0),to:1,afterFinishInternal:function(c){c.element.forceRerendering()},beforeSetup:function(c){c.element.setOpacity(c.options.from).show()}},arguments[1]||{});return new Effect.Opacity(b,a)};Effect.Puff=function(b){b=$(b);var a={opacity:b.getInlineOpacity(),position:b.getStyle("position"),top:b.style.top,left:b.style.left,width:b.style.width,height:b.style.height};return new Effect.Parallel([new Effect.Scale(b,200,{sync:true,scaleFromCenter:true,scaleContent:true,restoreAfterFinish:true}),new Effect.Opacity(b,{sync:true,to:0})],Object.extend({duration:1,beforeSetupInternal:function(c){Position.absolutize(c.effects[0].element)},afterFinishInternal:function(c){c.effects[0].element.hide().setStyle(a)}},arguments[1]||{}))};Effect.BlindUp=function(a){a=$(a);a.makeClipping();return new Effect.Scale(a,0,Object.extend({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(b){b.element.hide().undoClipping()}},arguments[1]||{}))};Effect.BlindDown=function(b){b=$(b);var a=b.getDimensions();return new Effect.Scale(b,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:a.height,originalWidth:a.width},restoreAfterFinish:true,afterSetup:function(c){c.element.makeClipping().setStyle({height:"0px"}).show()},afterFinishInternal:function(c){c.element.undoClipping()}},arguments[1]||{}))};Effect.SwitchOff=function(b){b=$(b);var a=b.getInlineOpacity();return new Effect.Appear(b,Object.extend({duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(c){new Effect.Scale(c.element,1,{duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetup:function(d){d.element.makePositioned().makeClipping()},afterFinishInternal:function(d){d.element.hide().undoClipping().undoPositioned().setStyle({opacity:a})}})}},arguments[1]||{}))};Effect.DropOut=function(b){b=$(b);var a={top:b.getStyle("top"),left:b.getStyle("left"),opacity:b.getInlineOpacity()};return new Effect.Parallel([new Effect.Move(b,{x:0,y:100,sync:true}),new Effect.Opacity(b,{sync:true,to:0})],Object.extend({duration:0.5,beforeSetup:function(c){c.effects[0].element.makePositioned()},afterFinishInternal:function(c){c.effects[0].element.hide().undoPositioned().setStyle(a)}},arguments[1]||{}))};Effect.Shake=function(d){d=$(d);var b=Object.extend({distance:20,duration:0.5},arguments[1]||{});var e=parseFloat(b.distance);var c=parseFloat(b.duration)/10;var a={top:d.getStyle("top"),left:d.getStyle("left")};return new Effect.Move(d,{x:e,y:0,duration:c,afterFinishInternal:function(f){new Effect.Move(f.element,{x:-e*2,y:0,duration:c*2,afterFinishInternal:function(g){new Effect.Move(g.element,{x:e*2,y:0,duration:c*2,afterFinishInternal:function(h){new Effect.Move(h.element,{x:-e*2,y:0,duration:c*2,afterFinishInternal:function(i){new Effect.Move(i.element,{x:e*2,y:0,duration:c*2,afterFinishInternal:function(j){new Effect.Move(j.element,{x:-e,y:0,duration:c,afterFinishInternal:function(k){k.element.undoPositioned().setStyle(a)}})}})}})}})}})}})};Effect.SlideDown=function(c){c=$(c).cleanWhitespace();var a=c.down().getStyle("bottom");var b=c.getDimensions();return new Effect.Scale(c,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:b.height,originalWidth:b.width},restoreAfterFinish:true,afterSetup:function(d){d.element.makePositioned();d.element.down().makePositioned();if(window.opera){d.element.setStyle({top:""})}d.element.makeClipping().setStyle({height:"0px"}).show()},afterUpdateInternal:function(d){d.element.down().setStyle({bottom:(d.dims[0]-d.element.clientHeight)+"px"})},afterFinishInternal:function(d){d.element.undoClipping().undoPositioned();d.element.down().undoPositioned().setStyle({bottom:a})}},arguments[1]||{}))};Effect.SlideUp=function(c){c=$(c).cleanWhitespace();var a=c.down().getStyle("bottom");var b=c.getDimensions();return new Effect.Scale(c,window.opera?0:1,Object.extend({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,scaleMode:{originalHeight:b.height,originalWidth:b.width},restoreAfterFinish:true,afterSetup:function(d){d.element.makePositioned();d.element.down().makePositioned();if(window.opera){d.element.setStyle({top:""})}d.element.makeClipping().show()},afterUpdateInternal:function(d){d.element.down().setStyle({bottom:(d.dims[0]-d.element.clientHeight)+"px"})},afterFinishInternal:function(d){d.element.hide().undoClipping().undoPositioned();d.element.down().undoPositioned().setStyle({bottom:a})}},arguments[1]||{}))};Effect.Squish=function(a){return new Effect.Scale(a,window.opera?1:0,{restoreAfterFinish:true,beforeSetup:function(b){b.element.makeClipping()},afterFinishInternal:function(b){b.element.hide().undoClipping()}})};Effect.Grow=function(c){c=$(c);var b=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},arguments[1]||{});var a={top:c.style.top,left:c.style.left,height:c.style.height,width:c.style.width,opacity:c.getInlineOpacity()};var g=c.getDimensions();var h,f;var e,d;switch(b.direction){case"top-left":h=f=e=d=0;break;case"top-right":h=g.width;f=d=0;e=-g.width;break;case"bottom-left":h=e=0;f=g.height;d=-g.height;break;case"bottom-right":h=g.width;f=g.height;e=-g.width;d=-g.height;break;case"center":h=g.width/2;f=g.height/2;e=-g.width/2;d=-g.height/2;break}return new Effect.Move(c,{x:h,y:f,duration:0.01,beforeSetup:function(i){i.element.hide().makeClipping().makePositioned()},afterFinishInternal:function(i){new Effect.Parallel([new Effect.Opacity(i.element,{sync:true,to:1,from:0,transition:b.opacityTransition}),new Effect.Move(i.element,{x:e,y:d,sync:true,transition:b.moveTransition}),new Effect.Scale(i.element,100,{scaleMode:{originalHeight:g.height,originalWidth:g.width},sync:true,scaleFrom:window.opera?1:0,transition:b.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(j){j.effects[0].element.setStyle({height:"0px"}).show()},afterFinishInternal:function(j){j.effects[0].element.undoClipping().undoPositioned().setStyle(a)}},b))}})};Effect.Shrink=function(c){c=$(c);var b=Object.extend({direction:"center",moveTransition:Effect.
