text: (function(d,b){function a(a,b){var e,f;e=a.nodeName.toLowerCase();if("area"===e){e=a.parentNode;f=e.name;if(!a.href||!f||"map"!==e.nodeName.toLowerCase())return!1;e=d("img[usemap=#"+f+"]")[0];return!!e&&c(e)}return(/input|select|textarea|button|object/.test(e)?!a.disabled:"a"===e?a.href||b:b)&&c(a)}function c(c){return!d(c).parents().andSelf().filter(function(){return"hidden"===d.css(this,"visibility")||d.expr.filters.hidden(this)}).length}var e=0,f=/^ui-id-\d+$/;d.ui=d.ui||{};d.ui.version||(d.extend(d.ui,{version:"1.9.0",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),d.fn.extend({_focus:d.fn.focus,focus:function(c,a){return"number"===typeof c?this.each(function(){var b=this;setTimeout(function(){d(b).focus();a&&a.call(b)},c)}):this._focus.apply(this,arguments)},scrollParent:function(){var c;c=d.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(d.css(this,"position"))&&/(auto|scroll)/.test(d.css(this,"overflow")+d.css(this,"overflow-y")+d.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(d.css(this,"overflow")+d.css(this,"overflow-y")+d.css(this,"overflow-x"))}).eq(0);return/fixed/.test(this.css("position"))||!c.length?d(document):c},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length)for(var c=d(this[0]),a;c.length&&c[0]!==document;){a=c.css("position");if("absolute"===a||"relative"===a||"fixed"===a)if(a=parseInt(c.css("zIndex"),10),!isNaN(a)&&0!==a)return a;c=c.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})},removeUniqueId:function(){return this.each(function(){f.test(this.id)&&d(this).removeAttr("id")})}}),d("<a>").outerWidth(1).jquery||d.each(["Width","Height"],function(c,a){function e(c,a,b,g){d.each(f,function(){a-=parseFloat(d.css(c,"padding"+this))||0;b&&(a-=parseFloat(d.css(c,"border"+this+"Width"))||0);g&&(a-=parseFloat(d.css(c,"margin"+this))||0)});return a}var f="Width"===a?["Left","Right"]:["Top","Bottom"],k=a.toLowerCase(),l={innerWidth:d.fn.innerWidth,innerHeight:d.fn.innerHeight,outerWidth:d.fn.outerWidth,outerHeight:d.fn.outerHeight};d.fn["inner"+a]=function(c){return c===b?l["inner"+a].call(this):this.each(function(){d(this).css(k,e(this,c)+"px")})};d.fn["outer"+a]=function(c,b){return"number"!==typeof c?l["outer"+a].call(this,c):this.each(function(){d(this).css(k,e(this,c,!0,b)+"px")})}}),d.extend(d.expr[":"],{data:d.expr.createPseudo?d.expr.createPseudo(function(c){return function(a){return!!d.data(a,c)}}):function(c,a,b){return!!d.data(c,b[3])},focusable:function(c){return a(c,!isNaN(d.attr(c,"tabindex")))},tabbable:function(c){var b=d.attr(c,"tabindex"),e=isNaN(b);return(e||0<=b)&&a(c,!e)}}),d(function(){var c=document.body,a=c.appendChild(a=document.createElement("div"));a.offsetHeight;d.extend(a.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});d.support.minHeight=100===a.offsetHeight;d.support.selectstart="onselectstart"in a;c.removeChild(a).style.display="none"}),d.fn.extend({disableSelection:function(){return this.bind((d.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(c){c.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),d.extend(d.ui,{plugin:{add:function(c,a,b){var e,c=d.ui[c].prototype;for(e in b)c.plugins[e]=c.plugins[e]||[],c.plugins[e].push([a,b[e]])},call:function(c,a,d){var b=c.plugins[a];if(b&&c.element[0].parentNode&&11!==c.element[0].parentNode.nodeType)for(a=0;a<b.length;a++)c.options[b[a][0]]&&b[a][1].apply(c.element,d)}},contains:d.contains,hasScroll:function(c,a){if("hidden"===d(c).css("overflow"))return!1;var b=a&&"left"===a?"scrollLeft":"scrollTop",e=!1;if(0<c[b])return!0;c[b]=1;e=0<c[b];c[b]=0;return e},isOverAxis:function(c,a,d){return c>a&&c<a+d},isOver:function(c,a,b,e,f,l){return d.ui.isOverAxis(c,b,f)&&d.ui.isOverAxis(a,e,l)}}))})(jQuery);(function(d,b){var a=0,c=Array.prototype.slice,e=d.cleanData;d.cleanData=function(c){for(var a=0,b;null!=(b=c[a]);a++)try{d(b).triggerHandler("remove")}catch(j){}e(c)};d.widget=function(c,a,b){var e,i,k,l,m=c.split(".")[0],c=c.split(".")[1];e=m+"-"+c;b||(b=a,a=d.Widget);d.expr[":"][e.toLowerCase()]=function(c){return!!d.data(c,e)};d[m]=d[m]||{};i=d[m][c];k=d[m][c]=function(c,a){if(!this._createWidget)return new k(c,a);arguments.length&&this._createWidget(c,a)};d.extend(k,i,{version:b.version,_proto:d.extend({},b),_childConstructors:[]});l=new a;l.options=d.widget.extend({},l.options);d.each(b,function(c,e){d.isFunction(e)&&(b[c]=function(){var d=function(){return a.prototype[c].apply(this,arguments)},b=function(d){return a.prototype[c].apply(this,d)};return function(){var c=this._super,a=this._superApply,f;this._super=d;this._superApply=b;f=e.apply(this,arguments);this._super=c;this._superApply=a;return f}}())});k.prototype=d.widget.extend(l,{widgetEventPrefix:c},b,{constructor:k,namespace:m,widgetName:c,widgetBaseClass:e,widgetFullName:e});i?(d.each(i._childConstructors,function(c,a){var b=a.prototype;d.widget(b.namespace+"."+b.widgetName,k,a._proto)}),delete i._childConstructors):a._childConstructors.push(k);d.widget.bridge(c,k)};d.widget.extend=function(a){for(var e=c.call(arguments,1),h=0,j=e.length,i,k;h<j;h++)for(i in e[h])k=e[h][i],e[h].hasOwnProperty(i)&&k!==b&&(a[i]=d.isPlainObject(k)?d.widget.extend({},a[i],k):k);return a};d.widget.bridge=function(a,e){var h=e.prototype.widgetFullName;d.fn[a]=function(j){var i="string"===typeof j,k=c.call(arguments,1),l=this,j=!i&&k.length?d.widget.extend.apply(null,[j].concat(k)):j;i?this.each(function(){var c,e=d.data(this,h);if(!e)return d.error("cannot call methods on "+a+" prior to initialization; attempted to call method '"+j+"'");if(!d.isFunction(e[j])||"_"===j.charAt(0))return d.error("no such method '"+j+"' for "+a+" widget instance");c=e[j].apply(e,k);if(c!==e&&c!==b)return l=c&&c.jquery?l.pushStack(c.get()):c,!1}):this.each(function(){var c=d.data(this,h);c?c.option(j||{})._init():new e(j,this)});return l}};d.Widget=function(){};d.Widget._childConstructors=[];d.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(c,b){b=d(b||this.defaultElement||this)[0];this.element=d(b);this.uuid=a++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=d.widget.extend({},this.options,this._getCreateOptions(),c);this.bindings=d();this.hoverable=d();this.focusable=d();b!==this&&(d.data(b,this.widgetName,this),d.data(b,this.widgetFullName,this),this._on({remove:"destroy"}),this.document=d(b.style?b.ownerDocument:b.document||b),this.window=d(this.document[0].defaultView||this.document[0].parentWindow));this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:d.noop,_getCreateEventData:d.noop,_create:d.noop,_init:d.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(d.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:d.noop,widget:function(){return this.element},option:function(c,a){var e=c,j,i,k;if(0===arguments.length)return d.widget.extend({},this.options);if("string"===typeof c)if(e={},j=c.split("."),c=j.shift(),j.length){i=e[c]=d.widget.extend({},this.options[c]);for(k=0;k<j.length-1;k++)i[j[k]]=i[j[k]]||{},i=i[j[k]];c=j.pop();if(a===b)return i[c]===b?null:i[c];i[c]=a}else{if(a===b)return this.options[c]===b?null:this.options[c];e[c]=a}this._setOptions(e);return this},_setOptions:function(c){for(var a in c)this._setOption(a,c[a]);return this},_setOption:function(c,a){this.options[c]=a;"disabled"===c&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!a).attr("aria-disabled",a),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"));return this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(c,a){a?(c=d(c),this.bindings=this.bindings.add(c)):(a=c,c=this.element);var b=this;d.each(a,function(a,e){function g(){if(!(b.options.disabled===true||d(this).hasClass("ui-state-disabled")))return(typeof e==="string"?b[e]:e).apply(b,arguments)}if(typeof e!=="string")g.guid=e.guid=e.guid||g.guid||d.guid++;var l=a.match(/^(\w+)\s*(.*)$/),m=l[1]+b.eventNamespace;(l=l[2])?b.widget().delegate(l,m,g):c.bind(m,g)})},_off:function(c,a){a=(a||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;c.unbind(a).undelegate(a)},_delay:function(c,a){var b=this;return setTimeout(function(){return("string"===typeof c?b[c]:c).apply(b,arguments)},a||0)},_hoverable:function(c){this.hoverable=this.hoverable.add(c);this._on(c,{mouseenter:function(c){d(c.currentTarget).addClass("ui-state-hover")},mouseleave:function(c){d(c.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(c){this.focusable=this.focusable.add(c);this._on(c,{focusin:function(c){d(c.currentTarget).addClass("ui-state-focus")},focusout:function(c){d(c.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(c,a,b){var e,i=this.options[c],b=b||{},a=d.Event(a);a.type=(c===this.widgetEventPrefix?c:this.widgetEventPrefix+c).toLowerCase();a.target=this.element[0];if(c=a.originalEvent)for(e in c)e in a||(a[e]=c[e]);this.element.trigger(a,b);return!(d.isFunction(i)&&!1===i.apply(this.element[0],[a].concat(b))||a.isDefaultPrevented())}};d.each({show:"fadeIn",hide:"fadeOut"},function(c,a){d.Widget.prototype["_"+c]=function(b,e,i){"string"===typeof e&&(e={effect:e});var k,l=!e?c:!0===e||"number"===typeof e?a:e.effect||a,e=e||{};"number"===typeof e&&(e={duration:e});k=!d.isEmptyObject(e);e.complete=i;e.delay&&b.delay(e.delay);if(k&&d.effects&&(d.effects.effect[l]||!1!==d.uiBackCompat&&d.effects[l]))b[c](e);else if(l!==c&&b[l])b[l](e.duration,e.easing,i);else b.queue(function(a){d(this)[c]();i&&i.call(b[0]);a()})}});!1!==d.uiBackCompat&&(d.Widget.prototype._getCreateOptions=function(){return d.metadata&&d.metadata.get(this.element[0])[this.widgetName]})})(jQuery);(function(d){var b=!1;d(document).mouseup(function(){b=!1});d.widget("ui.mouse",{version:"1.9.0",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(c){return a._mouseDown(c)}).bind("click."+this.widgetName,function(c){if(!0===d.data(c.target,a.widgetName+".preventClickEvent"))return d.removeData(c.target,a.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1});this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);this._mouseMoveDelegate&&d(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(a){if(!b){this._mouseStarted&&this._mouseUp(a);this._mouseDownEvent=a;var c=this,e=1===a.which,f="string"===typeof this.options.cancel&&a.target.nodeName?d(a.target).closest(this.options.cancel).length:!1;if(!e||f||!this._mouseCapture(a))return!0;this.mouseDelayMet=!this.options.delay;this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)&&(this._mouseStarted=!1!==this._mouseStart(a),!this._mouseStarted))return a.preventDefault(),!0;!0===d.data(a.target,this.widgetName+".preventClickEvent")&&d.removeData(a.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(a){return c._mouseMove(a)};this._mouseUpDelegate=function(a){return c._mouseUp(a)};d(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.preventDefault();return b=!0}},_mouseMove:function(a){if(d.browser.msie&&!(9<=document.documentMode)&&!a.button)return this._mouseUp(a);if(this._mouseStarted)return this._mouseDrag(a),a.preventDefault();this._mouseDistanceMet(a)&&this._mouseDelayMet(a)&&((this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,a))?this._mouseDrag(a):this._mouseUp(a));return!this._mouseStarted},_mouseUp:function(a){d(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);this._mouseStarted&&(this._mouseStarted=!1,a.target===this._mouseDownEvent.target&&d.data(a.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(a));return!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(d,b){function a(c,a,b){return[parseInt(c[0],10)*(m.test(c[0])?a/100:1),parseInt(c[1],10)*(m.test(c[1])?b/100:1)]}function c(c,a){return parseInt(d.css(c,a),10)||0}d.ui=d.ui||{};var e,f=Math.max,g=Math.abs,h=Math.round,j=/left|center|right/,i=/top|center|bottom/,k=/[\+\-]\d+%?/,l=/^\w+/,m=/%$/,s=d.fn.position;d.position={scrollbarWidth:function(){if(e!==b)return e;var c,a,f=d("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>");a=f.children()[0];d("body").append(f);c=a.offsetWidth;f.css("overflow","scroll");a=a.offsetWidth;c===a&&(a=f[0].clientWidth);f.remove();return e=c-a},getScrollInfo:function(c){var a=c.isWindow?"":c.element.css("overflow-x"),b=c.isWindow?"":c.element.css("overflow-y"),b="scroll"===b||"auto"===b&&c.height<c.element[0].scrollHeight;return{width:"scroll"===a||"auto"===a&&c.width<c.element[0].scrollWidth?d.position.scrollbarWidth():0,height:b?d.position.scrollbarWidth():0}},getWithinInfo:function(c){var c=d(c||window),a=d.isWindow(c[0]);return{element:c,isWindow:a,offset:c.offset()||{left:0,top:0},scrollLeft:c.scrollLeft(),scrollTop:c.scrollTop(),width:a?c.width():c.outerWidth(),height:a?c.height():c.outerHeight()}}};d.fn.position=function(b){if(!b||!b.of)return s.apply(this,arguments);var b=d.extend({},b),e,p,o,r,q,u=d(b.of),m=d.position.getWithinInfo(b.within),A=d.position.getScrollInfo(m),t=u[0],x=(b.collision||"flip").split(" "),z={};9===t.nodeType?(p=u.width(),o=u.height(),r={top:0,left:0}):d.isWindow(t)?(p=u.width(),o=u.height(),r={top:u.scrollTop(),left:u.scrollLeft()}):t.preventDefault?(b.at="left top",p=o=0,r={top:t.pageY,left:t.pageX}):(p=u.outerWidth(),o=u.outerHeight(),r=u.offset());q=d.extend({},r);d.each(["my","at"],function(){var c=(b[this]||"").split(" "),a,e;c.length===1&&(c=j.test(c[0])?c.concat(["center"]):i.test(c[0])?["center"].concat(c):["center","center"]);c[0]=j.test(c[0])?c[0]:"center";c[1]=i.test(c[1])?c[1]:"center";a=k.exec(c[0]);e=k.exec(c[1]);z[this]=[a?a[0]:0,e?e[0]:0];b[this]=[l.exec(c[0])[0],l.exec(c[1])[0]]});1===x.length&&(x[1]=x[0]);"right"===b.at[0]?q.left+=p:"center"===b.at[0]&&(q.left+=p/2);"bottom"===b.at[1]?q.top+=o:"center"===b.at[1]&&(q.top+=o/2);e=a(z.at,p,o);q.left+=e[0];q.top+=e[1];return this.each(function(){var i,j,k=d(this),l=k.outerWidth(),t=k.outerHeight(),s=c(this,"marginLeft"),B=c(this,"marginTop"),C=l+s+c(this,"marginRight")+A.width,D=t+B+c(this,"marginBottom")+A.height,n=d.extend({},q),y=a(z.my,k.outerWidth(),k.outerHeight());if(b.my[0]==="right")n.left=n.left-l;else if(b.my[0]==="center")n.left=n.left-l/2;if(b.my[1]==="bottom")n.top=n.top-t;else if(b.my[1]==="center")n.top=n.top-t/2;n.left=n.left+y[0];n.top=n.top+y[1];if(!d.support.offsetFractions){n.left=h(n.left);n.top=h(n.top)}i={marginLeft:s,marginTop:B};d.each(["left","top"],function(c,a){if(d.ui.position[x[c]])d.ui.position[x[c]][a](n,{targetWidth:p,targetHeight:o,elemWidth:l,elemHeight:t,collisionPosition:i,collisionWidth:C,collisionHeight:D,offset:[e[0]+y[0],e[1]+y[1]],my:b.my,at:b.at,within:m,elem:k})});d.fn.bgiframe&&k.bgiframe();b.using&&(j=function(c){var a=r.left-n.left,e=a+p-l,d=r.top-n.top,h=d+o-t,i={target:{element:u,left:r.left,top:r.top,width:p,height:o},element:{element:k,left:n.left,top:n.top,width:l,height:t},horizontal:e<0?"left":a>0?"right":"center",vertical:h<0?"top":d>0?"bottom":"middle"};if(p<l&&g(a+e)<p)i.horizontal="center";if(o<t&&g(d+h)<o)i.vertical="middle";i.important=f(g(a),g(e))>f(g(d),g(h))?"horizontal":"vertical";b.using.call(this,c,i)});k.offset(d.extend(n,{using:j}))})};d.ui.position={fit:{left:function(c,a){var b=a.within,e=b.isWindow?b.scrollLeft:b.offset.left,d=b.width,g=c.left-a.collisionPosition.marginLeft,b=e-g,h=g+a.collisionWidth-d-e;a.collisionWidth>d?0<b&&0>=h?(e=c.left+b+a.collisionWidth-d-e,c.left+=b-e):c.left=0<h&&0>=b?e:b>h?e+d-a.collisionWidth:e:c.left=0<b?c.left+b:0<h?c.left-h:f(c.left-g,c.left)},top:function(c,a){var b=a.within,e=b.isWindow?b.scrollTop:b.offset.top,d=a.within.height,g=c.top-a.collisionPosition.marginTop,b=e-g,h=g+
  a.collisionHeight-d-e;a.collisionHeight>d?0<b&&0>=h?(e=c.top+b+a.collisionHeight-d-e,c.top+=b-e):c.top=0<h&&0>=b?e:b>h?e+d-a.collisionHeight:e:c.top=0<b?c.top+b:0<h?c.top-h:f(c.top-g,c.top)}},flip:{left:function(c,a){var b=a.within,e=b.offset.left+b.scrollLeft,d=b.width,f=b.isWindow?b.scrollLeft:b.offset.left,h=c.left-a.collisionPosition.marginLeft,b=h-f,i=h+a.collisionWidth-d-f,h="left"===a.my[0]?-a.elemWidth:"right"===a.my[0]?a.elemWidth:0,j="left"===a.at[0]?a.targetWidth:"right"===a.at[0]?-a.targetWidth:0,k=-2*a.offset[0];if(0>b){if(e=c.left+h+j+k+a.collisionWidth-d-e,0>e||e<g(b))c.left+=h+j+k}else if(0<i&&(e=c.left-a.collisionPosition.marginLeft+h+j+k-f,0<e||g(e)<i))c.left+=h+j+k},top:function(c,a){var b=a.within,e=b.offset.top+b.scrollTop,d=b.height,f=b.isWindow?b.scrollTop:b.offset.top,h=c.top-a.collisionPosition.marginTop,b=h-f,i=h+a.collisionHeight-d-f,h="top"===a.my[1]?-a.elemHeight:"bottom"===a.my[1]?a.elemHeight:0,j="top"===a.at[1]?a.targetHeight:"bottom"===a.at[1]?-a.targetHeight:0,k=-2*a.offset[1];if(0>b){if(e=c.top+h+j+k+a.collisionHeight-d-e,c.top+h+j+k>b&&(0>e||e<g(b)))c.top+=h+j+k}else if(0<i&&(e=c.top-a.collisionPosition.marginTop+h+j+k-f,c.top+h+j+k>i&&(0<e||g(e)<i)))c.top+=h+j+k}},flipfit:{left:function(){d.ui.position.flip.left.apply(this,arguments);d.ui.position.fit.left.apply(this,arguments)},top:function(){d.ui.position.flip.top.apply(this,arguments);d.ui.position.fit.top.apply(this,arguments)}}};(function(){var c,a,b,e,f=document.getElementsByTagName("body")[0];b=document.createElement("div");c=document.createElement(f?"div":"body");a={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};f&&d.extend(a,{position:"absolute",left:"-1000px",top:"-1000px"});for(e in a)c.style[e]=a[e];c.appendChild(b);a=f||document.documentElement;a.insertBefore(c,a.firstChild);b.style.cssText="position: absolute; left: 10.7432222px;";b=d(b).offset().left;d.support.offsetFractions=10<b&&11>b;c.innerHTML="";a.removeChild(c)})();!1!==d.uiBackCompat&&function(c){var a=c.fn.position;c.fn.position=function(e){if(!e||!e.offset)return a.call(this,e);var d=e.offset.split(" "),f=e.at.split(" ");1===d.length&&(d[1]=d[0]);/^\d/.test(d[0])&&(d[0]="+"+d[0]);/^\d/.test(d[1])&&(d[1]="+"+d[1]);1===f.length&&(/left|center|right/.test(f[0])?f[1]="center":(f[1]=f[0],f[0]="center"));return a.call(this,c.extend(e,{at:f[0]+d[0]+" "+f[1]+d[1],offset:b}))}}(jQuery)})(jQuery);(function(d){d.widget("ui.draggable",d.ui.mouse,{version:"1.9.0",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(){"original"==this.options.helper&&!/^(?: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(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(b){var a=this.options;if(this.helper||a.disabled||d(b.target).is(".ui-resizable-handle"))return!1;this.handle=this._getHandle(b);if(!this.handle)return!1;d(!0===a.iframeFix?"iframe":a.iframeFix).each(function(){d('<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(d(this).offset()).appendTo("body")});return!0},_mouseStart:function(b){var a=this.options;this.helper=this._createHelper(b);this.helper.addClass("ui-draggable-dragging");this._cacheHelperProportions();d.ui.ddmanager&&(d.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};d.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;a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt);a.containment&&this._setContainment();if(!1===this._trigger("start",b))return this._clear(),!1;this._cacheHelperProportions();d.ui.ddmanager&&!a.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,b);this._mouseDrag(b,!0);d.ui.ddmanager&&d.ui.ddmanager.dragStart(this,b);return!0},_mouseDrag:function(b,a){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!a){var c=this._uiHash();if(!1===this._trigger("drag",b,c))return this._mouseUp({}),!1;this.position=c.position}if(!this.options.axis||"y"!=this.options.axis)this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||"x"!=this.options.axis)this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,b);return!1},_mouseStop:function(b){var a=!1;d.ui.ddmanager&&!this.options.dropBehaviour&&(a=d.ui.ddmanager.drop(this,b));this.dropped&&(a=this.dropped,this.dropped=!1);for(var c=this.element[0],e=!1;c&&(c=c.parentNode);)c==document&&(e=!0);if(!e&&"original"===this.options.helper)return!1;if("invalid"==this.options.revert&&!a||"valid"==this.options.revert&&a||!0===this.options.revert||d.isFunction(this.options.revert)&&this.options.revert.call(this.element,a)){var f=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){f._trigger("stop",b)!==false&&f._clear()})}else!1!==this._trigger("stop",b)&&this._clear();return!1},_mouseUp:function(b){d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});d.ui.ddmanager&&d.ui.ddmanager.dragStop(this,b);return d.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(b){var a=!this.options.handle||!d(this.options.handle,this.element).length?!0:!1;d(this.options.handle,this.element).find("*").andSelf().each(function(){this==b.target&&(a=!0)});return a},_createHelper:function(b){var a=this.options,b=d.isFunction(a.helper)?d(a.helper.apply(this.element[0],[b])):"clone"==a.helper?this.element.clone().removeAttr("id"):this.element;b.parents("body").length||b.appendTo("parent"==a.appendTo?this.element[0].parentNode:a.appendTo);b[0]!=this.element[0]&&!/(fixed|absolute)/.test(b.css("position"))&&b.css("position","absolute");return b},_adjustOffsetFromHelper:function(b){"string"==typeof b&&(b=b.split(" "));d.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();"absolute"==this.cssPosition&&(this.scrollParent[0]!=document&&d.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&&"html"==this.offsetParent[0].tagName.toLowerCase()&&d.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("relative"==this.cssPosition){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.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;"parent"==b.containment&&(b.containment=this.helper[0].parentNode);if("document"==b.containment||"window"==b.containment)this.containment=["document"==b.containment?0:d(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,"document"==b.containment?0:d(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,("document"==b.containment?0:d(window).scrollLeft())+d("document"==b.containment?document:window).width()-this.helperProportions.width-this.margins.left,("document"==b.containment?0:d(window).scrollTop())+
  (d("document"==b.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)&&b.containment.constructor!=Array){var b=d(b.containment),a=b[0];if(a){b.offset();var c="hidden"!=d(a).css("overflow");this.containment=[(parseInt(d(a).css("borderLeftWidth"),10)||0)+(parseInt(d(a).css("paddingLeft"),10)||0),(parseInt(d(a).css("borderTopWidth"),10)||0)+(parseInt(d(a).css("paddingTop"),10)||0),(c?Math.max(a.scrollWidth,a.offsetWidth):a.offsetWidth)-(parseInt(d(a).css("borderLeftWidth"),10)||0)-(parseInt(d(a).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(c?Math.max(a.scrollHeight,a.offsetHeight):a.offsetHeight)-(parseInt(d(a).css("borderTopWidth"),10)||0)-(parseInt(d(a).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,a){a||(a=this.position);var c="absolute"==b?1:-1,e="absolute"==this.cssPosition&&!(this.scrollParent[0]!=document&&d.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(e[0].tagName);return{top:a.top+this.offset.relative.top*c+this.offset.parent.top*c-("fixed"==this.cssPosition?-this.scrollParent.scrollTop():f?0:e.scrollTop())*c,left:a.left+this.offset.relative.left*c+this.offset.parent.left*c-
  ("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())*c}},_generatePosition:function(b){var a=this.options,c="absolute"==this.cssPosition&&!(this.scrollParent[0]!=document&&d.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName),f=b.pageX,g=b.pageY;if(this.originalPosition){var h;this.containment&&(this.relative_container?(h=this.relative_container.offset(),h=[this.containment[0]+h.left,this.containment[1]+
  h.top,this.containment[2]+h.left,this.containment[3]+h.top]):h=this.containment,b.pageX-this.offset.click.left<h[0]&&(f=h[0]+this.offset.click.left),b.pageY-this.offset.click.top<h[1]&&(g=h[1]+this.offset.click.top),b.pageX-this.offset.click.left>h[2]&&(f=h[2]+this.offset.click.left),b.pageY-this.offset.click.top>h[3]&&(g=h[3]+this.offset.click.top));a.grid&&(g=a.grid[1]?this.originalPageY+Math.round((g-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,g=h?!(g-this.offset.click.top<h[1]||g-this.offset.click.top>h[3])?g:!(g-this.offset.click.top<h[1])?g-a.grid[1]:g+a.grid[1]:g,f=a.grid[0]?this.originalPageX+Math.round((f-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,f=h?!(f-this.offset.click.left<h[0]||f-this.offset.click.left>h[2])?f:!(f-this.offset.click.left<h[0])?f-a.grid[0]:f+a.grid[0]:f)}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"==this.cssPosition?-this.scrollParent.scrollTop():e?0:c.scrollTop()),left:f-this.offset.click.left-
  this.offset.relative.left-this.offset.parent.left+("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():e?0:c.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,a,c){c=c||this._uiHash();d.ui.plugin.call(this,b,[a,c]);"drag"==b&&(this.positionAbs=this._convertPositionTo("absolute"));return d.Widget.prototype._trigger.call(this,b,a,c)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});d.ui.plugin.add("draggable","connectToSortable",{start:function(b,a){var c=d(this).data("draggable"),e=c.options,f=d.extend({},a,{item:c.element});c.sortables=[];d(e.connectToSortable).each(function(){var a=d.data(this,"sortable");a&&!a.options.disabled&&(c.sortables.push({instance:a,shouldRevert:a.options.revert}),a.refreshPositions(),a._trigger("activate",b,f))})},stop:function(b,a){var c=d(this).data("draggable"),e=d.extend({},a,{item:c.element});d.each(c.sortables,function(){this.instance.isOver?(this.instance.isOver=0,c.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,"original"==c.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",b,e))})},drag:function(b,a){var c=d(this).data("draggable"),e=this;d.each(c.sortables,function(){this.instance.positionAbs=c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;this.instance._intersectsWith(this.instance.containerCache)?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=d(e).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 a.helper[0]},b.target=this.instance.currentItem[0],this.instance._mouseCapture(b,!0),this.instance._mouseStart(b,!0,!0),this.instance.offset.click.top=c.offset.click.top,this.instance.offset.click.left=c.offset.click.left,this.instance.offset.parent.left-=c.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=c.offset.parent.top-this.instance.offset.parent.top,c._trigger("toSortable",b),c.dropped=this.instance.element,c.currentItem=c.element,this.instance.fromOutside=c),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(),c._trigger("fromSortable",b),c.dropped=!1)})}});d.ui.plugin.add("draggable","cursor",{start:function(){var b=d("body"),a=d(this).data("draggable").options;b.css("cursor")&&(a._cursor=b.css("cursor"));b.css("cursor",a.cursor)},stop:function(){var b=d(this).data("draggable").options;b._cursor&&d("body").css("cursor",b._cursor)}});d.ui.plugin.add("draggable","opacity",{start:function(b,a){var c=d(a.helper),e=d(this).data("draggable").options;c.css("opacity")&&(e._opacity=c.css("opacity"));c.css("opacity",e.opacity)},stop:function(b,a){var c=d(this).data("draggable").options;c._opacity&&d(a.helper).css("opacity",c._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(){var b=d(this).data("draggable");b.scrollParent[0]!=document&&"HTML"!=b.scrollParent[0].tagName&&(b.overflowOffset=b.scrollParent.offset())},drag:function(b){var a=d(this).data("draggable"),c=a.options,e=!1;if(a.scrollParent[0]!=document&&"HTML"!=a.scrollParent[0].tagName){if(!c.axis||"x"!=c.axis)a.overflowOffset.top+a.scrollParent[0].offsetHeight-b.pageY<c.scrollSensitivity?a.scrollParent[0].scrollTop=e=a.scrollParent[0].scrollTop+c.scrollSpeed:b.pageY-a.overflowOffset.top<c.scrollSensitivity&&(a.scrollParent[0].scrollTop=e=a.scrollParent[0].scrollTop-c.scrollSpeed);if(!c.axis||"y"!=c.axis)a.overflowOffset.left+a.scrollParent[0].offsetWidth-b.pageX<c.scrollSensitivity?a.scrollParent[0].scrollLeft=e=a.scrollParent[0].scrollLeft+c.scrollSpeed:b.pageX-a.overflowOffset.left<c.scrollSensitivity&&(a.scrollParent[0].scrollLeft=e=a.scrollParent[0].scrollLeft-
  c.scrollSpeed)}else{if(!c.axis||"x"!=c.axis)b.pageY-d(document).scrollTop()<c.scrollSensitivity?e=d(document).scrollTop(d(document).scrollTop()-c.scrollSpeed):d(window).height()-(b.pageY-d(document).scrollTop())<c.scrollSensitivity&&(e=d(document).scrollTop(d(document).scrollTop()+c.scrollSpeed));if(!c.axis||"y"!=c.axis)b.pageX-d(document).scrollLeft()<c.scrollSensitivity?e=d(document).scrollLeft(d(document).scrollLeft()-c.scrollSpeed):d(window).width()-(b.pageX-d(document).scrollLeft())<c.scrollSensitivity&&(e=d(document).scrollLeft(d(document).scrollLeft()+c.scrollSpeed))}!1!==e&&(d.ui.ddmanager&&!c.dropBehaviour)&&d.ui.ddmanager.prepareOffsets(a,b)}});d.ui.plugin.add("draggable","snap",{start:function(){var b=d(this).data("draggable"),a=b.options;b.snapElements=[];d(a.snap.constructor!=String?a.snap.items||":data(draggable)":a.snap).each(function(){var c=d(this),a=c.offset();this!=b.element[0]&&b.snapElements.push({item:this,width:c.outerWidth(),height:c.outerHeight(),top:a.top,left:a.left})})},drag:function(b,a){for(var c=d(this).data("draggable"),e=c.options,f=e.snapTolerance,g=a.offset.left,h=g+c.helperProportions.width,j=a.offset.top,i=j+c.helperProportions.height,k=c.snapElements.length-1;0<=k;k--){var l=c.snapElements[k].left,m=l+c.snapElements[k].width,s=c.snapElements[k].top,v=s+c.snapElements[k].height;if(l-f<g&&g<m+f&&s-f<j&&j<v+f||l-f<g&&g<m+f&&s-f<i&&i<v+f||l-f<h&&h<m+f&&s-f<j&&j<v+f||l-f<h&&h<m+f&&s-f<i&&i<v+f){if("inner"!=e.snapMode){var w=Math.abs(s-i)<=f,p=Math.abs(v-j)<=f,o=Math.abs(l-
  h)<=f,r=Math.abs(m-g)<=f;w&&(a.position.top=c._convertPositionTo("relative",{top:s-c.helperProportions.height,left:0}).top-c.margins.top);p&&(a.position.top=c._convertPositionTo("relative",{top:v,left:0}).top-c.margins.top);o&&(a.position.left=c._convertPositionTo("relative",{top:0,left:l-c.helperProportions.width}).left-c.margins.left);r&&(a.position.left=c._convertPositionTo("relative",{top:0,left:m}).left-c.margins.left)}var q=w||p||o||r;if("outer"!=e.snapMode&&(w=Math.abs(s-j)<=f,p=Math.abs(v-
  i)<=f,o=Math.abs(l-g)<=f,r=Math.abs(m-h)<=f,w&&(a.position.top=c._convertPositionTo("relative",{top:s,left:0}).top-c.margins.top),p&&(a.position.top=c._convertPositionTo("relative",{top:v-c.helperProportions.height,left:0}).top-c.margins.top),o&&(a.position.left=c._convertPositionTo("relative",{top:0,left:l}).left-c.margins.left),r))a.position.left=c._convertPositionTo("relative",{top:0,left:m-c.helperProportions.width}).left-c.margins.left;!c.snapElements[k].snapping&&(w||p||o||r||q)&&c.options.snap.snap&&c.options.snap.snap.call(c.element,b,d.extend(c._uiHash(),{snapItem:c.snapElements[k].item}));c.snapElements[k].snapping=w||p||o||r||q}else c.snapElements[k].snapping&&c.options.snap.release&&c.options.snap.release.call(c.element,b,d.extend(c._uiHash(),{snapItem:c.snapElements[k].item})),c.snapElements[k].snapping=!1}}});d.ui.plugin.add("draggable","stack",{start:function(){var b=d(this).data("draggable").options,b=d.makeArray(d(b.stack)).sort(function(c,a){return(parseInt(d(c).css("zIndex"),10)||0)-(parseInt(d(a).css("zIndex"),10)||0)});if(b.length){var a=parseInt(b[0].style.zIndex)||0;d(b).each(function(c){this.style.zIndex=a+c});this[0].style.zIndex=a+b.length}}});d.ui.plugin.add("draggable","zIndex",{start:function(b,a){var c=d(a.helper),e=d(this).data("draggable").options;c.css("zIndex")&&(e._zIndex=c.css("zIndex"));c.css("zIndex",e.zIndex)},stop:function(b,a){var c=d(this).data("draggable").options;c._zIndex&&d(a.helper).css("zIndex",c._zIndex)}})})(jQuery);(function(d){d.widget("ui.droppable",{version:"1.9.0",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var b=this.options,a=b.accept;this.isover=0;this.isout=1;this.accept=d.isFunction(a)?a:function(c){return c.is(a)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};d.ui.ddmanager.droppables[b.scope]=d.ui.ddmanager.droppables[b.scope]||[];d.ui.ddmanager.droppables[b.scope].push(this);b.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var b=d.ui.ddmanager.droppables[this.options.scope],a=0;a<b.length;a++)b[a]==this&&b.splice(a,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(b,a){"accept"==b&&(this.accept=d.isFunction(a)?a:function(c){return c.is(a)});d.Widget.prototype._setOption.apply(this,arguments)},_activate:function(b){var a=d.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass);a&&this._trigger("activate",b,this.ui(a))},_deactivate:function(b){var a=d.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);a&&this._trigger("deactivate",b,this.ui(a))},_over:function(b){var a=d.ui.ddmanager.current;if(a&&(a.currentItem||a.element)[0]!=this.element[0])if(this.accept.call(this.element[0],a.currentItem||a.element))this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",b,this.ui(a))},_out:function(b){var a=d.ui.ddmanager.current;if(a&&(a.currentItem||a.element)[0]!=this.element[0])if(this.accept.call(this.element[0],a.currentItem||a.element))this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",b,this.ui(a))},_drop:function(b,a){var c=a||d.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return!1;var e=!1;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var a=d.data(this,"droppable");if(a.options.greedy&&!a.options.disabled&&a.options.scope==c.options.scope&&a.accept.call(a.element[0],c.currentItem||c.element)&&d.ui.intersect(c,d.extend(a,{offset:a.element.offset()}),a.options.tolerance))return e=!0,!1});return e?!1:this.accept.call(this.element[0],c.currentItem||c.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",b,this.ui(c)),this.element):!1},ui:function(b){return{draggable:b.currentItem||b.element,helper:b.helper,position:b.position,offset:b.positionAbs}}});d.ui.intersect=function(b,a,c){if(!a.offset)return!1;var e=(b.positionAbs||b.position.absolute).left,f=e+b.helperProportions.width,g=(b.positionAbs||b.position.absolute).top,h=g+b.helperProportions.height,j=a.offset.left,i=j+a.proportions.width,k=a.offset.top,l=k+a.proportions.height;switch(c){case"fit":return j<=e&&f<=i&&k<=g&&h<=l;case"intersect":return j<e+b.helperProportions.width/2&&f-b.helperProportions.width/2<i&&k<g+
  b.helperProportions.height/2&&h-b.helperProportions.height/2<l;case"pointer":return d.ui.isOver((b.positionAbs||b.position.absolute).top+(b.clickOffset||b.offset.click).top,(b.positionAbs||b.position.absolute).left+(b.clickOffset||b.offset.click).left,k,j,a.proportions.height,a.proportions.width);case"touch":return(g>=k&&g<=l||h>=k&&h<=l||g<k&&h>l)&&(e>=j&&e<=i||f>=j&&f<=i||e<j&&f>i);default:return!1}};d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(b,a){var c=d.ui.ddmanager.droppables[b.options.scope]||[],e=a?a.type:null,f=(b.currentItem||b.element).find(":data(droppable)").andSelf(),g=0;a:for(;g<c.length;g++)if(!(c[g].options.disabled||b&&!c[g].accept.call(c[g].element[0],b.currentItem||b.element))){for(var h=0;h<f.length;h++)if(f[h]==c[g].element[0]){c[g].proportions.height=0;continue a}c[g].visible="none"!=c[g].element.css("display");c[g].visible&&("mousedown"==e&&c[g]._activate.call(c[g],a),c[g].offset=c[g].element.offset(),c[g].proportions={width:c[g].element[0].offsetWidth,height:c[g].element[0].offsetHeight})}},drop:function(b,a){var c=!1;d.each(d.ui.ddmanager.droppables[b.options.scope]||[],function(){if(this.options&&(!this.options.disabled&&(this.visible&&d.ui.intersect(b,this,this.options.tolerance))&&(c=this._drop.call(this,a)||c),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],b.currentItem||b.element)))this.isout=1,this.isover=0,this._deactivate.call(this,a)});return c},dragStart:function(b,a){b.element.parentsUntil("body").bind("scroll.droppable",function(){b.options.refreshPositions||d.ui.ddmanager.prepareOffsets(b,a)})},drag:function(b,a){b.options.refreshPositions&&d.ui.ddmanager.prepareOffsets(b,a);d.each(d.ui.ddmanager.droppables[b.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var c=d.ui.intersect(b,this,this.options.tolerance);if(c=!c&&1==this.isover?"isout":c&&0==this.isover?"isover":null){var e;if(this.options.greedy){var f=this.options.scope,g=this.element.parents(":data(droppable)").filter(function(){return d.data(this,"droppable").options.scope===f});g.length&&(e=d.data(g[0],"droppable"),e.greedyChild="isover"==c?1:0)}e&&"isover"==c&&(e.isover=0,e.isout=1,e._out.call(e,a));this[c]=1;this["isout"==c?"isover":"isout"]=0;this["isover"==c?"_over":"_out"].call(this,a);e&&"isout"==c&&(e.isout=0,e.isover=1,e._over.call(e,a))}}})},dragStop:function(b,a){b.element.parentsUntil("body").unbind("scroll.droppable");b.options.refreshPositions||d.ui.ddmanager.prepareOffsets(b,a)}}})(jQuery);(function(d){d.widget("ui.resizable",d.ui.mouse,{version:"1.9.0",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 c=this,a=this.options;this.element.addClass("ui-resizable");d.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null});this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(d('<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=a.handles||(!d(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){"all"==this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw");var b=this.handles.split(",");this.handles={};for(var g=0;g<b.length;g++){var h=d.trim(b[g]),j=d('<div class="ui-resizable-handle ui-resizable-'+h+'"></div>');j.css({zIndex:a.zIndex});"se"==h&&j.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[h]=".ui-resizable-"+h;this.element.append(j)}}this._renderAxis=function(c){var c=c||this.element,a;for(a in this.handles){this.handles[a].constructor==String&&(this.handles[a]=d(this.handles[a],this.element).show());if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var b=d(this.handles[a],this.element),e=0,e=/sw|ne|nw|se|n|s/.test(a)?b.outerHeight():b.outerWidth(),b=["padding",/ne|nw|n/.test(a)?"Top":/se|sw|s/.test(a)?"Bottom":/^e$/.test(a)?"Right":"Left"].join("");c.css(b,e);this._proportionallyResize()}d(this.handles[a])}};this._renderAxis(this.element);this._handles=d(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!c.resizing){if(this.className)var a=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);c.axis=a&&a[1]?a[1]:"se"}});a.autoHide&&(this._handles.hide(),d(this.element).addClass("ui-resizable-autohide").mouseenter(function(){if(!a.disabled){d(this).removeClass("ui-resizable-autohide");c._handles.show()}}).mouseleave(function(){if(!a.disabled&&!c.resizing){d(this).addClass("ui-resizable-autohide");c._handles.hide()}}));this._mouseInit()},_destroy:function(){this._mouseDestroy();var c=function(c){d(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){c(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);c(this.originalElement);return this},_mouseCapture:function(c){var a=!1,b;for(b in this.handles)d(this.handles[b])[0]==c.target&&(a=!0);return!this.options.disabled&&a},_mouseStart:function(c){var a=this.options,f=this.element.position(),g=this.element;this.resizing=!0;this.documentScroll={top:d(document).scrollTop(),left:d(document).scrollLeft()};(g.is(".ui-draggable")||/absolute/.test(g.css("position")))&&g.css({position:"absolute",top:f.top,left:f.left});this._renderProxy();var f=b(this.helper.css("left")),h=b(this.helper.css("top"));a.containment&&(f+=d(a.containment).scrollLeft()||0,h+=d(a.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="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1;a=d(".ui-resizable-"+this.axis).css("cursor");d("body").css("cursor","auto"==a?this.axis+"-resize":a);g.addClass("ui-resizable-resizing");this._propagate("start",c);return!0},_mouseDrag:function(c){var a=this.helper,b=this.originalMousePosition,d=this._change[this.axis];if(!d)return!1;b=d.apply(this,[c,c.pageX-b.left||0,c.pageY-b.top||0]);this._updateVirtualBoundaries(c.shiftKey);if(this._aspectRatio||c.shiftKey)b=this._updateRatio(b,c);b=this._respectSize(b,c);this._propagate("resize",c);a.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(b);this._trigger("resize",c,this.ui());return!1},_mouseStop:function(c){this.resizing=!1;var a=this.options;if(this._helper){var b=this._proportionallyResizeElements,g=b.length&&/textarea/i.test(b[0].nodeName),b=g&&d.ui.hasScroll(b[0],"left")?0:this.sizeDiff.height,g=g?0:this.sizeDiff.width,g={width:this.helper.width()-g,height:this.helper.height()-b},b=parseInt(this.element.css("left"),10)+(this.position.left-this.originalPosition.left)||null,h=parseInt(this.element.css("top"),10)+(this.position.top-this.originalPosition.top)||null;a.animate||this.element.css(d.extend(g,{top:h,left:b}));this.helper.height(this.size.height);this.helper.width(this.size.width);this._helper&&!a.animate&&this._proportionallyResize()}d("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",c);this._helper&&this.helper.remove();return!1},_updateVirtualBoundaries:function(c){var b=this.options,d,g,h,b={minWidth:a(b.minWidth)?b.minWidth:0,maxWidth:a(b.maxWidth)?b.maxWidth:Infinity,minHeight:a(b.minHeight)?b.minHeight:0,maxHeight:a(b.maxHeight)?b.maxHeight:Infinity};if(this._aspectRatio||c)if(c=b.minHeight*this.aspectRatio,g=b.minWidth/this.aspectRatio,d=b.maxHeight*this.aspectRatio,h=b.maxWidth/this.aspectRatio,c>b.minWidth&&(b.minWidth=c),g>b.minHeight&&(b.minHeight=g),d<b.maxWidth&&(b.maxWidth=d),h<b.maxHeight)b.maxHeight=h;this._vBoundaries=b},_updateCache:function(c){this.offset=this.helper.offset();a(c.left)&&(this.position.left=c.left);a(c.top)&&(this.position.top=c.top);a(c.height)&&(this.size.height=c.height);a(c.width)&&(this.size.width=c.width)},_updateRatio:function(c){var b=this.position,d=this.size,g=this.axis;a(c.height)?c.width=c.height*this.aspectRatio:a(c.width)&&(c.height=c.width/this.aspectRatio);"sw"==g&&(c.left=b.left+(d.width-c.width),c.top=null);"nw"==g&&(c.top=b.top+(d.height-c.height),c.left=b.left+(d.width-c.width));return c},_respectSize:function(c){var b=this._vBoundaries,d=this.axis,g=a(c.width)&&b.maxWidth&&b.maxWidth<c.width,h=a(c.height)&&b.maxHeight&&b.maxHeight<c.height,j=a(c.width)&&b.minWidth&&b.minWidth>c.width,i=a(c.height)&&b.minHeight&&b.minHeight>c.height;j&&(c.width=b.minWidth);i&&(c.height=b.minHeight);g&&(c.width=b.maxWidth);h&&(c.height=b.maxHeight);var k=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,m=/sw|nw|w/.test(d),d=/nw|ne|n/.test(d);j&&m&&(c.left=k-b.minWidth);g&&m&&(c.left=k-b.maxWidth);i&&d&&(c.top=l-b.minHeight);h&&d&&(c.top=l-b.maxHeight);(b=!c.width&&!c.height)&&!c.left&&c.top?c.top=null:b&&(!c.top&&c.left)&&(c.left=null);return c},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var c=this.helper||this.element,a=0;a<this._proportionallyResizeElements.length;a++){var b=this._proportionallyResizeElements[a];if(!this.borderDif){var g=[b.css("borderTopWidth"),b.css("borderRightWidth"),b.css("borderBottomWidth"),b.css("borderLeftWidth")],h=[b.css("paddingTop"),b.css("paddingRight"),b.css("paddingBottom"),b.css("paddingLeft")];this.borderDif=d.map(g,function(c,a){var b=parseInt(c,10)||0,d=parseInt(h[a],10)||0;return b+d})}b.css({height:c.height()-this.borderDif[0]-this.borderDif[2]||0,width:c.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var c=this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||d('<div style="overflow:hidden;"></div>');var a=d.browser.msie&&7>d.browser.version,b=a?1:0,a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-b+"px",top:this.elementOffset.top-b+"px",zIndex:++c.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(c,a){return{width:this.originalSize.width+a}},w:function(c,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(c,a,b){return{top:this.originalPosition.top+
  b,height:this.originalSize.height-b}},s:function(c,a,b){return{height:this.originalSize.height+b}},se:function(c,a,b){return d.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[c,a,b]))},sw:function(c,a,b){return d.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[c,a,b]))},ne:function(c,a,b){return d.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[c,a,b]))},nw:function(c,a,b){return d.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[c,a,b]))}},_propagate:function(c,a){d.ui.plugin.call(this,c,[a,this.ui()]);"resize"!=c&&this._trigger(c,a,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}}});d.ui.plugin.add("resizable","alsoResize",{start:function(){var c=d(this).data("resizable").options,a=function(c){d(c).each(function(){var c=d(this);c.data("resizable-alsoresize",{width:parseInt(c.width(),10),height:parseInt(c.height(),10),left:parseInt(c.css("left"),10),top:parseInt(c.css("top"),10)})})};"object"==typeof c.alsoResize&&!c.alsoResize.parentNode?c.alsoResize.length?(c.alsoResize=c.alsoResize[0],a(c.alsoResize)):d.each(c.alsoResize,function(c){a(c)}):a(c.alsoResize)},resize:function(c,a){var b=d(this).data("resizable"),g=b.options,h=b.originalSize,j=b.originalPosition,i={height:b.size.height-h.height||0,width:b.size.width-h.width||0,top:b.position.top-j.top||0,left:b.position.left-j.left||0},k=function(c,b){d(c).each(function(){var c=d(this),f=d(this).data("resizable-alsoresize"),g={},h=b&&b.length?b:c.parents(a.originalElement[0]).length?["width","height"]:["width","height","top","left"];d.each(h,function(c,a){var b=(f[a]||0)+(i[a]||0);b&&0<=b&&(g[a]=b||null)});c.css(g)})};"object"==typeof g.alsoResize&&!g.alsoResize.nodeType?d.each(g.alsoResize,function(c,a){k(c,a)}):k(g.alsoResize)},stop:function(){d(this).removeData("resizable-alsoresize")}});d.ui.plugin.add("resizable","animate",{stop:function(c){var a=d(this).data("resizable"),b=a.options,g=a._proportionallyResizeElements,h=g.length&&/textarea/i.test(g[0].nodeName),j=h&&d.ui.hasScroll(g[0],"left")?0:a.sizeDiff.height,h={width:a.size.width-(h?0:a.sizeDiff.width),height:a.size.height-j},j=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null,i=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(d.extend(h,i&&j?{top:i,left:j}:{}),{duration:b.animateDuration,easing:b.animateEasing,step:function(){var b={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};g&&g.length&&d(g[0]).css({width:b.width,height:b.height});a._updateCache(b);a._propagate("resize",c)}})}});d.ui.plugin.add("resizable","containment",{start:function(){var a=d(this).data("resizable"),e=a.element,f=a.options.containment;if(e=f instanceof d?f.get(0):/parent/.test(f)?e.parent().get(0):f)if(a.containerElement=d(e),/document/.test(f)||f==document)a.containerOffset={left:0,top:0},a.containerPosition={left:0,top:0},a.parentData={element:d(document),left:0,top:0,width:d(document).width(),height:d(document).height()||document.body.parentNode.scrollHeight};else{var g=d(e),h=[];d(["Top","Right","Left","Bottom"]).each(function(a,c){h[a]=b(g.css("padding"+c))});a.containerOffset=g.offset();a.containerPosition=g.position();a.containerSize={height:g.innerHeight()-h[3],width:g.innerWidth()-
  h[1]};var f=a.containerOffset,j=a.containerSize.height,i=a.containerSize.width,i=d.ui.hasScroll(e,"left")?e.scrollWidth:i,j=d.ui.hasScroll(e)?e.scrollHeight:j;a.parentData={element:e,left:f.left,top:f.top,width:i,height:j}}},resize:function(a){var b=d(this).data("resizable"),f=b.options,g=b.containerOffset,h=b.position,a=b._aspectRatio||a.shiftKey,j={top:0,left:0},i=b.containerElement;i[0]!=document&&/static/.test(i.css("position"))&&(j=g);if(h.left<(b._helper?g.left:0))b.size.width+=b._helper?b.position.left-
  g.left:b.position.left-j.left,a&&(b.size.height=b.size.width/b.aspectRatio),b.position.left=f.helper?g.left:0;if(h.top<(b._helper?g.top:0))b.size.height+=b._helper?b.position.top-g.top:b.position.top,a&&(b.size.width=b.size.height*b.aspectRatio),b.position.top=b._helper?g.top:0;b.offset.left=b.parentData.left+b.position.left;b.offset.top=b.parentData.top+b.position.top;f=Math.abs(b.offset.left-j.left+b.sizeDiff.width);g=Math.abs((b._helper?b.offset.top-j.top:b.offset.top-g.top)+b.sizeDiff.height);h=b.containerElement.get(0)==b.element.parent().get(0);j=/relative|absolute/.test(b.containerElement.css("position"));h&&j&&(f-=b.parentData.left);f+b.size.width>=b.parentData.width&&(b.size.width=b.parentData.width-f,a&&(b.size.height=b.size.width/b.aspectRatio));g+b.size.height>=b.parentData.height&&(b.size.height=b.parentData.height-g,a&&(b.size.width=b.size.height*b.aspectRatio))},stop:function(){var a=d(this).data("resizable"),b=a.options,f=a.containerOffset,g=a.containerPosition,h=a.containerElement,j=d(a.helper),i=j.offset(),k=j.outerWidth()-a.sizeDiff.width,j=j.outerHeight()-a.sizeDiff.height;a._helper&&(!b.animate&&/relative/.test(h.css("position")))&&d(this).css({left:i.left-g.left-f.left,width:k,height:j});a._helper&&(!b.animate&&/static/.test(h.css("position")))&&d(this).css({left:i.left-g.left-f.left,width:k,height:j})}});d.ui.plugin.add("resizable","ghost",{start:function(){var a=d(this).data("resizable"),b=a.options,f=a.size;a.ghost=a.originalElement.clone();a.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof b.ghost?b.ghost:"");a.ghost.appendTo(a.helper)},resize:function(){var a=d(this).data("resizable");a.ghost&&a.ghost.css({position:"relative",height:a.size.height,width:a.size.width})},stop:function(){var a=d(this).data("resizable");a.ghost&&a.helper&&a.helper.get(0).removeChild(a.ghost.get(0))}});d.ui.plugin.add("resizable","grid",{resize:function(){var a=d(this).data("resizable"),b=a.options,f=a.size,g=a.originalSize,h=a.originalPosition,j=a.axis;b.grid="number"==typeof b.grid?[b.grid,b.grid]:b.grid;var i=Math.round((f.width-g.width)/(b.grid[0]||1))*(b.grid[0]||1),b=Math.round((f.height-g.height)/(b.grid[1]||1))*(b.grid[1]||1);/^(se|s|e)$/.test(j)?(a.size.width=g.width+i,a.size.height=g.height+b):/^(ne)$/.test(j)?(a.size.width=g.width+i,a.size.height=g.height+b,a.position.top=h.top-b):(/^(sw)$/.test(j)?(a.size.width=g.width+i,a.size.height=g.height+
  b):(a.size.width=g.width+i,a.size.height=g.height+b,a.position.top=h.top-b),a.position.left=h.left-i)}});var b=function(a){return parseInt(a,10)||0},a=function(a){return!isNaN(parseInt(a,10))}})(jQuery);(function(d){d.widget("ui.selectable",d.ui.mouse,{version:"1.9.0",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var b=this;this.element.addClass("ui-selectable");this.dragged=!1;var a;this.refresh=function(){a=d(b.options.filter,b.element[0]);a.addClass("ui-selectee");a.each(function(){var a=d(this),b=a.offset();d.data(this,"selectable-item",{element:this,$element:a,left:b.left,top:b.top,right:b.left+a.outerWidth(),bottom:b.top+a.outerHeight(),startselected:!1,selected:a.hasClass("ui-selected"),selecting:a.hasClass("ui-selecting"),unselecting:a.hasClass("ui-unselecting")})})};this.refresh();this.selectees=a.addClass("ui-selectee");this._mouseInit();this.helper=d("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled");this._mouseDestroy()},_mouseStart:function(b){var a=this;this.opos=[b.pageX,b.pageY];if(!this.options.disabled){var c=this.options;this.selectees=d(c.filter,this.element[0]);this._trigger("start",b);d(c.appendTo).append(this.helper);this.helper.css({left:b.clientX,top:b.clientY,width:0,height:0});c.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var c=d.data(this,"selectable-item");c.startselected=!0;!b.metaKey&&!b.ctrlKey&&(c.$element.removeClass("ui-selected"),c.selected=!1,c.$element.addClass("ui-unselecting"),c.unselecting=!0,a._trigger("unselecting",b,{unselecting:c.element}))});d(b.target).parents().andSelf().each(function(){var c=d.data(this,"selectable-item");if(c){var f=!b.metaKey&&!b.ctrlKey||!c.$element.hasClass("ui-selected");c.$element.removeClass(f?"ui-unselecting":"ui-selected").addClass(f?"ui-selecting":"ui-unselecting");c.unselecting=!f;c.selecting=f;(c.selected=f)?a._trigger("selecting",b,{selecting:c.element}):a._trigger("unselecting",b,{unselecting:c.element});return!1}})}},_mouseDrag:function(b){var a=this;this.dragged=!0;if(!this.options.disabled){var c=this.options,e=this.opos[0],f=this.opos[1],g=b.pageX,h=b.pageY;if(e>g)var j=g,g=e,e=j;f>h&&(j=h,h=f,f=j);this.helper.css({left:e,top:f,width:g-e,height:h-f});this.selectees.each(function(){var i=d.data(this,"selectable-item");if(i&&i.element!=a.element[0]){var j=false;c.tolerance=="touch"?j=!(i.left>g||i.right<e||i.top>h||i.bottom<f):c.tolerance=="fit"&&(j=i.left>e&&i.right<g&&i.top>f&&i.bottom<h);if(j){if(i.selected){i.$element.removeClass("ui-selected");i.selected=false}if(i.unselecting){i.$element.removeClass("ui-unselecting");i.unselecting=false}if(!i.selecting){i.$element.addClass("ui-selecting");i.selecting=true;a._trigger("selecting",b,{selecting:i.element})}}else{if(i.selecting)if((b.metaKey||b.ctrlKey)&&i.startselected){i.$element.removeClass("ui-selecting");i.selecting=false;i.$element.addClass("ui-selected");i.selected=true}else{i.$element.removeClass("ui-selecting");i.selecting=false;if(i.startselected){i.$element.addClass("ui-unselecting");i.unselecting=true}a._trigger("unselecting",b,{unselecting:i.element})}if(i.selected&&!b.metaKey&&!b.ctrlKey&&!i.startselected){i.$element.removeClass("ui-selected");i.selected=false;i.$element.addClass("ui-unselecting");i.unselecting=true;a._trigger("unselecting",b,{unselecting:i.element})}}}});return!1}},_mouseStop:function(b){var a=this;this.dragged=!1;d(".ui-unselecting",this.element[0]).each(function(){var c=d.data(this,"selectable-item");c.$element.removeClass("ui-unselecting");c.unselecting=!1;c.startselected=!1;a._trigger("unselected",b,{unselected:c.element})});d(".ui-selecting",this.element[0]).each(function(){var c=d.data(this,"selectable-item");c.$element.removeClass("ui-selecting").addClass("ui-selected");c.selecting=!1;c.selected=!0;c.startselected=!0;a._trigger("selected",b,{selected:c.element})});this._trigger("stop",b);this.helper.remove();return!1}})})(jQuery);(function(d){d.widget("ui.sortable",d.ui.mouse,{version:"1.9.0",widgetEventPrefix:"sort",ready:!1,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 b=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?"x"===b.axis||/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();this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled");this._mouseDestroy();for(var b=this.items.length-1;0<=b;b--)this.items[b].item.removeData(this.widgetName+"-item");return this},_setOption:function(b,a){"disabled"===b?(this.options[b]=a,this.widget().toggleClass("ui-sortable-disabled",!!a)):d.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(b,a){var c=this;if(this.reverting||this.options.disabled||"static"==this.options.type)return!1;this._refreshItems(b);var e=null;d(b.target).parents().each(function(){if(d.data(this,c.widgetName+"-item")==c)return e=d(this),!1});d.data(b.target,c.widgetName+"-item")==c&&(e=d(b.target));if(!e)return!1;if(this.options.handle&&!a){var f=!1;d(this.options.handle,e).find("*").andSelf().each(function(){this==b.target&&(f=!0)});if(!f)return!1}this.currentItem=e;this._removeCurrentsFromItems();return!0},_mouseStart:function(b,a,c){a=this.options;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};d.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();a.containment&&this._setContainment();a.cursor&&(d("body").css("cursor")&&(this._storedCursor=d("body").css("cursor")),d("body").css("cursor",a.cursor));a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity));a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex));this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset());this._trigger("start",b,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;0<=c;c--)this.containers[c]._trigger("activate",b,this._uiHash(this));d.ui.ddmanager&&(d.ui.ddmanager.current=this);d.ui.ddmanager&&!a.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,b);this.dragging=!0;this.helper.addClass("ui-sortable-helper");this._mouseDrag(b);return!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 a=this.options,c=!1;this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-b.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop+a.scrollSpeed:b.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+
  this.scrollParent[0].offsetWidth-b.pageX<a.scrollSensitivity)?this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft+a.scrollSpeed:b.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft-a.scrollSpeed):(b.pageY-d(document).scrollTop()<a.scrollSensitivity?c=d(document).scrollTop(d(document).scrollTop()-a.scrollSpeed):d(window).height()-(b.pageY-d(document).scrollTop())<a.scrollSensitivity&&(c=d(document).scrollTop(d(document).scrollTop()+
  a.scrollSpeed)),b.pageX-d(document).scrollLeft()<a.scrollSensitivity?c=d(document).scrollLeft(d(document).scrollLeft()-a.scrollSpeed):d(window).width()-(b.pageX-d(document).scrollLeft())<a.scrollSensitivity&&(c=d(document).scrollLeft(d(document).scrollLeft()+a.scrollSpeed)));!1!==c&&(d.ui.ddmanager&&!a.dropBehaviour)&&d.ui.ddmanager.prepareOffsets(this,b)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||"y"!=this.options.axis)this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||"x"!=this.options.axis)this.helper[0].style.top=this.position.top+"px";for(a=this.items.length-1;0<=a;a--){var c=this.items[a],e=c.item[0],f=this._intersectsWithPointer(c);if(f&&c.instance===this.currentContainer&&e!=this.currentItem[0]&&this.placeholder[1==f?"next":"prev"]()[0]!=e&&!d.contains(this.placeholder[0],e)&&("semi-dynamic"==this.options.type?!d.contains(this.element[0],e):1)){this.direction=1==f?"down":"up";if("pointer"==this.options.tolerance||this._intersectsWithSides(c))this._rearrange(b,c);else break;this._trigger("change",b,this._uiHash());break}}this._contactContainers(b);d.ui.ddmanager&&d.ui.ddmanager.drag(this,b);this._trigger("sort",b,this._uiHash());this.lastPositionAbs=this.positionAbs;return!1},_mouseStop:function(b,a){if(b){d.ui.ddmanager&&!this.options.dropBehaviour&&d.ui.ddmanager.drop(this,b);if(this.options.revert){var c=this,e=this.placeholder.offset();this.reverting=!0;d(this.helper).animate({left:e.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(b)})}else this._clear(b,a);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null});"original"==this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var b=this.containers.length-1;0<=b;b--)this.containers[b]._trigger("deactivate",null,this._uiHash(this)),this.containers[b].containerCache.over&&(this.containers[b]._trigger("out",null,this._uiHash(this)),this.containers[b].containerCache.over=0)}this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!=this.options.helper&&(this.helper&&this.helper[0].parentNode)&&this.helper.remove(),d.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem):d(this.domPosition.parent).prepend(this.currentItem));return this},serialize:function(b){var a=this._getItemsAsjQuery(b&&b.connected),c=[],b=b||{};d(a).each(function(){var a=(d(b.item||this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[-=_](.+)/);a&&c.push((b.key||a[1]+"[]")+"="+(b.key&&b.expression?a[1]:a[2]))});!c.length&&b.key&&c.push(b.key+"=");return c.join("&")},toArray:function(b){var a=this._getItemsAsjQuery(b&&b.connected),c=[],b=b||{};a.each(function(){c.push(d(b.item||this).attr(b.attribute||"id")||"")});return c},_intersectsWith:function(b){var a=this.positionAbs.left,c=a+this.helperProportions.width,d=this.positionAbs.top,f=d+this.helperProportions.height,g=b.left,h=g+b.width,j=b.top,i=j+b.height,k=this.offset.click.top,l=this.offset.click.left;return"pointer"==this.options.tolerance||this.options.forcePointerForContainers||"pointer"!=this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>b[this.floating?"width":"height"]?d+k>j&&d+k<i&&a+l>g&&a+l<h:g<a+this.helperProportions.width/2&&c-this.helperProportions.width/2<h&&j<d+this.helperProportions.height/2&&f-this.helperProportions.height/2<i},_intersectsWithPointer:function(b){var a="x"===this.options.axis||d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top,b.height),b="y"===this.options.axis||d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left,b.width),a=a&&b,b=this._getDragVerticalDirection(),c=this._getDragHorizontalDirection();return!a?!1:this.floating?c&&"right"==c||"down"==b?2:1:b&&("down"==b?2:1)},_intersectsWithSides:function(b){var a=d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top+b.height/2,b.height),b=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left+b.width/2,b.width),c=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();return this.floating&&e?"right"==e&&b||"left"==e&&!b:c&&("down"==c&&a||"up"==c&&!a)},_getDragVerticalDirection:function(){var b=this.positionAbs.top-this.lastPositionAbs.top;return 0!=b&&(0<b?"down":"up")},_getDragHorizontalDirection:function(){var b=this.positionAbs.left-this.lastPositionAbs.left;return 0!=b&&(0<b?"right":"left")},refresh:function(b){this._refreshItems(b);this.refreshPositions();return this},_connectWith:function(){var b=this.options;return b.connectWith.constructor==String?[b.connectWith]:b.connectWith},_getItemsAsjQuery:function(b){var a=[],c=[],e=this._connectWith();if(e&&b)for(b=e.length-1;0<=b;b--)for(var f=d(e[b]),g=f.length-1;0<=g;g--){var h=d.data(f[g],this.widgetName);h&&(h!=this&&!h.options.disabled)&&c.push([d.isFunction(h.options.items)?h.options.items.call(h.element):d(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}c.push([d.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):d(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(b=c.length-1;0<=b;b--)c[b][0].each(function(){a.push(this)});return d(a)},_removeCurrentsFromItems:function(){for(var b=this.currentItem.find(":data("+
  this.widgetName+"-item)"),a=0;a<this.items.length;a++)for(var c=0;c<b.length;c++)b[c]==this.items[a].item[0]&&this.items.splice(a,1)},_refreshItems:function(b){this.items=[];this.containers=[this];var a=this.items,c=[[d.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):d(this.options.items,this.element),this]],e=this._connectWith();if(e&&this.ready)for(var f=e.length-1;0<=f;f--)for(var g=d(e[f]),h=g.length-1;0<=h;h--){var j=d.data(g[h],this.widgetName);j&&(j!=this&&!j.options.disabled)&&(c.push([d.isFunction(j.options.items)?j.options.items.call(j.element[0],b,{item:this.currentItem}):d(j.options.items,j.element),j]),this.containers.push(j))}for(f=c.length-1;0<=f;f--){b=c[f][1];e=c[f][0];h=0;for(g=e.length;h<g;h++)j=d(e[h]),j.data(this.widgetName+"-item",b),a.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 a=this.items.length-
  1;0<=a;a--){var c=this.items[a];if(!(c.instance!=this.currentContainer&&this.currentContainer&&c.item[0]!=this.currentItem[0])){var e=this.options.toleranceElement?d(this.options.toleranceElement,c.item):c.item;b||(c.width=e.outerWidth(),c.height=e.outerHeight());e=e.offset();c.left=e.left;c.top=e.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(a=this.containers.length-1;0<=a;a--)e=this.containers[a].element.offset(),this.containers[a].containerCache.left=e.left,this.containers[a].containerCache.top=e.top,this.containers[a].containerCache.width=this.containers[a].element.outerWidth(),this.containers[a].containerCache.height=this.containers[a].element.outerHeight();return this},_createPlaceholder:function(b){var b=b||this,a=b.options;if(!a.placeholder||a.placeholder.constructor==String){var c=a.placeholder;a.placeholder={element:function(){var a=d(document.createElement(b.currentItem[0].nodeName)).addClass(c||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];c||(a.style.visibility="hidden");return a},update:function(d,f){if(!c||a.forcePlaceholderSize)f.height()||f.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10)),f.width()||f.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}b.placeholder=d(a.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);a.placeholder.update(b,b.placeholder)},_contactContainers:function(b){for(var a=null,c=null,e=this.containers.length-1;0<=e;e--)if(!d.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!a||!d.contains(this.containers[e].element[0],a.element[0]))a=this.containers[e],c=e}else this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",b,this._uiHash(this)),this.containers[e].containerCache.over=0);if(a)if(1===this.containers.length)this.containers[c]._trigger("over",b,this._uiHash(this)),this.containers[c].containerCache.over=1;else if(this.currentContainer!=this.containers[c]){for(var a=1E4,e=null,f=this.positionAbs[this.containers[c].floating?"left":"top"],g=this.items.length-1;0<=g;g--)if(d.contains(this.containers[c].element[0],this.items[g].item[0])){var h=this.containers[c].floating?this.items[g].item.offset().left:this.items[g].item.offset().top;Math.abs(h-f)<a&&(a=Math.abs(h-f),e=this.items[g],this.direction=0<h-f?"down":"up")}if(e||this.options.dropOnEmpty)this.currentContainer=this.containers[c],e?this._rearrange(b,e,null,!0):this._rearrange(b,null,this.containers[c].element,!0),this._trigger("change",b,this._uiHash()),this.containers[c]._trigger("change",b,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[c]._trigger("over",b,this._uiHash(this)),this.containers[c].containerCache.over=1}},_createHelper:function(b){var a=this.options,b=d.isFunction(a.helper)?d(a.helper.apply(this.element[0],[b,this.currentItem])):"clone"==a.helper?this.currentItem.clone():this.currentItem;b.parents("body").length||d("parent"!=a.appendTo?a.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||a.forceHelperSize)&&b.width(this.currentItem.width());(""==b[0].style.height||a.forceHelperSize)&&b.height(this.currentItem.height());return b},_adjustOffsetFromHelper:function(b){"string"==typeof b&&(b=b.split(" "));d.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();"absolute"==this.cssPosition&&(this.scrollParent[0]!=document&&d.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&&"html"==this.offsetParent[0].tagName.toLowerCase()&&d.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("relative"==this.cssPosition){var b=this.currentItem.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.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;"parent"==b.containment&&(b.containment=this.helper[0].parentNode);if("document"==b.containment||"window"==b.containment)this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,d("document"==b.containment?document:window).width()-this.helperProportions.width-this.margins.left,(d("document"==b.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)){var a=d(b.containment)[0],b=d(b.containment).offset(),c="hidden"!=d(a).css("overflow");this.containment=[b.left+(parseInt(d(a).css("borderLeftWidth"),10)||0)+(parseInt(d(a).css("paddingLeft"),10)||0)-this.margins.left,b.top+(parseInt(d(a).css("borderTopWidth"),10)||0)+(parseInt(d(a).css("paddingTop"),10)||0)-this.margins.top,b.left+(c?Math.max(a.scrollWidth,a.offsetWidth):a.offsetWidth)-(parseInt(d(a).css("borderLeftWidth"),10)||0)-(parseInt(d(a).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,b.top+(c?Math.max(a.scrollHeight,a.offsetHeight):a.offsetHeight)-(parseInt(d(a).css("borderTopWidth"),10)||0)-(parseInt(d(a).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(b,a){a||(a=this.position);var c="absolute"==b?1:-1,e="absolute"==this.cssPosition&&!(this.scrollParent[0]!=document&&d.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(e[0].tagName);return{top:a.top+this.offset.relative.top*c+this.offset.parent.top*c-("fixed"==this.cssPosition?-this.scrollParent.scrollTop():f?0:e.scrollTop())*c,left:a.left+this.offset.relative.left*c+this.offset.parent.left*c-("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())*c}},_generatePosition:function(b){var a=this.options,c="absolute"==this.cssPosition&&!(this.scrollParent[0]!=document&&d.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName);"relative"==this.cssPosition&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])&&(this.offset.relative=this._getRelativeOffset());var f=b.pageX,g=b.pageY;if(this.originalPosition&&(this.containment&&(b.pageX-this.offset.click.left<this.containment[0]&&(f=this.containment[0]+this.offset.click.left),b.pageY-this.offset.click.top<this.containment[1]&&(g=this.containment[1]+this.offset.click.top),b.pageX-this.offset.click.left>this.containment[2]&&(f=this.containment[2]+this.offset.click.left),b.pageY-this.offset.click.top>this.containment[3]&&(g=this.containment[3]+this.offset.click.top)),a.grid))g=this.originalPageY+Math.round((g-this.originalPageY)/a.grid[1])*a.grid[1],g=this.containment?!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.top<this.containment[1])?g-a.grid[1]:g+a.grid[1]:g,f=this.originalPageX+Math.round((f-this.originalPageX)/a.grid[0])*a.grid[0],f=this.containment?!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:!(f-this.offset.click.left<this.containment[0])?f-a.grid[0]:f+a.grid[0]:f;return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"==this.cssPosition?-this.scrollParent.scrollTop():e?0:c.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-
  this.offset.parent.left+("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():e?0:c.scrollLeft())}},_rearrange:function(b,a,c,d){c?c[0].appendChild(this.placeholder[0]):a.item[0].parentNode.insertBefore(this.placeholder[0],"down"==this.direction?a.item[0]:a.item[0].nextSibling);var f=this.counter=this.counter?++this.counter:1;this._delay(function(){f==this.counter&&this.refreshPositions(!d)})},_clear:function(b,a){this.reverting=!1;var c=[];!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var e in this._storedCSS)if("auto"==this._storedCSS[e]||"static"==this._storedCSS[e])this._storedCSS[e]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!a&&c.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])&&!a&&c.push(function(a){this._trigger("update",a,this._uiHash())});this!==this.currentContainer&&!a&&(c.push(function(a){this._trigger("remove",a,this._uiHash())}),c.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.currentContainer)),c.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.currentContainer)));for(e=this.containers.length-1;0<=e;e--)a||c.push(function(a){return function(b){a._trigger("deactivate",b,this._uiHash(this))}}.call(this,this.containers[e])),this.containers[e].containerCache.over&&(c.push(function(a){return function(b){a._trigger("out",b,this._uiHash(this))}}.call(this,this.containers[e])),this.containers[e].containerCache.over=0);this._storedCursor&&d("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);this._storedZIndex&&this.helper.css("zIndex","auto"==this._storedZIndex?"":this._storedZIndex);this.dragging=!1;if(this.cancelHelperRemoval){if(!a){this._trigger("beforeStop",b,this._uiHash());for(e=0;e<c.length;e++)c[e].call(this,b);this._trigger("stop",b,this._uiHash())}return this.fromOutside=!1}a||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(!a){for(e=0;e<c.length;e++)c[e].call(this,b);this._trigger("stop",b,this._uiHash())}this.fromOutside=!1;return!0},_trigger:function(){!1===d.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(b){var a=b||this;return{helper:a.helper,placeholder:a.placeholder||d([]),position:a.position,originalPosition:a.originalPosition,offset:a.positionAbs,item:a.currentItem,sender:b?b.element:null}}})})(jQuery);(function(d){var b=0;d.widget("ui.autocomplete",{version:"1.9.0",defaultElement:"<input>",options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var a,b,e;this.isMultiLine=this._isMultiLine();this.valueMethod=this.element[this.element.is("input,textarea")?"val":"text"];this.isNewMenu=!0;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off");this._on({keydown:function(f){if(this.element.prop("readOnly"))b=e=a=!0;else{b=e=a=!1;var g=d.ui.keyCode;switch(f.keyCode){case g.PAGE_UP:a=!0;this._move("previousPage",f);break;case g.PAGE_DOWN:a=!0;this._move("nextPage",f);break;case g.UP:a=!0;this._keyEvent("previous",f);break;case g.DOWN:a=!0;this._keyEvent("next",f);break;case g.ENTER:case g.NUMPAD_ENTER:this.menu.active&&(a=!0,f.preventDefault(),this.menu.select(f));break;case g.TAB:this.menu.active&&this.menu.select(f);break;case g.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(f),f.preventDefault());break;default:b=!0,this._searchTimeout(f)}}},keypress:function(e){if(a)a=!1,e.preventDefault();else if(!b){var g=d.ui.keyCode;switch(e.keyCode){case g.PAGE_UP:this._move("previousPage",e);break;case g.PAGE_DOWN:this._move("nextPage",e);break;case g.UP:this._keyEvent("previous",e);break;case g.DOWN:this._keyEvent("next",e)}}},input:function(a){e?(e=!1,a.preventDefault()):this._searchTimeout(a)},focus:function(){this.selectedItem=null;this.previous=this._value()},blur:function(a){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(a),this._change(a))}});this._initSource();this.menu=d("<ul>").addClass("ui-autocomplete").appendTo(this.document.find(this.options.appendTo||"body")[0]).menu({input:d(),role:null}).zIndex(this.element.zIndex()+1).hide().data("menu");this._on(this.menu.element,{mousedown:function(a){a.preventDefault();this.cancelBlur=!0;this._delay(function(){delete this.cancelBlur});var b=this.menu.element[0];d(a.target).closest(".ui-menu-item").length||this._delay(function(){var a=this;this.document.one("mousedown",function(c){c.target!==a.element[0]&&(c.target!==b&&!d.contains(b,c.target))&&a.close()})})},menufocus:function(a,b){if(this.isNewMenu&&(this.isNewMenu=!1,a.originalEvent&&/^mouse/.test(a.originalEvent.type))){this.menu.blur();this.document.one("mousemove",function(){d(a.target).trigger(a.originalEvent)});return}var c=b.item.data("ui-autocomplete-item")||b.item.data("item.autocomplete");!1!==this._trigger("focus",a,{item:c})?a.originalEvent&&/^key/.test(a.originalEvent.type)&&this._value(c.value):this.liveRegion.text(c.value)},menuselect:function(a,b){var c=b.item.data("ui-autocomplete-item")||b.item.data("item.autocomplete"),d=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=d,this._delay(function(){this.previous=d;this.selectedItem=c}));!1!==this._trigger("select",a,{item:c})&&this._value(c.value);this.term=this._value();this.close(a);this.selectedItem=c}});this.liveRegion=d("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertAfter(this.element);d.fn.bgiframe&&this.menu.element.bgiframe();this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching);this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete");this.menu.element.remove();this.liveRegion.remove()},_setOption:function(a,b){this._super(a,b);"source"===a&&this._initSource();"appendTo"===a&&this.menu.element.appendTo(this.document.find(b||"body")[0]);"disabled"===a&&(b&&this.xhr)&&this.xhr.abort()},_isMultiLine:function(){return this.element.is("textarea")?!0:this.element.is("input")?!1:this.element.prop("isContentEditable")},_initSource:function(){var a,b,e=this;d.isArray(this.options.source)?(a=this.options.source,this.source=function(b,c){c(d.ui.autocomplete.filter(a,b.term))}):"string"===typeof this.options.source?(b=this.options.source,this.source=function(a,g){e.xhr&&e.xhr.abort();e.xhr=d.ajax({url:b,data:a,dataType:"json",success:function(a){g(a)},error:function(){g([])}})}):this.source=this.options.source},_searchTimeout:function(a){clearTimeout(this.searching);this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,a))},this.options.delay)},search:function(a,b){a=null!=a?a:this._value();this.term=this._value();if(a.length<this.options.minLength)return this.close(b);if(!1!==this._trigger("search",b))return this._search(a)},_search:function(a){this.pending++;this.element.addClass("ui-autocomplete-loading");this.cancelSearch=!1;this.source({term:a},this._response())},_response:function(){var a=this,c=++b;return function(d){c===b&&a.__response(d);a.pending--;a.pending||a.element.removeClass("ui-autocomplete-loading")}},__response:function(a){a&&(a=this._normalize(a));this._trigger("response",null,{content:a});!this.options.disabled&&a&&a.length&&!this.cancelSearch?(this._suggest(a),this._trigger("open")):this._close()},close:function(a){this.cancelSearch=!0;this._close(a)},_close:function(a){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",a))},_change:function(a){this.previous!==this._value()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(a){return a.length&&a[0].label&&a[0].value?a:d.map(a,function(a){return"string"===typeof a?{label:a,value:a}:d.extend({label:a.label||a.value,value:a.value||a.label},a)})},_suggest:function(a){var b=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(b,a);this.menu.refresh();b.show();this._resizeMenu();b.position(d.extend({of:this.element},this.options.position));this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(a,b){var e=this;d.each(b,function(b,c){e._renderItemData(a,c)})},_renderItemData:function(a,b){return this._renderItem(a,b).data("ui-autocomplete-item",b)},_renderItem:function(a,b){return d("<li>").append(d("<a>").text(b.label)).appendTo(a)},_move:function(a,b){if(this.menu.element.is(":visible"))if(this.menu.isFirstItem()&&/^previous/.test(a)||this.menu.isLastItem()&&/^next/.test(a))this._value(this.term),this.menu.blur();else this.menu[a](b);else this.search(null,b)},widget:function(){return this.menu.element},_value:function(a){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(a,b){if(!this.isMultiLine||this.menu.element.is(":visible"))this._move(a,b),b.preventDefault()}});d.extend(d.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(a,b){var e=RegExp(d.ui.autocomplete.escapeRegex(b),"i");return d.grep(a,function(a){return e.test(a.label||a.value||a)})}});d.widget("ui.autocomplete",d.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(a){return a+(1<a?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(a){var b;this._superApply(arguments);!this.options.disabled&&!this.cancelSearch&&(b=a&&a.length?this.options.messages.results(a.length):this.options.messages.noResults,this.liveRegion.text(b))}})})(jQuery);(function(d){var b=!1;d.widget("ui.menu",{version:"1.9.0",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element;this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,d.proxy(function(a){this.options.disabled&&a.preventDefault()},this));this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true");this._on({"mousedown .ui-menu-item > a":function(a){a.preventDefault()},"click .ui-state-disabled > a":function(a){a.preventDefault()},"click .ui-menu-item:has(a)":function(a){var c=d(a.target).closest(".ui-menu-item");!b&&c.not(".ui-state-disabled").length&&(b=!0,this.select(a),c.has(".ui-menu").length?this.expand(a):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(a){var b=d(a.currentTarget);b.siblings().children(".ui-state-active").removeClass("ui-state-active");this.focus(a,b)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(a,b){var d=this.active||this.element.children(".ui-menu-item").eq(0);b||this.focus(a,d)},blur:function(a){this._delay(function(){d.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(a)})},keydown:"_keydown"});this.refresh();this._on(this.document,{click:function(a){d(a.target).closest(".ui-menu").length||this.collapseAll(a);b=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").andSelf().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show();this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var a=d(this);a.data("ui-menu-submenu-carat")&&a.remove()});this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(a){function b(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var e,f,g,h,j=!0;switch(a.keyCode){case d.ui.keyCode.PAGE_UP:this.previousPage(a);break;case d.ui.keyCode.PAGE_DOWN:this.nextPage(a);break;case d.ui.keyCode.HOME:this._move("first","first",a);break;case d.ui.keyCode.END:this._move("last","last",a);break;case d.ui.keyCode.UP:this.previous(a);break;case d.ui.keyCode.DOWN:this.next(a);break;case d.ui.keyCode.LEFT:this.collapse(a);break;case d.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(a);break;case d.ui.keyCode.ENTER:case d.ui.keyCode.SPACE:this._activate(a);break;case d.ui.keyCode.ESCAPE:this.collapse(a);break;default:(j=!1,e=this.previousFilter||"",f=String.fromCharCode(a.keyCode),g=!1,clearTimeout(this.filterTimer),f===e?g=!0:f=e+f,h=RegExp("^"+b(f),"i"),e=this.activeMenu.children(".ui-menu-item").filter(function(){return h.test(d(this).children("a").text())}),e=g&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e,e.length||(f=String.fromCharCode(a.keyCode),h=RegExp("^"+b(f),"i"),e=this.activeMenu.children(".ui-menu-item").filter(function(){return h.test(d(this).children("a").text())})),e.length)?(this.focus(a,e),1<e.length?(this.previousFilter=f,this.filterTimer=this._delay(function(){delete this.previousFilter},1E3)):delete this.previousFilter):delete this.previousFilter}j&&a.preventDefault()},_activate:function(a){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(a):this.select(a))},refresh:function(){var a,b=this.options.icons.submenu,e=this.element.find(this.options.menus+":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"});a=e.add(this.element);a.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()});a.children(":not(.ui-menu-item)").each(function(){var a=d(this);/[^\-\u2014\u2013\s]/.test(a.text())||a.addClass("ui-widget-content ui-menu-divider")});a.children(".ui-state-disabled").attr("aria-disabled","true");e.each(function(){var a=d(this),e=a.prev("a"),h=d("<span>").addClass("ui-menu-icon ui-icon "+b).data("ui-menu-submenu-carat",!0);e.attr("aria-haspopup","true").prepend(h);a.attr("aria-labelledby",e.attr("id"))});this.active&&!d.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},focus:function(a,b){var d;this.blur(a,a&&"focus"===a.type);this._scrollIntoView(b);this.active=b.first();d=this.active.children("a").addClass("ui-state-focus");this.options.role&&this.element.attr("aria-activedescendant",d.attr("id"));this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active");a&&"keydown"===a.type?this._close():this.timer=this._delay(function(){this._close()},this.delay);d=b.children(".ui-menu");d.length&&/^mouse/.test(a.type)&&this._startOpening(d);this.activeMenu=b.parent();this._trigger("focus",a,{item:b})},_scrollIntoView:function(a){var b,e,f;this._hasScroll()&&(b=parseFloat(d.css(this.activeMenu[0],"borderTopWidth"))||0,e=parseFloat(d.css(this.activeMenu[0],"paddingTop"))||0,b=a.offset().top-this.activeMenu.offset().top-b-e,e=this.activeMenu.scrollTop(),f=this.activeMenu.height(),a=a.height(),0>b?this.activeMenu.scrollTop(e+b):b+a>f&&this.activeMenu.scrollTop(e+b-f+a))},blur:function(a,b){b||clearTimeout(this.timer);this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",a,{item:this.active}))},_startOpening:function(a){clearTimeout(this.timer);"true"===a.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close();this._open(a)},this.delay))},_open:function(a){var b=d.extend({of:this.active},this.options.position);clearTimeout(this.timer);this.element.find(".ui-menu").not(a.parents(".ui-menu")).hide().attr("aria-hidden","true");a.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(b)},collapseAll:function(a,b){clearTimeout(this.timer);this.timer=this._delay(function(){var e=b?this.element:d(a&&a.target).closest(this.element.find(".ui-menu"));e.length||(e=this.element);this._close(e);this.blur(a);this.activeMenu=e},this.delay)},_close:function(a){a||(a=this.active?this.active.parent():this.element);a.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(a){var b=this.active&&this.active.parent().closest(".ui-menu-item",this.element);b&&b.length&&(this._close(),this.focus(a,b))},expand:function(a){var b=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();b&&b.length&&(this._open(b.parent()),this._delay(function(){this.focus(a,b)}))},next:function(a){this._move("next","first",a)},previous:function(a){this._move("prev","last",a)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(a,b,d){var f;this.active&&(f="first"===a||"last"===a?this.active["first"===a?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[a+"All"](".ui-menu-item").eq(0));if(!f||!f.length||!this.active)f=this.activeMenu.children(".ui-menu-item")[b]();this.focus(d,f)},nextPage:function(a){var b,e,f;this.active?this.isLastItem()||(this._hasScroll()?(e=this.active.offset().top,f=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){b=d(this);return 0>b.offset().top-e-f}),this.focus(a,b)):this.focus(a,this.activeMenu.children(".ui-menu-item")[!this.active?"first":"last"]())):this.next(a)},previousPage:function(a){var b,e,f;this.active?this.isFirstItem()||(this._hasScroll()?(e=this.active.offset().top,f=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){b=d(this);return 0<b.offset().top-e+f}),this.focus(a,b)):this.focus(a,this.activeMenu.children(".ui-menu-item").first())):this.next(a)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(a){this.active=this.active||d(a.target).closest(".ui-menu-item");var b={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(a,!0);this._trigger("select",a,b)}})})(jQuery);
  (function(f,e){var a={},d=f(window);e.$widgetkit={version:"1.4.6",lazyloaders:{},load:function(b){a[b]||(a[b]=f.ajax({dataType:"script",cache:!0,url:b+"?wkv="+this.version}));return a[b]},lazyload:function(a){a=a||document;f("[data-widgetkit]",a).each(function(){var a=f(this),b=a.data("widgetkit"),d=a.data("options")||{};!a.data("wk-loaded")&&$widgetkit.lazyloaders[b]&&($widgetkit.lazyloaders[b](a,d),a.data("wk-loaded",!0))})}};f(function(){$widgetkit.lazyload()});d.on("load",function(){d.resize()});for(var b=document.createElement("div"),c=b.style,b=!1,g=["-webkit-","-moz-","-o-","-ms-","-khtml-"],j=["Webkit","Moz","O","ms","Khtml"],h="",k=0;k<j.length;k++)if(""===c[j[k]+"Transition"]){b=j[k]+"Transition";h=g[k];break}$widgetkit.prefix=h;c=$widgetkit;b=(g=b)&&"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix&&!navigator.userAgent.match(/Chrome/i);j=document.createElement("canvas");j=!(!j.getContext||!j.getContext("2d"));c.support={transition:g,css3d:b,canvas:j};$widgetkit.css3=function(a){a=a||{};a.transition&&(a[h+"transition"]=a.transition);a.transform&&(a[h+"transform"]=a.transform);a["transform-origin"]&&(a[h+"transform-origin"]=a["transform-origin"]);return a};if(!(b=f.browser))c=navigator.userAgent,c=c.toLowerCase(),b={},c=/(chrome)[ \/]([\w.]+)/.exec(c)||/(webkit)[ \/]([\w.]+)/.exec(c)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(c)||/(msie) ([\w.]+)/.exec(c)||0>c.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(c)||[],b[c[1]]=!0,b.version=c[2]||"0";f.browser=b;b=null})(jQuery,window);(function(f){var e;a:{try{e=parseInt(navigator.appVersion.match(/MSIE (\d\.\d)/)[1],10);break a}catch(a){}e=!1}e&&9>e&&(f(document).ready(function(){f("body").addClass("wk-ie wk-ie"+e)}),f.each("abbr article aside audio canvas details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" "),function(){document.createElement(this)}))})(jQuery);(function(f,e){e.$widgetkit.trans={__data:{},addDic:function(a){f.extend(this.__data,a)},add:function(a,d){this.__data[a]=d},get:function(a){if(!this.__data[a])return a;var d=1==arguments.length?[]:Array.prototype.slice.call(arguments,1);return this.printf(String(this.__data[a]),d)},printf:function(a,d){if(!d)return a;var b="",c=a.split("%s");if(1==c.length)return a;for(var g=0;g<d.length;g++)c[g].lastIndexOf("%")==c[g].length-1&&g!=d.length-1&&(c[g]+="s"+c.splice(g+1,1)[0]),b+=c[g]+d[g];return b+
  c[c.length-1]}}})(jQuery,window);(function(f){f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(e,a,d,b,c){return f.easing[f.easing.def](e,a,d,b,c)},easeInQuad:function(e,a,d,b,c){return b*(a/=c)*a+d},easeOutQuad:function(e,a,d,b,c){return-b*(a/=c)*(a-2)+d},easeInOutQuad:function(e,a,d,b,c){return 1>(a/=c/2)?b/2*a*a+d:-b/2*(--a*(a-2)-1)+d},easeInCubic:function(e,a,d,b,c){return b*(a/=c)*a*a+d},easeOutCubic:function(e,a,d,b,c){return b*((a=a/c-1)*a*a+1)+d},easeInOutCubic:function(e,a,d,b,c){return 1>(a/=c/2)?b/2*a*a*a+d:b/2*((a-=2)*a*a+2)+d},easeInQuart:function(e,a,d,b,c){return b*(a/=c)*a*a*a+d},easeOutQuart:function(e,a,d,b,c){return-b*((a=a/c-1)*a*a*a-1)+d},easeInOutQuart:function(e,a,d,b,c){return 1>(a/=c/2)?b/2*a*a*a*a+d:-b/2*((a-=2)*a*a*a-2)+d},easeInQuint:function(e,a,d,b,c){return b*(a/=c)*a*a*a*a+d},easeOutQuint:function(e,a,d,b,c){return b*((a=a/c-1)*a*a*a*a+1)+d},easeInOutQuint:function(e,a,d,b,c){return 1>(a/=c/2)?b/2*a*a*a*a*a+d:b/2*((a-=2)*a*a*a*a+2)+d},easeInSine:function(e,a,d,b,c){return-b*Math.cos(a/c*(Math.PI/2))+b+d},easeOutSine:function(e,a,d,b,c){return b*Math.sin(a/c*(Math.PI/2))+d},easeInOutSine:function(e,a,d,b,c){return-b/2*(Math.cos(Math.PI*a/c)-1)+d},easeInExpo:function(e,a,d,b,c){return 0==a?d:b*Math.pow(2,10*(a/c-1))+d},easeOutExpo:function(e,a,d,b,c){return a==c?d+b:b*(-Math.pow(2,-10*a/c)+1)+d},easeInOutExpo:function(e,a,d,b,c){return 0==a?d:a==c?d+b:1>(a/=c/2)?b/2*Math.pow(2,10*(a-1))+d:b/2*(-Math.pow(2,-10*--a)+2)+d},easeInCirc:function(e,a,d,b,c){return-b*(Math.sqrt(1-(a/=c)*a)-1)+d},easeOutCirc:function(e,a,d,b,c){return b*Math.sqrt(1-(a=a/c-1)*a)+d},easeInOutCirc:function(e,a,d,b,c){return 1>(a/=c/2)?-b/2*(Math.sqrt(1-a*a)-1)+d:b/2*(Math.sqrt(1-(a-=2)*a)+1)+d},easeInElastic:function(e,a,d,b,c){e=1.70158;var g=0,f=b;if(0==a)return d;if(1==(a/=c))return d+b;g||(g=0.3*c);f<Math.abs(b)?(f=b,e=g/4):e=g/(2*Math.PI)*Math.asin(b/f);return-(f*Math.pow(2,10*(a-=1))*Math.sin((a*c-e)*2*Math.PI/g))+d},easeOutElastic:function(e,a,d,b,c){e=1.70158;var g=0,f=b;if(0==a)return d;if(1==(a/=c))return d+b;g||(g=0.3*c);f<Math.abs(b)?(f=b,e=g/4):e=g/(2*Math.PI)*Math.asin(b/f);return f*Math.pow(2,-10*a)*Math.sin((a*c-e)*2*Math.PI/g)+b+d},easeInOutElastic:function(e,a,d,b,c){e=1.70158;var g=0,f=b;if(0==a)return d;if(2==(a/=c/2))return d+b;g||(g=c*0.3*1.5);f<Math.abs(b)?(f=b,e=g/4):e=g/(2*Math.PI)*Math.asin(b/f);return 1>a?-0.5*f*Math.pow(2,10*(a-=1))*Math.sin((a*c-e)*2*Math.PI/g)+d:0.5*f*Math.pow(2,-10*(a-=1))*Math.sin((a*c-e)*2*Math.PI/g)+b+d},easeInBack:function(e,a,d,b,c,g){void 0==g&&(g=1.70158);return b*(a/=c)*a*((g+1)*a-g)+d},easeOutBack:function(e,a,d,b,c,g){void 0==g&&(g=1.70158);return b*((a=a/c-1)*a*((g+1)*a+g)+1)+d},easeInOutBack:function(e,a,d,b,c,g){void 0==g&&(g=1.70158);return 1>(a/=c/2)?b/2*a*a*(((g*=1.525)+1)*a-g)+d:b/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+d},easeInBounce:function(e,a,d,b,c){return b-f.easing.easeOutBounce(e,c-a,0,b,c)+d},easeOutBounce:function(e,a,d,b,c){return(a/=c)<1/2.75?b*7.5625*a*a+d:a<2/2.75?b*(7.5625*(a-=1.5/2.75)*a+0.75)+
  d:a<2.5/2.75?b*(7.5625*(a-=2.25/2.75)*a+0.9375)+d:b*(7.5625*(a-=2.625/2.75)*a+0.984375)+d},easeInOutBounce:function(e,a,d,b,c){return a<c/2?0.5*f.easing.easeInBounce(e,2*a,0,b,c)+d:0.5*f.easing.easeOutBounce(e,2*a-c,0,b,c)+0.5*b+d}})})(jQuery);(function(f){function e(a){var b=a||window.event,c=[].slice.call(arguments,1),g=0,e=0,h=0;a=f.event.fix(b);a.type="mousewheel";a.wheelDelta&&(g=a.wheelDelta/120);a.detail&&(g=-a.detail/3);h=g;void 0!==b.axis&&b.axis===b.HORIZONTAL_AXIS&&(h=0,e=-1*g);void 0!==b.wheelDeltaY&&(h=b.wheelDeltaY/120);void 0!==b.wheelDeltaX&&(e=-1*b.wheelDeltaX/120);c.unshift(a,g,e,h);return f.event.handle.apply(this,c)}var a=["DOMMouseScroll","mousewheel"];f.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var d=a.length;d;)this.addEventListener(a[--d],e,!1);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var d=a.length;d;)this.removeEventListener(a[--d],e,!1);else this.onmousewheel=null}};f.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);(function(f){var e=f.support;var a=document.createElement("INPUT");a.type="file";if(a="files"in a)a=new XMLHttpRequest,a=!(!a||!("upload"in a&&"onprogress"in a.upload))&&!!window.FormData;e.ajaxupload=a;f.support.ajaxupload&&f.event.props.push("dataTransfer");f.fn.uploadOnDrag=function(a){return!f.support.ajaxupload?this:this.each(function(){var b=f(this),c=f.extend({action:"",single:!1,method:"POST",params:{},loadstart:function(){},load:function(){},loadend:function(){},progress:function(){},complete:function(){},allcomplete:function(){},readystatechange:function(){}},a);b.on("drop",function(a){function b(a,c){for(var d=new FormData,e=new XMLHttpRequest,g=0,h;h=a[g];g++)d.append("files[]",h);for(var m in c.params)d.append(m,c.params[m]);e.upload.addEventListener("progress",function(a){c.progress(100*(a.loaded/a.total),a)},!1);e.addEventListener("loadstart",function(a){c.loadstart(a)},!1);e.addEventListener("load",function(a){c.load(a)},!1);e.addEventListener("loadend",function(a){c.loadend(a)},!1);e.addEventListener("error",function(a){c.error(a)},!1);e.addEventListener("abort",function(a){c.abort(a)},!1);e.open(c.method,c.action,!0);e.onreadystatechange=function(){c.readystatechange(e);if(4==e.readyState){var a=e.responseText;if("json"==c.type)try{a=f.parseJSON(a)}catch(b){a=!1}c.complete(a,e)}};e.send(d)}a.stopPropagation();a.preventDefault();var d=a.dataTransfer.files;if(c.single){var e=a.dataTransfer.files.length,g=0,j=c.complete;c.complete=function(a,f){g+=1;j(a,f);g<e?b([d[g]],c):c.allcomplete()};b([d[0]],c)}else b(d,c)}).on("dragover",function(a){a.stopPropagation();a.preventDefault()})})};f.fn.ajaxform=function(a){return!f.support.ajaxupload?this:this.each(function(){var b=f(this),c=f.extend({action:b.attr("action"),method:b.attr("method"),loadstart:function(){},load:function(){},loadend:function(){},progress:function(){},complete:function(){},readystatechange:function(){}},a);b.on("submit",function(a){a.preventDefault();a=new FormData(this);var b=new XMLHttpRequest;a.append("formdata","1");b.upload.addEventListener("progress",function(a){c.progress(100*(a.loaded/a.total),a)},!1);b.addEventListener("loadstart",function(a){c.loadstart(a)},!1);b.addEventListener("load",function(a){c.load(a)},!1);b.addEventListener("loadend",function(a){c.loadend(a)},!1);b.addEventListener("error",function(a){c.error(a)},!1);b.addEventListener("abort",function(a){c.abort(a)},!1);b.open(c.method,c.action,!0);b.onreadystatechange=function(){c.readystatechange(b);if(4==b.readyState){var a=b.responseText;if("json"==c.type)try{a=f.parseJSON(a)}catch(d){a=!1}c.complete(a,b)}};b.send(a)})})};if(!f.event.special.debouncedresize){var d=f.event,b,c;b=d.special.debouncedresize={setup:function(){f(this).on("resize",b.handler)},teardown:function(){f(this).off("resize",b.handler)},handler:function(a,e){var f=this,k=arguments,l=function(){a.type="debouncedresize";d.dispatch.apply(f,k)};c&&clearTimeout(c);e?l():c=setTimeout(l,b.threshold)},threshold:150}}})(jQuery);
  jQuery(function(a){window.submitbutton=function(a){"cancel"==a&&(window.location="index.php?option=com_widgetkit")};window.Joomla=window.Joomla||{};window.Joomla.submitbutton=window.submitbutton;a("#tabs").tabs().prev().append('<li class="version">'+a("#tabs").data("wkversion")+"</li>");a("#widgetkit").delegate(".box .deletable","click",function(){a(this).parent().trigger("delete",[a(this)])});a("input:text").placeholder();a(".actions .save").css("display","none").length&&(a("#toolbar tr").prepend('<td id="toolbar-apply"><a href="#"><span class="icon-32-apply"></span>Apply</a></td>'),a("#toolbar ul").prepend('<li id="toolbar-apply"><a href="#"><span class="icon-32-apply"></span>Save</a></li>'),a("#toolbar.btn-toolbar").prepend('<div id="toolbar-apply" class="btn-group"><button class="btn btn-small btn-success" href="#"><i class="icon-apply icon-white"></i>Save</button></div>'),a("#toolbar-apply").bind("click",function(){a("#toolbar").addClass("saving");a(".actions .save").trigger("click")}),a(".actions .save").bind("complete",function(){a("#toolbar").removeClass("saving")}))});(function(a){var e={get:function(a){return window.sessionStorage?sessionStorage.getItem(a):null},set:function(a,f){window.sessionStorage&&sessionStorage.setItem(a,f)}};a.fn.tabs=function(){return this.each(function(){var h=a(this).addClass("content").wrap('<div class="tabs-box" />').before('<ul class="nav" />'),f=a(this).prev("ul.nav");h.children("li").each(function(){f.append("<li><a>"+a(this).hide().attr("data-name")+"</a></li>")});f.children("li").bind("click",function(d){d.preventDefault();var d=a("li",f).removeClass("active").index(a(this).addClass("active").get(0)),c=h.children("li").hide();a(c[d]).show();e.set("widgetkit-tab",d)});var g=parseInt(e.get("widgetkit-tab"));a(!isNaN(g)?f.children("li").get(g):f.children("li:first")).trigger("click")})}})(jQuery);(function(a){var e=function(){};a.extend(e.prototype,{name:"finder",initialize:function(e,f){function g(c){c.preventDefault();var b=a(this).closest("li",e);b.length||(b=e);b.hasClass(d.options.open)?b.removeClass(d.options.open).children("ul").slideUp():(b.addClass(d.options.loading),a.post(d.options.url,{path:b.data("path")},function(c){b.removeClass(d.options.loading).addClass(d.options.open);c.length&&(b.children().remove("ul"),b.append("<ul>").children("ul").hide(),a.each(c,function(d,c){b.children("ul").append(a('<li><a href="#">'+
  c.name+"</a></li>").addClass(c.type).data("path",c.path))}),b.find("ul a").bind("click",g),b.children("ul").slideDown())},"json"))}var d=this;this.options=a.extend({url:"",path:"",open:"open",loading:"loading"},f);e.data("path",this.options.path).bind("retrieve:finder",g).trigger("retrieve:finder")}});a.fn[e.prototype.name]=function(){var h=arguments,f=h[0]?h[0]:null;return this.each(function(){var g=a(this);if(e.prototype[f]&&g.data(e.prototype.name)&&"initialize"!=f)g.data(e.prototype.name)[f].apply(g.data(e.prototype.name),Array.prototype.slice.call(h,1));else if(!f||a.isPlainObject(f)){var d=new e;e.prototype.initialize&&d.initialize.apply(d,a.merge([g],h));g.data(e.prototype.name,d)}else a.error("Method "+f+" does not exist on jQuery."+e.name)})}})(jQuery);(function(a){function e(c){var b={},d=/^jQuery\d+$/;a.each(c.attributes,function(a,c){c.specified&&!d.test(c.name)&&(b[c.name]=c.value)});return b}function h(){var c=a(this);c.val()===c.attr("placeholder")&&c.hasClass("placeholder")&&(c.data("placeholder-password")?c.hide().next().show().focus():c.val("").removeClass("placeholder"))}function f(){var c,b=a(this);if(""===b.val()||b.val()===b.attr("placeholder")){if(b.is(":password")){if(!b.data("placeholder-textinput")){try{c=b.clone().attr({type:"text"})}catch(d){c=a("<input>").attr(a.extend(e(b[0]),{type:"text"}))}c.removeAttr("name").data("placeholder-password",!0).bind("focus.placeholder",h);b.data("placeholder-textinput",c).before(c)}b=b.hide().prev().show()}b.addClass("placeholder").val(b.attr("placeholder"))}else b.removeClass("placeholder")}var g="placeholder"in document.createElement("input"),d="placeholder"in document.createElement("textarea");a.fn.placeholder=g&&d?function(){return this}:function(){return this.filter((g?"textarea":":input")+"[placeholder]").bind("focus.placeholder",h).bind("blur.placeholder",f).trigger("blur.placeholder").end()};a(function(){a("form").bind("submit.placeholder",function(){var c=a(".placeholder",this).each(h);setTimeout(function(){c.each(f)},10)})});a(window).bind("unload.placeholder",function(){a(".placeholder").val("")})})(jQuery);(function(a){var e=a(window),h=a(document),f=!1,g=!1,d=null,c=null;a.modalwin=function(b){f&&a.modalwin.close();"object"===typeof b?(b=a(b),b.parent().length&&(this.persist=b,this.persist.data("modal-persist-parent",b.parent()))):b="string"===typeof b||"number"===typeof b?a("<div></div>").html(b):a("<div></div>").html("Modalwin Error: Unsupported data type: "+typeof b);d=a('<div class="modalwin"><div class="inner"></div><div class="btnclose"></div>');d.find(".inner:first").append(b);d.css({position:"fixed","z-index":101}).find(".btnclose").click(a.modalwin.close);c=a('<div class="modal-overlay"></div>').css({position:"absolute",left:0,top:0,width:h.width(),height:h.height(),"z-index":100}).bind("click",a.modalwin.close);a("body").append(c).append(d.hide());d.show().css({left:e.width()/2-d.width()/2,top:e.height()/2-d.height()/2}).fadeIn();f=!0};a.modalwin.close=function(){f&&(g&&(g.appendTo(this.persist.data("modal-persist-parent")),g=!1),d.remove(),c.remove(),c=d=null,f=!1)};e.bind("resize",function(){f&&(d.css({left:e.width()/2-d.width()/2,top:e.height()/2-d.height()/2}),c.css({width:h.width(),height:h.height()}))})})(jQuery);
  var widgetkitajax="http://westcoastavgallery.ca/administrator/index.php?format=raw&option=com_widgetkit&ajax=1";
  jQuery(function(a){var c,f=widgetkitajax,h=a("#widgetkit").data("token");a('select[name="settings[style]"]').bind("change",function(){a("#form").trigger("submit")});var g=a("#finder").finder({url:f+"&task=dirs_gallery"}).delegate("a","click",function(){a("#finder li").removeClass("selected");c=a(this).parent().addClass("selected").data("path")});a("#gallery").delegate(".delete-photo","click",function(c){c.preventDefault();var b=a(this);confirm("Do you really want to delete "+b.data("path")+" ?")&&a.post(f+"&task=delete_file_gallery",{file:b.data("path"),token:h},function(d){a.parseJSON(d).status?b.parent().fadeOut(300,function(){a().remove()}):alert("Couldn't delete "+b.data("path")+" !")})});a("a.create-folder").bind("click",function(i){i.preventDefault();var b=(c?c:"")+"/",d=prompt("Create new folder in: "+b,"");null!==d&&""!==d&&a.post(f+"&task=create_folder_gallery",{path:b+d,token:h},function(c){a.parseJSON(c).status?"/"==b?g.trigger("retrieve:finder").trigger("retrieve:finder"):g.find(".selected a").trigger("click").trigger("click"):alert("Couldn't create "+d+" !")})});a("a.delete-folder").bind("click",function(i){i.preventDefault();if(c){var b=[];a('#form input[name="paths[]"]').each(function(){var d=a(this);-1!=d.val().indexOf(c)&&b.push(d.closest(".box"))});confirm("Do you really want to delete "+c+" ?")&&a.post(f+"&task=delete_folder_gallery",{path:c,token:h},function(d){a.parseJSON(d).status?(g.find(".selected").fadeOut(300,function(){a(this).remove();c=null}),b.length&&a.each(b,function(){a(this).fadeOut(300,function(){a(this).remove()})})):alert("Couldn't delete "+c+" !")})}else alert("Please select a folder!")});a("button.add-folder").bind("click",function(f){f.preventDefault();var b;a.each(a('#form input[name="paths[]"]').serializeArray(),function(a,e){e.value==c&&(b=!0)});c&&!b&&a("#gallery").trigger("add",[c])});a("#gallery").bind("add",function(c,b){var d=a(this),e=a('<div class="box"><div class="deletable"></div><h3>'+b+'</h3><div class="content"></div></div>').appendTo(d).find(".content"),g=null,k=null,j=!1,l=function(){j||(e.children().remove(),j=!0,a.post(f+"&task=files_gallery",{path:b},function(c){a.each(c,function(a,b){e.append('<div class="file"><div class="image"><img src="'+d.data("url")+b.path+'" class="size-auto"/></div><div class="filename">'+b.name+'</div><input type="text" name="captions['+b.path+']" placeholder="Enter caption here..." /><input type="text" name="links['+b.path+']" placeholder="Enter custom link here..." /> <button data-path="'+b.path+'" class="delete-photo"></button></div>')});e.append('<input type="hidden" name="paths[]" value="'+
  b+'" />');a.support.ajaxupload&&e.append('<div class="dropinfo">Drop new images here to upload.</div>');a("input:text",d.trigger("update")).placeholder();j=!1},"json"))};e.uploadOnDrag({action:f+"&task=upload_files_gallery",single:!0,params:{path:b,token:h},loadstart:function(){g=e.find(".dropinfo");k=g.html('<div class="meter">&nbsp;</div>').find(".meter")},progress:function(a){k.css("width",""+a+"%").html(""+parseInt(a)+"%")},allcomplete:function(){l();e.find(".dropinfo").html("Drop new images here to upload.")}});l()});a("#gallery").delegate(".box","delete",function(){a(this).fadeOut(300,function(){a(this).remove()})})});