/**
 * @license RequireJS order 1.0.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/jrburke/requirejs for details
 */
/*!
 * jQuery UI 1.8.13
 *
 * 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
 */
/*!
 * jQuery UI Widget 1.8.13
 *
 * 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/Widget
 */
/*!
 * jQuery UI Mouse 1.8.13
 *
 * 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/Mouse
 *
 * Depends:
 *	jquery.ui.widget.js
 */
/*!
 * jQuery block plugin
 * Version 2.38 (29-MAR-2011)
 * @requires jQuery v1.2.3 or later
 *
 * Examples at: http://malsup.com/jquery/block/
 * Copyright (c) 2007-2010 M. Alsup
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * Thanks to Amir-Hossein Sobhi for some excellent contributions!
 */
var __hasProp=Object.prototype.hasOwnProperty,__extends=function(a,b){function d(){this.constructor=a}for(var c in b)__hasProp.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},__bind=function(a,b){return function(){return a.apply(b,arguments)}};define("cilantro/utils/logging",["backbone","underscore"],function(a,b){var c,d,e,f,g;return c={debug:0,info:1,warning:2,error:3,critical:4},f=function(a){function b(){b.__super__.constructor.apply(this,arguments)}return __extends(b,a),b.prototype.defaults={level:"info",timeout:3e3},b}(a.Model),d=function(b){function c(){this.log=__bind(this.log,this),c.__super__.constructor.apply(this,arguments)}return __extends(c,b),c.prototype.model=f,c.prototype.initialize=function(){return App.hub.subscribe("log",this.log)},c.prototype.log=function(b){if(b instanceof a.Model)return this.add(b),console.log(b)},c}(a.Collection),g=function(a){function c(){c.__super__.constructor.apply(this,arguments)}return __extends(c,a),c.prototype.template=b.template('<div class="message <%= level %>"><%= message %></div>'),c.prototype.render=function(){return this.el=this.$(this.template(this.model.get("message"))),this},c.prototype.show=function(){return this.el.fadeIn(500)},c.prototype.hide=function(){return this.el.fadeOut(300)},c}(a.View),e=function(c){function d(){this.dismiss=__bind(this.dismiss,this),this.log=__bind(this.log,this),d.__super__.constructor.apply(this,arguments)}return __extends(d,c),d.prototype.el="#messages",d.prototype.initialize=function(){return App.hub.subscribe("log",this.log),App.hub.subscribe("dismiss",this.dismiss),this.modelViews={}},d.prototype.log=function(c){var d;c instanceof a.View||(d=c,c=new g({model:d}),this.modelViews[d]=c),this.el.append(c.el.hide()),c.show();if(c.timeout)return this._messageTimer=b.delay(function(){return c.hide()},c.timeout)},d.prototype.dismiss=function(b){var c;b instanceof a.View||(c=b,b=this.modelViews[c],delete this.modelViews[c]);if(b)return clearTimeout(this._messageTimer),b.hide()},d}(a.View),{Message:f,MessageView:g,Log:d,LogView:e}}),function(){function i(a){var b=a.currentTarget||a.srcElement,c,g,h;if(a.type==="load"||d.test(b.readyState)){g=b.getAttribute("data-requiremodule"),f[g]=!0;for(c=0;h=e[c];c++)if(f[h.name])h.req([h.name],h.onLoad);else break;c>0&&e.splice(0,c),setTimeout(function(){b.parentNode.removeChild(b)},15)}}function j(a){var b,c,d;a.setAttribute("data-orderloaded","loaded");for(b=0;d=h[b];b++){c=g[d];if(c&&c.getAttribute("data-orderloaded")==="loaded")delete g[d],require.addScriptToDom(c);else break}b>0&&h.splice(0,b)}var a=typeof document!="undefined"&&typeof window!="undefined"&&document.createElement("script"),b=a&&(a.async||window.opera&&Object.prototype.toString.call(window.opera)==="[object Opera]"||"MozAppearance"in document.documentElement.style),c=a&&a.readyState==="uninitialized",d=/^(complete|loaded)$/,e=[],f={},g={},h=[];a=null,define("order",{version:"1.0.0",load:function(a,d,f,k){var l=d.nameToUrl(a,null),m,n;require.s.skipAsync[l]=!0,b||k.isBuild?d([a],f):c?(n=require.s.contexts._,!n.urlFetched[l]&&!n.loaded[a]&&(n.urlFetched[l]=!0,require.resourcesReady(!1),n.scriptCount+=1,m=require.attach(l,n,a,null,null,j),g[a]=m,h.push(a)),d([a],f)):d.specified(a)?d([a],f):(e.push({name:a,req:d,onLoad:f}),require.attach(l,null,a,i,"script/cache"))}})}(),function(a,b){function c(b,c){var e=b.nodeName.toLowerCase();return"area"===e?(c=b.parentNode,e=c.name,!b.href||!e||c.nodeName.toLowerCase()!=="map"?!1:(b=a("img[usemap=#"+e+"]")[0],!!b&&d(b))):(/input|select|textarea|button|object/.test(e)?!b.disabled:"a"==e?b.href||c:c)&&d(b)}function d(b){return!a(b).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{},a.ui.version||(a.extend(a.ui,{version:"1.8.13",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),a.fn.extend({_focus:a.fn.focus,focus:function(b,c){return typeof b=="number"?this.each(function(){var d=this;setTimeout(function(){a(d).focus(),c&&c.call(d)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;return b=a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0),/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length){c=a(this[0]);for(var d;c.length&&c[0]!==document;){d=c.css("position");if(d==="absolute"||d==="relative"||d==="fixed"){d=parseInt(c.css("zIndex"),10);if(!isNaN(d)&&d!==0)return d}c=c.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a.each(["Width","Height"],function(c,d){function e(b,c,d,e){return a.each(f,function(){c-=parseFloat(a.curCSS(b,"padding"+this,!0))||0,d&&(c-=parseFloat(a.curCSS(b,"border"+this+"Width",!0))||0),e&&(c-=parseFloat(a.curCSS(b,"margin"+this,!0))||0)}),c}var f=d==="Width"?["Left","Right"]:["Top","Bottom"],g=d.toLowerCase(),h={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){return c===b?h["inner"+d].call(this):this.each(function(){a(this).css(g,e(this,c)+"px")})},a.fn["outer"+d]=function(b,c){return typeof b!="number"?h["outer"+d].call(this,b):this.each(function(){a(this).css(g,e(this,b,!0,c)+"px")})}}),a.extend(a.expr[":"],{data:function(b,c,d){return!!a.data(b,d[3])},focusable:function(b){return c(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var d=a.attr(b,"tabindex"),e=isNaN(d);return(e||d>=0)&&c(b,!e)}}),a(function(){var b=document.body,c=b.appendChild(c=document.createElement("div"));a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),a.support.minHeight=c.offsetHeight===100,a.support.selectstart="onselectstart"in c,b.removeChild(c).style.display="none"}),a.extend(a.ui,{plugin:{add:function(b,c,d){b=a.ui[b].prototype;for(var e in d)b.plugins[e]=b.plugins[e]||[],b.plugins[e].push([c,d[e]])},call:function(a,b,c){if((b=a.plugins[b])&&a.element[0].parentNode)for(var d=0;d<b.length;d++)a.options[b[d][0]]&&b[d][1].apply(a.element,c)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(b,c){if(a(b).css("overflow")==="hidden")return!1;c=c&&c==="left"?"scrollLeft":"scrollTop";var d=!1;return b[c]>0?!0:(b[c]=1,d=b[c]>0,b[c]=0,d)},isOverAxis:function(a,b,c){return a>b&&a<b+c},isOver:function(b,c,d,e,f,g){return a.ui.isOverAxis(b,d,f)&&a.ui.isOverAxis(c,e,g)}}))}(jQuery),function(a,b){if(a.cleanData){var c=a.cleanData;a.cleanData=function(b){for(var d=0,e;(e=b[d])!=null;d++)a(e).triggerHandler("remove");c(b)}}else{var d=a.fn.remove;a.fn.remove=function(b,c){return this.each(function(){return c||(!b||a.filter(b,[this]).length)&&a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")}),d.call(a(this),b,c)})}}a.widget=function(b,c,d){var e=b.split(".")[0],f;b=b.split(".")[1],f=e+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][f]=function(c){return!!a.data(c,b)},a[e]=a[e]||{},a[e][b]=function(a,b){arguments.length&&this._createWidget(a,b)},c=new c,c.options=a.extend(!0,{},c.options),a[e][b].prototype=a.extend(!0,c,{namespace:e,widgetName:b,widgetEventPrefix:a[e][b].prototype.widgetEventPrefix||b,widgetBaseClass:f},d),a.widget.bridge(b,a[e][b])},a.widget.bridge=function(c,d){a.fn[c]=function(e){var f=typeof e=="string",g=Array.prototype.slice.call(arguments,1),h=this;return e=!f&&g.length?a.extend.apply(null,[!0,e].concat(g)):e,f&&e.charAt(0)==="_"?h:(f?this.each(function(){var d=a.data(this,c),f=d&&a.isFunction(d[e])?d[e].apply(d,g):d;if(f!==d&&f!==b)return h=f,!1}):this.each(function(){var b=a.data(this,c);b?b.option(e||{})._init():a.data(this,c,new d(e,this))}),h)}},a.Widget=function(a,b){arguments.length&&this._createWidget(a,b)},a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(b,c){a.data(c,this.widgetName,this),this.element=a(c),this.options=a.extend(!0,{},this.options,this._getCreateOptions(),b);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()}),this._create(),this._trigger("create"),this._init()},_getCreateOptions:function(){return a.metadata&&a.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName),this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(c,d){var e=c;if(arguments.length===0)return a.extend({},this.options);if(typeof c=="string"){if(d===b)return this.options[c];e={},e[c]=d}return this._setOptions(e),this},_setOptions:function(b){var c=this;return a.each(b,function(a,b){c._setOption(a,b)}),this},_setOption:function(a,b){return this.options[a]=b,a==="disabled"&&this.widget()[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",b),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(b,c,d){var e=this.options[b];c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),d=d||{};if(c.originalEvent){b=a.event.props.length;for(var f;b;)f=a.event.props[--b],c[f]=c.originalEvent[f]}return this.element.trigger(c,d),!(a.isFunction(e)&&e.call(this.element[0],c,d)===!1||c.isDefaultPrevented())}}}(jQuery),function(a){var b=!1;a(document).mousedown(function(){b=!1}),a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){if(!0===a.data(c.target,b.widgetName+".preventClickEvent"))return a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(c){if(!b){this._mouseStarted&&this._mouseUp(c),this._mouseDownEvent=c;var e=this,f=c.which==1,g=typeof this.options.cancel=="string"?a(c.target).parents().add(c.target).filter(this.options.cancel).length:!1;if(!f||g||!this._mouseCapture(c))return!0;this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(c)&&this._mouseDelayMet(c)){this._mouseStarted=this._mouseStart(c)!==!1;if(!this._mouseStarted)return c.preventDefault(),!0}return!0===a.data(c.target,this.widgetName+".preventClickEvent")&&a.removeData(c.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return e._mouseMove(a)},this._mouseUpDelegate=function(a){return e._mouseUp(a)},a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),c.preventDefault(),b=!0}},_mouseMove:function(b){return a.browser.msie&&document.documentMode<9&&!b.button?this._mouseUp(b):this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&((this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1)?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted)},_mouseUp:function(b){return a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,b.target==this._mouseDownEvent.target&&a.data(b.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(b)),!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(a){a.ui=a.ui||{};var b=/left|center|right/,c=/top|center|bottom/,d=a.fn.position,e=a.fn.offset;a.fn.position=function(e){if(!e||!e.of)return d.apply(this,arguments);e=a.extend({},e);var f=a(e.of),g=f[0],h=(e.collision||"flip").split(" "),i=e.offset?e.offset.split(" "):[0,0],j,k,l;return g.nodeType===9?(j=f.width(),k=f.height(),l={top:0,left:0}):g.setTimeout?(j=f.width(),k=f.height(),l={top:f.scrollTop(),left:f.scrollLeft()}):g.preventDefault?(e.at="left top",j=k=0,l={top:e.of.pageY,left:e.of.pageX}):(j=f.outerWidth(),k=f.outerHeight(),l=f.offset()),a.each(["my","at"],function(){var a=(e[this]||"").split(" ");a.length===1&&(a=b.test(a[0])?a.concat(["center"]):c.test(a[0])?["center"].concat(a):["center","center"]),a[0]=b.test(a[0])?a[0]:"center",a[1]=c.test(a[1])?a[1]:"center",e[this]=a}),h.length===1&&(h[1]=h[0]),i[0]=parseInt(i[0],10)||0,i.length===1&&(i[1]=i[0]),i[1]=parseInt(i[1],10)||0,e.at[0]==="right"?l.left+=j:e.at[0]==="center"&&(l.left+=j/2),e.at[1]==="bottom"?l.top+=k:e.at[1]==="center"&&(l.top+=k/2),l.left+=i[0],l.top+=i[1],this.each(function(){var b=a(this),c=b.outerWidth(),d=b.outerHeight(),f=parseInt(a.curCSS(this,"marginLeft",!0))||0,g=parseInt(a.curCSS(this,"marginTop",!0))||0,m=c+f+(parseInt(a.curCSS(this,"marginRight",!0))||0),n=d+g+(parseInt(a.curCSS(this,"marginBottom",!0))||0),o=a.extend({},l),p;e.my[0]==="right"?o.left-=c:e.my[0]==="center"&&(o.left-=c/2),e.my[1]==="bottom"?o.top-=d:e.my[1]==="center"&&(o.top-=d/2),o.left=Math.round(o.left),o.top=Math.round(o.top),p={left:o.left-f,top:o.top-g},a.each(["left","top"],function(b,f){a.ui.position[h[b]]&&a.ui.position[h[b]][f](o,{targetWidth:j,targetHeight:k,elemWidth:c,elemHeight:d,collisionPosition:p,collisionWidth:m,collisionHeight:n,offset:i,my:e.my,at:e.at})}),a.fn.bgiframe&&b.bgiframe(),b.offset(a.extend(o,{using:e.using}))})},a.ui.position={fit:{left:function(b,c){var d=a(window);d=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft(),b.left=d>0?b.left-d:Math.max(b.left-c.collisionPosition.left,b.left)},top:function(b,c){var d=a(window);d=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop(),b.top=d>0?b.top-d:Math.max(b.top-c.collisionPosition.top,b.top)}},flip:{left:function(b,c){if(c.at[0]!=="center"){var d=a(window);d=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft();var e=c.my[0]==="left"?-c.elemWidth:c.my[0]==="right"?c.elemWidth:0,f=c.at[0]==="left"?c.targetWidth:-c.targetWidth,g=-2*c.offset[0];b.left+=c.collisionPosition.left<0?e+f+g:d>0?e+f+g:0}},top:function(b,c){if(c.at[1]!=="center"){var d=a(window);d=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop();var e=c.my[1]==="top"?-c.elemHeight:c.my[1]==="bottom"?c.elemHeight:0,f=c.at[1]==="top"?c.targetHeight:-c.targetHeight,g=-2*c.offset[1];b.top+=c.collisionPosition.top<0?e+f+g:d>0?e+f+g:0}}}},a.offset.setOffset||(a.offset.setOffset=function(b,c){/static/.test(a.curCSS(b,"position"))&&(b.style.position="relative");var d=a(b),e=d.offset(),f=parseInt(a.curCSS(b,"top",!0),10)||0,g=parseInt(a.curCSS(b,"left",!0),10)||0;e={top:c.top-e.top+f,left:c.left-e.left+g},"using"in c?c.using.call(b,e):d.css(e)},a.fn.offset=function(b){var c=this[0];return!c||!c.ownerDocument?null:b?this.each(function(){a.offset.setOffset(this,b)}):e.call(this)})}(jQuery),function(a){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))&&(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},destroy:function(){if(this.element.data("draggable"))return this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy(),this},_mouseCapture:function(b){var c=this.options;return this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")?!1:(this.handle=this._getHandle(b),this.handle?(a(c.iframeFix===!0?"iframe":c.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(a(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(b){var c=this.options;return this.helper=this._createHelper(b),this._cacheHelperProportions(),a.ui.ddmanager&&(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt),c.containment&&this._setContainment(),this._trigger("start",b)===!1?(this._clear(),!1):(this._cacheHelperProportions(),a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this.helper.addClass("ui-draggable-dragging"),this._mouseDrag(b,!0),!0)},_mouseDrag:function(b,c){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute");if(!c){c=this._uiHash();if(this._trigger("drag",b,c)===!1)return this._mouseUp({}),!1;this.position=c.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";return a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),!1},_mouseStop:function(b){var c=!1;a.ui.ddmanager&&!this.options.dropBehaviour&&(c=a.ui.ddmanager.drop(this,b)),this.dropped&&(c=this.dropped,this.dropped=!1);if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return!1;if(this.options.revert=="invalid"&&!c||this.options.revert=="valid"&&c||this.options.revert===!0||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,c)){var e=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){e._trigger("stop",b)!==!1&&e._clear()})}else this._trigger("stop",b)!==!1&&this._clear();return!1},_mouseUp:function(b){return this.options.iframeFix===!0&&a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?!0:!1;return a(this.options.handle,this.element).find("*").andSelf().each(function(){this==b.target&&(c=!0)}),c},_createHelper:function(b){var c=this.options;return b=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b])):c.helper=="clone"?this.element.clone().removeAttr("id"):this.element,b.parents("body").length||b.appendTo(c.appendTo=="parent"?this.element[0].parentNode:c.appendTo),b[0]!=this.element[0]&&!/(fixed|absolute)/.test(b.css("position"))&&b.css("position","absolute"),b},_adjustOffsetFromHelper:function(b){typeof b=="string"&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;b.containment=="parent"&&(b.containment=this.helper[0].parentNode);if(b.containment=="document"||b.containment=="window")this.containment=[(b.containment=="document"?0:a(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,(b.containment=="document"?0:a(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,(b.containment=="document"?0:a(window).scrollLeft())+a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(b.containment=="document"?0:a(window).scrollTop())+(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)&&b.containment.constructor!=Array){b=a(b.containment);var c=b[0];if(c){b.offset();var e=a(c).css("overflow")!="hidden";this.containment=[(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0),(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0),(e?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=b}}else b.containment.constructor==Array&&(this.containment=b.containment)},_convertPositionTo:function(b,c){c||(c=this.position),b=b=="absolute"?1:-1;var e=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!a.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,f=/(html|body)/i.test(e[0].tagName);return{top:c.top+this.offset.relative.top*b+this.offset.parent.top*b-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:e.scrollTop())*b),left:c.left+this.offset.relative.left*b+this.offset.parent.left*b-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())*b)}},_generatePosition:function(b){var c=this.options,e=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!a.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,f=/(html|body)/i.test(e[0].tagName),g=b.pageX,h=b.pageY;if(this.originalPosition){var i;this.containment&&(this.relative_container?(i=this.relative_container.offset(),i=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):i=this.containment,b.pageX-this.offset.click.left<i[0]&&(g=i[0]+this.offset.click.left),b.pageY-this.offset.click.top<i[1]&&(h=i[1]+this.offset.click.top),b.pageX-this.offset.click.left>i[2]&&(g=i[2]+this.offset.click.left),b.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),c.grid&&(h=this.originalPageY+Math.round((h-this.originalPageY)/c.grid[1])*c.grid[1],h=i?h-this.offset.click.top<i[1]||h-this.offset.click.top>i[3]?h-this.offset.click.top<i[1]?h+c.grid[1]:h-c.grid[1]:h:h,g=this.originalPageX+Math.round((g-this.originalPageX)/c.grid[0])*c.grid[0],g=i?g-this.offset.click.left<i[0]||g-this.offset.click.left>i[2]?g-this.offset.click.left<i[0]?g+c.grid[0]:g-c.grid[0]:g:g)}return{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:e.scrollTop()),left:g-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(b,c,e){return e=e||this._uiHash(),a.ui.plugin.call(this,b,[c,e]),b=="drag"&&(this.positionAbs=this._convertPositionTo("absolute")),a.Widget.prototype._trigger.call(this,b,c,e)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),a.extend(a.ui.draggable,{version:"1.8.13"}),a.ui.plugin.add("draggable","connectToSortable",{start:function(b,c){var e=a(this).data("draggable"),f=e.options,g=a.extend({},c,{item:e.element});e.sortables=[],a(f.connectToSortable).each(function(){var c=a.data(this,"sortable");c&&!c.options.disabled&&(e.sortables.push({instance:c,shouldRevert:c.options.revert}),c.refreshPositions(),c._trigger("activate",b,g))})},stop:function(b,c){var e=a(this).data("draggable"),f=a.extend({},c,{item:e.element});a.each(e.sortables,function(){this.instance.isOver?(this.instance.isOver=0,e.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=!0),this.instance._mouseStop(b),this.instance.options.helper=this.instance.options._helper,e.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",b,f))})},drag:function(b,c){var e=a(this).data("draggable"),f=this;a.each(e.sortables,function(){this.instance.positionAbs=e.positionAbs,this.instance.helperProportions=e.helperProportions,this.instance.offset.click=e.offset.click,this.instance._intersectsWith(this.instance.containerCache)?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=a(f).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return c.helper[0]},b.target=this.instance.currentItem[0],this.instance._mouseCapture(b,!0),this.instance._mouseStart(b,!0,!0),this.instance.offset.click.top=e.offset.click.top,this.instance.offset.click.left=e.offset.click.left,this.instance.offset.parent.left-=e.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=e.offset.parent.top-this.instance.offset.parent.top,e._trigger("toSortable",b),e.dropped=this.instance.element,e.currentItem=e.element,this.instance.fromOutside=e),this.instance.currentItem&&this.instance._mouseDrag(b)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",b,this.instance._uiHash(this.instance)),this.instance._mouseStop(b,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),e._trigger("fromSortable",b),e.dropped=!1)})}}),a.ui.plugin.add("draggable","cursor",{start:function(){var b=a("body"),c=a(this).data("draggable").options;b.css("cursor")&&(c._cursor=b.css("cursor")),b.css("cursor",c.cursor)},stop:function(){var b=a(this).data("draggable").options;b._cursor&&a("body").css("cursor",b._cursor)}}),a.ui.plugin.add("draggable","opacity",{start:function(b,c){b=a(c.helper),c=a(this).data("draggable").options,b.css("opacity")&&(c._opacity=b.css("opacity")),b.css("opacity",c.opacity)},stop:function(b,c){b=a(this).data("draggable").options,b._opacity&&a(c.helper).css("opacity",b._opacity)}}),a.ui.plugin.add("draggable","scroll",{start:function(){var b=a(this).data("draggable");b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"&&(b.overflowOffset=b.scrollParent.offset())},drag:function(b){var c=a(this).data("draggable"),e=c.options,f=!1;if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){if(!e.axis||e.axis!="x")c.overflowOffset.top+c.scrollParent[0].offsetHeight-b.pageY<e.scrollSensitivity?c.scrollParent[0].scrollTop=f=c.scrollParent[0].scrollTop+e.scrollSpeed:b.pageY-c.overflowOffset.top<e.scrollSensitivity&&(c.scrollParent[0].scrollTop=f=c.scrollParent[0].scrollTop-e.scrollSpeed);if(!e.axis||e.axis!="y")c.overflowOffset.left+c.scrollParent[0].offsetWidth-b.pageX<e.scrollSensitivity?c.scrollParent[0].scrollLeft=f=c.scrollParent[0].scrollLeft+e.scrollSpeed:b.pageX-c.overflowOffset.left<e.scrollSensitivity&&(c.scrollParent[0].scrollLeft=f=c.scrollParent[0].scrollLeft-e.scrollSpeed)}else{if(!e.axis||e.axis!="x")b.pageY-a(document).scrollTop()<e.scrollSensitivity?f=a(document).scrollTop(a(document).scrollTop()-e.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())<e.scrollSensitivity&&(f=a(document).scrollTop(a(document).scrollTop()+e.scrollSpeed));if(!e.axis||e.axis!="y")b.pageX-a(document).scrollLeft()<e.scrollSensitivity?f=a(document).scrollLeft(a(document).scrollLeft()-e.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())<e.scrollSensitivity&&(f=a(document).scrollLeft(a(document).scrollLeft()+e.scrollSpeed))}f!==!1&&a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(c,b)}}),a.ui.plugin.add("draggable","snap",{start:function(){var b=a(this).data("draggable"),c=b.options;b.snapElements=[],a(c.snap.constructor!=String?c.snap.items||":data(draggable)":c.snap).each(function(){var c=a(this),e=c.offset();this!=b.element[0]&&b.snapElements.push({item:this,width:c.outerWidth(),height:c.outerHeight(),top:e.top,left:e.left})})},drag:function(b,c){for(var e=a(this).data("draggable"),f=e.options,g=f.snapTolerance,h=c.offset.left,i=h+e.helperProportions.width,j=c.offset.top,k=j+e.helperProportions.height,l=e.snapElements.length-1;l>=0;l--){var m=e.snapElements[l].left,n=m+e.snapElements[l].width,o=e.snapElements[l].top,p=o+e.snapElements[l].height;if(m-g<h&&h<n+g&&o-g<j&&j<p+g||m-g<h&&h<n+g&&o-g<k&&k<p+g||m-g<i&&i<n+g&&o-g<j&&j<p+g||m-g<i&&i<n+g&&o-g<k&&k<p+g){if(f.snapMode!="inner"){var q=Math.abs(o-k)<=g,r=Math.abs(p-j)<=g,s=Math.abs(m-i)<=g,t=Math.abs(n-h)<=g;q&&(c.position.top=e._convertPositionTo("relative",{top:o-e.helperProportions.height,left:0}).top-e.margins.top),r&&(c.position.top=e._convertPositionTo("relative",{top:p,left:0}).top-e.margins.top),s&&(c.position.left=e._convertPositionTo("relative",{top:0,left:m-e.helperProportions.width}).left-e.margins.left),t&&(c.position.left=e._convertPositionTo("relative",{top:0,left:n}).left-e.margins.left)}var u=q||r||s||t;f.snapMode!="outer"&&(q=Math.abs(o-j)<=g,r=Math.abs(p-k)<=g,s=Math.abs(m-h)<=g,t=Math.abs(n-i)<=g,q&&(c.position.top=e._convertPositionTo("relative",{top:o,left:0}).top-e.margins.top),r&&(c.position.top=e._convertPositionTo("relative",{top:p-e.helperProportions.height,left:0}).top-e.margins.top),s&&(c.position.left=e._convertPositionTo("relative",{top:0,left:m}).left-e.margins.left),t&&(c.position.left=e._convertPositionTo("relative",{top:0,left:n-e.helperProportions.width}).left-e.margins.left)),!e.snapElements[l].snapping&&(q||r||s||t||u)&&e.options.snap.snap&&e.options.snap.snap.call(e.element,b,a.extend(e._uiHash(),{snapItem:e.snapElements[l].item})),e.snapElements[l].snapping=q||r||s||t||u}else e.snapElements[l].snapping&&e.options.snap.release&&e.options.snap.release.call(e.element,b,a.extend(e._uiHash(),{snapItem:e.snapElements[l].item})),e.snapElements[l].snapping=!1}}}),a.ui.plugin.add("draggable","stack",{start:function(){var b=a(this).data("draggable").options;b=a.makeArray(a(b.stack)).sort(function(b,c){return(parseInt(a(b).css("zIndex"),10)||0)-(parseInt(a(c).css("zIndex"),10)||0)});if(b.length){var c=parseInt(b[0].style.zIndex)||0;a(b).each(function(a){this.style.zIndex=c+a}),this[0].style.zIndex=c+b.length}}}),a.ui.plugin.add("draggable","zIndex",{start:function(b,c){b=a(c.helper),c=a(this).data("draggable").options,b.css("zIndex")&&(c._zIndex=b.css("zIndex")),b.css("zIndex",c.zIndex)},stop:function(b,c){b=a(this).data("draggable").options,b._zIndex&&a(c.helper).css("zIndex",b._zIndex)}})}(jQuery),function(a){a.widget("ui.resizable",a.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1e3},_create:function(){var b=this,c=this.options;this.element.addClass("ui-resizable"),a.extend(this,{_aspectRatio:!!c.aspectRatio,aspectRatio:c.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:c.helper||c.ghost||c.animate?c.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(/relative/.test(this.element.css("position"))&&a.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"}),this.element.wrap(a('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=c.handles||(a(".ui-resizable-handle",this.element).length?{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"}:"e,s,se");if(this.handles.constructor==String){this.handles=="all"&&(this.handles="n,e,s,w,se,sw,ne,nw");var d=this.handles.split(",");this.handles={};for(var f=0;f<d.length;f++){var g=a.trim(d[f]),h=a('<div class="ui-resizable-handle '+("ui-resizable-"+g)+'"></div>');/sw|se|ne|nw/.test(g)&&h.css({zIndex:++c.zIndex}),"se"==g&&h.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[g]=".ui-resizable-"+g,this.element.append(h)}}this._renderAxis=function(b){b=b||this.element;for(var c in this.handles){this.handles[c].constructor==String&&(this.handles[c]=a(this.handles[c],this.element).show());if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var d=a(this.handles[c],this.element),f=0;f=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth(),d=["padding",/ne|nw|n/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join(""),b.css(d,f),this._proportionallyResize()}a(this.handles[c])}},this._renderAxis(this.element),this._handles=a(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){if(!b.resizing){if(this.className)var a=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=a&&a[1]?a[1]:"se"}}),c.autoHide&&(this._handles.hide(),a(this.element).addClass("ui-resizable-autohide").hover(function(){c.disabled||(a(this).removeClass("ui-resizable-autohide"),b._handles.show())},function(){c.disabled||b.resizing||(a(this).addClass("ui-resizable-autohide"),b._handles.hide())})),this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(b){a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);var c=this.element;c.after(this.originalElement.css({position:c.css("position"),width:c.outerWidth(),height:c.outerHeight(),top:c.css("top"),left:c.css("left")})).remove()}return this.originalElement.css("resize",this.originalResizeStyle),b(this.originalElement),this},_mouseCapture:function(b){var c=!1;for(var d in this.handles)a(this.handles[d])[0]==b.target&&(c=!0);return!this.options.disabled&&c},_mouseStart:function(c){var d=this.options,f=this.element.position(),g=this.element;this.resizing=!0,this.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()},(g.is(".ui-draggable")||/absolute/.test(g.css("position")))&&g.css({position:"absolute",top:f.top,left:f.left}),a.browser.opera&&/relative/.test(g.css("position"))&&g.css({position:"relative",top:"auto",left:"auto"}),this._renderProxy(),f=b(this.helper.css("left"));var h=b(this.helper.css("top"));return d.containment&&(f+=a(d.containment).scrollLeft()||0,h+=a(d.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:f,top:h},this.size=this._helper?{width:g.outerWidth(),height:g.outerHeight()}:{width:g.width(),height:g.height()},this.originalSize=this._helper?{width:g.outerWidth(),height:g.outerHeight()}:{width:g.width(),height:g.height()},this.originalPosition={left:f,top:h},this.sizeDiff={width:g.outerWidth()-g.width(),height:g.outerHeight()-g.height()},this.originalMousePosition={left:c.pageX,top:c.pageY},this.aspectRatio=typeof d.aspectRatio=="number"?d.aspectRatio:this.originalSize.width/this.originalSize.height||1,d=a(".ui-resizable-"+this.axis).css("cursor"),a("body").css("cursor",d=="auto"?this.axis+"-resize":d),g.addClass("ui-resizable-resizing"),this._propagate("start",c),!0},_mouseDrag:function(a){var b=this.helper,c=this.originalMousePosition,d=this._change[this.axis];if(!d)return!1;c=d.apply(this,[a,a.pageX-c.left||0,a.pageY-c.top||0]);if(this._aspectRatio||a.shiftKey)c=this._updateRatio(c,a);return c=this._respectSize(c,a),this._propagate("resize",a),b.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),this._updateCache(c),this._trigger("resize",a,this.ui()),!1},_mouseStop:function(b){this.resizing=!1;var c=this.options,d=this;if(this._helper){var f=this._proportionallyResizeElements,g=f.length&&/textarea/i.test(f[0].nodeName);f=g&&a.ui.hasScroll(f[0],"left")?0:d.sizeDiff.height,g=g?0:d.sizeDiff.width,g={width:d.helper.width()-g,height:d.helper.height()-f},f=parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left)||null;var h=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;c.animate||this.element.css(a.extend(g,{top:h,left:f})),d.helper.height(d.size.height),d.helper.width(d.size.width),this._helper&&!c.animate&&this._proportionallyResize()}return a("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",b),this._helper&&this.helper.remove(),!1},_updateCache:function(a){this.offset=this.helper.offset(),c(a.left)&&(this.position.left=a.left),c(a.top)&&(this.position.top=a.top),c(a.height)&&(this.size.height=a.height),c(a.width)&&(this.size.width=a.width)},_updateRatio:function(a){var b=this.position,c=this.size,d=this.axis;return a.height?a.width=c.height*this.aspectRatio:a.width&&(a.height=c.width/this.aspectRatio),d=="sw"&&(a.left=b.left+(c.width-a.width),a.top=null),d=="nw"&&(a.top=b.top+(c.height-a.height),a.left=b.left+(c.width-a.width)),a},_respectSize:function(a){var b=this.options,d=this.axis,e=c(a.width)&&b.maxWidth&&b.maxWidth<a.width,f=c(a.height)&&b.maxHeight&&b.maxHeight<a.height,g=c(a.width)&&b.minWidth&&b.minWidth>a.width,h=c(a.height)&&b.minHeight&&b.minHeight>a.height;g&&(a.width=b.minWidth),h&&(a.height=b.minHeight),e&&(a.width=b.maxWidth),f&&(a.height=b.maxHeight);var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,k=/sw|nw|w/.test(d);return d=/nw|ne|n/.test(d),g&&k&&(a.left=i-b.minWidth),e&&k&&(a.left=i-b.maxWidth),h&&d&&(a.top=j-b.minHeight),f&&d&&(a.top=j-b.maxHeight),(b=!a.width&&!a.height)&&!a.left&&a.top?a.top=null:b&&!a.top&&a.left&&(a.left=null),a},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,c=0;c<this._proportionallyResizeElements.length;c++){var d=this._proportionallyResizeElements[c];if(!this.borderDif){var f=[d.css("borderTopWidth"),d.css("borderRightWidth"),d.css("borderBottomWidth"),d.css("borderLeftWidth")],g=[d.css("paddingTop"),d.css("paddingRight"),d.css("paddingBottom"),d.css("paddingLeft")];this.borderDif=a.map(f,function(a,b){return a=parseInt(a,10)||0,b=parseInt(g[b],10)||0,a+b})}a.browser.msie&&(a(b).is(":hidden")||a(b).parents(":hidden").length)||d.css({height:b.height()-this.borderDif[0]-this.borderDif[2]||0,width:b.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var b=this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||a('<div style="overflow:hidden;"></div>');var c=a.browser.msie&&a.browser.version<7,d=c?1:0;c=c?2:-1,this.helper.addClass(this._helper).css({width:this.element.outerWidth()+c,height:this.element.outerHeight()+c,position:"absolute",left:this.elementOffset.left-d+"px",top:this.elementOffset.top-d+"px",zIndex:++b.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(a,b){return{width:this.originalSize.width+b}},w:function(a,b){return{left:this.originalPosition.left+b,width:this.originalSize.width-b}},n:function(a,b,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]),b!="resize"&&this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),a.extend(a.ui.resizable,{version:"1.8.13"}),a.ui.plugin.add("resizable","alsoResize",{start:function(){var b=a(this).data("resizable").options,c=function(b){a(b).each(function(){var b=a(this);b.data("resizable-alsoresize",{width:parseInt(b.width(),10),height:parseInt(b.height(),10),left:parseInt(b.css("left"),10),top:parseInt(b.css("top"),10),position:b.css("position")})})};typeof b.alsoResize=="object"&&!b.alsoResize.parentNode?b.alsoResize.length?(b.alsoResize=b.alsoResize[0],c(b.alsoResize)):a.each(b.alsoResize,function(a){c(a)}):c(b.alsoResize)},resize:function(b,c){var d=a(this).data("resizable");b=d.options;var f=d.originalSize,g=d.originalPosition,h={height:d.size.height-f.height||0,width:d.size.width-f.width||0,top:d.position.top-g.top||0,left:d.position.left-g.left||0},i=function(b,f){a(b).each(function(){var b=a(this),g=a(this).data("resizable-alsoresize"),i={},k=f&&f.length?f:b.parents(c.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(k,function(a,b){(a=(g[b]||0)+(h[b]||0))&&a>=0&&(i[b]=a||null)}),a.browser.opera&&/relative/.test(b.css("position"))&&(d._revertToRelativePosition=!0,b.css({position:"absolute",top:"auto",left:"auto"})),b.css(i)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType?a.each(b.alsoResize,function(a,b){i(a,b)}):i(b.alsoResize)},stop:function(){var b=a(this).data("resizable"),c=b.options,d=function(b){a(b).each(function(){var b=a(this);b.css({position:b.data("resizable-alsoresize").position})})};b._revertToRelativePosition&&(b._revertToRelativePosition=!1,typeof c.alsoResize=="object"&&!c.alsoResize.nodeType?a.each(c.alsoResize,function(a){d(a)}):d(c.alsoResize)),a(this).removeData("resizable-alsoresize")}}),a.ui.plugin.add("resizable","animate",{stop:function(b){var c=a(this).data("resizable"),d=c.options,f=c._proportionallyResizeElements,g=f.length&&/textarea/i.test(f[0].nodeName),h=g&&a.ui.hasScroll(f[0],"left")?0:c.sizeDiff.height;g={width:c.size.width-(g?0:c.sizeDiff.width),height:c.size.height-h},h=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var i=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;c.element.animate(a.extend(g,i&&h?{top:i,left:h}:{}),{duration:d.animateDuration,easing:d.animateEasing,step:function(){var d={width:parseInt(c.element.css("width"),10),height:parseInt(c.element.css("height"),10),top:parseInt(c.element.css("top"),10),left:parseInt(c.element.css("left"),10)};f&&f.length&&a(f[0]).css({width:d.width,height:d.height}),c._updateCache(d),c._propagate("resize",b)}})}}),a.ui.plugin.add("resizable","containment",{start:function(){var c=a(this).data("resizable"),d=c.element,f=c.options.containment;if(d=f instanceof a?f.get(0):/parent/.test(f)?d.parent().get(0):f){c.containerElement=a(d);if(/document/.test(f)||f==document)c.containerOffset={left:0,top:0},c.containerPosition={left:0,top:0},c.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight};else{var g=a(d),h=[];a(["Top","Right","Left","Bottom"]).each(function(a,c){h[a]=b(g.css("padding"+c))}),c.containerOffset=g.offset(),c.containerPosition=g.position(),c.containerSize={height:g.innerHeight()-h[3],width:g.innerWidth()-h[1]},f=c.containerOffset;var i=c.containerSize.height,j=c.containerSize.width;j=a.ui.hasScroll(d,"left")?d.scrollWidth:j,i=a.ui.hasScroll(d)?d.scrollHeight:i,c.parentData={element:d,left:f.left,top:f.top,width:j,height:i}}}},resize:function(b){var c=a(this).data("resizable"),d=c.options,f=c.containerOffset,g=c.position;b=c._aspectRatio||b.shiftKey;var h={top:0,left:0},i=c.containerElement;i[0]!=document&&/static/.test(i.css("position"))&&(h=f),g.left<(c._helper?f.left:0)&&(c.size.width+=c._helper?c.position.left-f.left:c.position.left-h.left,b&&(c.size.height=c.size.width/d.aspectRatio),c.position.left=d.helper?f.left:0),g.top<(c._helper?f.top:0)&&(c.size.height+=c._helper?c.position.top-f.top:c.position.top,b&&(c.size.width=c.size.height*d.aspectRatio),c.position.top=c._helper?f.top:0),c.offset.left=c.parentData.left+c.position.left,c.offset.top=c.parentData.top+c.position.top,d=Math.abs((c._helper?c.offset.left-h.left:c.offset.left-h.left)+c.sizeDiff.width),f=Math.abs((c._helper?c.offset.top-h.top:c.offset.top-f.top)+c.sizeDiff.height),g=c.containerElement.get(0)==c.element.parent().get(0),h=/relative|absolute/.test(c.containerElement.css("position")),g&&h&&(d-=c.parentData.left),d+c.size.width>=c.parentData.width&&(c.size.width=c.parentData.width-d,b&&(c.size.height=c.size.width/c.aspectRatio)),f+c.size.height>=c.parentData.height&&(c.size.height=c.parentData.height-f,b&&(c.size.width=c.size.height*c.aspectRatio))},stop:function(){var b=a(this).data("resizable"),c=b.options,d=b.containerOffset,f=b.containerPosition,g=b.containerElement,h=a(b.helper),i=h.offset(),j=h.outerWidth()-b.sizeDiff.width;h=h.outerHeight()-b.sizeDiff.height,b._helper&&!c.animate&&/relative/.test(g.css("position"))&&a(this).css({left:i.left-f.left-d.left,width:j,height:h}),b._helper&&!c.animate&&/static/.test(g.css("position"))&&a(this).css({left:i.left-f.left-d.left,width:j,height:h})}}),a.ui.plugin.add("resizable","ghost",{start:function(){var b=a(this).data("resizable"),c=b.options,d=b.size;b.ghost=b.originalElement.clone(),b.ghost.css({opacity:.25,display:"block",position:"relative",height:d.height,width:d.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof c.ghost=="string"?c.ghost:""),b.ghost.appendTo(b.helper)},resize:function(){var b=a(this).data("resizable");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=a(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}}),a.ui.plugin.add("resizable","grid",{resize:function(){var b=a(this).data("resizable"),c=b.options,d=b.size,f=b.originalSize,g=b.originalPosition,h=b.axis;c.grid=typeof c.grid=="number"?[c.grid,c.grid]:c.grid;var i=Math.round((d.width-f.width)/(c.grid[0]||1))*(c.grid[0]||1);c=Math.round((d.height-f.height)/(c.grid[1]||1))*(c.grid[1]||1),/^(se|s|e)$/.test(h)?(b.size.width=f.width+i,b.size.height=f.height+c):/^(ne)$/.test(h)?(b.size.width=f.width+i,b.size.height=f.height+c,b.position.top=g.top-c):(/^(sw)$/.test(h)?(b.size.width=f.width+i,b.size.height=f.height+c):(b.size.width=f.width+i,b.size.height=f.height+c,b.position.top=g.top-c),b.position.left=g.left-i)}});var b=function(a){return parseInt(a,10)||0},c=function(a){return!isNaN(parseInt(a,10))}}(jQuery),function(a){a.widget("ui.sortable",a.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var a=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable"),this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(b,c){b==="disabled"?(this.options[b]=c,this.widget()[c?"addClass":"removeClass"]("ui-sortable-disabled")):a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(b,c){if(this.reverting)return!1;if(this.options.disabled||this.options.type=="static")return!1;this._refreshItems(b);var e=null,f=this;a(b.target).parents().each(function(){if(a.data(this,"sortable-item")==f)return e=a(this),!1}),a.data(b.target,"sortable-item")==f&&(e=a(b.target));if(!e)return!1;if(this.options.handle&&!c){var g=!1;a(this.options.handle,e).find("*").andSelf().each(function(){this==b.target&&(g=!0)});if(!g)return!1}return this.currentItem=e,this._removeCurrentsFromItems(),!0},_mouseStart:function(b,c,e){c=this.options;var f=this;this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(b),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),c.containment&&this._setContainment(),c.cursor&&(a("body").css("cursor")&&(this._storedCursor=a("body").css("cursor")),a("body").css("cursor",c.cursor)),c.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",c.opacity)),c.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",c.zIndex)),this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",b,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions();if(!e)for(e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("activate",b,f._uiHash(this));return a.ui.ddmanager&&(a.ui.ddmanager.current=this),a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(b),!0},_mouseDrag:function(b){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var c=this.options,e=!1;this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-b.pageY<c.scrollSensitivity?this.scrollParent[0].scrollTop=e=this.scrollParent[0].scrollTop+c.scrollSpeed:b.pageY-this.overflowOffset.top<c.scrollSensitivity&&(this.scrollParent[0].scrollTop=e=this.scrollParent[0].scrollTop-c.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-b.pageX<c.scrollSensitivity?this.scrollParent[0].scrollLeft=e=this.scrollParent[0].scrollLeft+c.scrollSpeed:b.pageX-this.overflowOffset.left<c.scrollSensitivity&&(this.scrollParent[0].scrollLeft=e=this.scrollParent[0].scrollLeft-c.scrollSpeed)):(b.pageY-a(document).scrollTop()<c.scrollSensitivity?e=a(document).scrollTop(a(document).scrollTop()-c.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())<c.scrollSensitivity&&(e=a(document).scrollTop(a(document).scrollTop()+c.scrollSpeed)),b.pageX-a(document).scrollLeft()<c.scrollSensitivity?e=a(document).scrollLeft(a(document).scrollLeft()-c.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())<c.scrollSensitivity&&(e=a(document).scrollLeft(a(document).scrollLeft()+c.scrollSpeed))),e!==!1&&a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b)}this.positionAbs=this._convertPositionTo("absolute");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";for(c=this.items.length-1;c>=0;c--){e=this.items[c];var f=e.item[0],g=this._intersectsWithPointer(e);if(g&&f!=this.currentItem[0]&&this.placeholder[g==1?"next":"prev"]()[0]!=f&&!a.ui.contains(this.placeholder[0],f)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],f):!0)){this.direction=g==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(e))this._rearrange(b,e);else break;this._trigger("change",b,this._uiHash());break}}return this._contactContainers(b),a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),this._trigger("sort",b,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(b,c){if(b){a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,b);if(this.options.revert){var e=this;c=e.placeholder.offset(),e.reverting=!0,a(this.helper).animate({left:c.left-this.offset.parent.left-e.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:c.top-this.offset.parent.top-e.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){e._clear(b)})}else this._clear(b,c);return!1}},cancel:function(){var b=this;if(this.dragging){this._mouseUp({target:null}),this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("deactivate",null,b._uiHash(this)),this.containers[c].containerCache.over&&(this.containers[c]._trigger("out",null,b._uiHash(this)),this.containers[c].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),a.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(b){var c=this._getItemsAsjQuery(b&&b.connected),e=[];return b=b||{},a(c).each(function(){var c=(a(b.item||this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[-=_](.+)/);c&&e.push((b.key||c[1]+"[]")+"="+(b.key&&b.expression?c[1]:c[2]))}),!e.length&&b.key&&e.push(b.key+"="),e.join("&")},toArray:function(b){var c=this._getItemsAsjQuery(b&&b.connected),e=[];return b=b||{},c.each(function(){e.push(a(b.item||this).attr(b.attribute||"id")||"")}),e},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,d=this.positionAbs.top,e=d+this.helperProportions.height,f=a.left,g=f+a.width,h=a.top,i=h+a.height,j=this.offset.click.top,k=this.offset.click.left;return j=d+j>h&&d+j<i&&b+k>f&&b+k<g,this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?j:f<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<g&&h<d+this.helperProportions.height/2&&e-this.helperProportions.height/2<i},_intersectsWithPointer:function(b){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top,b.height);b=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left,b.width),c=c&&b,b=this._getDragVerticalDirection();var e=this._getDragHorizontalDirection();return c?this.floating?e&&e=="right"||b=="down"?2:1:b&&(b=="down"?2:1):!1},_intersectsWithSides:function(b){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top+b.height/2,b.height);b=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left+b.width/2,b.width);var e=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();return this.floating&&f?f=="right"&&b||f=="left"&&!b:e&&(e=="down"&&c||e=="up"&&!c)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){return this._refreshItems(a),this.refreshPositions(),this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(b){var c=[],e=[],f=this._connectWith();if(f&&b)for(b=f.length-1;b>=0;b--)for(var g=a(f[b]),h=g.length-1;h>=0;h--){var i=a.data(g[h],"sortable");i&&i!=this&&!i.options.disabled&&e.push([a.isFunction(i.options.items)?i.options.items.call(i.element):a(i.options.items,i.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),i])}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(b=e.length-1;b>=0;b--)e[b][0].each(function(){c.push(this)});return a(c)},_removeCurrentsFromItems:function(){for(var a=this.currentItem.find(":data(sortable-item)"),b=0;b<this.items.length;b++)for(var c=0;c<a.length;c++)a[c]==this.items[b].item[0]&&this.items.splice(b,1)},_refreshItems:function(b){this.items=[],this.containers=[this];var c=this.items,e=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]],f=this._connectWith();if(f)for(var g=f.length-1;g>=0;g--)for(var h=a(f[g]),i=h.length-1;i>=0;i--){var j=a.data(h[i],"sortable");j&&j!=this&&!j.options.disabled&&(e.push([a.isFunction(j.options.items)?j.options.items.call(j.element[0],b,{item:this.currentItem}):a(j.options.items,j.element),j]),this.containers.push(j))}for(g=e.length-1;g>=0;g--){b=e[g][1],f=e[g][0],i=0;for(h=f.length;i<h;i++)j=a(f[i]),j.data("sortable-item",b),c.push({item:j,instance:b,width:0,height:0,left:0,top:0})}},refreshPositions:function(b){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());for(var c=this.items.length-1;c>=0;c--){var e=this.items[c];if(e.instance==this.currentContainer||!this.currentContainer||e.item[0]==this.currentItem[0]){var f=this.options.toleranceElement?a(this.options.toleranceElement,e.item):e.item;b||(e.width=f.outerWidth(),e.height=f.outerHeight()),f=f.offset(),e.left=f.left,e.top=f.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(c=this.containers.length-1;c>=0;c--)f=this.containers[c].element.offset(),this.containers[c].containerCache.left=f.left,this.containers[c].containerCache.top=f.top,this.containers[c].containerCache.width=this.containers[c].element.outerWidth(),this.containers[c].containerCache.height=this.containers[c].element.outerHeight();return this},_createPlaceholder:function(b){var c=b||this,e=c.options;if(!e.placeholder||e.placeholder.constructor==String){var f=e.placeholder;e.placeholder={element:function(){var b=a(document.createElement(c.currentItem[0].nodeName)).addClass(f||c.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return f||(b.style.visibility="hidden"),b},update:function(a,b){if(!f||!!e.forcePlaceholderSize)b.height()||b.height(c.currentItem.innerHeight()-parseInt(c.currentItem.css("paddingTop")||0,10)-parseInt(c.currentItem.css("paddingBottom")||0,10)),b.width()||b.width(c.currentItem.innerWidth()-parseInt(c.currentItem.css("paddingLeft")||0,10)-parseInt(c.currentItem.css("paddingRight")||0,10))}}}c.placeholder=a(e.placeholder.element.call(c.element,c.currentItem)),c.currentItem.after(c.placeholder),e.placeholder.update(c,c.placeholder)},_contactContainers:function(b){for(var c=null,e=null,f=this.containers.length-1;f>=0;f--)if(!a.ui.contains(this.currentItem[0],this.containers[f].element[0]))if(this._intersectsWith(this.containers[f].containerCache)){if(!c||!a.ui.contains(this.containers[f].element[0],c.element[0]))c=this.containers[f],e=f}else this.containers[f].containerCache.over&&(this.containers[f]._trigger("out",b,this._uiHash(this)),this.containers[f].containerCache.over=0);if(c)if(this.containers.length===1)this.containers[e]._trigger("over",b,this._uiHash(this)),this.containers[e].containerCache.over=1;else if(this.currentContainer!=this.containers[e]){c=1e4,f=null;for(var g=this.positionAbs[this.containers[e].floating?"left":"top"],h=this.items.length-1;h>=0;h--)if(a.ui.contains(this.containers[e].element[0],this.items[h].item[0])){var i=this.items[h][this.containers[e].floating?"left":"top"];Math.abs(i-g)<c&&(c=Math.abs(i-g),f=this.items[h])}if(f||this.options.dropOnEmpty)this.currentContainer=this.containers[e],f?this._rearrange(b,f,null,!0):this._rearrange(b,null,this.containers[e].element,!0),this._trigger("change",b,this._uiHash()),this.containers[e]._trigger("change",b,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[e]._trigger("over",b,this._uiHash(this)),this.containers[e].containerCache.over=1}},_createHelper:function(b){var c=this.options;return b=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b,this.currentItem])):c.helper=="clone"?this.currentItem.clone():this.currentItem,b.parents("body").length||a(c.appendTo!="parent"?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(b[0]),b[0]==this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(b[0].style.width==""||c.forceHelperSize)&&b.width(this.currentItem.width()),(b[0].style.height==""||c.forceHelperSize)&&b.height(this.currentItem.height()),b},_adjustOffsetFromHelper:function(b){typeof b=="string"&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;b.containment=="parent"&&(b.containment=this.helper[0].parentNode);if(b.containment=="document"||b.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)){var c=a(b.containment)[0];b=a(b.containment).offset();var e=a(c).css("overflow")!="hidden";this.containment=[b.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,b.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,b.left+(e?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,b.top+(e?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(b,c){c||(c=this.position),b=b=="absolute"?1:-1;var e=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!a.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,f=/(html|body)/i.test(e[0].tagName);return{top:c.top+this.offset.relative.top*b+this.offset.parent.top*b-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:e.scrollTop())*b),left:c.left+this.offset.relative.left*b+this.offset.parent.left*b-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())*b)}},_generatePosition:function(b){var c=this.options,e=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!a.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,f=/(html|body)/i.test(e[0].tagName);this.cssPosition=="relative"&&(this.scrollParent[0]==document||this.scrollParent[0]==this.offsetParent[0])&&(this.offset.relative=this._getRelativeOffset());var g=b.pageX,h=b.pageY;return this.originalPosition&&(this.containment&&(b.pageX-this.offset.click.left<this.containment[0]&&(g=this.containment[0]+this.offset.click.left),b.pageY-this.offset.click.top<this.containment[1]&&(h=this.containment[1]+this.offset.click.top),b.pageX-this.offset.click.left>this.containment[2]&&(g=this.containment[2]+this.offset.click.left),b.pageY-this.offset.click.top>this.containment[3]&&(h=this.containment[3]+this.offset.click.top)),c.grid&&(h=this.originalPageY+Math.round((h-this.originalPageY)/c.grid[1])*c.grid[1],h=this.containment?h-this.offset.click.top<this.containment[1]||h-this.offset.click.top>this.containment[3]?h-this.offset.click.top<this.containment[1]?h+c.grid[1]:h-c.grid[1]:h:h,g=this.originalPageX+Math.round((g-this.originalPageX)/c.grid[0])*c.grid[0],g=this.containment?g-this.offset.click.left<this.containment[0]||g-this.offset.click.left>this.containment[2]?g-this.offset.click.left<this.containment[0]?g+c.grid[0]:g-c.grid[0]:g:g)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:e.scrollTop()),left:g-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())}},_rearrange:function(a,b,c,d){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?b.item[0]:b.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var e=this,f=this.counter;window.setTimeout(function(){f==e.counter&&e.refreshPositions(!d)},0)},_clear:function(b,c){this.reverting=!1;var e=[];!this._noFinalSort&&this.currentItem[0].parentNode&&this.placeholder.before(this.currentItem),this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var f in this._storedCSS)if(this._storedCSS[f]=="auto"||this._storedCSS[f]=="static")this._storedCSS[f]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!c&&e.push(function(a){this._trigger("receive",a,this._uiHash(this.fromOutside))}),(this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!c&&e.push(function(a){this._trigger("update",a,this._uiHash())});if(!a.ui.contains(this.element[0],this.currentItem[0])){c||e.push(function(a){this._trigger("remove",a,this._uiHash())});for(f=this.containers.length-1;f>=0;f--)a.ui.contains(this.containers[f].element[0],this.currentItem[0])&&!c&&(e.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.containers[f])),e.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.containers[f])))}for(f=this.containers.length-1;f>=0;f--)c||e.push(function(a){return function(b){a._trigger("deactivate",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over&&(e.push(function(a){return function(b){a._trigger("out",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over=0);this._storedCursor&&a("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex),this.dragging=!1;if(this.cancelHelperRemoval){if(!c){this._trigger("beforeStop",b,this._uiHash());for(f=0;f<e.length;f++)e[f].call(this,b);this._trigger("stop",b,this._uiHash())}return!1}c||this._trigger("beforeStop",b,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!=this.currentItem[0]&&this.helper.remove(),this.helper=null;if(!c){for(f=0;f<e.length;f++)e[f].call(this,b);this._trigger("stop",b,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(b){var c=b||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:b?b.element:null}}}),a.extend(a.ui.sortable,{version:"1.8.13"})}(jQuery),function(a,b){var c={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},d={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},e=a.attrFn||{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0,click:!0};a.widget("ui.dialog",{options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",collision:"fit",using:function(b){var c=a(this).css(b).offset().top;c<0&&a(this).css("top",b.top-c)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title"),typeof this.originalTitle!="string"&&(this.originalTitle=""),this.options.title=this.options.title||this.originalTitle;var b=this,c=b.options,d=c.title||"&#160;",e=a.ui.dialog.getTitleId(b.element),f=(b.uiDialog=a("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+c.dialogClass).css({zIndex:c.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(d){c.closeOnEscape&&d.keyCode&&d.keyCode===a.ui.keyCode.ESCAPE&&(b.close(d),d.preventDefault())}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(a){b.moveToTop(!1,a)});b.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(f);var g=(b.uiDialogTitlebar=a("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(f),h=a('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(a){return b.close(a),!1}).appendTo(g);(b.uiDialogTitlebarCloseText=a("<span></span>")).addClass("ui-icon ui-icon-closethick").text(c.closeText).appendTo(h),a("<span></span>").addClass("ui-dialog-title").attr("id",e).html(d).prependTo(g),a.isFunction(c.beforeclose)&&!a.isFunction(c.beforeClose)&&(c.beforeClose=c.beforeclose),g.find("*").add(g).disableSelection(),c.draggable&&a.fn.draggable&&b._makeDraggable(),c.resizable&&a.fn.resizable&&b._makeResizable(),b._createButtons(c.buttons),b._isOpen=!1,a.fn.bgiframe&&f.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;return a.overlay&&a.overlay.destroy(),a.uiDialog.hide(),a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),a.uiDialog.remove(),a.originalTitle&&a.element.attr("title",a.originalTitle),a},widget:function(){return this.uiDialog},close:function(b){var c=this,d,e;if(!1!==c._trigger("beforeClose",b))return c.overlay&&c.overlay.destroy(),c.uiDialog.unbind("keypress.ui-dialog"),c._isOpen=!1,c.options.hide?c.uiDialog.hide(c.options.hide,function(){c._trigger("close",b)}):(c.uiDialog.hide(),c._trigger("close",b)),a.ui.dialog.overlay.resize(),c.options.modal&&(d=0,a(".ui-dialog").each(function(){this!==c.uiDialog[0]&&(e=a(this).css("z-index"),isNaN(e)||(d=Math.max(d,e)))}),a.ui.dialog.maxZ=d),c},isOpen:function(){return this._isOpen},moveToTop:function(b,c){var d=this,e=d.options;return e.modal&&!b||!e.stack&&!e.modal?d._trigger("focus",c):(e.zIndex>a.ui.dialog.maxZ&&(a.ui.dialog.maxZ=e.zIndex),d.overlay&&(a.ui.dialog.maxZ+=1,d.overlay.$el.css("z-index",a.ui.dialog.overlay.maxZ=a.ui.dialog.maxZ)),b={scrollTop:d.element.attr("scrollTop"),scrollLeft:d.element.attr("scrollLeft")},a.ui.dialog.maxZ+=1,d.uiDialog.css("z-index",a.ui.dialog.maxZ),d.element.attr(b),d._trigger("focus",c),d)},open:function(){if(!this._isOpen){var b=this,c=b.options,d=b.uiDialog;return b.overlay=c.modal?new a.ui.dialog.overlay(b):null,b._size(),b._position(c.position),d.show(c.show),b.moveToTop(!0),c.modal&&d.bind("keypress.ui-dialog",function(b){if(b.keyCode===a.ui.keyCode.TAB){var c=a(":tabbable",this),d=c.filter(":first");c=c.filter(":last");if(b.target===c[0]&&!b.shiftKey)return d.focus(1),!1;if(b.target===d[0]&&b.shiftKey)return c.focus(1),!1}}),a(b.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus(),b._isOpen=!0,b._trigger("open"),b}},_createButtons:function(b){var c=this,d=!1,f=a("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=a("<div></div>").addClass("ui-dialog-buttonset").appendTo(f);c.uiDialog.find(".ui-dialog-buttonpane").remove(),typeof b=="object"&&b!==null&&a.each(b,function(){return!(d=!0)}),d&&(a.each(b,function(b,d){d=a.isFunction(d)?{click:d,text:b}:d;var f=a('<button type="button"></button>').click(function(){d.click.apply(c.element[0],arguments)}).appendTo(g);a.each(d,function(a,b){a!=="click"&&(a in e?f[a](b):f.attr(a,b))}),a.fn.button&&f.button()}),f.appendTo(c.uiDialog))},_makeDraggable:function(){function b(a){return{position:a.position,offset:a.offset}}var c=this,d=c.options,e=a(document),f;c.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(e,h){f=d.height==="auto"?"auto":a(this).height(),a(this).height(a(this).height()).addClass("ui-dialog-dragging"),c._trigger("dragStart",e,b(h))},drag:function(a,d){c._trigger("drag",a,b(d))},stop:function(h,i){d.position=[i.position.left-e.scrollLeft(),i.position.top-e.scrollTop()],a(this).removeClass("ui-dialog-dragging").height(f),c._trigger("dragStop",h,b(i)),a.ui.dialog.overlay.resize()}})},_makeResizable:function(c){function d(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}c=c===b?this.options.resizable:c;var e=this,f=e.options,g=e.uiDialog.css("position");c=typeof c=="string"?c:"n,e,s,w,se,sw,ne,nw",e.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:e.element,maxWidth:f.maxWidth,maxHeight:f.maxHeight,minWidth:f.minWidth,minHeight:e._minHeight(),handles:c,start:function(b,c){a(this).addClass("ui-dialog-resizing"),e._trigger("resizeStart",b,d(c))},resize:function(a,b){e._trigger("resize",a,d(b))},stop:function(b,c){a(this).removeClass("ui-dialog-resizing"),f.height=a(this).height(),f.width=a(this).width(),e._trigger("resizeStop",b,d(c)),a.ui.dialog.overlay.resize()}}).css("position",g).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(b){var c=[],d=[0,0],e;if(b){if(typeof b=="string"||typeof b=="object"&&"0"in b)c=b.split?b.split(" "):[b[0],b[1]],c.length===1&&(c[1]=c[0]),a.each(["left","top"],function(a,b){+c[a]===c[a]&&(d[a]=c[a],c[a]=b)}),b={my:c.join(" "),at:c.join(" "),offset:d.join(" ")};b=a.extend({},a.ui.dialog.prototype.options.position,b)}else b=a.ui.dialog.prototype.options.position;(e=this.uiDialog.is(":visible"))||this.uiDialog.show(),this.uiDialog.css({top:0,left:0}).position(a.extend({of:window},b)),e||this.uiDialog.hide()},_setOptions:function(b){var e=this,f={},g=!1;a.each(b,function(a,b){e._setOption(a,b),a in c&&(g=!0),a in d&&(f[a]=b)}),g&&this._size(),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",f)},_setOption:function(b,c){var d=this,e=d.uiDialog;switch(b){case"beforeclose":b="beforeClose";break;case"buttons":d._createButtons(c);break;case"closeText":d.uiDialogTitlebarCloseText.text(""+c);break;case"dialogClass":e.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+c);break;case"disabled":c?e.addClass("ui-dialog-disabled"):e.removeClass("ui-dialog-disabled");break;case"draggable":var f=e.is(":data(draggable)");f&&!c&&e.draggable("destroy"),!f&&c&&d._makeDraggable();break;case"position":d._position(c);break;case"resizable":(f=e.is(":data(resizable)"))&&!c&&e.resizable("destroy"),f&&typeof c=="string"&&e.resizable("option","handles",c),!f&&c!==!1&&d._makeResizable(c);break;case"title":a(".ui-dialog-title",d.uiDialogTitlebar).html(""+(c||"&#160;"))}a.Widget.prototype._setOption.apply(d,arguments)},_size:function(){var b=this.options,c,d,e=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0}),b.minWidth>b.width&&(b.width=b.minWidth),c=this.uiDialog.css({height:"auto",width:b.width}).height(),d=Math.max(0,b.minHeight-c),b.height==="auto"?a.support.minHeight?this.element.css({minHeight:d,height:"auto"}):(this.uiDialog.show(),b=this.element.css("height","auto").height(),e||this.uiDialog.hide(),this.element.height(Math.max(b,d))):this.element.height(Math.max(b.height-c,0)),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}}),a.extend(a.ui.dialog,{version:"1.8.13",uuid:0,maxZ:0,getTitleId:function(a){return a=a.attr("id"),a||(this.uuid+=1,a=this.uuid),"ui-dialog-title-"+a},overlay:function(b){this.$el=a.ui.dialog.overlay.create(b)}}),a.extend(a.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:a.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),create:function(b){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)return!1})},1),a(document).bind("keydown.dialog-overlay",function(c){b.options.closeOnEscape&&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()});return a.fn.bgiframe&&c.bgiframe(),this.instances.push(c),c},destroy:function(b){var c=a.inArray(b,this.instances);c!=-1&&this.oldInstances.push(this.instances.splice(c,1)[0]),this.instances.length===0&&a([document,window]).unbind(".dialog-overlay"),b.remove();var d=0;a.each(this.instances,function(){d=Math.max(d,this.css("z-index"))}),this.maxZ=d},height:function(){var b,c;return a.browser.msie&&a.browser.version<7?(b=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),c=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),b<c?a(window).height()+"px":b+"px"):a(document).height()+"px"},width:function(){var b,c;return a.browser.msie&&a.browser.version<7?(b=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),c=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),b<c?a(window).width()+"px":b+"px"):a(document).width()+"px"},resize:function(){var b=a([]);a.each(a.ui.dialog.overlay.instances,function(){b=b.add(this)}),b.css({width:0,height:0}).css({width:a.ui.dialog.overlay.width(),height:a.ui.dialog.overlay.height()})}}),a.extend(a.ui.dialog.overlay.prototype,{destroy:function(){a.ui.dialog.overlay.destroy(this.$el)}})}(jQuery),function(d,B){function M(){this.debug=!1,this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._inDialog=this._datepickerShowing=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1},d.extend(this._defaults,this.regional[""]),this.dpDiv=N(d('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function N(a){return a.delegate("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a","mouseout",function(){d(this).removeClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).removeClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!=-1&&d(this).removeClass("ui-datepicker-next-hover")}).delegate("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a","mouseover",function(){d.datepicker._isDisabledDatepicker(J.inline?a.parent()[0]:J.input[0])||(d(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),d(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!=-1&&d(this).addClass("ui-datepicker-next-hover"))})}function H(a,b){d.extend(a,b);for(var c in b)if(b[c]==null||b[c]==B)a[c]=b[c];return a}d.extend(d.ui,{datepicker:{version:"1.8.13"}});var z=(new Date).getTime(),J;d.extend(M.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return H(this._defaults,a||{}),this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase(),f=e=="div"||e=="span",a.id||(this.uuid+=1,a.id="dp"+this.uuid);var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{}),e=="input"?this._connectDatepicker(a,i):f&&this._inlineDatepicker(a,i)},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:b?N(d('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')):this.dpDiv}},_connectDatepicker:function(a,b){var c=d(a);b.append=d([]),b.trigger=d([]),c.hasClass(this.markerClassName)||(this._attachments(c,b),c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),this._autoSize(b),d.data(a,"datepicker",b))},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&&b.append.remove(),c&&(b.append=d('<span class="'+this._appendClass+'">'+c+"</span>"),a[e?"before":"after"](b.append)),a.unbind("focus",this._showDatepicker),b.trigger&&b.trigger.remove(),c=this._get(b,"showOn"),(c=="focus"||c=="both")&&a.focus(this._showDatepicker);if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("<img/>").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('<button type="button"></button>').addClass(this._triggerClass).html(f==""?c:d("<img/>").attr({src:f,alt:c,title:c}))),a[e?"before":"after"](b.trigger),b.trigger.click(function(){return d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():d.datepicker._showDatepicker(a[0]),!1})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var d=function(a){for(var b=0,c=0,d=0;d<a.length;d++)a[d].length>b&&(b=a[d].length,c=d);return c};b.setMonth(d(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort"))),b.setDate(d(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=d(a);c.hasClass(this.markerClassName)||(c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),d.data(a,"datepicker",b),this._setDate(b,this._getDefaultDate(b),!0),this._updateDatepicker(b),this._updateAlternate(b),b.dpDiv.show())},_dialogDatepicker:function(a,b,c,e,f){return a=this._dialogInst,a||(this.uuid+=1,this._dialogInput=d('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>'),this._dialogInput.keydown(this._doKeyDown),d("body").append(this._dialogInput),a=this._dialogInst=this._newInst(this._dialogInput,!1),a.settings={},d.data(this._dialogInput[0],"datepicker",a)),H(a.settings,e||{}),b=b&&b.constructor==Date?this._formatDate(a,b):b,this._dialogInput.val(b),this._pos=f?f.length?f:[f.pageX,f.pageY]:null,this._pos||(this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),a.settings.onSelect=c,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),d.blockUI&&d.blockUI(this.dpDiv),d.data(this._dialogInput[0],"datepicker",a),this},_destroyDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker"),e=="input"?(c.append.remove(),c.trigger.remove(),b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):(e=="div"||e=="span")&&b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input")a.disabled=!1,c.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if(e=="div"||e=="span")b=b.children("."+this._inlineClass),b.children().removeClass("ui-state-disabled"),b.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled");this._disabledInputs=d.map(this._disabledInputs,function(b){return b==a?null:b})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input")a.disabled=!0,c.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if(e=="div"||e=="span")b=b.children("."+this._inlineClass),b.children().addClass("ui-state-disabled"),b.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled");this._disabledInputs=d.map(this._disabledInputs,function(b){return b==a?null:b}),this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]==a)return!0;return!1},_getInst:function(a){try{return d.data(a,"datepicker")}catch(b){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(a,b,c){var e=this._getInst(a);if(arguments.length==2&&typeof b=="string")return b=="defaults"?d.extend({},d.datepicker._defaults):e?b=="all"?d.extend({},e.settings):this._get(e,b):null;var f=b||{};typeof b=="string"&&(f={},f[b]=c);if(e){this._curInst==e&&this._hideDatepicker();var g=this._getDateDatepicker(a,!0),h=this._getMinMaxDate(e,"min"),i=this._getMinMaxDate(e,"max");H(e.settings,f),h!==null&&f.dateFormat!==B&&f.minDate===B&&(e.settings.minDate=this._formatDate(e,h)),i!==null&&f.dateFormat!==B&&f.maxDate===B&&(e.settings.maxDate=this._formatDate(e,i)),this._attachments(d(a),e),this._autoSize(e),this._setDate(e,g),this._updateAlternate(e),this._updateDatepicker(e)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,b){if(a=this._getInst(a))this._setDate(a,b),this._updateDatepicker(a),this._updateAlternate(a)},_getDateDatepicker:function(a,b){return(a=this._getInst(a))&&!a.inline&&this._setDateFromField(a,b),a?this._getDate(a):null},_doKeyDown:function(a){var b=d.datepicker._getInst(a.target),c=!0,e=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=!0;if(d.datepicker._datepickerShowing)switch(a.keyCode){case 9:d.datepicker._hideDatepicker(),c=!1;break;case 13:return c=d("td."+d.datepicker._dayOverClass+":not(."+d.datepicker._currentClass+")",b.dpDiv),c[0]?d.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,c[0]):d.datepicker._hideDatepicker(),!1;case 27:d.datepicker._hideDatepicker();break;case 33:d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 34:d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 35:(a.ctrlKey||a.metaKey)&&d.datepicker._clearDate(a.target),c=a.ctrlKey||a.metaKey;break;case 36:(a.ctrlKey||a.metaKey)&&d.datepicker._gotoToday(a.target),c=a.ctrlKey||a.metaKey;break;case 37:(a.ctrlKey||a.metaKey)&&d.datepicker._adjustDate(a.target,e?1:-1,"D"),c=a.ctrlKey||a.metaKey,a.originalEvent.altKey&&d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 38:(a.ctrlKey||a.metaKey)&&d.datepicker._adjustDate(a.target,-7,"D"),c=a.ctrlKey||a.metaKey;break;case 39:(a.ctrlKey||a.metaKey)&&d.datepicker._adjustDate(a.target,e?-1:1,"D"),c=a.ctrlKey||a.metaKey,a.originalEvent.altKey&&d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 40:(a.ctrlKey||a.metaKey)&&d.datepicker._adjustDate(a.target,7,"D"),c=a.ctrlKey||a.metaKey;break;default:c=!1}else a.keyCode==36&&a.ctrlKey?d.datepicker._showDatepicker(this):c=!1;c&&(a.preventDefault(),a.stopPropagation())},_doKeyPress:function(a){var b=d.datepicker._getInst(a.target);if(d.datepicker._get(b,"constrainInput")){b=d.datepicker._possibleChars(d.datepicker._get(b,"dateFormat"));var c=String.fromCharCode(a.charCode==B?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||c<" "||!b||b.indexOf(c)>-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal)try{d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))&&(d.datepicker._setDateFromField(a),d.datepicker._updateAlternate(a),d.datepicker._updateDatepicker(a))}catch(b){d.datepicker.log(b)}return!0},_showDatepicker:function(a){a=a.target||a,a.nodeName.toLowerCase()!="input"&&(a=d("input",a.parentNode)[0]);if(!d.datepicker._isDisabledDatepicker(a)&&d.datepicker._lastInput!=a){var b=d.datepicker._getInst(a);d.datepicker._curInst&&d.datepicker._curInst!=b&&d.datepicker._curInst.dpDiv.stop(!0,!0);var c=d.datepicker._get(b,"beforeShow");H(b.settings,c?c.apply(a,[a,b]):{}),b.lastVal=null,d.datepicker._lastInput=a,d.datepicker._setDateFromField(b),d.datepicker._inDialog&&(a.value=""),d.datepicker._pos||(d.datepicker._pos=d.datepicker._findPos(a),d.datepicker._pos[1]+=a.offsetHeight);var e=!1;d(a).parents().each(function(){return e|=d(this).css("position")=="fixed",!e}),e&&d.browser.opera&&(d.datepicker._pos[0]-=document.documentElement.scrollLeft,d.datepicker._pos[1]-=document.documentElement.scrollTop),c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]},d.datepicker._pos=null,b.dpDiv.empty(),b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),d.datepicker._updateDatepicker(b),c=d.datepicker._checkOffset(b,c,e),b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),g=function(){var a=b.dpDiv.find("iframe.ui-datepicker-cover");if(a.length){var c=d.datepicker._getBorders(b.dpDiv);a.css({left:-c[0],top:-c[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1),d.datepicker._datepickerShowing=!0,d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,g):b.dpDiv[c||"show"](c?f:null,g),(!c||!f)&&g(),b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus(),d.datepicker._curInst=b}}},_updateDatepicker:function(a){var b=d.datepicker._getBorders(a.dpDiv);J=a,a.dpDiv.empty().append(this._generateHTML(a));var c=a.dpDiv.find("iframe.ui-datepicker-cover");c.length&&c.css({left:-b[0],top:-b[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}),a.dpDiv.find("."+this._dayOverClass+" a").mouseover(),b=this._getNumberOfMonths(a),c=b[1],a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),c>1&&a.dpDiv.addClass("ui-datepicker-multi-"+c).css("width",17*c+"em"),a.dpDiv[(b[0]!=1||b[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi"),a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var e=a.yearshtml;setTimeout(function(){e===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml),e=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),g=a.input?a.input.outerWidth():0,h=a.input?a.input.outerHeight():0,i=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();return b.left-=this._get(a,"isRTL")?e-g:0,b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0,b.top-=c&&b.top==a.input.offset().top+h?d(document).scrollTop():0,b.left-=Math.min(b.left,b.left+e>i&&i>e?Math.abs(b.left+e-i):0),b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+h):0),b},_findPos:function(a){for(var b=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));)a=a[b?"previousSibling":"nextSibling"];return a=d(a).offset(),[a.left,a.top]},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker"))&&this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b),this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e),a||e(),(a=this._get(b,"onClose"))&&a.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]),this._datepickerShowing=!1,this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),d.blockUI&&(d.unblockUI(),d("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){d.datepicker._curInst&&(a=d(a.target),a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&(!d.datepicker._inDialog||!d.blockUI)&&d.datepicker._hideDatepicker())},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);this._isDisabledDatepicker(a[0])||(this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c),this._updateDatepicker(e))},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay)b.selectedDay=b.currentDay,b.drawMonth=b.selectedMonth=b.currentMonth,b.drawYear=b.selectedYear=b.currentYear;else{var c=new Date;b.selectedDay=c.getDate(),b.drawMonth=b.selectedMonth=c.getMonth(),b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b),this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e._selectingMonthYear=!1,e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10),this._notifyChange(e),this._adjustDate(a)},_clickMonthYear:function(a){var b=this._getInst(d(a)[0]);b.input&&b._selectingMonthYear&&setTimeout(function(){b.input.focus()},0),b._selectingMonthYear=!b._selectingMonthYear},_selectDay:function(a,b,c,e){var f=d(a);!d(e).hasClass(this._unselectableClass)&&!this._isDisabledDatepicker(f[0])&&(f=this._getInst(f[0]),f.selectedDay=f.currentDay=d("a",e).html(),f.selectedMonth=f.currentMonth=b,f.selectedYear=f.currentYear=c,this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear)))},_clearDate:function(a){a=d(a),this._getInst(a[0]),this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]),b=b!=null?b:this._formatDate(a),a.input&&a.input.val(b),this._updateAlternate(a);var c=this._get(a,"onSelect");c?c.apply(a.input?a.input[0]:null,[b,a]):a.input&&a.input.trigger("change"),a.inline?this._updateDatepicker(a):(this._hideDatepicker(),this._lastInput=a.input[0],typeof a.input[0]!="object"&&a.input.focus(),this._lastInput=null)},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){return a=a.getDay(),[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime()),a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();return a.setMonth(0),a.setDate(1),Math.floor(Math.round((b-a)/864e5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);for(var f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,g=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,i=(c?c.monthNames:null)||this._defaults.monthNames,j=c=-1,k=-1,l=-1,m=!1,n=function(b){return(b=s+1<a.length&&a.charAt(s+1)==b)&&s++,b},o=function(a){var c=n(a);a=new RegExp("^\\d{1,"+(a=="@"?14:a=="!"?20:a=="y"&&c?4:a=="o"?3:2)+"}"),a=b.substring(r).match(a);if(!a)throw"Missing number at position "+r;return r+=a[0].length,parseInt(a[0],10)},p=function(a,c,e){a=d.map(n(a)?e:c,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)});var f=-1;d.each(a,function(a,c){a=c[1];if(b.substr(r,a.length).toLowerCase()==a.toLowerCase())return f=c[0],r+=a.length,!1});if(f!=-1)return f+1;throw"Unknown name at position "+r},q=function(){if(b.charAt(r)!=a.charAt(s))throw"Unexpected literal at position "+r;r++},r=0,s=0;s<a.length;s++)if(m)a.charAt(s)=="'"&&!n("'")?m=!1:q();else switch(a.charAt(s)){case"d":k=o("d");break;case"D":p("D",f,g);break;case"o":l=o("o");break;case"m":j=o("m");break;case"M":j=p("M",h,i);break;case"y":c=o("y");break;case"@":var t=new Date(o("@"));c=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"!":t=new Date((o("!")-this._ticksTo1970)/1e4),c=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"'":n("'")?q():m=!0;break;default:q()}c==-1?c=(new Date).getFullYear():c<100&&(c+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>e?-100:0));if(l>-1){j=1,k=l;do{e=this._getDaysInMonth(c,j-1);if(k>e)j++,k-=e;else break}while(1)}t=this._daylightSavingAdjust(new Date(c,j-1,k));if(t.getFullYear()!=c||t.getMonth()+1!=j||t.getDate()!=k)throw"Invalid date";return t},ATOM:"yy-mm-dd",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",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,e=(c?c.dayNames:null)||this._defaults.dayNames,f=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:null)||this._defaults.monthNames;var g=function(b){return(b=l+1<a.length&&a.charAt(l+1)==b)&&l++,b},h=function(a,b,c){b=""+b;if(g(a))for(;b.length<c;)b="0"+b;return b},i=function(a,b,c,d){return g(a)?d[b]:c[b]},j="",k=!1;if(b)for(var l=0;l<a.length;l++)if(k)a.charAt(l)=="'"&&!g("'")?k=!1:j+=a.charAt(l);else switch(a.charAt(l)){case"d":j+=h("d",b.getDate(),2);break;case"D":j+=i("D",b.getDay(),d,e);break;case"o":j+=h("o",(b.getTime()-(new Date(b.getFullYear(),0,0)).getTime())/864e5,3);break;case"m":j+=h("m",b.getMonth()+1,2);break;case"M":j+=i("M",b.getMonth(),f,c);break;case"y":j+=g("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case"@":j+=b.getTime();break;case"!":j+=b.getTime()*1e4+this._ticksTo1970;break;case"'":g("'")?j+="'":k=!0;break;default:j+=a.charAt(l)}return j},_possibleChars:function(a){for(var b="",c=!1,d=function(b){return(b=e+1<a.length&&a.charAt(e+1)==b)&&e++,b},e=0;e<a.length;e++)if(c)a.charAt(e)=="'"&&!d("'")?c=!1:b+=a.charAt(e);else switch(a.charAt(e)){case"d":case"m":case"y":case"@":b+="0123456789";break;case"D":case"M":return null;case"'":d("'")?b+="'":c=!0;break;default:b+=a.charAt(e)}return b},_get:function(a,b){return a.settings[b]!==B?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!=a.lastVal){var c=this._get(a,"dateFormat"),d=a.lastVal=a.input?a.input.val():null,e,f;e=f=this._getDefaultDate(a);var g=this._getFormatConfig(a);try{e=this.parseDate(c,d,g)||f}catch(h){this.log(h),d=b?"":d}a.selectedDay=e.getDate(),a.drawMonth=a.selectedMonth=e.getMonth(),a.drawYear=a.selectedYear=e.getFullYear(),a.currentDay=d?e.getDate():0,a.currentMonth=d?e.getMonth():0,a.currentYear=d?e.getFullYear():0,this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var e=function(a){var b=new Date;return b.setDate(b.getDate()+a),b},f=function(b){try{return d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),b,d.datepicker._getFormatConfig(a))}catch(c){}var e=(b.toLowerCase().match(/^c/)?d.datepicker._getDate(a):null)||new Date,f=e.getFullYear(),g=e.getMonth();e=e.getDate();for(var h=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,i=h.exec(b);i;){switch(i[2]||"d"){case"d":case"D":e+=parseInt(i[1],10);break;case"w":case"W":e+=parseInt(i[1],10)*7;break;case"m":case"M":g+=parseInt(i[1],10),e=Math.min(e,d.datepicker._getDaysInMonth(f,g));break;case"y":case"Y":f+=parseInt(i[1],10),e=Math.min(e,d.datepicker._getDaysInMonth(f,g))}i=h.exec(b)}return new Date(f,g,e)};if(b=(b=b==null||b===""?c:typeof b=="string"?f(b):typeof b=="number"?isNaN(b)?c:e(b):new Date(b.getTime()))&&b.toString()=="Invalid Date"?c:b)b.setHours(0),b.setMinutes(0),b.setSeconds(0),b.setMilliseconds(0);return this._daylightSavingAdjust(b)},_daylightSavingAdjust:function(a){return a?(a.setHours(a.getHours()>12?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date)),a.selectedDay=a.currentDay=b.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth(),a.drawYear=a.selectedYear=a.currentYear=b.getFullYear(),(e!=a.selectedMonth||f!=a.selectedYear)&&!c&&this._notifyChange(a),this._adjustInstDate(a),a.input&&a.input.val(d?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),g=this._get(a,"navigationAsDateFormat"),h=this._getNumberOfMonths(a),i=this._get(a,"showCurrentAtPos"),j=this._get(a,"stepMonths"),k=h[0]!=1||h[1]!=1,l=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),m=this._getMinMaxDate(a,"min"),n=this._getMinMaxDate(a,"max");i=a.drawMonth-i;var o=a.drawYear;i<0&&(i+=12,o--);if(n){var p=this._daylightSavingAdjust(new Date(n.getFullYear(),n.getMonth()-h[0]*h[1]+1,n.getDate()));for(p=m&&p<m?m:p;this._daylightSavingAdjust(new Date(o,i,1))>p;)i--,i<0&&(i=11,o--)}a.drawMonth=i,a.drawYear=o,p=this._get(a,"prevText"),p=g?this.formatDate(p,this._daylightSavingAdjust(new Date(o,i-j,1)),this._getFormatConfig(a)):p,p=this._canAdjustMonth(a,-1,o,i)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+z+".datepicker._adjustDate('#"+a.id+"', -"+j+", 'M');\" title=\""+p+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+p+"</span></a>":f?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+p+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+p+"</span></a>";var q=this._get(a,"nextText");q=g?this.formatDate(q,this._daylightSavingAdjust(new Date(o,i+j,1)),this._getFormatConfig(a)):q,f=this._canAdjustMonth(a,1,o,i)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+z+".datepicker._adjustDate('#"+a.id+"', +"+j+", 'M');\" title=\""+q+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+q+"</span></a>":f?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+q+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+q+"</span></a>",j=this._get(a,"currentText"),q=this._get(a,"gotoCurrent")&&a.currentDay?l:b,j=g?this.formatDate(j,q,this._getFormatConfig(a)):j,g=a.inline?"":'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+z+'.datepicker._hideDatepicker();">'+this._get(a,"closeText")+"</button>",e=e?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?g:"")+(this._isInRange(a,q)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+z+".datepicker._gotoToday('#"+a.id+"');\">"+j+"</button>":"")+(c?"":g)+"</div>":"",g=parseInt(this._get(a,"firstDay"),10),g=isNaN(g)?0:g,j=this._get(a,"showWeek"),q=this._get(a,"dayNames"),this._get(a,"dayNamesShort");var r=this._get(a,"dayNamesMin"),s=this._get(a,"monthNames"),t=this._get(a,"monthNamesShort"),u=this._get(a,"beforeShowDay"),v=this._get(a,"showOtherMonths"),w=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var x=this._getDefaultDate(a),y="",A=0;A<h[0];A++){for(var B="",C=0;C<h[1];C++){var D=this._daylightSavingAdjust(new Date(o,i,a.selectedDay)),E=" ui-corner-all",F="";if(k){F+='<div class="ui-datepicker-group';if(h[1]>1)switch(C){case 0:F+=" ui-datepicker-group-first",E=" ui-corner-"+(c?"right":"left");break;case h[1]-1:F+=" ui-datepicker-group-last",E=" ui-corner-"+(c?"left":"right");break;default:F+=" ui-datepicker-group-middle",E=""}F+='">'}F+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+E+'">'+(/all|left/.test(E)&&A==0?c?f:p:"")+(/all|right/.test(E)&&A==0?c?p:f:"")+this._generateMonthYearHeader(a,i,o,m,n,A>0||C>0,s,t)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var G=j?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(E=0;E<7;E++){var H=(E+g)%7;G+="<th"+((E+g+6)%7<5?"":' class="ui-datepicker-week-end"')+'><span title="'+q[H]+'">'+r[H]+"</span></th>"}F+=G+"</tr></thead><tbody>",G=this._getDaysInMonth(o,i),o==a.selectedYear&&i==a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,G)),E=(this._getFirstDayOfMonth(o,i)-g+7)%7,G=k?6:Math.ceil((E+G)/7),H=this._daylightSavingAdjust(new Date(o,i,1-E));for(var I=0;I<G;I++){F+="<tr>";var J=j?'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(H)+"</td>":"";for(E=0;E<7;E++){var K=u?u.apply(a.input?a.input[0]:null,[H]):[!0,""],L=H.getMonth()!=i,M=L&&!w||!K[0]||m&&H<m||n&&H>n;J+='<td class="'+((E+g+6)%7<5?"":" ui-datepicker-week-end")+(L?" ui-datepicker-other-month":"")+(H.getTime()==D.getTime()&&i==a.selectedMonth&&a._keyEvent||x.getTime()==H.getTime()&&x.getTime()==D.getTime()?" "+this._dayOverClass:"")+(M?" "+this._unselectableClass+" ui-state-disabled":"")+(L&&!v?"":" "+K[1]+(H.getTime()==l.getTime()?" "+this._currentClass:"")+(H.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!L||v)&&K[2]?' title="'+K[2]+'"':"")+(M?"":' onclick="DP_jQuery_'+z+".datepicker._selectDay('#"+a.id+"',"+H.getMonth()+","+H.getFullYear()+', this);return false;"')+">"+(L&&!v?"&#xa0;":M?'<span class="ui-state-default">'+H.getDate()+"</span>":'<a class="ui-state-default'+(H.getTime()==b.getTime()?" ui-state-highlight":"")+(H.getTime()==l.getTime()?" ui-state-active":"")+(L?" ui-priority-secondary":"")+'" href="#">'+H.getDate()+"</a>")+"</td>",H.setDate(H.getDate()+1),H=this._daylightSavingAdjust(H)}F+=J+"</tr>"}i++,i>11&&(i=0,o++),F+="</tbody></table>"+(k?"</div>"+(h[0]>0&&C==h[1]-1?'<div class="ui-datepicker-row-break"></div>':""):""),B+=F}y+=B}return y+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':""),a._keyEvent=!1,y},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i=this._get(a,"changeMonth"),j=this._get(a,"changeYear"),k=this._get(a,"showMonthAfterYear"),l='<div class="ui-datepicker-title">',m="";if(f||!i)m+='<span class="ui-datepicker-month">'+g[b]+"</span>";else{g=d&&d.getFullYear()==c;var n=e&&e.getFullYear()==c;m+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+z+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" onclick=\"DP_jQuery_"+z+".datepicker._clickMonthYear('#"+a.id+"');\">";for(var o=0;o<12;o++)(!g||o>=d.getMonth())&&(!n||o<=e.getMonth())&&(m+='<option value="'+o+'"'+(o==b?' selected="selected"':"")+">"+h[o]+"</option>");m+="</select>"}k||(l+=m+(f||!i||!j?"&#xa0;":""));if(!a.yearshtml){a.yearshtml="";if(f||!j)l+='<span class="ui-datepicker-year">'+c+"</span>";else{h=this._get(a,"yearRange").split(":");var p=(new Date).getFullYear();g=function(a){return a=a.match(/c[+-].*/)?c+parseInt(a.substring(1),10):a.match(/[+-].*/)?p+parseInt(a,10):parseInt(a,10),isNaN(a)?p:a},b=g(h[0]),h=Math.max(b,g(h[1]||"")),b=d?Math.max(b,d.getFullYear()):b,h=e?Math.min(h,e.getFullYear()):h;for(a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+z+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+z+".datepicker._clickMonthYear('#"+a.id+"');\">";b<=h;b++)a.yearshtml+='<option value="'+b+'"'+(b==c?' selected="selected"':"")+">"+b+"</option>";a.yearshtml+="</select>",l+=a.yearshtml,a.yearshtml=null}}return l+=this._get(a,"yearSuffix"),k&&(l+=(f||!i||!j?"&#xa0;":"")+m),l+="</div>",l},_adjustInstDate:function(a,b,c){var d=a.drawYear+(c=="Y"?b:0),e=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+(c=="D"?b:0),d=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,b))),a.selectedDay=d.getDate(),a.drawMonth=a.selectedMonth=d.getMonth(),a.drawYear=a.selectedYear=d.getFullYear(),(c=="M"||c=="Y")&&this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");return a=this._getMinMaxDate(a,"max"),b=c&&b<c?c:b,b=a&&b>a?a:b},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){return a=this._get(a,"numberOfMonths"),a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a);return c=this._daylightSavingAdjust(new Date(c,d+(b<0?b:e[0]*e[1]),1)),b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth())),this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");return a=this._getMinMaxDate(a,"max"),(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){return b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear),b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay)),this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}}),d.fn.datepicker=function(a){if(!this.length)return this;d.datepicker.initialized||(d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv),d.datepicker.initialized=!0);var b=Array.prototype.slice.call(arguments,1);return typeof a!="string"||a!="isDisabled"&&a!="getDate"&&a!="widget"?a=="option"&&arguments.length==2&&typeof arguments[1]=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b)):this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)}):d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b))},d.datepicker=new M,d.datepicker.initialized=!1,d.datepicker.uuid=(new Date).getTime(),d.datepicker.version="1.8.13",window["DP_jQuery_"+z]=d}(jQuery),jQuery.effects||function(a,b){function c(b){var c;return b&&b.constructor==Array&&b.length==3?b:(c=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b))?[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10)]:(c=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(b))?[parseFloat(c[1])*2.55,parseFloat(c[2])*2.55,parseFloat(c[3])*2.55]:(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b))?[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)]:(c=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b))?[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)]:/rgba\(0, 0, 0, 0\)/.exec(b)?j.transparent:j[a.trim(b).toLowerCase()]}function d(b,d){var e;do{e=a.curCSS(b,d);if(e!=""&&e!="transparent"||a.nodeName(b,"body"))break;d="backgroundColor"}while(b=b.parentNode);return c(e)}function e(){var a=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,b={},c,d;if(a&&a.length&&a[0]&&a[a[0]])for(var e=a.length;e--;)c=a[e],typeof a[c]=="string"&&(d=c.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),b[d]=a[c]);else for(c in a)typeof a[c]=="string"&&(b[c]=a[c]);return b}function f(b){var c,d;for(c in b)d=b[c],(d==null||a.isFunction(d)||c in l||/scrollbar/.test(c)||!/color/i.test(c)&&isNaN(parseFloat(d)))&&delete b[c];return b}function g(a,b){var c={_:0},d;for(d in b)a[d]!=b[d]&&(c[d]=b[d]);return c}function h(b,c,d,e){typeof b=="object"&&(e=c,d=null,c=b,b=c.effect),a.isFunction(c)&&(e=c,d=null,c={});if(typeof c=="number"||a.fx.speeds[c])e=d,d=c,c={};return a.isFunction(d)&&(e=d,d=null),c=c||{},d=d||c.duration,d=a.fx.off?0:typeof d=="number"?d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default,e=e||c.complete,[b,c,d,e]}function i(b){return!b||typeof b=="number"||a.fx.speeds[b]?!0:typeof b=="string"&&!a.effects[b]?!0:!1}a.effects={},a.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(b,e){a.fx.step[e]=function(a){a.colorInit||(a.start=d(a.elem,e),a.end=c(a.end),a.colorInit=!0),a.elem.style[e]="rgb("+Math.max(Math.min(parseInt(a.pos*(a.end[0]-a.start[0])+a.start[0],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[1]-a.start[1])+a.start[1],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[2]-a.start[2])+a.start[2],10),255),0)+")"}});var j={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]},k=["add","remove","toggle"],l={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.effects.animateClass=function(b,c,d,h){return a.isFunction(d)&&(h=d,d=null),this.queue(function(){var i=a(this),j=i.attr("style")||" ",l=f(e.call(this)),m,n=i.attr("class");a.each(k,function(a,c){b[c]&&i[c+"Class"](b[c])}),m=f(e.call(this)),i.attr("class",n),i.animate(g(l,m),{queue:!1,duration:c,easding:d,complete:function(){a.each(k,function(a,c){b[c]&&i[c+"Class"](b[c])}),typeof i.attr("style")=="object"?(i.attr("style").cssText="",i.attr("style").cssText=j):i.attr("style",j),h&&h.apply(this,arguments),a.dequeue(this)}})})},a.fn.extend({_addClass:a.fn.addClass,addClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{add:b},c,d,e]):this._addClass(b)},_removeClass:a.fn.removeClass,removeClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{remove:b},c,d,e]):this._removeClass(b)},_toggleClass:a.fn.toggleClass,toggleClass:function(c,d,e,f,g){return typeof d=="boolean"||d===b?e?a.effects.animateClass.apply(this,[d?{add:c}:{remove:c},e,f,g]):this._toggleClass(c,d):a.effects.animateClass.apply(this,[{toggle:c},d,e,f])},switchClass:function(b,c,d,e,f){return a.effects.animateClass.apply(this,[{add:c,remove:b},d,e,f])}}),a.extend(a.effects,{version:"1.8.13",save:function(a,b){for(var c=0;c<b.length;c++)b[c]!==null&&a.data("ec.storage."+b[c],a[0].style[b[c]])},restore:function(a,b){for(var c=0;c<b.length;c++)b[c]!==null&&a.css(b[c],a.data("ec.storage."+b[c]))},setMode:function(a,b){return b=="toggle"&&(b=a.is(":hidden")?"show":"hide"),b},getBaseline:function(a,b){var c;switch(a[0]){case"top":c=0;break;case"middle":c=.5;break;case"bottom":c=1;break;default:c=a[0]/b.height}switch(a[1]){case"left":a=0;break;case"center":a=.5;break;case"right":a=1;break;default:a=a[1]/b.width}return{x:a,y:c}},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var c={width:b.outerWidth(!0),height:b.outerHeight(!0),"float":b.css("float")},d=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});return b.wrap(d),d=b.parent(),b.css("position")=="static"?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),d.css(c).show()},removeWrapper:function(a){return a.parent().is(".ui-effects-wrapper")?a.parent().replaceWith(a):a},setTransition:function(b,c,d,e){return e=e||{},a.each(c,function(a,c){unit=b.cssUnit(c),unit[0]>0&&(e[c]=unit[0]*d+unit[1])}),e}}),a.fn.extend({effect:function(b){var c=h.apply(this,arguments),d={options:c[1],duration:c[2],callback:c[3]};c=d.options.mode;var e=a.effects[b];return a.fx.off||!e?c?this[c](d.duration,d.callback):this.each(function(){d.callback&&d.callback.call(this)}):e.call(this,d)},_show:a.fn.show,show:function(a){if(i(a))return this._show.apply(this,arguments);var b=h.apply(this,arguments);return b[1].mode="show",this.effect.apply(this,b)},_hide:a.fn.hide,hide:function(a){if(i(a))return this._hide.apply(this,arguments);var b=h.apply(this,arguments);return b[1].mode="hide",this.effect.apply(this,b)},__toggle:a.fn.toggle,toggle:function(b){if(i(b)||typeof b=="boolean"||a.isFunction(b))return this.__toggle.apply(this,arguments);var c=h.apply(this,arguments);return c[1].mode="toggle",this.effect.apply(this,c)},cssUnit:function(b){var c=this.css(b),d=[];return a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])}),d}}),a.easing.jswing=a.easing.swing,a.extend(a.easing,{def:"easeOutQuad",swing:function(b,c,d,e,f){return a.easing[a.easing.def](b,c,d,e,f)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b+c:d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b+c:-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){return b==0?c:b==e?c+d:(b/=e/2)<1?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){return(b/=e/2)<1?-d/2*(Math.sqrt(1-b*b)-1)+c:d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){a=1.70158;var f=0,g=d;return b==0?c:(b/=e)==1?c+d:(f||(f=e*.3),g<Math.abs(d)?(g=d,a=f/4):a=f/(2*Math.PI)*Math.asin(d/g),-(g*Math.pow(2,10*(b-=1))*Math.sin((b*e-a)*2*Math.PI/f))+c)},easeOutElastic:function(a,b,c,d,e){a=1.70158;var f=0,g=d;return b==0?c:(b/=e)==1?c+d:(f||(f=e*.3),g<Math.abs(d)?(g=d,a=f/4):a=f/(2*Math.PI)*Math.asin(d/g),g*Math.pow(2,-10*b)*Math.sin((b*e-a)*2*Math.PI/f)+d+c)},easeInOutElastic:function(a,b,c,d,e){a=1.70158;var f=0,g=d;return b==0?c:(b/=e/2)==2?c+d:(f||(f=e*.3*1.5),g<Math.abs(d)?(g=d,a=f/4):a=f/(2*Math.PI)*Math.asin(d/g),b<1?-0.5*g*Math.pow(2,10*(b-=1))*Math.sin((b*e-a)*2*Math.PI/f)+c:g*Math.pow(2,-10*(b-=1))*Math.sin((b*e-a)*2*Math.PI/f)*.5+d+c)},easeInBack:function(a,c,d,e,f,g){return g==b&&(g=1.70158),e*(c/=f)*c*((g+1)*c-g)+d},easeOutBack:function(a,c,d,e,f,g){return g==b&&(g=1.70158),e*((c=c/f-1)*c*((g+1)*c+g)+1)+d},easeInOutBack:function(a,c,d,e,f,g){return g==b&&(g=1.70158),(c/=f/2)<1?e/2*c*c*(((g*=1.525)+1)*c-g)+d:e/2*((c-=2)*c*(((g*=1.525)+1)*c+g)+2)+d},easeInBounce:function(b,c,d,e,f){return e-a.easing.easeOutBounce(b,f-c,0,e,f)+d},easeOutBounce:function(a,b,c,d,e){return(b/=e)<1/2.75?d*7.5625*b*b+c:b<2/2.75?d*(7.5625*(b-=1.5/2.75)*b+.75)+c:b<2.5/2.75?d*(7.5625*(b-=2.25/2.75)*b+.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+.984375)+c},easeInOutBounce:function(b,c,d,e,f){return c<f/2?a.easing.easeInBounce(b,c*2,0,e,f)*.5+d:a.easing.easeOutBounce(b,c*2-f,0,e,f)*.5+e*.5+d}})}(jQuery),function(a){a.effects.highlight=function(c){return this.queue(function(){var d=a(this),e=["backgroundImage","backgroundColor","opacity"],f=a.effects.setMode(d,c.options.mode||"show"),g={backgroundColor:d.css("backgroundColor")};f=="hide"&&(g.opacity=0),a.effects.save(d,e),d.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(g,{queue:!1,duration:c.duration,easing:c.options.easing,complete:function(){f=="hide"&&d.hide(),a.effects.restore(d,e),f=="show"&&!a.support.opacity&&this.style.removeAttribute("filter"),c.callback&&c.callback.apply(this,arguments),d.dequeue()}})})}}(jQuery),define("vendor/jquery.ui",function(){}),function(a,b){var c={init:function(c,d,e){var f=this,g;this.warning=g=a(c),this.resume=a(d),this.options=e,this.countdownOpen=!1,this.failedRequests=e.failedRequests,this._startTimer(),a.data(g[0],"idletimeout",this),a.idleTimer(e.idleAfter*1e3),a(document).bind("idle.idleTimer",function(){a.data(document,"idleTimer")==="idle"&&!f.countdownOpen&&(f._stopTimer(),f.countdownOpen=!0,f._idle())}),this.resume.bind("click",function(a){a.preventDefault(),b.clearInterval(f.countdown),f.countdownOpen=!1,f._startTimer(),f._keepAlive(!1),e.onResume.call(f.warning)})},_idle:function(){var a=this,c=this.options,d=this.warning[0],e=c.warningLength;c.onIdle.call(d),c.onCountdown.call(d,e),this.countdown=b.setInterval(function(){--e===0?(window.clearInterval(a.countdown),c.onTimeout.call(d)):c.onCountdown.call(d,e)},1e3)},_startTimer:function(){var a=this;this.timer=b.setTimeout(function(){a._keepAlive()},this.options.pollingInterval*1e3)},_stopTimer:function(){this.failedRequests=this.options.failedRequests,b.clearTimeout(this.timer)},_keepAlive:function(b){var c=this,d=this.options;typeof b=="undefined"&&(b=!0);if(!this.failedRequests){this._stopTimer(),d.onAbort.call(this.warning[0]);return}a.ajax({timeout:d.AJAXTimeout,url:d.keepAliveURL,error:function(){c.failedRequests--},success:function(b){a.trim(b)!==d.serverResponseEquals&&c.failedRequests--},complete:function(){b&&c._startTimer()}})}};a.idleTimeout=function(b,d,e){return c.init(b,d,a.extend(a.idleTimeout.options,e)),this},a.idleTimeout.options={warningLength:30,keepAliveURL:"",serverResponseEquals:"OK",idleAfter:600,pollingInterval:60,failedRequests:5,AJAXTimeout:250,onTimeout:a.noop,onIdle:a.noop,onCountdown:a.noop,onResume:a.noop,onAbort:a.noop}}(jQuery,window),function(a){a.idleTimer=function b(c){var d=!1,e=!0,f=3e4,g="mousemove keydown DOMMouseScroll mousewheel mousedown",h=function(){d=!d,b.olddate=+(new Date),a(document).trigger(a.data(document,"idleTimer",d?"idle":"active")+".idleTimer")},i=function(){e=!1,clearTimeout(a.idleTimer.tId),a(document).unbind(".idleTimer")},j=function(){clearTimeout(a.idleTimer.tId),e&&(d&&h(),a.idleTimer.tId=setTimeout(h,f))};b.olddate=b.olddate||+(new Date);if(typeof c=="number")f=c;else{if(c==="destroy")return i(),this;if(c==="getElapsedTime")return+(new Date)-b.olddate}a(document).bind(a.trim((g+" ").split(" ").join(".idleTimer ")),j),a.idleTimer.tId=setTimeout(h,f),a.data(document,"idleTimer","active")}}(jQuery),define("vendor/jquery.idle",function(){}),function(a){function l(b,c){throw a.extend(b,c),b}function m(a){var b=[];if(k.call(a)!==e)return!1;for(var c=0,d=a.length;c<d;c++)b[c]=a[c].jqote_id;return b.length?b.sort().join(".").replace(/(\b\d+\b)\.(?:\1(\.|$))+/g,"$1$2"):!1}function n(b,c){var d,f=[],c=c||i,h=k.call(b);if(h===g)return b.jqote_id?[b]:!1;if(h!==e)return[a.jqotec(b,c)];if(h===e)for(var j=0,l=b.length;j<l;j++)(d=n(b[j],c))&&f.push(d[0]);return f.length?f:!1}var b="UndefinedTemplateError",c="TemplateCompilationError",d="TemplateExecutionError",e="[object Array]",f="[object String]",g="[object Function]",h=1,i="%",j=/^[^<]*(<[\w\W]+>)[^>]*$/,k=Object.prototype.toString;a.fn.extend({jqote:function(b,c){var b=k.call(b)===e?b:[b],d="";return this.each(function(e){var f=a.jqotec(this,c);for(var g=0;g<b.length;g++)d+=f.call(b[g],e,g,b,f)}),d}}),a.each({app:"append",pre:"prepend",sub:"html"},function(b,c){a.fn["jqote"+b]=function(d,e,f){var g,h,i=a.jqote(d,e,f),k=j.test(i)?a:function(b){return a(document.createTextNode(b))};return!(g=m(n(d)))||(h=new RegExp("(^|\\.)"+g.split(".").join("\\.(.*)?")+"(\\.|$)")),this.each(function(){var d=k(i);a(this)[c](d),(d[0].nodeType===3?a(this):d).trigger("jqote."+b,[d,h])})}}),a.extend({jqote:function(a,c,d){var f="",d=d||i,g=n(a);g===!1&&l(new Error("Empty or undefined template passed to $.jqote"),{type:b}),c=k.call(c)!==e?[c]:c;for(var h=0,j=g.length;h<j;h++)for(var m=0;m<c.length;m++)f+=g[h].call(c[m],h,m,c,g[h]);return f},jqotec:function(e,g){var m,n,o,g=g||i,p=k.call(e);if(p===f&&j.test(e)){n=o=e;if(m=a.jqotecache[e])return m}else{n=p===f||e.nodeType?a(e):e instanceof jQuery?e:null,(!n[0]||!(o=n[0].innerHTML)&&!(o=n.text()))&&l(new Error("Empty or undefined template passed to $.jqotec"),{type:b});if(m=a.jqotecache[a.data(n[0],"jqote_id")])return m}var q="",r,s=o.replace(/\s*<!\[CDATA\[\s*|\s*\]\]>\s*|[\r\n\t]/g,"").split("<"+g).join(g+">").split(g+">");for(var t=0,u=s.length;t<u;t++)q+=s[t].charAt(0)!==""?"out+='"+s[t].replace(/(\\|["'])/g,"\\$1")+"'":s[t].charAt(1)==="="?";out+=("+s[t].substr(2)+");":s[t].charAt(1)==="!"?";out+=$.jqotenc(("+s[t].substr(2)+"));":";"+s[t].substr(1);q="try{"+('var out="";'+q+";return out;").split("out+='';").join("").split('var out="";out+=').join("var out=")+'}catch(e){e.type="'+d+'";e.args=arguments;e.template=arguments.callee.toString();throw e;}';try{var v=new Function("i, j, data, fn",q)}catch(w){l(w,{type:c})}return r=n instanceof jQuery?a.data(n[0],"jqote_id",h):n,a.jqotecache[r]=(v.jqote_id=h++,v)},jqotefn:function(b){var c=k.call(b),d=c===f&&j.test(b)?b:a.data(a(b)[0],"jqote_id");return a.jqotecache[d]||!1},jqotetag:function(a){k.call(a)===f&&(i=a)},jqotenc:function(a){return a.toString().replace(/&(?!\w+;)/g,"&#38;").split("<").join("&#60;").split(">").join("&#62;").split('"').join("&#34;").split("'").join("&#39;")},jqotecache:{}}),a.event.special.jqote={add:function(a){var b,c=a.handler,d=a.data?k.call(a.data)!==e?[a.data]:a.data:[];a.namespace||(a.namespace="app.pre.sub");if(!d.length||!(b=m(n(d))))return;a.handler=function(a,d,e){return!e||e.test(b)?c.apply(this,[a,d]):null}}}}(jQuery),define("vendor/jquery.jqote2",function(){}),function(a){function h(c,h){var j=c==window,l=h&&h.message!==undefined?h.message:undefined;h=a.extend({},a.block.defaults,h||{}),h.overlayCSS=a.extend({},a.block.defaults.overlayCSS,h.overlayCSS||{});var p=a.extend({},a.block.defaults.css,h.css||{}),q=a.extend({},a.block.defaults.themedCSS,h.themedCSS||{});l=l===undefined?h.message:l,j&&f&&i(window,{fadeOut:0});if(l&&typeof l!="string"&&(l.parentNode||l.jquery)){var r=l.jquery?l[0]:l,s={};a(c).data("block.history",s),s.el=r,s.parent=r.parentNode,s.display=r.style.display,s.position=r.style.position,s.parent&&s.parent.removeChild(r)}var t=h.baseZ,u=a.browser.msie||h.forceIframe?a('<iframe class="block" style="z-index:'+t++ +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+h.iframeSrc+'"></iframe>'):a('<div class="block" style="display:none"></div>'),v=h.theme?a('<div class="block blockOverlay ui-widget-overlay" style="z-index:'+t++ +';display:none"></div>'):a('<div class="block blockOverlay" style="z-index:'+t++ +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),w,x;h.theme&&j?x='<div class="block '+h.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+t+';display:none;position:fixed">'+'<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(h.title||"&nbsp;")+"</div>"+'<div class="ui-widget-content ui-dialog-content"></div>'+"</div>":h.theme?x='<div class="block '+h.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+t+';display:none;position:absolute">'+'<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(h.title||"&nbsp;")+"</div>"+'<div class="ui-widget-content ui-dialog-content"></div>'+"</div>":j?x='<div class="block '+h.blockMsgClass+' blockPage" style="z-index:'+t+';display:none;position:fixed"></div>':x='<div class="block '+h.blockMsgClass+' blockElement" style="z-index:'+t+';display:none;position:absolute"></div>',w=a(x),l&&(h.theme?(w.css(q),w.addClass("ui-widget-content")):w.css(p)),!h.theme&&(!h.applyPlatformOpacityRules||!a.browser.mozilla||!/Linux/.test(navigator.platform))&&v.css(h.overlayCSS),v.css("position",j?"fixed":"absolute"),(a.browser.msie||h.forceIframe)&&u.css("opacity",0);var y=[u,v,w],z=j?a("body"):a(c);a.each(y,function(){this.appendTo(z)}),h.theme&&h.draggable&&a.fn.draggable&&w.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var A=d&&(!a.boxModel||a("object,embed",j?null:c).length>0);if(e||A){j&&h.allowBodyStretch&&a.boxModel&&a("html,body").css("height","100%");if((e||!a.boxModel)&&!j)var B=o(c,"borderTopWidth"),C=o(c,"borderLeftWidth"),D=B?"(0 - "+B+")":0,E=C?"(0 - "+C+")":0;a.each([u,v,w],function(a,b){var c=b[0].style;c.position="absolute";if(a<2)j?c.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+h.quirksmodeOffsetHack+') + "px"'):c.setExpression("height",'this.parentNode.offsetHeight + "px"'),j?c.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):c.setExpression("width",'this.parentNode.offsetWidth + "px"'),E&&c.setExpression("left",E),D&&c.setExpression("top",D);else if(h.centerY)j&&c.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),c.marginTop=0;else if(!h.centerY&&j){var d=h.css&&h.css.top?parseInt(h.css.top):0,e="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+d+') + "px"';c.setExpression("top",e)}})}l&&(h.theme?w.find(".ui-widget-content").append(l):w.append(l),(l.jquery||l.nodeType)&&a(l).show()),(a.browser.msie||h.forceIframe)&&h.showOverlay&&u.show();if(h.fadeIn){var F=h.onBlock?h.onBlock:b,G=h.showOverlay&&!l?F:b,H=l?F:b;h.showOverlay&&v._fadeIn(h.fadeIn,G),l&&w._fadeIn(h.fadeIn,H)}else h.showOverlay&&v.show(),l&&w.show(),h.onBlock&&h.onBlock();k(1,c,h),j?(f=w[0],g=a(":input:enabled:visible",f),h.focusInput&&setTimeout(m,20)):n(w[0],h.centerX,h.centerY);if(h.timeout){var I=setTimeout(function(){j?a.unblock(h):a(c).unblock(h)},h.timeout);a(c).data("block.timeout",I)}}function i(b,c){var d=b==window,e=a(b),h=e.data("block.history"),i=e.data("block.timeout");i&&(clearTimeout(i),e.removeData("block.timeout")),c=a.extend({},a.block.defaults,c||{}),k(0,b,c);var l;d?l=a("body").children().filter(".block").add("body > .block"):l=a(".block",b),d&&(f=g=null),c.fadeOut?(l.fadeOut(c.fadeOut),setTimeout(function(){j(l,h,c,b)},c.fadeOut)):j(l,h,c,b)}function j(b,c,d,e){b.each(function(a,b){this.parentNode&&this.parentNode.removeChild(this)}),c&&c.el&&(c.el.style.display=c.display,c.el.style.position=c.position,c.parent&&c.parent.appendChild(c.el),a(e).removeData("block.history")),typeof d.onUnblock=="function"&&d.onUnblock(e,d)}function k(b,c,d){var e=c==window,g=a(c);if(!b&&(e&&!f||!e&&!g.data("block.isBlocked")))return;e||g.data("block.isBlocked",b);if(!d.bindEvents||b&&!d.showOverlay)return;var h="mousedown mouseup keydown keypress";b?a(document).bind(h,d,l):a(document).unbind(h,l)}function l(b){if(b.keyCode&&b.keyCode==9&&f&&b.data.constrainTabKey){var c=g,d=!b.shiftKey&&b.target===c[c.length-1],e=b.shiftKey&&b.target===c[0];if(d||e)return setTimeout(function(){m(e)},10),!1}var h=b.data;return a(b.target).parents("div."+h.blockMsgClass).length>0?!0:a(b.target).parents().children().filter("div.block").length==0}function m(a){if(!g)return;var b=g[a===!0?g.length-1:0];b&&b.focus()}function n(a,b,c){var d=a.parentNode,e=a.style,f=(d.offsetWidth-a.offsetWidth)/2-o(d,"borderLeftWidth"),g=(d.offsetHeight-a.offsetHeight)/2-o(d,"borderTopWidth");b&&(e.left=f>0?f+"px":"0"),c&&(e.top=g>0?g+"px":"0")}function o(b,c){return parseInt(a.css(b,c))||0}if(/1\.(0|1|2)\.(0|1|2)/.test(a.fn.jquery)||/^1.1/.test(a.fn.jquery)){alert("block requires jQuery v1.2.3 or later!  You are using v"+a.fn.jquery);return}a.fn._fadeIn=a.fn.fadeIn;var b=function(){},c=document.documentMode||0,d=a.browser.msie&&(a.browser.version<8&&!c||c<8),e=a.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!c;a.block=function(a){h(window,a)},a.unblock=function(a){i(window,a)},a.growlUI=function(b,c,d,e){var f=a('<div class="growlUI"></div>');b&&f.append("<h1>"+b+"</h1>"),c&&f.append("<h2>"+c+"</h2>"),d==undefined&&(d=3e3),a.block({message:f,fadeIn:700,fadeOut:1e3,centerY:!1,timeout:d,showOverlay:!1,onUnblock:e,css:a.block.defaults.growlCSS})},a.fn.block=function(b){return this.unblock({fadeOut:0}).each(function(){a.css(this,"position")=="static"&&(this.style.position="relative"),a.browser.msie&&(this.style.zoom=1),h(this,b)})},a.fn.unblock=function(a){return this.each(function(){i(this,a)})},a.block.version=2.38,a.block.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,applyPlatformOpacityRules:!0,onBlock:null,onUnblock:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg"};var f=null,g=[]}(jQuery),define("vendor/jquery.block",function(){}),function(a){function c(a){return typeof a=="object"?a:{top:a,left:a}}var b=a.scrollTo=function(b,c,d){a(window).scrollTo(b,c,d)};b.defaults={axis:"xy",duration:parseFloat(a.fn.jquery)<1.3?1:0},b.window=function(b){return a(window)._scrollable()},a.fn._scrollable=function(){return this.map(function(){var b=this,c=!b.nodeName||a.inArray(b.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!c)return b;var d=(b.contentWindow||b).document||b.ownerDocument||b;return a.browser.safari||d.compatMode=="BackCompat"?d.body:d.documentElement})},a.fn.scrollTo=function(d,e,f){return typeof e=="object"&&(f=e,e=0),typeof f=="function"&&(f={onAfter:f}),d=="max"&&(d=9e9),f=a.extend({},b.defaults,f),e=e||f.speed||f.duration,f.queue=f.queue&&f.axis.length>1,f.queue&&(e/=2),f.offset=c(f.offset),f.over=c(f.over),this._scrollable().each(function(){function m(a){h.animate(k,e,f.easing,a&&function(){a.call(this,d,f)})}var g=this,h=a(g),i=d,j,k={},l=h.is("html,body");switch(typeof i){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(i)){i=c(i);break}i=a(i,this);case"object":if(i.is||i.style)j=(i=a(i)).offset()}a.each(f.axis.split(""),function(a,c){var d=c=="x"?"Left":"Top",e=d.toLowerCase(),n="scroll"+d,o=g[n],p=b.max(g,c);if(j)k[n]=j[e]+(l?0:o-h.offset()[e]),f.margin&&(k[n]-=parseInt(i.css("margin"+d))||0,k[n]-=parseInt(i.css("border"+d+"Width"))||0),k[n]+=f.offset[e]||0,f.over[e]&&(k[n]+=i[c=="x"?"width":"height"]()*f.over[e]);else{var q=i[e];k[n]=q.slice&&q.slice(-1)=="%"?parseFloat(q)/100*p:q}/^\d+$/.test(k[n])&&(k[n]=k[n]>0?Math.min(k[n],p):0),!a&&f.queue&&(o!=k[n]&&m(f.onAfterFirst),delete k[n])}),m(f.onAfter)}).end()},b.max=function(b,c){var d=c=="x"?"Width":"Height",e="scroll"+d;if(!a(b).is("html,body"))return b[e]-a(b)[d.toLowerCase()]();var f="client"+d,g=b.ownerDocument.documentElement,h=b.ownerDocument.body;return Math.max(g[e],h[e])-Math.min(g[f],h[f])}}(jQuery),define("vendor/jquery.scrollto",function(){}),$.ajaxSetup({statusCode:{302:function(a){try{var b=$.parseJSON(a.responseText);window.location=b.redirect}catch(c){}}}}),$(document).ajaxSend(function(a,b,c){function d(a){var b=null;if(document.cookie&&document.cookie!=""){var c=document.cookie.split(";");for(var d=0;d<c.length;d++){var e=jQuery.trim(c[d]);if(e.substring(0,a.length+1)==a+"="){b=decodeURIComponent(e.substring(a.length+1));break}}}return b}function e(a){var b=document.location.host,c=document.location.protocol,d="//"+b,e=c+d;return a==e||a.slice(0,e.length+1)==e+"/"||a==d||a.slice(0,d.length+1)==d+"/"||!/^(\/\/|http:|https:).*/.test(a)}function f(a){return/^(GET|HEAD|OPTIONS|TRACE)$/.test(a)}!f(c.type)&&e(c.url)&&b.setRequestHeader("X-CSRFToken",App.csrftoken||"")}),define("cilantro/utils/ajaxsetup",function(){}),Array.prototype.map||(Array.prototype.map=function(a){var b=this.length>>>0;if(typeof a!="function")throw new TypeError;var c=new Array(b),d=arguments[1];for(var e=0;e<b;e++)e in this&&(c[e]=a.call(d,this[e],e,this));return c}),function(a){a.extend({putJSON:function(b,c,d,e){return a.ajax({type:"PUT",url:b,contentType:"application/json",data:c,success:d,dataType:e})},postJSON:function(b,c,d,e){return a.ajax({type:"POST",url:b,contentType:"application/json",data:c,success:d,dataType:e})},patchJSON:function(b,c,d,e){return a.ajax({type:"PATCH",url:b,contentType:"application/json",data:c,success:d,dataType:e})},log:function(a){window.console?console.log(a):alert(a)},jqoteobj:function(b,c,d){return out=a.jqote(b,c,d),a(out)},scrape:function(b){var c="<!doctype html>";c+="<html",a.each(a("html")[0].attributes,function(){c+=" "+this.name+'="'+this.value+'"'}),c+=">",a(":text").each(function(){var b=a(this);b.attr("defaultValue",b.val())}),a("textarea").each(function(){var b=a(this);b.attr("innerText",b.val())}),a("select").each(function(){var b=a("option",this);b.each(function(){var b=a(this);b.attr("selected")?this.setAttribute("selected",""):b.removeAttr("selected")})}),a(":checkbox, :radio").each(function(){var b=a(this);b.attr("checked")?this.setAttribute("checked",""):b.removeAttr("checked")});var d=a("html").clone();return a("script",d).remove(),b&&a(b,d).remove(),a("a",d).attr({href:"#",onClick:"return false"}),c+d.html()+"</html>"}}),a.fn.placeholder=function(b){var c=this;return c.each(function(){var d=a(this),e=d.css("color");b=b||d.attr("placeholder");if(!d.is("input")&&!d.is("textarea"))return c;(d.val()===""||d.val()===b)&&d.val(b).css("color","#999"),d.focus(function(){d.val()===b&&d.css("color",e).val("")}).blur(function(){d.css("color",e),d.val()===""&&d.css("color","#999").val(b)})}),this},a.fn.jdata=function(b,c){var d=a.grep(this,function(d){return a(d).data(b)==c});return a(d)},a.fn.autocomplete2=function(b,c,d,e){if(!this.is("input[type=text]")&&!this.is("input[type=search]"))throw new TypeError("A text or search field is required");c=c||null,d=d||300,e=e||!1;var f=a.extend({},b),g=f.success||function(){},h=f.error||function(){},i=f.start||function(){},j=f.end||function(){};return f.data={},this.each(function(b){var k=a(this),l,m,n,o=null,p=null,q=null,r=!1;l=k.closest("form").submit(function(a){return!1}),f.url=l.attr("action"),f.success=function(a,b,c){g(m,a,b,c),q==null&&e&&(q={resp:a,status:b,xhr:c}),n&&b=="success"&&(k.cache[m]=a),o=m,r=!1,f.end()},f.error=function(a,b,c){h(m,a,b,c),f.end()},f.start=function(){r=!0,i(m)},f.end=function(){r=!1,j()};var s="search-"+b;k.cache={},k.bind(s,function(b,g,h){n=h?!0:!1,m=g;if(n&&k.cache[m]){f.success(k.cache[m],"cached",null);return}clearTimeout(p),c!==null&&m===c&&(m=""),m=m||"",m=SearchSanitizer.clean(m).toLowerCase(),m!==o?(r==0&&f.start(),f.data.q=m,p=setTimeout(function(){e&&q?f.success(q.resp,q.status,q.xhr):a.ajax(f)},d)):f.end()}),k.keyup(function(a){return k.trigger(s,[this.value]),!1})})},a.fn.tabs=function(){var b={nextTab:function(a,b,c,d){return b=b===undefined?a.data("tabindex"):b,c=c||a.attr("children").length,d=d===undefined?0:d+1,d==c?null:c+1>b?a.children(":nth("+b+")").hasClass("disabled")?this.nextTab(a,b+1,c,d):b:this.nextTab(a,0,c,d)},getTab:function(a,b){return a.children(":nth("+b+")")}},c={init:function(b,c,e){b.data("tabified",!0),c=c===!0?!0:!1,e=e||function(){};var f=b.children(".tab");c?a(".tab",b).live("click",d(e)):f.click(d(e)),f.filter(".active").length===0&&f.not(".disabled").filter(":first").click()},toggle:function(a,c){b.getTab(a,c).click(),a.data("tabindex",c)},disable:function(a,c){b.getTab(a,c).addClass("disabled").removeClass("active"),nindex=b.nextTab(a,c),nindex!==null&&this.toggle(a,nindex)},enable:function(a,c){b.getTab(a,c).removeClass("disabled")}},d=function(b){return function(c){c.preventDefault();var d=a(this).not(".disabled");if(d.length==0||d.hasClass("active"))return!1;var e=d.siblings(".tab");d.addClass("active"),e.removeClass("active"),b(c,d)}};return function(a,b){if(typeof a=="string"){if(this.data("tabified")===null)throw new TypeError("tabs have not been initialized yet");c[a](this,b)}else c.init(this,a,b);return this}}()}(jQuery),define("cilantro/utils/extensions",function(){});var SearchSanitizer={regexes:{truncateWhiteSpace:[/\s{2,}/g," "],removeNonstandardChars:[/[^\sA-Za-z0-9\.\-\_\+]/g,""],removeStopWords:[/\b(a|able|about|across|after|all|almost|also|am|among|an|and|any|are|as|at|be|because|been|but|by|can|cannot|could|dear|did|do|does|either|else|ever|every|for|from|get|got|had|has|have|he|her|hers|him|his|how|however|i|if|in|into|is|it|its|just|least|let|like|likely|may|me|might|most|must|my|neither|no|nor|not|of|off|often|on|only|or|other|our|own|rather|said|say|says|she|should|since|so|some|than|that|the|their|them|then|there|these|they|this|tis|to|too|twas|us|wants|was|we|were|what|when|where|which|while|who|whom|why|will|with|would|yet|you|your)\b/g,""],trimRightWhiteSpace:[/^\s+/,""],trimLeftWhiteSpace:[/\s+$/,""]},clean:function(a){for(var b in this.regexes){var c=this.regexes[b];a=a.replace(c[0],c[1])}return a}};define("cilantro/utils/sanitizer",function(){}),this.JSON||(this.JSON={}),function(){function l(a){return a<10?"0"+a:a}function o(a){return p.lastIndex=0,p.test(a)?'"'+a.replace(p,function(a){var b=r[a];return typeof b=="string"?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function m(a,b){var c,d,e,f,g=h,i,j=b[a];j&&typeof j=="object"&&typeof j.toJSON=="function"&&(j=j.toJSON(a)),typeof k=="function"&&(j=k.call(b,a,j));switch(typeof j){case"string":return o(j);case"number":return isFinite(j)?String(j):"null";case"boolean":case"null":return String(j);case"object":if(!j)return"null";h+=n,i=[];if(Object.prototype.toString.apply(j)==="[object Array]"){f=j.length;for(c=0;c<f;c+=1)i[c]=m(c,j)||"null";return e=i.length===0?"[]":h?"[\n"+h+i.join(",\n"+h)+"\n"+g+"]":"["+i.join(",")+"]",h=g,e}if(k&&typeof k=="object"){f=k.length;for(c=0;c<f;c+=1)d=k[c],typeof d=="string"&&(e=m(d,j))&&i.push(o(d)+(h?": ":":")+e)}else for(d in j)Object.hasOwnProperty.call(j,d)&&(e=m(d,j))&&i.push(o(d)+(h?": ":":")+e);return e=i.length===0?"{}":h?"{\n"+h+i.join(",\n"+h)+"\n"+g+"}":"{"+i.join(",")+"}",h=g,e}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+l(this.getUTCMonth()+1)+"-"+l(this.getUTCDate())+"T"+l(this.getUTCHours())+":"+l(this.getUTCMinutes())+":"+l(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var q=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,p=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,h,n,r={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;typeof JSON.stringify!="function"&&(JSON.stringify=function(a,b,c){var d;n=h="";if(typeof c=="number")for(d=0;d<c;d+=1)n+=" ";else typeof c=="string"&&(n=c);if(!(k=b)||typeof b=="function"||typeof b=="object"&&typeof b.length=="number")return m("",{"":a});throw Error("JSON.stringify")}),typeof JSON.parse!="function"&&(JSON.parse=function(b,f){function c(a,b){var d,e,g=a[b];if(g&&typeof g=="object")for(d in g)Object.hasOwnProperty.call(g,d)&&(e=c(g,d),e!==undefined?g[d]=e:delete g[d]);return f.call(a,b,g)}var d;b=String(b),q.lastIndex=0,q.test(b)&&(b=b.replace(q,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(b.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return d=eval("("+b+")"),typeof f=="function"?c({"":d},""):d;throw new SyntaxError("JSON.parse")})}(),define("vendor/json2",function(){}),define("cilantro/main",["cilantro/core","cilantro/utils/logging","order!vendor/jquery.ui","order!vendor/jquery.idle","order!vendor/jquery.jqote2","order!vendor/jquery.block","order!vendor/jquery.scrollto","order!cilantro/utils/ajaxsetup","order!cilantro/utils/extensions","order!cilantro/utils/sanitizer"],function(a,b){return window.JSON||require(["vendor/json2"]),$.block.defaults.message=null,$.block.defaults.css={},$.block.defaults.overlayCSS={},App.Log=new b.Log,App.LogView=new b.LogView,$.idleTimer(1e4),$(document).bind({"idle.idleTimer":function(){return App.hub.publish("session/idle")},"active.idleTimer":function(){return App.hub.publish("session/resume")}})})