Index: sandbox/newExpressoMail/prototype/plugins/layout/changelog.txt
===================================================================
--- sandbox/newExpressoMail/prototype/plugins/layout/changelog.txt	(revision 7209)
+++ sandbox/newExpressoMail/prototype/plugins/layout/changelog.txt	(revision 7209)
@@ -0,0 +1,60 @@
+1.2.0
+* ADDED maskIframesOnResize option: true=ALL -OR- a selector string
+* ADDED options to set different animations on open and close
+* ADDED new callback events, ie: onshow, onhide
+* ADDED start/end callbacks, eg: onopen_start, onopen_end, etc.
+* ADDED ability to cancel events using callbacks, eg: onopen_start
+* CHANGED Layout.config.fxDefaults to Layout.effects (internal use)
+* FIXED missing semi-colon so minified version works in IE
+
+1.1.3
+* FIXED typo in cursor-hotkeys code
+* ADDED scrollToBookmarkOnLoad options - enables use of URL hash:
+    o www.site.com/page.html#myBookmark
+    o AFTER layout is created, attempts to scroll to bookmark
+    o default = true - otherwise bookmarks are non-functional
+
+1.1.2
+* UPDATED paneSelector rules to handle FORMS and pane-nesting
+    o automatically looks for panes inside 'first form' in container
+    o if using an ID as paneSelector, pane can be 'deeply nested'
+* ADDED auto-CSS for 'containers' other than BODY
+    o overflow: hidden   - ensures no scrollbars on container
+    o position: relative - IF NOT: fixed, absolute or relative
+    o height:   100%     - IF NOT specified or is 'auto'
+* ADDED noAnimation param to open() and close() - not used internally
+
+1.1.1
+* CHANGED toggler element from a SPAN to a DIV
+* CHANGED auto-generated custom-buttons classes for better consistency
+    o [buttonClass]-[pane]-[buttonType] ==> [buttonClass]-[buttonType]-[pane]
+    o ui-layout-button-west-open ==> ui-layout-button-open-west
+    o ui-layout-button-west-pin-up ==> ui-layout-button-pin-west-up
+* CHANGED default for hideTogglerOnSlide to false
+* CHANGED internal 'cDims' hash to alias for state.container
+* CHANGED internal aliases: s = state[pane] and o = options[pane]
+* UPDATED toggler-text to auto-show correct spans (content-open/closed)
+* FIXED toggler-text - now centers text span correctly
+* FIXED bug affecting IE6 when layout has no north or south pane
+* ADDED new layout property 'state' - eg: myLayout.state.west.size
+* REMOVED layout.containerDimensions property - USE: layout.state.container
+* CHANGED data returned to callbacks - added pane-state as 3rd param
+
+1.1.0
+* RENAMED raisePaneZindexOnHover ==> showOverflowOnHover
+* REMOVED "overflow: auto" from base-styles. Overflow must now be set by 
+    CSS - unless applyDefaultStyles==true. No longer need "!important" to 
+	set pane overflow in your stylesheet.
+* CHANGED minSize default from 50 to 0 (still auto-limited to 'css size')
+* FIXED bug in allowOverflow - now works with 'custom paneClass'
+* EXPOSED two CSS utility methods
+    o myLayout.cssWidth( elem )
+    o myLayout.cssHeight( elem )
+* NEW auto-resize for ALL layouts on windows.resize 
+* UPDATED auto-resizing of panes after a container-resize
+* NEW flow-code to prevent simultaneous pane animations
+* NEW options to add text inside toggler-buttons
+* NEW options for hotkeys - standard (cursors) and user-defined 
+
+1.0
+* Initial release
Index: sandbox/newExpressoMail/prototype/plugins/layout/nested.html
===================================================================
--- sandbox/newExpressoMail/prototype/plugins/layout/nested.html	(revision 7209)
+++ sandbox/newExpressoMail/prototype/plugins/layout/nested.html	(revision 7209)
@@ -0,0 +1,150 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head> 
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
+
+	<title>Nested Layouts</title> 
+
+	<script type="text/javascript" src="jquery.js"></script> 
+	<script type="text/javascript" src="jquery.layout.js"></script> 
+	<script type="text/javascript" src="jquery.ui.all.js"></script> 
+
+	<script> 
+
+	var outerLayout, middleLayout, innerLayout; 
+
+	$(document).ready(function () { 
+
+		outerLayout = $('body').layout({ 
+			center__paneSelector:	".outer-center" 
+		,	west__paneSelector:		".outer-west" 
+		,	east__paneSelector:		".outer-east" 
+		,	west__size:				125 
+		,	east__size:				125 
+		,	spacing_open:			8 // ALL panes
+		,	spacing_closed:			12 // ALL panes
+		,	north__spacing_open:	0
+		,	south__spacing_open:	0
+		,	center__onresize:		"middleLayout.resizeAll" 
+		}); 
+
+		middleLayout = $('div.outer-center').layout({ 
+			center__paneSelector:	".middle-center" 
+		,	west__paneSelector:		".middle-west" 
+		,	east__paneSelector:		".middle-east" 
+		,	west__size:				100 
+		,	east__size:				100 
+		,	spacing_open:			8  // ALL panes
+		,	spacing_closed:			12 // ALL panes
+		,	center__onresize:		"innerLayout.resizeAll" 
+		}); 
+
+		innerLayout = $('div.middle-center').layout({ 
+			center__paneSelector:	".inner-center" 
+		,	west__paneSelector:		".inner-west" 
+		,	east__paneSelector:		".inner-east" 
+		,	west__size:				75 
+		,	east__size:				75 
+		,	spacing_open:			8  // ALL panes
+		,	spacing_closed:			8  // ALL panes
+		,	west__spacing_closed:	12
+		,	east__spacing_closed:	12
+		}); 
+
+	}); 
+
+
+	</script> 
+
+	<style type="text/css"> 
+
+	.ui-layout-pane { /* all 'panes' */ 
+		padding: 10px; 
+		background: #FFF; 
+		border-top: 1px solid #BBB;
+		border-bottom: 1px solid #BBB;
+		}
+		.ui-layout-pane-north ,
+		.ui-layout-pane-south {
+			border: 1px solid #BBB;
+		} 
+		.ui-layout-pane-west {
+			border-left: 1px solid #BBB;
+		} 
+		.ui-layout-pane-east {
+			border-right: 1px solid #BBB;
+		} 
+		.ui-layout-pane-center {
+			border-left: 0;
+			border-right: 0;
+			} 
+			.inner-center {
+				border: 1px solid #BBB;
+			} 
+
+		.outer-west ,
+		.outer-east {
+			background-color: #EEE;
+		}
+		.middle-west ,
+		.middle-east {
+			background-color: #F8F8F8;
+		}
+
+	.ui-layout-resizer { /* all 'resizer-bars' */ 
+		background: #DDD; 
+		}
+		.ui-layout-resizer:hover { /* all 'resizer-bars' */ 
+			background: #FED; 
+		}
+		.ui-layout-resizer-west {
+			border-left: 1px solid #BBB;
+		}
+		.ui-layout-resizer-east {
+			border-right: 1px solid #BBB;
+		}
+
+	.ui-layout-toggler { /* all 'toggler-buttons' */ 
+		background: #AAA; 
+		} 
+		.ui-layout-toggler:hover { /* all 'toggler-buttons' */ 
+			background: #FC3; 
+		} 
+
+	.outer-center ,
+	.middle-center {
+		/* center pane that are 'containers' for a nested layout */ 
+		padding: 0; 
+		border: 0; 
+	} 
+
+	</style> 
+
+</head> 
+<body> 
+
+<div class="outer-center">
+
+	<div class="middle-center">
+
+		<div class="inner-center">Inner Center</div> 
+		<div class="inner-west">Inner West</div> 
+		<div class="inner-east">Inner East</div>
+		<div class="ui-layout-north">Inner North</div> 
+		<div class="ui-layout-south">Inner South</div> 
+
+	</div> 
+	<div class="middle-west">Middle West</div> 
+	<div class="middle-east">Middle East</div> 
+
+</div> 
+
+<div class="outer-west">Outer West</div> 
+<div class="outer-east">Outer East</div> 
+
+<div class="ui-layout-north">Outer North</div> 
+<div class="ui-layout-south">Outer South</div> 
+
+</body> 
+</html> 
+
Index: sandbox/newExpressoMail/prototype/plugins/layout/jquery.layout.js
===================================================================
--- sandbox/newExpressoMail/prototype/plugins/layout/jquery.layout.js	(revision 7209)
+++ sandbox/newExpressoMail/prototype/plugins/layout/jquery.layout.js	(revision 7209)
@@ -0,0 +1,2507 @@
+/*
+ * jquery.layout 1.2.0
+ *
+ * Copyright (c) 2008 
+ *   Fabrizio Balliano (http://www.fabrizioballiano.net)
+ *   Kevin Dalman (http://allpro.net)
+ *
+ * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
+ * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
+ *
+ * $Date: 2008-12-27 02:17:22 +0100 (sab, 27 dic 2008) $
+ * $Rev: 203 $
+ * 
+ * NOTE: For best code readability, view this with a fixed-space font and tabs equal to 4-chars
+ */
+(function($) {
+
+$.fn.layout = function (opts) {
+
+/*
+ * ###########################
+ *   WIDGET CONFIG & OPTIONS
+ * ###########################
+ */
+
+	// DEFAULTS for options
+	var 
+		prefix = "ui-layout-" // prefix for ALL selectors and classNames
+	,	defaults = { //	misc default values
+			paneClass:				prefix+"pane"		// ui-layout-pane
+		,	resizerClass:			prefix+"resizer"	// ui-layout-resizer
+		,	togglerClass:			prefix+"toggler"	// ui-layout-toggler
+		,	togglerInnerClass:		prefix+""			// ui-layout-open / ui-layout-closed
+		,	buttonClass:			prefix+"button"		// ui-layout-button
+		,	contentSelector:		"."+prefix+"content"// ui-layout-content
+		,	contentIgnoreSelector:	"."+prefix+"ignore"	// ui-layout-mask 
+		}
+	;
+
+	// DEFAULT PANEL OPTIONS - CHANGE IF DESIRED
+	var options = {
+		name:						""			// FUTURE REFERENCE - not used right now
+	,	scrollToBookmarkOnLoad:		true		// after creating a layout, scroll to bookmark in URL (.../page.htm#myBookmark)
+	,	defaults: { // default options for 'all panes' - will be overridden by 'per-pane settings'
+			applyDefaultStyles: 	false		// apply basic styles directly to resizers & buttons? If not, then stylesheet must handle it
+		,	closable:				true		// pane can open & close
+		,	resizable:				true		// when open, pane can be resized 
+		,	slidable:				true		// when closed, pane can 'slide' open over other panes - closes on mouse-out
+		//,	paneSelector:			[ ]			// MUST be pane-specific!
+		,	contentSelector:		defaults.contentSelector	// INNER div/element to auto-size so only it scrolls, not the entire pane!
+		,	contentIgnoreSelector:	defaults.contentIgnoreSelector	// elem(s) to 'ignore' when measuring 'content'
+		,	paneClass:				defaults.paneClass		// border-Pane - default: 'ui-layout-pane'
+		,	resizerClass:			defaults.resizerClass	// Resizer Bar		- default: 'ui-layout-resizer'
+		,	togglerClass:			defaults.togglerClass	// Toggler Button	- default: 'ui-layout-toggler'
+		,	buttonClass:			defaults.buttonClass	// CUSTOM Buttons	- default: 'ui-layout-button-toggle/-open/-close/-pin'
+		,	resizerDragOpacity:		1			// option for ui.draggable
+		//,	resizerCursor:			""			// MUST be pane-specific - cursor when over resizer-bar
+		,	maskIframesOnResize:	true		// true = all iframes OR = iframe-selector(s) - adds masking-div during resizing/dragging
+		//,	size:					100			// inital size of pane - defaults are set 'per pane'
+		,	minSize:				0			// when manually resizing a pane
+		,	maxSize:				0			// ditto, 0 = no limit
+		,	spacing_open:			6			// space between pane and adjacent panes - when pane is 'open'
+		,	spacing_closed:			6			// ditto - when pane is 'closed'
+		,	togglerLength_open:		50			// Length = WIDTH of toggler button on north/south edges - HEIGHT on east/west edges
+		,	togglerLength_closed: 	50			// 100% OR -1 means 'full height/width of resizer bar' - 0 means 'hidden'
+		,	togglerAlign_open:		"center"	// top/left, bottom/right, center, OR...
+		,	togglerAlign_closed:	"center"	// 1 => nn = offset from top/left, -1 => -nn == offset from bottom/right
+		,	togglerTip_open:		"Close"		// Toggler tool-tip (title)
+		,	togglerTip_closed:		"Open"		// ditto
+		,	resizerTip:				"Resize"	// Resizer tool-tip (title)
+		,	sliderTip:				"Slide Open" // resizer-bar triggers 'sliding' when pane is closed
+		,	sliderCursor:			"pointer"	// cursor when resizer-bar will trigger 'sliding'
+		,	slideTrigger_open:		"click"		// click, dblclick, mouseover
+		,	slideTrigger_close:		"mouseout"	// click, mouseout
+		,	hideTogglerOnSlide:		false		// when pane is slid-open, should the toggler show?
+		,	togglerContent_open:	""			// text or HTML to put INSIDE the toggler
+		,	togglerContent_closed:	""			// ditto
+		,	showOverflowOnHover:	false		// will bind allowOverflow() utility to pane.onMouseOver
+		,	enableCursorHotkey:		true		// enabled 'cursor' hotkeys
+		//,	customHotkey:			""			// MUST be pane-specific - EITHER a charCode OR a character
+		,	customHotkeyModifier:	"SHIFT"		// either 'SHIFT', 'CTRL' or 'CTRL+SHIFT' - NOT 'ALT'
+		//	NOTE: fxSss_open & fxSss_close options (eg: fxName_open) are auto-generated if not passed
+		,	fxName:					"slide" 	// ('none' or blank), slide, drop, scale
+		,	fxSpeed:				null		// slow, normal, fast, 200, nnn - if passed, will OVERRIDE fxSettings.duration
+		,	fxSettings:				{}			// can be passed, eg: { easing: "easeOutBounce", duration: 1500 }
+		,	initClosed:				false		// true = init pane as 'closed'
+		,	initHidden: 			false 		// true = init pane as 'hidden' - no resizer or spacing
+		
+		/*	callback options do not have to be set - listed here for reference only
+		,	onshow_start:			""			// CALLBACK when pane STARTS to Show	- BEFORE onopen/onhide_start
+		,	onshow_end:				""			// CALLBACK when pane ENDS being Shown	- AFTER  onopen/onhide_end
+		,	onhide_start:			""			// CALLBACK when pane STARTS to Close	- BEFORE onclose_start
+		,	onhide_end:				""			// CALLBACK when pane ENDS being Closed	- AFTER  onclose_end
+		,	onopen_start:			""			// CALLBACK when pane STARTS to Open
+		,	onopen_end:				""			// CALLBACK when pane ENDS being Opened
+		,	onclose_start:			""			// CALLBACK when pane STARTS to Close
+		,	onclose_end:			""			// CALLBACK when pane ENDS being Closed
+		,	onresize_start:			""			// CALLBACK when pane STARTS to be ***MANUALLY*** Resized
+		,	onresize_end:			""			// CALLBACK when pane ENDS being Resized ***FOR ANY REASON***
+		*/
+		}
+	,	north: {
+			paneSelector:			"."+prefix+"north" // default = .ui-layout-north
+		,	size:					"auto"
+		,	resizerCursor:			"n-resize"
+		}
+	,	south: {
+			paneSelector:			"."+prefix+"south" // default = .ui-layout-south
+		,	size:					"auto"
+		,	resizerCursor:			"s-resize"
+		}
+	,	east: {
+			paneSelector:			"."+prefix+"east" // default = .ui-layout-east
+		,	size:					200
+		,	resizerCursor:			"e-resize"
+		}
+	,	west: {
+			paneSelector:			"."+prefix+"west" // default = .ui-layout-west
+		,	size:					200
+		,	resizerCursor:			"w-resize"
+		}
+	,	center: {
+			paneSelector:			"."+prefix+"center" // default = .ui-layout-center
+		}
+
+	};
+
+
+	var effects = { // LIST *PREDEFINED EFFECTS* HERE, even if effect has no settings
+		slide:	{
+			all:	{ duration:  "fast"	} // eg: duration: 1000, easing: "easeOutBounce"
+		,	north:	{ direction: "up"	}
+		,	south:	{ direction: "down"	}
+		,	east:	{ direction: "right"}
+		,	west:	{ direction: "left"	}
+		}
+	,	drop:	{
+			all:	{ duration:  "slow"	} // eg: duration: 1000, easing: "easeOutQuint"
+		,	north:	{ direction: "up"	}
+		,	south:	{ direction: "down"	}
+		,	east:	{ direction: "right"}
+		,	west:	{ direction: "left"	}
+		}
+	,	scale:	{
+			all:	{ duration:  "fast"	}
+		}
+	};
+
+
+	// STATIC, INTERNAL CONFIG - DO NOT CHANGE THIS!
+	var config = {
+		allPanes:		"north,south,east,west,center"
+	,	borderPanes:	"north,south,east,west"
+	,	zIndex: { // set z-index values here
+			resizer_normal:	1		// normal z-index for resizer-bars
+		,	pane_normal:	2		// normal z-index for panes
+		,	mask:			4		// overlay div used to mask pane(s) during resizing
+		,	sliding:		100		// applied to both the pane and its resizer when a pane is 'slid open'
+		,	resizing:		10000	// applied to the CLONED resizer-bar when being 'dragged'
+		,	animation:		10000	// applied to the pane when being animated - not applied to the resizer
+		}
+	,	resizers: {
+			cssReq: {
+				position: 	"absolute"
+			,	padding: 	0
+			,	margin: 	0
+			,	fontSize:	"1px"
+			,	textAlign:	"left" // to counter-act "center" alignment!
+			,	overflow: 	"hidden" // keep toggler button from overflowing
+			,	zIndex: 	1
+			}
+		,	cssDef: { // DEFAULT CSS - applied if: options.PANE.applyDefaultStyles=true
+				background: "#DDD"
+			,	border:		"none"
+			}
+		}
+	,	togglers: {
+			cssReq: {
+				position: 	"absolute"
+			,	display: 	"block"
+			,	padding: 	0
+			,	margin: 	0
+			,	overflow:	"hidden"
+			,	textAlign:	"center"
+			,	fontSize:	"1px"
+			,	cursor: 	"pointer"
+			,	zIndex: 	1
+			}
+		,	cssDef: { // DEFAULT CSS - applied if: options.PANE.applyDefaultStyles=true
+				background: "#AAA"
+			}
+		}
+	,	content: {
+			cssReq: {
+				overflow:	"auto"
+			}
+		,	cssDef: {}
+		}
+	,	defaults: { // defaults for ALL panes - overridden by 'per-pane settings' below
+			cssReq: {
+				position: 	"absolute"
+			,	margin:		0
+			,	zIndex: 	2
+			}
+		,	cssDef: {
+				padding:	"10px"
+			,	background:	"#FFF"
+			,	border:		"1px solid #BBB"
+			,	overflow:	"auto"
+			}
+		}
+	,	north: {
+			edge:			"top"
+		,	sizeType:		"height"
+		,	dir:			"horz"
+		,	cssReq: {
+				top: 		0
+			,	bottom: 	"auto"
+			,	left: 		0
+			,	right: 		0
+			,	width: 		"auto"
+			//	height: 	DYNAMIC
+			}
+		}
+	,	south: {
+			edge:			"bottom"
+		,	sizeType:		"height"
+		,	dir:			"horz"
+		,	cssReq: {
+				top: 		"auto"
+			,	bottom: 	0
+			,	left: 		0
+			,	right: 		0
+			,	width: 		"auto"
+			//	height: 	DYNAMIC
+			}
+		}
+	,	east: {
+			edge:			"right"
+		,	sizeType:		"width"
+		,	dir:			"vert"
+		,	cssReq: {
+				left: 		"auto"
+			,	right: 		0
+			,	top: 		"auto" // DYNAMIC
+			,	bottom: 	"auto" // DYNAMIC
+			,	height: 	"auto"
+			//	width: 		DYNAMIC
+			}
+		}
+	,	west: {
+			edge:			"left"
+		,	sizeType:		"width"
+		,	dir:			"vert"
+		,	cssReq: {
+				left: 		0
+			,	right: 		"auto"
+			,	top: 		"auto" // DYNAMIC
+			,	bottom: 	"auto" // DYNAMIC
+			,	height: 	"auto"
+			//	width: 		DYNAMIC
+			}
+		}
+	,	center: {
+			dir:			"center"
+		,	cssReq: {
+				left: 		"auto" // DYNAMIC
+			,	right: 		"auto" // DYNAMIC
+			,	top: 		"auto" // DYNAMIC
+			,	bottom: 	"auto" // DYNAMIC
+			,	height: 	"auto"
+			,	width: 		"auto"
+			}
+		}
+	};
+
+
+	// DYNAMIC DATA
+	var state = {
+		// generate random 'ID#' to identify layout - used to create global namespace for timers
+		id:			Math.floor(Math.random() * 10000)
+	,	container:	{}
+	,	north:		{}
+	,	south:		{}
+	,	east:		{}
+	,	west:		{}
+	,	center:		{}
+	};
+
+
+	var 
+		altEdge = {
+			top:	"bottom"
+		,	bottom: "top"
+		,	left:	"right"
+		,	right:	"left"
+		}
+	,	altSide = {
+			north:	"south"
+		,	south:	"north"
+		,	east: 	"west"
+		,	west: 	"east"
+		}
+	;
+
+
+/*
+ * ###########################
+ *  INTERNAL HELPER FUNCTIONS
+ * ###########################
+ */
+
+	/**
+	 * isStr
+	 *
+	 * Returns true if passed param is EITHER a simple string OR a 'string object' - otherwise returns false
+	 */
+	var isStr = function (o) {
+		if (typeof o == "string")
+			return true;
+		else if (typeof o == "object") {
+			try {
+				var match = o.constructor.toString().match(/string/i); 
+				return (match !== null);
+			} catch (e) {} 
+		}
+		return false;
+	};
+
+	/**
+	 * str
+	 *
+	 * Returns a simple string if the passed param is EITHER a simple string OR a 'string object',
+	 *  else returns the original object
+	 */
+	var str = function (o) {
+		if (typeof o == "string" || isStr(o)) return $.trim(o); // trim converts 'String object' to a simple string
+		else return o;
+	};
+
+	/**
+	 * min / max
+	 *
+	 * Alias for Math.min/.max to simplify coding
+	 */
+	var min = function (x,y) { return Math.min(x,y); };
+	var max = function (x,y) { return Math.max(x,y); };
+
+	/**
+	 * transformData
+	 *
+	 * Processes the options passed in and transforms them into the format used by layout()
+	 * Missing keys are added, and converts the data if passed in 'flat-format' (no sub-keys)
+	 * In flat-format, pane-specific-settings are prefixed like: north__optName  (2-underscores)
+	 * To update effects, options MUST use nested-keys format, with an effects key
+	 *
+	 * @callers  initOptions()
+	 * @params  JSON  d  Data/options passed by user - may be a single level or nested levels
+	 * @returns JSON  Creates a data struture that perfectly matches 'options', ready to be imported
+	 */
+	var transformData = function (d) {
+		var json = { defaults:{fxSettings:{}}, north:{fxSettings:{}}, south:{fxSettings:{}}, east:{fxSettings:{}}, west:{fxSettings:{}}, center:{fxSettings:{}} };
+		d = d || {};
+		if (d.effects || d.defaults || d.north || d.south || d.west || d.east || d.center)
+			json = $.extend( json, d ); // already in json format - add to base keys
+		else
+			// convert 'flat' to 'nest-keys' format - also handles 'empty' user-options
+			$.each( d, function (key,val) {
+				a = key.split("__");
+				json[ a[1] ? a[0] : "defaults" ][ a[1] ? a[1] : a[0] ] = val;
+			});
+		return json;
+	};
+
+	/**
+	 * setFlowCallback
+	 *
+	 * Set an INTERNAL callback to avoid simultaneous animation
+	 * Runs only if needed and only if all callbacks are not 'already set'!
+	 *
+	 * @param String   action  Either 'open' or 'close'
+	 * @pane  String   pane    A valid border-pane name, eg 'west'
+	 * @pane  Boolean  param   Extra param for callback (optional)
+	 */
+	var setFlowCallback = function (action, pane, param) {
+		var
+			cb = action +","+ pane +","+ (param ? 1 : 0)
+		,	cP, cbPane
+		;
+		$.each(c.borderPanes.split(","), function (i,p) {
+			if (c[p].isMoving) {
+				bindCallback(p); // TRY to bind a callback
+				return false; // BREAK
+			}
+		});
+
+		function bindCallback (p, test) {
+			cP = c[p];
+			if (!cP.doCallback) {
+				cP.doCallback = true;
+				cP.callback = cb;
+			}
+			else { // try to 'chain' this callback
+				cpPane = cP.callback.split(",")[1]; // 2nd param is 'pane'
+				if (cpPane != p && cpPane != pane) // callback target NOT 'itself' and NOT 'this pane'
+					bindCallback (cpPane, true); // RECURSE
+			}
+		}
+	};
+
+	/**
+	 * execFlowCallback
+	 *
+	 * RUN the INTERNAL callback for this pane - if one exists
+	 *
+	 * @param String   action  Either 'open' or 'close'
+	 * @pane  String   pane    A valid border-pane name, eg 'west'
+	 * @pane  Boolean  param   Extra param for callback (optional)
+	 */
+	var execFlowCallback = function (pane) {
+		var cP = c[pane];
+
+		// RESET flow-control flaGs
+		c.isLayoutBusy = false;
+		delete cP.isMoving;
+		if (!cP.doCallback || !cP.callback) return;
+
+		cP.doCallback = false; // RESET logic flag
+
+		// EXECUTE the callback
+		var
+			cb = cP.callback.split(",")
+		,	param = (cb[2] > 0 ? true : false)
+		;
+		if (cb[0] == "open")
+			open( cb[1], param  );
+		else if (cb[0] == "close")
+			close( cb[1], param );
+
+		if (!cP.doCallback) cP.callback = null; // RESET - unless callback above enabled it again!
+	};
+
+	/**
+	 * execUserCallback
+	 *
+	 * Executes a Callback function after a trigger event, like resize, open or close
+	 *
+	 * @param String  pane   This is passed only so we can pass the 'pane object' to the callback
+	 * @param String  v_fn  Accepts a function name, OR a comma-delimited array: [0]=function name, [1]=argument
+	 */
+	var execUserCallback = function (pane, v_fn) {
+		if (!v_fn) return;
+		var fn;
+		try {
+			if (typeof v_fn == "function")
+				fn = v_fn;	
+			else if (typeof v_fn != "string")
+				return;
+			else if (v_fn.indexOf(",") > 0) {
+				// function name cannot contain a comma, so must be a function name AND a 'name' parameter
+				var
+					args = v_fn.split(",")
+				,	fn = eval(args[0])
+				;
+				if (typeof fn=="function" && args.length > 1)
+					return fn(args[1]); // pass the argument parsed from 'list'
+			}
+			else // just the name of an external function?
+				fn = eval(v_fn);
+
+			if (typeof fn=="function")
+				// pass data: pane-name, pane-element, pane-state, pane-options, and layout-name
+				return fn( pane, $Ps[pane], $.extend({},state[pane]), $.extend({},options[pane]), options.name );
+		}
+		catch (ex) {}
+	};
+
+	/**
+	 * cssNum
+	 *
+	 * Returns the 'current CSS value' for an element - returns 0 if property does not exist
+	 *
+	 * @callers  Called by many methods
+	 * @param jQuery  $Elem  Must pass a jQuery object - first element is processed
+	 * @param String  property  The name of the CSS property, eg: top, width, etc.
+	 * @returns Variant  Usually is used to get an integer value for position (top, left) or size (height, width)
+	 */
+	var cssNum = function ($E, prop) {
+		var
+			val = 0
+		,	hidden = false
+		,	visibility = ""
+		;
+		if (!$.browser.msie) { // IE CAN read dimensions of 'hidden' elements - FF CANNOT
+			if ($.curCSS($E[0], "display", true) == "none") {
+				hidden = true;
+				visibility = $.curCSS($E[0], "visibility", true); // SAVE current setting
+				$E.css({ display: "block", visibility: "hidden" }); // show element 'invisibly' so we can measure it
+			}
+		}
+
+		val = parseInt($.curCSS($E[0], prop, true), 10) || 0;
+
+		if (hidden) { // WAS hidden, so put back the way it was
+			$E.css({ display: "none" });
+			if (visibility && visibility != "hidden")
+				$E.css({ visibility: visibility }); // reset 'visibility'
+		}
+
+		return val;
+	};
+
+	/**
+	 * cssW / cssH / cssSize
+	 *
+	 * Contains logic to check boxModel & browser, and return the correct width/height for the current browser/doctype
+	 *
+	 * @callers  initPanes(), sizeMidPanes(), initHandles(), sizeHandles()
+	 * @param Variant  elem  Can accept a 'pane' (east, west, etc) OR a DOM object OR a jQuery object
+	 * @param Integer  outerWidth/outerHeight  (optional) Can pass a width, allowing calculations BEFORE element is resized
+	 * @returns Integer  Returns the innerHeight of the elem by subtracting padding and borders
+	 *
+	 * @TODO  May need to add additional logic to handle more browser/doctype variations?
+	 */
+	var cssW = function (e, outerWidth) {
+		var $E;
+		if (isStr(e)) {
+			e = str(e);
+			$E = $Ps[e];
+		}
+		else
+			$E = $(e);
+
+		// a 'calculated' outerHeight can be passed so borders and/or padding are removed if needed
+		if (outerWidth <= 0)
+			return 0;
+		else if (!(outerWidth>0))
+			outerWidth = isStr(e) ? getPaneSize(e) : $E.outerWidth();
+
+		if (!$.boxModel)
+			return outerWidth;
+
+		else // strip border and padding size from outerWidth to get CSS Width
+			return outerWidth
+				- cssNum($E, "paddingLeft")		
+				- cssNum($E, "paddingRight")
+				- ($.curCSS($E[0], "borderLeftStyle", true) == "none" ? 0 : cssNum($E, "borderLeftWidth"))
+				- ($.curCSS($E[0], "borderRightStyle", true) == "none" ? 0 : cssNum($E, "borderRightWidth"))
+			;
+	};
+	var cssH = function (e, outerHeight) {
+		var $E;
+		if (isStr(e)) {
+			e = str(e);
+			$E = $Ps[e];
+		}
+		else
+			$E = $(e);
+
+		// a 'calculated' outerHeight can be passed so borders and/or padding are removed if needed
+		if (outerHeight <= 0)
+			return 0;
+		else if (!(outerHeight>0))
+			outerHeight = (isStr(e)) ? getPaneSize(e) : $E.outerHeight();
+
+		if (!$.boxModel)
+			return outerHeight;
+
+		else // strip border and padding size from outerHeight to get CSS Height
+			return outerHeight
+				- cssNum($E, "paddingTop")
+				- cssNum($E, "paddingBottom")
+				- ($.curCSS($E[0], "borderTopStyle", true) == "none" ? 0 : cssNum($E, "borderTopWidth"))
+				- ($.curCSS($E[0], "borderBottomStyle", true) == "none" ? 0 : cssNum($E, "borderBottomWidth"))
+			;
+	};
+	var cssSize = function (pane, outerSize) {
+		if (c[pane].dir=="horz") // pane = north or south
+			return cssH(pane, outerSize);
+		else // pane = east or west
+			return cssW(pane, outerSize);
+	};
+
+	/**
+	 * getPaneSize
+	 *
+	 * Calculates the current 'size' (width or height) of a border-pane - optionally with 'pane spacing' added
+	 *
+	 * @returns Integer  Returns EITHER Width for east/west panes OR Height for north/south panes - adjusted for boxModel & browser
+	 */
+	var getPaneSize = function (pane, inclSpace) {
+		var 
+			$P	= $Ps[pane]
+		,	o	= options[pane]
+		,	s	= state[pane]
+		,	oSp	= (inclSpace ? o.spacing_open : 0)
+		,	cSp	= (inclSpace ? o.spacing_closed : 0)
+		;
+		if (!$P || s.isHidden)
+			return 0;
+		else if (s.isClosed || (s.isSliding && inclSpace))
+			return cSp;
+		else if (c[pane].dir == "horz")
+			return $P.outerHeight() + oSp;
+		else // dir == "vert"
+			return $P.outerWidth() + oSp;
+	};
+
+	var setPaneMinMaxSizes = function (pane) {
+		var 
+			d				= cDims
+		,	edge			= c[pane].edge
+		,	dir				= c[pane].dir
+		,	o				= options[pane]
+		,	s				= state[pane]
+		,	$P				= $Ps[pane]
+		,	$altPane		= $Ps[ altSide[pane] ]
+		,	paneSpacing		= o.spacing_open
+		,	altPaneSpacing	= options[ altSide[pane] ].spacing_open
+		,	altPaneSize		= (!$altPane ? 0 : (dir=="horz" ? $altPane.outerHeight() : $altPane.outerWidth()))
+		,	containerSize	= (dir=="horz" ? d.innerHeight : d.innerWidth)
+		//	limitSize prevents this pane from 'overlapping' opposite pane - even if opposite pane is currently closed
+		,	limitSize		= containerSize - paneSpacing - altPaneSize - altPaneSpacing
+		,	minSize			= s.minSize || 0
+		,	maxSize			= Math.min(s.maxSize || 9999, limitSize)
+		,	minPos, maxPos	// used to set resizing limits
+		;
+		switch (pane) {
+			case "north":	minPos = d.offsetTop + minSize;
+							maxPos = d.offsetTop + maxSize;
+							break;
+			case "west":	minPos = d.offsetLeft + minSize;
+							maxPos = d.offsetLeft + maxSize;
+							break;
+			case "south":	minPos = d.offsetTop + d.innerHeight - maxSize;
+							maxPos = d.offsetTop + d.innerHeight - minSize;
+							break;
+			case "east":	minPos = d.offsetLeft + d.innerWidth - maxSize;
+							maxPos = d.offsetLeft + d.innerWidth - minSize;
+							break;
+		}
+		// save data to pane-state
+		$.extend(s, { minSize: minSize, maxSize: maxSize, minPosition: minPos, maxPosition: maxPos });
+	};
+
+	/**
+	 * getPaneDims
+	 *
+	 * Returns data for setting the size/position of center pane. Date is also used to set Height for east/west panes
+	 *
+	 * @returns JSON  Returns a hash of all dimensions: top, bottom, left, right, (outer) width and (outer) height
+	 */
+	var getPaneDims = function () {
+		var d = {
+			top:	getPaneSize("north", true) // true = include 'spacing' value for p
+		,	bottom:	getPaneSize("south", true)
+		,	left:	getPaneSize("west", true)
+		,	right:	getPaneSize("east", true)
+		,	width:	0
+		,	height:	0
+		};
+
+		with (d) {
+			width 	= cDims.innerWidth - left - right;
+			height 	= cDims.innerHeight - bottom - top;
+			// now add the 'container border/padding' to get final positions - relative to the container
+			top		+= cDims.top;
+			bottom	+= cDims.bottom;
+			left	+= cDims.left;
+			right	+= cDims.right;
+		}
+
+		return d;
+	};
+
+
+	/**
+	 * getElemDims
+	 *
+	 * Returns data for setting size of an element (container or a pane).
+	 *
+	 * @callers  create(), onWindowResize() for container, plus others for pane
+	 * @returns JSON  Returns a hash of all dimensions: top, bottom, left, right, outerWidth, innerHeight, etc
+	 */
+	var getElemDims = function ($E) {
+		var
+			d = {} // dimensions hash
+		,	e, b, p // edge, border, padding
+		;
+
+		$.each("Left,Right,Top,Bottom".split(","), function () {
+			e = str(this);
+			b = d["border" +e] = cssNum($E, "border"+e+"Width");
+			p = d["padding"+e] = cssNum($E, "padding"+e);
+			d["offset" +e] = b + p; // total offset of content from outer edge
+			// if BOX MODEL, then 'position' = PADDING (ignore borderWidth)
+			if ($E == $Container)
+				d[e.toLowerCase()] = ($.boxModel ? p : 0); 
+		});
+
+		d.innerWidth  = d.outerWidth  = $E.outerWidth();
+		d.innerHeight = d.outerHeight = $E.outerHeight();
+		if ($.boxModel) {
+			d.innerWidth  -= (d.offsetLeft + d.offsetRight);
+			d.innerHeight -= (d.offsetTop  + d.offsetBottom);
+		}
+
+		return d;
+	};
+
+
+	var setTimer = function (pane, action, fn, ms) {
+		var
+			Layout = window.layout = window.layout || {}
+		,	Timers = Layout.timers = Layout.timers || {}
+		,	name = "layout_"+ state.id +"_"+ pane +"_"+ action // UNIQUE NAME for every layout-pane-action
+		;
+		if (Timers[name]) return; // timer already set!
+		else Timers[name] = setTimeout(fn, ms);
+	};
+
+	var clearTimer = function (pane, action) {
+		var
+			Layout = window.layout = window.layout || {}
+		,	Timers = Layout.timers = Layout.timers || {}
+		,	name = "layout_"+ state.id +"_"+ pane +"_"+ action // UNIQUE NAME for every layout-pane-action
+		;
+		if (Timers[name]) {
+			clearTimeout( Timers[name] );
+			delete Timers[name];
+			return true;
+		}
+		else
+			return false;
+	};
+
+
+/*
+ * ###########################
+ *   INITIALIZATION METHODS
+ * ###########################
+ */
+
+	/**
+	 * create
+	 *
+	 * Initialize the layout - called automatically whenever an instance of layout is created
+	 *
+	 * @callers  NEVER explicity called
+	 * @returns  An object pointer to the instance created
+	 */
+	var create = function () {
+		// initialize config/options
+		initOptions();
+
+		// initialize all objects
+		initContainer();	// set CSS as needed and init state.container dimensions
+		initPanes();		// size & position all panes
+		initHandles();		// create and position all resize bars & togglers buttons
+		initResizable();	// activate resizing on all panes where resizable=true
+		sizeContent("all");	// AFTER panes & handles have been initialized, size 'content' divs
+
+		if (options.scrollToBookmarkOnLoad)
+			with (self.location) if (hash) replace( hash ); // scrollTo Bookmark
+
+		// bind hotkey function - keyDown - if required
+		initHotkeys();
+
+		// bind resizeAll() for 'this layout instance' to window.resize event
+		$(window).resize(function () {
+			var timerID = "timerLayout_"+state.id;
+			if (window[timerID]) clearTimeout(window[timerID]);
+			window[timerID] = null;
+			if (true || $.browser.msie) // use a delay for IE because the resize event fires repeatly
+				window[timerID] = setTimeout(resizeAll, 100);
+			else // most other browsers have a built-in delay before firing the resize event
+				resizeAll(); // resize all layout elements NOW!
+		});
+	};
+
+	/**
+	 * initContainer
+	 *
+	 * Validate and initialize container CSS and events
+	 *
+	 * @callers  create()
+	 */
+	var initContainer = function () {
+		try { // format html/body if this is a full page layout
+			if ($Container[0].tagName == "BODY") {
+				$("html").css({
+					height:		"100%"
+				,	overflow:	"hidden"
+				});
+				$("body").css({
+					position:	"relative"
+				,	height:		"100%"
+				,	overflow:	"hidden"
+				,	margin:		0
+				,	padding:	0		// TODO: test whether body-padding could be handled?
+				,	border:		"none"	// a body-border creates problems because it cannot be measured!
+				});
+			}
+			else { // set required CSS - overflow and position
+				var
+					CSS	= { overflow: "hidden" } // make sure container will not 'scroll'
+				,	p	= $Container.css("position")
+				,	h	= $Container.css("height")
+				;
+				// if this is a NESTED layout, then outer-pane ALREADY has position and height
+				if (!$Container.hasClass("ui-layout-pane")) {
+					if (!p || "fixed,absolute,relative".indexOf(p) < 0)
+						CSS.position = "relative"; // container MUST have a 'position'
+					if (!h || h=="auto")
+						CSS.height = "100%"; // container MUST have a 'height'
+				}
+				$Container.css( CSS );
+			}
+		} catch (ex) {}
+
+		// get layout-container dimensions (updated when necessary)
+		cDims = state.container = getElemDims( $Container ); // update data-pointer too
+	};
+
+	/**
+	 * initHotkeys
+	 *
+	 * Bind layout hotkeys - if options enabled
+	 *
+	 * @callers  create()
+	 */
+	var initHotkeys = function () {
+		// bind keyDown to capture hotkeys, if option enabled for ANY pane
+		$.each(c.borderPanes.split(","), function (i,pane) {
+			var o = options[pane];
+			if (o.enableCursorHotkey || o.customHotkey) {
+				$(document).keydown( keyDown ); // only need to bind this ONCE
+				return false; // BREAK - binding was done
+			}
+		});
+	};
+
+	/**
+	 * initOptions
+	 *
+	 * Build final CONFIG and OPTIONS data
+	 *
+	 * @callers  create()
+	 */
+	var initOptions = function () {
+		// simplify logic by making sure passed 'opts' var has basic keys
+		opts = transformData( opts );
+
+		// update default effects, if case user passed key
+		if (opts.effects) {
+			$.extend( effects, opts.effects );
+			delete opts.effects;
+		}
+
+		// see if any 'global options' were specified
+		$.each("name,scrollToBookmarkOnLoad".split(","), function (idx,key) {
+			if (opts[key] !== undefined)
+				options[key] = opts[key];
+			else if (opts.defaults[key] !== undefined) {
+				options[key] = opts.defaults[key];
+				delete opts.defaults[key];
+			}
+		});
+
+		// remove any 'defaults' that MUST be set 'per-pane'
+		$.each("paneSelector,resizerCursor,customHotkey".split(","),
+			function (idx,key) { delete opts.defaults[key]; } // is OK if key does not exist
+		);
+
+		// now update options.defaults
+		$.extend( options.defaults, opts.defaults );
+		// make sure required sub-keys exist
+		//if (typeof options.defaults.fxSettings != "object") options.defaults.fxSettings = {};
+
+		// merge all config & options for the 'center' pane
+		c.center = $.extend( true, {}, c.defaults, c.center );
+		$.extend( options.center, opts.center );
+		// Most 'default options' do not apply to 'center', so add only those that DO
+		var o_Center = $.extend( true, {}, options.defaults, opts.defaults, options.center ); // TEMP data
+		$.each("paneClass,contentSelector,contentIgnoreSelector,applyDefaultStyles,showOverflowOnHover".split(","),
+			function (idx,key) { options.center[key] = o_Center[key]; }
+		);
+
+		var defs = options.defaults;
+
+		// create a COMPLETE set of options for EACH border-pane
+		$.each(c.borderPanes.split(","), function(i,pane) {
+			// apply 'pane-defaults' to CONFIG.PANE
+			c[pane] = $.extend( true, {}, c.defaults, c[pane] );
+			// apply 'pane-defaults' +  user-options to OPTIONS.PANE
+			o = options[pane] = $.extend( true, {}, options.defaults, options[pane], opts.defaults, opts[pane] );
+
+			// make sure we have base-classes
+			if (!o.paneClass)		o.paneClass		= defaults.paneClass;
+			if (!o.resizerClass)	o.resizerClass	= defaults.resizerClass;
+			if (!o.togglerClass)	o.togglerClass	= defaults.togglerClass;
+
+			// create FINAL fx options for each pane, ie: options.PANE.fxName/fxSpeed/fxSettings[_open|_close]
+			$.each(["_open","_close",""], function (i,n) { 
+				var
+					sName		= "fxName"+n
+				,	sSpeed		= "fxSpeed"+n
+				,	sSettings	= "fxSettings"+n
+				;
+				// recalculate fxName according to specificity rules
+				o[sName] =
+					opts[pane][sName]		// opts.west.fxName_open
+				||	opts[pane].fxName		// opts.west.fxName
+				||	opts.defaults[sName]	// opts.defaults.fxName_open
+				||	opts.defaults.fxName	// opts.defaults.fxName
+				||	o[sName]				// options.west.fxName_open
+				||	o.fxName				// options.west.fxName
+				||	defs[sName]				// options.defaults.fxName_open
+				||	defs.fxName				// options.defaults.fxName
+				||	"none"
+				;
+				// validate fxName to be sure is a valid effect
+				var fxName = o[sName];
+				if (fxName == "none" || !$.effects || !$.effects[fxName] || (!effects[fxName] && !o[sSettings] && !o.fxSettings))
+					fxName = o[sName] = "none"; // effect not loaded, OR undefined FX AND fxSettings not passed
+				// set vars for effects subkeys to simplify logic
+				var
+					fx = effects[fxName]	|| {} // effects.slide
+				,	fx_all	= fx.all		|| {} // effects.slide.all
+				,	fx_pane	= fx[pane]		|| {} // effects.slide.west
+				;
+				// RECREATE the fxSettings[_open|_close] keys using specificity rules
+				o[sSettings] = $.extend(
+					{}
+				,	fx_all						// effects.slide.all
+				,	fx_pane						// effects.slide.west
+				,	defs.fxSettings || {}		// options.defaults.fxSettings
+				,	defs[sSettings] || {}		// options.defaults.fxSettings_open
+				,	o.fxSettings				// options.west.fxSettings
+				,	o[sSettings]				// options.west.fxSettings_open
+				,	opts.defaults.fxSettings	// opts.defaults.fxSettings
+				,	opts.defaults[sSettings] || {} // opts.defaults.fxSettings_open
+				,	opts[pane].fxSettings		// opts.west.fxSettings
+				,	opts[pane][sSettings] || {}	// opts.west.fxSettings_open
+				);
+				// recalculate fxSpeed according to specificity rules
+				o[sSpeed] =
+					opts[pane][sSpeed]		// opts.west.fxSpeed_open
+				||	opts[pane].fxSpeed		// opts.west.fxSpeed (pane-default)
+				||	opts.defaults[sSpeed]	// opts.defaults.fxSpeed_open
+				||	opts.defaults.fxSpeed	// opts.defaults.fxSpeed
+				||	o[sSpeed]				// options.west.fxSpeed_open
+				||	o[sSettings].duration	// options.west.fxSettings_open.duration
+				||	o.fxSpeed				// options.west.fxSpeed
+				||	o.fxSettings.duration	// options.west.fxSettings.duration
+				||	defs.fxSpeed			// options.defaults.fxSpeed
+				||	defs.fxSettings.duration// options.defaults.fxSettings.duration
+				||	fx_pane.duration		// effects.slide.west.duration
+				||	fx_all.duration			// effects.slide.all.duration
+				||	"normal"				// DEFAULT
+				;
+				// DEBUG: if (pane=="east") debugData( $.extend({}, {speed: o[sSpeed], fxSettings_duration: o[sSettings].duration}, o[sSettings]), pane+"."+sName+" = "+fxName );
+			});
+		});
+	};
+
+	/**
+	 * initPanes
+	 *
+	 * Initialize module objects, styling, size and position for all panes
+	 *
+	 * @callers  create()
+	 */
+	var initPanes = function () {
+		// NOTE: do north & south FIRST so we can measure their height - do center LAST
+		$.each(c.allPanes.split(","), function() {
+			var 
+				pane	= str(this)
+			,	o		= options[pane]
+			,	s		= state[pane]
+			,	fx		= s.fx
+			,	dir		= c[pane].dir
+			//	if o.size is not > 0, then we will use MEASURE the pane and use that as it's 'size'
+			,	size	= o.size=="auto" || isNaN(o.size) ? 0 : o.size
+			,	minSize	= o.minSize || 1
+			,	maxSize	= o.maxSize || 9999
+			,	spacing	= o.spacing_open || 0
+			,	sel		= o.paneSelector
+			,	isIE6	= ($.browser.msie && $.browser.version < 7)
+			,	CSS		= {}
+			,	$P, $C
+			;
+			$Cs[pane] = false; // init
+
+			if (sel.substr(0,1)==="#") // ID selector
+				// NOTE: elements selected 'by ID' DO NOT have to be 'children'
+				$P = $Ps[pane] = $Container.find(sel+":first");
+			else { // class or other selector
+				$P = $Ps[pane] = $Container.children(sel+":first");
+				// look for the pane nested inside a 'form' element
+				if (!$P.length) $P = $Ps[pane] = $Container.children("form:first").children(sel+":first");
+			}
+
+			if (!$P.length) {
+				$Ps[pane] = false; // logic
+				return true; // SKIP to next
+			}
+
+			// add basic classes & attributes
+			$P
+				.attr("pane", pane) // add pane-identifier
+				.addClass( o.paneClass +" "+ o.paneClass+"-"+pane ) // default = "ui-layout-pane ui-layout-pane-west" - may be a dupe of 'paneSelector'
+			;
+
+			// init pane-logic vars, etc.
+			if (pane != "center") {
+				s.isClosed  = false; // true = pane is closed
+				s.isSliding = false; // true = pane is currently open by 'sliding' over adjacent panes
+				s.isResizing= false; // true = pane is in process of being resized
+				s.isHidden	= false; // true = pane is hidden - no spacing, resizer or toggler is visible!
+				s.noRoom	= false; // true = pane 'automatically' hidden due to insufficient room - will unhide automatically
+				// create special keys for internal use
+				c[pane].pins = [];   // used to track and sync 'pin-buttons' for border-panes
+			}
+
+			CSS = $.extend({ visibility: "visible", display: "block" }, c.defaults.cssReq, c[pane].cssReq );
+			if (o.applyDefaultStyles) $.extend( CSS, c.defaults.cssDef, c[pane].cssDef ); // cosmetic defaults
+			$P.css(CSS); // add base-css BEFORE 'measuring' to calc size & position
+			CSS = {};	// reset var
+
+			// set css-position to account for container borders & padding
+			switch (pane) {
+				case "north": 	CSS.top 	= cDims.top;
+								CSS.left 	= cDims.left;
+								CSS.right	= cDims.right;
+								break;
+				case "south": 	CSS.bottom	= cDims.bottom;
+								CSS.left 	= cDims.left;
+								CSS.right 	= cDims.right;
+								break;
+				case "west": 	CSS.left 	= cDims.left; // top, bottom & height set by sizeMidPanes()
+								break;
+				case "east": 	CSS.right 	= cDims.right; // ditto
+								break;
+				case "center":	// top, left, width & height set by sizeMidPanes()
+			}
+
+			if (dir == "horz") { // north or south pane
+				if (size === 0 || size == "auto") {
+					$P.css({ height: "auto" });
+					size = $P.outerHeight();
+				}
+				size = max(size, minSize);
+				size = min(size, maxSize);
+				size = min(size, cDims.innerHeight - spacing);
+				CSS.height = max(1, cssH(pane, size));
+				s.size = size; // update state
+				// make sure minSize is sufficient to avoid errors
+				s.maxSize = maxSize; // init value
+				s.minSize = max(minSize, size - CSS.height + 1); // = pane.outerHeight when css.height = 1px
+				// handle IE6
+				//if (isIE6) CSS.width = cssW($P, cDims.innerWidth);
+				$P.css(CSS); // apply size & position
+			}
+			else if (dir == "vert") { // east or west pane
+				if (size === 0 || size == "auto") {
+					$P.css({ width: "auto", float: "left" }); // float = FORCE pane to auto-size
+					size = $P.outerWidth();
+					$P.css({ float: "none" }); // RESET
+				}
+				size = max(size, minSize);
+				size = min(size, maxSize);
+				size = min(size, cDims.innerWidth - spacing);
+				CSS.width = max(1, cssW(pane, size));
+				s.size = size; // update state
+				s.maxSize = maxSize; // init value
+				// make sure minSize is sufficient to avoid errors
+				s.minSize = max(minSize, size - CSS.width + 1); // = pane.outerWidth when css.width = 1px
+				$P.css(CSS); // apply size - top, bottom & height set by sizeMidPanes
+				sizeMidPanes(pane, null, true); // true = onInit
+			}
+			else if (pane == "center") {
+				$P.css(CSS); // top, left, width & height set by sizeMidPanes...
+				sizeMidPanes("center", null, true); // true = onInit
+			}
+
+			// close or hide the pane if specified in settings
+			if (o.initClosed && o.closable) {
+				$P.hide().addClass("closed");
+				s.isClosed = true;
+			}
+			else if (o.initHidden || o.initClosed) {
+				hide(pane, true); // will be completely invisible - no resizer or spacing
+				s.isHidden = true;
+			}
+			else
+				$P.addClass("open");
+
+			// check option for auto-handling of pop-ups & drop-downs
+			if (o.showOverflowOnHover)
+				$P.hover( allowOverflow, resetOverflow );
+
+			/*
+			 *	see if this pane has a 'content element' that we need to auto-size
+			 */
+			if (o.contentSelector) {
+				$C = $Cs[pane] = $P.children(o.contentSelector+":first"); // match 1-element only
+				if (!$C.length) {
+					$Cs[pane] = false;
+					return true; // SKIP to next
+				}
+				$C.css( c.content.cssReq );
+				if (o.applyDefaultStyles) $C.css( c.content.cssDef ); // cosmetic defaults
+				// NO PANE-SCROLLING when there is a content-div
+				$P.css({ overflow: "hidden" });
+			}
+		});
+	};
+
+	/**
+	 * initHandles
+	 *
+	 * Initialize module objects, styling, size and position for all resize bars and toggler buttons
+	 *
+	 * @callers  create()
+	 */
+	var initHandles = function () {
+		// create toggler DIVs for each pane, and set object pointers for them, eg: $R.north = north toggler DIV
+		$.each(c.borderPanes.split(","), function() {
+			var 
+				pane	= str(this)
+			,	o		= options[pane]
+			,	s		= state[pane]
+			,	rClass	= o.resizerClass
+			,	tClass	= o.togglerClass
+			,	$P		= $Ps[pane]
+			;
+			$Rs[pane] = false; // INIT
+			$Ts[pane] = false;
+
+			if (!$P || (!o.closable && !o.resizable)) return; // pane does not exist - skip
+
+			var 
+				edge	= c[pane].edge
+			,	isOpen	= $P.is(":visible")
+			,	spacing	= (isOpen ? o.spacing_open : o.spacing_closed)
+			,	_pane	= "-"+ pane // used for classNames
+			,	_state	= (isOpen ? "-open" : "-closed") // used for classNames
+			,	$R, $T
+			;
+			// INIT RESIZER BAR
+			$R = $Rs[pane] = $("<span></span>");
+	
+			if (isOpen && o.resizable)
+				; // this is handled by initResizable
+			else if (!isOpen && o.slidable)
+				$R.attr("title", o.sliderTip).css("cursor", o.sliderCursor);
+	
+			$R
+				// if paneSelector is an ID, then create a matching ID for the resizer, eg: "#paneLeft" => "paneLeft-resizer"
+				.attr("id", (o.paneSelector.substr(0,1)=="#" ? o.paneSelector.substr(1) + "-resizer" : ""))
+				.attr("resizer", pane) // so we can read this from the resizer
+				.css(c.resizers.cssReq) // add base/required styles
+				// POSITION of resizer bar - allow for container border & padding
+				.css(edge, cDims[edge] + getPaneSize(pane))
+				// ADD CLASSNAMES - eg: class="resizer resizer-west resizer-open"
+				.addClass( rClass +" "+ rClass+_pane +" "+ rClass+_state +" "+ rClass+_pane+_state )
+				.appendTo($Container) // append DIV to container
+			;
+			 // ADD VISUAL STYLES
+			if (o.applyDefaultStyles)
+				$R.css(c.resizers.cssDef);
+
+			if (o.closable) {
+				// INIT COLLAPSER BUTTON
+				$T = $Ts[pane] = $("<div></div>");
+				$T
+					// if paneSelector is an ID, then create a matching ID for the resizer, eg: "#paneLeft" => "paneLeft-toggler"
+					.attr("id", (o.paneSelector.substr(0,1)=="#" ? o.paneSelector.substr(1) + "-toggler" : ""))
+					.css(c.togglers.cssReq) // add base/required styles
+					.attr("title", (isOpen ? o.togglerTip_open : o.togglerTip_closed))
+					.click(function(evt){ toggle(pane); evt.stopPropagation(); })
+					.mouseover(function(evt){ evt.stopPropagation(); }) // prevent resizer event
+					// ADD CLASSNAMES - eg: class="toggler toggler-west toggler-west-open"
+					.addClass( tClass +" "+ tClass+_pane +" "+ tClass+_state +" "+ tClass+_pane+_state )
+					.appendTo($R) // append SPAN to resizer DIV
+				;
+
+				// ADD INNER-SPANS TO TOGGLER
+				if (o.togglerContent_open) // ui-layout-open
+					$("<span>"+ o.togglerContent_open +"</span>")
+						.addClass("content content-open")
+						.css("display", s.isClosed ? "none" : "block")
+						.appendTo( $T )
+					;
+				if (o.togglerContent_closed) // ui-layout-closed
+					$("<span>"+ o.togglerContent_closed +"</span>")
+						.addClass("content content-closed")
+						.css("display", s.isClosed ? "block" : "none")
+						.appendTo( $T )
+					;
+
+				 // ADD BASIC VISUAL STYLES
+				if (o.applyDefaultStyles)
+					$T.css(c.togglers.cssDef);
+
+				if (!isOpen) bindStartSlidingEvent(pane, true); // will enable if state.PANE.isSliding = true
+			}
+
+		});
+
+		// SET ALL HANDLE SIZES & LENGTHS
+		sizeHandles("all", true); // true = onInit
+	};
+
+	/**
+	 * initResizable
+	 *
+	 * Add resize-bars to all panes that specify it in options
+	 *
+	 * @dependancies  $.fn.resizable - will abort if not found
+	 * @callers  create()
+	 */
+	var initResizable = function () {
+		var
+			draggingAvailable = (typeof $.fn.draggable == "function")
+		,	minPosition, maxPosition, edge // set in start()
+		;
+
+		$.each(c.borderPanes.split(","), function() {
+			var 
+				pane	= str(this)
+			,	o		= options[pane]
+			,	s		= state[pane]
+			;
+			if (!draggingAvailable || !$Ps[pane] || !o.resizable) {
+				o.resizable = false;
+				return true; // skip to next
+			}
+
+			var 
+				rClass				= o.resizerClass
+			//	'drag' classes are applied to the ORIGINAL resizer-bar while dragging is in process
+			,	dragClass			= rClass+"-drag"			// resizer-drag
+			,	dragPaneClass		= rClass+"-"+pane+"-drag"	// resizer-north-drag
+			//	'dragging' class is applied to the CLONED resizer-bar while it is being dragged
+			,	draggingClass		= rClass+"-dragging"		// resizer-dragging
+			,	draggingPaneClass	= rClass+"-"+pane+"-dragging" // resizer-north-dragging
+			,	draggingClassSet	= false 					// logic var
+			,	$P 					= $Ps[pane]
+			,	$R					= $Rs[pane]
+			;
+
+			if (!s.isClosed)
+				$R
+					.attr("title", o.resizerTip)
+					.css("cursor", o.resizerCursor) // n-resize, s-resize, etc
+				;
+
+			$R.draggable({
+				containment:	$Container[0] // limit resizing to layout container
+			,	axis:			(c[pane].dir=="horz" ? "y" : "x") // limit resizing to horz or vert axis
+			,	delay:			200
+			,	distance:		1
+			//	basic format for helper - style it using class: .ui-draggable-dragging
+			,	helper:			"clone"
+			,	opacity:		o.resizerDragOpacity
+			//,	iframeFix:		o.draggableIframeFix // TODO: consider using when bug is fixed
+			,	zIndex:			c.zIndex.resizing
+
+			,	start: function (e, ui) {
+					// onresize_start callback - will CANCEL hide if returns false
+					// TODO: CONFIRM that dragging can be cancelled like this???
+					if (false === execUserCallback(pane, o.onresize_start)) return false;
+
+					s.isResizing = true; // prevent pane from closing while resizing
+					clearTimer(pane, "closeSlider"); // just in case already triggered
+
+					$R.addClass( dragClass +" "+ dragPaneClass ); // add drag classes
+					draggingClassSet = false; // reset logic var - see drag()
+
+					// SET RESIZING LIMITS - used in drag()
+					var resizerWidth = (pane=="east" || pane=="south" ? o.spacing_open : 0);
+					setPaneMinMaxSizes(pane); // update pane-state
+					s.minPosition -= resizerWidth;
+					s.maxPosition -= resizerWidth;
+					edge = (c[pane].dir=="horz" ? "top" : "left");
+
+					// MASK PANES WITH IFRAMES OR OTHER TROUBLESOME ELEMENTS
+					$(o.maskIframesOnResize === true ? "iframe" : o.maskIframesOnResize).each(function() {					
+						$('<div class="ui-layout-mask"/>')
+							.css({
+								background:	"#fff"
+							,	opacity:	"0.001"
+							,	zIndex:		9
+							,	position:	"absolute"
+							,	width:		this.offsetWidth+"px"
+							,	height:		this.offsetHeight+"px"
+							})
+							.css($(this).offset()) // top & left
+							.appendTo(this.parentNode) // put div INSIDE pane to avoid zIndex issues
+						;
+					});
+				}
+
+			,	drag: function (e, ui) {
+					if (!draggingClassSet) { // can only add classes after clone has been added to the DOM
+						$(".ui-draggable-dragging")
+							.addClass( draggingClass +" "+ draggingPaneClass ) // add dragging classes
+							.children().css("visibility","hidden") // hide toggler inside dragged resizer-bar
+						;
+						draggingClassSet = true;
+						// draggable bug!? RE-SET zIndex to prevent E/W resize-bar showing through N/S pane!
+						if (s.isSliding) $Ps[pane].css("zIndex", c.zIndex.sliding);
+					}
+					// CONTAIN RESIZER-BAR TO RESIZING LIMITS
+					if		(ui.position[edge] < s.minPosition) ui.position[edge] = s.minPosition;
+					else if (ui.position[edge] > s.maxPosition) ui.position[edge] = s.maxPosition;
+				}
+
+			,	stop: function (e, ui) {
+					var 
+						dragPos	= ui.position
+					,	resizerPos
+					,	newSize
+					;
+					$R.removeClass( dragClass +" "+ dragPaneClass ); // remove drag classes
+	
+					switch (pane) {
+						case "north":	resizerPos = dragPos.top; break;
+						case "west":	resizerPos = dragPos.left; break;
+						case "south":	resizerPos = cDims.outerHeight - dragPos.top - $R.outerHeight(); break;
+						case "east":	resizerPos = cDims.outerWidth - dragPos.left - $R.outerWidth(); break;
+					}
+					// remove container margin from resizer position to get the pane size
+					newSize = resizerPos - cDims[ c[pane].edge ];
+
+					sizePane(pane, newSize);
+
+					// UN-MASK PANES MASKED IN drag.start
+					$("div.ui-layout-mask").remove(); // Remove iframe masks	
+
+					s.isResizing = false;
+				}
+
+			});
+		});
+	};
+
+
+
+/*
+ * ###########################
+ *       ACTION METHODS
+ * ###########################
+ */
+
+	/**
+	 * hide / show
+	 *
+	 * Completely 'hides' a pane, including its spacing - as if it does not exist
+	 * The pane is not actually 'removed' from the source, so can use 'show' to un-hide it
+	 *
+	 * @param String  pane   The pane being hidden, ie: north, south, east, or west
+	 */
+	var hide = function (pane, onInit) {
+		var
+			o	= options[pane]
+		,	s	= state[pane]
+		,	$P	= $Ps[pane]
+		,	$R	= $Rs[pane]
+		;
+		if (!$P || s.isHidden) return; // pane does not exist OR is already hidden
+
+		// onhide_start callback - will CANCEL hide if returns false
+		if (false === execUserCallback(pane, o.onhide_start)) return;
+
+		s.isSliding = false; // just in case
+
+		// now hide the elements
+		if ($R) $R.hide(); // hide resizer-bar
+		if (onInit || s.isClosed) {
+			s.isClosed = true; // to trigger open-animation on show()
+			s.isHidden  = true;
+			$P.hide(); // no animation when loading page
+			sizeMidPanes(c[pane].dir == "horz" ? "all" : "center");
+			execUserCallback(pane, o.onhide_end || o.onhide);
+		}
+		else {
+			s.isHiding = true; // used by onclose
+			close(pane, false); // adjust all panes to fit
+			//s.isHidden  = true; - will be set by close - if not cancelled
+		}
+	};
+
+	var show = function (pane, openPane) {
+		var
+			o	= options[pane]
+		,	s	= state[pane]
+		,	$P	= $Ps[pane]
+		,	$R	= $Rs[pane]
+		;
+		if (!$P || !s.isHidden) return; // pane does not exist OR is not hidden
+
+		// onhide_start callback - will CANCEL hide if returns false
+		if (false === execUserCallback(pane, o.onshow_start)) return;
+
+		s.isSliding = false; // just in case
+		s.isShowing = true; // used by onopen/onclose
+		//s.isHidden  = false; - will be set by open/close - if not cancelled
+
+		// now show the elements
+		if ($R && o.spacing_open > 0) $R.show();
+		if (openPane === false)
+			close(pane, true); // true = force
+		else
+			open(pane); // adjust all panes to fit
+	};
+
+
+	/**
+	 * toggle
+	 *
+	 * Toggles a pane open/closed by calling either open or close
+	 *
+	 * @param String  pane   The pane being toggled, ie: north, south, east, or west
+	 */
+	var toggle = function (pane) {
+		var s = state[pane];
+		if (s.isHidden)
+			show(pane); // will call 'open' after unhiding it
+		else if (s.isClosed)
+			open(pane);
+		else
+			close(pane);
+	};
+
+	/**
+	 * close
+	 *
+	 * Close the specified pane (animation optional), and resize all other panes as needed
+	 *
+	 * @param String  pane   The pane being closed, ie: north, south, east, or west
+	 */
+	var close = function (pane, force, noAnimation) {
+		var 
+			$P		= $Ps[pane]
+		,	$R		= $Rs[pane]
+		,	$T		= $Ts[pane]
+		,	o		= options[pane]
+		,	s		= state[pane]
+		,	doFX	= !noAnimation && !s.isClosed && (o.fxName_close != "none")
+		,	edge	= c[pane].edge
+		,	rClass	= o.resizerClass
+		,	tClass	= o.togglerClass
+		,	_pane	= "-"+ pane // used for classNames
+		,	_open	= "-open"
+		,	_sliding= "-sliding"
+		,	_closed	= "-closed"
+		// 	transfer logic vars to temp vars
+		,	isShowing = s.isShowing
+		,	isHiding = s.isHiding
+		;
+		// now clear the logic vars
+		delete s.isShowing;
+		delete s.isHiding;
+
+		if (!$P || (!o.resizable && !o.closable)) return; // invalid request
+		else if (!force && s.isClosed && !isShowing) return; // already closed
+
+		if (c.isLayoutBusy) { // layout is 'busy' - probably with an animation
+			setFlowCallback("close", pane, force); // set a callback for this action, if possible
+			return; // ABORT 
+		}
+
+		// onclose_start callback - will CANCEL hide if returns false
+		// SKIP if just 'showing' a hidden pane as 'closed'
+		if (!isShowing && false === execUserCallback(pane, o.onclose_start)) return;
+
+		// SET flow-control flags
+		c[pane].isMoving = true;
+		c.isLayoutBusy = true;
+
+		s.isClosed = true;
+		// update isHidden BEFORE sizing panes
+		if (isHiding) s.isHidden = true;
+		else if (isShowing) s.isHidden = false;
+
+		// sync any 'pin buttons'
+		syncPinBtns(pane, false);
+
+		// resize panes adjacent to this one
+		if (!s.isSliding) sizeMidPanes(c[pane].dir == "horz" ? "all" : "center");
+
+		// if this pane has a resizer bar, move it now
+		if ($R) {
+			$R
+				.css(edge, cDims[edge]) // move the resizer bar
+				.removeClass( rClass+_open +" "+ rClass+_pane+_open )
+				.removeClass( rClass+_sliding +" "+ rClass+_pane+_sliding )
+				.addClass( rClass+_closed +" "+ rClass+_pane+_closed )
+			;
+			// DISABLE 'resizing' when closed - do this BEFORE bindStartSlidingEvent
+			if (o.resizable)
+				$R
+					.draggable("disable")
+					.css("cursor", "default")
+					.attr("title","")
+				;
+			// if pane has a toggler button, adjust that too
+			if ($T) {
+				$T
+					.removeClass( tClass+_open +" "+ tClass+_pane+_open )
+					.addClass( tClass+_closed +" "+ tClass+_pane+_closed )
+					.attr("title", o.togglerTip_closed) // may be blank
+				;
+			}
+			sizeHandles(); // resize 'length' and position togglers for adjacent panes
+		}
+
+		// ANIMATE 'CLOSE' - if no animation, then was ALREADY shown above
+		if (doFX) {
+			lockPaneForFX(pane, true); // need to set left/top so animation will work
+			$P.hide( o.fxName_close, o.fxSettings_close, o.fxSpeed_close, function () {
+				lockPaneForFX(pane, false); // undo
+				if (!s.isClosed) return; // pane was opened before animation finished!
+				close_2();
+			});
+		}
+		else {
+			$P.hide(); // just hide pane NOW
+			close_2();
+		}
+
+		// SUBROUTINE
+		function close_2 () {
+			bindStartSlidingEvent(pane, true); // will enable if state.PANE.isSliding = true
+
+			// onclose callback - UNLESS just 'showing' a hidden pane as 'closed'
+			if (!isShowing)	execUserCallback(pane, o.onclose_end || o.onclose);
+			// onhide OR onshow callback
+			if (isShowing)	execUserCallback(pane, o.onshow_end || o.onshow);
+			if (isHiding)	execUserCallback(pane, o.onhide_end || o.onhide);
+
+			// internal flow-control callback
+			execFlowCallback(pane);
+		}
+	};
+
+	/**
+	 * open
+	 *
+	 * Open the specified pane (animation optional), and resize all other panes as needed
+	 *
+	 * @param String  pane   The pane being opened, ie: north, south, east, or west
+	 */
+	var open = function (pane, slide, noAnimation) {
+		var 
+			$P		= $Ps[pane]
+		,	$R		= $Rs[pane]
+		,	$T		= $Ts[pane]
+		,	o		= options[pane]
+		,	s		= state[pane]
+		,	doFX	= !noAnimation && s.isClosed && (o.fxName_open != "none")
+		,	edge	= c[pane].edge
+		,	rClass	= o.resizerClass
+		,	tClass	= o.togglerClass
+		,	_pane	= "-"+ pane // used for classNames
+		,	_open	= "-open"
+		,	_closed	= "-closed"
+		,	_sliding= "-sliding"
+		// 	transfer logic var to temp var
+		,	isShowing = s.isShowing
+		;
+		// now clear the logic var
+		delete s.isShowing;
+
+		if (!$P || (!o.resizable && !o.closable)) return; // invalid request
+		else if (!s.isClosed && !s.isSliding) return; // already open
+
+		// pane can ALSO be unhidden by just calling show(), so handle this scenario
+		if (s.isHidden && !isShowing) {
+			show(pane, true);
+			return;
+		}
+
+		if (c.isLayoutBusy) { // layout is 'busy' - probably with an animation
+			setFlowCallback("open", pane, slide); // set a callback for this action, if possible
+			return; // ABORT
+		}
+
+		// onopen_start callback - will CANCEL hide if returns false
+		if (false === execUserCallback(pane, o.onopen_start)) return;
+
+		// SET flow-control flags
+		c[pane].isMoving = true;
+		c.isLayoutBusy = true;
+
+		// 'PIN PANE' - stop sliding
+		if (s.isSliding && !slide) // !slide = 'open pane normally' - NOT sliding
+			bindStopSlidingEvents(pane, false); // will set isSliding=false
+
+		s.isClosed = false;
+		// update isHidden BEFORE sizing panes
+		if (isShowing) s.isHidden = false;
+
+		// Container size may have changed - shrink the pane if now 'too big'
+		setPaneMinMaxSizes(pane); // update pane-state
+		if (s.size > s.maxSize) // pane is too big! resize it before opening
+			$P.css( c[pane].sizeType, max(1, cssSize(pane, s.maxSize)) );
+
+		bindStartSlidingEvent(pane, false); // remove trigger event from resizer-bar
+
+		if (doFX) { // ANIMATE
+			lockPaneForFX(pane, true); // need to set left/top so animation will work
+			$P.show( o.fxName_open, o.fxSettings_open, o.fxSpeed_open, function() {
+				lockPaneForFX(pane, false); // undo
+				if (s.isClosed) return; // pane was closed before animation finished!
+				open_2(); // continue
+			});
+		}
+		else {// no animation
+			$P.show();	// just show pane and...
+			open_2();	// continue
+		}
+
+		// SUBROUTINE
+		function open_2 () {
+			// NOTE: if isSliding, then other panes are NOT 'resized'
+			if (!s.isSliding) // resize all panes adjacent to this one
+				sizeMidPanes(c[pane].dir=="vert" ? "center" : "all");
+
+			// if this pane has a toggler, move it now
+			if ($R) {
+				$R
+					.css(edge, cDims[edge] + getPaneSize(pane)) // move the toggler
+					.removeClass( rClass+_closed +" "+ rClass+_pane+_closed )
+					.addClass( rClass+_open +" "+ rClass+_pane+_open )
+					.addClass( !s.isSliding ? "" : rClass+_sliding +" "+ rClass+_pane+_sliding )
+				;
+				if (o.resizable)
+					$R
+						.draggable("enable")
+						.css("cursor", o.resizerCursor)
+						.attr("title", o.resizerTip)
+					;
+				else
+					$R.css("cursor", "default"); // n-resize, s-resize, etc
+				// if pane also has a toggler button, adjust that too
+				if ($T) {
+					$T
+						.removeClass( tClass+_closed +" "+ tClass+_pane+_closed )
+						.addClass( tClass+_open +" "+ tClass+_pane+_open )
+						.attr("title", o.togglerTip_open) // may be blank
+					;
+				}
+				sizeHandles("all"); // resize resizer & toggler sizes for all panes
+			}
+
+			// resize content every time pane opens - to be sure
+			sizeContent(pane);
+
+			// sync any 'pin buttons'
+			syncPinBtns(pane, !s.isSliding);
+
+			// onopen callback
+			execUserCallback(pane, o.onopen_end || o.onopen);
+
+			// onshow callback
+			if (isShowing) execUserCallback(pane, o.onshow_end || o.onshow);
+
+			// internal flow-control callback
+			execFlowCallback(pane);
+		}
+	};
+	
+
+	/**
+	 * lockPaneForFX
+	 *
+	 * Must set left/top on East/South panes so animation will work properly
+	 *
+	 * @param String  pane  The pane to lock, 'east' or 'south' - any other is ignored!
+	 * @param Boolean  doLock  true = set left/top, false = remove
+	 */
+	var lockPaneForFX = function (pane, doLock) {
+		var $P = $Ps[pane];
+		if (doLock) {
+			$P.css({ zIndex: c.zIndex.animation }); // overlay all elements during animation
+			if (pane=="south")
+				$P.css({ top: cDims.top + cDims.innerHeight - $P.outerHeight() });
+			else if (pane=="east")
+				$P.css({ left: cDims.left + cDims.innerWidth - $P.outerWidth() });
+		}
+		else {
+			if (!state[pane].isSliding) $P.css({ zIndex: c.zIndex.pane_normal });
+			if (pane=="south")
+				$P.css({ top: "auto" });
+			else if (pane=="east")
+				$P.css({ left: "auto" });
+		}
+	};
+
+
+	/**
+	 * bindStartSlidingEvent
+	 *
+	 * Toggle sliding functionality of a specific pane on/off by adding removing 'slide open' trigger
+	 *
+	 * @callers  open(), close()
+	 * @param String  pane  The pane to enable/disable, 'north', 'south', etc.
+	 * @param Boolean  enable  Enable or Disable sliding?
+	 */
+	var bindStartSlidingEvent = function (pane, enable) {
+		var 
+			o		= options[pane]
+		,	$R		= $Rs[pane]
+		,	trigger	= o.slideTrigger_open
+		;
+		if (!$R || !o.slidable) return;
+		// make sure we have a valid event
+		if (trigger != "click" && trigger != "dblclick" && trigger != "mouseover") trigger = "click";
+		$R
+			// add or remove trigger event
+			[enable ? "bind" : "unbind"](trigger, slideOpen)
+			// set the appropriate cursor & title/tip
+			.css("cursor", (enable ? o.sliderCursor: "default"))
+			.attr("title", (enable ? o.sliderTip : ""))
+		;
+	};
+
+	/**
+	 * bindStopSlidingEvents
+	 *
+	 * Add or remove 'mouseout' events to 'slide close' when pane is 'sliding' open or closed
+	 * Also increases zIndex when pane is sliding open
+	 * See bindStartSlidingEvent for code to control 'slide open'
+	 *
+	 * @callers  slideOpen(), slideClosed()
+	 * @param String  pane  The pane to process, 'north', 'south', etc.
+	 * @param Boolean  isOpen  Is pane open or closed?
+	 */
+	var bindStopSlidingEvents = function (pane, enable) {
+		var 
+			o		= options[pane]
+		,	s		= state[pane]
+		,	trigger	= o.slideTrigger_close
+		,	action	= (enable ? "bind" : "unbind") // can't make 'unbind' work! - see disabled code below
+		,	$P		= $Ps[pane]
+		,	$R		= $Rs[pane]
+		;
+
+		s.isSliding = enable; // logic
+		clearTimer(pane, "closeSlider"); // just in case
+
+		// raise z-index when sliding
+		$P.css({ zIndex: (enable ? c.zIndex.sliding : c.zIndex.pane_normal) });
+		$R.css({ zIndex: (enable ? c.zIndex.sliding : c.zIndex.resizer_normal) });
+
+		// make sure we have a valid event
+		if (trigger != "click" && trigger != "mouseout") trigger = "mouseout";
+
+		// when trigger is 'mouseout', must cancel timer when mouse moves between 'pane' and 'resizer'
+		if (enable) { // BIND trigger events
+			$P.bind(trigger, slideClosed );
+			$R.bind(trigger, slideClosed );
+			if (trigger = "mouseout") {
+				$P.bind("mouseover", cancelMouseOut );
+				$R.bind("mouseover", cancelMouseOut );
+			}
+		}
+		else { // UNBIND trigger events
+			// TODO: why does unbind of a 'single function' not work reliably?
+			//$P[action](trigger, slideClosed );
+			$P.unbind(trigger);
+			$R.unbind(trigger);
+			if (trigger = "mouseout") {
+				//$P[action]("mouseover", cancelMouseOut );
+				$P.unbind("mouseover");
+				$R.unbind("mouseover");
+				clearTimer(pane, "closeSlider");
+			}
+		}
+
+		// SUBROUTINE for mouseout timer clearing
+		function cancelMouseOut (evt) {
+			clearTimer(pane, "closeSlider");
+			evt.stopPropagation();
+		}
+	};
+
+	var slideOpen = function () {
+		var pane = $(this).attr("resizer"); // attr added by initHandles
+		if (state[pane].isClosed) { // skip if already open!
+			bindStopSlidingEvents(pane, true); // pane is opening, so BIND trigger events to close it
+			open(pane, true); // true = slide - ie, called from here!
+		}
+	};
+
+	var slideClosed = function () {
+		var
+			$E = $(this)
+		,	pane = $E.attr("pane") || $E.attr("resizer")
+		,	o = options[pane]
+		,	s = state[pane]
+		;
+		if (s.isClosed || s.isResizing)
+			return; // skip if already closed OR in process of resizing
+		else if (o.slideTrigger_close == "click")
+			close_NOW(); // close immediately onClick
+		else // trigger = mouseout - use a delay
+			setTimer(pane, "closeSlider", close_NOW, 300); // .3 sec delay
+
+		// SUBROUTINE for timed close
+		function close_NOW () {
+			bindStopSlidingEvents(pane, false); // pane is being closed, so UNBIND trigger events
+			if (!s.isClosed) close(pane); // skip if already closed!
+		}
+	};
+
+
+	/**
+	 * sizePane
+	 *
+	 * @callers  initResizable.stop()
+	 * @param String  pane   The pane being resized - usually west or east, but potentially north or south
+	 * @param Integer  newSize  The new size for this pane - will be validated
+	 */
+	var sizePane = function (pane, size) {
+		// TODO: accept "auto" as size, and size-to-fit pane content
+		var 
+			edge	= c[pane].edge
+		,	dir		= c[pane].dir
+		,	o		= options[pane]
+		,	s		= state[pane]
+		,	$P		= $Ps[pane]
+		,	$R		= $Rs[pane]
+		;
+		// calculate 'current' min/max sizes
+		setPaneMinMaxSizes(pane); // update pane-state
+		// compare/update calculated min/max to user-options
+		s.minSize = max(s.minSize, o.minSize);
+		if (o.maxSize > 0) s.maxSize = min(s.maxSize, o.maxSize);
+		// validate passed size
+		size = max(size, s.minSize);
+		size = min(size, s.maxSize);
+		s.size = size; // update state
+
+		// move the resizer bar and resize the pane
+		$R.css( edge, size + cDims[edge] );
+		$P.css( c[pane].sizeType, max(1, cssSize(pane, size)) );
+
+		// resize all the adjacent panes, and adjust their toggler buttons
+		if (!s.isSliding) sizeMidPanes(dir=="horz" ? "all" : "center");
+		sizeHandles();
+		sizeContent(pane);
+		execUserCallback(pane, o.onresize_end || o.onresize);
+	};
+
+	/**
+	 * sizeMidPanes
+	 *
+	 * @callers  create(), open(), close(), onWindowResize()
+	 */
+	var sizeMidPanes = function (panes, overrideDims, onInit) {
+		if (!panes || panes == "all") panes = "east,west,center";
+
+		var d = getPaneDims();
+		if (overrideDims) $.extend( d, overrideDims );
+
+		$.each(panes.split(","), function() {
+			if (!$Ps[this]) return; // NO PANE - skip
+			var 
+				pane	= str(this)
+			,	o		= options[pane]
+			,	s		= state[pane]
+			,	$P		= $Ps[pane]
+			,	$R		= $Rs[pane]
+			,	hasRoom	= true
+			,	CSS		= {}
+			;
+
+			if (pane == "center") {
+				d = getPaneDims(); // REFRESH Dims because may have just 'unhidden' East or West pane after a 'resize'
+				CSS = $.extend( {}, d ); // COPY ALL of the paneDims
+				CSS.width  = max(1, cssW(pane, CSS.width));
+				CSS.height = max(1, cssH(pane, CSS.height));
+				hasRoom = (CSS.width > 1 && CSS.height > 1);
+				/*
+				 * Extra CSS for IE6 or IE7 in Quirks-mode - add 'width' to NORTH/SOUTH panes
+				 * Normally these panes have only 'left' & 'right' positions so pane auto-sizes
+				 */
+				if ($.browser.msie && (!$.boxModel || $.browser.version < 7)) {
+					if ($Ps.north) $Ps.north.css({ width: cssW($Ps.north, cDims.innerWidth) });
+					if ($Ps.south) $Ps.south.css({ width: cssW($Ps.south, cDims.innerWidth) });
+				}
+			}
+			else { // for east and west, set only the height
+				CSS.top = d.top;
+				CSS.bottom = d.bottom;
+				CSS.height = max(1, cssH(pane, d.height));
+				hasRoom = (CSS.height > 1);
+			}
+
+			if (hasRoom) {
+				$P.css(CSS);
+				if (s.noRoom) {
+					s.noRoom = false;
+					if (s.isHidden) return;
+					else show(pane, !s.isClosed);
+					/* OLD CODE - keep until sure line above works right!
+					if (!s.isClosed) $P.show(); // in case was previously hidden due to NOT hasRoom
+					if ($R) $R.show();
+					*/
+				}
+				if (!onInit) {
+					sizeContent(pane);
+					execUserCallback(pane, o.onresize_end || o.onresize);
+				}
+			}
+			else if (!s.noRoom) { // no room for pane, so just hide it (if not already)
+				s.noRoom = true; // update state
+				if (s.isHidden) return;
+				if (onInit) { // skip onhide callback and other logic onLoad
+					$P.hide();
+					if ($R) $R.hide();
+				}
+				else hide(pane);
+			}
+		});
+	};
+
+
+	var sizeContent = function (panes) {
+		if (!panes || panes == "all") panes = c.allPanes;
+
+		$.each(panes.split(","), function() {
+			if (!$Cs[this]) return; // NO CONTENT - skip
+			var 
+				pane	= str(this)
+			,	ignore	= options[pane].contentIgnoreSelector
+			,	$P		= $Ps[pane]
+			,	$C		= $Cs[pane]
+			,	e_C		= $C[0]		// DOM element
+			,	height	= cssH($P);	// init to pane.innerHeight
+			;
+			$P.children().each(function() {
+				if (this == e_C) return; // Content elem - skip
+				var $E = $(this);
+				if (!ignore || !$E.is(ignore))
+					height -= $E.outerHeight();
+			});
+			if (height > 0)
+				height = cssH($C, height);
+			if (height < 1)
+				$C.hide(); // no room for content!
+			else
+				$C.css({ height: height }).show();
+		});
+	};
+
+
+	/**
+	 * sizeHandles
+	 *
+	 * Called every time a pane is opened, closed, or resized to slide the togglers to 'center' and adjust their length if necessary
+	 *
+	 * @callers  initHandles(), open(), close(), resizeAll()
+	 */
+	var sizeHandles = function (panes, onInit) {
+		if (!panes || panes == "all") panes = c.borderPanes;
+
+		$.each(panes.split(","), function() {
+			var 
+				pane	= str(this)
+			,	o		= options[pane]
+			,	s		= state[pane]
+			,	$P		= $Ps[pane]
+			,	$R		= $Rs[pane]
+			,	$T		= $Ts[pane]
+			;
+			if (!$P || !$R || (!o.resizable && !o.closable)) return; // skip
+
+			var 
+				dir			= c[pane].dir
+			,	_state		= (s.isClosed ? "_closed" : "_open")
+			,	spacing		= o["spacing"+ _state]
+			,	togAlign	= o["togglerAlign"+ _state]
+			,	togLen		= o["togglerLength"+ _state]
+			,	paneLen
+			,	offset
+			,	CSS = {}
+			;
+			if (spacing == 0) {
+				$R.hide();
+				return;
+			}
+			else if (!s.noRoom && !s.isHidden) // skip if resizer was hidden for any reason
+				$R.show(); // in case was previously hidden
+
+			// Resizer Bar is ALWAYS same width/height of pane it is attached to
+			if (dir == "horz") { // north/south
+				paneLen = $P.outerWidth();
+				$R.css({
+					width:	max(1, cssW($R, paneLen)) // account for borders & padding
+				,	height:	max(1, cssH($R, spacing)) // ditto
+				,	left:	cssNum($P, "left")
+				});
+			}
+			else { // east/west
+				paneLen = $P.outerHeight();
+				$R.css({
+					height:	max(1, cssH($R, paneLen)) // account for borders & padding
+				,	width:	max(1, cssW($R, spacing)) // ditto
+				,	top:	cDims.top + getPaneSize("north", true)
+				//,	top:	cssNum($Ps["center"], "top")
+				});
+				
+			}
+
+			if ($T) {
+				if (togLen == 0 || (s.isSliding && o.hideTogglerOnSlide)) {
+					$T.hide(); // always HIDE the toggler when 'sliding'
+					return;
+				}
+				else
+					$T.show(); // in case was previously hidden
+
+				if (!(togLen > 0) || togLen == "100%" || togLen > paneLen) {
+					togLen = paneLen;
+					offset = 0;
+				}
+				else { // calculate 'offset' based on options.PANE.togglerAlign_open/closed
+					if (typeof togAlign == "string") {
+						switch (togAlign) {
+							case "top":
+							case "left":	offset = 0;
+											break;
+							case "bottom":
+							case "right":	offset = paneLen - togLen;
+											break;
+							case "middle":
+							case "center":
+							default:		offset = Math.floor((paneLen - togLen) / 2); // 'default' catches typos
+						}
+					}
+					else { // togAlign = number
+						var x = parseInt(togAlign); //
+						if (togAlign >= 0) offset = x;
+						else offset = paneLen - togLen + x; // NOTE: x is negative!
+					}
+				}
+
+				var
+					$TC_o = (o.togglerContent_open   ? $T.children(".content-open") : false)
+				,	$TC_c = (o.togglerContent_closed ? $T.children(".content-closed")   : false)
+				,	$TC   = (s.isClosed ? $TC_c : $TC_o)
+				;
+				if ($TC_o) $TC_o.css("display", s.isClosed ? "none" : "block");
+				if ($TC_c) $TC_c.css("display", s.isClosed ? "block" : "none");
+
+				if (dir == "horz") { // north/south
+					var width = cssW($T, togLen);
+					$T.css({
+						width:	max(0, width)  // account for borders & padding
+					,	height:	max(1, cssH($T, spacing)) // ditto
+					,	left:	offset // TODO: VERIFY that toggler  positions correctly for ALL values
+					});
+					if ($TC) // CENTER the toggler content SPAN
+						$TC.css("marginLeft", Math.floor((width-$TC.outerWidth())/2)); // could be negative
+				}
+				else { // east/west
+					var height = cssH($T, togLen);
+					$T.css({
+						height:	max(0, height)  // account for borders & padding
+					,	width:	max(1, cssW($T, spacing)) // ditto
+					,	top:	offset // POSITION the toggler
+					});
+					if ($TC) // CENTER the toggler content SPAN
+						$TC.css("marginTop", Math.floor((height-$TC.outerHeight())/2)); // could be negative
+				}
+
+
+			}
+
+			// DONE measuring and sizing this resizer/toggler, so can be 'hidden' now
+			if (onInit && o.initHidden) {
+				$R.hide();
+				if ($T) $T.hide();
+			}
+		});
+	};
+
+
+	/**
+	 * resizeAll
+	 *
+	 * @callers  window.onresize(), callbacks or custom code
+	 */
+	var resizeAll = function () {
+		var
+			oldW	= cDims.innerWidth
+		,	oldH	= cDims.innerHeight
+		;
+		cDims = state.container = getElemDims($Container); // UPDATE container dimensions
+
+		var
+			checkH	= (cDims.innerHeight < oldH)
+		,	checkW	= (cDims.innerWidth < oldW)
+		,	s, dir
+		;
+
+		if (checkH || checkW)
+			// NOTE special order for sizing: S-N-E-W
+			$.each(["south","north","east","west"], function(i,pane) {
+				s = state[pane];
+				dir = c[pane].dir;
+				if (!s.isClosed && ((checkH && dir=="horz") || (checkW && dir=="vert"))) {
+					setPaneMinMaxSizes(pane); // update pane-state
+					// shrink pane if 'too big' to fit
+					if (s.size > s.maxSize)
+						sizePane(pane, s.maxSize);
+				}
+			});
+
+		sizeMidPanes("all");
+		sizeHandles("all"); // reposition the toggler elements
+	};
+
+
+	/**
+	 * keyDown
+	 *
+	 * Capture keys when enableCursorHotkey - toggle pane if hotkey pressed
+	 *
+	 * @callers  document.keydown()
+	 */
+	function keyDown (evt) {
+		if (!evt) return true;
+		var code = evt.keyCode;
+		if (code < 33) return true; // ignore special keys: ENTER, TAB, etc
+
+		var
+			PANE = {
+				38: "north" // Up Cursor
+			,	40: "south" // Down Cursor
+			,	37: "west"  // Left Cursor
+			,	39: "east"  // Right Cursor
+			}
+		,	isCursorKey = (code >= 37 && code <= 40)
+		,	ALT = evt.altKey // no worky!
+		,	SHIFT = evt.shiftKey
+		,	CTRL = evt.ctrlKey
+		,	pane = false
+		,	s, o, k, m, el
+		;
+
+		if (!CTRL && !SHIFT)
+			return true; // no modifier key - abort
+		else if (isCursorKey && options[PANE[code]].enableCursorHotkey) // valid cursor-hotkey
+			pane = PANE[code];
+		else // check to see if this matches a custom-hotkey
+			$.each(c.borderPanes.split(","), function(i,p) { // loop each pane to check its hotkey
+				o = options[p];
+				k = o.customHotkey;
+				m = o.customHotkeyModifier; // if missing or invalid, treated as "CTRL+SHIFT"
+				if ((SHIFT && m=="SHIFT") || (CTRL && m=="CTRL") || (CTRL && SHIFT)) { // Modifier matches
+					if (k && code == (isNaN(k) || k <= 9 ? k.toUpperCase().charCodeAt(0) : k)) { // Key matches
+						pane = p;
+						return false; // BREAK
+					}
+				}
+			});
+
+		if (!pane) return true; // no hotkey - abort
+
+		// validate pane
+		o = options[pane]; // get pane options
+		s = state[pane]; // get pane options
+		if (!o.enableCursorHotkey || s.isHidden || !$Ps[pane]) return true;
+
+		// see if user is in a 'form field' because may be 'selecting text'!
+		el = evt.target || evt.srcElement;
+		if (el && SHIFT && isCursorKey && (el.tagName=="TEXTAREA" || (el.tagName=="INPUT" && (code==37 || code==39))))
+			return true; // allow text-selection
+
+		// SYNTAX NOTES
+		// use "returnValue=false" to abort keystroke but NOT abort function - can run another command afterwards
+		// use "return false" to abort keystroke AND abort function
+		toggle(pane);
+		evt.stopPropagation();
+		evt.returnValue = false; // CANCEL key
+		return false;
+	};
+
+
+/*
+ * ###########################
+ *     UTILITY METHODS
+ *   called externally only
+ * ###########################
+ */
+
+	function allowOverflow (elem) {
+		if (this && this.tagName) elem = this; // BOUND to element
+		var $P;
+		if (typeof elem=="string")
+			$P = $Ps[elem];
+		else {
+			if ($(elem).attr("pane")) $P = $(elem);
+			else $P = $(elem).parents("div[pane]:first");
+		}
+		if (!$P.length) return; // INVALID
+
+		var
+			pane	= $P.attr("pane")
+		,	s		= state[pane]
+		;
+
+		// if pane is already raised, then reset it before doing it again!
+		// this would happen if allowOverflow is attached to BOTH the pane and an element 
+		if (s.cssSaved)
+			resetOverflow(pane); // reset previous CSS before continuing
+
+		// if pane is raised by sliding or resizing, or it's closed, then abort
+		if (s.isSliding || s.isResizing || s.isClosed) {
+			s.cssSaved = false;
+			return;
+		}
+
+		var
+			newCSS	= { zIndex: (c.zIndex.pane_normal + 1) }
+		,	curCSS	= {}
+		,	of		= $P.css("overflow")
+		,	ofX		= $P.css("overflowX")
+		,	ofY		= $P.css("overflowY")
+		;
+		// determine which, if any, overflow settings need to be changed
+		if (of != "visible") {
+			curCSS.overflow = of;
+			newCSS.overflow = "visible";
+		}
+		if (ofX && ofX != "visible" && ofX != "auto") {
+			curCSS.overflowX = ofX;
+			newCSS.overflowX = "visible";
+		}
+		if (ofY && ofY != "visible" && ofY != "auto") {
+			curCSS.overflowY = ofX;
+			newCSS.overflowY = "visible";
+		}
+
+		// save the current overflow settings - even if blank!
+		s.cssSaved = curCSS;
+
+		// apply new CSS to raise zIndex and, if necessary, make overflow 'visible'
+		$P.css( newCSS );
+
+		// make sure the zIndex of all other panes is normal
+		$.each(c.allPanes.split(","), function(i, p) {
+			if (p != pane) resetOverflow(p);
+		});
+
+	};
+
+	function resetOverflow (elem) {
+		if (this && this.tagName) elem = this; // BOUND to element
+		var $P;
+		if (typeof elem=="string")
+			$P = $Ps[elem];
+		else {
+			if ($(elem).hasClass("ui-layout-pane")) $P = $(elem);
+			else $P = $(elem).parents("div[pane]:first");
+		}
+		if (!$P.length) return; // INVALID
+
+		var
+			pane	= $P.attr("pane")
+		,	s		= state[pane]
+		,	CSS		= s.cssSaved || {}
+		;
+		// reset the zIndex
+		if (!s.isSliding && !s.isResizing)
+			$P.css("zIndex", c.zIndex.pane_normal);
+
+		// reset Overflow - if necessary
+		$P.css( CSS );
+
+		// clear var
+		s.cssSaved = false;
+	};
+
+
+	/**
+	* getBtn
+	*
+	* Helper function to validate params received by addButton utilities
+	*
+	* @param String   selector 	jQuery selector for button, eg: ".ui-layout-north .toggle-button"
+	* @param String   pane 		Name of the pane the button is for: 'north', 'south', etc.
+	* @returns  If both params valid, the element matching 'selector' in a jQuery wrapper - otherwise 'false'
+	*/
+	function getBtn(selector, pane, action) {
+		var
+			$E = $(selector)
+		,	err = "Error Adding Button \n\nInvalid "
+		;
+		if (!$E.length) // element not found
+			alert(err+"selector: "+ selector);
+		else if (c.borderPanes.indexOf(pane) == -1) // invalid 'pane' sepecified
+			alert(err+"pane: "+ pane);
+		else { // VALID
+			var btn = options[pane].buttonClass +"-"+ action;
+			$E.addClass( btn +" "+ btn +"-"+ pane );
+			return $E;
+		}
+		return false;  // INVALID
+	};
+
+
+	/**
+	* addToggleBtn
+	*
+	* Add a custom Toggler button for a pane
+	*
+	* @param String   selector 	jQuery selector for button, eg: ".ui-layout-north .toggle-button"
+	* @param String   pane 		Name of the pane the button is for: 'north', 'south', etc.
+	*/
+	function addToggleBtn (selector, pane) {
+		var $E = getBtn(selector, pane, "toggle");
+		if ($E)
+			$E
+				.attr("title", state[pane].isClosed ? "Open" : "Close")
+				.click(function (evt) {
+					toggle(pane);
+					evt.stopPropagation();
+				})
+			;
+	};
+
+	/**
+	* addOpenBtn
+	*
+	* Add a custom Open button for a pane
+	*
+	* @param String   selector 	jQuery selector for button, eg: ".ui-layout-north .open-button"
+	* @param String   pane 		Name of the pane the button is for: 'north', 'south', etc.
+	*/
+	function addOpenBtn (selector, pane) {
+		var $E = getBtn(selector, pane, "open");
+		if ($E)
+			$E
+				.attr("title", "Open")
+				.click(function (evt) {
+					open(pane);
+					evt.stopPropagation();
+				})
+			;
+	};
+
+	/**
+	* addCloseBtn
+	*
+	* Add a custom Close button for a pane
+	*
+	* @param String   selector 	jQuery selector for button, eg: ".ui-layout-north .close-button"
+	* @param String   pane 		Name of the pane the button is for: 'north', 'south', etc.
+	*/
+	function addCloseBtn (selector, pane) {
+		var $E = getBtn(selector, pane, "close");
+		if ($E)
+			$E
+				.attr("title", "Close")
+				.click(function (evt) {
+					close(pane);
+					evt.stopPropagation();
+				})
+			;
+	};
+
+	/**
+	* addPinBtn
+	*
+	* Add a custom Pin button for a pane
+	*
+	* Four classes are added to the element, based on the paneClass for the associated pane...
+	* Assuming the default paneClass and the pin is 'up', these classes are added for a west-pane pin:
+	*  - ui-layout-pane-pin
+	*  - ui-layout-pane-west-pin
+	*  - ui-layout-pane-pin-up
+	*  - ui-layout-pane-west-pin-up
+	*
+	* @param String   selector 	jQuery selector for button, eg: ".ui-layout-north .ui-layout-pin"
+	* @param String   pane 		Name of the pane the pin is for: 'north', 'south', etc.
+	*/
+	function addPinBtn (selector, pane) {
+		var $E = getBtn(selector, pane, "pin");
+		if ($E) {
+			var s = state[pane];
+			$E.click(function (evt) {
+				setPinState($(this), pane, (s.isSliding || s.isClosed));
+				if (s.isSliding || s.isClosed) open( pane ); // change from sliding to open
+				else close( pane ); // slide-closed
+				evt.stopPropagation();
+			});
+			// add up/down pin attributes and classes
+			setPinState ($E, pane, (!s.isClosed && !s.isSliding));
+			// add this pin to the pane data so we can 'sync it' automatically
+			// PANE.pins key is an array so we can store multiple pins for each pane
+			c[pane].pins.push( selector ); // just save the selector string
+		}
+	};
+
+	/**
+	* syncPinBtns
+	*
+	* INTERNAL function to sync 'pin buttons' when pane is opened or closed
+	* Unpinned means the pane is 'sliding' - ie, over-top of the adjacent panes
+	*
+	* @callers  open(), close()
+	* @params  pane   These are the params returned to callbacks by layout()
+	* @params  doPin  True means set the pin 'down', False means 'up'
+	*/
+	function syncPinBtns (pane, doPin) {
+		$.each(c[pane].pins, function (i, selector) {
+			setPinState($(selector), pane, doPin);
+		});
+	};
+
+	/**
+	* setPinState
+	*
+	* Change the class of the pin button to make it look 'up' or 'down'
+	*
+	* @callers  addPinBtn(), syncPinBtns()
+	* @param Element  $Pin		The pin-span element in a jQuery wrapper
+	* @param Boolean  doPin		True = set the pin 'down', False = set it 'up'
+	* @param String   pinClass	The root classname for pins - will add '-up' or '-down' suffix
+	*/
+	function setPinState ($Pin, pane, doPin) {
+		var updown = $Pin.attr("pin");
+		if (updown && doPin == (updown=="down")) return; // already in correct state
+		var
+			root	= options[pane].buttonClass
+		,	class1	= root +"-pin"
+		,	class2	= class1 +"-"+ pane
+		,	UP1		= class1 + "-up"
+		,	UP2		= class2 + "-up"
+		,	DN1		= class1 + "-down"
+		,	DN2		= class2 + "-down"
+		;
+		$Pin
+			.attr("pin", doPin ? "down" : "up") // logic
+			.attr("title", doPin ? "Un-Pin" : "Pin")
+			.removeClass( doPin ? UP1 : DN1 ) 
+			.removeClass( doPin ? UP2 : DN2 ) 
+			.addClass( doPin ? DN1 : UP1 ) 
+			.addClass( doPin ? DN2 : UP2 ) 
+		;
+	};
+
+
+/*
+ * ###########################
+ * CREATE/RETURN BORDER-LAYOUT
+ * ###########################
+ */
+
+	// init global vars
+	var 
+		$Container = $(this).css({ overflow: "hidden" }) // Container elem
+	,	$Ps		= {} // Panes x4	- set in initPanes()
+	,	$Cs		= {} // Content x4	- set in initPanes()
+	,	$Rs		= {} // Resizers x4	- set in initHandles()
+	,	$Ts		= {} // Togglers x4	- set in initHandles()
+	//	object aliases
+	,	c		= config // alias for config hash
+	,	cDims	= state.container // alias for easy access to 'container dimensions'
+	;
+
+	// create the border layout NOW
+	create();
+
+	// return object pointers to expose data & option Properties, and primary action Methods
+	return {
+		options:		options			// property - options hash
+	,	state:			state			// property - dimensions hash
+	,	panes:			$Ps				// property - object pointers for ALL panes: panes.north, panes.center
+	,	toggle:			toggle			// method - pass a 'pane' ("north", "west", etc)
+	,	open:			open			// method - ditto
+	,	close:			close			// method - ditto
+	,	hide:			hide			// method - ditto
+	,	show:			show			// method - ditto
+	,	resizeContent:	sizeContent		// method - ditto
+	,	sizePane:		sizePane		// method - pass a 'pane' AND a 'size' in pixels
+	,	resizeAll:		resizeAll		// method - no parameters
+	,	addToggleBtn:	addToggleBtn	// utility - pass element selector and 'pane'
+	,	addOpenBtn:		addOpenBtn		// utility - ditto
+	,	addCloseBtn:	addCloseBtn		// utility - ditto
+	,	addPinBtn:		addPinBtn		// utility - ditto
+	,	allowOverflow:	allowOverflow	// utility - pass calling element
+	,	resetOverflow:	resetOverflow	// utility - ditto
+	,	cssWidth:		cssW
+	,	cssHeight:		cssH
+	};
+
+}
+})( jQuery );
Index: sandbox/newExpressoMail/prototype/plugins/layout/jquery.layout.min.js
===================================================================
--- sandbox/newExpressoMail/prototype/plugins/layout/jquery.layout.min.js	(revision 7209)
+++ sandbox/newExpressoMail/prototype/plugins/layout/jquery.layout.min.js	(revision 7209)
@@ -0,0 +1,80 @@
+/*
+ * jquery.layout 1.2.0
+ *
+ * Copyright (c) 2008 
+ *   Fabrizio Balliano (http://www.fabrizioballiano.net)
+ *   Kevin Dalman (http://allpro.net)
+ *
+ * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
+ * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
+ *
+ * $Date: 2008-12-27 02:17:22 +0100 (sab, 27 dic 2008) $
+ * $Rev: 203 $
+ * 
+ * NOTE: For best code readability, view this with a fixed-space font and tabs equal to 4-chars
+ */
+(function($){$.fn.layout=function(opts){var
+prefix="ui-layout-",defaults={paneClass:prefix+"pane",resizerClass:prefix+"resizer",togglerClass:prefix+"toggler",togglerInnerClass:prefix+"",buttonClass:prefix+"button",contentSelector:"."+prefix+"content",contentIgnoreSelector:"."+prefix+"ignore"};var options={name:"",scrollToBookmarkOnLoad:true,defaults:{applyDefaultStyles:false,closable:true,resizable:true,slidable:true,contentSelector:defaults.contentSelector,contentIgnoreSelector:defaults.contentIgnoreSelector,paneClass:defaults.paneClass,resizerClass:defaults.resizerClass,togglerClass:defaults.togglerClass,buttonClass:defaults.buttonClass,resizerDragOpacity:1,maskIframesOnResize:true,minSize:0,maxSize:0,spacing_open:6,spacing_closed:6,togglerLength_open:50,togglerLength_closed:50,togglerAlign_open:"center",togglerAlign_closed:"center",togglerTip_open:"Close",togglerTip_closed:"Open",resizerTip:"Resize",sliderTip:"Slide Open",sliderCursor:"pointer",slideTrigger_open:"click",slideTrigger_close:"mouseout",hideTogglerOnSlide:false,togglerContent_open:"",togglerContent_closed:"",showOverflowOnHover:false,enableCursorHotkey:true,customHotkeyModifier:"SHIFT",fxName:"slide",fxSpeed:null,fxSettings:{},initClosed:false,initHidden:false},north:{paneSelector:"."+prefix+"north",size:"auto",resizerCursor:"n-resize"},south:{paneSelector:"."+prefix+"south",size:"auto",resizerCursor:"s-resize"},east:{paneSelector:"."+prefix+"east",size:200,resizerCursor:"e-resize"},west:{paneSelector:"."+prefix+"west",size:200,resizerCursor:"w-resize"},center:{paneSelector:"."+prefix+"center"}};var effects={slide:{all:{duration:"fast"},north:{direction:"up"},south:{direction:"down"},east:{direction:"right"},west:{direction:"left"}},drop:{all:{duration:"slow"},north:{direction:"up"},south:{direction:"down"},east:{direction:"right"},west:{direction:"left"}},scale:{all:{duration:"fast"}}};var config={allPanes:"north,south,east,west,center",borderPanes:"north,south,east,west",zIndex:{resizer_normal:1,pane_normal:2,mask:4,sliding:100,resizing:10000,animation:10000},resizers:{cssReq:{position:"absolute",padding:0,margin:0,fontSize:"1px",textAlign:"left",overflow:"hidden",zIndex:1},cssDef:{background:"#DDD",border:"none"}},togglers:{cssReq:{position:"absolute",display:"block",padding:0,margin:0,overflow:"hidden",textAlign:"center",fontSize:"1px",cursor:"pointer",zIndex:1},cssDef:{background:"#AAA"}},content:{cssReq:{overflow:"auto"},cssDef:{}},defaults:{cssReq:{position:"absolute",margin:0,zIndex:2},cssDef:{padding:"10px",background:"#FFF",border:"1px solid #BBB",overflow:"auto"}},north:{edge:"top",sizeType:"height",dir:"horz",cssReq:{top:0,bottom:"auto",left:0,right:0,width:"auto"}},south:{edge:"bottom",sizeType:"height",dir:"horz",cssReq:{top:"auto",bottom:0,left:0,right:0,width:"auto"}},east:{edge:"right",sizeType:"width",dir:"vert",cssReq:{left:"auto",right:0,top:"auto",bottom:"auto",height:"auto"}},west:{edge:"left",sizeType:"width",dir:"vert",cssReq:{left:0,right:"auto",top:"auto",bottom:"auto",height:"auto"}},center:{dir:"center",cssReq:{left:"auto",right:"auto",top:"auto",bottom:"auto",height:"auto",width:"auto"}}};var state={id:Math.floor(Math.random()*10000),container:{},north:{},south:{},east:{},west:{},center:{}};var
+altEdge={top:"bottom",bottom:"top",left:"right",right:"left"},altSide={north:"south",south:"north",east:"west",west:"east"};var isStr=function(o){if(typeof o=="string")return true;else if(typeof o=="object"){try{var match=o.constructor.toString().match(/string/i);return(match!==null);}catch(e){}}return false;};var str=function(o){if(typeof o=="string"||isStr(o))return $.trim(o);else return o;};var min=function(x,y){return Math.min(x,y);};var max=function(x,y){return Math.max(x,y);};var transformData=function(d){var json={defaults:{fxSettings:{}},north:{fxSettings:{}},south:{fxSettings:{}},east:{fxSettings:{}},west:{fxSettings:{}},center:{fxSettings:{}}};d=d||{};if(d.effects||d.defaults||d.north||d.south||d.west||d.east||d.center)json=$.extend(json,d);else
+$.each(d,function(key,val){a=key.split("__");json[a[1]?a[0]:"defaults"][a[1]?a[1]:a[0]]=val;});return json;};var setFlowCallback=function(action,pane,param){var
+cb=action+","+pane+","+(param?1:0),cP,cbPane;$.each(c.borderPanes.split(","),function(i,p){if(c[p].isMoving){bindCallback(p);return false;}});function bindCallback(p,test){cP=c[p];if(!cP.doCallback){cP.doCallback=true;cP.callback=cb;}else{cpPane=cP.callback.split(",")[1];if(cpPane!=p&&cpPane!=pane)bindCallback(cpPane,true);}}};var execFlowCallback=function(pane){var cP=c[pane];c.isLayoutBusy=false;delete cP.isMoving;if(!cP.doCallback||!cP.callback)return;cP.doCallback=false;var
+cb=cP.callback.split(","),param=(cb[2]>0?true:false);if(cb[0]=="open")open(cb[1],param);else if(cb[0]=="close")close(cb[1],param);if(!cP.doCallback)cP.callback=null;};var execUserCallback=function(pane,v_fn){if(!v_fn)return;var fn;try{if(typeof v_fn=="function")fn=v_fn;else if(typeof v_fn!="string")return;else if(v_fn.indexOf(",")>0){var
+args=v_fn.split(","),fn=eval(args[0]);if(typeof fn=="function"&&args.length>1)return fn(args[1]);}else
+fn=eval(v_fn);if(typeof fn=="function")return fn(pane,$Ps[pane],$.extend({},state[pane]),$.extend({},options[pane]),options.name);}catch(ex){}};var cssNum=function($E,prop){var
+val=0,hidden=false,visibility="";if(!$.browser.msie){if($.curCSS($E[0],"display",true)=="none"){hidden=true;visibility=$.curCSS($E[0],"visibility",true);$E.css({display:"block",visibility:"hidden"});}}val=parseInt($.curCSS($E[0],prop,true),10)||0;if(hidden){$E.css({display:"none"});if(visibility&&visibility!="hidden")$E.css({visibility:visibility});}return val;};var cssW=function(e,outerWidth){var $E;if(isStr(e)){e=str(e);$E=$Ps[e];}else
+$E=$(e);if(outerWidth<=0)return 0;else if(!(outerWidth>0))outerWidth=isStr(e)?getPaneSize(e):$E.outerWidth();if(!$.boxModel)return outerWidth;else
+return outerWidth
+-cssNum($E,"paddingLeft")-cssNum($E,"paddingRight")-($.curCSS($E[0],"borderLeftStyle",true)=="none"?0:cssNum($E,"borderLeftWidth"))-($.curCSS($E[0],"borderRightStyle",true)=="none"?0:cssNum($E,"borderRightWidth"));};var cssH=function(e,outerHeight){var $E;if(isStr(e)){e=str(e);$E=$Ps[e];}else
+$E=$(e);if(outerHeight<=0)return 0;else if(!(outerHeight>0))outerHeight=(isStr(e))?getPaneSize(e):$E.outerHeight();if(!$.boxModel)return outerHeight;else
+return outerHeight
+-cssNum($E,"paddingTop")-cssNum($E,"paddingBottom")-($.curCSS($E[0],"borderTopStyle",true)=="none"?0:cssNum($E,"borderTopWidth"))-($.curCSS($E[0],"borderBottomStyle",true)=="none"?0:cssNum($E,"borderBottomWidth"));};var cssSize=function(pane,outerSize){if(c[pane].dir=="horz")return cssH(pane,outerSize);else
+return cssW(pane,outerSize);};var getPaneSize=function(pane,inclSpace){var
+$P=$Ps[pane],o=options[pane],s=state[pane],oSp=(inclSpace?o.spacing_open:0),cSp=(inclSpace?o.spacing_closed:0);if(!$P||s.isHidden)return 0;else if(s.isClosed||(s.isSliding&&inclSpace))return cSp;else if(c[pane].dir=="horz")return $P.outerHeight()+oSp;else
+return $P.outerWidth()+oSp;};var setPaneMinMaxSizes=function(pane){var
+d=cDims,edge=c[pane].edge,dir=c[pane].dir,o=options[pane],s=state[pane],$P=$Ps[pane],$altPane=$Ps[altSide[pane]],paneSpacing=o.spacing_open,altPaneSpacing=options[altSide[pane]].spacing_open,altPaneSize=(!$altPane?0:(dir=="horz"?$altPane.outerHeight():$altPane.outerWidth())),containerSize=(dir=="horz"?d.innerHeight:d.innerWidth),limitSize=containerSize-paneSpacing-altPaneSize-altPaneSpacing,minSize=s.minSize||0,maxSize=Math.min(s.maxSize||9999,limitSize),minPos,maxPos;switch(pane){case"north":minPos=d.offsetTop+minSize;maxPos=d.offsetTop+maxSize;break;case"west":minPos=d.offsetLeft+minSize;maxPos=d.offsetLeft+maxSize;break;case"south":minPos=d.offsetTop+d.innerHeight-maxSize;maxPos=d.offsetTop+d.innerHeight-minSize;break;case"east":minPos=d.offsetLeft+d.innerWidth-maxSize;maxPos=d.offsetLeft+d.innerWidth-minSize;break;}$.extend(s,{minSize:minSize,maxSize:maxSize,minPosition:minPos,maxPosition:maxPos});};var getPaneDims=function(){var d={top:getPaneSize("north",true),bottom:getPaneSize("south",true),left:getPaneSize("west",true),right:getPaneSize("east",true),width:0,height:0};with(d){width=cDims.innerWidth-left-right;height=cDims.innerHeight-bottom-top;top+=cDims.top;bottom+=cDims.bottom;left+=cDims.left;right+=cDims.right;}return d;};var getElemDims=function($E){var
+d={},e,b,p;$.each("Left,Right,Top,Bottom".split(","),function(){e=str(this);b=d["border"+e]=cssNum($E,"border"+e+"Width");p=d["padding"+e]=cssNum($E,"padding"+e);d["offset"+e]=b+p;if($E==$Container)d[e.toLowerCase()]=($.boxModel?p:0);});d.innerWidth=d.outerWidth=$E.outerWidth();d.innerHeight=d.outerHeight=$E.outerHeight();if($.boxModel){d.innerWidth-=(d.offsetLeft+d.offsetRight);d.innerHeight-=(d.offsetTop+d.offsetBottom);}return d;};var setTimer=function(pane,action,fn,ms){var
+Layout=window.layout=window.layout||{},Timers=Layout.timers=Layout.timers||{},name="layout_"+state.id+"_"+pane+"_"+action;if(Timers[name])return;else Timers[name]=setTimeout(fn,ms);};var clearTimer=function(pane,action){var
+Layout=window.layout=window.layout||{},Timers=Layout.timers=Layout.timers||{},name="layout_"+state.id+"_"+pane+"_"+action;if(Timers[name]){clearTimeout(Timers[name]);delete Timers[name];return true;}else
+return false;};var create=function(){initOptions();initContainer();initPanes();initHandles();initResizable();sizeContent("all");if(options.scrollToBookmarkOnLoad)with(self.location)if(hash)replace(hash);initHotkeys();$(window).resize(function(){var timerID="timerLayout_"+state.id;if(window[timerID])clearTimeout(window[timerID]);window[timerID]=null;if(true||$.browser.msie)window[timerID]=setTimeout(resizeAll,100);else
+resizeAll();});};var initContainer=function(){try{if($Container[0].tagName=="BODY"){$("html").css({height:"100%",overflow:"hidden"});$("body").css({position:"relative",height:"100%",overflow:"hidden",margin:0,padding:0,border:"none"});}else{var
+CSS={overflow:"hidden"},p=$Container.css("position"),h=$Container.css("height");if(!$Container.hasClass("ui-layout-pane")){if(!p||"fixed,absolute,relative".indexOf(p)<0)CSS.position="relative";if(!h||h=="auto")CSS.height="100%";}$Container.css(CSS);}}catch(ex){}cDims=state.container=getElemDims($Container);};var initHotkeys=function(){$.each(c.borderPanes.split(","),function(i,pane){var o=options[pane];if(o.enableCursorHotkey||o.customHotkey){$(document).keydown(keyDown);return false;}});};var initOptions=function(){opts=transformData(opts);if(opts.effects){$.extend(effects,opts.effects);delete opts.effects;}$.each("name,scrollToBookmarkOnLoad".split(","),function(idx,key){if(opts[key]!==undefined)options[key]=opts[key];else if(opts.defaults[key]!==undefined){options[key]=opts.defaults[key];delete opts.defaults[key];}});$.each("paneSelector,resizerCursor,customHotkey".split(","),function(idx,key){delete opts.defaults[key];});$.extend(options.defaults,opts.defaults);c.center=$.extend(true,{},c.defaults,c.center);$.extend(options.center,opts.center);var o_Center=$.extend(true,{},options.defaults,opts.defaults,options.center);$.each("paneClass,contentSelector,contentIgnoreSelector,applyDefaultStyles,showOverflowOnHover".split(","),function(idx,key){options.center[key]=o_Center[key];});var defs=options.defaults;$.each(c.borderPanes.split(","),function(i,pane){c[pane]=$.extend(true,{},c.defaults,c[pane]);o=options[pane]=$.extend(true,{},options.defaults,options[pane],opts.defaults,opts[pane]);if(!o.paneClass)o.paneClass=defaults.paneClass;if(!o.resizerClass)o.resizerClass=defaults.resizerClass;if(!o.togglerClass)o.togglerClass=defaults.togglerClass;$.each(["_open","_close",""],function(i,n){var
+sName="fxName"+n,sSpeed="fxSpeed"+n,sSettings="fxSettings"+n;o[sName]=opts[pane][sName]||opts[pane].fxName||opts.defaults[sName]||opts.defaults.fxName||o[sName]||o.fxName||defs[sName]||defs.fxName||"none";var fxName=o[sName];if(fxName=="none"||!$.effects||!$.effects[fxName]||(!effects[fxName]&&!o[sSettings]&&!o.fxSettings))fxName=o[sName]="none";var
+fx=effects[fxName]||{},fx_all=fx.all||{},fx_pane=fx[pane]||{};o[sSettings]=$.extend({},fx_all,fx_pane,defs.fxSettings||{},defs[sSettings]||{},o.fxSettings,o[sSettings],opts.defaults.fxSettings,opts.defaults[sSettings]||{},opts[pane].fxSettings,opts[pane][sSettings]||{});o[sSpeed]=opts[pane][sSpeed]||opts[pane].fxSpeed||opts.defaults[sSpeed]||opts.defaults.fxSpeed||o[sSpeed]||o[sSettings].duration||o.fxSpeed||o.fxSettings.duration||defs.fxSpeed||defs.fxSettings.duration||fx_pane.duration||fx_all.duration||"normal";});});};var initPanes=function(){$.each(c.allPanes.split(","),function(){var
+pane=str(this),o=options[pane],s=state[pane],fx=s.fx,dir=c[pane].dir,size=o.size=="auto"||isNaN(o.size)?0:o.size,minSize=o.minSize||1,maxSize=o.maxSize||9999,spacing=o.spacing_open||0,sel=o.paneSelector,isIE6=($.browser.msie&&$.browser.version<7),CSS={},$P,$C;$Cs[pane]=false;if(sel.substr(0,1)==="#")$P=$Ps[pane]=$Container.find(sel+":first");else{$P=$Ps[pane]=$Container.children(sel+":first");if(!$P.length)$P=$Ps[pane]=$Container.children("form:first").children(sel+":first");}if(!$P.length){$Ps[pane]=false;return true;}$P.attr("pane",pane).addClass(o.paneClass+" "+o.paneClass+"-"+pane);if(pane!="center"){s.isClosed=false;s.isSliding=false;s.isResizing=false;s.isHidden=false;s.noRoom=false;c[pane].pins=[];}CSS=$.extend({visibility:"visible",display:"block"},c.defaults.cssReq,c[pane].cssReq);if(o.applyDefaultStyles)$.extend(CSS,c.defaults.cssDef,c[pane].cssDef);$P.css(CSS);CSS={};switch(pane){case"north":CSS.top=cDims.top;CSS.left=cDims.left;CSS.right=cDims.right;break;case"south":CSS.bottom=cDims.bottom;CSS.left=cDims.left;CSS.right=cDims.right;break;case"west":CSS.left=cDims.left;break;case"east":CSS.right=cDims.right;break;case"center":}if(dir=="horz"){if(size===0||size=="auto"){$P.css({height:"auto"});size=$P.outerHeight();}size=max(size,minSize);size=min(size,maxSize);size=min(size,cDims.innerHeight-spacing);CSS.height=max(1,cssH(pane,size));s.size=size;s.maxSize=maxSize;s.minSize=max(minSize,size-CSS.height+1);$P.css(CSS);}else if(dir=="vert"){if(size===0||size=="auto"){$P.css({width:"auto",float:"left"});size=$P.outerWidth();$P.css({float:"none"});}size=max(size,minSize);size=min(size,maxSize);size=min(size,cDims.innerWidth-spacing);CSS.width=max(1,cssW(pane,size));s.size=size;s.maxSize=maxSize;s.minSize=max(minSize,size-CSS.width+1);$P.css(CSS);sizeMidPanes(pane,null,true);}else if(pane=="center"){$P.css(CSS);sizeMidPanes("center",null,true);}if(o.initClosed&&o.closable){$P.hide().addClass("closed");s.isClosed=true;}else if(o.initHidden||o.initClosed){hide(pane,true);s.isHidden=true;}else
+$P.addClass("open");if(o.showOverflowOnHover)$P.hover(allowOverflow,resetOverflow);if(o.contentSelector){$C=$Cs[pane]=$P.children(o.contentSelector+":first");if(!$C.length){$Cs[pane]=false;return true;}$C.css(c.content.cssReq);if(o.applyDefaultStyles)$C.css(c.content.cssDef);$P.css({overflow:"hidden"});}});};var initHandles=function(){$.each(c.borderPanes.split(","),function(){var
+pane=str(this),o=options[pane],s=state[pane],rClass=o.resizerClass,tClass=o.togglerClass,$P=$Ps[pane];$Rs[pane]=false;$Ts[pane]=false;if(!$P||(!o.closable&&!o.resizable))return;var
+edge=c[pane].edge,isOpen=$P.is(":visible"),spacing=(isOpen?o.spacing_open:o.spacing_closed),_pane="-"+pane,_state=(isOpen?"-open":"-closed"),$R,$T;$R=$Rs[pane]=$("<span></span>");if(isOpen&&o.resizable);else if(!isOpen&&o.slidable)$R.attr("title",o.sliderTip).css("cursor",o.sliderCursor);$R.attr("id",(o.paneSelector.substr(0,1)=="#"?o.paneSelector.substr(1)+"-resizer":"")).attr("resizer",pane).css(c.resizers.cssReq).css(edge,cDims[edge]+getPaneSize(pane)).addClass(rClass+" "+rClass+_pane+" "+rClass+_state+" "+rClass+_pane+_state).appendTo($Container);if(o.applyDefaultStyles)$R.css(c.resizers.cssDef);if(o.closable){$T=$Ts[pane]=$("<div></div>");$T.attr("id",(o.paneSelector.substr(0,1)=="#"?o.paneSelector.substr(1)+"-toggler":"")).css(c.togglers.cssReq).attr("title",(isOpen?o.togglerTip_open:o.togglerTip_closed)).click(function(evt){toggle(pane);evt.stopPropagation();}).mouseover(function(evt){evt.stopPropagation();}).addClass(tClass+" "+tClass+_pane+" "+tClass+_state+" "+tClass+_pane+_state).appendTo($R);if(o.togglerContent_open)$("<span>"+o.togglerContent_open+"</span>").addClass("content content-open").css("display",s.isClosed?"none":"block").appendTo($T);if(o.togglerContent_closed)$("<span>"+o.togglerContent_closed+"</span>").addClass("content content-closed").css("display",s.isClosed?"block":"none").appendTo($T);if(o.applyDefaultStyles)$T.css(c.togglers.cssDef);if(!isOpen)bindStartSlidingEvent(pane,true);}});sizeHandles("all",true);};var initResizable=function(){var
+draggingAvailable=(typeof $.fn.draggable=="function"),minPosition,maxPosition,edge;$.each(c.borderPanes.split(","),function(){var
+pane=str(this),o=options[pane],s=state[pane];if(!draggingAvailable||!$Ps[pane]||!o.resizable){o.resizable=false;return true;}var
+rClass=o.resizerClass,dragClass=rClass+"-drag",dragPaneClass=rClass+"-"+pane+"-drag",draggingClass=rClass+"-dragging",draggingPaneClass=rClass+"-"+pane+"-dragging",draggingClassSet=false,$P=$Ps[pane],$R=$Rs[pane];if(!s.isClosed)$R.attr("title",o.resizerTip).css("cursor",o.resizerCursor);$R.draggable({containment:$Container[0],axis:(c[pane].dir=="horz"?"y":"x"),delay:200,distance:1,helper:"clone",opacity:o.resizerDragOpacity,zIndex:c.zIndex.resizing,start:function(e,ui){if(false===execUserCallback(pane,o.onresize_start))return false;s.isResizing=true;clearTimer(pane,"closeSlider");$R.addClass(dragClass+" "+dragPaneClass);draggingClassSet=false;var resizerWidth=(pane=="east"||pane=="south"?o.spacing_open:0);setPaneMinMaxSizes(pane);s.minPosition-=resizerWidth;s.maxPosition-=resizerWidth;edge=(c[pane].dir=="horz"?"top":"left");$(o.maskIframesOnResize===true?"iframe":o.maskIframesOnResize).each(function(){$('<div class="ui-layout-mask"/>').css({background:"#fff",opacity:"0.001",zIndex:9,position:"absolute",width:this.offsetWidth+"px",height:this.offsetHeight+"px"}).css($(this).offset()).appendTo(this.parentNode);});},drag:function(e,ui){if(!draggingClassSet){$(".ui-draggable-dragging").addClass(draggingClass+" "+draggingPaneClass).children().css("visibility","hidden");draggingClassSet=true;if(s.isSliding)$Ps[pane].css("zIndex",c.zIndex.sliding);}if(ui.position[edge]<s.minPosition)ui.position[edge]=s.minPosition;else if(ui.position[edge]>s.maxPosition)ui.position[edge]=s.maxPosition;},stop:function(e,ui){var
+dragPos=ui.position,resizerPos,newSize;$R.removeClass(dragClass+" "+dragPaneClass);switch(pane){case"north":resizerPos=dragPos.top;break;case"west":resizerPos=dragPos.left;break;case"south":resizerPos=cDims.outerHeight-dragPos.top-$R.outerHeight();break;case"east":resizerPos=cDims.outerWidth-dragPos.left-$R.outerWidth();break;}newSize=resizerPos-cDims[c[pane].edge];sizePane(pane,newSize);$("div.ui-layout-mask").remove();s.isResizing=false;}});});};var hide=function(pane,onInit){var
+o=options[pane],s=state[pane],$P=$Ps[pane],$R=$Rs[pane];if(!$P||s.isHidden)return;if(false===execUserCallback(pane,o.onhide_start))return;s.isSliding=false;if($R)$R.hide();if(onInit||s.isClosed){s.isClosed=true;s.isHidden=true;$P.hide();sizeMidPanes(c[pane].dir=="horz"?"all":"center");execUserCallback(pane,o.onhide_end||o.onhide);}else{s.isHiding=true;close(pane,false);}};var show=function(pane,openPane){var
+o=options[pane],s=state[pane],$P=$Ps[pane],$R=$Rs[pane];if(!$P||!s.isHidden)return;if(false===execUserCallback(pane,o.onshow_start))return;s.isSliding=false;s.isShowing=true;if($R&&o.spacing_open>0)$R.show();if(openPane===false)close(pane,true);else
+open(pane);};var toggle=function(pane){var s=state[pane];if(s.isHidden)show(pane);else if(s.isClosed)open(pane);else
+close(pane);};var close=function(pane,force,noAnimation){var
+$P=$Ps[pane],$R=$Rs[pane],$T=$Ts[pane],o=options[pane],s=state[pane],doFX=!noAnimation&&!s.isClosed&&(o.fxName_close!="none"),edge=c[pane].edge,rClass=o.resizerClass,tClass=o.togglerClass,_pane="-"+pane,_open="-open",_sliding="-sliding",_closed="-closed",isShowing=s.isShowing,isHiding=s.isHiding;delete s.isShowing;delete s.isHiding;if(!$P||(!o.resizable&&!o.closable))return;else if(!force&&s.isClosed&&!isShowing)return;if(c.isLayoutBusy){setFlowCallback("close",pane,force);return;}if(!isShowing&&false===execUserCallback(pane,o.onclose_start))return;c[pane].isMoving=true;c.isLayoutBusy=true;s.isClosed=true;if(isHiding)s.isHidden=true;else if(isShowing)s.isHidden=false;syncPinBtns(pane,false);if(!s.isSliding)sizeMidPanes(c[pane].dir=="horz"?"all":"center");if($R){$R.css(edge,cDims[edge]).removeClass(rClass+_open+" "+rClass+_pane+_open).removeClass(rClass+_sliding+" "+rClass+_pane+_sliding).addClass(rClass+_closed+" "+rClass+_pane+_closed);if(o.resizable)$R.draggable("disable").css("cursor","default").attr("title","");if($T){$T.removeClass(tClass+_open+" "+tClass+_pane+_open).addClass(tClass+_closed+" "+tClass+_pane+_closed).attr("title",o.togglerTip_closed);}sizeHandles();}if(doFX){lockPaneForFX(pane,true);$P.hide(o.fxName_close,o.fxSettings_close,o.fxSpeed_close,function(){lockPaneForFX(pane,false);if(!s.isClosed)return;close_2();});}else{$P.hide();close_2();}function close_2(){bindStartSlidingEvent(pane,true);if(!isShowing)execUserCallback(pane,o.onclose_end||o.onclose);if(isShowing)execUserCallback(pane,o.onshow_end||o.onshow);if(isHiding)execUserCallback(pane,o.onhide_end||o.onhide);execFlowCallback(pane);}};var open=function(pane,slide,noAnimation){var
+$P=$Ps[pane],$R=$Rs[pane],$T=$Ts[pane],o=options[pane],s=state[pane],doFX=!noAnimation&&s.isClosed&&(o.fxName_open!="none"),edge=c[pane].edge,rClass=o.resizerClass,tClass=o.togglerClass,_pane="-"+pane,_open="-open",_closed="-closed",_sliding="-sliding",isShowing=s.isShowing;delete s.isShowing;if(!$P||(!o.resizable&&!o.closable))return;else if(!s.isClosed&&!s.isSliding)return;if(s.isHidden&&!isShowing){show(pane,true);return;}if(c.isLayoutBusy){setFlowCallback("open",pane,slide);return;}if(false===execUserCallback(pane,o.onopen_start))return;c[pane].isMoving=true;c.isLayoutBusy=true;if(s.isSliding&&!slide)bindStopSlidingEvents(pane,false);s.isClosed=false;if(isShowing)s.isHidden=false;setPaneMinMaxSizes(pane);if(s.size>s.maxSize)$P.css(c[pane].sizeType,max(1,cssSize(pane,s.maxSize)));bindStartSlidingEvent(pane,false);if(doFX){lockPaneForFX(pane,true);$P.show(o.fxName_open,o.fxSettings_open,o.fxSpeed_open,function(){lockPaneForFX(pane,false);if(s.isClosed)return;open_2();});}else{$P.show();open_2();}function open_2(){if(!s.isSliding)sizeMidPanes(c[pane].dir=="vert"?"center":"all");if($R){$R.css(edge,cDims[edge]+getPaneSize(pane)).removeClass(rClass+_closed+" "+rClass+_pane+_closed).addClass(rClass+_open+" "+rClass+_pane+_open).addClass(!s.isSliding?"":rClass+_sliding+" "+rClass+_pane+_sliding);if(o.resizable)$R.draggable("enable").css("cursor",o.resizerCursor).attr("title",o.resizerTip);else
+$R.css("cursor","default");if($T){$T.removeClass(tClass+_closed+" "+tClass+_pane+_closed).addClass(tClass+_open+" "+tClass+_pane+_open).attr("title",o.togglerTip_open);}sizeHandles("all");}sizeContent(pane);syncPinBtns(pane,!s.isSliding);execUserCallback(pane,o.onopen_end||o.onopen);if(isShowing)execUserCallback(pane,o.onshow_end||o.onshow);execFlowCallback(pane);}};var lockPaneForFX=function(pane,doLock){var $P=$Ps[pane];if(doLock){$P.css({zIndex:c.zIndex.animation});if(pane=="south")$P.css({top:cDims.top+cDims.innerHeight-$P.outerHeight()});else if(pane=="east")$P.css({left:cDims.left+cDims.innerWidth-$P.outerWidth()});}else{if(!state[pane].isSliding)$P.css({zIndex:c.zIndex.pane_normal});if(pane=="south")$P.css({top:"auto"});else if(pane=="east")$P.css({left:"auto"});}};var bindStartSlidingEvent=function(pane,enable){var
+o=options[pane],$R=$Rs[pane],trigger=o.slideTrigger_open;if(!$R||!o.slidable)return;if(trigger!="click"&&trigger!="dblclick"&&trigger!="mouseover")trigger="click";$R
+[enable?"bind":"unbind"](trigger,slideOpen).css("cursor",(enable?o.sliderCursor:"default")).attr("title",(enable?o.sliderTip:""));};var bindStopSlidingEvents=function(pane,enable){var
+o=options[pane],s=state[pane],trigger=o.slideTrigger_close,action=(enable?"bind":"unbind"),$P=$Ps[pane],$R=$Rs[pane];s.isSliding=enable;clearTimer(pane,"closeSlider");$P.css({zIndex:(enable?c.zIndex.sliding:c.zIndex.pane_normal)});$R.css({zIndex:(enable?c.zIndex.sliding:c.zIndex.resizer_normal)});if(trigger!="click"&&trigger!="mouseout")trigger="mouseout";if(enable){$P.bind(trigger,slideClosed);$R.bind(trigger,slideClosed);if(trigger="mouseout"){$P.bind("mouseover",cancelMouseOut);$R.bind("mouseover",cancelMouseOut);}}else{$P.unbind(trigger);$R.unbind(trigger);if(trigger="mouseout"){$P.unbind("mouseover");$R.unbind("mouseover");clearTimer(pane,"closeSlider");}}function cancelMouseOut(evt){clearTimer(pane,"closeSlider");evt.stopPropagation();}};var slideOpen=function(){var pane=$(this).attr("resizer");if(state[pane].isClosed){bindStopSlidingEvents(pane,true);open(pane,true);}};var slideClosed=function(){var
+$E=$(this),pane=$E.attr("pane")||$E.attr("resizer"),o=options[pane],s=state[pane];if(s.isClosed||s.isResizing)return;else if(o.slideTrigger_close=="click")close_NOW();else
+setTimer(pane,"closeSlider",close_NOW,300);function close_NOW(){bindStopSlidingEvents(pane,false);if(!s.isClosed)close(pane);}};var sizePane=function(pane,size){var
+edge=c[pane].edge,dir=c[pane].dir,o=options[pane],s=state[pane],$P=$Ps[pane],$R=$Rs[pane];setPaneMinMaxSizes(pane);s.minSize=max(s.minSize,o.minSize);if(o.maxSize>0)s.maxSize=min(s.maxSize,o.maxSize);size=max(size,s.minSize);size=min(size,s.maxSize);s.size=size;$R.css(edge,size+cDims[edge]);$P.css(c[pane].sizeType,max(1,cssSize(pane,size)));if(!s.isSliding)sizeMidPanes(dir=="horz"?"all":"center");sizeHandles();sizeContent(pane);execUserCallback(pane,o.onresize_end||o.onresize);};var sizeMidPanes=function(panes,overrideDims,onInit){if(!panes||panes=="all")panes="east,west,center";var d=getPaneDims();if(overrideDims)$.extend(d,overrideDims);$.each(panes.split(","),function(){if(!$Ps[this])return;var
+pane=str(this),o=options[pane],s=state[pane],$P=$Ps[pane],$R=$Rs[pane],hasRoom=true,CSS={};if(pane=="center"){d=getPaneDims();CSS=$.extend({},d);CSS.width=max(1,cssW(pane,CSS.width));CSS.height=max(1,cssH(pane,CSS.height));hasRoom=(CSS.width>1&&CSS.height>1);if($.browser.msie&&(!$.boxModel||$.browser.version<7)){if($Ps.north)$Ps.north.css({width:cssW($Ps.north,cDims.innerWidth)});if($Ps.south)$Ps.south.css({width:cssW($Ps.south,cDims.innerWidth)});}}else{CSS.top=d.top;CSS.bottom=d.bottom;CSS.height=max(1,cssH(pane,d.height));hasRoom=(CSS.height>1);}if(hasRoom){$P.css(CSS);if(s.noRoom){s.noRoom=false;if(s.isHidden)return;else show(pane,!s.isClosed);}if(!onInit){sizeContent(pane);execUserCallback(pane,o.onresize_end||o.onresize);}}else if(!s.noRoom){s.noRoom=true;if(s.isHidden)return;if(onInit){$P.hide();if($R)$R.hide();}else hide(pane);}});};var sizeContent=function(panes){if(!panes||panes=="all")panes=c.allPanes;$.each(panes.split(","),function(){if(!$Cs[this])return;var
+pane=str(this),ignore=options[pane].contentIgnoreSelector,$P=$Ps[pane],$C=$Cs[pane],e_C=$C[0],height=cssH($P);;$P.children().each(function(){if(this==e_C)return;var $E=$(this);if(!ignore||!$E.is(ignore))height-=$E.outerHeight();});if(height>0)height=cssH($C,height);if(height<1)$C.hide();else
+$C.css({height:height}).show();});};var sizeHandles=function(panes,onInit){if(!panes||panes=="all")panes=c.borderPanes;$.each(panes.split(","),function(){var
+pane=str(this),o=options[pane],s=state[pane],$P=$Ps[pane],$R=$Rs[pane],$T=$Ts[pane];if(!$P||!$R||(!o.resizable&&!o.closable))return;var
+dir=c[pane].dir,_state=(s.isClosed?"_closed":"_open"),spacing=o["spacing"+_state],togAlign=o["togglerAlign"+_state],togLen=o["togglerLength"+_state],paneLen,offset,CSS={};if(spacing==0){$R.hide();return;}else if(!s.noRoom&&!s.isHidden)$R.show();if(dir=="horz"){paneLen=$P.outerWidth();$R.css({width:max(1,cssW($R,paneLen)),height:max(1,cssH($R,spacing)),left:cssNum($P,"left")});}else{paneLen=$P.outerHeight();$R.css({height:max(1,cssH($R,paneLen)),width:max(1,cssW($R,spacing)),top:cDims.top+getPaneSize("north",true)});}if($T){if(togLen==0||(s.isSliding&&o.hideTogglerOnSlide)){$T.hide();return;}else
+$T.show();if(!(togLen>0)||togLen=="100%"||togLen>paneLen){togLen=paneLen;offset=0;}else{if(typeof togAlign=="string"){switch(togAlign){case"top":case"left":offset=0;break;case"bottom":case"right":offset=paneLen-togLen;break;case"middle":case"center":default:offset=Math.floor((paneLen-togLen)/2);}}else{var x=parseInt(togAlign);if(togAlign>=0)offset=x;else offset=paneLen-togLen+x;}}var
+$TC_o=(o.togglerContent_open?$T.children(".content-open"):false),$TC_c=(o.togglerContent_closed?$T.children(".content-closed"):false),$TC=(s.isClosed?$TC_c:$TC_o);if($TC_o)$TC_o.css("display",s.isClosed?"none":"block");if($TC_c)$TC_c.css("display",s.isClosed?"block":"none");if(dir=="horz"){var width=cssW($T,togLen);$T.css({width:max(0,width),height:max(1,cssH($T,spacing)),left:offset});if($TC)$TC.css("marginLeft",Math.floor((width-$TC.outerWidth())/2));}else{var height=cssH($T,togLen);$T.css({height:max(0,height),width:max(1,cssW($T,spacing)),top:offset});if($TC)$TC.css("marginTop",Math.floor((height-$TC.outerHeight())/2));}}if(onInit&&o.initHidden){$R.hide();if($T)$T.hide();}});};var resizeAll=function(){var
+oldW=cDims.innerWidth,oldH=cDims.innerHeight;cDims=state.container=getElemDims($Container);var
+checkH=(cDims.innerHeight<oldH),checkW=(cDims.innerWidth<oldW),s,dir;if(checkH||checkW)$.each(["south","north","east","west"],function(i,pane){s=state[pane];dir=c[pane].dir;if(!s.isClosed&&((checkH&&dir=="horz")||(checkW&&dir=="vert"))){setPaneMinMaxSizes(pane);if(s.size>s.maxSize)sizePane(pane,s.maxSize);}});sizeMidPanes("all");sizeHandles("all");};function keyDown(evt){if(!evt)return true;var code=evt.keyCode;if(code<33)return true;var
+PANE={38:"north",40:"south",37:"west",39:"east"},isCursorKey=(code>=37&&code<=40),ALT=evt.altKey,SHIFT=evt.shiftKey,CTRL=evt.ctrlKey,pane=false,s,o,k,m,el;if(!CTRL&&!SHIFT)return true;else if(isCursorKey&&options[PANE[code]].enableCursorHotkey)pane=PANE[code];else
+$.each(c.borderPanes.split(","),function(i,p){o=options[p];k=o.customHotkey;m=o.customHotkeyModifier;if((SHIFT&&m=="SHIFT")||(CTRL&&m=="CTRL")||(CTRL&&SHIFT)){if(k&&code==(isNaN(k)||k<=9?k.toUpperCase().charCodeAt(0):k)){pane=p;return false;}}});if(!pane)return true;o=options[pane];s=state[pane];if(!o.enableCursorHotkey||s.isHidden||!$Ps[pane])return true;el=evt.target||evt.srcElement;if(el&&SHIFT&&isCursorKey&&(el.tagName=="TEXTAREA"||(el.tagName=="INPUT"&&(code==37||code==39))))return true;toggle(pane);evt.stopPropagation();evt.returnValue=false;return false;};function allowOverflow(elem){if(this&&this.tagName)elem=this;var $P;if(typeof elem=="string")$P=$Ps[elem];else{if($(elem).attr("pane"))$P=$(elem);else $P=$(elem).parents("div[pane]:first");}if(!$P.length)return;var
+pane=$P.attr("pane"),s=state[pane];if(s.cssSaved)resetOverflow(pane);if(s.isSliding||s.isResizing||s.isClosed){s.cssSaved=false;return;}var
+newCSS={zIndex:(c.zIndex.pane_normal+1)},curCSS={},of=$P.css("overflow"),ofX=$P.css("overflowX"),ofY=$P.css("overflowY");if(of!="visible"){curCSS.overflow=of;newCSS.overflow="visible";}if(ofX&&ofX!="visible"&&ofX!="auto"){curCSS.overflowX=ofX;newCSS.overflowX="visible";}if(ofY&&ofY!="visible"&&ofY!="auto"){curCSS.overflowY=ofX;newCSS.overflowY="visible";}s.cssSaved=curCSS;$P.css(newCSS);$.each(c.allPanes.split(","),function(i,p){if(p!=pane)resetOverflow(p);});};function resetOverflow(elem){if(this&&this.tagName)elem=this;var $P;if(typeof elem=="string")$P=$Ps[elem];else{if($(elem).hasClass("ui-layout-pane"))$P=$(elem);else $P=$(elem).parents("div[pane]:first");}if(!$P.length)return;var
+pane=$P.attr("pane"),s=state[pane],CSS=s.cssSaved||{};if(!s.isSliding&&!s.isResizing)$P.css("zIndex",c.zIndex.pane_normal);$P.css(CSS);s.cssSaved=false;};function getBtn(selector,pane,action){var
+$E=$(selector),err="Error Adding Button \n\nInvalid ";if(!$E.length)alert(err+"selector: "+selector);else if(c.borderPanes.indexOf(pane)==-1)alert(err+"pane: "+pane);else{var btn=options[pane].buttonClass+"-"+action;$E.addClass(btn+" "+btn+"-"+pane);return $E;}return false;};function addToggleBtn(selector,pane){var $E=getBtn(selector,pane,"toggle");if($E)$E.attr("title",state[pane].isClosed?"Open":"Close").click(function(evt){toggle(pane);evt.stopPropagation();});};function addOpenBtn(selector,pane){var $E=getBtn(selector,pane,"open");if($E)$E.attr("title","Open").click(function(evt){open(pane);evt.stopPropagation();});};function addCloseBtn(selector,pane){var $E=getBtn(selector,pane,"close");if($E)$E.attr("title","Close").click(function(evt){close(pane);evt.stopPropagation();});};function addPinBtn(selector,pane){var $E=getBtn(selector,pane,"pin");if($E){var s=state[pane];$E.click(function(evt){setPinState($(this),pane,(s.isSliding||s.isClosed));if(s.isSliding||s.isClosed)open(pane);else close(pane);evt.stopPropagation();});setPinState($E,pane,(!s.isClosed&&!s.isSliding));c[pane].pins.push(selector);}};function syncPinBtns(pane,doPin){$.each(c[pane].pins,function(i,selector){setPinState($(selector),pane,doPin);});};function setPinState($Pin,pane,doPin){var updown=$Pin.attr("pin");if(updown&&doPin==(updown=="down"))return;var
+root=options[pane].buttonClass,class1=root+"-pin",class2=class1+"-"+pane,UP1=class1+"-up",UP2=class2+"-up",DN1=class1+"-down",DN2=class2+"-down";$Pin.attr("pin",doPin?"down":"up").attr("title",doPin?"Un-Pin":"Pin").removeClass(doPin?UP1:DN1).removeClass(doPin?UP2:DN2).addClass(doPin?DN1:UP1).addClass(doPin?DN2:UP2);};var
+$Container=$(this).css({overflow:"hidden"}),$Ps={},$Cs={},$Rs={},$Ts={},c=config,cDims=state.container;create();return{options:options,state:state,panes:$Ps,toggle:toggle,open:open,close:close,hide:hide,show:show,resizeContent:sizeContent,sizePane:sizePane,resizeAll:resizeAll,addToggleBtn:addToggleBtn,addOpenBtn:addOpenBtn,addCloseBtn:addCloseBtn,addPinBtn:addPinBtn,allowOverflow:allowOverflow,resetOverflow:resetOverflow,cssWidth:cssW,cssHeight:cssH};}})(jQuery);
Index: sandbox/newExpressoMail/prototype/plugins/layout/jquery.js
===================================================================
--- sandbox/newExpressoMail/prototype/plugins/layout/jquery.js	(revision 7209)
+++ sandbox/newExpressoMail/prototype/plugins/layout/jquery.js	(revision 7209)
@@ -0,0 +1,3549 @@
+(function(){
+/*
+ * jQuery 1.2.6 - New Wave Javascript
+ *
+ * Copyright (c) 2008 John Resig (jquery.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $
+ * $Rev: 5685 $
+ */
+
+// Map over jQuery in case of overwrite
+var _jQuery = window.jQuery,
+// Map over the $ in case of overwrite
+	_$ = window.$;
+
+var 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)
+var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,
+
+// Is it a simple selector
+	isSimple = /^.[^:#\[\.]*$/,
+
+// Will speed up references to undefined, and allows munging its name.
+	undefined;
+
+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;
+			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] );
+
+					// Make sure an element was located
+					if ( elem ){
+						// Handle the case where IE and Opera return items
+						// by name instead of ID
+						if ( elem.id != match[3] )
+							return jQuery().find( selector );
+
+						// Otherwise, we inject the element directly into the jQuery object
+						return jQuery( elem );
+					}
+					selector = [];
+				}
+
+			// 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 )[ jQuery.fn.ready ? "ready" : "load" ]( selector );
+
+		return this.setArray(jQuery.makeArray(selector));
+	},
+
+	// The current version of jQuery being used
+	jquery: "1.2.6",
+
+	// The number of elements contained in the matched element set
+	size: function() {
+		return this.length;
+	},
+
+	// The number of elements contained in the matched element set
+	length: 0,
+
+	// 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
+			jQuery.makeArray( 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 ) {
+		// Build a new jQuery matched element set
+		var ret = jQuery( elems );
+
+		// Add the old object onto the stack (as a reference)
+		ret.prevObject = this;
+
+		// 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 ) {
+		var ret = -1;
+
+		// 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 ( name.constructor == 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
+			jQuery( html, this[0].ownerDocument )
+				.clone()
+				.insertBefore( this[0] )
+				.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, false, function(elem){
+			if (this.nodeType == 1)
+				this.appendChild( elem );
+		});
+	},
+
+	prepend: function() {
+		return this.domManip(arguments, true, true, function(elem){
+			if (this.nodeType == 1)
+				this.insertBefore( elem, this.firstChild );
+		});
+	},
+
+	before: function() {
+		return this.domManip(arguments, false, false, function(elem){
+			this.parentNode.insertBefore( elem, this );
+		});
+	},
+
+	after: function() {
+		return this.domManip(arguments, false, true, function(elem){
+			this.parentNode.insertBefore( elem, this.nextSibling );
+		});
+	},
+
+	end: function() {
+		return this.prevObject || jQuery( [] );
+	},
+
+	find: function( selector ) {
+		var elems = jQuery.map(this, function(elem){
+			return jQuery.find( selector, elem );
+		});
+
+		return this.pushStack( /[^+>] [^+>]/.test( selector ) || selector.indexOf("..") > -1 ?
+			jQuery.unique( elems ) :
+			elems );
+	},
+
+	clone: function( events ) {
+		// Do the clone
+		var ret = this.map(function(){
+			if ( jQuery.browser.msie && !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 clone = this.cloneNode(true),
+					container = document.createElement("div");
+				container.appendChild(clone);
+				return jQuery.clean([container.innerHTML])[0];
+			} else
+				return this.cloneNode(true);
+		});
+
+		// Need to set the expando to null on the cloned set if it exists
+		// removeData doesn't work here, IE removes it from the original as well
+		// this is primarily for IE but the data expando shouldn't be copied over in any browser
+		var clone = ret.find("*").andSelf().each(function(){
+			if ( this[ expando ] != undefined )
+				this[ expando ] = null;
+		});
+
+		// Copy the events from the original to the clone
+		if ( events === true )
+			this.find("*").andSelf().each(function(i){
+				if (this.nodeType == 3)
+					return;
+				var events = jQuery.data( this, "events" );
+
+				for ( var type in events )
+					for ( var handler in events[ type ] )
+						jQuery.event.add( clone[ i ], type, events[ type ][ handler ], events[ type ][ handler ].data );
+			});
+
+		// 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, this ) );
+	},
+
+	not: function( selector ) {
+		if ( selector.constructor == String )
+			// test special case where just one selector is passed in
+			if ( isSimple.test( selector ) )
+				return this.pushStack( jQuery.multiFilter( selector, this, true ) );
+			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 this.is( "." + selector );
+	},
+
+	val: function( value ) {
+		if ( value == undefined ) {
+
+			if ( this.length ) {
+				var elem = this[0];
+
+				// 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.browser.msie && !option.attributes.value.specified ? option.text : option.value;
+
+							// 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
+				} else
+					return (this[0].value || "").replace(/\r/g, "");
+
+			}
+
+			return undefined;
+		}
+
+		if( value.constructor == Number )
+			value += '';
+
+		return this.each(function(){
+			if ( this.nodeType != 1 )
+				return;
+
+			if ( value.constructor == Array && /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 :
+				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 ) );
+	},
+
+	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 );
+	},
+
+	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 );
+		});
+	},
+
+	domManip: function( args, table, reverse, callback ) {
+		var clone = this.length > 1, elems;
+
+		return this.each(function(){
+			if ( !elems ) {
+				elems = jQuery.clean( args, this.ownerDocument );
+
+				if ( reverse )
+					elems.reverse();
+			}
+
+			var obj = this;
+
+			if ( table && jQuery.nodeName( this, "table" ) && jQuery.nodeName( elems[0], "tr" ) )
+				obj = this.getElementsByTagName("tbody")[0] || this.appendChild( this.ownerDocument.createElement("tbody") );
+
+			var scripts = jQuery( [] );
+
+			jQuery.each(elems, function(){
+				var elem = clone ?
+					jQuery( this ).clone( true )[0] :
+					this;
+
+				// execute all scripts after the elements have been injected
+				if ( jQuery.nodeName( elem, "script" ) )
+					scripts = scripts.add( elem );
+				else {
+					// Remove any inner scripts for later evaluation
+					if ( elem.nodeType == 1 )
+						scripts = scripts.add( jQuery( "script", elem ).remove() );
+
+					// Inject the elements into the document
+					callback.call( obj, elem );
+				}
+			});
+
+			scripts.each( evalScript );
+		});
+	}
+};
+
+// 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 ( target.constructor == 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" && typeof target != "function" )
+		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;
+};
+
+var expando = "jQuery" + now(), uuid = 0, windowData = {},
+	// exclude the following css properties to add px
+	exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,
+	// cache defaultView
+	defaultView = document.defaultView || {};
+
+jQuery.extend({
+	noConflict: function( deep ) {
+		window.$ = _$;
+
+		if ( deep )
+			window.jQuery = _jQuery;
+
+		return jQuery;
+	},
+
+	// See test/unit/core.js for details concerning this function.
+	isFunction: function( fn ) {
+		return !!fn && typeof fn != "string" && !fn.nodeName &&
+			fn.constructor != Array && /^[\s[]?function/.test( fn + "" );
+	},
+
+	// check if an element is in a (or is an) XML document
+	isXMLDoc: function( elem ) {
+		return elem.documentElement && !elem.body ||
+			elem.tagName && elem.ownerDocument && !elem.ownerDocument.body;
+	},
+
+	// Evalulates a script in a global context
+	globalEval: function( data ) {
+		data = jQuery.trim( data );
+
+		if ( 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.browser.msie )
+				script.text = data;
+			else
+				script.appendChild( document.createTextNode( 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();
+	},
+
+	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 ];
+		}
+	},
+
+	// 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 value && value.constructor == 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 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 ) {
+		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;
+				var padding = 0, border = 0;
+				jQuery.each( which, function() {
+					padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0;
+					border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0;
+				});
+				val -= Math.round(padding + border);
+			}
+
+			if ( jQuery(elem).is(":visible") )
+				getWH();
+			else
+				jQuery.swap( elem, props, getWH );
+
+			return Math.max(0, val);
+		}
+
+		return jQuery.curCSS( elem, name, force );
+	},
+
+	curCSS: function( elem, name, force ) {
+		var ret, style = elem.style;
+
+		// A helper method for determining if an element's values are broken
+		function color( elem ) {
+			if ( !jQuery.browser.safari )
+				return false;
+
+			// defaultView is cached
+			var ret = defaultView.getComputedStyle( elem, null );
+			return !ret || ret.getPropertyValue("color") == "";
+		}
+
+		// We need to handle opacity special in IE
+		if ( name == "opacity" && jQuery.browser.msie ) {
+			ret = jQuery.attr( style, "opacity" );
+
+			return ret == "" ?
+				"1" :
+				ret;
+		}
+		// Opera sometimes will give the wrong display answer, this fixes it, see #2037
+		if ( jQuery.browser.opera && name == "display" ) {
+			var save = style.outline;
+			style.outline = "0 solid black";
+			style.outline = save;
+		}
+
+		// 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 && !color( elem ) )
+				ret = computedStyle.getPropertyValue( name );
+
+			// If the element isn't reporting its values properly in Safari
+			// then some display: none elements are involved
+			else {
+				var swap = [], stack = [], a = elem, i = 0;
+
+				// Locate all of the parent display: none elements
+				for ( ; a && color(a); a = a.parentNode )
+					stack.unshift(a);
+
+				// Go through and make them visible, but in reverse
+				// (It would be better if we knew the exact display type that they had)
+				for ( ; i < stack.length; i++ )
+					if ( color( stack[ i ] ) ) {
+						swap[ i ] = stack[ i ].style.display;
+						stack[ i ].style.display = "block";
+					}
+
+				// Since we flip the display style, we have to handle that
+				// one special, otherwise get the value
+				ret = name == "display" && swap[ stack.length - 1 ] != null ?
+					"none" :
+					( computedStyle && computedStyle.getPropertyValue( name ) ) || "";
+
+				// Finally, revert the display styles back
+				for ( i = 0; i < swap.length; i++ )
+					if ( swap[ i ] != null )
+						stack[ i ].style.display = swap[ i ];
+			}
+
+			// 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 ) {
+		var ret = [];
+		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;
+
+		jQuery.each(elems, function(i, elem){
+			if ( !elem )
+				return;
+
+			if ( elem.constructor == Number )
+				elem += '';
+
+			// 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 = jQuery.trim( elem ).toLowerCase(), div = context.createElement("div");
+
+				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.browser.msie &&
+					[ 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.browser.msie ) {
+
+					// String was a <table>, *may* have spurious <tbody>
+					var tbody = !tags.indexOf("<table") && tags.indexOf("<tbody") < 0 ?
+						div.firstChild && div.firstChild.childNodes :
+
+						// String was a bare <thead> or <tfoot>
+						wrap[1] == "<table>" && tags.indexOf("<tbody") < 0 ?
+							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 ( /^\s/.test( elem ) )
+						div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild );
+
+				}
+
+				elem = jQuery.makeArray( div.childNodes );
+			}
+
+			if ( elem.length === 0 && (!jQuery.nodeName( elem, "form" ) && !jQuery.nodeName( elem, "select" )) )
+				return;
+
+			if ( elem[0] == undefined || jQuery.nodeName( elem, "form" ) || elem.options )
+				ret.push( elem );
+
+			else
+				ret = jQuery.merge( ret, elem );
+
+		});
+
+		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,
+			msie = jQuery.browser.msie;
+
+		// 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" && jQuery.browser.safari )
+				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;
+
+				return elem[ name ];
+			}
+
+			if ( msie && 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 = msie && 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 ( msie && 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 || array.split || array.setInterval || array.call )
+				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.browser.msie ) {
+			while ( elem = second[ i++ ] )
+				if ( elem.nodeType != 8 )
+					first[ pos++ ] = elem;
+
+		} else
+			while ( elem = second[ i++ ] )
+				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 );
+	}
+});
+
+var userAgent = navigator.userAgent.toLowerCase();
+
+// Figure out what browser is being used
+jQuery.browser = {
+	version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [])[1],
+	safari: /webkit/.test( userAgent ),
+	opera: /opera/.test( userAgent ),
+	msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),
+	mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )
+};
+
+var styleFloat = jQuery.browser.msie ?
+	"styleFloat" :
+	"cssFloat";
+
+jQuery.extend({
+	// Check to see if the W3C box model is being used
+	boxModel: !jQuery.browser.msie || document.compatMode == "CSS1Compat",
+
+	props: {
+		"for": "htmlFor",
+		"class": "className",
+		"float": styleFloat,
+		cssFloat: styleFloat,
+		styleFloat: styleFloat,
+		readonly: "readOnly",
+		maxlength: "maxLength",
+		cellspacing: "cellSpacing"
+	}
+});
+
+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 ) );
+	};
+});
+
+jQuery.each({
+	appendTo: "append",
+	prependTo: "prepend",
+	insertBefore: "before",
+	insertAfter: "after",
+	replaceAll: "replaceWith"
+}, function(name, original){
+	jQuery.fn[ name ] = function() {
+		var args = arguments;
+
+		return this.each(function(){
+			for ( var i = 0, length = args.length; i < length; i++ )
+				jQuery( args[ i ] )[ original ]( this );
+		});
+	};
+});
+
+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 ) {
+		jQuery.className[ jQuery.className.has( this, classNames ) ? "remove" : "add" ]( this, classNames );
+	},
+
+	remove: function( selector ) {
+		if ( !selector || jQuery.filter( selector, [ this ] ).r.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 ).remove();
+
+		// Remove any remaining nodes
+		while ( this.firstChild )
+			this.removeChild( this.firstChild );
+	}
+}, function(name, fn){
+	jQuery.fn[ name ] = function(){
+		return this.each( fn, arguments );
+	};
+});
+
+jQuery.each([ "Height", "Width" ], function(i, name){
+	var type = name.toLowerCase();
+
+	jQuery.fn[ type ] = function( size ) {
+		// Get window width or height
+		return this[0] == window ?
+			// Opera reports document.body.client[Width/Height] properly in both quirks and standards
+			jQuery.browser.opera && document.body[ "client" + name ] ||
+
+			// Safari reports inner[Width/Height] just fine (Mozilla and Opera include scroll bar widths)
+			jQuery.browser.safari && window[ "inner" + name ] ||
+
+			// 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(
+					Math.max(document.body["scroll" + name], document.documentElement["scroll" + name]),
+					Math.max(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, size.constructor == String ? size : size + "px" );
+	};
+});
+
+// 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 chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ?
+		"(?:[\\w*_-]|\\\\.)" :
+		"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",
+	quickChild = new RegExp("^>\\s*(" + chars + "+)"),
+	quickID = new RegExp("^(" + chars + "+)(#)(" + chars + "+)"),
+	quickClass = new RegExp("^([#.]?)(" + chars + "*)");
+
+jQuery.extend({
+	expr: {
+		"": function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},
+		"#": function(a,i,m){return a.getAttribute("id")==m[2];},
+		":": {
+			// Position Checks
+			lt: function(a,i,m){return i<m[3]-0;},
+			gt: function(a,i,m){return i>m[3]-0;},
+			nth: function(a,i,m){return m[3]-0==i;},
+			eq: function(a,i,m){return m[3]-0==i;},
+			first: function(a,i){return i==0;},
+			last: function(a,i,m,r){return i==r.length-1;},
+			even: function(a,i){return i%2==0;},
+			odd: function(a,i){return i%2;},
+
+			// Child Checks
+			"first-child": function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},
+			"last-child": function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},
+			"only-child": function(a){return !jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},
+
+			// Parent Checks
+			parent: function(a){return a.firstChild;},
+			empty: function(a){return !a.firstChild;},
+
+			// Text Check
+			contains: function(a,i,m){return (a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},
+
+			// Visibility
+			visible: function(a){return "hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},
+			hidden: function(a){return "hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},
+
+			// Form attributes
+			enabled: function(a){return !a.disabled;},
+			disabled: function(a){return a.disabled;},
+			checked: function(a){return a.checked;},
+			selected: function(a){return a.selected||jQuery.attr(a,"selected");},
+
+			// Form elements
+			text: function(a){return "text"==a.type;},
+			radio: function(a){return "radio"==a.type;},
+			checkbox: function(a){return "checkbox"==a.type;},
+			file: function(a){return "file"==a.type;},
+			password: function(a){return "password"==a.type;},
+			submit: function(a){return "submit"==a.type;},
+			image: function(a){return "image"==a.type;},
+			reset: function(a){return "reset"==a.type;},
+			button: function(a){return "button"==a.type||jQuery.nodeName(a,"button");},
+			input: function(a){return /input|select|textarea|button/i.test(a.nodeName);},
+
+			// :has()
+			has: function(a,i,m){return jQuery.find(m[3],a).length;},
+
+			// :header
+			header: function(a){return /h\d/i.test(a.nodeName);},
+
+			// :animated
+			animated: function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}
+		}
+	},
+
+	// The regular expressions that power the parsing engine
+	parse: [
+		// Match: [@value='test'], [@foo]
+		/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,
+
+		// Match: :contains('foo')
+		/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,
+
+		// Match: :even, :last-child, #id, .class
+		new RegExp("^([:.#]*)(" + chars + "+)")
+	],
+
+	multiFilter: function( expr, elems, not ) {
+		var old, cur = [];
+
+		while ( expr && expr != old ) {
+			old = expr;
+			var f = jQuery.filter( expr, elems, not );
+			expr = f.t.replace(/^\s*,\s*/, "" );
+			cur = not ? elems = f.r : jQuery.merge( cur, f.r );
+		}
+
+		return cur;
+	},
+
+	find: function( t, context ) {
+		// Quickly handle non-string expressions
+		if ( typeof t != "string" )
+			return [ t ];
+
+		// check to make sure context is a DOM element or a document
+		if ( context && context.nodeType != 1 && context.nodeType != 9)
+			return [ ];
+
+		// Set the correct context (if none is provided)
+		context = context || document;
+
+		// Initialize the search
+		var ret = [context], done = [], last, nodeName;
+
+		// Continue while a selector expression exists, and while
+		// we're no longer looping upon ourselves
+		while ( t && last != t ) {
+			var r = [];
+			last = t;
+
+			t = jQuery.trim(t);
+
+			var foundToken = false,
+
+			// An attempt at speeding up child selectors that
+			// point to a specific element tag
+				re = quickChild,
+
+				m = re.exec(t);
+
+			if ( m ) {
+				nodeName = m[1].toUpperCase();
+
+				// Perform our own iteration and filter
+				for ( var i = 0; ret[i]; i++ )
+					for ( var c = ret[i].firstChild; c; c = c.nextSibling )
+						if ( c.nodeType == 1 && (nodeName == "*" || c.nodeName.toUpperCase() == nodeName) )
+							r.push( c );
+
+				ret = r;
+				t = t.replace( re, "" );
+				if ( t.indexOf(" ") == 0 ) continue;
+				foundToken = true;
+			} else {
+				re = /^([>+~])\s*(\w*)/i;
+
+				if ( (m = re.exec(t)) != null ) {
+					r = [];
+
+					var merge = {};
+					nodeName = m[2].toUpperCase();
+					m = m[1];
+
+					for ( var j = 0, rl = ret.length; j < rl; j++ ) {
+						var n = m == "~" || m == "+" ? ret[j].nextSibling : ret[j].firstChild;
+						for ( ; n; n = n.nextSibling )
+							if ( n.nodeType == 1 ) {
+								var id = jQuery.data(n);
+
+								if ( m == "~" && merge[id] ) break;
+
+								if (!nodeName || n.nodeName.toUpperCase() == nodeName ) {
+									if ( m == "~" ) merge[id] = true;
+									r.push( n );
+								}
+
+								if ( m == "+" ) break;
+							}
+					}
+
+					ret = r;
+
+					// And remove the token
+					t = jQuery.trim( t.replace( re, "" ) );
+					foundToken = true;
+				}
+			}
+
+			// See if there's still an expression, and that we haven't already
+			// matched a token
+			if ( t && !foundToken ) {
+				// Handle multiple expressions
+				if ( !t.indexOf(",") ) {
+					// Clean the result set
+					if ( context == ret[0] ) ret.shift();
+
+					// Merge the result sets
+					done = jQuery.merge( done, ret );
+
+					// Reset the context
+					r = ret = [context];
+
+					// Touch up the selector string
+					t = " " + t.substr(1,t.length);
+
+				} else {
+					// Optimize for the case nodeName#idName
+					var re2 = quickID;
+					var m = re2.exec(t);
+
+					// Re-organize the results, so that they're consistent
+					if ( m ) {
+						m = [ 0, m[2], m[3], m[1] ];
+
+					} else {
+						// Otherwise, do a traditional filter check for
+						// ID, class, and element selectors
+						re2 = quickClass;
+						m = re2.exec(t);
+					}
+
+					m[2] = m[2].replace(/\\/g, "");
+
+					var elem = ret[ret.length-1];
+
+					// Try to do a global search by ID, where we can
+					if ( m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) {
+						// Optimization for HTML document case
+						var oid = elem.getElementById(m[2]);
+
+						// Do a quick check for the existence of the actual ID attribute
+						// to avoid selecting by the name attribute in IE
+						// also check to insure id is a string to avoid selecting an element with the name of 'id' inside a form
+						if ( (jQuery.browser.msie||jQuery.browser.opera) && oid && typeof oid.id == "string" && oid.id != m[2] )
+							oid = jQuery('[@id="'+m[2]+'"]', elem)[0];
+
+						// Do a quick check for node name (where applicable) so
+						// that div#foo searches will be really fast
+						ret = r = oid && (!m[3] || jQuery.nodeName(oid, m[3])) ? [oid] : [];
+					} else {
+						// We need to find all descendant elements
+						for ( var i = 0; ret[i]; i++ ) {
+							// Grab the tag name being searched for
+							var tag = m[1] == "#" && m[3] ? m[3] : m[1] != "" || m[0] == "" ? "*" : m[2];
+
+							// Handle IE7 being really dumb about <object>s
+							if ( tag == "*" && ret[i].nodeName.toLowerCase() == "object" )
+								tag = "param";
+
+							r = jQuery.merge( r, ret[i].getElementsByTagName( tag ));
+						}
+
+						// It's faster to filter by class and be done with it
+						if ( m[1] == "." )
+							r = jQuery.classFilter( r, m[2] );
+
+						// Same with ID filtering
+						if ( m[1] == "#" ) {
+							var tmp = [];
+
+							// Try to find the element with the ID
+							for ( var i = 0; r[i]; i++ )
+								if ( r[i].getAttribute("id") == m[2] ) {
+									tmp = [ r[i] ];
+									break;
+								}
+
+							r = tmp;
+						}
+
+						ret = r;
+					}
+
+					t = t.replace( re2, "" );
+				}
+
+			}
+
+			// If a selector string still exists
+			if ( t ) {
+				// Attempt to filter it
+				var val = jQuery.filter(t,r);
+				ret = r = val.r;
+				t = jQuery.trim(val.t);
+			}
+		}
+
+		// An error occurred with the selector;
+		// just return an empty set instead
+		if ( t )
+			ret = [];
+
+		// Remove the root context
+		if ( ret && context == ret[0] )
+			ret.shift();
+
+		// And combine the results
+		done = jQuery.merge( done, ret );
+
+		return done;
+	},
+
+	classFilter: function(r,m,not){
+		m = " " + m + " ";
+		var tmp = [];
+		for ( var i = 0; r[i]; i++ ) {
+			var pass = (" " + r[i].className + " ").indexOf( m ) >= 0;
+			if ( !not && pass || not && !pass )
+				tmp.push( r[i] );
+		}
+		return tmp;
+	},
+
+	filter: function(t,r,not) {
+		var last;
+
+		// Look for common filter expressions
+		while ( t && t != last ) {
+			last = t;
+
+			var p = jQuery.parse, m;
+
+			for ( var i = 0; p[i]; i++ ) {
+				m = p[i].exec( t );
+
+				if ( m ) {
+					// Remove what we just matched
+					t = t.substring( m[0].length );
+
+					m[2] = m[2].replace(/\\/g, "");
+					break;
+				}
+			}
+
+			if ( !m )
+				break;
+
+			// :not() is a special case that can be optimized by
+			// keeping it out of the expression list
+			if ( m[1] == ":" && m[2] == "not" )
+				// optimize if only one selector found (most common case)
+				r = isSimple.test( m[3] ) ?
+					jQuery.filter(m[3], r, true).r :
+					jQuery( r ).not( m[3] );
+
+			// We can get a big speed boost by filtering by class here
+			else if ( m[1] == "." )
+				r = jQuery.classFilter(r, m[2], not);
+
+			else if ( m[1] == "[" ) {
+				var tmp = [], type = m[3];
+
+				for ( var i = 0, rl = r.length; i < rl; i++ ) {
+					var a = r[i], z = a[ jQuery.props[m[2]] || m[2] ];
+
+					if ( z == null || /href|src|selected/.test(m[2]) )
+						z = jQuery.attr(a,m[2]) || '';
+
+					if ( (type == "" && !!z ||
+						 type == "=" && z == m[5] ||
+						 type == "!=" && z != m[5] ||
+						 type == "^=" && z && !z.indexOf(m[5]) ||
+						 type == "$=" && z.substr(z.length - m[5].length) == m[5] ||
+						 (type == "*=" || type == "~=") && z.indexOf(m[5]) >= 0) ^ not )
+							tmp.push( a );
+				}
+
+				r = tmp;
+
+			// We can get a speed boost by handling nth-child here
+			} else if ( m[1] == ":" && m[2] == "nth-child" ) {
+				var merge = {}, tmp = [],
+					// parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
+					test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
+						m[3] == "even" && "2n" || m[3] == "odd" && "2n+1" ||
+						!/\D/.test(m[3]) && "0n+" + m[3] || m[3]),
+					// calculate the numbers (first)n+(last) including if they are negative
+					first = (test[1] + (test[2] || 1)) - 0, last = test[3] - 0;
+
+				// loop through all the elements left in the jQuery object
+				for ( var i = 0, rl = r.length; i < rl; i++ ) {
+					var node = r[i], parentNode = node.parentNode, id = jQuery.data(parentNode);
+
+					if ( !merge[id] ) {
+						var c = 1;
+
+						for ( var n = parentNode.firstChild; n; n = n.nextSibling )
+							if ( n.nodeType == 1 )
+								n.nodeIndex = c++;
+
+						merge[id] = true;
+					}
+
+					var add = false;
+
+					if ( first == 0 ) {
+						if ( node.nodeIndex == last )
+							add = true;
+					} else if ( (node.nodeIndex - last) % first == 0 && (node.nodeIndex - last) / first >= 0 )
+						add = true;
+
+					if ( add ^ not )
+						tmp.push( node );
+				}
+
+				r = tmp;
+
+			// Otherwise, find the expression to execute
+			} else {
+				var fn = jQuery.expr[ m[1] ];
+				if ( typeof fn == "object" )
+					fn = fn[ m[2] ];
+
+				if ( typeof fn == "string" )
+					fn = eval("false||function(a,i){return " + fn + ";}");
+
+				// Execute it against the current filter
+				r = jQuery.grep( r, function(elem, i){
+					return fn(elem, i, m, r);
+				}, not );
+			}
+		}
+
+		// Return an array of filtered elements (r)
+		// and the modified expression string (t)
+		return { r: r, t: t };
+	},
+
+	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;
+	},
+
+	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;
+	},
+
+	sibling: function( n, elem ) {
+		var r = [];
+
+		for ( ; n; n = n.nextSibling ) {
+			if ( n.nodeType == 1 && n != elem )
+				r.push( n );
+		}
+
+		return r;
+	}
+});
+/*
+ * A number of helper functions used for managing events.
+ * Many of the ideas behind this code orignated from
+ * Dean Edwards' addEvent library.
+ */
+jQuery.event = {
+
+	// Bind an event to an element
+	// Original by Dean Edwards
+	add: function(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 ( jQuery.browser.msie && elem.setInterval )
+			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, function() {
+				// Pass arguments and context to original handler
+				return fn.apply(this, arguments);
+			});
+
+			// 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
+				if ( typeof jQuery != "undefined" && !jQuery.event.triggered )
+					return jQuery.event.handle.apply(arguments.callee.elem, arguments);
+			});
+		// 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 parts = type.split(".");
+			type = parts[0];
+			handler.type = parts[1];
+
+			// Get the current list of functions bound to this event
+			var handlers = events[type];
+
+			// 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) === 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 parts = type.split(".");
+					type = parts[0];
+
+					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 ( handler in events[type] )
+								// Handle the removal of namespaced events
+								if ( !parts[1] || events[type][handler].type == parts[1] )
+									delete events[type][handler];
+
+						// 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) === 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" );
+			}
+		}
+	},
+
+	trigger: function(type, data, elem, donative, extra) {
+		// Clone the incoming data, if any
+		data = jQuery.makeArray(data);
+
+		if ( type.indexOf("!") >= 0 ) {
+			type = type.slice(0, -1);
+			var exclusive = true;
+		}
+
+		// Handle a global trigger
+		if ( !elem ) {
+			// Only trigger if we've ever bound an event for it
+			if ( this.global[type] )
+				jQuery("*").add([window, document]).trigger(type, data);
+
+		// Handle triggering a single element
+		} else {
+			// don't do events on text and comment nodes
+			if ( elem.nodeType == 3 || elem.nodeType == 8 )
+				return undefined;
+
+			var val, ret, fn = jQuery.isFunction( elem[ type ] || null ),
+				// Check to see if we need to provide a fake event, or not
+				event = !data[0] || !data[0].preventDefault;
+
+			// Pass along a fake event
+			if ( event ) {
+				data.unshift({
+					type: type,
+					target: elem,
+					preventDefault: function(){},
+					stopPropagation: function(){},
+					timeStamp: now()
+				});
+				data[0][expando] = true; // no need to fix fake event
+			}
+
+			// Enforce the right trigger type
+			data[0].type = type;
+			if ( exclusive )
+				data[0].exclusive = true;
+
+			// Trigger the event, it is assumed that "handle" is a function
+			var handle = jQuery.data(elem, "handle");
+			if ( handle )
+				val = handle.apply( elem, data );
+
+			// Handle triggering native .onfoo handlers (and on links since we don't call .click() for links)
+			if ( (!fn || (jQuery.nodeName(elem, 'a') && type == "click")) && elem["on"+type] && elem["on"+type].apply( elem, data ) === false )
+				val = false;
+
+			// Extra functions don't get the custom event object
+			if ( event )
+				data.shift();
+
+			// Handle triggering of extra function
+			if ( extra && jQuery.isFunction( extra ) ) {
+				// call the extra function and tack the current return value on the end for possible inspection
+				ret = extra.apply( elem, val == null ? data : data.concat( val ) );
+				// if anything is returned, give it precedence and have it overwrite the previous value
+				if (ret !== undefined)
+					val = ret;
+			}
+
+			// Trigger the native events (except for clicks on links)
+			if ( fn && donative !== false && val !== false && !(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;
+		}
+
+		return val;
+	},
+
+	handle: function(event) {
+		// returned undefined or false
+		var val, ret, namespace, all, handlers;
+
+		event = arguments[0] = jQuery.event.fix( event || window.event );
+
+		// Namespaced event handlers
+		namespace = event.type.split(".");
+		event.type = namespace[0];
+		namespace = namespace[1];
+		// Cache this now, all = true means, any handler
+		all = !namespace && !event.exclusive;
+
+		handlers = ( jQuery.data(this, "events") || {} )[event.type];
+
+		for ( var j in handlers ) {
+			var handler = handlers[j];
+
+			// Filter the functions by class
+			if ( all || handler.type == namespace ) {
+				// Pass in a reference to the handler function itself
+				// So that we can later remove it
+				event.handler = handler;
+				event.data = handler.data;
+
+				ret = handler.apply( this, arguments );
+
+				if ( val !== false )
+					val = ret;
+
+				if ( ret === false ) {
+					event.preventDefault();
+					event.stopPropagation();
+				}
+			}
+		}
+
+		return val;
+	},
+
+	fix: function(event) {
+		if ( event[expando] == true )
+			return event;
+
+		// store a copy of the original event object
+		// and "clone" to set read-only properties
+		var originalEvent = event;
+		event = { originalEvent: originalEvent };
+		var 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 timeStamp toElement type view wheelDelta which".split(" ");
+		for ( var i=props.length; i; i-- )
+			event[ props[i] ] = originalEvent[ props[i] ];
+
+		// Mark it as fixed
+		event[expando] = true;
+
+		// add preventDefault and stopPropagation since
+		// they will not work on the clone
+		event.preventDefault = function() {
+			// if preventDefault exists run it on the original event
+			if (originalEvent.preventDefault)
+				originalEvent.preventDefault();
+			// otherwise set the returnValue property of the original event to false (IE)
+			originalEvent.returnValue = false;
+		};
+		event.stopPropagation = function() {
+			// if stopPropagation exists run it on the original event
+			if (originalEvent.stopPropagation)
+				originalEvent.stopPropagation();
+			// otherwise set the cancelBubble property of the original event to true (IE)
+			originalEvent.cancelBubble = true;
+		};
+
+		// Fix timeStamp
+		event.timeStamp = event.timeStamp || now();
+
+		// 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 ){
+		// 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: {
+			setup: function() {
+				// Make sure the ready event is setup
+				bindReady();
+				return;
+			},
+
+			teardown: function() { return; }
+		},
+
+		mouseenter: {
+			setup: function() {
+				if ( jQuery.browser.msie ) return false;
+				jQuery(this).bind("mouseover", jQuery.event.special.mouseenter.handler);
+				return true;
+			},
+
+			teardown: function() {
+				if ( jQuery.browser.msie ) return false;
+				jQuery(this).unbind("mouseover", jQuery.event.special.mouseenter.handler);
+				return true;
+			},
+
+			handler: function(event) {
+				// If we actually just moused on to a sub-element, ignore it
+				if ( withinElement(event, this) ) return true;
+				// Execute the right handlers by setting the event type to mouseenter
+				event.type = "mouseenter";
+				return jQuery.event.handle.apply(this, arguments);
+			}
+		},
+
+		mouseleave: {
+			setup: function() {
+				if ( jQuery.browser.msie ) return false;
+				jQuery(this).bind("mouseout", jQuery.event.special.mouseleave.handler);
+				return true;
+			},
+
+			teardown: function() {
+				if ( jQuery.browser.msie ) return false;
+				jQuery(this).unbind("mouseout", jQuery.event.special.mouseleave.handler);
+				return true;
+			},
+
+			handler: function(event) {
+				// If we actually just moused on to a sub-element, ignore it
+				if ( withinElement(event, this) ) return true;
+				// Execute the right handlers by setting the event type to mouseleave
+				event.type = "mouseleave";
+				return jQuery.event.handle.apply(this, arguments);
+			}
+		}
+	}
+};
+
+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, fn ) {
+		return this.each(function(){
+			jQuery.event.trigger( type, data, this, true, fn );
+		});
+	},
+
+	triggerHandler: function( type, data, fn ) {
+		return this[0] && jQuery.event.trigger( type, data, this[0], false, fn );
+	},
+
+	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.bind('mouseenter', fnOver).bind('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( function() { return fn.call(this, jQuery); } );
+
+		return this;
+	}
+});
+
+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 );
+				});
+
+				// 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 (see further below for it) and webkit nightlies currently support this event
+	if ( document.addEventListener && !jQuery.browser.opera)
+		// Use the handy event callback
+		document.addEventListener( "DOMContentLoaded", jQuery.ready, false );
+
+	// If IE is used and is not in a frame
+	// Continually check to see if the document is ready
+	if ( jQuery.browser.msie && 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();
+	})();
+
+	if ( jQuery.browser.opera )
+		document.addEventListener( "DOMContentLoaded", function () {
+			if (jQuery.isReady) return;
+			for (var i = 0; i < document.styleSheets.length; i++)
+				if (document.styleSheets[i].disabled) {
+					setTimeout( arguments.callee, 0 );
+					return;
+				}
+			// and execute any waiting functions
+			jQuery.ready();
+		}, false);
+
+	if ( jQuery.browser.safari ) {
+		var numStyles;
+		(function(){
+			if (jQuery.isReady) return;
+			if ( document.readyState != "loaded" && document.readyState != "complete" ) {
+				setTimeout( arguments.callee, 0 );
+				return;
+			}
+			if ( numStyles === undefined )
+				numStyles = jQuery("style, link[rel=stylesheet]").length;
+			if ( document.styleSheets.length != numStyles ) {
+				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,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);
+	};
+});
+
+// Checks if an event happened on an element within another element
+// Used in jQuery.event.special.mouseenter and mouseleave handlers
+var withinElement = function(event, elem) {
+	// Check if mouse(over|out) are still within the same parent element
+	var parent = event.relatedTarget;
+	// Traverse up the tree
+	while ( parent && parent != elem ) try { parent = parent.parentNode; } catch(error) { parent = elem; }
+	// Return true if we actually just moused on to a sub-element
+	return parent == elem;
+};
+
+// 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() {
+	jQuery("*").add(document).unbind();
+});
+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);
+		}
+
+		callback = callback || function(){};
+
+		// Default to a GET request
+		var type = "GET";
+
+		// If the second parameter was provided
+		if ( params )
+			// If it's a function
+			if ( jQuery.isFunction( params ) ) {
+				// We assume that it's the callback
+				callback = params;
+				params = null;
+
+			// Otherwise, build a param string
+			} else {
+				params = jQuery.param( params );
+				type = "POST";
+			}
+
+		var self = this;
+
+		// Request the remote document
+		jQuery.ajax({
+			url: url,
+			type: type,
+			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 );
+
+				self.each( callback, [res.responseText, status, res] );
+			}
+		});
+		return this;
+	},
+
+	serialize: function() {
+		return jQuery.param(this.serializeArray());
+	},
+	serializeArray: function() {
+		return this.map(function(){
+			return jQuery.nodeName(this, "form") ?
+				jQuery.makeArray(this.elements) : this;
+		})
+		.filter(function(){
+			return this.name && !this.disabled &&
+				(this.checked || /select|textarea/i.test(this.nodeName) ||
+					/text|hidden|password/i.test(this.type));
+		})
+		.map(function(i, elem){
+			var val = jQuery(this).val();
+			return val == null ? null :
+				val.constructor == Array ?
+					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",
+		timeout: 0,
+		contentType: "application/x-www-form-urlencoded",
+		processData: true,
+		async: true,
+		data: null,
+		username: null,
+		password: null,
+		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 remote = /^(?:\w+:)?\/\/([^\/?#]+)/;
+
+		// If we're requesting a remote document
+		// and trying to load JSON or Script with a GET
+		if ( s.dataType == "script" && type == "GET"
+				&& remote.test(s.url) && remote.exec(s.url)[1] != 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();
+						head.removeChild( script );
+					}
+				};
+			}
+
+			head.appendChild(script);
+
+			// We handle everything using the script element injection
+			return undefined;
+		}
+
+		var requestDone = false;
+
+		// Create the request object; Microsoft failed to properly
+		// implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
+		var xhr = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
+
+		// 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
+		if ( s.beforeSend && s.beforeSend(xhr, s) === false ) {
+			// cleanup active request counter
+			s.global && jQuery.active--;
+			// 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 transfer is complete and the data is available, or the request timed out
+			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.dataFilter );
+					} 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();
+
+				// 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 ) {
+						// Cancel the request
+						xhr.abort();
+
+						if( !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 ||
+				jQuery.browser.safari && xhr.status == undefined;
+		} 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] ||
+				jQuery.browser.safari && xhr.status == undefined;
+		} catch(e){}
+		return false;
+	},
+
+	httpData: function( xhr, type, filter ) {
+		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
+		if( filter )
+			data = filter( data, type );
+
+		// 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 = 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 = [];
+
+		// If an array was passed in, assume that it is an array
+		// of form elements
+		if ( a.constructor == Array || a.jquery )
+			// Serialize the form elements
+			jQuery.each( a, function(){
+				s.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( this.value ) );
+			});
+
+		// Otherwise, assume that it's an object of key/value pairs
+		else
+			// Serialize the key/values
+			for ( var j in a )
+				// If the value is an array then the key names need to be repeated
+				if ( a[j] && a[j].constructor == Array )
+					jQuery.each( a[j], function(){
+						s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) );
+					});
+				else
+					s.push( encodeURIComponent(j) + "=" + encodeURIComponent( jQuery.isFunction(a[j]) ? a[j]() : a[j] ) );
+
+		// Return the resulting serialization
+		return s.join("&").replace(/%20/g, "+");
+	}
+
+});
+jQuery.fn.extend({
+	show: function(speed,callback){
+		return speed ?
+			this.animate({
+				height: "show", width: "show", opacity: "show"
+			}, speed, callback) :
+
+			this.filter(":hidden").each(function(){
+				this.style.display = this.oldblock || "";
+				if ( jQuery.css(this,"display") == "none" ) {
+					var elem = jQuery("<" + this.tagName + " />").appendTo("body");
+					this.style.display = elem.css("display");
+					// handle an edge condition where css is - div { display:none; } or similar
+					if (this.style.display == "none")
+						this.style.display = "block";
+					elem.remove();
+				}
+			}).end();
+	},
+
+	hide: function(speed,callback){
+		return speed ?
+			this.animate({
+				height: "hide", width: "hide", opacity: "hide"
+			}, speed, callback) :
+
+			this.filter(":visible").each(function(){
+				this.oldblock = this.oldblock || jQuery.css(this,"display");
+				this.style.display = "none";
+			}).end();
+	},
+
+	// Save the old toggle function
+	_toggle: jQuery.fn.toggle,
+
+	toggle: function( fn, fn2 ){
+		return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
+			this._toggle.apply( this, arguments ) :
+			fn ?
+				this.animate({
+					height: "toggle", width: "toggle", opacity: "toggle"
+				}, fn, fn2) :
+				this.each(function(){
+					jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
+				});
+	},
+
+	slideDown: function(speed,callback){
+		return this.animate({height: "show"}, speed, callback);
+	},
+
+	slideUp: function(speed,callback){
+		return this.animate({height: "hide"}, speed, callback);
+	},
+
+	slideToggle: function(speed, callback){
+		return this.animate({height: "toggle"}, speed, callback);
+	},
+
+	fadeIn: function(speed, callback){
+		return this.animate({opacity: "show"}, speed, callback);
+	},
+
+	fadeOut: function(speed, callback){
+		return this.animate({opacity: "hide"}, speed, callback);
+	},
+
+	fadeTo: function(speed,to,callback){
+		return this.animate({opacity: to}, speed, callback);
+	},
+
+	animate: function( prop, speed, easing, callback ) {
+		var optall = jQuery.speed(speed, easing, callback);
+
+		return this[ optall.queue === false ? "each" : "queue" ](function(){
+			if ( this.nodeType != 1)
+				return false;
+
+			var opt = jQuery.extend({}, optall), p,
+				hidden = 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" ) {
+					// 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;
+		});
+	},
+
+	queue: function(type, fn){
+		if ( jQuery.isFunction(type) || ( type && type.constructor == Array )) {
+			fn = type;
+			type = "fx";
+		}
+
+		if ( !type || (typeof type == "string" && !fn) )
+			return queue( this[0], type );
+
+		return this.each(function(){
+			if ( fn.constructor == Array )
+				queue(this, type, fn);
+			else {
+				queue(this, type).push( fn );
+
+				if ( queue(this, type).length == 1 )
+					fn.call(this);
+			}
+		});
+	},
+
+	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;
+	}
+
+});
+
+var queue = function( elem, type, array ) {
+	if ( elem ){
+
+		type = type || "fx";
+
+		var q = jQuery.data( elem, type + "queue" );
+
+		if ( !q || array )
+			q = jQuery.data( elem, type + "queue", jQuery.makeArray(array) );
+
+	}
+	return q;
+};
+
+jQuery.fn.dequeue = function(type){
+	type = type || "fx";
+
+	return this.each(function(){
+		var q = queue(this, type);
+
+		q.shift();
+
+		if ( q.length )
+			q[0].call( this );
+	});
+};
+
+jQuery.extend({
+
+	speed: function(speed, easing, fn) {
+		var opt = speed && speed.constructor == Object ? speed : {
+			complete: fn || !fn && easing ||
+				jQuery.isFunction( speed ) && speed,
+			duration: speed,
+			easing: fn && easing || easing && easing.constructor != Function && easing
+		};
+
+		opt.duration = (opt.duration && opt.duration.constructor == Number ?
+			opt.duration :
+			jQuery.fx.speeds[opt.duration]) || jQuery.fx.speeds.def;
+
+		// 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: [],
+	timerId: null,
+
+	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.display = "block";
+	},
+
+	// Get the current size
+	cur: function(force){
+		if ( this.elem[this.prop] != null && 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;
+		this.update();
+
+		var self = this;
+		function t(gotoEnd){
+			return self.step(gotoEnd);
+		}
+
+		t.elem = this.elem;
+
+		jQuery.timers.push(t);
+
+		if ( jQuery.timerId == null ) {
+			jQuery.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( jQuery.timerId );
+					jQuery.timerId = null;
+				}
+			}, 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
+		this.custom(0, this.cur());
+
+		// Make sure that we start at a small width/height to avoid any
+		// flash of content
+		if ( this.prop == "width" || this.prop == "height" )
+			this.elem.style[this.prop] = "1px";
+
+		// 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 )
+					this.elem.style.display = "none";
+
+				// 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]);
+			}
+
+			if ( done )
+				// 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
+ 		def: 400
+	},
+	step: {
+		scrollLeft: function(fx){
+			fx.elem.scrollLeft = fx.now;
+		},
+
+		scrollTop: function(fx){
+			fx.elem.scrollTop = fx.now;
+		},
+
+		opacity: function(fx){
+			jQuery.attr(fx.elem.style, "opacity", fx.now);
+		},
+
+		_default: function(fx){
+			fx.elem.style[ fx.prop ] = fx.now + fx.unit;
+		}
+	}
+});
+// The Offset Method
+// Originally By Brandon Aaron, part of the Dimension Plugin
+// http://jquery.com/plugins/project/dimensions
+jQuery.fn.offset = function() {
+	var left = 0, top = 0, elem = this[0], results;
+
+	if ( elem ) with ( jQuery.browser ) {
+		var parent       = elem.parentNode,
+		    offsetChild  = elem,
+		    offsetParent = elem.offsetParent,
+		    doc          = elem.ownerDocument,
+		    safari2      = safari && parseInt(version) < 522 && !/adobeair/i.test(userAgent),
+		    css          = jQuery.curCSS,
+		    fixed        = css(elem, "position") == "fixed";
+
+		// Use getBoundingClientRect if available
+		if ( elem.getBoundingClientRect ) {
+			var box = elem.getBoundingClientRect();
+
+			// Add the document scroll offsets
+			add(box.left + Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft),
+				box.top  + Math.max(doc.documentElement.scrollTop,  doc.body.scrollTop));
+
+			// IE adds the HTML element's border, by default it is medium which is 2px
+			// IE 6 and 7 quirks mode the border width is overwritable by the following css html { border: 0; }
+			// IE 7 standards mode, the border is always 2px
+			// This border/offset is typically represented by the clientLeft and clientTop properties
+			// However, in IE6 and 7 quirks mode the clientLeft and clientTop properties are not updated when overwriting it via CSS
+			// Therefore this method will be off by 2px in IE while in quirksmode
+			add( -doc.documentElement.clientLeft, -doc.documentElement.clientTop );
+
+		// Otherwise loop through the offsetParents and parentNodes
+		} else {
+
+			// Initial element offsets
+			add( elem.offsetLeft, elem.offsetTop );
+
+			// Get parent offsets
+			while ( offsetParent ) {
+				// Add offsetParent offsets
+				add( offsetParent.offsetLeft, offsetParent.offsetTop );
+
+				// Mozilla and Safari > 2 does not include the border on offset parents
+				// However Mozilla adds the border for table or table cells
+				if ( mozilla && !/^t(able|d|h)$/i.test(offsetParent.tagName) || safari && !safari2 )
+					border( offsetParent );
+
+				// Add the document scroll offsets if position is fixed on any offsetParent
+				if ( !fixed && css(offsetParent, "position") == "fixed" )
+					fixed = true;
+
+				// Set offsetChild to previous offsetParent unless it is the body element
+				offsetChild  = /^body$/i.test(offsetParent.tagName) ? offsetChild : offsetParent;
+				// Get next offsetParent
+				offsetParent = offsetParent.offsetParent;
+			}
+
+			// Get parent scroll offsets
+			while ( parent && parent.tagName && !/^body|html$/i.test(parent.tagName) ) {
+				// Remove parent scroll UNLESS that parent is inline or a table to work around Opera inline/table scrollLeft/Top bug
+				if ( !/^inline|table.*$/i.test(css(parent, "display")) )
+					// Subtract parent scroll offsets
+					add( -parent.scrollLeft, -parent.scrollTop );
+
+				// Mozilla does not add the border for a parent that has overflow != visible
+				if ( mozilla && css(parent, "overflow") != "visible" )
+					border( parent );
+
+				// Get next parent
+				parent = parent.parentNode;
+			}
+
+			// Safari <= 2 doubles body offsets with a fixed position element/offsetParent or absolutely positioned offsetChild
+			// Mozilla doubles body offsets with a non-absolutely positioned offsetChild
+			if ( (safari2 && (fixed || css(offsetChild, "position") == "absolute")) ||
+				(mozilla && css(offsetChild, "position") != "absolute") )
+					add( -doc.body.offsetLeft, -doc.body.offsetTop );
+
+			// Add the document scroll offsets if position is fixed
+			if ( fixed )
+				add(Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft),
+					Math.max(doc.documentElement.scrollTop,  doc.body.scrollTop));
+		}
+
+		// Return an object with top and left properties
+		results = { top: top, left: left };
+	}
+
+	function border(elem) {
+		add( jQuery.curCSS(elem, "borderLeftWidth", true), jQuery.curCSS(elem, "borderTopWidth", true) );
+	}
+
+	function add(l, t) {
+		left += parseInt(l, 10) || 0;
+		top += parseInt(t, 10) || 0;
+	}
+
+	return results;
+};
+
+
+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;
+		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;
+
+		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
+
+	// innerHeight and innerWidth
+	jQuery.fn["inner" + name] = function(){
+		return this[ name.toLowerCase() ]() +
+			num(this, "padding" + tl) +
+			num(this, "padding" + br);
+	};
+
+	// outerHeight and outerWidth
+	jQuery.fn["outer" + name] = function(margin) {
+		return this["inner" + name]() +
+			num(this, "border" + tl + "Width") +
+			num(this, "border" + br + "Width") +
+			(margin ?
+				num(this, "margin" + tl) + num(this, "margin" + br) : 0);
+	};
+
+});})();
Index: sandbox/newExpressoMail/prototype/plugins/layout/simple.html
===================================================================
--- sandbox/newExpressoMail/prototype/plugins/layout/simple.html	(revision 7209)
+++ sandbox/newExpressoMail/prototype/plugins/layout/simple.html	(revision 7209)
@@ -0,0 +1,201 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+
+	<title>Simple Layout Demo</title>
+
+	<script type="text/javascript" src="jquery.js"></script>
+	<script type="text/javascript" src="jquery.ui.all.js"></script>
+	<script type="text/javascript" src="jquery.layout.js"></script>
+
+	<script type="text/javascript" src="js/complex.js"></script>
+
+	<script type="text/javascript">
+
+	var myLayout; // a var is required because this page utilizes: myLayout.allowOverflow() method
+
+	$(document).ready(function () {
+		myLayout = $('body').layout({
+			// enable showOverflow on west-pane so popups will overlap north pane
+			west__showOverflowOnHover: true
+
+		//,	west__fxSettings_open: { easing: "easeOutBounce", duration: 750 }
+		});
+ 	});
+
+	</script>
+
+
+	<style type="text/css">
+	/**
+	 *	Basic Layout Theme
+	 * 
+	 *	This theme uses the default layout class-names for all classes
+	 *	Add any 'custom class-names', from options: paneClass, resizerClass, togglerClass
+	 */
+
+	.ui-layout-pane { /* all 'panes' */ 
+		background: #FFF; 
+		border: 1px solid #BBB; 
+		padding: 10px; 
+		overflow: auto;
+	} 
+
+	.ui-layout-resizer { /* all 'resizer-bars' */ 
+		background: #DDD; 
+	} 
+
+	.ui-layout-toggler { /* all 'toggler-buttons' */ 
+		background: #AAA; 
+	} 
+
+
+	</style>
+
+
+	<style type="text/css">
+	/**
+	 *	ALL CSS below is only for cosmetic and demo purposes
+	 *	Nothing here affects the appearance of the layout
+	 */
+
+	body {
+		font-family: Arial, sans-serif;
+		font-size: 0.85em;
+	}
+	p {
+		margin: 1em 0;
+	}
+
+	/*
+	 *	Rules below are for simulated drop-down/pop-up lists
+	 */
+
+	ul {
+		/* rules common to BOTH inner and outer UL */
+		z-index:	100000;
+		margin:		1ex 0;
+		padding:	0;
+		list-style:	none;
+		cursor:		pointer;
+		border:		1px solid Black;
+		/* rules for outer UL only */
+		width:		15ex;
+		position:	relative;
+	}
+	ul li {
+		background-color: #EEE;
+		padding: 0.15em 1em 0.3em 5px;
+	}
+	ul ul {
+		display:	none;
+		position:	absolute;
+		width:		100%;
+		left:		-1px;
+		/* Pop-Up */
+		bottom:		0;
+		margin:		0;
+		margin-bottom: 1.55em;
+	}
+	.ui-layout-north ul ul {
+		/* Drop-Down */
+		bottom:		auto;
+		margin:		0;
+		margin-top:	1.45em;
+	}
+	ul ul li		{ padding: 3px 1em 3px 5px; }
+	ul ul li:hover	{ background-color: #FF9; }
+	ul li:hover ul	{ display:	block; background-color: #EEE; }
+
+	</style>
+
+</head>
+<body>
+
+<!-- manually attach allowOverflow method to pane -->
+<div class="ui-layout-north" onmouseover="myLayout.allowOverflow('north')" onmouseout="myLayout.resetOverflow(this)">
+	This is the north pane, closable, slidable and resizable
+
+	<ul>
+		<li>
+			<ul>
+				<li>one</li>
+				<li>two</li>
+				<li>three</li>
+				<li>four</li>
+				<li>five</li>
+			</ul>
+			Drop-Down <!-- put this below so IE and FF render the same! -->
+		</li>
+	</ul>
+
+</div>
+
+<!-- allowOverflow auto-attached by option: west__showOverflowOnHover = true -->
+<div class="ui-layout-west">
+	This is the west pane, closable, slidable and resizable
+
+	<ul>
+		<li>
+			<ul>
+				<li>one</li>
+				<li>two</li>
+				<li>three</li>
+				<li>four</li>
+				<li>five</li>
+			</ul>
+			Pop-Up <!-- put this below so IE and FF render the same! -->
+		</li>
+	</ul>
+
+	<p><button onclick="myLayout.close('west')">Close Me</button></p>
+
+	<p><a href="#" onClick="showOptions(myLayout,'defaults.fxSettings_open');showOptions(myLayout,'west.fxSettings_close')">Show Options.Defaults</a></p>
+
+</div>
+
+<div class="ui-layout-south">
+	This is the south pane, closable, slidable and resizable &nbsp;
+	<button onclick="myLayout.toggle('north')">Toggle North Pane</button>
+</div>
+
+<div class="ui-layout-east">
+	This is the east pane, closable, slidable and resizable
+
+	<!-- attach allowOverflow method to this specific element -->
+	<ul onmouseover="myLayout.allowOverflow(this)" onmouseout="myLayout.resetOverflow('east')">
+		<li>
+			<ul>
+				<li>one</li>
+				<li>two</li>
+				<li>three</li>
+				<li>four</li>
+				<li>five</li>
+			</ul>
+			Pop-Up <!-- put this below so IE and FF render the same! -->
+		</li>
+	</ul>
+
+	<p><button onclick="myLayout.close('east')">Close Me</button></p>
+
+	<p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p>
+	<p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p>
+	<p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p>
+	<p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p>
+</div>
+
+<div class="ui-layout-center">
+	This center pane auto-sizes to fit the space <i>between</i> the 'border-panes'
+	<p>This layout was created with only <b>default options</b> - no customization</p>
+	<p>Only the <b>applyDefaultStyles</b> option was enabled for <i>basic</i> formatting</p>
+	<p>The Pop-Up and Drop-Down lists demonstrate the <b>allowOverflow()</b> utility</p>
+	<p>The Close and Toggle buttons are examples of <b>custom buttons</b></p>
+	<p><a href="http://layout.jquery-dev.net/demos.html">Go to the Demos page</a></p>
+	<p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p>
+	<p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p>
+	<p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p>
+	<p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p><p>...</p>
+</div>
+
+</body>
+</html>
Index: sandbox/newExpressoMail/prototype/plugins/layout/jquery.ui.all.js
===================================================================
--- sandbox/newExpressoMail/prototype/plugins/layout/jquery.ui.all.js	(revision 7209)
+++ sandbox/newExpressoMail/prototype/plugins/layout/jquery.ui.all.js	(revision 7209)
@@ -0,0 +1,7600 @@
+/*
+ * jQuery UI 1.5.2
+ *
+ * Copyright (c) 2008 Paul Bakaus (ui.jquery.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI
+ */
+;(function($) {
+
+$.ui = {
+	plugin: {
+		add: function(module, option, set) {
+			var proto = $.ui[module].prototype;
+			for(var i in set) {
+				proto.plugins[i] = proto.plugins[i] || [];
+				proto.plugins[i].push([option, set[i]]);
+			}
+		},
+		call: function(instance, name, args) {
+			var set = instance.plugins[name];
+			if(!set) { return; }
+			
+			for (var i = 0; i < set.length; i++) {
+				if (instance.options[set[i][0]]) {
+					set[i][1].apply(instance.element, args);
+				}
+			}
+		}	
+	},
+	cssCache: {},
+	css: function(name) {
+		if ($.ui.cssCache[name]) { return $.ui.cssCache[name]; }
+		var tmp = $('<div class="ui-gen">').addClass(name).css({position:'absolute', top:'-5000px', left:'-5000px', display:'block'}).appendTo('body');
+		
+		//if (!$.browser.safari)
+			//tmp.appendTo('body'); 
+		
+		//Opera and Safari set width and height to 0px instead of auto
+		//Safari returns rgba(0,0,0,0) when bgcolor is not set
+		$.ui.cssCache[name] = !!(
+			(!(/auto|default/).test(tmp.css('cursor')) || (/^[1-9]/).test(tmp.css('height')) || (/^[1-9]/).test(tmp.css('width')) || 
+			!(/none/).test(tmp.css('backgroundImage')) || !(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor')))
+		);
+		try { $('body').get(0).removeChild(tmp.get(0));	} catch(e){}
+		return $.ui.cssCache[name];
+	},
+	disableSelection: function(el) {
+		$(el).attr('unselectable', 'on').css('MozUserSelect', 'none');
+	},
+	enableSelection: function(el) {
+		$(el).attr('unselectable', 'off').css('MozUserSelect', '');
+	},
+	hasScroll: function(e, a) {
+		var scroll = /top/.test(a||"top") ? 'scrollTop' : 'scrollLeft', has = false;
+		if (e[scroll] > 0) return true; e[scroll] = 1;
+		has = e[scroll] > 0 ? true : false; e[scroll] = 0;
+		return has;
+	}
+};
+
+
+/** jQuery core modifications and additions **/
+
+var _remove = $.fn.remove;
+$.fn.remove = function() {
+	$("*", this).add(this).triggerHandler("remove");
+	return _remove.apply(this, arguments );
+};
+
+// $.widget is a factory to create jQuery plugins
+// taking some boilerplate code out of the plugin code
+// created by Scott GonzÃ¡lez and JÃ¶rn Zaefferer
+function getter(namespace, plugin, method) {
+	var methods = $[namespace][plugin].getter || [];
+	methods = (typeof methods == "string" ? methods.split(/,?\s+/) : methods);
+	return ($.inArray(method, methods) != -1);
+}
+
+$.widget = function(name, prototype) {
+	var namespace = name.split(".")[0];
+	name = name.split(".")[1];
+	
+	// create plugin method
+	$.fn[name] = function(options) {
+		var isMethodCall = (typeof options == 'string'),
+			args = Array.prototype.slice.call(arguments, 1);
+		
+		if (isMethodCall && getter(namespace, name, options)) {
+			var instance = $.data(this[0], name);
+			return (instance ? instance[options].apply(instance, args)
+				: undefined);
+		}
+		
+		return this.each(function() {
+			var instance = $.data(this, name);
+			if (isMethodCall && instance && $.isFunction(instance[options])) {
+				instance[options].apply(instance, args);
+			} else if (!isMethodCall) {
+				$.data(this, name, new $[namespace][name](this, options));
+			}
+		});
+	};
+	
+	// create widget constructor
+	$[namespace][name] = function(element, options) {
+		var self = this;
+		
+		this.widgetName = name;
+		this.widgetBaseClass = namespace + '-' + name;
+		
+		this.options = $.extend({}, $.widget.defaults, $[namespace][name].defaults, options);
+		this.element = $(element)
+			.bind('setData.' + name, function(e, key, value) {
+				return self.setData(key, value);
+			})
+			.bind('getData.' + name, function(e, key) {
+				return self.getData(key);
+			})
+			.bind('remove', function() {
+				return self.destroy();
+			});
+		this.init();
+	};
+	
+	// add widget prototype
+	$[namespace][name].prototype = $.extend({}, $.widget.prototype, prototype);
+};
+
+$.widget.prototype = {
+	init: function() {},
+	destroy: function() {
+		this.element.removeData(this.widgetName);
+	},
+	
+	getData: function(key) {
+		return this.options[key];
+	},
+	setData: function(key, value) {
+		this.options[key] = value;
+		
+		if (key == 'disabled') {
+			this.element[value ? 'addClass' : 'removeClass'](
+				this.widgetBaseClass + '-disabled');
+		}
+	},
+	
+	enable: function() {
+		this.setData('disabled', false);
+	},
+	disable: function() {
+		this.setData('disabled', true);
+	}
+};
+
+$.widget.defaults = {
+	disabled: false
+};
+
+
+/** Mouse Interaction Plugin **/
+
+$.ui.mouse = {
+	mouseInit: function() {
+		var self = this;
+	
+		this.element.bind('mousedown.'+this.widgetName, function(e) {
+			return self.mouseDown(e);
+		});
+		
+		// Prevent text selection in IE
+		if ($.browser.msie) {
+			this._mouseUnselectable = this.element.attr('unselectable');
+			this.element.attr('unselectable', 'on');
+		}
+		
+		this.started = false;
+	},
+	
+	// TODO: make sure destroying one instance of mouse doesn't mess with
+	// other instances of mouse
+	mouseDestroy: function() {
+		this.element.unbind('.'+this.widgetName);
+		
+		// Restore text selection in IE
+		($.browser.msie
+			&& this.element.attr('unselectable', this._mouseUnselectable));
+	},
+	
+	mouseDown: function(e) {
+		// we may have missed mouseup (out of window)
+		(this._mouseStarted && this.mouseUp(e));
+		
+		this._mouseDownEvent = e;
+		
+		var self = this,
+			btnIsLeft = (e.which == 1),
+			elIsCancel = (typeof this.options.cancel == "string" ? $(e.target).parents().add(e.target).filter(this.options.cancel).length : false);
+		if (!btnIsLeft || elIsCancel || !this.mouseCapture(e)) {
+			return true;
+		}
+		
+		this._mouseDelayMet = !this.options.delay;
+		if (!this._mouseDelayMet) {
+			this._mouseDelayTimer = setTimeout(function() {
+				self._mouseDelayMet = true;
+			}, this.options.delay);
+		}
+		
+		if (this.mouseDistanceMet(e) && this.mouseDelayMet(e)) {
+			this._mouseStarted = (this.mouseStart(e) !== false);
+			if (!this._mouseStarted) {
+				e.preventDefault();
+				return true;
+			}
+		}
+		
+		// these delegates are required to keep context
+		this._mouseMoveDelegate = function(e) {
+			return self.mouseMove(e);
+		};
+		this._mouseUpDelegate = function(e) {
+			return self.mouseUp(e);
+		};
+		$(document)
+			.bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+			.bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+		
+		return false;
+	},
+	
+	mouseMove: function(e) {
+		// IE mouseup check - mouseup happened when mouse was out of window
+		if ($.browser.msie && !e.button) {
+			return this.mouseUp(e);
+		}
+		
+		if (this._mouseStarted) {
+			this.mouseDrag(e);
+			return false;
+		}
+		
+		if (this.mouseDistanceMet(e) && this.mouseDelayMet(e)) {
+			this._mouseStarted =
+				(this.mouseStart(this._mouseDownEvent, e) !== false);
+			(this._mouseStarted ? this.mouseDrag(e) : this.mouseUp(e));
+		}
+		
+		return !this._mouseStarted;
+	},
+	
+	mouseUp: function(e) {
+		$(document)
+			.unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+			.unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+		
+		if (this._mouseStarted) {
+			this._mouseStarted = false;
+			this.mouseStop(e);
+		}
+		
+		return false;
+	},
+	
+	mouseDistanceMet: function(e) {
+		return (Math.max(
+				Math.abs(this._mouseDownEvent.pageX - e.pageX),
+				Math.abs(this._mouseDownEvent.pageY - e.pageY)
+			) >= this.options.distance
+		);
+	},
+	
+	mouseDelayMet: function(e) {
+		return this._mouseDelayMet;
+	},
+	
+	// These are placeholder methods, to be overriden by extending plugin
+	mouseStart: function(e) {},
+	mouseDrag: function(e) {},
+	mouseStop: function(e) {},
+	mouseCapture: function(e) { return true; }
+};
+
+$.ui.mouse.defaults = {
+	cancel: null,
+	distance: 1,
+	delay: 0
+};
+
+})(jQuery);
+/*
+ * jQuery UI Draggable
+ *
+ * Copyright (c) 2008 Paul Bakaus
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ * 
+ * http://docs.jquery.com/UI/Draggables
+ *
+ * Depends:
+ *	ui.core.js
+ */
+(function($) {
+
+$.widget("ui.draggable", $.extend({}, $.ui.mouse, {
+	init: function() {
+		
+		//Initialize needed constants
+		var o = this.options;
+
+		//Position the node
+		if (o.helper == 'original' && !(/(relative|absolute|fixed)/).test(this.element.css('position')))
+			this.element.css('position', 'relative');
+
+		this.element.addClass('ui-draggable');
+		(o.disabled && this.element.addClass('ui-draggable-disabled'));
+		
+		this.mouseInit();
+		
+	},
+	mouseStart: function(e) {
+		var o = this.options;
+		
+		if (this.helper || o.disabled || $(e.target).is('.ui-resizable-handle')) return false;
+		
+		var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false;
+		
+	
+		$(this.options.handle, this.element).find("*").andSelf().each(function() {
+			if(this == e.target) handle = true;
+		});
+		if (!handle) return false;
+		
+		if($.ui.ddmanager) $.ui.ddmanager.current = this;
+		
+		//Create and append the visible helper
+		this.helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [e])) : (o.helper == 'clone' ? this.element.clone() : this.element);
+		if(!this.helper.parents('body').length) this.helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo));
+		if(this.helper[0] != this.element[0] && !(/(fixed|absolute)/).test(this.helper.css("position"))) this.helper.css("position", "absolute");
+		
+		/*
+		 * - Position generation -
+		 * This block generates everything position related - it's the core of draggables.
+		 */
+		
+		this.margins = {																				//Cache the margins
+			left: (parseInt(this.element.css("marginLeft"),10) || 0),
+			top: (parseInt(this.element.css("marginTop"),10) || 0)
+		};		
+		
+		this.cssPosition = this.helper.css("position");													//Store the helper's css position
+		this.offset = this.element.offset();															//The element's absolute position on the page
+		this.offset = {																					//Substract the margins from the element's absolute offset
+			top: this.offset.top - this.margins.top,
+			left: this.offset.left - this.margins.left
+		};
+		
+		this.offset.click = {																			//Where the click happened, relative to the element
+			left: e.pageX - this.offset.left,
+			top: e.pageY - this.offset.top
+		};
+		
+		this.offsetParent = this.helper.offsetParent(); var po = this.offsetParent.offset();			//Get the offsetParent and cache its position
+		if(this.offsetParent[0] == document.body && $.browser.mozilla) po = { top: 0, left: 0 };		//Ugly FF3 fix
+		this.offset.parent = {																			//Store its position plus border
+			top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
+			left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
+		};
+		
+		var p = this.element.position();																//This is a relative to absolute position minus the actual position calculation - only used for relative positioned helpers
+		this.offset.relative = this.cssPosition == "relative" ? {
+			top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.offsetParent[0].scrollTop,
+			left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.offsetParent[0].scrollLeft
+		} : { top: 0, left: 0 };
+		
+		this.originalPosition = this.generatePosition(e);												//Generate the original position
+		this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() };//Cache the helper size
+		
+		if(o.cursorAt) {
+			if(o.cursorAt.left != undefined) this.offset.click.left = o.cursorAt.left + this.margins.left;
+			if(o.cursorAt.right != undefined) this.offset.click.left = this.helperProportions.width - o.cursorAt.right + this.margins.left;
+			if(o.cursorAt.top != undefined) this.offset.click.top = o.cursorAt.top + this.margins.top;
+			if(o.cursorAt.bottom != undefined) this.offset.click.top = this.helperProportions.height - o.cursorAt.bottom + this.margins.top;
+		}
+		
+		
+		/*
+		 * - Position constraining -
+		 * Here we prepare position constraining like grid and containment.
+		 */	
+		
+		if(o.containment) {
+			if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
+			if(o.containment == 'document' || o.containment == 'window') this.containment = [
+				0 - this.offset.relative.left - this.offset.parent.left,
+				0 - this.offset.relative.top - this.offset.parent.top,
+				$(o.containment == 'document' ? document : window).width() - this.offset.relative.left - this.offset.parent.left - this.helperProportions.width - this.margins.left - (parseInt(this.element.css("marginRight"),10) || 0),
+				($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.offset.relative.top - this.offset.parent.top - this.helperProportions.height - this.margins.top - (parseInt(this.element.css("marginBottom"),10) || 0)
+			];
+			
+			if(!(/^(document|window|parent)$/).test(o.containment)) {
+				var ce = $(o.containment)[0];
+				var co = $(o.containment).offset();
+				
+				this.containment = [
+					co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) - this.offset.relative.left - this.offset.parent.left,
+					co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) - this.offset.relative.top - this.offset.parent.top,
+					co.left+Math.max(ce.scrollWidth,ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - this.offset.relative.left - this.offset.parent.left - this.helperProportions.width - this.margins.left - (parseInt(this.element.css("marginRight"),10) || 0),
+					co.top+Math.max(ce.scrollHeight,ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - this.offset.relative.top - this.offset.parent.top - this.helperProportions.height - this.margins.top - (parseInt(this.element.css("marginBottom"),10) || 0)
+				];
+			}
+		}
+		
+		//Call plugins and callbacks
+		this.propagate("start", e);
+		
+		this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() };//Recache the helper size
+		if ($.ui.ddmanager && !o.dropBehaviour) $.ui.ddmanager.prepareOffsets(this, e);
+		
+		this.helper.addClass("ui-draggable-dragging");
+		this.mouseDrag(e); //Execute the drag once - this causes the helper not to be visible before getting its correct position
+		return true;
+	},
+	convertPositionTo: function(d, pos) {
+		if(!pos) pos = this.position;
+		var mod = d == "absolute" ? 1 : -1;
+		return {
+			top: (
+				pos.top																	// the calculated relative position
+				+ this.offset.relative.top	* mod										// Only for relative positioned nodes: Relative offset from element to offset parent
+				+ this.offset.parent.top * mod											// The offsetParent's offset without borders (offset + border)
+				- (this.cssPosition == "fixed" || (this.cssPosition == "absolute" && this.offsetParent[0] == document.body) ? 0 : this.offsetParent[0].scrollTop) * mod	// The offsetParent's scroll position, not if the element is fixed
+				+ (this.cssPosition == "fixed" ? $(document).scrollTop() : 0) * mod
+				+ this.margins.top * mod												//Add the margin (you don't want the margin counting in intersection methods)
+			),
+			left: (
+				pos.left																// the calculated relative position
+				+ this.offset.relative.left	* mod										// Only for relative positioned nodes: Relative offset from element to offset parent
+				+ this.offset.parent.left * mod											// The offsetParent's offset without borders (offset + border)
+				- (this.cssPosition == "fixed" || (this.cssPosition == "absolute" && this.offsetParent[0] == document.body) ? 0 : this.offsetParent[0].scrollLeft) * mod	// The offsetParent's scroll position, not if the element is fixed
+				+ (this.cssPosition == "fixed" ? $(document).scrollLeft() : 0) * mod
+				+ this.margins.left * mod												//Add the margin (you don't want the margin counting in intersection methods)
+			)
+		};
+	},
+	generatePosition: function(e) {
+		
+		var o = this.options;
+		var position = {
+			top: (
+				e.pageY																	// The absolute mouse position
+				- this.offset.click.top													// Click offset (relative to the element)
+				- this.offset.relative.top												// Only for relative positioned nodes: Relative offset from element to offset parent
+				- this.offset.parent.top												// The offsetParent's offset without borders (offset + border)
+				+ (this.cssPosition == "fixed" || (this.cssPosition == "absolute" && this.offsetParent[0] == document.body) ? 0 : this.offsetParent[0].scrollTop)	// The offsetParent's scroll position, not if the element is fixed
+				- (this.cssPosition == "fixed" ? $(document).scrollTop() : 0)
+			),
+			left: (
+				e.pageX																	// The absolute mouse position
+				- this.offset.click.left												// Click offset (relative to the element)
+				- this.offset.relative.left												// Only for relative positioned nodes: Relative offset from element to offset parent
+				- this.offset.parent.left												// The offsetParent's offset without borders (offset + border)
+				+ (this.cssPosition == "fixed" || (this.cssPosition == "absolute" && this.offsetParent[0] == document.body) ? 0 : this.offsetParent[0].scrollLeft)	// The offsetParent's scroll position, not if the element is fixed
+				- (this.cssPosition == "fixed" ? $(document).scrollLeft() : 0)
+			)
+		};
+		
+		if(!this.originalPosition) return position;										//If we are not dragging yet, we won't check for options
+		
+		/*
+		 * - Position constraining -
+		 * Constrain the position to a mix of grid, containment.
+		 */
+		if(this.containment) {
+			if(position.left < this.containment[0]) position.left = this.containment[0];
+			if(position.top < this.containment[1]) position.top = this.containment[1];
+			if(position.left > this.containment[2]) position.left = this.containment[2];
+			if(position.top > this.containment[3]) position.top = this.containment[3];
+		}
+		
+		if(o.grid) {
+			var top = this.originalPosition.top + Math.round((position.top - this.originalPosition.top) / o.grid[1]) * o.grid[1];
+			position.top = this.containment ? (!(top < this.containment[1] || top > this.containment[3]) ? top : (!(top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
+			
+			var left = this.originalPosition.left + Math.round((position.left - this.originalPosition.left) / o.grid[0]) * o.grid[0];
+			position.left = this.containment ? (!(left < this.containment[0] || left > this.containment[2]) ? left : (!(left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
+		}
+		
+		return position;
+	},
+	mouseDrag: function(e) {
+		
+		//Compute the helpers position
+		this.position = this.generatePosition(e);
+		this.positionAbs = this.convertPositionTo("absolute");
+		
+		//Call plugins and callbacks and use the resulting position if something is returned		
+		this.position = this.propagate("drag", e) || this.position;
+		
+		if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
+		if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
+		if($.ui.ddmanager) $.ui.ddmanager.drag(this, e);
+		
+		return false;
+	},
+	mouseStop: function(e) {
+		
+		//If we are using droppables, inform the manager about the drop
+		var dropped = false;
+		if ($.ui.ddmanager && !this.options.dropBehaviour)
+			var dropped = $.ui.ddmanager.drop(this, e);		
+		
+		if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true) {
+			var self = this;
+			$(this.helper).animate(this.originalPosition, parseInt(this.options.revert, 10) || 500, function() {
+				self.propagate("stop", e);
+				self.clear();
+			});
+		} else {
+			this.propagate("stop", e);
+			this.clear();
+		}
+		
+		return false;
+	},
+	clear: function() {
+		this.helper.removeClass("ui-draggable-dragging");
+		if(this.options.helper != 'original' && !this.cancelHelperRemoval) this.helper.remove();
+		//if($.ui.ddmanager) $.ui.ddmanager.current = null;
+		this.helper = null;
+		this.cancelHelperRemoval = false;
+	},
+	
+	// From now on bulk stuff - mainly helpers
+	plugins: {},
+	uiHash: function(e) {
+		return {
+			helper: this.helper,
+			position: this.position,
+			absolutePosition: this.positionAbs,
+			options: this.options			
+		};
+	},
+	propagate: function(n,e) {
+		$.ui.plugin.call(this, n, [e, this.uiHash()]);
+		if(n == "drag") this.positionAbs = this.convertPositionTo("absolute"); //The absolute position has to be recalculated after plugins
+		return this.element.triggerHandler(n == "drag" ? n : "drag"+n, [e, this.uiHash()], this.options[n]);
+	},
+	destroy: function() {
+		if(!this.element.data('draggable')) return;
+		this.element.removeData("draggable").unbind(".draggable").removeClass('ui-draggable');
+		this.mouseDestroy();
+	}
+}));
+
+$.extend($.ui.draggable, {
+	defaults: {
+		appendTo: "parent",
+		axis: false,
+		cancel: ":input",
+		delay: 0,
+		distance: 1,
+		helper: "original"
+	}
+});
+
+$.ui.plugin.add("draggable", "cursor", {
+	start: function(e, ui) {
+		var t = $('body');
+		if (t.css("cursor")) ui.options._cursor = t.css("cursor");
+		t.css("cursor", ui.options.cursor);
+	},
+	stop: function(e, ui) {
+		if (ui.options._cursor) $('body').css("cursor", ui.options._cursor);
+	}
+});
+
+$.ui.plugin.add("draggable", "zIndex", {
+	start: function(e, ui) {
+		var t = $(ui.helper);
+		if(t.css("zIndex")) ui.options._zIndex = t.css("zIndex");
+		t.css('zIndex', ui.options.zIndex);
+	},
+	stop: function(e, ui) {
+		if(ui.options._zIndex) $(ui.helper).css('zIndex', ui.options._zIndex);
+	}
+});
+
+$.ui.plugin.add("draggable", "opacity", {
+	start: function(e, ui) {
+		var t = $(ui.helper);
+		if(t.css("opacity")) ui.options._opacity = t.css("opacity");
+		t.css('opacity', ui.options.opacity);
+	},
+	stop: function(e, ui) {
+		if(ui.options._opacity) $(ui.helper).css('opacity', ui.options._opacity);
+	}
+});
+
+$.ui.plugin.add("draggable", "iframeFix", {
+	start: function(e, ui) {
+		$(ui.options.iframeFix === true ? "iframe" : ui.options.iframeFix).each(function() {					
+			$('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>')
+			.css({
+				width: this.offsetWidth+"px", height: this.offsetHeight+"px",
+				position: "absolute", opacity: "0.001", zIndex: 1000
+			})
+			.css($(this).offset())
+			.appendTo("body");
+		});
+	},
+	stop: function(e, ui) {
+		$("div.DragDropIframeFix").each(function() { this.parentNode.removeChild(this); }); //Remove frame helpers	
+	}
+});
+
+$.ui.plugin.add("draggable", "scroll", {
+	start: function(e, ui) {
+		var o = ui.options;
+		var i = $(this).data("draggable");
+		o.scrollSensitivity	= o.scrollSensitivity || 20;
+		o.scrollSpeed		= o.scrollSpeed || 20;
+		
+		i.overflowY = function(el) {
+			do { if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-y'))) return el; el = el.parent(); } while (el[0].parentNode);
+			return $(document);
+		}(this);
+		i.overflowX = function(el) {
+			do { if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-x'))) return el; el = el.parent(); } while (el[0].parentNode);
+			return $(document);
+		}(this);
+		
+		if(i.overflowY[0] != document && i.overflowY[0].tagName != 'HTML') i.overflowYOffset = i.overflowY.offset();
+		if(i.overflowX[0] != document && i.overflowX[0].tagName != 'HTML') i.overflowXOffset = i.overflowX.offset();
+		
+	},
+	drag: function(e, ui) {
+		
+		var o = ui.options;
+		var i = $(this).data("draggable");
+		
+		if(i.overflowY[0] != document && i.overflowY[0].tagName != 'HTML') {
+			if((i.overflowYOffset.top + i.overflowY[0].offsetHeight) - e.pageY < o.scrollSensitivity)
+				i.overflowY[0].scrollTop = i.overflowY[0].scrollTop + o.scrollSpeed;
+			if(e.pageY - i.overflowYOffset.top < o.scrollSensitivity)
+				i.overflowY[0].scrollTop = i.overflowY[0].scrollTop - o.scrollSpeed;
+							
+		} else {
+			if(e.pageY - $(document).scrollTop() < o.scrollSensitivity)
+				$(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
+			if($(window).height() - (e.pageY - $(document).scrollTop()) < o.scrollSensitivity)
+				$(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
+		}
+		
+		if(i.overflowX[0] != document && i.overflowX[0].tagName != 'HTML') {
+			if((i.overflowXOffset.left + i.overflowX[0].offsetWidth) - e.pageX < o.scrollSensitivity)
+				i.overflowX[0].scrollLeft = i.overflowX[0].scrollLeft + o.scrollSpeed;
+			if(e.pageX - i.overflowXOffset.left < o.scrollSensitivity)
+				i.overflowX[0].scrollLeft = i.overflowX[0].scrollLeft - o.scrollSpeed;
+		} else {
+			if(e.pageX - $(document).scrollLeft() < o.scrollSensitivity)
+				$(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
+			if($(window).width() - (e.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
+				$(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
+		}
+		
+	}
+});
+
+$.ui.plugin.add("draggable", "snap", {
+	start: function(e, ui) {
+		
+		var inst = $(this).data("draggable");
+		inst.snapElements = [];
+		$(ui.options.snap === true ? '.ui-draggable' : ui.options.snap).each(function() {
+			var $t = $(this); var $o = $t.offset();
+			if(this != inst.element[0]) inst.snapElements.push({
+				item: this,
+				width: $t.outerWidth(), height: $t.outerHeight(),
+				top: $o.top, left: $o.left
+			});
+		});
+		
+	},
+	drag: function(e, ui) {
+		
+		var inst = $(this).data("draggable");
+		var d = ui.options.snapTolerance || 20;
+		var x1 = ui.absolutePosition.left, x2 = x1 + inst.helperProportions.width,
+			y1 = ui.absolutePosition.top, y2 = y1 + inst.helperProportions.height;
+		
+		for (var i = inst.snapElements.length - 1; i >= 0; i--){
+			
+			var l = inst.snapElements[i].left, r = l + inst.snapElements[i].width, 
+				t = inst.snapElements[i].top, b = t + inst.snapElements[i].height;
+			
+			//Yes, I know, this is insane ;)
+			if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) continue;
+			
+			if(ui.options.snapMode != 'inner') {
+				var ts = Math.abs(t - y2) <= 20;
+				var bs = Math.abs(b - y1) <= 20;
+				var ls = Math.abs(l - x2) <= 20;
+				var rs = Math.abs(r - x1) <= 20;
+				if(ts) ui.position.top = inst.convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top;
+				if(bs) ui.position.top = inst.convertPositionTo("relative", { top: b, left: 0 }).top;
+				if(ls) ui.position.left = inst.convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left;
+				if(rs) ui.position.left = inst.convertPositionTo("relative", { top: 0, left: r }).left;
+			}
+			
+			if(ui.options.snapMode != 'outer') {
+				var ts = Math.abs(t - y1) <= 20;
+				var bs = Math.abs(b - y2) <= 20;
+				var ls = Math.abs(l - x1) <= 20;
+				var rs = Math.abs(r - x2) <= 20;
+				if(ts) ui.position.top = inst.convertPositionTo("relative", { top: t, left: 0 }).top;
+				if(bs) ui.position.top = inst.convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top;
+				if(ls) ui.position.left = inst.convertPositionTo("relative", { top: 0, left: l }).left;
+				if(rs) ui.position.left = inst.convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left;
+			}
+			
+		};
+	}
+});
+
+$.ui.plugin.add("draggable", "connectToSortable", {
+	start: function(e,ui) {
+	
+		var inst = $(this).data("draggable");
+		inst.sortables = [];
+		$(ui.options.connectToSortable).each(function() {
+			if($.data(this, 'sortable')) {
+				var sortable = $.data(this, 'sortable');
+				inst.sortables.push({
+					instance: sortable,
+					shouldRevert: sortable.options.revert
+				});
+				sortable.refreshItems();	//Do a one-time refresh at start to refresh the containerCache	
+				sortable.propagate("activate", e, inst);
+			}
+		});
+
+	},
+	stop: function(e,ui) {
+		
+		//If we are still over the sortable, we fake the stop event of the sortable, but also remove helper
+		var inst = $(this).data("draggable");
+		
+		$.each(inst.sortables, function() {
+			if(this.instance.isOver) {
+				this.instance.isOver = 0;
+				inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance
+				this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)
+				if(this.shouldRevert) this.instance.options.revert = true; //revert here
+				this.instance.mouseStop(e);
+				
+				//Also propagate receive event, since the sortable is actually receiving a element
+				this.instance.element.triggerHandler("sortreceive", [e, $.extend(this.instance.ui(), { sender: inst.element })], this.instance.options["receive"]);
+
+				this.instance.options.helper = this.instance.options._helper;
+			} else {
+				this.instance.propagate("deactivate", e, inst);
+			}
+
+		});
+		
+	},
+	drag: function(e,ui) {
+
+		var inst = $(this).data("draggable"), self = this;
+		
+		var checkPos = function(o) {
+				
+			var l = o.left, r = l + o.width,
+				t = o.top, b = t + o.height;
+
+			return (l < (this.positionAbs.left + this.offset.click.left) && (this.positionAbs.left + this.offset.click.left) < r
+					&& t < (this.positionAbs.top + this.offset.click.top) && (this.positionAbs.top + this.offset.click.top) < b);				
+		};
+		
+		$.each(inst.sortables, function(i) {
+
+			if(checkPos.call(inst, this.instance.containerCache)) {
+
+				//If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
+				if(!this.instance.isOver) {
+					this.instance.isOver = 1;
+
+					//Now we fake the start of dragging for the sortable instance,
+					//by cloning the list group item, appending it to the sortable and using it as inst.currentItem
+					//We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
+					this.instance.currentItem = $(self).clone().appendTo(this.instance.element).data("sortable-item", true);
+					this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
+					this.instance.options.helper = function() { return ui.helper[0]; };
+				
+					e.target = this.instance.currentItem[0];
+					this.instance.mouseCapture(e, true);
+					this.instance.mouseStart(e, true, true);
+
+					//Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes
+					this.instance.offset.click.top = inst.offset.click.top;
+					this.instance.offset.click.left = inst.offset.click.left;
+					this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;
+					this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;
+					
+					inst.propagate("toSortable", e);
+				
+				}
+				
+				//Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable
+				if(this.instance.currentItem) this.instance.mouseDrag(e);
+				
+			} else {
+				
+				//If it doesn't intersect with the sortable, and it intersected before,
+				//we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval
+				if(this.instance.isOver) {
+					this.instance.isOver = 0;
+					this.instance.cancelHelperRemoval = true;
+					this.instance.options.revert = false; //No revert here
+					this.instance.mouseStop(e, true);
+					this.instance.options.helper = this.instance.options._helper;
+					
+					//Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size
+					this.instance.currentItem.remove();
+					if(this.instance.placeholder) this.instance.placeholder.remove();
+					
+					inst.propagate("fromSortable", e);
+				}
+				
+			};
+
+		});
+
+	}
+});
+
+$.ui.plugin.add("draggable", "stack", {
+	start: function(e,ui) {
+		var group = $.makeArray($(ui.options.stack.group)).sort(function(a,b) {
+			return (parseInt($(a).css("zIndex"),10) || ui.options.stack.min) - (parseInt($(b).css("zIndex"),10) || ui.options.stack.min);
+		});
+		
+		$(group).each(function(i) {
+			this.style.zIndex = ui.options.stack.min + i;
+		});
+		
+		this[0].style.zIndex = ui.options.stack.min + group.length;
+	}
+});
+
+})(jQuery);
+/*
+ * jQuery UI Droppable
+ *
+ * Copyright (c) 2008 Paul Bakaus
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ * 
+ * http://docs.jquery.com/UI/Droppables
+ *
+ * Depends:
+ *	ui.core.js
+ *	ui.draggable.js
+ */
+(function($) {
+
+$.widget("ui.droppable", {
+	init: function() {
+
+		this.element.addClass("ui-droppable");
+		this.isover = 0; this.isout = 1;
+		
+		//Prepare the passed options
+		var o = this.options, accept = o.accept;
+		o = $.extend(o, {
+			accept: o.accept && o.accept.constructor == Function ? o.accept : function(d) {
+				return $(d).is(accept);
+			}
+		});
+		
+		//Store the droppable's proportions
+		this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
+		
+		// Add the reference and positions to the manager
+		$.ui.ddmanager.droppables.push(this);
+		
+	},
+	plugins: {},
+	ui: function(c) {
+		return {
+			draggable: (c.currentItem || c.element),
+			helper: c.helper,
+			position: c.position,
+			absolutePosition: c.positionAbs,
+			options: this.options,
+			element: this.element
+		};
+	},
+	destroy: function() {
+		var drop = $.ui.ddmanager.droppables;
+		for ( var i = 0; i < drop.length; i++ )
+			if ( drop[i] == this )
+				drop.splice(i, 1);
+		
+		this.element
+			.removeClass("ui-droppable ui-droppable-disabled")
+			.removeData("droppable")
+			.unbind(".droppable");
+	},
+	over: function(e) {
+		
+		var draggable = $.ui.ddmanager.current;
+		if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
+		
+		if (this.options.accept.call(this.element,(draggable.currentItem || draggable.element))) {
+			$.ui.plugin.call(this, 'over', [e, this.ui(draggable)]);
+			this.element.triggerHandler("dropover", [e, this.ui(draggable)], this.options.over);
+		}
+		
+	},
+	out: function(e) {
+		
+		var draggable = $.ui.ddmanager.current;
+		if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
+		
+		if (this.options.accept.call(this.element,(draggable.currentItem || draggable.element))) {
+			$.ui.plugin.call(this, 'out', [e, this.ui(draggable)]);
+			this.element.triggerHandler("dropout", [e, this.ui(draggable)], this.options.out);
+		}
+		
+	},
+	drop: function(e,custom) {
+		
+		var draggable = custom || $.ui.ddmanager.current;
+		if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return false; // Bail if draggable and droppable are same element
+		
+		var childrenIntersection = false;
+		this.element.find(".ui-droppable").not(".ui-draggable-dragging").each(function() {
+			var inst = $.data(this, 'droppable');
+			if(inst.options.greedy && $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)) {
+				childrenIntersection = true; return false;
+			}
+		});
+		if(childrenIntersection) return false;
+		
+		if(this.options.accept.call(this.element,(draggable.currentItem || draggable.element))) {
+			$.ui.plugin.call(this, 'drop', [e, this.ui(draggable)]);
+			this.element.triggerHandler("drop", [e, this.ui(draggable)], this.options.drop);
+			return true;
+		}
+		
+		return false;
+		
+	},
+	activate: function(e) {
+		
+		var draggable = $.ui.ddmanager.current;
+		$.ui.plugin.call(this, 'activate', [e, this.ui(draggable)]);
+		if(draggable) this.element.triggerHandler("dropactivate", [e, this.ui(draggable)], this.options.activate);
+		
+	},
+	deactivate: function(e) {
+		
+		var draggable = $.ui.ddmanager.current;
+		$.ui.plugin.call(this, 'deactivate', [e, this.ui(draggable)]);
+		if(draggable) this.element.triggerHandler("dropdeactivate", [e, this.ui(draggable)], this.options.deactivate);
+		
+	}
+});
+
+$.extend($.ui.droppable, {
+	defaults: {
+		disabled: false,
+		tolerance: 'intersect'
+	}
+});
+
+$.ui.intersect = function(draggable, droppable, toleranceMode) {
+	
+	if (!droppable.offset) return false;
+	
+	var x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
+		y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height;
+	var l = droppable.offset.left, r = l + droppable.proportions.width,
+		t = droppable.offset.top, b = t + droppable.proportions.height;
+	
+	switch (toleranceMode) {
+		case 'fit':
+			return (l < x1 && x2 < r
+				&& t < y1 && y2 < b);
+			break;
+		case 'intersect':
+			return (l < x1 + (draggable.helperProportions.width / 2) // Right Half
+				&& x2 - (draggable.helperProportions.width / 2) < r // Left Half
+				&& t < y1 + (draggable.helperProportions.height / 2) // Bottom Half
+				&& y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
+			break;
+		case 'pointer':
+			return (l < ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left) && ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left) < r
+				&& t < ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top) && ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top) < b);
+			break;
+		case 'touch':
+			return (
+					(y1 >= t && y1 <= b) ||	// Top edge touching
+					(y2 >= t && y2 <= b) ||	// Bottom edge touching
+					(y1 < t && y2 > b)		// Surrounded vertically
+				) && (
+					(x1 >= l && x1 <= r) ||	// Left edge touching
+					(x2 >= l && x2 <= r) ||	// Right edge touching
+					(x1 < l && x2 > r)		// Surrounded horizontally
+				);
+			break;
+		default:
+			return false;
+			break;
+		}
+	
+};
+
+/*
+	This manager tracks offsets of draggables and droppables
+*/
+$.ui.ddmanager = {
+	current: null,
+	droppables: [],
+	prepareOffsets: function(t, e) {
+		
+		var m = $.ui.ddmanager.droppables;
+		var type = e ? e.type : null; // workaround for #2317
+
+		for (var i = 0; i < m.length; i++) {
+			if(m[i].options.disabled || (t && !m[i].options.accept.call(m[i].element,(t.currentItem || t.element)))) continue;
+			m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; //If the element is not visible, continue
+			m[i].offset = m[i].element.offset();
+			m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
+			
+			if(type == "dragstart" || type == "sortactivate") m[i].activate.call(m[i], e); //Activate the droppable if used directly from draggables
+		}
+		
+	},
+	drop: function(draggable, e) {
+		
+		var dropped = false;
+		$.each($.ui.ddmanager.droppables, function() {
+			
+			if(!this.options) return;
+			if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance))
+				dropped = this.drop.call(this, e);
+			
+			if (!this.options.disabled && this.visible && this.options.accept.call(this.element,(draggable.currentItem || draggable.element))) {
+				this.isout = 1; this.isover = 0;
+				this.deactivate.call(this, e);
+			}
+			
+		});
+		return dropped;
+		
+	},
+	drag: function(draggable, e) {
+		
+		//If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
+		if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, e);
+		
+		//Run through all droppables and check their positions based on specific tolerance options
+
+		$.each($.ui.ddmanager.droppables, function() {
+			
+			if(this.options.disabled || this.greedyChild || !this.visible) return;
+			var intersects = $.ui.intersect(draggable, this, this.options.tolerance);
+			
+			var c = !intersects && this.isover == 1 ? 'isout' : (intersects && this.isover == 0 ? 'isover' : null);
+			if(!c) return;
+			
+			var parentInstance;
+			if (this.options.greedy) {
+				var parent = this.element.parents('.ui-droppable:eq(0)');
+				if (parent.length) {
+					parentInstance = $.data(parent[0], 'droppable');
+					parentInstance.greedyChild = (c == 'isover' ? 1 : 0);
+				}
+			}
+			
+			// we just moved into a greedy child
+			if (parentInstance && c == 'isover') {
+				parentInstance['isover'] = 0;
+				parentInstance['isout'] = 1;
+				parentInstance.out.call(parentInstance, e);
+			}
+			
+			this[c] = 1; this[c == 'isout' ? 'isover' : 'isout'] = 0;
+			this[c == "isover" ? "over" : "out"].call(this, e);
+			
+			// we just moved out of a greedy child
+			if (parentInstance && c == 'isout') {
+				parentInstance['isout'] = 0;
+				parentInstance['isover'] = 1;
+				parentInstance.over.call(parentInstance, e);
+			}
+		});
+		
+	}
+};
+
+/*
+ * Droppable Extensions
+ */
+
+$.ui.plugin.add("droppable", "activeClass", {
+	activate: function(e, ui) {
+		$(this).addClass(ui.options.activeClass);
+	},
+	deactivate: function(e, ui) {
+		$(this).removeClass(ui.options.activeClass);
+	},
+	drop: function(e, ui) {
+		$(this).removeClass(ui.options.activeClass);
+	}
+});
+
+$.ui.plugin.add("droppable", "hoverClass", {
+	over: function(e, ui) {
+		$(this).addClass(ui.options.hoverClass);
+	},
+	out: function(e, ui) {
+		$(this).removeClass(ui.options.hoverClass);
+	},
+	drop: function(e, ui) {
+		$(this).removeClass(ui.options.hoverClass);
+	}
+});
+
+})(jQuery);
+/*
+ * jQuery UI Resizable
+ *
+ * Copyright (c) 2008 Paul Bakaus
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ * 
+ * http://docs.jquery.com/UI/Resizables
+ *
+ * Depends:
+ *	ui.core.js
+ */
+(function($) {
+
+$.widget("ui.resizable", $.extend({}, $.ui.mouse, {
+	init: function() {
+
+		var self = this, o = this.options;
+
+		var elpos = this.element.css('position');
+		
+		this.originalElement = this.element;
+		
+		// simulate .ui-resizable { position: relative; }
+		this.element.addClass("ui-resizable").css({ position: /static/.test(elpos) ? 'relative' : elpos });
+		
+		$.extend(o, {
+			_aspectRatio: !!(o.aspectRatio),
+			helper: o.helper || o.ghost || o.animate ? o.helper || 'proxy' : null,
+			knobHandles: o.knobHandles === true ? 'ui-resizable-knob-handle' : o.knobHandles
+		});
+		
+		//Default Theme
+		var aBorder = '1px solid #DEDEDE';
+		
+		o.defaultTheme = {
+			'ui-resizable': { display: 'block' },
+			'ui-resizable-handle': { position: 'absolute', background: '#F2F2F2', fontSize: '0.1px' },
+			'ui-resizable-n': { cursor: 'n-resize', height: '4px', left: '0px', right: '0px', borderTop: aBorder },
+			'ui-resizable-s': { cursor: 's-resize', height: '4px', left: '0px', right: '0px', borderBottom: aBorder },
+			'ui-resizable-e': { cursor: 'e-resize', width: '4px', top: '0px', bottom: '0px', borderRight: aBorder },
+			'ui-resizable-w': { cursor: 'w-resize', width: '4px', top: '0px', bottom: '0px', borderLeft: aBorder },
+			'ui-resizable-se': { cursor: 'se-resize', width: '4px', height: '4px', borderRight: aBorder, borderBottom: aBorder },
+			'ui-resizable-sw': { cursor: 'sw-resize', width: '4px', height: '4px', borderBottom: aBorder, borderLeft: aBorder },
+			'ui-resizable-ne': { cursor: 'ne-resize', width: '4px', height: '4px', borderRight: aBorder, borderTop: aBorder },
+			'ui-resizable-nw': { cursor: 'nw-resize', width: '4px', height: '4px', borderLeft: aBorder, borderTop: aBorder }
+		};
+		
+		o.knobTheme = {
+			'ui-resizable-handle': { background: '#F2F2F2', border: '1px solid #808080', height: '8px', width: '8px' },
+			'ui-resizable-n': { cursor: 'n-resize', top: '0px', left: '45%' },
+			'ui-resizable-s': { cursor: 's-resize', bottom: '0px', left: '45%' },
+			'ui-resizable-e': { cursor: 'e-resize', right: '0px', top: '45%' },
+			'ui-resizable-w': { cursor: 'w-resize', left: '0px', top: '45%' },
+			'ui-resizable-se': { cursor: 'se-resize', right: '0px', bottom: '0px' },
+			'ui-resizable-sw': { cursor: 'sw-resize', left: '0px', bottom: '0px' },
+			'ui-resizable-nw': { cursor: 'nw-resize', left: '0px', top: '0px' },
+			'ui-resizable-ne': { cursor: 'ne-resize', right: '0px', top: '0px' }
+		};
+		
+		o._nodeName = this.element[0].nodeName;
+		
+		//Wrap the element if it cannot hold child nodes
+		if(o._nodeName.match(/canvas|textarea|input|select|button|img/i)) {
+			var el = this.element;
+			
+			//Opera fixing relative position
+			if (/relative/.test(el.css('position')) && $.browser.opera)
+				el.css({ position: 'relative', top: 'auto', left: 'auto' });
+			
+			//Create a wrapper element and set the wrapper to the new current internal element
+			el.wrap(
+				$('<div class="ui-wrapper"	style="overflow: hidden;"></div>').css( {
+					position: el.css('position'),
+					width: el.outerWidth(),
+					height: el.outerHeight(),
+					top: el.css('top'),
+					left: el.css('left')
+				})
+			);
+			
+			var oel = this.element; this.element = this.element.parent();
+			
+			// store instance on wrapper
+			this.element.data('resizable', this); 
+			
+			//Move margins to the wrapper
+			this.element.css({ marginLeft: oel.css("marginLeft"), marginTop: oel.css("marginTop"),
+				marginRight: oel.css("marginRight"), marginBottom: oel.css("marginBottom")
+			});
+			
+			oel.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});
+			
+			//Prevent Safari textarea resize
+			if ($.browser.safari && o.preventDefault) oel.css('resize', 'none');
+			
+			o.proportionallyResize = oel.css({ position: 'static', zoom: 1, display: 'block' });
+			
+			// avoid IE jump
+			this.element.css({ margin: oel.css('margin') });
+			
+			// fix handlers offset
+			this._proportionallyResize();
+		}
+		
+		if(!o.handles) o.handles = !$('.ui-resizable-handle', this.element).length ? "e,s,se" : { n: '.ui-resizable-n', e: '.ui-resizable-e', s: '.ui-resizable-s', w: '.ui-resizable-w', se: '.ui-resizable-se', sw: '.ui-resizable-sw', ne: '.ui-resizable-ne', nw: '.ui-resizable-nw' };
+		if(o.handles.constructor == String) {
+			
+			o.zIndex = o.zIndex || 1000;
+			
+			if(o.handles == 'all') o.handles = 'n,e,s,w,se,sw,ne,nw';
+			
+			var n = o.handles.split(","); o.handles = {};
+			
+			// insertions are applied when don't have theme loaded
+			var insertionsDefault = {
+				handle: 'position: absolute; display: none; overflow:hidden;',
+				n: 'top: 0pt; width:100%;',
+				e: 'right: 0pt; height:100%;',
+				s: 'bottom: 0pt; width:100%;',
+				w: 'left: 0pt; height:100%;',
+				se: 'bottom: 0pt; right: 0px;',
+				sw: 'bottom: 0pt; left: 0px;',
+				ne: 'top: 0pt; right: 0px;',
+				nw: 'top: 0pt; left: 0px;'
+			};
+			
+			for(var i = 0; i < n.length; i++) {
+				var handle = $.trim(n[i]), dt = o.defaultTheme, hname = 'ui-resizable-'+handle, loadDefault = !$.ui.css(hname) && !o.knobHandles, userKnobClass = $.ui.css('ui-resizable-knob-handle'), 
+							allDefTheme = $.extend(dt[hname], dt['ui-resizable-handle']), allKnobTheme = $.extend(o.knobTheme[hname], !userKnobClass ? o.knobTheme['ui-resizable-handle'] : {});
+				
+				// increase zIndex of sw, se, ne, nw axis
+				var applyZIndex = /sw|se|ne|nw/.test(handle) ? { zIndex: ++o.zIndex } : {};
+				
+				var defCss = (loadDefault ? insertionsDefault[handle] : ''), 
+					axis = $(['<div class="ui-resizable-handle ', hname, '" style="', defCss, insertionsDefault.handle, '"></div>'].join('')).css( applyZIndex );
+				o.handles[handle] = '.ui-resizable-'+handle;
+				
+				this.element.append(
+					//Theme detection, if not loaded, load o.defaultTheme
+					axis.css( loadDefault ? allDefTheme : {} )
+						// Load the knobHandle css, fix width, height, top, left...
+						.css( o.knobHandles ? allKnobTheme : {} ).addClass(o.knobHandles ? 'ui-resizable-knob-handle' : '').addClass(o.knobHandles)
+				);
+			}
+			
+			if (o.knobHandles) this.element.addClass('ui-resizable-knob').css( !$.ui.css('ui-resizable-knob') ? { /*border: '1px #fff dashed'*/ } : {} );
+		}
+		
+		this._renderAxis = function(target) {
+			target = target || this.element;
+			
+			for(var i in o.handles) {
+				if(o.handles[i].constructor == String) 
+					o.handles[i] = $(o.handles[i], this.element).show();
+				
+				if (o.transparent)
+					o.handles[i].css({opacity:0});
+				
+				//Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls)
+				if (this.element.is('.ui-wrapper') && 
+					o._nodeName.match(/textarea|input|select|button/i)) {
+					
+					var axis = $(o.handles[i], this.element), padWrapper = 0;
+					
+					//Checking the correct pad and border
+					padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();
+					
+					//The padding type i have to apply...
+					var padPos = [ 'padding', 
+						/ne|nw|n/.test(i) ? 'Top' :
+						/se|sw|s/.test(i) ? 'Bottom' : 
+						/^e$/.test(i) ? 'Right' : 'Left' ].join(""); 
+					
+					if (!o.transparent)
+						target.css(padPos, padWrapper);
+					
+					this._proportionallyResize();
+				}
+				if(!$(o.handles[i]).length) continue;
+			}
+		};
+		
+		this._renderAxis(this.element);
+		o._handles = $('.ui-resizable-handle', self.element);
+		
+		if (o.disableSelection)
+			o._handles.each(function(i, e) { $.ui.disableSelection(e); });
+		
+		//Matching axis name
+		o._handles.mouseover(function() {
+			if (!o.resizing) {
+				if (this.className) 
+					var axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
+				//Axis, default = se
+				self.axis = o.axis = axis && axis[1] ? axis[1] : 'se';
+			}
+		});
+		
+		//If we want to auto hide the elements
+		if (o.autoHide) {
+			o._handles.hide();
+			$(self.element).addClass("ui-resizable-autohide").hover(function() {
+				$(this).removeClass("ui-resizable-autohide");
+				o._handles.show();
+			},
+			function(){
+				if (!o.resizing) {
+					$(this).addClass("ui-resizable-autohide");
+					o._handles.hide();
+				}
+			});
+		}
+		
+		this.mouseInit();
+	},
+	plugins: {},
+	ui: function() {
+		return {
+			originalElement: this.originalElement,
+			element: this.element,
+			helper: this.helper,
+			position: this.position,
+			size: this.size,
+			options: this.options,
+			originalSize: this.originalSize,
+			originalPosition: this.originalPosition
+		};
+	},
+	propagate: function(n,e) {
+		$.ui.plugin.call(this, n, [e, this.ui()]);
+		if (n != "resize") this.element.triggerHandler(["resize", n].join(""), [e, this.ui()], this.options[n]);
+	},
+	destroy: function() {
+		var el = this.element, wrapped = el.children(".ui-resizable").get(0);
+		
+		this.mouseDestroy();
+		
+		var _destroy = function(exp) {
+			$(exp).removeClass("ui-resizable ui-resizable-disabled")
+				.removeData("resizable").unbind(".resizable").find('.ui-resizable-handle').remove();
+		};
+		
+		_destroy(el);
+		
+		if (el.is('.ui-wrapper') && wrapped) {
+			el.parent().append(
+				$(wrapped).css({
+					position: el.css('position'),
+					width: el.outerWidth(),
+					height: el.outerHeight(),
+					top: el.css('top'),
+					left: el.css('left')
+				})
+			).end().remove();
+			
+			_destroy(wrapped);
+		}
+	},
+	mouseStart: function(e) {
+		if(this.options.disabled) return false;
+		
+		var handle = false;
+		for(var i in this.options.handles) {
+			if($(this.options.handles[i])[0] == e.target) handle = true;
+		}
+		if (!handle) return false;
+		
+		var o = this.options, iniPos = this.element.position(), el = this.element, 
+			num = function(v) { return parseInt(v, 10) || 0; }, ie6 = $.browser.msie && $.browser.version < 7;
+		o.resizing = true;
+		o.documentScroll = { top: $(document).scrollTop(), left: $(document).scrollLeft() };
+		
+		// bugfix #1749
+		if (el.is('.ui-draggable') || (/absolute/).test(el.css('position'))) {
+			
+			// sOffset decides if document scrollOffset will be added to the top/left of the resizable element
+			var sOffset = $.browser.msie && !o.containment && (/absolute/).test(el.css('position')) && !(/relative/).test(el.parent().css('position'));
+			var dscrollt = sOffset ? o.documentScroll.top : 0, dscrolll = sOffset ? o.documentScroll.left : 0;
+			
+			el.css({ position: 'absolute', top: (iniPos.top + dscrollt), left: (iniPos.left + dscrolll) });
+		}
+		
+		//Opera fixing relative position
+		if ($.browser.opera && /relative/.test(el.css('position')))
+			el.css({ position: 'relative', top: 'auto', left: 'auto' });
+		
+		this._renderProxy();
+		
+		var curleft = num(this.helper.css('left')), curtop = num(this.helper.css('top'));
+		
+		if (o.containment) {
+			curleft += $(o.containment).scrollLeft()||0;
+			curtop += $(o.containment).scrollTop()||0;
+		}
+		
+		//Store needed variables
+		this.offset = this.helper.offset();
+		this.position = { left: curleft, top: curtop };
+		this.size = o.helper || ie6 ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
+		this.originalSize = o.helper || ie6 ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
+		this.originalPosition = { left: curleft, top: curtop };
+		this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };
+		this.originalMousePosition = { left: e.pageX, top: e.pageY };
+		
+		//Aspect Ratio
+		o.aspectRatio = (typeof o.aspectRatio == 'number') ? o.aspectRatio : ((this.originalSize.height / this.originalSize.width)||1);
+		
+		if (o.preserveCursor)
+			$('body').css('cursor', this.axis + '-resize');
+			
+		this.propagate("start", e);
+		return true;
+	},
+	mouseDrag: function(e) {
+		
+		//Increase performance, avoid regex
+		var el = this.helper, o = this.options, props = {},
+			self = this, smp = this.originalMousePosition, a = this.axis;
+		
+		var dx = (e.pageX-smp.left)||0, dy = (e.pageY-smp.top)||0;
+		var trigger = this._change[a];
+		if (!trigger) return false;
+		
+		// Calculate the attrs that will be change
+		var data = trigger.apply(this, [e, dx, dy]), ie6 = $.browser.msie && $.browser.version < 7, csdif = this.sizeDiff;
+		
+		if (o._aspectRatio || e.shiftKey)
+			data = this._updateRatio(data, e);
+		
+		data = this._respectSize(data, e);
+		
+		// plugins callbacks need to be called first
+		this.propagate("resize", e);
+		
+		el.css({
+			top: this.position.top + "px", left: this.position.left + "px", 
+			width: this.size.width + "px", height: this.size.height + "px"
+		});
+		
+		if (!o.helper && o.proportionallyResize)
+			this._proportionallyResize();
+		
+		this._updateCache(data);
+		
+		// calling the user callback at the end
+		this.element.triggerHandler("resize", [e, this.ui()], this.options["resize"]);
+		
+		return false;
+	},
+	mouseStop: function(e) {
+		
+		this.options.resizing = false;
+		var o = this.options, num = function(v) { return parseInt(v, 10) || 0; }, self = this;
+		
+		if(o.helper) {
+			var pr = o.proportionallyResize, ista = pr && (/textarea/i).test(pr.get(0).nodeName), 
+						soffseth = ista && $.ui.hasScroll(pr.get(0), 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
+							soffsetw = ista ? 0 : self.sizeDiff.width;
+			
+			var s = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },
+				left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null, 
+				top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
+			
+			if (!o.animate)
+				this.element.css($.extend(s, { top: top, left: left }));
+			
+			if (o.helper && !o.animate) this._proportionallyResize();
+		}
+		
+		if (o.preserveCursor)
+			$('body').css('cursor', 'auto');
+		
+		this.propagate("stop", e);
+		
+		if (o.helper) this.helper.remove();
+		
+		return false;
+	},
+	_updateCache: function(data) {
+		var o = this.options;
+		this.offset = this.helper.offset();
+		if (data.left) this.position.left = data.left;
+		if (data.top) this.position.top = data.top;
+		if (data.height) this.size.height = data.height;
+		if (data.width) this.size.width = data.width;
+	},
+	_updateRatio: function(data, e) {
+		var o = this.options, cpos = this.position, csize = this.size, a = this.axis;
+		
+		if (data.height) data.width = (csize.height / o.aspectRatio);
+		else if (data.width) data.height = (csize.width * o.aspectRatio);
+		
+		if (a == 'sw') {
+			data.left = cpos.left + (csize.width - data.width);
+			data.top = null;
+		}
+		if (a == 'nw') { 
+			data.top = cpos.top + (csize.height - data.height);
+			data.left = cpos.left + (csize.width - data.width);
+		}
+		
+		return data;
+	},
+	_respectSize: function(data, e) {
+		
+		var el = this.helper, o = this.options, pRatio = o._aspectRatio || e.shiftKey, a = this.axis, 
+				ismaxw = data.width && o.maxWidth && o.maxWidth < data.width, ismaxh = data.height && o.maxHeight && o.maxHeight < data.height,
+					isminw = data.width && o.minWidth && o.minWidth > data.width, isminh = data.height && o.minHeight && o.minHeight > data.height;
+		
+		if (isminw) data.width = o.minWidth;
+		if (isminh) data.height = o.minHeight;
+		if (ismaxw) data.width = o.maxWidth;
+		if (ismaxh) data.height = o.maxHeight;
+		
+		var dw = this.originalPosition.left + this.originalSize.width, dh = this.position.top + this.size.height;
+		var cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
+		
+		if (isminw && cw) data.left = dw - o.minWidth;
+		if (ismaxw && cw) data.left = dw - o.maxWidth;
+		if (isminh && ch)	data.top = dh - o.minHeight;
+		if (ismaxh && ch)	data.top = dh - o.maxHeight;
+		
+		// fixing jump error on top/left - bug #2330
+		var isNotwh = !data.width && !data.height;
+		if (isNotwh && !data.left && data.top) data.top = null;
+		else if (isNotwh && !data.top && data.left) data.left = null;
+		
+		return data;
+	},
+	_proportionallyResize: function() {
+		var o = this.options;
+		if (!o.proportionallyResize) return;
+		var prel = o.proportionallyResize, el = this.helper || this.element;
+		
+		if (!o.borderDif) {
+			var b = [prel.css('borderTopWidth'), prel.css('borderRightWidth'), prel.css('borderBottomWidth'), prel.css('borderLeftWidth')],
+				p = [prel.css('paddingTop'), prel.css('paddingRight'), prel.css('paddingBottom'), prel.css('paddingLeft')];
+			
+			o.borderDif = $.map(b, function(v, i) {
+				var border = parseInt(v,10)||0, padding = parseInt(p[i],10)||0;
+				return border + padding; 
+			});
+		}
+		prel.css({
+			height: (el.height() - o.borderDif[0] - o.borderDif[2]) + "px",
+			width: (el.width() - o.borderDif[1] - o.borderDif[3]) + "px"
+		});
+	},
+	_renderProxy: function() {
+		var el = this.element, o = this.options;
+		this.elementOffset = el.offset();
+		
+		if(o.helper) {
+			this.helper = this.helper || $('<div style="overflow:hidden;"></div>');
+			
+			// fix ie6 offset
+			var ie6 = $.browser.msie && $.browser.version < 7, ie6offset = (ie6 ? 1 : 0),
+			pxyoffset = ( ie6 ? 2 : -1 );
+			
+			this.helper.addClass(o.helper).css({
+				width: el.outerWidth() + pxyoffset,
+				height: el.outerHeight() + pxyoffset,
+				position: 'absolute',
+				left: this.elementOffset.left - ie6offset +'px',
+				top: this.elementOffset.top - ie6offset +'px',
+				zIndex: ++o.zIndex
+			});
+			
+			this.helper.appendTo("body");
+			
+			if (o.disableSelection)
+				$.ui.disableSelection(this.helper.get(0));
+			
+		} else {
+			this.helper = el; 
+		}
+	},
+	_change: {
+		e: function(e, dx, dy) {
+			return { width: this.originalSize.width + dx };
+		},
+		w: function(e, dx, dy) {
+			var o = this.options, cs = this.originalSize, sp = this.originalPosition;
+			return { left: sp.left + dx, width: cs.width - dx };
+		},
+		n: function(e, dx, dy) {
+			var o = this.options, cs = this.originalSize, sp = this.originalPosition;
+			return { top: sp.top + dy, height: cs.height - dy };
+		},
+		s: function(e, dx, dy) {
+			return { height: this.originalSize.height + dy };
+		},
+		se: function(e, dx, dy) {
+			return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [e, dx, dy]));
+		},
+		sw: function(e, dx, dy) {
+			return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [e, dx, dy]));
+		},
+		ne: function(e, dx, dy) {
+			return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [e, dx, dy]));
+		},
+		nw: function(e, dx, dy) {
+			return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [e, dx, dy]));
+		}
+	}
+}));
+
+$.extend($.ui.resizable, {
+	defaults: {
+		cancel: ":input",
+		distance: 1,
+		delay: 0,
+		preventDefault: true,
+		transparent: false,
+		minWidth: 10,
+		minHeight: 10,
+		aspectRatio: false,
+		disableSelection: true,
+		preserveCursor: true,
+		autoHide: false,
+		knobHandles: false
+	}
+});
+
+/*
+ * Resizable Extensions
+ */
+
+$.ui.plugin.add("resizable", "containment", {
+	
+	start: function(e, ui) {
+		var o = ui.options, self = $(this).data("resizable"), el = self.element;
+		var oc = o.containment,	ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;
+		if (!ce) return;
+		
+		self.containerElement = $(ce);
+		
+		if (/document/.test(oc) || oc == document) {
+			self.containerOffset = { left: 0, top: 0 };
+			self.containerPosition = { left: 0, top: 0 };
+			
+			self.parentData = { 
+				element: $(document), left: 0, top: 0, 
+				width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight
+			};
+		}
+		
+				
+		// i'm a node, so compute top, left, right, bottom
+		else{
+			self.containerOffset = $(ce).offset();
+			self.containerPosition = $(ce).position();
+			self.containerSize = { height: $(ce).innerHeight(), width: $(ce).innerWidth() };
+		
+			var co = self.containerOffset, ch = self.containerSize.height,	cw = self.containerSize.width, 
+						width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw ), height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);
+		
+			self.parentData = { 
+				element: ce, left: co.left, top: co.top, width: width, height: height
+			};
+		}
+	},
+	
+	resize: function(e, ui) {
+		var o = ui.options, self = $(this).data("resizable"), 
+				ps = self.containerSize, co = self.containerOffset, cs = self.size, cp = self.position,
+				pRatio = o._aspectRatio || e.shiftKey, cop = { top:0, left:0 }, ce = self.containerElement;
+		
+		if (ce[0] != document && /static/.test(ce.css('position')))
+			cop = self.containerPosition;
+		
+		if (cp.left < (o.helper ? co.left : cop.left)) {
+			self.size.width = self.size.width + (o.helper ? (self.position.left - co.left) : (self.position.left - cop.left));
+			if (pRatio) self.size.height = self.size.width * o.aspectRatio;
+			self.position.left = o.helper ? co.left : cop.left;
+		}
+		
+		if (cp.top < (o.helper ? co.top : 0)) {
+			self.size.height = self.size.height + (o.helper ? (self.position.top - co.top) : self.position.top);
+			if (pRatio) self.size.width = self.size.height / o.aspectRatio;
+			self.position.top = o.helper ? co.top : 0;
+		}
+		
+		var woset = (o.helper ? self.offset.left - co.left : (self.position.left - cop.left)) + self.sizeDiff.width, 
+					hoset = (o.helper ? self.offset.top - co.top : self.position.top) + self.sizeDiff.height;
+		
+		if (woset + self.size.width >= self.parentData.width) {
+			self.size.width = self.parentData.width - woset;
+			if (pRatio) self.size.height = self.size.width * o.aspectRatio;
+		}
+		
+		if (hoset + self.size.height >= self.parentData.height) {
+			self.size.height = self.parentData.height - hoset;
+			if (pRatio) self.size.width = self.size.height / o.aspectRatio;
+		}
+	},
+	
+	stop: function(e, ui){
+		var o = ui.options, self = $(this).data("resizable"), cp = self.position,
+				co = self.containerOffset, cop = self.containerPosition, ce = self.containerElement;
+		
+		var helper = $(self.helper), ho = helper.offset(), w = helper.innerWidth(), h = helper.innerHeight();
+		
+		
+		if (o.helper && !o.animate && /relative/.test(ce.css('position')))
+			$(this).css({ left: (ho.left - co.left), top: (ho.top - co.top), width: w, height: h });
+		
+		if (o.helper && !o.animate && /static/.test(ce.css('position')))
+			$(this).css({ left: cop.left + (ho.left - co.left), top: cop.top + (ho.top - co.top), width: w, height: h });
+		
+	}
+});
+
+$.ui.plugin.add("resizable", "grid", {
+	
+	resize: function(e, ui) {
+		var o = ui.options, self = $(this).data("resizable"), cs = self.size, os = self.originalSize, op = self.originalPosition, a = self.axis, ratio = o._aspectRatio || e.shiftKey;
+		o.grid = typeof o.grid == "number" ? [o.grid, o.grid] : o.grid;
+		var ox = Math.round((cs.width - os.width) / (o.grid[0]||1)) * (o.grid[0]||1), oy = Math.round((cs.height - os.height) / (o.grid[1]||1)) * (o.grid[1]||1);
+		
+		if (/^(se|s|e)$/.test(a)) {
+			self.size.width = os.width + ox;
+			self.size.height = os.height + oy;
+		}
+		else if (/^(ne)$/.test(a)) {
+			self.size.width = os.width + ox;
+			self.size.height = os.height + oy;
+			self.position.top = op.top - oy;
+		}
+		else if (/^(sw)$/.test(a)) {
+			self.size.width = os.width + ox;
+			self.size.height = os.height + oy;
+			self.position.left = op.left - ox;
+		}
+		else {
+			self.size.width = os.width + ox;
+			self.size.height = os.height + oy;
+			self.position.top = op.top - oy;
+			self.position.left = op.left - ox;
+		}
+	}
+	
+});
+
+$.ui.plugin.add("resizable", "animate", {
+	
+	stop: function(e, ui) {
+		var o = ui.options, self = $(this).data("resizable");
+		
+		var pr = o.proportionallyResize, ista = pr && (/textarea/i).test(pr.get(0).nodeName), 
+						soffseth = ista && $.ui.hasScroll(pr.get(0), 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
+							soffsetw = ista ? 0 : self.sizeDiff.width;
+		
+		var style = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },
+					left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null, 
+						top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null; 
+		
+		self.element.animate(
+			$.extend(style, top && left ? { top: top, left: left } : {}), { 
+				duration: o.animateDuration || "slow", easing: o.animateEasing || "swing", 
+				step: function() {
+					
+					var data = {
+						width: parseInt(self.element.css('width'), 10),
+						height: parseInt(self.element.css('height'), 10),
+						top: parseInt(self.element.css('top'), 10),
+						left: parseInt(self.element.css('left'), 10)
+					};
+					
+					if (pr) pr.css({ width: data.width, height: data.height });
+					
+					// propagating resize, and updating values for each animation step
+					self._updateCache(data);
+					self.propagate("animate", e);
+					
+				}
+			}
+		);
+	}
+	
+});
+
+$.ui.plugin.add("resizable", "ghost", {
+	
+	start: function(e, ui) {
+		var o = ui.options, self = $(this).data("resizable"), pr = o.proportionallyResize, cs = self.size;
+		
+		if (!pr) self.ghost = self.element.clone();
+		else self.ghost = pr.clone();
+		
+		self.ghost.css(
+			{ opacity: .25, display: 'block', position: 'relative', height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 }
+		)
+		.addClass('ui-resizable-ghost').addClass(typeof o.ghost == 'string' ? o.ghost : '');
+		
+		self.ghost.appendTo(self.helper);
+		
+	},
+	
+	resize: function(e, ui){
+		var o = ui.options, self = $(this).data("resizable"), pr = o.proportionallyResize;
+		
+		if (self.ghost) self.ghost.css({ position: 'relative', height: self.size.height, width: self.size.width });
+		
+	},
+	
+	stop: function(e, ui){
+		var o = ui.options, self = $(this).data("resizable"), pr = o.proportionallyResize;
+		if (self.ghost && self.helper) self.helper.get(0).removeChild(self.ghost.get(0));
+	}
+	
+});
+
+$.ui.plugin.add("resizable", "alsoResize", {
+	
+	start: function(e, ui) {
+		var o = ui.options, self = $(this).data("resizable"), 
+		
+		_store = function(exp) {
+			$(exp).each(function() {
+				$(this).data("resizable-alsoresize", {
+					width: parseInt($(this).width(), 10), height: parseInt($(this).height(), 10),
+					left: parseInt($(this).css('left'), 10), top: parseInt($(this).css('top'), 10)
+				});
+			});
+		};
+		
+		if (typeof(o.alsoResize) == 'object') {
+			if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0];	_store(o.alsoResize); }
+			else { $.each(o.alsoResize, function(exp, c) { _store(exp); }); }
+		}else{
+			_store(o.alsoResize);
+		} 
+	},
+	
+	resize: function(e, ui){
+		var o = ui.options, self = $(this).data("resizable"), os = self.originalSize, op = self.originalPosition;
+		
+		var delta = { 
+			height: (self.size.height - os.height) || 0, width: (self.size.width - os.width) || 0,
+			top: (self.position.top - op.top) || 0, left: (self.position.left - op.left) || 0
+		},
+		
+		_alsoResize = function(exp, c) {
+			$(exp).each(function() {
+				var start = $(this).data("resizable-alsoresize"), style = {}, css = c && c.length ? c : ['width', 'height', 'top', 'left'];
+				
+				$.each(css || ['width', 'height', 'top', 'left'], function(i, prop) {
+					var sum = (start[prop]||0) + (delta[prop]||0);
+					if (sum && sum >= 0)
+						style[prop] = sum || null;
+				});
+				$(this).css(style);
+			});
+		};
+		
+		if (typeof(o.alsoResize) == 'object') {
+			$.each(o.alsoResize, function(exp, c) { _alsoResize(exp, c); });
+		}else{
+			_alsoResize(o.alsoResize);
+		}
+	},
+	
+	stop: function(e, ui){
+		$(this).removeData("resizable-alsoresize-start");
+	}
+});
+
+})(jQuery);
+/*
+ * jQuery UI Selectable
+ *
+ * Copyright (c) 2008 Richard D. Worth (rdworth.org)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ * 
+ * http://docs.jquery.com/UI/Selectables
+ *
+ * Depends:
+ *	ui.core.js
+ */
+(function($) {
+
+$.widget("ui.selectable", $.extend({}, $.ui.mouse, {
+	init: function() {
+		var self = this;
+		
+		this.element.addClass("ui-selectable");
+		
+		this.dragged = false;
+
+		// cache selectee children based on filter
+		var selectees;
+		this.refresh = function() {
+			selectees = $(self.options.filter, self.element[0]);
+			selectees.each(function() {
+				var $this = $(this);
+				var pos = $this.offset();
+				$.data(this, "selectable-item", {
+					element: this,
+					$element: $this,
+					left: pos.left,
+					top: pos.top,
+					right: pos.left + $this.width(),
+					bottom: pos.top + $this.height(),
+					startselected: false,
+					selected: $this.hasClass('ui-selected'),
+					selecting: $this.hasClass('ui-selecting'),
+					unselecting: $this.hasClass('ui-unselecting')
+				});
+			});
+		};
+		this.refresh();
+
+		this.selectees = selectees.addClass("ui-selectee");
+		
+		this.mouseInit();
+		
+		this.helper = $(document.createElement('div')).css({border:'1px dotted black'});
+	},
+	toggle: function() {
+		if(this.options.disabled){
+			this.enable();
+		} else {
+			this.disable();
+		}
+	},
+	destroy: function() {
+		this.element
+			.removeClass("ui-selectable ui-selectable-disabled")
+			.removeData("selectable")
+			.unbind(".selectable");
+		this.mouseDestroy();
+	},
+	mouseStart: function(e) {
+		var self = this;
+		
+		this.opos = [e.pageX, e.pageY];
+		
+		if (this.options.disabled)
+			return;
+
+		var options = this.options;
+
+		this.selectees = $(options.filter, this.element[0]);
+
+		// selectable START callback
+		this.element.triggerHandler("selectablestart", [e, {
+			"selectable": this.element[0],
+			"options": options
+		}], options.start);
+
+		$('body').append(this.helper);
+		// position helper (lasso)
+		this.helper.css({
+			"z-index": 100,
+			"position": "absolute",
+			"left": e.clientX,
+			"top": e.clientY,
+			"width": 0,
+			"height": 0
+		});
+
+		if (options.autoRefresh) {
+			this.refresh();
+		}
+
+		this.selectees.filter('.ui-selected').each(function() {
+			var selectee = $.data(this, "selectable-item");
+			selectee.startselected = true;
+			if (!e.ctrlKey) {
+				selectee.$element.removeClass('ui-selected');
+				selectee.selected = false;
+				selectee.$element.addClass('ui-unselecting');
+				selectee.unselecting = true;
+				// selectable UNSELECTING callback
+				self.element.triggerHandler("selectableunselecting", [e, {
+					selectable: self.element[0],
+					unselecting: selectee.element,
+					options: options
+				}], options.unselecting);
+			}
+		});
+		
+		var isSelectee = false;
+		$(e.target).parents().andSelf().each(function() {
+			if($.data(this, "selectable-item")) isSelectee = true;
+		});
+		return this.options.keyboard ? !isSelectee : true;
+	},
+	mouseDrag: function(e) {
+		var self = this;
+		this.dragged = true;
+		
+		if (this.options.disabled)
+			return;
+
+		var options = this.options;
+
+		var x1 = this.opos[0], y1 = this.opos[1], x2 = e.pageX, y2 = e.pageY;
+		if (x1 > x2) { var tmp = x2; x2 = x1; x1 = tmp; }
+		if (y1 > y2) { var tmp = y2; y2 = y1; y1 = tmp; }
+		this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1});
+
+		this.selectees.each(function() {
+			var selectee = $.data(this, "selectable-item");
+			//prevent helper from being selected if appendTo: selectable
+			if (!selectee || selectee.element == self.element[0])
+				return;
+			var hit = false;
+			if (options.tolerance == 'touch') {
+				hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );
+			} else if (options.tolerance == 'fit') {
+				hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);
+			}
+
+			if (hit) {
+				// SELECT
+				if (selectee.selected) {
+					selectee.$element.removeClass('ui-selected');
+					selectee.selected = false;
+				}
+				if (selectee.unselecting) {
+					selectee.$element.removeClass('ui-unselecting');
+					selectee.unselecting = false;
+				}
+				if (!selectee.selecting) {
+					selectee.$element.addClass('ui-selecting');
+					selectee.selecting = true;
+					// selectable SELECTING callback
+					self.element.triggerHandler("selectableselecting", [e, {
+						selectable: self.element[0],
+						selecting: selectee.element,
+						options: options
+					}], options.selecting);
+				}
+			} else {
+				// UNSELECT
+				if (selectee.selecting) {
+					if (e.ctrlKey && selectee.startselected) {
+						selectee.$element.removeClass('ui-selecting');
+						selectee.selecting = false;
+						selectee.$element.addClass('ui-selected');
+						selectee.selected = true;
+					} else {
+						selectee.$element.removeClass('ui-selecting');
+						selectee.selecting = false;
+						if (selectee.startselected) {
+							selectee.$element.addClass('ui-unselecting');
+							selectee.unselecting = true;
+						}
+						// selectable UNSELECTING callback
+						self.element.triggerHandler("selectableunselecting", [e, {
+							selectable: self.element[0],
+							unselecting: selectee.element,
+							options: options
+						}], options.unselecting);
+					}
+				}
+				if (selectee.selected) {
+					if (!e.ctrlKey && !selectee.startselected) {
+						selectee.$element.removeClass('ui-selected');
+						selectee.selected = false;
+
+						selectee.$element.addClass('ui-unselecting');
+						selectee.unselecting = true;
+						// selectable UNSELECTING callback
+						self.element.triggerHandler("selectableunselecting", [e, {
+							selectable: self.element[0],
+							unselecting: selectee.element,
+							options: options
+						}], options.unselecting);
+					}
+				}
+			}
+		});
+		
+		return false;
+	},
+	mouseStop: function(e) {
+		var self = this;
+		
+		this.dragged = false;
+		
+		var options = this.options;
+
+		$('.ui-unselecting', this.element[0]).each(function() {
+			var selectee = $.data(this, "selectable-item");
+			selectee.$element.removeClass('ui-unselecting');
+			selectee.unselecting = false;
+			selectee.startselected = false;
+			self.element.triggerHandler("selectableunselected", [e, {
+				selectable: self.element[0],
+				unselected: selectee.element,
+				options: options
+			}], options.unselected);
+		});
+		$('.ui-selecting', this.element[0]).each(function() {
+			var selectee = $.data(this, "selectable-item");
+			selectee.$element.removeClass('ui-selecting').addClass('ui-selected');
+			selectee.selecting = false;
+			selectee.selected = true;
+			selectee.startselected = true;
+			self.element.triggerHandler("selectableselected", [e, {
+				selectable: self.element[0],
+				selected: selectee.element,
+				options: options
+			}], options.selected);
+		});
+		this.element.triggerHandler("selectablestop", [e, {
+			selectable: self.element[0],
+			options: this.options
+		}], this.options.stop);
+		
+		this.helper.remove();
+		
+		return false;
+	}
+}));
+
+$.extend($.ui.selectable, {
+	defaults: {
+		distance: 1,
+		delay: 0,
+		cancel: ":input",
+		appendTo: 'body',
+		autoRefresh: true,
+		filter: '*',
+		tolerance: 'touch'
+	}
+});
+
+})(jQuery);
+/*
+ * jQuery UI Sortable
+ *
+ * Copyright (c) 2008 Paul Bakaus
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ * 
+ * http://docs.jquery.com/UI/Sortables
+ *
+ * Depends:
+ *	ui.core.js
+ */
+(function($) {
+
+function contains(a, b) { 
+    var safari2 = $.browser.safari && $.browser.version < 522; 
+    if (a.contains && !safari2) { 
+        return a.contains(b); 
+    } 
+    if (a.compareDocumentPosition) 
+        return !!(a.compareDocumentPosition(b) & 16); 
+    while (b = b.parentNode) 
+          if (b == a) return true; 
+    return false; 
+};
+
+$.widget("ui.sortable", $.extend({}, $.ui.mouse, {
+	init: function() {
+
+		var o = this.options;
+		this.containerCache = {};
+		this.element.addClass("ui-sortable");
+	
+		//Get the items
+		this.refresh();
+
+		//Let's determine if the items are floating
+		this.floating = this.items.length ? (/left|right/).test(this.items[0].item.css('float')) : false;
+		
+		//Let's determine the parent's offset
+		if(!(/(relative|absolute|fixed)/).test(this.element.css('position'))) this.element.css('position', 'relative');
+		this.offset = this.element.offset();
+
+		//Initialize mouse events for interaction
+		this.mouseInit();
+		
+	},
+	plugins: {},
+	ui: function(inst) {
+		return {
+			helper: (inst || this)["helper"],
+			placeholder: (inst || this)["placeholder"] || $([]),
+			position: (inst || this)["position"],
+			absolutePosition: (inst || this)["positionAbs"],
+			options: this.options,
+			element: this.element,
+			item: (inst || this)["currentItem"],
+			sender: inst ? inst.element : null
+		};		
+	},
+	propagate: function(n,e,inst, noPropagation) {
+		$.ui.plugin.call(this, n, [e, this.ui(inst)]);
+		if(!noPropagation) this.element.triggerHandler(n == "sort" ? n : "sort"+n, [e, this.ui(inst)], this.options[n]);
+	},
+	serialize: function(o) {
+
+		var items = ($.isFunction(this.options.items) ? this.options.items.call(this.element) : $(this.options.items, this.element)).not('.ui-sortable-helper'); //Only the items of the sortable itself
+		var str = []; o = o || {};
+		
+		items.each(function() {
+			var res = ($(this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
+			if(res) str.push((o.key || res[1])+'[]='+(o.key && o.expression ? res[1] : res[2]));
+		});
+		
+		return str.join('&');
+		
+	},
+	toArray: function(attr) {
+		
+		var items = ($.isFunction(this.options.items) ? this.options.items.call(this.element) : $(this.options.items, this.element)).not('.ui-sortable-helper'); //Only the items of the sortable itself
+		var ret = [];
+
+		items.each(function() { ret.push($(this).attr(attr || 'id')); });
+		return ret;
+		
+	},
+	/* Be careful with the following core functions */
+	intersectsWith: function(item) {
+		
+		var x1 = this.positionAbs.left, x2 = x1 + this.helperProportions.width,
+		y1 = this.positionAbs.top, y2 = y1 + this.helperProportions.height;
+		var l = item.left, r = l + item.width, 
+		t = item.top, b = t + item.height;
+
+		if(this.options.tolerance == "pointer" || this.options.forcePointerForContainers || (this.options.tolerance == "guess" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])) {
+			return (y1 + this.offset.click.top > t && y1 + this.offset.click.top < b && x1 + this.offset.click.left > l && x1 + this.offset.click.left < r);
+		} else {
+		
+			return (l < x1 + (this.helperProportions.width / 2) // Right Half
+				&& x2 - (this.helperProportions.width / 2) < r // Left Half
+				&& t < y1 + (this.helperProportions.height / 2) // Bottom Half
+				&& y2 - (this.helperProportions.height / 2) < b ); // Top Half
+		
+		}
+		
+	},
+	intersectsWithEdge: function(item) {	
+		var x1 = this.positionAbs.left, x2 = x1 + this.helperProportions.width,
+			y1 = this.positionAbs.top, y2 = y1 + this.helperProportions.height;
+		var l = item.left, r = l + item.width, 
+			t = item.top, b = t + item.height;
+
+		if(this.options.tolerance == "pointer" || (this.options.tolerance == "guess" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])) {
+
+			if(!(y1 + this.offset.click.top > t && y1 + this.offset.click.top < b && x1 + this.offset.click.left > l && x1 + this.offset.click.left < r)) return false;
+			
+			if(this.floating) {
+				if(x1 + this.offset.click.left > l && x1 + this.offset.click.left < l + item.width/2) return 2;
+				if(x1 + this.offset.click.left > l+item.width/2 && x1 + this.offset.click.left < r) return 1;
+			} else {
+				if(y1 + this.offset.click.top > t && y1 + this.offset.click.top < t + item.height/2) return 2;
+				if(y1 + this.offset.click.top > t+item.height/2 && y1 + this.offset.click.top < b) return 1;
+			}
+
+		} else {
+		
+			if (!(l < x1 + (this.helperProportions.width / 2) // Right Half
+				&& x2 - (this.helperProportions.width / 2) < r // Left Half
+				&& t < y1 + (this.helperProportions.height / 2) // Bottom Half
+				&& y2 - (this.helperProportions.height / 2) < b )) return false; // Top Half
+			
+			if(this.floating) {
+				if(x2 > l && x1 < l) return 2; //Crosses left edge
+				if(x1 < r && x2 > r) return 1; //Crosses right edge
+			} else {
+				if(y2 > t && y1 < t) return 1; //Crosses top edge
+				if(y1 < b && y2 > b) return 2; //Crosses bottom edge
+			}
+		
+		}
+		
+		return false;
+		
+	},
+	refresh: function() {
+		this.refreshItems();
+		this.refreshPositions();
+	},
+	refreshItems: function() {
+		
+		this.items = [];
+		this.containers = [this];
+		var items = this.items;
+		var self = this;
+		var queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element), this]];
+	
+		if(this.options.connectWith) {
+			for (var i = this.options.connectWith.length - 1; i >= 0; i--){
+				var cur = $(this.options.connectWith[i]);
+				for (var j = cur.length - 1; j >= 0; j--){
+					var inst = $.data(cur[j], 'sortable');
+					if(inst && !inst.options.disabled) {
+						queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element), inst]);
+						this.containers.push(inst);
+					}
+				};
+			};
+		}
+
+		for (var i = queries.length - 1; i >= 0; i--){
+			queries[i][0].each(function() {
+				$.data(this, 'sortable-item', queries[i][1]); // Data for target checking (mouse manager)
+				items.push({
+					item: $(this),
+					instance: queries[i][1],
+					width: 0, height: 0,
+					left: 0, top: 0
+				});
+			});
+		};
+
+	},
+	refreshPositions: function(fast) {
+
+		//This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
+		if(this.offsetParent) {
+			var po = this.offsetParent.offset();
+			this.offset.parent = { top: po.top + this.offsetParentBorders.top, left: po.left + this.offsetParentBorders.left };
+		}
+
+		for (var i = this.items.length - 1; i >= 0; i--){		
+			
+			//We ignore calculating positions of all connected containers when we're not over them
+			if(this.items[i].instance != this.currentContainer && this.currentContainer && this.items[i].item[0] != this.currentItem[0])
+				continue;
+				
+			var t = this.options.toleranceElement ? $(this.options.toleranceElement, this.items[i].item) : this.items[i].item;
+			
+			if(!fast) {
+				this.items[i].width = t[0].offsetWidth;
+				this.items[i].height = t[0].offsetHeight;
+			}
+			
+			var p = t.offset();
+			this.items[i].left = p.left;
+			this.items[i].top = p.top;
+			
+		};
+
+		if(this.options.custom && this.options.custom.refreshContainers) {
+			this.options.custom.refreshContainers.call(this);
+		} else {
+			for (var i = this.containers.length - 1; i >= 0; i--){
+				var p =this.containers[i].element.offset();
+				this.containers[i].containerCache.left = p.left;
+				this.containers[i].containerCache.top = p.top;
+				this.containers[i].containerCache.width	= this.containers[i].element.outerWidth();
+				this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
+			};
+		}
+
+	},
+	destroy: function() {
+		this.element
+			.removeClass("ui-sortable ui-sortable-disabled")
+			.removeData("sortable")
+			.unbind(".sortable");
+		this.mouseDestroy();
+		
+		for ( var i = this.items.length - 1; i >= 0; i-- )
+			this.items[i].item.removeData("sortable-item");
+	},
+	createPlaceholder: function(that) {
+		
+		var self = that || this, o = self.options;
+
+		if(o.placeholder.constructor == String) {
+			var className = o.placeholder;
+			o.placeholder = {
+				element: function() {
+					return $('<div></div>').addClass(className)[0];
+				},
+				update: function(i, p) {
+					p.css(i.offset()).css({ width: i.outerWidth(), height: i.outerHeight() });
+				}
+			};
+		}
+		
+		self.placeholder = $(o.placeholder.element.call(self.element, self.currentItem)).appendTo('body').css({ position: 'absolute' });
+		o.placeholder.update.call(self.element, self.currentItem, self.placeholder);
+	},
+	contactContainers: function(e) {
+		for (var i = this.containers.length - 1; i >= 0; i--){
+
+			if(this.intersectsWith(this.containers[i].containerCache)) {
+				if(!this.containers[i].containerCache.over) {
+					
+
+					if(this.currentContainer != this.containers[i]) {
+						
+						//When entering a new container, we will find the item with the least distance and append our item near it
+						var dist = 10000; var itemWithLeastDistance = null; var base = this.positionAbs[this.containers[i].floating ? 'left' : 'top'];
+						for (var j = this.items.length - 1; j >= 0; j--) {
+							if(!contains(this.containers[i].element[0], this.items[j].item[0])) continue;
+							var cur = this.items[j][this.containers[i].floating ? 'left' : 'top'];
+							if(Math.abs(cur - base) < dist) {
+								dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
+							}
+						}
+						
+						if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled
+							continue;
+						
+						//We also need to exchange the placeholder
+						if(this.placeholder) this.placeholder.remove();
+						if(this.containers[i].options.placeholder) {
+							this.containers[i].createPlaceholder(this);
+						} else {
+							this.placeholder = null;;
+						}
+						
+						this.currentContainer = this.containers[i];
+						itemWithLeastDistance ? this.rearrange(e, itemWithLeastDistance, null, true) : this.rearrange(e, null, this.containers[i].element, true);
+						this.propagate("change", e); //Call plugins and callbacks
+						this.containers[i].propagate("change", e, this); //Call plugins and callbacks
+
+					}
+					
+					this.containers[i].propagate("over", e, this);
+					this.containers[i].containerCache.over = 1;
+				}
+			} else {
+				if(this.containers[i].containerCache.over) {
+					this.containers[i].propagate("out", e, this);
+					this.containers[i].containerCache.over = 0;
+				}
+			}
+			
+		};			
+	},
+	mouseCapture: function(e, overrideHandle) {
+	
+		if(this.options.disabled || this.options.type == 'static') return false;
+
+		//We have to refresh the items data once first
+		this.refreshItems();
+
+		//Find out if the clicked node (or one of its parents) is a actual item in this.items
+		var currentItem = null, self = this, nodes = $(e.target).parents().each(function() {	
+			if($.data(this, 'sortable-item') == self) {
+				currentItem = $(this);
+				return false;
+			}
+		});
+		if($.data(e.target, 'sortable-item') == self) currentItem = $(e.target);
+
+		if(!currentItem) return false;
+		if(this.options.handle && !overrideHandle) {
+			var validHandle = false;
+			
+			$(this.options.handle, currentItem).find("*").andSelf().each(function() { if(this == e.target) validHandle = true; });
+			if(!validHandle) return false;
+		}
+			
+		this.currentItem = currentItem;
+		return true;	
+			
+	},
+	mouseStart: function(e, overrideHandle, noActivation) {
+
+		var o = this.options;
+		this.currentContainer = this;
+
+		//We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
+		this.refreshPositions();
+
+		//Create and append the visible helper			
+		this.helper = typeof o.helper == 'function' ? $(o.helper.apply(this.element[0], [e, this.currentItem])) : this.currentItem.clone();
+		if (!this.helper.parents('body').length) $(o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(this.helper[0]); //Add the helper to the DOM if that didn't happen already
+		this.helper.css({ position: 'absolute', clear: 'both' }).addClass('ui-sortable-helper'); //Position it absolutely and add a helper class
+
+		/*
+		 * - Position generation -
+		 * This block generates everything position related - it's the core of draggables.
+		 */
+
+		this.margins = {																				//Cache the margins
+			left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
+			top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
+		};		
+	
+		this.offset = this.currentItem.offset();														//The element's absolute position on the page
+		this.offset = {																					//Substract the margins from the element's absolute offset
+			top: this.offset.top - this.margins.top,
+			left: this.offset.left - this.margins.left
+		};
+		
+		this.offset.click = {																			//Where the click happened, relative to the element
+			left: e.pageX - this.offset.left,
+			top: e.pageY - this.offset.top
+		};
+		
+		this.offsetParent = this.helper.offsetParent();													//Get the offsetParent and cache its position
+		var po = this.offsetParent.offset();			
+
+		this.offsetParentBorders = {
+			top: (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
+			left: (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
+		};
+		this.offset.parent = {																			//Store its position plus border
+			top: po.top + this.offsetParentBorders.top,
+			left: po.left + this.offsetParentBorders.left
+		};
+	
+		this.originalPosition = this.generatePosition(e);												//Generate the original position
+		this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };  //Cache the former DOM position
+		
+		//If o.placeholder is used, create a new element at the given position with the class
+		this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() };//Cache the helper size
+		if(o.placeholder) this.createPlaceholder();
+		
+		//Call plugins and callbacks
+		this.propagate("start", e);
+		this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() };//Recache the helper size
+		
+		if(o.cursorAt) {
+			if(o.cursorAt.left != undefined) this.offset.click.left = o.cursorAt.left;
+			if(o.cursorAt.right != undefined) this.offset.click.left = this.helperProportions.width - o.cursorAt.right;
+			if(o.cursorAt.top != undefined) this.offset.click.top = o.cursorAt.top;
+			if(o.cursorAt.bottom != undefined) this.offset.click.top = this.helperProportions.height - o.cursorAt.bottom;
+		}
+
+		/*
+		 * - Position constraining -
+		 * Here we prepare position constraining like grid and containment.
+		 */	
+		
+		if(o.containment) {
+			if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
+			if(o.containment == 'document' || o.containment == 'window') this.containment = [
+				0 - this.offset.parent.left,
+				0 - this.offset.parent.top,
+				$(o.containment == 'document' ? document : window).width() - this.offset.parent.left - this.helperProportions.width - this.margins.left - (parseInt(this.element.css("marginRight"),10) || 0),
+				($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.offset.parent.top - this.helperProportions.height - this.margins.top - (parseInt(this.element.css("marginBottom"),10) || 0)
+			];
+
+			if(!(/^(document|window|parent)$/).test(o.containment)) {
+				var ce = $(o.containment)[0];
+				var co = $(o.containment).offset();
+				
+				this.containment = [
+					co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) - this.offset.parent.left,
+					co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) - this.offset.parent.top,
+					co.left+Math.max(ce.scrollWidth,ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - this.offset.parent.left - this.helperProportions.width - this.margins.left - (parseInt(this.currentItem.css("marginRight"),10) || 0),
+					co.top+Math.max(ce.scrollHeight,ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - this.offset.parent.top - this.helperProportions.height - this.margins.top - (parseInt(this.currentItem.css("marginBottom"),10) || 0)
+				];
+			}
+		}
+
+		//Set the original element visibility to hidden to still fill out the white space
+		if(this.options.placeholder != 'clone')
+			this.currentItem.css('visibility', 'hidden');
+		
+		//Post 'activate' events to possible containers
+		if(!noActivation) {
+			 for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i].propagate("activate", e, this); }
+		}
+		
+		//Prepare possible droppables
+		if($.ui.ddmanager) $.ui.ddmanager.current = this;
+		if ($.ui.ddmanager && !o.dropBehaviour) $.ui.ddmanager.prepareOffsets(this, e);
+
+		this.dragging = true;
+
+		this.mouseDrag(e); //Execute the drag once - this causes the helper not to be visible before getting its correct position
+		return true;
+
+
+	},
+	convertPositionTo: function(d, pos) {
+		if(!pos) pos = this.position;
+		var mod = d == "absolute" ? 1 : -1;
+		return {
+			top: (
+				pos.top																	// the calculated relative position
+				+ this.offset.parent.top * mod											// The offsetParent's offset without borders (offset + border)
+				- (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop) * mod	// The offsetParent's scroll position
+				+ this.margins.top * mod												//Add the margin (you don't want the margin counting in intersection methods)
+			),
+			left: (
+				pos.left																// the calculated relative position
+				+ this.offset.parent.left * mod											// The offsetParent's offset without borders (offset + border)
+				- (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft) * mod	// The offsetParent's scroll position
+				+ this.margins.left * mod												//Add the margin (you don't want the margin counting in intersection methods)
+			)
+		};
+	},
+	generatePosition: function(e) {
+		
+		var o = this.options;
+		var position = {
+			top: (
+				e.pageY																	// The absolute mouse position
+				- this.offset.click.top													// Click offset (relative to the element)
+				- this.offset.parent.top												// The offsetParent's offset without borders (offset + border)
+				+ (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)	// The offsetParent's scroll position, not if the element is fixed
+			),
+			left: (
+				e.pageX																	// The absolute mouse position
+				- this.offset.click.left												// Click offset (relative to the element)
+				- this.offset.parent.left												// The offsetParent's offset without borders (offset + border)
+				+ (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft)	// The offsetParent's scroll position, not if the element is fixed
+			)
+		};
+		
+		if(!this.originalPosition) return position;										//If we are not dragging yet, we won't check for options
+		
+		/*
+		 * - Position constraining -
+		 * Constrain the position to a mix of grid, containment.
+		 */
+		if(this.containment) {
+			if(position.left < this.containment[0]) position.left = this.containment[0];
+			if(position.top < this.containment[1]) position.top = this.containment[1];
+			if(position.left > this.containment[2]) position.left = this.containment[2];
+			if(position.top > this.containment[3]) position.top = this.containment[3];
+		}
+		
+		if(o.grid) {
+			var top = this.originalPosition.top + Math.round((position.top - this.originalPosition.top) / o.grid[1]) * o.grid[1];
+			position.top = this.containment ? (!(top < this.containment[1] || top > this.containment[3]) ? top : (!(top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
+			
+			var left = this.originalPosition.left + Math.round((position.left - this.originalPosition.left) / o.grid[0]) * o.grid[0];
+			position.left = this.containment ? (!(left < this.containment[0] || left > this.containment[2]) ? left : (!(left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
+		}
+		
+		return position;
+	},
+	mouseDrag: function(e) {
+
+		//Compute the helpers position
+		this.position = this.generatePosition(e);
+		this.positionAbs = this.convertPositionTo("absolute");
+
+		//Call the internal plugins
+		$.ui.plugin.call(this, "sort", [e, this.ui()]);
+		
+		//Regenerate the absolute position used for position checks
+		this.positionAbs = this.convertPositionTo("absolute");
+		
+		//Set the helper's position
+		this.helper[0].style.left = this.position.left+'px';
+		this.helper[0].style.top = this.position.top+'px';
+
+		//Rearrange
+		for (var i = this.items.length - 1; i >= 0; i--) {
+			var intersection = this.intersectsWithEdge(this.items[i]);
+			if(!intersection) continue;
+			
+			if(this.items[i].item[0] != this.currentItem[0] //cannot intersect with itself
+				&&	this.currentItem[intersection == 1 ? "next" : "prev"]()[0] != this.items[i].item[0] //no useless actions that have been done before
+				&&	!contains(this.currentItem[0], this.items[i].item[0]) //no action if the item moved is the parent of the item checked
+				&& (this.options.type == 'semi-dynamic' ? !contains(this.element[0], this.items[i].item[0]) : true)
+			) {
+				
+				this.direction = intersection == 1 ? "down" : "up";
+				this.rearrange(e, this.items[i]);
+				this.propagate("change", e); //Call plugins and callbacks
+				break;
+			}
+		}
+		
+		//Post events to containers
+		this.contactContainers(e);
+		
+		//Interconnect with droppables
+		if($.ui.ddmanager) $.ui.ddmanager.drag(this, e);
+
+		//Call callbacks
+		this.element.triggerHandler("sort", [e, this.ui()], this.options["sort"]);
+
+		return false;
+		
+	},
+	rearrange: function(e, i, a, hardRefresh) {
+		a ? a[0].appendChild(this.currentItem[0]) : i.item[0].parentNode.insertBefore(this.currentItem[0], (this.direction == 'down' ? i.item[0] : i.item[0].nextSibling));
+		
+		//Various things done here to improve the performance:
+		// 1. we create a setTimeout, that calls refreshPositions
+		// 2. on the instance, we have a counter variable, that get's higher after every append
+		// 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
+		// 4. this lets only the last addition to the timeout stack through
+		this.counter = this.counter ? ++this.counter : 1;
+		var self = this, counter = this.counter;
+
+		window.setTimeout(function() {
+			if(counter == self.counter) self.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
+		},0);
+		
+		if(this.options.placeholder)
+			this.options.placeholder.update.call(this.element, this.currentItem, this.placeholder);
+	},
+	mouseStop: function(e, noPropagation) {
+
+		//If we are using droppables, inform the manager about the drop
+		if ($.ui.ddmanager && !this.options.dropBehaviour)
+			$.ui.ddmanager.drop(this, e);
+			
+		if(this.options.revert) {
+			var self = this;
+			var cur = self.currentItem.offset();
+
+			//Also animate the placeholder if we have one
+			if(self.placeholder) self.placeholder.animate({ opacity: 'hide' }, (parseInt(this.options.revert, 10) || 500)-50);
+
+			$(this.helper).animate({
+				left: cur.left - this.offset.parent.left - self.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft),
+				top: cur.top - this.offset.parent.top - self.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)
+			}, parseInt(this.options.revert, 10) || 500, function() {
+				self.clear(e);
+			});
+		} else {
+			this.clear(e, noPropagation);
+		}
+
+		return false;
+		
+	},
+	clear: function(e, noPropagation) {
+
+		if(this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) this.propagate("update", e, null, noPropagation); //Trigger update callback if the DOM position has changed
+		if(!contains(this.element[0], this.currentItem[0])) { //Node was moved out of the current element
+			this.propagate("remove", e, null, noPropagation);
+			for (var i = this.containers.length - 1; i >= 0; i--){
+				if(contains(this.containers[i].element[0], this.currentItem[0])) {
+					this.containers[i].propagate("update", e, this, noPropagation);
+					this.containers[i].propagate("receive", e, this, noPropagation);
+				}
+			};
+		};
+		
+		//Post events to containers
+		for (var i = this.containers.length - 1; i >= 0; i--){
+			this.containers[i].propagate("deactivate", e, this, noPropagation);
+			if(this.containers[i].containerCache.over) {
+				this.containers[i].propagate("out", e, this);
+				this.containers[i].containerCache.over = 0;
+			}
+		}
+		
+		this.dragging = false;
+		if(this.cancelHelperRemoval) {
+			this.propagate("stop", e, null, noPropagation);
+			return false;
+		}
+		
+		$(this.currentItem).css('visibility', '');
+		if(this.placeholder) this.placeholder.remove();
+		this.helper.remove(); this.helper = null;
+		this.propagate("stop", e, null, noPropagation);
+		
+		return true;
+		
+	}
+}));
+
+$.extend($.ui.sortable, {
+	getter: "serialize toArray",
+	defaults: {
+		helper: "clone",
+		tolerance: "guess",
+		distance: 1,
+		delay: 0,
+		scroll: true,
+		scrollSensitivity: 20,
+		scrollSpeed: 20,
+		cancel: ":input",
+		items: '> *',
+		zIndex: 1000,
+		dropOnEmpty: true,
+		appendTo: "parent"
+	}
+});
+
+/*
+ * Sortable Extensions
+ */
+
+$.ui.plugin.add("sortable", "cursor", {
+	start: function(e, ui) {
+		var t = $('body');
+		if (t.css("cursor")) ui.options._cursor = t.css("cursor");
+		t.css("cursor", ui.options.cursor);
+	},
+	stop: function(e, ui) {
+		if (ui.options._cursor) $('body').css("cursor", ui.options._cursor);
+	}
+});
+
+$.ui.plugin.add("sortable", "zIndex", {
+	start: function(e, ui) {
+		var t = ui.helper;
+		if(t.css("zIndex")) ui.options._zIndex = t.css("zIndex");
+		t.css('zIndex', ui.options.zIndex);
+	},
+	stop: function(e, ui) {
+		if(ui.options._zIndex) $(ui.helper).css('zIndex', ui.options._zIndex);
+	}
+});
+
+$.ui.plugin.add("sortable", "opacity", {
+	start: function(e, ui) {
+		var t = ui.helper;
+		if(t.css("opacity")) ui.options._opacity = t.css("opacity");
+		t.css('opacity', ui.options.opacity);
+	},
+	stop: function(e, ui) {
+		if(ui.options._opacity) $(ui.helper).css('opacity', ui.options._opacity);
+	}
+});
+
+$.ui.plugin.add("sortable", "scroll", {
+	start: function(e, ui) {
+		var o = ui.options;
+		var i = $(this).data("sortable");
+	
+		i.overflowY = function(el) {
+			do { if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-y'))) return el; el = el.parent(); } while (el[0].parentNode);
+			return $(document);
+		}(i.currentItem);
+		i.overflowX = function(el) {
+			do { if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-x'))) return el; el = el.parent(); } while (el[0].parentNode);
+			return $(document);
+		}(i.currentItem);
+		
+		if(i.overflowY[0] != document && i.overflowY[0].tagName != 'HTML') i.overflowYOffset = i.overflowY.offset();
+		if(i.overflowX[0] != document && i.overflowX[0].tagName != 'HTML') i.overflowXOffset = i.overflowX.offset();
+		
+	},
+	sort: function(e, ui) {
+		
+		var o = ui.options;
+		var i = $(this).data("sortable");
+		
+		if(i.overflowY[0] != document && i.overflowY[0].tagName != 'HTML') {
+			if((i.overflowYOffset.top + i.overflowY[0].offsetHeight) - e.pageY < o.scrollSensitivity)
+				i.overflowY[0].scrollTop = i.overflowY[0].scrollTop + o.scrollSpeed;
+			if(e.pageY - i.overflowYOffset.top < o.scrollSensitivity)
+				i.overflowY[0].scrollTop = i.overflowY[0].scrollTop - o.scrollSpeed;
+		} else {
+			if(e.pageY - $(document).scrollTop() < o.scrollSensitivity)
+				$(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
+			if($(window).height() - (e.pageY - $(document).scrollTop()) < o.scrollSensitivity)
+				$(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
+		}
+		
+		if(i.overflowX[0] != document && i.overflowX[0].tagName != 'HTML') {
+			if((i.overflowXOffset.left + i.overflowX[0].offsetWidth) - e.pageX < o.scrollSensitivity)
+				i.overflowX[0].scrollLeft = i.overflowX[0].scrollLeft + o.scrollSpeed;
+			if(e.pageX - i.overflowXOffset.left < o.scrollSensitivity)
+				i.overflowX[0].scrollLeft = i.overflowX[0].scrollLeft - o.scrollSpeed;
+		} else {
+			if(e.pageX - $(document).scrollLeft() < o.scrollSensitivity)
+				$(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
+			if($(window).width() - (e.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
+				$(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
+		}
+		
+	}
+});
+
+$.ui.plugin.add("sortable", "axis", {
+	sort: function(e, ui) {
+		
+		var i = $(this).data("sortable");
+		
+		if(ui.options.axis == "y") i.position.left = i.originalPosition.left;
+		if(ui.options.axis == "x") i.position.top = i.originalPosition.top;
+		
+	}
+});
+
+})(jQuery);
+/*
+ * jQuery UI Effects 1.5.2
+ *
+ * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ * 
+ * http://docs.jquery.com/UI/Effects/
+ */
+;(function($) {
+
+$.effects = $.effects || {}; //Add the 'effects' scope
+
+$.extend($.effects, {
+	save: function(el, set) {
+		for(var i=0;i<set.length;i++) {
+			if(set[i] !== null) $.data(el[0], "ec.storage."+set[i], el[0].style[set[i]]);
+		}
+	},
+	restore: function(el, set) {
+		for(var i=0;i<set.length;i++) {
+			if(set[i] !== null) el.css(set[i], $.data(el[0], "ec.storage."+set[i]));
+		}
+	},
+	setMode: function(el, mode) {
+		if (mode == 'toggle') mode = el.is(':hidden') ? 'show' : 'hide'; // Set for toggle
+		return mode;
+	},
+	getBaseline: function(origin, original) { // Translates a [top,left] array into a baseline value
+		// this should be a little more flexible in the future to handle a string & hash
+		var y, x;
+		switch (origin[0]) {
+			case 'top': y = 0; break;
+			case 'middle': y = 0.5; break;
+			case 'bottom': y = 1; break;
+			default: y = origin[0] / original.height;
+		};
+		switch (origin[1]) {
+			case 'left': x = 0; break;
+			case 'center': x = 0.5; break;
+			case 'right': x = 1; break;
+			default: x = origin[1] / original.width;
+		};
+		return {x: x, y: y};
+	},
+	createWrapper: function(el) {
+		if (el.parent().attr('id') == 'fxWrapper')
+			return el;
+		var props = {width: el.outerWidth({margin:true}), height: el.outerHeight({margin:true}), 'float': el.css('float')};
+		el.wrap('<div id="fxWrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');
+		var wrapper = el.parent();
+		if (el.css('position') == 'static'){
+			wrapper.css({position: 'relative'});
+			el.css({position: 'relative'});
+		} else {
+			var top = el.css('top'); if(isNaN(parseInt(top))) top = 'auto';
+			var left = el.css('left'); if(isNaN(parseInt(left))) left = 'auto';
+			wrapper.css({ position: el.css('position'), top: top, left: left, zIndex: el.css('z-index') }).show();
+			el.css({position: 'relative', top:0, left:0});
+		}
+		wrapper.css(props);
+		return wrapper;
+	},
+	removeWrapper: function(el) {
+		if (el.parent().attr('id') == 'fxWrapper')
+			return el.parent().replaceWith(el);
+		return el;
+	},
+	setTransition: function(el, list, factor, val) {
+		val = val || {};
+		$.each(list,function(i, x){
+			unit = el.cssUnit(x);
+			if (unit[0] > 0) val[x] = unit[0] * factor + unit[1];
+		});
+		return val;
+	},
+	animateClass: function(value, duration, easing, callback) {
+
+		var cb = (typeof easing == "function" ? easing : (callback ? callback : null));
+		var ea = (typeof easing == "object" ? easing : null);
+
+		return this.each(function() {
+
+			var offset = {}; var that = $(this); var oldStyleAttr = that.attr("style") || '';
+			if(typeof oldStyleAttr == 'object') oldStyleAttr = oldStyleAttr["cssText"]; /* Stupidly in IE, style is a object.. */
+			if(value.toggle) { that.hasClass(value.toggle) ? value.remove = value.toggle : value.add = value.toggle; }
+
+			//Let's get a style offset
+			var oldStyle = $.extend({}, (document.defaultView ? document.defaultView.getComputedStyle(this,null) : this.currentStyle));
+			if(value.add) that.addClass(value.add); if(value.remove) that.removeClass(value.remove);
+			var newStyle = $.extend({}, (document.defaultView ? document.defaultView.getComputedStyle(this,null) : this.currentStyle));
+			if(value.add) that.removeClass(value.add); if(value.remove) that.addClass(value.remove);
+
+			// The main function to form the object for animation
+			for(var n in newStyle) {
+				if( typeof newStyle[n] != "function" && newStyle[n] /* No functions and null properties */
+				&& n.indexOf("Moz") == -1 && n.indexOf("length") == -1 /* No mozilla spezific render properties. */
+				&& newStyle[n] != oldStyle[n] /* Only values that have changed are used for the animation */
+				&& (n.match(/color/i) || (!n.match(/color/i) && !isNaN(parseInt(newStyle[n],10)))) /* Only things that can be parsed to integers or colors */
+				&& (oldStyle.position != "static" || (oldStyle.position == "static" && !n.match(/left|top|bottom|right/))) /* No need for positions when dealing with static positions */
+				) offset[n] = newStyle[n];
+			}
+
+			that.animate(offset, duration, ea, function() { // Animate the newly constructed offset object
+				// Change style attribute back to original. For stupid IE, we need to clear the damn object.
+				if(typeof $(this).attr("style") == 'object') { $(this).attr("style")["cssText"] = ""; $(this).attr("style")["cssText"] = oldStyleAttr; } else $(this).attr("style", oldStyleAttr);
+				if(value.add) $(this).addClass(value.add); if(value.remove) $(this).removeClass(value.remove);
+				if(cb) cb.apply(this, arguments);
+			});
+
+		});
+	}
+});
+
+//Extend the methods of jQuery
+$.fn.extend({
+	//Save old methods
+	_show: $.fn.show,
+	_hide: $.fn.hide,
+	__toggle: $.fn.toggle,
+	_addClass: $.fn.addClass,
+	_removeClass: $.fn.removeClass,
+	_toggleClass: $.fn.toggleClass,
+	// New ec methods
+	effect: function(fx,o,speed,callback) {
+		return $.effects[fx] ? $.effects[fx].call(this, {method: fx, options: o || {}, duration: speed, callback: callback }) : null;
+	},
+	show: function() {
+		if(!arguments[0] || (arguments[0].constructor == Number || /(slow|normal|fast)/.test(arguments[0])))
+			return this._show.apply(this, arguments);
+		else {
+			var o = arguments[1] || {}; o['mode'] = 'show';
+			return this.effect.apply(this, [arguments[0], o, arguments[2] || o.duration, arguments[3] || o.callback]);
+		}
+	},
+	hide: function() {
+		if(!arguments[0] || (arguments[0].constructor == Number || /(slow|normal|fast)/.test(arguments[0])))
+			return this._hide.apply(this, arguments);
+		else {
+			var o = arguments[1] || {}; o['mode'] = 'hide';
+			return this.effect.apply(this, [arguments[0], o, arguments[2] || o.duration, arguments[3] || o.callback]);
+		}
+	},
+	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 {
+			var o = arguments[1] || {}; o['mode'] = 'toggle';
+			return this.effect.apply(this, [arguments[0], o, arguments[2] || o.duration, arguments[3] || o.callback]);
+		}
+	},
+	addClass: function(classNames,speed,easing,callback) {
+		return speed ? $.effects.animateClass.apply(this, [{ add: classNames },speed,easing,callback]) : this._addClass(classNames);
+	},
+	removeClass: function(classNames,speed,easing,callback) {
+		return speed ? $.effects.animateClass.apply(this, [{ remove: classNames },speed,easing,callback]) : this._removeClass(classNames);
+	},
+	toggleClass: function(classNames,speed,easing,callback) {
+		return speed ? $.effects.animateClass.apply(this, [{ toggle: classNames },speed,easing,callback]) : this._toggleClass(classNames);
+	},
+	morph: function(remove,add,speed,easing,callback) {
+		return $.effects.animateClass.apply(this, [{ add: add, remove: remove },speed,easing,callback]);
+	},
+	switchClass: function() {
+		return this.morph.apply(this, arguments);
+	},
+	// helper functions
+	cssUnit: function(key) {
+		var style = this.css(key), val = [];
+		$.each( ['em','px','%','pt'], function(i, unit){
+			if(style.indexOf(unit) > 0)
+				val = [parseFloat(style), unit];
+		});
+		return val;
+	}
+});
+
+/*
+ * jQuery Color Animations
+ * Copyright 2007 John Resig
+ * Released under the MIT and GPL licenses.
+ */
+
+// We override the animation for all of these color styles
+jQuery.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){
+		jQuery.fx.step[attr] = function(fx){
+				if ( fx.state == 0 ) {
+						fx.start = getColor( fx.elem, attr );
+						fx.end = getRGB( fx.end );
+				}
+
+				fx.elem.style[attr] = "rgb(" + [
+						Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0]), 255), 0),
+						Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1]), 255), 0),
+						Math.max(Math.min( parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2]), 255), 0)
+				].join(",") + ")";
+		}
+});
+
+// Color Conversion functions from highlightFade
+// By Blair Mitchelmore
+// http://jquery.offput.ca/highlightFade/
+
+// Parse strings looking for color tuples [255,255,255]
+function getRGB(color) {
+		var result;
+
+		// Check if we're already dealing with an array of colors
+		if ( color && color.constructor == Array && color.length == 3 )
+				return color;
+
+		// Look for rgb(num,num,num)
+		if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
+				return [parseInt(result[1]), parseInt(result[2]), parseInt(result[3])];
+
+		// Look for rgb(num%,num%,num%)
+		if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
+				return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55];
+
+		// Look for #a0b1c2
+		if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
+				return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];
+
+		// Look for #fff
+		if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
+				return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
+
+		// Look for rgba(0, 0, 0, 0) == transparent in Safari 3
+		if (result = /rgba\(0, 0, 0, 0\)/.exec(color))
+				return colors['transparent']
+
+		// Otherwise, we're most likely dealing with a named color
+		return colors[jQuery.trim(color).toLowerCase()];
+}
+
+function getColor(elem, attr) {
+		var color;
+
+		do {
+				color = jQuery.curCSS(elem, attr);
+
+				// Keep going until we find an element that has color, or we hit the body
+				if ( color != '' && color != 'transparent' || jQuery.nodeName(elem, "body") )
+						break;
+
+				attr = "backgroundColor";
+		} while ( elem = elem.parentNode );
+
+		return getRGB(color);
+};
+
+// Some named colors to work with
+// From Interface by Stefan Petre
+// http://interface.eyecon.ro/
+
+var colors = {
+	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]
+};
+	
+/*
+ * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
+ *
+ * Uses the built in easing capabilities added In jQuery 1.1
+ * to offer multiple easing options
+ *
+ * TERMS OF USE - jQuery Easing
+ * 
+ * Open source under the BSD License. 
+ * 
+ * Copyright Â© 2008 George McGinley Smith
+ * All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without modification, 
+ * are permitted provided that the following conditions are met:
+ * 
+ * Redistributions of source code must retain the above copyright notice, this list of 
+ * conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list 
+ * of conditions and the following disclaimer in the documentation and/or other materials 
+ * provided with the distribution.
+ * 
+ * Neither the name of the author nor the names of contributors may be used to endorse 
+ * or promote products derived from this software without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
+ * OF THE POSSIBILITY OF SUCH DAMAGE. 
+ *
+*/
+
+// t: current time, b: begInnIng value, c: change In value, d: duration
+jQuery.easing['jswing'] = jQuery.easing['swing'];
+
+jQuery.extend( jQuery.easing,
+{
+	def: 'easeOutQuad',
+	swing: function (x, t, b, c, d) {
+		//alert(jQuery.easing.default);
+		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
+	},
+	easeInQuad: function (x, t, b, c, d) {
+		return c*(t/=d)*t + b;
+	},
+	easeOutQuad: function (x, t, b, c, d) {
+		return -c *(t/=d)*(t-2) + b;
+	},
+	easeInOutQuad: function (x, t, b, c, d) {
+		if ((t/=d/2) < 1) return c/2*t*t + b;
+		return -c/2 * ((--t)*(t-2) - 1) + b;
+	},
+	easeInCubic: function (x, t, b, c, d) {
+		return c*(t/=d)*t*t + b;
+	},
+	easeOutCubic: function (x, t, b, c, d) {
+		return c*((t=t/d-1)*t*t + 1) + b;
+	},
+	easeInOutCubic: function (x, t, b, c, d) {
+		if ((t/=d/2) < 1) return c/2*t*t*t + b;
+		return c/2*((t-=2)*t*t + 2) + b;
+	},
+	easeInQuart: function (x, t, b, c, d) {
+		return c*(t/=d)*t*t*t + b;
+	},
+	easeOutQuart: function (x, t, b, c, d) {
+		return -c * ((t=t/d-1)*t*t*t - 1) + b;
+	},
+	easeInOutQuart: function (x, t, b, c, d) {
+		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
+		return -c/2 * ((t-=2)*t*t*t - 2) + b;
+	},
+	easeInQuint: function (x, t, b, c, d) {
+		return c*(t/=d)*t*t*t*t + b;
+	},
+	easeOutQuint: function (x, t, b, c, d) {
+		return c*((t=t/d-1)*t*t*t*t + 1) + b;
+	},
+	easeInOutQuint: function (x, t, b, c, d) {
+		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
+		return c/2*((t-=2)*t*t*t*t + 2) + b;
+	},
+	easeInSine: function (x, t, b, c, d) {
+		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
+	},
+	easeOutSine: function (x, t, b, c, d) {
+		return c * Math.sin(t/d * (Math.PI/2)) + b;
+	},
+	easeInOutSine: function (x, t, b, c, d) {
+		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
+	},
+	easeInExpo: function (x, t, b, c, d) {
+		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
+	},
+	easeOutExpo: function (x, t, b, c, d) {
+		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
+	},
+	easeInOutExpo: function (x, t, b, c, d) {
+		if (t==0) return b;
+		if (t==d) return b+c;
+		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
+		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
+	},
+	easeInCirc: function (x, t, b, c, d) {
+		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
+	},
+	easeOutCirc: function (x, t, b, c, d) {
+		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
+	},
+	easeInOutCirc: function (x, t, b, c, d) {
+		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
+		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
+	},
+	easeInElastic: function (x, t, b, c, d) {
+		var s=1.70158;var p=0;var a=c;
+		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
+		if (a < Math.abs(c)) { a=c; var s=p/4; }
+		else var s = p/(2*Math.PI) * Math.asin (c/a);
+		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
+	},
+	easeOutElastic: function (x, t, b, c, d) {
+		var s=1.70158;var p=0;var a=c;
+		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
+		if (a < Math.abs(c)) { a=c; var s=p/4; }
+		else var s = p/(2*Math.PI) * Math.asin (c/a);
+		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
+	},
+	easeInOutElastic: function (x, t, b, c, d) {
+		var s=1.70158;var p=0;var a=c;
+		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
+		if (a < Math.abs(c)) { a=c; var s=p/4; }
+		else var s = p/(2*Math.PI) * Math.asin (c/a);
+		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
+		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
+	},
+	easeInBack: function (x, t, b, c, d, s) {
+		if (s == undefined) s = 1.70158;
+		return c*(t/=d)*t*((s+1)*t - s) + b;
+	},
+	easeOutBack: function (x, t, b, c, d, s) {
+		if (s == undefined) s = 1.70158;
+		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
+	},
+	easeInOutBack: function (x, t, b, c, d, s) {
+		if (s == undefined) s = 1.70158; 
+		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
+		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
+	},
+	easeInBounce: function (x, t, b, c, d) {
+		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
+	},
+	easeOutBounce: function (x, t, b, c, d) {
+		if ((t/=d) < (1/2.75)) {
+			return c*(7.5625*t*t) + b;
+		} else if (t < (2/2.75)) {
+			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
+		} else if (t < (2.5/2.75)) {
+			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
+		} else {
+			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
+		}
+	},
+	easeInOutBounce: function (x, t, b, c, d) {
+		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
+		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
+	}
+});
+
+/*
+ *
+ * TERMS OF USE - EASING EQUATIONS
+ * 
+ * Open source under the BSD License. 
+ * 
+ * Copyright Â© 2001 Robert Penner
+ * All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without modification, 
+ * are permitted provided that the following conditions are met:
+ * 
+ * Redistributions of source code must retain the above copyright notice, this list of 
+ * conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list 
+ * of conditions and the following disclaimer in the documentation and/or other materials 
+ * provided with the distribution.
+ * 
+ * Neither the name of the author nor the names of contributors may be used to endorse 
+ * or promote products derived from this software without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
+ * OF THE POSSIBILITY OF SUCH DAMAGE. 
+ *
+ */
+
+})(jQuery);
+/*
+ * jQuery UI Effects Blind
+ *
+ * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ * 
+ * http://docs.jquery.com/UI/Effects/Blind
+ *
+ * Depends:
+ *	effects.core.js
+ */
+(function($) {
+
+$.effects.blind = function(o) {
+
+	return this.queue(function() {
+
+		// Create element
+		var el = $(this), props = ['position','top','left'];
+		
+		// Set options
+		var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
+		var direction = o.options.direction || 'vertical'; // Default direction
+		
+		// Adjust
+		$.effects.save(el, props); el.show(); // Save & Show
+		var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
+		var ref = (direction == 'vertical') ? 'height' : 'width';
+		var distance = (direction == 'vertical') ? wrapper.height() : wrapper.width();
+		if(mode == 'show') wrapper.css(ref, 0); // Shift
+		
+		// Animation
+		var animation = {};
+		animation[ref] = mode == 'show' ? distance : 0;
+	 
+		// Animate
+		wrapper.animate(animation, o.duration, o.options.easing, function() {
+			if(mode == 'hide') el.hide(); // Hide
+			$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+			if(o.callback) o.callback.apply(el[0], arguments); // Callback
+			el.dequeue();
+		});
+		
+	});
+	
+};
+
+})(jQuery);
+/*
+ * jQuery UI Effects Bounce
+ *
+ * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ * 
+ * http://docs.jquery.com/UI/Effects/Bounce
+ *
+ * Depends:
+ *	effects.core.js
+ */
+(function($) {
+
+$.effects.bounce = function(o) {
+
+	return this.queue(function() {
+
+		// Create element
+		var el = $(this), props = ['position','top','left'];
+
+		// Set options
+		var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
+		var direction = o.options.direction || 'up'; // Default direction
+		var distance = o.options.distance || 20; // Default distance
+		var times = o.options.times || 5; // Default # of times
+		var speed = o.duration || 250; // Default speed per bounce
+		if (/show|hide/.test(mode)) props.push('opacity'); // Avoid touching opacity to prevent clearType and PNG issues in IE
+
+		// Adjust
+		$.effects.save(el, props); el.show(); // Save & Show
+		$.effects.createWrapper(el); // Create Wrapper
+		var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
+		var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
+		var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) / 3 : el.outerWidth({margin:true}) / 3);
+		if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift
+		if (mode == 'hide') distance = distance / (times * 2);
+		if (mode != 'hide') times--;
+		
+		// Animate
+		if (mode == 'show') { // Show Bounce
+			var animation = {opacity: 1};
+			animation[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
+			el.animate(animation, speed / 2, o.options.easing);
+			distance = distance / 2;
+			times--;
+		};
+		for (var i = 0; i < times; i++) { // Bounces
+			var animation1 = {}, animation2 = {};
+			animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
+			animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
+			el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing);
+			distance = (mode == 'hide') ? distance * 2 : distance / 2;
+		};
+		if (mode == 'hide') { // Last Bounce
+			var animation = {opacity: 0};
+			animation[ref] = (motion == 'pos' ? '-=' : '+=')  + distance;
+			el.animate(animation, speed / 2, o.options.easing, function(){
+				el.hide(); // Hide
+				$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+				if(o.callback) o.callback.apply(this, arguments); // Callback
+			});
+		} else {
+			var animation1 = {}, animation2 = {};
+			animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
+			animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
+			el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing, function(){
+				$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+				if(o.callback) o.callback.apply(this, arguments); // Callback
+			});
+		};
+		el.queue('fx', function() { el.dequeue(); });
+		el.dequeue();
+	});
+	
+};
+
+})(jQuery);
+/*
+ * jQuery UI Effects Clip
+ *
+ * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ * 
+ * http://docs.jquery.com/UI/Effects/Clip
+ *
+ * Depends:
+ *	effects.core.js
+ */
+(function($) {
+
+$.effects.clip = function(o) {
+
+	return this.queue(function() {
+
+		// Create element
+		var el = $(this), props = ['position','top','left','height','width'];
+		
+		// Set options
+		var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
+		var direction = o.options.direction || 'vertical'; // Default direction
+		
+		// Adjust
+		$.effects.save(el, props); el.show(); // Save & Show
+		var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
+		var animate = el[0].tagName == 'IMG' ? wrapper : el;
+		var ref = {
+			size: (direction == 'vertical') ? 'height' : 'width',
+			position: (direction == 'vertical') ? 'top' : 'left'
+		};
+		var distance = (direction == 'vertical') ? animate.height() : animate.width();
+		if(mode == 'show') { animate.css(ref.size, 0); animate.css(ref.position, distance / 2); } // Shift
+		
+		// Animation
+		var animation = {};
+		animation[ref.size] = mode == 'show' ? distance : 0;
+		animation[ref.position] = mode == 'show' ? 0 : distance / 2;
+			
+		// Animate
+		animate.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
+			if(mode == 'hide') el.hide(); // Hide
+			$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+			if(o.callback) o.callback.apply(el[0], arguments); // Callback
+			el.dequeue();
+		}}); 
+		
+	});
+	
+};
+
+})(jQuery);
+/*
+ * jQuery UI Effects Drop
+ *
+ * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ * 
+ * http://docs.jquery.com/UI/Effects/Drop
+ *
+ * Depends:
+ *	effects.core.js
+ */
+(function($) {
+
+$.effects.drop = function(o) {
+
+	return this.queue(function() {
+
+		// Create element
+		var el = $(this), props = ['position','top','left','opacity'];
+		
+		// Set options
+		var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
+		var direction = o.options.direction || 'left'; // Default Direction
+		
+		// Adjust
+		$.effects.save(el, props); el.show(); // Save & Show
+		$.effects.createWrapper(el); // Create Wrapper
+		var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
+		var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
+		var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) / 2 : el.outerWidth({margin:true}) / 2);
+		if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift
+		
+		// Animation
+		var animation = {opacity: mode == 'show' ? 1 : 0};
+		animation[ref] = (mode == 'show' ? (motion == 'pos' ? '+=' : '-=') : (motion == 'pos' ? '-=' : '+=')) + distance;
+		
+		// Animate
+		el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
+			if(mode == 'hide') el.hide(); // Hide
+			$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+			if(o.callback) o.callback.apply(this, arguments); // Callback
+			el.dequeue();
+		}});
+		
+	});
+	
+};
+
+})(jQuery);
+/*
+ * jQuery UI Effects Explode
+ *
+ * Copyright (c) 2008 Paul Bakaus (ui.jquery.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ * 
+ * http://docs.jquery.com/UI/Effects/Explode
+ *
+ * Depends:
+ *	effects.core.js
+ */
+(function($) {
+
+$.effects.explode = function(o) {
+
+	return this.queue(function() {
+
+	var rows = o.options.pieces ? Math.round(Math.sqrt(o.options.pieces)) : 3;
+	var cells = o.options.pieces ? Math.round(Math.sqrt(o.options.pieces)) : 3;
+	
+	o.options.mode = o.options.mode == 'toggle' ? ($(this).is(':visible') ? 'hide' : 'show') : o.options.mode;
+	var el = $(this).show().css('visibility', 'hidden');
+	var offset = el.offset();
+	
+	//Substract the margins - not fixing the problem yet.
+	offset.top -= parseInt(el.css("marginTop")) || 0;
+	offset.left -= parseInt(el.css("marginLeft")) || 0;
+	
+	var width = el.outerWidth(true);
+	var height = el.outerHeight(true);
+
+	for(var i=0;i<rows;i++) { // =
+		for(var j=0;j<cells;j++) { // ||
+			el
+				.clone()
+				.appendTo('body')
+				.wrap('<div></div>')
+				.css({
+					position: 'absolute',
+					visibility: 'visible',
+					left: -j*(width/cells),
+					top: -i*(height/rows)
+				})
+				.parent()
+				.addClass('effects-explode')
+				.css({
+					position: 'absolute',
+					overflow: 'hidden',
+					width: width/cells,
+					height: height/rows,
+					left: offset.left + j*(width/cells) + (o.options.mode == 'show' ? (j-Math.floor(cells/2))*(width/cells) : 0),
+					top: offset.top + i*(height/rows) + (o.options.mode == 'show' ? (i-Math.floor(rows/2))*(height/rows) : 0),
+					opacity: o.options.mode == 'show' ? 0 : 1
+				}).animate({
+					left: offset.left + j*(width/cells) + (o.options.mode == 'show' ? 0 : (j-Math.floor(cells/2))*(width/cells)),
+					top: offset.top + i*(height/rows) + (o.options.mode == 'show' ? 0 : (i-Math.floor(rows/2))*(height/rows)),
+					opacity: o.options.mode == 'show' ? 1 : 0
+				}, o.duration || 500);
+		}
+	}
+
+	// Set a timeout, to call the callback approx. when the other animations have finished
+	setTimeout(function() {
+		
+		o.options.mode == 'show' ? el.css({ visibility: 'visible' }) : el.css({ visibility: 'visible' }).hide();
+				if(o.callback) o.callback.apply(el[0]); // Callback
+				el.dequeue();
+				
+				$('.effects-explode').remove();
+		
+	}, o.duration || 500);
+	
+		
+	});
+	
+};
+
+})(jQuery);
+/*
+ * jQuery UI Effects Fold
+ *
+ * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ * 
+ * http://docs.jquery.com/UI/Effects/Fold
+ *
+ * Depends:
+ *	effects.core.js
+ */
+(function($) {
+
+$.effects.fold = function(o) {
+
+	return this.queue(function() {
+
+		// Create element
+		var el = $(this), props = ['position','top','left'];
+		
+		// Set options
+		var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
+		var size = o.options.size || 15; // Default fold size
+		var horizFirst = !(!o.options.horizFirst); // Ensure a boolean value
+		
+		// Adjust
+		$.effects.save(el, props); el.show(); // Save & Show
+		var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
+		var widthFirst = ((mode == 'show') != horizFirst);
+		var ref = widthFirst ? ['width', 'height'] : ['height', 'width'];
+		var distance = widthFirst ? [wrapper.width(), wrapper.height()] : [wrapper.height(), wrapper.width()];
+		var percent = /([0-9]+)%/.exec(size);
+		if(percent) size = parseInt(percent[1]) / 100 * distance[mode == 'hide' ? 0 : 1];
+		if(mode == 'show') wrapper.css(horizFirst ? {height: 0, width: size} : {height: size, width: 0}); // Shift
+		
+		// Animation
+		var animation1 = {}, animation2 = {};
+		animation1[ref[0]] = mode == 'show' ? distance[0] : size;
+		animation2[ref[1]] = mode == 'show' ? distance[1] : 0;
+		
+		// Animate
+		wrapper.animate(animation1, o.duration / 2, o.options.easing)
+		.animate(animation2, o.duration / 2, o.options.easing, function() {
+			if(mode == 'hide') el.hide(); // Hide
+			$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+			if(o.callback) o.callback.apply(el[0], arguments); // Callback
+			el.dequeue();
+		});
+		
+	});
+	
+};
+
+})(jQuery);
+/*
+ * jQuery UI Effects Highlight
+ *
+ * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ * 
+ * http://docs.jquery.com/UI/Effects/Highlight
+ *
+ * Depends:
+ *	effects.core.js
+ */
+;(function($) {
+
+$.effects.highlight = function(o) {
+
+	return this.queue(function() {
+		
+		// Create element
+		var el = $(this), props = ['backgroundImage','backgroundColor','opacity'];
+		
+		// Set options
+		var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
+		var color = o.options.color || "#ffff99"; // Default highlight color
+		var oldColor = el.css("backgroundColor");
+		
+		// Adjust
+		$.effects.save(el, props); el.show(); // Save & Show
+		el.css({backgroundImage: 'none', backgroundColor: color}); // Shift
+		
+		// Animation
+		var animation = {backgroundColor: oldColor };
+		if (mode == "hide") animation['opacity'] = 0;
+		
+		// Animate
+		el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
+			if(mode == "hide") el.hide();
+			$.effects.restore(el, props);
+		if (mode == "show" && jQuery.browser.msie) this.style.removeAttribute('filter'); 
+			if(o.callback) o.callback.apply(this, arguments);
+			el.dequeue();
+		}});
+		
+	});
+	
+};
+
+})(jQuery);
+/*
+ * jQuery UI Effects Pulsate
+ *
+ * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ * 
+ * http://docs.jquery.com/UI/Effects/Pulsate
+ *
+ * Depends:
+ *	effects.core.js
+ */
+(function($) {
+
+$.effects.pulsate = function(o) {
+
+	return this.queue(function() {
+		
+		// Create element
+		var el = $(this);
+		
+		// Set options
+		var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
+		var times = o.options.times || 5; // Default # of times
+		
+		// Adjust
+		if (mode == 'hide') times--;
+		if (el.is(':hidden')) { // Show fadeIn
+			el.css('opacity', 0);
+			el.show(); // Show
+			el.animate({opacity: 1}, o.duration / 2, o.options.easing);
+			times = times-2;
+		}
+		
+		// Animate
+		for (var i = 0; i < times; i++) { // Pulsate
+			el.animate({opacity: 0}, o.duration / 2, o.options.easing).animate({opacity: 1}, o.duration / 2, o.options.easing);
+		};
+		if (mode == 'hide') { // Last Pulse
+			el.animate({opacity: 0}, o.duration / 2, o.options.easing, function(){
+				el.hide(); // Hide
+				if(o.callback) o.callback.apply(this, arguments); // Callback
+			});
+		} else {
+			el.animate({opacity: 0}, o.duration / 2, o.options.easing).animate({opacity: 1}, o.duration / 2, o.options.easing, function(){
+				if(o.callback) o.callback.apply(this, arguments); // Callback
+			});
+		};
+		el.queue('fx', function() { el.dequeue(); });
+		el.dequeue();
+	});
+	
+};
+
+})(jQuery);
+/*
+ * jQuery UI Effects Scale
+ *
+ * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ * 
+ * http://docs.jquery.com/UI/Effects/Scale
+ *
+ * Depends:
+ *	effects.core.js
+ */
+(function($) {
+
+$.effects.puff = function(o) {
+
+	return this.queue(function() {
+
+		// Create element
+		var el = $(this);
+	
+		// Set options
+		var options = $.extend(true, {}, o.options);
+		var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
+		var percent = parseInt(o.options.percent) || 150; // Set default puff percent
+		options.fade = true; // It's not a puff if it doesn't fade! :)
+		var original = {height: el.height(), width: el.width()}; // Save original
+	
+		// Adjust
+		var factor = percent / 100;
+		el.from = (mode == 'hide') ? original : {height: original.height * factor, width: original.width * factor};
+	
+		// Animation
+		options.from = el.from;
+		options.percent = (mode == 'hide') ? percent : 100;
+		options.mode = mode;
+	
+		// Animate
+		el.effect('scale', options, o.duration, o.callback);
+		el.dequeue();
+	});
+	
+};
+
+$.effects.scale = function(o) {
+	
+	return this.queue(function() {
+	
+		// Create element
+		var el = $(this);
+
+		// Set options
+		var options = $.extend(true, {}, o.options);
+		var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
+		var percent = parseInt(o.options.percent) || (parseInt(o.options.percent) == 0 ? 0 : (mode == 'hide' ? 0 : 100)); // Set default scaling percent
+		var direction = o.options.direction || 'both'; // Set default axis
+		var origin = o.options.origin; // The origin of the scaling
+		if (mode != 'effect') { // Set default origin and restore for show/hide
+			options.origin = origin || ['middle','center'];
+			options.restore = true;
+		}
+		var original = {height: el.height(), width: el.width()}; // Save original
+		el.from = o.options.from || (mode == 'show' ? {height: 0, width: 0} : original); // Default from state
+	
+		// Adjust
+		var factor = { // Set scaling factor
+			y: direction != 'horizontal' ? (percent / 100) : 1,
+			x: direction != 'vertical' ? (percent / 100) : 1
+		};
+		el.to = {height: original.height * factor.y, width: original.width * factor.x}; // Set to state
+		
+		if (o.options.fade) { // Fade option to support puff
+			if (mode == 'show') {el.from.opacity = 0; el.to.opacity = 1;};
+			if (mode == 'hide') {el.from.opacity = 1; el.to.opacity = 0;};
+		};
+	
+		// Animation
+		options.from = el.from; options.to = el.to; options.mode = mode;
+	
+		// Animate
+		el.effect('size', options, o.duration, o.callback);
+		el.dequeue();
+	});
+	
+};
+
+$.effects.size = function(o) {
+
+	return this.queue(function() {
+		
+		// Create element
+		var el = $(this), props = ['position','top','left','width','height','overflow','opacity'];
+		var props1 = ['position','top','left','overflow','opacity']; // Always restore
+		var props2 = ['width','height','overflow']; // Copy for children
+		var cProps = ['fontSize'];
+		var vProps = ['borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'];
+		var hProps = ['borderLeftWidth', 'borderRightWidth', 'paddingLeft', 'paddingRight'];
+		
+		// Set options
+		var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
+		var restore = o.options.restore || false; // Default restore
+		var scale = o.options.scale || 'both'; // Default scale mode
+		var origin = o.options.origin; // The origin of the sizing
+		var original = {height: el.height(), width: el.width()}; // Save original
+		el.from = o.options.from || original; // Default from state
+		el.to = o.options.to || original; // Default to state
+		// Adjust
+		if (origin) { // Calculate baseline shifts
+			var baseline = $.effects.getBaseline(origin, original);
+			el.from.top = (original.height - el.from.height) * baseline.y;
+			el.from.left = (original.width - el.from.width) * baseline.x;
+			el.to.top = (original.height - el.to.height) * baseline.y;
+			el.to.left = (original.width - el.to.width) * baseline.x;
+		};
+		var factor = { // Set scaling factor
+			from: {y: el.from.height / original.height, x: el.from.width / original.width},
+			to: {y: el.to.height / original.height, x: el.to.width / original.width}
+		};
+		if (scale == 'box' || scale == 'both') { // Scale the css box
+			if (factor.from.y != factor.to.y) { // Vertical props scaling
+				props = props.concat(vProps);
+				el.from = $.effects.setTransition(el, vProps, factor.from.y, el.from);
+				el.to = $.effects.setTransition(el, vProps, factor.to.y, el.to);
+			};
+			if (factor.from.x != factor.to.x) { // Horizontal props scaling
+				props = props.concat(hProps);
+				el.from = $.effects.setTransition(el, hProps, factor.from.x, el.from);
+				el.to = $.effects.setTransition(el, hProps, factor.to.x, el.to);
+			};
+		};
+		if (scale == 'content' || scale == 'both') { // Scale the content
+			if (factor.from.y != factor.to.y) { // Vertical props scaling
+				props = props.concat(cProps);
+				el.from = $.effects.setTransition(el, cProps, factor.from.y, el.from);
+				el.to = $.effects.setTransition(el, cProps, factor.to.y, el.to);
+			};
+		};
+		$.effects.save(el, restore ? props : props1); el.show(); // Save & Show
+		$.effects.createWrapper(el); // Create Wrapper
+		el.css('overflow','hidden').css(el.from); // Shift
+		
+		// Animate
+		if (scale == 'content' || scale == 'both') { // Scale the children
+			vProps = vProps.concat(['marginTop','marginBottom']).concat(cProps); // Add margins/font-size
+			hProps = hProps.concat(['marginLeft','marginRight']); // Add margins
+			props2 = props.concat(vProps).concat(hProps); // Concat
+			el.find("*[width]").each(function(){
+				child = $(this);
+				if (restore) $.effects.save(child, props2);
+				var c_original = {height: child.height(), width: child.width()}; // Save original
+				child.from = {height: c_original.height * factor.from.y, width: c_original.width * factor.from.x};
+				child.to = {height: c_original.height * factor.to.y, width: c_original.width * factor.to.x};
+				if (factor.from.y != factor.to.y) { // Vertical props scaling
+					child.from = $.effects.setTransition(child, vProps, factor.from.y, child.from);
+					child.to = $.effects.setTransition(child, vProps, factor.to.y, child.to);
+				};
+				if (factor.from.x != factor.to.x) { // Horizontal props scaling
+					child.from = $.effects.setTransition(child, hProps, factor.from.x, child.from);
+					child.to = $.effects.setTransition(child, hProps, factor.to.x, child.to);
+				};
+				child.css(child.from); // Shift children
+				child.animate(child.to, o.duration, o.options.easing, function(){
+					if (restore) $.effects.restore(child, props2); // Restore children
+				}); // Animate children
+			});
+		};
+		
+		// Animate
+		el.animate(el.to, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
+			if(mode == 'hide') el.hide(); // Hide
+			$.effects.restore(el, restore ? props : props1); $.effects.removeWrapper(el); // Restore
+			if(o.callback) o.callback.apply(this, arguments); // Callback
+			el.dequeue();
+		}}); 
+		
+	});
+
+};
+
+})(jQuery);
+/*
+ * jQuery UI Effects Shake
+ *
+ * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ * 
+ * http://docs.jquery.com/UI/Effects/Shake
+ *
+ * Depends:
+ *	effects.core.js
+ */
+(function($) {
+
+$.effects.shake = function(o) {
+
+	return this.queue(function() {
+
+		// Create element
+		var el = $(this), props = ['position','top','left'];
+		
+		// Set options
+		var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
+		var direction = o.options.direction || 'left'; // Default direction
+		var distance = o.options.distance || 20; // Default distance
+		var times = o.options.times || 3; // Default # of times
+		var speed = o.duration || o.options.duration || 140; // Default speed per shake
+		
+		// Adjust
+		$.effects.save(el, props); el.show(); // Save & Show
+		$.effects.createWrapper(el); // Create Wrapper
+		var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
+		var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
+		
+		// Animation
+		var animation = {}, animation1 = {}, animation2 = {};
+		animation[ref] = (motion == 'pos' ? '-=' : '+=')  + distance;
+		animation1[ref] = (motion == 'pos' ? '+=' : '-=')  + distance * 2;
+		animation2[ref] = (motion == 'pos' ? '-=' : '+=')  + distance * 2;
+		
+		// Animate
+		el.animate(animation, speed, o.options.easing);
+		for (var i = 1; i < times; i++) { // Shakes
+			el.animate(animation1, speed, o.options.easing).animate(animation2, speed, o.options.easing);
+		};
+		el.animate(animation1, speed, o.options.easing).
+		animate(animation, speed / 2, o.options.easing, function(){ // Last shake
+			$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+			if(o.callback) o.callback.apply(this, arguments); // Callback
+		});
+		el.queue('fx', function() { el.dequeue(); });
+		el.dequeue();
+	});
+	
+};
+
+})(jQuery);
+/*
+ * jQuery UI Effects Slide
+ *
+ * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ * 
+ * http://docs.jquery.com/UI/Effects/Slide
+ *
+ * Depends:
+ *	effects.core.js
+ */
+(function($) {
+
+$.effects.slide = function(o) {
+
+	return this.queue(function() {
+
+		// Create element
+		var el = $(this), props = ['position','top','left'];
+		
+		// Set options
+		var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
+		var direction = o.options.direction || 'left'; // Default Direction
+		
+		// Adjust
+		$.effects.save(el, props); el.show(); // Save & Show
+		$.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
+		var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
+		var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
+		var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) : el.outerWidth({margin:true}));
+		if (mode == 'show') el.css(ref, motion == 'pos' ? -distance : distance); // Shift
+		
+		// Animation
+		var animation = {};
+		animation[ref] = (mode == 'show' ? (motion == 'pos' ? '+=' : '-=') : (motion == 'pos' ? '-=' : '+=')) + distance;
+		
+		// Animate
+		el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
+			if(mode == 'hide') el.hide(); // Hide
+			$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+			if(o.callback) o.callback.apply(this, arguments); // Callback
+			el.dequeue();
+		}});
+		
+	});
+	
+};
+
+})(jQuery);
+/*
+ * jQuery UI Effects Transfer
+ *
+ * Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ * 
+ * http://docs.jquery.com/UI/Effects/Transfer
+ *
+ * Depends:
+ *	effects.core.js
+ */
+(function($) {
+
+$.effects.transfer = function(o) {
+
+	return this.queue(function() {
+
+		// Create element
+		var el = $(this);
+		
+		// Set options
+		var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
+		var target = $(o.options.to); // Find Target
+		var position = el.offset();
+		var transfer = $('<div class="ui-effects-transfer"></div>').appendTo(document.body);
+		if(o.options.className) transfer.addClass(o.options.className);
+		
+		// Set target css
+		transfer.addClass(o.options.className);
+		transfer.css({
+			top: position.top,
+			left: position.left,
+			height: el.outerHeight() - parseInt(transfer.css('borderTopWidth')) - parseInt(transfer.css('borderBottomWidth')),
+			width: el.outerWidth() - parseInt(transfer.css('borderLeftWidth')) - parseInt(transfer.css('borderRightWidth')),
+			position: 'absolute'
+		});
+		
+		// Animation
+		position = target.offset();
+		animation = {
+			top: position.top,
+			left: position.left,
+			height: target.outerHeight() - parseInt(transfer.css('borderTopWidth')) - parseInt(transfer.css('borderBottomWidth')),
+			width: target.outerWidth() - parseInt(transfer.css('borderLeftWidth')) - parseInt(transfer.css('borderRightWidth'))
+		};
+		
+		// Animate
+		transfer.animate(animation, o.duration, o.options.easing, function() {
+			transfer.remove(); // Remove div
+			if(o.callback) o.callback.apply(el[0], arguments); // Callback
+			el.dequeue();
+		}); 
+		
+	});
+	
+};
+
+})(jQuery);
+/*
+ * jQuery UI Accordion
+ * 
+ * Copyright (c) 2007, 2008 JÃ¶rn Zaefferer
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Accordion
+ *
+ * Depends:
+ *	ui.core.js
+ */
+(function($) {
+
+$.widget("ui.accordion", {
+	init: function() {
+		var options = this.options;
+
+		if ( options.navigation ) {
+			var current = this.element.find("a").filter(options.navigationFilter);
+			if ( current.length ) {
+				if ( current.filter(options.header).length ) {
+					options.active = current;
+				} else {
+					options.active = current.parent().parent().prev();
+					current.addClass("current");
+				}
+			}
+		}
+
+		// calculate active if not specified, using the first header
+		options.headers = this.element.find(options.header);
+		options.active = findActive(options.headers, options.active);
+
+		// IE7-/Win - Extra vertical space in Lists fixed
+		if ($.browser.msie) {
+			this.element.find('a').css('zoom', '1');
+		}
+
+		if (!this.element.hasClass("ui-accordion")) {
+			this.element.addClass("ui-accordion");
+			$("<span class='ui-accordion-left'/>").insertBefore(options.headers);
+			$("<span class='ui-accordion-right'/>").appendTo(options.headers);
+			options.headers.addClass("ui-accordion-header").attr("tabindex", "0");
+		}
+
+		this.size();
+
+		options.headers
+			.not(options.active || "")
+			.next()
+			.hide();
+		options.active.parent().andSelf().addClass(options.selectedClass);
+
+		if (options.event) {
+			this.element.bind((options.event) + ".accordion", clickHandler);
+		}
+	},
+	activate: function(index) {
+		// call clickHandler with custom event
+		clickHandler.call(this.element[0], {
+			target: findActive( this.options.headers, index )[0]
+		});
+	},
+	destroy: function() {
+		this.options.headers.next().css("display", "");
+		if ( this.options.fillSpace || this.options.autoHeight ) {
+			this.options.headers.next().css("height", "");
+		}
+		$.removeData(this.element[0], "accordion");
+		this.element.removeClass("ui-accordion").unbind(".accordion");
+	}
+,	size: function () {
+		var options = this.options;
+		var maxHeight = 0, maxPadding = 0;
+		if ( options.fillSpace ) {
+			maxHeight = this.element.parent().height();
+			options.headers.each(function() {
+				maxHeight -= $(this).outerHeight();
+			});
+			options.headers.next().each(function() {
+				maxPadding = Math.max(maxPadding, $(this).innerHeight() - $(this).height());
+			}).height(maxHeight - maxPadding);
+		} else if ( options.autoHeight ) {
+			options.headers.next().each(function() {
+				maxHeight = Math.max(maxHeight, $(this).outerHeight());
+			}).height(maxHeight);
+		}
+	}
+});
+
+function scopeCallback(callback, scope) {
+	return function() {
+		return callback.apply(scope, arguments);
+	};
+};
+
+function completed(cancel) {
+	// if removed while animated data can be empty
+	if (!$.data(this, "accordion")) {
+		return;
+	}
+	
+	var instance = $.data(this, "accordion");
+	var options = instance.options;
+	options.running = cancel ? 0 : --options.running;
+	if ( options.running ) {
+		return;
+	}
+	if ( options.clearStyle ) {
+		options.toShow.add(options.toHide).css({
+			height: "",
+			overflow: ""
+		});
+	}
+	$(this).triggerHandler("accordionchange", [$.event.fix({type: 'accordionchange', target: instance.element[0]}), options.data], options.change);
+}
+
+function toggle(toShow, toHide, data, clickedActive, down) {
+	var options = $.data(this, "accordion").options;
+	options.toShow = toShow;
+	options.toHide = toHide;
+	options.data = data;
+	var complete = scopeCallback(completed, this);
+	
+	// count elements to animate
+	options.running = toHide.size() === 0 ? toShow.size() : toHide.size();
+	
+	if ( options.animated ) {
+		if ( !options.alwaysOpen && clickedActive ) {
+			$.ui.accordion.animations[options.animated]({
+				toShow: jQuery([]),
+				toHide: toHide,
+				complete: complete,
+				down: down,
+				autoHeight: options.autoHeight
+			});
+		} else {
+			$.ui.accordion.animations[options.animated]({
+				toShow: toShow,
+				toHide: toHide,
+				complete: complete,
+				down: down,
+				autoHeight: options.autoHeight
+			});
+		}
+	} else {
+		if ( !options.alwaysOpen && clickedActive ) {
+			toShow.toggle();
+		} else {
+			toHide.hide();
+			toShow.show();
+		}
+		complete(true);
+	}
+}
+
+function clickHandler(event) {
+	var options = $.data(this, "accordion").options;
+	if (options.disabled) {
+		return false;
+	}
+	
+	// called only when using activate(false) to close all parts programmatically
+	if ( !event.target && !options.alwaysOpen ) {
+		options.active.parent().andSelf().toggleClass(options.selectedClass);
+		var toHide = options.active.next(),
+			data = {
+				options: options,
+				newHeader: jQuery([]),
+				oldHeader: options.active,
+				newContent: jQuery([]),
+				oldContent: toHide
+			},
+			toShow = (options.active = $([]));
+		toggle.call(this, toShow, toHide, data );
+		return false;
+	}
+	// get the click target
+	var clicked = $(event.target);
+	
+	// due to the event delegation model, we have to check if one
+	// of the parent elements is our actual header, and find that
+	// otherwise stick with the initial target
+	clicked = $( clicked.parents(options.header)[0] || clicked );
+	
+	var clickedActive = clicked[0] == options.active[0];
+	
+	// if animations are still active, or the active header is the target, ignore click
+	if (options.running || (options.alwaysOpen && clickedActive)) {
+		return false;
+	}
+	if (!clicked.is(options.header)) {
+		return;
+	}
+	
+	// switch classes
+	options.active.parent().andSelf().toggleClass(options.selectedClass);
+	if ( !clickedActive ) {
+		clicked.parent().andSelf().addClass(options.selectedClass);
+	}
+	
+	// find elements to show and hide
+	var toShow = clicked.next(),
+		toHide = options.active.next(),
+		//data = [clicked, options.active, toShow, toHide],
+		data = {
+			options: options,
+			newHeader: clicked,
+			oldHeader: options.active,
+			newContent: toShow,
+			oldContent: toHide
+		},
+		down = options.headers.index( options.active[0] ) > options.headers.index( clicked[0] );
+	
+	options.active = clickedActive ? $([]) : clicked;
+	toggle.call(this, toShow, toHide, data, clickedActive, down );
+
+	return false;
+};
+
+function findActive(headers, selector) {
+	return selector != undefined
+		? typeof selector == "number"
+			? headers.filter(":eq(" + selector + ")")
+			: headers.not(headers.not(selector))
+		: selector === false
+			? $([])
+			: headers.filter(":eq(0)");
+}
+
+$.extend($.ui.accordion, {
+	defaults: {
+		selectedClass: "selected",
+		alwaysOpen: true,
+		animated: 'slide',
+		event: "click",
+		header: "a",
+		autoHeight: true,
+		running: 0,
+		navigationFilter: function() {
+			return this.href.toLowerCase() == location.href.toLowerCase();
+		}
+	},
+	animations: {
+		slide: function(options, additions) {
+			options = $.extend({
+				easing: "swing",
+				duration: 300
+			}, options, additions);
+			if ( !options.toHide.size() ) {
+				options.toShow.animate({height: "show"}, options);
+				return;
+			}
+			var hideHeight = options.toHide.height(),
+				showHeight = options.toShow.height(),
+				difference = showHeight / hideHeight;
+			options.toShow.css({ height: 0, overflow: 'hidden' }).show();
+			options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({height:"hide"},{
+				step: function(now) {
+					var current = (hideHeight - now) * difference;
+					if ($.browser.msie || $.browser.opera) {
+						current = Math.ceil(current);
+					}
+					options.toShow.height( current );
+				},
+				duration: options.duration,
+				easing: options.easing,
+				complete: function() {
+					if ( !options.autoHeight ) {
+						options.toShow.css("height", "auto");
+					}
+					options.complete();
+				}
+			});
+		},
+		bounceslide: function(options) {
+			this.slide(options, {
+				easing: options.down ? "bounceout" : "swing",
+				duration: options.down ? 1000 : 200
+			});
+		},
+		easeslide: function(options) {
+			this.slide(options, {
+				easing: "easeinout",
+				duration: 700
+			});
+		}
+	}
+});
+
+// deprecated, use accordion("activate", index) instead
+$.fn.activate = function(index) {
+	return this.accordion("activate", index);
+};
+
+})(jQuery);
+/*
+ * jQuery UI Datepicker
+ *
+ * Copyright (c) 2006, 2007, 2008 Marc Grabanski
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ * 
+ * http://docs.jquery.com/UI/Datepicker
+ *
+ * Depends:
+ *	ui.core.js
+ *
+ * Marc Grabanski (m@marcgrabanski.com) and Keith Wood (kbwood@virginbroadband.com.au).
+ */
+   
+(function($) { // hide the namespace
+
+var PROP_NAME = 'datepicker';
+
+/* Date picker manager.
+   Use the singleton instance of this class, $.datepicker, to interact with the date picker.
+   Settings for (groups of) date pickers are maintained in an instance object,
+   allowing multiple different settings on the same page. */
+
+function Datepicker() {
+	this.debug = false; // Change this to true to start debugging
+	this._curInst = null; // The current instance in use
+	this._disabledInputs = []; // List of date picker inputs that have been disabled
+	this._datepickerShowing = false; // True if the popup picker is showing , false if not
+	this._inDialog = false; // True if showing within a "dialog", false if not
+	this._mainDivId = 'ui-datepicker-div'; // The ID of the main datepicker division
+	this._appendClass = 'ui-datepicker-append'; // The name of the append marker class
+	this._triggerClass = 'ui-datepicker-trigger'; // The name of the trigger marker class
+	this._dialogClass = 'ui-datepicker-dialog'; // The name of the dialog marker class
+	this._promptClass = 'ui-datepicker-prompt'; // The name of the dialog prompt marker class
+	this._unselectableClass = 'ui-datepicker-unselectable'; // The name of the unselectable cell marker class
+	this._currentClass = 'ui-datepicker-current-day'; // The name of the current day marker class
+	this.regional = []; // Available regional settings, indexed by language code
+	this.regional[''] = { // Default regional settings
+		clearText: 'Clear', // Display text for clear link
+		clearStatus: 'Erase the current date', // Status text for clear link
+		closeText: 'Close', // Display text for close link
+		closeStatus: 'Close without change', // Status text for close link
+		prevText: '&#x3c;Prev', // Display text for previous month link
+		prevStatus: 'Show the previous month', // Status text for previous month link
+		nextText: 'Next&#x3e;', // Display text for next month link
+		nextStatus: 'Show the next month', // Status text for next month link
+		currentText: 'Today', // Display text for current month link
+		currentStatus: 'Show the current month', // Status text for current month link
+		monthNames: ['January','February','March','April','May','June',
+			'July','August','September','October','November','December'], // Names of months for drop-down and formatting
+		monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], // For formatting
+		monthStatus: 'Show a different month', // Status text for selecting a month
+		yearStatus: 'Show a different year', // Status text for selecting a year
+		weekHeader: 'Wk', // Header for the week of the year column
+		weekStatus: 'Week of the year', // Status text for the week of the year column
+		dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formatting
+		dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formatting
+		dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at Sunday
+		dayStatus: 'Set DD as first week day', // Status text for the day of the week selection
+		dateStatus: 'Select DD, M d', // Status text for the date selection
+		dateFormat: 'mm/dd/yy', // See format options on parseDate
+		firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
+		initStatus: 'Select a date', // Initial Status text on opening
+		isRTL: false // True if right-to-left language, false if left-to-right
+	};
+	this._defaults = { // Global defaults for all the date picker instances
+		showOn: 'focus', // 'focus' for popup on focus,
+			// 'button' for trigger button, or 'both' for either
+		showAnim: 'show', // Name of jQuery animation for popup
+		showOptions: {}, // Options for enhanced animations
+		defaultDate: null, // Used when field is blank: actual date,
+			// +/-number for offset from today, null for today
+		appendText: '', // Display text following the input box, e.g. showing the format
+		buttonText: '...', // Text for trigger button
+		buttonImage: '', // URL for trigger button image
+		buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
+		closeAtTop: true, // True to have the clear/close at the top,
+			// false to have them at the bottom
+		mandatory: false, // True to hide the Clear link, false to include it
+		hideIfNoPrevNext: false, // True to hide next/previous month links
+			// if not applicable, false to just disable them
+		navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
+		gotoCurrent: false, // True if today link goes back to current selection instead
+		changeMonth: true, // True if month can be selected directly, false if only prev/next
+		changeYear: true, // True if year can be selected directly, false if only prev/next
+		yearRange: '-10:+10', // Range of years to display in drop-down,
+			// either relative to current year (-nn:+nn) or absolute (nnnn:nnnn)
+		changeFirstDay: true, // True to click on day name to change, false to remain as set
+		highlightWeek: false, // True to highlight the selected week
+		showOtherMonths: false, // True to show dates in other months, false to leave blank
+		showWeeks: false, // True to show week of the year, false to omit
+		calculateWeek: this.iso8601Week, // How to calculate the week of the year,
+			// takes a Date and returns the number of the week for it
+		shortYearCutoff: '+10', // Short year values < this are in the current century,
+			// > this are in the previous century, 
+			// string value starting with '+' for current year + value
+		showStatus: false, // True to show status bar at bottom, false to not show it
+		statusForDate: this.dateStatus, // Function to provide status text for a date -
+			// takes date and instance as parameters, returns display text
+		minDate: null, // The earliest selectable date, or null for no limit
+		maxDate: null, // The latest selectable date, or null for no limit
+		duration: 'normal', // Duration of display/closure
+		beforeShowDay: null, // Function that takes a date and returns an array with
+			// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '', 
+			// [2] = cell title (optional), e.g. $.datepicker.noWeekends
+		beforeShow: null, // Function that takes an input field and
+			// returns a set of custom settings for the date picker
+		onSelect: null, // Define a callback function when a date is selected
+		onChangeMonthYear: null, // Define a callback function when the month or year is changed
+		onClose: null, // Define a callback function when the datepicker is closed
+		numberOfMonths: 1, // Number of months to show at a time
+		stepMonths: 1, // Number of months to step back/forward
+		rangeSelect: false, // Allows for selecting a date range on one date picker
+		rangeSeparator: ' - ', // Text between two dates in a range
+		altField: '', // Selector for an alternate field to store selected dates into
+		altFormat: '' // The date format to use for the alternate field
+	};
+	$.extend(this._defaults, this.regional['']);
+	this.dpDiv = $('<div id="' + this._mainDivId + '" style="display: none;"></div>');
+}
+
+$.extend(Datepicker.prototype, {
+	/* Class name added to elements to indicate already configured with a date picker. */
+	markerClassName: 'hasDatepicker',
+
+	/* Debug logging (if enabled). */
+	log: function () {
+		if (this.debug)
+			console.log.apply('', arguments);
+	},
+	
+	/* Override the default settings for all instances of the date picker. 
+	   @param  settings  object - the new settings to use as defaults (anonymous object)
+	   @return the manager object */
+	setDefaults: function(settings) {
+		extendRemove(this._defaults, settings || {});
+		return this;
+	},
+
+	/* Attach the date picker to a jQuery selection.
+	   @param  target    element - the target input field or division or span
+	   @param  settings  object - the new settings to use for this date picker instance (anonymous) */
+	_attachDatepicker: function(target, settings) {
+		// check for settings on the control itself - in namespace 'date:'
+		var inlineSettings = null;
+		for (attrName in this._defaults) {
+			var attrValue = target.getAttribute('date:' + attrName);
+			if (attrValue) {
+				inlineSettings = inlineSettings || {};
+				try {
+					inlineSettings[attrName] = eval(attrValue);
+				} catch (err) {
+					inlineSettings[attrName] = attrValue;
+				}
+			}
+		}
+		var nodeName = target.nodeName.toLowerCase();
+		var inline = (nodeName == 'div' || nodeName == 'span');
+		if (!target.id)
+			target.id = 'dp' + new Date().getTime();
+		var inst = this._newInst($(target), inline);
+		inst.settings = $.extend({}, settings || {}, inlineSettings || {}); 
+		if (nodeName == 'input') {
+			this._connectDatepicker(target, inst);
+		} else if (inline) {
+			this._inlineDatepicker(target, inst);
+		}
+	},
+
+	/* Create a new instance object. */
+	_newInst: function(target, inline) {
+		return {id: target[0].id, input: target, // associated target
+			selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
+			drawMonth: 0, drawYear: 0, // month being drawn
+			inline: inline, // is datepicker inline or not
+			dpDiv: (!inline ? this.dpDiv : // presentation div
+			$('<div class="ui-datepicker-inline"></div>'))};
+	},
+
+	/* Attach the date picker to an input field. */
+	_connectDatepicker: function(target, inst) {
+		var input = $(target);
+		if (input.hasClass(this.markerClassName))
+			return;
+		var appendText = this._get(inst, 'appendText');
+		var isRTL = this._get(inst, 'isRTL');
+		if (appendText)
+			input[isRTL ? 'before' : 'after']('<span class="' + this._appendClass + '">' + appendText + '</span>');
+		var showOn = this._get(inst, 'showOn');
+		if (showOn == 'focus' || showOn == 'both') // pop-up date picker when in the marked field
+			input.focus(this._showDatepicker);
+		if (showOn == 'button' || showOn == 'both') { // pop-up date picker when button clicked
+			var buttonText = this._get(inst, 'buttonText');
+			var buttonImage = this._get(inst, 'buttonImage');
+			var trigger = $(this._get(inst, 'buttonImageOnly') ? 
+				$('<img/>').addClass(this._triggerClass).
+					attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
+				$('<button type="button"></button>').addClass(this._triggerClass).
+					html(buttonImage == '' ? buttonText : $('<img/>').attr(
+					{ src:buttonImage, alt:buttonText, title:buttonText })));
+			input[isRTL ? 'before' : 'after'](trigger);
+			trigger.click(function() {
+				if ($.datepicker._datepickerShowing && $.datepicker._lastInput == target)
+					$.datepicker._hideDatepicker();
+				else
+					$.datepicker._showDatepicker(target);
+				return false;
+			});
+		}
+		input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).
+			bind("setData.datepicker", function(event, key, value) {
+				inst.settings[key] = value;
+			}).bind("getData.datepicker", function(event, key) {
+				return this._get(inst, key);
+			});
+		$.data(target, PROP_NAME, inst);
+	},
+
+	/* Attach an inline date picker to a div. */
+	_inlineDatepicker: function(target, inst) {
+		var input = $(target);
+		if (input.hasClass(this.markerClassName))
+			return;
+		input.addClass(this.markerClassName).append(inst.dpDiv).
+			bind("setData.datepicker", function(event, key, value){
+				inst.settings[key] = value;
+			}).bind("getData.datepicker", function(event, key){
+				return this._get(inst, key);
+			});
+		$.data(target, PROP_NAME, inst);
+		this._setDate(inst, this._getDefaultDate(inst));
+		this._updateDatepicker(inst);
+	},
+
+	/* Tidy up after displaying the date picker. */
+	_inlineShow: function(inst) {
+		var numMonths = this._getNumberOfMonths(inst); // fix width for dynamic number of date pickers
+		inst.dpDiv.width(numMonths[1] * $('.ui-datepicker', inst.dpDiv[0]).width());
+	}, 
+
+	/* Pop-up the date picker in a "dialog" box.
+	   @param  input     element - ignored
+	   @param  dateText  string - the initial date to display (in the current format)
+	   @param  onSelect  function - the function(dateText) to call when a date is selected
+	   @param  settings  object - update the dialog date picker instance's settings (anonymous object)
+	   @param  pos       int[2] - coordinates for the dialog's position within the screen or
+	                     event - with x/y coordinates or
+	                     leave empty for default (screen centre)
+	   @return the manager object */
+	_dialogDatepicker: function(input, dateText, onSelect, settings, pos) {
+		var inst = this._dialogInst; // internal instance
+		if (!inst) {
+			var id = 'dp' + new Date().getTime();
+			this._dialogInput = $('<input type="text" id="' + id +
+				'" size="1" style="position: absolute; top: -100px;"/>');
+			this._dialogInput.keydown(this._doKeyDown);
+			$('body').append(this._dialogInput);
+			inst = this._dialogInst = this._newInst(this._dialogInput, false);
+			inst.settings = {};
+			$.data(this._dialogInput[0], PROP_NAME, inst);
+		}
+		extendRemove(inst.settings, settings || {});
+		this._dialogInput.val(dateText);
+
+		this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
+		if (!this._pos) {
+			var browserWidth = window.innerWidth || document.documentElement.clientWidth ||	document.body.clientWidth;
+			var browserHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
+			var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
+			var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
+			this._pos = // should use actual width/height below
+				[(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
+		}
+
+		// move input on screen for focus, but hidden behind dialog
+		this._dialogInput.css('left', this._pos[0] + 'px').css('top', this._pos[1] + 'px');
+		inst.settings.onSelect = onSelect;
+		this._inDialog = true;
+		this.dpDiv.addClass(this._dialogClass);
+		this._showDatepicker(this._dialogInput[0]);
+		if ($.blockUI)
+			$.blockUI(this.dpDiv);
+		$.data(this._dialogInput[0], PROP_NAME, inst);
+		return this;
+	},
+
+	/* Detach a datepicker from its control.
+	   @param  target    element - the target input field or division or span */
+	_destroyDatepicker: function(target) {
+		var nodeName = target.nodeName.toLowerCase();
+		var $target = $(target);
+		$.removeData(target, PROP_NAME);
+		if (nodeName == 'input') {
+			$target.siblings('.' + this._appendClass).remove().end().
+				siblings('.' + this._triggerClass).remove().end().
+				removeClass(this.markerClassName).
+				unbind('focus', this._showDatepicker).
+				unbind('keydown', this._doKeyDown).
+				unbind('keypress', this._doKeyPress);
+		} else if (nodeName == 'div' || nodeName == 'span')
+			$target.removeClass(this.markerClassName).empty();
+	},
+
+	/* Enable the date picker to a jQuery selection.
+	   @param  target    element - the target input field or division or span */
+	_enableDatepicker: function(target) {
+		target.disabled = false;
+		$(target).siblings('button.' + this._triggerClass).each(function() { this.disabled = false; }).end().
+			siblings('img.' + this._triggerClass).css({opacity: '1.0', cursor: ''});
+		this._disabledInputs = $.map(this._disabledInputs,
+			function(value) { return (value == target ? null : value); }); // delete entry
+	},
+
+	/* Disable the date picker to a jQuery selection.
+	   @param  target    element - the target input field or division or span */
+	_disableDatepicker: function(target) {
+		target.disabled = true;
+		$(target).siblings('button.' + this._triggerClass).each(function() { this.disabled = true; }).end().
+			siblings('img.' + this._triggerClass).css({opacity: '0.5', cursor: 'default'});
+		this._disabledInputs = $.map(this._disabledInputs,
+			function(value) { return (value == target ? null : value); }); // delete entry
+		this._disabledInputs[this._disabledInputs.length] = target;
+	},
+
+	/* Is the first field in a jQuery collection disabled as a datepicker?
+	   @param  target    element - the target input field or division or span
+	   @return boolean - true if disabled, false if enabled */
+	_isDisabledDatepicker: function(target) {
+		if (!target)
+			return false;
+		for (var i = 0; i < this._disabledInputs.length; i++) {
+			if (this._disabledInputs[i] == target)
+				return true;
+		}
+		return false;
+	},
+
+	/* Update the settings for a date picker attached to an input field or division.
+	   @param  target  element - the target input field or division or span
+	   @param  name    object - the new settings to update or
+	                   string - the name of the setting to change or
+	   @param  value   any - the new value for the setting (omit if above is an object) */
+	_changeDatepicker: function(target, name, value) {
+		var settings = name || {};
+		if (typeof name == 'string') {
+			settings = {};
+			settings[name] = value;
+		}
+		if (inst = $.data(target, PROP_NAME)) {
+			extendRemove(inst.settings, settings);
+			this._updateDatepicker(inst);
+		}
+	},
+
+	/* Set the dates for a jQuery selection.
+	   @param  target   element - the target input field or division or span
+	   @param  date     Date - the new date
+	   @param  endDate  Date - the new end date for a range (optional) */
+	_setDateDatepicker: function(target, date, endDate) {
+		var inst = $.data(target, PROP_NAME);
+		if (inst) {
+			this._setDate(inst, date, endDate);
+			this._updateDatepicker(inst);
+		}
+	},
+
+	/* Get the date(s) for the first entry in a jQuery selection.
+	   @param  target  element - the target input field or division or span
+	   @return Date - the current date or
+	           Date[2] - the current dates for a range */
+	_getDateDatepicker: function(target) {
+		var inst = $.data(target, PROP_NAME);
+		if (inst)
+			this._setDateFromField(inst); 
+		return (inst ? this._getDate(inst) : null);
+	},
+
+	/* Handle keystrokes. */
+	_doKeyDown: function(e) {
+		var inst = $.data(e.target, PROP_NAME);
+		var handled = true;
+		if ($.datepicker._datepickerShowing)
+			switch (e.keyCode) {
+				case 9:  $.datepicker._hideDatepicker(null, '');
+						break; // hide on tab out
+				case 13: $.datepicker._selectDay(e.target, inst.selectedMonth, inst.selectedYear,
+							$('td.ui-datepicker-days-cell-over', inst.dpDiv)[0]);
+						return false; // don't submit the form
+						break; // select the value on enter
+				case 27: $.datepicker._hideDatepicker(null, $.datepicker._get(inst, 'duration'));
+						break; // hide on escape
+				case 33: $.datepicker._adjustDate(e.target, (e.ctrlKey ? -1 :
+							-$.datepicker._get(inst, 'stepMonths')), (e.ctrlKey ? 'Y' : 'M'));
+						break; // previous month/year on page up/+ ctrl
+				case 34: $.datepicker._adjustDate(e.target, (e.ctrlKey ? +1 :
+							+$.datepicker._get(inst, 'stepMonths')), (e.ctrlKey ? 'Y' : 'M'));
+						break; // next month/year on page down/+ ctrl
+				case 35: if (e.ctrlKey) $.datepicker._clearDate(e.target);
+						break; // clear on ctrl+end
+				case 36: if (e.ctrlKey) $.datepicker._gotoToday(e.target);
+						break; // current on ctrl+home
+				case 37: if (e.ctrlKey) $.datepicker._adjustDate(e.target, -1, 'D');
+						break; // -1 day on ctrl+left
+				case 38: if (e.ctrlKey) $.datepicker._adjustDate(e.target, -7, 'D');
+						break; // -1 week on ctrl+up
+				case 39: if (e.ctrlKey) $.datepicker._adjustDate(e.target, +1, 'D');
+						break; // +1 day on ctrl+right
+				case 40: if (e.ctrlKey) $.datepicker._adjustDate(e.target, +7, 'D');
+						break; // +1 week on ctrl+down
+				default: handled = false;
+			}
+		else if (e.keyCode == 36 && e.ctrlKey) // display the date picker on ctrl+home
+			$.datepicker._showDatepicker(this);
+		else
+			handled = false;
+		if (handled) {
+			e.preventDefault();
+			e.stopPropagation();
+		}
+	},
+
+	/* Filter entered characters - based on date format. */
+	_doKeyPress: function(e) {
+		var inst = $.data(e.target, PROP_NAME);
+		var chars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat'));
+		var chr = String.fromCharCode(e.charCode == undefined ? e.keyCode : e.charCode);
+		return e.ctrlKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1);
+	},
+
+	/* Pop-up the date picker for a given input field.
+	   @param  input  element - the input field attached to the date picker or
+	                  event - if triggered by focus */
+	_showDatepicker: function(input) {
+		input = input.target || input;
+		if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger
+			input = $('input', input.parentNode)[0];
+		if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here
+			return;
+		var inst = $.data(input, PROP_NAME);
+		var beforeShow = $.datepicker._get(inst, 'beforeShow');
+		extendRemove(inst.settings, (beforeShow ? beforeShow.apply(input, [input, inst]) : {}));
+		$.datepicker._hideDatepicker(null, '');
+		$.datepicker._lastInput = input;
+		$.datepicker._setDateFromField(inst);
+		if ($.datepicker._inDialog) // hide cursor
+			input.value = '';
+		if (!$.datepicker._pos) { // position below input
+			$.datepicker._pos = $.datepicker._findPos(input);
+			$.datepicker._pos[1] += input.offsetHeight; // add the height
+		}
+		var isFixed = false;
+		$(input).parents().each(function() {
+			isFixed |= $(this).css('position') == 'fixed';
+			return !isFixed;
+		});
+		if (isFixed && $.browser.opera) { // correction for Opera when fixed and scrolled
+			$.datepicker._pos[0] -= document.documentElement.scrollLeft;
+			$.datepicker._pos[1] -= document.documentElement.scrollTop;
+		}
+		var offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
+		$.datepicker._pos = null;
+		inst.rangeStart = null;
+		// determine sizing offscreen
+		inst.dpDiv.css({position: 'absolute', display: 'block', top: '-1000px'});
+		$.datepicker._updateDatepicker(inst);
+		// fix width for dynamic number of date pickers
+		inst.dpDiv.width($.datepicker._getNumberOfMonths(inst)[1] *
+			$('.ui-datepicker', inst.dpDiv[0])[0].offsetWidth);
+		// and adjust position before showing
+		offset = $.datepicker._checkOffset(inst, offset, isFixed);
+		inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
+			'static' : (isFixed ? 'fixed' : 'absolute')), display: 'none',
+			left: offset.left + 'px', top: offset.top + 'px'});
+		if (!inst.inline) {
+			var showAnim = $.datepicker._get(inst, 'showAnim') || 'show';
+			var duration = $.datepicker._get(inst, 'duration');
+			var postProcess = function() {
+				$.datepicker._datepickerShowing = true;
+				if ($.browser.msie && parseInt($.browser.version) < 7) // fix IE < 7 select problems
+					$('iframe.ui-datepicker-cover').css({width: inst.dpDiv.width() + 4,
+						height: inst.dpDiv.height() + 4});
+			};
+			if ($.effects && $.effects[showAnim])
+				inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
+			else
+				inst.dpDiv[showAnim](duration, postProcess);
+			if (duration == '')
+				postProcess();
+			if (inst.input[0].type != 'hidden')
+				inst.input[0].focus();
+			$.datepicker._curInst = inst;
+		}
+	},
+
+	/* Generate the date picker content. */
+	_updateDatepicker: function(inst) {
+		var dims = {width: inst.dpDiv.width() + 4,
+			height: inst.dpDiv.height() + 4};
+		inst.dpDiv.empty().append(this._generateDatepicker(inst)).
+			find('iframe.ui-datepicker-cover').
+			css({width: dims.width, height: dims.height});
+		var numMonths = this._getNumberOfMonths(inst);
+		inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? 'add' : 'remove') +
+			'Class']('ui-datepicker-multi');
+		inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') +
+			'Class']('ui-datepicker-rtl');
+		if (inst.input && inst.input[0].type != 'hidden')
+			$(inst.input[0]).focus();
+	},
+
+	/* Check positioning to remain on screen. */
+	_checkOffset: function(inst, offset, isFixed) {
+		var pos = inst.input ? this._findPos(inst.input[0]) : null;
+		var browserWidth = window.innerWidth || document.documentElement.clientWidth;
+		var browserHeight = window.innerHeight || document.documentElement.clientHeight;
+		var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
+		var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
+		// reposition date picker horizontally if outside the browser window
+		if (this._get(inst, 'isRTL') || (offset.left + inst.dpDiv.width() - scrollX) > browserWidth)
+			offset.left = Math.max((isFixed ? 0 : scrollX),
+				pos[0] + (inst.input ? inst.input.width() : 0) - (isFixed ? scrollX : 0) - inst.dpDiv.width() -
+				(isFixed && $.browser.opera ? document.documentElement.scrollLeft : 0));
+		else
+			offset.left -= (isFixed ? scrollX : 0);
+		// reposition date picker vertically if outside the browser window
+		if ((offset.top + inst.dpDiv.height() - scrollY) > browserHeight)
+			offset.top = Math.max((isFixed ? 0 : scrollY),
+				pos[1] - (isFixed ? scrollY : 0) - (this._inDialog ? 0 : inst.dpDiv.height()) -
+				(isFixed && $.browser.opera ? document.documentElement.scrollTop : 0));
+		else
+			offset.top -= (isFixed ? scrollY : 0);
+		return offset;
+	},
+	
+	/* Find an object's position on the screen. */
+	_findPos: function(obj) {
+        while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) {
+            obj = obj.nextSibling;
+        }
+        var position = $(obj).offset();
+	    return [position.left, position.top];
+	},
+
+	/* Hide the date picker from view.
+	   @param  input  element - the input field attached to the date picker
+	   @param  duration  string - the duration over which to close the date picker */
+	_hideDatepicker: function(input, duration) {
+		var inst = this._curInst;
+		if (!inst)
+			return;
+		var rangeSelect = this._get(inst, 'rangeSelect');
+		if (rangeSelect && this._stayOpen)
+			this._selectDate('#' + inst.id, this._formatDate(inst,
+				inst.currentDay, inst.currentMonth, inst.currentYear));
+		this._stayOpen = false;
+		if (this._datepickerShowing) {
+			duration = (duration != null ? duration : this._get(inst, 'duration'));
+			var showAnim = this._get(inst, 'showAnim');
+			var postProcess = function() {
+				$.datepicker._tidyDialog(inst);
+			};
+			if (duration != '' && $.effects && $.effects[showAnim])
+				inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'),
+					duration, postProcess);
+			else
+				inst.dpDiv[(duration == '' ? 'hide' : (showAnim == 'slideDown' ? 'slideUp' :
+					(showAnim == 'fadeIn' ? 'fadeOut' : 'hide')))](duration, postProcess);
+			if (duration == '')
+				this._tidyDialog(inst);
+			var onClose = this._get(inst, 'onClose');
+			if (onClose)
+				onClose.apply((inst.input ? inst.input[0] : null),
+					[this._getDate(inst), inst]);  // trigger custom callback
+			this._datepickerShowing = false;
+			this._lastInput = null;
+			inst.settings.prompt = null;
+			if (this._inDialog) {
+				this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' });
+				if ($.blockUI) {
+					$.unblockUI();
+					$('body').append(this.dpDiv);
+				}
+			}
+			this._inDialog = false;
+		}
+		this._curInst = null;
+	},
+
+	/* Tidy up after a dialog display. */
+	_tidyDialog: function(inst) {
+		inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker');
+		$('.' + this._promptClass, inst.dpDiv).remove();
+	},
+
+	/* Close date picker if clicked elsewhere. */
+	_checkExternalClick: function(event) {
+		if (!$.datepicker._curInst)
+			return;
+		var $target = $(event.target);
+		if (($target.parents('#' + $.datepicker._mainDivId).length == 0) &&
+				!$target.hasClass($.datepicker.markerClassName) &&
+				!$target.hasClass($.datepicker._triggerClass) &&
+				$.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI))
+			$.datepicker._hideDatepicker(null, '');
+	},
+
+	/* Adjust one of the date sub-fields. */
+	_adjustDate: function(id, offset, period) {
+		var target = $(id);
+		var inst = $.data(target[0], PROP_NAME);
+		this._adjustInstDate(inst, offset, period);
+		this._updateDatepicker(inst);
+	},
+
+	/* Action for current link. */
+	_gotoToday: function(id) {
+		var target = $(id);
+		var inst = $.data(target[0], PROP_NAME);
+		if (this._get(inst, 'gotoCurrent') && inst.currentDay) {
+			inst.selectedDay = inst.currentDay;
+			inst.drawMonth = inst.selectedMonth = inst.currentMonth;
+			inst.drawYear = inst.selectedYear = inst.currentYear;
+		}
+		else {
+		var date = new Date();
+		inst.selectedDay = date.getDate();
+		inst.drawMonth = inst.selectedMonth = date.getMonth();
+		inst.drawYear = inst.selectedYear = date.getFullYear();
+		}
+		this._adjustDate(target);
+		this._notifyChange(inst);
+	},
+
+	/* Action for selecting a new month/year. */
+	_selectMonthYear: function(id, select, period) {
+		var target = $(id);
+		var inst = $.data(target[0], PROP_NAME);
+		inst._selectingMonthYear = false;
+		inst[period == 'M' ? 'drawMonth' : 'drawYear'] =
+			select.options[select.selectedIndex].value - 0;
+		this._adjustDate(target);
+		this._notifyChange(inst);
+	},
+
+	/* Restore input focus after not changing month/year. */
+	_clickMonthYear: function(id) {
+		var target = $(id);
+		var inst = $.data(target[0], PROP_NAME);
+		if (inst.input && inst._selectingMonthYear && !$.browser.msie)
+			inst.input[0].focus();
+		inst._selectingMonthYear = !inst._selectingMonthYear;
+	},
+
+	/* Action for changing the first week day. */
+	_changeFirstDay: function(id, day) {
+		var target = $(id);
+		var inst = $.data(target[0], PROP_NAME);
+		inst.settings.firstDay = day;
+		this._updateDatepicker(inst);
+	},
+
+	/* Action for selecting a day. */
+	_selectDay: function(id, month, year, td) {
+		if ($(td).hasClass(this._unselectableClass))
+			return;
+		var target = $(id);
+		var inst = $.data(target[0], PROP_NAME);
+		var rangeSelect = this._get(inst, 'rangeSelect');
+		if (rangeSelect) {
+			this._stayOpen = !this._stayOpen;
+			if (this._stayOpen) {
+				$('.ui-datepicker td').removeClass(this._currentClass);
+				$(td).addClass(this._currentClass);
+			} 
+		}
+		inst.selectedDay = inst.currentDay = $('a', td).html();
+		inst.selectedMonth = inst.currentMonth = month;
+		inst.selectedYear = inst.currentYear = year;
+		if (this._stayOpen) {
+			inst.endDay = inst.endMonth = inst.endYear = null;
+		}
+		else if (rangeSelect) {
+			inst.endDay = inst.currentDay;
+			inst.endMonth = inst.currentMonth;
+			inst.endYear = inst.currentYear;
+		}
+		this._selectDate(id, this._formatDate(inst,
+			inst.currentDay, inst.currentMonth, inst.currentYear));
+		if (this._stayOpen) {
+			inst.rangeStart = new Date(inst.currentYear, inst.currentMonth, inst.currentDay);
+			this._updateDatepicker(inst);
+		}
+		else if (rangeSelect) {
+			inst.selectedDay = inst.currentDay = inst.rangeStart.getDate();
+			inst.selectedMonth = inst.currentMonth = inst.rangeStart.getMonth();
+			inst.selectedYear = inst.currentYear = inst.rangeStart.getFullYear();
+			inst.rangeStart = null;
+			if (inst.inline)
+				this._updateDatepicker(inst);
+		}
+	},
+
+	/* Erase the input field and hide the date picker. */
+	_clearDate: function(id) {
+		var target = $(id);
+		var inst = $.data(target[0], PROP_NAME);
+		if (this._get(inst, 'mandatory'))
+			return;
+		this._stayOpen = false;
+		inst.endDay = inst.endMonth = inst.endYear = inst.rangeStart = null;
+		this._selectDate(target, '');
+	},
+
+	/* Update the input field with the selected date. */
+	_selectDate: function(id, dateStr) {
+		var target = $(id);
+		var inst = $.data(target[0], PROP_NAME);
+		dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
+		if (this._get(inst, 'rangeSelect') && dateStr)
+			dateStr = (inst.rangeStart ? this._formatDate(inst, inst.rangeStart) :
+				dateStr) + this._get(inst, 'rangeSeparator') + dateStr;
+		if (inst.input)
+			inst.input.val(dateStr);
+		this._updateAlternate(inst);
+		var onSelect = this._get(inst, 'onSelect');
+		if (onSelect)
+			onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);  // trigger custom callback
+		else if (inst.input)
+			inst.input.trigger('change'); // fire the change event
+		if (inst.inline)
+			this._updateDatepicker(inst);
+		else if (!this._stayOpen) {
+			this._hideDatepicker(null, this._get(inst, 'duration'));
+			this._lastInput = inst.input[0];
+			if (typeof(inst.input[0]) != 'object')
+				inst.input[0].focus(); // restore focus
+			this._lastInput = null;
+		}
+	},
+	
+	/* Update any alternate field to synchronise with the main field. */
+	_updateAlternate: function(inst) {
+		var altField = this._get(inst, 'altField');
+		if (altField) { // update alternate field too
+			var altFormat = this._get(inst, 'altFormat');
+			var date = this._getDate(inst);
+			dateStr = (isArray(date) ? (!date[0] && !date[1] ? '' :
+				this.formatDate(altFormat, date[0], this._getFormatConfig(inst)) +
+				this._get(inst, 'rangeSeparator') + this.formatDate(
+				altFormat, date[1] || date[0], this._getFormatConfig(inst))) :
+				this.formatDate(altFormat, date, this._getFormatConfig(inst)));
+			$(altField).each(function() { $(this).val(dateStr); });
+		}
+	},
+
+	/* Set as beforeShowDay function to prevent selection of weekends.
+	   @param  date  Date - the date to customise
+	   @return [boolean, string] - is this date selectable?, what is its CSS class? */
+	noWeekends: function(date) {
+		var day = date.getDay();
+		return [(day > 0 && day < 6), ''];
+	},
+	
+	/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
+	   @param  date  Date - the date to get the week for
+	   @return  number - the number of the week within the year that contains this date */
+	iso8601Week: function(date) {
+		var checkDate = new Date(date.getFullYear(), date.getMonth(), date.getDate(), (date.getTimezoneOffset() / -60));
+		var firstMon = new Date(checkDate.getFullYear(), 1 - 1, 4); // First week always contains 4 Jan
+		var firstDay = firstMon.getDay() || 7; // Day of week: Mon = 1, ..., Sun = 7
+		firstMon.setDate(firstMon.getDate() + 1 - firstDay); // Preceding Monday
+		if (firstDay < 4 && checkDate < firstMon) { // Adjust first three days in year if necessary
+			checkDate.setDate(checkDate.getDate() - 3); // Generate for previous year
+			return $.datepicker.iso8601Week(checkDate);
+		} else if (checkDate > new Date(checkDate.getFullYear(), 12 - 1, 28)) { // Check last three days in year
+			firstDay = new Date(checkDate.getFullYear() + 1, 1 - 1, 4).getDay() || 7;
+			if (firstDay > 4 && (checkDate.getDay() || 7) < firstDay - 3) { // Adjust if necessary
+				checkDate.setDate(checkDate.getDate() + 3); // Generate for next year
+				return $.datepicker.iso8601Week(checkDate);
+			}
+		}
+		return Math.floor(((checkDate - firstMon) / 86400000) / 7) + 1; // Weeks to given date
+	},
+	
+	/* Provide status text for a particular date.
+	   @param  date  the date to get the status for
+	   @param  inst  the current datepicker instance
+	   @return  the status display text for this date */
+	dateStatus: function(date, inst) {
+		return $.datepicker.formatDate($.datepicker._get(inst, 'dateStatus'),
+			date, $.datepicker._getFormatConfig(inst));
+	},
+
+	/* Parse a string value into a date object.
+	   See formatDate below for the possible formats.
+
+	   @param  format    string - the expected format of the date
+	   @param  value     string - the date in the above format
+	   @param  settings  Object - attributes include:
+	                     shortYearCutoff  number - the cutoff year for determining the century (optional)
+	                     dayNamesShort    string[7] - abbreviated names of the days from Sunday (optional)
+	                     dayNames         string[7] - names of the days from Sunday (optional)
+	                     monthNamesShort  string[12] - abbreviated names of the months (optional)
+	                     monthNames       string[12] - names of the months (optional)
+	   @return  Date - the extracted date value or null if value is blank */
+	parseDate: function (format, value, settings) {
+		if (format == null || value == null)
+			throw 'Invalid arguments';
+		value = (typeof value == 'object' ? value.toString() : value + '');
+		if (value == '')
+			return null;
+		var shortYearCutoff = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff;
+		var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
+		var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
+		var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
+		var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
+		var year = -1;
+		var month = -1;
+		var day = -1;
+		var literal = false;
+		// Check whether a format character is doubled
+		var lookAhead = function(match) {
+			var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
+			if (matches)
+				iFormat++;
+			return matches;	
+		};
+		// Extract a number from the string value
+		var getNumber = function(match) {
+			lookAhead(match);
+			var origSize = (match == '@' ? 14 : (match == 'y' ? 4 : 2));
+			var size = origSize;
+			var num = 0;
+			while (size > 0 && iValue < value.length &&
+					value.charAt(iValue) >= '0' && value.charAt(iValue) <= '9') {
+				num = num * 10 + (value.charAt(iValue++) - 0);
+				size--;
+			}
+			if (size == origSize)
+				throw 'Missing number at position ' + iValue;
+			return num;
+		};
+		// Extract a name from the string value and convert to an index
+		var getName = function(match, shortNames, longNames) {
+			var names = (lookAhead(match) ? longNames : shortNames);
+			var size = 0;
+			for (var j = 0; j < names.length; j++)
+				size = Math.max(size, names[j].length);
+			var name = '';
+			var iInit = iValue;
+			while (size > 0 && iValue < value.length) {
+				name += value.charAt(iValue++);
+				for (var i = 0; i < names.length; i++)
+					if (name == names[i])
+						return i + 1;
+				size--;
+			}
+			throw 'Unknown name at position ' + iInit;
+		};
+		// Confirm that a literal character matches the string value
+		var checkLiteral = function() {
+			if (value.charAt(iValue) != format.charAt(iFormat))
+				throw 'Unexpected literal at position ' + iValue;
+			iValue++;
+		};
+		var iValue = 0;
+		for (var iFormat = 0; iFormat < format.length; iFormat++) {
+			if (literal)
+				if (format.charAt(iFormat) == "'" && !lookAhead("'"))
+					literal = false;
+				else
+					checkLiteral();
+			else
+				switch (format.charAt(iFormat)) {
+					case 'd':
+						day = getNumber('d');
+						break;
+					case 'D': 
+						getName('D', dayNamesShort, dayNames);
+						break;
+					case 'm': 
+						month = getNumber('m');
+						break;
+					case 'M':
+						month = getName('M', monthNamesShort, monthNames); 
+						break;
+					case 'y':
+						year = getNumber('y');
+						break;
+					case '@':
+						var date = new Date(getNumber('@'));
+						year = date.getFullYear();
+						month = date.getMonth() + 1;
+						day = date.getDate();
+						break;
+					case "'":
+						if (lookAhead("'"))
+							checkLiteral();
+						else
+							literal = true;
+						break;
+					default:
+						checkLiteral();
+				}
+		}
+		if (year < 100)
+			year += new Date().getFullYear() - new Date().getFullYear() % 100 +
+				(year <= shortYearCutoff ? 0 : -100);
+		var date = new Date(year, month - 1, day);
+		if (date.getFullYear() != year || date.getMonth() + 1 != month || date.getDate() != day)
+			throw 'Invalid date'; // E.g. 31/02/*
+		return date;
+	},
+
+	/* Standard date formats. */
+	ATOM: 'yy-mm-dd', // RFC 3339 (ISO 8601)
+	COOKIE: 'D, dd M yy',
+	ISO_8601: 'yy-mm-dd',
+	RFC_822: 'D, d M y',
+	RFC_850: 'DD, dd-M-y',
+	RFC_1036: 'D, d M y',
+	RFC_1123: 'D, d M yy',
+	RFC_2822: 'D, d M yy',
+	RSS: 'D, d M y', // RFC 822
+	TIMESTAMP: '@',
+	W3C: 'yy-mm-dd', // ISO 8601
+
+	/* Format a date object into a string value.
+	   The format can be combinations of the following:
+	   d  - day of month (no leading zero)
+	   dd - day of month (two digit)
+	   D  - day name short
+	   DD - day name long
+	   m  - month of year (no leading zero)
+	   mm - month of year (two digit)
+	   M  - month name short
+	   MM - month name long
+	   y  - year (two digit)
+	   yy - year (four digit)
+	   @ - Unix timestamp (ms since 01/01/1970)
+	   '...' - literal text
+	   '' - single quote
+
+	   @param  format    string - the desired format of the date
+	   @param  date      Date - the date value to format
+	   @param  settings  Object - attributes include:
+	                     dayNamesShort    string[7] - abbreviated names of the days from Sunday (optional)
+	                     dayNames         string[7] - names of the days from Sunday (optional)
+	                     monthNamesShort  string[12] - abbreviated names of the months (optional)
+	                     monthNames       string[12] - names of the months (optional)
+	   @return  string - the date in the above format */
+	formatDate: function (format, date, settings) {
+		if (!date)
+			return '';
+		var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
+		var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
+		var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
+		var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
+		// Check whether a format character is doubled
+		var lookAhead = function(match) {
+			var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
+			if (matches)
+				iFormat++;
+			return matches;	
+		};
+		// Format a number, with leading zero if necessary
+		var formatNumber = function(match, value) {
+			return (lookAhead(match) && value < 10 ? '0' : '') + value;
+		};
+		// Format a name, short or long as requested
+		var formatName = function(match, value, shortNames, longNames) {
+			return (lookAhead(match) ? longNames[value] : shortNames[value]);
+		};
+		var output = '';
+		var literal = false;
+		if (date)
+			for (var iFormat = 0; iFormat < format.length; iFormat++) {
+				if (literal)
+					if (format.charAt(iFormat) == "'" && !lookAhead("'"))
+						literal = false;
+					else
+						output += format.charAt(iFormat);
+				else
+					switch (format.charAt(iFormat)) {
+						case 'd':
+							output += formatNumber('d', date.getDate()); 
+							break;
+						case 'D': 
+							output += formatName('D', date.getDay(), dayNamesShort, dayNames);
+							break;
+						case 'm': 
+							output += formatNumber('m', date.getMonth() + 1); 
+							break;
+						case 'M':
+							output += formatName('M', date.getMonth(), monthNamesShort, monthNames); 
+							break;
+						case 'y':
+							output += (lookAhead('y') ? date.getFullYear() : 
+								(date.getYear() % 100 < 10 ? '0' : '') + date.getYear() % 100);
+							break;
+						case '@':
+							output += date.getTime(); 
+							break;
+						case "'":
+							if (lookAhead("'"))
+								output += "'";
+							else
+								literal = true;
+							break;
+						default:
+							output += format.charAt(iFormat);
+					}
+			}
+		return output;
+	},
+
+	/* Extract all possible characters from the date format. */
+	_possibleChars: function (format) {
+		var chars = '';
+		var literal = false;
+		for (var iFormat = 0; iFormat < format.length; iFormat++)
+			if (literal)
+				if (format.charAt(iFormat) == "'" && !lookAhead("'"))
+					literal = false;
+				else
+					chars += format.charAt(iFormat);
+			else
+				switch (format.charAt(iFormat)) {
+					case 'd': case 'm': case 'y': case '@':
+						chars += '0123456789'; 
+						break;
+					case 'D': case 'M':
+						return null; // Accept anything
+					case "'":
+						if (lookAhead("'"))
+							chars += "'";
+						else
+							literal = true;
+						break;
+					default:
+						chars += format.charAt(iFormat);
+				}
+		return chars;
+	},
+
+	/* Get a setting value, defaulting if necessary. */
+	_get: function(inst, name) {
+		return inst.settings[name] !== undefined ?
+			inst.settings[name] : this._defaults[name];
+	},
+
+	/* Parse existing date and initialise date picker. */
+	_setDateFromField: function(inst) {
+		var dateFormat = this._get(inst, 'dateFormat');
+		var dates = inst.input ? inst.input.val().split(this._get(inst, 'rangeSeparator')) : null; 
+		inst.endDay = inst.endMonth = inst.endYear = null;
+		var date = defaultDate = this._getDefaultDate(inst);
+		if (dates.length > 0) {
+			var settings = this._getFormatConfig(inst);
+			if (dates.length > 1) {
+				date = this.parseDate(dateFormat, dates[1], settings) || defaultDate;
+				inst.endDay = date.getDate();
+				inst.endMonth = date.getMonth();
+				inst.endYear = date.getFullYear();
+			}
+			try {
+				date = this.parseDate(dateFormat, dates[0], settings) || defaultDate;
+			} catch (e) {
+				this.log(e);
+				date = defaultDate;
+			}
+		}
+		inst.selectedDay = date.getDate();
+		inst.drawMonth = inst.selectedMonth = date.getMonth();
+		inst.drawYear = inst.selectedYear = date.getFullYear();
+		inst.currentDay = (dates[0] ? date.getDate() : 0);
+		inst.currentMonth = (dates[0] ? date.getMonth() : 0);
+		inst.currentYear = (dates[0] ? date.getFullYear() : 0);
+		this._adjustInstDate(inst);
+	},
+	
+	/* Retrieve the default date shown on opening. */
+	_getDefaultDate: function(inst) {
+		var date = this._determineDate(this._get(inst, 'defaultDate'), new Date());
+		var minDate = this._getMinMaxDate(inst, 'min', true);
+		var maxDate = this._getMinMaxDate(inst, 'max');
+		date = (minDate && date < minDate ? minDate : date);
+		date = (maxDate && date > maxDate ? maxDate : date);
+		return date;
+	},
+
+	/* A date may be specified as an exact value or a relative one. */
+	_determineDate: function(date, defaultDate) {
+		var offsetNumeric = function(offset) {
+			var date = new Date();
+			date.setUTCDate(date.getUTCDate() + offset);
+			return date;
+		};
+		var offsetString = function(offset, getDaysInMonth) {
+			var date = new Date();
+			var year = date.getFullYear();
+			var month = date.getMonth();
+			var day = date.getDate();
+			var pattern = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;
+			var matches = pattern.exec(offset);
+			while (matches) {
+				switch (matches[2] || 'd') {
+					case 'd' : case 'D' :
+						day += (matches[1] - 0); break;
+					case 'w' : case 'W' :
+						day += (matches[1] * 7); break;
+					case 'm' : case 'M' :
+						month += (matches[1] - 0); 
+						day = Math.min(day, getDaysInMonth(year, month));
+						break;
+					case 'y': case 'Y' :
+						year += (matches[1] - 0);
+						day = Math.min(day, getDaysInMonth(year, month));
+						break;
+				}
+				matches = pattern.exec(offset);
+			}
+			return new Date(year, month, day);
+		};
+		return (date == null ? defaultDate :
+			(typeof date == 'string' ? offsetString(date, this._getDaysInMonth) :
+			(typeof date == 'number' ? offsetNumeric(date) : date)));
+	},
+
+	/* Set the date(s) directly. */
+	_setDate: function(inst, date, endDate) {
+		var clear = !(date);
+		date = this._determineDate(date, new Date());
+		inst.selectedDay = inst.currentDay = date.getDate();
+		inst.drawMonth = inst.selectedMonth = inst.currentMonth = date.getMonth();
+		inst.drawYear = inst.selectedYear = inst.currentYear = date.getFullYear();
+		if (this._get(inst, 'rangeSelect')) {
+			if (endDate) {
+				endDate = this._determineDate(endDate, null);
+				inst.endDay = endDate.getDate();
+				inst.endMonth = endDate.getMonth();
+				inst.endYear = endDate.getFullYear();
+			} else {
+				inst.endDay = inst.currentDay;
+				inst.endMonth = inst.currentMonth;
+				inst.endYear = inst.currentYear;
+			}
+		}
+		this._adjustInstDate(inst);
+		if (inst.input)
+			inst.input.val(clear ? '' : this._formatDate(inst) +
+				(!this._get(inst, 'rangeSelect') ? '' : this._get(inst, 'rangeSeparator') +
+				this._formatDate(inst, inst.endDay, inst.endMonth, inst.endYear)));
+	},
+
+	/* Retrieve the date(s) directly. */
+	_getDate: function(inst) {
+		var startDate = (!inst.currentYear || (inst.input && inst.input.val() == '') ? null :
+			new Date(inst.currentYear, inst.currentMonth, inst.currentDay));
+		if (this._get(inst, 'rangeSelect')) {
+			return [inst.rangeStart || startDate, (!inst.endYear ? null :
+				new Date(inst.endYear, inst.endMonth, inst.endDay))];
+		} else
+			return startDate;
+	},
+
+	/* Generate the HTML for the current state of the date picker. */
+	_generateDatepicker: function(inst) {
+		var today = new Date();
+		today = new Date(today.getFullYear(), today.getMonth(), today.getDate()); // clear time
+		var showStatus = this._get(inst, 'showStatus');
+		var isRTL = this._get(inst, 'isRTL');
+		// build the date picker HTML
+		var clear = (this._get(inst, 'mandatory') ? '' :
+			'<div class="ui-datepicker-clear"><a onclick="jQuery.datepicker._clearDate(\'#' + inst.id + '\');"' +
+			(showStatus ? this._addStatus(inst, this._get(inst, 'clearStatus') || '&#xa0;') : '') + '>' +
+			this._get(inst, 'clearText') + '</a></div>');
+		var controls = '<div class="ui-datepicker-control">' + (isRTL ? '' : clear) +
+			'<div class="ui-datepicker-close"><a onclick="jQuery.datepicker._hideDatepicker();"' +
+			(showStatus ? this._addStatus(inst, this._get(inst, 'closeStatus') || '&#xa0;') : '') + '>' +
+			this._get(inst, 'closeText') + '</a></div>' + (isRTL ? clear : '')  + '</div>';
+		var prompt = this._get(inst, 'prompt');
+		var closeAtTop = this._get(inst, 'closeAtTop');
+		var hideIfNoPrevNext = this._get(inst, 'hideIfNoPrevNext');
+		var navigationAsDateFormat = this._get(inst, 'navigationAsDateFormat');
+		var numMonths = this._getNumberOfMonths(inst);
+		var stepMonths = this._get(inst, 'stepMonths');
+		var isMultiMonth = (numMonths[0] != 1 || numMonths[1] != 1);
+		var currentDate = (!inst.currentDay ? new Date(9999, 9, 9) :
+			new Date(inst.currentYear, inst.currentMonth, inst.currentDay));
+		var minDate = this._getMinMaxDate(inst, 'min', true);
+		var maxDate = this._getMinMaxDate(inst, 'max');
+		var drawMonth = inst.drawMonth;
+		var drawYear = inst.drawYear;
+		if (maxDate) {
+			var maxDraw = new Date(maxDate.getFullYear(),
+				maxDate.getMonth() - numMonths[1] + 1, maxDate.getDate());
+			maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
+			while (new Date(drawYear, drawMonth, 1) > maxDraw) {
+				drawMonth--;
+				if (drawMonth < 0) {
+					drawMonth = 11;
+					drawYear--;
+				}
+			}
+		}
+		// controls and links
+		var prevText = this._get(inst, 'prevText');
+		prevText = (!navigationAsDateFormat ? prevText : this.formatDate(
+			prevText, new Date(drawYear, drawMonth - stepMonths, 1), this._getFormatConfig(inst)));
+		var prev = '<div class="ui-datepicker-prev">' + (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ? 
+			'<a onclick="jQuery.datepicker._adjustDate(\'#' + inst.id + '\', -' + stepMonths + ', \'M\');"' +
+			(showStatus ? this._addStatus(inst, this._get(inst, 'prevStatus') || '&#xa0;') : '') + '>' + prevText + '</a>' :
+			(hideIfNoPrevNext ? '' : '<label>' + prevText + '</label>')) + '</div>';
+		var nextText = this._get(inst, 'nextText');
+		nextText = (!navigationAsDateFormat ? nextText : this.formatDate(
+			nextText, new Date(drawYear, drawMonth + stepMonths, 1), this._getFormatConfig(inst)));
+		var next = '<div class="ui-datepicker-next">' + (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
+			'<a onclick="jQuery.datepicker._adjustDate(\'#' + inst.id + '\', +' + stepMonths + ', \'M\');"' +
+			(showStatus ? this._addStatus(inst, this._get(inst, 'nextStatus') || '&#xa0;') : '') + '>' + nextText + '</a>' :
+			(hideIfNoPrevNext ? '' : '<label>' + nextText + '</label>')) + '</div>';
+		var currentText = this._get(inst, 'currentText');
+		currentText = (!navigationAsDateFormat ? currentText: this.formatDate(
+			currentText, today, this._getFormatConfig(inst)));
+		var html = (prompt ? '<div class="' + this._promptClass + '">' + prompt + '</div>' : '') +
+			(closeAtTop && !inst.inline ? controls : '') +
+			'<div class="ui-datepicker-links">' + (isRTL ? next : prev) +
+			(this._isInRange(inst, (this._get(inst, 'gotoCurrent') && inst.currentDay ?
+			currentDate : today)) ? '<div class="ui-datepicker-current">' +
+			'<a onclick="jQuery.datepicker._gotoToday(\'#' + inst.id + '\');"' +
+			(showStatus ? this._addStatus(inst, this._get(inst, 'currentStatus') || '&#xa0;') : '') + '>' +
+			currentText + '</a></div>' : '') + (isRTL ? prev : next) + '</div>';
+		var firstDay = this._get(inst, 'firstDay');
+		var changeFirstDay = this._get(inst, 'changeFirstDay');
+		var dayNames = this._get(inst, 'dayNames');
+		var dayNamesShort = this._get(inst, 'dayNamesShort');
+		var dayNamesMin = this._get(inst, 'dayNamesMin');
+		var monthNames = this._get(inst, 'monthNames');
+		var beforeShowDay = this._get(inst, 'beforeShowDay');
+		var highlightWeek = this._get(inst, 'highlightWeek');
+		var showOtherMonths = this._get(inst, 'showOtherMonths');
+		var showWeeks = this._get(inst, 'showWeeks');
+		var calculateWeek = this._get(inst, 'calculateWeek') || this.iso8601Week;
+		var status = (showStatus ? this._get(inst, 'dayStatus') || '&#xa0;' : '');
+		var dateStatus = this._get(inst, 'statusForDate') || this.dateStatus;
+		var endDate = inst.endDay ? new Date(inst.endYear, inst.endMonth, inst.endDay) : currentDate;
+		for (var row = 0; row < numMonths[0]; row++)
+			for (var col = 0; col < numMonths[1]; col++) {
+				var selectedDate = new Date(drawYear, drawMonth, inst.selectedDay);
+				html += '<div class="ui-datepicker-one-month' + (col == 0 ? ' ui-datepicker-new-row' : '') + '">' +
+					this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
+					selectedDate, row > 0 || col > 0, showStatus, monthNames) + // draw month headers
+					'<table class="ui-datepicker" cellpadding="0" cellspacing="0"><thead>' + 
+					'<tr class="ui-datepicker-title-row">' +
+					(showWeeks ? '<td>' + this._get(inst, 'weekHeader') + '</td>' : '');
+				for (var dow = 0; dow < 7; dow++) { // days of the week
+					var day = (dow + firstDay) % 7;
+					var dayStatus = (status.indexOf('DD') > -1 ? status.replace(/DD/, dayNames[day]) :
+						status.replace(/D/, dayNamesShort[day]));
+					html += '<td' + ((dow + firstDay + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end-cell"' : '') + '>' +
+						(!changeFirstDay ? '<span' :
+						'<a onclick="jQuery.datepicker._changeFirstDay(\'#' + inst.id + '\', ' + day + ');"') + 
+						(showStatus ? this._addStatus(inst, dayStatus) : '') + ' title="' + dayNames[day] + '">' +
+						dayNamesMin[day] + (changeFirstDay ? '</a>' : '</span>') + '</td>';
+				}
+				html += '</tr></thead><tbody>';
+				var daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
+				if (drawYear == inst.selectedYear && drawMonth == inst.selectedMonth)
+					inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
+				var leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
+				var printDate = new Date(drawYear, drawMonth, 1 - leadDays);
+				var numRows = (isMultiMonth ? 6 : Math.ceil((leadDays + daysInMonth) / 7)); // calculate the number of rows to generate
+				for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows
+					html += '<tr class="ui-datepicker-days-row">' +
+						(showWeeks ? '<td class="ui-datepicker-week-col">' + calculateWeek(printDate) + '</td>' : '');
+					for (var dow = 0; dow < 7; dow++) { // create date picker days
+						var daySettings = (beforeShowDay ?
+							beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, '']);
+						var otherMonth = (printDate.getMonth() != drawMonth);
+						var unselectable = otherMonth || !daySettings[0] ||
+							(minDate && printDate < minDate) || (maxDate && printDate > maxDate);
+						html += '<td class="ui-datepicker-days-cell' +
+							((dow + firstDay + 6) % 7 >= 5 ? ' ui-datepicker-week-end-cell' : '') + // highlight weekends
+							(otherMonth ? ' ui-datepicker-otherMonth' : '') + // highlight days from other months
+							(printDate.getTime() == selectedDate.getTime() && drawMonth == inst.selectedMonth ?
+							' ui-datepicker-days-cell-over' : '') + // highlight selected day
+							(unselectable ? ' ' + this._unselectableClass : '') +  // highlight unselectable days
+							(otherMonth && !showOtherMonths ? '' : ' ' + daySettings[1] + // highlight custom dates
+							(printDate.getTime() >= currentDate.getTime() && printDate.getTime() <= endDate.getTime() ?  // in current range
+							' ' + this._currentClass : '') + // highlight selected day
+							(printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different)
+							((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title
+							(unselectable ? (highlightWeek ? ' onmouseover="jQuery(this).parent().addClass(\'ui-datepicker-week-over\');"' + // highlight selection week
+							' onmouseout="jQuery(this).parent().removeClass(\'ui-datepicker-week-over\');"' : '') : // unhighlight selection week
+							' onmouseover="jQuery(this).addClass(\'ui-datepicker-days-cell-over\')' + // highlight selection
+							(highlightWeek ? '.parent().addClass(\'ui-datepicker-week-over\')' : '') + ';' + // highlight selection week
+							(!showStatus || (otherMonth && !showOtherMonths) ? '' : 'jQuery(\'#ui-datepicker-status-' +
+							inst.id + '\').html(\'' + (dateStatus.apply((inst.input ? inst.input[0] : null),
+							[printDate, inst]) || '&#xa0;') +'\');') + '"' +
+							' onmouseout="jQuery(this).removeClass(\'ui-datepicker-days-cell-over\')' + // unhighlight selection
+							(highlightWeek ? '.parent().removeClass(\'ui-datepicker-week-over\')' : '') + ';' + // unhighlight selection week
+							(!showStatus || (otherMonth && !showOtherMonths) ? '' : 'jQuery(\'#ui-datepicker-status-' +
+							inst.id + '\').html(\'&#xa0;\');') + '" onclick="jQuery.datepicker._selectDay(\'#' +
+							inst.id + '\',' + drawMonth + ',' + drawYear + ', this);"') + '>' + // actions
+							(otherMonth ? (showOtherMonths ? printDate.getDate() : '&#xa0;') : // display for other months
+							(unselectable ? printDate.getDate() : '<a>' + printDate.getDate() + '</a>')) + '</td>'; // display for this month
+						printDate.setUTCDate(printDate.getUTCDate() + 1);
+					}
+					html += '</tr>';
+				}
+				drawMonth++;
+				if (drawMonth > 11) {
+					drawMonth = 0;
+					drawYear++;
+				}
+				html += '</tbody></table></div>';
+			}
+		html += (showStatus ? '<div style="clear: both;"></div><div id="ui-datepicker-status-' + inst.id + 
+			'" class="ui-datepicker-status">' + (this._get(inst, 'initStatus') || '&#xa0;') + '</div>' : '') +
+			(!closeAtTop && !inst.inline ? controls : '') +
+			'<div style="clear: both;"></div>' + 
+			($.browser.msie && parseInt($.browser.version) < 7 && !inst.inline ? 
+			'<iframe src="javascript:false;" class="ui-datepicker-cover"></iframe>' : '');
+		return html;
+	},
+	
+	/* Generate the month and year header. */
+	_generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
+			selectedDate, secondary, showStatus, monthNames) {
+		minDate = (inst.rangeStart && minDate && selectedDate < minDate ? selectedDate : minDate);
+		var html = '<div class="ui-datepicker-header">';
+		// month selection
+		if (secondary || !this._get(inst, 'changeMonth'))
+			html += monthNames[drawMonth] + '&#xa0;';
+		else {
+			var inMinYear = (minDate && minDate.getFullYear() == drawYear);
+			var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear);
+			html += '<select class="ui-datepicker-new-month" ' +
+				'onchange="jQuery.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'M\');" ' +
+				'onclick="jQuery.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
+				(showStatus ? this._addStatus(inst, this._get(inst, 'monthStatus') || '&#xa0;') : '') + '>';
+			for (var month = 0; month < 12; month++) {
+				if ((!inMinYear || month >= minDate.getMonth()) &&
+						(!inMaxYear || month <= maxDate.getMonth()))
+					html += '<option value="' + month + '"' +
+						(month == drawMonth ? ' selected="selected"' : '') +
+						'>' + monthNames[month] + '</option>';
+			}
+			html += '</select>';
+		}
+		// year selection
+		if (secondary || !this._get(inst, 'changeYear'))
+			html += drawYear;
+		else {
+			// determine range of years to display
+			var years = this._get(inst, 'yearRange').split(':');
+			var year = 0;
+			var endYear = 0;
+			if (years.length != 2) {
+				year = drawYear - 10;
+				endYear = drawYear + 10;
+			} else if (years[0].charAt(0) == '+' || years[0].charAt(0) == '-') {
+				year = endYear = new Date().getFullYear();
+				year += parseInt(years[0], 10);
+				endYear += parseInt(years[1], 10);
+			} else {
+				year = parseInt(years[0], 10);
+				endYear = parseInt(years[1], 10);
+			}
+			year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
+			endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
+			html += '<select class="ui-datepicker-new-year" ' +
+				'onchange="jQuery.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'Y\');" ' +
+				'onclick="jQuery.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
+				(showStatus ? this._addStatus(inst, this._get(inst, 'yearStatus') || '&#xa0;') : '') + '>';
+			for (; year <= endYear; year++) {
+				html += '<option value="' + year + '"' +
+					(year == drawYear ? ' selected="selected"' : '') +
+					'>' + year + '</option>';
+			}
+			html += '</select>';
+		}
+		html += '</div>'; // Close datepicker_header
+		return html;
+	},
+
+	/* Provide code to set and clear the status panel. */
+	_addStatus: function(inst, text) {
+		return ' onmouseover="jQuery(\'#ui-datepicker-status-' + inst.id + '\').html(\'' + text + '\');" ' +
+			'onmouseout="jQuery(\'#ui-datepicker-status-' + inst.id + '\').html(\'&#xa0;\');"';
+	},
+
+	/* Adjust one of the date sub-fields. */
+	_adjustInstDate: function(inst, offset, period) {
+		var year = inst.drawYear + (period == 'Y' ? offset : 0);
+		var month = inst.drawMonth + (period == 'M' ? offset : 0);
+		var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) +
+			(period == 'D' ? offset : 0);
+		var date = new Date(year, month, day);
+		// ensure it is within the bounds set
+		var minDate = this._getMinMaxDate(inst, 'min', true);
+		var maxDate = this._getMinMaxDate(inst, 'max');
+		date = (minDate && date < minDate ? minDate : date);
+		date = (maxDate && date > maxDate ? maxDate : date);
+		inst.selectedDay = date.getDate();
+		inst.drawMonth = inst.selectedMonth = date.getMonth();
+		inst.drawYear = inst.selectedYear = date.getFullYear();
+		if (period == 'M' || period == 'Y')
+			this._notifyChange(inst);
+	},
+
+	/* Notify change of month/year. */
+	_notifyChange: function(inst) {
+		var onChange = this._get(inst, 'onChangeMonthYear');
+		if (onChange)
+			onChange.apply((inst.input ? inst.input[0] : null),
+				[new Date(inst.selectedYear, inst.selectedMonth, 1), inst]);
+	},
+	
+	/* Determine the number of months to show. */
+	_getNumberOfMonths: function(inst) {
+		var numMonths = this._get(inst, 'numberOfMonths');
+		return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths));
+	},
+
+	/* Determine the current maximum date - ensure no time components are set - may be overridden for a range. */
+	_getMinMaxDate: function(inst, minMax, checkRange) {
+		var date = this._determineDate(this._get(inst, minMax + 'Date'), null);
+		if (date) {
+			date.setHours(0);
+			date.setMinutes(0);
+			date.setSeconds(0);
+			date.setMilliseconds(0);
+		}
+		return (!checkRange || !inst.rangeStart ? date :
+			(!date || inst.rangeStart > date ? inst.rangeStart : date));
+	},
+
+	/* Find the number of days in a given month. */
+	_getDaysInMonth: function(year, month) {
+		return 32 - new Date(year, month, 32).getDate();
+	},
+
+	/* Find the day of the week of the first of a month. */
+	_getFirstDayOfMonth: function(year, month) {
+		return new Date(year, month, 1).getDay();
+	},
+
+	/* Determines if we should allow a "next/prev" month display change. */
+	_canAdjustMonth: function(inst, offset, curYear, curMonth) {
+		var numMonths = this._getNumberOfMonths(inst);
+		var date = new Date(curYear, curMonth + (offset < 0 ? offset : numMonths[1]), 1);
+		if (offset < 0)
+			date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
+		return this._isInRange(inst, date);
+	},
+
+	/* Is the given date in the accepted range? */
+	_isInRange: function(inst, date) {
+		// during range selection, use minimum of selected date and range start
+		var newMinDate = (!inst.rangeStart ? null :
+			new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay));
+		newMinDate = (newMinDate && inst.rangeStart < newMinDate ? inst.rangeStart : newMinDate);
+		var minDate = newMinDate || this._getMinMaxDate(inst, 'min');
+		var maxDate = this._getMinMaxDate(inst, 'max');
+		return ((!minDate || date >= minDate) && (!maxDate || date <= maxDate));
+	},
+	
+	/* Provide the configuration settings for formatting/parsing. */
+	_getFormatConfig: function(inst) {
+		var shortYearCutoff = this._get(inst, 'shortYearCutoff');
+		shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
+			new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
+		return {shortYearCutoff: shortYearCutoff,
+			dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'),
+			monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')};
+	},
+
+	/* Format the given date for display. */
+	_formatDate: function(inst, day, month, year) {
+		if (!day) {
+			inst.currentDay = inst.selectedDay;
+			inst.currentMonth = inst.selectedMonth;
+			inst.currentYear = inst.selectedYear;
+		}
+		var date = (day ? (typeof day == 'object' ? day : new Date(year, month, day)) :
+			new Date(inst.currentYear, inst.currentMonth, inst.currentDay));
+		return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst));
+	}
+});
+
+/* jQuery extend now ignores nulls! */
+function extendRemove(target, props) {
+	$.extend(target, props);
+	for (var name in props)
+		if (props[name] == null || props[name] == undefined)
+			target[name] = props[name];
+	return target;
+};
+
+/* Determine whether an object is an array. */
+function isArray(a) {
+	return (a && (($.browser.safari && typeof a == 'object' && a.length) ||
+		(a.constructor && a.constructor.toString().match(/\Array\(\)/))));
+};
+
+/* Invoke the datepicker functionality.
+   @param  options  string - a command, optionally followed by additional parameters or
+                    Object - settings for attaching new datepicker functionality
+   @return  jQuery object */
+$.fn.datepicker = function(options){
+	var otherArgs = Array.prototype.slice.call(arguments, 1);
+	if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate'))
+		return $.datepicker['_' + options + 'Datepicker'].
+			apply($.datepicker, [this[0]].concat(otherArgs));
+	return this.each(function() {
+		typeof options == 'string' ?
+			$.datepicker['_' + options + 'Datepicker'].
+				apply($.datepicker, [this].concat(otherArgs)) :
+			$.datepicker._attachDatepicker(this, options);
+	});
+};
+
+$.datepicker = new Datepicker(); // singleton instance
+	
+/* Initialise the date picker. */
+$(document).ready(function() {
+	$(document.body).append($.datepicker.dpDiv).
+		mousedown($.datepicker._checkExternalClick);
+});
+
+})(jQuery);
+/*
+ * jQuery UI Dialog
+ *
+ * Copyright (c) 2008 Richard D. Worth (rdworth.org)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ * 
+ * http://docs.jquery.com/UI/Dialog
+ *
+ * Depends:
+ *	ui.core.js
+ *	ui.draggable.js
+ *	ui.resizable.js
+ */
+(function($) {
+
+var setDataSwitch = {
+	dragStart: "start.draggable",
+	drag: "drag.draggable",
+	dragStop: "stop.draggable",
+	maxHeight: "maxHeight.resizable",
+	minHeight: "minHeight.resizable",
+	maxWidth: "maxWidth.resizable",
+	minWidth: "minWidth.resizable",
+	resizeStart: "start.resizable",
+	resize: "drag.resizable",
+	resizeStop: "stop.resizable"
+};
+
+$.widget("ui.dialog", {
+	init: function() {
+		var self = this,
+			options = this.options,
+			resizeHandles = typeof options.resizable == 'string'
+				? options.resizable
+				: 'n,e,s,w,se,sw,ne,nw',
+			
+			uiDialogContent = this.element
+				.addClass('ui-dialog-content')
+				.wrap('<div/>')
+				.wrap('<div/>'),
+			
+			uiDialogContainer = (this.uiDialogContainer = uiDialogContent.parent()
+				.addClass('ui-dialog-container')
+				.css({position: 'relative', width: '100%', height: '100%'})),
+			
+			title = options.title || uiDialogContent.attr('title') || '',
+			uiDialogTitlebar = (this.uiDialogTitlebar =
+				$('<div class="ui-dialog-titlebar"/>'))
+				.append('<span class="ui-dialog-title">' + title + '</span>')
+				.append('<a href="#" class="ui-dialog-titlebar-close"><span>X</span></a>')
+				.prependTo(uiDialogContainer),
+			
+			uiDialog = (this.uiDialog = uiDialogContainer.parent())
+				.appendTo(document.body)
+				.hide()
+				.addClass('ui-dialog')
+				.addClass(options.dialogClass)
+				// add content classes to dialog
+				// to inherit theme at top level of element
+				.addClass(uiDialogContent.attr('className'))
+					.removeClass('ui-dialog-content')
+				.css({
+					position: 'absolute',
+					width: options.width,
+					height: options.height,
+					overflow: 'hidden',
+					zIndex: options.zIndex
+				})
+				// setting tabIndex makes the div focusable
+				// setting outline to 0 prevents a border on focus in Mozilla
+				.attr('tabIndex', -1).css('outline', 0).keydown(function(ev) {
+					if (options.closeOnEscape) {
+						var ESC = 27;
+						(ev.keyCode && ev.keyCode == ESC && self.close());
+					}
+				})
+				.mousedown(function() {
+					self.moveToTop();
+				}),
+			
+			uiDialogButtonPane = (this.uiDialogButtonPane = $('<div/>'))
+				.addClass('ui-dialog-buttonpane').css({ position: 'absolute', bottom: 0 })
+				.appendTo(uiDialog);
+		
+		this.uiDialogTitlebarClose = $('.ui-dialog-titlebar-close', uiDialogTitlebar)
+			.hover(
+				function() {
+					$(this).addClass('ui-dialog-titlebar-close-hover');
+				},
+				function() {
+					$(this).removeClass('ui-dialog-titlebar-close-hover');
+				}
+			)
+			.mousedown(function(ev) {
+				ev.stopPropagation();
+			})
+			.click(function() {
+				self.close();
+				return false;
+			});
+
+		this.uiDialogTitlebar.find("*").add(this.uiDialogTitlebar).each(function() {
+			$.ui.disableSelection(this);
+		});
+
+		if ($.fn.draggable) {
+			uiDialog.draggable({
+				cancel: '.ui-dialog-content',
+				helper: options.dragHelper,
+				handle: '.ui-dialog-titlebar',
+				start: function(e, ui) {
+					self.moveToTop();
+					(options.dragStart && options.dragStart.apply(self.element[0], arguments));
+				},
+				drag: function(e, ui) {
+					(options.drag && options.drag.apply(self.element[0], arguments));
+				},
+				stop: function(e, ui) {
+					(options.dragStop && options.dragStop.apply(self.element[0], arguments));
+					$.ui.dialog.overlay.resize();
+				}
+			});
+			(options.draggable || uiDialog.draggable('disable'));
+		}
+		
+		if ($.fn.resizable) {
+			uiDialog.resizable({
+				cancel: '.ui-dialog-content',
+				helper: options.resizeHelper,
+				maxWidth: options.maxWidth,
+				maxHeight: options.maxHeight,
+				minWidth: options.minWidth,
+				minHeight: options.minHeight,
+				start: function() {
+					(options.resizeStart && options.resizeStart.apply(self.element[0], arguments));
+				},
+				resize: function(e, ui) {
+					(options.autoResize && self.size.apply(self));
+					(options.resize && options.resize.apply(self.element[0], arguments));
+				},
+				handles: resizeHandles,
+				stop: function(e, ui) {
+					(options.autoResize && self.size.apply(self));
+					(options.resizeStop && options.resizeStop.apply(self.element[0], arguments));
+					$.ui.dialog.overlay.resize();
+				}
+			});
+			(options.resizable || uiDialog.resizable('disable'));
+		}
+		
+		this.createButtons(options.buttons);
+		this.isOpen = false;
+		
+		(options.bgiframe && $.fn.bgiframe && uiDialog.bgiframe());
+		(options.autoOpen && this.open());
+	},
+	
+	setData: function(key, value){
+		(setDataSwitch[key] && this.uiDialog.data(setDataSwitch[key], value));
+		switch (key) {
+			case "buttons":
+				this.createButtons(value);
+				break;
+			case "draggable":
+				this.uiDialog.draggable(value ? 'enable' : 'disable');
+				break;
+			case "height":
+				this.uiDialog.height(value);
+				break;
+			case "position":
+				this.position(value);
+				break;
+			case "resizable":
+				(typeof value == 'string' && this.uiDialog.data('handles.resizable', value));
+				this.uiDialog.resizable(value ? 'enable' : 'disable');
+				break;
+			case "title":
+				$(".ui-dialog-title", this.uiDialogTitlebar).text(value);
+				break;
+			case "width":
+				this.uiDialog.width(value);
+				break;
+		}
+		
+		$.widget.prototype.setData.apply(this, arguments);
+	},
+	
+	position: function(pos) {
+		var wnd = $(window), doc = $(document),
+			pTop = doc.scrollTop(), pLeft = doc.scrollLeft(),
+			minTop = pTop;
+		
+		if ($.inArray(pos, ['center','top','right','bottom','left']) >= 0) {
+			pos = [
+				pos == 'right' || pos == 'left' ? pos : 'center',
+				pos == 'top' || pos == 'bottom' ? pos : 'middle'
+			];
+		}
+		if (pos.constructor != Array) {
+			pos = ['center', 'middle'];
+		}
+		if (pos[0].constructor == Number) {
+			pLeft += pos[0];
+		} else {
+			switch (pos[0]) {
+				case 'left':
+					pLeft += 0;
+					break;
+				case 'right':
+					pLeft += wnd.width() - this.uiDialog.width();
+					break;
+				default:
+				case 'center':
+					pLeft += (wnd.width() - this.uiDialog.width()) / 2;
+			}
+		}
+		if (pos[1].constructor == Number) {
+			pTop += pos[1];
+		} else {
+			switch (pos[1]) {
+				case 'top':
+					pTop += 0;
+					break;
+				case 'bottom':
+					pTop += wnd.height() - this.uiDialog.height();
+					break;
+				default:
+				case 'middle':
+					pTop += (wnd.height() - this.uiDialog.height()) / 2;
+			}
+		}
+		
+		// prevent the dialog from being too high (make sure the titlebar
+		// is accessible)
+		pTop = Math.max(pTop, minTop);
+		this.uiDialog.css({top: pTop, left: pLeft});
+	},
+
+	size: function() {
+		var container = this.uiDialogContainer,
+			titlebar = this.uiDialogTitlebar,
+			content = this.element,
+			tbMargin = parseInt(content.css('margin-top'),10) + parseInt(content.css('margin-bottom'),10),
+			lrMargin = parseInt(content.css('margin-left'),10) + parseInt(content.css('margin-right'),10);
+		content.height(container.height() - titlebar.outerHeight() - tbMargin);
+		content.width(container.width() - lrMargin);
+	},
+	
+	open: function() {
+		if (this.isOpen) { return; }
+		
+		this.overlay = this.options.modal ? new $.ui.dialog.overlay(this) : null;
+		(this.uiDialog.next().length > 0) && this.uiDialog.appendTo('body');
+		this.position(this.options.position);
+		this.uiDialog.show(this.options.show);
+		this.options.autoResize && this.size();
+		this.moveToTop(true);
+		
+		// CALLBACK: open
+		var openEV = null;
+		var openUI = {
+			options: this.options
+		};
+		this.uiDialogTitlebarClose.focus();
+		this.element.triggerHandler("dialogopen", [openEV, openUI], this.options.open);
+		
+		this.isOpen = true;
+	},
+	
+	// the force parameter allows us to move modal dialogs to their correct
+	// position on open
+	moveToTop: function(force) {
+		if ((this.options.modal && !force)
+			|| (!this.options.stack && !this.options.modal)) { return this.element.triggerHandler("dialogfocus", [null, { options: this.options }], this.options.focus); }
+		
+		var maxZ = this.options.zIndex, options = this.options;
+		$('.ui-dialog:visible').each(function() {
+			maxZ = Math.max(maxZ, parseInt($(this).css('z-index'), 10) || options.zIndex);
+		});
+		(this.overlay && this.overlay.$el.css('z-index', ++maxZ));
+		this.uiDialog.css('z-index', ++maxZ);
+		
+		this.element.triggerHandler("dialogfocus", [null, { options: this.options }], this.options.focus);
+	},
+	
+	close: function() {
+		(this.overlay && this.overlay.destroy());
+		this.uiDialog.hide(this.options.hide);
+
+		// CALLBACK: close
+		var closeEV = null;
+		var closeUI = {
+			options: this.options
+		};
+		this.element.triggerHandler("dialogclose", [closeEV, closeUI], this.options.close);
+		$.ui.dialog.overlay.resize();
+		
+		this.isOpen = false;
+	},
+	
+	destroy: function() {
+		(this.overlay && this.overlay.destroy());
+		this.uiDialog.hide();
+		this.element
+			.unbind('.dialog')
+			.removeData('dialog')
+			.removeClass('ui-dialog-content')
+			.hide().appendTo('body');
+		this.uiDialog.remove();
+	},
+	
+	createButtons: function(buttons) {
+		var self = this,
+			hasButtons = false,
+			uiDialogButtonPane = this.uiDialogButtonPane;
+		
+		// remove any existing buttons
+		uiDialogButtonPane.empty().hide();
+		
+		$.each(buttons, function() { return !(hasButtons = true); });
+		if (hasButtons) {
+			uiDialogButtonPane.show();
+			$.each(buttons, function(name, fn) {
+				$('<button/>')
+					.text(name)
+					.click(function() { fn.apply(self.element[0], arguments); })
+					.appendTo(uiDialogButtonPane);
+			});
+		}
+	}
+});
+
+$.extend($.ui.dialog, {
+	defaults: {
+		autoOpen: true,
+		autoResize: true,
+		bgiframe: false,
+		buttons: {},
+		closeOnEscape: true,
+		draggable: true,
+		height: 200,
+		minHeight: 100,
+		minWidth: 150,
+		modal: false,
+		overlay: {},
+		position: 'center',
+		resizable: true,
+		stack: true,
+		width: 300,
+		zIndex: 1000
+	},
+	
+	overlay: function(dialog) {
+		this.$el = $.ui.dialog.overlay.create(dialog);
+	}
+});
+
+$.extend($.ui.dialog.overlay, {
+	instances: [],
+	events: $.map('focus,mousedown,mouseup,keydown,keypress,click'.split(','),
+		function(e) { return e + '.dialog-overlay'; }).join(' '),
+	create: function(dialog) {
+		if (this.instances.length === 0) {
+			// prevent use of anchors and inputs
+			// we use a setTimeout in case the overlay is created from an
+			// event that we're going to be cancelling (see #2804)
+			setTimeout(function() {
+				$('a, :input').bind($.ui.dialog.overlay.events, function() {
+					// allow use of the element if inside a dialog and
+					// - there are no modal dialogs
+					// - there are modal dialogs, but we are in front of the topmost modal
+					var allow = false;
+					var $dialog = $(this).parents('.ui-dialog');
+					if ($dialog.length) {
+						var $overlays = $('.ui-dialog-overlay');
+						if ($overlays.length) {
+							var maxZ = parseInt($overlays.css('z-index'), 10);
+							$overlays.each(function() {
+								maxZ = Math.max(maxZ, parseInt($(this).css('z-index'), 10));
+							});
+							allow = parseInt($dialog.css('z-index'), 10) > maxZ;
+						} else {
+							allow = true;
+						}
+					}
+					return allow;
+				});
+			}, 1);
+			
+			// allow closing by pressing the escape key
+			$(document).bind('keydown.dialog-overlay', function(e) {
+				var ESC = 27;
+				(e.keyCode && e.keyCode == ESC && dialog.close()); 
+			});
+			
+			// handle window resize
+			$(window).bind('resize.dialog-overlay', $.ui.dialog.overlay.resize);
+		}
+		
+		var $el = $('<div/>').appendTo(document.body)
+			.addClass('ui-dialog-overlay').css($.extend({
+				borderWidth: 0, margin: 0, padding: 0,
+				position: 'absolute', top: 0, left: 0,
+				width: this.width(),
+				height: this.height()
+			}, dialog.options.overlay));
+		
+		(dialog.options.bgiframe && $.fn.bgiframe && $el.bgiframe());
+		
+		this.instances.push($el);
+		return $el;
+	},
+	
+	destroy: function($el) {
+		this.instances.splice($.inArray(this.instances, $el), 1);
+		
+		if (this.instances.length === 0) {
+			$('a, :input').add([document, window]).unbind('.dialog-overlay');
+		}
+		
+		$el.remove();
+	},
+	
+	height: function() {
+		if ($.browser.msie && $.browser.version < 7) {
+			var scrollHeight = Math.max(
+				document.documentElement.scrollHeight,
+				document.body.scrollHeight
+			);
+			var offsetHeight = Math.max(
+				document.documentElement.offsetHeight,
+				document.body.offsetHeight
+			);
+			
+			if (scrollHeight < offsetHeight) {
+				return $(window).height() + 'px';
+			} else {
+				return scrollHeight + 'px';
+			}
+		} else {
+			return $(document).height() + 'px';
+		}
+	},
+	
+	width: function() {
+		if ($.browser.msie && $.browser.version < 7) {
+			var scrollWidth = Math.max(
+				document.documentElement.scrollWidth,
+				document.body.scrollWidth
+			);
+			var offsetWidth = Math.max(
+				document.documentElement.offsetWidth,
+				document.body.offsetWidth
+			);
+			
+			if (scrollWidth < offsetWidth) {
+				return $(window).width() + 'px';
+			} else {
+				return scrollWidth + 'px';
+			}
+		} else {
+			return $(document).width() + 'px';
+		}
+	},
+	
+	resize: function() {
+		/* If the dialog is draggable and the user drags it past the
+		 * right edge of the window, the document becomes wider so we
+		 * need to stretch the overlay. If the user then drags the
+		 * dialog back to the left, the document will become narrower,
+		 * so we need to shrink the overlay to the appropriate size.
+		 * This is handled by shrinking the overlay before setting it
+		 * to the full document size.
+		 */
+		var $overlays = $([]);
+		$.each($.ui.dialog.overlay.instances, function() {
+			$overlays = $overlays.add(this);
+		});
+		
+		$overlays.css({
+			width: 0,
+			height: 0
+		}).css({
+			width: $.ui.dialog.overlay.width(),
+			height: $.ui.dialog.overlay.height()
+		});
+	}
+});
+
+$.extend($.ui.dialog.overlay.prototype, {
+	destroy: function() {
+		$.ui.dialog.overlay.destroy(this.$el);
+	}
+});
+
+})(jQuery);
+/*
+ * jQuery UI Slider
+ *
+ * Copyright (c) 2008 Paul Bakaus
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ * 
+ * http://docs.jquery.com/UI/Slider
+ *
+ * Depends:
+ *	ui.core.js
+ */
+(function($) {
+
+$.fn.unwrap = $.fn.unwrap || function(expr) {
+  return this.each(function(){
+     $(this).parents(expr).eq(0).after(this).remove();
+  });
+};
+
+$.widget("ui.slider", {
+	plugins: {},
+	ui: function(e) {
+		return {
+			options: this.options,
+			handle: this.currentHandle,
+			value: this.options.axis != "both" || !this.options.axis ? Math.round(this.value(null,this.options.axis == "vertical" ? "y" : "x")) : {
+				x: Math.round(this.value(null,"x")),
+				y: Math.round(this.value(null,"y"))
+			},
+			range: this.getRange()
+		};
+	},
+	propagate: function(n,e) {
+		$.ui.plugin.call(this, n, [e, this.ui()]);
+		this.element.triggerHandler(n == "slide" ? n : "slide"+n, [e, this.ui()], this.options[n]);
+	},
+	destroy: function() {
+		
+		this.element
+			.removeClass("ui-slider ui-slider-disabled")
+			.removeData("slider")
+			.unbind(".slider");
+		
+		if(this.handle && this.handle.length) {
+			this.handle
+				.unwrap("a");
+			this.handle.each(function() {
+				$(this).data("mouse").mouseDestroy();
+			});
+		}
+		
+		this.generated && this.generated.remove();
+		
+	},
+	setData: function(key, value) {
+		$.widget.prototype.setData.apply(this, arguments);
+		if (/min|max|steps/.test(key)) {
+			this.initBoundaries();
+		}
+		
+		if(key == "range") {
+			value ? this.handle.length == 2 && this.createRange() : this.removeRange();
+		}
+		
+	},
+
+	init: function() {
+		
+		var self = this;
+		this.element.addClass("ui-slider");
+		this.initBoundaries();
+		
+		// Initialize mouse and key events for interaction
+		this.handle = $(this.options.handle, this.element);
+		if (!this.handle.length) {
+			self.handle = self.generated = $(self.options.handles || [0]).map(function() {
+				var handle = $("<div/>").addClass("ui-slider-handle").appendTo(self.element);
+				if (this.id)
+					handle.attr("id", this.id);
+				return handle[0];
+			});
+		}
+		
+		
+		var handleclass = function(el) {
+			this.element = $(el);
+			this.element.data("mouse", this);
+			this.options = self.options;
+			
+			this.element.bind("mousedown", function() {
+				if(self.currentHandle) this.blur(self.currentHandle);
+				self.focus(this,1);
+			});
+			
+			this.mouseInit();
+		};
+		
+		$.extend(handleclass.prototype, $.ui.mouse, {
+			mouseStart: function(e) { return self.start.call(self, e, this.element[0]); },
+			mouseStop: function(e) { return self.stop.call(self, e, this.element[0]); },
+			mouseDrag: function(e) { return self.drag.call(self, e, this.element[0]); },
+			mouseCapture: function() { return true; },
+			trigger: function(e) { this.mouseDown(e); }
+		});
+		
+		
+		$(this.handle)
+			.each(function() {
+				new handleclass(this);
+			})
+			.wrap('<a href="javascript:void(0)" style="outline:none;border:none;"></a>')
+			.parent()
+				.bind('focus', function(e) { self.focus(this.firstChild); })
+				.bind('blur', function(e) { self.blur(this.firstChild); })
+				.bind('keydown', function(e) { if(!self.options.noKeyboard) self.keydown(e.keyCode, this.firstChild); })
+		;
+		
+		// Bind the click to the slider itself
+		this.element.bind('mousedown.slider', function(e) {
+			self.click.apply(self, [e]);
+			self.currentHandle.data("mouse").trigger(e);
+			self.firstValue = self.firstValue + 1; //This is for always triggering the change event
+		});
+		
+		// Move the first handle to the startValue
+		$.each(this.options.handles || [], function(index, handle) {
+			self.moveTo(handle.start, index, true);
+		});
+		if (!isNaN(this.options.startValue))
+			this.moveTo(this.options.startValue, 0, true);
+
+		this.previousHandle = $(this.handle[0]); //set the previous handle to the first to allow clicking before selecting the handle
+		if(this.handle.length == 2 && this.options.range) this.createRange();
+	},
+	initBoundaries: function() {
+		
+		var element = this.element[0], o = this.options;
+		this.actualSize = { width: this.element.outerWidth() , height: this.element.outerHeight() };			
+		
+		$.extend(o, {
+			axis: o.axis || (element.offsetWidth < element.offsetHeight ? 'vertical' : 'horizontal'),
+			max: !isNaN(parseInt(o.max,10)) ? { x: parseInt(o.max, 10), y: parseInt(o.max, 10) } : ({ x: o.max && o.max.x || 100, y: o.max && o.max.y || 100 }),
+			min: !isNaN(parseInt(o.min,10)) ? { x: parseInt(o.min, 10), y: parseInt(o.min, 10) } : ({ x: o.min && o.min.x || 0, y: o.min && o.min.y || 0 })
+		});
+		//Prepare the real maxValue
+		o.realMax = {
+			x: o.max.x - o.min.x,
+			y: o.max.y - o.min.y
+		};
+		//Calculate stepping based on steps
+		o.stepping = {
+			x: o.stepping && o.stepping.x || parseInt(o.stepping, 10) || (o.steps ? o.realMax.x/(o.steps.x || parseInt(o.steps, 10) || o.realMax.x) : 0),
+			y: o.stepping && o.stepping.y || parseInt(o.stepping, 10) || (o.steps ? o.realMax.y/(o.steps.y || parseInt(o.steps, 10) || o.realMax.y) : 0)
+		};
+	},
+
+	
+	keydown: function(keyCode, handle) {
+		if(/(37|38|39|40)/.test(keyCode)) {
+			this.moveTo({
+				x: /(37|39)/.test(keyCode) ? (keyCode == 37 ? '-' : '+') + '=' + this.oneStep("x") : 0,
+				y: /(38|40)/.test(keyCode) ? (keyCode == 38 ? '-' : '+') + '=' + this.oneStep("y") : 0
+			}, handle);
+		}
+	},
+	focus: function(handle,hard) {
+		this.currentHandle = $(handle).addClass('ui-slider-handle-active');
+		if (hard)
+			this.currentHandle.parent()[0].focus();
+	},
+	blur: function(handle) {
+		$(handle).removeClass('ui-slider-handle-active');
+		if(this.currentHandle && this.currentHandle[0] == handle) { this.previousHandle = this.currentHandle; this.currentHandle = null; };
+	},
+	click: function(e) {
+		// This method is only used if:
+		// - The user didn't click a handle
+		// - The Slider is not disabled
+		// - There is a current, or previous selected handle (otherwise we wouldn't know which one to move)
+		
+		var pointer = [e.pageX,e.pageY];
+		
+		var clickedHandle = false;
+		this.handle.each(function() {
+			if(this == e.target)
+				clickedHandle = true;
+		});
+		if (clickedHandle || this.options.disabled || !(this.currentHandle || this.previousHandle))
+			return;
+
+		// If a previous handle was focussed, focus it again
+		if (!this.currentHandle && this.previousHandle)
+			this.focus(this.previousHandle, true);
+		
+		// propagate only for distance > 0, otherwise propagation is done my drag
+		this.offset = this.element.offset();
+
+		this.moveTo({
+			y: this.convertValue(e.pageY - this.offset.top - this.currentHandle[0].offsetHeight/2, "y"),
+			x: this.convertValue(e.pageX - this.offset.left - this.currentHandle[0].offsetWidth/2, "x")
+		}, null, !this.options.distance);
+	},
+	
+
+
+	createRange: function() {
+		if(this.rangeElement) return;
+		this.rangeElement = $('<div></div>')
+			.addClass('ui-slider-range')
+			.css({ position: 'absolute' })
+			.appendTo(this.element);
+		this.updateRange();
+	},
+	removeRange: function() {
+		this.rangeElement.remove();
+		this.rangeElement = null;
+	},
+	updateRange: function() {
+			var prop = this.options.axis == "vertical" ? "top" : "left";
+			var size = this.options.axis == "vertical" ? "height" : "width";
+			this.rangeElement.css(prop, (parseInt($(this.handle[0]).css(prop),10) || 0) + this.handleSize(0, this.options.axis == "vertical" ? "y" : "x")/2);
+			this.rangeElement.css(size, (parseInt($(this.handle[1]).css(prop),10) || 0) - (parseInt($(this.handle[0]).css(prop),10) || 0));
+	},
+	getRange: function() {
+		return this.rangeElement ? this.convertValue(parseInt(this.rangeElement.css(this.options.axis == "vertical" ? "height" : "width"),10), this.options.axis == "vertical" ? "y" : "x") : null;
+	},
+
+	handleIndex: function() {
+		return this.handle.index(this.currentHandle[0]);
+	},
+	value: function(handle, axis) {
+		if(this.handle.length == 1) this.currentHandle = this.handle;
+		if(!axis) axis = this.options.axis == "vertical" ? "y" : "x";
+
+		var curHandle = $(handle != undefined && handle !== null ? this.handle[handle] || handle : this.currentHandle);
+		
+		if(curHandle.data("mouse").sliderValue) {
+			return parseInt(curHandle.data("mouse").sliderValue[axis],10);
+		} else {
+			return parseInt(((parseInt(curHandle.css(axis == "x" ? "left" : "top"),10) / (this.actualSize[axis == "x" ? "width" : "height"] - this.handleSize(handle,axis))) * this.options.realMax[axis]) + this.options.min[axis],10);
+		}
+
+	},
+	convertValue: function(value,axis) {
+		return this.options.min[axis] + (value / (this.actualSize[axis == "x" ? "width" : "height"] - this.handleSize(null,axis))) * this.options.realMax[axis];
+	},
+	
+	translateValue: function(value,axis) {
+		return ((value - this.options.min[axis]) / this.options.realMax[axis]) * (this.actualSize[axis == "x" ? "width" : "height"] - this.handleSize(null,axis));
+	},
+	translateRange: function(value,axis) {
+		if (this.rangeElement) {
+			if (this.currentHandle[0] == this.handle[0] && value >= this.translateValue(this.value(1),axis))
+				value = this.translateValue(this.value(1,axis) - this.oneStep(axis), axis);
+			if (this.currentHandle[0] == this.handle[1] && value <= this.translateValue(this.value(0),axis))
+				value = this.translateValue(this.value(0,axis) + this.oneStep(axis), axis);
+		}
+		if (this.options.handles) {
+			var handle = this.options.handles[this.handleIndex()];
+			if (value < this.translateValue(handle.min,axis)) {
+				value = this.translateValue(handle.min,axis);
+			} else if (value > this.translateValue(handle.max,axis)) {
+				value = this.translateValue(handle.max,axis);
+			}
+		}
+		return value;
+	},
+	translateLimits: function(value,axis) {
+		if (value >= this.actualSize[axis == "x" ? "width" : "height"] - this.handleSize(null,axis))
+			value = this.actualSize[axis == "x" ? "width" : "height"] - this.handleSize(null,axis);
+		if (value <= 0)
+			value = 0;
+		return value;
+	},
+	handleSize: function(handle,axis) {
+		return $(handle != undefined && handle !== null ? this.handle[handle] : this.currentHandle)[0]["offset"+(axis == "x" ? "Width" : "Height")];	
+	},
+	oneStep: function(axis) {
+		return this.options.stepping[axis] || 1;
+	},
+
+
+	start: function(e, handle) {
+	
+		var o = this.options;
+		if(o.disabled) return false;
+
+		// Prepare the outer size
+		this.actualSize = { width: this.element.outerWidth() , height: this.element.outerHeight() };
+	
+		// This is a especially ugly fix for strange blur events happening on mousemove events
+		if (!this.currentHandle)
+			this.focus(this.previousHandle, true); 
+
+		this.offset = this.element.offset();
+		
+		this.handleOffset = this.currentHandle.offset();
+		this.clickOffset = { top: e.pageY - this.handleOffset.top, left: e.pageX - this.handleOffset.left };
+		
+		this.firstValue = this.value();
+		
+		this.propagate('start', e);
+		this.drag(e, handle);
+		return true;
+					
+	},
+	stop: function(e) {
+		this.propagate('stop', e);
+		if (this.firstValue != this.value())
+			this.propagate('change', e);
+		// This is a especially ugly fix for strange blur events happening on mousemove events
+		this.focus(this.currentHandle, true);
+		return false;
+	},
+	drag: function(e, handle) {
+
+		var o = this.options;
+		var position = { top: e.pageY - this.offset.top - this.clickOffset.top, left: e.pageX - this.offset.left - this.clickOffset.left};
+		if(!this.currentHandle) this.focus(this.previousHandle, true); //This is a especially ugly fix for strange blur events happening on mousemove events
+
+		position.left = this.translateLimits(position.left, "x");
+		position.top = this.translateLimits(position.top, "y");
+		
+		if (o.stepping.x) {
+			var value = this.convertValue(position.left, "x");
+			value = Math.round(value / o.stepping.x) * o.stepping.x;
+			position.left = this.translateValue(value, "x");	
+		}
+		if (o.stepping.y) {
+			var value = this.convertValue(position.top, "y");
+			value = Math.round(value / o.stepping.y) * o.stepping.y;
+			position.top = this.translateValue(value, "y");	
+		}
+		
+		position.left = this.translateRange(position.left, "x");
+		position.top = this.translateRange(position.top, "y");
+
+		if(o.axis != "vertical") this.currentHandle.css({ left: position.left });
+		if(o.axis != "horizontal") this.currentHandle.css({ top: position.top });
+		
+		//Store the slider's value
+		this.currentHandle.data("mouse").sliderValue = {
+			x: Math.round(this.convertValue(position.left, "x")) || 0,
+			y: Math.round(this.convertValue(position.top, "y")) || 0
+		};
+		
+		if (this.rangeElement)
+			this.updateRange();
+		this.propagate('slide', e);
+		return false;
+	},
+	
+	moveTo: function(value, handle, noPropagation) {
+
+		var o = this.options;
+
+		// Prepare the outer size
+		this.actualSize = { width: this.element.outerWidth() , height: this.element.outerHeight() };
+
+		//If no handle has been passed, no current handle is available and we have multiple handles, return false
+		if (handle == undefined && !this.currentHandle && this.handle.length != 1)
+			return false; 
+		
+		//If only one handle is available, use it
+		if (handle == undefined && !this.currentHandle)
+			handle = 0;
+		
+		if (handle != undefined)
+			this.currentHandle = this.previousHandle = $(this.handle[handle] || handle);
+
+
+		if(value.x !== undefined && value.y !== undefined) {
+			var x = value.x, y = value.y;
+		} else {
+			var x = value, y = value;
+		}
+
+		if(x !== undefined && x.constructor != Number) {
+			var me = /^\-\=/.test(x), pe = /^\+\=/.test(x);
+			if(me || pe) {
+				x = this.value(null, "x") + parseInt(x.replace(me ? '=' : '+=', ''), 10);
+			} else {
+				x = isNaN(parseInt(x, 10)) ? undefined : parseInt(x, 10);
+			}
+		}
+		
+		if(y !== undefined && y.constructor != Number) {
+			var me = /^\-\=/.test(y), pe = /^\+\=/.test(y);
+			if(me || pe) {
+				y = this.value(null, "y") + parseInt(y.replace(me ? '=' : '+=', ''), 10);
+			} else {
+				y = isNaN(parseInt(y, 10)) ? undefined : parseInt(y, 10);
+			}
+		}
+
+		if(o.axis != "vertical" && x !== undefined) {
+			if(o.stepping.x) x = Math.round(x / o.stepping.x) * o.stepping.x;
+			x = this.translateValue(x, "x");
+			x = this.translateLimits(x, "x");
+			x = this.translateRange(x, "x");
+
+			o.animate ? this.currentHandle.stop().animate({ left: x }, (Math.abs(parseInt(this.currentHandle.css("left")) - x)) * (!isNaN(parseInt(o.animate)) ? o.animate : 5)) : this.currentHandle.css({ left: x });
+		}
+
+		if(o.axis != "horizontal" && y !== undefined) {
+			if(o.stepping.y) y = Math.round(y / o.stepping.y) * o.stepping.y;
+			y = this.translateValue(y, "y");
+			y = this.translateLimits(y, "y");
+			y = this.translateRange(y, "y");
+			o.animate ? this.currentHandle.stop().animate({ top: y }, (Math.abs(parseInt(this.currentHandle.css("top")) - y)) * (!isNaN(parseInt(o.animate)) ? o.animate : 5)) : this.currentHandle.css({ top: y });
+		}
+		
+		if (this.rangeElement)
+			this.updateRange();
+			
+		//Store the slider's value
+		this.currentHandle.data("mouse").sliderValue = {
+			x: Math.round(this.convertValue(x, "x")) || 0,
+			y: Math.round(this.convertValue(y, "y")) || 0
+		};
+	
+		if (!noPropagation) {
+			this.propagate('start', null);
+			this.propagate('stop', null);
+			this.propagate('change', null);
+			this.propagate("slide", null);
+		}
+	}
+});
+
+$.ui.slider.getter = "value";
+
+$.ui.slider.defaults = {
+	handle: ".ui-slider-handle",
+	distance: 1,
+	animate: false
+};
+
+})(jQuery);
+/*
+ * jQuery UI Tabs
+ *
+ * Copyright (c) 2007, 2008 Klaus Hartl (stilbuero.de)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Tabs
+ *
+ * Depends:
+ *	ui.core.js
+ */
+(function($) {
+
+$.widget("ui.tabs", {
+	init: function() {
+		this.options.event += '.tabs'; // namespace event
+		
+		// create tabs
+		this.tabify(true);
+	},
+	setData: function(key, value) {
+		if ((/^selected/).test(key))
+			this.select(value);
+		else {
+			this.options[key] = value;
+			this.tabify();
+		}
+	},
+	length: function() {
+		return this.$tabs.length;
+	},
+	tabId: function(a) {
+		return a.title && a.title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '')
+			|| this.options.idPrefix + $.data(a);
+	},
+	ui: function(tab, panel) {
+		return {
+			options: this.options,
+			tab: tab,
+			panel: panel,
+			index: this.$tabs.index(tab)
+		};
+	},
+	tabify: function(init) {
+
+		this.$lis = $('li:has(a[href])', this.element);
+		this.$tabs = this.$lis.map(function() { return $('a', this)[0]; });
+		this.$panels = $([]);
+
+		var self = this, o = this.options;
+
+		this.$tabs.each(function(i, a) {
+			// inline tab
+			if (a.hash && a.hash.replace('#', '')) // Safari 2 reports '#' for an empty hash
+				self.$panels = self.$panels.add(a.hash);
+			// remote tab
+			else if ($(a).attr('href') != '#') { // prevent loading the page itself if href is just "#"
+				$.data(a, 'href.tabs', a.href); // required for restore on destroy
+				$.data(a, 'load.tabs', a.href); // mutable
+				var id = self.tabId(a);
+				a.href = '#' + id;
+				var $panel = $('#' + id);
+				if (!$panel.length) {
+					$panel = $(o.panelTemplate).attr('id', id).addClass(o.panelClass)
+						.insertAfter( self.$panels[i - 1] || self.element );
+					$panel.data('destroy.tabs', true);
+				}
+				self.$panels = self.$panels.add( $panel );
+			}
+			// invalid tab href
+			else
+				o.disabled.push(i + 1);
+		});
+
+		if (init) {
+
+			// attach necessary classes for styling if not present
+			this.element.addClass(o.navClass);
+			this.$panels.each(function() {
+				var $this = $(this);
+				$this.addClass(o.panelClass);
+			});
+
+			// Selected tab
+			// use "selected" option or try to retrieve:
+			// 1. from fragment identifier in url
+			// 2. from cookie
+			// 3. from selected class attribute on <li>
+			if (o.selected === undefined) {
+				if (location.hash) {
+					this.$tabs.each(function(i, a) {
+						if (a.hash == location.hash) {
+							o.selected = i;
+							// prevent page scroll to fragment
+							if ($.browser.msie || $.browser.opera) { // && !o.remote
+								var $toShow = $(location.hash), toShowId = $toShow.attr('id');
+								$toShow.attr('id', '');
+								setTimeout(function() {
+									$toShow.attr('id', toShowId); // restore id
+								}, 500);
+							}
+							scrollTo(0, 0);
+							return false; // break
+						}
+					});
+				}
+				else if (o.cookie) {
+					var index = parseInt($.cookie('ui-tabs' + $.data(self.element)),10);
+					if (index && self.$tabs[index])
+						o.selected = index;
+				}
+				else if (self.$lis.filter('.' + o.selectedClass).length)
+					o.selected = self.$lis.index( self.$lis.filter('.' + o.selectedClass)[0] );
+			}
+			o.selected = o.selected === null || o.selected !== undefined ? o.selected : 0; // first tab selected by default
+
+			// Take disabling tabs via class attribute from HTML
+			// into account and update option properly.
+			// A selected tab cannot become disabled.
+			o.disabled = $.unique(o.disabled.concat(
+				$.map(this.$lis.filter('.' + o.disabledClass),
+					function(n, i) { return self.$lis.index(n); } )
+			)).sort();
+			if ($.inArray(o.selected, o.disabled) != -1)
+				o.disabled.splice($.inArray(o.selected, o.disabled), 1);
+			
+			// highlight selected tab
+			this.$panels.addClass(o.hideClass);
+			this.$lis.removeClass(o.selectedClass);
+			if (o.selected !== null) {
+				this.$panels.eq(o.selected).show().removeClass(o.hideClass); // use show and remove class to show in any case no matter how it has been hidden before
+				this.$lis.eq(o.selected).addClass(o.selectedClass);
+				
+				// seems to be expected behavior that the show callback is fired
+				var onShow = function() {
+					$(self.element).triggerHandler('tabsshow',
+						[self.fakeEvent('tabsshow'), self.ui(self.$tabs[o.selected], self.$panels[o.selected])], o.show);
+				}; 
+
+				// load if remote tab
+				if ($.data(this.$tabs[o.selected], 'load.tabs'))
+					this.load(o.selected, onShow);
+				// just trigger show event
+				else
+					onShow();
+				
+			}
+			
+			// clean up to avoid memory leaks in certain versions of IE 6
+			$(window).bind('unload', function() {
+				self.$tabs.unbind('.tabs');
+				self.$lis = self.$tabs = self.$panels = null;
+			});
+
+		}
+
+		// disable tabs
+		for (var i = 0, li; li = this.$lis[i]; i++)
+			$(li)[$.inArray(i, o.disabled) != -1 && !$(li).hasClass(o.selectedClass) ? 'addClass' : 'removeClass'](o.disabledClass);
+
+		// reset cache if switching from cached to not cached
+		if (o.cache === false)
+			this.$tabs.removeData('cache.tabs');
+		
+		// set up animations
+		var hideFx, showFx, baseFx = { 'min-width': 0, duration: 1 }, baseDuration = 'normal';
+		if (o.fx && o.fx.constructor == Array)
+			hideFx = o.fx[0] || baseFx, showFx = o.fx[1] || baseFx;
+		else
+			hideFx = showFx = o.fx || baseFx;
+
+		// reset some styles to maintain print style sheets etc.
+		var resetCSS = { display: '', overflow: '', height: '' };
+		if (!$.browser.msie) // not in IE to prevent ClearType font issue
+			resetCSS.opacity = '';
+
+		// Hide a tab, animation prevents browser scrolling to fragment,
+		// $show is optional.
+		function hideTab(clicked, $hide, $show) {
+			$hide.animate(hideFx, hideFx.duration || baseDuration, function() { //
+				$hide.addClass(o.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
+				if ($.browser.msie && hideFx.opacity)
+					$hide[0].style.filter = '';
+				if ($show)
+					showTab(clicked, $show, $hide);
+			});
+		}
+
+		// Show a tab, animation prevents browser scrolling to fragment,
+		// $hide is optional.
+		function showTab(clicked, $show, $hide) {
+			if (showFx === baseFx)
+				$show.css('display', 'block'); // prevent occasionally occuring flicker in Firefox cause by gap between showing and hiding the tab panels
+			$show.animate(showFx, showFx.duration || baseDuration, function() {
+				$show.removeClass(o.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
+				if ($.browser.msie && showFx.opacity)
+					$show[0].style.filter = '';
+
+				// callback
+				$(self.element).triggerHandler('tabsshow',
+					[self.fakeEvent('tabsshow'), self.ui(clicked, $show[0])], o.show);
+
+			});
+		}
+
+		// switch a tab
+		function switchTab(clicked, $li, $hide, $show) {
+			/*if (o.bookmarkable && trueClick) { // add to history only if true click occured, not a triggered click
+				$.ajaxHistory.update(clicked.hash);
+			}*/
+			$li.addClass(o.selectedClass)
+				.siblings().removeClass(o.selectedClass);
+			hideTab(clicked, $hide, $show);
+		}
+
+		// attach tab event handler, unbind to avoid duplicates from former tabifying...
+		this.$tabs.unbind('.tabs').bind(o.event, function() {
+
+			//var trueClick = e.clientX; // add to history only if true click occured, not a triggered click
+			var $li = $(this).parents('li:eq(0)'),
+				$hide = self.$panels.filter(':visible'),
+				$show = $(this.hash);
+
+			// If tab is already selected and not unselectable or tab disabled or 
+			// or is already loading or click callback returns false stop here.
+			// Check if click handler returns false last so that it is not executed
+			// for a disabled or loading tab!
+			if (($li.hasClass(o.selectedClass) && !o.unselect)
+				|| $li.hasClass(o.disabledClass) 
+				|| $(this).hasClass(o.loadingClass)
+				|| $(self.element).triggerHandler('tabsselect', [self.fakeEvent('tabsselect'), self.ui(this, $show[0])], o.select) === false
+				) {
+				this.blur();
+				return false;
+			}
+
+			self.options.selected = self.$tabs.index(this);
+
+			// if tab may be closed
+			if (o.unselect) {
+				if ($li.hasClass(o.selectedClass)) {
+					self.options.selected = null;
+					$li.removeClass(o.selectedClass);
+					self.$panels.stop();
+					hideTab(this, $hide);
+					this.blur();
+					return false;
+				} else if (!$hide.length) {
+					self.$panels.stop();
+					var a = this;
+					self.load(self.$tabs.index(this), function() {
+						$li.addClass(o.selectedClass).addClass(o.unselectClass);
+						showTab(a, $show);
+					});
+					this.blur();
+					return false;
+				}
+			}
+
+			if (o.cookie)
+				$.cookie('ui-tabs' + $.data(self.element), self.options.selected, o.cookie);
+
+			// stop possibly running animations
+			self.$panels.stop();
+
+			// show new tab
+			if ($show.length) {
+
+				// prevent scrollbar scrolling to 0 and than back in IE7, happens only if bookmarking/history is enabled
+				/*if ($.browser.msie && o.bookmarkable) {
+					var showId = this.hash.replace('#', '');
+					$show.attr('id', '');
+					setTimeout(function() {
+						$show.attr('id', showId); // restore id
+					}, 0);
+				}*/
+
+				var a = this;
+				self.load(self.$tabs.index(this), $hide.length ? 
+					function() {
+						switchTab(a, $li, $hide, $show);
+					} :
+					function() {
+						$li.addClass(o.selectedClass);
+						showTab(a, $show);
+					}
+				);
+
+				// Set scrollbar to saved position - need to use timeout with 0 to prevent browser scroll to target of hash
+				/*var scrollX = window.pageXOffset || document.documentElement && document.documentElement.scrollLeft || document.body.scrollLeft || 0;
+				var scrollY = window.pageYOffset || document.documentElement && document.documentElement.scrollTop || document.body.scrollTop || 0;
+				setTimeout(function() {
+					scrollTo(scrollX, scrollY);
+				}, 0);*/
+
+			} else
+				throw 'jQuery UI Tabs: Mismatching fragment identifier.';
+
+			// Prevent IE from keeping other link focussed when using the back button
+			// and remove dotted border from clicked link. This is controlled in modern
+			// browsers via CSS, also blur removes focus from address bar in Firefox
+			// which can become a usability and annoying problem with tabsRotate.
+			if ($.browser.msie)
+				this.blur();
+
+			//return o.bookmarkable && !!trueClick; // convert trueClick == undefined to Boolean required in IE
+			return false;
+
+		});
+
+		// disable click if event is configured to something else
+		if (!(/^click/).test(o.event))
+			this.$tabs.bind('click.tabs', function() { return false; });
+
+	},
+	add: function(url, label, index) {
+		if (index == undefined) 
+			index = this.$tabs.length; // append by default
+
+		var o = this.options;
+		var $li = $(o.tabTemplate.replace(/#\{href\}/g, url).replace(/#\{label\}/g, label));
+		$li.data('destroy.tabs', true);
+
+		var id = url.indexOf('#') == 0 ? url.replace('#', '') : this.tabId( $('a:first-child', $li)[0] );
+
+		// try to find an existing element before creating a new one
+		var $panel = $('#' + id);
+		if (!$panel.length) {
+			$panel = $(o.panelTemplate).attr('id', id)
+				.addClass(o.hideClass)
+				.data('destroy.tabs', true);
+		}
+		$panel.addClass(o.panelClass);
+		if (index >= this.$lis.length) {
+			$li.appendTo(this.element);
+			$panel.appendTo(this.element[0].parentNode);
+		} else {
+			$li.insertBefore(this.$lis[index]);
+			$panel.insertBefore(this.$panels[index]);
+		}
+		
+		o.disabled = $.map(o.disabled,
+			function(n, i) { return n >= index ? ++n : n });
+			
+		this.tabify();
+
+		if (this.$tabs.length == 1) {
+			$li.addClass(o.selectedClass);
+			$panel.removeClass(o.hideClass);
+			var href = $.data(this.$tabs[0], 'load.tabs');
+			if (href)
+				this.load(index, href);
+		}
+
+		// callback
+		this.element.triggerHandler('tabsadd',
+			[this.fakeEvent('tabsadd'), this.ui(this.$tabs[index], this.$panels[index])], o.add
+		);
+	},
+	remove: function(index) {
+		var o = this.options, $li = this.$lis.eq(index).remove(),
+			$panel = this.$panels.eq(index).remove();
+
+		// If selected tab was removed focus tab to the right or
+		// in case the last tab was removed the tab to the left.
+		if ($li.hasClass(o.selectedClass) && this.$tabs.length > 1)
+			this.select(index + (index + 1 < this.$tabs.length ? 1 : -1));
+
+		o.disabled = $.map($.grep(o.disabled, function(n, i) { return n != index; }),
+			function(n, i) { return n >= index ? --n : n });
+
+		this.tabify();
+
+		// callback
+		this.element.triggerHandler('tabsremove',
+			[this.fakeEvent('tabsremove'), this.ui($li.find('a')[0], $panel[0])], o.remove
+		);
+	},
+	enable: function(index) {
+		var o = this.options;
+		if ($.inArray(index, o.disabled) == -1)
+			return;
+			
+		var $li = this.$lis.eq(index).removeClass(o.disabledClass);
+		if ($.browser.safari) { // fix disappearing tab (that used opacity indicating disabling) after enabling in Safari 2...
+			$li.css('display', 'inline-block');
+			setTimeout(function() {
+				$li.css('display', 'block');
+			}, 0);
+		}
+
+		o.disabled = $.grep(o.disabled, function(n, i) { return n != index; });
+
+		// callback
+		this.element.triggerHandler('tabsenable',
+			[this.fakeEvent('tabsenable'), this.ui(this.$tabs[index], this.$panels[index])], o.enable
+		);
+
+	},
+	disable: function(index) {
+		var self = this, o = this.options;
+		if (index != o.selected) { // cannot disable already selected tab
+			this.$lis.eq(index).addClass(o.disabledClass);
+
+			o.disabled.push(index);
+			o.disabled.sort();
+
+			// callback
+			this.element.triggerHandler('tabsdisable',
+				[this.fakeEvent('tabsdisable'), this.ui(this.$tabs[index], this.$panels[index])], o.disable
+			);
+		}
+	},
+	select: function(index) {
+		if (typeof index == 'string')
+			index = this.$tabs.index( this.$tabs.filter('[href$=' + index + ']')[0] );
+		this.$tabs.eq(index).trigger(this.options.event);
+	},
+	load: function(index, callback) { // callback is for internal usage only
+		
+		var self = this, o = this.options, $a = this.$tabs.eq(index), a = $a[0],
+				bypassCache = callback == undefined || callback === false, url = $a.data('load.tabs');
+
+		callback = callback || function() {};
+		
+		// no remote or from cache - just finish with callback
+		if (!url || !bypassCache && $.data(a, 'cache.tabs')) {
+			callback();
+			return;
+		}
+
+		// load remote from here on
+		
+		var inner = function(parent) {
+			var $parent = $(parent), $inner = $parent.find('*:last');
+			return $inner.length && $inner.is(':not(img)') && $inner || $parent;
+		};
+		var cleanup = function() {
+			self.$tabs.filter('.' + o.loadingClass).removeClass(o.loadingClass)
+						.each(function() {
+							if (o.spinner)
+								inner(this).parent().html(inner(this).data('label.tabs'));
+						});
+			self.xhr = null;
+		};
+		
+		if (o.spinner) {
+			var label = inner(a).html();
+			inner(a).wrapInner('<em></em>')
+				.find('em').data('label.tabs', label).html(o.spinner);
+		}
+
+		var ajaxOptions = $.extend({}, o.ajaxOptions, {
+			url: url,
+			success: function(r, s) {
+				$(a.hash).html(r);
+				cleanup();
+				
+				if (o.cache)
+					$.data(a, 'cache.tabs', true); // if loaded once do not load them again
+
+				// callbacks
+				$(self.element).triggerHandler('tabsload',
+					[self.fakeEvent('tabsload'), self.ui(self.$tabs[index], self.$panels[index])], o.load
+				);
+				o.ajaxOptions.success && o.ajaxOptions.success(r, s);
+				
+				// This callback is required because the switch has to take
+				// place after loading has completed. Call last in order to 
+				// fire load before show callback...
+				callback();
+			}
+		});
+		if (this.xhr) {
+			// terminate pending requests from other tabs and restore tab label
+			this.xhr.abort();
+			cleanup();
+		}
+		$a.addClass(o.loadingClass);
+		setTimeout(function() { // timeout is again required in IE, "wait" for id being restored
+			self.xhr = $.ajax(ajaxOptions);
+		}, 0);
+
+	},
+	url: function(index, url) {
+		this.$tabs.eq(index).removeData('cache.tabs').data('load.tabs', url);
+	},
+	destroy: function() {
+		var o = this.options;
+		this.element.unbind('.tabs')
+			.removeClass(o.navClass).removeData('tabs');
+		this.$tabs.each(function() {
+			var href = $.data(this, 'href.tabs');
+			if (href)
+				this.href = href;
+			var $this = $(this).unbind('.tabs');
+			$.each(['href', 'load', 'cache'], function(i, prefix) {
+				$this.removeData(prefix + '.tabs');
+			});
+		});
+		this.$lis.add(this.$panels).each(function() {
+			if ($.data(this, 'destroy.tabs'))
+				$(this).remove();
+			else
+				$(this).removeClass([o.selectedClass, o.unselectClass,
+					o.disabledClass, o.panelClass, o.hideClass].join(' '));
+		});
+	},
+	fakeEvent: function(type) {
+		return $.event.fix({
+			type: type,
+			target: this.element[0]
+		});
+	}
+});
+
+$.ui.tabs.defaults = {
+	// basic setup
+	unselect: false,
+	event: 'click',
+	disabled: [],
+	cookie: null, // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true }
+	// TODO history: false,
+
+	// Ajax
+	spinner: 'Loading&#8230;',
+	cache: false,
+	idPrefix: 'ui-tabs-',
+	ajaxOptions: {},
+
+	// animations
+	fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 }
+
+	// templates
+	tabTemplate: '<li><a href="#{href}"><span>#{label}</span></a></li>',
+	panelTemplate: '<div></div>',
+
+	// CSS classes
+	navClass: 'ui-tabs-nav',
+	selectedClass: 'ui-tabs-selected',
+	unselectClass: 'ui-tabs-unselect',
+	disabledClass: 'ui-tabs-disabled',
+	panelClass: 'ui-tabs-panel',
+	hideClass: 'ui-tabs-hide',
+	loadingClass: 'ui-tabs-loading'
+};
+
+$.ui.tabs.getter = "length";
+
+/*
+ * Tabs Extensions
+ */
+
+/*
+ * Rotate
+ */
+$.extend($.ui.tabs.prototype, {
+	rotation: null,
+	rotate: function(ms, continuing) {
+		
+		continuing = continuing || false;
+		
+		var self = this, t = this.options.selected;
+		
+		function start() {
+			self.rotation = setInterval(function() {
+				t = ++t < self.$tabs.length ? t : 0;
+				self.select(t);
+			}, ms); 
+		}
+		
+		function stop(e) {
+			if (!e || e.clientX) { // only in case of a true click
+				clearInterval(self.rotation);
+			}
+		}
+		
+		// start interval
+		if (ms) {
+			start();
+			if (!continuing)
+				this.$tabs.bind(this.options.event, stop);
+			else
+				this.$tabs.bind(this.options.event, function() {
+					stop();
+					t = self.options.selected;
+					start();
+				});
+		}
+		// stop interval
+		else {
+			stop();
+			this.$tabs.unbind(this.options.event, stop);
+		}
+	}
+});
+
+})(jQuery);
Index: sandbox/newExpressoMail/prototype/plugins/layout/example.html
===================================================================
--- sandbox/newExpressoMail/prototype/plugins/layout/example.html	(revision 7209)
+++ sandbox/newExpressoMail/prototype/plugins/layout/example.html	(revision 7209)
@@ -0,0 +1,23 @@
+<HTML>
+<HEAD>
+<TITLE>Layout Example</TITLE>
+<SCRIPT type="text/javascript" src="jquery.js"></SCRIPT>
+<SCRIPT type="text/javascript" src="jquery.layout.js"></SCRIPT>
+<SCRIPT type="text/javascript">
+$(document).ready(function () {
+	$('body').layout({ applyDefaultStyles: true });
+});
+</SCRIPT>
+</HEAD>
+<BODY>
+<DIV class="ui-layout-center">Center
+	<P><A href="http://layout.jquery-dev.net/demos.html">Go to the Demos page</A></P>
+	<P>* Pane-resizing is disabled because ui.draggable.js is not linked</P>
+	<P>* Pane-animation is disabled because ui.effects.js is not linked</P>
+</DIV>
+<DIV class="ui-layout-north">North</DIV>
+<DIV class="ui-layout-south">South</DIV>
+<DIV class="ui-layout-east">East</DIV>
+<DIV class="ui-layout-west">West</DIV>
+</BODY>
+</HTML>
Index: sandbox/newExpressoMail/prototype/plugins/wijmo/jquery.wijmo-open.all.2.2.0.min.js
===================================================================
--- sandbox/newExpressoMail/prototype/plugins/wijmo/jquery.wijmo-open.all.2.2.0.min.js	(revision 7209)
+++ sandbox/newExpressoMail/prototype/plugins/wijmo/jquery.wijmo-open.all.2.2.0.min.js	(revision 7209)
@@ -0,0 +1,93 @@
+/*
+ *
+ * Wijmo Library 2.2.0
+ * http://wijmo.com/
+ *
+ * Copyright(c) GrapeCity, Inc.  All rights reserved.
+ * 
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * licensing@wijmo.com
+ * http://www.wijmo.com/license
+ *
+ **/
+/*!
+ * Globalize
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ */
+(function(z,y){var a,x,t,s,w,c,j,r,k,v,p,e,b,q,f,h,m,n,u,l,g,i,o,d;a=function(b){return new a.prototype.init(b)};if(typeof require!=="undefined"&&typeof exports!=="undefined"&&typeof module!=="undefined")module.exports=a;else z.Globalize=a;a.cultures={};a.prototype={constructor:a,init:function(b){this.cultures=a.cultures;this.cultureSelector=b;return this}};a.prototype.init.prototype=a.prototype;a.cultures["default"]={name:"en",englishName:"English",nativeName:"English",isRTL:false,language:"en",numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSizes:[3],"+":"+","-":"-",NaN:"NaN",negativeInfinity:"-Infinity",positiveInfinity:"Infinity",percent:{pattern:["-n %","n %"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"%"},currency:{pattern:["($n)","$n"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"$"}},calendars:{standard:{name:"Gregorian_USEnglish","/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy'-'MM'-'dd'T'HH':'mm':'ss"}}},messages:{}};a.cultures["default"].calendar=a.cultures["default"].calendars.standard;a.cultures.en=a.cultures["default"];a.cultureSelector="en";x=/^0x[a-f0-9]+$/i;t=/^[+-]?infinity$/i;s=/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/;w=/^\s+|\s+$/g;c=function(a,c){if(a.indexOf)return a.indexOf(c);for(var b=0,d=a.length;b<d;b++)if(a[b]===c)return b;return-1};j=function(b,a){return b.substr(b.length-a.length)===a};r=function(i){var g,d,c,b,f,h,a=arguments[0]||{},e=1,j=arguments.length,i=false;if(typeof a==="boolean"){i=a;a=arguments[1]||{};e=2}if(typeof a!=="object"&&!v(a))a={};for(;e<j;e++)if((g=arguments[e])!=null)for(d in g){c=a[d];b=g[d];if(a===b)continue;if(i&&b&&(p(b)||(f=k(b)))){if(f){f=false;h=c&&k(c)?c:[]}else h=c&&p(c)?c:{};a[d]=r(i,h,b)}else if(b!==y)a[d]=b}return a};k=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"};v=function(a){return Object.prototype.toString.call(a)==="[object Function]"};p=function(a){return Object.prototype.toString.call(a)==="[object Object]"};e=function(b,a){return b.indexOf(a)===0};b=function(a){return(a+"").replace(w,"")};q=function(a){return isNaN(a)?NaN:a|0};f=function(a,c,d){for(var b=a.length;b<c;b+=1)a=d?"0"+a:a+"0";return a};h=function(e,b){for(var d=0,a=false,c=0,g=e.length;c<g;c++){var f=e.charAt(c);switch(f){case"'":if(a)b.push("'");else d++;a=false;break;case"\\":a&&b.push("\\");a=!a;break;default:b.push(f);a=false}}return d};m=function(e,a){a=a||"F";var b,d=e.patterns,c=a.length;if(c===1){b=d[a];if(!b)throw"Invalid date format string '"+a+"'.";a=b}else if(c===2&&a.charAt(0)==="%")a=a.charAt(1);return a};n=function(b,f,r){var c=r.calendar,s=c.convert;if(!f||!f.length||f==="i"){var a;if(r&&r.name.length)if(s)a=n(b,c.patterns.F,r);else{var z=new Date(b.getTime()),H=g(b,c.eras);z.setFullYear(i(b,c,H));a=z.toLocaleString()}else a=b.toString();return a}var A=c.eras,y=f==="s";f=m(c,f);a=[];var j,G=["0","00","000"],p,w,B=/([^d]|^)(d|dd)([^d]|$)/g,x=0,v=l(),o;function e(d,a){var b,c=d+"";if(a>1&&c.length<a){b=G[a-2]+c;return b.substr(b.length-a,a)}else b=c;return b}function D(){if(p||w)return p;p=B.test(f);w=true;return p}function u(a,b){if(o)return o[b];switch(b){case 0:return a.getFullYear();case 1:return a.getMonth();case 2:return a.getDate()}}if(!y&&s)o=s.fromGregorian(b);for(;;){var E=v.lastIndex,q=v.exec(f),C=f.slice(E,q?q.index:f.length);x+=h(C,a);if(!q)break;if(x%2){a.push(q[0]);continue}var t=q[0],d=t.length;switch(t){case"ddd":case"dddd":var F=d===3?c.days.namesAbbr:c.days.names;a.push(F[b.getDay()]);break;case"d":case"dd":p=true;a.push(e(u(b,2),d));break;case"MMM":case"MMMM":var k=u(b,1);a.push(c.monthsGenitive&&D()?c.monthsGenitive[d===3?"namesAbbr":"names"][k]:c.months[d===3?"namesAbbr":"names"][k]);break;case"M":case"MM":a.push(e(u(b,1)+1,d));break;case"y":case"yy":case"yyyy":k=o?o[0]:i(b,c,g(b,A),y);if(d<4)k=k%100;a.push(e(k,d));break;case"h":case"hh":j=b.getHours()%12;if(j===0)j=12;a.push(e(j,d));break;case"H":case"HH":a.push(e(b.getHours(),d));break;case"m":case"mm":a.push(e(b.getMinutes(),d));break;case"s":case"ss":a.push(e(b.getSeconds(),d));break;case"t":case"tt":k=b.getHours()<12?c.AM?c.AM[0]:" ":c.PM?c.PM[0]:" ";a.push(d===1?k.charAt(0):k);break;case"f":case"ff":case"fff":a.push(e(b.getMilliseconds(),3).substr(0,d));break;case"z":case"zz":j=b.getTimezoneOffset()/60;a.push((j<=0?"+":"-")+e(Math.floor(Math.abs(j)),d));break;case"zzz":j=b.getTimezoneOffset()/60;a.push((j<=0?"+":"-")+e(Math.floor(Math.abs(j)),2)+":"+e(Math.abs(b.getTimezoneOffset()%60),2));break;case"g":case"gg":c.eras&&a.push(c.eras[g(b,A)].name);break;case"/":a.push(c["/"]);break;default:throw"Invalid date format pattern '"+t+"'.";}}return a.join("")};(function(){var a;a=function(j,h,l){var m=l.groupSizes,i=m[0],k=1,p=Math.pow(10,h),n=Math.round(j*p)/p;if(!isFinite(n))n=j;j=n;var b=j+"",a="",e=b.split(/e/i),c=e.length>1?parseInt(e[1],10):0;b=e[0];e=b.split(".");b=e[0];a=e.length>1?e[1]:"";var q;if(c>0){a=f(a,c,false);b+=a.slice(0,c);a=a.substr(c)}else if(c<0){c=-c;b=f(b,c+1);a=b.slice(-c,b.length)+a;b=b.slice(0,-c)}if(h>0)a=l["."]+(a.length>h?a.slice(0,h):f(a,h));else a="";var d=b.length-1,o=l[","],g="";while(d>=0){if(i===0||i>d)return b.slice(0,d+1)+(g.length?o+g+a:a);g=b.slice(d-i+1,d+1)+(g.length?o+g:"");d-=i;if(k<m.length){i=m[k];k++}}return b.slice(0,d+1)+o+g+a};u=function(d,e,j){if(!isFinite(d))return d===Infinity?j.numberFormat.positiveInfinity:d===-Infinity?j.numberFormat.negativeInfinity:j.numberFormat.NaN;if(!e||e==="i")return j.name.length?d.toLocaleString():d.toString();e=e||"D";var i=j.numberFormat,b=Math.abs(d),g=-1,k;if(e.length>1)g=parseInt(e.slice(1),10);var m=e.charAt(0).toUpperCase(),c;switch(m){case"D":k="n";b=q(b);if(g!==-1)b=f(""+b,g,true);if(d<0)b="-"+b;break;case"N":c=i;case"C":c=c||i.currency;case"P":c=c||i.percent;k=d<0?c.pattern[0]:c.pattern[1]||"n";if(g===-1)g=c.decimals;b=a(b*(m==="P"?100:1),g,c);break;default:throw"Bad number format specifier: "+m;}for(var n=/n|\$|-|%/g,h="";;){var o=n.lastIndex,l=n.exec(k);h+=k.slice(o,l?l.index:k.length);if(!l)break;switch(l[0]){case"n":h+=b;break;case"$":h+=i.currency.symbol;break;case"-":if(/[1-9]/.test(b))h+=i["-"];break;case"%":h+=i.percent.symbol}}return h}})();l=function(){return/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g};g=function(e,c){if(!c)return 0;for(var b,d=e.getTime(),a=0,f=c.length;a<f;a++){b=c[a].start;if(b===null||d>=b)return a}return 0};i=function(d,b,e,c){var a=d.getFullYear();if(!c&&b.eras)a-=b.eras[e].offset;return a};(function(){var p,n,k,j,a,f,d;p=function(d,b){if(b<100){var e=new Date,f=g(e),c=i(e,d,f),a=d.twoDigitYearMax;a=typeof a==="string"?(new Date).getFullYear()%100+parseInt(a,10):a;b+=c-c%100;if(b>a)b-=100}return b};n=function(h,b,i){var e,g=h.days,a=h._upperDays;if(!a)h._upperDays=a=[d(g.names),d(g.namesAbbr),d(g.namesShort)];b=f(b);if(i){e=c(a[1],b);if(e===-1)e=c(a[2],b)}else e=c(a[0],b);return e};k=function(a,e,k){var j=a.months,i=a.monthsGenitive||a.months,b=a._upperMonths,g=a._upperMonthsGen;if(!b){a._upperMonths=b=[d(j.names),d(j.namesAbbr)];a._upperMonthsGen=g=[d(i.names),d(i.namesAbbr)]}e=f(e);var h=c(k?b[1]:b[0],e);if(h<0)h=c(k?g[1]:g[0],e);return h};j=function(d,g){var e=d._parseRegExp;if(!e)d._parseRegExp=e={};else{var o=e[g];if(o)return o}var f=m(d,g).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),b=["^"],p=[],i=0,n=0,k=l(),c;while((c=k.exec(f))!==null){var s=f.slice(i,c.index);i=k.lastIndex;n+=h(s,b);if(n%2){b.push(c[0]);continue}var j=c[0],t=j.length,a;switch(j){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":a="(\\D+)";break;case"tt":case"t":a="(\\D*)";break;case"yyyy":case"fff":case"ff":case"f":a="(\\d{"+t+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":a="(\\d\\d?)";break;case"zzz":a="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":a="([+-]?\\d\\d?)";break;case"/":a="(\\"+d["/"]+")";break;default:throw"Invalid date format pattern '"+j+"'.";}a&&b.push(a);p.push(c[0])}h(f.slice(i),b);b.push("$");var r=b.join("").replace(/\s+/g,"\\s+"),q={regExp:r,groups:p};return e[g]=q};a=function(a,c,b){return a<c||a>b};f=function(a){return a.split("\u00a0").join(" ").toUpperCase()};d=function(c){for(var b=[],a=0,d=c.length;a<d;a++)b[a]=f(c[a]);return b};o=function(A,M,L){A=b(A);var c=L.calendar,H=j(c,M),K=new RegExp(H.regExp).exec(A);if(K===null)return null;for(var J=H.groups,C=null,m=null,i=null,l=null,u=null,h=0,o,D=0,E=0,B=0,q=null,z=false,w=0,N=J.length;w<N;w++){var d=K[w+1];if(d){var I=J[w],r=I.length,g=parseInt(d,10);switch(I){case"dd":case"d":l=g;if(a(l,1,31))return null;break;case"MMM":case"MMMM":i=k(c,d,r===3);if(a(i,0,11))return null;break;case"M":case"MM":i=g-1;if(a(i,0,11))return null;break;case"y":case"yy":case"yyyy":m=r<4?p(c,g):g;if(a(m,0,9999))return null;break;case"h":case"hh":h=g;if(h===12)h=0;if(a(h,0,11))return null;break;case"H":case"HH":h=g;if(a(h,0,23))return null;break;case"m":case"mm":D=g;if(a(D,0,59))return null;break;case"s":case"ss":E=g;if(a(E,0,59))return null;break;case"tt":case"t":z=c.PM&&(d===c.PM[0]||d===c.PM[1]||d===c.PM[2]);if(!z&&(!c.AM||d!==c.AM[0]&&d!==c.AM[1]&&d!==c.AM[2]))return null;break;case"f":case"ff":case"fff":B=g*Math.pow(10,3-r);if(a(B,0,999))return null;break;case"ddd":case"dddd":u=n(c,d,r===3);if(a(u,0,6))return null;break;case"zzz":var y=d.split(/:/);if(y.length!==2)return null;o=parseInt(y[0],10);if(a(o,-12,13))return null;var x=parseInt(y[1],10);if(a(x,0,59))return null;q=o*60+(e(d,"-")?-x:x);break;case"z":case"zz":o=g;if(a(o,-12,13))return null;q=o*60;break;case"g":case"gg":var t=d;if(!t||!c.eras)return null;t=b(t.toLowerCase());for(var v=0,O=c.eras.length;v<O;v++)if(t===c.eras[v].name.toLowerCase()){C=v;break}if(C===null)return null}}}var f=new Date,G,s=c.convert;G=s?s.fromGregorian(f)[0]:f.getFullYear();if(m===null)m=G;else if(c.eras)m+=c.eras[C||0].offset;if(i===null)i=0;if(l===null)l=1;if(s){f=s.toGregorian(m,i,l);if(f===null)return null}else{f.setFullYear(m,i,l);if(f.getDate()!==l)return null;if(u!==null&&f.getDay()!==u)return null}if(z&&h<12)h+=12;f.setHours(h,D,E,B);if(q!==null){var F=f.getMinutes()-(q+f.getTimezoneOffset());f.setHours(f.getHours()+parseInt(F/60,10),F%60)}return f}})();d=function(a,f,g){var b=f["-"],c=f["+"],d;switch(g){case"n -":b=" "+b;c=" "+c;case"n-":if(j(a,b))d=["-",a.substr(0,a.length-b.length)];else if(j(a,c))d=["+",a.substr(0,a.length-c.length)];break;case"- n":b+=" ";c+=" ";case"-n":if(e(a,b))d=["-",a.substr(b.length)];else if(e(a,c))d=["+",a.substr(c.length)];break;case"(n)":if(e(a,"(")&&j(a,")"))d=["-",a.substr(1,a.length-2)]}return d||["",a]};a.prototype.findClosestCulture=function(b){return a.findClosestCulture.call(this,b)};a.prototype.format=function(d,c,b){return a.format.call(this,d,c,b)};a.prototype.localize=function(c,b){return a.localize.call(this,c,b)};a.prototype.parseInt=function(d,c,b){return a.parseInt.call(this,d,c,b)};a.prototype.parseFloat=function(d,c,b){return a.parseFloat.call(this,d,c,b)};a.prototype.culture=function(b){return a.culture.call(this,b)};a.addCultureInfo=function(a,c,e){var b={},d=false;if(typeof a!=="string"){e=a;a=this.culture().name;b=this.cultures[a]}else if(typeof c!=="string"){e=c;d=this.cultures[a]==null;b=this.cultures[a]||this.cultures["default"]}else{d=true;b=this.cultures[c]}this.cultures[a]=r(true,{},b,e);if(d)this.cultures[a].calendar=this.cultures[a].calendars.standard};a.findClosestCulture=function(a){var e;if(!a)return this.cultures[this.cultureSelector]||this.cultures["default"];if(typeof a==="string")a=a.split(",");if(k(a)){for(var d,h=this.cultures,n=a,i=n.length,g=[],c=0;c<i;c++){a=b(n[c]);var f,j=a.split(";");d=b(j[0]);if(j.length===1)f=1;else{a=b(j[1]);if(a.indexOf("q=")===0){a=a.substr(2);f=parseFloat(a);f=isNaN(f)?0:f}else f=1}g.push({lang:d,pri:f})}g.sort(function(a,b){return a.pri<b.pri?1:-1});for(c=0;c<i;c++){d=g[c].lang;e=h[d];if(e)return e}for(c=0;c<i;c++){d=g[c].lang;do{var m=d.lastIndexOf("-");if(m===-1)break;d=d.substr(0,m);e=h[d];if(e)return e}while(1)}for(c=0;c<i;c++){d=g[c].lang;for(var o in h){var l=h[o];if(l.language==d)return l}}}else if(typeof a==="object")return a;return e||null};a.format=function(a,b,c){culture=this.findClosestCulture(c);if(a instanceof Date)a=n(a,b,culture);else if(typeof a==="number")a=u(a,b,culture);return a};a.localize=function(a,b){return this.findClosestCulture(b).messages[a]||this.cultures["default"].messages[a]};a.parseDate=function(g,a,b){b=this.findClosestCulture(b);var c,h,d;if(a){if(typeof a==="string")a=[a];if(a.length)for(var e=0,i=a.length;e<i;e++){var f=a[e];if(f){c=o(g,f,b);if(c)break}}}else{d=b.calendar.patterns;for(h in d){c=o(g,d[h],b);if(c)break}}return c||null};a.parseInt=function(d,c,b){return q(a.parseFloat(d,c,b))};a.parseFloat=function(a,n,u){if(typeof n!=="number"){u=n;n=10}var k=this.findClosestCulture(u),o=NaN,c=k.numberFormat;if(a.indexOf(k.numberFormat.currency.symbol)>-1){a=a.replace(k.numberFormat.currency.symbol,"");a=a.replace(k.numberFormat.currency["."],k.numberFormat["."])}a=b(a);if(t.test(a))o=parseFloat(a);else if(!n&&x.test(a))o=parseInt(a,16);else{var e=d(a,c,c.pattern[0]),g=e[0],h=e[1];if(g===""&&c.pattern[0]!=="(n)"){e=d(a,c,"(n)");g=e[0];h=e[1]}if(g===""&&c.pattern[0]!=="-n"){e=d(a,c,"-n");g=e[0];h=e[1]}g=g||"+";var l,i,j=h.indexOf("e");if(j<0)j=h.indexOf("E");if(j<0){i=h;l=null}else{i=h.substr(0,j);l=h.substr(j+1)}var f,m,y=c["."],q=i.indexOf(y);if(q<0){f=i;m=null}else{f=i.substr(0,q);m=i.substr(q+y.length)}var r=c[","];f=f.split(r).join("");var v=r.replace(/\u00A0/g," ");if(r!==v)f=f.split(v).join("");var p=g+f;if(m!==null)p+="."+m;if(l!==null){var w=d(l,c,"-n");p+="e"+(w[0]||"+")+w[1]}if(s.test(p))o=parseFloat(p)}return o};a.culture=function(a){if(typeof a!=="undefined")this.cultureSelector=a;return this.findClosestCulture(a)||this.culture["default"]}})(this);
+/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
+ * Licensed under the MIT License (LICENSE.txt).
+ *
+ * Version 2.1.3-pre
+ */
+
+(function($){
+
+$.fn.bgiframe = ($.browser.msie && /msie 6\.0/i.test(navigator.userAgent) ? function(s) {
+    s = $.extend({
+        top     : 'auto', // auto == .currentStyle.borderTopWidth
+        left    : 'auto', // auto == .currentStyle.borderLeftWidth
+        width   : 'auto', // auto == offsetWidth
+        height  : 'auto', // auto == offsetHeight
+        opacity : true,
+        src     : 'javascript:false;'
+    }, s);
+    var html = '<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+
+                   'style="display:block;position:absolute;z-index:-1;'+
+                       (s.opacity !== false?'filter:Alpha(Opacity=\'0\');':'')+
+                       'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+
+                       'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+
+                       'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+
+                       'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+
+                '"/>';
+    return this.each(function() {
+        if ( $(this).children('iframe.bgiframe').length === 0 )
+            this.insertBefore( document.createElement(html), this.firstChild );
+    });
+} : function() { return this; });
+
+// old alias
+$.fn.bgIframe = $.fn.bgiframe;
+
+function prop(n) {
+    return n && n.constructor === Number ? n + 'px' : n;
+}
+
+})(jQuery);
+/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
+ * Licensed under the MIT License (LICENSE.txt).
+ *
+ * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
+ * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
+ * Thanks to: Seamus Leahy for adding deltaX and deltaY
+ *
+ * Version: 3.0.6
+ * 
+ * Requires: 1.2.2+
+ */
+(function(a){function d(b){var c=b||window.event,d=[].slice.call(arguments,1),e=0,f=!0,g=0,h=0;return b=a.event.fix(c),b.type="mousewheel",c.wheelDelta&&(e=c.wheelDelta/120),c.detail&&(e=-c.detail/3),h=e,c.axis!==undefined&&c.axis===c.HORIZONTAL_AXIS&&(h=0,g=-1*e),c.wheelDeltaY!==undefined&&(h=c.wheelDeltaY/120),c.wheelDeltaX!==undefined&&(g=-1*c.wheelDeltaX/120),d.unshift(b,e,g,h),(a.event.dispatch||a.event.handle).apply(this,d)}var b=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var c=b.length;c;)a.event.fixHooks[b[--c]]=a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=b.length;a;)this.addEventListener(b[--a],d,!1);else this.onmousewheel=d},teardown:function(){if(this.removeEventListener)for(var a=b.length;a;)this.removeEventListener(b[--a],d,!1);else this.onmousewheel=null}},a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery)
+;
+(function(a){a.fn.extend({wijContent:function(a){return this.each(function(){this.innerHTML='<iframe frameborder="0" style="width: 100%; height: 100%;" src="'+a+'">"'})},wijAddVisibilityObserver:function(c,b){return this.each(function(){a(this).addClass("wijmo-wijobserver-visibility");a(this).bind("wijmovisibilitychanged"+(b?"."+b:""),c)})},wijRemoveVisibilityObserver:function(b){return this.each(function(){a(this).removeClass("wijmo-wijobserver-visibility");if(!b)a(this).unbind("wijmovisibilitychanged");else if(jQuery.isFunction(b))a(this).unbind("wijmovisibilitychanged",b);else a(this).unbind("wijmovisibilitychanged."+b)})},wijTriggerVisibility:function(){return this.each(function(){var b=a(this);b.hasClass("wijmo-wijobserver-visibility")&&b.trigger("wijmovisibilitychanged");b.find(".wijmo-wijobserver-visibility").trigger("wijmovisibilitychanged")})}});var b=function(a){return isNaN(a)?0:a};a.fn.leftBorderWidth=function(){var d=parseFloat(a(this).css("borderLeftWidth")),e=parseFloat(a(this).css("padding-left")),c=0;if(a(this).css("margin-left")!="auto")c=parseFloat(a(this).css("margin-left"));return b(d)+b(e)+b(c)};a.fn.rightBorderWidth=function(){var d=parseFloat(a(this).css("borderRightWidth")),e=parseFloat(a(this).css("padding-right")),c=0;if(a(this).css("margin-right")!="auto")c=parseFloat(a(this).css("margin-right"));return b(d)+b(e)+b(c)};a.fn.topBorderWidth=function(){var d=parseFloat(a(this).css("borderTopWidth")),e=parseFloat(a(this).css("padding-top")),c=0;if(a(this).css("margin-top")!="auto")c=parseFloat(a(this).css("margin-top"));return b(d)+b(e)+b(c)};a.fn.bottomBorderWidth=function(){var d=parseFloat(a(this).css("borderBottomWidth")),e=parseFloat(a(this).css("padding-bottom")),c=0;if(a(this).css("margin-bottom")!="auto")c=parseFloat(a(this).css("margin-bottom"));return b(d)+b(e)+b(c)};a.fn.borderSize=function(){var c=a(this).leftBorderWidth()+a(this).rightBorderWidth(),b=a(this).topBorderWidth()+a(this).bottomBorderWidth(),d={width:c,height:b};return d};a.fn.setOutWidth=function(b){var c=a(this).leftBorderWidth()+a(this).rightBorderWidth();a(this).width(b-c);return this};a.fn.setOutHeight=function(b){var c=a(this).topBorderWidth()+a(this).bottomBorderWidth();a(this).height(b-c);return this};a.fn.getWidget=function(){var a=this.data("widgetName");return a&&a!=""?this.data(a):null};a.fn.wijshow=function(b,e,g,f,d){var c=b.animated||false,h=b.duration||400,i=b.easing,j=b.option||{};f&&a.isFunction(f)&&f.call(this);if(c){if(a.effects&&a.effects[c]){this.show(c,a.extend(j,{easing:i}),h,d);return}if(e&&e[c]){e[c](b,a.extend(g,{complete:d}));return}}this.show();d&&a.isFunction(d)&&d.call(this)};a.fn.wijhide=function(d,e,g,f,c){var b=d.animated||false,h=d.duration||400,i=d.easing,j=d.option||{};f&&a.isFunction(f)&&f.call(this);if(b){if(a.effects&&a.effects[b]){this.hide(b,a.extend(j,{easing:i}),h,c);return}if(e&&e[b]){e[b](newAnimations,a.extend(g,{complete:c}));return}}this.hide();c&&a.isFunction(c)&&c.call(this)};var c=function(){};a.extend(c.prototype,{_UTFPunctuationsString:" ! \" # % & ' ( ) * , - . / : ; ? @ [ \\ ] { } \u00a1 \u00ab \u00ad \u00b7 \u00bb \u00bf \u037e \u0387 \u055a \u055b \u055c \u055d \u055e \u055f \u0589 \u058a \u05be \u05c0 \u05c3 \u05f3 \u05f4 \u060c \u061b \u061f \u066a \u066b \u066c \u066d \u06d4 \u0700 \u0701 \u0702 \u0703 \u0704 \u0705 \u0706 \u0707 \u0708 \u0709 \u070a \u070b \u070c \u070d \u0964 \u0965 \u0970 \u0df4 \u0e4f \u0e5a \u0e5b \u0f04 \u0f05 \u0f06 \u0f07 \u0f08 \u0f09 \u0f0a \u0f0b \u0f0c \u0f0d \u0f0e \u0f0f \u0f10 \u0f11 \u0f12 \u0f3a \u0f3b \u0f3c \u0f3d \u0f85 \u104a \u104b \u104c \u104d \u104e \u104f \u10fb \u1361 \u1362 \u1363 \u1364 \u1365 \u1366 \u1367 \u1368 \u166d \u166e \u169b \u169c \u16eb \u16ec \u16ed \u17d4 \u17d5 \u17d6 \u17d7 \u17d8 \u17d9 \u17da \u17dc \u1800 \u1801 \u1802 \u1803 \u1804 \u1805 \u1806 \u1807 \u1808 \u1809 \u180a \u2010 \u2011 \u2012 \u2013 \u2014 \u2015 \u2016 \u2017 \u2018 \u2019 \u201a \u201b \u201c \u201d \u201e \u201f \u2020 \u2021 \u2022 \u2023 \u2024 \u2025 \u2026 \u2027 \u2030 \u2031 \u2032 \u2033 \u2034 \u2035 \u2036 \u2037 \u2038 \u2039 \u203a \u203b \u203c \u203d \u203e \u2041 \u2042 \u2043 \u2045 \u2046 \u2048 \u2049 \u204a \u204b \u204c \u204d \u207d \u207e \u208d \u208e \u2329 \u232a \u3001 \u3002 \u3003 \u3008 \u3009 \u300a \u300b \u300c \u300d \u300e \u300f \u3010 \u3011 \u3014 \u3015 \u3016 \u3017 \u3018 \u3019 \u301a \u301b \u301c \u301d \u301e \u301f \u3030 \ufd3e \ufd3f \ufe30 \ufe31 \ufe32 \ufe35 \ufe36 \ufe37 \ufe38 \ufe39 \ufe3a \ufe3b \ufe3c \ufe3d \ufe3e \ufe3f \ufe40 \ufe41 \ufe42 \ufe43 \ufe44 \ufe49 \ufe4a \ufe4b \ufe4c \ufe50 \ufe51 \ufe52 \ufe54 \ufe55 \ufe56 \ufe57 \ufe58 \ufe59 \ufe5a \ufe5b \ufe5c \ufe5d \ufe5e \ufe5f \ufe60 \ufe61 \ufe63 \ufe68 \ufe6a \ufe6b \uff01 \uff02 \uff03 \uff05 \uff06 \uff07 \uff08 \uff09 \uff0a \uff0c \uff0d \uff0e \uff0f \uff1a \uff1b \uff1f \uff20 \uff3b \uff3c \uff3d \uff5b \uff5d \uff61 \uff62 \uff63 \uff64';this.UTFWhitespacesString_='\t \13 \f \37   \u00a0 \u1680 \u2000 \u2001 \u2002 \u2003 \u2004 \u2005 \u2006 \u2007 \u2008 \u2009 \u200a \u200b \u2028 \u202f \u3000",isDigit:function(a){return a>="0"&&a<="9"},isLetter:function(a){return!!(a+"").match(new RegExp("[A-Za-z\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u021f\u0222-\u0233\u0250-\u02ad\u02b0-\u02b8\u02bb-\u02c1\u02d0\u02d1\u02e0-\u02e4\u02ee\u037a\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03ce\u03d0-\u03d7\u03da-\u03f3\u0400-\u0481\u048c-\u04c4\u04c7\u04c8\u04cb\u04cc\u04d0-\u04f5\u04f8\u04f9\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0621-\u063a\u0640-\u064a\u0671-\u06d3\u06d5\u06e5\u06e6\u06fa-\u06fc\u0710\u0712-\u072c\u0780-\u07a5\u0905-\u0939\u093d\u0950\u0958-\u0961\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8b\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b36-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb5\u0bb7-\u0bb9\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cde\u0ce0\u0ce1\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d28\u0d2a-\u0d39\u0d60\u0d61\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc\u0edd\u0f00\u0f40-\u0f47\u0f49-\u0f6a\u0f88-\u0f8b\u1000-\u1021\u1023-\u1027\u1029\u102a\u1050-\u1055\u10a0-\u10c5\u10d0-\u10f6\u1100-\u1159\u115f-\u11a2\u11a8-\u11f9\u1200-\u1206\u1208-\u1246\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1286\u1288\u128a-\u128d\u1290-\u12ae\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12ce\u12d0-\u12d6\u12d8-\u12ee\u12f0-\u130e\u1310\u1312-\u1315\u1318-\u131e\u1320-\u1346\u1348-\u135a\u13a0-\u13f4\u1401-\u166c\u166f-\u1676\u1681-\u169a\u16a0-\u16ea\u1780-\u17b3\u1820-\u1877\u1880-\u18a8\u1e00-\u1e9b\u1ea0-\u1ef9\u1f00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u207f\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2131\u2133-\u2139\u3005\u3006\u3031-\u3035\u3041-\u3094\u309d\u309e\u30a1-\u30fa\u30fc-\u30fe\u3105-\u312c\u3131-\u318e\u31a0-\u31b7\u3400-\u4db5\u4e00-\u9fa5\ua000-\ua48c\uac00-\ud7a3\uf900-\ufa2d\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe72\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]"))},isLetterOrDigit:function(a){return this.isLetter(a)||this.isDigit(a)},isSymbol:function(b){var a=new RegExp("[$+<->^`|~\u00a2-\u00a9\u00ac\u00ae-\u00b1\u00b4\u00b6\u00b8\u00d7\u00f7\u02b9\u02ba\u02c2-\u02cf\u02d2-\u02df\u02e5-\u02ed\u0374\u0375\u0384\u0385\u0482\u06e9\u06fd\u06fe\u09f2\u09f3\u09fa\u0b70\u0e3f\u0f01-\u0f03\u0f13-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcc\u0fcf\u17db\u1fbd\u1fbf-\u1fc1\u1fcd-\u1fcf\u1fdd-\u1fdf\u1fed-\u1fef\u1ffd\u1ffe\u2044\u207a-\u207c\u208a-\u208c\u20a0-\u20af\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u2132\u213a\u2190-\u21f3\u2200-\u22f1\u2300-\u2328\u232b-\u237b\u237d-\u239a\u2400-\u2426\u2440-\u244a\u249c-\u24e9\u2500-\u2595\u25a0-\u25f7\u2600-\u2613\u2619-\u2671\u2701-\u2704\u2706-\u2709\u270c-\u2727\u2729-\u274b\u274d\u274f-\u2752\u2756\u2758-\u275e\u2761-\u2767\u2794\u2798-\u27af\u27b1-\u27be\u2800-\u28ff\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u2ff0-\u2ffb\u3004\u3012\u3013\u3020\u3036\u3037\u303e\u303f\u309b\u309c\u3190\u3191\u3196-\u319f\u3200-\u321c\u322a-\u3243\u3260-\u327b\u327f\u328a-\u32b0\u32c0-\u32cb\u32d0-\u32fe\u3300-\u3376\u337b-\u33dd\u33e0-\u33fe\ua490-\ua4a1\ua4a4-\ua4b3\ua4b5-\ua4c0\ua4c2-\ua4c4\ua4c6\ufb29\ufe62\ufe64-\ufe66\ufe69\uff04\uff0b\uff1c-\uff1e\uff3e\uff40\uff5c\uff5e\uffe0-\uffe6\uffe8-\uffee\ufffc\ufffd]");return a.test(b+"")},isPunctuation:function(a){return this._UTFPunctuationsString.indexOf(a)>=0},isPrintableChar:function(a){return!this.isLetterOrDigit(a)&&!this.isPunctuation(a)&&!this.isSymbol(a)?a===" ":true},isAscii:function(a){return a>="!"&&a<="~"},isAsciiLetter:function(a){return a>="A"&&a<="Z"||a>="a"&&a<="z"},isUpper:function(a){return a.toUpperCase()===a},isLower:function(a){return a.toLowerCase()===a},isAlphanumeric:function(a){return!this.isLetter(a)?this.isDigit(a):true},isAciiAlphanumeric:function(a){return(a<"0"||a>"9")&&(a<"A"||a>"Z")?a>="a"?a<="z":false:true},setChar:function(a,c,b){return b>=a.length||b<0?a:""||a.substr(0,b)+c+a.substr(b+1)}});var d=["\n","\r",'"',"@","+","'","<",">","%","{","}"],e=["!ESC!NN!","!ESC!RR!","!ESC!01!","!ESC!02!","!ESC!03!","!ESC!04!","!ESC!05!","!ESC!06!","!ESC!07!","!ESC!08!","!ESC!09!"],f=["(\n)","(\r)",'(")',"(@)","(\\+)","(')","(\\<)","(\\>)","(%)","(\\{)","(\\})"];!a.wij&&a.extend({wij:{charValidator:new c,encodeString:function(b){for(var a=0;a<d.lemgth;a++){var c=/c__escapeArr3[i]/g;b=b.replace(c,e[a])}return b},decodeString:function(a){if(a==="")return;for(var b=0;b<e.length;b++){var c=/c__escapeArr2[i]/g;a=a.replace(c,d[b])}return a}}})})(jQuery);__wijReadOptionEvents=function(c,b){for(var a=0;a<c.length;a++)b.options[c[a]]!=null&&b.element.bind(c[a],b.options[c[a]]);for(a in b.options)if(a.indexOf(" ")!=-1)for(var e=a.split(" "),d=0;d<e.length;d++)e[d].length>0&&b.element.bind(e[d],b.options[a])};function wijmoASPNetParseOptionsReviewer(d,c){var a,b=d[c],e;if(b)switch(typeof b){case"string":a=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?):(\d{3})Z$/.exec(b);if(a){e=new Date(+a[1],+a[2]-1,+a[3],+a[4],+a[5],+a[6],+a[7]);e.setFullYear(+a[1]);d[c]=e}break;case"object":if(b.needQuotes!==undefined&&b.valueString!==undefined)if(!b.needQuotes)d[c]=eval(b.valueString);else d[c]=b.valueString;else for(c in b)wijmoASPNetParseOptionsReviewer(b,c)}}function wijmoASPNetParseOptions(a){var b;if(!a)return a;for(b in a)wijmoASPNetParseOptionsReviewer(a,b);return a};
+(function(a){"use strict";var g="@wijtp@",b="wijmo-wijtooltip",e=b+"-arrow-",c=parseFloat,i=window,d=document,j=Math,h=j.max,f={};a.widget("wijmo.wijtooltip",{options:{content:"",title:"",closeBehavior:"auto",mouseTrailing:false,triggers:"hover",position:{my:"left bottom",at:"right top",offset:null},showCallout:true,animation:{animated:"fade",duration:500,easing:null},showAnimation:{},hideAnimation:{},showDelay:150,hideDelay:150,calloutAnimation:{duration:1e3,disabled:false,easing:null},calloutFilled:true,modal:false,group:null,ajaxCallback:null,showing:null,shown:null,hiding:null,hidden:null,cssClass:""},_setOption:function(c,f){var b=this,e="_set_"+c,d=b.options[c];a.Widget.prototype._setOption.apply(b,arguments);if(a.isPlainObject(f))b.options[c]=a.extend({},d,f);b[e]&&b[e](d)},_set_cssClass:function(){var c=this,d=c.options,b=d.cssClass,a=c._tooltip;if(!a)return;!a.hasClass(b)&&a.addClass(b)},_set_content:function(){var a=this;if(a._isAjaxCallback){a._callbacked=true;a.show();a._callbacked=false}else a._setText()},_create:function(){var c=this,e=c.options,h=c.element,j=h&&h.attr("id"),d="",f="",i=e.group||g,b=a.wijmo.wijtooltip._getTooltip(i);if(window.wijmoApplyWijTouchUtilEvents)a=window.wijmoApplyWijTouchUtilEvents(a);if(b)b.count++;else{b=c._createTooltip();b.count=0;a.wijmo.wijtooltip._tooltips[i]=b}f=e.cssClass?e.cssClass:"";!b.hasClass(f)&&b.addClass(f);e.position.of=c.element;c._bindLiveEvents();c._tooltip=b;if(j!==""){d=b.attr("aria-describedby");d=d===undefined?"":d+" ";b.attr("aria-describedby",d+j)}},destroy:function(){var b=this,c=b.element,d=b.options.group||g;c.unbind(".tooltip");c.attr("title",b._content);a.wijmo.wijtooltip._removeTooltip(d);a.Widget.prototype.destroy.apply(b)},widget:function(){return this._tooltip},show:function(){var b=this,c=b._tooltip,d=b.options;if(!c||d.disabled)return;if(c._hideAnimationTimer){clearTimeout(c._hideAnimationTimer);c._hideAnimationTimer=null}c.stop(true,true);if(d.ajaxCallback&&a.isFunction(d.ajaxCallback)&&!b._callbacked){b._isAjaxCallback=true;d.ajaxCallback.call(b.element);return}b._setText();c._showAnimationTimer=setTimeout(function(){f=c.offset();if(d.mouseTrailing){b._setCalloutCss();return}b._setPosition();b._showTooltip()},b.options.showDelay)},showAt:function(a){var e=this,b=e._tooltip,n=b&&b._callout,m={},k=0,l=0,o={},g,h,c,d,j,i;if(!b||!n)return;b.stop(true,true);b._showAnimataionTimer=setTimeout(function(){e._setText();f=b.offset();b.offset({left:0,top:0}).show();m=n.position();k=m.left;l=m.top;h=e._getBorder(n);c=h.left||h.right;d=h.top||h.bottom;j=b.width();i=b.height();g=e._getCalloutShape();o=({rt:{left:a.x-j-c,top:a.y-l},rc:{left:a.x-j-c,top:a.y-i/2},rb:{left:a.x-j-c,top:a.y-l-d},lt:{left:a.x+c,top:a.y-l},lc:{left:a.x+c,top:a.y-i/2},lb:{left:a.x+c,top:a.y-l-d},tl:{left:a.x-k,top:a.y+d},tc:{left:a.x-j/2,top:a.y+d},tr:{left:a.x-k-c,top:a.y+d},bl:{left:a.x-k,top:a.y-i-d},bc:{left:a.x-j/2,top:a.y-i-d},br:{left:a.x-k-c,top:a.y-i-d}})[g];g=e._flipTooltip(o,g,h);e._setUnfilledCallout(g);b.offset(o).hide();e._calloutShape=g;e._showTooltip()},e.options.showDelay)},hide:function(){var b=this,c=b._tooltip;if(!c)return;clearTimeout(c._showAnimationTimer);c._hideAnimationTimer=setTimeout(a.proxy(b._hideTooltip,b),b.options.hideDelay)},_createTooltip:function(){var j=this,d="ui-corner-all",f="ui-widget-content",k="ui-state-default",l="ui-widget-header",c=a("<div class = '"+b+" ui-widget "+f+" "+d+"'></div>"),g=a("<div class='"+b+"-container'></div>"),h=a("<div class='"+f+" "+b+"-pointer '><div class='"+b+"-pointer-inner'></div></div>"),i=a("<div class = '"+b+"-title "+l+" "+d+"'></title>"),e=a("<a href='#' class = '"+b+"-close "+k+" "+d+"'></a>");e.append(a("<span class = 'ui-icon ui-icon-close'></span>")).bind("click",a.proxy(j._onClickCloseBtn,j));c.append(i).append(e).append(g).append(h).css("position","absolute").attr("role","tooltip").appendTo("body").hide();c._container=g;c._callout=h;c._closeBtn=e;c._title=i;return c},_bindLiveEvents:function(){var b=this,d=b.options,c=b.element;if(b._content===undefined){b._content=c.attr("title");c.attr("title","")}c.unbind(".tooltip");d.mouseTrailing&&c.bind("mousemove.tooltip",function(a){if(d.disabled)return;var e=d.position.offset||"",c=e.split(" ");if(c.length===2)b.showAt({x:a.pageX+parseInt(c[0],10),y:a.pageY+parseInt(c[1],10)});else b.showAt({x:a.pageX,y:a.pageY})});switch(d.triggers){case"hover":c.bind("mouseover.tooltip",a.proxy(b.show,b)).bind("mouseout.tooltip",a.proxy(b._hideIfNeeded,b));break;case"click":c.bind("click.tooltip",a.proxy(b.show,b));break;case"focus":c.bind("focus.tooltip",a.proxy(b.show,b)).bind("blur.tooltip",a.proxy(b._hideIfNeeded,b));break;case"rightClick":c.bind("contextmenu.tooltip",function(a){b.show();a.preventDefault()})}},_hideIfNeeded:function(){var c=this,a=c.options,b=a.closeBehavior;if(b==="sticky"||a.modal||b==="none"||a.disabled)return;c.hide()},_flipTooltip:function(d,i,e){var h=this,c=h._tooltip,j={width:c.width(),height:c.height()},b=h._flipCallout(d,j,i),a=b&&b.flip,g,f;if(!c||!b||!a.h&&!a.v)return b.calloutShape;g=c.width();f=c.height();if(a.h==="l")d.left-=g+e.right*2+1;else if(a.h==="r")d.left+=g+e.left*2+1;else if(a.v==="t")d.top-=f+e.bottom*2+1;else if(a.v==="b")d.top+=f+e.top*2+1;return b.calloutShape},_flipCallout:function(g,k,b){var h=this,l=h.options,j=h._tooltip,c={h:false,v:false},f=a(i),d=(l.position.collision||"flip").split(" ");if(d.length===1)d[1]=d[0];if(!j||d[0]!=="flip"&&d[1]!=="flip")return{flip:c};if(d[0]==="flip")if(g.left<0||g.left+k.width>f.width()+f.scrollLeft())c.h=true;if(d[0]==="flip")if(g.top<0||g.top+k.height>f.height()+f.scrollTop())c.v=true;if(l.showCallout){if(c.h)if(b.indexOf("l")>-1){b=b.replace(/l/,"r");c.h="l"}else if(b.indexOf("r")>-1){b=b.replace(/r/,"l");c.h="r"}if(c.v)if(b.indexOf("t")>-1){b=b.replace(/t/,"b");c.v="t"}else if(b.indexOf("b")>-1){b=b.replace(/b/,"t");c.v="b"}if(c.h||c.v){h._removeCalloutCss();j.addClass(e+b)}}return{flip:c,calloutShape:b}},_set_position:function(b){var a=this,d=a.options,c=d.position;if(d.showCallout){(b.my!==c.my||b.at!==c.at)&&a._setPosition();a._setCalloutOffset(true)}},_set_showCallOut:function(d){var c=this,b=c._tooltip,a=b&&b._callout;if(!b||!a)return;if(d){c._setCalloutCss();a.show()}else a.hide()},_set_closeBehavior:function(){var c=this,b=c._tooltip,a=b&&b._closeBtn;a&&a[c.options.closeBehavior==="sticky"?"show":"hide"]()},_set_triggers:function(){this._bindLiveEvents()},_set_mouseTrailing:function(){this._bindLiveEvents()},_getCalloutShape:function(){var g=this,e=g.options.position,f=function(b){return a.map(b,function(a){return a.substr(0,1)})},c=f(e.my.split(" ")),d=f(e.at.split(" ")),b=[];if(c.length===2)b=c;if(c[0]===d[0])(c[1]==="t"&&d[1]==="b"||c[1]==="b"&&d[1]==="t")&&b.reverse();else d[0]==="c"&&b.reverse();b[0]==="c"&&b.reverse();return b.join("")},_setCalloutCss:function(){var a=this,f=a.options,d=a._tooltip,c="",b="";if(!f.showCallout)return;a._removeCalloutCss();b=a._getCalloutShape();c=e+b;d&&d.addClass(c);return b},_removeCalloutCss:function(){var b=this._tooltip;b&&a.each(["tl","tc","tr","bl","bc","br","rt","rc","rb","lt","lc","lb"],function(d,c){var a=e+c;if(b.hasClass(a)){b.removeClass(a);return false}})},_getBorder:function(d){var b={};a.each(["top","right","left","bottom"],function(e,a){b[a]=c(d.css("border-"+a+"-width"))});return b},_setPosition:function(){var e=this,m=e.options,d=m.position,a=e._tooltip,p=a.is(":hidden"),f=e._setCalloutCss(),n=f?f.split(""):null,b=[0,0],h="",g=a._callout,i,l,r,q,j,s={width:a.width(),height:a.height()},o,k;p&&a.show();a.css({left:0,top:0});if(m.showCallout){i=e._getBorder(g);r=c(g.css("left"));l=c(g.css("top"));q=c(g.css("right"));j=c(g.css("bottom"));switch(n[0]){case"l":b[0]=i.right;break;case"r":b[0]=-i.left;break;case"b":b[1]=j;break;case"t":b[1]=-l}switch(n[1]){case"t":b[1]=-l;break;case"b":b[1]=j;break;case"r":b[0]=q;break;case"l":b[0]=-r}h=b.join(" ")}a.position({my:d.my,at:d.at,of:d.of,offset:h,collision:"none none"});o=e._flipCallout(a.offset(),s,f);k=o.flip;if(k.h||k.v){a.css({left:0,top:0});a.position({my:d.my,at:d.at,of:d.of,offset:h,collision:d.collision})}m.showCallout&&e._setUnfilledCallout(f);e._calloutShape=f;p&&a.hide()},_setCalloutOffset:function(h){var g=this,k=g.options,j=g._tooltip,e=j&&j._callout,l=g._calloutShape,d=false,f=k.position.offset,c="",b=[],i=k.calloutAnimation;if(!e)return;if(!f||f.length===0)return;e.stop(true,true);a.each(["tr","tc","tl","bl","bc","br"],function(b,a){if(l===a){d=true;return false}});if(f){b=f.split(" ");if(b.length===2)c=d?b[0]:b[1];else if(b.length===1)c=b[0]}if(c!=="")if(h&&!h.disabled)e.animate(d?{left:c}:{top:c},i.duration,i.easing);else e.css(d?"left":"top",c)},_setUnfilledCallout:function(g){var e=this,c=e._tooltip,d=c&&c._callout,a=d&&d.children(),f=g.split(""),b=c&&c.css("background-color");if(!a)return;a.css({"border-left-color":"","border-top-color":"","border-bottom-color":"","border-right-color":""});if(e.options.calloutFilled)switch(f[0]){case"l":a.css("border-right-color",b);break;case"t":a.css("border-bottom-color",b);break;case"r":a.css("border-left-color",b);break;case"b":a.css("border-top-color",b)}},_showTooltip:function(){var c=this,d=c.options,b=c._tooltip,e,g,j,h=b&&b._closeBtn,i=b&&b._callout;if(!b)return;if(c._trigger("showing",null,c)===false)return;h&&h[d.closeBehavior==="sticky"?"show":"hide"]();i&&i[d.showCallout?"show":"hide"]();c._showModalLayer();b.css("z-index",99999);if(!d.mouseTrailing&&a.fn.wijshow){g={show:true,context:b};e=a.extend({},d.animation,d.showAnimation);if(b.is(":visible")){j=b.offset();b.offset(f);a.extend(g,{pos:j});e.animated="tooltipSlide"}b.wijshow(e,a.wijmo.wijtooltip.animations,g,null,function(){c._trigger("shown")})}else{b.show();c._trigger("shown")}c._setCalloutOffset(false)},_hideTooltip:function(){var b=this,d=b.options,c=b._tooltip,f=a.extend({},d.animation,d.hideAnimation),e;if(!c)return;if(b._trigger("hiding",null,b)===false)return;b._hideModalLayer();if(!d.mouseTrailing&&a.fn.wijhide){e={show:true,context:c};c.wijhide(f,a.wijmo.wijtooltip.animations,e,null,function(){b._trigger("hidden");c.css("z-index","")})}else{c.hide();b._trigger("hidden");c.css("z-index","")}},_getContent:function(b){var c={data:""},d;if(a.isFunction(b)){d=b.call(this.element,c);return c.data!==""?c.data:d}else if(window[b]&&a.isFunction(window[b])){d=window[b].call(this.element,c);return c.data!==""?c.data:d}return b},_setText:function(){var b=this,f=b.options,c=b._tooltip,a="",d="",e=c&&c._title;if(!c)return;a=b._getContent(f.content);a=a===""?b._content:a;c._container.html(a);d=b._getContent(f.title);if(d!=="")e.html(d).show();else e.hide()},_showModalLayer:function(){var b=this,c=null;if(b.options.modal){c=a("<div>").addClass("ui-widget-overlay").css("z-index",99e3).width(b._getDocSize("Width")).height(b._getDocSize("Height")).appendTo("body");b._tooltip._modalLayer=c}},_hideModalLayer:function(){var b=this,a=b._tooltip._modalLayer;a&&a.css("z-index","").remove()},_getDocSize:function(b){var c,e,g="documentElement",f="body";if(a.browser.msie&&a.browser.version<9){c=h(d[g]["scroll"+b],d[f]["scroll"+b]);e=h(d[g]["offset"+b],d[f]["offset"+b]);return c<e?a(i)[b.toLowerCase()]()+"px":c+"px"}else return a(d)[b.toLowerCase()]()+"px"},_onClickCloseBtn:function(a){this.hide();a.preventDefault()}});a.extend(a.wijmo.wijtooltip,{animations:{fade:function(b,c){b=a.extend({duration:300,easing:"swing"},b,c);b.context.stop(true,true).animate(b.show?{opacity:"show"}:{opacity:"hide"},b)},tooltipSlide:function(b,c){b=a.extend({duration:300,easing:"swing"},b,c);b.context.stop(true,true).animate({left:b.pos.left,top:b.pos.top},b)}},_tooltips:{},_getTooltip:function(b){return a.wijmo.wijtooltip._tooltips[b]},_removeTooltip:function(c){var b=a.wijmo.wijtooltip._tooltips[c];if(b){b.count--;if(b.count<=0){b.remove();a.wijmo.wijtooltip._tooltips[c]=null}}}})})(jQuery);
+(function(a){"use strict";a.widget("wijmo.wijslider",a.ui.slider,{options:{buttonMouseOver:null,buttonMouseOut:null,buttonMouseDown:null,buttonMouseUp:null,buttonClick:null,dragFill:true,minRange:0},_setOption:function(d,c){var b=this;a.ui.slider.prototype._setOption.apply(b,arguments);this.options[d]=c;if(d==="disabled")b._handleDisabledOption(c,b.element.parent());else d==="range"&&b._setRangeOption(c);return this},_setRangeOption:function(d){var c=this,b=c.options;if(d){if(d===true){if(!b.values)b.values=[c._valueMin(),c._valueMin()];if(b.values.length&&b.values.length!==2)b.values=[b.values[0],b.values[0]]}c.range=a("<div></div>").appendTo(c.element).addClass("ui-slider-range ui-widget-header"+(b.range==="min"||b.range==="max"?" ui-slider-range-"+b.range:""))}else c.range.remove();c._refreshValue()},_create:function(){var b=this,c=b.element,d=b.options,i,l,e,g,h,n,m,f,j,k,o;if(window.wijmoApplyWijTouchUtilEvents)a=window.wijmoApplyWijTouchUtilEvents(a);b._oriStyle=c.attr("style");if(c.is(":input")){if(d.orientation==="horizontal")i=a("<div></div>").width(c.width()).appendTo(document.body);else i=a("<div></div>").height(c.height()).appendTo(document.body);l=c.val();if(l!=="")try{e=l.split(";");h=e.length;if(h>0){for(g=0;g<h;g++)e[g]=parseInt(e[g],10);if(h===1)d.value=e[0];else d.values=e}}catch(q){}c.data(b.widgetName,i.wijslider(d)).after(a(document.body).children("div:last")).hide();if(d.disabledState){var p=d.disabled;b.disable();d.disabled=p}return}a.ui.slider.prototype._create.apply(b,arguments);c.data("originalStyle",c.attr("style"));c.data("originalContent",c.html());n=c.width();m=c.height();f=a("<div></div>");if(d.orientation==="horizontal")f.addClass("wijmo-wijslider-horizontal");else f.addClass("wijmo-wijslider-vertical");f.width(n).height(m);j=a('<a class="wijmo-wijslider-decbutton"><span></span></a>');k=a('<a class="wijmo-wijslider-incbutton"><span></span></a>');c.wrap(f).before(j).after(k);b._container=c.parent();b._attachClass();o=c.find(".ui-slider-handle");b._adjustSliderLayout(j,k,o);if(d.disabledState){var p=d.disabled;b.disable();d.disabled=p}b.element.is(":hidden")&&b.element.wijAddVisibilityObserver&&b.element.wijAddVisibilityObserver(function(){b._refresh();b.element.wijRemoveVisibilityObserver&&b.element.wijRemoveVisibilityObserver()},"wijslider");b._bindEvents()},_handleDisabledOption:function(b,c){var a=this;if(b){if(!a.disabledDiv)a.disabledDiv=a._createDisabledDiv(c);a.disabledDiv.appendTo("body")}else if(a.disabledDiv){a.disabledDiv.remove();a.disabledDiv=null}},_createDisabledDiv:function(d){var g=this,b=d?d:g.element,c=b.offset(),f=b.outerWidth(),e=b.outerHeight();return a("<div></div>").addClass("ui-disabled").css({"z-index":"99999",position:"absolute",width:f,height:e,left:c.left,top:c.top})},_refresh:function(){var a=this,c,b,d;b=a._container.find(".wijmo-wijslider-decbutton");c=a._container.find(".wijmo-wijslider-incbutton");d=a._container.find(".ui-slider-handle");a._adjustSliderLayout(b,c,d);a._refreshValue()},_adjustSliderLayout:function(e,f,q){var h=this,g=h.element,r=h.options,b,a,d,c,j,i,l,k,o,p,m,n;b=h._container.width();a=h._container.height();d=e.outerWidth();c=e.outerHeight();j=f.outerWidth();i=f.outerHeight();l=q.outerWidth();k=q.outerHeight();if(r.orientation==="horizontal"){o=a/2-c/2;e.css("top",o).css("left",0);p=a/2-i/2;f.css("top",p).css("right",0);g.css("left",d+l/2-1).css("top",a/2-g.outerHeight()/2).width(b-d-j-l-2)}else{m=b/2-d/2;e.css("left",m).css("top",0);n=b/2-j/2;f.css("left",n).css("bottom",0);g.css("left",b/2-g.outerWidth()/2).css("top",c+k/2+1).height(a-c-i-k-2)}},destroy:function(){var b=this,c,d;c=this._getDecreBtn();d=this._getIncreBtn();c.unbind("."+b.widgetName);d.unbind("."+b.widgetName);a.ui.slider.prototype.destroy.apply(this,arguments);a("a",b.element.parent()).remove();b.element.unbind("."+b.widgetName);b.element.unwrap();if(b._oriStyle===undefined)b.element.removeAttr("style");else b.element.attr("style",b._oriStyle);b.element.removeData(b.widgetName).removeData("originalStyle").removeData("originalContent");if(b.disabledDiv){b.disabledDiv.remove();b.disabledDiv=null}},_slide:function(i,f,e){var g=this,h=g.options,c=h.minRange,d=e,b;if(h.range){b=g.values();if(f===0&&b[1]-c<e)d=b[1]-c;else if(f===1&&b[0]+c>e)d=b[0]+c}a.ui.slider.prototype._slide.call(g,i,f,d)},_getDecreBtn:function(){return this.element.parent().find(".wijmo-wijslider-decbutton")},_getIncreBtn:function(){return this.element.parent().find(".wijmo-wijslider-incbutton")},_attachClass:function(){this._getDecreBtn().addClass("ui-corner-all ui-state-default").attr("role","button");this._getIncreBtn().addClass("ui-corner-all ui-state-default").attr("role","button");this.element.parent().attr("role","slider").attr("aria-valuemin",this.options.min).attr("aria-valuenow","0").attr("aria-valuemax",this.options.max);if(this.options.orientation==="horizontal"){this.element.parent().addClass("wijmo-wijslider-horizontal");this._getDecreBtn().find("> span").addClass("ui-icon ui-icon-triangle-1-w");this._getIncreBtn().find("> span").addClass("ui-icon ui-icon-triangle-1-e")}else{this.element.parent().addClass("wijmo-wijslider-vertical");this._getDecreBtn().find("> span").addClass("ui-icon ui-icon-triangle-1-n");this._getIncreBtn().find("> span").addClass("ui-icon ui-icon-triangle-1-s")}},_bindEvents:function(){var a=this,b,c;b=this._getDecreBtn();c=this._getIncreBtn();b.bind("click."+a.widgetName,a,a._decreBtnClick);c.bind("click."+a.widgetName,a,a._increBtnClick);b.bind("mouseover."+a.widgetName,a,a._decreBtnMouseOver);b.bind("mouseout."+a.widgetName,a,a._decreBtnMouseOut);b.bind("mousedown."+a.widgetName,a,a._decreBtnMouseDown);b.bind("mouseup."+a.widgetName,a,a._decreBtnMouseUp);c.bind("mouseover."+a.widgetName,a,a._increBtnMouseOver);c.bind("mouseout."+a.widgetName,a,a._increBtnMouseOut);c.bind("mousedown."+a.widgetName,a,a._increBtnMouseDown);c.bind("mouseup."+a.widgetName,a,a._increBtnMouseUp)},_decreBtnMouseOver:function(d){var a=d.data,c,b;if(a.options.disabledState)return;c={buttonType:"decreButton"};a._trigger("buttonMouseOver",d,c);b=a._getDecreBtn();b.addClass("ui-state-hover")},_increBtnMouseOver:function(d){var a=d.data,c,b;if(a.options.disabledState)return;c={buttonType:"increButton"};a._trigger("buttonMouseOver",d,c);b=a._getIncreBtn();b.addClass("ui-state-hover")},_decreBtnMouseOut:function(d){var a=d.data,c,b;if(a.options.disabledState)return;c={buttonType:"decreButton"};a._trigger("buttonMouseOut",d,c);b=a._getDecreBtn();b.removeClass("ui-state-hover ui-state-active")},_increBtnMouseOut:function(d){var a=d.data,c,b;if(a.options.disabledState)return;c={buttonType:"increButton"};a._trigger("buttonMouseOut",d,c);b=a._getIncreBtn();b.removeClass("ui-state-hover ui-state-active")},_decreBtnMouseDown:function(e){var b=e.data,d,c;if(b.options.disabledState)return;d={buttonType:"decreButton"};b._trigger("buttonMouseDown",e,d);c=b._getDecreBtn();c.addClass("ui-state-active");a(document).bind("mouseup."+b.widgetName,{self:b,ele:c},b._documentMouseUp);if(b._intervalID!==null){window.clearInterval(b._intervalID);b._intervalID=null}b._intervalID=window.setInterval(function(){b._decreBtnHandle(b)},200)},_documentMouseUp:function(c){var b=c.data.self,d=c.data.ele;if(b.options.disabledState)return;d.removeClass("ui-state-active");if(b._intervalID!==null){window.clearInterval(b._intervalID);b._intervalID=null}a(document).unbind("mouseup."+b.widgetName,b._documentMouseUp)},_intervalID:null,_increBtnMouseDown:function(e){var b=e.data,d,c;if(b.options.disabledState)return;d={buttonType:"increButton"};b._trigger("buttonMouseDown",e,d);c=b._getIncreBtn();c.addClass("ui-state-active");a(document).bind("mouseup."+b.widgetName,{self:b,ele:c},b._documentMouseUp);if(b._intervalID!==null){window.clearInterval(b._intervalID);b._intervalID=null}b._intervalID=window.setInterval(function(){b._increBtnHandle(b)},200)},_decreBtnMouseUp:function(d){var a=d.data,c,b;if(a.options.disabledState)return;c={buttonType:"decreButton"};a._trigger("buttonMouseUp",d,c);b=a._getDecreBtn();b.removeClass("ui-state-active");window.clearInterval(a._intervalID)},_increBtnMouseUp:function(d){var a=d.data,c,b;if(a.options.disabledState)return;c={buttonType:"increButton"};a._trigger("buttonMouseUp",d,c);b=a._getIncreBtn();b.removeClass("ui-state-active");window.clearInterval(a._intervalID)},_decreBtnHandle:function(a){if(a.options.orientation==="horizontal")a._decre();else a._incre()},_decreBtnClick:function(c){var a=c.data,b;if(a.options.disabledState)return;a._mouseSliding=false;a._decreBtnHandle(a);b={buttonType:"decreButton",value:a.value()};a._trigger("buttonClick",c,b)},_increBtnHandle:function(a){if(a.options.orientation==="horizontal")a._incre();else a._decre()},_increBtnClick:function(c){var a=c.data,b;if(a.options.disabledState)return;a._mouseSliding=false;a._increBtnHandle(a);b={buttonType:"increButton",value:a.value()};a._trigger("buttonClick",c,b)},_decre:function(){var a=this.value();if(!this.options.range&&!this.options.values){a=this.value();if(a<=this.options.min)this.value(this.options.min);else this.value(a-this.options.step)}else{a=this.values(0);if(a<=this.options.min)this.values(0,this.options.min);else this.values(0,a-this.options.step)}this.element.parent().attr("aria-valuenow",this.value())},_incre:function(){var a=this.value();if(!this.options.range&&!this.options.values){a=this.value();if(a>=this.options.max)this.value(this.options.max);else this.value(a+this.options.step)}else{a=this.values(1);if(a>=this.options.max)this.values(1,this.options.max);else this.values(1,a+this.options.step)}this.element.parent().attr("aria-valuenow",this.value())},_mouseInit:function(){var b=this;if(this.options.dragFill&&this.options.range){this._preventClickEvent=false;this.element.bind("click."+b.widgetName,function(){if(b._dragFillStart>0)b._dragFillStart=0;else a.ui.slider.prototype._mouseCapture.apply(b,arguments)})}a.ui.mouse.prototype._mouseInit.apply(this,arguments)},_mouseCapture:function(b){this.element.parent().attr("aria-valuenow",this.value());if(this.options.dragFill)if(b.target.className==="ui-slider-range ui-widget-header"){this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();return true}else return a.ui.slider.prototype._mouseCapture.apply(this,arguments);else return a.ui.slider.prototype._mouseCapture.apply(this,arguments)},_dragFillTarget:false,_dragFillStart:0,_rangeValue:0,_oldValue1:0,_oldValue2:0,_oldX:0,_oldY:0,_mouseStart:function(a){if(this.options.dragFill){if(a.target)if(a.target.className==="ui-slider-range ui-widget-header"){this._dragFillTarget=true;this._rangeValue=this.values(1)-this.values(0);this._oldValue1=this.values(0);this._oldValue2=this.values(1);this._oldX=a.pageX;this._oldY=a.pageY;return true}this._dragFillTarget=false}return true},_mouseDrag:function(f){var d,c,e,b,g,h;if(this.options.dragFill){d=f.pageX-this._oldX;c=this.element.outerWidth();if(this.options.orientation==="vertical"){c=this.element.outerHeight();d=-(f.pageY-this._oldY)}e=(this.options.max-this.options.min)/c*d;if(this._dragFillTarget){if(this.options.orientation==="vertical")a(document.documentElement).css("cursor","s-resize");else a(document.documentElement).css("cursor","w-resize");if(this._dragFillStart>0){b=this._rangeValue;this.values(0,this._oldValue1+e);this.values(1,this._oldValue1+e+b);g=this.values(0);h=this.values(1);g+b>this.options.max&&this.values(0,this.options.max-b);h-b<this.options.min&&this.values(1,this.options.min+b)}this._dragFillStart++;return false}else return a.ui.slider.prototype._mouseDrag.apply(this,arguments)}else return a.ui.slider.prototype._mouseDrag.apply(this,arguments)},_mouseStop:function(){var b=a.ui.slider.prototype._mouseStop.apply(this,arguments);if(this.options.dragFill){a(document.documentElement).css("cursor","default");window.setTimeout(function(){this._dragFillTarget=false;this._dragFillStart=0},500)}return b}})})(jQuery);
+(function(a){"use strict";var j="wijmo-wijsplitter-",t=j+"wrapper",m=j+"horizontal",n=j+"vertical",c=j+"h-",b=j+"v-",o="-content",d={panel1:{n:"panel1",content:"panel1"+o},panel2:{n:"panel2",content:"panel2"+o}},v="bar",s="expander",r="ui-widget-header",g="ui-widget-content",q="ui-state-default",h="ui-state-hover",l="ui-state-active",e="ui-corner-",u="ui-icon",k="ui-icon-triangle-1-",i="collapsed",f="expanded",p="resize-helper";a.widget("wijmo.wijsplitter",{options:{sizing:null,sized:null,expand:null,collapse:null,expanded:null,collapsed:null,barZIndex:-1,showExpander:true,splitterDistance:100,orientation:"vertical",fullSplit:false,resizeSettings:{animationOptions:{duration:100,easing:"swing",disabled:false},ghost:false},panel1:{minSize:1,collapsed:false,scrollBars:"auto"},panel2:{minSize:1,collapsed:false,scrollBars:"auto"},collapsingPanel:"panel1"},_setOption:function(c,d){var b=this,f=b.options,e,g=a.extend({},f[c]);if(c==="fullSplit")b._setFullSplit(d);else if(a.isPlainObject(f[c])){if(c==="panel1"&&d.collapsed!==undefined)b._setPanel1Collapsed(d.collapsed);else c==="panel2"&&d.collapsed!==undefined&&b._setPanel2Collapsed(d.collapsed);f[c]=a.extend(true,f[c],d);return}a.Widget.prototype._setOption.apply(b,arguments);if(g!==d)if(c==="orientation")b.refresh();else if(c==="collapsingPanel")b.refresh();else if(c==="fullSplit")b.refresh(true,false);else if(c==="splitterDistance"){b.refresh(false,false);b._trigger("sized")}else if(c==="showExpander"){e=b._fields.expander;e&&e.length&&e.css("display",d?"":"none")}c==="disabled"&&b._handleDisabledOption(d,b.element)},_create:function(){var b=this,c=b.element,d=b.options;if(window.wijmoApplyWijTouchUtilEvents)a=window.wijmoApplyWijTouchUtilEvents(a);b._fields={width:c.width(),height:c.height()};d.fullSplit&&b._setFullSplit(true);b._splitterify();b._updateElementsCss();b._updateElements();b._bindEvents();b._initResizer();d.disabled&&b.disable();b._trigger("load",null,b)},_handleDisabledOption:function(b,c){var a=this;if(b){if(!a.disabledDiv)a.disabledDiv=a._createDisabledDiv(c);a.disabledDiv.appendTo("body")}else if(a.disabledDiv){a.disabledDiv.remove();a.disabledDiv=null}},_createDisabledDiv:function(d){var g=this,b=d?d:g.element,c=b.offset(),f=b.outerWidth(),e=b.outerHeight();return a("<div></div>").addClass("ui-disabled").css({"z-index":"99999",position:"absolute",width:f,height:e,left:c.left,top:c.top})},destroy:function(){var e=this,j=e.element,d=e._fields,s=d.wrapper,r=d.expander,t=d.bar,f=d.panel1,q=d.panel2,p=d.originalStyle,k=e.widgetName,h=d.oriPnl1Content,i=d.oriPnl2Content,l=d.oriPnl1ContentStyle,o=d.oriPnl2ContentStyle;f&&f.n.is(":ui-resizable")&&f.n.resizable("destroy");if(h){h.removeClass(b+f.contentCss+" "+c+f.contentCss+" "+g);if(l===undefined)h.removeAttr("style");else h.attr("style",l);h.appendTo(j)}if(i){i.removeClass(b+q.contentCss+" "+c+q.contentCss+" "+g);if(o===undefined)i.removeAttr("style");else i.attr("style",o);i.appendTo(j)}f.n.unbind("."+k);r.unbind("."+k);t.unbind("."+k);a(window).unbind("."+k);s.remove();j.removeClass(n+" "+m);if(p===undefined)j.removeAttr("style");else j.attr("style",p);if(e.disabledDiv){e.disabledDiv.remove();e.disabledDiv=null}e._fields=null},refresh:function(e,d){var a=this,c=a._fields,b=c.panel1;if(c._isResizing)return;(d||d===undefined)&&a._updateElementsCss();a._updateElements();if(e||e===undefined){b&&b.n.is(":ui-resizable")&&b.n.resizable("destroy");a._initResizer()}},_splitterify:function(){var i=this,f=i.element,k=i.options,b=i._fields,e,g,h,j,c={n:null,content:f.find(">div:eq(0)")},d={n:null,content:f.find(">div:eq(1)")};b.originalStyle=f.attr("style");e=a("<div></div>").appendTo(f);c.n=a("<div></div>").appendTo(e);if(c.content.length===0)c.content=a("<div></div>");else{b.oriPnl1Content=c.content;b.oriPnl1ContentStyle=c.content.attr("style")}c.content.appendTo(c.n);g=a("<div></div>").appendTo(e);k.barZIndex!==-1&&g.css("z-index",k.barZIndex);h=a("<div></div>").appendTo(g).attr("role","button");j=a("<span></span>").appendTo(h);d.n=a("<div></div>").appendTo(e);if(d.content.length===0)d.content=a("<div></div>");else{b.oriPnl2Content=d.content;b.oriPnl2ContentStyle=d.content.attr("style")}d.content.appendTo(d.n);b.wrapper=e;b.panel1=c;b.panel2=d;b.bar=g;b.expander=h;b.icon=j},_updateElementsCss:function(){var j=this,p=j.element,l=j.options,f=l.orientation==="vertical",i=j._fields,w=i.wrapper,a=l.collapsingPanel,h=l.collapsingPanel==="panel1"?"panel2":"panel1",y=i.bar,o=i.expander,x=i.icon;p.removeClass(n+" "+m).addClass(f?n:m);w.attr("class",t);i[a].n.removeClass(b+d[a].n+" "+c+d[a].n).addClass((f?b:c)+d[a].n);i[a].content.removeClass(b+d[a].content+" "+c+d[a].content+" "+g).addClass((f?b:c)+d[a].content+" "+g);y.attr("class",(f?b:c)+v+" "+r).css("width","").css("height","");o.attr("class",e+(f?"bl "+b:"tr "+c)+s+" "+q).css("left","").css("top","");x.attr("class",u+" "+k+(f?"w":"n"));i[h].n.removeClass(b+d[h].n+" "+c+d[h].n).addClass((f?b:c)+d[h].n);i[h].content.removeClass(b+d[h].content+" "+c+d[h].content+" "+g).addClass((f?b:c)+d[h].content+" "+g);j._updateExpanderCss()},_updateExpanderCss:function(){var t=this,a=t.options,s=t._fields,j=s.expander,l=s.icon,g=a.orientation==="vertical",d=a.collapsingPanel!=="panel1",h=g?b:c,m=(["bl","tr","tr","bl"])[g*2+d],n=(["br","tl"])[+d],q=(["s","n","e","w"])[g*2+d],o=(["tr","bl","bl","tr"])[g*2+d],p=(["tl","br"])[+d],r=(["n","s","w","e"])[g*2+d];j.removeClass(h+a.collapsingPanel+"-"+f+" "+h+a.collapsingPanel+"-"+i+" "+e+m+" "+e+n+" "+e+o+" "+e+p);l.removeClass(k+q+" "+k+r);if(a.panel1.collapsed||a.panel2.collapsed){j.addClass(e+m+" "+e+n+" "+h+a.collapsingPanel+"-"+i);l.addClass(k+q)}else{j.addClass(e+o+" "+e+p+" "+h+a.collapsingPanel+"-"+f);l.addClass(k+r)}},_updateElements:function(){var n=this,p=n.element,h=n.options,d=h.splitterDistance,k=h.collapsingPanel,r=h.collapsingPanel==="panel1"?"panel2":"panel1",a=n._fields,q=a.wrapper,s=a.panel1,t=a.panel2,o=a.bar,g=a.expander,j=p.width(),e=p.height(),m,l;q.height(e);n._setPanelsScrollMode();if(h.orientation==="vertical"){m=o.outerWidth(true);if(d>j-m)d=j-m;q.width(j*2);if(h.panel1.collapsed){k==="panel1"&&g.addClass(b+"panel1-"+i);a.panel1.n.css("display","none");a.panel2.n.css("display","");d=0}else{k==="panel1"&&g.addClass(b+"panel1-"+f);a.panel1.n.css("display","");a.panel2.n.css("display",h.panel2.collapsed?"none":"")}if(h.panel2.collapsed){k==="panel2"&&g.addClass(b+"panel2-"+i);a.panel2.n.css("display","none");d=k==="panel1"?j-m:j}else{k==="panel2"&&g.addClass(b+"panel2-"+f);a.panel2.n.css("display","")}!h.panel1.collapsed&&!h.panel2.collapsed&&g.addClass(b+h.collapsingPanel+"-"+f);if(k==="panel1"){a.panel1.n.height(e).width(d);a.panel2.n.height(e).width(j-d-m)}else{a.panel1.n.height(e).width(d-m);a.panel2.n.height(e).width(j-d);a.panel2.content.width(j-d)}a.panel1.content.outerHeight(e,true);o.outerHeight(e,true);a.panel2.content.outerHeight(e,true);g.css("cursor","pointer").css("top",e/2-g.outerHeight(true)/2)}else{l=o.outerHeight(true);if(d>e-l)d=e-l;if(h.panel1.collapsed){k==="panel1"&&g.addClass(c+"panel1-"+i);a.panel1.n.css("display","none");a.panel2.n.css("display","");d=0}else{k==="panel1"&&g.addClass(c+"panel1-"+f);a.panel1.n.css("display","");a.panel2.n.css("display",h.panel2.collapsed?"none":"")}if(h.panel2.collapsed){k==="panel2"&&g.addClass(c+"panel2-"+i);a.panel2.n.css("display","none");d=k==="panel1"?e-l:e}else{k==="panel2"&&g.addClass(c+"panel2-"+f);a.panel2.n.css("display","")}if(k==="panel1"){a.panel1.n.width(j).height(d);a.panel2.n.width(j).height(e-d-l);a.panel1.content.outerHeight(d,true);a.panel2.content.outerHeight(e-d-l,true)}else{a.panel1.n.width(j).height(d-l);a.panel2.n.width(j).height(e-d);a.panel1.content.outerHeight(d-l,true);a.panel2.content.outerHeight(e-d,true)}g.css("cursor","pointer").css("left",j/2-g.outerWidth(true)/2)}g.css("display",h.showExpander?"":"none")},_setFullSplit:function(b){var c=this,a=c._fields,e=b?"100%":a.width,d=b?"100%":a.height;c.element.css("width",e).css("height",d)},_setPanel1Collapsed:function(d,g){var b=this,c=b.options,f=c.panel1.collapsed,e=a(".ui-resizable-handle",b.element);if(f===d)return;if(c.collapsingPanel==="panel1")if(!b._trigger(f?"expand":"collapse",g,null))return;c.panel1.collapsed=d;if(d){c.panel2.collapsed=false;c.collapsingPanel==="panel2"&&e.hide()}else e.show();b._updateElements();b._updateExpanderCss();c.collapsingPanel==="panel1"&&b._trigger(d?"collapsed":"expanded",g,null)},_setPanel2Collapsed:function(d,g){var b=this,c=b.options,f=c.panel2.collapsed,e=a(".ui-resizable-handle",b.element);if(f===d)return;if(c.collapsingPanel==="panel2")if(!b._trigger(f?"expand":"collapse",g,null))return;c.panel2.collapsed=d;if(d){c.panel1.collapsed=false;c.collapsingPanel==="panel1"&&e.hide()}else e.show();b._updateElements();b._updateExpanderCss();c.collapsingPanel==="panel2"&&b._trigger(d?"collapsed":"expanded",g,null)},_bindEvents:function(){var c=this,b=c.options,g=c._fields,f=g.bar,e=g.expander,d=c.widgetName;e.bind("mouseover."+d,function(){if(b.disabled)return;e.addClass(h)}).bind("mouseout."+d,function(){if(b.disabled)return;e.removeClass(h).removeClass(l)}).bind("mousedown."+d,function(){if(b.disabled)return;e.addClass(l)}).bind("mouseup."+d,function(a){if(b.disabled)return;e.removeClass(l);if(b.collapsingPanel==="panel1")c._setPanel1Collapsed(!b.panel1.collapsed,a);else c._setPanel2Collapsed(!b.panel2.collapsed,a)});f.bind("mouseover."+d,function(){if(b.disabled)return;f.addClass(h)}).bind("mouseout."+d,function(){if(b.disabled)return;f.removeClass(h)});g.panel1.n.bind("animating."+d,function(a){if(b.disabled)return;c._adjustLayout(c);c._trigger("sizing",a,null)}).bind("animated."+d,function(a){if(b.disabled)return;c._adjustLayout(c);c._trigger("sized",a,null)});a(".ui-resizable-handle",c.element).live("mouseover."+d,function(){if(b.disabled)return;f.addClass(h)}).live("mouseout."+d,function(){if(b.disabled)return;f.removeClass(h)});a(window).bind("resize."+d,function(){if(b.disabled)return;if(b.fullSplit){c._updateElements();c._initResizer()}})},_initResizer:function(){var m=this,h=m.element,d=m.options,e=m._fields,u=e.bar,n=d.collapsingPanel,l=d.collapsingPanel==="panel1"?"panel2":"panel1",k=d.resizeSettings,g=k.animationOptions,o=g.disabled?0:g.duration,w=h.width(),v=h.height(),r,t,j,q,s,i,f;if(d.orientation==="vertical"){r=u.outerWidth(true);t=w-r-d[l].minSize;j=d[n].minSize;if(j<2)j=2;e.panel1.n.resizable({wijanimate:true,minWidth:j,maxWidth:t,handles:"e",helper:b+p,animateDuration:o,animateEasing:g.easing,ghost:k.ghost,start:function(){e._isResizing=true},stop:function(){e._isResizing=false}})}else{q=u.outerHeight(true);s=v-q-d[l].minSize;i=d[n].minSize;if(i<2)i=2;e.panel1.n.resizable({wijanimate:true,minHeight:i,maxHeight:s,handles:"s",helper:c+p,animateDuration:o,animateEasing:g.easing,ghost:k.ghost,start:function(){e._isResizing=true},stop:function(){e._isResizing=false}})}f=a(".ui-resizable-handle",h);if(d[l].collapsed)f.hide();else f.show();if(a.browser.msie&&a.browser.version<7)d.orientation==="vertical"&&f.height(h.height())},_adjustLayout:function(a){var b=a.options,e=a._fields,d=e.panel1,c=b.orientation==="vertical"?d.n.width():d.n.height();if(b.splitterDistance===c)return;b.splitterDistance=c;a._updateElements()},_setPanelsScrollMode:function(){var d=this,c=d._fields,e=d.options,b=[e.panel1.scrollBars,e.panel2.scrollBars];a.each([c.panel1,c.panel2],function(a,c){if(b[a]==="auto")c.content.css("overflow","auto");else if(b[a]==="both")c.content.css("overflow","scroll");else if(b[a]==="none")c.content.css("overflow","hidden");else if(b[a]==="horizontal")c.content.css("overflow-x","scroll").css("overflow-y","hidden");else b[a]==="vertical"&&c.content.css("overflow-x","hidden").css("overflow-y","scroll")})}})})(jQuery);(function(a){"use strict";a.ui.plugin.add("resizable","wijanimate",{stop:function(l){var b=a(this).data("resizable"),i=b.options,c=b.element,d=b._proportionallyResizeElements,h=d.length&&/textarea/i.test(d[0].nodeName),j=h&&a.ui.hasScroll(d[0],"left")?0:b.sizeDiff.height,k=h?0:b.sizeDiff.width,g,e,f;c.css("width",b.originalSize.width).css("height",b.originalSize.height);g={width:b.size.width-k,height:b.size.height-j};e=parseInt(c.css("left"),10)+(b.position.left-b.originalPosition.left)||null;f=parseInt(c.css("top"),10)+(b.position.top-b.originalPosition.top)||null;c.animate(a.extend(g,f&&e?{top:f,left:e}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var e={width:parseInt(c.css("width"),10),height:parseInt(c.css("height"),10),top:parseInt(c.css("top"),10),left:parseInt(c.css("left"),10)};d&&d.length&&a(d[0]).css({width:e.width,height:e.height});b._updateCache(e);b._propagate("resize",l);c.trigger("animating")},complete:function(){c.trigger("animated")}})}})})(jQuery);
+(function(a){"use strict";var b="wijmo-wijprogressbar",j="ui-progressbar",i=j+"-label",c=b+"-lb-",d="ui-corner-",g=d+"left",f=d+"right",h=d+"top",e=d+"bottom";a.widget("wijmo.wijprogressbar",a.ui.progressbar,{options:{labelAlign:"center",maxValue:100,minValue:0,fillDirection:"east",labelFormatString:"{1}%",toolTipFormatString:"{1}%",indicatorIncrement:1,indicatorImage:"",animationDelay:0,animationOptions:{disabled:false,easing:null,duration:500},progressChanging:null,beforeProgressChanging:null,progressChanged:null},_setOption:function(c,d){var b=this,e=b.options,f;switch(c){case"value":e[c]=parseInt(d,10);b._refreshValue();return;case"maxValue":e.max=d;case"minValue":f=parseInt(d,10);e[c]=f;b[c==="maxValue"?"max":"min"]=f;b._refreshValue(true);return;case"labelFormatString":case"toolTipFormatString":e[c]=d;b._refreshValue(true);return;case"fillDirection":case"labelAlign":case"indicatorImage":e[c]=d;b._updateElementsCss();return}a.Widget.prototype._setOption.apply(b,arguments);c==="disabled"&&b._handleDisabledOption(d,b.element)},_create:function(){var c=this,d=c.options,e=c.element;if(window.wijmoApplyWijTouchUtilEvents)a=window.wijmoApplyWijTouchUtilEvents(a);c.directions={east:"left",west:"right",north:"bottom",south:"top"};c.min=d.minValue;c.max=d.max=d.maxValue;e.addClass(b);a.ui.progressbar.prototype._create.apply(c,arguments);c.label=a("<span>").addClass(i).appendTo(e);c._updateElementsCss();c._isInit=true;d.disabled&&c.disable();c._refreshValue()},_handleDisabledOption:function(b,c){var a=this;if(b){if(!a.disabledDiv)a.disabledDiv=a._createDisabledDiv(c);a.disabledDiv.appendTo("body")}else if(a.disabledDiv){a.disabledDiv.remove();a.disabledDiv=null}},_createDisabledDiv:function(d){var g=this,b=d?d:g.element,c=b.offset(),f=b.outerWidth(),e=b.outerHeight();return a("<div></div>").addClass("ui-disabled").css({"z-index":"99999",position:"absolute",width:f,height:e,left:c.left,top:c.top})},_triggerEvent:function(a,c,b){return this._trigger(a,null,{oldValue:c,newValue:b})===false},_refreshValue:function(i){var b=this,g=b.options,f=g.animationOptions,h=b.element,c,e,d;if(!b._isInit)return;d=h.attr("aria-valuenow");c=b.value();e=(c-b.min)/(b.max-b.min)*100;if(b._triggerEvent("beforeProgressChanging",d,c))return;if(!f.disabled&&f.duration>0)setTimeout(function(){a.wijmo.wijprogressbar.animations.progress({content:b.valueDiv,complete:function(){b._triggerEvent("progressChanged",d,c);b._lastStep=e},step:function(a){b._performAnimating(a,i)},progressValue:c*100},f)},g.animationDelay);else{b._refreshProgress(Math.round(e));b._lastStep=e;b._triggerEvent("progressChanged",d,c)}},_refreshProgress:function(d,c){var b=this,i=b.options,j=i.fillDirection,k=b.element;if(c===undefined)c=a.wijmo.wijprogressbar.mul(d,b.max-b.min)/100+b.min;if(b._triggerEvent("progressChanging",k.attr("aria-valuenow"),c))return;if(b._isHorizontal())b.valueDiv.toggleClass(j==="east"?f:g,c===b.max).width(d+"%");else b.valueDiv.toggleClass(j==="south"?e:h,c===b.max).height(d+"%");b.label.html(b._getFormatString(i.labelFormatString,d,c));k.attr("aria-valuenow",c).attr("title",b._getFormatString(i.toolTipFormatString,d,c))},_isHorizontal:function(){var a=this.options.fillDirection;return a==="west"||a==="east"},_getRotateTextOffset:function(a){var c,b;a.css("width","auto");c=a.outerWidth();b=a.outerHeight();a.css("width","");return Math.max(c-b-4,0)},_updateElementsCss:function(){var a=this,e=a.options,d=a.element,c=e.fillDirection;d.removeClass(b+"-west "+b+"-east "+b+"-north "+b+"-south").addClass(b+"-"+c);a._updateProgressCss();a._updateLabelCss()},_updateLabelCss:function(){var d=this,i=d.options,g=d.element,b=i.labelAlign,e=d.label,f=d._lastStep,h=g.height();e.removeClass(c+"west "+c+"east "+c+"south "+c+"north "+c+"center "+c+"running").addClass(c+b).css({left:"",right:"",top:"",bottom:"",width:"","text-align":"","line-height":""});b!=="north"&&b!=="south"&&!(b==="running"&&!d._isHorizontal())&&e.css("line-height",h+"px");if(b==="running")d._updateRunningLabelCss(f);else if(!d._isHorizontal()&&!a.browser.msie)if(b==="north")e.css("width","100%").css("text-align","right");else b==="south"&&e.css("width","100%").css("text-align","left")},_updateRunningLabelCss:function(l){var b=this,m=b.options,i=m.fillDirection,k=b.element,f=b.label,j=b.valueDiv,e=b._isHorizontal(),c,d,g,h;c=k[e?"width":"height"]();d=f[e?"outerWidth":"outerHeight"]();g=j[e?"outerWidth":"outerHeight"]();if(!e&&!a.browser.msie)d+=b._getRotateTextOffset(f);h=c===g?c-d:l*c/100-d+d*(c-g)/c;f.css(b.directions[i],h)},_updateProgressCss:function(){var b=this,j=b.options,k=j.fillDirection,i=j.indicatorImage,a=b.valueDiv,c=b._lastStep;i!==""&&a.css("background","transparent url("+i+") repeat fixed");a.removeClass(g+" "+f+" "+h+" "+e).addClass(d+b.directions[k]);if(c)if(b._isHorizontal())a.css("width",c+"%").css("height","");else a.css("height",c+"%").css("width","");else a.css({width:"",height:""})},_performAnimating:function(l,k){var c=this,j=c.options,d=j.indicatorIncrement,i=l/100,b=a.wijmo.wijprogressbar.div(i-c.min,c.max-c.min)*100,f=0,g,h,e=2;if(d){g=b.toString().split(".");if(g.length===2){f=g[1].length;e=f}h=Math.pow(10,f);if(d!==1)b=Math.floor(b*h/d)*d/h;else{b=Math.round(b);e=0}c.pointNumber=f;if(c._lastStep===b&&!k)return}c._refreshProgress(Number(b.toFixed(e)),Number(i.toFixed(e)));j.labelAlign==="running"&&c._updateRunningLabelCss(b)},_getFormatString:function(a,d,e){var c=this,g=c.max-e,f=100-d,b=/\{0\}/g;a=a.replace(b,e.toString());b=/\{ProgressValue\}/g;a=a.replace(b,e.toString());b=/\{1\}/g;a=a.replace(b,d.toString());b=/\{PercentProgress\}/g;a=a.replace(b,d.toString());b=/\{2\}/g;a=a.replace(b,g.toString());b=/\{RemainingProgress\}/g;a=a.replace(b,g.toString());b=/\{3\}/g;a=a.replace(b,f.toString());b=/\{PercentageRemaining\}/g;a=a.replace(b,f.toString());b=/\{4\}/g;a=a.replace(b,c.min);b=/\{Min\}/g;a=a.replace(b,c.min);b=/\{5\}/g;a=a.replace(b,c.max);b=/\{Max\}/g;a=a.replace(b,c.max);return a},destroy:function(){var c=this,d=c.element;d.attr("title","").removeClass(b+" "+b+"-east "+b+"-west "+b+"-north "+b+"-south");c.label&&c.label.remove();if(c.disabledDiv){c.disabledDiv.remove();c.disabledDiv=null}a.ui.progressbar.prototype.destroy.apply(this,arguments)}});a.extend(a.wijmo.wijprogressbar,{animations:{progress:function(b,c){b=a.extend({easing:"swing",duration:1e3},b,c);b.content.stop(true,true).animate({pgvalue:b.progressValue},b)}},add:function(b,c){var d=0,e=0,a;try{d=b.toString().split(".")[1].length}catch(g){}try{e=c.toString().split(".")[1].length}catch(f){}a=Math.pow(10,Math.max(d,e));return(b*a+c*a)/a},mul:function(d,e){var a=0,b=d.toString(),c=e.toString();try{a+=b.split(".")[1].length}catch(g){}try{a+=c.split(".")[1].length}catch(f){}return Number(b.replace(".",""))*Number(c.replace(".",""))/Math.pow(10,a)},div:function(a,b){var e=0,f=0,c,d;try{e=a.toString().split(".")[1].length}catch(h){}try{f=b.toString().split(".")[1].length}catch(g){}c=Number(a.toString().replace(".",""));d=Number(b.toString().replace(".",""));return c/d*Math.pow(10,f-e)}})})(jQuery);
+(function(a){"use strict";var b="ui-state-hover",c="wijmo-wijdialog-defaultdockingzone";a.widget("wijmo.wijdialog",a.ui.dialog,{options:{captionButtons:{},collapsingAnimation:null,expandingAnimation:null,contentUrl:"",minimizeZoneElementId:"",buttonCreating:null,stateChanged:null,blur:null},_create:function(){var b=this,c=b.options;if(window.wijmoApplyWijTouchUtilEvents)a=window.wijmoApplyWijTouchUtilEvents(a);a.isArray(c.buttons)&&a.each(c.buttons,function(c,b){var a=b.click;if(a&&typeof a==="string"&&window[a])b.click=window[a]});b.form=b.element.closest("form[id]");a.ui.dialog.prototype._create.apply(b,arguments);b.uiDialog.addClass("wijmo-wijdialog");b._initWijWindow();b._bindWindowResize();b._attachDraggableResizableEvent();b.originalPosition=c.position;b.isPin=false;b.form.length&&b.uiDialog.appendTo(b.form)},_makeDraggable:function(){a.ui.dialog.prototype._makeDraggable.apply(this,arguments);this.uiDialog.draggable("option","cancel",".wijmo-wijdialog-captionbutton")},_handleDisabledOption:function(b){var a=this;if(b){if(!a.disabledDiv)a.disabledDiv=a._createDisabledDiv();a.disabledDiv.appendTo("body")}else if(a.disabledDiv){a.disabledDiv.remove();a.disabledDiv=null}},_createDisabledDiv:function(){var f=this,b=f.uiDialog,c=b.offset(),e=b.outerWidth(),d=b.outerHeight();return a("<div></div>").addClass("ui-disabled").css({"z-index":"99999",position:"absolute",width:e,height:d,left:c.left,top:c.top})},destroy:function(){var b=this;if(b.disabledDiv){b.disabledDiv.remove();b.disabledDiv=null}a.ui.dialog.prototype.destroy.apply(b,arguments);b.element.unbind(".wijdialog").removeData("wijdialog")},_attachDraggableResizableEvent:function(){var a=this,b=a.uiDialog,c=a.options;c.draggable&&b.draggable&&b.bind("dragstop",function(){a._saveNormalState();a._destoryIframeMask()}).bind("dragstart",function(){a._createIframeMask()});c.resizable&&b.resizable&&b.bind("resizestop",function(){a._saveNormalState();a._destoryIframeMask()}).bind("resizestart",function(){a._createIframeMask()})},_createIframeMask:function(){var b=this;if(b.innerFrame)b.mask=a("<div style='width:100%;height:100%;position:absolute;top:0px;left:0px;z-index:"+(a.ui.dialog.maxZ+1)+"'></div>").appendTo(b.uiDialog)},_destoryIframeMask:function(){var a=this;if(a.innerFrame&&a.mask){a.mask.remove();a.mask=undefined}},_initWijWindow:function(){var b=this,c=true;b._createCaptionButtons();b._checkUrl();b.uiDialogButtonPane=a(".ui-dialog-buttonpane",b.uiDialog);b.uiDialog.bind("mousedown",function(c){var d=c.target;!a.contains(b.element[0],d)&&b.uiDialog.focus()}).bind("mouseenter",function(){c=true}).bind("mouseleave",function(){c=false}).bind("focusout",function(a){!c&&b._trigger("blur",a,{el:b.element})})},_checkUrl:function(){var b=this,e=b.options,d=e.contentUrl,c=a('<iframe style="width:100%;height:99%;" frameborder="0"></iframe>');if(typeof d==="string"&&d.length>0){b.element.addClass("wijmo-wijdialog-hasframe");b.element.append(c);b.innerFrame=c}b.contentWrapper=b.element},_setOption:function(d,c){var b=this;a.ui.dialog.prototype._setOption.apply(b,arguments);if(d==="disabled")b._handleDisabledOption(c,b.element);else if(d==="contentUrl")if(b.innerFrame)b.innerFrame.attr("src",c);else b._checkUrl()},_createCaptionButtons:function(){var c=[],b=this,h=b.options,d,g={pin:{visible:true,click:b.pin,iconClassOn:"ui-icon-pin-w",iconClassOff:"ui-icon-pin-s"},refresh:{visible:true,click:b.refresh,iconClassOn:"ui-icon-refresh"},toggle:{visible:true,click:b.toggle,iconClassOn:"ui-icon-carat-1-n",iconClassOff:"ui-icon-carat-1-s"},minimize:{visible:true,click:b.minimize,iconClassOn:"ui-icon-minus"},maximize:{visible:true,click:b.maximize,iconClassOn:"ui-icon-extlink"},close:{visible:true,click:b.close,iconClassOn:"ui-icon-close"}},e=h.captionButtons,f=b.uiDialogTitlebar;f.children(".ui-dialog-titlebar-close, .wijmo-wijdialog-captionbutton").remove();a.each(g,function(b,d){e&&e[b]&&a.extend(d,e[b]);c.push({button:b,info:d})});b._trigger("buttonCreating",null,c);for(d=0;d<c.length;d++)b._createCaptionButton(c[d],f)},_createCaptionButton:function(f,g,k){var j=this,d,h="wijmo-wijdialog-titlebar-"+f.button,i=g.children("."+h),c=f.info,e=a("<span></span>");if(c.visible){if(i.size()===0){e.addClass("ui-icon "+c.iconClassOn).text(c.text||f.button);d=a('<a href="#"></a>').append(e).addClass(h+" ui-corner-all wijmo-wijdialog-captionbutton").attr("role","button").hover(function(){d.addClass(b)},function(){d.removeClass(b)}).click(function(){if(e.hasClass(c.iconClassOff))e.removeClass(c.iconClassOff);else e.addClass(c.iconClassOff);a.isFunction(c.click)&&c.click.apply(j,arguments);return false});if(k)return d;else d.appendTo(g)}j[f.button+"Button"]=d}else i.remove()},pin:function(){var a=this.isPin;this._enableDisableDragger(!a);this.isPin=!a},refresh:function(){var a=this.innerFrame;a!==undefined&&a.attr("src",a.attr("src"))},toggle:function(){var a=this,b=a.toggleButton.children("span");if(!a.minimized)if(a.collapsed===undefined||!a.collapsed){a.collapsed=true;!b.hasClass("ui-icon-carat-1-s")&&b.addClass("ui-icon-carat-1-s");a._collapseDialogContent(true)}else{a.collapsed=false;b.hasClass("ui-icon-carat-1-s")&&b.removeClass("ui-icon-carat-1-s");a._expandDialogContent(true)}},_expandDialogContent:function(e){var b=this,d=b.options,c=d.expandingAnimation;b.uiDialog.height("auto");if(e&&c!==null)b.contentWrapper.show(c.animated,c.options,c.duration,function(e){b.uiDialog.css("height",b._toggleHeight);a.isFunction(c.callback)&&c.callback(e);d.resizable&&b._enableDisableResizer(false)});else{b.contentWrapper.show();d.resizable&&b._enableDisableResizer(false);b.uiDialog.css("height",b.toggleHeight)}},_collapseDialogContent:function(d){var a=this,c=a.options,b=c.collapsingAnimation;c.resizable&&a._enableDisableResizer(true);a._toggleHeight=a.uiDialog[0].style.height;a.uiDialog.height("auto");if(d&&b!==null)a.contentWrapper.hide(b.animated,b.options,b.duration);else a.contentWrapper.hide();a._enableDisableDragger(a.isPin)},_enableDisableResizer:function(a){var b=this.uiDialog;b.resizable({disabled:a});a&&b.removeClass("ui-state-disabled")},_enableDisableDragger:function(a){var b=this.uiDialog;b.draggable({disabled:a});a&&b.removeClass("ui-state-disabled")},minimize:function(){var b=this,k=b.uiDialog,q=b.options,f=null,h=a("<div></div>"),j=a("<div></div>"),e,n,p,l,g={},o,i={},d="uiDialog",m;if(!b.minimized){l=b.uiDialog.position();g.width=b.uiDialog.width();g.height=b.uiDialog.height();m=b.getState();if(b.maximized){b.maximized=false;b.restoreButton.remove();a(window).unbind(".onWinResize")}else{b.collapsed&&b._expandDialogContent(false);b._saveNormalState()}b._enableDisableResizer(true);b.collapsed&&b._collapseDialogContent(false);h.appendTo(document.body).css({top:b.uiDialog.offset().top,left:b.uiDialog.offset().left,height:b.uiDialog.innerHeight(),width:b.uiDialog.innerWidth(),position:"absolute"});b.contentWrapper.hide();b.uiDialogButtonPane.length&&b.uiDialogButtonPane.hide();k.height("auto");k.width("auto");b._doButtonAction(b.minimizeButton,"hide");b._restoreButton(true,b.minimizeButton,"After");b._doButtonAction(b.pinButton,"hide");b._doButtonAction(b.refreshButton,"hide");b._doButtonAction(b.toggleButton,"hide");b._doButtonAction(b.maximizeButton,"show");a.browser.webkit&&a(".wijmo-wijdialog-captionbutton",b.uiDialog).css("float","left");if(b.innerFrame){d="copy";b[d]=b.uiDialog.clone();b[d].empty();b.uiDialogTitlebar.appendTo(b[d])}if(q.minimizeZoneElementId.length>0)f=a("#"+q.minimizeZoneElementId);if(f!==null&&f.size()>0)f.append(b[d]);else{e=a("."+c);if(e.size()===0){e=a('<div class="'+c+'"></div>');a(document.body).append(e)}e.append(b[d]).css("z-index",k.css("z-index"))}b[d].css("position","static");b[d].css("float","left");if(a.browser.msie&&a.browser.version==="6.0"){n=a(document).scrollTop();p=document.documentElement.clientHeight-e.height()+n;e.css({position:"absolute",left:"0px",top:p})}j.appendTo(document.body).css({top:b[d].offset().top,left:b[d].offset().left,height:b[d].innerHeight(),width:b[d].innerWidth(),position:"absolute"});b.uiDialog.hide();b.innerFrame&&b[d].hide();h.effect("transfer",{to:j,className:"ui-widget-content"},100,function(){h.remove();j.remove();b[d].show();b.minimized=true;o=b.uiDialog.position();i.width=b.uiDialog.width();i.height=b.uiDialog.height();b._enableDisableDragger(true);b._trigger("resize",null,{originalPosition:l,originalSize:g,position:o,size:i});b._trigger("stateChanged",null,{originalState:m,state:"minimized"})})}},_doButtonAction:function(a,c){if(a!==undefined){a.removeClass(b);a[c]()}},maximize:function(){var b=this,h=a(window),e,c={},f,d={},g;if(!b.maximized){b._enableDisableDragger(false);e=b.uiDialog.position();c.width=b.uiDialog.width();c.height=b.uiDialog.height();if(b.minimized)b.restore();else{b.collapsed&&b._expandDialogContent(false);b._saveNormalState();g="normal"}b.maximized=true;if(b.maximizeButton!==undefined){b.maximizeButton.hide();b._restoreButton(true,b.maximizeButton,"Before")}a.browser.webkit&&a(".wijmo-wijdialog-captionbutton").css("float","");b._onWinResize(b,h);b.collapsed&&b._collapseDialogContent(false);!b.collapsed&&b._enableDisableDragger(true);b.uiDialog.resizable({disabled:true});b.uiDialog.removeClass("ui-state-disabled");f=b.uiDialog.position();d.width=b.uiDialog.width();d.height=b.uiDialog.height();b._trigger("resize",null,{originalPosition:e,originalSize:c,position:f,size:d});g==="normal"&&b._trigger("stateChanged",null,{originalState:"normal",state:"maximized"})}},_bindWindowResize:function(){var b=this,d=a(window),f,e,c;d.resize(function(){b.maximized&&b._onWinResize(b,d)});a.browser.msie&&a.browser.version==="6.0"&&d.bind("scroll.wijdialog resize.wijdialog",function(){if(b.minimized){e=a(document).scrollTop();c=b.uiDialog.parent();f=document.documentElement.clientHeight-c.height()+e;c.css({top:f})}})},_saveNormalState:function(){var a=this,b=a.uiDialog,c=a.element;if(!a.maximized){a.normalWidth=b.css("width");a.normalLeft=b.css("left");a.normalTop=b.css("top");a.normalHeight=b.css("height");a.normalInnerHeight=c.css("height");a.normalInnerWidth=c.css("width");a.normalInnerMinWidth=c.css("min-width");a.normalInnerMinHeight=c.css("min-height")}},_onWinResize:function(a,b){a.uiDialog.css("top",b.scrollTop());a.uiDialog.css("left",b.scrollLeft());a.uiDialog.setOutWidth(b.width());a.uiDialog.setOutHeight(b.height());a.options.width=a.uiDialog.width();a.options.height=a.uiDialog.height();a._size();if(a.collapsed){a.uiDialog.height("auto");a.contentWrapper.hide()}},_restoreButton:function(c,f,e){var a=this,d={button:"restore",info:{visible:c,click:a.restore,iconClassOn:"ui-icon-newwin"}},b=a._createCaptionButton(d,a.uiDialogTitlebar,true);if(c){b["insert"+e](f);a.restoreButton=b}},_appendToBody:function(a){if(!this.innerFrame)a.appendTo(document.body);else{this.uiDialogTitlebar.prependTo(a);a.show()}},restore:function(){var b=this,k=b.uiDialog,f,d={},g,e={},i=a("<div></div>"),j=a("<div></div>"),c="uiDialog",h;if(b.minimized){b.minimized=false;b._enableDisableDragger(false);if(b.innerFrame){c="copy";if(!b[c])c="uiDialog"}f=b[c].position();d.width=b[c].width();d.height=b[c].height();i.appendTo(document.body).css({top:b[c].offset().top,left:b[c].offset().left,height:b[c].innerHeight(),width:b[c].innerWidth(),position:"absolute"});k.css("position","absolute");k.css("float","");b._appendToBody(k);b._enableDisableResizer(false);!b.isPin&&b._enableDisableDragger(false);b._restoreToNormal();b.contentWrapper.show();b.uiDialogButtonPane.length&&b.uiDialogButtonPane.show();j.appendTo(document.body).css({top:b.uiDialog.offset().top,left:b.uiDialog.offset().left,height:b.uiDialog.innerHeight(),width:b.uiDialog.innerWidth(),position:"absolute"});b.uiDialog.hide();i.effect("transfer",{to:j,className:"ui-widget-content"},150,function(){b.uiDialog.show();g=b.uiDialog.position();e.width=b.uiDialog.width();e.height=b.uiDialog.height();i.remove();j.remove();b.copy&&b.copy.remove();b._trigger("resize",null,{originalPosition:f,originalSize:d,position:g,size:e});h=b.getState();b._trigger("stateChanged",null,{originalState:"minimized",state:h})});b.collapsed&&b._collapseDialogContent();b._doButtonAction(b.minimizeButton,"show");b._doButtonAction(b.restoreButton,"remove");b._doButtonAction(b.pinButton,"show");b._doButtonAction(b.refreshButton,"show");b._doButtonAction(b.toggleButton,"show");a.browser.webkit&&a(".wijmo-wijdialog-captionbutton").css("float","")}else if(b.maximized){b.maximized=false;f=b.uiDialog.position();d.width=b.uiDialog.width();d.height=b.uiDialog.height();a(window).unbind(".onWinResize");b.collapsed&&b._expandDialogContent();b._enableDisableResizer(false);!b.isPin&&b._enableDisableDragger(false);b._restoreToNormal();b.contentWrapper.show();b.collapsed&&b._collapseDialogContent();if(b.maximizeButton!==undefined){b.maximizeButton.show();b._restoreButton(false,b.maximizeButton,"before")}g=b.uiDialog.position();e.width=b.uiDialog.width();e.height=b.uiDialog.height();b._trigger("resize",null,{originalPosition:f,originalSize:d,position:g,size:e});h=b.getState();b._trigger("stateChanged",null,{originalState:"maximized",state:h})}},getState:function(){var a=this;return a.minimized?"minimized":a.maximized?"maximized":"normal"},reset:function(){var a=this;a.normalWidth=a.normalLeft=a.normalTop=a.normalHeight=a.normalInnerHeight=a.normalInnerWidth=a.normalInnerMinWidth=a.normalInnerMinHeight=undefined;a._setOption("position",a.originalPosition)},open:function(){var b=this,c=b.options;(c.hide==="drop"||c.hide==="bounce")&&a.browser.msie&&b.uiDialog.css("filter","auto");if(!b.innerFrame){if(!b.minimized)a.ui.dialog.prototype.open.apply(b,arguments);else b.uiDialog.show();b.uiDialog.wijTriggerVisibility()}else{b.innerFrame.attr("src",c.contentUrl);if(!b.minimized)a.ui.dialog.prototype.open.apply(b,arguments);else b.uiDialogTitlebar.show()}b.collapsed&&b._collapseDialogContent();if(c.disabled)if(b.disabledDiv)b.disabledDiv.show();else b.disable()},close:function(){var b=this,c=b.options;if(a.ui.dialog.prototype.close.apply(b,arguments)){if(b.innerFrame){b.innerFrame.attr("src","");b.minimized&&b.uiDialogTitlebar.hide()}b.disabledDiv&&c.disabled&&b.disabledDiv.hide()}},_restoreToNormal:function(){var a=this,b=a.uiDialog,c=a.element;b.css("width",a.normalWidth);b.css("left",a.normalLeft);b.css("top",a.normalTop);b.css("height",a.normalHeight);c.css("height",a.normalInnerHeight);c.css("width",a.normalInnerWidth);c.css("min-width",a.normalInnerMinWidth);c.css("min-height",a.normalInnerMinHeight);a.options.width=a.uiDialog.width();a.options.height=a.uiDialog.height()}});a.extend(a.ui.dialog.overlay,{create:function(b){a.ui.dialog.latestDlg=b;if(this.instances.length===0){setTimeout(function(){a.ui.dialog.overlay.instances.length&&a(document).bind(a.ui.dialog.overlay.events,function(b){if(a(b.target).zIndex()<a.ui.dialog.overlay.maxZ&&!a.contains(a.ui.dialog.latestDlg.element[0],b.target))return false})},1);a(document).bind("keydown.dialog-overlay",function(c){if(b.options.closeOnEscape&&!c.isDefaultPrevented()&&c.keyCode&&c.keyCode===a.ui.keyCode.ESCAPE){b.close(c);c.preventDefault()}});a(window).bind("resize.dialog-overlay",a.ui.dialog.overlay.resize)}var c=(this.oldInstances.pop()||a("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});a.fn.bgiframe&&c.bgiframe();this.instances.push(c);return c},height:function(){var b,c;if(a.browser.msie){b=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);c=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return b<c?a(window).height()+"px":b+"px"}else return a(document).height()+"px"},width:function(){var b,c;if(a.browser.msie){b=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);c=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return b<c?a(window).width()+"px":b+"px"}else return a(document).width()+"px"}})})(jQuery);
+(function(a){"use strict";a.widget("wijmo.wijaccordion",{options:{animated:"slide",duration:null,event:"click",disabled:false,expandDirection:"bottom",header:"> li > :first-child,> :not(li):even",requireOpenedPane:true,selectedIndex:0},_setOption:function(d,b){var c=this.options;if(c[d]!==b)switch(d){case"selectedIndex":this.activate(b);break;case"disabled":if(b)this.element.addClass("ui-state-disabled");else this.element.removeClass("ui-state-disabled");break;case"event":this._unbindLiveEvents();this.options.event=b;this._bindLiveEvents();break;case"header":this._handleHeaderChange(b,c.header);break;case"expandDirection":this._onDirectionChange(b,true,c.expandDirection)}a.Widget.prototype._setOption.apply(this,arguments)},_handleHeaderChange:function(b,a){var c=this.element.find(a);c.removeClass("ui-accordion-header ui-helper-reset ui-state-active "+this._triangleIconOpened).siblings(".ui-accordion-content").removeClass("ui-accordion-content ui-helper-reset ui-widget-content ui-accordion-content-active");this._initHeaders(b)},_initHeaders:function(a){var b=this.options;a=a?a:b.header;this.headers=this.element.find(a);this.headers.each(jQuery.proxy(this._initHeader,this))},_initHeader:function(e,f){var g=this.options,d=this.element.data("rightToLeft"),b=a(f),c=a(b.next()[0]);if(d){b.remove();b.insertAfter(c)}b.addClass("ui-accordion-header ui-helper-reset").attr("role","tab");c.attr("role","tabpanel");b.find("> a").length===0&&b.wrapInner('<a href="#"></a>');b.find("> .ui-icon").length===0&&a('<span class="ui-icon"></span>').insertBefore(a("> a",b)[0]);if(e===g.selectedIndex){b.addClass("ui-state-active").addClass(this._headerCornerOpened).attr({"aria-expanded":"true",tabIndex:0}).find("> .ui-icon").addClass(this._triangleIconOpened);c.addClass("ui-accordion-content-active").addClass(this._contentCornerOpened).wijTriggerVisibility()}else{b.addClass("ui-state-default ui-corner-all").attr({"aria-expanded":"false",tabIndex:-1}).find("> .ui-icon").addClass(this._triangleIconClosed);c.hide()}c.addClass("ui-accordion-content ui-helper-reset ui-widget-content")},_create:function(){if(window.wijmoApplyWijTouchUtilEvents)a=window.wijmoApplyWijTouchUtilEvents(a);this.element.addClass("wijmo-wijaccordion ui-accordion ui-widget ui-accordion-icons ui-helper-reset ui-helper-clearfix");var b=this.options;b.disabled&&this.element.addClass("ui-state-disabled");this._onDirectionChange(b.expandDirection,false);this._initHeaders();this.element.attr("role","tablist")},_init:function(){this._bindLiveEvents()},destroy:function(){this._unbindLiveEvents();this.element.removeClass("wijmo-wijaccordion ui-accordion ui-widget ui-helper-reset ui-accordion-icons").removeAttr("role");a.Widget.prototype.destroy.apply(this,arguments)},activate:function(f){var b,c=this.options,n=this.element.children(".ui-accordion-header"),d=this.element.find(".ui-accordion-header.ui-state-active"),p=this.element.data("rightToLeft"),i,k,g,h,l,o,m,j,q,e;if(typeof f==="number")b=a(n[f]);else if(typeof f==="string"){f=parseInt(f,0);b=a(n[f])}else{b=a(f);f=n.index(f)}if(b.hasClass("ui-state-active"))if(c.requireOpenedPane){if(d.length===b.length&&d.index()===b.index())return false}else{d=b;b=a(null)}else if(!c.requireOpenedPane)d=a(null);i=a(".ui-accordion-header",this.element).index(b);k=a(".ui-accordion-header",this.element).index(d);g=p?b.prev(".ui-accordion-content"):b.next(".ui-accordion-content");h=p?d.prev(".ui-accordion-content"):d.next(".ui-accordion-content");if(d.length===0&&b.length===0)return false;if(!this._trigger("beforeSelectedIndexChanged",null,{newIndex:i,prevIndex:k}))return false;d.removeClass("ui-state-active").removeClass(this._headerCornerOpened).addClass("ui-state-default ui-corner-all").attr({"aria-expanded":"false",tabIndex:-1}).find("> .ui-icon").removeClass(this._triangleIconOpened).addClass(this._triangleIconClosed);b.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active").addClass(this._headerCornerOpened).attr({"aria-expanded":"true",tabIndex:0}).find("> .ui-icon").removeClass(this._triangleIconClosed).addClass(this._triangleIconOpened);if(c.animated){l={toShow:g,toHide:h,complete:jQuery.proxy(function(){h.removeClass("ui-accordion-content-active");g.addClass("ui-accordion-content-active").wijTriggerVisibility();h.css("display","");g.css("display","");if(a.fn.wijlinechart){h.find(".wijmo-wijlinechart").wijlinechart("redraw");g.find(".wijmo-wijlinechart").wijlinechart("redraw")}this._trigger("selectedIndexChanged",null,{newIndex:i,prevIndex:k})},this),horizontal:this.element.hasClass("ui-helper-horizontal"),rightToLeft:this.element.data("rightToLeft"),down:i>k,autoHeight:c.autoHeight||c.fillSpace};o=c.animated;m=c.duration;if(a.isFunction(o))c.animated=o(l);if(a.isFunction(m))c.duration=m(l);j=a.wijmo.wijaccordion.animations;q=c.duration;e=c.animated;if(e&&!j[e]&&!a.easing[e])e="slide";if(!j[e])j[e]=function(a){this.slide(a,{easing:e,duration:q||700})};j[e](l)}else{d.length>0&&h.hide().removeClass("ui-accordion-content-active");b.length>0&&g.show().addClass("ui-accordion-content-active").addClass(this._contentCornerOpened).wijTriggerVisibility();if(a.fn.wijlinechart){h.find(".wijmo-wijlinechart").wijlinechart("redraw");g.find(".wijmo-wijlinechart").wijlinechart("redraw")}this._trigger("selectedIndexChanged",null,{newIndex:i,prevIndex:k})}this.options.selectedIndex=i},_bindLiveEvents:function(){this.element.find(".ui-accordion-header").live(this.options.event+".wijaccordion",jQuery.proxy(this._onHeaderClick,this)).live("keydown.wijaccordion",jQuery.proxy(this._onHeaderKeyDown,this)).live("mouseenter.wijaccordion",function(){a(this).addClass("ui-state-hover")}).live("mouseleave.wijaccordion",function(){a(this).removeClass("ui-state-hover")}).live("focus.wijaccordion",function(){a(this).addClass("ui-state-focus")}).live("blur.wijaccordion",function(){a(this).removeClass("ui-state-focus")})},_unbindLiveEvents:function(){this.element.find(".ui-accordion-header").die(".wijaccordion")},_onHeaderClick:function(a){!this.options.disabled&&this.activate(a.currentTarget);return false},_onHeaderKeyDown:function(d){if(this.options.disabled||d.altKey||d.ctrlKey)return;var b=a.ui.keyCode,f=this.element.find(".ui-accordion-header.ui-state-focus"),c,e=this.element.find(".ui-accordion-header");if(f.length>0){c=a(".ui-accordion-header",this.element).index(f);switch(d.keyCode){case b.RIGHT:case b.DOWN:if(e[c+1]){e[c+1].focus();return false}break;case b.LEFT:case b.UP:if(e[c-1]){e[c-1].focus();return false}break;case b.SPACE:case b.ENTER:this.activate(d.currentTarget);d.preventDefault()}}return true},_onDirectionChange:function(j,e,i){var b,g,f,d,c,h;if(e){g=this.element.find(".ui-accordion-header."+this._headerCornerOpened);g.removeClass(this._headerCornerOpened);f=this.element.find(".ui-accordion-content."+this._contentCornerOpened);f.removeClass(this._contentCornerOpened);d=this.element.find("."+this._triangleIconOpened);c=this.element.find("."+this._triangleIconClosed);d.removeClass(this._triangleIconOpened);c.removeClass(this._triangleIconClosed)}i!==null&&this.element.removeClass("ui-accordion-"+i);switch(j){case"top":this._headerCornerOpened="ui-corner-bottom";this._contentCornerOpened="ui-corner-top";this._triangleIconOpened="ui-icon-triangle-1-n";this._triangleIconClosed="ui-icon-triangle-1-e";b=true;this.element.removeClass("ui-helper-horizontal");this.element.addClass("ui-accordion-top");break;case"right":this._headerCornerOpened="ui-corner-left";this._contentCornerOpened="ui-corner-right";this._triangleIconOpened="ui-icon-triangle-1-e";this._triangleIconClosed="ui-icon-triangle-1-s";b=false;this.element.addClass("ui-helper-horizontal");this.element.addClass("ui-accordion-right");break;case"left":this._headerCornerOpened="ui-corner-right";this._contentCornerOpened="ui-corner-left";this._triangleIconOpened="ui-icon-triangle-1-w";this._triangleIconClosed="ui-icon-triangle-1-s";b=true;this.element.addClass("ui-helper-horizontal");this.element.addClass("ui-accordion-left");break;default:this._headerCornerOpened="ui-corner-top";this._contentCornerOpened="ui-corner-bottom";this._triangleIconOpened="ui-icon-triangle-1-s";this._triangleIconClosed="ui-icon-triangle-1-e";b=false;this.element.removeClass("ui-helper-horizontal");this.element.addClass("ui-accordion-bottom")}h=this.element.data("rightToLeft");this.element.data("rightToLeft",b);if(e){d.addClass(this._triangleIconOpened);c.addClass(this._triangleIconClosed);g.addClass(this._headerCornerOpened);f.addClass(this._contentCornerOpened)}e&&b!==h&&this.element.children(".ui-accordion-header").each(function(){var c=a(this),d;if(b){d=c.next(".ui-accordion-content");c.remove();c.insertAfter(d)}else{d=c.prev(".ui-accordion-content");c.remove();c.insertBefore(d)}})}});a.extend(a.wijmo.wijaccordion,{animations:{slide:function(b,h){b=a.extend({easing:"swing",duration:300},b,h);if(!b.toHide.size()){b.toShow.stop(true,true).animate(b.horizontal?{width:"show"}:{height:"show"},b);return}if(!b.toShow.size()){b.toHide.stop(true,true).animate(b.horizontal?{width:"hide"}:{height:"hide"},b);return}var i=b.toShow.css("overflow"),f=0,e={},g={},j=b.horizontal?["width","paddingLeft","paddingRight"]:["height","paddingTop","paddingBottom"],d,c=b.toShow;if(b.horizontal){d=c[0].style.height;c.height(parseInt(c.parent().height(),10)-parseInt(c.css("paddingTop"),10)-parseInt(c.css("paddingBottom"),10)-(parseInt(c.css("borderTopWidth"),10)||0)-(parseInt(c.css("borderBottomWidth"),10)||0))}else{d=c[0].style.width;c.width(parseInt(c.parent().width(),10)-parseInt(c.css("paddingLeft"),10)-parseInt(c.css("paddingRight"),10)-(parseInt(c.css("borderLeftWidth"),10)||0)-(parseInt(c.css("borderRightWidth"),10)||0))}a.each(j,function(f,d){g[d]="hide";var c=(""+a.css(b.toShow[0],d)).match(/^([\d+-.]+)(.*)$/);e[d]={value:c?c[1]:0,unit:c?c[2]||"px":"px"}});b.toShow.css(b.horizontal?{width:0,overflow:"hidden"}:{height:0,overflow:"hidden"}).stop(true,true).show();b.toHide.filter(":hidden").each(b.complete).end().filter(":visible").stop(true,true).animate(g,{step:function(d,a){var c;if(a.prop===b.horizontal?"width":"height")f=a.end-a.start===0?0:(a.now-a.start)/(a.end-a.start);c=f*e[a.prop].value;if(c<0)c=0;b.toShow[0].style[a.prop]=c+e[a.prop].unit},duration:b.duration,easing:b.easing,complete:function(){!b.autoHeight&&b.toShow.css(b.horizontal?"width":"height","");b.toShow.css(b.horizontal?"height":"width",d);b.toShow.css({overflow:i});b.complete()}})},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1e3:200})}}})})(jQuery);
+(function(a){"use strict";a.fn.extend({getBounds:function(){return a.extend({},a(this).offset(),{width:a(this).outerWidth(true),height:a(this).outerHeight(true)})},setBounds:function(b){a(this).css({left:b.left,top:b.top}).width(b.width).height(b.height);return this},getMaxZIndex:function(){var b=(a(this).css("z-index")=="auto"?0:a(this).css("z-index"))*1;a(this).siblings().each(function(d,c){b=Math.max(b,(a(c).css("z-index")=="auto"?0:a(c).css("z-index"))*1)});return b}});a.widget("wijmo.wijpopup",{options:{ensureOutermost:false,showEffect:"show",showOptions:{},showDuration:300,hideEffect:"hide",hideOptions:{},hideDuration:100,autoHide:false,position:{at:"left bottom",my:"left top"},showing:null,shown:null,hiding:null,hidden:null,posChanged:null},_create:function(){if(window.wijmoApplyWijTouchUtilEvents)a=window.wijmoApplyWijTouchUtilEvents(a)},_init:function(){if(!!this.options.ensureOutermost){var b=a("form");if(b.length===0)b=a(document.body);this.element.appendTo(b)}this.element.data("visible.wijpopup",false);this.element.css("position","absolute");this.element.position({of:a(document.body)});this.element.hide()},_setOption:function(c){a.Widget.prototype._setOption.apply(this,arguments);if(c==="autoHide"){var b=this.isVisible();this.hide();b&&this.show()}},destroy:function(){a.Widget.prototype.destroy.apply(this,arguments);this.isVisible()&&this.hide();if(a.browser.msie&&a.browser.version<7){jFrame=this.element.data("backframe.wijpopup");!jFrame&&jFrame.remove()}var b=this;this.element.unbind(".wijpopup");a.each(["visible","backframe","animating","width"],function(c,a){b.element.removeData(a+".wijpopup")})},isVisible:function(){return!!this.element.data("visible.wijpopup")&&this.element.is(":visible")},isAnimating:function(){return!!this.element.data("animating.wijpopup")},_pushQueue:function(){var c=a(window),b=c.data("wijPopupQueue"),d;if(!b){b=[];c.data("wijPopupQueue",b)}return b.push(this)},show:function(d){this._setPosition(d);if(this.isVisible())return;if(this._trigger("showing")===false)return;var e=this;if(this.options.autoHide)this._pushQueue()===1&&a(document).bind("mouseup.wijpopup",function(a){e._onDocMouseUp(a)});var b=this.options.showEffect||"show",c=this.options.showDuration||300,f=this.options.showOptions||{};this.element.data("animating.wijpopup",true);if(a.effects&&a.effects[b])this.element.show(b,f,c,a.proxy(this._showCompleted,this));else this.element[b](b==="show"?null:c,a.proxy(this._showCompleted,this));(!b||!c||b==="show"||c<=0)&&this._showCompleted()},_showCompleted:function(){this.element.removeData("animating.wijpopup");this.element.data("visible.wijpopup",true);this._trigger("shown")},showAt:function(a,b){this.show({my:"left top",at:"left top",of:document.body,offset:""+a+" "+b})},hide:function(){if(!this.isVisible())return;if(this._trigger("hiding")===false)return;var b=this.options.hideEffect||"hide",c=this.options.hideDuration||300,d=this.options.hideOptions||{};this.element.data("animating.wijpopup",true);if(a.effects&&a.effects[b])this.element.hide(b,d,c,a.proxy(this._hideCompleted,this));else this.element[b](b==="hide"?null:c,a.proxy(this._hideCompleted,this));(!b||!c||b==="hide"||c<=0)&&this._hideCompleted()},_hideCompleted:function(){if(this.element.data("width.wijpopup")!==undefined){this.element.width(this.element.data("width.wijpopup"));this.element.removeData("width.wijpopup")}this.element.removeData("animating.wijpopup").unbind("move.wijpopup");if(a.browser.msie&&a.browser.version<7){var b=this.element.data("backframe.wijpopup");b&&b.hide()}this._trigger("hidden")},_onDocMouseUp:function(e){var f=a(window),c=a(e.target?e.target:e.srcElement),d=f.data("wijPopupQueue"),b;if(c.parents().hasClass("wijmo-wijcombobox-list")||c.parents().hasClass("wijmo-wijcalendar"))return;if(!!d){while(b=d.pop())if(b.isVisible()){if(!!b.options.autoHide){if(c.get(0)!=b.element.get(0)&&c.parents().index(b.element)<0)b.hide();else d.push(b);break}}else break;d.length===0&&a(document).unbind("mouseup.wijpopup")}},_onMove:function(){var a=this.element.data("backframe.wijpopup");if(a){this.element.before(a);a.css({top:this.element.css("top"),left:this.element.css("left")})}},_addBackgroundIFrame:function(){if(a.browser.msie&&a.browser.version<7){var b=this.element.data("backframe.wijpopup");if(!b){b=jQuery("<iframe/>").css({position:"absolute",display:"none",filter:"progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)"}).attr({src:"javascript:'<html></html>';",scrolling:"no",frameborder:"0","tabIndex ":-1});this.element.before(b);this.element.data("backframe.wijpopup",b);this.element.bind("move.wijpopup",a.proxy(this._onMove,this))}b.setBounds(this.element.getBounds());b.css({display:"block",left:this.element.css("left"),top:this.element.css("top"),"z-index":this.element.css("z-index")-1})}},_setZIndex:function(b){this.element.css("z-index",b);var a=this.element.data("backframe.wijpopup");a&&a.css("z-index",this.element.css("z-index")-1)},_setPosition:function(c){var d=this.element.is(":visible");this.element.show();this.element.position(a.extend({},this.options.position,c?c:{}));!d&&this.element.hide();this._addBackgroundIFrame();var b=1e3;if(this.options.position.of)b=Math.max(b,a(this.options.position.of).getMaxZIndex());this._setZIndex(b+10);this._trigger("posChanged")}})})(jQuery);
+(function(a){"use strict";var i="wijmo-wijsuperpanel ui-widget ui-widget-content",h="ui-corner-all",b="ui-state-disabled",f="ui-state-hover",g="ui-state-active",e="ui-state-default",c="wijmo-wijsuperpanel-handle",d="wijmo-wijsuperpanel-hbarcontainer",j="wijmo-wijsuperpanel-vbarcontainer",l="<div class='wijmo-wijsuperpanel-statecontainer'><div class='wijmo-wijsuperpanel-contentwrapper'><div class='wijmo-wijsuperpanel-templateouterwrapper'></div></div></div>",k="<div class='wijmo-wijsuperpanel-hbarcontainer ui-widget-header'><div class='wijmo-wijsuperpanel-handle ui-state-default ui-corner-all'><span class='ui-icon ui-icon-grip-solid-vertical'></span></div><div class='wijmo-wijsuperpanel-hbar-buttonleft ui-state-default ui-corner-bl'><span class='ui-icon ui-icon-triangle-1-w'></span></div><div class='wijmo-wijsuperpanel-hbar-buttonright ui-state-default ui-corner-br'><span class='ui-icon ui-icon-triangle-1-e'></span></div></div>",n="<div class='wijmo-wijsuperpanel-vbarcontainer ui-widget-header'><div class='wijmo-wijsuperpanel-handle ui-state-default ui-corner-all'><span class='ui-icon ui-icon-grip-solid-horizontal'></span></div><div class='wijmo-wijsuperpanel-vbar-buttontop ui-state-default ui-corner-tr'><span class='ui-icon ui-icon-triangle-1-n'></span></div><div class='wijmo-wijsuperpanel-vbar-buttonbottom ui-state-default ui-corner-br'><span class='ui-icon ui-icon-triangle-1-s'></span></div></div>",m="<div class='ui-state-default wijmo-wijsuperpanel-button wijmo-wijsuperpanel-buttonleft'><span class='ui-icon ui-icon-carat-1-w'></span></div><div class='ui-state-default wijmo-wijsuperpanel-button wijmo-wijsuperpanel-buttonright'><span class='ui-icon ui-icon-carat-1-e'></span></div>",o="<div class='ui-state-default wijmo-wijsuperpanel-button wijmo-wijsuperpanel-buttontop'><span class='ui-icon ui-icon-carat-1-n'></span></div><div class='ui-state-default wijmo-wijsuperpanel-button wijmo-wijsuperpanel-buttonbottom'><span class='ui-icon ui-icon-carat-1-s'></span></div>";a.widget("wijmo.wijsuperpanel",{options:{allowResize:false,autoRefresh:false,animationOptions:{queue:false,disabled:false,duration:250,easing:undefined},hScrollerActivating:null,hScroller:{scrollBarPosition:"bottom",scrollBarVisibility:"auto",scrollMode:"scrollBar",scrollValue:null,scrollMax:100,scrollMin:0,scrollLargeChange:null,scrollSmallChange:null,scrollMinDragLength:6,increaseButtonPosition:null,decreaseButtonPosition:null,hoverEdgeSpan:20,firstStepChangeFix:0},keyboardSupport:false,keyDownInterval:100,mouseWheelSupport:true,bubbleScrollingEvent:true,resizableOptions:{handles:"all",helper:"ui-widget-content wijmo-wijsuperpanel-helper"},resized:null,dragStop:null,painted:null,scrolling:null,scroll:null,scrolled:null,showRounder:true,vScrollerActivating:null,vScroller:{scrollBarPosition:"right",scrollBarVisibility:"auto",scrollMode:"scrollBar",scrollValue:null,scrollMax:100,scrollMin:0,scrollLargeChange:null,scrollSmallChange:null,scrollMinDragLength:6,increaseButtonPosition:null,decreaseButtonPosition:null,hoverEdgeSpan:20,firstStepChangeFix:0},customScrolling:false,listenContentScroll:false},_setOption:function(d,b){var c=this,h=c.options,g=c._fields(),e=g.hbarDrag,f=g.vbarDrag,i=g.resizer;if(d==="animationOptions")b=a.extend(h.animationOptions,b);else if(d==="hScroller"){if(b.scrollLargeChange!==undefined&&b.scrollLargeChange!==null)c._autoHLarge=false;b=a.extend(h.hScroller,b)}else if(d==="vScroller"){if(b.scrollLargeChange!==undefined&&b.scrollLargeChange!==null)c._autoVLarge=false;b=a.extend(h.vScroller,b)}else if(d==="resizableOptions")b=a.extend(c.resizableOptions,b);a.Widget.prototype._setOption.apply(c,arguments);if(a.isPlainObject(b))c.options[d]=b;switch(d){case"allowResize":c._initResizer();break;case"disabled":if(b){e!==undefined&&e.draggable("disable");f!==undefined&&f.draggable("disable");i!==undefined&&i.resizable("disable")}else{e!==undefined&&e.draggable("enable");f!==undefined&&f.draggable("enable");i!==undefined&&i.resizable("enable")}break;case"mouseWheelSupport":case"keyboardSupport":c._bindElementEvents(c,g,c.element,h)}return c},_create:function(){var b=this,c=b.options;c.vScroller.dir="v";c.hScroller.dir="h";if(window.wijmoApplyWijTouchUtilEvents)a=window.wijmoApplyWijTouchUtilEvents(a);b.paintPanel();b._initResizer();b.options.disabled&&b.disable();b._detectAutoRefresh();c.listenContentScroll&&b._listenContentScroll();b.element.is(":hidden")&&b.element.wijAddVisibilityObserver&&b.element.wijAddVisibilityObserver(function(){b.refresh();b.element.wijRemoveVisibilityObserver&&b.element.wijRemoveVisibilityObserver()},"wijsuperpanel")},_detectAutoRefresh:function(){var c=this,b=a.wijmo.wijsuperpanel.panels;if(b===undefined){b=[];a.wijmo.wijsuperpanel.panels=b}b.push(c);if(c.options.autoRefresh)if(!a.wijmo.wijsuperpanel.setAutoRefreshInterval){a.wijmo.wijsuperpanel.setAutoRefreshInterval=c._setAutoRefreshInterval;a.wijmo.wijsuperpanel.setAutoRefreshInterval()}},_setAutoRefreshInterval:function(){var b=a.wijmo.wijsuperpanel.autoRereshInterval,c=a.wijmo.wijsuperpanel.panels,d=window.setInterval(function(){window.clearInterval(d);for(var k=c.length,j=false,b,g,i,f,e,h=0;h<k;h++){b=c[h];g=b.element[0];i=b.options.autoRefresh;if(i)j=true;f=b.getContentElement();e=b._paintedMark;b.options.autoRefresh&&f.is(":visible")&&(e===undefined||e.width!==f[0].offsetWidth||e.height!==f[0].offsetHeight||e.mainWidth!==g.offsetWidth||e.mainHeight!==g.offsetHeight)&&b.paintPanel()}j&&window.setTimeout(a.wijmo.wijsuperpanel.setAutoRefreshInterval,0)},b===undefined?500:b)},destroy:function(){var c=this,b=c._fields(),d=c.element,f,e;a.wijmo.wijsuperpanel.panels=a.grep(a.wijmo.wijsuperpanel.panels,function(a){return a!==c});if(!b.initialized)return;c._radiusKey&&c.element.css(c._radiusKey,"");if(b.intervalID!==undefined){window.clearInterval(b.intervalID);b.intervalID=undefined}b.resizer!==undefined&&b.resizer.resizable("destroy");if(b.hbarContainer!==undefined){b.hbarDrag.remove();b.hbarContainer.unbind("."+c.widgetName)}if(b.vbarContainer!==undefined){b.vbarDrag.remove();b.vbarContainer.unbind("."+c.widgetName)}d.unbind("."+c.widgetName);b.contentWrapper.unbind("."+c.widgetName);f=b.stateContainer.find(">.wijmo-wijsuperpanel-button");f.unbind("."+c.widgetName);e=b.templateWrapper;e.contents().each(function(b,a){d.append(a)});b.stateContainer.remove();b.tabindex&&d.removeAttr("tabindex");d.removeClass(i+" "+h);a.Widget.prototype.destroy.apply(c,arguments)},_fields:function(){var b=this,c=b.element,d=b.widgetName+"-fields",a=b._fieldsStore;if(a===undefined){a={};c.data(d,a);b._fieldsStore=a}return a},_hasMode:function(c,d){var b=c.scrollMode.split(",");b=a.map(b,function(b){return a.trim(b).toLowerCase()});return a.inArray(d.toLowerCase(),b)>-1},_bindElementEvents:function(a,g,b,d){var e=a._hasMode(d.hScroller,"edge"),f=a._hasMode(d.vScroller,"edge"),c=a.widgetName;if(e||f){if(a._mousemoveBind===undefined){a._mousemoveBind=true;b.bind("mousemove."+c,a,a._contentMouseMove);b.bind("mouseleave."+c,null,function(){a._clearInterval()})}}else{b.unbind("mousemove",a._contentMouseMove);a._mousemoveBind=undefined}if(d.mouseWheelSupport){if(a._mouseWheelBind===undefined){a._mouseWheelBind=true;b.bind("mousewheel."+c,a,a._panelMouseWheel)}}else{a.element.unbind("mousewheel",a._panelMouseWheel);a._mouseWheelBind=undefined}if(d.keyboardSupport){if(a._keyboardBind===undefined){a._keyboardBind=true;b.bind("keydown."+c,a,a._panelKeyDown)}}else{b.unbind("keydown",a._panelKeyDown);a._keyboardBind=undefined}},_dragStop:function(d,b,c){var a={dragHandle:c};b._trigger("dragStop",d,a)},_contentMouseMove:function(g){var b=g.data,n=b.options,i,j,f,s,q,r,h,m,d,e,k,l,o,p,c;if(n.disabled)return;i=n.hScroller;j=n.vScroller;f=a(g.currentTarget);s=b._fields();q=b._hasMode(i,"edge");r=b._hasMode(j,"edge");b._clearInterval();h={X:g.pageX,Y:g.pageY};m=f.offset();d=m.left;e=m.top;d=h.X-d;e=h.Y-e;k=i.hoverEdgeSpan;l=j.hoverEdgeSpan;o=f.innerHeight();p=f.innerWidth();c="";if(q){if(d<k)c="left";if(d>p-k)c="right"}if(r){if(e<l)c="top";if(e>o-l)c="bottom"}b._setScrollingInterval(s,c,b,false)},_setScrollingInterval:function(d,b,a,c){var e=a.options;if(b.length>0)d.internalFuncID=window.setInterval(function(){a._doScrolling(b,a,c)},e.keyDownInterval)},_scrollButtonMouseOver:function(e){var c=e.data,d;if(c.options.disabled)return;d=a(e.currentTarget);if(!d.hasClass(b)){d.bind("mouseout."+c.widgetName,c,c._buttonMouseOut).bind("mousedown."+c.widgetName,c,c._buttonMouseDown).bind("mouseup."+c.widgetName,c,c._buttonMouseUp).addClass(f);c._buttonScroll(d,c,"buttonshover")}},_buttonScroll:function(c,a,f){var b="",g=a.options,h=a._fields(),d=a._hasMode(g.hScroller,f),e=a._hasMode(g.vScroller,f);if(c.hasClass("wijmo-wijsuperpanel-buttonleft")&&d)b="left";else if(c.hasClass("wijmo-wijsuperpanel-buttonright")&&d)b="right";else if(c.hasClass("wijmo-wijsuperpanel-buttontop")&&e)b="top";else if(c.hasClass("wijmo-wijsuperpanel-buttonbottom")&&e)b="bottom";if(b.length>0){a._clearInterval();a._doScrolling(b,a,true);a._setScrollingInterval(h,b,a,true)}},_listenContentScroll:function(){var b=this,f=b.options,a=b._fields(),h=a.hbarContainer,k=a.hbarDrag,i=a.vbarContainer,l=a.vbarDrag,c=a.templateWrapper,d=a.contentWrapper,n=d.width(),m=d.height(),e=c&&c.offset(),o=e&&e.left,p=e&&e.top,j=a.contentWidth,g=a.contentHeight;d.bind("scroll",function(){var o=c.position(),a=o.left,e=o.top;d.scrollTop(0).scrollLeft(0);c.css({left:a,top:e});if(a<=0&&a>n-j){f.hScroller.scrollValue=b.scrollPxToValue(-a,"h");b._scrollDrag("h",h,k,true)}if(e<=0&&e>m-g){f.vScroller.scrollValue=b.scrollPxToValue(-e,"v");b._scrollDrag("v",i,l,true)}})},_buttonMouseDown:function(e){var d=e.data,c;if(d.options.disabled)return;c=a(e.currentTarget);if(!c.hasClass(b)){c.addClass(g);d._buttonScroll(c,d,"buttons")}},_buttonMouseUp:function(b){var d=b.data,c=a(b.currentTarget);c.removeClass("ui-state-active");d._clearInterval()},_buttonMouseOut:function(c){var b=c.data,d=a(c.currentTarget);d.unbind("mouseout",b._buttonMouseOut).unbind("mousedown",b._buttonMouseDown).unbind("mouseup",b._buttonMouseUp).removeClass(f).removeClass(g);b._clearInterval()},_panelKeyDown:function(e){var b=e.data,f=b.options,d,c;if(!f.keyboardSupport||f.disabled)return;d=e.shiftKey;c=e.keyCode;if(c===a.ui.keyCode.LEFT)b._doScrolling("left",b,d);else if(c===a.ui.keyCode.RIGHT)b._doScrolling("right",b,d);else if(c===a.ui.keyCode.UP)b._doScrolling("top",b,d);else c===a.ui.keyCode.DOWN&&b._doScrolling("bottom",b,d);e.stopPropagation();e.preventDefault()},_draggingInternal:function(n,a,b,k){var d=b.dir,j=d==="h",h=j?"left":"top",o=n.position[h]-a._getScrollContainerPadding(h),m=a._getTrackLen(d)-k[j?"outerWidth":"outerHeight"](true),l=o/m,e=b.scrollMax-b.scrollLargeChange+1,c=l*e,g,f,i;if(c<b.scrollMin)c=b.scrollMin;if(c>e)c=e;g={oldValue:b.scrollValue,newValue:c,dir:d};if(!a._scrolling(true,a,g))return;if(a.customScroll){i=Math.abs(a.customScroll);f=a.scrollPxToValue(i,b.dir)}b.scrollValue=f||c;a.customScroll=undefined;a._setDragAndContentPosition(true,false,d,"dragging")},_dragging:function(g,e,b){var f=b.options,c=a(g.target),h=c.parent();if(h.hasClass(d))b._draggingInternal(e,b,f.hScroller,c);else b._draggingInternal(e,b,f.vScroller,c)},_panelMouseWheel:function(h,l){var c=h.data,i=c.options,k,b,j,f,g,e;if(!i.mouseWheelSupport||i.disabled)return;k=a(h.srcElement||h.originalEvent.target);b="";j=k.closest("."+d,c.element).size()>0;f=i.hScroller;g=i.vScroller;if(l>0)b=j?"left":"top";else b=j?"right":"bottom";b.length>0&&c._doScrolling(b,c);e=false;if(b==="left")e=!c.hNeedScrollBar||Math.abs(f.scrollValue-f.scrollMin)<.001;if(b==="right")e=!c.hNeedScrollBar||Math.abs(f.scrollValue-(f.scrollMax-c._getHScrollBarLargeChange()+1))<.001;if(b==="top")e=!c.vNeedScrollBar||Math.abs(g.scrollValue-g.scrollMin)<.001;if(b==="bottom")e=!c.vNeedScrollBar||Math.abs(g.scrollValue-(g.scrollMax-c._getVScrollBarLargeChange()+1))<.001;if(!e||!i.bubbleScrollingEvent||b==="left"||b==="right"){h.stopPropagation();h.preventDefault()}},_documentMouseUp:function(c){var b=c.data.self,d=c.data.ele;d.removeClass(g);b._clearInterval();a(document).unbind("mouseup",b._documentMouseUp)},_scrollerMouseOver:function(i){var b=i.data,g,c,h;if(b.options.disabled)return;g=a(i.srcElement||i.originalEvent.target);c=null;h=false;if(g.hasClass(e)){c=g;h=true}else if(g.parent().hasClass(e)){c=g.parent();h=true}else if(g.hasClass(j)||g.hasClass(d))c=g;if(c!==undefined){h&&c.addClass(f);c.bind("mouseout."+b.widgetName,b,b._elementMouseOut);c.bind("mousedown."+b.widgetName,b,b._elementMouseDown);c.bind("mouseup."+b.widgetName,b,b._elementMouseUp)}},_elementMouseUp:function(c){var b=a(c.currentTarget);b.removeClass("ui-state-active")},_elementMouseDown:function(i){var b=a(i.currentTarget),f=i.data,e,h,g,k,n,l,m,o;if(f.options.disabled||i.which!==1)return;e="";h=false;g=false;if(b.hasClass("wijmo-wijsuperpanel-vbar-buttontop")){e="top";g=true}else if(b.hasClass("wijmo-wijsuperpanel-vbar-buttonbottom")){e="bottom";g=true}else if(b.hasClass("wijmo-wijsuperpanel-hbar-buttonleft")){e="left";g=true}else if(b.hasClass("wijmo-wijsuperpanel-hbar-buttonright")){e="right";g=true}else if(b.hasClass(c)){b.addClass("ui-state-active");return}else if(b.hasClass(d)){k=b.find("."+c);n=k.offset();if(i.pageX<n.left)e="left";else e="right";h=true}else if(b.hasClass(j)){l=b.find("."+c);m=l.offset();if(i.pageY<m.top)e="top";else e="bottom";h=true}f._clearInterval();f._doScrolling(e,f,h);o=f._fields();f._setScrollingInterval(o,e,f,h);g&&b.addClass("ui-state-active");a(document).bind("mouseup."+f.widgetName,{self:f,ele:b},f._documentMouseUp)},doScrolling:function(b,a){this._doScrolling(b,this,a)},_setScrollerValue:function(p,b,n,h,o,j,c){var f=b.scrollMin,k=j?h:n,d=b.scrollValue,a,e,g,l,i,m;if(!d)d=f;a=0;if(o){e=b.scrollMax-h+1;if(Math.abs(d-e)<.001){c._clearInterval();return false}g=b.firstStepChangeFix;a=d+k;if(!j&&Math.abs(d-f)<.0001&&!isNaN(g))a+=g;if(a>e)a=e}else{if(Math.abs(d-f)<.001){c._clearInterval();return false}a=d-k;if(a<0)a=f}l={oldValue:b.scrollValue,newValue:a,direction:p,dir:b.dir};if(!c._scrolling(true,c,l))return false;if(c.customScroll){m=Math.abs(c.customScroll);i=c.scrollPxToValue(m,b.dir)}b.scrollValue=i||a;c.customScroll=undefined;return true},_doScrolling:function(a,b,c){var d=b.options,f=d.vScroller,e=d.hScroller,j=b._getVScrollBarSmallChange(),i=b._getVScrollBarLargeChange(),g=b._getHScrollBarLargeChange(),h=b._getHScrollBarSmallChange();if(a==="top"||a==="bottom"){if(!b._setScrollerValue(a,f,j,i,a==="bottom",c,b))return;a="v"}else if(a==="left"||a==="right"){if(!b._setScrollerValue(a,e,h,g,a==="right",c,b))return;a="h"}b._setDragAndContentPosition(true,true,a)},_disableButtonIfNeeded:function(h){var a=h._fields(),c,f,j,g,i,m,o,d,k,n,p,e,l;a.intervalID>0&&window.clearInterval(a.intervalID);c=h.options;f=a.buttonLeft;j=a.buttonRight;g=a.buttonTop;i=a.buttonBottom;if(f!==undefined){m=h._getHScrollBarLargeChange();o=c.hScroller.scrollMax-m+1;d=c.hScroller.scrollValue;k=c.hScroller.scrollMin;if(d===undefined)d=k;if(Math.abs(d-k)<.001||!a.hScrolling)f.addClass(b);else f.removeClass(b);if(Math.abs(d-o)<.001||!a.hScrolling)j.addClass(b);else j.removeClass(b)}if(g!==undefined){n=h._getVScrollBarLargeChange();p=c.vScroller.scrollMax-n+1;e=c.vScroller.scrollValue;l=c.vScroller.scrollMin;if(e===undefined)e=l;if(Math.abs(e-l)<.001||!a.vScrolling)g.addClass(b);else g.removeClass(b);if(Math.abs(e-p)<.001||!a.vScrolling)i.addClass(b);else i.removeClass(b)}},_clearInterval:function(){var b=this._fields(),a=b.internalFuncID;if(a>0){window.clearInterval(a);b.internalFuncID=-1}},_elementMouseOut:function(d){var b=a(d.currentTarget),c=d.data;b.unbind("mouseout",c._elementMouseOut);b.unbind("mousedown",c._elementMouseDown);b.unbind("mouseup",c._elementMouseUp);b.removeClass(f)},_getScrollOffset:function(n){var i=a(n),l,e,m,b,f,c,h,j,g,k,d={left:null,top:null};if(i.size()===0)return d;l=this._fields();e=l.contentWrapper;m=l.templateWrapper;b=i.offset();f=m.offset();b.leftWidth=b.left+i.outerWidth();b.topHeight=b.top+i.outerHeight();c=e.offset();c.leftWidth=c.left+e.outerWidth();c.topHeight=c.top+e.outerHeight();g=b.left-f.left;if(b.left<c.left)d.left=g;else if(b.leftWidth>c.leftWidth){k=b.leftWidth-f.left-e.innerWidth();if(g<k)d.left=g;else d.left=k}h=b.top-f.top;if(b.top<c.top)d.top=h;else if(b.topHeight>c.topHeight){j=b.topHeight-f.top-e.innerHeight();if(h<j)d.top=h;else d.top=j}return d},_scrollDrag:function(c,o,i,n){var a=this,m=a.options,d=c==="v",b=d?m.vScroller:m.hScroller,g=b.scrollMin,q=b.scrollMax,f=b.scrollValue===undefined?g:b.scrollValue-g,p=a._getLargeChange(c),h=q-g-p+1,e=-1,k,l,j;if(f>h)f=h;if(o!==undefined){k=a._getTrackLen(c);l=i[d?"outerHeight":"outerWidth"]();j=a._getScrollContainerPadding(d?"top":"left");e=f/h*(k-l)+j}e>=0&&i.css(d?"top":"left",e+"px");a._scrollEnd(n,a,c)},needToScroll:function(b){var a=this._getScrollOffset(b);return a.top!==null||a.left!==null},scrollChildIntoView:function(d){var a=this._getScrollOffset(d),b=a.left,c=a.top;b!==null&&this.hScrollTo(b);c!==null&&this.vScrollTo(c)},hScrollTo:function(b){var a=this.options;a.hScroller.scrollValue=this.scrollPxToValue(b,"h");this._setDragAndContentPosition(true,true,"h","nonestop")},vScrollTo:function(b){var a=this.options;a.vScroller.scrollValue=this.scrollPxToValue(b,"v");this._setDragAndContentPosition(true,true,"v","nonestop")},scrollPxToValue:function(o,b){var g=this.options,p=b==="h"?"outerWidth":"outerHeight",n=b==="h"?"contentWidth":"contentHeight",e=b==="h"?"hScroller":"vScroller",f=this._fields(),j=f.contentWrapper,l=f[n],h=j[p](),d=g[e].scrollMin,m=g[e].scrollMax,k=m-d,i=b==="h"?this._getHScrollBarLargeChange():this._getVScrollBarLargeChange(),c=k-i+1,a=c*(o/(l-h));if(a<d)a=d;if(a>c)a=c;return a},scrollTo:function(a,b){this.hScrollTo(a);this.vScrollTo(b)},refresh:function(){this.paintPanel()},paintPanel:function(h){var b=this,e=b.element,g,f,c,d;if(e.is(":visible")){g=typeof document.activeElement!="unknown"?document.activeElement:undefined;f=b.options;c=b._fields();!c.initialized&&b._initialize(c,e,b);b._resetLargeChange(b,c,f);b._bindElementEvents(b,c,e,f);d=c.templateWrapper;d.css({"float":"left",left:"0px",top:"0px",width:"auto",height:"auto"});d.hide();d.show();c.contentWidth=d.width();c.contentHeight=d.height();d.css("float","");b._setRounder(b,e);b._setInnerElementsSize(c,e);if(b._testScroll(b,c,f)===false)return false;b._initScrollBars(b,c,f);b._initScrollButtons(b,c,f);b._trigger("painted");b._paintedMark={date:new Date,mainWidth:e[0].offsetWidth,mainHeight:e[0].offsetHeight,width:c.contentWidth,height:c.contentWidth};g!==undefined&&!h&&a(g).focus();return true}return false},_resetLargeChange:function(d,a,e){var b;if(d._autoVLarge)e.vScroller.scrollLargeChange=null;if(d._autoHLarge)e.hScroller.scrollLargeChange=null;a.vTrackLen=undefined;a.hTrackLen=undefined;if(a.vbarContainer){b=a.vbarContainer.children("."+c+":eq(0)");b.detach();a.vbarContainer.remove();a.vbarContainer=undefined}if(a.hbarContainer){b=a.hbarContainer.children("."+c+":eq(0)");b.detach();a.hbarContainer.remove();a.hbarContainer=undefined}},_initialize:function(b,a,c){b.initialized=true;a.addClass(i);b.oldHeight=a.css("height");var d=a.css("overflow");a.css("overflow","");a.height(a.height());a.css("overflow",d);c._createAdditionalDom(c,b,a)},getContentElement:function(){return this._fields().templateWrapper},_setButtonPosition:function(f,s,g,r,n,d,k){var b=r==="h",q="mouseover."+f.widgetName,i=b?"buttonLeft":"buttonTop",j=b?"buttonRight":"buttonBottom",e=d[i],h=d[j],p,l,c;if(f._hasMode(g,"buttons")||f._hasMode(g,"buttonshover")){p=b?m:o;if(e===undefined){l=a(p).appendTo(k);l.bind(q,f,f._scrollButtonMouseOver);d[i]=e=k.children(b?".wijmo-wijsuperpanel-buttonleft":".wijmo-wijsuperpanel-buttontop");d[j]=h=k.children(b?".wijmo-wijsuperpanel-buttonright":".wijmo-wijsuperpanel-buttonbottom")}c={my:b?"left":"top",of:n,at:b?"left":"top",collision:"none"};a.extend(c,g.decreaseButtonPosition);e.position(c);c={my:b?"right":"bottom",of:n,at:b?"right":"bottom",collision:"none"};a.extend(c,g.increaseButtonPosition);h.position(c)}else if(e!==undefined){e.remove();h.remove();d[i]=d[j]=undefined}},_initScrollButtons:function(a,b,c){var e=b.contentWrapper,d=b.stateContainer;a._setButtonPosition(a,c,c.hScroller,"h",e,b,d);a._setButtonPosition(a,c,c.vScroller,"v",e,b,d)},_getVScrollBarSmallChange:function(){var a=this.options,b;if(!a.vScroller.scrollSmallChange){b=this._getVScrollBarLargeChange();a.vScroller.scrollSmallChange=b/2}return a.vScroller.scrollSmallChange},_getVScrollBarLargeChange:function(){return this._getLargeChange("v")},_getLargeChange:function(q){var f=this,m=f.options,l=f._fields(),c=q==="v",a=c?m.vScroller:m.hScroller,n=c?"innerHeight":"innerWidth",o=c?"contentHeight":"contentWidth",p=c?"_autoVLarge":"_autoHLarge",j,k,i,h,d,g,e,b;if(a.scrollLargeChange)return a.scrollLargeChange;j=a.scrollMax;k=a.scrollMin;i=j-k;h=l.contentWrapper;d=h[n]();g=l[o];e=d/(g-d);b=(i+1)*e/(1+e);if(isNaN(b))b=0;a.scrollLargeChange=b;f[p]=true;return a.scrollLargeChange},_getHScrollBarSmallChange:function(){var a=this.options,b;if(!a.hScroller.scrollSmallChange){b=this._getHScrollBarLargeChange();a.hScroller.scrollSmallChange=b/2}return a.hScroller.scrollSmallChange},_getHScrollBarLargeChange:function(){return this._getLargeChange("h")},_initScrollBars:function(b,r,e){var p=e.hScroller,u=p.scrollMax,v=p.scrollMin,s=u-v,q=e.vScroller,w=q.scrollMax,x=q.scrollMin,t=w-x,c=r.hbarDrag,d=r.vbarDrag,l,j,g,o,k,m,h,f,n,i;if(b.hNeedScrollBar&&c.is(":visible")){l=b._getHScrollBarLargeChange();j=b._getTrackLen("h");g=b._getDragLength(s,l,j,e.hScroller.scrollMinDragLength);c.width(g);o=c.outerWidth(true)-c.width();c.width(g-o);k=c.children("span");k.css("margin-left",(c.width()-k[0].offsetWidth)/2);if(j<=c.outerWidth(true))c.hide();else c.show();if(b._isDragging==true){a(document).trigger("mouseup");b._isDragging=false}}if(b.vNeedScrollBar&&d.is(":visible")){m=b._getVScrollBarLargeChange();h=b._getTrackLen("v");f=b._getDragLength(t,m,h,e.vScroller.scrollMinDragLength);d.height(f);n=d.outerHeight(true)-d.height();d.height(f-n);i=d.children("span");i.css("margin-top",(d.height()-i[0].offsetHeight)/2);if(h<=d.outerHeight(true))d.hide();else d.show();if(b._isDragging==true){a(document).trigger("mouseup");b._isDragging=false}}b._setDragAndContentPosition(false,false,"both")},_getTrackLen:function(f){var e=this,a=e._fields(),d=f+"TrackLen",g,h,c,b;if(a[d]!==undefined)return a[d];g=a.hbarContainer;h=a.vbarContainer;c=0;b=0;if(f==="h"){b=e._getScrollContainerPadding("h");c=g.innerWidth()}if(f==="v"){b=e._getScrollContainerPadding("v");c=h.innerHeight()}a[d]=c-b;return a[d]},_getScrollContainerPadding:function(b){var d=this,e=d._fields(),a=0,c,f;if(b==="h")a=d._getScrollContainerPadding("left")+d._getScrollContainerPadding("right");else if(b==="v")a=d._getScrollContainerPadding("top")+d._getScrollContainerPadding("bottom");else{if(b==="left"||b==="right")c=e.hbarContainer;else c=e.vbarContainer;f=b+"Padding";if(e[f]!==undefined){a=e[f];return a}if(c&&c.css)a=parseFloat(c.css("padding-"+b));e[f]=a}return a},_triggerScroll:function(b,d,a){var c={position:b,dir:d,animationOptions:a};this._trigger("scroll",null,c)},_contentDragAnimate:function(e,q,C,i,A,o,w){var b=this,d=b.options,f=e==="v",j=f?d.vScroller:d.hScroller,H=f?"outerHeight":"outerWidth",I=f?"innerHeight":"innerWidth",E=f?"contentHeight":"contentWidth",F=f?"top":"left",r=j.scrollMin,K=j.scrollMax,J=K-r,h=j.scrollValue===undefined?r:j.scrollValue-r,D=b._getLargeChange(e),m=J-D+1,t=b._fields(),G=t.contentWrapper,l=t.templateWrapper,c,g,y,z,B,x,n,v,k,p,u,s;if(h>m)h=m;c=(t[E]-G[I]())*(h/m);if(Math.abs(c)<.001)c=0;c=Math.round(c);g=-1;if(C!==undefined){q&&i.is(":animated")&&A!=="nonestop"&&i.stop(true,false);y=b._getTrackLen(e);z=i[H](true);B=y-z;x=b._getScrollContainerPadding(F);g=h/m*B+x}if(q&&d.animationOptions&&!d.animationOptions.disabled){if(g>=0&&w!=="dragging"){n=a.extend({},d.animationOptions);n.complete=undefined;v=f?{top:g}:{left:g};i.animate(v,n)}k=a.extend({},d.animationOptions);p=d.animationOptions.complete;k.complete=function(){b._scrollEnd(o,b,e);a.isFunction(p)&&p(arguments)};q&&l.is(":animated")&&A!=="nonestop"&&l.stop(true,false);u=f?{top:-c}:{left:-c};if(!d.customScrolling)l.animate(u,k);else b._scrollEnd(o,b,e,h);b._triggerScroll(c,e,k)}else if(j.scrollBarVisibility!=="hidden"){s=f?"top":"left";if(g>=0&&w!=="dragging")i[0].style[s]=g+"px";if(!d.customScrolling)l[0].style[s]=-c+"px";b._triggerScroll(c,e);b._scrollEnd(o,b,e,h)}},_setDragAndContentPosition:function(d,e,c,g,f){var b=this,a=b._fields(),h=a.hbarContainer,j=a.hbarDrag,i=a.vbarContainer,k=a.vbarDrag;(c==="both"||c==="h")&&a.hScrolling&&b._contentDragAnimate("h",e,h,j,g,d,f);(c==="both"||c==="v")&&a.vScrolling&&b._contentDragAnimate("v",e,i,k,g,d,f);a.intervalID>0&&window.clearInterval(a.intervalID);a.intervalID=window.setInterval(function(){b._disableButtonIfNeeded(b)},500)},_scrolling:function(d,a,b){var c=true;if(d){b.beforePosition=a.getContentElement().position();a._beforePosition=b.beforePosition;c=a._trigger("scrolling",null,b);a.customScroll=b.customScroll}return c},_scrollEnd:function(c,a,d,b){c&&window.setTimeout(function(){var f=a.getContentElement(),e,c;if(!f.is(":visible"))return;e=a.getContentElement().position();c={dir:d,beforePosition:a._beforePosition,afterPosition:e};if(!isNaN(b))c.newValue=b;a._trigger("scrolled",null,c)},0)},_getDragLength:function(f,d,b,g){var e=f/d,a=b/e,c=g;if(a<c)a=c;else if(a+1>=b)a=b-1;return Math.round(a)},_needScrollbar:function(b,e){var d=this._hasMode(b,"scrollbar"),a=b.scrollBarVisibility,c=d&&(a==="visible"||a==="auto"&&e);return c},_bindBarEvent:function(d,e,c){var b=this;d.bind("mouseover."+b.widgetName,b,b._scrollerMouseOver);e.draggable({axis:c==="h"?"x":"y",start:function(){b._isDragging=true},drag:function(c,a){b._dragging(c,a,b)},containment:"parent",stop:function(d){b._dragStop(d,b,c);a(d.target).removeClass("ui-state-active");b._isDragging=false}})},_createBarIfNeeded:function(o,m,e,q,i){if(o){var h=this,j,l=h._fields(),n=e+"barContainer",p=e+"barDrag",b=e==="h",d=i[b?"innerHeight":"innerWidth"](),f=l[n]=a(q),g,k;m.append(f);g=f[0][b?"offsetHeight":"offsetWidth"];d=d-g;j={direction:b?"horizontal":"vertical",targetBarLen:g,contentLength:d};if(h._trigger(b?"hScrollerActivating":"vScrollerActivating",null,j)===false)return false;k=l[p]=f.find("."+c);h._bindBarEvent(f,k,e);i[b?"height":"width"](d)}},_setScrollbarPosition:function(u,p,f,a,s,r,h,q,c,g,t){var b=g==="h",e,m,i,n,j,o,k,l,d;if(r){e=a[0][b?"offsetHeight":"offsetWidth"];m=p._getScrollContainerPadding(g);i=b?"top":"left";n=b?{top:"0px",bottom:"auto",left:"auto",right:"auto"}:{left:"0px",right:"auto",top:"auto",bottom:"auto"};j=b?{top:e+"px"}:{left:e+"px"};o=b?{top:"auto",right:"auto",left:"auto",bottom:"0px"}:{left:"auto",right:"0px",top:"auto",bottom:"auto"};k=b?{top:""}:{left:""};l=f[b?"innerWidth":"innerHeight"]();if(q===i){a.css(n);f.css(j);if(b){a.children(".wijmo-wijsuperpanel-hbar-buttonleft").removeClass("ui-corner-bl").addClass("ui-corner-tl");a.children(".wijmo-wijsuperpanel-hbar-buttonright").removeClass("ui-corner-br").addClass("ui-corner-tr");a.removeClass("ui-corner-bottom").addClass("ui-corner-top")}else{a.children(".wijmo-wijsuperpanel-vbar-buttontop").removeClass("ui-corner-tr").addClass("ui-corner-tl");a.children(".wijmo-wijsuperpanel-vbar-buttonbottom").removeClass("ui-corner-br").addClass("ui-corner-bl");a.removeClass("ui-corner-right").addClass("ui-corner-left")}}else{a.css(o);f.css(k);if(b){a.children(".wijmo-wijsuperpanel-hbar-buttonleft").removeClass("ui-corner-tl").addClass("ui-corner-bl");a.children(".wijmo-wijsuperpanel-hbar-buttonright").removeClass("ui-corner-bl").addClass("ui-corner-br");a.removeClass("ui-corner-top").addClass("ui-corner-bottom")}else{a.children(".wijmo-wijsuperpanel-vbar-buttontop").removeClass("ui-corner-tl").addClass("ui-corner-tr");a.children(".wijmo-wijsuperpanel-vbar-buttonbottom").removeClass("ui-corner-bl").addClass("ui-corner-br");a.removeClass("ui-corner-left").addClass("ui-corner-right")}}d=0;if(h){d=s[0][b?"offsetWidth":"offsetHeight"];if(c==="left")a.css("right","0px");else if(c==="right")a.css("left","0px");else if(c==="top")a.css("bottom","0px");else c==="bottom"&&a.css("top","0px")}if(!b&&h)d=0;a[b?"width":"height"](l-m);p._enableDisableScrollBar(g,a,!t)}else u.css(b?"left":"top","")},_testScroll:function(b,a,g){var d=a.templateWrapper,e=a.contentWrapper,h=a.stateContainer,p=e.innerWidth(),o=e.innerHeight(),r=a.contentWidth,q=a.contentHeight,c,f,i,j,l,m;a.hScrolling=r>p;a.vScrolling=q>o;c=b.hNeedScrollBar=b._needScrollbar(g.hScroller,a.hScrolling);if(b._createBarIfNeeded(c,h,"h",k,e)===false)return false;if(c&&!a.vScrolling){d.css("float","left");a.contentHeight=d.height();a.vScrolling=a.contentHeight>o-a.hbarContainer[0].offsetHeight;d.css("float","")}f=b.vNeedScrollBar=b._needScrollbar(g.vScroller,a.vScrolling);if(b._createBarIfNeeded(f,h,"v",n,e)===false)return false;if(f&&!a.hScrolling){d.css("float","left");a.contentWidth=d.width();a.hScrolling=a.contentWidth>p-a.vbarContainer[0].offsetWidth;d.css("float","");if(a.hScrolling&&!c){c=b.hNeedScrollBar=b._needScrollbar(g.hScroller,a.hScrolling);if(b._createBarIfNeeded(c,h,"h",k,e)===false)return false}}i=a.hbarContainer;j=a.vbarContainer;l=g.hScroller.scrollBarPosition;m=g.vScroller.scrollBarPosition;b._setScrollbarPosition(d,b,e,i,j,c,f,l,m,"h",a.hScrolling);b._setScrollbarPosition(d,b,e,j,i,f,c,m,l,"v",a.vScrolling)},_enableDisableScrollBar:function(f,a,d){if(f==="v"){a[d?"addClass":"removeClass"]("wijmo-wijsuperpanel-vbarcontainer-disabled");a.find("."+e)[d?"addClass":"removeClass"](b)}else if(f==="h"){a[d?"addClass":"removeClass"]("wijmo-wijsuperpanel-hbarcontainer-disabled");a.find("."+e)[d?"addClass":"removeClass"](b)}a.children("."+c)[d?"hide":"show"]()},_initResizer:function(){var b=this,g=b.options,d=b._fields(),f=d.resizer,c,e;if(!f&&g.allowResize){c=g.resizableOptions;e=c.stop;c.stop=function(c){b._resizeStop(c,b);a.isFunction(e)&&e(c)};d.resizer=f=b.element.resizable(c)}if(!g.allowResize&&d.resizer){f.resizable("destroy");d.resizer=null}},_resizeStop:function(b,a){!this.options.autoRefresh&&a.paintPanel(true);a._trigger("resized")},_createAdditionalDom:function(f,b,c){if(!c.attr("tabindex")){c.attr("tabindex","-1");b.tabindex=true}var d=b.stateContainer=a(l),e;b.contentWrapper=d.children();e=b.templateWrapper=b.contentWrapper.children();c.contents().each(function(f,d){var c=a(d);if(c.hasClass("wijmo-wijsuperpanel-header")){b.header=c;return}if(c.hasClass("wijmo-wijsuperpanel-footer")){b.footer=c;return}e[0].appendChild(d)});b.header!==undefined&&c.prepend(b.header);c[0].appendChild(d[0]);b.footer!==undefined&&b.footer.insertAfter(d)},_setRounder:function(e,d){if(this.options.showRounder){d.addClass(h);if(e._rounderAdded)return;if(a.browser.msie)return;var b,c,g,f;b=c="";if(a.browser.webkit){c="WebkitBorderTopLeftRadius";b="WebkitBorderRadius"}else if(a.browser.mozilla){c="MozBorderRadiusBottomleft";b="MozBorderRadius"}else{c="border-top-left-radius";b="border-radius"}g=d.css(c);f=parseInt(g,10);d.css(b,f+1);e._rounderAdded=true;e._radiusKey=b}else d.removeClass(h)},_setInnerElementsSize:function(a,g){var i=a.stateContainer,h=a.contentWrapper,e=0,b,c,d,f;if(a.header!==undefined)e+=a.header.outerHeight();if(a.footer!==undefined)e+=a.footer.outerHeight();b=i[0].style;c=g.innerHeight()-e;d=g.innerWidth();b.display="none";b.height=c+"px";b.width=d+"px";f=h[0].style;f.height=c+"px";f.width=d+"px";b.display=""}})})(jQuery);
+(function(a){"use strict";a.widget("wijmo.wijtextbox",{options:{},_create:function(){var b=this,c=b.element,f={input:true,textarea:true},e={text:true,password:true,email:true,url:true},d=c.get(0).nodeName.toLowerCase();if(window.wijmoApplyWijTouchUtilEvents)a=window.wijmoApplyWijTouchUtilEvents(a);if(!f.hasOwnProperty(d))return;if(d==="input"&&!e.hasOwnProperty(b.element.attr("type").toLowerCase()))return;c.addClass("wijmo-wijtextbox ui-widget ui-state-default ui-corner-all");b.element.bind("mouseover."+b.widgetName,function(){c.addClass("ui-state-hover")}).bind("mouseout."+b.widgetName,function(){c.removeClass("ui-state-hover")}).bind("mousedown."+b.widgetName,function(){c.addClass("ui-state-active")}).bind("mouseup."+b.widgetName,function(){c.removeClass("ui-state-active")}).bind("focus."+b.widgetName,function(){c.addClass("ui-state-focus")}).bind("blur."+b.widgetName,function(){c.removeClass("ui-state-focus")});if(c.is(":disabled")){b._setOption("disabled",true);c.addClass("ui-state-disabled")}else{b._setOption("disabled",false);c.removeClass("ui-state-disabled")}},destroy:function(){var b=this;b.element.removeClass("ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active wijmo-wijtextbox").unbind("."+b.widgetName);a.Widget.prototype.destroy.apply(b)}})})(jQuery);
+(function(a){"use strict";a.widget("wijmo.wijdropdown",{options:{zIndex:1e3,showingAnimation:{effect:"blind"},hidingAnimation:{effect:"blind"}},hoverClass:"ui-state-hover",activeClass:"ui-state-active",focusClass:"ui-state-focus",_setOption:function(c,b){a.Widget.prototype._setOption.apply(this,arguments);if(c==="disabled"){this._labelWrap.toggleClass("ui-state-disabled",b);this.element.attr("disabled",b?"disabled":"")}},_create:function(){var b=this,c=b.element;if(window.wijmoApplyWijTouchUtilEvents)a=window.wijmoApplyWijTouchUtilEvents(a);if(c.get(0).tagName.toLowerCase()!=="select")return;if(c.is(":visible")){b._activeItem=null;b._createSelect();b._bindEvents();b.needInit=false}else b.needInit=true;b.element.is(":hidden")&&b.element.wijAddVisibilityObserver&&b.element.wijAddVisibilityObserver(function(){b.refresh();b.element.wijRemoveVisibilityObserver&&b.element.wijRemoveVisibilityObserver()},"wijdropdown")},_createSelect:function(){var b=this,c=b.element,k=c.width(),f=k,j=c.wrap("<div></div>").parent().addClass("ui-helper-hidden"),d=j.wrap("<div></div>").parent().attr("role","select").addClass("wijmo-wijdropdown ui-widget ui-widwijmo-wijdropdownt-content ui-state-default ui-corner-all ui-helper-clearfix"),h=a('<label class="wijmo-dropdown-label ui-corner-all"></label>').attr("id",c.get(0).id+"_select").attr("name",c.attr("name")||""),i=a("<div></div>").addClass("wijmo-dropdown-trigger ui-state-default ui-corner-right"),e=a('<a href="#"></a>'),g=a("<div>").addClass("wijmo-dropdown"),l=a("<ul></ul>").addClass("wijmo-dropdown-list ui-widget-content ui-widget ui-corner-all ui-helper-reset").appendTo(g);a("<span></span>").addClass("ui-icon ui-icon-triangle-1-s").appendTo(i);k=Math.max(k,d.width());c.get(0).tabIndex!==""&&e.attr("tabindex",c.attr("tabindex"));if(c.get(0).disabled!==false){b.options.disabled=true;e.addClass("ui-state-disabled")}e.append(h);d.append(j).append(e).append(i).append(g);f+=parseInt(h.css("padding-left").replace(/px/,""),10);f+=parseInt(h.css("padding-right").replace(/px/,""),10);f-=16;d.width(f);b._buildList(l,g,f);b._rightTrigger=i;b._label=h;b._listContainer=g;b._list=l;b._value=c.val();b._selectedIndex=a("option",c).index(c.find("option:selected"));b._selectWrap=j;b._labelWrap=e;b._container=d;d.attr("title",c.attr("title"));c.removeAttr("title")},_buildList:function(c,b,f){var d=this,g=d.element,e;b.show();g.children().each(function(i,h){var b=a(h),f,g,e;if(b.is("option"))c.append(d._buildItem(b));else{f=a('<li class="wijmo-dropdown-optgroup"></li>');g=a("<span>"+b.attr("label")+"</span>").addClass("wijmo-optgroup-header ui-priority-primary");e=a("<ul></ul>").addClass("ui-helper-reset wijmo-dropdown-items");b.children("option").each(function(){e.append(d._buildItem(a(this)))});f.append(g).append(e);c.append(f)}});b.height("");e=b.height();e=c.outerHeight()<e?c.outerHeight():e;b.css({height:e,width:f});c.setOutWidth(c.parent().parent().innerWidth()-18);if(b.data("wijsuperpanel")){b.wijsuperpanel("paintPanel");d.superpanel=b.data("wijsuperpanel")}else d.superpanel=b.wijsuperpanel().data("wijsuperpanel");a.fn.bgiframe&&d.superpanel.element.bgiframe();if(!d.superpanel.vNeedScrollBar){c.setOutWidth(c.parent().parent().innerWidth());d.superpanel.refresh()}b.hide()},_handelEvents:function(d){var a=this,b="."+a.widgetName,c=a.element;d.bind("click"+b,function(b){if(a.options.disabled)return;if(a._listContainer.is(":hidden"))a._show();else a._hide();c.click();if(d.get(0)===a._label.get(0))b.preventDefault();else a._labelWrap.focus()}).bind("mouseover"+b,function(){if(a.options.disabled)return;a._label.addClass(a.hoverClass);a._rightTrigger.addClass(a.hoverClass);c.trigger("mouseover")}).bind("mouseout"+b,function(){if(a.options.disabled)return;a._label.removeClass(a.hoverClass);a._rightTrigger.removeClass(a.hoverClass);c.trigger("mouseout")}).bind("mousedown"+b,function(){if(a.options.disabled)return;a._label.addClass(a.activeClass);a._rightTrigger.addClass(a.activeClass);c.trigger("mousedown")}).bind("mouseup"+b,function(){if(a.options.disabled)return;a._label.removeClass(a.activeClass);a._rightTrigger.removeClass(a.activeClass);c.trigger("mouseup")})},_bindEvents:function(){var b=this,d="."+b.widgetName,h=b._label,g=b._rightTrigger,i=b._labelWrap,c=b._listContainer,e=b.element,f;b._handelEvents(b._label);b._handelEvents(b._rightTrigger);a(document.body).bind("click"+d,function(a){if(c.is(":hidden"))return;f=c.offset();if(a.target===h.get(0)||a.target===g.get(0)||a.target===g.children().get(0))return;(a.pageX<f.left||a.pageX>f.left+c.width()||a.pageY<f.top||a.pageY>f.top+c.height())&&b._hide()});c.bind("click"+d,function(f){var d=a(f.target);if(d.closest("li.wijmo-dropdown-item",a(this)).length>0){b._setValue();c.css("z-index","");a.browser.msie&&/^[6,7].[0-9]+/.test(a.browser.version)&&c.parent().css("z-index","");c.hide();b._setValueToEle()}e.click()});i.bind("keydown"+d,function(d){if(b.options.disabled)return;var c=a.ui.keyCode;switch(d.which){case c.UP:case c.LEFT:b._previous();b._setValue();b._setValueToEle();break;case c.DOWN:case c.RIGHT:b._next();b._setValue();b._setValueToEle();break;case c.PAGE_DOWN:b._nextPage();b._setValue();b._setValueToEle();break;case c.PAGE_UP:b._previousPage();b._setValue();b._setValueToEle();break;case c.ENTER:case c.NUMPAD_ENTER:b._setValue();b._listContainer.hide();b._setValueToEle()}d.which!==c.TAB&&d.preventDefault();e.trigger("keydown")}).bind("focus"+d,function(){if(b.options.disabled)return;h.addClass(b.focusClass);g.addClass(b.focusClass);e.focus()}).bind("blur"+d,function(){if(b.options.disabled)return;h.removeClass(b.focusClass);g.removeClass(b.focusClass);e.trigger("blur")}).bind("keypress"+d,function(){if(b.options.disabled)return;e.trigger("keypress")}).bind("keyup"+d,function(){if(b.options.disabled)return;e.trigger("keyup")})},_init:function(){var a=this;a._initActiveItem();a._activeItem&&a._label.text(a._activeItem.text())},_buildItem:function(d){var f=d.val(),b=d.text(),e=this,c;if(b==="")b="&nbsp;";c=a('<li class="wijmo-dropdown-item ui-corner-all"><span>'+b+"</span></li>").mousemove(function(b){var c=a(b.target).closest(".wijmo-dropdown-item");c!==this.last&&e._activate(a(this));this.last=a(b.target).closest(".wijmo-dropdown-item")}).attr("role","option");c.data("value",f);return c},_show:function(){var d=this,c=d._listContainer,b=d.options.showingAnimation;c.css("z-index","100000");a.browser.msie&&/^[6,7]\.[0-9]+/.test(a.browser.version)&&c.parent().css("z-index","99999");if(b)c.show(b.effect,b.options,b.speed,function(){d._initActiveItem()});else c.show()},_hide:function(){var d=this,b=d._listContainer,c=d.options.hidingAnimation;if(b.is(":hidden"))return;if(c)b.hide(c.effect,c.options,c.speed,function(){a.isFunction(c.callback)&&c.callback.apply(d,arguments);a.browser.msie&&/^[6,7]\.[0-9]+/.test(a.browser.version)&&b.parent().css("z-index","");b.css("z-index","")});else{a.browser.msie&&a.browser.version==="6.0"&&b.parent().css("z-index","");b.css("z-index","");b.hide()}},_setValue:function(){var b=this,c=b._listContainer,d,e;if(b._activeItem){b._label.text(b._activeItem.text());b._value=b._activeItem.data("value");b._selectedIndex=a("li.wijmo-dropdown-item",c).index(b._activeItem);if(b.superpanel.vNeedScrollBar){d=b._activeItem.offset().top;e=b._activeItem.outerHeight();if(c.offset().top>d)c.wijsuperpanel("scrollTo",0,d-b._list.offset().top);else c.offset().top<d+e-c.innerHeight()&&c.wijsuperpanel("scrollTo",0,d+e-c.height()-b._list.offset().top)}}},_setValueToEle:function(){var e=this,b=e.element,c=b.find("option[selected]"),f=a("option",b).index(c),d=e._selectedIndex;if(f!==d){c.removeAttr("selected");b.find("option:eq("+d+")").attr("selected",true);b.trigger("change")}},_initActiveItem:function(){var b=this;if(b._value!==undefined){if(b._selectedIndex===-1){b._activate(b._list.find("li.wijmo-dropdown-item").eq(0));return}b._list.find("li.wijmo-dropdown-item").each(function(c){if(c===b._selectedIndex){b._activate(a(this));return false}})}},_activate:function(b){var a=this;a._deactivate();a._activeItem=b;a._activeItem.addClass(a.hoverClass).attr("aria-selected",true)},_deactivate:function(){var a=this;a._activeItem&&a._activeItem.removeClass(a.hoverClass).attr("aria-selected",false)},_next:function(){this._move("next","first")},_previous:function(){this._move("prev","last")},_nextPage:function(){this._movePage("first")},_previousPage:function(){this._movePage("last")},refresh:function(){var b=this,d=b.element,c;if(b.needInit){if(b.element.is(":visible")){b._activeItem=null;b._createSelect();b._bindEvents();b._init();b.needInit=false}}else{if(!b._list)return;b._listContainer.show();b._selectWrap.removeClass("ui-helper-hidden");c=b.element.width();c+=parseInt(b._label.css("padding-left").replace(/px/,""),10);c+=parseInt(b._label.css("padding-right").replace(/px/,""),10);c-=16;b._container.width(c);b._selectWrap.addClass("ui-helper-hidden");b._list.empty();b._buildList(b._list,b._listContainer,c);b._value=b.element.val();b._selectedIndex=a("option",d).index(d.find("option:selected"));b._initActiveItem();b._activeItem&&b._label.text(b._activeItem.text())}},_move:function(c,d){var a=this,e,b;if(!a._activeItem){a._activate(a._list.find(".wijmo-dropdown-item:"+d));return}e=a._activeItem[c]().eq(0);if(e.length)b=a._getNextItem(e,c,d);else if(a._activeItem.closest(".wijmo-dropdown-optgroup").length)b=a._getNextItem(a._activeItem.closest(".wijmo-dropdown-optgroup")[c](),c,d);if(b&&b.length)a._activate(b);else a._activate(a._list.find(".wijmo-dropdown-item:"+d))},_movePage:function(d){var b=this,g,e,c,f=d==="first"?"last":"first";if(b.superpanel.vNeedScrollBar){g=b._activeItem.offset().top;e=b.options.height;c=b._list.find(".wijmo-dropdown-item").filter(function(){var c=a(this).offset().top-g+(d==="first"?-e:e)+a(this).height(),b=a(this).height();return c<b&&c>-b});if(!c.length)c=b._list.find(".wijmo-dropdown-item:"+f);b._activate(c)}else b._activate(b._list.find(".wijmo-dropdown-item:"+(!b._activeItem?d:f)))},_getNextItem:function(a,b,c){if(a.length)if(a.is(".wijmo-dropdown-optgroup"))if(!!a.find(">ul>li.wijmo-dropdown-item").length)return a.find(">ul>li.wijmo-dropdown-item:"+c).eq(0);else this._getNextItem(a[b]().eq(0));else return a},destroy:function(){this.element.attr("title",this._container.attr("title"));this.element.closest(".wijmo-wijdropdown").find(">div.wijmo-dropdown-trigger,>div.wijmo-dropdown,>a").remove();this.element.unwrap().unwrap().removeData("maxZIndex");a.Widget.prototype.destroy.apply(this)}})})(jQuery);
+(function(a){"use strict";var b=0;a.widget("wijmo.wijcheckbox",{_csspre:"wijmo-checkbox",options:{checked:null,changed:null},_init:function(){var c=this,d=c.element,g=c.options,f,i,h,e,j;if(d.is(":checkbox")){if(!d.attr("id")){d.attr("id",c._csspre+b);b+=1}if(d.parent().is("label")){f=d.parent().wrap("<div class='"+c._csspre+"-inputwrapper'></div>").parent().wrap("<div></div>").parent().addClass(c._csspre+" ui-widget");i=d.parent();i.attr("for",d.attr("id"));f.find("."+c._csspre+"-inputwrapper").append(d);f.append(i)}else f=d.wrap("<div class='"+c._csspre+"-inputwrapper'></div>").parent().wrap("<div></div>").parent().addClass(c._csspre+" ui-widget");h=a("label[for='"+d.attr("id")+"']");if(h.length>0){f.append(h);h.attr("labelsign","C1")}d.is(":disabled")&&c._setOption("disabled",true);e=a("<div class='"+c._csspre+"-box ui-widget ui-state-"+(g.disabled?"disabled":"default")+" ui-corner-all'><span class='"+c._csspre+"-icon'></span></div>");j=e.children("."+c._csspre+"-icon");f.append(e);d.data("iconElement",j);d.data("boxElement",e);d.data("checkboxElement",f);e.removeClass(c._csspre+"-relative").attr("role","checkbox").bind("mouseover",function(){d.mouseover()}).bind("mouseout",function(){d.mouseout()});(h.length===0||h.html()==="")&&e.addClass(c._csspre+"-relative");d.bind("click.checkbox",function(a){if(g.disabled)return;c.refresh(a);c._trigger("changed",null,{checked:c.options.checked})}).bind("focus.checkbox",function(){if(g.disabled)return;e.removeClass("ui-state-default").addClass("ui-state-focus")}).bind("blur.checkbox",function(){if(g.disabled)return;e.removeClass("ui-state-focus").not(".ui-state-hover").addClass("ui-state-default")}).bind("keydown.checkbox",function(a){if(a.keyCode===32){if(g.disabled)return;c.refresh()}});e.bind("click.checkbox",function(a){if(g.disabled)return;d.get(0).checked=!d.get(0).checked;d.change();d.focus();c.refresh(a);c._trigger("changed",null,{checked:c.options.checked})});c._initCheckState();c.refresh();f.bind("mouseover.checkbox",function(){if(g.disabled)return;e.removeClass("ui-state-default").addClass("ui-state-hover")}).bind("mouseout.checkbox",function(){if(g.disabled)return;e.removeClass("ui-state-hover").not(".ui-state-focus").addClass("ui-state-default")});f.attr("title",d.attr("title"))}},_create:function(){if(window.wijmoApplyWijTouchUtilEvents)a=window.wijmoApplyWijTouchUtilEvents(a)},_setOption:function(e,c){var b=this,d=b.options.checked;a.Widget.prototype._setOption.apply(this,arguments);if(e==="checked"){b.element.get(0).checked=c;b.refresh();d!==c&&b._trigger("changed",null,{checked:c})}},_initCheckState:function(){var b=this,a=b.options;if(a.checked!==undefined&&a.checked!==null)b.element.get(0).checked=a.checked},refresh:function(b){var a=this,c=a.options;c.checked=a.element.get(0).checked;a.element.data("iconElement").toggleClass("ui-icon ui-icon-check",a.element.get(0).checked);a.element.data("boxElement").toggleClass("ui-state-active",a.element.get(0).checked).attr("aria-checked",a.element.get(0).checked);a.element.data("checkboxElement").toggleClass("ui-state-checked",a.element.get(0).checked);b&&b.stopPropagation()},destroy:function(){var b=this,c=b.element.parent().parent();c.children("div."+b._csspre+"-box").remove();b.element.unwrap();b.element.unwrap();a.Widget.prototype.destroy.apply(b)}})})(jQuery);
+(function(a){"use strict";var b=0;a.widget("wijmo.wijradio",{_radiobuttonPre:"wijmo-wijradio",options:{checked:null,changed:null},_create:function(){var c=this,d=c.element,h,e,j,g,f,i;if(window.wijmoApplyWijTouchUtilEvents)a=window.wijmoApplyWijTouchUtilEvents(a);if(d.is(":radio")){if(!d.attr("id")){d.attr("id","wijmo-radio-"+b);b+=1}if(d.parent().is("label")){e=d.parent().wrap("<div class='"+c._radiobuttonPre+"-inputwrapper'></div>").parent().wrap("<div></div>").parent().addClass(c._radiobuttonPre+" ui-widget");j=d.parent();j.attr("for",d.attr("id"));e.find("."+c._radiobuttonPre+"-inputwrapper").append(d);e.append(j)}else e=d.wrap("<div class='"+c._radiobuttonPre+"-inputwrapper'></div>").parent().wrap("<div></div>").parent().addClass(c._radiobuttonPre+" ui-widget");g=a("label[for='"+d.attr("id")+"']");if(g.length>0){e.append(g);g.attr("labelsign","wij")}d.is(":disabled")&&c._setOption("disabled",true);f=a("<div class='"+c._radiobuttonPre+"-box ui-widget "+(c.options.disabled?"ui-state-disabled":"ui-state-default")+" ui-corner-all'><span class='"+c._radiobuttonPre+"-icon'></span></div>");i=f.children("."+c._radiobuttonPre+"-icon");e.append(f);i.addClass("ui-icon ui-icon-radio-on");d.data("iconElement",i);d.data("boxElement",f);d.data("radiobuttonElement",e);f.removeClass(c._radiobuttonPre+"-relative").attr("role","radio").bind("mouseover",function(){d.mouseover()}).bind("mouseout",function(){d.mouseout()});(g.length===0||g.html()==="")&&f.addClass(c._radiobuttonPre+"-relative");c._setDefaul();d.bind("click.radio",function(){if(c.options.disabled)return;h=c.options.checked;c._refresh();h!==c.element.is(":checked")&&c._trigger("changed",null,{checked:c.options.checked})}).bind("focus.radio",function(){if(c.options.disabled)return;f.removeClass("ui-state-default").addClass("ui-state-focus")}).bind("blur.radio",function(){if(c.options.disabled)return;f.removeClass("ui-state-focus").not(".ui-state-hover").addClass("ui-state-default")});e.click(function(){if(c.options.disabled)return;if(g.length===0||g.html()===""){h=c.options.checked;d.attr("checked",true);c._refresh();d.change();h!==c.element.is(":checked")&&c._trigger("changed",null,{checked:c.options.checked})}});e.bind("mouseover.radio",function(){if(c.options.disabled)return;f.removeClass("ui-state-default").addClass("ui-state-hover")}).bind("mouseout.radio",function(){if(c.options.disabled)return;f.removeClass("ui-state-hover").not(".ui-state-focus").addClass("ui-state-default")});e.attr("title",d.attr("title"))}},_setOption:function(e,c){var b=this,d=b.options.checked;a.Widget.prototype._setOption.apply(this,arguments);if(e==="checked"){b.element.attr("checked",c);b._refresh();d!==c&&b._trigger("changed",null,{checked:c})}},_setDefaul:function(){var b=this,a=b.options;a.checked!==undefined&&a.checked!==null&&this.element.attr("checked",a.checked);if(this.element.attr("checked")){this.element.parents(".wijmo-wijradio").find("."+this._radiobuttonPre+"-box").children().removeClass("ui-icon-radio-on ui-icon-radio-off").addClass("ui-icon-radio-off");this.element.data("boxElement").removeClass("ui-state-default").addClass("ui-state-active").attr("aria-checked",true);this.element.data("radiobuttonElement").addClass("ui-state-checked")}},_refresh:function(){var d=this.element.attr("name")||"",b=this,c;if(d==="")return;a("[name='"+d+"']").each(function(e,d){a(d).parents(".wijmo-wijradio").find("."+b._radiobuttonPre+"-box").children().removeClass("ui-icon-radio-on ui-icon-radio-off").addClass("ui-icon-radio-on");a(d).parents(".wijmo-wijradio").find("."+b._radiobuttonPre+"-box").removeClass("ui-state-active").addClass("ui-state-default").attr("aria-checked",false);a(d).parents(".wijmo-wijradio").removeClass("ui-state-checked");c=a(d).parents(".wijmo-wijradio").find(":radio");c.wijradio("option","checked")&&c[0]!==b.element[0]&&c.wijradio("setCheckedOption",false)});if(b.element.is(":checked")){b.element.data("iconElement").removeClass("ui-icon-radio-on").addClass("ui-icon-radio-off");b.element.data("boxElement").removeClass("ui-state-default").addClass("ui-state-active").attr("aria-checked",true);b.element.data("radiobuttonElement").addClass("ui-state-checked")}b.options.checked=b.element.is(":checked")},setCheckedOption:function(a){var c=this,b=c.options;if(b.checked!==null&&b.checked!==a){b.checked=a;c._trigger("changed",null,{checked:a})}},refresh:function(){this._refresh()},destroy:function(){var b=this,c=b.element.parent().parent();c.children("div."+b._radiobuttonPre+"-box").remove();b.element.unwrap();b.element.unwrap();a.Widget.prototype.destroy.apply(b)}})})(jQuery);
+(function(a){"use strict";var g="ui-widget ui-widget-content ui-corner-all wijmo-wijlist",c="wijmo-wijlist-item",h=c+"-alternate",i=c+"-selected",j=c+"-first",k=c+"-last",f="ui-state-hover",l="ui-state-active",e="wijmo-wijlistitem-active",b=i+" "+l,d="item.wijlist";a.widget("wijmo.wijlist",{options:{listItems:[],selected:null,selectionMode:"single",autoSize:false,maxItemsCount:5,addHoverItemClass:true,superPanelOptions:null,disabled:false,focusing:null,focus:null,blur:null,itemRendering:null,itemRendered:null,listRendered:null,keepHightlightOnMouseLeave:false},removeAll:function(){var a=this;a.items=[];a._refresh()},addItem:function(c,b){var a=this;a._checkData();if(b===null||b===undefined)a.items.push(c);else a.items&&a.items.splice(b,0,c);a._refresh()},removeItem:function(c){var b=this,a;b._checkData();a=b.indexOf(c);a>=0&&b.removeItemAt(a)},indexOf:function(e){var c=this,d=-1,a=0,b;c._checkData();for(a=0;a<c.items.length;a++){b=c.items[a];if(b.label===e.label&&b.value===e.value){d=a;break}}return d},removeItemAt:function(b){var a=this;a._checkData();a.items.splice(b,1);a._refresh()},_checkData:function(){var a=this;if(!a.items)a.items=[]},_refresh:function(){var a=this;a.renderList();a.refreshSuperPanel()},_setOption:function(e,f){var c=this,d;a.Widget.prototype._setOption.apply(c,arguments);if(e==="disabled")c._handleDisabledOption(f,c.element);else if(e==="selectionMode"){d=c.selectedItem;if(d){d.selected=false;d.element&&d.element.removeClass(b);c.selectedItem=undefined}a.each(c.selectedItems,function(c,a){a.selected=false;a.element.removeClass(b)});c.selectedItem=[]}else if(e==="listItems"){c.setItems(f);c.renderList();c.refreshSuperPanel()}else(e==="autoSize"||e==="maxItemsCount")&&c.refreshSuperPanel()},_create:function(){var b=this,c=this.element,d=this.options;if(window.wijmoApplyWijTouchUtilEvents)a=window.wijmoApplyWijTouchUtilEvents(a);c.addClass(g).attr({role:"listbox","aria-activedescendant":e,"aria-multiselectable":d.selectionMode==="multiple"}).bind("click."+b.widgetName,b,b._onListClick);if(c.is("div")&&c.children().is("ul")){b._isInnerData=true;b._templates=[];a.each(a("ul > li",c),function(c,a){b._templates.push({templateHtml:a.innerHTML})});b._oriChildren=c.children().hide()}b.ul=a("<ul class='wijmo-wijlist-ul'></ul>").appendTo(c);if(d.listItems!==null)if(d.listItems.length>0){b.setItems(d.listItems);b.renderList();b.refreshSuperPanel()}b.element.is(":hidden")&&b.element.wijAddVisibilityObserver&&b.element.wijAddVisibilityObserver(function(){b.refreshSuperPanel();b.element.wijRemoveVisibilityObserver&&b.element.wijRemoveVisibilityObserver()},"wijlist");d.disabled&&b.disable()},_handleDisabledOption:function(b,c){var a=this;if(b){if(!a.disabledDiv)a.disabledDiv=a._createDisabledDiv(c);a.disabledDiv.appendTo("body")}else if(a.disabledDiv){a.disabledDiv.remove();a.disabledDiv=null}},_createDisabledDiv:function(f){var g=this,b=f||g.element,c=b.offset(),e=b.outerWidth(),d=b.outerHeight();return a("<div></div>").addClass("ui-disabled").css({"z-index":"99999",position:"absolute",width:e,height:d,left:c.left,top:c.top})},setTemplateItems:function(a){this._setItemsByExtend(a,true)},setItems:function(a){this._setItemsByExtend(a,false)},_setItemsByExtend:function(c,e){var b=this,d;if(e){if(b._templates&&c&&c.length!==b._templates.length)return;b.items=c;if(!b.items)b.items=[];a.each(b._templates,function(a){if(b.items[a])b.items[a].templateHtml=b._templates[a].templateHtml;else b.items.push({templateHtml:b._templates[a].templateHtml,label:c[a].label,value:c[a].value})})}else b.items=c;if(!c)return null;d=a.grep(c,function(a){return a.selected});if(b.options.selectionMode==="single"){b.selectedItems=[];b.selectedItem=d.length>0?d[0]:undefined}else b.selectedItems=d},filterTemplateItems:function(f){var e=this,c=e._escapeRegex(f),d,b=null;if(!this.items)return null;d=new RegExp(c,"i");a.each(this.items,function(g,a){var f=d.exec(a.label);if(f===null)a.element.hide();else{a.selected&&e.activate(null,a,false);!a.element.is("visible")&&a.element.show();if(c!==undefined&&c.length!==0&&b===null&&f.index===0)b=a}});return b},popItem:function(){var a=this;a._checkData();a.items.pop();a._refresh()},getList:function(){return this.ul},_onListClick:function(b){if(!a(b.target).closest(".wijmo-wijlist-item").length)return;var c=b.data;c.select(b)},destroy:function(){var b=this,c=this.element;b.superPanel!==undefined&&b.superPanel.destroy();c.removeClass("wijmo-wijobserver-visibility").removeClass(g).removeAttr("role").removeAttr("aria-activedescendant").unbind("."+b.widgetName);b.ul.remove();if(b.disabledDiv){b.disabledDiv.remove();b.disabledDiv=null}b._isInnerData&&b._oriChildren.show();a.Widget.prototype.destroy.apply(b,arguments)},activate:function(d,b,g){var a=this,h,c;a.deactivate();if(b===null||b===undefined)return;if(a._trigger("focusing",d,b)===false)return;h=a.active=b;c=b.element;if(c){a.options.addHoverItemClass&&c.addClass(f);c.attr("id",e)}g&&a.superPanel!==undefined&&a.superPanel.scrollChildIntoView(c);a._trigger("focus",d,b)},deactivate:function(){var a=this,c=a.active,b;if(!c)return;b=c.element;a._trigger("blur",null,c);b&&b.removeClass(f).removeAttr("id");a.active=undefined},next:function(a){this.move("next","."+c+":first",a)},nextPage:function(){this.superPanel.doScrolling("bottom",true)},previous:function(a){this.move("prev","."+c+":last",a)},previousPage:function(){this.superPanel.doScrolling("top",true)},first:function(){return this.active&&!this.active.element.prev().length},last:function(){return this.active&&!this.active.element.next().length},move:function(f,g,e){var a=this,h,b;if(!a.active){h=a.ul.children(g).data(d);a.activate(e,h,true);return}if(!a._templates)b=a.active.element[f+"All"]("."+c).eq(0);else b=a.active.element[f+"All"](":visible."+c).eq(0);if(b.length)a.activate(e,b.data(d),true);else a.activate(e,a.element.children(g).data(d),true)},select:function(j,k){var e=this,g,h,c,i,f;if(e.active===undefined)return;g=e.active.element;if(g===undefined)return;c=g.data(d);if(!c)return;i=e.options.selectionMode==="single";if(i){f=e.selectedItem;g.addClass(b).attr("aria-selected","true");c.selected=true;if(f!==undefined&&c!==f){f.selected=false;f.element&&f.element.removeClass(b).removeAttr("aria-selected")}e.selectedItem=c;h=a.inArray(c,e.items);e._trigger("selected",j,{item:c,previousItem:f,selectedIndex:h,data:k})}else{c.selected=!c.selected;if(c.selected)g.addClass(b).attr("aria-selected","true");else g.removeClass(b).removeAttr("aria-selected","true");e.selectedItems=a.grep(e.items,function(a){return a.selected});e._trigger("selected",j,{item:c,selectedItems:e.selectedItems})}},_findItemsByValues:function(c){var b,d=[];d=a.grep(this.items,function(d){b=false;for(var a=0;a<c.length;a++)if(d.value===c[a])b=true;return b});return d},_findItemsByIndices:function(c){var d=this,e=this.items.length,b=[];a.each(c,function(c,a){a>=0&&a<e&&b.push(d.items[a])});return b},getItems:function(b){var g=this,f,c,d,e;c=a.isArray(b);f=!c&&!isNaN(b)||c&&!isNaN(b[0]);d=c?b:[b];e=f?g._findItemsByIndices(d):g._findItemsByValues(d);return e},selectItems:function(i,g){var c=this,h=this.options.selectionMode==="single",e,d,f;f=c.getItems(i);if(h){if(f.length>0){e=f[0];e.selected=true;e.element.addClass(b)}d=c.selectedItem;if(d){d.selected=false;d.element.removeClass(b)}c.selectedItem=e;g&&c._trigger("selected",null,{item:e,previousItem:d})}else{a.each(f,function(c,a){a.selected=true;a.element.addClass(b)});c.selectedItems=a.grep(c.items,function(a){return a.selected});g&&c._trigger("selected",null,{selectedItems:c.selectedItems})}},unselectItems:function(f){var c=this,g=this.options.selectionMode,d,e;if(g==="single"){d=c.selectedItem;if(d){d.selected=false;d.element.removeClass(b);c.selectedItem=undefined}}else{e=c.getItems(f);a.each(e,function(c,a){a.selected=false;a.element.removeClass(b)});c.selectedItems=a.grep(c.items,function(a){return a.selected})}},renderList:function(){var d=this,g=this.ul,h=this.options,a,b,e,c,f;g.empty();a=d.items;if(a===undefined)return;b=a.length;if(a===undefined||a===null&&b===0)return;e=h.selectionMode==="single";for(c=0;c<b;c++){f=a[c];d._renderItem(g,f,c,e)}if(b>0){a[0].element&&a[0].element.addClass(j);a[b-1].element&&a[b-1].element.addClass(k)}d._trigger("listRendered",null,d)},_renderItem:function(k,c,j){var e=this,f=a("<li role='option' class='wijmo-wijlist-item ui-corner-all'></li>"),g,i;c.element=f;c.list=e;if(e._trigger("itemRendering",null,c)===false)return;g=c.label;if(c.templateHtml)g=c.templateHtml;else if(c.text!==undefined)g=c.text;f.bind("mouseover",function(a){e.activate(a,c,false)}).bind("mouseout",function(){!e.options.keepHightlightOnMouseLeave&&e.deactivate()}).data(d,c).append(g).appendTo(k);if(!e._isInnerData){i=c.imageUrl;i!==undefined&&i.length>0&&f.prepend("<img src='"+c.imageUrl+"'>")}if(c.selected){e.activate(null,c,false);f.addClass(b)}j%2===1&&f.addClass(h);e._trigger("itemRendered",null,c)},_escapeRegex:function(a){return a===undefined?a:a.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")},adjustOptions:function(){var b=this.options,a;if(b.data!==null)for(a=0;a<b.listItems.length;a++){delete b.listItems[a].element;delete b.listItems[a].list}return b},refreshSuperPanel:function(){var b=this,d=this.element,m=this.options,c=this.ul,o=c.children(".wijmo-wijlist-item:first"),n,h=null,g,j,k,e,f,i,l;if(!d.is(":visible"))return false;if(m.autoSize)h=o.outerHeight(true)*m.maxItemsCount;h!==null&&d.height(Math.min(h,c.outerHeight()));g=d.innerHeight();j=g/(c.outerHeight()-g);f=101*j/(1+j);k=o.outerHeight()/(c.outerHeight()-g)*(101-f);if(b.superPanel===undefined){i={allowResize:false,keyboardSupport:false,bubbleScrollingEvent:true,hScroller:{scrollBarVisibility:"hidden"},vScroller:{scrollSmallChange:k,scrollLargeChange:f}};a.extend(i,m.superPanelOptions);b.superPanel=d.wijsuperpanel(i).data("wijsuperpanel");if(b.superPanel.vNeedScrollBar){c.setOutWidth(d.innerWidth()-18);b.superPanel.refresh()}}else{e=b.superPanel.options.vScroller;e.scrollLargeChange=f;e.scrollSmallChange=k;b.superPanel.paintPanel();if(b.superPanel.vNeedScrollBar){c.setOutWidth(d.innerWidth()-18);b.superPanel.refresh()}else{c.setOutWidth(d.outerWidth());n=d.children(".wijmo-wijsuperpanel-header").outerHeight();d.height(c.outerHeight()+n);b.superPanel.refresh()}}l=c.css("padding-top");if(l.length>0){e=b.superPanel.options.vScroller;e.firstStepChangeFix=b.superPanel.scrollPxToValue(parseFloat(l),"v")}else e.firstStepChangeFix=0;c.setOutWidth(c.parent().parent().innerWidth())}})})(jQuery);
+(function(a){"use strict";var c={general:0,weekEnd:1,otherMonth:2,outOfRange:4,today:8,custom:16,disabled:32,selected:64,gap:128};a.widget("wijmo.wijcalendar",{options:{culture:"",monthCols:1,monthRows:1,titleFormat:"MMMM yyyy",showTitle:true,displayDate:undefined,dayRows:6,dayCols:7,weekDayFormat:"short",showWeekDays:true,showWeekNumbers:false,calendarWeekRule:"firstDay",minDate:new Date(1900,0,1),maxDate:new Date(2099,11,31),showOtherMonthDays:true,showDayPadding:false,selectionMode:{day:true,days:true},allowPreview:false,allowQuickPick:true,toolTipFormat:"dddd, MMMM dd, yyyy",prevTooltip:"Previous",nextTooltip:"Next",quickPrevTooltip:"Quick Previous",quickNextTooltip:"Quick Next",prevPreviewTooltip:"",nextPreviewTooltip:"",navButtons:"default",quickNavStep:12,direction:"horizontal",duration:250,easing:"easeInQuad",popupMode:false,autoHide:true,customizeDate:null,title:null,beforeSlide:null,afterSlide:null,beforeSelect:null,afterSelect:null,selectedDatesChanged:null},_create:function(){var b=this;if(window.wijmoApplyWijTouchUtilEvents)a=window.wijmoApplyWijTouchUtilEvents(a);a.isFunction(window.wijmoASPNetParseOptions)&&wijmoASPNetParseOptions(this.options);this.element.addClass("wijmo-wijcalendar ui-datepicker-inline ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all").attr("role","grid");this._previewWrapper(this.options.allowPreview);this.element.data("preview.wijcalendar",false);b.element.is(":hidden")&&b.element.wijAddVisibilityObserver&&b.element.wijAddVisibilityObserver(function(){b.refresh();b.element.wijRemoveVisibilityObserver&&b.element.wijRemoveVisibilityObserver()},"wijcalendar")},_init:function(){if(this.options.popupMode){var a={autoHide:!!this.options.autoHide},b=this;if(this.options.beforePopup)a.showing=this.options.beforePopup;if(this.options.afterPopup)a.shown=this.options.afterPopup;if(this.options.beforeClose)a.hiding=this.options.beforeClose;a.hidden=function(a){b.element.removeData("lastdate.wijcalendar");b.options.afterClose&&b.options.afterClose.call(a)};this.element.wijpopup(a)}this._getSelectedDates();this._getDisabledDates();this._resetWidth();this.refresh();this.element.width(this.element.width()+2)},destroy:function(){a.Widget.prototype.destroy.apply(this,arguments);this.close();this.element.html("");this.element.removeClass("wijmo-wijcalendar ui-datepicker-inline ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-datepicker-multi").removeAttr("role");var b=this;a.each(["preview","disableddates","selecteddates","dragging","lastdate","animating"],function(c,a){b.element.removeData(a+".wijcalendar")});this._previewWrapper(false)},_setOption:function(c,b){a.Widget.prototype._setOption.apply(this,arguments);switch(c){case"showWeekDays":case"showWeekNumbers":case"showTitle":case"showOtherMonthDays":case"selectionMode":this.unSelectAll();this._resetWidth();this.refresh();break;case"culture":this.refresh();break;case"allowPreview":this._previewWrapper(b);this.refresh();break;case"monthCols":this._resetWidth();this.refresh();break;case"autoHide":this.element.wijpopup({autoHide:this.options.autoHide});break;case"selectedDates":this._getSelectedDates().setDates(b);this.refresh();break;case"disabledDates":this._getDisabledDates().setDates(b);this.refresh();break;case"displayDate":this.refresh()}},_previewWrapper:function(a){if(a)!this.element.parent().hasClass("wijmo-wijcalendar-preview-wrapper")&&this.element.wrap("<div class='wijmo-wijcalendar-preview-wrapper ui-helper-clearfix'></div>");else this.element.parent().hasClass("wijmo-wijcalendar-preview-wrapper")&&this.element.unwrap()},_isRTL:function(){return!!this._getCulture().isRTL},refresh:function(){this.element.empty().append(this._createCalendar());this.element[(this._isRTL()?"add":"remove")+"Class"]("ui-datepicker-rtl");this._bindEvents()},refreshDate:function(b){if(!this._monthViews)return;if(b<this._groupStartDate||b>this._groupEndDate)return;a.each(this._monthViews,function(){this._refreshDate(b)})},getDisplayDate:function(){var a=this.options.displayDate?this.options.displayDate:new Date;if(b.isSameDate(a,new Date(1900,0,1)))a=new Date;return a},getSelectedDate:function(){var a=this.options.selectedDates;return!a||a.length===0?null:a[0]},selectDate:function(a){a=new Date(a);if(this._getDisabledDates().contains(a))return false;if(a<this.options.minDate||a>this.options.maxDate)return false;this._getSelectedDates().add(a);this.refreshDate(a);return true},unSelectDate:function(a){a=new Date(a);if(this._getDisabledDates().contains(a))return false;if(a<this.options.minDate||a>this.options.maxDate)return false;this._getSelectedDates().remove(a);this.refreshDate(a);return true},unSelectAll:function(){var a=this.options.selectedDates,b;if(a&&a.length>0){this._getSelectedDates().clear();for(b=0;b<a.length;b++)this.refreshDate(a[b])}},_slideToDate:function(a){if(b.isSameMonth(this.getDisplayDate(),a))return;var c=this.element.is(":visible");if(!c)this.options.displayDate=a;else{if(this._trigger("beforeSlide")===false)return;if(this._isSingleMonth())this._playSlideAnimation(a);else this._playMmSlideAnimation(a)}},isPopupShowing:function(){return!!this.options.popupMode?this.element.wijpopup("isVisible"):false},popup:function(a){this._myGrid=undefined;this.refresh();this.element.data("dragging.wijcalendar",false);this.element.wijpopup("show",a)},popupAt:function(a,b){this._myGrid=undefined;this.refresh();this.element.data("dragging.wijcalendar",false);this.element.wijpopup("showAt",a,b)},close:function(){this.isPopupShowing()&&this.element.wijpopup("hide")},_getCulture:function(a){return Globalize.findClosestCulture(a||this.options.culture)},_getDates:function(b){var c=b.toLowerCase()+".wijcalendar",a=this.element.data(c);if(a===undefined){a=new f(this,b);this.element.data(c,a)}return a},_getDisabledDates:function(){return this._getDates("disabledDates")},_getSelectedDates:function(){return this._getDates("selectedDates")},_onDayDragStart:function(a){a.preventDefault();a.stopPropagation();return false},_onDayMouseDown:function(c){c.preventDefault();c.stopPropagation();var d=this.options,j=this,b,g,e=false,f=d.selectedDates,i=false,h=[];if(c.which!==1)return false;b=this._getCellDate(c.currentTarget);if(b===undefined)return false;if(!d.selectionMode.day)return false;g={date:b};if(this._trigger("beforeSelect",null,g)===false)return false;(!d.selectionMode.days||!c.metaKey&&!c.shiftKey&&!c.ctrlKey)&&this.unSelectAll();if(!!d.selectionMode.days)if(c.shiftKey&&this.element.data("lastdate.wijcalendar")){this._selectRange(this.element.data("lastdate.wijcalendar"),b);e=true}else if(c.ctrlKey){this.element.data("lastdate.wijcalendar",b);a.each(f,function(c,a){if(b.getFullYear()===a.getFullYear()&&b.getMonth()===a.getMonth()&&b.getDate()===a.getDate()){i=true;return false}});if(i)this.unSelectDate(b);else this.selectDate(b);f=d.selectedDates;a.each(f,function(b,a){h.push(new Date(a))});this._trigger("selectedDatesChanged",null,{dates:h});e=true}if(!e){this.element.data("lastdate.wijcalendar",b);e=this.selectDate(b);this._trigger("selectedDatesChanged",null,{dates:[b]})}if(e){this._trigger("afterSelect",null,g);if(!!d.selectionMode.days){this.element.data("dragging.wijcalendar",true);a(document.body).bind("mouseup."+this.widgetName,function(){a(document.body).unbind("mouseup."+j.widgetName);j.element.data("dragging.wijcalendar",false)})}}return false},_onMouseUp:function(a){a.preventDefault();a.stopPropagation();this.element.data("dragging.wijcalendar",false);return false},_onDayClicked:function(c){var b=this._getCellDate(c.currentTarget);if(b===undefined)return false;if(!this.options.selectionMode.day)return false;if(this.isPopupShowing())this.close();else a(c.currentTarget).hasClass("ui-datepicker-other-month")&&this._slideToDate(b);return false},_onDayMouseEnter:function(b){a(b.currentTarget).attr("state","hover");this._refreshDayCell(b.currentTarget);if(!!this.element.data("dragging.wijcalendar")){var c=this._getCellDate(b.currentTarget);if(c===undefined)return;this.unSelectAll();this._selectRange(this.element.data("lastdate.wijcalendar"),c,true)}},_onDayMouseLeave:function(b){a(b.currentTarget).attr("state","normal");this._refreshDayCell(b.currentTarget)},_selectRange:function(a,e,g){if(a!==undefined&&a!==new Date(1900,1,1)){var c=a,f=e,d=[];if(a>e){f=a;c=e}for(;;){if(c>f)break;this.selectDate(c);d[d.length]=c;c=b.addDays(c,1)}!g&&this.element.removeData("lastdate.wijcalendar");this._trigger("selectedDatesChanged",null,{dates:d})}else{this.selectDate(a);this._trigger("selectedDatesChanged",null,{dates:[a]})}return true},_getCellDate:function(c){var b=a(c).attr("date");return b===undefined?b:new Date(b)},_getParentTable:function(c){var b=a(c).parents("table");return b.length===0?undefined:b.get(0)},_initMonthSelector:function(e){if(a(e).data("cells")!==undefined)return;var d=e.id.split("_"),k,b,h=[],f,g,c,j,i;if(d[d.length-1]!=="ms")throw Error.create("not a monthview");k=d.slice(0,d.length-1).join("_");b=this._getParentTable(e);if(b){if(b.id!==k)throw Error.create("not a monthview");for(f=0;f<b.rows.length;f++){i=b.rows[f];for(g=0;g<i.cells.length;g++){c=i.cells[g];if(c){j=a(c).attr("daytype");if(j!==undefined)if(a(c).find("a").hasClass("ui-priority-secondary")===false)if(this._isSelectable(parseInt(j,10)))h[h.length]=c}}}}a(e).data("cells",h)},_onMonthSelectorClicked:function(h){this._initMonthSelector(h.currentTarget);var f=a(h.currentTarget).data("cells"),c=[],b,g,e,d;this.element.removeData("lastdate.wijcalendar");this.unSelectAll();for(b=0;b<f.length;b++){g=f[b];e=a(g).attr("date");if(e!==undefined){d=new Date(e);this.selectDate(d);c[c.length]=d}}this._trigger("selectedDatesChanged",null,{dates:c});this.isPopupShowing()&&this.close();return false},_onMonthSelectorMouseEnter:function(b){this._initMonthSelector(b.currentTarget);for(var d=a(b.currentTarget).data("cells"),c=0;c<d.length;c++){b.currentTarget=d[c];this._onDayMouseEnter(b)}},_onMonthSelectorMouseLeave:function(b){this._initMonthSelector(b.currentTarget);for(var d=a(b.currentTarget).data("cells"),c=0;c<d.length;c++){b.currentTarget=d[c];this._onDayMouseLeave(b)}},_initWeekDaySelector:function(f){if(a(f).data("cells")!==undefined)return;var b=f.id.split("_"),g,k,c,h=[],e=0,j,d,i;if(b[b.length-2]!=="cs")throw Error.create("not a column");g=parseInt(b[b.length-1],10);k=b.slice(0,b.length-2).join("_");c=this._getParentTable(f);if(c){if(c.id!==k)throw Error.create("not a column");if(!this._isSingleMonth())e++;if(this.options.showWeekDays)e++;for(;e<c.rows.length;e++){j=c.rows[e];if(g<j.cells.length){d=j.cells[g];if(d){i=a(d).attr("daytype");if(i!==undefined)if(a(d).find("a").hasClass("ui-priority-secondary")===false)if(this._isSelectable(parseInt(i,10)))h[h.length]=d}}}}a(f).data("cells",h)},_onWeekDayClicked:function(h){this._initWeekDaySelector(h.currentTarget);var f=a(h.currentTarget).data("cells"),c=[],b,g,e,d;this.unSelectAll();for(b=0;b<f.length;b++){g=a(f[b]);e=g.attr("date");if(e!==undefined){d=new Date(e);this.selectDate(d);c[c.length]=d}}this._trigger("selectedDatesChanged",null,{dates:c});this.isPopupShowing()&&this.close();return false},_onWeekDayMouseEnter:function(b){this._initWeekDaySelector(b.currentTarget);for(var d=a(b.currentTarget).data("cells"),c=0;c<d.length;c++){b.currentTarget=d[c];this._onDayMouseEnter(b)}},_onWeekDayMouseLeave:function(b){this._initWeekDaySelector(b.currentTarget);for(var d=a(b.currentTarget).data("cells"),c=0;c<d.length;c++){b.currentTarget=d[c];this._onDayMouseLeave(b)}},_initWeekNumberSelector:function(g){if(a(g).data("cells")!==undefined)return;var b=g.id.split("_"),j,k,e,h=[],f,d,c,i;if(b[b.length-2]!=="rs")throw Error.create("not a row");j=parseInt(b[b.length-1],10);k=b.slice(0,b.length-2).join("_");e=this._getParentTable(g);if(e){if(e.id!==k)throw Error.create("not a row");f=e.rows[j];if(f){d=0;if(this.options.showWeekNumbers)d++;for(;d<f.cells.length;d++){c=f.cells[d];if(c){i=a(c).attr("daytype");if(i!==undefined)if(a(c).find("a").hasClass("ui-priority-secondary")===false)if(this._isSelectable(parseInt(i,10)))h[h.length]=c}}}}a(g).data("cells",h)},_onWeekNumberClicked:function(h){this._initWeekNumberSelector(h.currentTarget);var f=a(h.currentTarget).data("cells"),c=[],b,g,e,d;this.unSelectAll();for(b=0;b<f.length;b++){g=a(f[b]);e=g.attr("date");if(e!==undefined){d=new Date(e);this.selectDate(d);c[c.length]=d}}this._trigger("selectedDatesChanged",null,{dates:c});this.isPopupShowing()&&this.close();return false},_onWeekNumberMouseEnter:function(b){this._initWeekNumberSelector(b.currentTarget);for(var d=a(b.currentTarget).data("cells"),c=0;c<d.length;c++){b.currentTarget=d[c];this._onDayMouseEnter(b)}},_onWeekNumberMouseLeave:function(b){this._initWeekNumberSelector(b.currentTarget);for(var d=a(b.currentTarget).data("cells"),c=0;c<d.length;c++){b.currentTarget=d[c];this._onDayMouseLeave(b)}},_isAnimating:function(){return!!this.element.data("animating.wijcalendar")},_onPreviewMouseEnter:function(h){if(!!this.element.data("previewContainer"))return;if(this._isAnimating())return;var g=a(h.currentTarget),d=g.attr("id"),f=this.getDisplayDate(),e=this.options.monthCols*this.options.monthRows,c=a("<div/>");if(d===undefined)return;if(d==="prevPreview")e=-e;this.options.displayDate=b.addMonths(f,e);this.element.data("preview.wijcalendar",true);c.appendTo(document.body);c.hide();c.addClass("wijmo-wijcalendar ui-datepicker-inline ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all");c.append(this._createCalendar());this.options.displayDate=f;this.element.data("preview.wijcalendar",false);this._createMonthViews();c.wijpopup({showEffect:"slide",showOptions:{direction:d==="prevPreview"?"right":"left"},hideEffect:"slide",hideOptions:{direction:d==="prevPreview"?"right":"left"}});c.wijpopup("show",{my:d==="prevPreview"?"right top":"left top",at:d==="prevPreview"?"left top":"right top",of:g});this.element.data("previewContainer",c)},_onPreviewMouseLeave:function(c){var f=a(c.currentTarget),d=f.attr("id"),b=this.element.data("previewContainer"),e=this;if(d===undefined)return;if(b)if(b.wijpopup("isAnimating"))window.setTimeout(function(){e._onPreviewMouseLeave(c)},200);else{b.wijpopup("hide");this.element.removeData("previewContainer")}},_resetWidth:function(){if(!this._myGrid){this.element.css("height","");if(this.options.monthCols>1){this.element.css("width",17*this.options.monthCols+"em");this.element.addClass("ui-datepicker-multi")}else{this.element.css("width","");this.element.removeClass("ui-datepicker-multi")}}},_playMmSlideAnimation:function(f){var i=this.element.width(),g=this.element.height(),h=this.getDisplayDate(),c,a,b,e=this.options.direction||"horizontal",d=this;this.element.height(g);this.element.wrapInner("<div class='wijmo-wijcalendar-multi-aniwrapper'></div>");c=this.element.find(">:first-child").width(i).height(g);a=c.clone(false);a.hide();this.options.displayDate=f;this._createMonthViews();a.empty().append(this._createMonthGroup());a.appendTo(this.element);b=f>h;this.element.data("animating.wijcalendar",true);c.effect("slide",{mode:"hide",direction:e==="horizontal"?b?"left":"right":b?"up":"down",easing:this.options.easing||"easeOutBack",duration:this.options.duration},function(){c.remove()});a.effect("slide",{direction:e==="horizontal"?b?"right":"left":b?"down":"up",easing:this.options.easing||"easeOutBack",duration:this.options.duration},function(){while(a.parent().is(".wijmo-wijcalendar-multi-aniwrapper"))a.parent().replaceWith(a);a.replaceWith(a.contents());d.element.height("");d._bindEvents();d.element.data("animating.wijcalendar",false);d._trigger("afterSlide")})},_playSlideAnimation:function(m){if(!this._isSingleMonth())return;var f=this,n=this.getDisplayDate(),c=this.element.find(".ui-datepicker-calendar"),b,k,l=1,j=this.options.direction||"horizontal",h=m>n,d=[],g,i;if(c.parent().is(".wijmo-wijcalendar-aniwrapper"))b=c.parent();else{b=a.effects.createWrapper(c).css({overflow:"hidden"});b.removeClass("ui-effects-wrapper");b.addClass("wijmo-wijcalendar-aniwrapper")}if(b.parent().is(".wijmo-wijcalendar-aniwrapper"))k=b.parent();else{k=a.effects.createWrapper(b).css({overflow:"hidden"});k.removeClass("ui-effects-wrapper");k.addClass("wijmo-wijcalendar-aniwrapper")}if(this._myGrid)switch(this._myGrid.gridType){case"month":l=1;break;case"year":l=10;break;case"decade":l=100}d[d.length]=m;g=c.outerWidth();i=c.outerHeight();if(j==="horizontal"){c.width(g).css("float",h?"left":"right");b.width((d.length+1)*g);b.css("left",h?0:-d.length*g).css("position","absolute")}else{b.width(g);b.css("top",h?0:-d.length*i).css("position","absolute");b.height((d.length+1)*i)}a.each(d,function(l,c){if(f._myGrid===undefined){var k=new e(f,c),d=f._customize(k.getHtml(true));if(j==="horizontal")d.width(g).css("float",h?"left":"right").appendTo(b);else d.appendTo(b)}else if(j==="horizontal")a(f._myGrid.getHtml(c,true)).width(g).height(i).css("float",h?"left":"right").appendTo(b);else a(f._myGrid.getHtml(c,true)).height(i).appendTo(b)});this.options.displayDate=m;this._myGrid===undefined&&this._createMonthViews();this._refreshTitle();this.element.data("animating.wijcalendar",true);b.effect("slide",{mode:"hide",direction:j==="horizontal"?h?"left":"right":h?"up":"down",easing:this.options.easing||"easeOutBack",distance:(j==="horizontal"?g:i)*d.length,duration:this.options.duration},function(){c=b.children(":last");while(c.parent().is(".wijmo-wijcalendar-aniwrapper"))c.parent().replaceWith(c);c.css({"float":"",width:""});f._bindEvents();f.element.data("animating.wijcalendar",false);f._trigger("afterSlide")})},_onTitleClicked:function(){if(!this.options.allowQuickPick||!this._isSingleMonth())return;if(this._isAnimating())return;if(this._myGrid===undefined)this._myGrid=new g(this);else switch(this._myGrid.gridType){case"month":this._myGrid.gridType="year";break;case"year":this._myGrid.gridType="decade";break;case"decade":return}this._refreshTitle();this.element.width(this.element.width()).height(this.element.height());var d=this.element.find(".ui-datepicker-calendar"),b,e,c,o=d.outerWidth(),k=d.outerHeight(),f,j,n,i,h,m,l=this;if(d.parent().is(".wijmo-wijcalendar-aniwrapper"))b=d.parent();else b=a.effects.createWrapper(d).css({overflow:"hidden"}).removeClass("ui-effects-wrapper").addClass("wijmo-wijcalendar-aniwrapper");if(b.parent().is(".wijmo-wijcalendar-aniwrapper"))e=b.parent();else e=a.effects.createWrapper(b).css({overflow:"hidden"}).removeClass("ui-effects-wrapper").addClass("wijmo-wijcalendar-aniwrapper").width(o).height(k);c=a(this._myGrid.getHtml(true)).css({position:"absolute",top:0,left:0,opacity:0}).appendTo(e).height(k);f=this._myGrid.getSelectedIndex();j=Math.floor(f/4);n=f-j*4;i=o/4;h=k/3;m={left:i*n,top:h*j,width:i,height:h};d.width("100%").height("100%");b.css({border:"solid 1px #cccccc"});this.element.data("animating.wijcalendar",true);b.effect("size",{to:m,duration:this.options.duration||500},function(){b.remove()});c.animate({opacity:1},this.options.duration||500,function(){c.css({position:"",top:"",left:"",filter:""});while(c.parent().is(".wijmo-wijcalendar-aniwrapper"))c.parent().replaceWith(c);l._bindEvents();l.element.data("animating.wijcalendar",false)})},_onMyGridClicked:function(p){if(this._myGrid===undefined)return false;if(this._isAnimating())return false;var c=a(p.currentTarget),i=parseInt(c.attr("index"),10),o=parseInt(c.attr("value"),10),b=this.element.find(".ui-datepicker-calendar"),k,g,j,f,l,h,m,n,d,e=this;if(this._myGrid.gridType!=="month")if(!i||i===11)return false;!c.hasClass("ui-state-active")&&this._myGrid.select(i,o);if(this._myGrid.gridType==="decade")this._myGrid.gridType="year";else if(this._myGrid.gridType==="year")this._myGrid.gridType="month";else this._myGrid=undefined;this._refreshTitle();j=b.outerWidth();f=b.outerHeight();if(b.parent().is(".wijmo-wijcalendar-aniwrapper"))g=b.parent();else g=a.effects.createWrapper(b).css({overflow:"hidden"}).removeClass("ui-effects-wrapper").addClass("wijmo-wijcalendar-aniwrapper").width(j).height(f);l=a.extend({},c.position(),{width:c.width(),height:c.height()});if(this._myGrid===undefined){this._createMonthViews();m=this.getDisplayDate();n=this._getMonthView(m);h=this._customize(n.getHtml(true))}else h=a(this._myGrid.getHtml(true));d=h.height(f).appendTo(g);k=a.effects.createWrapper(d).css({overflow:"hidden"}).removeClass("ui-effects-wrapper").addClass("wijmo-wijcalendar-aniwrapper").css(a.extend(l,{border:"solid 1px #cccccc",position:"absolute"}));this.element.data("animating.wijcalendar",true);k.animate({left:0,top:0,width:j,height:f},this.options.duration||500,function(){});b.animate({opacity:0},this.options.duration||500,function(){b.remove();while(d.parent().is(".wijmo-wijcalendar-aniwrapper"))d.parent().replaceWith(d);e._myGrid===undefined&&e.element.width("").height("");e._bindEvents();e.element.data("animating.wijcalendar",false)});return false},_onMyGridMouseEnter:function(d){if(this._myGrid===undefined)return;var c=a(d.currentTarget),b=parseInt(c.attr("index"),10);if(this._myGrid.gridType!=="month"&&(b<0||b>11))return;c.addClass("ui-state-hover")},_onMyGridMouseLeave:function(d){if(this._myGrid===undefined)return;var c=a(d.currentTarget),b=parseInt(c.attr("index"),10);if(this._myGrid.gridType!=="month"&&(b<0||b>11))return;c.removeClass("ui-state-hover")},_bindEvents:function(){if(!this.element.data("preview.wijcalendar")&&!this.options.disabledState){this.element.find("div .wijmo-wijcalendar-navbutton").unbind().bind("mouseout.wijcalendar",function(){var b=a(this);b.removeClass("ui-state-hover");if(b.hasClass("ui-datepicker-next-hover"))b.removeClass("ui-datepicker-next-hover");else b.hasClass("ui-datepicker-prev-hover")&&b.removeClass("ui-datepicker-prev-hover")}).bind("mouseover.wijcalendar",function(){var b=a(this);b.addClass("ui-state-hover");if(b.hasClass("ui-datepicker-next"))b.addClass("ui-datepicker-next-hover");else b.hasClass("ui-datepicker-prev")&&b.addClass("ui-datepicker-prev-hover")}).bind("click.wijcalendar",a.proxy(this._onNavButtonClicked,this));this.element.unbind(".wijcalendar").bind({"mouseup.wijcalendar":a.proxy(this._onMouseUp,this)});this.element.find(".ui-datepicker-title").unbind().bind("mouseout.wijcalendar",function(){a(this).removeClass("ui-state-hover")}).bind("mouseover.wijcalendar",function(){a(this).addClass("ui-state-hover")}).bind("click.wijcalendar",a.proxy(this._onTitleClicked,this));this.element.find(".wijmo-wijcalendar-prevpreview-button, .wijmo-wijcalendar-nextpreview-button").unbind("mouseenter.wijcalendar").unbind("mouseleave.wijcalendar").bind({"mouseenter.wijcalendar":a.proxy(this._onPreviewMouseEnter,this),"mouseleave.wijcalendar":a.proxy(this._onPreviewMouseLeave,this)});if(this._myGrid===undefined){this.element.find(".wijmo-wijcalendar-day-selectable").unbind().bind({"click.wijcalendar":a.proxy(this._onDayClicked,this),"mouseenter.wijcalendar":a.proxy(this._onDayMouseEnter,this),"mouseleave.wijcalendar":a.proxy(this._onDayMouseLeave,this),"mousedown.wijcalendar":a.proxy(this._onDayMouseDown,this),"dragstart.wijcalendar":a.proxy(this._onDayDragStart,this)});!!this.options.selectionMode.month&&this.element.find(".wijmo-wijcalendar-monthselector").unbind().bind({"click.wijcalendar":a.proxy(this._onMonthSelectorClicked,this),"mouseenter.wijcalendar":a.proxy(this._onMonthSelectorMouseEnter,this),"mouseleave.wijcalendar":a.proxy(this._onMonthSelectorMouseLeave,this)});!!this.options.selectionMode.weekDay&&this.element.find(".ui-datepicker-week-day").unbind().bind({"click.wijcalendar":a.proxy(this._onWeekDayClicked,this),"mouseenter.wijcalendar":a.proxy(this._onWeekDayMouseEnter,this),"mouseleave.wijcalendar":a.proxy(this._onWeekDayMouseLeave,this)});!!this.options.selectionMode.weekNumber&&this.element.find(".wijmo-wijcalendar-week-num").unbind().bind({"click.wijcalendar":a.proxy(this._onWeekNumberClicked,this),"mouseenter.wijcalendar":a.proxy(this._onWeekNumberMouseEnter,this),"mouseleave.wijcalendar":a.proxy(this._onWeekNumberMouseLeave,this)})}else this.element.find(".wijmo-wijcalendar-day-selectable").unbind().bind({"click.wijcalendar":a.proxy(this._onMyGridClicked,this),"mouseenter.wijcalendar":a.proxy(this._onMyGridMouseEnter,this),"mouseleave.wijcalendar":a.proxy(this._onMyGridMouseLeave,this)})}},_isSelectable:function(a){var b=this.options;return b.showOtherMonthDays&&a&c.otherMonth||!(a&(c.outOfRange|c.disabled|c.otherMonth))},_getCellClassName:function(b,h,e){var f=this.options,a="",d="ui-state-default",g=!!f.selectionMode.day||!!f.selectionMode.days;e=e||false;if(!e&&!f.disabledState&&g&&this._isSelectable(b))a+=" wijmo-wijcalendar-day-selectable";if(b&c.weekEnd)a+=" ui-datepicker-week-end";if(b&c.otherMonth){a+=" ui-datepicker-other-month";d+=" ui-priority-secondary"}if(b&c.outOfRange){a+=" wijmo-wijcalendar-outofrangeday";d+=" ui-priority-secondary"}if(b&c.gap)a+=" wijmo-wijcalendar-gap";else{if(b&c.disabled){a+=" ui-datepicker-unselectable";d+=" ui-state-disabled"}if(b&c.today){a+=" ui-datepicker-days-cell-over ui-datepicker-today";d+=" ui-state-highlight"}if(b&c.selected&&(b&(c.outOfRange|c.disabled))===0){a+=" ui-datepicker-current-day";d+=" ui-state-active"}if(b&c.gap)a+=" wijmo-wijcalendar-gap";if(b&c.custom)a+=" wijmo-wijcalendar-customday"}return{cssCell:a,cssText:d}},_onNavButtonClicked:function(g){if(this._isAnimating())return false;var c=1,f=a(g.currentTarget).attr("id"),e=this.getDisplayDate(),d=e;if(this._myGrid===undefined){c=f.indexOf("quick")>=0?this.options.quickNavStep:1;c=f.indexOf("next")>=0?c:-c;c=c*this.options.monthRows*this.options.monthCols;d=b.addMonths(e,c)}else{c=f.indexOf("next")>=0?1:-1;switch(this._myGrid.gridType){case"month":d=b.addYears(e,c);break;case"year":d=b.addYears(e,c*10);break;case"decade":d=b.addYears(e,c*100)}}this._slideToDate(d);return false},_getMonthGroupHtml:function(){var f=this.getDisplayDate(),c,h,a,g,e;if(this._isSingleMonth()){c=this._getMonthView(f);c.showPreview=this.options.allowPreview&&!this.element.data("preview.wijcalendar");return c.getHtml()}h=100/this.options.monthCols+"%";a=new d;for(g=0;g<this.options.monthRows;g++){for(e=0;e<this.options.monthCols;e++){a.writeBeginTag("div");a.writeAttribute("class","ui-datepicker-group"+(e===0?" ui-datepicker-group-first":"")+(e===this.options.monthCols-1?" ui-datepicker-group-last":""));a.writeAttribute("style","width:"+h);a.writeTagRightChar();c=this._getMonthView(f);c.showPreview=false;a.write(c.getHtml());a.writeEndTag("div");f=b.addMonths(f,1)}a.writeBeginTag("div");a.writeAttribute("class","ui-datepicker-row-break");a.writeTagRightChar();a.writeEndTag("div")}return a.toString()},_getCalendarHtml:function(){this._createMonthViews();var a=new d;a.write(this._getMonthGroupHtml());return a.toString()},_customizeDayCell:function(a){a.attr("state")===undefined&&a.attr("state","normal");if(a.attr("daytype")===undefined)return;if(a.attr("date")===undefined)return;var b=parseInt(a.attr("daytype"),10),d=new Date(a.attr("date")),c=a.attr("state")==="hover";this.options.customizeDate(a,d,b,c)},_customize:function(c){var e=this.options,d=this,b=a(c);if(!a.isFunction(e.customizeDate))return b;a.each(b.find(".wijmo-wijcalendar-day-selectable"),function(c,b){d._customizeDayCell(a(b))});return b},_createCalendar:function(){return this._customize(a(this._getCalendarHtml()))},_createMonthGroup:function(){return this._customize(a(this._getMonthGroupHtml()))},_getMonthID:function(a){return a.getFullYear()+"_"+(a.getMonth()+1)},_createMonthViews:function(){this._monthViews={};for(var c="",a=this.getDisplayDate(),f,d,g,h=0;h<this.options.monthRows;h++)for(f=0;f<this.options.monthCols;f++){c=this._getMonthID(a);this._monthViews[c]=new e(this,a);if(h===0){if(f===0)this._monthViews[c].isFirst=true;if(f===this.options.monthCols-1)this._monthViews[c].isLast=true}a=b.addMonths(a,1)}a=this.getDisplayDate();c=this._getMonthID(a);d=this._monthViews[c];if(d)this._groupStartDate=d.getStartDate();g=this.options.monthRows*this.options.monthCols;if(g>1){a=b.addMonths(a,g-1);c=this._getMonthID(a);d=this._monthViews[c]}if(d)this._groupEndDate=d.getEndDate()},_getMonthView:function(b){var a=this._getMonthID(b);return this._monthViews[a]},_getId:function(){return this.element.attr("id")},_getChildElement:function(b){var a=this.element.find("[id*='"+b+"']");return a.length===0?undefined:a},_refreshDayCell:function(h){var b=a(h),i=this.options,d,g,f,e;b.attr("state")===undefined&&b.attr("state","normal");if(b.attr("daytype")===undefined)return;if(b.attr("date")===undefined)return;d=parseInt(b.attr("daytype"),10);g=new Date(b.attr("date"));f=b.attr("state")==="hover";b.attr("class",this._getCellClassName(d,g).cssCell);b.removeAttr("aria-selected");d&c.selected&&b.attr("aria-selected",true);if(a.isFunction(i.customizeDate))if(this._customizeDayCell(b))return;e=b.find("a");if(e.length>0){e.toggleClass("ui-state-hover",f);e.toggleClass("ui-state-active",(d&c.selected)!==0)}},_isSingleMonth:function(){return this.options.monthCols*this.options.monthRows===1},_splitString:function(f,e,b){if(b===undefined)return f.split(e);for(var c=[],d=f.split(e),a=0;a<d.length;a++)if(a>=b)c[b-1]=c[b-1]+e+d[a];else c.push(d[a]);return c},_getNavButtonHtml:function(f,e,c,b){var a=new d;a.writeBeginTag("a");a.writeAttribute("id",f);a.writeAttribute("class",e);a.writeAttribute("role","button");a.writeAttribute("href","#");if(b){a.writeAttribute("title",b);a.writeAttribute("aria-label",b)}a.writeTagRightChar();a.writeBeginTag("span");a.writeAttribute("class",c);a.writeTagRightChar();b&&a.write(b);a.writeEndTag("span");a.writeEndTag("a");return a.toString()},_getTitleText:function(d){if(this._myGrid!==undefined)return this._myGrid.getTitle();else{var b=d||this.getDisplayDate(),c=this.options.titleFormat||"MMMM yyyy";return a.isFunction(this.options.title)?this.options.title(b,c)||this._formatDate(c,b):this._formatDate(c,b)}},_refreshTitle:function(){this.element.find(".ui-datepicker-title").html(this._getTitleText())},_fillTitle:function(a,b){a.writeBeginTag("div");a.writeAttribute("class","ui-datepicker-title wijmo-wijcalendar-title ui-state-default ui-corner-all");a.writeTagRightChar();a.write(this._getTitleText(b));a.writeEndTag("div")},_getHeaderHtml:function(g,e,c){var h=!!this.element.data("preview.wijcalendar"),f=h?"none":this._isSingleMonth()?this.options.navButtons:"default",b=this.element.is(".ui-datepicker-rtl"),a=new d;if(f==="quick"){a.writeBeginTag("div");a.writeAttribute("class","ui-widget-header wijmo-wijcalendar-header ui-helper-clearfix ui-corner-all");a.writeAttribute("role","heading");a.writeTagRightChar();!!e&&a.write(this._getNavButtonHtml("quickprev","wijmo-wijcalendar-navbutton ui-datepicker-prev ui-corner-all","ui-icon ui-icon-seek-"+(b?"next":"prev"),this.options.quickPrevTooltip.replace("#",this.options.quickNavStep)));a.writeBeginTag("div");a.writeAttribute("class","ui-datepicker-header wijmo-wijcalendar-header-inner");a.writeTagRightChar();!!e&&a.write(this._getNavButtonHtml("prev","wijmo-wijcalendar-navbutton ui-datepicker-prev ui-corner-all","ui-icon ui-icon-circle-triangle-"+(b?"e":"w"),this.options.prevTooltip));this._fillTitle(a,g);!!c&&a.write(this._getNavButtonHtml("next","wijmo-wijcalendar-navbutton ui-datepicker-next ui-corner-all","ui-icon ui-icon-circle-triangle-"+(b?"w":"e"),this.options.nextTooltip));a.writeEndTag("div");!!c&&a.write(this._getNavButtonHtml("quicknext","wijmo-wijcalendar-navbutton ui-datepicker-next ui-corner-all","ui-icon ui-icon-seek-"+(b?"prev":"next"),this.options.quickNextTooltip.replace("#",this.options.quickNavStep)));a.writeEndTag("div")}else{a.writeBeginTag("div");a.writeAttribute("class","ui-datepicker-header ui-widget-header ui-datepicker-header ui-helper-clearfix ui-corner-all");a.writeAttribute("role","heading");a.writeTagRightChar();f!=="none"&&!!e&&a.write(this._getNavButtonHtml("prev","wijmo-wijcalendar-navbutton ui-datepicker-prev ui-corner-all","ui-icon ui-icon-circle-triangle-"+(b?"e":"w"),this.options.prevTooltip));this._fillTitle(a,g);f!=="none"&&!!c&&a.write(this._getNavButtonHtml("next","wijmo-wijcalendar-navbutton ui-datepicker-next ui-corner-all","ui-icon ui-icon-circle-triangle-"+(b?"w":"e"),this.options.nextTooltip));a.writeEndTag("div")}return a.toString()},_formatDate:function(c,a){return!b.getTicks(a)?"&nbsp;":Globalize.format(a,c,this._getCulture())}});var d=function(){this._html=[]};d.prototype={_html:null,writeTagLeftChar:function(){this._html[this._html.length]="<"},writeTagRightChar:function(){this._html[this._html.length]=">"},write:function(a){this._html[this._html.length]=" "+a+" "},writeBeginTag:function(a){this._html[this._html.length]="<"+a},writeEndTag:function(a){this._html[this._html.length]="</"+a+">"},writeFullBeginTag:function(a){this._html[this._html.length]="<"+a+">"},writeSelfClosingTagEnd:function(){this._html[this._html.length]="/>"},writeAttribute:function(b,a){if(a===undefined||a===null)return;this._html[this._html.length]=" "+b+'="';this._html[this._html.length]=a;this._html[this._html.length]='"'},clean:function(){this._html=[]},toString:function(){return this._html.join("")}};var b={addDays:function(a,c){var b=new Date(a.getFullYear(),a.getMonth(),a.getDate()+c);if(c)if(b.getDate()===a.getDate()){b=new Date(a.getFullYear(),a.getMonth(),a.getDate());b.setTime(b.getTime()+c*864e5)}return b},addMonths:function(a,b){return new Date(a.getFullYear(),a.getMonth()+b,1)},addYears:function(b,a){return this.addMonths(b,a*12)},getDate:function(a){return new Date(a.getFullYear(),a.getMonth(),a.getDate())},getTicks:function(a){return a.valueOf()},isSameDate:function(a,b){return a.getFullYear()===b.getFullYear()&&a.getMonth()===b.getMonth()&&a.getDate()===b.getDate()},isSameMonth:function(a,b){return a.getFullYear()===b.getFullYear()&&a.getMonth()===b.getMonth()},getDaysInMonth:function(a){return new Date(a.getFullYear(),a.getMonth()+1,0).getDate()},getWeekStartDate:function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate()-(a.getDay()-b+7)%7)},getDayOfYear:function(a){var c=new Date(a.getFullYear(),0,1),b=this.getTicks(a)-this.getTicks(c),d=b/864e5;return Math.floor(d)+1},getFirstDayWeekOfYear:function(c,e){var d=this.getDayOfYear(c)-1,a=c.getDay()-d%7,b;a=(a-e+14)%7;b=(d+a)/7;return Math.floor(b)+1},getDayOfWeek:function(b,a){return(b.getDay()-a+7)%7},getWeekOfYearFullDays:function(d,f,b,e){var c=this.getDayOfYear(d)-1,a=this.getDayOfWeek(d,b)-c%7;a=(b-a+14)%7;if(a&&a>=e)a-=7;a=c-a;return a>=0?Math.floor(a/7)+1:this.getWeekOfYearFullDays(this.addDays(d,-(c+1)),f,b,e)},getWeekOfYear:function(b,c,a){switch(c){case"firstDay":return this.getFirstDayWeekOfYear(b,a);case"firstFullWeek":return this.getWeekOfYearFullDays(b,c,a,7);case"firstFourDayWeek":return this.getWeekOfYearFullDays(b,c,a,4)}return this.getFirstDayWeekOfYear(b,a)},getDateToken:function(a){return a.getFullYear()+"_"+a.getMonth()+"_"+a.getDate()}},e=function(c,a){this.calendar=c;if(a===undefined||b.isSameDate(a,new Date(1900,0,1)))a=new Date;this.displayDate=a;this.id=this.calendar._getId()+"_"+this.calendar._getMonthID(a);this.isFirst=false;this.isLast=false;this.showPreview=false;this.culture=this.calendar._getCulture();this._calcDates(this.displayDate)};e.prototype={_calcDates:function(a){var c=b.getDaysInMonth(a);this._startDateInMonth=new Date(a.getFullYear(),a.getMonth(),1);this._endDateInMonth=b.addDays(this._startDateInMonth,c-1);this._startDate=b.getWeekStartDate(this._startDateInMonth,this.culture.calendar.firstDay);this._endDate=b.addDays(this._startDate,this.calendar.options.dayRows*this.calendar.options.dayCols-1)},_isFirstMonth:function(){var a=this.calendar.getDisplayDate();return b.isSameMonth(this._startDateInMonth,a)},_isLastMonth:function(){var a=this.calendar.getDisplayDate();a=new Date(a.getFullYear(),a.getMonth(),1);a=b.addMonths(a,this.calendar.options.monthCols*this.calendar.options.monthRows-1);return b.isSameMonth(this._startDateInMonth,a)},getStartDate:function(){return this._startDate},getEndDate:function(){return this._endDate},_getMonthDate:function(){this._startDateInMonth===undefined&&this._calcDates(this.getDisplayDate());return this._startDateInMonth},_setMonthDate:function(a){this._calcDates(a)},_getWeekDayText:function(c,d){d=d||"short";var b=this.culture.calendar.days,a="";switch(d){case"full":a=b.names[c];break;case"firstLetter":a=b.names[c].substring(0,1);break;case"abbreviated":a=b.namesAbbr[c];break;default:a=b.namesShort[c]}return a},_getRowCount:function(){var a=this.calendar.options;return a.showWeekDays?a.dayRows+1:a.dayRows},_getColCount:function(){var a=this.calendar.options;return a.showWeekNumbers?a.dayCols+1:a.dayCols},_getDayType:function(d){var e=this.calendar.options,a=c.general,h=d.getDay(),m=h===6||h===0,g=d<e.minDate||d>e.maxDate,f=d<this._startDateInMonth||d>this._endDateInMonth,i=g||this.calendar._getDisabledDates().contains(d),j=this.calendar._getSelectedDates().contains(d),n=new Date,l=b.isSameDate(d,n),k=false;if(m)a|=c.weekEnd;if(l)a|=c.today;if(i)a|=c.disabled;if(f)a|=c.otherMonth;if(g)a|=c.outOfRange;if(j)a|=c.selected;if(k)a|=c.custom;if(f&&!e.showOtherMonthDays)a|=c.gap;return a},_refreshDate:function(b){if(b<this._startDate||b>this._endDate)return;var j=this.calendar.options,i=Math.floor(Math.abs(b-this._startDate)/864e5),f=Math.floor(i/this.calendar.options.dayCols),e=Math.floor(i%this.calendar.options.dayCols),c,g,d,h;if(j.showWeekNumbers)e++;if(j.showWeekDays)f++;c=a("#"+this.id,this.calendar.element).get(0);if(c)if(f<c.rows.length){g=c.rows[f];if(e<g.cells.length){d=g.cells[e];h=this._getDayType(b);a(d).attr("daytype",h.toString());this.calendar._refreshDayCell(d)}}},_fillDayCell:function(a,b,k){var j=this.calendar.options,f=null,d=b.getDate().toString(),h=this.calendar._formatDate(j.toolTipFormat||"dddd, MMMM dd, yyyy",b),e=this._getDayType(b),g=this.calendar._isSelectable(e),i=this.calendar._getCellClassName(e,b,k);d=j.showDayPadding&&d.length===1?"0"+d:d;a.writeBeginTag("td");a.writeAttribute("daytype",e.toString());if(g){a.writeAttribute("title",h);a.writeAttribute("aria-label",h)}a.writeAttribute("date",b.toDateString());a.writeAttribute("class",i.cssCell);a.writeAttribute("role","gridcell");!g&&a.writeAttribute("aria-disabled","true");a.writeTagRightChar();if(e&c.gap)a.write("&#160;");else if(f&&f.content)a.write(f.content);else{a.writeBeginTag("a");a.writeAttribute("class",i.cssText);a.writeAttribute("href","#");a.writeAttribute("onclick","return false;");a.writeTagRightChar();a.write(d);a.writeEndTag("a")}a.writeEndTag("td")},getHtml:function(g){g=!!g;var c=this.calendar.options,h=!!this.calendar.element.data("preview.wijcalendar"),a=new d,e,m,f,k,q,o,r,l,j,i,p,n;!g&&c.showTitle&&a.write(this.calendar._getHeaderHtml(this._startDateInMonth,this.isFirst,this.isLast));if(!g&&!h&&this.showPreview){a.writeBeginTag("div");a.writeAttribute("class","wijmo-wijcalendar-prevpreview-button");a.writeAttribute("role","button");a.writeAttribute("aria-haspopup","true");a.writeAttribute("id","prevPreview");a.writeTagRightChar();a.writeBeginTag("a");a.writeAttribute("class","ui-icon ui-icon-grip-dotted-vertical");a.writeAttribute("href","#");a.writeAttribute("title",c.prevPreviewTooltip);a.writeAttribute("aria-label",c.prevPreviewTooltip);a.writeAttribute("onclick","return false;");a.writeTagRightChar();a.write("&#160;");a.writeEndTag("a");a.writeEndTag("div")}a.writeBeginTag("table");a.writeAttribute("id",this.id);a.writeAttribute("class","ui-datepicker-calendar wijmo-wijcalendar-table");a.writeAttribute("role","grid");a.writeAttribute("summary",this.calendar._getTitleText(this._startDateInMonth));a.writeAttribute("onselectstart","return false;");a.writeTagRightChar();if(c.showWeekDays){a.writeFullBeginTag("thead");a.writeBeginTag("tr");a.writeTagRightChar();if(c.showWeekNumbers){a.writeBeginTag("th");a.writeAttribute("id",this.id+"_ms");a.writeAttribute("class","ui-datepicker-week-col wijmo-wijcalendar-monthselector"+(!!c.selectionMode.month?" wijmo-wijcalendar-selectable":""));a.writeAttribute("role","columnheader");a.writeTagRightChar();if(!!c.selectionMode.month&&!h&&!c.disabledState){a.writeBeginTag("a");a.writeAttribute("class","ui-icon ui-icon-triangle-1-se");a.writeSelfClosingTagEnd()}else a.write("Wk");a.writeEndTag("th")}f=this._startDate.getDay();k=this._startDate;for(e=0;e<c.dayCols;e++){q=f===6||f===0;o=e+(c.showWeekNumbers?1:0);r=this._getWeekDayText(f,c.weekDayFormat);l=this._getWeekDayText(f,"full");a.writeBeginTag("th");a.writeAttribute("id",this.id+"_cs_"+o);a.writeAttribute("class","ui-datepicker-week-day"+(q?" ui-datepicker-week-end":"")+(!!c.selectionMode.weekDay?" wijmo-wijcalendar-selectable":""));a.writeAttribute("role","columnheader");a.writeTagRightChar();a.writeBeginTag("span");a.writeAttribute("title",l);a.writeAttribute("aria-label",l);a.writeTagRightChar();a.write(r);a.writeEndTag("span");a.writeEndTag("th");f=(f+1)%7;k=b.addDays(k,1)}a.writeEndTag("tr");a.writeEndTag("thead")}a.writeFullBeginTag("tbody");j=this._startDate;i=this._startDateInMonth;for(e=0;e<c.dayRows;e++){a.writeBeginTag("tr");a.writeTagRightChar();if(c.showWeekNumbers){p=e+(c.showWeekDays?1:0);a.writeBeginTag("td");a.writeAttribute("id",this.id+"_rs_"+p);a.writeAttribute("class","ui-datepicker-week-col wijmo-wijcalendar-week-num"+(!!c.selectionMode.weekNumber?" wijmo-wijcalendar-selectable":""));a.writeAttribute("role","rowheader");a.writeTagRightChar();n=b.getWeekOfYear(i,c.calendarWeekRule,this.culture.calendar.firstDay);a.write(n);a.writeEndTag("td");i=b.addDays(i,c.dayCols)}for(m=0;m<c.dayCols;m++){this._fillDayCell(a,j,h);j=b.addDays(j,1)}a.writeEndTag("tr")}a.writeEndTag("tbody");a.writeEndTag("table");if(!g&&!h&&this.showPreview){a.writeBeginTag("div");a.writeAttribute("class","wijmo-wijcalendar-nextpreview-button");a.writeAttribute("role","button");a.writeAttribute("aria-haspopup","true");a.writeAttribute("id","nextPreview");a.writeTagRightChar();a.writeBeginTag("a");a.writeAttribute("class","ui-icon ui-icon-grip-dotted-vertical");a.writeAttribute("href","#");a.writeAttribute("title",c.nextPreviewTooltip);a.writeAttribute("aria-label",c.nextPreviewTooltip);a.writeAttribute("onclick","return false;");a.writeTagRightChar();a.write("&#160;");a.writeEndTag("a");a.writeEndTag("div")}return a.toString()}};var f=function(b,a){this._calendar=b;this._optionName=a;this._normalize()};f.prototype={_calendar:null,_optionName:"selectedDates",getDates:function(){if(this._calendar.options[this._optionName]===undefined)this._calendar.options[this._optionName]=[];return this._calendar.options[this._optionName]},setDates:function(a){this._calendar.options[this._optionName]=a;this._normalize()},getCount:function(){return this.getDates().length},clear:function(){this.setDates([])},add:function(a){this.addRange(a,a)},remove:function(a){this.removeRange(a,a)},indexOf:function(a){return!this.getCount()?-1:this._findRangeBound(a,true,false)},contains:function(a){return this.indexOf(a)!==-1},removeRange:function(g,f){if(!this.getCount())return;var c=this._findRangeBound(g,false,true),a=this._findRangeBound(f,false,false),b,d,e;if(c<0||a<0)return;if(c>a)return;b=this.getDates();if(b[a]>f)return;d=!c?[]:b.slice(0,c);e=a>=b.length-1?[]:b.slice(a+1);this.setDates(d.concat(e))},addRange:function(c,d){this.removeRange(c,d);var g=this.getDates(),e=this._findRangeBound(c,false,true),h=!e?[]:g.slice(0,e),i=g.slice(e),f=[],a;c=b.getDate(c);d=b.getDate(d);for(a=c;a<=d;a=b.addDays(a,1))f[f.length]=a;this.setDates(h.concat(f.concat(i)))},_findRangeBound:function(f,h,g){var e=this.getDates(),c=0,d=e.length,a;while(c<d){a=c+d>>1;if(b.isSameDate(f,e[a]))return a;if(f<e[a])d=a;else c=a+1}return h?-1:g?c:d},_parseDate:function(a){var b;if(!a)a=new Date;else if(typeof a==="string")b=a;if(b){b=b.replace(/-/g,"/");try{a=new Date(b);if(isNaN(a))a=new Date}catch(c){a=new Date}}return a},_normalize:function(){var c=this._calendar.options[this._optionName],d=this,b;if(a.isArray(c)){b=a.map(c,function(a){return d._parseDate(a)});this._calendar.options[this._optionName]=b.sort(function(a,b){return a.getTime()-b.getTime()})}}};var g=function(a){this.gridType="month";this.calendar=a;this.culture=a._getCulture()};g.prototype={gridType:"month",calendar:null,culture:undefined,select:function(c,b){var a=this.calendar.getDisplayDate();switch(this.gridType){case"month":a.setMonth(b);break;case"year":a.setFullYear(b);break;case"decade":a.setFullYear(b)}this.calendar.options.displayDate=a},getSelectedIndex:function(){var b=this.calendar.getDisplayDate(),a=b.getFullYear(),d=Math.floor(a/10)*10-1,c=Math.floor(a/100)*100-10;switch(this.gridType){case"month":return b.getMonth();case"year":return a-d;case"decade":return Math.floor((a-c)/10)}return 0},getTitle:function(){var d=this.calendar.getDisplayDate(),a=d.getFullYear(),c=Math.floor(a/10)*10-1,b=Math.floor(a/100)*100-10;switch(this.gridType){case"month":return a.toString();case"year":return c+1+" - "+(c+10);case"decade":return b+10+" - "+(b+109)}return""},getHtml:function(g,l){if(g===undefined)g=this.calendar.getDisplayDate();else if(typeof g==="boolean"){l=g;g=this.calendar.getDisplayDate()}l=!!l;var e=this.calendar.options,s=3,u=4,a=new d,p,h,o,r,q,t,m,n,c,k,f,j,b,i;e.showTitle&&!l&&a.write(this.calendar._getHeaderHtml(null,true,true));p=100/s+"%";p="30%";a.writeBeginTag("table");a.writeAttribute("class","ui-datepicker-calendar wijmo-wijcalendar-mygrid");a.writeAttribute("role","grid");a.writeAttribute("onselectstart","return false;");a.writeTagRightChar();h=g.getFullYear();o=g.getFullYear()*12;r=Math.floor(h/10)*10-1;q=Math.floor(h/100)*100-10;t=this.culture.calendar.months;for(m=0;m<s;m++){a.writeBeginTag("tr");a.writeAttribute("height",p);a.writeTagRightChar();for(n=0;n<u;n++){c=m*4+n;k=false;f=false;j="";b=null;switch(this.gridType){case"month":if(g.getMonth()===c)k=true;b=c;j=t.namesAbbr[c];f=o+c<e.minDate.getFullYear()*12+e.minDate.getMonth()||o+c>e.maxDate.getFullYear()*12+e.maxDate.getMonth();break;case"year":if(c===0||c===11)f=true;b=r+c;if(b<e.minDate.getFullYear()||b>e.maxDate.getFullYear())f=true;else k=h===b;j=b.toString();break;case"decade":if(c===0||c===11)f=true;b=q+c*10;if(b+10<e.minDate.getFullYear()||b>e.maxDate.getFullYear())f=true;else k=h>=b&&h<b+10;j=b.toString()+"-<br/>"+(b+9).toString()}i="ui-datepicker-week-day";if(f)i=i+" ui-datepicker-other-month ui-priority-secondary ui-datepicker-unselectable";else if(!e.disabledState)i+=" wijmo-wijcalendar-day-selectable";i+=" ui-state-default"+(f?" ui-state-disabled":"")+(k?" ui-state-active ui-state-highlight":"");a.writeBeginTag("td");a.writeAttribute("class",i);a.writeAttribute("role","gridcell");a.writeAttribute("index",c.toString());a.writeAttribute("value",b.toString());a.writeAttribute("other",f.toString());a.writeTagRightChar();a.writeBeginTag("a");a.writeAttribute("href","#");a.writeTagRightChar();a.write(j);a.writeEndTag("a");a.writeEndTag("td")}a.writeEndTag("tr")}a.writeEndTag("table");return a.toString()}}})(jQuery);
+(function(a){"use strict";a.widget("wijmo.wijexpander",{options:{allowExpand:true,animated:"slide",contentUrl:"",expanded:true,expandDirection:"bottom"},_setOption:function(c,b){switch(c){case"contentUrl":if(b)this.element.find("> .ui-widget-content").wijContent(b);else this.element.find("> .ui-widget-content").html("");break;case"disabled":if(b)this.element.addClass("ui-state-disabled");else this.element.removeClass("ui-state-disabled");break;case"expandDirection":this._onDirectionChange(b,true,this.options.expandDirection);break;case"expanded":if(b)this.expand();else this.collapse();return}a.Widget.prototype._setOption.apply(this,arguments)},_create:function(){var d=this.element.children(),b,c;if(window.wijmoApplyWijTouchUtilEvents)a=window.wijmoApplyWijTouchUtilEvents(a);this.element.addClass("wijmo-wijexpander ui-expander ui-widget ui-helper-reset ui-expander-icons");b=a(d[0]);c=a(d[1]);if(this.options.expandDirection==="left"||this.options.expandDirection==="top"){b.remove();b.insertAfter(c)}b.addClass("ui-expander-header ui-helper-reset");b.attr("role","tab");c.attr("role","tabpanel");b.find("> a").length===0&&b.wrapInner('<a href="#"></a>');b.find("> .ui-icon").length===0&&a('<span class="ui-icon"></span>').insertBefore(a("> a",b)[0]);c.addClass("ui-expander-content ui-helper-reset ui-widget-content")},_init:function(){var b=this.options;this._onDirectionChange(b.expandDirection,false);b.contentUrl&&a(".ui-widget-content",this.element).wijContent(this.options.contentUrl);if(!b.expanded){this.element.find("> .ui-widget-content").hide();this.element.find("> .ui-expander-header").addClass("ui-state-default ui-corner-all").attr({"aria-expanded":"false",tabIndex:-1}).find("> .ui-icon").addClass(this._triangleIconClosed)}else{this.element.find("> .ui-expander-header").addClass("ui-state-active").attr({"aria-expanded":"true",tabIndex:0}).addClass(this._headerCornerOpened).find("> .ui-icon").addClass(this._triangleIconOpened);this.element.find("> .ui-widget-content").addClass("ui-expander-content-active").addClass(this._contentCornerOpened).wijTriggerVisibility()}b.disabled&&this.element.addClass("ui-state-disabled");this._bindLiveEvents()},destroy:function(){this._unbindLiveEvents();this.element.removeClass("wijmo-wijexpander ui-expander ui-widget ui-helper-reset ui-expander-icons");a.Widget.prototype.destroy.apply(this,arguments)},_bindLiveEvents:function(){a(".ui-expander-header",this.element[0]).live("click.wijexpander",jQuery.proxy(this._onHeaderClick,this)).live("mouseenter.wijexpander",function(){a(this).addClass("ui-state-hover")}).live("mouseleave.wijexpander",function(){a(this).removeClass("ui-state-hover")}).live("focus.wijexpander",function(){a(this).addClass("ui-state-focus")}).live("blur.wijexpander",function(){a(this).removeClass("ui-state-focus")})},_unbindLiveEvents:function(){a(".ui-expander-header",this.element[0]).die(".wijexpander")},_onDirectionChange:function(l,g,j){var b,i,h,f,e,k,d,c;j&&j!==l&&this.element.removeClass("ui-expander-"+j);if(g){i=this.element.find(".ui-expander-header."+this._headerCornerOpened);i.removeClass(this._headerCornerOpened);h=this.element.find(".ui-widget-content."+this._contentCornerOpened);h.removeClass(this._contentCornerOpened);f=this.element.find("."+this._triangleIconOpened);e=this.element.find("."+this._triangleIconClosed);f.removeClass(this._triangleIconOpened);e.removeClass(this._triangleIconClosed)}switch(l){case"top":this._headerCornerOpened="ui-corner-bottom";this._contentCornerOpened="ui-corner-top";this._triangleIconOpened="ui-icon-triangle-1-n";this._triangleIconClosed="ui-icon-triangle-1-e";b=true;this.element.removeClass("ui-helper-horizontal");this.element.addClass("ui-expander-top");break;case"right":this._headerCornerOpened="ui-corner-left";this._contentCornerOpened="ui-corner-right";this._triangleIconOpened="ui-icon-triangle-1-e";this._triangleIconClosed="ui-icon-triangle-1-s";b=false;this.element.addClass("ui-helper-horizontal");this.element.addClass("ui-expander-right");break;case"left":this._headerCornerOpened="ui-corner-right";this._contentCornerOpened="ui-corner-left";this._triangleIconOpened="ui-icon-triangle-1-w";this._triangleIconClosed="ui-icon-triangle-1-s";b=true;this.element.addClass("ui-helper-horizontal");this.element.addClass("ui-expander-left");break;default:this._headerCornerOpened="ui-corner-top";this._contentCornerOpened="ui-corner-bottom";this._triangleIconOpened="ui-icon-triangle-1-s";this._triangleIconClosed="ui-icon-triangle-1-e";b=false;this.element.removeClass("ui-helper-horizontal");this.element.addClass("ui-expander-bottom")}k=this.element.data("rightToLeft");this.element.data("rightToLeft",b);if(g){f.addClass(this._triangleIconOpened);e.addClass(this._triangleIconClosed);i.addClass(this._headerCornerOpened);h.addClass(this._contentCornerOpened)}g&&b!==k&&this.element.children(".ui-expander-header").each(function(){c=a(this);if(b){d=c.next(".ui-expander-content");c.remove();c.insertAfter(d)}else{d=c.prev(".ui-expander-content");c.remove();c.insertBefore(d)}})},collapse:function(){var d=this.options,e,c,f,b;if(!d.allowExpand)return;if(this.element.hasClass("ui-state-disabled"))return false;if(!this._trigger("beforeCollapse"))return false;if(d.animated){e={expand:false,content:this.element.find("> .ui-widget-content"),complete:jQuery.proxy(function(){this.element.find("> .ui-widget-content").removeClass("ui-expander-content-active");this._trigger("afterCollapse");this.element.find("> .ui-widget-content").css("display","")},this),horizontal:this.element.hasClass("ui-helper-horizontal")};c=a.wijmo.wijexpander.animations;f=d.duration;b=d.animated;if(b&&!c[b]&&!a.easing[b])b="slide";if(!c[b])c[b]=function(a){this.slide(a,{easing:b,duration:f||700})};c[b](e)}else{this.element.find("> .ui-widget-content").hide();this._trigger("afterCollapse")}this.element.find("> .ui-expander-header").removeClass("ui-state-active").removeClass(this._headerCornerOpened).attr({"aria-expanded":"false",tabIndex:-1}).addClass("ui-state-default ui-corner-all").find("> .ui-icon").removeClass(this._triangleIconOpened).addClass(this._triangleIconClosed);this.options.expanded=false;return true},expand:function(){var d=this.options,e,c,f,b;if(!d.allowExpand)return;if(this.element.hasClass("ui-state-disabled"))return false;if(!this._trigger("beforeExpand"))return false;if(d.animated){e={expand:true,content:this.element.find("> .ui-widget-content"),complete:jQuery.proxy(function(){this.element.find("> .ui-widget-content").addClass("ui-expander-content-active").addClass(this._contentCornerOpened).wijTriggerVisibility();this._trigger("afterExpand");this.element.find("> .ui-widget-content").css("display","")},this),horizontal:this.element.hasClass("ui-helper-horizontal")};c=a.wijmo.wijexpander.animations;f=d.duration;b=d.animated;if(b&&!c[b]&&!a.easing[b])b="slide";if(!c[b])c[b]=function(a){this.slide(a,{easing:b,duration:f||700})};c[b](e)}else{this.element.find("> .ui-widget-content").show();this._trigger("afterExpand")}this.element.find("> .ui-expander-header").removeClass("ui-state-default ui-corner-all").addClass("ui-state-active").addClass(this._headerCornerOpened).attr({"aria-expanded":"true",tabIndex:0}).find("> .ui-icon").removeClass(this._triangleIconClosed).addClass(this._triangleIconOpened);this.options.expanded=true;return true},_onHeaderClick:function(){this.option("expanded",!this.options.expanded);return false}});a.extend(a.wijmo.wijexpander,{animations:{slide:function(b,c){b=a.extend({easing:"swing",duration:300},b,c);if(b.expand)b.content.stop(true,true).animate(b.horizontal?{width:"show",opacity:"show"}:{height:"show",opacity:"show"},b);else b.content.stop(true,true).animate(b.horizontal?{width:"hide",opacity:"hide"}:{height:"hide",opacity:"hide"},b)}}})})(jQuery);
+(function(a){"use strict";var b="wijmo-wijmenu-item";a.widget("wijmo.wijmenu",{options:{trigger:"",triggerEvent:"click",position:{},animation:{animated:"slide",duration:400,easing:null},showAnimation:{},hideAnimation:{animated:"fade",duration:400,easing:null},showDelay:400,hideDelay:400,slidingAnimation:{duration:400,easing:null},mode:"flyout",superPanelOptions:null,checkable:false,orientation:"horizontal",direction:"ltr",maxHeight:200,backLink:true,backLinkText:"Back",topLinkText:"All",crumbDefaultText:"Choose an option",select:null,focus:null,blur:null,showing:null,items:[]},_preventEvent:function(a){a.preventDefault();a.stopImmediatePropagation()},_create:function(){var b=this,f=b.options,h=f.direction,c=f.mode,g,e=b.element,i,d=a.ui.keyCode;if(window.wijmoApplyWijTouchUtilEvents)a=window.wijmoApplyWijTouchUtilEvents(a);e.is(":hidden")&&e.wijAddVisibilityObserver&&e.wijAddVisibilityObserver(function(){b.refresh();e.wijRemoveVisibilityObserver&&e.wijRemoveVisibilityObserver()},"wijmenu");b.clickNameSpace="click.wijmenudoc"+b._newId();e.hide();b.cssPre="wijmo-wijmenu";b.nowIndex=9999;b.activeItem=null;b.refresh();e.attr("tabIndex",0);f.disabled&&b.disable();e.bind("keydown.wijmenuEvent",function(e){if(f.disabled)return;c==="sliding"&&b._getSublist().stop(true,true);var j=b.activeItem,k,m,l=f.orientation;if(j){k=j._isRoot();i=j._getSublist()}else k=true;switch(e.keyCode){case d.PAGE_UP:b.previousPage(e);b._preventEvent(e);break;case d.PAGE_DOWN:b.nextPage(e);b._preventEvent(e);break;case d.UP:if(l==="vertical"||c==="sliding"||!k){b.previous(e);b._preventEvent(e)}break;case d.DOWN:if(l==="vertical"||c==="sliding"||!k){b.next(e);b._preventEvent(e)}else if(j)if(c==="flyout"&&a.wijmo.wijmenu._hasVisibleSubMenus(j)>0)i.is(":hidden")&&j._showFlyoutSubmenu(e,function(){b.activate(e,j._getFirstSelectableSubItem())});break;case d.RIGHT:if(l==="horizontal"&&k&&c==="flyout"){if(h==="rtl")b.previous(e);else b.next(e);b._preventEvent(e)}else if(j){g=j.getParent();if(h==="rtl")b._keyDownToCloseSubmenu(c,e,g);else b._keyDownToOpenSubmenu(j,c,e,i)}break;case d.LEFT:if(l==="horizontal"&&k&&c==="flyout"){if(h==="rtl")b.next(e);else b.previous(e);b._preventEvent(e)}else{if(j)g=j.getParent();if(h==="rtl")b._keyDownToOpenSubmenu(j,c,e,i);else b._keyDownToCloseSubmenu(c,e,g)}break;case d.ENTER:if(!j)return;m=j._getLink();if(c==="flyout")break;else{b.select();m.is("a")&&m.attr("href")==="#"&&b._preventEvent(e)}break;case d.TAB:b.next(e);b._preventEvent(e)}})},_keyDownToOpenSubmenu:function(b,e,d,c){var f=this;if(e==="flyout"&&a.wijmo.wijmenu._hasVisibleSubMenus(b)>0)c.is(":hidden")&&b._showFlyoutSubmenu(d,function(){f.activate(d,b._getFirstSelectableSubItem())});else if(e==="sliding")c.length>0&&b._getLink().trigger("click",b._getFirstSelectableSubItem())},_keyDownToCloseSubmenu:function(f,e,c){var b=this,g=b.options,d;if(f==="flyout"){if(c){c._hideCurrentSubmenu();b.activate(e,c)}}else{g.backLink&&b._backLink&&b._backLink.is(":visible")&&b._backLink.trigger("click",function(){c&&b.activate(e,c)});d=a(".wijmo-wijmenu-breadcrumb",b.domObject.menucontainer).find("li a");d.length>0&&d.eq(d.length-2).trigger("click",function(){c&&b.activate(e,c)})}},_createMenuItems:function(){for(var b=this,c=[],e=b.options.items.length,f=b._getSublist().children("li").length,d=0;d<e-f;d++)b._getSublist().append("<li>");a(">li",b._getSublist()).each(function(f){var e=a(this),d=a.wijmo.wijmenu._getMenuItemOptions(b.options,f);c.push(b._createItemWidget(e,d))});return c},_createItemWidget:function(c,d){var b=a.wijmo.wijmenu._itemWidgetName;a.fn[b]&&c[b](d);return a.wijmo.wijmenu._getItemWidget(c)},_handleDisabledOption:function(b,c){var a=this;if(b){if(!a.disabledDiv)a.disabledDiv=a._createDisabledDiv(c);a.disabledDiv.appendTo(a.domObject.menucontainer)}else if(a.disabledDiv){a.disabledDiv.remove();a.disabledDiv=null}},_createDisabledDiv:function(){return a("<div></div>").addClass("ui-disabled").css({"z-index":"99999",position:"absolute",width:"100%",height:"100%",left:0,top:0})},_destroy:function(){var a=this,b=a.options;a.destroying=true;a[b.mode==="flyout"?"_killFlyout":"_killDrilldown"]();a._killMenuItems();a._killtrigger();a._killElement();a.destroying=false},destroy:function(){var b=this;this._destroy();if(b.disabledDiv){b.disabledDiv.remove();b.disabledDiv=null}a.Widget.prototype.destroy.apply(this)},activate:function(i,e){if(!e)return;var b=this,h=b.domObject.scrollcontainer,c,d,g=false,f=true;c=(e.jquery?e:e.element).eq(0);if(b.activeItem&&b.activeItem.element.get(0)===c.get(0))return;b.deactivate(i);b.activeItem=a.wijmo.wijmenu._getItemWidget(c);d=c.children(":first");b._trigger("focus",i,{item:b.activeItem});if(b.options.mode==="sliding"){f=c.parent().is(".wijmo-wijmenu-current");g=f&&h.wijsuperpanel("needToScroll",c);if(g){b._linkContainer.link=d;b._linkContainer.needToFocus=true;h.wijsuperpanel("scrollChildIntoView",c)}}d.addClass("ui-state-focus").end();b.element.removeAttr("aria-activedescendant");b.element.attr("aria-activedescendant",c.attr("id"));f&&!g&&d.is("a")&&d.focus()},deactivate:function(){var a=this,b=a.activeItem;if(!b)return;setTimeout(function(){b._getLink().removeClass("ui-state-focus").removeAttr("id");a._trigger("blur")},0);a.activeItem=null},next:function(a){this._move("next",function(a){return a._getFirstSelectableSubItem()},a)},previous:function(a){this._move("previous",function(a){return a._getLastSelectableSubItem()},a)},first:function(){var b=this,c,d,a;if(!b.activeItem)return false;c=b._getActiveItemElement();d=b.activeItem._getParentOrMenu();a=d._getFirstSelectableSubItem();return a&&c[0]===a.element[0]},last:function(){var b=this,c,d,a;if(!b.activeItem)return false;c=b._getActiveItemElement();d=b.activeItem._getParentOrMenu();a=d._getLastSelectableSubItem();return a&&c[0]===a.element[0]},nextPage:function(g){var b=this,e=b._getActiveItemElement(),i,h,c,d,f;if(e)d=b.activeItem._getParentOrMenu();else{d=b;e=b._getFirstSelectableSubItem()}if(b.options.mode==="sliding"&&b._hasScroll()){if(!e||b.last()){b.activate(g,d._getFirstSelectableSubItem());return}i=e.offset().top;h=b.options.maxHeight;c=a.wijmo.wijmenu._getSelectableSubItems(d,function(e){var b=a(e.element),d=h-(b.offset().top-i+b.height()),c=b.height();return d<c&&d>-c});if(!c.length)c=d._getLastSelectableSubItem();else c=c[c.length-1];b.activate(g,c)}else{if(!e||b.last())f=d._getFirstSelectableSubItem();else f=d._getLastSelectableSubItem();b.activate(g,f)}},previousPage:function(g){var b=this,e=b._getActiveItemElement(),i,h,d,c,f;if(e)c=b.activeItem._getParentOrMenu();else{c=b;e=b._getFirstSelectableSubItem()}if(b.options.mode==="sliding"&&b._hasScroll()){if(!e||b.first()){b.activate(g,c._getLastSelectableSubItem());return}i=e.offset().top;h=b.options.maxHeight;d=a.wijmo.wijmenu._getSelectableSubItems(c,function(e){var b=a(e.element),d=b.offset().top-i+h-b.height(),c=b.height();return d<c&&d>-c});if(!d.length)d=c._getFirstSelectableSubItem();else d=d[0];b.activate(g,d)}else{if(!e||b.first())f=c._getLastSelectableSubItem();else f=c._getFirstSelectableSubItem();b.activate(g,f)}},select:function(d){var b=this,a=b.activeItem,c;b._trigger("select",d,{item:a});if(b.options.checkable){c=!a.options.selected;a._setOption("selected",c)}},_getActiveItemElement:function(){return this.activeItem?this.activeItem.element:null},setItemDisabled:function(d,b){var c=a(d,this.element);c.find(".wijmo-wijmenu-item>a").attr("disabled",b);c.find(">a").toggleClass("ui-state-disabled",b)},_setOption:function(b,c){var a=this;if(a.destroying)return;a["_set_"+b]&&a["_set_"+b](c);a.options[b]=c;b==="disabled"&&a._handleDisabledOption(c,a.domObject.menucontainer)},_set_items:function(b){var a=this;a._getSublist().children().remove();a.options.items=b;a.refresh()},_set_mode:function(b){var a=this;a._destroy();a.options.mode=b;a.refresh()},_set_backLink:function(d){var b=this,c;this.options.backLink=d;if(b.options.mode==="sliding"){b._killDrilldown();b._drilldown();c=a(".wijmo-wijmenu-breadcrumb",b.domObject.menucontainer);b._resetDrilldownMenu(c)}},_set_direction:function(){var a=this;a._destroy();a.refresh()},_set_orientation:function(e){var b=this,d=b.domObject.menucontainer,i=b.options.direction,c="ui-icon-triangle-1-",f=i==="rtl"?"w":"e",h=e==="horizontal"?f:"s",g=e==="horizontal"?"s":f;d.removeClass(b.cssPre+"-vertical "+b.cssPre+"-horizontal");if(b.options.mode==="flyout"){d.addClass(b.cssPre+"-"+e);a.each(b.getItems(),function(b,a){if(a.getItems().length===0)return;a._getLink().find("."+c+h).removeClass(c+h+" "+c+g).addClass(c+g)})}else d.addClass(b.cssPre+"-vertical")},_getTriggerEle:function(){return a.wijmo.wijmenu._getOuterElement(this.options.trigger,".wijmo-wijmenu")},_set_triggerEvent:function(d){var a=this,c=a.options,b=a._getTriggerEle();a._killtrigger();c.triggerEvent=d;b.length>0&&a._initTrigger(b);if(c.mode==="flyout"){a._killFlyout();a._flyout()}},_set_trigger:function(d){var a=this,c=a.options,b;a._killtrigger();c.trigger=d;b=a._getTriggerEle();b.length>0&&a._initTrigger(b);if(c.mode==="flyout"){a._killFlyout();a._flyout()}},_initTrigger:function(b){var f=this.options,e=f.triggerEvent,c=this,g=c.domObject.menucontainer,d=".wijmenuEvent";if(b.is("iframe"))b=a(b.get(0).contentWindow.document);switch(e){case"click":b.bind(e+d,function(a){f.mode!=="popup"&&c._displayMenu(a);a.stopPropagation()});break;case"mouseenter":b.bind(e+d,function(a){c._displayMenu(a);a.stopPropagation()});break;case"dblclick":b.bind(e+d,function(a){c._displayMenu(a);a.stopPropagation()});break;case"rtclick":b.bind("contextmenu"+d,function(a){g.hide();c._displayMenu(a);a.preventDefault();a.stopPropagation()})}},_killtrigger:function(){var c=this.options,b;if(c.trigger!==""){b=a(c.trigger);if(b.is("iframe"))b=a(b.get(0).contentWindow.document);b&&b.length>0&&b.unbind(".wijmenuEvent").unbind("wijmenuEvent")}},_move:function(i,g,e){var b=this,c=b._getActiveItemElement(),f,h,d;if(!c||!c.length){b.activate(e,g(b));return}d=a.wijmo.wijmenu._getItemWidget(c);f=d[i]();h=d._getParentOrMenu();if(f)b.activate(e,f);else b.activate(e,g(h))},refresh:function(){var b=this,d=b.element,h="wijmo-wijmenu",c=b.options,k=c.direction,f,e,j,g,i;b.domObject&&b._destroy();if(d.is("ul")){b._rootMenu=d;f=d.wrap("<div></div>").parent();e=f.wrap("<div></div>").parent()}else if(d.is("div")){b._rootMenu=a("ul:first",d);f=d;e=d.wrap("<div></div>").parent()}else return;k==="rtl"&&b._rootMenu.addClass(h+"-rtl");f.addClass("scrollcontainer checkablesupport");e.addClass("ui-widget ui-widget-header "+h+" ui-corner-all ui-helper-clearfix").attr("aria-activedescendant","ui-active-menuitem");c.orientation==="horizontal"&&c.mode==="flyout"&&e.addClass(h+"-"+c.orientation);j={scrollcontainer:f,menucontainer:e};b.domObject=j;b._getSublist().data("topmenu",true);!b._getSublist().hasClass(h+"-list ui-helper-reset")&&b._getSublist().addClass(h+"-list ui-helper-reset");b._items=b._createMenuItems();d.show();d.delegate("li>.wijmo-wijmenu-link","mouseenter.wijmenuEvent",function(){var b=a(this).hasClass("ui-state-disabled");if(c.disabled||b)return;a(this).addClass("ui-state-hover")}).delegate("li>.wijmo-wijmenu-link","mouseleave.wijmenuEvent",function(){var b=a(this).hasClass("ui-state-disabled");if(c.disabled||b)return;a(this).removeClass("ui-state-hover");a(this).data("subMenuOpened")&&a(this).addClass("ui-state-active")});this[c.mode==="flyout"?"_flyout":"_drilldown"]();if(c.trigger!==""){g=b._getTriggerEle();if(g.length>0){e.hide();b._initTrigger(g)}}a(document).bind(b.clickNameSpace,function(d){if(a(d.target).parent().is(".wijmo-wijmenu-all-lists"))return;if(a(d.target).closest(c.trigger).is(c.trigger))return;var f=a(d.target).closest(".wijmo-wijmenu");if(f.length===0){if(c.mode==="sliding"){i=a(".wijmo-wijmenu-breadcrumb",e);if(c.trigger==="")return;b._resetDrilldownMenu(i)}else if(c.mode==="flyout"&&c.triggerEvent!=="mouseenter"){b._hideAllMenus();return}g&&g.length>0&&b._hideMenu()}})},_flyout:function(){var b=this,c=b.domObject.menucontainer,d=b.options;c.attr("role","menu");d.orientation==="horizontal"&&c.attr("role","menubar");a.each(b.getItems(),function(){this._flyout()})},_hideAllMenus:function(){var b=this,e,d,c=function(b){if(b.getItems().length>0){a.each(b.getItems(),function(b,a){c(a)});b._hideSubmenu()}};a.each(b._items,function(b,a){c(a)});if(b.options.trigger!==""){e=b.domObject.menucontainer;if(e.is(":animated"))return;d=b._getTriggerEle();if(d.length===0)return;b._hideMenu()}},hideAllMenus:function(){this._hideAllMenus()},_killFlyout:function(){a.each(this.getItems(),function(){this._killFlyout()})},_killElement:function(){var b=this,c=b._getSublist();c.removeClass("wijmo-wijmenu-list ui-helper-reset wijmo-wijmenu-content ui-helper-clearfix");b.domObject.menucontainer.removeClass("");a(document).unbind(b.clickNameSpace);if(b.element.is("ul"))b.element.unwrap().unwrap();else b.element.unwrap();b.domObject=null;b.element.removeData("topmenu").removeData("firstLeftValue").removeData("domObject");c.undelegate(".wijmenuEvent")},_killMenuItems:function(){var b=this;a.each(b.getItems(),function(b,a){a.destroy(true)});b._items.length=0},_sroll:function(){var a=this.domObject.scrollcontainer,b=this.options.superPanelOptions||{};a.height(this.options.maxHeight);a.wijsuperpanel(b)},_initScrollCallback:function(){var a=this,b=a.domObject.scrollcontainer;a._linkContainer={link:null,needToFocus:false};b.wijsuperpanel({scrolled:function(){var b=a._linkContainer.link;if(a._linkContainer.needToFocus&&b&&b.is("a")){b.focus();a._linkContainer.needToFocus=false}}})},_resetScroll:function(f){var c=this,d=c.element.parent(),e=5,a=c.domObject.scrollcontainer,b=f._getSublist();d.height(b.height());a.wijsuperpanel("option","hScroller",{scrollValue:0});a.wijsuperpanel("option","vScroller",{scrollValue:0});a.wijsuperpanel("paintPanel");if(c._hasScroll()){if(b.prev().length>0)e=b.prev().css("padding-left").replace(/px/g,"");b.width(a.find(".wijmo-wijsuperpanel-contentwrapper:first").width()-e);d.height(b.height());a.wijsuperpanel("paintPanel")}},_hasScroll:function(){var a=this.domObject.scrollcontainer;return a.data("wijsuperpanel").vNeedScrollBar},_resetDrillChildMenu:function(a){a.removeClass("wijmo-wijmenu-scroll wijmo-wijmenu-current").height("auto")},_resetDrilldownMenu:function(i,e){var b=this,g=b.options,f=b._getSublist(),c=b.domObject.menucontainer,h=a('<li class="wijmo-wijmenu-breadcrumb-text">'+g.crumbDefaultText+"</li>"),d=function(c){a.each(c,function(f,e){var c=e._getSublist(),a=e.getItems();c.hide();b._resetDrillChildMenu(c);a.length>0&&d(a)})};a(".wijmo-wijmenu-current",c).removeClass("wijmo-wijmenu-current");f.animate({left:0},g.showDuration,function(){d(b.getItems());f.addClass("wijmo-wijmenu-current");e&&e()});a(".wijmo-wijmenu-all-lists",c).find("span").remove();i.empty().append(h);a(".wijmo-wijmenu-footer",c).empty().hide();b._resetScroll(b)},_drilldown:function(){var b=this,d=b._getSublist(),e=b.domObject.menucontainer.attr("role","menu"),g,c=b.options,h=c.direction,f=a('<ul class="wijmo-wijmenu-breadcrumb ui-state-default ui-corner-all ui-helper-clearfix"></ul>'),k=a('<li class="wijmo-wijmenu-breadcrumb-text">'+c.crumbDefaultText+"</li>"),n=c.backLink?c.backLinkText:c.topLinkText,l=c.backLink?"wijmo-wijmenu-prev-list":"wijmo-wijmenu-all-lists",j=c.backLink?"ui-state-default ui-corner-all":"",m=c.backLink?'<span class="ui-icon ui-icon-triangle-1-w"></span>':"",i=a('<li class="'+l+'"><a href="#" class="'+j+'">'+m+n+"</a></li>");d.wrap("<div>").parent().css("position","relative");e.addClass("wijmo-wijmenu-ipod wijmo-wijmenu-container");if(c.backLink)f.addClass("wijmo-wijmenu-footer").appendTo(e).hide();else f.addClass("wijmo-wijmenu-header").prependTo(e);!c.backLink&&f.append(k);g=e.width();d.addClass("wijmo-wijmenu-content wijmo-wijmenu-current ui-widget-content ui-helper-clearfix").css({width:g});a.each(b.getItems(),function(b,a){a._setDrilldownUlStyle()});b._sroll();b._initScrollCallback();b._resetScroll(b);b.element.data("firstLeftValue",parseFloat(d.css("left")));d.delegate("li>.wijmo-wijmenu-link","click",function(m,v){var u=a(this).parent(),w=u.attr("disabled"),t,q,l,s,p,n,k,o,r,j=a.wijmo.wijmenu._getItemWidget(u);if(c.disabled||w)return;d.stop(true,true);r=a.wijmo.wijmenu._hasVisibleSubMenus(j);if(!r){b._leafNodeClick(m,j,f);return}t=j._getSublist();q=j._getParentOrMenu()._getSublist();l=q.data("topmenu")?0:parseFloat(d.css("left"));if(h==="rtl")n=Math.round(l+parseFloat(e.width()));else n=Math.round(l-parseFloat(e.width()));k=a(".wijmo-wijmenu-footer",e);o=function(h,f){var i=h,c=a(".wijmo-wijmenu-current",e),d,g;if(c.get(0)===b._getSublist().get(0))return;if(f){d=f._getSublist();g=f}else{d=c.parents("ul:eq(0)");g=a.wijmo.wijmenu._getItemWidget(c.parent())._getParentOrMenu()}c.hide().attr("aria-expanded","false");b._resetDrillChildMenu(c);b._resetScroll(g);d.addClass("wijmo-wijmenu-current").attr("aria-expanded","true");if(d.hasClass("wijmo-wijmenu-content")){i.remove();k.hide()}};b._resetDrillChildMenu(q);b._resetScroll(j);b._slidingAnimation(d,n,function(){b.activate(m,v||j);b.select(m)});t.show().addClass("wijmo-wijmenu-current").attr("aria-expanded","true");if(c.backLink){if(k.find("a").size()===0){k.show();b._backLink=a('<a href="#"><span class="ui-icon ui-icon-triangle-1-w"></span> <span>'+c.backLinkText+"</span></a>").appendTo(k).click(function(j,g){if(c.disabled)return;var i=a(this),f;d.stop(true,true);if(h==="rtl")f=parseInt(d.css("left").replace("px",""),10)-parseInt(e.width(),10);else{f=parseInt(d.css("left").replace("px",""),10)+parseInt(e.width(),10);if(f>l)return}b._slidingAnimation(d,f,function(){o(i);g&&g()});j.preventDefault()})}}else{if(f.find("li").size()===1){f.empty().append(i);i.find("a").click(function(c,a){b._resetDrilldownMenu(f,a);c.preventDefault()})}a(".wijmo-wijmenu-current-crumb",e).removeClass("wijmo-wijmenu-current-crumb");s=j._getLink().text();p=a('<li class="wijmo-wijmenu-current-crumb"><a href="#" class="wijmo-wijmenu-crumb">'+s+"</a></li>");p.appendTo(f).find("a").click(function(k,i){if(c.disabled)return;var e=a(this).parent(),f;if(!e.is(".wijmo-wijmenu-current-crumb")){if(h==="rtl")f=+e.prevAll().length*g;else f=-e.prevAll().length*g;b._slidingAnimation(d,f,function(){o(null,j);i&&i()});e.addClass("wijmo-wijmenu-current-crumb").find("span").remove();e.nextAll().remove();k.preventDefault()}});p.prev().append(' <span class="ui-icon ui-icon-carat-1-e"></span>')}a(this).attr("href")==="#"&&m.preventDefault()})},_leafNodeClick:function(b,c,e){var a=this,f=a.options,d;a.activate(b,c);a.select(b);if(f.trigger){d=a._getTriggerEle();if(d.length){a._hideMenu();a._resetDrilldownMenu(e)}}c._getLink().attr("href")==="#"&&b.preventDefault()},_slidingAnimation:function(d,c,b){var a=this.options.slidingAnimation;if(a&&!a.disabled)d.stop(true,true).animate({left:c},a.duration,a.easing,b);else{d.css("left",c);b.call(this)}},_killDrilldown:function(){var c=this._getSublist(),b=this.domObject,d={width:"",height:""};c.css(d).removeClass("ui-widget-content");if(b.scrollcontainer&&b.scrollcontainer.parent().length>0){b.scrollcontainer.css(d);b.scrollcontainer.wijsuperpanel("destroy");b.scrollcontainer.removeClass("wijmo-wijsuperpanel").append(c)}c.prevAll().remove();b.menucontainer.removeClass("wijmo-wijmenu-ipod wijmo-wijmenu-container");a(".wijmo-wijmenu-current",b.menucontainer).removeClass("wijmo-wijmenu-current");a(".wijmo-wijmenu-breadcrumb",b.menucontainer).remove();c.undelegate("li>.wijmo-wijmenu-link","click");a("ul",c).css({left:"",width:""});c.css("left","");b.scrollcontainer=b.menucontainer.children(":first")},_displayMenu:function(h){var b=this,d=b.options,e,g,f,c=b.domObject.menucontainer,j=a(h.target),i=!a.wijmo.wijmenu._hasVisibleSubMenus(b);if(c.is(":visible")||i)return;b._trigger("showing",h,b);c.show();b._setPosition(j);b.nowIndex++;b._setZindex(c,b.nowIndex);c.hide();e={context:c,show:true};g=d.direction==="rtl"?"right":"left";f=a.extend({},{option:{direction:g}},d.animation,d.showAnimation);a.wijmo.wijmenu._animateFlyoutMenu(f,e);b._isClickToOpen=d.triggerEvent==="click"},_hideMenu:function(){var c=this,f=c.options,b=this.domObject.menucontainer,g=a.wijmo.wijmenu.animations,d,e;if(a.fn.wijhide){d={context:b,show:false};e=a.extend({},f.animation,f.hideAnimation);b.wijhide(e,g,d,null,function(){c._setZindex(b);b.attr("aria-hidden",true)})}else{b.hide().attr("aria-hidden",true);c._setZindex(b)}this.element.data("shown",false)},_setZindex:function(c,d){var e=this.domObject,b;if(!e)return;b=e.menucontainer;if(c.get(0)===b.get(0)){if(d)b.css("z-index",d);else b.css("z-index","");return}if(d){c.parent().css("z-index",999);c.css("z-index",d);a.browser.msie&&a.browser.version<8&&b.css("z-index")===0&&b.css("z-index",9950)}else{c.css("z-index","");c.parent().css("z-index","");a.browser.msie&&a.browser.version<8&&a("ul:visible",this._getSublist()).length===0&&b.css("z-index")===9950&&b.css("z-index","")}},_setPosition:function(c){var d=this._getPosition(),e={of:c},b=this.domObject.menucontainer;b.css({left:"0",top:"0",position:"absolute"});b.position(a.extend(e,d))},_getPosition:function(){var c=this.options,d=c.direction,b=d==="rtl"?{my:"right top",at:"right bottom"}:{my:"left top",at:"left bottom"};b=a.extend(b,c.position);return b},_getFirstSelectableSubItem:function(){return a.wijmo.wijmenu._getFirstSelectableSubItem(this)},_getLastSelectableSubItem:function(){return a.wijmo.wijmenu._getLastSelectableSubItem(this)},add:function(b,c){a.wijmo.wijmenu._add(this,b,c)},_getSublist:function(){return this._rootMenu},getItems:function(){return this._items},remove:function(b){a.wijmo.wijmenu._remove(this,b)},_newId:function(){for(var c=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],a="",b=0;b<16;b++)a+=c[Math.round(Math.random()*25)];return a}});a.widget("wijmo.wijmenuitem",{options:{header:false,separator:false,value:"",text:"",navigateUrl:"",target:"",iconClass:"",imagePosition:"",displayVisible:true,selected:false,items:[]},_initState:function(){this._items=[];this._resetMarkupValue()},_create:function(){var b=this;b._initState();b._getOrSetOptionsValues();b._createChildMenuItems();b._initCssClass();a.Widget.prototype._create.apply(b,arguments)},_refresh:function(){var a=this,b=a.options;a._set_navigateUrl(b.navigateUrl);a._set_target(b.target);a._set_displayVisible(b.displayVisible);a._createChildMenuItems();a._initCssClass()},_setOption:function(c,e){var b=this,f=b.options,d;if(c==="items"){a.Widget.prototype._setOption.apply(b,arguments);b._set_items(e);return}if(e===f[c])return;a.Widget.prototype._setOption.apply(b,arguments);if(!a.isFunction(b["_set_"+c]))return;b["_set_"+c](e,true);switch(c){case"header":case"separator":b._refresh();break;case"displayVisible":d=b.getParent();d&&d._setSubmenuIcon()}},index:function(){return this.element.index()},_set_selected:function(c){var a=this,b=a._getMenuItemType();if(b===a._markupType.link)a._getLink().toggleClass("ui-state-active",c);else a.options.selected=false},_set_items:function(b){var a=this;a._getSublist().remove();a._items=[];if(b.length>0){a._createChildMenuItems();a._initUlCssClass()}a._setSubmenuIcon(b.length>0);a._bindModeEvents(a,true);a._resetMarkupValue()},_bindModeEvents:function(b,c){var a=this,d=b._getMenu(),e=d.options;if(c){a._initUlCssClass();a._setSubmenuIcon();a._resetMarkupValue()}if(e.mode==="flyout")if(c){a._killFlyout();a._flyout()}else b._flyout();else{a._setDrilldownUlStyle();b.element.parent().is(":visible")&&d._resetScroll(b._getParentOrMenu())}},_set_value:function(a){this.options.value=a},_set_text:function(b,c){var a=this,d=a.options;if(b||c)a._setText(b);else d.text=a._getText()},_set_navigateUrl:function(b,d){var c=this,e=c.options,a=c._getLink();if(a.is("a"))if(b||d)a.attr("href",b);else e.navigateUrl=a.attr("href")},_set_target:function(e,d){var b=this,c=b.options,a=b._getLink();if(a.is("a"))if(c.target||d)a.attr("target",e);else c.target=a.attr("target")||""},_set_iconClass:function(g,i){var e=this,f=e.options,d,b,c,h;if(f.header===true||f.separator===true)return;d=e._getLink();b=d.find("span.wijmenuitem-icon");if(g){if(b.length===0){b=a("<span>");c=d.children(".wijmo-wijmenu-text").wrap("<span>").parent();c.addClass("wijmo-wijmenu-text");c.prepend(b)}b.attr("class",g+" wijmo-wijmenu-icon-left wijmenuitem-icon");i&&e._set_imagePosition(f.imagePosition)}else if(b.length!==0){b.remove();c=d.children(".wijmo-wijmenu-text");h=c.text();c.html("");c.text(h)}e._getMenuItemType()===e._markupType.other&&d.addClass("wijmo-wijmenu-link ui-corner-all")},_set_imagePosition:function(c){var e=this,d=e._getLink(),a=d.find(">span>span.wijmenuitem-icon"),b=c==="right"?"right":"left";if(a.length===0)return;a.removeClass("wijmo-wijmenu-icon-right").removeClass("wijmo-wijmenu-icon-left").addClass("wijmo-wijmenu-icon-"+b)},_set_separator:function(d,i){var a=this,e=a.element,c=a.options,j=a._getLink(),f="wijmo-wijmenu",g=f+"-separator ui-state-default ui-corner-all",h="ui-widget "+b+" ui-state-default ui-corner-all";if(i&&d===false){e.html("").removeClass(g).removeClass(h);a._createMenuItemMarkup(a._markupType.link).appendTo(e)}else if(d===true||j.length===0){c.separator=true;c.header=false;a._createMenuItemMarkup(a._markupType.separator)}else c.separator=false;a._resetMarkupValue()},_set_header:function(f,i){var a=this,e=a.element,d=a.options,c=a._getLink(),h="ui-widget-header ui-corner-all",g="ui-widget "+b+" ui-state-default ui-corner-all";if(i&&f===false){d.header=false;e.html("").removeClass(h).removeClass(g);a._createMenuItemMarkup(a._markupType.link).appendTo(e)}else if(f===true||c.is("h1,h2,h3,h4,h5")){d.header=true;d.separator=false;if(!c.is("h1,h2,h3,h4,h5")){c.remove();c=a._createMenuItemMarkup(a._markupType.header);e.append(c)}}else d.header=false;a._resetMarkupValue()},_set_displayVisible:function(b){var c=this,a=c.element;if(b)a.show();else a.hide()},_markupType:{link:0,separator:1,header:2,other:3},_createMenuItemMarkup:function(d){var b=this,e=b.options,f=b.element,c;if(d===b._markupType.separator){f.html("");return null}else if(d===b._markupType.header)c=a("<h3></h3>").text(e.text);else c=a("<a>").text(e.text);return c},_getMenuItemType:function(e){var b=this,c=b.options,d=b._getLink();if(e)c=a.extend({},c,e);return c.separator===true?b._markupType.separator:c.header===true?b._markupType.header:d.length===0?c.text?b._markupType.link:b._markupType.separator:d.is("a")?b._markupType.link:d.is("h1,h2,h3,h4,h5")?b._markupType.header:b._markupType.other},_getOrSetOptionsValues:function(){var a=this,e=a.element,b=a.options,c=a._getLink(),d=a._getMenuItemType();if(d===a._markupType.header){a._set_header(b.header);a._set_text(b.text)}else if(d===a._markupType.separator)a._set_separator(b.separator);else{if(c.length===0){c=a._createMenuItemMarkup(d);e.append(c)}else a._set_text(b.text);a._resetMarkupValue();a._set_navigateUrl(b.navigateUrl);a._set_target(b.target)}a._set_displayVisible(b.displayVisible);a._set_selected(b.selected)},_getText:function(){return this._getLink().text()},_setText:function(b){var c=this.element,a;a=c.find(":not(ul)a .wijmo-wijmenu-text:first");if(a.length!==0){a.text(b);return}a=c.children("h1,h2,h3,h4,h5").filter(":first");if(a.length!==0){a.text(b);return}a=c.children("a:first");if(a.length!==0){a.text(b);return}},_createChildMenuItems:function(){var b=this,i=b.element,h=b._items,g=b.options,d,c,e,f;if(g.header===true||g.separator===true)return;d=g.items.length;c=b._getSublist();e=c.children("li").length;if(d>e){if(c.length===0){c=a("<ul>").appendTo(i);b._resetMarkupValue()}for(f=0;f<d-e;f++)c.append("<li>")}a.each(b._getChildren(),function(f,d){var e=a(d),c;c=a.wijmo.wijmenu._getMenuItemOptions(b.options,f);h.push(b._createItemWidget(e,c))})},_createItemWidget:function(b,d){var e=this,c=a.wijmo.wijmenu._itemWidgetName;b[c](d);return b.data(e.widgetName)},_initCssClass:function(){var a=this,c=this.element,h=a.options,g=a._getLink(),e="wijmo-wijmenu",i=e+"-separator ui-state-default ui-corner-all",k="ui-widget-header ui-corner-all",f="ui-widget "+b+" ui-state-default ui-corner-all",j=e+"-link ui-corner-all",d=a._getMenuItemType();d!==a._markupType.separator&&c.attr("role","menuitem");if(d===a._markupType.separator)c.addClass(i);else if(d===a._markupType.header)c.addClass(k);else{if(d===a._markupType.link){if(!c.hasClass(b)){c.addClass(f);g.addClass(j);g.wrapInner("<span>").children("span").addClass(e+"-text")}}else c.addClass(f);a._setSubmenuIcon()}a._set_iconClass(h.iconClass);a._set_imagePosition(h.imagePosition);a._initUlCssClass()},_initUlCssClass:function(){var a="wijmo-wijmenu";this._getSublist().addClass(a+"-list ui-widget-content ui-corner-all ui-helper-clearfix "+a+"-child ui-helper-reset").hide()},_setSubmenuIcon:function(e){var d=this,c=d._getLink(),g=d._getMenu(),f=g.options.direction,b=f==="rtl"?c.children("span.ui-icon:first"):c.children("span.ui-icon:last");if(e===undefined)e=a.wijmo.wijmenu._hasVisibleSubMenus(d);if(e&&!c.is(":input")){if(b.length===0)if(f==="rtl")b=a("<span>").prependTo(c);else b=a("<span>").appendTo(c);if(d._isRoot()&&g.options.orientation==="horizontal"&&g.options.mode==="flyout")b.attr("class","ui-icon ui-icon-triangle-1-s");else if(f==="rtl")b.attr("class","ui-icon ui-icon-triangle-1-w");else b.attr("class","ui-icon ui-icon-triangle-1-e")}else b.remove()},_killFlyout:function(){var b=this.element.attr("role","");b.removeClass("wijmo-wijmenu-parent").unbind(".wijmenuEvent").unbind(".wijmenuitem").children(":first").unbind(".wijmenuEvent").unbind(".wijmenuitem").attr("aria-haspopup","");this._getSublist().unbind(".wijmenuEvent").unbind(".wijmenuitem");a.each(this.getItems(),function(){this._killFlyout()})},_getItemTriggerEvent:function(){var d=this,e=d.element,f=d._getMenu(),b=f.options,c="default";if(b.trigger!=="")if(e.is(b.trigger)||f.element.is(b.trigger))c=b.triggerEvent;else{e.parents(".wijmo-wijmenu-parent").each(function(e,d){if(a(d).is(b.trigger)){c=b.triggerEvent;return false}});if(c==="default"&&d._isOuterTirggerEle())c=b.triggerEvent}e.data("triggerEvent",c);return c},_isOuterTirggerEle:function(){var b=this._getMenu();return a.wijmo.wijmenu._getOuterElement(b.options.trigger,".wijmo-wijmenu").length>0},_flyout:function(){var b=this,e=b._getMenu(),n="wijmo-wijmenu-link",k="wijmo-wijmenu-parent",c=e.options,f=".wijmenuitem",j=a(b.element).attr("aria-haspopup",true),l,i,m=b._getItemTriggerEvent(),d=j.children("a."+n),g=b._getSublist(),h;if(b.getItems().length>0){g.bind("mouseleave"+f,function(){if(c.disabled)return;i=setTimeout(function(){b._hideCurrentSubmenu()},c.hideDelay)});j.removeClass(k).addClass(k);if(m!=="default"&&c.triggerEvent!=="mouseenter"){switch(c.triggerEvent){case"click":d.bind("click"+f,function(d){if(c.disabled||a(this).hasClass("ui-state-disabled"))return;b._showFlyoutSubmenu(d)});break;case"dblclick":d.bind("dblclick"+f,function(d){if(c.disabled||a(this).hasClass("ui-state-disabled"))return;b._showFlyoutSubmenu(d)});break;case"rtclick":d.bind("contextmenu"+f,function(d){if(c.disabled||a(this).hasClass("ui-state-disabled"))return;b._showFlyoutSubmenu(d);d.preventDefault()})}g.data("notClose",true)}else{d.bind("mouseenter.wijmenuEvent",function(d){if(c.disabled||a(this).hasClass("ui-state-disabled"))return;clearTimeout(i);l=setTimeout(function(){b._displaySubmenu(d)},c.showDelay)}).bind("mouseleave"+f,function(){if(c.disabled||a(this).hasClass("ui-state-disabled"))return;clearTimeout(l);if(!g.is("ul"))g=g.children("ul:first");i=setTimeout(function(){b._hideSubmenu()},c.hideDelay)});b.getItems().length>0&&b._getSublist().bind("mouseenter"+f,function(){if(c.disabled)return;clearTimeout(i)})}}d.bind("click.wijmenuEvent",function(g){h=d.hasClass("ui-state-disabled");if(c.disabled||h)return;if(d.is("a")){if(b._getSublist().length===0)e._hideAllMenus();else if(!(c.trigger!==""&&j.data("triggerEvent")!=="default"&&c.triggerEvent!=="mouseenter"))e._hideAllMenus();else{var f=e._currentMenuList,i,a;if(f!==undefined){i=j;if(b._getSublist().length===0)for(a=f.length;a>0;a--)if(f[a-1]===b)break;else f[a-1]._hideSubmenu()}}e.activate(g,b)}e.select(g);d.attr("href")==="#"&&g.preventDefault()}).bind("focusin.wijmenuEvent",function(a){h=d.hasClass("ui-state-disabled");if(c.disabled||h)return;d.is("a")&&e.activate(a,b)});a.each(b.getItems(),function(){this._flyout()})},_hideSubmenu:function(j){var e=this,c=e._getMenu(),i=c.options,k=a.wijmo.wijmenu.animations,g,h,d,b=e._getSublist(),f=e._getLink();if(f.is(".wijmo-wijmenu-link")){f.data("subMenuOpened",false);f.removeClass("ui-state-active")}if(a.fn.wijhide&&j!==true){g={context:b,show:false};h=a.extend({},i.animation,i.hideAnimation);b.wijhide(h,k,g,null,function(){c._setZindex(b);b.attr("aria-hidden",true)})}else{b.hide().attr("aria-hidden",true);c._setZindex(b)}c.element.data("shown",false);d=c._currentMenuList;if(d){d=a.map(d,function(a){return a&&a===e?null:a});c._currentMenuList=a.makeArray(d)}},_displaySubmenu:function(l,j){var c=this,b=c._getMenu(),e=b.options,h,f,i,g,k=c._getLink(),d=c._getSublist();g=!a.wijmo.wijmenu._hasVisibleSubMenus(c);if(d.is(":visible")||g)return;k.is("a.wijmo-wijmenu-link")&&k.data("subMenuOpened",true);d.show();this._setMenuItemPosition();b.nowIndex++;b._setZindex(d,b.nowIndex);d.hide();b._trigger("showing",l,c);h={context:d,show:true};f=e.direction==="rtl"?"right":"left";if(e.orientation==="horizontal")if(c._isRoot())f="up";i=a.extend({},{option:{direction:f}},e.animation,e.showAnimation);a.wijmo.wijmenu._animateFlyoutMenu(i,h,function(){d.is(":hidden")&&c._hideSubmenu(true);j&&j()});b._isClickToOpen=e.triggerEvent==="click";if(b._currentMenuList===undefined)b._currentMenuList=[];b._currentMenuList.push(c)},_setMenuItemPosition:function(){var c=this,b=c._getSublist(),d=c._getMenuItemPosition(),e={of:this._getLink()};b.css({left:"0",top:"0",position:"absolute"});b.position(a.extend(e,d))},_getMenuItemPosition:function(){var f=this,e=this._getMenu(),c=e.options,d=c.direction,b=d==="rtl"?{my:"right top",at:"left top"}:{my:"left top",at:"right top"};if(c.orientation==="horizontal")if(f._isRoot())b=d==="rtl"?{my:"right top",at:"right bottom"}:{my:"left top",at:"left bottom"};b=a.extend(b,c.position);return b},_getChildren:function(){return this._getSublist().children("li")},_setDrilldownUlStyle:function(){var d=this,c=d._getSublist(),e=d._getMenu(),b=e.domObject.menucontainer.width();if(e.options.direction==="rtl")c.css({width:b,left:-b});else c.css({width:b,left:b});c.addClass("ui-widget-content");a.each(d.getItems(),function(b,a){a.getItems().length&&this._setDrilldownUlStyle()})},_getMenu:function(){var d=this,c=d._menu,b,e;if(!c){b=d.element.parent();while(!b.is("body")&&b.length>0){e=b.data(a.wijmo.wijmenu._menuWidgetName);if(e){c=e;d._menu=c;return c}b=b.parent()}throw"An menuitem must be a child of menu";}return c},getParent:function(){var c=this,f=c.element,e,b,d;b=c._parent;if(b!==undefined)return b;d=f.parents("li:first");if(d.length>0){b=a.wijmo.wijmenu._getItemWidget(d);if(b!==undefined){c._parent=b;return b}}e=c._getMenu();if(e._getSublist().get(0)===f.parent().get(0)){c._parent=null;return null}throw"An menuitem must be a child of menu or another menuitem";},_getParentOrMenu:function(){return this.getParent()||this._getMenu()},_getField:function(a){return this.element.data(a)},_setField:function(b,a){return this.element.data(b,a)},_destroy:function(f){var d=this,c=d.element,e;c.removeClass("ui-widget "+b+" ui-state-default ui-corner-all wijmo-wijmenu-parent ui-widget-header wijmo-wijmenu-separator");e=c.children(".wijmo-wijmenu-link");e.removeClass("wijmo-wijmenu-link ui-corner-all ui-state-focus ui-state-hover ui-state-active").html(e.children(".wijmo-wijmenu-text").html()).unbind(".wijmenuitem").unbind(".wijmenuEvent");c.children("ul").removeClass("wijmo-wijmenu-list ui-widget-content ui-corner-all ui-helper-clearfix wijmo-wijmenu-child ui-helper-reset").attr("role","").attr("aria-activedescendant","").show().css({left:"",top:"",position:""}).attr("hidden","");c.removeAttr("role");e.removeAttr("aria-haspopup");!f&&d._removeFromParentCollection();c.removeData("menu").removeData("parent");a.each(d.getItems()||[],function(b,a){a.destroy(true)});d._items.length=0;d._resetMarkupValue()},destroy:function(c){var b=this;b._destroy(c);a.Widget.prototype.destroy.apply(b)},_getFirstSelectableSubItem:function(){return a.wijmo.wijmenu._getFirstSelectableSubItem(this)},_getLastSelectableSubItem:function(){return a.wijmo.wijmenu._getLastSelectableSubItem(this)},next:function(){var f=this,c=f._getParentOrMenu().getItems(),b,d,e=a.inArray(f,c);if(e===-1)throw"cannot find item from the parent collection";for(b=e+1;b<c.length;b++){d=c[b].options;if(d.displayVisible!==false&&!d.header&&!d.separator)return c[b].element}return null},previous:function(){var f=this,d=f._getParentOrMenu().getItems(),b,c,e=a.inArray(f,d);if(e===-1)throw"cannot find item from the parent collection";for(b=e-1;b>=0;b--){c=d[b].options;if(c.displayVisible!==false&&!c.header&&!c.separator)return d[b].element}return null},_removeFromParentCollection:function(){var d=this,b,e=false,c;b=d.getParent();if(b===null){b=d._getMenu();e=true}c=a.inArray(d,b.getItems());if(c===-1)return;a.wijmo.wijmenu._changeCollection(c,b.getItems());if(b.getItems().length===0){!e&&b._setSubmenuIcon(false);b.element.children("ul").remove()}},_resetMarkupValue:function(){this._sublist=null;this._link=null},_hideCurrentSubmenu:function(){var b=this,c=b._getSublist();if(c.length===0)return;!c.data("notClose")&&b._hideSubmenu();a.each(b.getItems(),function(){this._hideCurrentSubmenu()})},_showFlyoutSubmenu:function(f,d){var c=this,e=this._getMenu(),b=e._currentMenuList,a;if(b!==undefined)for(a=b.length;a>0;a--)if(b[a-1]===c.getParent())break;else b[a-1]._hideSubmenu();c._displaySubmenu(f,d)},getItems:function(){return this._items},_getSublist:function(){var a=this;if(!a._sublist)a._sublist=this.element.children("ul:first");return a._sublist},_getLink:function(){var a=this;if(!a._link)a._link=this.element.children(":first");return a._link},_isRoot:function(){return this.getParent()===null},add:function(b,c){a.wijmo.wijmenu._add(this,b,c)},remove:function(b){a.wijmo.wijmenu._remove(this,b)}});a.extend(a.wijmo.wijmenu,{animations:{slide:function(b,c){b=a.extend({duration:400,easing:"swing"},b,c);if(b.show)b.context.stop(true,true).animate({height:"show"},b).attr("aria-hidden",false);else b.context.stop(true,true).animate({height:"hide"},b).attr("aria-hidden",true)}},_animateFlyoutMenu:function(e,c,d){var b=c.context;if(a.fn.wijshow)b.wijshow(e,a.wijmo.wijmenuanimations,c,null,function(){var c=a.browser;if(c.msie&&c.version==="9.0"){b.wrap("<div></div>");b.unwrap()}else c.msie&&c.version==="6.0"&&b.css("overflow","");b.attr("aria-hidden",false);d&&d()});else b.show().attr("aria-hidden",false)},_getMenuItemOptions:function(b,c){return!b?{}:!b.items||!a.isArray(b.items)?{}:c>=b.items.length?{}:b.items[c]},_getOuterElement:function(c,b){return a(c).filter(function(){return a(this).closest(b).length===0})},_hasVisibleSubMenus:function(b){var c,d,e;if(b.jquery)c=b.data(a.wijmo.wijmenu._itemWidgetName)||b.data(a.wijmo.wijmenu._menuWidgetName);else c=b;if(!c)throw"the arugment 'menuItem' must be an wijmenu or wijmenuitem";d=c.getItems();if(!d.length)return false;for(e=0;e<d.length;e++)if(d[e].options.displayVisible)return true;return false},_getFirstSelectableSubItem:function(d){for(var c=d.getItems(),b,a=0;a<c.length;a++){b=c[a].options;if(b.displayVisible!==false&&!b.header&&!b.separator)return c[a]}return null},_getLastSelectableSubItem:function(d){for(var c=d.getItems(),b,a=c.length-1;a>=0;a--){b=c[a].options;if(b.displayVisible!==false&&!b.header&&!b.separator)return c[a]}return null},_getSelectableSubItems:function(c,b){return a.grep(c.getItems(),function(c,d){var a=c.options;return a.header||a.separator||a.displayVisible===false?false:b(c,d)})},_add:function(d,e,b){var c=null,h=a("<li></li>"),g=d._getSublist(),f=d.getItems(),j,k,i=false;if(typeof e==="string")/<(h[1-5]|a)>[\s\S]*<\/\1>/.test(e)&&h.append(e);else if(a.isPlainObject(e))k=e;if(!g||g.length<=0){g=a("<ul></ul>");d.element.append(g);i=true}if(!b||isNaN(b)||b>f.length)if(b!==0)b=f.length;if(f.length>0&&f.length!==b){j=f[b].element;h.insertBefore(j)}else g.append(h);c=d._createItemWidget(h,k);if(c===null||c===undefined)return;a.wijmo.wijmenu._changeCollection(b,d.getItems(),c);if(d._bindModeEvents)d._bindModeEvents(c,i);else c._bindModeEvents(c,i)},_itemWidgetName:"wijmenuitem",_menuWidgetName:"wijmenu",_changeCollection:function(c,b,a){if(!a){b.splice(c,1);return}b.splice(c,0,a)},_remove:function(c,b){var a=c.getItems()[b];a&&a.element&&a.element.remove()},_getItemWidget:function(b){return b.data(a.wijmo.wijmenu._itemWidgetName)}})})(jQuery);
+(function(a){"use strict";var e=0,d=0;function c(){return++e}function b(){return++d}a.widget("wijmo.wijtabs",{options:{alignment:"top",sortable:false,scrollable:false,ajaxOptions:null,cache:false,cookie:null,collapsible:false,hideOption:null,showOption:null,disabledIndexes:[],event:"click",idPrefix:"ui-tabs-",panelTemplate:"",spinner:"",tabTemplate:"",add:null,remove:null,select:null,beforeShow:null,show:null,load:null,disable:null,enable:null},_defaults:{panelTemplate:"<div></div>",spinner:"<em>Loading&#8230;</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'},_create:function(){var b=this;if(window.wijmoApplyWijTouchUtilEvents)a=window.wijmoApplyWijTouchUtilEvents(a);b.element.is(":hidden")&&b.element.wijAddVisibilityObserver&&b.element.wijAddVisibilityObserver(function(){b.destroy();b._tabify(true);b.element.wijRemoveVisibilityObserver&&b.element.wijRemoveVisibilityObserver()},"wijtabs");b._tabify(true)},_setOption:function(c,b){a.Widget.prototype._setOption.apply(this,arguments);switch(c){case"selected":if(this.options.collapsible&&b===this.options.selected)return;this.select(b);break;case"alignment":this.destroy();this._tabify(true);break;default:this._tabify()}},_initScroller:function(){var c=a.inArray(this._getAlignment(),["top","bottom"])!==-1,b=0;if(!c)return;this.lis.each(function(){b+=a(this).outerWidth(true)});if(!!this.options.scrollable&&this.element.innerWidth()<b){if(this.scrollWrap===undefined){this.list.wrap("<div class='scrollWrap'></div>");this.scrollWrap=this.list.parent();a.effects.save(this.list,["width","height","overflow"])}this.list.width(b+2);this.scrollWrap.height(this.list.outerHeight(true));this.scrollWrap.wijsuperpanel({allowResize:false,hScroller:{scrollMode:"edge"},vScroller:{scrollBarVisibility:"hidden"}})}else this._removeScroller()},_removeScroller:function(){if(this.scrollWrap){this.scrollWrap.wijsuperpanel("destroy").replaceWith(this.scrollWrap.contents());this.scrollWrap=undefined;a.effects.restore(this.list,["width","height","overflow"])}},_tabId:function(e){var b=a(e),d;if(b.data&&b.data("tabid"))return b.data("tabid");d=e.title&&e.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+c();b.data("tabid",d);return d},_sanitizeSelector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var c=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+b());return a.cookie.apply(null,[c].concat(a.makeArray(arguments)))},_ui:function(a,b){return{tab:a,panel:b,index:this.anchors.index(a)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_getAlignment:function(b){b=b===undefined?true:b;var a=this.options.alignment||"top";if(b)return a;switch(a){case"top":a="bottom";break;case"bottom":a="top";break;case"left":a="right";break;case"right":a="left"}return a},_saveLayout:function(){var b=["width","height","overflow"],c=this.panels.filter(":not(.ui-tabs-hide)");a.effects.save(this.element,b);a.effects.save(this.list,b);a.effects.save(this.element.find(".wijmo-wijtabs-content"),b);this.list.width(this.list.width());this.element.data("panel.width",c.width());this.element.data("panel.outerWidth",c.outerWidth(true))},_restoreLayout:function(){var b=["width","height","overflow"];a.effects.restore(this.element,b);a.effects.restore(this.list,b);a.effects.restore(this.element.find(".wijmo-wijtabs-content"),b)},_hideContent:function(){var a=this.element.find(".wijmo-wijtabs-content");if(a.length){this._saveLayout();a.addClass("ui-tabs-hide").attr("aria-hidden",true);this.element.width(this.list.outerWidth(true))}},_showContent:function(){var a=this.element.find(".wijmo-wijtabs-content");if(a.length){this._restoreLayout();a.removeClass("ui-tabs-hide").attr("aria-hidden",false)}},_blindPanel:function(b,c){var j=this.options,h=b.parent(".wijmo-wijtabs-content"),k=["position","top","left","width"],f=c==="show"?j.showOption:j.hideOption,e,i,g,d=this;if(!h.length)return;this.list.width(this.list.width());a.effects.save(b,k);b.show();if(c==="show"){b.removeClass("ui-tabs-hide").attr("aria-hidden",false);b.width(this.element.data("panel.width"))}else b.width(b.width());e=a.effects.createWrapper(b).css({overflow:"hidden"});c==="show"&&e.css(a.extend({width:0},f.fade?{opacity:0}:{}));i=a.extend({width:c==="show"?this.element.data("panel.outerWidth"):0},f.fade?{opacity:c==="show"?1:0}:{});g=this.list.outerWidth(true);e.animate(i,{duration:f.duration,step:function(){var a=e.outerWidth(true);d.element.width(g+a);h.width(Math.max(0,d.element.innerWidth()-g-6))},complete:function(){if(c==="hide"){d.lis.removeClass("ui-tabs-selected ui-state-active").attr("aria-selected",false);b.addClass("ui-tabs-hide").attr("aria-hidden",true)}else b.css("width","");a.effects.removeWrapper(b);c==="show"&&d._restoreLayout();d._resetStyle(b);b.dequeue();d.element.dequeue("tabs")}})},_resetStyle:function(b){b.css({display:""});!a.support.opacity&&b[0].style.removeAttribute("filter")},_normalizeBlindOption:function(a){if(a.blind===undefined)a.blind=false;if(a.fade===undefined)a.fade=false;if(a.duration===undefined)a.duration=200;if(typeof a.duration==="string")try{a.duration=parseInt(a.duration,10)}catch(b){a.duration=200}},_tabify:function(n){this.list=this.element.children("ol,ul").eq(0);this.lis=a("li:has(a)",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);var c=this,b=this.options,m=/^#.+/,d,l,f,g,e,i,h,k,j;this.anchors.each(function(j,e){var d=a(e).attr("href")||"",h=d.split("#")[0],i,g,f;if(h&&(h===location.toString().split("#")[0]||(i=a("base")[0])&&h===i.href)){d=e.hash;e.href=d}if(m.test(d))c.panels=c.panels.add(c._sanitizeSelector(d),c.element);else if(d!=="#"){a.data(e,"href.tabs",d);a.data(e,"load.tabs",d.replace(/#.*$/,""));g=c._tabId(e);e.href="#"+g;f=a("#"+g);if(!f.length){f=a(b.panelTemplate||c._defaults.panelTemplate).attr("id",g).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(c.panels[j-1]||c.list);f.data("destroy.tabs",true)}c.panels=c.panels.add(f)}else b.disabledIndexes.push(j)});d=this._getAlignment();l=this._getAlignment(false);if(n){this.list.attr("role","tablist");this.lis.attr("role","tab");this.panels.attr("role","tabpanel");this.element.addClass("ui-tabs wijmo-wijtabs ui-tabs-"+d+" ui-widget ui-widget-content ui-corner-all ui-helper-clearfix");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-"+d);this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-"+l);switch(d){case"bottom":this.list.appendTo(this.element);break;case"left":f=a("<div/>").addClass("wijmo-wijtabs-content").appendTo(this.element);this.panels.appendTo(f);break;case"right":f=a("<div/>").addClass("wijmo-wijtabs-content").insertBefore(this.list);this.panels.appendTo(f);break;case"top":this.list.prependTo(this.element)}b.sortable&&this.list.sortable({axis:d==="top"||d==="bottom"?"x":"y"});if(b.selected===undefined){location.hash&&this.anchors.each(function(c,a){if(a.hash===location.hash){b.selected=c;return false}});if(typeof b.selected!=="number"&&b.cookie)b.selected=parseInt(c._cookie(),10);if(typeof b.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)b.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));b.selected=b.selected||(this.lis.length?0:-1)}else if(b.selected===null)b.selected=-1;b.selected=b.selected>=0&&this.anchors[b.selected]||b.selected<0?b.selected:0;b.disabledIndexes=a.unique(b.disabledIndexes.concat(a.map(this.lis.filter(".ui-state-disabled"),function(a){return c.lis.index(a)}))).sort();a.inArray(b.selected,b.disabledIndexes)!==-1&&b.disabledIndexes.splice(a.inArray(b.selected,b.disabledIndexes),1);this.panels.addClass("ui-tabs-hide").attr("aria-hidden",true);this.lis.removeClass("ui-tabs-selected ui-state-active").attr("aria-selected",false);if(b.selected>=0&&this.anchors.length){this.panels.eq(b.selected).removeClass("ui-tabs-hide").attr("aria-hidden",false);this.lis.eq(b.selected).addClass("ui-tabs-selected ui-state-active").attr("aria-selected",true);c.element.queue("tabs",function(){c.element.wijTriggerVisibility&&a(c.panels[b.selected]).wijTriggerVisibility();c._trigger("show",null,c._ui(c.anchors[b.selected],c.panels[b.selected]))});this.load(b.selected)}a(window).bind("unload",function(){c.lis&&c.lis.add(c.anchors).unbind(".tabs");c.lis=c.anchors=c.panels=null})}else b.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));this.element[b.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");b.cookie&&this._cookie(b.selected,b.cookie);for(g=0;e=this.lis[g];g++){a(e)[a.inArray(g,b.disabledIndexes)!==-1&&!a(e).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");a(e).hasClass("ui-state-disabled")&&a(e).attr("aria-disabled",true)}b.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(!b.disabledState&&b.event!=="mouseover"){i=function(b,a){a.is(":not(.ui-state-disabled)")&&a.addClass("ui-state-"+b)};h=function(a,b){b.removeClass("ui-state-"+a)};this.lis.bind("mouseover.tabs",function(){i("hover",a(this))});this.lis.bind("mouseout.tabs",function(){h("hover",a(this))});this.anchors.bind("focus.tabs",function(){i("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){h("focus",a(this).closest("li"))})}if(b.showOption===undefined||b.showOption===null)b.showOption={};this._normalizeBlindOption(b.showOption);if(b.hideOption===undefined||b.hideOption===null)b.hideOption={};this._normalizeBlindOption(b.hideOption);k=(b.showOption.blind||b.showOption.fade)&&b.showOption.duration>0?function(g,e){a(g).closest("li").addClass("ui-tabs-selected ui-state-active").attr("aria-selected",true);c._showContent();e.removeClass("ui-tabs-hide").attr("aria-hidden",false);if(d==="top"||d==="bottom"){var f={duration:b.showOption.duration};if(b.showOption.blind)f.height="toggle";if(b.showOption.fade)f.opacity="toggle";e.hide().removeClass("ui-tabs-hide").attr("aria-hidden",false).animate(f,b.showOption.duration||"normal",function(){c._resetStyle(e);e.wijTriggerVisibility&&e.wijTriggerVisibility();c._trigger("show",null,c._ui(g,e[0]))})}else{c._showContent();c._blindPanel(e,"show")}}:function(d,b){a(d).closest("li").addClass("ui-tabs-selected ui-state-active").attr("aria-selected",true);c._showContent();b.removeClass("ui-tabs-hide").attr("aria-hidden",false);b.wijTriggerVisibility&&b.wijTriggerVisibility();c._trigger("show",null,c._ui(d,b[0]))};j=(b.hideOption.blind||b.hideOption.fade)&&b.hideOption.duration>0?function(f,a){if(d==="top"||d==="bottom"){var e={duration:b.hideOption.duration};if(b.hideOption.blind)e.height="toggle";if(b.hideOption.fade)e.opacity="toggle";a.animate(e,b.hideOption.duration||"normal",function(){c.lis.removeClass("ui-tabs-selected ui-state-active").attr("aria-selected",false);a.addClass("ui-tabs-hide").attr("aria-hidden",true);c._resetStyle(a);c.element.dequeue("tabs")})}else{c._saveLayout();c._blindPanel(a,"hide")}}:function(b,a){c.lis.removeClass("ui-tabs-selected ui-state-active").attr("aria-selected",false);c._hideContent();a.addClass("ui-tabs-hide").attr("aria-hidden",true);c.element.dequeue("tabs")};!b.disabledState&&this.anchors.bind(b.event+".tabs",function(){var g=this,f=a(this).closest("li"),d=c.panels.filter(":not(.ui-tabs-hide)"),e=a(c._sanitizeSelector(this.hash),c.element);if(f.hasClass("ui-tabs-selected")&&!b.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||c._trigger("select",null,c._ui(this,e[0]))===false){this.blur();return false}b.selected=c.anchors.index(this);c.abort();if(b.collapsible)if(f.hasClass("ui-tabs-selected")){b.selected=-1;b.cookie&&c._cookie(b.selected,b.cookie);c.element.queue("tabs",function(){j(g,d)}).dequeue("tabs");this.blur();return false}else if(!d.length){b.cookie&&c._cookie(b.selected,b.cookie);c.element.queue("tabs",function(){k(g,e)});c.load(c.anchors.index(this));this.blur();return false}b.cookie&&c._cookie(b.selected,b.cookie);if(e.length){d.length&&c.element.queue("tabs",function(){j(g,d)});c.element.queue("tabs",function(){k(g,e)});c.load(c.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";a.browser.msie&&this.blur()});this._initScroller();this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var c=this.options,b=a(".wijmo-wijtabs-content");this.abort();this._removeScroller();this.element.unbind(".tabs").removeClass(["wijmo-wijtabs","ui-tabs-top","ui-tabs-bottom","ui-tabs-left","ui-tabs-right","ui-tabs","ui-widget","ui-widget-content","ui-corner-all","ui-tabs-collapsible","ui-helper-clearfix"].join(" ")).removeData("tabs").removeAttr("role");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfixui-widget-header ui-corner-all").removeAttr("role");this.anchors.each(function(){var c=a.data(this,"href.tabs"),b;if(c)this.href=c;b=a(this).unbind(".tabs");a.each(["href","load","cache"],function(c,a){b.removeData(a+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(a.data(this,"destroy.tabs"))a(this).remove();else a(this).removeClass(["ui-state-default","ui-corner-top","ui-corner-bottom","ui-corner-left","ui-corner-right","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-tabs-hide"].join(" ")).css({position:"",left:"",top:""}).removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-selected").removeAttr("aria-disabled")});b.length&&b.replaceWith(b.contents());c.cookie&&this._cookie(null,c.cookie);return this},add:function(h,l,b){if(b===undefined)b=this.anchors.length;var c=this,f=this.options,e=a((f.tabTemplate||c._defaults.tabTemplate).replace(/#\{href\}/g,h).replace(/#\{label\}/g,l)),i=!h.indexOf("#")?h.replace("#",""):this._tabId(a("a",e)[0]),k=this._getAlignment(),j=this._getAlignment(false),d=a("#"+i),g;e.addClass("ui-state-default ui-corner-"+k).data("destroy.tabs",true).attr("role","tab").attr("aria-selected",false);if(!d.length)d=a(f.panelTemplate||c._defaults.panelTemplate).attr("id",i).data("destroy.tabs",true).attr("role","tabpanel");d.addClass("ui-tabs-panel ui-widget-content ui-corner-"+j+" ui-tabs-hide").attr("aria-hidden",true);if(b>=this.lis.length){e.appendTo(this.list);if(this.panels.length>0)d.insertAfter(this.panels[this.panels.length-1]);else{g=this.element.find(".wijmo-wijtabs-content");if(g.length===0)g=this.element;d.appendTo(g)}}else{e.insertBefore(this.lis[b]);d.insertBefore(this.panels[b])}f.disabledIndexes=a.map(f.disabledIndexes,function(a){return a>=b?++a:a});this._removeScroller();this._tabify();if(this.anchors.length===1){f.selected=0;e.addClass("ui-tabs-selected ui-state-active").attr("aria-selected",true);d.removeClass("ui-tabs-hide").attr("aria-hidden",false);this.element.queue("tabs",function(){c.element.wijTriggerVisibility&&a(c.panels[0]).wijTriggerVisibility();c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[b],this.panels[b]));return this},remove:function(b){var d=this.options,c=this.lis.eq(b).remove(),e=this.panels.eq(b).remove();c.hasClass("ui-tabs-selected")&&this.anchors.length>1&&this.select(b+(b+1<this.anchors.length?1:-1));d.disabledIndexes=a.map(a.grep(d.disabledIndexes,function(a){return a!==b}),function(a){return a>=b?--a:a});this._removeScroller();this._tabify();this._trigger("remove",null,this._ui(c.find("a")[0],e[0]));return this},enableTab:function(b){var c=this.options;if(a.inArray(b,c.disabledIndexes)===-1)return;this.lis.eq(b).removeClass("ui-state-disabled").removeAttr("aria-disabled");c.disabledIndexes=a.grep(c.disabledIndexes,function(a){return a!==b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]));return this},disableTab:function(a){var b=this.options;if(a!==b.selected){this.lis.eq(a).addClass("ui-state-disabled").attr("aria-disabled",true);b.disabledIndexes.push(a);b.disabledIndexes.sort();this._trigger("disable",null,this._ui(this.anchors[a],this.panels[a]))}return this},select:function(a){if(typeof a==="string")a=this.anchors.index(this.anchors.filter("[href$="+a+"]"));else if(a===null)a=-1;if(a===-1&&this.options.collapsible)a=this.options.selected;this.anchors.eq(a).trigger(this.options.event+".tabs");return this},load:function(c){var b=this,e=this.options,d=this.anchors.eq(c)[0],g=a.data(d,"load.tabs"),f=a("span",d);this.abort();if(!g||this.element.queue("tabs").length!==0&&a.data(d,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(c).addClass("ui-state-processing");(e.spinner||b._defaults.spinner)&&f.data("label.tabs",f.html()).html(e.spinner||b._defaults.spinner);this.xhr=a.ajax(a.extend({},e.ajaxOptions,{url:g,success:function(f,g){a(b._sanitizeSelector(d.hash),b.element).html(f);b._cleanup();e.cache&&a.data(d,"cache.tabs",true);b._trigger("load",null,b._ui(b.anchors[c],b.panels[c]));try{e.ajaxOptions.success(f,g)}catch(h){}},error:function(a,f){b._cleanup();b._trigger("load",null,b._ui(b.anchors[c],b.panels[c]));try{e.ajaxOptions.error(a,f,c,d)}catch(g){}}}));b.element.dequeue("tabs");return this},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(a,b){this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",b);return this},length:function(){return this.anchors.length}})})(jQuery);
+(function(b){"use strict";var a,c,d,j=false,i=false,h,f,e,g;b.widget("wijmo.wijvideo",{options:{fullScreenButtonVisible:true,showControlsOnHover:true},_create:function(){var i=this,n,k,l,o=i.options,m;if(window.wijmoApplyWijTouchUtilEvents)b=window.wijmoApplyWijTouchUtilEvents(b);if(b(this.element).is("video"))a=b(this.element);else a=b(this.element).find("video");if(!a||a.length===0||b.browser.msie&&b.browser.version<9)return;l=a[0].canPlayType;if(!l)return;a.wrap('<div class="wijmo-wijvideo ui-widget-content ui-widget" />').after('<div class="wijmo-wijvideo-wrapper"><ul class="wijmo-wijvideo-controls ui-widget-header ui-helper-clearfix ui-helper-reset"><li class="wijmo-wijvideo-play ui-state-default ui-corner-all"><span class="ui-icon ui-icon-play"></span></li><li class="wijmo-wijvideo-index"><div class="wijmo-wijvideo-index-slider"></div></li><li class="wijmo-wijvideo-timer">00:00</li><li class="wijmo-wijvideo-volume ui-state-default ui-corner-all"><div class="wijmo-wijvideo-volume-container"><div class="wijmo-wijvideo-volumeslider ui-state-default ui-corner-top"></div></div><span class="ui-icon ui-icon-volume-on"></span></li><li class="wijmo-wijvideo-fullscreen ui-state-default ui-corner-all"><span class="ui-icon ui-icon-arrow-4-diag"></span></li></ul></div>');c=a.parent(".wijmo-wijvideo");c.width(a.outerWidth()).height(a.outerHeight());d=c.find(".wijmo-wijvideo-index-slider");i._volumnOn=true;e=c.find(".wijmo-wijvideo-volume");m=window.setInterval(function(){if(i._getVideoAttribute("readyState")){window.clearInterval(m);c.width(a.outerWidth()).height(a.outerHeight());a.parent().find(".wijmo-wijvideo-controls").show();n=c.find(".wijmo-wijvideo-timer").position().left;d.width(n-d.position().left-15);d.slider({value:0,step:.01,max:i._getVideoAttribute("duration"),range:"min",stop:function(b,a){j=false;i._setVideoAttribute("currentTime",a.value)},slide:function(){j=true}});i._updateTime();f=c.find(".wijmo-wijvideo-volumeslider");f.slider({min:0,max:1,value:i._getVideoAttribute("volume"),step:.1,orientation:"vertical",range:"min",slide:function(b,a){i._setVideoAttribute("volume",a.value);if(a.value===0){i._volumnOn=false;e.find("span").removeClass("ui-icon-volume-on").addClass("ui-icon-volume-off")}else{i._volumnOn=true;e.find("span").removeClass("ui-icon-volume-off").addClass("ui-icon-volume-on")}}});a.parent().find(".wijmo-wijvideo-controls").css("display","none");i._initialToolTip();if(!o.showControlsOnHover){b(".wijmo-wijvideo-controls").show();c.height(a.outerHeight()+b(".wijmo-wijvideo-controls").height())}}},200);a.bind("click."+i.widgetName,function(){i._togglePlay()});o.showControlsOnHover&&b(".wijmo-wijvideo").hover(function(){b(".wijmo-wijvideo-controls").stop(true,true).fadeIn()},function(){b(".wijmo-wijvideo-controls").delay(300).fadeOut()});k=c.find(".wijmo-wijvideo-play > span");k.click(function(){i._togglePlay()}).parent().hover(function(){b(this).addClass("ui-state-hover")},function(){b(this).removeClass("ui-state-hover")});c.find(".wijmo-wijvideo-volume").hover(function(){b(".wijmo-wijvideo-volume-container").stop(true,true).slideToggle()});g=c.find(".wijmo-wijvideo-fullscreen > span");g.click(function(){i._toggleFullScreen()}).parent().hover(function(){b(this).addClass("ui-state-hover")},function(){b(this).removeClass("ui-state-hover")});!i.options.fullScreenButtonVisible&&c.find(".wijmo-wijvideo-fullscreen").hide();e.hover(function(){b(this).addClass("ui-state-hover")},function(){b(this).removeClass("ui-state-hover")}).click(function(){if(i._getVideoAttribute("readyState")){i._volumnOn=!i._volumnOn;if(!i._volumnOn){h=f.slider("value");f.slider("value",0);i._setVideoAttribute("volume",0);e.find("span").removeClass("ui-icon-volume-on").addClass("ui-icon-volume-off")}else{f.slider("value",h);i._setVideoAttribute("volume",h);e.find("span").removeClass("ui-icon-volume-off").addClass("ui-icon-volume-on")}}});a.bind("play."+i.widgetName,function(){k.removeClass("ui-icon ui-icon-play").addClass("ui-icon ui-icon-pause")});a.bind("pause."+i.widgetName,function(){k.removeClass("ui-icon ui-icon-pause").addClass("ui-icon ui-icon-play")});a.bind("ended."+i.widgetName,function(){i.pause()});a.bind("timeupdate."+i.widgetName,function(){i._updateTime()});i._videoIsControls=false;if(i._getVideoAttribute("controls"))i._videoIsControls=true;a.removeAttr("controls");i.element.is(":hidden")&&i.element.wijAddVisibilityObserver&&i.element.wijAddVisibilityObserver(function(){i._refresh();i.element.wijRemoveVisibilityObserver&&i.element.wijRemoveVisibilityObserver()},"wijvideo");i.options.disabled&&i._handleDisabledOption(true,i.element)},_setOption:function(f,d){var e=this,g=e.options;b.Widget.prototype._setOption.apply(e,arguments);if(f==="fullScreenButtonVisible"){g.fullScreenButtonVisible=d;if(d)c.find(".wijmo-wijvideo-fullscreen").show();else c.find(".wijmo-wijvideo-fullscreen").hide()}else if(f==="disabled")e._handleDisabledOption(d,e.element);else if(f==="showControlsOnHover")if(!d){b(".wijmo-wijvideo").unbind("mouseenter mouseleave");window.setTimeout(function(){b(".wijmo-wijvideo-controls").show();c.height(a.outerHeight()+b(".wijmo-wijvideo-controls").height())},200)}else{c.height(a.outerHeight());b(".wijmo-wijvideo-controls").hide();b(".wijmo-wijvideo").hover(function(){b(".wijmo-wijvideo-controls").stop(true,true).fadeIn()},function(){b(".wijmo-wijvideo-controls").delay(300).fadeOut()})}},_handleDisabledOption:function(d,e){var c=this;if(d){if(!c.disabledDiv)c.disabledDiv=c._createDisabledDiv(e);c.disabledDiv.appendTo("body");if(b.browser.msie){b(".wijmo-wijvideo").unbind("mouseenter mouseleave");a.unbind("click."+c.widgetName)}}else if(c.disabledDiv){c.disabledDiv.remove();c.disabledDiv=null;if(b.browser.msie){b(".wijmo-wijvideo").hover(function(){b(".wijmo-wijvideo-controls").stop(true,true).fadeIn()},function(){b(".wijmo-wijvideo-controls").delay(300).fadeOut()});a.bind("click."+c.widgetName,function(){c._togglePlay()})}}},_createDisabledDiv:function(){var a=c,d=a.offset(),f=a.outerWidth(),e=a.outerHeight();return b("<div></div>").addClass("ui-disabled").css({"z-index":"99999",position:"absolute",width:f,height:e,left:d.left,top:d.top})},_getVideoAttribute:function(b){return b===""?void 0:a.attr(b)!==undefined?a.attr(b):a.prop(b)},_setVideoAttribute:function(b,c){return b===""?void 0:a.attr(b)!==undefined?a.attr(b,c):a.prop(b,c)},_initialToolTip:function(){var a=this;d.wijtooltip({mouseTrailing:true,showCallout:false,position:{offset:"-60 -60"}});d.bind("mousemove",function(b){a._changeToolTipContent(b)});e.wijtooltip({content:"Volume",showCallout:false});g.wijtooltip({content:"Full Screen",showCallout:false});d.wijtooltip("widget").addClass("wijmo-wijvideo");e.wijtooltip("widget").addClass("wijmo-wijvideo");e.wijtooltip("widget").addClass("wijmo-wijvideo")},_updateTime:function(){var g=this,i=g._getVideoAttribute("duration"),b=g._getVideoAttribute("currentTime"),a,e,f="",h="";a=this._truncate((i-b)/60);e=this._truncate(i-b-a*60);if(a<10)f="0";if(e<10)h="0";c.find(".wijmo-wijvideo-timer").html(f+a+":"+h+e);!j&&d.slider("value",b)},_truncate:function(a){return Math[a>0?"floor":"ceil"](a)},_togglePlay:function(){var a=this;if(!a._getVideoAttribute("readyState"))return;if(a._getVideoAttribute("paused"))this.play();else this.pause()},_toggleFullScreen:function(){var d=this,h=d._getVideoAttribute("paused"),e=0,f=b(window).width(),g=b(window).height();i=!i;if(i){d._oriVidParentStyle=c.attr("style");d._oriWidth=a.outerWidth();d._oriHeight=a.outerHeight();d._oriDocOverFlow=b(document.documentElement).css("overflow");b(document.documentElement).css({overflow:"hidden"});if(!d._replacedDiv)d._replacedDiv=b("<div />");c.after(d._replacedDiv);c.addClass("wijmo-wijvideo-container-fullscreen").css({width:f,height:g}).appendTo(b("body"));a.attr("width",f).attr("height",g);b(window).bind("resize.wijvideo",function(){d._fullscreenOnWindowResize()});e=f-d._oriWidth}else{b(document.documentElement).css({overflow:d._oriDocOverFlow});e=d._oriWidth-a.width();d._replacedDiv.after(c).remove();c.removeClass("wijmo-wijvideo-container-fullscreen").attr("style","").attr("style",d._oriVidParentStyle);a.attr("width",d._oriWidth).attr("height",d._oriHeight);b(window).unbind("resize.wijvideo")}d._positionControls(e);d._hideToolTips();if(!h)d.play();else d.pause()},_fullscreenOnWindowResize:function(){var g=this,d=b(window).width(),e=b(window).height(),f=d-c.width();c.css({width:d,height:e});a.attr("width",d).attr("height",e);g._positionControls(f)},_positionControls:function(b){var a=c.find(".wijmo-wijvideo-index-slider");a.width(a.width()+b)},_showToolTip:function(e){var c=this,a=e.pageX,f=e.pageY,g=d.offset().left,h=d.width(),i=a-g,j=c._getVideoAttribute("duration"),b;b=j*(i/h);d.wijtooltip("option","content",c._getToolTipContent(b));d.wijtooltip("showAt",{x:a,y:f-10})},_changeToolTipContent:function(i){var b=this,c=i.pageX,e=d.offset().left,f=d.width(),g=c-e,h=b._getVideoAttribute("duration"),a;a=h*(g/f);d.wijtooltip("option","content",b._getToolTipContent(a))},_hideToolTips:function(){d.wijtooltip("hide");e.wijtooltip("hide");g.wijtooltip("hide")},_getToolTipContent:function(c){var a,b,d="",e="";a=parseInt(c/60,10);b=parseInt(c-a*60,10);if(a<10)d="0";if(b<10)e="0";return d+a+":"+e+b},_refresh:function(){var e;a.parent().find(".wijmo-wijvideo-controls").show();e=c.find(".wijmo-wijvideo-timer").position().left;d.width(e-d.position().left-15);a.parent().find(".wijmo-wijvideo-controls").css("display","none");if(!this.options.showControlsOnHover){b(".wijmo-wijvideo-controls",c).show();c.height(a.outerHeight()+b(".wijmo-wijvideo-controls").height())}},destroy:function(){var d=this;b.Widget.prototype.destroy.apply(this,arguments);c.after(a).remove();a.unbind("."+d.widgetName);d._videoIsControls&&d._setVideoAttribute("controls",true)},play:function(){a[0].play()},pause:function(){a[0].pause()},getWidth:function(){return a.outerWidth()},setWidth:function(b){b=b||600;var d=this.getWidth();a.attr("width",b);c.width(a.outerWidth());this._positionControls(this.getWidth()-d)},getHeight:function(){return a.outerHeight()},setHeight:function(d){d=d||400;a.attr("height",d);if(this.options.showControlsOnHover)c.height(a.outerHeight());else c.height(a.outerHeight()+b(".wijmo-wijvideo-controls").height())}})})(jQuery);
Index: sandbox/newExpressoMail/prototype/plugins/wijmo/jquery-ui.wijmo.css
===================================================================
--- sandbox/newExpressoMail/prototype/plugins/wijmo/jquery-ui.wijmo.css	(revision 7209)
+++ sandbox/newExpressoMail/prototype/plugins/wijmo/jquery-ui.wijmo.css	(revision 7209)
@@ -0,0 +1,2297 @@
+/* 
+ * 
+ * Wijmo Cobalt Theme
+ * http://wijmo.com/
+ * 
+ * Copyright(c) GrapeCity, Inc.  All rights reserved.
+ * 
+ * Dual licensed under the Wijmo Commercial or GNU GPL Version 3 licenses.
+ * licensing@wijmo.com
+ * http://wijmo.com/license
+ * 
+ * 
+*/
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden
+{
+    display: none;
+}
+.ui-helper-hidden-accessible
+{
+    position: absolute !important;
+    clip: rect(1px 1px 1px 1px);
+    clip: rect(1px,1px,1px,1px);
+}
+.ui-helper-reset
+{
+    margin: 0;
+    padding: 0;
+    border: 0;
+    outline: 0;
+    line-height: 1.3;
+    text-decoration: none;
+    font-size: 100%;
+    list-style: none;
+}
+.ui-helper-clearfix:before, .ui-helper-clearfix:after {
+	content: "";
+	display: table;
+}
+.ui-helper-clearfix:after {
+	clear: both;
+}
+.ui-helper-clearfix {
+	zoom: 1;
+}
+.ui-helper-zfix
+{
+    width: 100%;
+    height: 100%;
+    top: 0;
+    left: 0;
+    position: absolute;
+    opacity: 0;
+    filter: Alpha(Opacity=0);
+}
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled
+{
+    cursor: default !important;
+}
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon
+{
+    display: block;
+    text-indent: -99999px;
+    overflow: hidden;
+    background-repeat: no-repeat;
+}
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay
+{
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+}
+
+
+/*
+ * jQuery UI CSS Framework 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ *
+ */
+
+
+/* Component containers
+----------------------------------*/
+.ui-widget
+{
+    font-family: Lucida Grande, Lucida Sans, Arial, sans-serif;
+    font-size: 100%;
+}
+.ui-widget .ui-widget
+{
+    font-size: 1em;
+}
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button
+{
+    font-family: Lucida Grande, Lucida Sans, Arial, sans-serif;
+    font-size: 1em;
+}
+.ui-widget-content
+{
+    border: 1px solid #a7abb0;
+    background: #fcfdfd url(images/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x;
+    color: #1e395b;
+}
+.ui-widget-content a
+{
+    color: #222222;
+}
+.ui-widget-header
+{
+    border: 1px solid #849dbd;
+    background: #5c9ccc url(images/ui-bg_glass_55_b3c4d8_500x100.png) top repeat-x;
+    color: #1e395b;
+    font-weight: normal;
+    -moz-box-shadow: inset 0 1px 0 #fff;
+}
+.ui-widget-header a
+{
+    color: #1e395b;
+}
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default
+{
+    border: 1px solid #a3b9d1;
+    background: #dae6f4 url(images/ui-bg_glass_85_dae6f4_1x400.png) 50% 50% repeat-x;
+    font-weight: normal;
+    color: #1e395b;
+}
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited
+{
+    color: #1e395b;
+    text-decoration: none;
+}
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus
+{
+    -moz-box-shadow: inset 0 1px 0 #fff;
+    border: 1px solid #f2ca58;
+    background: #fef1bd url(images/ui-bg_glass_75_fef1bd_1x400.png) bottom repeat-x;
+    font-weight: normal;
+    color: #1d5987;
+}
+.ui-state-hover a, .ui-state-hover a:hover
+{
+    color: #262626;
+    text-decoration: none;
+}
+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active
+{
+    border: 1px solid #c28a30;
+    background: #ffe475 url(images/ui-bg_inset-hard_100_ffe475_1x100.png) bottom repeat-x;
+    font-weight: normal;
+    color: #262626;
+}
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited
+{
+    color: #1e395b;
+    text-decoration: none;
+}
+.ui-widget :active
+{
+    outline: none;
+}
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight
+{
+    border: 1px solid #7186a1;
+    background: #a7cdf0;
+    color: #1e395b;
+}
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a, .ui-widget-header .ui-state-highlight a
+{
+    color: #363636;
+}
+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error
+{
+    border: 1px solid #cd0a0a;
+    background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;
+    color: #cd0a0a;
+}
+.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a
+{
+    color: #cd0a0a;
+}
+.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text
+{
+    color: #cd0a0a;
+}
+.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary
+{
+    font-weight: normal;
+}
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary
+{
+    opacity: .7;
+    filter: Alpha(Opacity=70);
+    font-weight: normal;
+}
+.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled
+{
+    opacity: .35;
+    filter: Alpha(Opacity=35);
+    background-image: none;
+}
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon
+{
+    width: 16px;
+    height: 16px;
+    background-image: url(images/ui-icons_469bdd_256x240.png);
+}
+.ui-widget-content .ui-icon
+{
+    background-image: url(images/ui-icons_6e6c56_256x240.png);
+}
+.ui-widget-header .ui-icon
+{
+    background-image: url(images/ui-icons_6e6c56_256x240.png);
+}
+.ui-state-default .ui-icon
+{
+    background-image: url(images/ui-icons_6e6c56_256x240.png);
+}
+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon
+{
+    background-image: url(images/ui-icons_6e6c56_256x240.png);
+}
+.ui-state-active .ui-icon
+{
+    background-image: url(images/ui-icons_6e6c56_256x240.png);
+}
+.ui-state-highlight .ui-icon
+{
+    background-image: url(images/ui-icons_6e6c56_256x240.png);
+}
+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon
+{
+    background-image: url(images/ui-icons_cd0a0a_256x240.png);
+}
+
+/* positioning */
+.ui-icon-carat-1-n
+{
+    background-position: 0 0;
+}
+.ui-icon-carat-1-ne
+{
+    background-position: -16px 0;
+}
+.ui-icon-carat-1-e
+{
+    background-position: -32px 0;
+}
+.ui-icon-carat-1-se
+{
+    background-position: -48px 0;
+}
+.ui-icon-carat-1-s
+{
+    background-position: -64px 0;
+}
+.ui-icon-carat-1-sw
+{
+    background-position: -80px 0;
+}
+.ui-icon-carat-1-w
+{
+    background-position: -96px 0;
+}
+.ui-icon-carat-1-nw
+{
+    background-position: -112px 0;
+}
+.ui-icon-carat-2-n-s
+{
+    background-position: -128px 0;
+}
+.ui-icon-carat-2-e-w
+{
+    background-position: -144px 0;
+}
+.ui-icon-triangle-1-n
+{
+    background-position: 0 -16px;
+}
+.ui-icon-triangle-1-ne
+{
+    background-position: -16px -16px;
+}
+.ui-icon-triangle-1-e
+{
+    background-position: -32px -16px;
+}
+.ui-icon-triangle-1-se
+{
+    background-position: -48px -16px;
+}
+.ui-icon-triangle-1-s
+{
+    background-position: -64px -16px;
+}
+.ui-icon-triangle-1-sw
+{
+    background-position: -80px -16px;
+}
+.ui-icon-triangle-1-w
+{
+    background-position: -96px -16px;
+}
+.ui-icon-triangle-1-nw
+{
+    background-position: -112px -16px;
+}
+.ui-icon-triangle-2-n-s
+{
+    background-position: -128px -16px;
+}
+.ui-icon-triangle-2-e-w
+{
+    background-position: -144px -16px;
+}
+.ui-icon-arrow-1-n
+{
+    background-position: 0 -32px;
+}
+.ui-icon-arrow-1-ne
+{
+    background-position: -16px -32px;
+}
+.ui-icon-arrow-1-e
+{
+    background-position: -32px -32px;
+}
+.ui-icon-arrow-1-se
+{
+    background-position: -48px -32px;
+}
+.ui-icon-arrow-1-s
+{
+    background-position: -64px -32px;
+}
+.ui-icon-arrow-1-sw
+{
+    background-position: -80px -32px;
+}
+.ui-icon-arrow-1-w
+{
+    background-position: -96px -32px;
+}
+.ui-icon-arrow-1-nw
+{
+    background-position: -112px -32px;
+}
+.ui-icon-arrow-2-n-s
+{
+    background-position: -128px -32px;
+}
+.ui-icon-arrow-2-ne-sw
+{
+    background-position: -144px -32px;
+}
+.ui-icon-arrow-2-e-w
+{
+    background-position: -160px -32px;
+}
+.ui-icon-arrow-2-se-nw
+{
+    background-position: -176px -32px;
+}
+.ui-icon-arrowstop-1-n
+{
+    background-position: -192px -32px;
+}
+.ui-icon-arrowstop-1-e
+{
+    background-position: -208px -32px;
+}
+.ui-icon-arrowstop-1-s
+{
+    background-position: -224px -32px;
+}
+.ui-icon-arrowstop-1-w
+{
+    background-position: -240px -32px;
+}
+.ui-icon-arrowthick-1-n
+{
+    background-position: 0 -48px;
+}
+.ui-icon-arrowthick-1-ne
+{
+    background-position: -16px -48px;
+}
+.ui-icon-arrowthick-1-e
+{
+    background-position: -32px -48px;
+}
+.ui-icon-arrowthick-1-se
+{
+    background-position: -48px -48px;
+}
+.ui-icon-arrowthick-1-s
+{
+    background-position: -64px -48px;
+}
+.ui-icon-arrowthick-1-sw
+{
+    background-position: -80px -48px;
+}
+.ui-icon-arrowthick-1-w
+{
+    background-position: -96px -48px;
+}
+.ui-icon-arrowthick-1-nw
+{
+    background-position: -112px -48px;
+}
+.ui-icon-arrowthick-2-n-s
+{
+    background-position: -128px -48px;
+}
+.ui-icon-arrowthick-2-ne-sw
+{
+    background-position: -144px -48px;
+}
+.ui-icon-arrowthick-2-e-w
+{
+    background-position: -160px -48px;
+}
+.ui-icon-arrowthick-2-se-nw
+{
+    background-position: -176px -48px;
+}
+.ui-icon-arrowthickstop-1-n
+{
+    background-position: -192px -48px;
+}
+.ui-icon-arrowthickstop-1-e
+{
+    background-position: -208px -48px;
+}
+.ui-icon-arrowthickstop-1-s
+{
+    background-position: -224px -48px;
+}
+.ui-icon-arrowthickstop-1-w
+{
+    background-position: -240px -48px;
+}
+.ui-icon-arrowreturnthick-1-w
+{
+    background-position: 0 -64px;
+}
+.ui-icon-arrowreturnthick-1-n
+{
+    background-position: -16px -64px;
+}
+.ui-icon-arrowreturnthick-1-e
+{
+    background-position: -32px -64px;
+}
+.ui-icon-arrowreturnthick-1-s
+{
+    background-position: -48px -64px;
+}
+.ui-icon-arrowreturn-1-w
+{
+    background-position: -64px -64px;
+}
+.ui-icon-arrowreturn-1-n
+{
+    background-position: -80px -64px;
+}
+.ui-icon-arrowreturn-1-e
+{
+    background-position: -96px -64px;
+}
+.ui-icon-arrowreturn-1-s
+{
+    background-position: -112px -64px;
+}
+.ui-icon-arrowrefresh-1-w
+{
+    background-position: -128px -64px;
+}
+.ui-icon-arrowrefresh-1-n
+{
+    background-position: -144px -64px;
+}
+.ui-icon-arrowrefresh-1-e
+{
+    background-position: -160px -64px;
+}
+.ui-icon-arrowrefresh-1-s
+{
+    background-position: -176px -64px;
+}
+.ui-icon-arrow-4
+{
+    background-position: 0 -80px;
+}
+.ui-icon-arrow-4-diag
+{
+    background-position: -16px -80px;
+}
+.ui-icon-extlink
+{
+    background-position: -32px -80px;
+}
+.ui-icon-newwin
+{
+    background-position: -48px -80px;
+}
+.ui-icon-refresh
+{
+    background-position: -64px -80px;
+}
+.ui-icon-shuffle
+{
+    background-position: -80px -80px;
+}
+.ui-icon-transfer-e-w
+{
+    background-position: -96px -80px;
+}
+.ui-icon-transferthick-e-w
+{
+    background-position: -112px -80px;
+}
+.ui-icon-folder-collapsed
+{
+    background-position: 0 -96px;
+}
+.ui-icon-folder-open
+{
+    background-position: -16px -96px;
+}
+.ui-icon-document
+{
+    background-position: -32px -96px;
+}
+.ui-icon-document-b
+{
+    background-position: -48px -96px;
+}
+.ui-icon-note
+{
+    background-position: -64px -96px;
+}
+.ui-icon-mail-closed
+{
+    background-position: -80px -96px;
+}
+.ui-icon-mail-open
+{
+    background-position: -96px -96px;
+}
+.ui-icon-suitcase
+{
+    background-position: -112px -96px;
+}
+.ui-icon-comment
+{
+    background-position: -128px -96px;
+}
+.ui-icon-person
+{
+    background-position: -144px -96px;
+}
+.ui-icon-print
+{
+    background-position: -160px -96px;
+}
+.ui-icon-trash
+{
+    background-position: -176px -96px;
+}
+.ui-icon-locked
+{
+    background-position: -192px -96px;
+}
+.ui-icon-unlocked
+{
+    background-position: -208px -96px;
+}
+.ui-icon-bookmark
+{
+    background-position: -224px -96px;
+}
+.ui-icon-tag
+{
+    background-position: -240px -96px;
+}
+.ui-icon-home
+{
+    background-position: 0 -112px;
+}
+.ui-icon-flag
+{
+    background-position: -16px -112px;
+}
+.ui-icon-calendar
+{
+    background-position: -32px -112px;
+}
+.ui-icon-cart
+{
+    background-position: -48px -112px;
+}
+.ui-icon-pencil
+{
+    background-position: -64px -112px;
+}
+.ui-icon-clock
+{
+    background-position: -80px -112px;
+}
+.ui-icon-disk
+{
+    background-position: -96px -112px;
+}
+.ui-icon-calculator
+{
+    background-position: -112px -112px;
+}
+.ui-icon-zoomin
+{
+    background-position: -128px -112px;
+}
+.ui-icon-zoomout
+{
+    background-position: -144px -112px;
+}
+.ui-icon-search
+{
+    background-position: -160px -112px;
+}
+.ui-icon-wrench
+{
+    background-position: -176px -112px;
+}
+.ui-icon-gear
+{
+    background-position: -192px -112px;
+}
+.ui-icon-heart
+{
+    background-position: -208px -112px;
+}
+.ui-icon-star
+{
+    background-position: -224px -112px;
+}
+.ui-icon-link
+{
+    background-position: -240px -112px;
+}
+.ui-icon-cancel
+{
+    background-position: 0 -128px;
+}
+.ui-icon-plus
+{
+    background-position: -16px -128px;
+}
+.ui-icon-plusthick
+{
+    background-position: -32px -128px;
+}
+.ui-icon-minus
+{
+    background-position: -48px -128px;
+}
+.ui-icon-minusthick
+{
+    background-position: -64px -128px;
+}
+.ui-icon-close
+{
+    background-position: -80px -128px;
+}
+.ui-icon-closethick
+{
+    background-position: -96px -128px;
+}
+.ui-icon-key
+{
+    background-position: -112px -128px;
+}
+.ui-icon-lightbulb
+{
+    background-position: -128px -128px;
+}
+.ui-icon-scissors
+{
+    background-position: -144px -128px;
+}
+.ui-icon-clipboard
+{
+    background-position: -160px -128px;
+}
+.ui-icon-copy
+{
+    background-position: -176px -128px;
+}
+.ui-icon-contact
+{
+    background-position: -192px -128px;
+}
+.ui-icon-image
+{
+    background-position: -208px -128px;
+}
+.ui-icon-video
+{
+    background-position: -224px -128px;
+}
+.ui-icon-script
+{
+    background-position: -240px -128px;
+}
+.ui-icon-alert
+{
+    background-position: 0 -144px;
+}
+.ui-icon-info
+{
+    background-position: -16px -144px;
+}
+.ui-icon-notice
+{
+    background-position: -32px -144px;
+}
+.ui-icon-help
+{
+    background-position: -48px -144px;
+}
+.ui-icon-check
+{
+    background-position: -64px -144px;
+}
+.ui-icon-bullet
+{
+    background-position: -80px -144px;
+}
+.ui-icon-radio-off
+{
+    background-position: -96px -144px;
+}
+.ui-icon-radio-on
+{
+    background-position: -112px -144px;
+}
+.ui-icon-pin-w
+{
+    background-position: -128px -144px;
+}
+.ui-icon-pin-s
+{
+    background-position: -144px -144px;
+}
+.ui-icon-play
+{
+    background-position: 0 -160px;
+}
+.ui-icon-pause
+{
+    background-position: -16px -160px;
+}
+.ui-icon-seek-next
+{
+    background-position: -32px -160px;
+}
+.ui-icon-seek-prev
+{
+    background-position: -48px -160px;
+}
+.ui-icon-seek-end
+{
+    background-position: -64px -160px;
+}
+.ui-icon-seek-start
+{
+    background-position: -80px -160px;
+}
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first
+{
+    background-position: -80px -160px;
+}
+.ui-icon-stop
+{
+    background-position: -96px -160px;
+}
+.ui-icon-eject
+{
+    background-position: -112px -160px;
+}
+.ui-icon-volume-off
+{
+    background-position: -128px -160px;
+}
+.ui-icon-volume-on
+{
+    background-position: -144px -160px;
+}
+.ui-icon-power
+{
+    background-position: 0 -176px;
+}
+.ui-icon-signal-diag
+{
+    background-position: -16px -176px;
+}
+.ui-icon-signal
+{
+    background-position: -32px -176px;
+}
+.ui-icon-battery-0
+{
+    background-position: -48px -176px;
+}
+.ui-icon-battery-1
+{
+    background-position: -64px -176px;
+}
+.ui-icon-battery-2
+{
+    background-position: -80px -176px;
+}
+.ui-icon-battery-3
+{
+    background-position: -96px -176px;
+}
+.ui-icon-circle-plus
+{
+    background-position: 0 -192px;
+}
+.ui-icon-circle-minus
+{
+    background-position: -16px -192px;
+}
+.ui-icon-circle-close
+{
+    background-position: -32px -192px;
+}
+.ui-icon-circle-triangle-e
+{
+    background-position: -48px -192px;
+}
+.ui-icon-circle-triangle-s
+{
+    background-position: -64px -192px;
+}
+.ui-icon-circle-triangle-w
+{
+    background-position: -80px -192px;
+}
+.ui-icon-circle-triangle-n
+{
+    background-position: -96px -192px;
+}
+.ui-icon-circle-arrow-e
+{
+    background-position: -112px -192px;
+}
+.ui-icon-circle-arrow-s
+{
+    background-position: -128px -192px;
+}
+.ui-icon-circle-arrow-w
+{
+    background-position: -144px -192px;
+}
+.ui-icon-circle-arrow-n
+{
+    background-position: -160px -192px;
+}
+.ui-icon-circle-zoomin
+{
+    background-position: -176px -192px;
+}
+.ui-icon-circle-zoomout
+{
+    background-position: -192px -192px;
+}
+.ui-icon-circle-check
+{
+    background-position: -208px -192px;
+}
+.ui-icon-circlesmall-plus
+{
+    background-position: 0 -208px;
+}
+.ui-icon-circlesmall-minus
+{
+    background-position: -16px -208px;
+}
+.ui-icon-circlesmall-close
+{
+    background-position: -32px -208px;
+}
+.ui-icon-squaresmall-plus
+{
+    background-position: -48px -208px;
+}
+.ui-icon-squaresmall-minus
+{
+    background-position: -64px -208px;
+}
+.ui-icon-squaresmall-close
+{
+    background-position: -80px -208px;
+}
+.ui-icon-grip-dotted-vertical
+{
+    background-position: 0 -224px;
+}
+.ui-icon-grip-dotted-horizontal
+{
+    background-position: -16px -224px;
+}
+.ui-icon-grip-solid-vertical
+{
+    background-position: -32px -224px;
+}
+.ui-icon-grip-solid-horizontal
+{
+    background-position: -48px -224px;
+}
+.ui-icon-gripsmall-diagonal-se
+{
+    background-position: -64px -224px;
+}
+.ui-icon-grip-diagonal-se
+{
+    background-position: -80px -224px;
+}
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-tl
+{
+    -moz-border-radius-topleft: 2px;
+    -webkit-border-top-left-radius: 2px;
+    border-top-left-radius: 2px;
+}
+.ui-corner-tr
+{
+    -moz-border-radius-topright: 2px;
+    -webkit-border-top-right-radius: 2px;
+    border-top-right-radius: 2px;
+}
+.ui-corner-bl
+{
+    -moz-border-radius-bottomleft: 2px;
+    -webkit-border-bottom-left-radius: 2px;
+    border-bottom-left-radius: 2px;
+}
+.ui-corner-br
+{
+    -moz-border-radius-bottomright: 2px;
+    -webkit-border-bottom-right-radius: 2px;
+    border-bottom-right-radius: 2px;
+}
+.ui-corner-top
+{
+    -moz-border-radius-topleft: 2px;
+    -webkit-border-top-left-radius: 2px;
+    border-top-left-radius: 2px;
+    -moz-border-radius-topright: 2px;
+    -webkit-border-top-right-radius: 2px;
+    border-top-right-radius: 2px;
+}
+.ui-corner-bottom
+{
+    -moz-border-radius-bottomleft: 2px;
+    -webkit-border-bottom-left-radius: 2px;
+    border-bottom-left-radius: 2px;
+    -moz-border-radius-bottomright: 2px;
+    -webkit-border-bottom-right-radius: 2px;
+    border-bottom-right-radius: 2px;
+}
+.ui-corner-right
+{
+    -moz-border-radius-topright: 2px;
+    -webkit-border-top-right-radius: 2px;
+    border-top-right-radius: 2px;
+    -moz-border-radius-bottomright: 2px;
+    -webkit-border-bottom-right-radius: 2px;
+    border-bottom-right-radius: 2px;
+}
+.ui-corner-left
+{
+    -moz-border-radius-topleft: 2px;
+    -webkit-border-top-left-radius: 2px;
+    border-top-left-radius: 2px;
+    -moz-border-radius-bottomleft: 2px;
+    -webkit-border-bottom-left-radius: 2px;
+    border-bottom-left-radius: 2px;
+}
+.ui-corner-all
+{
+    -moz-border-radius: 2px;
+    -webkit-border-radius: 2px;
+    border-radius: 2px;
+}
+
+/* Overlays */
+.ui-widget-overlay
+{
+    background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
+    opacity: .30;
+    filter: Alpha(Opacity=30);
+}
+.ui-widget-shadow
+{
+    margin: -8px 0 0 -8px;
+    padding: 8px;
+    background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
+    opacity: .30;
+    filter: Alpha(Opacity=30);
+    -moz-border-radius: 8px;
+    -webkit-border-radius: 8px;
+    border-radius: 8px;
+}
+/*
+ * jQuery UI Resizable 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Resizable#theming
+ */
+.ui-resizable
+{
+    position: relative;
+}
+.ui-resizable-handle
+{
+    position: absolute;
+    font-size: 0.1px;
+    z-index: 99999;
+    display: block;
+}
+.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle
+{
+    display: none;
+}
+.ui-resizable-n
+{
+    cursor: n-resize;
+    height: 7px;
+    width: 100%;
+    top: -5px;
+    left: 0;
+}
+.ui-resizable-s
+{
+    cursor: s-resize;
+    height: 7px;
+    width: 100%;
+    bottom: -5px;
+    left: 0;
+}
+.ui-resizable-e
+{
+    cursor: e-resize;
+    width: 7px;
+    right: -5px;
+    top: 0;
+    height: 100%;
+}
+.ui-resizable-w
+{
+    cursor: w-resize;
+    width: 7px;
+    left: -5px;
+    top: 0;
+    height: 100%;
+}
+.ui-resizable-se
+{
+    cursor: se-resize;
+    width: 12px;
+    height: 12px;
+    right: 1px;
+    bottom: 1px;
+}
+.ui-resizable-sw
+{
+    cursor: sw-resize;
+    width: 9px;
+    height: 9px;
+    left: -5px;
+    bottom: -5px;
+}
+.ui-resizable-nw
+{
+    cursor: nw-resize;
+    width: 9px;
+    height: 9px;
+    left: -5px;
+    top: -5px;
+}
+.ui-resizable-ne
+{
+    cursor: ne-resize;
+    width: 9px;
+    height: 9px;
+    right: -5px;
+    top: -5px;
+}
+/*
+ * jQuery UI Selectable 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Selectable#theming
+ */
+.ui-selectable-helper
+{
+    position: absolute;
+    z-index: 100;
+    border: 1px dotted black;
+}
+/*
+ * jQuery UI Accordion 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Accordion#theming
+ */
+/* IE/Win - Fix animation bug - #4615 */
+.ui-accordion
+{
+    width: 100%;
+}
+.ui-accordion .ui-accordion-header
+{
+    cursor: pointer;
+    position: relative;
+    margin-top: 1px;
+    zoom: 1;
+}
+.ui-accordion .ui-accordion-li-fix
+{
+    display: inline;
+}
+.ui-accordion .ui-accordion-header-active
+{
+    border-bottom: 0 !important;
+}
+.ui-accordion .ui-accordion-header a
+{
+    display: block;
+    font-size: 1em;
+    padding: .5em .5em .5em .7em;
+}
+.ui-accordion-icons .ui-accordion-header a
+{
+    padding-left: 2.2em;
+}
+.ui-accordion .ui-accordion-header .ui-icon
+{
+    position: absolute;
+    left: .5em;
+    top: 50%;
+    margin-top: -8px;
+}
+.ui-accordion .ui-accordion-content
+{
+    padding: 1em 2.2em;
+    border-top: 0;
+    margin-top: -2px;
+    position: relative;
+    top: 1px;
+    margin-bottom: 2px;
+    overflow: auto;
+    display: none;
+    zoom: 1;
+}
+.ui-accordion .ui-accordion-content-active
+{
+    display: block;
+}
+/*
+ * jQuery UI Autocomplete 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Autocomplete#theming
+ */
+.ui-autocomplete
+{
+    position: absolute;
+    cursor: default;
+}
+
+/* workarounds */
+* html .ui-autocomplete
+{
+    width: 1px;
+}
+/* without this, the menu expands to 100% in IE6 */
+
+/*
+ * jQuery UI Menu 1.8.10
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Menu#theming
+ */
+.ui-menu
+{
+    list-style: none;
+    padding: 2px;
+    margin: 0;
+    display: block;
+    float: left;
+}
+.ui-menu .ui-menu
+{
+    margin-top: -3px;
+}
+.ui-menu .ui-menu-item
+{
+    margin: 0;
+    padding: 0;
+    zoom: 1;
+    float: left;
+    clear: left;
+    width: 100%;
+}
+.ui-menu .ui-menu-item a
+{
+    text-decoration: none;
+    display: block;
+    padding: .2em .4em;
+    line-height: 1.5;
+    zoom: 1;
+}
+.ui-menu .ui-menu-item a.ui-state-hover, .ui-menu .ui-menu-item a.ui-state-active
+{
+    font-weight: normal;
+    margin: -1px;
+}
+/*
+ * jQuery UI Button 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Button#theming
+ */
+.ui-button
+{
+    display: inline-block;
+    position: relative;
+    padding: 0;
+    margin-right: .1em;
+    text-decoration: none !important;
+    cursor: pointer;
+    text-align: center;
+    zoom: 1;
+    overflow: visible;
+}
+/* the overflow property removes extra width in IE */
+.ui-button-icon-only
+{
+    width: 2.2em;
+}
+/* to make room for the icon, a width needs to be set here */
+button.ui-button-icon-only
+{
+    width: 2.4em;
+}
+/* button elements seem to need a little more width */
+.ui-button-icons-only
+{
+    width: 3.4em;
+}
+button.ui-button-icons-only
+{
+    width: 3.7em;
+}
+
+/*button text element */
+.ui-button .ui-button-text
+{
+    display: block;
+    line-height: 1.4;
+}
+.ui-button-text-only .ui-button-text
+{
+    padding: .4em 1em;
+}
+.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text
+{
+    padding: .4em;
+    text-indent: -9999999px;
+}
+.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text
+{
+    padding: .4em 1em .4em 2.1em;
+}
+.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text
+{
+    padding: .4em 2.1em .4em 1em;
+}
+.ui-button-text-icons .ui-button-text
+{
+    padding-left: 2.1em;
+    padding-right: 2.1em;
+}
+/* no icon support for input elements, provide padding by default */
+input.ui-button
+{
+    padding: .4em 1em;
+}
+
+/*button icon element(s) */
+.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon
+{
+    position: absolute;
+    top: 50%;
+    margin-top: -8px;
+}
+.ui-button-icon-only .ui-icon
+{
+    left: 50%;
+    margin-left: -8px;
+}
+.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary
+{
+    left: .5em;
+}
+.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary
+{
+    right: .5em;
+}
+.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary
+{
+    right: .5em;
+}
+
+/*button sets*/
+.ui-buttonset
+{
+    margin-right: 7px;
+}
+.ui-buttonset .ui-button
+{
+    margin-left: 0;
+    margin-right: -.3em;
+}
+
+/* workarounds */
+button.ui-button::-moz-focus-inner
+{
+    border: 0;
+    padding: 0;
+}
+/* reset extra padding in Firefox */
+/*
+ * jQuery UI Dialog 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Dialog#theming
+ */
+.ui-dialog
+{
+    position: absolute;
+    padding: .2em;
+    width: 300px;
+    overflow: hidden;
+}
+.ui-dialog .ui-dialog-titlebar
+{
+    padding: .4em 1em;
+    position: relative;
+}
+.ui-dialog .ui-dialog-title
+{
+    float: left;
+    margin: .1em 16px .1em 0;
+}
+.ui-dialog .ui-dialog-titlebar-close
+{
+    position: absolute;
+    right: .3em;
+    top: 50%;
+    width: 19px;
+    margin: -10px 0 0 0;
+    padding: 1px;
+    height: 18px;
+}
+.ui-dialog .ui-dialog-titlebar-close span
+{
+    display: block;
+    margin: 1px;
+}
+.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus
+{
+    padding: 0;
+}
+.ui-dialog .ui-dialog-content
+{
+    position: relative;
+    border: 0;
+    padding: .5em 1em;
+    background: none;
+    overflow: auto;
+    zoom: 1;
+}
+.ui-dialog .ui-dialog-buttonpane
+{
+    text-align: left;
+    border-width: 1px 0 0 0;
+    background-image: none;
+    margin: .5em 0 0 0;
+    padding: .3em 1em .5em .4em;
+}
+.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset
+{
+    float: right;
+}
+.ui-dialog .ui-dialog-buttonpane button
+{
+    margin: .5em .4em .5em 0;
+    cursor: pointer;
+}
+.ui-dialog .ui-resizable-se
+{
+    width: 14px;
+    height: 14px;
+    right: 3px;
+    bottom: 3px;
+}
+.ui-draggable .ui-dialog-titlebar
+{
+    cursor: move;
+}
+/*
+ * jQuery UI Slider 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Slider#theming
+ */
+.ui-slider
+{
+    position: relative;
+    text-align: left;
+}
+.ui-slider .ui-slider-handle
+{
+    position: absolute;
+    z-index: 2;
+    width: 1.2em;
+    height: 1.2em;
+    cursor: default;
+}
+.ui-slider .ui-slider-range
+{
+    position: absolute;
+    z-index: 1;
+    font-size: .7em;
+    display: block;
+    border: 0;
+    background-position: 0 0;
+}
+
+.ui-slider-horizontal
+{
+    height: .8em;
+}
+.ui-slider-horizontal .ui-slider-handle
+{
+    top: -.3em;
+    margin-left: -.6em;
+}
+.ui-slider-horizontal .ui-slider-range
+{
+    top: 0;
+    height: 100%;
+}
+.ui-slider-horizontal .ui-slider-range-min
+{
+    left: 0;
+}
+.ui-slider-horizontal .ui-slider-range-max
+{
+    right: 0;
+}
+
+.ui-slider-vertical
+{
+    width: .8em;
+    height: 100px;
+}
+.ui-slider-vertical .ui-slider-handle
+{
+    left: -.3em;
+    margin-left: 0;
+    margin-bottom: -.6em;
+}
+.ui-slider-vertical .ui-slider-range
+{
+    left: 0;
+    width: 100%;
+}
+.ui-slider-vertical .ui-slider-range-min
+{
+    bottom: 0;
+}
+.ui-slider-vertical .ui-slider-range-max
+{
+    top: 0;
+}
+/*
+ * jQuery UI Tabs 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Tabs#theming
+ */
+.ui-tabs
+{
+    position: relative;
+    padding: .2em;
+    zoom: 1;
+}
+/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
+.ui-tabs .ui-tabs-nav
+{
+    margin: 0;
+    padding: .2em .2em 0;
+}
+.ui-tabs .ui-tabs-nav li
+{
+    list-style: none;
+    float: left;
+    position: relative;
+    top: 1px;
+    margin: 0 .2em 1px 0;
+    border-bottom: 0 !important;
+    padding: 0;
+    white-space: nowrap;
+}
+.ui-tabs .ui-tabs-nav li a
+{
+    float: left;
+    padding: .5em 1em;
+    text-decoration: none;
+}
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected
+{
+    margin-bottom: 0;
+    padding-bottom: 1px;
+}
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a
+{
+    cursor: text;
+}
+.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a
+{
+    cursor: pointer;
+}
+/* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
+.ui-tabs .ui-tabs-panel
+{
+    display: block;
+    border-width: 0;
+    padding: 1em 1.4em;
+    background: none;
+}
+.ui-tabs .ui-tabs-hide
+{
+    display: none !important;
+}
+/*
+ * jQuery UI Datepicker 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Datepicker#theming
+ */
+.ui-datepicker
+{
+    width: 17em;
+    padding: .2em .2em 0;
+    display: none;
+}
+.ui-datepicker .ui-datepicker-header
+{
+    position: relative;
+    padding: .2em 0;
+}
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next
+{
+    position: absolute;
+    top: 2px;
+    width: 1.8em;
+    height: 1.8em;
+}
+.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover
+{
+    top: 1px;
+}
+.ui-datepicker .ui-datepicker-prev
+{
+    left: 2px;
+}
+.ui-datepicker .ui-datepicker-next
+{
+    right: 2px;
+}
+.ui-datepicker .ui-datepicker-prev-hover
+{
+    left: 1px;
+}
+.ui-datepicker .ui-datepicker-next-hover
+{
+    right: 1px;
+}
+.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span
+{
+    display: block;
+    position: absolute;
+    left: 50%;
+    margin-left: -8px;
+    top: 50%;
+    margin-top: -8px;
+}
+.ui-datepicker .ui-datepicker-title
+{
+    margin: 0 2.3em;
+    line-height: 1.8em;
+    text-align: center;
+}
+.ui-datepicker .ui-datepicker-title select
+{
+    font-size: 1em;
+    margin: 1px 0;
+}
+.ui-datepicker select.ui-datepicker-month-year
+{
+    width: 100%;
+}
+.ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year
+{
+    width: 49%;
+}
+.ui-datepicker table
+{
+    width: 100%;
+    font-size: .9em;
+    border-collapse: collapse;
+    margin: 0 0 .4em;
+}
+.ui-datepicker th
+{
+    padding: .7em .3em;
+    text-align: center;
+    font-weight: normal;
+    border: 0;
+}
+.ui-datepicker td
+{
+    border: 0;
+    padding: 1px;
+}
+.ui-datepicker td span, .ui-datepicker td a
+{
+    display: block;
+    padding: .2em;
+    text-align: right;
+    text-decoration: none;
+}
+.ui-datepicker .ui-datepicker-buttonpane
+{
+    background-image: none;
+    margin: .7em 0 0 0;
+    padding: 0 .2em;
+    border-left: 0;
+    border-right: 0;
+    border-bottom: 0;
+}
+.ui-datepicker .ui-datepicker-buttonpane button
+{
+    float: right;
+    margin: .5em .2em .4em;
+    cursor: pointer;
+    padding: .2em .6em .3em .6em;
+    width: auto;
+    overflow: visible;
+}
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current
+{
+    float: left;
+}
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi
+{
+    width: auto;
+}
+.ui-datepicker-multi .ui-datepicker-group
+{
+    float: left;
+}
+.ui-datepicker-multi .ui-datepicker-group table
+{
+    width: 95%;
+    margin: 0 auto .4em;
+}
+.ui-datepicker-multi-2 .ui-datepicker-group
+{
+    width: 50%;
+}
+.ui-datepicker-multi-3 .ui-datepicker-group
+{
+    width: 33.3%;
+}
+.ui-datepicker-multi-4 .ui-datepicker-group
+{
+    width: 25%;
+}
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header
+{
+    border-left-width: 0;
+}
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header
+{
+    border-left-width: 0;
+}
+.ui-datepicker-multi .ui-datepicker-buttonpane
+{
+    clear: left;
+}
+.ui-datepicker-row-break
+{
+    clear: both;
+    width: 100%;
+}
+
+/* RTL support */
+.ui-datepicker-rtl
+{
+    direction: rtl;
+}
+.ui-datepicker-rtl .ui-datepicker-prev
+{
+    right: 2px;
+    left: auto;
+}
+.ui-datepicker-rtl .ui-datepicker-next
+{
+    left: 2px;
+    right: auto;
+}
+.ui-datepicker-rtl .ui-datepicker-prev:hover
+{
+    right: 1px;
+    left: auto;
+}
+.ui-datepicker-rtl .ui-datepicker-next:hover
+{
+    left: 1px;
+    right: auto;
+}
+.ui-datepicker-rtl .ui-datepicker-buttonpane
+{
+    clear: right;
+}
+.ui-datepicker-rtl .ui-datepicker-buttonpane button
+{
+    float: left;
+}
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current
+{
+    float: right;
+}
+.ui-datepicker-rtl .ui-datepicker-group
+{
+    float: right;
+}
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header
+{
+    border-right-width: 0;
+    border-left-width: 1px;
+}
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header
+{
+    border-right-width: 0;
+    border-left-width: 1px;
+}
+
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
+.ui-datepicker-cover
+{
+    display: none; /*sorry for IE5*/
+    display: /**/ block; /*sorry for IE5*/
+    position: absolute; /*must have*/
+    z-index: -1; /*must have*/
+    filter: mask(); /*must have*/
+    top: -4px; /*must have*/
+    left: -4px; /*must have*/
+    width: 200px; /*must have*/
+    height: 200px; /*must have*/
+}
+/*
+ * jQuery UI Progressbar 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Progressbar#theming
+ */
+.ui-progressbar
+{
+    height: 2em;
+    text-align: left;
+}
+.ui-progressbar .ui-progressbar-value
+{
+    margin: -1px;
+    height: 100%;
+}
+
+/* Custom */
+
+
+
+
+.wijmo-dropdown-trigger
+{
+    -moz-border-radius-topright: 2px;
+    -webkit-border-top-right-radius: 2px;
+    border-top-right-radius: 2px;
+    -moz-border-radius-bottomright: 2px;
+    -webkit-border-bottom-right-radius: 2px;
+    border-bottom-right-radius: 2px;
+}
+
+
+.wijmo-wijdropdown label.wijmo-dropdown-label
+{
+    -moz-border-radius: 2px;
+    -webkit-border-radius: 2px;
+    border-radius: 2px;
+}
+
+.wijmo-wijinput, .wijmo-wijtextbox, .wijmo-wijgrid .wijmo-wijinput
+{
+    /*background: #242122 url(images/ui-bg_inset-soft_15_242122_1x100.png) 50% 50% repeat-x !important;*/ /*background: #e1e1e1 url(images/ui-bg_inset-soft_100_e1e1e1_1x100.png) 50% 50% repeat-x !important;*/
+    background: #fafafa !important;
+    color: #404040 !important;
+    border: solid 1px #849dbd !important;
+}
+
+.wijmo-wijinput.ui-state-hover, .wijmo-wijtextbox.ui-state-hover
+{
+    border-color: #f3ce55;
+}
+.wijmo-wijinput.ui-state-focus, .wijmo-wijtextbox.ui-state-focus
+{
+    /*background: #e1e1e1 url(images/ui-bg_inset-soft_100_e1e1e1_1x100.png) 50% 50% repeat-x !important;*/
+    background: #fff !important;
+    color: #404040 !important;
+    border-color: #c2973f;
+}
+/*
+.wijmo-checkbox .ui-state-hover, .wijmo-wijradio .ui-state-hover
+{
+    -moz-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15);
+    -webkit-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15);
+    box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15);
+    border: 1px solid #00a6dd;
+    background: #00a6dd url(images/ui-bg_highlight-soft_35_00a6dd_1x100.png) 50% 50% repeat-x;
+    font-weight: normal;
+    color: #fafafa;
+    text-shadow: none;
+}
+
+.wijmo-checkbox .ui-state-active, .wijmo-wijradio .ui-state-active
+{
+    -moz-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15);
+    -webkit-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15);
+    box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15);
+    border: 1px solid transparent;
+    background: #606154 url(images/ui-bg_highlight-soft_15_333333_1x100.png) top repeat-x;
+    font-weight: normal;
+    color: #fafafa;
+}
+
+
+*/
+
+
+.wijmo-wijgrid-row .ui-state-highlight
+{
+    border-right: solid 1px transparent !important;
+}
+.wijmo-wijgrid-row
+{
+    border-color: #c7c8c9;
+}
+.wijmo-wijmenu .wijmo-wijmenu-list .wijmo-wijmenu-item
+{
+    -moz-box-shadow: none;
+    -webkit-box-shadow: none;
+    box-shadow: none;
+}
+div.wijmo-wijgrid .wijmo-wijgrid-filterrow td
+{
+    border: none;
+}
+.wijmo-wijdropdown .wijmo-dropdown, .wijmo-wijmenu-child, .wijmo-wijcombobox-list, .wijmo-wijgrid-filterlist
+{
+    -moz-box-shadow: 3px 3px 3px rgba(0,0,0,0.15);
+    -webkit-box-shadow: 3px 3px 3px rgba(0,0,0,0.15);
+    box-shadow: 3px 3px 3px rgba(0,0,0,0.15);
+}
+/*
+.wijmo-wijmenu-child .ui-state-default .wijmo-wijmenu-text, .wijmo-wijmenu-child a.wijmo-wijmenu-text
+{
+    color: #404040;
+}
+.wijmo-wijmenu-ipod .wijmo-wijmenu-list .ui-state-default .wijmo-wijmenu-text
+{
+    color: #fafafa;
+}
+.wijmo-wijmenu-ipod .wijmo-wijmenu-list
+{
+    -moz-box-shadow: none;
+    -webkit-box-shadow: none;
+    box-shadow: none;
+}
+
+.wijmo-wijmenu .wijmo-wijsuperpanel
+{
+    background: none !important;
+}
+
+
+.wijmo-wijmenu-child .ui-state-hover .wijmo-wijmenu-text, .wijmo-wijmenu-child .ui-state-active .wijmo-wijmenu-text, .wijmo-wijmenu-child .ui-state-focus .wijmo-wijmenu-text
+{
+    color: #fafafa;
+}
+
+
+.wijmo-wijmenu-child a:hover
+{
+    color: #fafafa !important;
+}
+
+.wijmo-wijmenu-child a:focus, .wijmo-wijmenu-child a:active
+{
+    color: #fafafa !important;
+}*/
+
+.ui-progressbar-value, .ui-slider-range
+{
+    border: 1px solid #ffe475;
+    background: #ffe475 url(images/ui-bg_inset-hard_100_ffe475_1x100.png) bottom repeat-x;
+    font-weight: normal;
+    color: #fafafa;
+}
+
+.wijmo-wijsuperpanel-vbarcontainer, .wijmo-wijsuperpanel-hbarcontainer
+{
+    background: #fcfcfc;
+}
+
+.wijmo-wijsuperpanel-vbarcontainer
+{
+    -moz-box-shadow: inset 3px 0 10px rgba(0,0,0,0.10);
+    -webkit-box-shadow: inset 3px 0 10px rgba(0,0,0,0.10);
+    box-shadow: inset 3px 0 10px rgba(0,0,0,0.10);
+}
+
+
+.wijmo-wijsuperpanel-hbarcontainer
+{
+    -moz-box-shadow: inset 0 3px 10px rgba(0,0,0,0.10);
+    -webkit-box-shadow: inset 0 3px 10px rgba(0,0,0,0.10);
+    box-shadow: inset 0 3px 10px rgba(0,0,0,0.10);
+}
+
+.wijmo-wijcalendar
+{
+    display: block;
+}
+
+
+.wijmo-wijgrid .ui-state-highlight
+{
+    -moz-box-shadow: none;
+    -webkit-box-shadow: none;
+    box-shadow: none;
+    background: #a7cdf0;
+    text-shadow: none;
+    color: inherit;
+}
+
+
+.wijmo-wijgrid .wijmo-wijgrid-currency-cell
+{
+    -moz-box-shadow: none;
+    -webkit-box-shadow: none;
+    box-shadow: none;
+    background: transparent url(images/ui-bg_highlight-soft_15_333333_1x100_50.png) repeat-x scroll center top;
+    text-shadow: none;
+    color: inherit;
+    border-top: solid 1px #d3d3d3;
+}
+
+.wijmo-wijcalendar-day-selectable .ui-state-default
+{
+    background: none;
+    border: solid 1px transparent;
+    color: #404040;
+}
+
+.wijmo-wijcalendar-day-selectable .ui-state-highlight
+{
+    border: 1px solid #7186a1;
+    background: #a7cdf0;
+    color: #1e395b;
+}
+
+
+
+.wijmo-wijcalendar-day-selectable .ui-state-hover
+{
+    border: 1px solid #f3ce55;
+    background: #fef1bd url(images/ui-bg_glass_75_fef1bd_1x400.png) bottom repeat-x;
+}
+
+.wijmo-wijmenu
+{
+    background: #dae6f4 url(images/ui-bg_glass_85_dae6f4_1x400.png) 50% 50% repeat-x;
+}
+
+/*
+.wijmo-wijmenu .wij-menu-breadcrumb a
+{
+    color: #fafafa;
+    line-height: 22px;
+}*/
+
+.wijmo-wijcalendar-day-selectable .ui-state-active
+{
+    border: 1px solid #c2973f;
+    background: #ffe475 url(images/ui-bg_inset-hard_100_ffe475_1x100.png) bottom repeat-x;
+    font-weight: normal;
+}
+
+.wijmo-wijcalendar-day-selectable .ui-priority-secondary
+{
+}
+.wijmo-wijcombobox .wijmo-wijcombobox-input
+{
+    background: #f1f1f1;
+    -moz-border-radius: 2px;
+    -webkit-border-radius: 2px;
+    border-radius: 2px;
+    color: #404040;
+}
+
+.ui-expander-top .ui-expander-content
+{
+    border-top: solid 1px #A7ABB0 !important;
+}
+
+.ui-expander-right .ui-expander-content
+{
+    border-top: solid 1px #A7ABB0 !important;
+    border-right: solid 1px #A7ABB0 !important;
+    border-bottom: solid 1px #A7ABB0 !important;
+    padding: 0 1em !important;
+}
+
+.ui-expander-left .ui-expander-content
+{
+    border-top: solid 1px #A7ABB0 !important;
+    border-left: solid 1px #A7ABB0 !important;
+    border-bottom: solid 1px #A7ABB0 !important;
+    padding: 0 1em !important;
+}
+
+.ui-accordion-top .ui-accordion-content
+{
+    border-top: solid 1px #A7ABB0 !important;
+}
+
+.ui-accordion-right .ui-accordion-content
+{
+    border-top: solid 1px #A7ABB0 !important;
+    border-right: solid 1px #A7ABB0 !important;
+    border-bottom: solid 1px #A7ABB0 !important;
+    padding: 0 1em !important;
+}
+
+.ui-accordion-left .ui-accordion-content
+{
+    border-top: solid 1px #A7ABB0 !important;
+    border-left: solid 1px #A7ABB0 !important;
+    border-bottom: solid 1px #A7ABB0 !important;
+    padding: 0 1em !important;
+}
+/*
+
+.ui-tabs .ui-tabs-nav
+{
+    -moz-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.05);
+    -webkit-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.05);
+    box-shadow: inset 1px 1px 0 rgba(255,255,255,0.05);
+    border: 1px solid #404040;
+    background: #242122 url(images/ui-bg_highlight-soft_15_242122_1x100_bottom.png) 50% 50% repeat-x;
+    font-weight: normal;
+    color: #fafafa;
+}
+*/
+.wijmo-wijgrid .wijmo-wijcombobox-wrapper .wijmo-wijcombobox-input
+{
+    -moz-border-radius: 0;
+    -webkit-border-radius: 0;
+    border-radius: 0;
+}
+
+.wijmo-wijgrid .wijmo-wijcombobox-wrapper
+{
+    background: none;
+}
+
+.wijmo-wijgrid .ui-input-spinner-right .wijmo-wijinput-spinup
+{
+    -moz-border-radius: 0;
+    -webkit-border-radius: 0;
+    border-radius: 0;
+}
+
+.wijmo-wijgrid .ui-input-spinner-right .wijmo-wijinput-spindown
+{
+    -moz-border-radius: 0;
+    -webkit-border-radius: 0;
+    border-radius: 0;
+}
+
+.ui-datepicker-group .ui-datepicker-header
+{
+    -moz-border-radius: 0;
+    border: none;
+}
+
+.ui-datepicker-group .ui-datepicker-header .ui-datepicker-title
+{
+    -moz-box-shadow: none;
+    -webkit-box-shadow: none;
+    box-shadow: none;
+}
+
+.ui-datepicker-group-first .ui-datepicker-header
+{
+    -moz-border-radius-topleft: 2px;
+    -webkit-border-top-left-radius: 2px;
+    border-top-left-radius: 2px;
+    -moz-border-radius-bottomleft: 2px;
+    -webkit-border-bottom-left-radius: 2px;
+    border-bottom-left-radius: 2px;
+}
+
+.ui-datepicker-group-last .ui-datepicker-header
+{
+    -moz-border-radius-topright: 2px;
+    -webkit-border-top-right-radius: 2px;
+    border-top-right-radius: 2px;
+    -moz-border-radius-bottomright: 2px;
+    -webkit-border-bottom-right-radius: 2px;
+    border-bottom-right-radius: 2px;
+}
+/*
+a.ui-button:link, a.ui-button
+{
+    color: #fafafa;
+}
+*/
+
+.wijmo-wijwizard .wijmo-wijsuperpanel
+{
+    background: none;
+    border: none;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-link .wijmo-wijmenu-icon-right
+{
+    color: #404040;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-link:hover .wijmo-wijmenu-icon-right
+{
+    color: #fafafa;
+}
+
+
+.wijmo-wijmenu .wijmo-wijmenu-link label
+{
+    color: #404040;
+}
+
+div.ui-tabs ul.ui-tabs-nav li
+{
+    border: solid 1px #849DBD;
+}
+
+
+.wijmo-wijdropdown .wijmo-dropdown .wijmo-dropdown-item.ui-state-hover, .wijmo-wijlist-ul .wijmo-wijlist-item.ui-state-hover, .wijmo-wijmenu-horizontal .wijmo-wijmenu-link.ui-state-hover
+{
+    border: solid 1px #f4d251;
+}
+
+.wijmo-wijdropdown .wijmo-dropdown .wijmo-dropdown-item.ui-state-active, .wijmo-wijlist-ul .wijmo-wijlist-item.ui-state-active, .wijmo-wijmenu-horizontal .wijmo-wijmenu-link.ui-state-active, .ui-tabs .ui-tabs-nav li.ui-tabs-selected
+{
+    border: solid 1px #c2973f;
+}
+.wijmo-wijcalendar .ui-datepicker-header .ui-state-hover
+{
+    -moz-box-shadow: none;
+    -webkit-box-shadow: none;
+    box-shadow: none;
+}
+div.wijmo-wijribbon .ui-icon, .wijmo-wijribbon-abbrevicon, div.wijmo-wijribbon-simple span.ui-icon, .wijmo-wijribbon .wijmo-wijribbon-group .ui-button:hover .ui-icon, div.wijmo-wijribbon-modes span.ui-icon, .wijmo-wijribbon-group .wijmo-wijribbon-abbrevgroup:hover .ui-icon, .wijmo-wijribbon-group .wijmo-wijribbon-abbrevgroup:hover .wijmo-wijribbon-abbrevicon
+{
+    background-image: url("images/wijmo-ui-icons_000000_240x112.png");
+}
+
+.wijmo-wijinput .wijmo-wijinput-input
+{
+    color: #222;
+}
Index: sandbox/newExpressoMail/prototype/plugins/wijmo/jquery-ui.wijmo2.css
===================================================================
--- sandbox/newExpressoMail/prototype/plugins/wijmo/jquery-ui.wijmo2.css	(revision 7209)
+++ sandbox/newExpressoMail/prototype/plugins/wijmo/jquery-ui.wijmo2.css	(revision 7209)
@@ -0,0 +1,2555 @@
+/*!
+ * jQuery UI Bootstrap (0.22)
+ * http://addyosmani.github.com/jquery-ui-bootstrap
+ *
+ * Copyright 2012, Addy Osmani
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ *
+ * Portions copyright jQuery UI & Twitter Bootstrap
+ */
+
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden
+{
+    display: none;
+}
+.ui-helper-hidden-accessible
+{
+    position: absolute !important;
+    clip: rect(1px 1px 1px 1px);
+    clip: rect(1px,1px,1px,1px);
+}
+.ui-helper-reset
+{
+    margin: 0;
+    padding: 0;
+    border: 0;
+    outline: 0;
+    line-height: 1.3;
+    text-decoration: none;
+    font-size: 100%;
+    list-style: none;
+}
+.ui-helper-clearfix:before, .ui-helper-clearfix:after {
+	content: "";
+	display: table;
+}
+.ui-helper-clearfix:after {
+	clear: both;
+}
+.ui-helper-clearfix {
+	zoom: 1;
+}
+.ui-helper-zfix
+{
+    width: 100%;
+    height: 100%;
+    top: 0;
+    left: 0;
+    position: absolute;
+    opacity: 0;
+    filter: Alpha(Opacity=0);
+}
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled
+{
+    cursor: default !important;
+}
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon
+{
+    display: block;
+    text-indent: -99999px;
+    overflow: hidden;
+    background-repeat: no-repeat;
+}
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay
+{
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+}
+
+
+/*
+ * jQuery UI CSS Framework 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ *
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ctl=themeroller
+ */
+
+
+/* Component containers
+----------------------------------*/
+.ui-widget
+{
+    font-family: "Helvetica Neue" , Helvetica, Arial, sans-serif;
+    font-size: 100%;
+}
+.ui-widget .ui-widget
+{
+    font-size: 1em;
+}
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button
+{
+    font-family: "Helvetica Neue" , Helvetica, Arial, sans-serif;
+    font-size: 1em;
+}
+.ui-widget-content
+{
+    border: 1px solid #aaaaaa;
+    background: #ffffff url(images/ui-bg_glass_75_ffffff_1x400.png) 50% 50% repeat-x;
+    color: #404040;
+}
+.ui-widget-content a
+{
+    color: #404040;
+}
+.ui-widget-header
+{
+    font-weight: bold;
+    border-color: #0064cd #0064cd #003f81;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    border: 1px solid #666;
+}
+.ui-widget-header a
+{
+    color: #222222;
+}
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default
+{
+    background-color: #e6e6e6;
+    background-repeat: no-repeat;
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
+    background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+    background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
+    background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+    background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+    background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
+    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+    color: #333;
+    font-size: 13px;
+    line-height: normal;
+    border: 1px solid #ccc;
+    border-bottom-color: #bbb;
+    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+    -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+    -webkit-transition: 0.1s linear background-image;
+    -moz-transition: 0.1s linear background-image;
+    -ms-transition: 0.1s linear background-image;
+    -o-transition: 0.1s linear background-image;
+    transition: 0.1s linear background-image;
+    overflow: visible;
+}
+
+
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited
+{
+    color: #555555;
+    text-decoration: none;
+}
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus
+{
+    background-position: 0 -15px;
+    color: #333;
+    text-decoration: none;
+}
+.ui-state-hover a, .ui-state-hover a:hover
+{
+    color: #212121;
+    text-decoration: none;
+}
+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active
+{
+    border: 1px solid #aaaaaa;
+    font-weight: normal;
+    color: #212121;
+}
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited
+{
+    color: #212121;
+    text-decoration: none;
+}
+.ui-widget :active
+{
+    outline: none;
+}
+
+/* Interaction Cues
+----------------------------------*/
+
+
+.ui-state-highlight p, .ui-state-error p, .ui-state-default p
+{
+    font-size: 13px;
+    font-weight: normal;
+    line-height: 18px;
+    margin: 7px 15px;
+}
+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight
+{
+    position: relative;
+    margin-bottom: 18px;
+    color: #404040;
+    background-color: #eedc94;
+    background-repeat: repeat-x;
+    background-image: -khtml-gradient(linear, left top, left bottom, from(#fceec1), to(#eedc94));
+    background-image: -moz-linear-gradient(top, #fceec1, #eedc94);
+    background-image: -ms-linear-gradient(top, #fceec1, #eedc94);
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fceec1), color-stop(100%, #eedc94));
+    background-image: -webkit-linear-gradient(top, #fceec1, #eedc94);
+    background-image: -o-linear-gradient(top, #fceec1, #eedc94);
+    background-image: linear-gradient(top, #fceec1, #eedc94);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fceec1', endColorstr='#eedc94', GradientType=0);
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    border-color: #eedc94 #eedc94 #e4c652;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+    border-width: 1px;
+    border-style: solid;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+    -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+}
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a, .ui-widget-header .ui-state-highlight a
+{
+    color: #363636;
+}
+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error
+{
+    position: relative;
+    margin-bottom: 18px;
+    color: #ffffff;
+    border-width: 1px;
+    border-style: solid;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+    -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+    background-color: #c43c35;
+    background-repeat: repeat-x;
+    background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
+    background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
+    background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));
+    background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
+    background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
+    background-image: linear-gradient(top, #ee5f5b, #c43c35);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    border-color: #c43c35 #c43c35 #882a25;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a
+{
+    color: #cd0a0a;
+}
+.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text
+{
+    color: #cd0a0a;
+}
+.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary
+{
+    font-weight: bold;
+}
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary
+{
+    opacity: .7;
+    filter: Alpha(Opacity=70);
+    font-weight: normal;
+}
+.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled
+{
+    opacity: .35;
+    filter: Alpha(Opacity=35);
+    background-image: none;
+}
+
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon
+{
+    width: 16px;
+    height: 16px;
+    background-image: url(images/ui-icons_222222_256x240.png);
+}
+.ui-widget-content .ui-icon
+{
+    background-image: url(images/ui-icons_222222_256x240.png);
+}
+.ui-widget-header .ui-icon
+{
+    background-image: url(images/ui-icons_222222_256x240.png);
+}
+.ui-state-default .ui-icon
+{
+    background-image: url(images/ui-icons_888888_256x240.png);
+}
+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon
+{
+    background-image: url(images/ui-icons_454545_256x240.png);
+}
+.ui-state-active .ui-icon
+{
+    background-image: url(images/ui-icons_454545_256x240.png);
+}
+.ui-state-highlight .ui-icon
+{
+    background-image: url(images/ui-icons_2e83ff_256x240.png);
+}
+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon
+{
+    background-image: url(images/ui-icons_f6cf3b_256x240.png);
+}
+
+/* positioning */
+.ui-icon-carat-1-n
+{
+    background-position: 0 0;
+}
+.ui-icon-carat-1-ne
+{
+    background-position: -16px 0;
+}
+.ui-icon-carat-1-e
+{
+    background-position: -32px 0;
+}
+.ui-icon-carat-1-se
+{
+    background-position: -48px 0;
+}
+.ui-icon-carat-1-s
+{
+    background-position: -64px 0;
+}
+.ui-icon-carat-1-sw
+{
+    background-position: -80px 0;
+}
+.ui-icon-carat-1-w
+{
+    background-position: -96px 0;
+}
+.ui-icon-carat-1-nw
+{
+    background-position: -112px 0;
+}
+.ui-icon-carat-2-n-s
+{
+    background-position: -128px 0;
+}
+.ui-icon-carat-2-e-w
+{
+    background-position: -144px 0;
+}
+.ui-icon-triangle-1-n
+{
+    background-position: 0 -16px;
+}
+.ui-icon-triangle-1-ne
+{
+    background-position: -16px -16px;
+}
+.ui-icon-triangle-1-e
+{
+    background-position: -32px -16px;
+}
+.ui-icon-triangle-1-se
+{
+    background-position: -48px -16px;
+}
+.ui-icon-triangle-1-s
+{
+    background-position: -64px -16px;
+}
+.ui-icon-triangle-1-sw
+{
+    background-position: -80px -16px;
+}
+.ui-icon-triangle-1-w
+{
+    background-position: -96px -16px;
+}
+.ui-icon-triangle-1-nw
+{
+    background-position: -112px -16px;
+}
+.ui-icon-triangle-2-n-s
+{
+    background-position: -128px -16px;
+}
+.ui-icon-triangle-2-e-w
+{
+    background-position: -144px -16px;
+}
+.ui-icon-arrow-1-n
+{
+    background-position: 0 -32px;
+}
+.ui-icon-arrow-1-ne
+{
+    background-position: -16px -32px;
+}
+.ui-icon-arrow-1-e
+{
+    background-position: -32px -32px;
+}
+.ui-icon-arrow-1-se
+{
+    background-position: -48px -32px;
+}
+.ui-icon-arrow-1-s
+{
+    background-position: -64px -32px;
+}
+.ui-icon-arrow-1-sw
+{
+    background-position: -80px -32px;
+}
+.ui-icon-arrow-1-w
+{
+    background-position: -96px -32px;
+}
+.ui-icon-arrow-1-nw
+{
+    background-position: -112px -32px;
+}
+.ui-icon-arrow-2-n-s
+{
+    background-position: -128px -32px;
+}
+.ui-icon-arrow-2-ne-sw
+{
+    background-position: -144px -32px;
+}
+.ui-icon-arrow-2-e-w
+{
+    background-position: -160px -32px;
+}
+.ui-icon-arrow-2-se-nw
+{
+    background-position: -176px -32px;
+}
+.ui-icon-arrowstop-1-n
+{
+    background-position: -192px -32px;
+}
+.ui-icon-arrowstop-1-e
+{
+    background-position: -208px -32px;
+}
+.ui-icon-arrowstop-1-s
+{
+    background-position: -224px -32px;
+}
+.ui-icon-arrowstop-1-w
+{
+    background-position: -240px -32px;
+}
+.ui-icon-arrowthick-1-n
+{
+    background-position: 0 -48px;
+}
+.ui-icon-arrowthick-1-ne
+{
+    background-position: -16px -48px;
+}
+.ui-icon-arrowthick-1-e
+{
+    background-position: -32px -48px;
+}
+.ui-icon-arrowthick-1-se
+{
+    background-position: -48px -48px;
+}
+.ui-icon-arrowthick-1-s
+{
+    background-position: -64px -48px;
+}
+.ui-icon-arrowthick-1-sw
+{
+    background-position: -80px -48px;
+}
+.ui-icon-arrowthick-1-w
+{
+    background-position: -96px -48px;
+}
+.ui-icon-arrowthick-1-nw
+{
+    background-position: -112px -48px;
+}
+.ui-icon-arrowthick-2-n-s
+{
+    background-position: -128px -48px;
+}
+.ui-icon-arrowthick-2-ne-sw
+{
+    background-position: -144px -48px;
+}
+.ui-icon-arrowthick-2-e-w
+{
+    background-position: -160px -48px;
+}
+.ui-icon-arrowthick-2-se-nw
+{
+    background-position: -176px -48px;
+}
+.ui-icon-arrowthickstop-1-n
+{
+    background-position: -192px -48px;
+}
+.ui-icon-arrowthickstop-1-e
+{
+    background-position: -208px -48px;
+}
+.ui-icon-arrowthickstop-1-s
+{
+    background-position: -224px -48px;
+}
+.ui-icon-arrowthickstop-1-w
+{
+    background-position: -240px -48px;
+}
+.ui-icon-arrowreturnthick-1-w
+{
+    background-position: 0 -64px;
+}
+.ui-icon-arrowreturnthick-1-n
+{
+    background-position: -16px -64px;
+}
+.ui-icon-arrowreturnthick-1-e
+{
+    background-position: -32px -64px;
+}
+.ui-icon-arrowreturnthick-1-s
+{
+    background-position: -48px -64px;
+}
+.ui-icon-arrowreturn-1-w
+{
+    background-position: -64px -64px;
+}
+.ui-icon-arrowreturn-1-n
+{
+    background-position: -80px -64px;
+}
+.ui-icon-arrowreturn-1-e
+{
+    background-position: -96px -64px;
+}
+.ui-icon-arrowreturn-1-s
+{
+    background-position: -112px -64px;
+}
+.ui-icon-arrowrefresh-1-w
+{
+    background-position: -128px -64px;
+}
+.ui-icon-arrowrefresh-1-n
+{
+    background-position: -144px -64px;
+}
+.ui-icon-arrowrefresh-1-e
+{
+    background-position: -160px -64px;
+}
+.ui-icon-arrowrefresh-1-s
+{
+    background-position: -176px -64px;
+}
+.ui-icon-arrow-4
+{
+    background-position: 0 -80px;
+}
+.ui-icon-arrow-4-diag
+{
+    background-position: -16px -80px;
+}
+.ui-icon-extlink
+{
+    background-position: -32px -80px;
+}
+.ui-icon-newwin
+{
+    background-position: -48px -80px;
+}
+.ui-icon-refresh
+{
+    background-position: -64px -80px;
+}
+.ui-icon-shuffle
+{
+    background-position: -80px -80px;
+}
+.ui-icon-transfer-e-w
+{
+    background-position: -96px -80px;
+}
+.ui-icon-transferthick-e-w
+{
+    background-position: -112px -80px;
+}
+.ui-icon-folder-collapsed
+{
+    background-position: 0 -96px;
+}
+.ui-icon-folder-open
+{
+    background-position: -16px -96px;
+}
+.ui-icon-document
+{
+    background-position: -32px -96px;
+}
+.ui-icon-document-b
+{
+    background-position: -48px -96px;
+}
+.ui-icon-note
+{
+    background-position: -64px -96px;
+}
+.ui-icon-mail-closed
+{
+    background-position: -80px -96px;
+}
+.ui-icon-mail-open
+{
+    background-position: -96px -96px;
+}
+.ui-icon-suitcase
+{
+    background-position: -112px -96px;
+}
+.ui-icon-comment
+{
+    background-position: -128px -96px;
+}
+.ui-icon-person
+{
+    background-position: -144px -96px;
+}
+.ui-icon-print
+{
+    background-position: -160px -96px;
+}
+.ui-icon-trash
+{
+    background-position: -176px -96px;
+}
+.ui-icon-locked
+{
+    background-position: -192px -96px;
+}
+.ui-icon-unlocked
+{
+    background-position: -208px -96px;
+}
+.ui-icon-bookmark
+{
+    background-position: -224px -96px;
+}
+.ui-icon-tag
+{
+    background-position: -240px -96px;
+}
+.ui-icon-home
+{
+    background-position: 0 -112px;
+}
+.ui-icon-flag
+{
+    background-position: -16px -112px;
+}
+.ui-icon-calendar
+{
+    background-position: -32px -112px;
+}
+.ui-icon-cart
+{
+    background-position: -48px -112px;
+}
+.ui-icon-pencil
+{
+    background-position: -64px -112px;
+}
+.ui-icon-clock
+{
+    background-position: -80px -112px;
+}
+.ui-icon-disk
+{
+    background-position: -96px -112px;
+}
+.ui-icon-calculator
+{
+    background-position: -112px -112px;
+}
+.ui-icon-zoomin
+{
+    background-position: -128px -112px;
+}
+.ui-icon-zoomout
+{
+    background-position: -144px -112px;
+}
+.ui-icon-search
+{
+    background-position: -160px -112px;
+}
+.ui-icon-wrench
+{
+    background-position: -176px -112px;
+}
+.ui-icon-gear
+{
+    background-position: -192px -112px;
+}
+.ui-icon-heart
+{
+    background-position: -208px -112px;
+}
+.ui-icon-star
+{
+    background-position: -224px -112px;
+}
+.ui-icon-link
+{
+    background-position: -240px -112px;
+}
+.ui-icon-cancel
+{
+    background-position: 0 -128px;
+}
+.ui-icon-plus
+{
+    background-position: -16px -128px;
+}
+.ui-icon-plusthick
+{
+    background-position: -32px -128px;
+}
+.ui-icon-minus
+{
+    background-position: -48px -128px;
+}
+.ui-icon-minusthick
+{
+    background-position: -64px -128px;
+}
+.ui-icon-close
+{
+    background-position: -80px -128px;
+}
+.ui-icon-closethick
+{
+    background-position: -96px -128px;
+}
+.ui-icon-key
+{
+    background-position: -112px -128px;
+}
+.ui-icon-lightbulb
+{
+    background-position: -128px -128px;
+}
+.ui-icon-scissors
+{
+    background-position: -144px -128px;
+}
+.ui-icon-clipboard
+{
+    background-position: -160px -128px;
+}
+.ui-icon-copy
+{
+    background-position: -176px -128px;
+}
+.ui-icon-contact
+{
+    background-position: -192px -128px;
+}
+.ui-icon-image
+{
+    background-position: -208px -128px;
+}
+.ui-icon-video
+{
+    background-position: -224px -128px;
+}
+.ui-icon-script
+{
+    background-position: -240px -128px;
+}
+.ui-icon-alert
+{
+    background-position: 0 -144px;
+}
+.ui-icon-info
+{
+    background-position: -16px -144px;
+}
+.ui-icon-notice
+{
+    background-position: -32px -144px;
+}
+.ui-icon-help
+{
+    background-position: -48px -144px;
+}
+.ui-icon-check
+{
+    background-position: -64px -144px;
+}
+.ui-icon-bullet
+{
+    background-position: -80px -144px;
+}
+.ui-icon-radio-off
+{
+    background-position: -96px -144px;
+}
+.ui-icon-radio-on
+{
+    background-position: -112px -144px;
+}
+.ui-icon-pin-w
+{
+    background-position: -128px -144px;
+}
+.ui-icon-pin-s
+{
+    background-position: -144px -144px;
+}
+.ui-icon-play
+{
+    background-position: 0 -160px;
+}
+.ui-icon-pause
+{
+    background-position: -16px -160px;
+}
+.ui-icon-seek-next
+{
+    background-position: -32px -160px;
+}
+.ui-icon-seek-prev
+{
+    background-position: -48px -160px;
+}
+.ui-icon-seek-end
+{
+    background-position: -64px -160px;
+}
+.ui-icon-seek-start
+{
+    background-position: -80px -160px;
+}
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first
+{
+    background-position: -80px -160px;
+}
+.ui-icon-stop
+{
+    background-position: -96px -160px;
+}
+.ui-icon-eject
+{
+    background-position: -112px -160px;
+}
+.ui-icon-volume-off
+{
+    background-position: -128px -160px;
+}
+.ui-icon-volume-on
+{
+    background-position: -144px -160px;
+}
+.ui-icon-power
+{
+    background-position: 0 -176px;
+}
+.ui-icon-signal-diag
+{
+    background-position: -16px -176px;
+}
+.ui-icon-signal
+{
+    background-position: -32px -176px;
+}
+.ui-icon-battery-0
+{
+    background-position: -48px -176px;
+}
+.ui-icon-battery-1
+{
+    background-position: -64px -176px;
+}
+.ui-icon-battery-2
+{
+    background-position: -80px -176px;
+}
+.ui-icon-battery-3
+{
+    background-position: -96px -176px;
+}
+.ui-icon-circle-plus
+{
+    background-position: 0 -192px;
+}
+.ui-icon-circle-minus
+{
+    background-position: -16px -192px;
+}
+.ui-icon-circle-close
+{
+    background-position: -32px -192px;
+}
+.ui-icon-circle-triangle-e
+{
+    background-position: -48px -192px;
+}
+.ui-icon-circle-triangle-s
+{
+    background-position: -64px -192px;
+}
+.ui-icon-circle-triangle-w
+{
+    background-position: -80px -192px;
+}
+.ui-icon-circle-triangle-n
+{
+    background-position: -96px -192px;
+}
+.ui-icon-circle-arrow-e
+{
+    background-position: -112px -192px;
+}
+.ui-icon-circle-arrow-s
+{
+    background-position: -128px -192px;
+}
+.ui-icon-circle-arrow-w
+{
+    background-position: -144px -192px;
+}
+.ui-icon-circle-arrow-n
+{
+    background-position: -160px -192px;
+}
+.ui-icon-circle-zoomin
+{
+    background-position: -176px -192px;
+}
+.ui-icon-circle-zoomout
+{
+    background-position: -192px -192px;
+}
+.ui-icon-circle-check
+{
+    background-position: -208px -192px;
+}
+.ui-icon-circlesmall-plus
+{
+    background-position: 0 -208px;
+}
+.ui-icon-circlesmall-minus
+{
+    background-position: -16px -208px;
+}
+.ui-icon-circlesmall-close
+{
+    background-position: -32px -208px;
+}
+.ui-icon-squaresmall-plus
+{
+    background-position: -48px -208px;
+}
+.ui-icon-squaresmall-minus
+{
+    background-position: -64px -208px;
+}
+.ui-icon-squaresmall-close
+{
+    background-position: -80px -208px;
+}
+.ui-icon-grip-dotted-vertical
+{
+    background-position: 0 -224px;
+}
+.ui-icon-grip-dotted-horizontal
+{
+    background-position: -16px -224px;
+}
+.ui-icon-grip-solid-vertical
+{
+    background-position: -32px -224px;
+}
+.ui-icon-grip-solid-horizontal
+{
+    background-position: -48px -224px;
+}
+.ui-icon-gripsmall-diagonal-se
+{
+    background-position: -64px -224px;
+}
+.ui-icon-grip-diagonal-se
+{
+    background-position: -80px -224px;
+}
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl
+{
+    -moz-border-radius-topleft: 4px;
+    -webkit-border-top-left-radius: 4px;
+    -khtml-border-top-left-radius: 4px;
+    border-top-left-radius: 4px;
+}
+.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr
+{
+    -moz-border-radius-topright: 4px;
+    -webkit-border-top-right-radius: 4px;
+    -khtml-border-top-right-radius: 4px;
+    border-top-right-radius: 4px;
+}
+.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl
+{
+    -moz-border-radius-bottomleft: 4px;
+    -webkit-border-bottom-left-radius: 4px;
+    -khtml-border-bottom-left-radius: 4px;
+    border-bottom-left-radius: 4px;
+}
+.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br
+{
+    -moz-border-radius-bottomright: 4px;
+    -webkit-border-bottom-right-radius: 4px;
+    -khtml-border-bottom-right-radius: 4px;
+    border-bottom-right-radius: 4px;
+}
+
+
+
+/* Overlays */
+.ui-widget-overlay
+{
+    background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
+    opacity: .30;
+    filter: Alpha(Opacity=30);
+}
+.ui-widget-shadow
+{
+    margin: -8px 0 0 -8px;
+    padding: 8px;
+    background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
+    opacity: .30;
+    filter: Alpha(Opacity=30);
+    -moz-border-radius: 8px;
+    -khtml-border-radius: 8px;
+    -webkit-border-radius: 8px;
+    border-radius: 8px;
+}
+/*
+ * jQuery UI Resizable 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Resizable#theming
+ */
+.ui-resizable
+{
+    position: relative;
+}
+.ui-resizable-handle
+{
+    position: absolute;
+    font-size: 0.1px;
+    z-index: 99999;
+    display: block;
+}
+.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle
+{
+    display: none;
+}
+.ui-resizable-n
+{
+    cursor: n-resize;
+    height: 7px;
+    width: 100%;
+    top: -5px;
+    left: 0;
+}
+.ui-resizable-s
+{
+    cursor: s-resize;
+    height: 7px;
+    width: 100%;
+    bottom: -5px;
+    left: 0;
+}
+.ui-resizable-e
+{
+    cursor: e-resize;
+    width: 7px;
+    right: -5px;
+    top: 0;
+    height: 100%;
+}
+.ui-resizable-w
+{
+    cursor: w-resize;
+    width: 7px;
+    left: -5px;
+    top: 0;
+    height: 100%;
+}
+.ui-resizable-se
+{
+    cursor: se-resize;
+    width: 12px;
+    height: 12px;
+    right: 1px;
+    bottom: 1px;
+}
+.ui-resizable-sw
+{
+    cursor: sw-resize;
+    width: 9px;
+    height: 9px;
+    left: -5px;
+    bottom: -5px;
+}
+.ui-resizable-nw
+{
+    cursor: nw-resize;
+    width: 9px;
+    height: 9px;
+    left: -5px;
+    top: -5px;
+}
+.ui-resizable-ne
+{
+    cursor: ne-resize;
+    width: 9px;
+    height: 9px;
+    right: -5px;
+    top: -5px;
+}
+/*
+ * jQuery UI Selectable 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Selectable#theming
+ */
+.ui-selectable-helper
+{
+    position: absolute;
+    z-index: 100;
+    border: 1px dotted black;
+}
+/*
+ * jQuery UI Accordion 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Accordion#theming
+ */
+/* IE/Win - Fix animation bug - #4615 */
+.ui-accordion
+{
+    width: 100%;
+}
+.ui-accordion .ui-accordion-header
+{
+    cursor: pointer;
+    position: relative;
+    margin-top: 1px;
+    zoom: 1;
+    font-weight: bold;
+}
+.ui-accordion .ui-accordion-li-fix
+{
+    display: inline;
+}
+.ui-accordion .ui-accordion-header-active
+{
+    border-bottom: 0 !important;
+}
+.ui-accordion .ui-accordion-header a
+{
+    display: block;
+    font-size: 1em;
+    padding: .5em .5em .5em .7em;
+}
+.ui-accordion-icons .ui-accordion-header a
+{
+    padding-left: 2.2em;
+}
+.ui-accordion .ui-accordion-header .ui-icon
+{
+    position: absolute;
+    left: .5em;
+    top: 50%;
+    margin-top: -8px;
+}
+.ui-accordion .ui-accordion-content
+{
+    padding: 1em 2.2em;
+    border-top: 0;
+    margin-top: -2px;
+    position: relative;
+    top: 1px;
+    margin-bottom: 2px;
+    overflow: auto;
+    display: none;
+    zoom: 1;
+}
+.ui-accordion .ui-accordion-content-active
+{
+    display: block;
+}
+/*
+ * jQuery UI Autocomplete 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Autocomplete#theming
+ */
+.ui-autocomplete
+{
+    position: absolute;
+    cursor: default;
+}
+
+/* workarounds */
+* html .ui-autocomplete
+{
+    width: 1px;
+}
+/* without this, the menu expands to 100% in IE6 */
+
+/*
+ * jQuery UI Menu 1.8.16
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Menu#theming
+ */
+.ui-menu
+{
+    list-style: none;
+    padding: 2px;
+    margin: 0;
+    display: block;
+    float: left;
+}
+.ui-menu .ui-menu
+{
+    margin-top: -3px;
+}
+.ui-menu .ui-menu-item
+{
+    margin: 0;
+    padding: 0;
+    zoom: 1;
+    float: left;
+    clear: left;
+    width: 100%;
+}
+.ui-menu .ui-menu-item a
+{
+    text-decoration: none;
+    display: block;
+    padding: .2em .4em;
+    line-height: 1.5;
+    zoom: 1;
+}
+.ui-menu .ui-menu-item a.ui-state-hover, .ui-menu .ui-menu-item a.ui-state-active
+{
+    font-weight: normal;
+    background: #0064CD;
+    color: #fff;
+}
+
+
+/*
+ * jQuery UI Button 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Button#theming
+ */
+.ui-button
+{
+    cursor: pointer;
+    display: inline-block;
+    background-color: #e6e6e6;
+    background-repeat: no-repeat;
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
+    background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+    background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
+    background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+    background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+    background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
+    padding: 5px 14px 6px;
+    margin: 0;
+    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+    color: #333;
+    font-size: 13px;
+    line-height: normal;
+    border: 1px solid #ccc;
+    border-bottom-color: #bbb;
+    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+    -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+    -webkit-transition: 0.1s linear background-image;
+    -moz-transition: 0.1s linear background-image;
+    -ms-transition: 0.1s linear background-image;
+    -o-transition: 0.1s linear background-image;
+    transition: 0.1s linear background-image;
+    overflow: visible;
+}
+/* the overflow property removes extra width in IE */
+
+.ui-button-primary
+{
+    color: #ffffff;
+    background-color: #0064cd;
+    background-repeat: repeat-x;
+    background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+    background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+    background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+    background-image: linear-gradient(top, #049cdb, #0064cd);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    border-color: #0064cd #0064cd #003f81;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+
+
+
+.ui-button-success
+{
+    color: #ffffff;
+    background-color: #57a957;
+    background-repeat: repeat-x;
+    background-image: -khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957));
+    background-image: -moz-linear-gradient(top, #62c462, #57a957);
+    background-image: -ms-linear-gradient(top, #62c462, #57a957);
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957));
+    background-image: -webkit-linear-gradient(top, #62c462, #57a957);
+    background-image: -o-linear-gradient(top, #62c462, #57a957);
+    background-image: linear-gradient(top, #62c462, #57a957);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    border-color: #57a957 #57a957 #3d773d;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+
+.ui-button-error
+{
+    color: #ffffff;
+    background-color: #c43c35;
+    background-repeat: repeat-x;
+    background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
+    background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
+    background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));
+    background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
+    background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
+    background-image: linear-gradient(top, #ee5f5b, #c43c35);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    border-color: #c43c35 #c43c35 #882a25;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+
+.ui-button-icon-only
+{
+    width: 2.2em;
+}
+/* to make room for the icon, a width needs to be set here */
+button.ui-button-icon-only
+{
+}
+/* button elements seem to need a little more width */
+.ui-button-icons-only
+{
+    width: 3.4em;
+}
+button.ui-button-icons-only
+{
+    width: 3.7em;
+}
+
+/*button text element */
+
+.ui-button .ui-button-text
+{
+    display: block;
+}
+.ui-button-text-only .ui-button-text
+{
+}
+.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text
+{
+    padding: .4em;
+    text-indent: -9999999px; /*tempfix*/
+    display: none;
+}
+.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text
+{
+    padding: .4em 1em .4em 2.1em;
+}
+.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text
+{
+    padding: .4em 2.1em .4em 1em;
+}
+.ui-button-text-icons .ui-button-text
+{
+    padding-left: 2.1em;
+    padding-right: 2.1em;
+}
+/* no icon support for input elements, provide padding by default */
+/* input.ui-button { padding: .4em 1em; } */
+
+/*button icon element(s) */
+.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon
+{
+    top: 50%;
+    margin-top: -3px;
+    margin-bottom: 3px;
+}
+.ui-button-icon-only .ui-icon
+{
+    left: 50%;
+    margin-left: -8px;
+}
+.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary
+{
+    left: .5em;
+}
+.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary
+{
+    right: .5em;
+}
+.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary
+{
+    right: .5em;
+}
+
+/*button sets*/
+
+
+.ui-buttonset
+{
+    margin-right: 7px;
+}
+.ui-buttonset .ui-state-active
+{
+    color: #ffffff;
+    background-color: #0064cd;
+    background-repeat: repeat-x;
+    background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+    background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+    background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+    background-image: linear-gradient(top, #049cdb, #0064cd);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    border-color: #0064cd #0064cd #003f81;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+.ui-buttonset .ui-button
+{
+    margin-left: 0;
+    margin-right: -.4em;
+}
+
+/* workarounds */
+button.ui-button::-moz-focus-inner
+{
+    border: 0;
+    padding: 0;
+}
+/* reset extra padding in Firefox */
+
+
+
+/*
+ * jQuery UI Dialog 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Dialog#theming
+ */
+.ui-dialog
+{
+    position: absolute;
+    padding: .2em;
+    width: 300px;
+    overflow: hidden;
+}
+.ui-dialog .ui-dialog-titlebar
+{
+    /*padding: .4em 1em;*/
+    position: relative;
+    padding: 5px 15px;
+    border: 0px 0px 0px 1px solid;
+    border-color: white;
+    padding: 5px 15px;
+    font-size: 18px;
+    text-decoration: none;
+    background: none;
+    -moz-border-radius-bottomright: 0px;
+    -webkit-border-bottom-right-radius: 0px;
+    -khtml-border-bottom-right-radius: 0px;
+    -moz-border-radius-bottomleft: 0px;
+    -webkit-border-bottom-left-radius: 0px;
+    -khtml-border-bottom-left-radius: 0px;
+    border-bottom-left-radius: 0px;
+    border-bottom: 1px solid #ccc;
+}
+.ui-dialog .ui-dialog-title
+{
+    float: left;
+    color: #404040;
+    font-weight: bold;
+    margin-top: 5px;
+    margin-bottom: 5px;
+    padding: 5px;
+}
+.ui-dialog .ui-dialog-titlebar-close
+{
+    position: absolute;
+    right: .3em;
+    top: 50%;
+    width: 19px;
+    margin: -10px 0 0 0;
+    padding: 1px;
+    height: 18px;
+    font-size: 20px;
+    font-weight: bold;
+    line-height: 13.5px;
+    text-shadow: 0 1px 0 #ffffff;
+    filter: alpha(opacity=25);
+    -khtml-opacity: 0.25;
+    -moz-opacity: 0.25;
+    opacity: 0.25;
+}
+
+.ui-dialog .ui-dialog-titlebar-close span
+{
+    display: block;
+    margin: 1px;
+    text-indent: 9999px;
+}
+
+.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus
+{
+    padding: 0;
+    filter: alpha(opacity=90);
+    -khtml-opacity: 0.90;
+    -moz-opacity: 0.90;
+    opacity: 0.90;
+}
+
+.ui-dialog .ui-dialog-content
+{
+    position: relative;
+    border: 0;
+    padding: .5em 1em;
+    background: none;
+    overflow: auto;
+    zoom: 1;
+}
+
+.ui-dialog .ui-dialog-buttonpane
+{
+    text-align: left;
+    border-width: 1px 0 0 0;
+    background-image: none;
+    margin: .5em 0 0 0;
+    background-color: #f5f5f5;
+    padding: 5px 15px 5px;
+    border-top: 1px solid #ddd;
+    -webkit-border-radius: 0 0 6px 6px;
+    -moz-border-radius: 0 0 6px 6px;
+    border-radius: 0 0 6px 6px;
+    -webkit-box-shadow: inset 0 1px 0 #ffffff;
+    -moz-box-shadow: inset 0 1px 0 #ffffff;
+    box-shadow: inset 0 1px 0 #ffffff;
+    zoom: 1;
+    margin-bottom: 0;
+}
+.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset
+{
+    float: right;
+}
+.ui-dialog .ui-dialog-buttonpane button
+{
+    margin: .5em .4em .5em 0;
+    cursor: pointer;
+}
+.ui-dialog .ui-resizable-se
+{
+    width: 14px;
+    height: 14px;
+    right: 3px;
+    bottom: 3px;
+}
+.ui-draggable .ui-dialog-titlebar
+{
+    cursor: move;
+}
+
+.ui-dialog-buttonpane .ui-dialog-buttonset .ui-button
+{
+    color: #ffffff;
+    background-color: #0064cd;
+    background-repeat: repeat-x;
+    background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+    background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+    background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+    background-image: linear-gradient(top, #049cdb, #0064cd);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    border-color: #0064cd #0064cd #003f81;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+/*
+ * jQuery UI Slider 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Slider#theming
+ */
+.ui-slider
+{
+    position: relative;
+    text-align: left;
+}
+.ui-slider .ui-slider-handle
+{
+    position: absolute;
+    z-index: 2;
+    width: 1.2em;
+    height: 1.2em;
+    cursor: default;
+}
+.ui-slider .ui-slider-range
+{
+    position: absolute;
+    z-index: 1;
+    font-size: .7em;
+    display: block;
+    border: 0;
+    background-position: 0 0;
+    color: #ffffff;
+    background-color: #0064cd;
+    background-repeat: repeat-x;
+    background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+    background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+    background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+    background-image: linear-gradient(top, #049cdb, #0064cd);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    border-color: #0064cd #0064cd #003f81;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+
+.ui-slider-horizontal
+{
+    height: .8em;
+}
+.ui-slider-horizontal .ui-slider-handle
+{
+    top: -.3em;
+    margin-left: -.6em;
+}
+.ui-slider-horizontal .ui-slider-range
+{
+    top: 0;
+    height: 100%;
+}
+.ui-slider-horizontal .ui-slider-range-min
+{
+    left: 0;
+}
+.ui-slider-horizontal .ui-slider-range-max
+{
+    right: 0;
+}
+
+.ui-slider-vertical
+{
+    width: .8em;
+    height: 100px;
+}
+.ui-slider-vertical .ui-slider-handle
+{
+    left: -.3em;
+    margin-left: 0;
+    margin-bottom: -.6em;
+}
+.ui-slider-vertical .ui-slider-range
+{
+    left: 0;
+    width: 100%;
+}
+.ui-slider-vertical .ui-slider-range-min
+{
+    bottom: 0;
+}
+.ui-slider-vertical .ui-slider-range-max
+{
+    top: 0;
+}
+/*
+ * jQuery UI Tabs 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Tabs#theming
+ */
+.ui-tabs .ui-tabs-nav
+{
+    background: none;
+    border-color: #ddd;
+    border-style: solid;
+    border-width: 0 0 1px;
+}
+.ui-tabs
+{
+    position: relative;
+    padding: .2em;
+    zoom: 1;
+    border: 0px;
+}
+/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
+
+
+.ui-tabs .ui-tabs-nav li:hover, .ui-tabs .ui-tabs-nav li a:hover
+{
+    background: whiteSmoke;
+    border-bottom: 1px solid #ddd;
+    padding-bottom: 0px;
+    color: #00438A;
+}
+
+
+.ui-tabs .ui-tabs-nav
+{
+    margin: 0;
+    padding: .2em .2em 0;
+    border-bottom: 1px solid #DDD;
+}
+.ui-tabs .ui-tabs-nav li
+{
+    text-decoration: none;
+    list-style: none;
+    float: left;
+    position: relative;
+    top: 1px;
+    padding: 0px 0px 1px 0px;
+    white-space: nowrap;
+    background: none;
+    border: 0px;
+}
+
+.ui-tabs-nav .ui-state-default
+{
+    -webkit-box-shadow: 0px 0px 0px #ffffff; /* Saf3-4, iOS 4.0.2 - 4.2, Android 2.3+ */
+    -moz-box-shadow: 0px 0px 0px #ffffff; /* FF3.5 - 3.6 */
+    box-shadow: 0px 0px 0px #ffffff; /* Opera 10.5, IE9, FF4+, Chrome 6+, iOS 5 */
+}
+.ui-tabs .ui-tabs-nav li a
+{
+    float: left;
+    text-decoration: none;
+    cursor: text;
+    padding: 0 15px;
+    margin-right: 2px;
+    line-height: 34px;
+    border: 1px solid transparent;
+    -webkit-border-radius: 4px 4px 0 0;
+    -moz-border-radius: 4px 4px 0 0;
+    border-radius: 4px 4px 0 0;
+}
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected
+{
+    margin-bottom: 0;
+    padding-bottom: 0px;
+    outline: none;
+}
+
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a
+{
+    background-color: #ffffff;
+    border: 1px solid #ddd;
+    border-bottom-color: #ffffff;
+    cursor: default;
+    color: gray;
+    outline: none;
+}
+
+
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected:hover
+{
+    background: #ffffff;
+    outline: none;
+}
+
+.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a
+{
+    cursor: pointer;
+    color: #0069D6;
+    background: none;
+    font-weight: normal;
+    margin-bottom: -1px;
+}
+/* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
+.ui-tabs .ui-tabs-panel
+{
+    display: block;
+    border-width: 0;
+    padding: 1em 1.4em;
+    background: none;
+}
+.ui-tabs-panel .ui-button
+{
+    text-decoration: none;
+}
+.ui-tabs .ui-tabs-hide
+{
+    display: none !important;
+}
+
+
+/* IE fix for background inheritance from ui-widget*/
+.ui-tabs .ui-tabs-nav li
+{
+    filter: none;
+}
+
+
+
+/*
+ * jQuery UI Datepicker 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Datepicker#theming
+ */
+.ui-datepicker
+{
+    width: 17em;
+    padding: .2em .2em 0;
+    display: none;
+}
+.ui-datepicker .ui-datepicker-header
+{
+    position: relative;
+    padding: .2em 0;
+    border: 0px;
+    font-weight: bold;
+    width: 100%;
+    padding: 4px 0;
+    background-color: #f5f5f5;
+    color: #808080;
+}
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next
+{
+    position: absolute;
+    top: 2px;
+    width: 1.8em;
+    height: 1.8em;
+}
+
+.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover
+{
+    /*top: 1px;*/
+}
+.ui-datepicker .ui-datepicker-prev
+{
+    left: 2px;
+}
+.ui-datepicker .ui-datepicker-next
+{
+    right: 2px;
+}
+
+.ui-datepicker .ui-datepicker-prev-hover
+{
+    /*left:1px;*/
+}
+.ui-datepicker .ui-datepicker-next-hover
+{
+    /*right:1px;*/
+}
+
+.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span
+{
+    display: block;
+    position: absolute;
+    left: 50%;
+    margin-left: -8px;
+    top: 50%;
+    margin-top: -8px;
+}
+.ui-datepicker .ui-datepicker-title
+{
+    margin: 0 2.3em;
+    line-height: 1.8em;
+    text-align: center;
+}
+.ui-datepicker .ui-datepicker-title select
+{
+    font-size: 1em;
+    margin: 1px 0;
+}
+.ui-datepicker select.ui-datepicker-month-year
+{
+    width: 100%;
+}
+.ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year
+{
+    width: 49%;
+}
+.ui-datepicker table
+{
+    width: 100%;
+    font-size: .9em;
+    border-collapse: collapse;
+    margin: 0 0 .4em;
+}
+.ui-datepicker th
+{
+    padding: .7em .3em;
+    text-align: center;
+    font-weight: bold;
+    border: 0;
+}
+.ui-datepicker td
+{
+    border: 0;
+    padding: 1px;
+}
+.ui-datepicker td span, .ui-datepicker td a
+{
+    display: block;
+    padding: .2em;
+    text-align: right;
+    text-decoration: none;
+}
+.ui-datepicker .ui-datepicker-buttonpane
+{
+    background-image: none;
+    margin: .7em 0 0 0;
+    padding: 0 .2em;
+    border-left: 0;
+    border-right: 0;
+    border-bottom: 0;
+}
+.ui-datepicker .ui-datepicker-buttonpane button
+{
+    float: right;
+    margin: .5em .2em .4em;
+    cursor: pointer;
+    padding: .2em .6em .3em .6em;
+    width: auto;
+    overflow: visible;
+}
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current
+{
+    float: left;
+}
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi
+{
+    width: auto;
+}
+.ui-datepicker-multi .ui-datepicker-group
+{
+    float: left;
+}
+.ui-datepicker-multi .ui-datepicker-group table
+{
+    width: 95%;
+    margin: 0 auto .4em;
+}
+.ui-datepicker-multi-2 .ui-datepicker-group
+{
+    width: 50%;
+}
+.ui-datepicker-multi-3 .ui-datepicker-group
+{
+    width: 33.3%;
+}
+.ui-datepicker-multi-4 .ui-datepicker-group
+{
+    width: 25%;
+}
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header
+{
+    border-left-width: 0;
+}
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header
+{
+    border-left-width: 0;
+}
+.ui-datepicker-multi .ui-datepicker-buttonpane
+{
+    clear: left;
+}
+.ui-datepicker-row-break
+{
+    clear: both;
+    width: 100%;
+    font-size: 0em;
+}
+
+/* RTL support */
+.ui-datepicker-rtl
+{
+    direction: rtl;
+}
+.ui-datepicker-rtl .ui-datepicker-prev
+{
+    right: 2px;
+    left: auto;
+}
+.ui-datepicker-rtl .ui-datepicker-next
+{
+    left: 2px;
+    right: auto;
+}
+.ui-datepicker-rtl .ui-datepicker-prev:hover
+{
+    right: 1px;
+    left: auto;
+}
+.ui-datepicker-rtl .ui-datepicker-next:hover
+{
+    left: 1px;
+    right: auto;
+}
+.ui-datepicker-rtl .ui-datepicker-buttonpane
+{
+    clear: right;
+}
+.ui-datepicker-rtl .ui-datepicker-buttonpane button
+{
+    float: left;
+}
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current
+{
+    float: right;
+}
+.ui-datepicker-rtl .ui-datepicker-group
+{
+    float: right;
+}
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header
+{
+    border-right-width: 0;
+    border-left-width: 1px;
+}
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header
+{
+    border-right-width: 0;
+    border-left-width: 1px;
+}
+
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
+.ui-datepicker-cover
+{
+    display: none; /*sorry for IE5*/
+    display: /**/ block; /*sorry for IE5*/
+    position: absolute; /*must have*/
+    z-index: -1; /*must have*/
+    filter: mask(); /*must have*/
+    top: -4px; /*must have*/
+    left: -4px; /*must have*/
+    width: 200px; /*must have*/
+    height: 200px; /*must have*/
+}
+
+.ui-datepicker th
+{
+    font-weight: bold;
+    color: gray;
+}
+
+.ui-datepicker-today a:hover
+{
+    background-color: #808080;
+    color: #ffffff;
+}
+.ui-datepicker-today a
+{
+    background-color: #BFBFBF;
+    cursor: pointer;
+    padding: 0 4px;
+    margin-bottom: 0px;
+}
+
+
+.ui-datepicker td a
+{
+    margin-bottom: 0px;
+    border: 0px;
+}
+
+.ui-datepicker td:hover
+{
+    color: white;
+}
+
+.ui-datepicker td .ui-state-default
+{
+    border: 0px;
+    background: none;
+    margin-bottom: 0px;
+    padding: 5px;
+    color: gray;
+    text-align: center;
+    filter: none;
+}
+
+
+.ui-datepicker td .ui-state-active
+{
+    background: #BFBFBF;
+    margin-bottom: 0px;
+    font-size: normal;
+    text-shadow: 0px;
+    color: white;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+}
+
+.ui-datepicker td .ui-state-default:hover
+{
+    background: #0064cd;
+    color: white;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+}
+
+
+/*
+ * jQuery UI Progressbar 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Progressbar#theming
+ */
+.ui-progressbar
+{
+    height: 2em;
+    text-align: left;
+}
+.ui-progressbar .ui-progressbar-value
+{
+    margin: -1px;
+    height: 100%; /*this can be removed if ui-widget-header is blue*/
+    color: #ffffff;
+    background-color: #0064cd;
+    background-repeat: repeat-x;
+    background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+    background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+    background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+    background-image: linear-gradient(top, #049cdb, #0064cd);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    border-color: #0064cd #0064cd #003f81;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+
+
+
+/*** Input field styling from Bootstrap **/
+input, textarea
+{
+    -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
+    -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
+    -ms-transition: border linear 0.2s, box-shadow linear 0.2s;
+    -o-transition: border linear 0.2s, box-shadow linear 0.2s;
+    transition: border linear 0.2s, box-shadow linear 0.2s;
+    -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
+    -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
+    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
+}
+input:focus, textarea:focus
+{
+    outline: 0;
+    border-color: rgba(82, 168, 236, 0.8);
+    -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
+    -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
+    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
+}
+input[type=file]:focus, input[type=checkbox]:focus, select:focus
+{
+    -webkit-box-shadow: none;
+    -moz-box-shadow: none;
+    box-shadow: none;
+    outline: 1px dotted #666;
+}
+
+input[type="text"], input[type="password"], .ui-autocomplete-input, textarea, .uneditable-input
+{
+    display: inline-block;
+    padding: 4px;
+    font-size: 13px;
+    line-height: 18px;
+    color: #808080;
+    border: 1px solid #ccc;
+    -webkit-border-radius: 3px;
+    -moz-border-radius: 3px;
+    border-radius: 3px;
+}
+
+
+
+/**Toolbar**/
+
+.ui-toolbar
+{
+    padding: 7px 14px;
+    margin: 0 0 18px;
+    background-color: #f5f5f5;
+    background-repeat: repeat-x;
+    background-image: -khtml-gradient(linear, left top, left bottom, from(#ffffff), to(#f5f5f5));
+    background-image: -moz-linear-gradient(top, #ffffff, #f5f5f5);
+    background-image: -ms-linear-gradient(top, #ffffff, #f5f5f5);
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f5f5f5));
+    background-image: -webkit-linear-gradient(top, #ffffff, #f5f5f5);
+    background-image: -o-linear-gradient(top, #ffffff, #f5f5f5);
+    background-image: linear-gradient(top, #ffffff, #f5f5f5);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);
+    border: 1px solid #ddd;
+    -webkit-border-radius: 3px;
+    -moz-border-radius: 3px;
+    border-radius: 3px;
+    -webkit-box-shadow: inset 0 1px 0 #ffffff;
+    -moz-box-shadow: inset 0 1px 0 #ffffff;
+    box-shadow: inset 0 1px 0 #ffffff;
+}
+
+
+/***Dialog fixes**/
+
+.ui-dialog-buttonset .ui-button:nth-child(2)
+{
+    cursor: pointer;
+    display: inline-block;
+    background-color: #e6e6e6;
+    background-repeat: no-repeat;
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
+    background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+    background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
+    background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+    background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+    background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
+    padding: 5px 14px 6px;
+    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+    color: #333;
+    font-size: 13px;
+    line-height: normal;
+    border: 1px solid #ccc;
+    border-bottom-color: #bbb;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+    -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+    -webkit-transition: 0.1s linear all;
+    -moz-transition: 0.1s linear all;
+    -ms-transition: 0.1s linear all;
+    -o-transition: 0.1s linear all;
+    transition: 0.1s linear all;
+    overflow: visible;
+}
+
+
+
+/***Wijmo Theming**/
+
+div.wijmo-wijmenu
+{
+    padding: 0 20px;
+    background-color: #222;
+    background-color: #222222;
+    background-repeat: repeat-x;
+    background-image: -khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));
+    background-image: -moz-linear-gradient(top, #333333, #222222);
+    background-image: -ms-linear-gradient(top, #333333, #222222);
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));
+    background-image: -webkit-linear-gradient(top, #333333, #222222);
+    background-image: -o-linear-gradient(top, #333333, #222222);
+    background-image: linear-gradient(top, #333333, #222222);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
+    -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+    -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+}
+
+.wijmo-wijmenu .ui-state-default
+{
+    box-shadow: none;
+    color: #BFBFBF;
+}
+
+.wijmo-wijmenu .ui-state-default .wijmo-wijmenu-text
+{
+    color: #BFBFBF;
+}
+
+.wijmo-wijmenu .ui-state-hover
+{
+    background: #444;
+    background: rgba(255, 255, 255, 0.05);
+}
+
+.wijmo-wijmenu .ui-state-hover .wijmo-wijmenu-text
+{
+    color: #ffffff;
+}
+
+div.wijmo-wijmenu .ui-widget-header h3
+{
+    position: relative;
+    margin-top: 1px;
+    padding: 0;
+}
+
+.wijmo-wijmenu h3 a
+{
+    color: #FFFFFF;
+    display: block;
+    float: left;
+    font-size: 20px;
+    font-weight: 200;
+    line-height: 1;
+    margin-left: -20px;
+    margin-top: 1px;
+    padding: 8px 20px 12px;
+}
+
+.wijmo-wijmenu h3 a:hover
+{
+    background-color: rgba(255, 255, 255, 0.05);
+    color: #FFFFFF;
+    text-decoration: none;
+}
+
+.wijmo-wijmenu .ui-widget-header
+{
+    border: 0px;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-parent .wijmo-wijmenu-child
+{
+    padding: 0.3em 0;
+}
+
+div.wijmo-wijmenu .wijmo-wijmenu-item .wijmo-wijmenu-child
+{
+    background: #333;
+    border: 0;
+    margin: 0;
+    padding: 6px 0;
+    width: 160px;
+    -webkit-border-radius: 0 0 6px 6px;
+    -moz-border-radius: 0 0 6px 6px;
+    border-radius: 0 0 6px 6px;
+    -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
+    -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
+    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
+}
+
+div.wijmo-wijmenu .wijmo-wijmenu-item
+{
+    margin: 0;
+    border: 0;
+}
+
+.wijmo-wijmenu a.wijmo-wijmenu-link
+{
+    margin: 0;
+    line-height: 19px;
+    padding: 10px 10px 11px;
+    border: 0;
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+div.wijmo-wijmenu .wijmo-wijmenu-child .wijmo-wijmenu-link
+{
+    display: block;
+    float: none;
+    padding: 4px 15px;
+    width: auto;
+}
+
+div.wijmo-wijmenu .wijmo-wijmenu-child .wijmo-wijmenu-text
+{
+    float: none;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-item .wijmo-wijmenu-child .ui-state-hover
+{
+    background: #191919;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-item .wijmo-wijmenu-separator
+{
+    padding: 5px 0;
+    background-image: none;
+    background-color: #222;
+    border-top: 1px solid #444;
+    border-bottom: 0;
+    border-left: 0;
+    border-right: 0;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-item input
+{
+    -moz-transition: none 0s ease 0s;
+    background-color: rgba(255, 255, 255, 0.3);
+    border: 1px solid #111111;
+    border-radius: 4px 4px 4px 4px;
+    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset, 0 1px 0 rgba(255, 255, 255, 0.25);
+    color: rgba(255, 255, 255, 0.75);
+    font-family: "Helvetica Neue" ,Helvetica,Arial,sans-serif;
+    line-height: 1;
+    margin: 5px 10px 0 10px;
+    padding: 4px 9px;
+    width: 100px;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-item input:hover
+{
+    background-color: rgba(255, 255, 255, 0.5);
+    color: #FFFFFF;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-item input:focus
+{
+    background-color: #FFFFFF;
+    border: 0 none;
+    box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
+    color: #404040;
+    outline: 0 none;
+    padding: 5px 10px;
+    text-shadow: 0 1px 0 #FFFFFF;
+}
+
+
+.wijmo-wijmenu .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default
+{
+    text-shadow: none;
+}
+
+
+.wijmo-wijmenu .ui-state-default
+{
+    box-shadow: none;
+    color: #BFBFBF;
+    filter: none;
+}
+
+
+.wijmo-wijinput .wijmo-wijinput-input
+{
+    color: #333;
+}
Index: sandbox/newExpressoMail/prototype/plugins/wijmo/jquery.wijmo-open.2.2.0.css
===================================================================
--- sandbox/newExpressoMail/prototype/plugins/wijmo/jquery.wijmo-open.2.2.0.css	(revision 7209)
+++ sandbox/newExpressoMail/prototype/plugins/wijmo/jquery.wijmo-open.2.2.0.css	(revision 7209)
@@ -0,0 +1,2032 @@
+.ui-helper-horizontal > DIV,
+.ui-helper-horizontal > LI,
+.ui-helper-horizontal > SPAN,
+.ui-helper-horizontal > LABEL,
+.ui-helper-horizontal > H1,
+.ui-helper-horizontal > H2,
+.ui-helper-horizontal > H3,
+.ui-helper-horizontal > H4
+{
+    float: left;
+    clear: none;
+    display: block;
+}  /* WijSlider  horizontal
+----------------------------------*/
+.wijmo-wijslider-horizontal
+{
+	position: relative;
+}     
+        
+.wijmo-wijslider-horizontal .wijmo-wijslider-track
+{
+    
+}
+        
+.wijmo-wijslider-horizontal .wijmo-wijslider-decbutton
+{
+    position: absolute;
+    left: 0px;
+    right: auto;
+    cursor:pointer;
+}
+
+.wijmo-wijslider-horizontal .wijmo-wijslider-incbutton
+{
+    position: absolute;
+    left: auto;
+    right: 0px;
+    cursor:pointer;
+}
+
+  /* WijSlider  vertical
+----------------------------------*/
+.wijmo-wijslider-vertical
+{
+	position: relative;
+}     
+        
+.wijmo-wijslider-vertical .wijmo-wijslider-track
+{
+    
+}
+        
+.wijmo-wijslider-vertical .wijmo-wijslider-decbutton
+{
+    position: absolute;
+    top: 0px;
+    bottom: auto;
+    cursor:pointer;
+}
+
+.wijmo-wijslider-vertical .wijmo-wijslider-incbutton
+{
+    position: absolute;
+    top: auto;
+    bottom: 0px;
+    cursor:pointer;
+}/* WijSplitter
+----------------------------------*/
+
+.wijmo-wijsplitter-vertical
+{
+    overflow: hidden; /* fixed bug for IE6.7 */
+    position: relative;
+}
+.wijmo-wijsplitter-v-panel1
+{
+    float: left;
+    position: relative;
+}
+.wijmo-wijsplitter-v-panel1-content
+{
+    position: relative;
+}
+.wijmo-wijsplitter-v-bar
+{
+    float: left;
+    position: relative;
+    font-size: 1px;
+    width: 2px;
+    z-index: 99;
+}
+
+.wijmo-wijsplitter-vertical .ui-resizable-e
+{
+    right: -7px;
+    width: 10px;
+    z-index: 1000;
+    display: block;
+    background-color: white;
+    filter: alpha(opacity=0);
+    -moz-opacity: 0;
+    opacity: 0;
+}
+
+*html .wijmo-wijsplitter-vertical .ui-resizable-e
+{
+    right: -4px;
+}
+
+/** + html .wijmo-wijsplitter-vertical .ui-resizable-e
+{
+    right: -4px;
+}*/
+
+.wijmo-wijsplitter-v-expander
+{
+    position: absolute;
+    z-index: 999;
+}
+
+.wijmo-wijsplitter-vertical .wijmo-wijsplitter-v-panel1-expanded
+{
+    border-right: medium none;
+    overflow: hidden;
+    padding: 12px 0;
+    left: -8px;
+    width: 6px;
+    z-index: 99;
+}
+
+.wijmo-wijsplitter-vertical .wijmo-wijsplitter-v-panel1-expanded .ui-icon
+{
+    margin-left: -6px;
+}
+
+.wijmo-wijsplitter-vertical .wijmo-wijsplitter-v-panel1-collapsed
+{
+    border-left: medium none;
+    overflow: hidden;
+    padding: 12px 0;
+    right: -8px;
+    width: 6px;
+    z-index: 999;
+}
+
+.wijmo-wijsplitter-vertical .wijmo-wijsplitter-v-panel1-collapsed .ui-icon
+{
+    margin-left: -6px;
+}
+
+.wijmo-wijsplitter-vertical .wijmo-wijsplitter-v-panel2-expanded
+{
+    border-right: medium none;
+    overflow: hidden;
+    padding: 12px 0;
+    right: -8px;
+    width: 6px;
+    z-index: 999;
+}
+
+.wijmo-wijsplitter-vertical .wijmo-wijsplitter-v-panel2-expanded .ui-icon
+{
+    margin-left: -6px;
+}
+
+.wijmo-wijsplitter-vertical .wijmo-wijsplitter-v-panel2-collapsed
+{
+    border-left: medium none;
+    overflow: hidden;
+    padding: 12px 0;
+    left: -8px;
+    width: 6px;
+    z-index: 999;
+}
+
+.wijmo-wijsplitter-vertical .wijmo-wijsplitter-v-panel2-collapsed .ui-icon
+{
+    margin-left: -6px;
+}
+
+.wijmo-wijsplitter-v-panel2
+{
+    float: left;
+}
+.wijmo-wijsplitter-v-panel2-content
+{
+    position: relative;
+}
+.wijmo-wijsplitter-v-resize-helper
+{
+    border-right: dotted 1px black;
+    overflow: hidden;
+    border-bottom: dotted 0 black;
+}
+
+.wijmo-wijsplitter-horizontal
+{
+    overflow: hidden; /* fixed bug for IE6.7 */
+    position: relative;
+}
+.wijmo-wijsplitter-h-panel1
+{
+    position: relative;
+}
+.wijmo-wijsplitter-h-panel1-content
+{
+    overflow: auto;
+    position: relative;
+}
+.wijmo-wijsplitter-h-bar
+{
+    position: relative;
+    font-size: 1px;
+    height: 2px;
+    z-index: 999;
+}
+
+.wijmo-wijsplitter-horizontal .ui-resizable-s
+{
+    bottom: -7px;
+    height: 10px;
+    z-index: 1000;
+    display: block;
+    background-color: white;
+    filter: alpha(opacity=0);
+    -moz-opacity: 0;
+    opacity: 0;
+}
+
+*html .wijmo-wijsplitter-horizontal .ui-resizable-s
+{
+    bottom: -4px;
+}
+
+/** + html .wijmo-wijsplitter-horizontal .ui-resizable-s
+{
+    bottom: -4px;
+}*/
+
+.wijmo-wijsplitter-h-expander
+{
+    position: absolute;
+    z-index: 999;
+}
+
+
+.wijmo-wijsplitter-horizontal .wijmo-wijsplitter-h-panel1-expanded
+{
+    border-bottom: none;
+    height: 8px;
+    overflow: hidden;
+    padding: 0 10px;
+    top: -10px;
+    z-index: 999;
+}
+
+.wijmo-wijsplitter-horizontal .wijmo-wijsplitter-h-panel1-expanded .ui-icon
+{
+    margin-top: -4px;
+}
+
+.wijmo-wijsplitter-horizontal .wijmo-wijsplitter-h-panel1-collapsed
+{
+    border-top: none;
+    height: 8px;
+    overflow: hidden;
+    padding: 0 10px;
+    bottom: -10px;
+    z-index: 999;
+}
+
+.wijmo-wijsplitter-horizontal .wijmo-wijsplitter-h-panel1-collapsed .ui-icon
+{
+    margin-top: -4px;
+}
+
+.wijmo-wijsplitter-horizontal .wijmo-wijsplitter-h-panel2-expanded
+{
+    border-bottom: none;
+    height: 8px;
+    overflow: hidden;
+    padding: 0 10px;
+    bottom: -10px;
+    z-index: 999;
+}
+
+.wijmo-wijsplitter-horizontal .wijmo-wijsplitter-h-panel2-expanded .ui-icon
+{
+    margin-top: -4px;
+}
+
+.wijmo-wijsplitter-horizontal .wijmo-wijsplitter-h-panel2-collapsed
+{
+    border-top: none;
+    height: 8px;
+    overflow: hidden;
+    padding: 0 10px;
+    top: -10px;
+    z-index: 999;
+}
+
+.wijmo-wijsplitter-horizontal .wijmo-wijsplitter-h-panel2-collapsed .ui-icon
+{
+    margin-top: -4px;
+}
+
+.wijmo-wijsplitter-h-panel2
+{
+}
+
+.wijmo-wijsplitter-h-panel2-content
+{
+    overflow: auto;
+    position: relative;
+}
+
+.wijmo-wijsplitter-h-resize-helper
+{
+    border-bottom: dotted 1px black;
+    overflow: hidden;
+    border-right: dotted 0 black;
+}
+
+
+
+.wijmo-wijprogressbar
+{
+    moz-user-select: none;
+    text-align: left;
+    float: left;
+    position: relative;
+    overflow: hidden;
+}
+
+.wijmo-wijprogressbar .ui-progressbar-value
+{
+    position: absolute;
+    border-width: 0;
+    margin: 0;
+}
+
+div.wijmo-wijprogressbar-east
+{
+    width: 200px;
+    height: 1.1em;
+}
+div.wijmo-wijprogressbar-west
+{
+    width: 200px;
+    height: 1.1em;
+}
+div.wijmo-wijprogressbar-south
+{
+    height: 200px;
+    width: 1.1em;
+    line-height: 100%;
+}
+
+div.wijmo-wijprogressbar-north
+{
+    height: 200px;
+    width: 1.1em;
+    line-height: 100%;
+}
+
+.wijmo-wijprogressbar-east .ui-progressbar-value
+{
+    left: 0;
+    height: 100%;
+}
+.wijmo-wijprogressbar-west .ui-progressbar-value
+{
+    right: 0;
+    height: 100%;
+}
+.wijmo-wijprogressbar-south .ui-progressbar-value
+{
+    top: 0;
+    width: 100%;
+}
+
+.wijmo-wijprogressbar-north .ui-progressbar-value
+{
+    bottom: 0;
+    width: 100%;
+}
+
+.wijmo-wijprogressbar .ui-progressbar-label
+{
+    display: block;
+    position:absolute;
+    text-align: center;
+    width: 100%;
+    height:100%;
+}
+
+.wijmo-wijprogressbar .wijmo-wijprogressbar-lb-west
+{
+    left:0;
+    width:auto;
+}
+
+.wijmo-wijprogressbar .wijmo-wijprogressbar-lb-east
+{
+    right:0;
+    width:auto;
+}
+
+.wijmo-wijprogressbar .wijmo-wijprogressbar-lb-south
+{
+    bottom: 0;
+    height:auto;
+}
+
+.wijmo-wijprogressbar .wijmo-wijprogressbar-lb-north
+{
+    top: 0;
+    height:auto;
+}
+
+.wijmo-wijprogressbar-east .wijmo-wijprogressbar-lb-running,
+.wijmo-wijprogressbar-west .wijmo-wijprogressbar-lb-running
+{
+    display:inline;
+    width:auto;
+}
+
+.wijmo-wijprogressbar-north .wijmo-wijprogressbar-lb-running,
+.wijmo-wijprogressbar-south .wijmo-wijprogressbar-lb-running
+{
+    height:auto;
+}
+
+.wijmo-wijprogressbar-north .ui-progressbar-label,
+.wijmo-wijprogressbar-south .ui-progressbar-label
+{
+    -webkit-transform: rotate(-90deg);
+    -moz-transform: rotate(-90deg);
+}.wijmo-wijdialog-captionbutton
+{
+    height: 18px;
+    padding: 1px;
+    width: 19px;
+    display: inline-block; /*margin-right:.2em;*/
+    outline: none;
+    text-align: left;
+}
+.wijmo-wijdialog-captionbutton:hover, .wijmo-wijdialog-captionbutton .ui-state-focus
+{
+    padding: 0;
+}
+.wijmo-wijdialog-captionbutton .ui-icon
+{
+    margin: 1px;
+}
+.wijmo-wijdialog .wijmo-wijdialog-hasframe
+{
+    padding: 0;
+}
+.wijmo-wijdialog-defaultdockingzone
+{
+    position: fixed;
+    bottom: 0px;
+    left: 0px;
+}
+
+.ui-dialog-titlebar
+{
+    /* extend jquery.ui.dialog.css*/
+    text-align: right;
+}
+
+/* for ie 6 minimize*/
+* html .wijmo-wijdialog-defaultdockingzone .ui-dialog-titlebar
+{
+    float: left;
+}
+/*.wijmo-wijaccordion.ui-helper-horizontal > .ui-widget-content
+{
+    width: 200px;
+    height: 200px;  
+    padding-top:0;
+    padding-bottom:0;  
+    margin-top:0;
+    margin-bottom:0;    
+}
+
+.wijmo-wijaccordion.ui-helper-horizontal > .ui-accordion-header
+{
+    height: 200px;	
+    padding-top:0;
+    padding-bottom:0;
+    margin-top:0;
+    margin-bottom:0;    
+}*/
+
+
+.ui-accordion a
+{
+    outline: none;
+}
+
+/* RIGHT */
+
+.ui-accordion-right .ui-accordion-header
+{
+    margin-top: 0;
+    margin-left: 1px;
+    width: 2em;
+    height: 12em;
+    overflow: hidden;
+}
+
+.ui-accordion-right .ui-accordion-content
+{
+    margin: 0;
+    height: 200px;
+    width: 36em;
+    height: 12em;
+    padding: 0 2.2em;
+}
+.ui-accordion-right .ui-accordion-content
+{
+    top: 0;
+    margin-left: -2px;
+    padding: 1px;
+    border: none;
+}
+
+
+.ui-accordion-right .ui-state-active
+{
+    border-right: none;
+}
+
+.ui-accordion-right .ui-accordion-header a
+{
+    padding: 2.2em 0 0 0;
+    text-align: center;
+}
+
+
+.ui-accordion-right .ui-accordion-header .ui-icon
+{
+    top: 10%;
+}
+
+
+/* LEFT */
+
+.ui-accordion-left .ui-accordion-header
+{
+    margin-top: 0;
+    margin-right: 1px;
+    width: 2em;
+    height: 12em;
+    overflow: hidden;
+}
+
+.ui-accordion-left .ui-accordion-content
+{
+    margin: 0;
+    height: 200px;
+    width: 36em;
+    height: 12em;
+    padding: 0 2.2em;
+}
+.ui-accordion-left .ui-accordion-content
+{
+    border: none;
+    padding: 1px;
+    top: 0;
+    margin-right: -2px;
+}
+
+
+.ui-accordion-left .ui-state-active
+{
+    border-left: none;
+}
+
+.ui-accordion-left .ui-accordion-header a
+{
+    padding: 2.2em 0 0 0;
+    text-align: center;
+}
+
+
+.ui-accordion-left .ui-accordion-header .ui-icon
+{
+    top: 10%;
+}
+/* SuperPanel
+----------------------------------*/
+.wijmo-wijsuperpanel
+{
+    overflow: hidden;
+    outline: none;
+    background-image: none;
+}
+.wijmo-wijsuperpanel-statecontainer
+{
+    overflow: hidden;
+    position: relative;
+    zoom:1;
+}
+.wijmo-wijsuperpanel-contentwrapper
+{
+    position: absolute;
+    overflow: hidden;
+
+}
+.wijmo-wijsuperpanel-hbarcontainer, .wijmo-wijsuperpanel-vbarcontainer
+{
+    font-size: 0px;
+    border:0;
+}
+.wijmo-wijsuperpanel-templateouterwrapper
+{
+    position: relative; 
+/*    overflow:auto; */
+    zoom: 1;
+}
+
+.wijmo-wijsuperpanel-vbarcontainer .ui-state-default, .wijmo-wijsuperpanel-hbarcontainer .ui-state-default
+{
+    width: 16px;
+    height: 16px;
+    position: absolute;
+}
+.wijmo-wijsuperpanel .wijmo-wijsuperpanel-vbarcontainer
+{
+    position: absolute;
+    width: 18px;
+    padding-top: 18px;
+    padding-bottom: 18px;
+    border: none;
+}
+.wijmo-wijsuperpanel .wijmo-wijsuperpanel-hbarcontainer
+{
+    position: absolute;
+    height: 18px;
+    padding-left: 18px;
+    padding-right: 18px;
+    border: none;
+}
+.wijmo-wijsuperpanel-handle
+{
+    position: absolute;
+    font-size:0px;
+    overflow:hidden;
+}
+.wijmo-wijsuperpanel-handle *
+{
+    font-size:0px;
+}
+.wijmo-wijsuperpanel-helper
+{
+    border-style: dotted;
+    background: transparent;
+}
+
+.wijmo-wijsuperpanel-button
+{
+    position: absolute;
+    padding: 4px;
+}
+.wijmo-wijsuperpanel .ui-icon-gripsmall-diagonal-se
+{
+    background: none;
+    width: 7px;
+    height: 7px;
+}
+.wijmo-wijsuperpanel-hbar-buttonleft
+{
+    left: 0;
+}
+.wijmo-wijsuperpanel-hbar-buttonright
+{
+    right: 0;
+}
+.wijmo-wijsuperpanel-vbar-buttontop
+{
+    top: 0;
+}
+.wijmo-wijsuperpanel-vbar-buttonbottom
+{
+    bottom: 0;
+}
+.wijmo-wijtextbox
+{
+	outline:none;
+	margin: 0;
+	padding:5px;
+}
+
+.wijmo-wijdropdown
+{
+    display: inline-block;
+    position: relative;
+    width: auto;
+    zoom: 1;
+    *display: inline;
+    width:200px;
+    /*z-index: 101;*/
+}
+
+
+
+
+.wijmo-wijdropdown div.wijmo-dropdown-trigger
+{
+    border-right: none;
+    border-top: none;
+    border-bottom: none;
+    cursor: pointer;
+    width: 16px;
+    height: 100%;
+    position: absolute;
+    right: 0;
+    top: 0;
+    padding: 0 3px;
+}
+
+.wijmo-wijdropdown .wijmo-dropdown-trigger .ui-icon
+{
+    margin-top: 3px;
+}
+
+.wijmo-wijdropdown label.wijmo-dropdown-label
+{
+    display: block;
+    padding: 5px 26px 5px 5px;
+    width: auto;
+    border: none;
+}
+
+.wijmo-wijdropdown .wijmo-dropdown
+{
+    position: absolute; height:250px;
+}
+
+.wijmo-wijdropdown .wijmo-dropdown .wijmo-dropdown-list
+{
+    padding: 0.4em;
+    border: 0 none;
+}
+
+.wijmo-wijdropdown .wijmo-dropdown .wijmo-dropdown-item
+{
+border:1px solid transparent;
+cursor:pointer;
+font-weight:normal;
+margin:1px 0;
+padding:3px 5px;
+text-align:left;
+*border-color: white;
+*filter: chroma(color=white);
+
+}
+
+/*
+.wijmo-wijdropdown .wijmo-dropdown .wijmo-dropdown-optgroup .wijmo-dropdown-items
+{
+    margin-left: 15%;
+}*/
+
+.wijmo-wijdropdown .wijmo-dropdown .wijmo-dropdown-optgroup .wijmo-dropdown-items li
+{
+    padding-left: 10px;
+}
+
+.wijmo-wijdropdown .wijmo-dropdown .wijmo-optgroup-header
+{
+    font-style: italic;
+}
+.wijmo-checkbox
+{
+    position: relative; /*float: left;*/
+    margin: 3px 0;
+    line-height: 16px;
+    display: block;
+}
+.wijmo-checkbox .wijmo-checkbox-inputwrapper
+{
+    width: 0;
+    height: 0;
+    overflow: hidden;
+}
+.wijmo-checkbox label
+{
+    display: block;
+    position: relative;
+    margin: 0;
+    cursor: pointer;
+    z-index: 1;
+    padding: 0 0 0 1.4em;
+    outline: none;
+    margin: 0 3px;
+}
+.wijmo-checkbox .wijmo-checkbox-box
+{
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    width: 16px;
+    height: 16px;
+    -moz-border-radius: 2px;
+    -webkit-border-radius: 2px;
+    border-radius: 2px;
+    margin-right: 3px;
+}
+
+.wijmo-checkbox .wijmo-checkbox-relative
+{
+    position: relative;
+    float: left;
+    margin-right: 3px;    
+}
+.wijmo-wijradio
+{
+    position: relative; /*float: left;*/
+    margin: 3px 0;
+    line-height: 16px;
+    display: block;
+}
+.wijmo-wijradio .wijmo-wijradio-inputwrapper
+{
+    width: 0;
+    height: 0;
+    overflow: hidden;
+}
+.wijmo-wijradio label
+{
+    display: block;
+    position: relative;
+    margin: 0;
+    cursor: pointer;
+    z-index: 1;
+    padding: 0 0 0 1.4em;
+    outline: none;
+    margin: 0 3px;
+}
+.wijmo-wijradio .wijmo-wijradio-box
+{
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    width: 16px;
+    height: 16px;
+    line-height: 16px;
+    -moz-border-radius: 10px;
+    -webkit-border-radius: 10px;
+    border-radius: 10px;
+}
+.wijmo-wijradio .wijmo-wijradio-relative
+{
+    position: relative;
+    float: left;
+    margin-right: 3px;   
+}
+
+.wijmo-wijlist-list
+{
+    cursor: default;
+    overflow: hidden;
+}
+.wijmo-wijlist-ul
+{
+    list-style: none;
+    padding: 2px;
+    margin: 0;
+    display: block;
+    border: 0px;
+    overflow: hidden;
+}
+.wijmo-wijlist-ul .wijmo-wijlist-item
+{
+    margin: 1px 0;
+    padding: 3px 5px;
+    /*white-space: nowrap;*/
+    cursor: pointer;
+    text-align: left;
+    font-weight: normal;
+    border: solid 1px transparent;
+}
+.wijmo-wijlist-ul .wijmo-wijlist-item.ui-state-hover
+{
+    font-weight: normal;
+}
+
+.wijmo-wijlist .ui-resizable-se
+{
+    width: 7px;
+    height: 7px;
+    background: none;
+}
+.wijmo-wijcalendar
+{
+    -webkit-user-select: none;
+    -moz-user-select: none;
+    display:block;
+}
+
+.wijmo-wijcalendar-header
+{
+    position: relative;
+}
+
+.wijmo-wijcalendar-header-inner
+{
+    margin: 0 1.8em;
+    line-height: 1.8em;
+}
+
+.wijmo-wijcalendar .ui-datepicker-header
+{
+    padding: 1px;
+}
+
+.wijmo-wijcalendar .ui-datepicker-header .ui-state-default
+{
+    border-color: transparent;
+    background: none;
+    color: inherit;
+}
+
+.wijmo-wijcalendar .wijmo-wijcalendar-table
+{
+    table-layout: fixed;
+}
+
+.wijmo-wijcalendar-prevpreview-button, .wijmo-wijcalendar-nextpreview-button
+{
+    width: 16px;
+    margin-top: 35%;
+    float: left;
+}
+
+.wijmo-wijcalendar-nextpreview-button
+{
+    float: right;
+}
+
+.wijmo-wijcalendar-preview-wrapper .wijmo-wijcalendar
+{
+    float: left;
+    width: 18em;
+}
+
+.wijmo-wijcalendar-preview-wrapper .wijmo-wijcalendar .ui-datepicker-calendar
+{
+    width: 80%;
+    float: left;
+}
+
+.wijmo-wijcalendar-title, .wijmo-wijcalendar-selectable
+{
+    cursor: pointer;
+}
+
+.ui-datepicker-other-month
+{
+    text-align: right;
+}
+
+.wijmo-wijcalendar-mygrid td span, .wijmo-wijcalendar-mygrid td a
+{
+    display: block;
+    text-align: center;
+    text-decoration: none;
+    padding: 0;
+}
+
+.wijmo-wijcalendar-mygrid .ui-state-default a, .wijmo-wijcalendar-mygrid .ui-state-default a:hover, .wijmo-wijcalendar-mygrid .ui-state-hover a, .wijmo-wijcalendar-mygrid .ui-state-hover a:hover
+{
+    color: inherit;
+}
+
+.ui-header-custom img, .ui-footer-custom img
+{
+    width: 100%;
+}
+
+.wijmo-wijcalendar table.wijmo-wijcalendar-mygrid
+{
+    margin-top: 2px;
+    border-collapse: separate;
+    table-layout: fixed;
+}
+
+.wijmo-wijcalendar table.wijmo-wijcalendar-mygrid .ui-datepicker-week-day
+{
+    cursor: pointer;
+}
+
+.wijmo-wijcalendar-aniwrapper
+{
+    position: relative;
+    left: 0;
+    top: 0;
+}
+
+.wijmo-wijcalendar-multi-aniwrapper
+{
+    position: absolute;
+    overflow: hidden;
+}
+
+.ui-datepicker-rtl .ui-datepicker-prev .ui-icon, .ui-datepicker-rtl .ui-datepicker-next .ui-icon
+{
+    direction: rtl;
+}
+.wijmo-wijexpander
+{
+    margin: 1px;
+    padding: 0;
+    display: block;
+}
+
+.wijmo-wijexpander a
+{
+    outline: none;
+}
+
+.wijmo-wijexpander .ui-expander-header
+{
+    cursor: pointer;
+    margin-top: 1px;
+    position: relative;
+}
+/*.wijmo-wijexpander.ui-helper-horizontal > .ui-expander-header
+{
+    cursor: pointer;
+    width: 20px;
+    height: 200px;
+}
+.wijmo-wijexpander.ui-state-disabled > .ui-expander-header
+{
+    cursor: default;
+}
+.wijmo-wijexpander > .ui-widget-content
+{
+    height: 100px;
+    overflow: auto;
+}
+.wijmo-wijexpander.ui-state-disabled > .ui-widget-content
+{
+}*/
+
+
+.ui-expander .ui-expander-content
+{
+    border-top: 0 none;
+    display: none;
+    margin-bottom: 2px;
+    margin-top: -2px;
+    overflow: auto;
+    padding: 1em 2.2em;
+    position: relative;
+    top: 1px;
+}
+
+
+.wijmo-wijexpander .ui-expander-header a
+{
+    display: block;
+    font-size: 1em;
+    padding: 0.5em 0.5em 0.5em 0.7em;
+}
+
+.wijmo-wijexpander .ui-expander-header .ui-icon
+{
+    left: 0.5em;
+    margin-top: -8px;
+    position: absolute;
+    top: 50%;
+}
+
+.wijmo-wijexpander .ui-expander-content-active
+{
+    display: block;
+    border-top: 0 none;
+    padding: 1em 2.2em;
+}
+
+
+.wijmo-wijexpander .ui-expander-header > a
+{
+    padding-left: 2.2em;
+}
+
+.ui-helper-horizontal.wijmo-wijexpander .ui-expander-header .ui-icon
+{
+    left: inherit;
+    margin-top: inherit;
+    margin-left: -8px;
+    position: absolute;
+    top: 0.5em;
+    left: 50%;
+}
+
+.ui-helper-horizontal.wijmo-wijexpander .ui-expander-header > a
+{
+    padding-left: inherit;
+    padding-top: 2.2em;
+    display: inline-block;
+}
+
+
+/* RIGHT */
+
+.ui-expander-right .ui-expander-header
+{
+    margin: 0 1px;
+    width: 2em;
+    height: 12em;
+    overflow: hidden;
+}
+
+.ui-expander-right .ui-expander-content
+{
+    margin: 0;
+    height: 200px;
+    width: 12em;
+    height: 12em;
+    padding: 0 2.2em;
+}
+.ui-expander-right .ui-expander-content
+{
+    top: 0;
+    margin-left: -2px;
+    padding: 1px;
+    border: none;
+    margin-right: 1px;
+}
+
+
+.ui-expander-right .ui-state-active
+{
+    border-right: none;
+}
+
+.ui-expander-right .ui-expander-header a
+{
+    padding: 2.2em 0 0 0;
+}
+
+
+.ui-expander-right .ui-expander-header .ui-icon
+{
+    top: 10%;
+}
+
+
+/* LEFT */
+
+.ui-expander-left .ui-expander-header
+{
+    margin: 0 1px;
+    width: 2em;
+    height: 12em;
+    overflow: hidden;
+}
+
+.ui-expander-left .ui-expander-content
+{
+    margin: 0;
+    height: 200px;
+    width: 12em;
+    height: 12em;
+    padding: 0 2.2em;
+}
+.ui-expander-left .ui-expander-content
+{
+    border: none;
+    padding: 1px;
+    top: 0;
+    margin-right: -2px;
+    margin-left: 1px;
+}
+
+
+.ui-expander-left .ui-state-active
+{
+    border-left: none;
+}
+
+.ui-expander-left .ui-expander-header a
+{
+    padding: 2.2em 0 0 0;
+}
+
+
+.ui-expander-left .ui-expander-header .ui-icon
+{
+    top: 10%;
+}
+
+.ui-tabs .ui-tabs-nav li
+{
+    top: 1px;
+}
+
+/* BOTTOM */
+
+.ui-tabs-bottom .ui-tabs-nav li
+{
+    top: -3px;
+    padding: 0;
+    margin: 1px .2em 0 0;
+}
+
+.ui-tabs-bottom .ui-tabs-nav li.ui-tabs-selected
+{
+    margin-top: -1px;
+    padding-bottom: 2px;
+}
+
+.ui-tabs .ui-tabs-nav li
+{
+    border: none;
+}
+
+/* LEFT */
+.ui-tabs-left .ui-tabs-nav
+{
+    float: left;
+    overflow: hidden;
+}
+
+.ui-tabs-left .ui-tabs-nav li
+{
+    white-space: normal;
+    float: right;
+    display: block;
+    width: 98%;
+}
+
+.ui-tabs-left .ui-tabs-nav li a, .ui-tabs-right .ui-tabs-nav li a
+{
+    float: none;
+    display: block;
+}
+
+.ui-tabs-left .ui-tabs-nav li
+{
+    top: -1px;
+    left: 3px;
+    margin-bottom: 2px;
+}
+
+.ui-tabs-left .ui-tabs-panel
+{
+    padding: 1.6em;
+}
+
+.ui-tabs-left .ui-tabs-nav li.ui-tabs-selected
+{
+    border-right: medium none;
+    margin-bottom: 2px;
+}
+.ui-tabs-left .ui-tabs-nav
+{
+    padding: 0.2em 0 0 0;
+}
+
+.ui-tabs-left .wijmo-wijtabs-content
+{
+    float: right;
+    width: 75%;
+    overflow: hidden;
+}
+
+.ui-tabs-left .ui-tabs-nav
+{
+    min-height: 300px;
+    width: 23%;
+    height: 100%;
+}
+
+/* RIGHT */
+
+.ui-tabs-right .ui-tabs-nav
+{
+    float: right;
+    overflow: hidden;
+}
+
+.ui-tabs-right .ui-tabs-nav li
+{
+    white-space: normal;
+    float: left;
+    display: block;
+    width: 98%;
+}
+
+.ui-tabs-right .ui-tabs-nav li
+{
+    top: -1px;
+    left: 0;
+    margin-bottom: 2px;
+}
+
+.ui-tabs-right .ui-tabs-panel
+{
+    padding: 1.6em;
+}
+
+.ui-tabs-right .ui-tabs-nav li.ui-tabs-selected
+{
+    border-left: medium none;
+    margin-bottom: 2px;
+}
+.ui-tabs-right .ui-tabs-nav
+{
+    padding: 0.2em 0 0 0;
+}
+
+.ui-tabs-right .wijmo-wijtabs-content
+{
+    float: left;
+    width: 75%;
+    overflow: hidden;
+}
+
+.ui-tabs-right .ui-tabs-nav
+{
+    min-height: 300px;
+    width: 23%;
+}
+
+
+.ui-tabs-left .ui-tabs-nav li.ui-tabs-selected
+{
+    margin-right: 2px;
+    padding-right: 1px;
+}
+
+.ui-tabs-right .ui-tabs-nav li.ui-tabs-selected
+{
+    margin-left: -1px;
+    padding-left: 1px;
+}
+.wijmo-wijtooltip
+{
+    position: absolute;
+    z-index: 9999;
+    margin: 0;
+}
+
+
+.wijmo-wijtooltip .wijmo-wijtooltip-close
+{
+    background: none repeat scroll 0 0 transparent;
+    border: medium none;
+    display: block;
+    height: 16px;
+    position: absolute;
+    right: 3px;
+    top: 3px;
+    width: 16px;
+}
+
+.wijmo-wijtooltip .wijmo-wijtooltip-title
+{
+    background: none repeat scroll 0 0 transparent;
+    border: medium none;
+    color: inherit;
+    padding: 0.4em;
+}
+.wijmo-wijtooltip .wijmo-wijtooltip-container
+{
+    padding: 1em;
+    overflow: hidden;
+}
+
+.wijmo-wijtooltip
+{
+    border-width: 2px;
+}
+
+.wijmo-wijtooltip .wijmo-wijtooltip-pointer, .wijmo-wijtooltip .wijmo-wijtooltip-pointer-inner
+{
+    background: none;
+    height: 0;
+    position: absolute;
+    width: 0;
+}
+
+.wijmo-wijtooltip-arrow-tr .wijmo-wijtooltip-pointer, .wijmo-wijtooltip-arrow-tc .wijmo-wijtooltip-pointer, .wijmo-wijtooltip-arrow-tl .wijmo-wijtooltip-pointer
+{
+    border-bottom-width: 14px;
+    border-top: 0 none;
+    top: -14px;
+}
+
+.wijmo-wijtooltip-arrow-tr .wijmo-wijtooltip-pointer
+{
+    border-left: 18px dashed transparent;
+    border-right: 0 none;
+    right: 10px;
+}
+
+.wijmo-wijtooltip-arrow-tc .wijmo-wijtooltip-pointer
+{
+    border-left: 10px dashed transparent;
+    border-right: 10px dashed transparent;
+    left: 50%;
+    margin-left: -10px;
+}
+
+.wijmo-wijtooltip-arrow-tl .wijmo-wijtooltip-pointer
+{
+    border-left: 0 none;
+    border-right: 18px dashed transparent;
+    left: 10px;
+}
+
+.wijmo-wijtooltip-arrow-tr .wijmo-wijtooltip-pointer-inner, .wijmo-wijtooltip-arrow-tc .wijmo-wijtooltip-pointer-inner, .wijmo-wijtooltip-arrow-tl .wijmo-wijtooltip-pointer-inner
+{
+    border-bottom-color: inherit;
+    border-bottom-style: solid;
+    border-bottom-width: 10px;
+    bottom: -14px;
+    font-size: 0;
+    line-height: 0;
+}
+
+.wijmo-wijtooltip-arrow-tr .wijmo-wijtooltip-pointer-inner
+{
+    border-left: 12px dashed transparent;
+    border-right: 0 none;
+    right: 2px;
+}
+
+.wijmo-wijtooltip-arrow-tc .wijmo-wijtooltip-pointer-inner
+{
+    border-left: 8px dashed transparent;
+    border-right: 8px dashed transparent;
+    left: -8px;
+}
+
+.wijmo-wijtooltip-arrow-tl .wijmo-wijtooltip-pointer-inner
+{
+    border-left: 0 none;
+    border-right-style: dashed;
+    border-right-color: inherit;
+    border-right-width: 12px;
+    left: 2px;
+}
+
+.wijmo-wijtooltip-arrow-rb .wijmo-wijtooltip-pointer, .wijmo-wijtooltip-arrow-rc .wijmo-wijtooltip-pointer, .wijmo-wijtooltip-arrow-rt .wijmo-wijtooltip-pointer
+{
+    border-left-width: 14px;
+    border-right: 0 none;
+    right: -14px;
+}
+
+.wijmo-wijtooltip-arrow-rb .wijmo-wijtooltip-pointer
+{
+    border-bottom: 0 none;
+    border-top: 18px dashed transparent;
+    bottom: 10px;
+}
+
+.wijmo-wijtooltip-arrow-rc .wijmo-wijtooltip-pointer
+{
+    border-bottom: 10px dashed transparent;
+    border-top: 10px dashed transparent;
+    bottom: 50%;
+    margin-bottom: -10px;
+}
+
+.wijmo-wijtooltip-arrow-rt .wijmo-wijtooltip-pointer
+{
+    border-bottom: 18px dashed transparent;
+    border-top: 0 none;
+    top: 10px;
+}
+
+.wijmo-wijtooltip-arrow-rb .wijmo-wijtooltip-pointer-inner, .wijmo-wijtooltip-arrow-rc .wijmo-wijtooltip-pointer-inner, .wijmo-wijtooltip-arrow-rt .wijmo-wijtooltip-pointer-inner
+{
+    border-left-color: inherit;
+    border-left-style: solid;
+    border-left-width: 10px;
+    left: -14px;
+    font-size: 0;
+    line-height: 0;
+}
+
+
+.wijmo-wijtooltip-arrow-rb .wijmo-wijtooltip-pointer-inner
+{
+    border-bottom: 0 none;
+    border-top-style: dashed;
+    border-top-color: inherit;
+    border-top-width: 12px;
+    bottom: 2px;
+}
+
+.wijmo-wijtooltip-arrow-rc .wijmo-wijtooltip-pointer-inner
+{
+    border-bottom: 8px dashed transparent;
+    border-top: 8px dashed transparent;
+    bottom: -8px;
+}
+
+.wijmo-wijtooltip-arrow-rt .wijmo-wijtooltip-pointer-inner
+{
+    border-bottom-style: dashed;
+    border-bottom-color: inherit;
+    border-bottom-width: 12px;
+    border-top: 0 none;
+    top: 2px;
+}
+
+.wijmo-wijtooltip-arrow-br .wijmo-wijtooltip-pointer, .wijmo-wijtooltip-arrow-bc .wijmo-wijtooltip-pointer, .wijmo-wijtooltip-arrow-bl .wijmo-wijtooltip-pointer
+{
+    border-bottom: 0 none;
+    border-top-width: 14px;
+    bottom: -14px;
+}
+
+.wijmo-wijtooltip-arrow-br .wijmo-wijtooltip-pointer
+{
+    border-left: 18px dashed transparent;
+    border-right: 0 none;
+    right: 10px;
+}
+
+.wijmo-wijtooltip-arrow-bc .wijmo-wijtooltip-pointer
+{
+    border-left: 10px dashed transparent;
+    border-right: 10px dashed transparent;
+    left: 50%;
+    margin-left: -10px;
+}
+
+.wijmo-wijtooltip-arrow-bl .wijmo-wijtooltip-pointer
+{
+    border-left: 0 none;
+    border-right: 18px dashed transparent;
+    left: 10px;
+}
+
+.wijmo-wijtooltip-arrow-br .wijmo-wijtooltip-pointer-inner, .wijmo-wijtooltip-arrow-bc .wijmo-wijtooltip-pointer-inner, .wijmo-wijtooltip-arrow-bl .wijmo-wijtooltip-pointer-inner
+{
+    border-top-color: inherit;
+    border-top-style: solid;
+    border-top-width: 10px;
+    top: -14px;
+    font-size: 0;
+    line-height: 0;
+}
+
+.wijmo-wijtooltip-arrow-br .wijmo-wijtooltip-pointer-inner
+{
+    border-left: 12px dashed transparent;
+    border-right: 0 none;
+    right: 2px;
+}
+
+.wijmo-wijtooltip-arrow-bc .wijmo-wijtooltip-pointer-inner
+{
+    border-left: 8px dashed transparent;
+    border-right: 8px dashed transparent;
+    left: -8px;
+}
+
+.wijmo-wijtooltip-arrow-bl .wijmo-wijtooltip-pointer-inner
+{
+    border-left: 0 none;
+    border-right: 12px dashed transparent;
+    left: 2px;
+}
+
+.wijmo-wijtooltip-arrow-lb .wijmo-wijtooltip-pointer, .wijmo-wijtooltip-arrow-lc .wijmo-wijtooltip-pointer, .wijmo-wijtooltip-arrow-lt .wijmo-wijtooltip-pointer
+{
+    border-left: 0 none;
+    border-right-width: 14px;
+    left: -14px;
+}
+
+.wijmo-wijtooltip-arrow-lb .wijmo-wijtooltip-pointer
+{
+    border-bottom: 0 none;
+    border-top: 18px dashed transparent;
+    bottom: 10px;
+}
+
+.wijmo-wijtooltip-arrow-lc .wijmo-wijtooltip-pointer
+{
+    border-bottom: 10px dashed transparent;
+    border-top: 10px dashed transparent;
+    bottom: 50%;
+    margin-bottom: -10px;
+}
+
+.wijmo-wijtooltip-arrow-lt .wijmo-wijtooltip-pointer
+{
+    border-bottom: 18px dashed transparent;
+    border-top: 0 none;
+    top: 10px;
+}
+
+.wijmo-wijtooltip-arrow-lb .wijmo-wijtooltip-pointer-inner, .wijmo-wijtooltip-arrow-lc .wijmo-wijtooltip-pointer-inner, .wijmo-wijtooltip-arrow-lt .wijmo-wijtooltip-pointer-inner
+{
+    border-right-color: inherit;
+    border-right-style: solid;
+    border-right-width: 10px;
+    right: -14px;
+    font-size: 0;
+    line-height: 0;
+}
+
+.wijmo-wijtooltip-arrow-lb .wijmo-wijtooltip-pointer-inner
+{
+    border-bottom: 0 none;
+    border-top: 12px dashed transparent;
+    bottom: 2px;
+}
+
+.wijmo-wijtooltip-arrow-lc .wijmo-wijtooltip-pointer-inner
+{
+    border-bottom: 8px dashed transparent;
+    border-top: 8px dashed transparent;
+    bottom: -8px;
+}
+
+.wijmo-wijtooltip-arrow-lt .wijmo-wijtooltip-pointer-inner
+{
+    border-bottom-style: dashed;
+    border-bottom-color: inherit;
+    border-bottom-width: 12px;
+    border-top: 0 none;
+    top: 2px;
+}
+.wijmo-wijmenu {
+width:150px;
+padding:0.3em;
+position:relative;
+}
+
+.wijmo-wijmenu .wijmo-wijsuperpanel {
+border:none;
+background: inherit;
+padding:0;
+}
+
+.wijmo-wijmenu-list {
+position:static;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-parent .wijmo-wijmenu-child {
+display:none;
+width:150px;
+padding:0.3em;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-parent {
+position:relative;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-child {
+position:relative;
+left:150px;
+top:0;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-item {
+width:100%;
+float:left;
+clear:both;
+margin:1px 0;
+padding:0;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-rtl .wijmo-wijmenu-item {
+	float: right;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-list .wijmo-wijmenu-item {
+background:none;
+border:none;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-link {
+display:block;
+width:92%;
+outline:none;
+text-decoration:none;
+font-weight:400;
+border:solid 1px transparent;
+float:left;
+line-height:16px;
+padding:0.3em;
+}
+
+.wijmo-wijmenu-horizontal {
+width:auto;
+}
+
+.wijmo-wijmenu-horizontal .wijmo-wijmenu-item {
+width:auto;
+clear:none;
+margin-right:3px;
+}
+
+.wijmo-wijmenu-horizontal .wijmo-wijmenu-child .wijmo-wijmenu-item {
+width:100%;
+}
+
+.wijmo-wijmenu-horizontal .wijmo-wijmenu-child {
+top:25px;
+left:0;
+}
+
+.wijmo-wijmenu-horizontal .wijmo-wijmenu-link {
+width:auto;
+padding:0.4em 0.3em;
+}
+
+.wijmo-wijmenu-horizontal .wijmo-wijmenu-child .wijmo-wijmenu-link {
+width:92%;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-list .ui-widget-header {
+clear:both;
+float:left;
+width:98%;
+margin:1px 0;
+}
+
+.wijmo-wijmenu-horizontal .wijmo-wijmenu-list .ui-widget-header
+{
+	width: auto;
+	clear: none;
+	margin: -1px 2px -2px 1px;
+}
+.wijmo-wijmenu-horizontal .wijmo-wijmenu-child .ui-widget-header
+{
+	width: 98%;
+	margin: 1px 0;
+}
+
+
+.wijmo-wijmenu-horizontal .ui-widget-header {
+clear:none;
+width:auto;
+margin:0 3px 0 0;
+}
+
+.wijmo-wijmenu .ui-widget-header h1,.wijmo-wijmenu .ui-widget-header h2,.wijmo-wijmenu .ui-widget-header h3,.wijmo-wijmenu .ui-widget-header h4,.wijmo-wijmenu .ui-widget-header h5,.wijmo-wijmenu .ui-widget-header h6 {
+float:left;
+display:block;
+font-size:1em;
+margin:0 auto;
+padding:0.3em 3%;
+}
+
+.wijmo-wijmenu-horizontal .ui-widget-header h1,.wijmo-wijmenu-horizontal .ui-widget-header h2,.wijmo-wijmenu-horizontal .ui-widget-header h3,.wijmo-wijmenu-horizontal .ui-widget-header h4,.wijmo-wijmenu-horizontal .ui-widget-header h5,.wijmo-wijmenu-horizontal .ui-widget-header h6 {
+padding:0.4em 0.3em;
+}
+
+.wijmo-wijmenu a.ui-state-default:link,.wijmo-wijmenu a.ui-state-default:visited,.wijmo-wijmenu a.ui-state-default:hover,.wijmo-wijmenu a.ui-state-default:active,.wijmo-wijmenu a.ui-state-hover:link,.wijmo-wijmenu a.ui-state-hover:visited,.wijmo-wijmenu a.ui-state-hover:hover,.wijmo-wijmenu a.ui-state-hover:active,.wijmo-wijmenu a.ui-state-active:link,.wijmo-wijmenu a.ui-state-active:visited,.wijmo-wijmenu a.ui-state-active:hover,.wijmo-wijmenu a.ui-state-active:active {
+font-weight:400;
+border-style:solid;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-child .ui-state-hover {
+font-weight:400;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-separator {
+clear:both;
+float:left;
+height:1px;
+text-indent:-9999px;
+width:98%;
+margin:1px 0;
+font-size:0;
+}
+
+.wijmo-wijmenu-horizontal .wijmo-wijmenu-separator {
+height:auto;
+clear:none;
+width:1px;
+text-indent:-9999px;
+margin:0 3px 0 0;
+padding:0.4em 0;
+}
+
+.wijmo-wijmenu-horizontal .wijmo-wijmenu-child .wijmo-wijmenu-separator {
+clear:both;
+float:left;
+height:1px;
+text-indent:-9999px;
+width:98%;
+margin:1px 0;
+padding:0;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-group {
+clear:both;
+float:left;
+width:98%;
+margin:3px 0;
+padding:0 0.4em;
+}
+
+.wijmo-wijmenu-ipod {
+width:180px;
+}
+
+.wijmo-wijmenu-container {
+overflow:hidden;
+}
+
+.wijmo-wijmenu-ipod .wijmo-wijmenu-list {
+background:inherit;
+position:absolute;
+border-width:0;
+-moz-box-shadow: none;
+-webkit-box-shadow:none;
+}
+
+.wijmo-wijmenu-breadcrumb {
+margin:0;
+padding:0;
+}
+
+.wijmo-wijmenu-footer {
+margin-top:3px;
+line-height: 22px;
+}
+
+.wijmo-wijmenu-footer .ui-icon {
+margin:3px 0;
+}
+
+.wijmo-wijmenu-header {
+margin-bottom:3px;
+}
+
+.wijmo-wijmenu-breadcrumb li {
+float:left;
+list-style:none;
+font-size:.9em;
+margin:0;
+padding:0 .2em;
+}
+
+.wijmo-wijmenu-breadcrumb li.wijmo-wijmenu-prev-list,.wijmo-wijmenu-breadcrumb li.wijmo-wijmenu-current-crumb {
+clear:left;
+float:none;
+opacity:1;
+}
+
+.wijmo-wijmenu-breadcrumb li.wijmo-wijmenu-current-crumb {
+padding-top:.2em;
+}
+
+.wijmo-wijmenu-footer a:link,.wijmo-wijmenu-footer a:visited {
+float:left;
+width:100%;
+text-decoration:none;
+}
+
+.wijmo-wijmenu-footer a span {
+float:left;
+cursor:pointer;
+}
+
+.wijmo-wijmenu-breadcrumb .wijmo-wijmenu-prev-list a:link,.wijmo-wijmenu-breadcrumb .wijmo-wijmenu-prev-list a:visited,.wijmo-wijmenu-breadcrumb .wijmo-wijmenu-prev-list a:hover,.wijmo-wijmenu-breadcrumb .wijmo-wijmenu-prev-list a:active {
+background-image:none;
+text-decoration:none;
+}
+
+.wijmo-wijmenu-breadcrumb .wijmo-wijmenu-prev-list a {
+float:left;
+padding-right:.4em;
+}
+
+.wijmo-wijmenu-breadcrumb .wijmo-wijmenu-current-crumb a:link,.wijmo-wijmenu-breadcrumb .wijmo-wijmenu-current-crumb a:visited,.wijmo-wijmenu-breadcrumb .wijmo-wijmenu-current-crumb a:hover,.wijmo-wijmenu-breadcrumb .wijmo-wijmenu-current-crumb a:active {
+display:block;
+background-image:none;
+font-size:1.3em;
+text-decoration:none;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-parent .ui-icon,.wijmo-wijmenu-horizontal .wijmo-wijmenu-child .ui-icon,.wijmo-wijmenu-ipod .ui-icon-triangle-1-e {
+float:right;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-item .wijmo-wijmenu-text,.wijmo-wijmenu-horizontal .wijmo-wijmenu-parent .ui-icon,.wijmo-wijmenu-breadcrumb a,.wijmo-wijmenu-breadcrumb span,.wijmo-wijmenu-breadcrumb .wijmo-wijmenu-prev-list a .ui-icon {
+float:left;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-rtl .ui-icon-triangle-1-w
+{
+	float: left;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-rtl .wijmo-wijmenu-item .wijmo-wijmenu-text
+{
+	float: right;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-link .wijmo-wijmenu-icon-left {
+display:inline-block;
+float:left;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-link .wijmo-wijmenu-icon-right {
+display:inline-block;
+float:right;
+}.wijmo-wijvideo
+{
+    font-size: 12px;
+    position: relative;
+}
+
+.wijmo-wijvideo .wijmo-wijvideo-timer
+{
+    font-size: 12px;
+}
+
+.wijmo-wijvideo .wijmo-wijvideo-controls
+{
+    display: none;
+    border-right: none;
+    border-left: none;
+    border-bottom: none;
+}
+.wijmo-wijvideo-container-fullscreen
+{ 
+	position: absolute;
+	left: 0;
+	top: 0;
+	z-index: 1000;
+	background-color: black;
+}
+
+.wijmo-wijvideo .wijmo-wijvideo-controls li
+{
+    float: left;
+    padding: 3px;
+    margin: 1px;
+    height: 16px;
+    line-height: 18px;
+}
+.wijmo-wijvideo li.wijmo-wijvideo-index
+{
+    width: 100%;
+    margin-right: -129px;
+}
+.wijmo-wijvideo .wijmo-wijvideo-index-slider
+{
+    width: 50%;
+    margin: 5px 8px;
+    height: 6px;
+}
+.wijmo-wijvideo .wijmo-wijvideo-index-slider .ui-slider-handle
+{
+    border-radius: 10px;
+    box-shadow: 0 0 5px #000;
+    top: -6px;
+    left: 3px;
+}
+.wijmo-wijvideo .wijmo-wijvideo-volume
+{
+    position: relative;
+}
+
+.wijmo-wijvideo div.wijmo-wijvideo-volumeslider
+{
+    /* min-height: 100px; */
+    left: 16px;
+    position: absolute;
+    bottom: 0;
+    width: 10px;
+    border-bottom: none;
+    height: 103px;
+    border-radius: 0;
+    -moz-border-radius: 0;
+    -webkit-border-radius: 0;
+}
+
+.wijmo-wijvideo div.wijmo-wijvideo-volumeslider .ui-slider-range
+{
+    width: 10px;
+    left: 0px;
+}
+
+.wijmo-wijvideo-timer
+{
+    text-align: right;
+}
+.wijmo-wijvideo div.wijmo-wijvideo-volumeslider .ui-slider-handle 
+{
+    left: -7px;
+    height: 5px;
+    width: 24px;
+    margin: 0 0 -5px 0;
+    border-radius: 2px;
+}
+.wijmo-wijvideo-volume-container
+{
+    display: none;
+    bottom: 22px;
+    height: 127px;
+    left: -12px;
+    margin: 0;
+    padding: 0;
+    position: absolute;
+    width: 25px;
+    padding: 10px;
+}
+.wijmo-wijvideo-wrapper 
+{
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    width: 100%;
+    z-index: 99;
+}
+
+.wijmo-wijvideo .wijmo-wijtooltip-container
+{
+    padding: 3px;
+}
Index: sandbox/newExpressoMail/prototype/services/ImapServiceAdapter.php
===================================================================
--- sandbox/newExpressoMail/prototype/services/ImapServiceAdapter.php	(revision 6930)
+++ sandbox/newExpressoMail/prototype/services/ImapServiceAdapter.php	(revision 7209)
@@ -2,5 +2,5 @@
 /**
  *
- * Copyright (C) 2012 Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
+ * Copyright (C) 2012 ConsÃ³rcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
  *
  * This program is free software; you can redistribute it and/or modify it under
@@ -26,16 +26,16 @@
  *
  * You can contact Prognus Software Livre headquarters at Av. Tancredo Neves,
- * 6731, PTI, Edifício do Saber, 3º floor, room 306, Foz do Iguaçu - PR - Brasil or at
+ * 6731, PTI, EdifÃ­cio do Saber, 3Âº floor, room 306, Foz do IguaÃ§u - PR - Brasil or at
  * e-mail address prognus@prognus.com.br.
  *
- * Classe de abstração que faz uma adaptação para manipulação de informações
- * no IMAP a partir de vários métodos.
+ * Classe de abstraÃ§Ã£o que faz uma adaptaÃ§Ã£o para manipulaÃ§Ã£o de informaÃ§Ãµes
+ * no IMAP a partir de vÃ¡rios mÃ©todos.
  *
  * @package    Prototype
  * @license    http://www.gnu.org/copyleft/gpl.html GPL
- * @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
+ * @author     ConsÃ³rcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
  * @version    2.4
- * @sponsor    Caixa Econômica Federal
- * @since      Arquivo disponibilizado na versão 2.4
+ * @sponsor    Caixa EconÃŽmica Federal
+ * @since      Arquivo disponibilizado na versÃ£o 2.4
  */
 
@@ -48,8 +48,8 @@
  * @package    Prototype (Mail)
  * @license    http://www.gnu.org/copyleft/gpl.html GPL
- * @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
+ * @author     ConsÃ³rcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
  * @version    2.4
- * @sponsor    Caixa Econômica Federal
- * @since      Classe disponibilizada na versão 2.4
+ * @sponsor    Caixa EconÃŽmica Federal
+ * @since      Classe disponibilizada na versÃ£o 2.4
  */
 class ImapServiceAdapter extends imap_functions/* implements Service*/
@@ -70,8 +70,11 @@
 		$context = isset($justthese['context']) ? $justthese['context'] : '' ;
 
+		$context = $context == '' ? (isset($criteria['folder']) ? $criteria : '') : $context;
+
 		switch( $URI['concept'] )
 		{
 			case 'folder':
 			{
+				
 				$result = $this->getFolders();
 
@@ -122,9 +125,9 @@
 				
 				/**
-				 * Trata o caso específico de retorno do atributo messageId
+				 * Trata o caso especÃ­fico de retorno do atributo messageId
 				 *
-				 * TODO - refazer todo a operação find do conceito message, uma vez que esta 
+				 * TODO - refazer todo a operaÃ§Ã£o find do conceito message, uma vez que esta 
 				 * foi desenvolvida quando a nova API ainda era muito imatura e se encontra 
-				 * muito acoplada à estrutura de retorno esperada pelo plugin jqGrid
+				 * muito acoplada Ã  estrutura de retorno esperada pelo plugin jqGrid
 				 */
 				if ( $justthese ) 
@@ -150,5 +153,5 @@
 
 							/**
-							 * Se não foi passado messageNumber no filtro, 
+							 * Se nÃ£o foi passado messageNumber no filtro, 
 							 * busca todas as mensagens de cada pasta
 							 */
@@ -341,5 +344,5 @@
 
 					/**
-					 * Se é uma busca por messageId
+					 * Se Ã© uma busca por messageId
 					 */
 					if (!empty($map['messageId'])) {
@@ -358,6 +361,6 @@
 
 					/**
-					 * Se é uma busca por messageNumber.
-					 * Lembrando que, neste caso, só deve ser suportada uma única pasta no filtro.
+					 * Se Ã© uma busca por messageNumber.
+					 * Lembrando que, neste caso, sÃ³ deve ser suportada uma Ãºnica pasta no filtro.
 					 */
 					} else {
@@ -366,5 +369,5 @@
 
 					/**
-					 * Se é uma busca por messageId, deve ser comparado com os messageNumbers 
+					 * Se Ã© uma busca por messageId, deve ser comparado com os messageNumbers 
 					 * passados no filtro, se houverem.
 					 */
@@ -377,5 +380,5 @@
 
 					/**
-					 * Adicionar demais atributos às mensagens para retorno
+					 * Adicionar demais atributos Ã s mensagens para retorno
 					 */
 					if(is_array($messages))
@@ -392,5 +395,5 @@
 					
 					/**
-					 * Se é uma busca por messageId e todos os messageIds foram econstrados:
+					 * Se Ã© uma busca por messageId e todos os messageIds foram econstrados:
 					 * Stop searching in all folders
 					 */
@@ -452,5 +455,5 @@
 			
 				/** 
-				 * identifica se o formato de ID é "folder/subfolder/subsubfolder/<messageNumber>" ou "<message-id>"
+				 * identifica se o formato de ID Ã© "folder/subfolder/subsubfolder/<messageNumber>" ou "<message-id>"
 				 */
 				$folderName = $messageNumber = false;
@@ -479,5 +482,5 @@
 					/**
 					 * Busca pela mensagem com o messageId dado. Se uma pasta foi passada, busca nela,
-					 * senão busca em todas.
+					 * senÃ£o busca em todas.
 					 */
 					
@@ -549,6 +552,6 @@
 					 * TODO
 					 * Verificar erro ao tentar setar uma flag com o limite de flags atingido
-					 * onde o status retornado pelo imap_setflag_full é true mesmo não sendo possível
-					 * a inserção da flag.
+					 * onde o status retornado pelo imap_setflag_full Ã© true mesmo nÃ£o sendo possÃ­vel
+					 * a inserÃ§Ã£o da flag.
 					 */
 
@@ -558,5 +561,5 @@
 					/**
 					 * Busca pela mensagem com o messageId dado. Se uma pasta foi passada, busca nela,
-					 * senão busca em todas.
+					 * senÃ£o busca em todas.
 					 */
 					$folders = array ();
@@ -693,4 +696,8 @@
 				return $return;
 			}
+			case 'folder':
+			{
+
+			}
 		}
 	}
@@ -740,5 +747,5 @@
 				
 					/**
-					 * Se é uma busca por messageId
+					 * Se Ã© uma busca por messageId
 					 */
 					if (!empty($map['messageId'])) {
@@ -754,6 +761,6 @@
 
 					/**
-					 * Se é uma busca por messageNumber.
-					 * Lembrando que, neste caso, só deve ser suportada uma única pasta no filtro.
+					 * Se Ã© uma busca por messageNumber.
+					 * Lembrando que, neste caso, sÃ³ deve ser suportada uma Ãºnica pasta no filtro.
 					 */
 					} else {
@@ -762,5 +769,5 @@
 
 					/**
-					 * Se é uma busca por messageId, deve ser comparado com os messageNumbers 
+					 * Se Ã© uma busca por messageId, deve ser comparado com os messageNumbers 
 					 * passados no filtro, se houverem.
 					 */
@@ -777,5 +784,5 @@
 
 					/**
-					 * Se é uma busca por messageId e todos os messageIds foram econstrados:
+					 * Se Ã© uma busca por messageId e todos os messageIds foram econstrados:
 					 * Stop searching in all folders
 					 */
@@ -802,5 +809,5 @@
 
 		/**
-		 * TODO - implementar a deleção de todos os followupflaggeds conforme filtro
+		 * TODO - implementar a deleÃ§Ã£o de todos os followupflaggeds conforme filtro
 		 */
 	}
@@ -809,8 +816,8 @@
     {
 		/**
-		 * Os únicos atributos da sinalização presentes no IMAP são folderName, messageNumber e messageId,
-		 * porém a operação de update desses atributos não faz sentido para o usuário da DataLayer,
-		 * pois na prática elas são executadas através das operações de CREATE e DELETE.
-		 * Assim, para os conceitos "labeled" e "followupflagged", só faz sentido o update de 
+		 * Os Ãºnicos atributos da sinalizaÃ§Ã£o presentes no IMAP sÃ£o folderName, messageNumber e messageId,
+		 * porÃ©m a operaÃ§Ã£o de update desses atributos nÃ£o faz sentido para o usuÃ¡rio da DataLayer,
+		 * pois na prÃ¡tica elas sÃ£o executadas atravÃ©s das operaÃ§Ãµes de CREATE e DELETE.
+		 * Assim, para os conceitos "labeled" e "followupflagged", sÃ³ faz sentido o update de 
 		 * atributos gravados no banco de dados e nunca no IMAP.
 		 */
