jquery-ui-1.9pre.min.js 226 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473
/*!
 * jQuery UI 1.9pre
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI
 */
(function(a,g){function d(e,f){var i=e.nodeName.toLowerCase();if("area"===i){i=e.parentNode;var b=i.name;if(!e.href||!b||i.nodeName.toLowerCase()!=="map")return false;i=a("img[usemap=#"+b+"]")[0];return!!i&&c(i)}return(/input|select|textarea|button|object/.test(i)?!e.disabled:"a"==i?e.href||f:f)&&c(e)}function c(e){return!a(e).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{};if(!a.ui.version){a.extend(a.ui,{version:"1.9pre",
keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({_focus:a.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var i=this;setTimeout(function(){a(i).focus();
f&&f.call(i)},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;e=a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,
"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!e.length?a(document):e},zIndex:function(e){if(e!==g)return this.css("zIndex",e);if(this.length){e=a(this[0]);for(var f;e.length&&e[0]!==document;){f=e.css("position");if(f==="absolute"||f==="relative"||f==="fixed"){f=parseInt(e.css("zIndex"),10);if(!isNaN(f)&&f!==0)return f}e=e.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",
function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(e,f){function i(l,j,m,n){a.each(b,function(){j-=parseFloat(a.curCSS(l,"padding"+this,true))||0;if(m)j-=parseFloat(a.curCSS(l,"border"+this+"Width",true))||0;if(n)j-=parseFloat(a.curCSS(l,"margin"+this,true))||0});return j}var b=f==="Width"?["Left","Right"]:["Top","Bottom"],h=f.toLowerCase(),k={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,
outerHeight:a.fn.outerHeight};a.fn["inner"+f]=function(l){if(l===g)return k["inner"+f].call(this);return this.each(function(){a(this).css(h,i(this,l)+"px")})};a.fn["outer"+f]=function(l,j){if(typeof l!=="number")return k["outer"+f].call(this,l);return this.each(function(){a(this).css(h,i(this,l,true,j)+"px")})}});a.extend(a.expr[":"],{data:function(e,f,i){return!!a.data(e,i[3])},focusable:function(e){return d(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(e){var f=a.attr(e,"tabindex"),i=isNaN(f);
return(i||f>=0)&&d(e,!i)}});a(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=f.offsetHeight===100;a.support.selectstart="onselectstart"in f;e.removeChild(f).style.display="none"});a.extend(a.ui,{plugin:{add:function(e,f,i){e=a.ui[e].prototype;for(var b in i){e.plugins[b]=e.plugins[b]||[];e.plugins[b].push([f,i[b]])}},call:function(e,f,i){if((f=e.plugins[f])&&e.element[0].parentNode)for(var b=
0;b<f.length;b++)e.options[f[b][0]]&&f[b][1].apply(e.element,i)}},contains:a.contains,hasScroll:function(e,f){if(a(e).css("overflow")==="hidden")return false;var i=f&&f==="left"?"scrollLeft":"scrollTop",b=false;if(e[i]>0)return true;e[i]=1;b=e[i]>0;e[i]=0;return b},isOverAxis:function(e,f,i){return e>f&&e<f+i},isOver:function(e,f,i,b,h,k){return a.ui.isOverAxis(e,i,h)&&a.ui.isOverAxis(f,b,k)}})}})(jQuery);
(function(a,g){var d=Array.prototype.slice,c=a.cleanData;a.cleanData=function(e){for(var f=0,i;(i=e[f])!=null;f++)try{a(i).triggerHandler("remove")}catch(b){}c(e)};a.widget=function(e,f,i){var b=e.split(".")[0],h;e=e.split(".")[1];h=b+"-"+e;if(!i){i=f;f=a.Widget}a.expr[":"][h]=function(l){return!!a.data(l,e)};a[b]=a[b]||{};a[b][e]=a.extend(function(l,j){if(!this._createWidget)return new a[b][e](l,j);arguments.length&&this._createWidget(l,j)},a[b][e],{version:i.version});var k=new f;k.options=a.widget.extend({},
k.options);a.each(i,function(l,j){if(a.isFunction(j))i[l]=function(){var m=function(o){return f.prototype[o].apply(this,d.call(arguments,1))},n=function(o,p){return f.prototype[o].apply(this,p)};return function(){var o=this._super,p=this._superApply,q;this._super=m;this._superApply=n;q=j.apply(this,arguments);this._super=o;this._superApply=p;return q}}()});a[b][e].prototype=a.widget.extend(k,{namespace:b,widgetName:e,widgetEventPrefix:e,widgetBaseClass:h},i);a.widget.bridge(e,a[b][e])};a.widget.extend=
function(e){for(var f=d.call(arguments,1),i=0,b=f.length,h,k;i<b;i++)for(h in f[i]){k=f[i][h];if(f[i].hasOwnProperty(h)&&k!==g)e[h]=a.isPlainObject(k)?a.widget.extend({},e[h],k):k}return e};a.widget.bridge=function(e,f){a.fn[e]=function(i){var b=typeof i==="string",h=d.call(arguments,1),k=this;i=!b&&h.length?a.widget.extend.apply(null,[i].concat(h)):i;b?this.each(function(){var l=a.data(this,e);if(!l)return a.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+
i+"'");if(!a.isFunction(l[i])||i.charAt(0)==="_")return a.error("no such method '"+i+"' for "+e+" widget instance");var j=l[i].apply(l,h);if(j!==l&&j!==g){k=j&&j.jquery?k.pushStack(j.get()):j;return false}}):this.each(function(){var l=a.data(this,e);l?l.option(i||{})._init():f(i,this)});return k}};a.Widget=function(e,f){if(!this._createWidget)return new a[namespace][name](e,f);arguments.length&&this._createWidget(e,f)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",
options:{disabled:false,create:null},_createWidget:function(e,f){f=a(f||this.defaultElement||this)[0];this.element=a(f);this.options=a.widget.extend({},this.options,this._getCreateOptions(),e);this.bindings=a();this.hoverable=a();this.focusable=a();if(f!==this){a.data(f,this.widgetName,this);this._bind({remove:"destroy"})}this._create();this._trigger("create");this._init()},_getCreateOptions:a.noop,_create:a.noop,_init:a.noop,destroy:function(){this._destroy();this.element.unbind("."+this.widgetName).removeData(this.widgetName);
this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled");this.bindings.unbind("."+this.widgetName);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:a.noop,widget:function(){return this.element},option:function(e,f){var i=e,b,h,k;if(arguments.length===0)return a.widget.extend({},this.options);if(typeof e==="string"){i={};b=e.split(".");e=b.shift();if(b.length){h=i[e]=a.widget.extend({},
this.options[e]);for(k=0;k<b.length-1;k++){h[b[k]]=h[b[k]]||{};h=h[b[k]]}e=b.pop();if(f===g)return h[e]===g?null:h[e];h[e]=f}else{if(f===g)return this.options[e]===g?null:this.options[e];i[e]=f}}this._setOptions(i);return this},_setOptions:function(e){var f=this;a.each(e,function(i,b){f._setOption(i,b)});return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget().toggleClass(this.widgetBaseClass+"-disabled ui-state-disabled",!!f).attr("aria-disabled",f);this.hoverable.removeClass("ui-state-hover");
this.focusable.removeClass("ui-state-focus")}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_bind:function(e,f){if(f){e=a(e);this.bindings=this.bindings.add(e)}else{f=e;e=this.element}var i=this;a.each(f,function(b,h){function k(){if(!(i.options.disabled===true||a(this).hasClass("ui-state-disabled")))return(typeof h==="string"?i[h]:h).apply(i,arguments)}var l=b.match(/^(\w+)\s*(.*)$/),j=l[1]+"."+i.widgetName;(l=
l[2])?i.widget().delegate(l,j,k):e.bind(j,k)})},_delay:function(e,f){var i=this;return setTimeout(function(){return(typeof e==="string"?i[e]:e).apply(i,arguments)},f||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e);this._bind(e,{mouseenter:function(f){a(f.currentTarget).addClass("ui-state-hover")},mouseleave:function(f){a(f.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e);this._bind(e,{focusin:function(f){a(f.currentTarget).addClass("ui-state-focus")},
focusout:function(f){a(f.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,f,i){var b=this.options[e];f=a.Event(f);f.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();i=i||{};if(f.originalEvent){e=a.event.props.length;for(var h;e;){h=a.event.props[--e];f[h]=f.originalEvent[h]}}this.element.trigger(f,i);i=a.isArray(i)?[f].concat(i):[f,i];return!(a.isFunction(b)&&b.apply(this.element[0],i)===false||f.isDefaultPrevented())}};a.each({show:"fadeIn",hide:"fadeOut"},
function(e,f){a.Widget.prototype["_"+e]=function(i,b,h){if(typeof b==="string")b={effect:b};var k,l=!b?e:b===true||typeof b==="number"?f:b.effect||f;b=b||{};if(typeof b==="number")b={duration:b};k=!a.isEmptyObject(b);b.complete=h;b.delay&&i.delay(b.delay);if(k&&a.effects&&(a.effects.effect[l]||a.uiBackCompat!==false&&a.effects[l]))i[e](b);else if(l!==e&&i[l])i[l](b.duration,b.easing,h);else i.queue(function(j){a(this)[e]();h&&h.call(i[0]);j()})}});if(a.uiBackCompat!==false)a.Widget.prototype._getCreateOptions=
function(){return a.metadata&&a.metadata.get(this.element[0])[this.widgetName]}})(jQuery);
(function(a){var g=false;a(document).mouseup(function(){g=false});a.widget("ui.mouse",{version:"1.9pre",options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(c){return d._mouseDown(c)}).bind("click."+this.widgetName,function(c){if(true===a.data(c.target,d.widgetName+".preventClickEvent")){a.removeData(c.target,d.widgetName+".preventClickEvent");c.stopImmediatePropagation();return false}});this.started=false},
_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(d){if(!g){this._mouseStarted&&this._mouseUp(d);this._mouseDownEvent=d;var c=this,e=d.which==1,f=typeof this.options.cancel=="string"&&d.target.nodeName?a(d.target).closest(this.options.cancel).length:false;if(!e||f||!this._mouseCapture(d))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(d)&&
this._mouseDelayMet(d)){this._mouseStarted=this._mouseStart(d)!==false;if(!this._mouseStarted){d.preventDefault();return true}}true===a.data(d.target,this.widgetName+".preventClickEvent")&&a.removeData(d.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(i){return c._mouseMove(i)};this._mouseUpDelegate=function(i){return c._mouseUp(i)};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);d.preventDefault();
return g=true}},_mouseMove:function(d){if(a.browser.msie&&!(document.documentMode>=9)&&!d.button)return this._mouseUp(d);if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,d)!==false)?this._mouseDrag(d):this._mouseUp(d);return!this._mouseStarted},_mouseUp:function(d){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,
this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;d.target==this._mouseDownEvent.target&&a.data(d.target,this.widgetName+".preventClickEvent",true);this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
(function(a){a.widget("ui.draggable",a.ui.mouse,{version:"1.9pre",widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper==
"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(g){var d=
this.options;if(this.helper||d.disabled||a(g.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(g);if(!this.handle)return false;a(d.iframeFix===true?"iframe":d.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(a(this).offset()).appendTo("body")});return true},_mouseStart:function(g){var d=this.options;this.helper=
this._createHelper(g);this._cacheHelperProportions();if(a.ui.ddmanager)a.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:g.pageX-this.offset.left,top:g.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});
this.originalPosition=this.position=this._generatePosition(g);this.originalPageX=g.pageX;this.originalPageY=g.pageY;d.cursorAt&&this._adjustOffsetFromHelper(d.cursorAt);d.containment&&this._setContainment();if(this._trigger("start",g)===false){this._clear();return false}this._cacheHelperProportions();a.ui.ddmanager&&!d.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,g);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(g,true);a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,g);return true},
_mouseDrag:function(g,d){this.position=this._generatePosition(g);this.positionAbs=this._convertPositionTo("absolute");if(!d){var c=this._uiHash();if(this._trigger("drag",g,c)===false){this._mouseUp({});return false}this.position=c.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";a.ui.ddmanager&&a.ui.ddmanager.drag(this,g);return false},_mouseStop:function(g){var d=
false;if(a.ui.ddmanager&&!this.options.dropBehaviour)d=a.ui.ddmanager.drop(this,g);if(this.dropped){d=this.dropped;this.dropped=false}if(!this.element[0]||!this.element[0].parentNode)return false;if(this.options.revert=="invalid"&&!d||this.options.revert=="valid"&&d||this.options.revert===true||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d)){var c=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",g)!==
false&&c._clear()})}else this._trigger("stop",g)!==false&&this._clear();return false},_mouseUp:function(g){this.options.iframeFix===true&&a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,g);return a.ui.mouse.prototype._mouseUp.call(this,g)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(g){var d=!this.options.handle||!a(this.options.handle,this.element).length?
true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==g.target)d=true});return d},_createHelper:function(g){var d=this.options;g=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[g])):d.helper=="clone"?this.element.clone().removeAttr("id"):this.element;g.parents("body").length||g.appendTo(d.appendTo=="parent"?this.element[0].parentNode:d.appendTo);g[0]!=this.element[0]&&!/(fixed|absolute)/.test(g.css("position"))&&g.css("position","absolute");return g},
_adjustOffsetFromHelper:function(g){if(typeof g=="string")g=g.split(" ");if(a.isArray(g))g={left:+g[0],top:+g[1]||0};if("left"in g)this.offset.click.left=g.left+this.margins.left;if("right"in g)this.offset.click.left=this.helperProportions.width-g.right+this.margins.left;if("top"in g)this.offset.click.top=g.top+this.margins.top;if("bottom"in g)this.offset.click.top=this.helperProportions.height-g.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var g=
this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.contains(this.scrollParent[0],this.offsetParent[0])){g.left+=this.scrollParent.scrollLeft();g.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)g={top:0,left:0};return{top:g.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:g.left+(parseInt(this.offsetParent.css("borderLeftWidth"),
10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var g=this.element.position();return{top:g.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:g.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else 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 g=this.options;if(g.containment=="parent")g.containment=this.helper[0].parentNode;if(g.containment=="document"||g.containment=="window")this.containment=[g.containment=="document"?0:a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,g.containment=="document"?0:a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,
(g.containment=="document"?0:a(window).scrollLeft())+a(g.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(g.containment=="document"?0:a(window).scrollTop())+(a(g.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(g.containment)&&g.containment.constructor!=Array){g=a(g.containment);var d=g[0];if(d){g.offset();var c=a(d).css("overflow")!=
"hidden";this.containment=[(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0),(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0),(c?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(c?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),
10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=g}}else if(g.containment.constructor==Array)this.containment=g.containment},_convertPositionTo:function(g,d){if(!d)d=this.position;var c=g=="absolute"?1:-1,e=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(e[0].tagName);return{top:d.top+
this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:e.scrollTop())*c),left:d.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())*c)}},_generatePosition:function(g){var d=this.options,c=this.cssPosition=="absolute"&&
!(this.scrollParent[0]!=document&&a.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName),f=g.pageX,i=g.pageY;if(this.originalPosition){var b;if(this.containment){if(this.relative_container){b=this.relative_container.offset();b=[this.containment[0]+b.left,this.containment[1]+b.top,this.containment[2]+b.left,this.containment[3]+b.top]}else b=this.containment;if(g.pageX-this.offset.click.left<b[0])f=b[0]+this.offset.click.left;if(g.pageY-
this.offset.click.top<b[1])i=b[1]+this.offset.click.top;if(g.pageX-this.offset.click.left>b[2])f=b[2]+this.offset.click.left;if(g.pageY-this.offset.click.top>b[3])i=b[3]+this.offset.click.top}if(d.grid){i=d.grid[1]?this.originalPageY+Math.round((i-this.originalPageY)/d.grid[1])*d.grid[1]:this.originalPageY;i=b?!(i-this.offset.click.top<b[1]||i-this.offset.click.top>b[3])?i:!(i-this.offset.click.top<b[1])?i-d.grid[1]:i+d.grid[1]:i;f=d.grid[0]?this.originalPageX+Math.round((f-this.originalPageX)/d.grid[0])*
d.grid[0]:this.originalPageX;f=b?!(f-this.offset.click.left<b[0]||f-this.offset.click.left>b[2])?f:!(f-this.offset.click.left<b[0])?f-d.grid[0]:f+d.grid[0]:f}}return{top:i-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:c.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&a.browser.version<
526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():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=false},_trigger:function(g,d,c){c=c||this._uiHash();a.ui.plugin.call(this,g,[d,c]);if(g=="drag")this.positionAbs=this._convertPositionTo("absolute");return a.Widget.prototype._trigger.call(this,g,d,
c)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});a.ui.plugin.add("draggable","connectToSortable",{start:function(g,d){var c=a(this).data("draggable"),e=c.options,f=a.extend({},d,{item:c.element});c.sortables=[];a(e.connectToSortable).each(function(){var i=a.data(this,"sortable");if(i&&!i.options.disabled){c.sortables.push({instance:i,shouldRevert:i.options.revert});i.refreshPositions();i._trigger("activate",
g,f)}})},stop:function(g,d){var c=a(this).data("draggable"),e=a.extend({},d,{item:c.element});a.each(c.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;c.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(g);this.instance.options.helper=this.instance.options._helper;c.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=
false;this.instance._trigger("deactivate",g,e)}})},drag:function(g,d){var c=a(this).data("draggable"),e=this;a.each(c.sortables,function(){this.instance.positionAbs=c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(e).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",true);
this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return d.helper[0]};g.target=this.instance.currentItem[0];this.instance._mouseCapture(g,true);this.instance._mouseStart(g,true,true);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",g);c.dropped=this.instance.element;c.currentItem=c.element;this.instance.fromOutside=c}this.instance.currentItem&&this.instance._mouseDrag(g)}else if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",g,this.instance._uiHash(this.instance));this.instance._mouseStop(g,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&
this.instance.placeholder.remove();c._trigger("fromSortable",g);c.dropped=false}})}});a.ui.plugin.add("draggable","cursor",{start:function(){var g=a("body"),d=a(this).data("draggable").options;if(g.css("cursor"))d._cursor=g.css("cursor");g.css("cursor",d.cursor)},stop:function(){var g=a(this).data("draggable").options;g._cursor&&a("body").css("cursor",g._cursor)}});a.ui.plugin.add("draggable","opacity",{start:function(g,d){var c=a(d.helper),e=a(this).data("draggable").options;if(c.css("opacity"))e._opacity=
c.css("opacity");c.css("opacity",e.opacity)},stop:function(g,d){var c=a(this).data("draggable").options;c._opacity&&a(d.helper).css("opacity",c._opacity)}});a.ui.plugin.add("draggable","scroll",{start:function(){var g=a(this).data("draggable");if(g.scrollParent[0]!=document&&g.scrollParent[0].tagName!="HTML")g.overflowOffset=g.scrollParent.offset()},drag:function(g){var d=a(this).data("draggable"),c=d.options,e=false;if(d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML"){if(!c.axis||c.axis!=
"x")if(d.overflowOffset.top+d.scrollParent[0].offsetHeight-g.pageY<c.scrollSensitivity)d.scrollParent[0].scrollTop=e=d.scrollParent[0].scrollTop+c.scrollSpeed;else if(g.pageY-d.overflowOffset.top<c.scrollSensitivity)d.scrollParent[0].scrollTop=e=d.scrollParent[0].scrollTop-c.scrollSpeed;if(!c.axis||c.axis!="y")if(d.overflowOffset.left+d.scrollParent[0].offsetWidth-g.pageX<c.scrollSensitivity)d.scrollParent[0].scrollLeft=e=d.scrollParent[0].scrollLeft+c.scrollSpeed;else if(g.pageX-d.overflowOffset.left<
c.scrollSensitivity)d.scrollParent[0].scrollLeft=e=d.scrollParent[0].scrollLeft-c.scrollSpeed}else{if(!c.axis||c.axis!="x")if(g.pageY-a(document).scrollTop()<c.scrollSensitivity)e=a(document).scrollTop(a(document).scrollTop()-c.scrollSpeed);else if(a(window).height()-(g.pageY-a(document).scrollTop())<c.scrollSensitivity)e=a(document).scrollTop(a(document).scrollTop()+c.scrollSpeed);if(!c.axis||c.axis!="y")if(g.pageX-a(document).scrollLeft()<c.scrollSensitivity)e=a(document).scrollLeft(a(document).scrollLeft()-
c.scrollSpeed);else if(a(window).width()-(g.pageX-a(document).scrollLeft())<c.scrollSensitivity)e=a(document).scrollLeft(a(document).scrollLeft()+c.scrollSpeed)}e!==false&&a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(d,g)}});a.ui.plugin.add("draggable","snap",{start:function(){var g=a(this).data("draggable"),d=g.options;g.snapElements=[];a(d.snap.constructor!=String?d.snap.items||":data(draggable)":d.snap).each(function(){var c=a(this),e=c.offset();this!=g.element[0]&&g.snapElements.push({item:this,
width:c.outerWidth(),height:c.outerHeight(),top:e.top,left:e.left})})},drag:function(g,d){for(var c=a(this).data("draggable"),e=c.options,f=e.snapTolerance,i=d.offset.left,b=i+c.helperProportions.width,h=d.offset.top,k=h+c.helperProportions.height,l=c.snapElements.length-1;l>=0;l--){var j=c.snapElements[l].left,m=j+c.snapElements[l].width,n=c.snapElements[l].top,o=n+c.snapElements[l].height;if(j-f<i&&i<m+f&&n-f<h&&h<o+f||j-f<i&&i<m+f&&n-f<k&&k<o+f||j-f<b&&b<m+f&&n-f<h&&h<o+f||j-f<b&&b<m+f&&n-f<k&&
k<o+f){if(e.snapMode!="inner"){var p=Math.abs(n-k)<=f,q=Math.abs(o-h)<=f,u=Math.abs(j-b)<=f,s=Math.abs(m-i)<=f;if(p)d.position.top=c._convertPositionTo("relative",{top:n-c.helperProportions.height,left:0}).top-c.margins.top;if(q)d.position.top=c._convertPositionTo("relative",{top:o,left:0}).top-c.margins.top;if(u)d.position.left=c._convertPositionTo("relative",{top:0,left:j-c.helperProportions.width}).left-c.margins.left;if(s)d.position.left=c._convertPositionTo("relative",{top:0,left:m}).left-c.margins.left}var r=
p||q||u||s;if(e.snapMode!="outer"){p=Math.abs(n-h)<=f;q=Math.abs(o-k)<=f;u=Math.abs(j-i)<=f;s=Math.abs(m-b)<=f;if(p)d.position.top=c._convertPositionTo("relative",{top:n,left:0}).top-c.margins.top;if(q)d.position.top=c._convertPositionTo("relative",{top:o-c.helperProportions.height,left:0}).top-c.margins.top;if(u)d.position.left=c._convertPositionTo("relative",{top:0,left:j}).left-c.margins.left;if(s)d.position.left=c._convertPositionTo("relative",{top:0,left:m-c.helperProportions.width}).left-c.margins.left}if(!c.snapElements[l].snapping&&
(p||q||u||s||r))c.options.snap.snap&&c.options.snap.snap.call(c.element,g,a.extend(c._uiHash(),{snapItem:c.snapElements[l].item}));c.snapElements[l].snapping=p||q||u||s||r}else{c.snapElements[l].snapping&&c.options.snap.release&&c.options.snap.release.call(c.element,g,a.extend(c._uiHash(),{snapItem:c.snapElements[l].item}));c.snapElements[l].snapping=false}}}});a.ui.plugin.add("draggable","stack",{start:function(){var g=a(this).data("draggable").options;g=a.makeArray(a(g.stack)).sort(function(c,e){return(parseInt(a(c).css("zIndex"),
10)||0)-(parseInt(a(e).css("zIndex"),10)||0)});if(g.length){var d=parseInt(g[0].style.zIndex)||0;a(g).each(function(c){this.style.zIndex=d+c});this[0].style.zIndex=d+g.length}}});a.ui.plugin.add("draggable","zIndex",{start:function(g,d){var c=a(d.helper),e=a(this).data("draggable").options;if(c.css("zIndex"))e._zIndex=c.css("zIndex");c.css("zIndex",e.zIndex)},stop:function(g,d){var c=a(this).data("draggable").options;c._zIndex&&a(d.helper).css("zIndex",c._zIndex)}})})(jQuery);
(function(a){a.widget("ui.droppable",{version:"1.9pre",widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var g=this.options,d=g.accept;this.isover=0;this.isout=1;this.accept=a.isFunction(d)?d:function(c){return c.is(d)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[g.scope]=a.ui.ddmanager.droppables[g.scope]||[];
a.ui.ddmanager.droppables[g.scope].push(this);g.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var g=a.ui.ddmanager.droppables[this.options.scope],d=0;d<g.length;d++)g[d]==this&&g.splice(d,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(g,d){if(g=="accept")this.accept=a.isFunction(d)?d:function(c){return c.is(d)};a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(g){var d=
a.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass);d&&this._trigger("activate",g,this.ui(d))},_deactivate:function(g){var d=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);d&&this._trigger("deactivate",g,this.ui(d))},_over:function(g){var d=a.ui.ddmanager.current;if(!(!d||(d.currentItem||d.element)[0]==this.element[0]))if(this.accept.call(this.element[0],d.currentItem||d.element)){this.options.hoverClass&&
this.element.addClass(this.options.hoverClass);this._trigger("over",g,this.ui(d))}},_out:function(g){var d=a.ui.ddmanager.current;if(!(!d||(d.currentItem||d.element)[0]==this.element[0]))if(this.accept.call(this.element[0],d.currentItem||d.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",g,this.ui(d))}},_drop:function(g,d){var c=d||a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return false;var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var f=
a.data(this,"droppable");if(f.options.greedy&&!f.options.disabled&&f.options.scope==c.options.scope&&f.accept.call(f.element[0],c.currentItem||c.element)&&a.ui.intersect(c,a.extend(f,{offset:f.element.offset()}),f.options.tolerance)){e=true;return false}});if(e)return false;if(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",
g,this.ui(c));return this.element}return false},ui:function(g){return{draggable:g.currentItem||g.element,helper:g.helper,position:g.position,offset:g.positionAbs}}});a.ui.intersect=function(g,d,c){if(!d.offset)return false;var e=(g.positionAbs||g.position.absolute).left,f=e+g.helperProportions.width,i=(g.positionAbs||g.position.absolute).top,b=i+g.helperProportions.height,h=d.offset.left,k=h+d.proportions.width,l=d.offset.top,j=l+d.proportions.height;switch(c){case "fit":return h<=e&&f<=k&&l<=i&&
b<=j;case "intersect":return h<e+g.helperProportions.width/2&&f-g.helperProportions.width/2<k&&l<i+g.helperProportions.height/2&&b-g.helperProportions.height/2<j;case "pointer":return a.ui.isOver((g.positionAbs||g.position.absolute).top+(g.clickOffset||g.offset.click).top,(g.positionAbs||g.position.absolute).left+(g.clickOffset||g.offset.click).left,l,h,d.proportions.height,d.proportions.width);case "touch":return(i>=l&&i<=j||b>=l&&b<=j||i<l&&b>j)&&(e>=h&&e<=k||f>=h&&f<=k||e<h&&f>k);default:return false}};
a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(g,d){var c=a.ui.ddmanager.droppables[g.options.scope]||[],e=d?d.type:null,f=(g.currentItem||g.element).find(":data(droppable)").andSelf(),i=0;a:for(;i<c.length;i++)if(!(c[i].options.disabled||g&&!c[i].accept.call(c[i].element[0],g.currentItem||g.element))){for(var b=0;b<f.length;b++)if(f[b]==c[i].element[0]){c[i].proportions.height=0;continue a}c[i].visible=c[i].element.css("display")!="none";if(c[i].visible){e=="mousedown"&&
c[i]._activate.call(c[i],d);c[i].offset=c[i].element.offset();c[i].proportions={width:c[i].element[0].offsetWidth,height:c[i].element[0].offsetHeight}}}},drop:function(g,d){var c=false;a.each(a.ui.ddmanager.droppables[g.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&a.ui.intersect(g,this,this.options.tolerance))c=c||this._drop.call(this,d);if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],g.currentItem||g.element)){this.isout=1;this.isover=
0;this._deactivate.call(this,d)}}});return c},dragStart:function(g,d){g.element.parentsUntil("body").bind("scroll.droppable",function(){g.options.refreshPositions||a.ui.ddmanager.prepareOffsets(g,d)})},drag:function(g,d){g.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(g,d);a.each(a.ui.ddmanager.droppables[g.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var c=a.ui.intersect(g,this,this.options.tolerance);if(c=!c&&this.isover==1?"isout":c&&this.isover==
0?"isover":null){var e;if(this.options.greedy){var f=this.element.parents(":data(droppable):eq(0)");if(f.length){e=a.data(f[0],"droppable");e.greedyChild=c=="isover"?1:0}}if(e&&c=="isover"){e.isover=0;e.isout=1;e._out.call(e,d)}this[c]=1;this[c=="isout"?"isover":"isout"]=0;this[c=="isover"?"_over":"_out"].call(this,d);if(e&&c=="isout"){e.isout=0;e.isover=1;e._over.call(e,d)}}}})},dragStop:function(g,d){g.element.parentsUntil("body").unbind("scroll.droppable");g.options.refreshPositions||a.ui.ddmanager.prepareOffsets(g,
d)}}})(jQuery);
(function(a){a.widget("ui.resizable",a.ui.mouse,{version:"1.9pre",widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var c=this,e=this.options;this.element.addClass("ui-resizable");a.extend(this,{_aspectRatio:!!e.aspectRatio,aspectRatio:e.aspectRatio,originalElement:this.element,
_proportionallyResizeElements:[],_helper:e.helper||e.ghost||e.animate?e.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&a.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(a('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),
top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;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=e.handles||(!a(".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){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var f=this.handles.split(",");this.handles={};for(var i=0;i<f.length;i++){var b=a.trim(f[i]),h=a('<div class="ui-resizable-handle '+("ui-resizable-"+b)+'"></div>');/sw|se|ne|nw/.test(b)&&h.css({zIndex:++e.zIndex});"se"==b&&h.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[b]=".ui-resizable-"+b;this.element.append(h)}}this._renderAxis=function(k){k=k||this.element;for(var l in this.handles){if(this.handles[l].constructor==
String)this.handles[l]=a(this.handles[l],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=a(this.handles[l],this.element),m=0;m=/sw|ne|nw|se|n|s/.test(l)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(l)?"Top":/se|sw|s/.test(l)?"Bottom":/^e$/.test(l)?"Right":"Left"].join("");k.css(j,m);this._proportionallyResize()}a(this.handles[l])}};this._renderAxis(this.element);this._handles=a(".ui-resizable-handle",this.element).disableSelection();
this._handles.mouseover(function(){if(!c.resizing){if(this.className)var k=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);c.axis=k&&k[1]?k[1]:"se"}});if(e.autoHide){this._handles.hide();a(this.element).addClass("ui-resizable-autohide").hover(function(){if(!e.disabled){a(this).removeClass("ui-resizable-autohide");c._handles.show()}},function(){if(!e.disabled)if(!c.resizing){a(this).addClass("ui-resizable-autohide");c._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();
var c=function(f){a(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){c(this.element);var e=this.element;e.after(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);c(this.originalElement);return this},_mouseCapture:function(c){var e=
false,f;for(f in this.handles)if(a(this.handles[f])[0]==c.target)e=true;return!this.options.disabled&&e},_mouseStart:function(c){var e=this.options,f=this.element.position(),i=this.element;this.resizing=true;this.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()};if(i.is(".ui-draggable")||/absolute/.test(i.css("position")))i.css({position:"absolute",top:f.top,left:f.left});a.browser.opera&&/relative/.test(i.css("position"))&&i.css({position:"relative",top:"auto",left:"auto"});
this._renderProxy();f=g(this.helper.css("left"));var b=g(this.helper.css("top"));if(e.containment){f+=a(e.containment).scrollLeft()||0;b+=a(e.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:f,top:b};this.size=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()};this.originalSize=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()};this.originalPosition={left:f,top:b};this.sizeDiff=
{width:i.outerWidth()-i.width(),height:i.outerHeight()-i.height()};this.originalMousePosition={left:c.pageX,top:c.pageY};this.aspectRatio=typeof e.aspectRatio=="number"?e.aspectRatio:this.originalSize.width/this.originalSize.height||1;e=a(".ui-resizable-"+this.axis).css("cursor");a("body").css("cursor",e=="auto"?this.axis+"-resize":e);i.addClass("ui-resizable-resizing");this._propagate("start",c);return true},_mouseDrag:function(c){var e=this.helper,f=this.originalMousePosition,i=this._change[this.axis];
if(!i)return false;f=i.apply(this,[c,c.pageX-f.left||0,c.pageY-f.top||0]);this._updateVirtualBoundaries(c.shiftKey);if(this._aspectRatio||c.shiftKey)f=this._updateRatio(f,c);f=this._respectSize(f,c);this._propagate("resize",c);e.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(f);this._trigger("resize",c,this.ui());return false},
_mouseStop:function(c){this.resizing=false;var e=this.options;if(this._helper){var f=this._proportionallyResizeElements,i=f.length&&/textarea/i.test(f[0].nodeName);f=i&&a.ui.hasScroll(f[0],"left")?0:this.sizeDiff.height;i=i?0:this.sizeDiff.width;i={width:this.helper.width()-i,height:this.helper.height()-f};f=parseInt(this.element.css("left"),10)+(this.position.left-this.originalPosition.left)||null;var b=parseInt(this.element.css("top"),10)+(this.position.top-this.originalPosition.top)||null;e.animate||
this.element.css(a.extend(i,{top:b,left:f}));this.helper.height(this.size.height);this.helper.width(this.size.width);this._helper&&!e.animate&&this._proportionallyResize()}a("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",c);this._helper&&this.helper.remove();return false},_updateVirtualBoundaries:function(c){var e=this.options,f,i,b;e={minWidth:d(e.minWidth)?e.minWidth:0,maxWidth:d(e.maxWidth)?e.maxWidth:Infinity,minHeight:d(e.minHeight)?e.minHeight:
0,maxHeight:d(e.maxHeight)?e.maxHeight:Infinity};if(this._aspectRatio||c){c=e.minHeight*this.aspectRatio;i=e.minWidth/this.aspectRatio;f=e.maxHeight*this.aspectRatio;b=e.maxWidth/this.aspectRatio;if(c>e.minWidth)e.minWidth=c;if(i>e.minHeight)e.minHeight=i;if(f<e.maxWidth)e.maxWidth=f;if(b<e.maxHeight)e.maxHeight=b}this._vBoundaries=e},_updateCache:function(c){this.offset=this.helper.offset();if(d(c.left))this.position.left=c.left;if(d(c.top))this.position.top=c.top;if(d(c.height))this.size.height=
c.height;if(d(c.width))this.size.width=c.width},_updateRatio:function(c){var e=this.position,f=this.size,i=this.axis;if(d(c.height))c.width=c.height*this.aspectRatio;else if(d(c.width))c.height=c.width/this.aspectRatio;if(i=="sw"){c.left=e.left+(f.width-c.width);c.top=null}if(i=="nw"){c.top=e.top+(f.height-c.height);c.left=e.left+(f.width-c.width)}return c},_respectSize:function(c){var e=this._vBoundaries,f=this.axis,i=d(c.width)&&e.maxWidth&&e.maxWidth<c.width,b=d(c.height)&&e.maxHeight&&e.maxHeight<
c.height,h=d(c.width)&&e.minWidth&&e.minWidth>c.width,k=d(c.height)&&e.minHeight&&e.minHeight>c.height;if(h)c.width=e.minWidth;if(k)c.height=e.minHeight;if(i)c.width=e.maxWidth;if(b)c.height=e.maxHeight;var l=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,m=/sw|nw|w/.test(f);f=/nw|ne|n/.test(f);if(h&&m)c.left=l-e.minWidth;if(i&&m)c.left=l-e.maxWidth;if(k&&f)c.top=j-e.minHeight;if(b&&f)c.top=j-e.maxHeight;if((e=!c.width&&!c.height)&&!c.left&&c.top)c.top=null;
else if(e&&!c.top&&c.left)c.left=null;return c},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var c=this.helper||this.element,e=0;e<this._proportionallyResizeElements.length;e++){var f=this._proportionallyResizeElements[e];if(!this.borderDif){var i=[f.css("borderTopWidth"),f.css("borderRightWidth"),f.css("borderBottomWidth"),f.css("borderLeftWidth")],b=[f.css("paddingTop"),f.css("paddingRight"),f.css("paddingBottom"),f.css("paddingLeft")];this.borderDif=a.map(i,
function(h,k){var l=parseInt(h,10)||0,j=parseInt(b[k],10)||0;return l+j})}a.browser.msie&&(a(c).is(":hidden")||a(c).parents(":hidden").length)||f.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||a('<div style="overflow:hidden;"></div>');var e=a.browser.msie&&a.browser.version<7,f=e?1:0;e=e?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+
e,height:this.element.outerHeight()+e,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++c.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(c,e){return{width:this.originalSize.width+e}},w:function(c,e){return{left:this.originalPosition.left+e,width:this.originalSize.width-e}},n:function(c,e,f){return{top:this.originalPosition.top+f,height:this.originalSize.height-f}},s:function(c,e,f){return{height:this.originalSize.height+
f}},se:function(c,e,f){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[c,e,f]))},sw:function(c,e,f){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[c,e,f]))},ne:function(c,e,f){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[c,e,f]))},nw:function(c,e,f){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[c,e,f]))}},_propagate:function(c,e){a.ui.plugin.call(this,c,[e,this.ui()]);
c!="resize"&&this._trigger(c,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});a.ui.plugin.add("resizable","alsoResize",{start:function(){var c=a(this).data("resizable").options,e=function(f){a(f).each(function(){var i=a(this);i.data("resizable-alsoresize",{width:parseInt(i.width(),10),height:parseInt(i.height(),10),
left:parseInt(i.css("left"),10),top:parseInt(i.css("top"),10),position:i.css("position")})})};if(typeof c.alsoResize=="object"&&!c.alsoResize.parentNode)if(c.alsoResize.length){c.alsoResize=c.alsoResize[0];e(c.alsoResize)}else a.each(c.alsoResize,function(f){e(f)});else e(c.alsoResize)},resize:function(c,e){var f=a(this).data("resizable"),i=f.options,b=f.originalSize,h=f.originalPosition,k={height:f.size.height-b.height||0,width:f.size.width-b.width||0,top:f.position.top-h.top||0,left:f.position.left-
h.left||0},l=function(j,m){a(j).each(function(){var n=a(this),o=a(this).data("resizable-alsoresize"),p={},q=m&&m.length?m:n.parents(e.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(q,function(u,s){var r=(o[s]||0)+(k[s]||0);if(r&&r>=0)p[s]=r||null});if(a.browser.opera&&/relative/.test(n.css("position"))){f._revertToRelativePosition=true;n.css({position:"absolute",top:"auto",left:"auto"})}n.css(p)})};typeof i.alsoResize=="object"&&!i.alsoResize.nodeType?a.each(i.alsoResize,
function(j,m){l(j,m)}):l(i.alsoResize)},stop:function(){var c=a(this).data("resizable"),e=c.options,f=function(i){a(i).each(function(){var b=a(this);b.css({position:b.data("resizable-alsoresize").position})})};if(c._revertToRelativePosition){c._revertToRelativePosition=false;typeof e.alsoResize=="object"&&!e.alsoResize.nodeType?a.each(e.alsoResize,function(i){f(i)}):f(e.alsoResize)}a(this).removeData("resizable-alsoresize")}});a.ui.plugin.add("resizable","animate",{stop:function(c){var e=a(this).data("resizable"),
f=e.options,i=e._proportionallyResizeElements,b=i.length&&/textarea/i.test(i[0].nodeName),h=b&&a.ui.hasScroll(i[0],"left")?0:e.sizeDiff.height;b={width:e.size.width-(b?0:e.sizeDiff.width),height:e.size.height-h};h=parseInt(e.element.css("left"),10)+(e.position.left-e.originalPosition.left)||null;var k=parseInt(e.element.css("top"),10)+(e.position.top-e.originalPosition.top)||null;e.element.animate(a.extend(b,k&&h?{top:k,left:h}:{}),{duration:f.animateDuration,easing:f.animateEasing,step:function(){var l=
{width:parseInt(e.element.css("width"),10),height:parseInt(e.element.css("height"),10),top:parseInt(e.element.css("top"),10),left:parseInt(e.element.css("left"),10)};i&&i.length&&a(i[0]).css({width:l.width,height:l.height});e._updateCache(l);e._propagate("resize",c)}})}});a.ui.plugin.add("resizable","containment",{start:function(){var c=a(this).data("resizable"),e=c.element,f=c.options.containment;if(e=f instanceof a?f.get(0):/parent/.test(f)?e.parent().get(0):f){c.containerElement=a(e);if(/document/.test(f)||
f==document){c.containerOffset={left:0,top:0};c.containerPosition={left:0,top:0};c.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}}else{var i=a(e),b=[];a(["Top","Right","Left","Bottom"]).each(function(l,j){b[l]=g(i.css("padding"+j))});c.containerOffset=i.offset();c.containerPosition=i.position();c.containerSize={height:i.innerHeight()-b[3],width:i.innerWidth()-b[1]};f=c.containerOffset;var h=c.containerSize.height,
k=c.containerSize.width;k=a.ui.hasScroll(e,"left")?e.scrollWidth:k;h=a.ui.hasScroll(e)?e.scrollHeight:h;c.parentData={element:e,left:f.left,top:f.top,width:k,height:h}}}},resize:function(c){var e=a(this).data("resizable"),f=e.options,i=e.containerOffset,b=e.position;c=e._aspectRatio||c.shiftKey;var h={top:0,left:0},k=e.containerElement;if(k[0]!=document&&/static/.test(k.css("position")))h=i;if(b.left<(e._helper?i.left:0)){e.size.width+=e._helper?e.position.left-i.left:e.position.left-h.left;if(c)e.size.height=
e.size.width/f.aspectRatio;e.position.left=f.helper?i.left:0}if(b.top<(e._helper?i.top:0)){e.size.height+=e._helper?e.position.top-i.top:e.position.top;if(c)e.size.width=e.size.height*f.aspectRatio;e.position.top=e._helper?i.top:0}e.offset.left=e.parentData.left+e.position.left;e.offset.top=e.parentData.top+e.position.top;f=Math.abs((e._helper?e.offset.left-h.left:e.offset.left-h.left)+e.sizeDiff.width);i=Math.abs((e._helper?e.offset.top-h.top:e.offset.top-i.top)+e.sizeDiff.height);b=e.containerElement.get(0)==
e.element.parent().get(0);h=/relative|absolute/.test(e.containerElement.css("position"));if(b&&h)f-=e.parentData.left;if(f+e.size.width>=e.parentData.width){e.size.width=e.parentData.width-f;if(c)e.size.height=e.size.width/e.aspectRatio}if(i+e.size.height>=e.parentData.height){e.size.height=e.parentData.height-i;if(c)e.size.width=e.size.height*e.aspectRatio}},stop:function(){var c=a(this).data("resizable"),e=c.options,f=c.containerOffset,i=c.containerPosition,b=c.containerElement,h=a(c.helper),k=
h.offset(),l=h.outerWidth()-c.sizeDiff.width;h=h.outerHeight()-c.sizeDiff.height;c._helper&&!e.animate&&/relative/.test(b.css("position"))&&a(this).css({left:k.left-i.left-f.left,width:l,height:h});c._helper&&!e.animate&&/static/.test(b.css("position"))&&a(this).css({left:k.left-i.left-f.left,width:l,height:h})}});a.ui.plugin.add("resizable","ghost",{start:function(){var c=a(this).data("resizable"),e=c.options,f=c.size;c.ghost=c.originalElement.clone();c.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(typeof e.ghost=="string"?e.ghost:"");c.ghost.appendTo(c.helper)},resize:function(){var c=a(this).data("resizable");c.ghost&&c.ghost.css({position:"relative",height:c.size.height,width:c.size.width})},stop:function(){var c=a(this).data("resizable");c.ghost&&c.helper&&c.helper.get(0).removeChild(c.ghost.get(0))}});a.ui.plugin.add("resizable","grid",{resize:function(){var c=a(this).data("resizable"),e=c.options,
f=c.size,i=c.originalSize,b=c.originalPosition,h=c.axis;e.grid=typeof e.grid=="number"?[e.grid,e.grid]:e.grid;var k=Math.round((f.width-i.width)/(e.grid[0]||1))*(e.grid[0]||1);e=Math.round((f.height-i.height)/(e.grid[1]||1))*(e.grid[1]||1);if(/^(se|s|e)$/.test(h)){c.size.width=i.width+k;c.size.height=i.height+e}else if(/^(ne)$/.test(h)){c.size.width=i.width+k;c.size.height=i.height+e;c.position.top=b.top-e}else{if(/^(sw)$/.test(h)){c.size.width=i.width+k;c.size.height=i.height+e}else{c.size.width=
i.width+k;c.size.height=i.height+e;c.position.top=b.top-e}c.position.left=b.left-k}}});var g=function(c){return parseInt(c,10)||0},d=function(c){return!isNaN(parseInt(c,10))}})(jQuery);
(function(a){a.widget("ui.selectable",a.ui.mouse,{version:"1.9pre",options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var g=this;this.element.addClass("ui-selectable");this.dragged=false;var d;this.refresh=function(){d=a(g.options.filter,g.element[0]);d.each(function(){var c=a(this),e=c.offset();a.data(this,"selectable-item",{element:this,$element:c,left:e.left,top:e.top,right:e.left+c.outerWidth(),bottom:e.top+c.outerHeight(),startselected:false,
selected:c.hasClass("ui-selected"),selecting:c.hasClass("ui-selecting"),unselecting:c.hasClass("ui-unselecting")})})};this.refresh();this.selectees=d.addClass("ui-selectee");this._mouseInit();this.helper=a("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(g){var d=
this;this.opos=[g.pageX,g.pageY];if(!this.options.disabled){var c=this.options;this.selectees=a(c.filter,this.element[0]);this._trigger("start",g);a(c.appendTo).append(this.helper);this.helper.css({left:g.clientX,top:g.clientY,width:0,height:0});c.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var e=a.data(this,"selectable-item");e.startselected=true;if(!g.metaKey){e.$element.removeClass("ui-selected");e.selected=false;e.$element.addClass("ui-unselecting");e.unselecting=
true;d._trigger("unselecting",g,{unselecting:e.element})}});a(g.target).parents().andSelf().each(function(){var e=a.data(this,"selectable-item");if(e){var f=!g.metaKey||!e.$element.hasClass("ui-selected");e.$element.removeClass(f?"ui-unselecting":"ui-selected").addClass(f?"ui-selecting":"ui-unselecting");e.unselecting=!f;e.selecting=f;(e.selected=f)?d._trigger("selecting",g,{selecting:e.element}):d._trigger("unselecting",g,{unselecting:e.element});return false}})}},_mouseDrag:function(g){var d=this;
this.dragged=true;if(!this.options.disabled){var c=this.options,e=this.opos[0],f=this.opos[1],i=g.pageX,b=g.pageY;if(e>i){var h=i;i=e;e=h}if(f>b){h=b;b=f;f=h}this.helper.css({left:e,top:f,width:i-e,height:b-f});this.selectees.each(function(){var k=a.data(this,"selectable-item");if(!(!k||k.element==d.element[0])){var l=false;if(c.tolerance=="touch")l=!(k.left>i||k.right<e||k.top>b||k.bottom<f);else if(c.tolerance=="fit")l=k.left>e&&k.right<i&&k.top>f&&k.bottom<b;if(l){if(k.selected){k.$element.removeClass("ui-selected");
k.selected=false}if(k.unselecting){k.$element.removeClass("ui-unselecting");k.unselecting=false}if(!k.selecting){k.$element.addClass("ui-selecting");k.selecting=true;d._trigger("selecting",g,{selecting:k.element})}}else{if(k.selecting)if(g.metaKey&&k.startselected){k.$element.removeClass("ui-selecting");k.selecting=false;k.$element.addClass("ui-selected");k.selected=true}else{k.$element.removeClass("ui-selecting");k.selecting=false;if(k.startselected){k.$element.addClass("ui-unselecting");k.unselecting=
true}d._trigger("unselecting",g,{unselecting:k.element})}if(k.selected)if(!g.metaKey&&!k.startselected){k.$element.removeClass("ui-selected");k.selected=false;k.$element.addClass("ui-unselecting");k.unselecting=true;d._trigger("unselecting",g,{unselecting:k.element})}}}});return false}},_mouseStop:function(g){var d=this;this.dragged=false;a(".ui-unselecting",this.element[0]).each(function(){var c=a.data(this,"selectable-item");c.$element.removeClass("ui-unselecting");c.unselecting=false;c.startselected=
false;d._trigger("unselected",g,{unselected:c.element})});a(".ui-selecting",this.element[0]).each(function(){var c=a.data(this,"selectable-item");c.$element.removeClass("ui-selecting").addClass("ui-selected");c.selecting=false;c.selected=true;c.startselected=true;d._trigger("selected",g,{selected:c.element})});this._trigger("stop",g);this.helper.remove();return false}})})(jQuery);
(function(a){a.widget("ui.sortable",a.ui.mouse,{version:"1.9pre",widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){var g=this.options;this.containerCache=
{};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?g.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled");this._mouseDestroy();for(var g=this.items.length-1;g>=0;g--)this.items[g].item.removeData(this.widgetName+"-item");return this},_setOption:function(g,
d){if(g==="disabled"){this.options[g]=d;this.widget().toggleClass("ui-sortable-disabled",!!d)}else a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(g,d){var c=this;if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(g);var e=null,f=this;a(g.target).parents().each(function(){if(a.data(this,c.widgetName+"-item")==f){e=a(this);return false}});if(a.data(g.target,c.widgetName+"-item")==f)e=a(g.target);if(!e)return false;
if(this.options.handle&&!d){var i=false;a(this.options.handle,e).find("*").andSelf().each(function(){if(this==g.target)i=true});if(!i)return false}this.currentItem=e;this._removeCurrentsFromItems();return true},_mouseStart:function(g,d,c){d=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(g);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-
this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:g.pageX-this.offset.left,top:g.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(g);this.originalPageX=g.pageX;this.originalPageY=g.pageY;d.cursorAt&&this._adjustOffsetFromHelper(d.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],
parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();d.containment&&this._setContainment();if(d.cursor){if(a("body").css("cursor"))this._storedCursor=a("body").css("cursor");a("body").css("cursor",d.cursor)}if(d.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",d.opacity)}if(d.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",
d.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",g,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("activate",g,this._uiHash(this));if(a.ui.ddmanager)a.ui.ddmanager.current=this;a.ui.ddmanager&&!d.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,g);this.dragging=true;this.helper.addClass("ui-sortable-helper");
this._mouseDrag(g);return true},_mouseDrag:function(g){this.position=this._generatePosition(g);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var d=this.options,c=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-g.pageY<d.scrollSensitivity)this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop+d.scrollSpeed;
else if(g.pageY-this.overflowOffset.top<d.scrollSensitivity)this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop-d.scrollSpeed;if(this.overflowOffset.left+this.scrollParent[0].offsetWidth-g.pageX<d.scrollSensitivity)this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft+d.scrollSpeed;else if(g.pageX-this.overflowOffset.left<d.scrollSensitivity)this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft-d.scrollSpeed}else{if(g.pageY-a(document).scrollTop()<d.scrollSensitivity)c=
a(document).scrollTop(a(document).scrollTop()-d.scrollSpeed);else if(a(window).height()-(g.pageY-a(document).scrollTop())<d.scrollSensitivity)c=a(document).scrollTop(a(document).scrollTop()+d.scrollSpeed);if(g.pageX-a(document).scrollLeft()<d.scrollSensitivity)c=a(document).scrollLeft(a(document).scrollLeft()-d.scrollSpeed);else if(a(window).width()-(g.pageX-a(document).scrollLeft())<d.scrollSensitivity)c=a(document).scrollLeft(a(document).scrollLeft()+d.scrollSpeed)}c!==false&&a.ui.ddmanager&&!d.dropBehaviour&&
a.ui.ddmanager.prepareOffsets(this,g)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(d=this.items.length-1;d>=0;d--){c=this.items[d];var e=c.item[0],f=this._intersectsWithPointer(c);if(f)if(e!=this.currentItem[0]&&this.placeholder[f==1?"next":"prev"]()[0]!=e&&!a.contains(this.placeholder[0],e)&&(this.options.type==
"semi-dynamic"?!a.contains(this.element[0],e):1)){this.direction=f==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(c))this._rearrange(g,c);else break;this._trigger("change",g,this._uiHash());break}}this._contactContainers(g);a.ui.ddmanager&&a.ui.ddmanager.drag(this,g);this._trigger("sort",g,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(g,d){if(g){a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,g);if(this.options.revert){var c=
this,e=c.placeholder.offset();c.reverting=true;a(this.helper).animate({left:e.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-c.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(g)})}else this._clear(g,d);return false}},cancel:function(){if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?
this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var g=this.containers.length-1;g>=0;g--){this.containers[g]._trigger("deactivate",null,this._uiHash(this));if(this.containers[g].containerCache.over){this.containers[g]._trigger("out",null,this._uiHash(this));this.containers[g].containerCache.over=0}}}if(this.placeholder){this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&
this.helper&&this.helper[0].parentNode&&this.helper.remove();a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(g){var d=this._getItemsAsjQuery(g&&g.connected),c=[];g=g||{};a(d).each(function(){var e=(a(g.item||this).attr(g.attribute||"id")||"").match(g.expression||/(.+)[-=_](.+)/);if(e)c.push((g.key||e[1]+"[]")+"="+
(g.key&&g.expression?e[1]:e[2]))});!c.length&&g.key&&c.push(g.key+"=");return c.join("&")},toArray:function(g){var d=this._getItemsAsjQuery(g&&g.connected),c=[];g=g||{};d.each(function(){c.push(a(g.item||this).attr(g.attribute||"id")||"")});return c},_intersectsWith:function(g){var d=this.positionAbs.left,c=d+this.helperProportions.width,e=this.positionAbs.top,f=e+this.helperProportions.height,i=g.left,b=i+g.width,h=g.top,k=h+g.height,l=this.offset.click.top,j=this.offset.click.left;return this.options.tolerance==
"pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>g[this.floating?"width":"height"]?e+l>h&&e+l<k&&d+j>i&&d+j<b:i<d+this.helperProportions.width/2&&c-this.helperProportions.width/2<b&&h<e+this.helperProportions.height/2&&f-this.helperProportions.height/2<k},_intersectsWithPointer:function(g){var d=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,g.top,g.height);g=a.ui.isOverAxis(this.positionAbs.left+
this.offset.click.left,g.left,g.width);d=d&&g;g=this._getDragVerticalDirection();var c=this._getDragHorizontalDirection();if(!d)return false;return this.floating?c&&c=="right"||g=="down"?2:1:g&&(g=="down"?2:1)},_intersectsWithSides:function(g){var d=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,g.top+g.height/2,g.height);g=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,g.left+g.width/2,g.width);var c=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();
return this.floating&&e?e=="right"&&g||e=="left"&&!g:c&&(c=="down"&&d||c=="up"&&!d)},_getDragVerticalDirection:function(){var g=this.positionAbs.top-this.lastPositionAbs.top;return g!=0&&(g>0?"down":"up")},_getDragHorizontalDirection:function(){var g=this.positionAbs.left-this.lastPositionAbs.left;return g!=0&&(g>0?"right":"left")},refresh:function(g){this._refreshItems(g);this.refreshPositions();return this},_connectWith:function(){var g=this.options;return g.connectWith.constructor==String?[g.connectWith]:
g.connectWith},_getItemsAsjQuery:function(g){var d=[],c=[],e=this._connectWith();if(e&&g)for(g=e.length-1;g>=0;g--)for(var f=a(e[g]),i=f.length-1;i>=0;i--){var b=a.data(f[i],this.widgetName);if(b&&b!=this&&!b.options.disabled)c.push([a.isFunction(b.options.items)?b.options.items.call(b.element):a(b.options.items,b.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),b])}c.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):
a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(g=c.length-1;g>=0;g--)c[g][0].each(function(){d.push(this)});return a(d)},_removeCurrentsFromItems:function(){for(var g=this.currentItem.find(":data("+this.widgetName+"-item)"),d=0;d<this.items.length;d++)for(var c=0;c<g.length;c++)g[c]==this.items[d].item[0]&&this.items.splice(d,1)},_refreshItems:function(g){this.items=[];this.containers=[this];var d=this.items,c=[[a.isFunction(this.options.items)?
this.options.items.call(this.element[0],g,{item:this.currentItem}):a(this.options.items,this.element),this]],e=this._connectWith();if(e)for(var f=e.length-1;f>=0;f--)for(var i=a(e[f]),b=i.length-1;b>=0;b--){var h=a.data(i[b],this.widgetName);if(h&&h!=this&&!h.options.disabled){c.push([a.isFunction(h.options.items)?h.options.items.call(h.element[0],g,{item:this.currentItem}):a(h.options.items,h.element),h]);this.containers.push(h)}}for(f=c.length-1;f>=0;f--){g=c[f][1];e=c[f][0];b=0;for(i=e.length;b<
i;b++){h=a(e[b]);h.data(this.widgetName+"-item",g);d.push({item:h,instance:g,width:0,height:0,left:0,top:0})}}},refreshPositions:function(g){if(this.offsetParent&&this.helper)this.offset.parent=this._getParentOffset();for(var d=this.items.length-1;d>=0;d--){var c=this.items[d];if(!(c.instance!=this.currentContainer&&this.currentContainer&&c.item[0]!=this.currentItem[0])){var e=this.options.toleranceElement?a(this.options.toleranceElement,c.item):c.item;if(!g){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(d=this.containers.length-1;d>=0;d--){e=this.containers[d].element.offset();this.containers[d].containerCache.left=e.left;this.containers[d].containerCache.top=e.top;this.containers[d].containerCache.width=this.containers[d].element.outerWidth();this.containers[d].containerCache.height=this.containers[d].element.outerHeight()}return this},_createPlaceholder:function(g){var d=
g||this,c=d.options;if(!c.placeholder||c.placeholder.constructor==String){var e=c.placeholder;c.placeholder={element:function(){var f=a(document.createElement(d.currentItem[0].nodeName)).addClass(e||d.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!e)f.style.visibility="hidden";return f},update:function(f,i){if(!(e&&!c.forcePlaceholderSize)){i.height()||i.height(d.currentItem.innerHeight()-parseInt(d.currentItem.css("paddingTop")||0,10)-parseInt(d.currentItem.css("paddingBottom")||
0,10));i.width()||i.width(d.currentItem.innerWidth()-parseInt(d.currentItem.css("paddingLeft")||0,10)-parseInt(d.currentItem.css("paddingRight")||0,10))}}}}d.placeholder=a(c.placeholder.element.call(d.element,d.currentItem));d.currentItem.after(d.placeholder);c.placeholder.update(d,d.placeholder)},_contactContainers:function(g){for(var d=null,c=null,e=this.containers.length-1;e>=0;e--)if(!a.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(d&&
a.contains(this.containers[e].element[0],d.element[0]))){d=this.containers[e];c=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out",g,this._uiHash(this));this.containers[e].containerCache.over=0}if(d)if(this.containers.length===1){this.containers[c]._trigger("over",g,this._uiHash(this));this.containers[c].containerCache.over=1}else if(this.currentContainer!=this.containers[c]){d=1E4;e=null;for(var f=this.positionAbs[this.containers[c].floating?"left":"top"],i=this.items.length-
1;i>=0;i--)if(a.contains(this.containers[c].element[0],this.items[i].item[0])){var b=this.items[i][this.containers[c].floating?"left":"top"];if(Math.abs(b-f)<d){d=Math.abs(b-f);e=this.items[i]}}if(e||this.options.dropOnEmpty){this.currentContainer=this.containers[c];e?this._rearrange(g,e,null,true):this._rearrange(g,null,this.containers[c].element,true);this._trigger("change",g,this._uiHash());this.containers[c]._trigger("change",g,this._uiHash(this));this.options.placeholder.update(this.currentContainer,
this.placeholder);this.containers[c]._trigger("over",g,this._uiHash(this));this.containers[c].containerCache.over=1}}},_createHelper:function(g){var d=this.options;g=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[g,this.currentItem])):d.helper=="clone"?this.currentItem.clone():this.currentItem;g.parents("body").length||a(d.appendTo!="parent"?d.appendTo:this.currentItem[0].parentNode)[0].appendChild(g[0]);if(g[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")};if(g[0].style.width==""||d.forceHelperSize)g.width(this.currentItem.width());if(g[0].style.height==""||d.forceHelperSize)g.height(this.currentItem.height());return g},_adjustOffsetFromHelper:function(g){if(typeof g=="string")g=g.split(" ");if(a.isArray(g))g={left:+g[0],top:+g[1]||0};if("left"in g)this.offset.click.left=g.left+this.margins.left;if("right"in
g)this.offset.click.left=this.helperProportions.width-g.right+this.margins.left;if("top"in g)this.offset.click.top=g.top+this.margins.top;if("bottom"in g)this.offset.click.top=this.helperProportions.height-g.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var g=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.contains(this.scrollParent[0],this.offsetParent[0])){g.left+=this.scrollParent.scrollLeft();g.top+=
this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)g={top:0,left:0};return{top:g.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:g.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var g=this.currentItem.position();return{top:g.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),
left:g.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else 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 g=this.options;if(g.containment=="parent")g.containment=this.helper[0].parentNode;
if(g.containment=="document"||g.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(g.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(g.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(g.containment)){var d=a(g.containment)[0];g=a(g.containment).offset();
var c=a(d).css("overflow")!="hidden";this.containment=[g.left+(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0)-this.margins.left,g.top+(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0)-this.margins.top,g.left+(c?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,g.top+(c?Math.max(d.scrollHeight,
d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(g,d){if(!d)d=this.position;var c=g=="absolute"?1:-1,e=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(e[0].tagName);return{top:d.top+this.offset.relative.top*c+this.offset.parent.top*
c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:e.scrollTop())*c),left:d.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())*c)}},_generatePosition:function(g){var d=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:
this.scrollParent,e=/(html|body)/i.test(c[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();var f=g.pageX,i=g.pageY;if(this.originalPosition){if(this.containment){if(g.pageX-this.offset.click.left<this.containment[0])f=this.containment[0]+this.offset.click.left;if(g.pageY-this.offset.click.top<this.containment[1])i=this.containment[1]+this.offset.click.top;if(g.pageX-this.offset.click.left>
this.containment[2])f=this.containment[2]+this.offset.click.left;if(g.pageY-this.offset.click.top>this.containment[3])i=this.containment[3]+this.offset.click.top}if(d.grid){i=this.originalPageY+Math.round((i-this.originalPageY)/d.grid[1])*d.grid[1];i=this.containment?!(i-this.offset.click.top<this.containment[1]||i-this.offset.click.top>this.containment[3])?i:!(i-this.offset.click.top<this.containment[1])?i-d.grid[1]:i+d.grid[1]:i;f=this.originalPageX+Math.round((f-this.originalPageX)/d.grid[0])*
d.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-d.grid[0]:f+d.grid[0]:f}}return{top:i-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:c.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&
this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:c.scrollLeft())}},_rearrange:function(g,d,c,e){c?c[0].appendChild(this.placeholder[0]):d.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?d.item[0]:d.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var f=this,i=this.counter;window.setTimeout(function(){i==f.counter&&f.refreshPositions(!e)},0)},_clear:function(g,d){this.reverting=false;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(this._storedCSS[e]=="auto"||this._storedCSS[e]=="static")this._storedCSS[e]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!d&&c.push(function(f){this._trigger("receive",f,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||
this.domPosition.parent!=this.currentItem.parent()[0])&&!d)c.push(function(f){this._trigger("update",f,this._uiHash())});if(!a.contains(this.element[0],this.currentItem[0])){d||c.push(function(f){this._trigger("remove",f,this._uiHash())});for(e=this.containers.length-1;e>=0;e--)if(a.contains(this.containers[e].element[0],this.currentItem[0])&&!d){c.push(function(f){return function(i){f._trigger("receive",i,this._uiHash(this))}}.call(this,this.containers[e]));c.push(function(f){return function(i){f._trigger("update",
i,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){d||c.push(function(f){return function(i){f._trigger("deactivate",i,this._uiHash(this))}}.call(this,this.containers[e]));if(this.containers[e].containerCache.over){c.push(function(f){return function(i){f._trigger("out",i,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over=0}}this._storedCursor&&a("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",
this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!d){this._trigger("beforeStop",g,this._uiHash());for(e=0;e<c.length;e++)c[e].call(this,g);this._trigger("stop",g,this._uiHash())}return false}d||this._trigger("beforeStop",g,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!d){for(e=
0;e<c.length;e++)c[e].call(this,g);this._trigger("stop",g,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},_uiHash:function(g){var d=g||this;return{helper:d.helper,placeholder:d.placeholder||a([]),position:d.position,originalPosition:d.originalPosition,offset:d.positionAbs,item:d.currentItem,sender:g?g.element:null}}})})(jQuery);
jQuery.effects||function(a,g){function d(l){var j;if(l&&l.constructor===Array&&l.length===3)return l;if(j=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(l))return[parseInt(j[1],10),parseInt(j[2],10),parseInt(j[3],10)];if(j=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(l))return[parseFloat(j[1])*2.55,parseFloat(j[2])*2.55,parseFloat(j[3])*2.55];if(j=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(l))return[parseInt(j[1],
16),parseInt(j[2],16),parseInt(j[3],16)];if(j=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(l))return[parseInt(j[1]+j[1],16),parseInt(j[2]+j[2],16),parseInt(j[3]+j[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(l))return b.transparent;return b[a.trim(l).toLowerCase()]}function c(){var l=this.ownerDocument.defaultView?this.ownerDocument.defaultView.getComputedStyle(this,null):this.currentStyle,j={},m,n;if(l&&l.length&&l[0]&&l[l[0]])for(n=l.length;n--;){m=l[n];if(typeof l[m]==="string")j[a.camelCase(m)]=l[m]}else for(m in l)if(typeof l[m]===
"string")j[m]=l[m];return j}function e(l,j,m,n){if(a.isPlainObject(l))return l;l={effect:l};if(j===g)j={};if(a.isFunction(j)){n=j;m=null;j={}}if(a.type(j)==="number"||a.fx.speeds[j]){n=m;m=j;j={}}if(a.isFunction(m)){n=m;m=null}j&&a.extend(l,j);m=m||j.duration;l.duration=a.fx.off?0:typeof m==="number"?m:m in a.fx.speeds?a.fx.speeds[m]:a.fx.speeds._default;l.complete=n||j.complete;return l}function f(l){if(!l||typeof l==="number"||a.fx.speeds[l])return true;if(typeof l==="string"&&!a.effects.effect[l]){if(i&&
a.effects[l])return false;return true}return false}var i=a.uiBackCompat!==false;a.effects={effect:{}};a.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(l,j){a.fx.step[j]=function(m){if(!m.colorInit){var n;n=m.elem;var o=j,p;do{p=a.curCSS(n,o);if(p!=""&&p!=="transparent"||a.nodeName(n,"body"))break;o="backgroundColor"}while(n=n.parentNode);n=d(p);m.start=n;m.end=d(m.end);m.colorInit=true}m.elem.style[j]=
"rgb("+Math.max(Math.min(parseInt(m.pos*(m.end[0]-m.start[0])+m.start[0],10),255),0)+","+Math.max(Math.min(parseInt(m.pos*(m.end[1]-m.start[1])+m.start[1],10),255),0)+","+Math.max(Math.min(parseInt(m.pos*(m.end[2]-m.start[2])+m.start[2],10),255),0)+")"}});var b={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,
0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,
203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},h=["add","remove","toggle"],k={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(l,j){a.fx.step[j]=function(m){if(m.end!=="none"&&!m.setAttr||m.pos===1&&!m.setAttr){jQuery.style(m.elem,j,m.end);m.setAttr=
true}}});a.effects.animateClass=function(l,j,m,n){var o=a.speed(j,m,n);return this.queue(function(){var p=a(this),q=p.attr("class")||"",u,s=o.children?p.find("*").andSelf():p;s=s.map(function(){var r=a(this);return{el:r,originalStyleAttr:r.attr("style")||" ",start:c.call(this)}});a.each(h,function(r,t){if(l[t])p[t+"Class"](l[t])});u=p.attr("class");s=s.map(function(){this.end=c.call(this.el[0]);var r=this.start,t=this.end,v={},w,x;for(w in t){x=t[w];if(r[w]!=x)if(!k[w])if(a.fx.step[w]||!isNaN(parseFloat(x)))v[w]=
x}this.diff=v;return this});p.attr("class",q);s=s.map(function(){var r=this,t=a.Deferred();this.el.animate(this.diff,{duration:o.duration,easing:o.easing,queue:false,complete:function(){t.resolve(r)}});return t.promise()});a.when.apply(a,s.get()).done(function(){p.attr("class",u);a.each(arguments,function(){if(typeof this.el.attr("style")==="object"){this.el.attr("style").cssText="";this.el.attr("style").cssText=this.originalStyleAttr}else this.el.attr("style",this.originalStyleAttr)});o.complete.call(p[0])})})};
a.fn.extend({_addClass:a.fn.addClass,addClass:function(l,j,m,n){return j?a.effects.animateClass.apply(this,[{add:l},j,m,n]):this._addClass(l)},_removeClass:a.fn.removeClass,removeClass:function(l,j,m,n){return j?a.effects.animateClass.apply(this,[{remove:l},j,m,n]):this._removeClass(l)},_toggleClass:a.fn.toggleClass,toggleClass:function(l,j,m,n,o){return typeof j==="boolean"||j===g?m?a.effects.animateClass.apply(this,[j?{add:l}:{remove:l},m,n,o]):this._toggleClass(l,j):a.effects.animateClass.apply(this,
[{toggle:l},j,m,n])},switchClass:function(l,j,m,n,o){return a.effects.animateClass.apply(this,[{add:j,remove:l},m,n,o])}});a.extend(a.effects,{version:"1.9pre",save:function(l,j){for(var m=0;m<j.length;m++)j[m]!==null&&l.data("ec.storage."+j[m],l[0].style[j[m]])},restore:function(l,j){for(var m=0;m<j.length;m++)j[m]!==null&&l.css(j[m],l.data("ec.storage."+j[m]))},setMode:function(l,j){if(j==="toggle")j=l.is(":hidden")?"show":"hide";return j},getBaseline:function(l,j){var m,n;switch(l[0]){case "top":m=
0;break;case "middle":m=0.5;break;case "bottom":m=1;break;default:m=l[0]/j.height}switch(l[1]){case "left":n=0;break;case "center":n=0.5;break;case "right":n=1;break;default:n=l[1]/j.width}return{x:n,y:m}},createWrapper:function(l){if(l.parent().is(".ui-effects-wrapper"))return l.parent();var j={width:l.outerWidth(true),height:l.outerHeight(true),"float":l.css("float")},m=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),
n={width:l.width(),height:l.height()},o=document.activeElement;l.wrap(m);if(l[0]===o||a.contains(l[0],o))a(o).focus();m=l.parent();if(l.css("position")==="static"){m.css({position:"relative"});l.css({position:"relative"})}else{a.extend(j,{position:l.css("position"),zIndex:l.css("z-index")});a.each(["top","left","bottom","right"],function(p,q){j[q]=l.css(q);if(isNaN(parseInt(j[q],10)))j[q]="auto"});l.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}l.css(n);return m.css(j).show()},
removeWrapper:function(l){var j=document.activeElement;if(l.parent().is(".ui-effects-wrapper")){l.parent().replaceWith(l);if(l[0]===j||a.contains(l[0],j))a(j).focus()}return l},setTransition:function(l,j,m,n){n=n||{};a.each(j,function(o,p){var q=l.cssUnit(p);if(q[0]>0)n[p]=q[0]*m+q[1]});return n}});a.fn.extend({effect:function(){function l(q){function u(){a.isFunction(r)&&r.call(s[0]);a.isFunction(q)&&q()}var s=a(this),r=j.complete,t=j.mode;(s.is(":hidden")?t==="hide":t==="show")?u():o.call(s[0],
j,u)}var j=e.apply(this,arguments),m=j.mode,n=j.queue,o=a.effects.effect[j.effect],p=!o&&i&&a.effects[j.effect];if(a.fx.off||!(o||p))return m?this[m](j.duration,j.complete):this.each(function(){j.complete&&j.complete.call(this)});return o?n===false?this.each(l):this.queue(n||"fx",l):p.call(this,{options:j,duration:j.duration,callback:j.complete,mode:j.mode})},_show:a.fn.show,show:function(l){if(f(l))return this._show.apply(this,arguments);else{var j=e.apply(this,arguments);j.mode="show";return this.effect.call(this,
j)}},_hide:a.fn.hide,hide:function(l){if(f(l))return this._hide.apply(this,arguments);else{var j=e.apply(this,arguments);j.mode="hide";return this.effect.call(this,j)}},__toggle:a.fn.toggle,toggle:function(l){if(f(l)||typeof l==="boolean"||a.isFunction(l))return this.__toggle.apply(this,arguments);else{var j=e.apply(this,arguments);j.mode="toggle";return this.effect.call(this,j)}},cssUnit:function(l){var j=this.css(l),m=[];a.each(["em","px","%","pt"],function(n,o){if(j.indexOf(o)>0)m=[parseFloat(j),
o]});return m}});a.easing.jswing=a.easing.swing;a.extend(a.easing,{def:"easeOutQuad",swing:function(l,j,m,n,o){return a.easing[a.easing.def](l,j,m,n,o)},easeInQuad:function(l,j,m,n,o){return n*(j/=o)*j+m},easeOutQuad:function(l,j,m,n,o){return-n*(j/=o)*(j-2)+m},easeInOutQuad:function(l,j,m,n,o){if((j/=o/2)<1)return n/2*j*j+m;return-n/2*(--j*(j-2)-1)+m},easeInCubic:function(l,j,m,n,o){return n*(j/=o)*j*j+m},easeOutCubic:function(l,j,m,n,o){return n*((j=j/o-1)*j*j+1)+m},easeInOutCubic:function(l,j,
m,n,o){if((j/=o/2)<1)return n/2*j*j*j+m;return n/2*((j-=2)*j*j+2)+m},easeInQuart:function(l,j,m,n,o){return n*(j/=o)*j*j*j+m},easeOutQuart:function(l,j,m,n,o){return-n*((j=j/o-1)*j*j*j-1)+m},easeInOutQuart:function(l,j,m,n,o){if((j/=o/2)<1)return n/2*j*j*j*j+m;return-n/2*((j-=2)*j*j*j-2)+m},easeInQuint:function(l,j,m,n,o){return n*(j/=o)*j*j*j*j+m},easeOutQuint:function(l,j,m,n,o){return n*((j=j/o-1)*j*j*j*j+1)+m},easeInOutQuint:function(l,j,m,n,o){if((j/=o/2)<1)return n/2*j*j*j*j*j+m;return n/2*
((j-=2)*j*j*j*j+2)+m},easeInSine:function(l,j,m,n,o){return-n*Math.cos(j/o*(Math.PI/2))+n+m},easeOutSine:function(l,j,m,n,o){return n*Math.sin(j/o*(Math.PI/2))+m},easeInOutSine:function(l,j,m,n,o){return-n/2*(Math.cos(Math.PI*j/o)-1)+m},easeInExpo:function(l,j,m,n,o){return j==0?m:n*Math.pow(2,10*(j/o-1))+m},easeOutExpo:function(l,j,m,n,o){return j==o?m+n:n*(-Math.pow(2,-10*j/o)+1)+m},easeInOutExpo:function(l,j,m,n,o){if(j==0)return m;if(j==o)return m+n;if((j/=o/2)<1)return n/2*Math.pow(2,10*(j-1))+
m;return n/2*(-Math.pow(2,-10*--j)+2)+m},easeInCirc:function(l,j,m,n,o){return-n*(Math.sqrt(1-(j/=o)*j)-1)+m},easeOutCirc:function(l,j,m,n,o){return n*Math.sqrt(1-(j=j/o-1)*j)+m},easeInOutCirc:function(l,j,m,n,o){if((j/=o/2)<1)return-n/2*(Math.sqrt(1-j*j)-1)+m;return n/2*(Math.sqrt(1-(j-=2)*j)+1)+m},easeInElastic:function(l,j,m,n,o){l=1.70158;var p=o*0.3,q=n;if(j==0)return m;if((j/=o)==1)return m+n;if(q<Math.abs(n)){q=n;l=p/4}else l=p/(2*Math.PI)*Math.asin(n/q);return-(q*Math.pow(2,10*(j-=1))*Math.sin((j*
o-l)*2*Math.PI/p))+m},easeOutElastic:function(l,j,m,n,o){l=1.70158;var p=o*0.3,q=n;if(j==0)return m;if((j/=o)==1)return m+n;if(q<Math.abs(n)){q=n;l=p/4}else l=p/(2*Math.PI)*Math.asin(n/q);return q*Math.pow(2,-10*j)*Math.sin((j*o-l)*2*Math.PI/p)+n+m},easeInOutElastic:function(l,j,m,n,o){l=1.70158;var p=o*0.3*1.5,q=n;if(j==0)return m;if((j/=o/2)==2)return m+n;if(q<Math.abs(n)){q=n;l=p/4}else l=p/(2*Math.PI)*Math.asin(n/q);if(j<1)return-0.5*q*Math.pow(2,10*(j-=1))*Math.sin((j*o-l)*2*Math.PI/p)+m;return q*
Math.pow(2,-10*(j-=1))*Math.sin((j*o-l)*2*Math.PI/p)*0.5+n+m},easeInBack:function(l,j,m,n,o,p){if(p==g)p=1.70158;return n*(j/=o)*j*((p+1)*j-p)+m},easeOutBack:function(l,j,m,n,o,p){if(p==g)p=1.70158;return n*((j=j/o-1)*j*((p+1)*j+p)+1)+m},easeInOutBack:function(l,j,m,n,o,p){if(p==g)p=1.70158;if((j/=o/2)<1)return n/2*j*j*(((p*=1.525)+1)*j-p)+m;return n/2*((j-=2)*j*(((p*=1.525)+1)*j+p)+2)+m},easeInBounce:function(l,j,m,n,o){return n-a.easing.easeOutBounce(l,o-j,0,n,o)+m},easeOutBounce:function(l,j,m,
n,o){return(j/=o)<1/2.75?n*7.5625*j*j+m:j<2/2.75?n*(7.5625*(j-=1.5/2.75)*j+0.75)+m:j<2.5/2.75?n*(7.5625*(j-=2.25/2.75)*j+0.9375)+m:n*(7.5625*(j-=2.625/2.75)*j+0.984375)+m},easeInOutBounce:function(l,j,m,n,o){if(j<o/2)return a.easing.easeInBounce(l,j*2,0,n,o)*0.5+m;return a.easing.easeOutBounce(l,j*2-o,0,n,o)*0.5+n*0.5+m}})}(jQuery);
(function(a){var g=/up|down|vertical/,d=/up|left|vertical|horizontal/;a.effects.effect.blind=function(c,e){var f=a(this),i=["position","top","bottom","left","right","height","width"],b=a.effects.setMode(f,c.mode||"hide"),h=c.direction||"up",k=g.test(h),l=k?"height":"width",j=k?"top":"left";h=d.test(h);var m={},n=b==="show",o,p;f.parent().is(".ui-effects-wrapper")?a.effects.save(f.parent(),i):a.effects.save(f,i);f.show();p=parseInt(f.css("top"),10);o=a.effects.createWrapper(f).css({overflow:"hidden"});
p=k?o[l]()+p:o[l]();m[l]=n?p:0;if(!h){f.css(k?"bottom":"right",0).css(k?"top":"left","").css({position:"absolute"});m[j]=n?0:p}if(n){o.css(l,0);h||o.css(j,p)}o.animate(m,{duration:c.duration,easing:c.easing,queue:false,complete:function(){b==="hide"&&f.hide();a.effects.restore(f,i);a.effects.removeWrapper(f);e()}})}})(jQuery);
(function(a){a.effects.effect.bounce=function(g,d){var c=a(this),e=["position","top","bottom","left","right","height","width"],f=a.effects.setMode(c,g.mode||"effect"),i=f==="hide",b=f==="show",h=g.direction||"up";f=g.distance;var k=g.times||5,l=k*2+(b||i?1:0),j=g.duration/l,m=g.easing,n=h==="up"||h==="down"?"top":"left";h=h==="up"||h==="left";var o,p,q=c.queue(),u=q.length;if(b||i)e.push("opacity");a.effects.save(c,e);c.show();a.effects.createWrapper(c);f||(f=c[n==="top"?"outerHeight":"outerWidth"]()/
3);if(b){p={opacity:1};p[n]=0;c.css("opacity",0).css(n,h?-f*2:f*2).animate(p,j,m)}if(i)f/=Math.pow(2,k-1);p={};for(b=p[n]=0;b<k;b++){o={};o[n]=(h?"-=":"+=")+f;c.animate(o,j,m).animate(p,j,m);f=i?f*2:f/2}if(i){o={opacity:0};o[n]=(h?"-=":"+=")+f;c.animate(o,j,m)}c.queue(function(){i&&c.hide();a.effects.restore(c,e);a.effects.removeWrapper(c);d()});u>1&&q.splice.apply(q,[1,0].concat(q.splice(u,l+1)));c.dequeue()}})(jQuery);
(function(a){a.effects.effect.clip=function(g,d){var c=a(this),e=["position","top","bottom","left","right","height","width"],f=a.effects.setMode(c,g.mode||"hide")==="show",i=(g.direction||"vertical")==="vertical",b=i?"height":"width";i=i?"top":"left";var h={},k,l;a.effects.save(c,e);c.show();k=a.effects.createWrapper(c).css({overflow:"hidden"});k=c[0].tagName==="IMG"?k:c;l=k[b]();if(f){k.css(b,0);k.css(i,l/2)}h[b]=f?l:0;h[i]=f?0:l/2;k.animate(h,{queue:false,duration:g.duration,easing:g.easing,complete:function(){f||
c.hide();a.effects.restore(c,e);a.effects.removeWrapper(c);d()}})}})(jQuery);
(function(a){a.effects.effect.drop=function(g,d){var c=a(this),e=["position","top","bottom","left","right","opacity","height","width"],f=a.effects.setMode(c,g.mode||"hide"),i=f==="show",b=g.direction||"left",h=b==="up"||b==="down"?"top":"left";b=b==="up"||b==="left"?"pos":"neg";var k={opacity:i?1:0},l;a.effects.save(c,e);c.show();a.effects.createWrapper(c);l=g.distance||c[h=="top"?"outerHeight":"outerWidth"]({margin:true})/2;if(i)c.css("opacity",0).css(h,b=="pos"?-l:l);k[h]=(i?b==="pos"?"+=":"-=":
b==="pos"?"-=":"+=")+l;c.animate(k,{queue:false,duration:g.duration,easing:g.easing,complete:function(){f=="hide"&&c.hide();a.effects.restore(c,e);a.effects.removeWrapper(c);d()}})}})(jQuery);
(function(a){a.effects.effect.explode=function(g,d){function c(){j.push(this);if(j.length==e*f){i.css({visibility:"visible"});a(j).remove();b||i.hide();d()}}var e=g.pieces?Math.round(Math.sqrt(g.pieces)):3,f=e,i=a(this),b=a.effects.setMode(i,g.mode||"hide")==="show",h=i.show().css("visibility","hidden").offset(),k=Math.ceil(i.outerWidth()/f),l=Math.ceil(i.outerHeight()/e),j=[],m,n,o,p,q,u;for(m=0;m<e;m++){p=h.top+m*l;u=m-(e-1)/2;for(n=0;n<f;n++){o=h.left+n*k;q=n-(f-1)/2;i.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",
visibility:"visible",left:-n*k,top:-m*l}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:k,height:l,left:o+(b?q*k:0),top:p+(b?u*l:0),opacity:b?0:1}).animate({left:o+(b?0:q*k),top:p+(b?0:u*l),opacity:b?1:0},g.duration||500,g.easing,c)}}}})(jQuery);
(function(a){a.effects.effect.fade=function(g,d){var c=a(this),e=a.effects.setMode(c,g.mode||"toggle")==="hide";c.show();c.animate({opacity:e?0:1},{queue:false,duration:g.duration,easing:g.easing,complete:function(){e&&c.hide();d()}})}})(jQuery);
(function(a){a.effects.effect.fold=function(g,d){var c=a(this),e=["position","top","bottom","left","right","height","width"],f=a.effects.setMode(c,g.mode||"hide"),i=f==="show",b=f==="hide";f=g.size||15;var h=/([0-9]+)%/.exec(f),k=!!g.horizFirst,l=i!=k,j=l?["width","height"]:["height","width"],m=g.duration/2,n,o={},p={};a.effects.save(c,e);c.show();n=a.effects.createWrapper(c).css({overflow:"hidden"});l=l?[n.width(),n.height()]:[n.height(),n.width()];if(h)f=parseInt(h[1],10)/100*l[b?0:1];if(i)n.css(k?
{height:0,width:f}:{height:f,width:0});o[j[0]]=i?l[0]:f;p[j[1]]=i?l[1]:0;n.animate(o,m,g.easing).animate(p,m,g.easing,function(){b&&c.hide();a.effects.restore(c,e);a.effects.removeWrapper(c);d()})}})(jQuery);
(function(a){a.effects.effect.highlight=function(g,d){var c=a(this),e=["backgroundImage","backgroundColor","opacity"],f=a.effects.setMode(c,g.mode||"show"),i={backgroundColor:c.css("backgroundColor")};if(f==="hide")i.opacity=0;a.effects.save(c,e);c.show().css({backgroundImage:"none",backgroundColor:g.color||"#ffff99"}).animate(i,{queue:false,duration:g.duration,easing:g.easing,complete:function(){f==="hide"&&c.hide();a.effects.restore(c,e);d()}})}})(jQuery);
(function(a){a.effects.effect.pulsate=function(g,d){var c=a(this),e=a.effects.setMode(c,g.mode||"show"),f=e==="show",i=e==="hide";e=(g.times||5)*2+(f||e==="hide"?1:0);var b=g.duration/e,h=0,k=c.queue(),l=k.length;if(f||!c.is(":visible")){c.css("opacity",0).show();h=1}for(f=1;f<e;f++){c.animate({opacity:h},b,g.easing);h=1-h}c.animate({opacity:h},b,g.easing);c.queue(function(){i&&c.hide();d()});l>1&&k.splice.apply(k,[1,0].concat(k.splice(l,e+1)));c.dequeue()}})(jQuery);
(function(a){a.effects.effect.puff=function(g,d){var c=a(this),e=a.effects.setMode(c,g.mode||"hide"),f=e==="hide",i=parseInt(g.percent,10)||150,b=i/100,h={height:c.height(),width:c.width()};a.extend(g,{effect:"scale",queue:false,fade:true,mode:e,complete:d,percent:f?i:100,from:f?h:{height:h.height*b,width:h.width*b}});c.effect(g)};a.effects.effect.scale=function(g,d){var c=a(this),e=a.extend(true,{},g),f=a.effects.setMode(c,g.mode||"effect"),i=parseInt(g.percent,10)||(parseInt(g.percent,10)==0?0:
f=="hide"?0:100),b=g.direction||"both",h=g.origin,k={height:c.height(),width:c.width(),outerHeight:c.outerHeight(),outerWidth:c.outerWidth()};i={y:b!="horizontal"?i/100:1,x:b!="vertical"?i/100:1};e.effect="size";e.queue=false;e.complete=d;if(f!="effect"){e.origin=h||["middle","center"];e.restore=true}e.from=g.from||(f=="show"?{height:0,width:0}:k);e.to={height:k.height*i.y,width:k.width*i.x,outerHeight:k.outerHeight*i.y,outerWidth:k.outerWidth*i.x};if(e.fade){if(f=="show"){e.from.opacity=0;e.to.opacity=
1}if(f=="hide"){e.from.opacity=1;e.to.opacity=0}}c.effect(e)};a.effects.effect.size=function(g,d){var c=a(this),e=["position","top","bottom","left","right","width","height","overflow","opacity"],f=["position","top","bottom","left","right","overflow","opacity"],i=["width","height","overflow"],b=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],k=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],l=a.effects.setMode(c,g.mode||"effect"),j=g.restore||
l!=="effect",m=g.scale||"both",n=g.origin||["middle","center"],o,p,q,u=c.css("position"),s=c.css("bottom")!=="auto"?"bottom":"top";originalHorizontalPositioning=c.css("right")!=="auto"?"right":"left";l==="show"&&c.show();o={height:c.height(),width:c.width(),outerHeight:c.outerHeight(),outerWidth:c.outerWidth()};c.from=g.from||o;c.to=g.to||o;q={from:{y:c.from.height/o.height,x:c.from.width/o.width},to:{y:c.to.height/o.height,x:c.to.width/o.width}};if(m=="box"||m=="both"){if(q.from.y!==q.to.y){e=e.concat(h);
c.from=a.effects.setTransition(c,h,q.from.y,c.from);c.to=a.effects.setTransition(c,h,q.to.y,c.to)}if(q.from.x!==q.to.x){e=e.concat(k);c.from=a.effects.setTransition(c,k,q.from.x,c.from);c.to=a.effects.setTransition(c,k,q.to.x,c.to)}}if(m=="content"||m=="both")if(q.from.y!==q.to.y){e=e.concat(b);c.from=a.effects.setTransition(c,b,q.from.y,c.from);c.to=a.effects.setTransition(c,b,q.to.y,c.to)}a.effects.save(c,j?e:f);c.show();a.effects.createWrapper(c);c.css("overflow","hidden").css(c.from);if(n){p=
a.effects.getBaseline(n,o);c.from.top=(o.outerHeight-c.outerHeight())*p.y;c.from.left=(o.outerWidth-c.outerWidth())*p.x;c.to.top=(o.outerHeight-c.to.outerHeight)*p.y;c.to.left=(o.outerWidth-c.to.outerWidth)*p.x}c.css(c.from);if(m=="content"||m=="both"){h=h.concat(["marginTop","marginBottom"]).concat(b);k=k.concat(["marginLeft","marginRight"]);i=e.concat(h).concat(k);c.find("*[width]").each(function(){var r=a(this),t={height:r.height(),width:r.width()};j&&a.effects.save(r,i);r.from={height:t.height*
q.from.y,width:t.width*q.from.x};r.to={height:t.height*q.to.y,width:t.width*q.to.x};if(q.from.y!=q.to.y){r.from=a.effects.setTransition(r,h,q.from.y,r.from);r.to=a.effects.setTransition(r,h,q.to.y,r.to)}if(q.from.x!=q.to.x){r.from=a.effects.setTransition(r,k,q.from.x,r.from);r.to=a.effects.setTransition(r,k,q.to.x,r.to)}r.css(r.from);r.animate(r.to,g.duration,g.easing,function(){j&&a.effects.restore(r,i)})})}c.animate(c.to,{queue:false,duration:g.duration,easing:g.easing,complete:function(){c.to.opacity===
0&&c.css("opacity",c.from.opacity);l=="hide"&&c.hide();a.effects.restore(c,j?e:f);j||(u==="static"?c.css({position:"relative",top:c.to.top,left:c.to.left}):a.each([s,originalHorizontalPositioning],function(r,t){c.css(t,function(v,w){var x=parseInt(w,10),C=r?c.to.left:c.to.top,A=r?c.to.outerWidth-c.from.outerWidth:c.to.outerHeight-c.from.outerHeight,y=n[r]===t,D=n[r]==="middle"||n[r]==="center";if(w==="auto")return C+"px";if(!(t=="left"||t=="top"))if(u==="relative")C*=-1;else D||(C-=A*(y?-1:1));return x+
C+"px"})}));a.effects.removeWrapper(c);d()}})}})(jQuery);
(function(a){a.effects.effect.shake=function(g,d){var c=a(this),e=["position","top","bottom","left","right","height","width"],f=a.effects.setMode(c,g.mode||"effect"),i=g.direction||"left",b=g.distance||20,h=g.times||3,k=h*2+1,l=g.duration,j=i=="up"||i=="down"?"top":"left",m=i=="up"||i=="left";i={};var n={},o={},p=c.queue(),q=p.length;a.effects.save(c,e);c.show();a.effects.createWrapper(c);i[j]=(m?"-=":"+=")+b;n[j]=(m?"+=":"-=")+b*2;o[j]=(m?"-=":"+=")+b*2;c.animate(i,l,g.easing);for(b=1;b<h;b++)c.animate(n,
l,g.easing).animate(o,l,g.easing);c.animate(n,l,g.easing).animate(i,l/2,g.easing).queue(function(){f==="hide"&&c.hide();a.effects.restore(c,e);a.effects.removeWrapper(c);d()});q>1&&p.splice.apply(p,[1,0].concat(p.splice(q,k+1)));c.dequeue()}})(jQuery);
(function(a){a.effects.effect.slide=function(g,d){var c=a(this),e=["position","top","bottom","left","right","width","height"],f=a.effects.setMode(c,g.mode||"show"),i=f==="show",b=g.direction||"left",h=b=="up"||b=="down"?"top":"left";b=b=="up"||b=="left";var k,l={};a.effects.save(c,e);c.show();k=g.distance||c[h==="top"?"outerHeight":"outerWidth"]({margin:true});a.effects.createWrapper(c).css({overflow:"hidden"});if(i)c.css(h,b?isNaN(k)?"-"+k:-k:k);l[h]=(i?b?"+=":"-=":b?"-=":"+=")+k;c.animate(l,{queue:false,
duration:g.duration,easing:g.easing,complete:function(){f==="hide"&&c.hide();a.effects.restore(c,e);a.effects.removeWrapper(c);d()}})}})(jQuery);
(function(a){a.effects.effect.transfer=function(g,d){var c=a(this),e=a(g.to),f=e.css("position")==="fixed",i=a("body"),b=f?i.scrollTop():0;i=f?i.scrollLeft():0;var h=e.offset();e={top:h.top-b,left:h.left-i,height:e.innerHeight(),width:e.innerWidth()};h=c.offset();var k=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(g.className).css({top:h.top-b,left:h.left-i,height:c.innerHeight(),width:c.innerWidth(),position:f?"fixed":"absolute"}).animate(e,g.duration,g.easing,function(){k.remove();
d()})}})(jQuery);
(function(a){a.widget("ui.accordion",{version:"1.9pre",options:{active:0,animated:"slide",collapsible:false,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var g=this.options;this.lastToggle={};this.element.addClass("ui-accordion ui-widget ui-helper-reset");this.headers=this.element.find(g.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all");this._hoverable(this.headers);
this._focusable(this.headers);this.headers.find(":first-child").addClass("ui-accordion-heading");this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(!g.collapsible&&g.active===false)g.active=0;if(g.active<0)g.active+=this.headers.length;this.active=this._findActive(g.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");this._createIcons();
this.refresh();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown.accordion",a.proxy(this,"_keydown")).next().attr("role","tabpanel");this.headers.not(this.active).attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();this.active.length?this.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):this.headers.eq(0).attr("tabIndex",0);a.browser.safari||this.headers.find("a").attr("tabIndex",-1);this._setupEvents(g.event)},_createIcons:function(){var g=
this.options.icons;if(g){a("<span>").addClass("ui-accordion-header-icon ui-icon "+g.header).prependTo(this.headers);this.active.children(".ui-accordion-header-icon").removeClass(g.header).addClass(g.activeHeader);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-accordion-header-icon").remove();this.element.removeClass("ui-accordion-icons")},_destroy:function(){this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex").find("a").removeAttr("tabIndex").end().find(".ui-accordion-heading").removeClass("ui-accordion-heading");
this._destroyIcons();var g=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");this.options.heightStyle!=="content"&&g.css("height","")},_setOption:function(g,d){if(g==="active")this._activate(d);else{if(g==="event"){this.options.event&&this.headers.unbind(this.options.event+".accordion",this._eventHandler);this._setupEvents(d)}this._super("_setOption",
g,d);g==="collapsible"&&!d&&this.options.active===false&&this._activate(0);if(g==="icons"){this._destroyIcons();d&&this._createIcons()}g==="disabled"&&this.headers.add(this.headers.next()).toggleClass("ui-accordion-disabled ui-state-disabled",!!d)}},_keydown:function(g){if(!(this.options.disabled||g.altKey||g.ctrlKey)){var d=a.ui.keyCode,c=this.headers.length,e=this.headers.index(g.target),f=false;switch(g.keyCode){case d.RIGHT:case d.DOWN:f=this.headers[(e+1)%c];break;case d.LEFT:case d.UP:f=this.headers[(e-
1+c)%c];break;case d.SPACE:case d.ENTER:this._eventHandler(g)}if(f){a(g.target).attr("tabIndex",-1);a(f).attr("tabIndex",0);f.focus();g.preventDefault()}}},refresh:function(){var g=this.options,d=this.element.parent(),c,e;if(g.heightStyle==="fill"){if(!a.support.minHeight){e=d.css("overflow");d.css("overflow","hidden")}c=d.height();this.element.siblings(":visible").each(function(){var f=a(this),i=f.css("position");i==="absolute"||i==="fixed"||(c-=f.outerHeight(true))});e&&d.css("overflow",e);this.headers.each(function(){c-=
a(this).outerHeight(true)});this.headers.next().each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")}else if(g.heightStyle==="auto"){c=0;this.headers.next().each(function(){c=Math.max(c,a(this).height("").height())}).height(c)}return this},_activate:function(g){g=this._findActive(g)[0];if(g!==this.active[0]){g=g||this.active[0];this._eventHandler({target:g,currentTarget:g,preventDefault:a.noop})}},_findActive:function(g){return typeof g==="number"?
this.headers.eq(g):a()},_setupEvents:function(g){g&&this.headers.bind(g.split(" ").join(".accordion ")+".accordion",a.proxy(this,"_eventHandler"))},_eventHandler:function(g){var d=this.options,c=this.active,e=a(g.currentTarget),f=e[0]===c[0],i=f&&d.collapsible,b=i?a():e.next(),h=c.next();b={oldHeader:c,oldContent:h,newHeader:i?a():e,newContent:b};g.preventDefault();if(!(d.disabled||f&&!d.collapsible||this._trigger("beforeActivate",g,b)===false)){d.active=i?false:this.headers.index(e);this.active=
f?a():e;this._toggle(b);c.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-accordion-header-icon").removeClass(d.icons.activeHeader).addClass(d.icons.header);if(!f){e.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-accordion-header-icon").removeClass(d.icons.header).addClass(d.icons.activeHeader);e.next().addClass("ui-accordion-content-active")}}},_toggle:function(g){function d(){c._completed(g)}
var c=this,e=c.options,f=g.newContent,i=g.oldContent;if(e.animated){var b=a.ui.accordion.animations;e=e.animated;var h;if(!b[e]){h={easing:a.easing[e]?e:"slide",duration:700};e="slide"}b[e]({widget:c,toShow:f,toHide:i,prevShow:c.lastToggle.toShow,prevHide:c.lastToggle.toHide,complete:d,down:f.length&&(!i.length||f.index()<i.index())},h)}else{i.hide();f.show();d()}i.prev().attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).blur();f.prev().attr({"aria-expanded":"true","aria-selected":"true",
tabIndex:0}).focus()},_completed:function(g){var d=g.newContent,c=g.oldContent;this.options.heightStyle==="content"&&d.add(c).css({height:"",overflow:""});c.removeClass("ui-accordion-content-active");if(c.length)c.parent()[0].className=c.parent()[0].className;this._trigger("activate",null,g)}});a.extend(a.ui.accordion,{animations:{slide:function(g,d){if(g.prevShow||g.prevHide){g.prevHide.stop(true,true);g.toHide=g.prevShow}var c=g.toShow.css("overflow"),e=g.toHide.css("overflow"),f=0,i={},b={},h;
g=a.extend({easing:"swing",duration:300},g,d);g.widget.lastToggle=g;if(g.toHide.size())if(g.toShow.size()){var k=g.toShow;h=k[0].style.width;k.width(parseInt(k.parent().width(),10)-parseInt(k.css("paddingLeft"),10)-parseInt(k.css("paddingRight"),10)-(parseInt(k.css("borderLeftWidth"),10)||0)-(parseInt(k.css("borderRightWidth"),10)||0));a.each(["height","paddingTop","paddingBottom"],function(l,j){b[j]="hide";var m=(""+a.css(g.toShow[0],j)).match(/^([\d+-.]+)(.*)$/);i[j]={value:j==="height"&&m[1]===
"0"?1:m[1],unit:m[2]||"px"}});g.toShow.css({height:0,overflow:"hidden"}).show();g.toHide.filter(":hidden").each(g.complete).end().filter(":visible").animate(b,{step:function(l,j){if(j.prop=="height"||j.prop=="paddingTop"||j.prop=="paddingBottom")f=j.end-j.start===0?0:(j.now-j.start)/(j.end-j.start);g.toShow[0].style[j.prop]=f*i[j.prop].value+i[j.prop].unit},duration:g.duration,easing:g.easing,complete:function(){g.toShow.css({width:h,overflow:c});g.toHide.css("overflow",e);g.complete()}})}else g.toHide.animate({height:"hide",
paddingTop:"hide",paddingBottom:"hide"},g);else{h=g.toShow[0].style.width;g.toShow.show().width(g.toShow.width()).hide().animate({height:"show",paddingTop:"show",paddingBottom:"show"},{duration:g.duration,easing:g.easing,complete:function(){g.toShow.width(h);g.complete()}})}},bounceslide:function(g){this.slide(g,{easing:g.down?"easeOutBounce":"swing",duration:g.down?1E3:200})}}});if(a.uiBackCompat!==false){(function(g,d){g.extend(d.options,{navigation:false,navigationFilter:function(){return this.href.toLowerCase()===
location.href.toLowerCase()}});var c=d._create;d._create=function(){if(this.options.navigation){var e=this,f=this.element.find(this.options.header),i=f.next(),b=f.add(i).find("a").filter(this.options.navigationFilter)[0];b&&f.add(i).each(function(h){if(g.contains(this,b)){e.options.active=Math.floor(h/2);return false}})}c.call(this)}})(jQuery,jQuery.ui.accordion.prototype);(function(g,d){g.extend(d.options,{heightStyle:null,autoHeight:true,clearStyle:false,fillSpace:false});var c=d._create,e=d._setOption;
g.extend(d,{_create:function(){this.options.heightStyle=this.options.heightStyle||this._mergeHeightStyle();c.call(this)},_setOption:function(f){if(f==="autoHeight"||f==="clearStyle"||f==="fillSpace")this.options.heightStyle=this._mergeHeightStyle();e.apply(this,arguments)},_mergeHeightStyle:function(){var f=this.options;if(f.fillSpace)return"fill";if(f.clearStyle)return"content";if(f.autoHeight)return"auto"}})})(jQuery,jQuery.ui.accordion.prototype);(function(g,d){g.extend(d.options.icons,{activeHeader:null,
headerSelected:"ui-icon-triangle-1-s"});var c=d._createIcons;d._createIcons=function(){this.options.icons.activeHeader=this.options.icons.activeHeader||this.options.icons.headerSelected;c.call(this)}})(jQuery,jQuery.ui.accordion.prototype);(function(g,d){d.activate=d._activate;var c=d._findActive;d._findActive=function(e){if(e===-1)e=false;if(e&&typeof e!=="number"){e=this.headers.index(this.headers.filter(e));if(e===-1)e=false}return c.call(this,e)}})(jQuery,jQuery.ui.accordion.prototype);jQuery.ui.accordion.prototype.resize=
jQuery.ui.accordion.prototype.refresh;(function(g,d){g.extend(d.options,{change:null,changestart:null});var c=d._trigger;d._trigger=function(e,f,i){var b=c.apply(this,arguments);if(!b)return false;if(e==="beforeActivate")b=c.call(this,"changestart",f,i);else if(e==="activate")b=c.call(this,"change",f,i);return b}})(jQuery,jQuery.ui.accordion.prototype)}})(jQuery);
(function(a){var g=0;a.widget("ui.autocomplete",{version:"1.9pre",defaultElement:"<input>",options:{appendTo:"body",autoFocus:false,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 d=this,c=this.element[0].ownerDocument,e,f;this.valueMethod=this.element[this.element.is("input,textarea")?"val":"text"];this.element.addClass("ui-autocomplete-input").attr("autocomplete",
"off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(i){if(d.options.disabled||d.element.prop("readOnly"))f=e=true;else{f=e=false;var b=a.ui.keyCode;switch(i.keyCode){case b.PAGE_UP:e=true;d._move("previousPage",i);break;case b.PAGE_DOWN:e=true;d._move("nextPage",i);break;case b.UP:e=true;d._move("previous",i);i.preventDefault();break;case b.DOWN:e=true;d._move("next",i);i.preventDefault();break;case b.ENTER:case b.NUMPAD_ENTER:if(d.menu.active){e=
true;i.preventDefault()}case b.TAB:if(!d.menu.active)break;d.menu.select(i);break;case b.ESCAPE:if(d.menu.element.is(":visible")){d._value(d.term);d.close(i)}break;default:d._searchTimeout(i)}}}).bind("keypress.autocomplete",function(i){if(e){e=false;i.preventDefault()}else{var b=a.ui.keyCode;switch(i.keyCode){case b.PAGE_UP:d._move("previousPage",i);break;case b.PAGE_DOWN:d._move("nextPage",i);break;case b.UP:d._move("previous",i);i.preventDefault();break;case b.DOWN:d._move("next",i);i.preventDefault()}}}).bind("input.autocomplete",
function(i){if(f){f=false;i.preventDefault()}else d._searchTimeout(i)}).bind("focus.autocomplete",function(){if(!d.options.disabled){d.selectedItem=null;d.previous=d._value()}}).bind("blur.autocomplete",function(i){if(!d.options.disabled){clearTimeout(d.searching);d.closing=setTimeout(function(){d.close(i);d._change(i)},150)}});this._initSource();this.response=function(){return d._response.apply(d,arguments)};this.menu=a("<ul></ul>").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",
c)[0]).mousedown(function(i){var b=d.menu.element[0];a(i.target).closest(".ui-menu-item").length||setTimeout(function(){a(document).one("mousedown",function(h){h.target!==d.element[0]&&h.target!==b&&!a.contains(b,h.target)&&d.close()})},1);setTimeout(function(){clearTimeout(d.closing)},13)}).menu({input:a(),focus:function(i,b){var h=b.item.data("item.autocomplete");false!==d._trigger("focus",i,{item:h})&&/^key/.test(i.originalEvent.type)&&d._value(h.value)},select:function(i,b){var h=b.item.data("item.autocomplete"),
k=d.previous;if(d.element[0]!==c.activeElement){d.element.focus();d.previous=k;setTimeout(function(){d.previous=k;d.selectedItem=h},1)}false!==d._trigger("select",i,{item:h})&&d._value(h.value);d.term=d._value();d.close(i);d.selectedItem=h}}).zIndex(this.element.zIndex()+1).hide().data("menu");a.fn.bgiframe&&this.menu.element.bgiframe()},_destroy:function(){clearTimeout(this.searching);this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");
this.menu.element.remove()},_setOption:function(d,c){this._super("_setOption",d,c);d==="source"&&this._initSource();if(d==="appendTo")this.menu.element.appendTo(a(c||"body",this.element[0].ownerDocument)[0]);d==="disabled"&&c&&this.xhr&&this.xhr.abort()},_initSource:function(){var d=this,c,e;if(a.isArray(this.options.source)){c=this.options.source;this.source=function(f,i){i(a.ui.autocomplete.filter(c,f.term))}}else if(typeof this.options.source==="string"){e=this.options.source;this.source=function(f,
i){d.xhr&&d.xhr.abort();d.xhr=a.ajax({url:e,data:f,dataType:"json",autocompleteRequest:++g,success:function(b){this.autocompleteRequest===g&&i(b)},error:function(){this.autocompleteRequest===g&&i([])}})}}else this.source=this.options.source},_searchTimeout:function(d){var c=this;clearTimeout(c.searching);c.searching=setTimeout(function(){if(c.term!==c._value()){c.selectedItem=null;c.search(null,d)}},c.options.delay)},search:function(d,c){d=d!=null?d:this._value();this.term=this._value();if(d.length<
this.options.minLength)return this.close(c);clearTimeout(this.closing);if(this._trigger("search",c)!==false)return this._search(d)},_search:function(d){this.pending++;this.element.addClass("ui-autocomplete-loading");this.source({term:d},this.response)},_response:function(d){if(d)d=this._normalize(d);this._trigger("response",null,{content:d});if(!this.options.disabled&&d&&d.length){this._suggest(d);this._trigger("open")}else this.close();this.pending--;this.pending||this.element.removeClass("ui-autocomplete-loading")},
close:function(d){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this.menu.element.hide();this.menu.blur();this._trigger("close",d)}},_change:function(d){this.previous!==this._value()&&this._trigger("change",d,{item:this.selectedItem})},_normalize:function(d){if(d.length&&d[0].label&&d[0].value)return d;return a.map(d,function(c){if(typeof c==="string")return{label:c,value:c};return a.extend({label:c.label||c.value,value:c.value||c.label},c)})},_suggest:function(d){var c=this.menu.element.empty().zIndex(this.element.zIndex()+
1);this._renderMenu(c,d);this.menu.blur();this.menu.refresh();c.show();this._resizeMenu();c.position(a.extend({of:this.element},this.options.position));this.options.autoFocus&&this.menu.next(new a.Event("mouseover"))},_resizeMenu:function(){var d=this.menu.element;d.outerWidth(Math.max(d.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(d,c){var e=this;a.each(c,function(f,i){e._renderItem(d,i)})},_renderItem:function(d,c){return a("<li></li>").data("item.autocomplete",c).append(a("<a></a>").text(c.label)).appendTo(d)},
_move:function(d,c){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(d)||this.menu.last()&&/^next/.test(d)){this._value(this.term);this.menu.blur()}else this.menu[d](c);else this.search(null,c)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)}});a.extend(a.ui.autocomplete,{escapeRegex:function(d){return d.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(d,c){var e=RegExp(a.ui.autocomplete.escapeRegex(c),
"i");return a.grep(d,function(f){return e.test(f.label||f.value||f)})}})})(jQuery);
(function(a){var g,d,c,e,f=function(){var b=a(this).find(":ui-button");setTimeout(function(){b.button("refresh")},1)},i=function(b){var h=b.name,k=b.form,l=a([]);if(h)l=k?a(k).find("[name='"+h+"']"):a("[name='"+h+"']",b.ownerDocument).filter(function(){return!this.form});return l};a.widget("ui.button",{version:"1.9pre",defaultElement:"<button>",options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",
f);if(typeof this.options.disabled!=="boolean")this.options.disabled=this.element.prop("disabled");this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var b=this,h=this.options,k=this.type==="checkbox"||this.type==="radio",l="ui-state-hover"+(!k?" ui-state-active":"");if(h.label===null)h.label=this.buttonElement.html();if(this.element.is(":disabled"))h.disabled=true;this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",
function(){if(!h.disabled){a(this).addClass("ui-state-hover");this===g&&a(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){h.disabled||a(this).removeClass(l)}).bind("click.button",function(j){if(h.disabled){j.preventDefault();j.stopImmediatePropagation()}});this.element.bind("focus.button",function(){b.buttonElement.addClass("ui-state-focus")}).bind("blur.button",function(){b.buttonElement.removeClass("ui-state-focus")});if(k){this.element.bind("change.button",function(){e||
b.refresh()});this.buttonElement.bind("mousedown.button",function(j){if(!h.disabled){e=false;d=j.pageX;c=j.pageY}}).bind("mouseup.button",function(j){if(!h.disabled)if(d!==j.pageX||c!==j.pageY)e=true})}if(this.type==="checkbox")this.buttonElement.bind("click.button",function(){if(h.disabled||e)return false;a(this).toggleClass("ui-state-active");b.buttonElement.attr("aria-pressed",b.element[0].checked)});else if(this.type==="radio")this.buttonElement.bind("click.button",function(){if(h.disabled||e)return false;
a(this).addClass("ui-state-active");b.buttonElement.attr("aria-pressed","true");var j=b.element[0];i(j).not(j).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")});else{this.buttonElement.bind("mousedown.button",function(){if(h.disabled)return false;a(this).addClass("ui-state-active");g=this;a(document).one("mouseup",function(){g=null})}).bind("mouseup.button",function(){if(h.disabled)return false;a(this).removeClass("ui-state-active")}).bind("keydown.button",
function(j){if(h.disabled)return false;if(j.keyCode==a.ui.keyCode.SPACE||j.keyCode==a.ui.keyCode.ENTER)a(this).addClass("ui-state-active")}).bind("keyup.button",function(){a(this).removeClass("ui-state-active")});this.buttonElement.is("a")&&this.buttonElement.keyup(function(j){j.keyCode===a.ui.keyCode.SPACE&&a(this).click()})}this._setOption("disabled",h.disabled);this._resetButton()},_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":
this.element.is("input")?"input":"button";if(this.type==="checkbox"||this.type==="radio"){var b=this.element.parents().last(),h="label[for='"+this.element.attr("id")+"']";this.buttonElement=b.find(h);if(!this.buttonElement.length){b=b.length?b.siblings():this.element.siblings();this.buttonElement=b.filter(h);if(!this.buttonElement.length)this.buttonElement=b.find(h)}this.element.addClass("ui-helper-hidden-accessible");(b=this.element.is(":checked"))&&this.buttonElement.addClass("ui-state-active");
this.buttonElement.prop("aria-pressed",b)}else this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active  ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());
this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(b,h){this._super("_setOption",b,h);if(b==="disabled")h?this.element.prop("disabled",true):this.element.prop("disabled",false);else this._resetButton()},refresh:function(){var b=this.element.is(":disabled");b!==this.options.disabled&&this._setOption("disabled",b);if(this.type==="radio")i(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",
"false")});else if(this.type==="checkbox")this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false")},_resetButton:function(){if(this.type==="input")this.options.label&&this.element.val(this.options.label);else{var b=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),
h=a("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),k=this.options.icons,l=k.primary&&k.secondary,j=[];if(k.primary||k.secondary){if(this.options.text)j.push("ui-button-text-icon"+(l?"s":k.primary?"-primary":"-secondary"));k.primary&&b.prepend("<span class='ui-button-icon-primary ui-icon "+k.primary+"'></span>");k.secondary&&b.append("<span class='ui-button-icon-secondary ui-icon "+k.secondary+"'></span>");if(!this.options.text){j.push(l?"ui-button-icons-only":
"ui-button-icon-only");this.hasTitle||b.attr("title",h)}}else j.push("ui-button-text-only");b.addClass(j.join(" "))}}});a.ui.button.version="1.9pre";a.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(b,h){b==="disabled"&&this.buttons.button("option",b,h);this._super("_setOption",b,h)},refresh:function(){var b=this.element.css("direction")===
"rtl";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(b?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery);
(function(a,g){function d(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass=
"ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su",
"Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",
minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false,disabled:false};a.extend(this._defaults,this.regional[""]);this.dpDiv=c(a('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function c(b){return b.delegate("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a",
"mouseout",function(){a(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&a(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&a(this).removeClass("ui-datepicker-next-hover")}).delegate("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a","mouseover",function(){if(!a.datepicker._isDisabledDatepicker(i.inline?b.parent()[0]:i.input[0])){a(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
a(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&a(this).addClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&a(this).addClass("ui-datepicker-next-hover")}})}function e(b,h){a.extend(b,h);for(var k in h)if(h[k]==null||h[k]==g)b[k]=h[k];return b}a.extend(a.ui,{datepicker:{version:"1.9pre"}});var f=(new Date).getTime(),i;a.extend(d.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",
arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(b){e(this._defaults,b||{});return this},_attachDatepicker:function(b,h){var k=null,l;for(l in this._defaults){var j=b.getAttribute("date:"+l);if(j){k=k||{};try{k[l]=eval(j)}catch(m){k[l]=j}}}l=b.nodeName.toLowerCase();j=l=="div"||l=="span";if(!b.id){this.uuid+=1;b.id="dp"+this.uuid}var n=this._newInst(a(b),j);n.settings=a.extend({},h||{},k||{});if(l=="input")this._connectDatepicker(b,n);else j&&this._inlineDatepicker(b,
n)},_newInst:function(b,h){return{id:b[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:b,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:h,dpDiv:!h?this.dpDiv:c(a('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(b,h){var k=a(b);h.append=a([]);h.trigger=a([]);if(!k.hasClass(this.markerClassName)){this._attachments(k,h);k.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",
function(l,j,m){h.settings[j]=m}).bind("getData.datepicker",function(l,j){return this._get(h,j)});this._autoSize(h);a.data(b,"datepicker",h);h.settings.disabled&&this._disableDatepicker(b)}},_attachments:function(b,h){var k=this._get(h,"appendText"),l=this._get(h,"isRTL");h.append&&h.append.remove();if(k){h.append=a('<span class="'+this._appendClass+'">'+k+"</span>");b[l?"before":"after"](h.append)}b.unbind("focus",this._showDatepicker);h.trigger&&h.trigger.remove();k=this._get(h,"showOn");if(k==
"focus"||k=="both")b.focus(this._showDatepicker);if(k=="button"||k=="both"){k=this._get(h,"buttonText");var j=this._get(h,"buttonImage");h.trigger=a(this._get(h,"buttonImageOnly")?a("<img/>").addClass(this._triggerClass).attr({src:j,alt:k,title:k}):a('<button type="button"></button>').addClass(this._triggerClass).html(j==""?k:a("<img/>").attr({src:j,alt:k,title:k})));b[l?"before":"after"](h.trigger);h.trigger.click(function(){a.datepicker._datepickerShowing&&a.datepicker._lastInput==b[0]?a.datepicker._hideDatepicker():
a.datepicker._showDatepicker(b[0]);return false})}},_autoSize:function(b){if(this._get(b,"autoSize")&&!b.inline){var h=new Date(2009,11,20),k=this._get(b,"dateFormat");if(k.match(/[DM]/)){var l=function(j){for(var m=0,n=0,o=0;o<j.length;o++)if(j[o].length>m){m=j[o].length;n=o}return n};h.setMonth(l(this._get(b,k.match(/MM/)?"monthNames":"monthNamesShort")));h.setDate(l(this._get(b,k.match(/DD/)?"dayNames":"dayNamesShort"))+20-h.getDay())}b.input.attr("size",this._formatDate(b,h).length)}},_inlineDatepicker:function(b,
h){var k=a(b);if(!k.hasClass(this.markerClassName)){k.addClass(this.markerClassName).append(h.dpDiv).bind("setData.datepicker",function(l,j,m){h.settings[j]=m}).bind("getData.datepicker",function(l,j){return this._get(h,j)});a.data(b,"datepicker",h);this._setDate(h,this._getDefaultDate(h),true);this._updateDatepicker(h);this._updateAlternate(h);h.settings.disabled&&this._disableDatepicker(b);h.dpDiv.css("display","block")}},_dialogDatepicker:function(b,h,k,l,j){b=this._dialogInst;if(!b){this.uuid+=
1;this._dialogInput=a('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);a("body").append(this._dialogInput);b=this._dialogInst=this._newInst(this._dialogInput,false);b.settings={};a.data(this._dialogInput[0],"datepicker",b)}e(b.settings,l||{});h=h&&h.constructor==Date?this._formatDate(b,h):h;this._dialogInput.val(h);this._pos=j?j.length?j:[j.pageX,j.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/
2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");b.settings.onSelect=k;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);a.blockUI&&a.blockUI(this.dpDiv);a.data(this._dialogInput[0],"datepicker",b);return this},_destroyDatepicker:function(b){var h=
a(b),k=a.data(b,"datepicker");if(h.hasClass(this.markerClassName)){var l=b.nodeName.toLowerCase();a.removeData(b,"datepicker");if(l=="input"){k.append.remove();k.trigger.remove();h.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else if(l=="div"||l=="span")h.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(b){var h=a(b),k=a.data(b,"datepicker");if(h.hasClass(this.markerClassName)){var l=
b.nodeName.toLowerCase();if(l=="input"){b.disabled=false;k.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(l=="div"||l=="span"){h=h.children("."+this._inlineClass);h.children().removeClass("ui-state-disabled");h.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",false)}this._disabledInputs=a.map(this._disabledInputs,function(j){return j==b?null:j})}},_disableDatepicker:function(b){var h=a(b),k=a.data(b,
"datepicker");if(h.hasClass(this.markerClassName)){var l=b.nodeName.toLowerCase();if(l=="input"){b.disabled=true;k.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(l=="div"||l=="span"){h=h.children("."+this._inlineClass);h.children().addClass("ui-state-disabled");h.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",true)}this._disabledInputs=a.map(this._disabledInputs,function(j){return j==b?
null:j});this._disabledInputs[this._disabledInputs.length]=b}},_isDisabledDatepicker:function(b){if(!b)return false;for(var h=0;h<this._disabledInputs.length;h++)if(this._disabledInputs[h]==b)return true;return false},_getInst:function(b){try{return a.data(b,"datepicker")}catch(h){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(b,h,k){var l=this._getInst(b);if(arguments.length==2&&typeof h=="string")return h=="defaults"?a.extend({},a.datepicker._defaults):l?h=="all"?
a.extend({},l.settings):this._get(l,h):null;var j=h||{};if(typeof h=="string"){j={};j[h]=k}if(l){this._curInst==l&&this._hideDatepicker();var m=this._getDateDatepicker(b,true),n=this._getMinMaxDate(l,"min"),o=this._getMinMaxDate(l,"max");e(l.settings,j);if(n!==null&&j.dateFormat!==g&&j.minDate===g)l.settings.minDate=this._formatDate(l,n);if(o!==null&&j.dateFormat!==g&&j.maxDate===g)l.settings.maxDate=this._formatDate(l,o);this._attachments(a(b),l);this._autoSize(l);this._setDate(l,m);this._updateAlternate(l);
this._updateDatepicker(l)}},_changeDatepicker:function(b,h,k){this._optionDatepicker(b,h,k)},_refreshDatepicker:function(b){(b=this._getInst(b))&&this._updateDatepicker(b)},_setDateDatepicker:function(b,h){var k=this._getInst(b);if(k){this._setDate(k,h);this._updateDatepicker(k);this._updateAlternate(k)}},_getDateDatepicker:function(b,h){var k=this._getInst(b);k&&!k.inline&&this._setDateFromField(k,h);return k?this._getDate(k):null},_doKeyDown:function(b){var h=a.datepicker._getInst(b.target),k=true,
l=h.dpDiv.is(".ui-datepicker-rtl");h._keyEvent=true;if(a.datepicker._datepickerShowing)switch(b.keyCode){case 9:a.datepicker._hideDatepicker();k=false;break;case 13:k=a("td."+a.datepicker._dayOverClass+":not(."+a.datepicker._currentClass+")",h.dpDiv);k[0]&&a.datepicker._selectDay(b.target,h.selectedMonth,h.selectedYear,k[0]);if(b=a.datepicker._get(h,"onSelect")){k=a.datepicker._formatDate(h);b.apply(h.input?h.input[0]:null,[k,h])}else a.datepicker._hideDatepicker();return false;case 27:a.datepicker._hideDatepicker();
break;case 33:a.datepicker._adjustDate(b.target,b.ctrlKey?-a.datepicker._get(h,"stepBigMonths"):-a.datepicker._get(h,"stepMonths"),"M");break;case 34:a.datepicker._adjustDate(b.target,b.ctrlKey?+a.datepicker._get(h,"stepBigMonths"):+a.datepicker._get(h,"stepMonths"),"M");break;case 35:if(b.ctrlKey||b.metaKey)a.datepicker._clearDate(b.target);k=b.ctrlKey||b.metaKey;break;case 36:if(b.ctrlKey||b.metaKey)a.datepicker._gotoToday(b.target);k=b.ctrlKey||b.metaKey;break;case 37:if(b.ctrlKey||b.metaKey)a.datepicker._adjustDate(b.target,
l?+1:-1,"D");k=b.ctrlKey||b.metaKey;if(b.originalEvent.altKey)a.datepicker._adjustDate(b.target,b.ctrlKey?-a.datepicker._get(h,"stepBigMonths"):-a.datepicker._get(h,"stepMonths"),"M");break;case 38:if(b.ctrlKey||b.metaKey)a.datepicker._adjustDate(b.target,-7,"D");k=b.ctrlKey||b.metaKey;break;case 39:if(b.ctrlKey||b.metaKey)a.datepicker._adjustDate(b.target,l?-1:+1,"D");k=b.ctrlKey||b.metaKey;if(b.originalEvent.altKey)a.datepicker._adjustDate(b.target,b.ctrlKey?+a.datepicker._get(h,"stepBigMonths"):
+a.datepicker._get(h,"stepMonths"),"M");break;case 40:if(b.ctrlKey||b.metaKey)a.datepicker._adjustDate(b.target,+7,"D");k=b.ctrlKey||b.metaKey;break;default:k=false}else if(b.keyCode==36&&b.ctrlKey)a.datepicker._showDatepicker(this);else k=false;if(k){b.preventDefault();b.stopPropagation()}},_doKeyPress:function(b){var h=a.datepicker._getInst(b.target);if(a.datepicker._get(h,"constrainInput")){h=a.datepicker._possibleChars(a.datepicker._get(h,"dateFormat"));var k=String.fromCharCode(b.charCode==g?
b.keyCode:b.charCode);return b.ctrlKey||b.metaKey||k<" "||!h||h.indexOf(k)>-1}},_doKeyUp:function(b){b=a.datepicker._getInst(b.target);if(b.input.val()!=b.lastVal)try{if(a.datepicker.parseDate(a.datepicker._get(b,"dateFormat"),b.input?b.input.val():null,a.datepicker._getFormatConfig(b))){a.datepicker._setDateFromField(b);a.datepicker._updateAlternate(b);a.datepicker._updateDatepicker(b)}}catch(h){a.datepicker.log(h)}return true},_showDatepicker:function(b){b=b.target||b;if(b.nodeName.toLowerCase()!=
"input")b=a("input",b.parentNode)[0];if(!(a.datepicker._isDisabledDatepicker(b)||a.datepicker._lastInput==b)){var h=a.datepicker._getInst(b);if(a.datepicker._curInst&&a.datepicker._curInst!=h){a.datepicker._curInst.dpDiv.stop(true,true);h&&a.datepicker._datepickerShowing&&a.datepicker._hideDatepicker(a.datepicker._curInst.input[0])}var k=a.datepicker._get(h,"beforeShow");k=k?k.apply(b,[b,h]):{};if(k!==false){e(h.settings,k);h.lastVal=null;a.datepicker._lastInput=b;a.datepicker._setDateFromField(h);
if(a.datepicker._inDialog)b.value="";if(!a.datepicker._pos){a.datepicker._pos=a.datepicker._findPos(b);a.datepicker._pos[1]+=b.offsetHeight}var l=false;a(b).parents().each(function(){l|=a(this).css("position")=="fixed";return!l});if(l&&a.browser.opera){a.datepicker._pos[0]-=document.documentElement.scrollLeft;a.datepicker._pos[1]-=document.documentElement.scrollTop}k={left:a.datepicker._pos[0],top:a.datepicker._pos[1]};a.datepicker._pos=null;h.dpDiv.empty();h.dpDiv.css({position:"absolute",display:"block",
top:"-1000px"});a.datepicker._updateDatepicker(h);k=a.datepicker._checkOffset(h,k,l);h.dpDiv.css({position:a.datepicker._inDialog&&a.blockUI?"static":l?"fixed":"absolute",display:"none",left:k.left+"px",top:k.top+"px"});if(!h.inline){k=a.datepicker._get(h,"showAnim");var j=a.datepicker._get(h,"duration"),m=function(){var n=h.dpDiv.find("iframe.ui-datepicker-cover");if(n.length){var o=a.datepicker._getBorders(h.dpDiv);n.css({left:-o[0],top:-o[1],width:h.dpDiv.outerWidth(),height:h.dpDiv.outerHeight()})}};
h.dpDiv.zIndex(a(b).zIndex()+1);a.datepicker._datepickerShowing=true;if(a.effects&&(a.effects.effect[k]||a.effects[k]))h.dpDiv.show(k,a.datepicker._get(h,"showOptions"),j,m);else h.dpDiv[k||"show"](k?j:null,m);if(!k||!j)m();h.input.is(":visible")&&!h.input.is(":disabled")&&h.input.focus();a.datepicker._curInst=h}}}},_updateDatepicker:function(b){this.maxRows=4;var h=a.datepicker._getBorders(b.dpDiv);i=b;b.dpDiv.empty().append(this._generateHTML(b));var k=b.dpDiv.find("iframe.ui-datepicker-cover");
k.length&&k.css({left:-h[0],top:-h[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()});b.dpDiv.find("."+this._dayOverClass+" a").mouseover();h=this._getNumberOfMonths(b);k=h[1];b.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");k>1&&b.dpDiv.addClass("ui-datepicker-multi-"+k).css("width",17*k+"em");b.dpDiv[(h[0]!=1||h[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");b.dpDiv[(this._get(b,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");
b==a.datepicker._curInst&&a.datepicker._datepickerShowing&&b.input&&b.input.is(":visible")&&!b.input.is(":disabled")&&b.input[0]!=document.activeElement&&b.input.focus();if(b.yearshtml){var l=b.yearshtml;setTimeout(function(){l===b.yearshtml&&b.yearshtml&&b.dpDiv.find("select.ui-datepicker-year:first").replaceWith(b.yearshtml);l=b.yearshtml=null},0)}},_getBorders:function(b){var h=function(k){return{thin:1,medium:2,thick:3}[k]||k};return[parseFloat(h(b.css("border-left-width"))),parseFloat(h(b.css("border-top-width")))]},
_checkOffset:function(b,h,k){var l=b.dpDiv.outerWidth(),j=b.dpDiv.outerHeight(),m=b.input?b.input.outerWidth():0,n=b.input?b.input.outerHeight():0,o=document.documentElement.clientWidth+a(document).scrollLeft(),p=document.documentElement.clientHeight+a(document).scrollTop();h.left-=this._get(b,"isRTL")?l-m:0;h.left-=k&&h.left==b.input.offset().left?a(document).scrollLeft():0;h.top-=k&&h.top==b.input.offset().top+n?a(document).scrollTop():0;h.left-=Math.min(h.left,h.left+l>o&&o>l?Math.abs(h.left+l-
o):0);h.top-=Math.min(h.top,h.top+j>p&&p>j?Math.abs(j+n):0);return h},_findPos:function(b){for(var h=this._get(this._getInst(b),"isRTL");b&&(b.type=="hidden"||b.nodeType!=1||a.expr.filters.hidden(b));)b=b[h?"previousSibling":"nextSibling"];b=a(b).offset();return[b.left,b.top]},_hideDatepicker:function(b){var h=this._curInst;if(!(!h||b&&h!=a.data(b,"datepicker")))if(this._datepickerShowing){b=this._get(h,"showAnim");var k=this._get(h,"duration"),l=function(){a.datepicker._tidyDialog(h);this._curInst=
null};if(a.effects&&(a.effects.effect[b]||a.effects[b]))h.dpDiv.hide(b,a.datepicker._get(h,"showOptions"),k,l);else h.dpDiv[b=="slideDown"?"slideUp":b=="fadeIn"?"fadeOut":"hide"](b?k:null,l);b||l();this._datepickerShowing=false;if(b=this._get(h,"onClose"))b.apply(h.input?h.input[0]:null,[h.input?h.input.val():"",h]);this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(a.blockUI){a.unblockUI();a("body").append(this.dpDiv)}}this._inDialog=false}},
_tidyDialog:function(b){b.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(b){if(a.datepicker._curInst){b=a(b.target);var h=a.datepicker._getInst(b[0]);if(b[0].id!=a.datepicker._mainDivId&&b.parents("#"+a.datepicker._mainDivId).length==0&&!b.hasClass(a.datepicker.markerClassName)&&!b.hasClass(a.datepicker._triggerClass)&&a.datepicker._datepickerShowing&&!(a.datepicker._inDialog&&a.blockUI)||b.hasClass(a.datepicker.markerClassName)&&a.datepicker._curInst!=
h)a.datepicker._hideDatepicker()}},_adjustDate:function(b,h,k){b=a(b);var l=this._getInst(b[0]);if(!this._isDisabledDatepicker(b[0])){this._adjustInstDate(l,h+(k=="M"?this._get(l,"showCurrentAtPos"):0),k);this._updateDatepicker(l)}},_gotoToday:function(b){b=a(b);var h=this._getInst(b[0]);if(this._get(h,"gotoCurrent")&&h.currentDay){h.selectedDay=h.currentDay;h.drawMonth=h.selectedMonth=h.currentMonth;h.drawYear=h.selectedYear=h.currentYear}else{var k=new Date;h.selectedDay=k.getDate();h.drawMonth=
h.selectedMonth=k.getMonth();h.drawYear=h.selectedYear=k.getFullYear()}this._notifyChange(h);this._adjustDate(b)},_selectMonthYear:function(b,h,k){b=a(b);var l=this._getInst(b[0]);l["selected"+(k=="M"?"Month":"Year")]=l["draw"+(k=="M"?"Month":"Year")]=parseInt(h.options[h.selectedIndex].value,10);this._notifyChange(l);this._adjustDate(b)},_selectDay:function(b,h,k,l){var j=a(b);if(!(a(l).hasClass(this._unselectableClass)||this._isDisabledDatepicker(j[0]))){j=this._getInst(j[0]);j.selectedDay=j.currentDay=
a("a",l).html();j.selectedMonth=j.currentMonth=h;j.selectedYear=j.currentYear=k;this._selectDate(b,this._formatDate(j,j.currentDay,j.currentMonth,j.currentYear))}},_clearDate:function(b){b=a(b);this._getInst(b[0]);this._selectDate(b,"")},_selectDate:function(b,h){var k=this._getInst(a(b)[0]);h=h!=null?h:this._formatDate(k);k.input&&k.input.val(h);this._updateAlternate(k);var l=this._get(k,"onSelect");if(l)l.apply(k.input?k.input[0]:null,[h,k]);else k.input&&k.input.trigger("change");if(k.inline)this._updateDatepicker(k);
else{this._hideDatepicker();this._lastInput=k.input[0];typeof k.input[0]!="object"&&k.input.focus();this._lastInput=null}},_updateAlternate:function(b){var h=this._get(b,"altField");if(h){var k=this._get(b,"altFormat")||this._get(b,"dateFormat"),l=this._getDate(b),j=this.formatDate(k,l,this._getFormatConfig(b));a(h).each(function(){a(this).val(j)})}},noWeekends:function(b){b=b.getDay();return[b>0&&b<6,""]},iso8601Week:function(b){b=new Date(b.getTime());b.setDate(b.getDate()+4-(b.getDay()||7));var h=
b.getTime();b.setMonth(0);b.setDate(1);return Math.floor(Math.round((h-b)/864E5)/7)+1},parseDate:function(b,h,k){if(b==null||h==null)throw"Invalid arguments";h=typeof h=="object"?h.toString():h+"";if(h=="")return null;var l=(k?k.shortYearCutoff:null)||this._defaults.shortYearCutoff;l=typeof l!="string"?l:(new Date).getFullYear()%100+parseInt(l,10);for(var j=(k?k.dayNamesShort:null)||this._defaults.dayNamesShort,m=(k?k.dayNames:null)||this._defaults.dayNames,n=(k?k.monthNamesShort:null)||this._defaults.monthNamesShort,
o=(k?k.monthNames:null)||this._defaults.monthNames,p=k=-1,q=-1,u=-1,s=false,r=function(y){(y=C+1<b.length&&b.charAt(C+1)==y)&&C++;return y},t=function(y){var D=r(y);y=h.substring(x).match(RegExp("^\\d{1,"+(y=="@"?14:y=="!"?20:y=="y"&&D?4:y=="o"?3:2)+"}"));if(!y)throw"Missing number at position "+x;x+=y[0].length;return parseInt(y[0],10)},v=function(y,D,J){y=a.map(r(y)?J:D,function(H,E){return[[E,H]]}).sort(function(H,E){return-(H[1].length-E[1].length)});var I=-1;a.each(y,function(H,E){var K=E[1];
if(h.substr(x,K.length).toLowerCase()==K.toLowerCase()){I=E[0];x+=K.length;return false}});if(I!=-1)return I+1;else throw"Unknown name at position "+x;},w=function(){if(h.charAt(x)!=b.charAt(C))throw"Unexpected literal at position "+x;x++},x=0,C=0;C<b.length;C++)if(s)if(b.charAt(C)=="'"&&!r("'"))s=false;else w();else switch(b.charAt(C)){case "d":q=t("d");break;case "D":v("D",j,m);break;case "o":u=t("o");break;case "m":p=t("m");break;case "M":p=v("M",n,o);break;case "y":k=t("y");break;case "@":var A=
new Date(t("@"));k=A.getFullYear();p=A.getMonth()+1;q=A.getDate();break;case "!":A=new Date((t("!")-this._ticksTo1970)/1E4);k=A.getFullYear();p=A.getMonth()+1;q=A.getDate();break;case "'":if(r("'"))w();else s=true;break;default:w()}if(x<h.length){j=h.substr(x);if(!/^\s+/.test(j))throw"Extra/unparsed characters found in date: "+j;}if(k==-1)k=(new Date).getFullYear();else if(k<100)k+=(new Date).getFullYear()-(new Date).getFullYear()%100+(k<=l?0:-100);if(u>-1){p=1;q=u;do{l=this._getDaysInMonth(k,p-1);
if(q<=l)break;p++;q-=l}while(1)}A=this._daylightSavingAdjust(new Date(k,p-1,q));if(A.getFullYear()!=k||A.getMonth()+1!=p||A.getDate()!=q)throw"Invalid date";return A},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*864E9,formatDate:function(b,h,k){if(!h)return"";
var l=(k?k.dayNamesShort:null)||this._defaults.dayNamesShort,j=(k?k.dayNames:null)||this._defaults.dayNames,m=(k?k.monthNamesShort:null)||this._defaults.monthNamesShort;k=(k?k.monthNames:null)||this._defaults.monthNames;var n=function(r){(r=s+1<b.length&&b.charAt(s+1)==r)&&s++;return r},o=function(r,t,v){t=""+t;if(n(r))for(;t.length<v;)t="0"+t;return t},p=function(r,t,v,w){return n(r)?w[t]:v[t]},q="",u=false;if(h)for(var s=0;s<b.length;s++)if(u)if(b.charAt(s)=="'"&&!n("'"))u=false;else q+=b.charAt(s);
else switch(b.charAt(s)){case "d":q+=o("d",h.getDate(),2);break;case "D":q+=p("D",h.getDay(),l,j);break;case "o":q+=o("o",Math.round(((new Date(h.getFullYear(),h.getMonth(),h.getDate())).getTime()-(new Date(h.getFullYear(),0,0)).getTime())/864E5),3);break;case "m":q+=o("m",h.getMonth()+1,2);break;case "M":q+=p("M",h.getMonth(),m,k);break;case "y":q+=n("y")?h.getFullYear():(h.getYear()%100<10?"0":"")+h.getYear()%100;break;case "@":q+=h.getTime();break;case "!":q+=h.getTime()*1E4+this._ticksTo1970;
break;case "'":if(n("'"))q+="'";else u=true;break;default:q+=b.charAt(s)}return q},_possibleChars:function(b){for(var h="",k=false,l=function(m){(m=j+1<b.length&&b.charAt(j+1)==m)&&j++;return m},j=0;j<b.length;j++)if(k)if(b.charAt(j)=="'"&&!l("'"))k=false;else h+=b.charAt(j);else switch(b.charAt(j)){case "d":case "m":case "y":case "@":h+="0123456789";break;case "D":case "M":return null;case "'":if(l("'"))h+="'";else k=true;break;default:h+=b.charAt(j)}return h},_get:function(b,h){return b.settings[h]!==
g?b.settings[h]:this._defaults[h]},_setDateFromField:function(b,h){if(b.input.val()!=b.lastVal){var k=this._get(b,"dateFormat"),l=b.lastVal=b.input?b.input.val():null,j,m;j=m=this._getDefaultDate(b);var n=this._getFormatConfig(b);try{j=this.parseDate(k,l,n)||m}catch(o){this.log(o);l=h?"":l}b.selectedDay=j.getDate();b.drawMonth=b.selectedMonth=j.getMonth();b.drawYear=b.selectedYear=j.getFullYear();b.currentDay=l?j.getDate():0;b.currentMonth=l?j.getMonth():0;b.currentYear=l?j.getFullYear():0;this._adjustInstDate(b)}},
_getDefaultDate:function(b){return this._restrictMinMax(b,this._determineDate(b,this._get(b,"defaultDate"),new Date))},_determineDate:function(b,h,k){var l=function(j){var m=new Date;m.setDate(m.getDate()+j);return m};if(h=(h=h==null||h===""?k:typeof h=="string"?function(j){try{return a.datepicker.parseDate(a.datepicker._get(b,"dateFormat"),j,a.datepicker._getFormatConfig(b))}catch(m){}var n=(j.toLowerCase().match(/^c/)?a.datepicker._getDate(b):null)||new Date,o=n.getFullYear(),p=n.getMonth();n=n.getDate();
for(var q=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,u=q.exec(j);u;){switch(u[2]||"d"){case "d":case "D":n+=parseInt(u[1],10);break;case "w":case "W":n+=parseInt(u[1],10)*7;break;case "m":case "M":p+=parseInt(u[1],10);n=Math.min(n,a.datepicker._getDaysInMonth(o,p));break;case "y":case "Y":o+=parseInt(u[1],10);n=Math.min(n,a.datepicker._getDaysInMonth(o,p))}u=q.exec(j)}return new Date(o,p,n)}(h):typeof h=="number"?isNaN(h)?k:l(h):new Date(h.getTime()))&&h.toString()=="Invalid Date"?k:h){h.setHours(0);h.setMinutes(0);
h.setSeconds(0);h.setMilliseconds(0)}return this._daylightSavingAdjust(h)},_daylightSavingAdjust:function(b){if(!b)return null;b.setHours(b.getHours()>12?b.getHours()+2:0);return b},_setDate:function(b,h,k){var l=!h,j=b.selectedMonth,m=b.selectedYear;h=this._restrictMinMax(b,this._determineDate(b,h,new Date));b.selectedDay=b.currentDay=h.getDate();b.drawMonth=b.selectedMonth=b.currentMonth=h.getMonth();b.drawYear=b.selectedYear=b.currentYear=h.getFullYear();if((j!=b.selectedMonth||m!=b.selectedYear)&&
!k)this._notifyChange(b);this._adjustInstDate(b);if(b.input)b.input.val(l?"":this._formatDate(b))},_getDate:function(b){return!b.currentYear||b.input&&b.input.val()==""?null:this._daylightSavingAdjust(new Date(b.currentYear,b.currentMonth,b.currentDay))},_generateHTML:function(b){var h=new Date;h=this._daylightSavingAdjust(new Date(h.getFullYear(),h.getMonth(),h.getDate()));var k=this._get(b,"isRTL"),l=this._get(b,"showButtonPanel"),j=this._get(b,"hideIfNoPrevNext"),m=this._get(b,"navigationAsDateFormat"),
n=this._getNumberOfMonths(b),o=this._get(b,"showCurrentAtPos"),p=this._get(b,"stepMonths"),q=n[0]!=1||n[1]!=1,u=this._daylightSavingAdjust(!b.currentDay?new Date(9999,9,9):new Date(b.currentYear,b.currentMonth,b.currentDay)),s=this._getMinMaxDate(b,"min"),r=this._getMinMaxDate(b,"max");o=b.drawMonth-o;var t=b.drawYear;if(o<0){o+=12;t--}if(r){var v=this._daylightSavingAdjust(new Date(r.getFullYear(),r.getMonth()-n[0]*n[1]+1,r.getDate()));for(v=s&&v<s?s:v;this._daylightSavingAdjust(new Date(t,o,1))>
v;){o--;if(o<0){o=11;t--}}}b.drawMonth=o;b.drawYear=t;v=this._get(b,"prevText");v=!m?v:this.formatDate(v,this._daylightSavingAdjust(new Date(t,o-p,1)),this._getFormatConfig(b));v=this._canAdjustMonth(b,-1,t,o)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+f+".datepicker._adjustDate('#"+b.id+"', -"+p+", 'M');\" title=\""+v+'"><span class="ui-icon ui-icon-circle-triangle-'+(k?"e":"w")+'">'+v+"</span></a>":j?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+
v+'"><span class="ui-icon ui-icon-circle-triangle-'+(k?"e":"w")+'">'+v+"</span></a>";var w=this._get(b,"nextText");w=!m?w:this.formatDate(w,this._daylightSavingAdjust(new Date(t,o+p,1)),this._getFormatConfig(b));j=this._canAdjustMonth(b,+1,t,o)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+f+".datepicker._adjustDate('#"+b.id+"', +"+p+", 'M');\" title=\""+w+'"><span class="ui-icon ui-icon-circle-triangle-'+(k?"w":"e")+'">'+w+"</span></a>":j?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+
w+'"><span class="ui-icon ui-icon-circle-triangle-'+(k?"w":"e")+'">'+w+"</span></a>";p=this._get(b,"currentText");w=this._get(b,"gotoCurrent")&&b.currentDay?u:h;p=!m?p:this.formatDate(p,w,this._getFormatConfig(b));m=!b.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+f+'.datepicker._hideDatepicker();">'+this._get(b,"closeText")+"</button>":"";l=l?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(k?m:"")+(this._isInRange(b,
w)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+f+".datepicker._gotoToday('#"+b.id+"');\">"+p+"</button>":"")+(k?"":m)+"</div>":"";m=parseInt(this._get(b,"firstDay"),10);m=isNaN(m)?0:m;p=this._get(b,"showWeek");w=this._get(b,"dayNames");this._get(b,"dayNamesShort");var x=this._get(b,"dayNamesMin"),C=this._get(b,"monthNames"),A=this._get(b,"monthNamesShort"),y=this._get(b,"beforeShowDay"),D=this._get(b,"showOtherMonths"),
J=this._get(b,"selectOtherMonths");this._get(b,"calculateWeek");for(var I=this._getDefaultDate(b),H="",E=0;E<n[0];E++){var K="";this.maxRows=4;for(var M=0;M<n[1];M++){var P=this._daylightSavingAdjust(new Date(t,o,b.selectedDay)),B=" ui-corner-all",F="";if(q){F+='<div class="ui-datepicker-group';if(n[1]>1)switch(M){case 0:F+=" ui-datepicker-group-first";B=" ui-corner-"+(k?"right":"left");break;case n[1]-1:F+=" ui-datepicker-group-last";B=" ui-corner-"+(k?"left":"right");break;default:F+=" ui-datepicker-group-middle";
B=""}F+='">'}F+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+B+'">'+(/all|left/.test(B)&&E==0?k?j:v:"")+(/all|right/.test(B)&&E==0?k?v:j:"")+this._generateMonthYearHeader(b,o,t,s,r,E>0||M>0,C,A)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var G=p?'<th class="ui-datepicker-week-col">'+this._get(b,"weekHeader")+"</th>":"";for(B=0;B<7;B++){var z=(B+m)%7;G+="<th"+((B+m+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+w[z]+'">'+x[z]+"</span></th>"}F+=
G+"</tr></thead><tbody>";G=this._getDaysInMonth(t,o);if(t==b.selectedYear&&o==b.selectedMonth)b.selectedDay=Math.min(b.selectedDay,G);B=(this._getFirstDayOfMonth(t,o)-m+7)%7;G=Math.ceil((B+G)/7);this.maxRows=G=q?this.maxRows>G?this.maxRows:G:G;z=this._daylightSavingAdjust(new Date(t,o,1-B));for(var Q=0;Q<G;Q++){F+="<tr>";var R=!p?"":'<td class="ui-datepicker-week-col">'+this._get(b,"calculateWeek")(z)+"</td>";for(B=0;B<7;B++){var N=y?y.apply(b.input?b.input[0]:null,[z]):[true,""],L=z.getMonth()!=
o,O=L&&!J||!N[0]||s&&z<s||r&&z>r;R+='<td class="'+((B+m+6)%7>=5?" ui-datepicker-week-end":"")+(L?" ui-datepicker-other-month":"")+(z.getTime()==P.getTime()&&o==b.selectedMonth&&b._keyEvent||I.getTime()==z.getTime()&&I.getTime()==P.getTime()?" "+this._dayOverClass:"")+(O?" "+this._unselectableClass+" ui-state-disabled":"")+(L&&!D?"":" "+N[1]+(z.getTime()==u.getTime()?" "+this._currentClass:"")+(z.getTime()==h.getTime()?" ui-datepicker-today":""))+'"'+((!L||D)&&N[2]?' title="'+N[2]+'"':"")+(O?"":' onclick="DP_jQuery_'+
f+".datepicker._selectDay('#"+b.id+"',"+z.getMonth()+","+z.getFullYear()+', this);return false;"')+">"+(L&&!D?"&#xa0;":O?'<span class="ui-state-default">'+z.getDate()+"</span>":'<a class="ui-state-default'+(z.getTime()==h.getTime()?" ui-state-highlight":"")+(z.getTime()==u.getTime()?" ui-state-active":"")+(L?" ui-priority-secondary":"")+'" href="#">'+z.getDate()+"</a>")+"</td>";z.setDate(z.getDate()+1);z=this._daylightSavingAdjust(z)}F+=R+"</tr>"}o++;if(o>11){o=0;t++}F+="</tbody></table>"+(q?"</div>"+
(n[0]>0&&M==n[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");K+=F}H+=K}H+=l+(a.browser.msie&&parseInt(a.browser.version,10)<7&&!b.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");b._keyEvent=false;return H},_generateMonthYearHeader:function(b,h,k,l,j,m,n,o){var p=this._get(b,"changeMonth"),q=this._get(b,"changeYear"),u=this._get(b,"showMonthAfterYear"),s='<div class="ui-datepicker-title">',r="";if(m||!p)r+='<span class="ui-datepicker-month">'+
n[h]+"</span>";else{n=l&&l.getFullYear()==k;var t=j&&j.getFullYear()==k;r+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+f+".datepicker._selectMonthYear('#"+b.id+"', this, 'M');\" >";for(var v=0;v<12;v++)if((!n||v>=l.getMonth())&&(!t||v<=j.getMonth()))r+='<option value="'+v+'"'+(v==h?' selected="selected"':"")+">"+o[v]+"</option>";r+="</select>"}u||(s+=r+(m||!(p&&q)?"&#xa0;":""));if(!b.yearshtml){b.yearshtml="";if(m||!q)s+='<span class="ui-datepicker-year">'+k+"</span>";else{o=this._get(b,
"yearRange").split(":");var w=(new Date).getFullYear();n=function(x){x=x.match(/c[+-].*/)?k+parseInt(x.substring(1),10):x.match(/[+-].*/)?w+parseInt(x,10):parseInt(x,10);return isNaN(x)?w:x};h=n(o[0]);o=Math.max(h,n(o[1]||""));h=l?Math.max(h,l.getFullYear()):h;o=j?Math.min(o,j.getFullYear()):o;for(b.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+f+".datepicker._selectMonthYear('#"+b.id+"', this, 'Y');\" >";h<=o;h++)b.yearshtml+='<option value="'+h+'"'+(h==k?' selected="selected"':
"")+">"+h+"</option>";b.yearshtml+="</select>";s+=b.yearshtml;b.yearshtml=null}}s+=this._get(b,"yearSuffix");if(u)s+=(m||!(p&&q)?"&#xa0;":"")+r;s+="</div>";return s},_adjustInstDate:function(b,h,k){var l=b.drawYear+(k=="Y"?h:0),j=b.drawMonth+(k=="M"?h:0);h=Math.min(b.selectedDay,this._getDaysInMonth(l,j))+(k=="D"?h:0);l=this._restrictMinMax(b,this._daylightSavingAdjust(new Date(l,j,h)));b.selectedDay=l.getDate();b.drawMonth=b.selectedMonth=l.getMonth();b.drawYear=b.selectedYear=l.getFullYear();if(k==
"M"||k=="Y")this._notifyChange(b)},_restrictMinMax:function(b,h){var k=this._getMinMaxDate(b,"min"),l=this._getMinMaxDate(b,"max");k=k&&h<k?k:h;return l&&k>l?l:k},_notifyChange:function(b){var h=this._get(b,"onChangeMonthYear");if(h)h.apply(b.input?b.input[0]:null,[b.selectedYear,b.selectedMonth+1,b])},_getNumberOfMonths:function(b){b=this._get(b,"numberOfMonths");return b==null?[1,1]:typeof b=="number"?[1,b]:b},_getMinMaxDate:function(b,h){return this._determineDate(b,this._get(b,h+"Date"),null)},
_getDaysInMonth:function(b,h){return 32-this._daylightSavingAdjust(new Date(b,h,32)).getDate()},_getFirstDayOfMonth:function(b,h){return(new Date(b,h,1)).getDay()},_canAdjustMonth:function(b,h,k,l){var j=this._getNumberOfMonths(b);k=this._daylightSavingAdjust(new Date(k,l+(h<0?h:j[0]*j[1]),1));h<0&&k.setDate(this._getDaysInMonth(k.getFullYear(),k.getMonth()));return this._isInRange(b,k)},_isInRange:function(b,h){var k=this._getMinMaxDate(b,"min"),l=this._getMinMaxDate(b,"max");return(!k||h.getTime()>=
k.getTime())&&(!l||h.getTime()<=l.getTime())},_getFormatConfig:function(b){var h=this._get(b,"shortYearCutoff");h=typeof h!="string"?h:(new Date).getFullYear()%100+parseInt(h,10);return{shortYearCutoff:h,dayNamesShort:this._get(b,"dayNamesShort"),dayNames:this._get(b,"dayNames"),monthNamesShort:this._get(b,"monthNamesShort"),monthNames:this._get(b,"monthNames")}},_formatDate:function(b,h,k,l){if(!h){b.currentDay=b.selectedDay;b.currentMonth=b.selectedMonth;b.currentYear=b.selectedYear}h=h?typeof h==
"object"?h:this._daylightSavingAdjust(new Date(l,k,h)):this._daylightSavingAdjust(new Date(b.currentYear,b.currentMonth,b.currentDay));return this.formatDate(this._get(b,"dateFormat"),h,this._getFormatConfig(b))}});a.fn.datepicker=function(b){if(!this.length)return this;if(!a.datepicker.initialized){a(document).mousedown(a.datepicker._checkExternalClick).find("body").append(a.datepicker.dpDiv);a.datepicker.initialized=true}var h=Array.prototype.slice.call(arguments,1);if(typeof b=="string"&&(b=="isDisabled"||
b=="getDate"||b=="widget"))return a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(h));if(b=="option"&&arguments.length==2&&typeof arguments[1]=="string")return a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(h));return this.each(function(){typeof b=="string"?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this].concat(h)):a.datepicker._attachDatepicker(this,b)})};a.datepicker=new d;a.datepicker.initialized=false;a.datepicker.uuid=(new Date).getTime();
a.datepicker.version="1.9pre";window["DP_jQuery_"+f]=a})(jQuery);
(function(a,g){var d={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},c={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true};a.widget("ui.dialog",{version:"1.9pre",options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var f=a(this).css(e).offset().top;
f<0&&a(this).css("top",e.top-f)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var e=this,f=e.options,i=f.title||"&#160;",b=a.ui.dialog.getTitleId(e.element),h=(e.uiDialog=a("<div>")).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+f.dialogClass).css({display:"none",outline:0,zIndex:f.zIndex}).attr("tabIndex",
-1).keydown(function(j){if(f.closeOnEscape&&!j.isDefaultPrevented()&&j.keyCode&&j.keyCode===a.ui.keyCode.ESCAPE){e.close(j);j.preventDefault()}}).attr({role:"dialog","aria-labelledby":b}).mousedown(function(j){e.moveToTop(false,j)}).appendTo("body");e.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(h);var k=(e.uiDialogTitlebar=a("<div>")).addClass("ui-dialog-titlebar  ui-widget-header  ui-corner-all  ui-helper-clearfix").prependTo(h),l=a("<a href='#'></a>").addClass("ui-dialog-titlebar-close  ui-corner-all").attr("role",
"button").click(function(j){j.preventDefault();e.close(j)}).appendTo(k);(e.uiDialogTitlebarCloseText=a("<span>")).addClass("ui-icon ui-icon-closethick").text(f.closeText).appendTo(l);a("<span>").addClass("ui-dialog-title").attr("id",b).html(i).prependTo(k);k.find("*").add(k).disableSelection();this._hoverable(l);this._focusable(l);f.draggable&&a.fn.draggable&&e._makeDraggable();f.resizable&&a.fn.resizable&&e._makeResizable();e._createButtons(f.buttons);e._isOpen=false;a.fn.bgiframe&&h.bgiframe()},
_init:function(){this.options.autoOpen&&this.open()},_destroy:function(){this.overlay&&this.overlay.destroy();this.uiDialog.hide();this.element.removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();this.originalTitle&&this.element.attr("title",this.originalTitle)},widget:function(){return this.uiDialog},close:function(e){if(!this._isOpen)return f;var f=this,i,b;if(false!==f._trigger("beforeClose",e)){f._isOpen=false;f.overlay&&f.overlay.destroy();f.uiDialog.unbind("keypress.ui-dialog");
if(f.options.hide)f.uiDialog.hide(f.options.hide,function(){f._trigger("close",e)});else{f.uiDialog.hide();f._trigger("close",e)}a.ui.dialog.overlay.resize();if(f.options.modal){i=0;a(".ui-dialog").each(function(){if(this!==f.uiDialog[0]){b=a(this).css("z-index");isNaN(b)||(i=Math.max(i,b))}});a.ui.dialog.maxZ=i}return f}},isOpen:function(){return this._isOpen},moveToTop:function(e,f){var i=this.options;if(i.modal&&!e||!i.stack&&!i.modal)return this._trigger("focus",f);if(i.zIndex>a.ui.dialog.maxZ)a.ui.dialog.maxZ=
i.zIndex;if(this.overlay){a.ui.dialog.maxZ+=1;a.ui.dialog.overlay.maxZ=a.ui.dialog.maxZ;this.overlay.$el.css("z-index",a.ui.dialog.overlay.maxZ)}i={scrollTop:this.element.scrollTop(),scrollLeft:this.element.scrollLeft()};a.ui.dialog.maxZ+=1;this.uiDialog.css("z-index",a.ui.dialog.maxZ);this.element.attr(i);this._trigger("focus",f);return this},open:function(){if(!this._isOpen){var e=this.options,f=this.uiDialog;this._size();this._position(e.position);f.show(e.show);this.overlay=e.modal?new a.ui.dialog.overlay(this):
null;this.moveToTop(true);e.modal&&f.bind("keydown.ui-dialog",function(i){if(i.keyCode===a.ui.keyCode.TAB){var b=a(":tabbable",this),h=b.filter(":first");b=b.filter(":last");if(i.target===b[0]&&!i.shiftKey){h.focus(1);return false}else if(i.target===h[0]&&i.shiftKey){b.focus(1);return false}}});e=this.element.find(":tabbable");if(!e.length){e=f.find(".ui-dialog-buttonpane :tabbable");e.length||(e=f)}e.eq(0).focus();this._isOpen=true;this._trigger("open");return this}},_createButtons:function(e){var f=
this,i=false;f.uiDialog.find(".ui-dialog-buttonpane").remove();typeof e==="object"&&e!==null&&a.each(e,function(){return!(i=true)});if(i){var b=a("<div>").addClass("ui-dialog-buttonpane  ui-widget-content ui-helper-clearfix"),h=a("<div>").addClass("ui-dialog-buttonset").appendTo(b);a.each(e,function(k,l){l=a.isFunction(l)?{click:l,text:k}:l;var j=a("<button type='button'>").attr(l,true).unbind("click").click(function(){l.click.apply(f.element[0],arguments)}).appendTo(h);a.fn.button&&j.button()});
f.uiDialog.addClass("ui-dialog-buttons");b.appendTo(f.uiDialog)}else f.uiDialog.removeClass("ui-dialog-buttons")},_makeDraggable:function(){function e(h){return{position:h.position,offset:h.offset}}var f=this,i=f.options,b=a(document);f.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(h,k){a(this).addClass("ui-dialog-dragging");f._trigger("dragStart",h,e(k))},drag:function(h,k){f._trigger("drag",h,e(k))},
stop:function(h,k){i.position=[k.position.left-b.scrollLeft(),k.position.top-b.scrollTop()];a(this).removeClass("ui-dialog-dragging");f._trigger("dragStop",h,e(k));a.ui.dialog.overlay.resize()}})},_makeResizable:function(e){function f(k){return{originalPosition:k.originalPosition,originalSize:k.originalSize,position:k.position,size:k.size}}e=e===g?this.options.resizable:e;var i=this,b=i.options,h=i.uiDialog.css("position");e=typeof e==="string"?e:"n,e,s,w,se,sw,ne,nw";i.uiDialog.resizable({cancel:".ui-dialog-content",
containment:"document",alsoResize:i.element,maxWidth:b.maxWidth,maxHeight:b.maxHeight,minWidth:b.minWidth,minHeight:i._minHeight(),handles:e,start:function(k,l){a(this).addClass("ui-dialog-resizing");i._trigger("resizeStart",k,f(l))},resize:function(k,l){i._trigger("resize",k,f(l))},stop:function(k,l){a(this).removeClass("ui-dialog-resizing");b.height=a(this).height();b.width=a(this).width();i._trigger("resizeStop",k,f(l));a.ui.dialog.overlay.resize()}}).css("position",h).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},
_minHeight:function(){var e=this.options;return e.height==="auto"?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(e){var f=[],i=[0,0],b;if(e){if(typeof e==="string"||typeof e==="object"&&"0"in e){f=e.split?e.split(" "):[e[0],e[1]];if(f.length===1)f[1]=f[0];a.each(["left","top"],function(h,k){if(+f[h]===f[h]){i[h]=f[h];f[h]=k}});e={my:f.join(" "),at:f.join(" "),offset:i.join(" ")}}e=a.extend({},a.ui.dialog.prototype.options.position,e)}else e=a.ui.dialog.prototype.options.position;(b=
this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.position(e);b||this.uiDialog.hide()},_setOptions:function(e){var f=this,i={},b=false;a.each(e,function(h,k){f._setOption(h,k);if(h in d)b=true;if(h in c)i[h]=k});b&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",i)},_setOption:function(e,f){var i=this.uiDialog;switch(e){case "buttons":this._createButtons(f);break;case "closeText":this.uiDialogTitlebarCloseText.text(""+f);break;case "dialogClass":i.removeClass(this.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+
f);break;case "disabled":f?i.addClass("ui-dialog-disabled"):i.removeClass("ui-dialog-disabled");break;case "draggable":var b=i.is(":data(draggable)");b&&!f&&i.draggable("destroy");!b&&f&&this._makeDraggable();break;case "position":this._position(f);break;case "resizable":(b=i.is(":data(resizable)"))&&!f&&i.resizable("destroy");b&&typeof f==="string"&&i.resizable("option","handles",f);!b&&f!==false&&this._makeResizable(f);break;case "title":a(".ui-dialog-title",this.uiDialogTitlebar).html(""+(f||"&#160;"))}this._super("_setOption",
e,f)},_size:function(){var e=this.options,f,i,b=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(e.minWidth>e.width)e.width=e.minWidth;f=this.uiDialog.css({height:"auto",width:e.width}).height();i=Math.max(0,e.minHeight-f);if(e.height==="auto")if(a.support.minHeight)this.element.css({minHeight:i,height:"auto"});else{this.uiDialog.show();e=this.element.css("height","auto").height();b||this.uiDialog.hide();this.element.height(Math.max(e,i))}else this.element.height(Math.max(e.height-
f,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});a.extend(a.ui.dialog,{uuid:0,maxZ:0,getTitleId:function(e){e=e.attr("id");if(!e){this.uuid+=1;e=this.uuid}return"ui-dialog-title-"+e},overlay:function(e){this.$el=a.ui.dialog.overlay.create(e)}});a.extend(a.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:a.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(e){return e+".dialog-overlay"}).join(" "),create:function(e){if(this.instances.length===
0){setTimeout(function(){a.ui.dialog.overlay.instances.length&&a(document).bind(a.ui.dialog.overlay.events,function(i){if(a(i.target).zIndex()<a.ui.dialog.overlay.maxZ)return false})},1);a(document).bind("keydown.dialog-overlay",function(i){if(e.options.closeOnEscape&&!i.isDefaultPrevented()&&i.keyCode&&i.keyCode===a.ui.keyCode.ESCAPE){e.close(i);i.preventDefault()}});a(window).bind("resize.dialog-overlay",a.ui.dialog.overlay.resize)}var f=(this.oldInstances.pop()||a("<div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),
height:this.height()});a.fn.bgiframe&&f.bgiframe();this.instances.push(f);return f},destroy:function(e){var f=a.inArray(e,this.instances);f!==-1&&this.oldInstances.push(this.instances.splice(f,1)[0]);this.instances.length===0&&a([document,window]).unbind(".dialog-overlay");e.height(0).width(0).remove();var i=0;a.each(this.instances,function(){i=Math.max(i,this.css("z-index"))});this.maxZ=i},height:function(){var e,f;if(a.browser.msie){e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);
f=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return e<f?a(window).height()+"px":e+"px"}else return a(document).height()+"px"},width:function(){var e,f;if(a.browser.msie){e=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);f=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return e<f?a(window).width()+"px":e+"px"}else return a(document).width()+"px"},resize:function(){var e=a([]);a.each(a.ui.dialog.overlay.instances,function(){e=
e.add(this)});e.css({width:0,height:0}).css({width:a.ui.dialog.overlay.width(),height:a.ui.dialog.overlay.height()})}});a.extend(a.ui.dialog.overlay.prototype,{destroy:function(){a.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
(function(a){var g=0;a.widget("ui.menu",{version:"1.9pre",defaultElement:"<ul>",delay:150,options:{items:"ul",position:{my:"left top",at:"right top"}},_create:function(){this.activeMenu=this.element;this.isScrolling=false;this.menuId=this.element.attr("id")||"ui-menu-"+g++;this.element.find(".ui-icon").length&&this.element.addClass("ui-menu-icons");this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({id:this.menuId,role:"menu"}).bind("click.menu",a.proxy(function(d){this.options.disabled&&
d.preventDefault()},this));this._bind({"click .ui-menu-item:has(a)":function(d){d.stopImmediatePropagation();var c=a(d.currentTarget);if(!this.active||this.active[0]!==c[0])this.focus(d,c);this.select(d)},"mouseover .ui-menu-item":function(d){d.stopImmediatePropagation();if(!this.isScrolling){var c=a(d.currentTarget);c.siblings().children(".ui-state-active").removeClass("ui-state-active");this.focus(d,c)}this.isScrolling=false},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll","mouseout .ui-menu-item":"blur",
focus:function(d){this.focus(d,a(d.target).children(".ui-menu-item:first"))},blur:function(d){this._delay(function(){a.contains(this.element[0],document.activeElement)||this.collapseAll(d)},0)},scroll:function(){this.isScrolling=true}});this.refresh();this.element.attr("tabIndex",0);this._bind({keydown:function(d){switch(d.keyCode){case a.ui.keyCode.PAGE_UP:this.previousPage(d);d.preventDefault();d.stopImmediatePropagation();break;case a.ui.keyCode.PAGE_DOWN:this.nextPage(d);d.preventDefault();d.stopImmediatePropagation();
break;case a.ui.keyCode.HOME:this._move("first","first",d);d.preventDefault();d.stopImmediatePropagation();break;case a.ui.keyCode.END:this._move("last","last",d);d.preventDefault();d.stopImmediatePropagation();break;case a.ui.keyCode.UP:this.previous(d);d.preventDefault();d.stopImmediatePropagation();break;case a.ui.keyCode.DOWN:this.next(d);d.preventDefault();d.stopImmediatePropagation();break;case a.ui.keyCode.LEFT:this.collapse(d)&&d.stopImmediatePropagation();d.preventDefault();break;case a.ui.keyCode.RIGHT:this.expand(d)&&
d.stopImmediatePropagation();d.preventDefault();break;case a.ui.keyCode.ENTER:if(this.active.children("a[aria-haspopup='true']").length)this.expand(d)&&d.stopImmediatePropagation();else{this.select(d);d.stopImmediatePropagation()}d.preventDefault();break;case a.ui.keyCode.ESCAPE:this.collapse(d)&&d.stopImmediatePropagation();d.preventDefault();break;default:d.stopPropagation();clearTimeout(this.filterTimer);var c;c=this.previousFilter||"";var e=String.fromCharCode(d.keyCode),f=false;if(e==c)f=true;
else e=c+e;var i=function(b){return b.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")};c=this.activeMenu.children(".ui-menu-item").filter(function(){return RegExp("^"+i(e),"i").test(a(this).children("a").text())});c=f&&c.index(this.active.next())!=-1?this.active.nextAll(".ui-menu-item"):c;if(!c.length){e=String.fromCharCode(d.keyCode);c=this.activeMenu.children(".ui-menu-item").filter(function(){return RegExp("^"+i(e),"i").test(a(this).children("a").text())})}if(c.length){this.focus(d,c);if(c.length>1){this.previousFilter=
e;this.filterTimer=this._delay(function(){delete this.previousFilter},1E3)}else delete this.previousFilter}else delete this.previousFilter}}});this._bind(document,{click:function(d){a(d.target).closest(".ui-menu").length||this.collapseAll(d)}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").andSelf().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").show();
this.element.find(".ui-menu-item").unbind(".menu").removeClass("ui-menu-item").removeAttr("role").children("a").removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").removeAttr("id").children(".ui-icon").remove()},refresh:function(){var d=this.element.find(this.options.items+":not( .ui-menu )").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr("role","menu").hide().attr("aria-hidden","true").attr("aria-expanded","false"),
c=this.menuId;d.add(this.element).children(":not( .ui-menu-item ):has( a )").addClass("ui-menu-item").attr("role","presentation").children("a").addClass("ui-corner-all").attr("tabIndex",-1).attr("role","menuitem").attr("id",function(e){return c+"-"+e});d.each(function(){var e=a(this),f=e.prev("a");f.attr("aria-haspopup","true").prepend('<span class="ui-menu-icon ui-icon ui-icon-carat-1-e"></span>');e.attr("aria-labelledby",f.attr("id"))})},focus:function(d,c){this.blur(d);if(this._hasScroll()){var e=
parseFloat(a.curCSS(this.activeMenu[0],"borderTopWidth",true))||0,f=parseFloat(a.curCSS(this.activeMenu[0],"paddingTop",true))||0;e=c.offset().top-this.activeMenu.offset().top-e-f;f=this.activeMenu.scrollTop();var i=this.activeMenu.height(),b=c.height();if(e<0)this.activeMenu.scrollTop(f+e);else e+b>i&&this.activeMenu.scrollTop(f+e-i+b)}this.active=c.first().children("a").addClass("ui-state-focus").end();this.element.attr("aria-activedescendant",this.active.children("a").attr("id"));this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active");
this.timer=this._delay(function(){this._close()},this.delay);e=a("> .ui-menu",c);e.length&&/^mouse/.test(d.type)&&this._startOpening(e);this.activeMenu=c.parent();this._trigger("focus",d,{item:c})},blur:function(d){if(this.active){clearTimeout(this.timer);this.active.children("a").removeClass("ui-state-focus");this.active=null;this._trigger("blur",d,{item:this.active})}},_startOpening:function(d){clearTimeout(this.timer);if(d.attr("aria-hidden")==="true")this.timer=this._delay(function(){this._close();
this._open(d)},this.delay)},_open:function(d){clearTimeout(this.timer);this.element.find(".ui-menu").not(d.parents()).hide().attr("aria-hidden","true");var c=a.extend({},{of:this.active},a.type(this.options.position)=="function"?this.options.position(this.active):this.options.position);d.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(c)},collapseAll:function(d,c){var e=c?this.element:a(d&&d.target).closest(this.element.find(".ui-menu"));if(!e.length)e=this.element;this._close(e);
this.blur(d);this.activeMenu=e},_close:function(d){d||(d=this.active?this.active.parent():this.element);d.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(d){var c=this.active&&this.active.parent().closest(".ui-menu-item",this.element);if(c&&c.length){this._close();this.focus(d,c);return true}},expand:function(d){var c=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();
if(c&&c.length){this._open(c.parent());this._delay(function(){this.focus(d,c)},20);return true}},next:function(d){this._move("next","first",d)},previous:function(d){this._move("prev","last",d)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(d,c,e){if(this.active){d=d==="first"||d==="last"?this.active[d==="first"?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[d+
"All"](".ui-menu-item").eq(0);d.length?this.focus(e,d):this.focus(e,this.activeMenu.children(".ui-menu-item")[c]())}else this.focus(e,this.activeMenu.children(".ui-menu-item")[c]())},nextPage:function(d){if(this._hasScroll())if(this.active){if(!this.last()){var c=this.active.offset().top,e=this.element.height(),f;this.active.nextAll(".ui-menu-item").each(function(){f=a(this);return a(this).offset().top-c-e<0});this.focus(d,f)}}else this.focus(d,this.activeMenu.children(".ui-menu-item").first());else this.focus(d,
this.activeMenu.children(".ui-menu-item")[!this.active?"first":"last"]())},previousPage:function(d){if(this._hasScroll())if(this.active){if(!this.first()){var c=this.active.offset().top,e=this.element.height(),f;this.active.prevAll(".ui-menu-item").each(function(){f=a(this);return a(this).offset().top-c+e>0});this.focus(d,f)}}else this.focus(d,this.activeMenu.children(".ui-menu-item").first());else this.focus(d,this.activeMenu.children(".ui-menu-item").first())},_hasScroll:function(){return this.element.height()<
this.element.prop("scrollHeight")},select:function(d){var c={item:this.active};this.collapseAll(d,true);this._trigger("select",d,c)}})})(jQuery);
(function(a){a.widget("ui.menubar",{version:"1.9pre",options:{autoExpand:false,buttons:false,menuIcon:false,position:{my:"left top",at:"left bottom"}},_create:function(){var g=this,d=this.items=this.element.children("li").addClass("ui-menubar-item").attr("role","presentation").children("button, a");d.slice(1).attr("tabIndex",-1);this.element.addClass("ui-menubar ui-widget-header ui-helper-clearfix").attr("role","menubar");this._focusable(d);this._hoverable(d);d.next("ul").menu({position:{within:this.options.position.within},
select:function(c,e){e.item.parents("ul.ui-menu:last").hide();g._close();a(c.target).prev().focus();g._trigger("select",c,e)}}).hide().attr({"aria-hidden":"true","aria-expanded":"false"}).bind("keydown.menubar",function(c){if(!a(this).is(":hidden"))switch(c.keyCode){case a.ui.keyCode.LEFT:g._left(c);c.preventDefault();break;case a.ui.keyCode.RIGHT:g._right(c);c.preventDefault()}});d.each(function(){var c=a(this),e=c.next("ul");c.bind("click.menubar focus.menubar mouseenter.menubar",function(f){if(!(f.type==
"focus"&&!f.originalEvent)){f.preventDefault();if(f.type=="click"&&e.is(":visible")&&g.active&&g.active[0]==e[0])g._close();else if(g.open&&f.type=="mouseenter"||f.type=="click"||g.options.autoExpand){g.options.autoExpand&&clearTimeout(g.closeTimer);g._open(f,e)}}}).bind("keydown",function(f){switch(f.keyCode){case a.ui.keyCode.SPACE:case a.ui.keyCode.UP:case a.ui.keyCode.DOWN:g._open(f,a(this).next());f.preventDefault();break;case a.ui.keyCode.LEFT:g._prev(f,a(this));f.preventDefault();break;case a.ui.keyCode.RIGHT:g._next(f,
a(this));f.preventDefault()}}).addClass("ui-button ui-widget ui-button-text-only ui-menubar-link").attr("role","menuitem").attr("aria-haspopup","true").wrapInner("<span class='ui-button-text'></span>");if(g.options.menuIcon){c.addClass("ui-state-default").append("<span class='ui-button-icon-secondary ui-icon ui-icon-triangle-1-s'></span>");c.removeClass("ui-button-text-only").addClass("ui-button-text-icon-secondary")}g.options.buttons||c.addClass("ui-menubar-link").removeClass("ui-state-default")});
g._bind({keydown:function(c){if(c.keyCode==a.ui.keyCode.ESCAPE&&g.active&&g.active.menu("collapse",c)!==true){var e=g.active;g.active.blur();g._close(c);e.prev().focus()}},focusin:function(){clearTimeout(g.closeTimer)},focusout:function(c){g.closeTimer=setTimeout(function(){g._close(c)},150)},"mouseleave .ui-menubar-item":function(c){if(g.options.autoExpand)g.closeTimer=setTimeout(function(){g._close(c)},150)},"mouseenter .ui-menubar-item":function(){clearTimeout(g.closeTimer)}})},_destroy:function(){var g=
this.element.children("li").removeClass("ui-menubar-item").removeAttr("role").children("button, a");this.element.removeClass("ui-menubar ui-widget-header ui-helper-clearfix").removeAttr("role").unbind(".menubar");g.unbind(".menubar").removeClass("ui-button ui-widget ui-button-text-only ui-menubar-link ui-state-default").removeAttr("role").removeAttr("aria-haspopup").children("span.ui-button-text").each(function(){var d=a(this);d.parent().html(d.html())}).end().children(".ui-icon").remove();this.element.find(":ui-menu").menu("destroy").show().removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("tabindex").unbind(".menubar")},
_close:function(){if(this.active&&this.active.length){this.active.menu("collapseAll").hide().attr({"aria-hidden":"true","aria-expanded":"false"});this.active.prev().removeClass("ui-state-active").removeAttr("tabIndex");this.active=null;this.open=false}},_open:function(g,d){if(!(this.active&&this.active[0]==d[0])){if(this.active){this.active.menu("collapseAll").hide().attr({"aria-hidden":"true","aria-expanded":"false"});this.active.prev().removeClass("ui-state-active")}var c=d.prev().addClass("ui-state-active").attr("tabIndex",
-1);this.active=d.show().position(a.extend({of:c},this.options.position)).removeAttr("aria-hidden").attr("aria-expanded","true").menu("focus",g,d.children("li").first()).focus().focusin();this.open=true}},_prev:function(g,d){d.attr("tabIndex",-1);var c=d.parent().prevAll("li").children(".ui-button").eq(0);c.length?c.removeAttr("tabIndex")[0].focus():this.element.children("li:last").children(".ui-button:last").removeAttr("tabIndex")[0].focus()},_next:function(g,d){d.attr("tabIndex",-1);var c=d.parent().nextAll("li").children(".ui-button").eq(0);
c.length?c.removeAttr("tabIndex")[0].focus():this.element.children("li:first").children(".ui-button:first").removeAttr("tabIndex")[0].focus()},_left:function(g){var d=this.active.parent().prevAll("li:eq(0)").children(".ui-menu").eq(0);d.length||(d=this.element.children("li:last").children(".ui-menu:first"));this._open(g,d)},_right:function(g){var d=this.active.parent().nextAll("li:eq(0)").children(".ui-menu").eq(0);d.length||(d=this.element.children("li:first").children(".ui-menu:first"));this._open(g,
d)}})})(jQuery);
(function(a){var g=0;a.widget("ui.popup",{version:"1.9pre",options:{position:{my:"left top",at:"left bottom"},show:{effect:"slideDown",duration:"fast"},hide:{effect:"fadeOut",duration:"fast"}},_create:function(){if(!this.options.trigger)this.options.trigger=this.element.prev();if(!this.element.attr("id")){this.element.attr("id","ui-popup-"+g++);this.generatedId=true}if(!this.element.attr("role")){this.element.attr("role","dialog");this.generatedRole=true}this.options.trigger.attr("aria-haspopup","true").attr("aria-owns",
this.element.attr("id"));this.element.addClass("ui-popup");this._beforeClose();this.element.hide();this._bind(this.options.trigger,{keydown:function(d){a.ui.button&&this.options.trigger.is("a:ui-button")&&d.keyCode==a.ui.keyCode.SPACE&&d.preventDefault();d.keyCode==a.ui.keyCode.SPACE&&this.options.trigger.is("a:not(:ui-button)")&&this.options.trigger.trigger("click",d);if(d.keyCode==a.ui.keyCode.DOWN){d.preventDefault();this.options.trigger.trigger("click",d)}},click:function(d){d.preventDefault();
if(!this.isOpen){clearTimeout(this.closeTimer);this._delay(function(){this.open(d)},1)}}});if(!a.ui.menu||!this.element.is(":ui-menu"))this._bind({keydown:function(d){if(d.keyCode===a.ui.keyCode.TAB){var c=a(":tabbable",this.element),e=c.first();c=c.last();if(d.target===c[0]&&!d.shiftKey){e.focus(1);d.preventDefault()}else if(d.target===e[0]&&d.shiftKey){c.focus(1);d.preventDefault()}}}});this._bind({keyup:function(d){if(d.keyCode==a.ui.keyCode.ESCAPE&&this.element.is(":visible")){this.close(d);this.options.trigger.focus()}}});
this._bind(document,{click:function(d){this.isOpen&&!a(d.target).closest(".ui-popup").length&&this.close(d)}})},_destroy:function(){this.element.show().removeClass("ui-popup").removeAttr("aria-hidden").removeAttr("aria-expanded").unbind("keypress.ui-popup");this.options.trigger.removeAttr("aria-haspopup").removeAttr("aria-owns");this.generatedId&&this.element.removeAttr("id");this.generatedRole&&this.element.removeAttr("role")},open:function(d){var c=a.extend({},{of:this.options.trigger},this.options.position);
this._show(this.element,this.options.show);this.element.attr("aria-hidden","false").attr("aria-expanded","true").position(c);if(a.ui.menu&&this.element.is(":ui-menu")){this.element.menu("focus",d,this.element.children("li").first());this.element.focus()}else{c=this.element.find(":tabbable");this.removeTabIndex=false;if(!c.length){if(!this.element.is(":tabbable")){this.element.attr("tabindex","0");this.removeTabIndex=true}c=c.add(this.element[0])}c.first().focus(1)}this.options.trigger.attr("tabindex",
-1);this.isOpen=true;this._trigger("open",d)},close:function(d){this._beforeClose();this._hide(this.element,this.options.hide);this.options.trigger.attr("tabindex",0);this.removeTabIndex&&this.element.removeAttr("tabindex");this.isOpen=false;this._trigger("close",d)},_beforeClose:function(){this.element.attr("aria-hidden","true").attr("aria-expanded","false")}})})(jQuery);
(function(a,g){a.ui=a.ui||{};var d=/left|center|right/,c=/top|center|bottom/,e=/[+-]\d+%?/,f=/^\w+/,i=/%$/,b=a.fn.position;a.position={scrollbarWidth:function(){var h,k,l=a("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>");k=l.children()[0];a("body").append(l);h=k.offsetWidth;l.css("overflow","scroll");k=k.offsetWidth;if(h===k)k=l[0].clientWidth;l.remove();return h-k},getScrollInfo:function(h){var k=h[0]!==window,l=k?h.css("overflow-x"):
"";k=k?h.css("overflow-y"):"";l=l==="auto"||l==="scroll"?a.position.scrollbarWidth():0;k=k==="auto"||k==="scroll"?a.position.scrollbarWidth():0;return{height:h.height()<h[0].scrollHeight?k:0,width:h.width()<h[0].scrollWidth?l:0}}};a.fn.position=function(h){if(!h||!h.of)return b.apply(this,arguments);h=a.extend({},h);var k=a(h.of),l=a(h.within||window),j=k[0],m=(h.collision||"flip").split(" "),n={},o,p,q,u;if(j.nodeType===9){p=k.width();q=k.height();u={top:0,left:0}}else if(a.isWindow(j)){p=k.width();
q=k.height();u={top:k.scrollTop(),left:k.scrollLeft()}}else if(j.preventDefault){h.at="left top";p=q=0;u={top:h.of.pageY,left:h.of.pageX}}else{p=k.outerWidth();q=k.outerHeight();u=k.offset()}a.each(["my","at"],function(){var s=(h[this]||"").split(" "),r,t;if(s.length===1)s=d.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"];s[0]=d.test(s[0])?s[0]:"center";s[1]=c.test(s[1])?s[1]:"center";r=e.exec(s[0]);t=e.exec(s[1]);n[this]=[r?r[0]:0,t?t[0]:0];h[this]=[f.exec(s[0])[0],
f.exec(s[1])[0]]});if(m.length===1)m[1]=m[0];if(h.at[0]==="right")u.left+=p;else if(h.at[0]==="center")u.left+=p/2;if(h.at[1]==="bottom")u.top+=q;else if(h.at[1]==="center")u.top+=q/2;o=[parseInt(n.at[0],10)*(i.test(n.at[0])?p/100:1),parseInt(n.at[1],10)*(i.test(n.at[1])?q/100:1)];u.left+=o[0];u.top+=o[1];return this.each(function(){var s=a(this),r=s.outerWidth(),t=s.outerHeight(),v=parseInt(a.curCSS(this,"marginLeft",true))||0,w=parseInt(a.curCSS(this,"marginTop",true))||0,x=a.position.getScrollInfo(l),
C=r+v+(parseInt(a.curCSS(this,"marginRight",true))||0)+x.width,A=t+w+(parseInt(a.curCSS(this,"marginBottom",true))||0)+x.height,y=a.extend({},u),D=[parseInt(n.my[0],10)*(i.test(n.my[0])?s.outerWidth()/100:1),parseInt(n.my[1],10)*(i.test(n.my[1])?s.outerHeight()/100:1)],J;if(h.my[0]==="right")y.left-=r;else if(h.my[0]==="center")y.left-=r/2;if(h.my[1]==="bottom")y.top-=t;else if(h.my[1]==="center")y.top-=t/2;y.left+=D[0];y.top+=D[1];J={marginLeft:v,marginTop:w};a.each(["left","top"],function(I,H){if(a.ui.position[m[I]])a.ui.position[m[I]][H](y,
{targetWidth:p,targetHeight:q,elemWidth:r,elemHeight:t,collisionPosition:J,collisionWidth:C,collisionHeight:A,offset:[o[0]+D[0],o[1]+D[1]],my:h.my,at:h.at,within:l,elem:s})});a.fn.bgiframe&&s.bgiframe();s.offset(a.extend(y,{using:h.using}))})};a.ui.position={fit:{left:function(h,k){var l=k.within,j=a(window),m=a.isWindow(k.within[0]),n=m?j.scrollLeft():l.offset().left;j=m?j.width():l.outerWidth();m=h.left-k.collisionPosition.marginLeft;l=n-m;var o=m+k.collisionWidth-j-n;if(k.collisionWidth>j)if(l>
0&&o<=0){n=h.left+l+k.collisionWidth-j-n;h.left+=l-n}else h.left=o>0&&l<=0?n:l>o?n+j-k.collisionWidth:n;else if(l>0)h.left+=l;else if(o>0)h.left-=o;else h.left=Math.max(h.left-m,h.left)},top:function(h,k){var l=k.within,j=a(window),m=a.isWindow(k.within[0]),n=m?j.scrollTop():l.offset().top;j=m?j.height():l.outerHeight();m=h.top-k.collisionPosition.marginTop;l=n-m;var o=m+k.collisionHeight-j-n;if(k.collisionHeight>j)if(l>0&&o<=0){n=h.top+l+k.collisionHeight-j-n;h.top+=l-n}else h.top=o>0&&l<=0?n:l>
o?n+j-k.collisionHeight:n;else if(l>0)h.top+=l;else if(o>0)h.top-=o;else h.top=Math.max(h.top-m,h.top)}},flip:{left:function(h,k){if(k.at[0]!=="center"){k.elem.removeClass("ui-flipped-left ui-flipped-right");var l=k.within;a(window);var j=a.isWindow(k.within[0]),m=(j?0:l.offset().left)+l.scrollLeft(),n=j?l.width():l.outerWidth();j=h.left-k.collisionPosition.marginLeft;l=j-m;var o=j+k.collisionWidth-n-m;j=k.my[0]==="left"?-k.elemWidth:k.my[0]==="right"?k.elemWidth:0;var p=k.at[0]==="left"?k.targetWidth:
-k.targetWidth,q=-2*k.offset[0];if(l<0){m=h.left+j+p+q+k.collisionWidth-n-m;if(m<0||m<Math.abs(l)){k.elem.addClass("ui-flipped-right");h.left+=j+p+q}}else if(o>0){m=h.left-k.collisionPosition.marginLeft+j+p+q-m;if(m>0||Math.abs(m)<o){k.elem.addClass("ui-flipped-left");h.left+=j+p+q}}}},top:function(h,k){if(k.at[1]!=="center"){k.elem.removeClass("ui-flipped-top ui-flipped-bottom");var l=k.within;a(window);var j=a.isWindow(k.within[0]),m=(j?0:l.offset().top)+l.scrollTop(),n=j?l.height():l.outerHeight();
j=h.top-k.collisionPosition.marginTop;l=j-m;var o=j+k.collisionHeight-n-m;j=k.my[1]==="top"?-k.elemHeight:k.my[1]==="bottom"?k.elemHeight:0;var p=k.at[1]==="top"?k.targetHeight:-k.targetHeight,q=-2*k.offset[1];if(l<0){m=h.top+j+p+q+k.collisionHeight-n-m;if(h.top+j+p+q>l&&(m<0||m<Math.abs(l))){k.elem.addClass("ui-flipped-bottom");h.top+=j+p+q}}else if(o>0){m=h.top-k.collisionPosition.marginTop+j+p+q-m;if(h.top+j+p+q>o&&(m>0||Math.abs(m)<o)){k.elem.addClass("ui-flipped-top");h.top+=j+p+q}}}}},flipfit:{left:function(){a.ui.position.flip.left.apply(this,
arguments);a.ui.position.fit.left.apply(this,arguments)},top:function(){a.ui.position.flip.top.apply(this,arguments);a.ui.position.fit.top.apply(this,arguments)}}};a.uiBackCompat!==false&&function(h){var k=h.fn.position;h.fn.position=function(l){if(!l||!l.offset)return k.call(this,l);var j=l.offset.split(" "),m=l.at.split(" ");if(j.length===1)j[1]=j[0];if(/^\d/.test(j[0]))j[0]="+"+j[0];if(/^\d/.test(j[1]))j[1]="+"+j[1];if(m.length===1)if(/left|center|right/.test(m[0]))m[1]="center";else{m[1]=m[0];
m[0]="center"}return k.call(this,h.extend(l,{at:m[0]+j[0]+" "+m[1]+j[1],offset:g}))}}(jQuery)})(jQuery);
(function(a,g){a.widget("ui.progressbar",{version:"1.9pre",options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
this.valueDiv.remove()},value:function(d){if(d===g)return this._value();this._setOption("value",d);return this},_setOption:function(d,c){if(d==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}this._super("_setOption",d,c)},_value:function(){var d=this.options.value;if(typeof d!=="number")d=0;return Math.min(this.options.max,Math.max(this.min,d))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var d=
this.value(),c=this._percentage();if(this.oldValue!==d){this.oldValue=d;this._trigger("change")}this.valueDiv.toggle(d>this.min).toggleClass("ui-corner-right",d===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",d)}})})(jQuery);
(function(a){a.widget("ui.slider",a.ui.mouse,{version:"1.9pre",widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var g=this,d=this.options,c=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),e=d.values&&d.values.length||1,f=[];this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+
this.orientation+" ui-widget ui-widget-content ui-corner-all"+(d.disabled?" ui-slider-disabled ui-disabled":""));this.range=a([]);if(d.range){if(d.range===true){if(!d.values)d.values=[this._valueMin(),this._valueMin()];if(d.values.length&&d.values.length!==2)d.values=[d.values[0],d.values[0]]}this.range=a("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(d.range==="min"||d.range==="max"?" ui-slider-range-"+d.range:""))}for(var i=c.length;i<e;i+=1)f.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>");
this.handles=c.add(a(f.join("")).appendTo(g.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(b){b.preventDefault()}).hover(function(){d.disabled||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).focus(function(){if(d.disabled)a(this).blur();else{a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus")}}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(b){a(this).data("index.ui-slider-handle",
b)});this.handles.keydown(function(b){var h=true,k=a(this).data("index.ui-slider-handle"),l,j,m;if(!g.options.disabled){switch(b.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:h=false;if(!g._keySliding){g._keySliding=true;a(this).addClass("ui-state-active");l=g._start(b,k);if(l===false)return}}m=g.options.step;l=g.options.values&&g.options.values.length?
j=g.values(k):j=g.value();switch(b.keyCode){case a.ui.keyCode.HOME:j=g._valueMin();break;case a.ui.keyCode.END:j=g._valueMax();break;case a.ui.keyCode.PAGE_UP:j=g._trimAlignValue(l+(g._valueMax()-g._valueMin())/5);break;case a.ui.keyCode.PAGE_DOWN:j=g._trimAlignValue(l-(g._valueMax()-g._valueMin())/5);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(l===g._valueMax())return;j=g._trimAlignValue(l+m);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(l===g._valueMin())return;j=g._trimAlignValue(l-
m)}g._slide(b,k,j);return h}}).keyup(function(b){var h=a(this).data("index.ui-slider-handle");if(g._keySliding){g._keySliding=false;g._stop(b,h);g._change(b,h);a(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();
return this},_mouseCapture:function(g){var d=this.options,c,e,f,i,b;if(d.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:g.pageX,y:g.pageY});e=this._valueMax()-this._valueMin()+1;i=this;this.handles.each(function(h){var k=Math.abs(c-i.values(h));if(e>k){e=k;f=a(this);b=h}});if(d.range===true&&this.values(1)===d.min){b+=1;f=a(this.handles[b])}if(this._start(g,b)===false)return false;
this._mouseSliding=true;i._handleIndex=b;f.addClass("ui-state-active").focus();d=f.offset();this._clickOffset=!a(g.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:g.pageX-d.left-f.width()/2,top:g.pageY-d.top-f.height()/2-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(g,b,c);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(g){var d=
this._normValueFromMouse({x:g.pageX,y:g.pageY});this._slide(g,this._handleIndex,d);return false},_mouseStop:function(g){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(g,this._handleIndex);this._change(g,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(g){var d;if(this.orientation==="horizontal"){d=
this.elementSize.width;g=g.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{d=this.elementSize.height;g=g.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}d=g/d;if(d>1)d=1;if(d<0)d=0;if(this.orientation==="vertical")d=1-d;g=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+d*g)},_start:function(g,d){var c={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(d);
c.values=this.values()}return this._trigger("start",g,c)},_slide:function(g,d,c){var e;if(this.options.values&&this.options.values.length){e=this.values(d?0:1);if(this.options.values.length===2&&this.options.range===true&&(d===0&&c>e||d===1&&c<e))c=e;if(c!==this.values(d)){e=this.values();e[d]=c;g=this._trigger("slide",g,{handle:this.handles[d],value:c,values:e});this.values(d?0:1);g!==false&&this.values(d,c,true)}}else if(c!==this.value()){g=this._trigger("slide",g,{handle:this.handles[d],value:c});
g!==false&&this.value(c)}},_stop:function(g,d){var c={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(d);c.values=this.values()}this._trigger("stop",g,c)},_change:function(g,d){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(d);c.values=this.values()}this._trigger("change",g,c)}},value:function(g){if(arguments.length){this.options.value=
this._trimAlignValue(g);this._refreshValue();this._change(null,0)}else return this._value()},values:function(g,d){var c,e,f;if(arguments.length>1){this.options.values[g]=this._trimAlignValue(d);this._refreshValue();this._change(null,g)}else if(arguments.length)if(a.isArray(arguments[0])){c=this.options.values;e=arguments[0];for(f=0;f<c.length;f+=1){c[f]=this._trimAlignValue(e[f]);this._change(null,f)}this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(g):
this.value();else return this._values()},_setOption:function(g,d){var c,e=0;if(a.isArray(this.options.values))e=this.options.values.length;a.Widget.prototype._setOption.apply(this,arguments);switch(g){case "disabled":if(d){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.prop("disabled",true);this.element.addClass("ui-disabled")}else{this.handles.prop("disabled",false);this.element.removeClass("ui-disabled")}break;case "orientation":this._detectOrientation();
this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case "value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case "values":this._animateOff=true;this._refreshValue();for(c=0;c<e;c+=1)this._change(null,c);this._animateOff=false}},_value:function(){var g=this.options.value;return g=this._trimAlignValue(g)},_values:function(g){var d,c;if(arguments.length){d=this.options.values[g];
d=this._trimAlignValue(d)}else{d=this.options.values.slice();for(c=0;c<d.length;c+=1)d[c]=this._trimAlignValue(d[c])}return d},_trimAlignValue:function(g){if(g<=this._valueMin())return this._valueMin();if(g>=this._valueMax())return this._valueMax();var d=this.options.step>0?this.options.step:1,c=(g-this._valueMin())%d;g-=c;if(Math.abs(c)*2>=d)g+=c>0?d:-d;return parseFloat(g.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var g=
this.options.range,d=this.options,c=this,e=!this._animateOff?d.animate:false,f,i={},b,h,k,l;if(this.options.values&&this.options.values.length)this.handles.each(function(j){f=(c.values(j)-c._valueMin())/(c._valueMax()-c._valueMin())*100;i[c.orientation==="horizontal"?"left":"bottom"]=f+"%";a(this).stop(1,1)[e?"animate":"css"](i,d.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(j===0)c.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},d.animate);if(j===1)c.range[e?"animate":"css"]({width:f-
b+"%"},{queue:false,duration:d.animate})}else{if(j===0)c.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},d.animate);if(j===1)c.range[e?"animate":"css"]({height:f-b+"%"},{queue:false,duration:d.animate})}b=f});else{h=this.value();k=this._valueMin();l=this._valueMax();f=l!==k?(h-k)/(l-k)*100:0;i[c.orientation==="horizontal"?"left":"bottom"]=f+"%";this.handle.stop(1,1)[e?"animate":"css"](i,d.animate);if(g==="min"&&this.orientation==="horizontal")this.range.stop(1,1)[e?"animate":"css"]({width:f+"%"},
d.animate);if(g==="max"&&this.orientation==="horizontal")this.range[e?"animate":"css"]({width:100-f+"%"},{queue:false,duration:d.animate});if(g==="min"&&this.orientation==="vertical")this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},d.animate);if(g==="max"&&this.orientation==="vertical")this.range[e?"animate":"css"]({height:100-f+"%"},{queue:false,duration:d.animate})}}})})(jQuery);
(function(a){function g(d){return function(){var c=this.element.val();d.apply(this,arguments);this._refresh();c!==this.element.val()&&this._trigger("change")}}a.widget("ui.spinner",{version:"1.9pre",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,incremental:true,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._value(this.element.val(),true);this._draw();this._bind(this._events);this._refresh()},_getCreateOptions:function(){var d=
{},c=this.element;a.each(["min","max","step"],function(e,f){var i=c.attr(f);if(i!==undefined&&i.length)d[f]=i});return d},_events:{keydown:function(d){this._start(d)&&this._keydown(d)&&d.preventDefault()},keyup:"_stop",focus:function(){this.uiSpinner.addClass("ui-state-active");this.previous=this.element.val()},blur:function(d){this._refresh();this.uiSpinner.removeClass("ui-state-active");this.previous!==this.element.val()&&this._trigger("change",d)},mousewheel:function(d,c){if(c){if(!this.spinning&&
!this._start(d))return false;this._spin((c>0?1:-1)*this.options.step,d);clearTimeout(this.mousewheelTimer);this.mousewheelTimer=setTimeout(function(){this.spinning&&this._stop(d)},100);d.preventDefault()}},"mousedown .ui-spinner-button":function(d){d.preventDefault();document.activeElement!==this.element[0]&&this.element.focus();if(this._start(d)!==false)this._repeat(null,a(d.currentTarget).hasClass("ui-spinner-up")?1:-1,d)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(d){if(a(d.currentTarget).hasClass("ui-state-active")){if(this._start(d)===
false)return false;this._repeat(null,a(d.currentTarget).hasClass("ui-spinner-up")?1:-1,d)}},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var d=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this._hoverable(d);this.element.attr("role","spinbutton");this.buttons=d.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all");this.buttons.height()===d.height()&&d.height()>
0&&d.height(d.height());this.options.disabled&&this.disable()},_keydown:function(d){var c=this.options,e=a.ui.keyCode;switch(d.keyCode){case e.UP:this._repeat(null,1,d);return true;case e.DOWN:this._repeat(null,-1,d);return true;case e.PAGE_UP:this._repeat(null,c.page,d);return true;case e.PAGE_DOWN:this._repeat(null,-c.page,d);return true}return false},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-state-default ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon ui-icon-triangle-1-n'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon ui-icon-triangle-1-s'>&#9660;</span></a>"},
_start:function(d){if(!this.spinning&&this._trigger("start",d)===false)return false;if(!this.counter)this.counter=1;return this.spinning=true},_repeat:function(d,c,e){d=d||500;clearTimeout(this.timer);this.timer=this._delay(function(){this._repeat(40,c,e)},d);this._spin(c*this.options.step,e)},_spin:function(d,c){var e=this.value()||0;if(!this.counter)this.counter=1;e=this._adjustValue(e+d*this._increment(this.counter));if(!this.spinning||this._trigger("spin",c,{value:e})!==false){this._value(e);
this.counter++}},_increment:function(d){var c=this.options.incremental;if(c)return a.isFunction(c)?c(d):Math.floor(d*d*d/5E4-d*d/500+17*d/200+1);return 1},_precision:function(){var d=this._precisionOf(this.options.step);if(this.options.min!==null)d=Math.max(d,this._precisionOf(this.options.min));return d},_precisionOf:function(d){d=d.toString();var c=d.indexOf(".");return c===-1?0:d.length-c-1},_adjustValue:function(d){var c,e=this.options;c=e.min!==null?e.min:0;d=Math.round((d-c)/e.step)*e.step;
d=parseFloat((c+d).toFixed(this._precision()));if(e.max!==null&&d>e.max)return e.max;if(e.min!==null&&d<e.min)return e.min;return d},_stop:function(d){if(this.spinning){clearTimeout(this.timer);clearTimeout(this.mousewheelTimer);this.counter=0;this.spinning=false;this._trigger("stop",d)}},_setOption:function(d,c){this._super("_setOption",d,c);if(d==="disabled")if(c){this.element.prop("disabled",true);this.buttons.button("disable")}else{this.element.prop("disabled",false);this.buttons.button("enable")}},
_setOptions:g(function(d){this._super("_setOptions",d);this._value(this.element.val())}),_parse:function(d){if(typeof d==="string"&&d!=="")d=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(d,10,this.options.culture):+d;return d===""||isNaN(d)?null:d},_format:function(d){if(d==="")return"";return window.Globalize&&this.options.numberFormat?Globalize.format(d,this.options.numberFormat,this.options.culture):d},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,
"aria-valuenow":this._parse(this.element.val())})},_value:function(d,c){var e;if(d!==""){e=this._parse(d);if(e!==null){c||(e=this._adjustValue(e));d=this._format(e)}}this.element.val(d);this._refresh()},destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",false).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this._super("destroy");this.uiSpinner.replaceWith(this.element)},stepUp:g(function(d){this._stepUp(d)}),
_stepUp:function(d){this._spin((d||1)*this.options.step)},stepDown:g(function(d){this._stepDown(d)}),_stepDown:function(d){this._spin((d||1)*-this.options.step)},pageUp:g(function(d){this._stepUp((d||1)*this.options.page)}),pageDown:g(function(d){this._stepDown((d||1)*this.options.page)}),value:function(d){if(!arguments.length)return this._parse(this.element.val());g(this._value).call(this,d)},widget:function(){return this.uiSpinner}})})(jQuery);
(function(a,g){var d=0,c=function(){var f=/#.*$/,i=location.href.replace(f,"");return function(b){b=b.cloneNode(false);return b.hash.length>1&&b.href.replace(f,"")===i}}();a.widget("ui.tabs",{version:"1.9pre",options:{active:null,collapsible:false,event:"click",fx:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var f=this,i=f.options,b=i.active;f.running=false;f.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");f._processTabs();if(b===null){location.hash&&
f.anchors.each(function(h,k){if(k.hash===location.hash){b=h;return false}});if(b===null)b=f.lis.filter(".ui-tabs-active").index();if(b===null||b===-1)b=f.lis.length?0:false}if(b!==false){b=this.lis.eq(b).index();if(b===-1)b=i.collapsible?false:0}i.active=b;if(!i.collapsible&&i.active===false&&this.anchors.length)i.active=0;if(a.isArray(i.disabled))i.disabled=a.unique(i.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(h){return f.lis.index(h)}))).sort();this._setupFx(i.fx);this._refresh();
this.panels.hide();this.lis.removeClass("ui-tabs-active ui-state-active");if(i.active!==false&&this.anchors.length){this.active=this._findActive(i.active);f._getPanelForTab(this.active).show();this.lis.eq(i.active).addClass("ui-tabs-active ui-state-active");this.load(i.active)}else this.active=a()},_setOption:function(f,i){if(f=="active")this._activate(i);else if(f==="disabled")this._setupDisabled(i);else{this._super("_setOption",f,i);f==="collapsible"&&!i&&this.options.active===false&&this._activate(0);
f==="event"&&this._setupEvents(i);f==="fx"&&this._setupFx(i)}},_tabId:function(f){return a(f).attr("aria-controls")||"ui-tabs-"+ ++d},_sanitizeSelector:function(f){return f?f.replace(/[!"$%&'()*+,.\/:;<=>?@[\]^`{|}~]/g,"\\$&"):""},refresh:function(){var f=this.options,i=this.list.children(":has(a[href])");f.disabled=a.map(i.filter(".ui-state-disabled"),function(b){return i.index(b)});this._processTabs();this._refresh();this.panels.not(this._getPanelForTab(this.active)).hide();if(f.active===false||
!this.anchors.length){f.active=false;this.active=a()}else if(this.active.length&&!a.contains(this.list[0],this.active[0])){f=f.active-1;this._activate(f>=0?f:0)}else f.active=this.anchors.index(this.active)},_refresh:function(){var f=this.options;this.element.toggleClass("ui-tabs-collapsible",f.collapsible);this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");
this._setupDisabled(f.disabled);this._setupEvents(f.event);this.lis.unbind(".tabs");this._focusable(this.lis);this._hoverable(this.lis)},_processTabs:function(){var f=this;this.list=this.element.find("ol,ul").eq(0);this.lis=a(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);this.anchors.each(function(i,b){var h,k;if(c(b)){h=b.hash;k=f.element.find(f._sanitizeSelector(h))}else{var l=f._tabId(b);h="#"+l;k=f.element.find(h);if(!k.length){k=
f._createPanel(l);k.insertAfter(f.panels[i-1]||f.list)}}if(k.length)f.panels=f.panels.add(k);a(b).attr("aria-controls",h.substring(1))})},_createPanel:function(f){return a("<div></div>").attr("id",f).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("destroy.tabs",true)},_setupDisabled:function(f){if(a.isArray(f))if(f.length){if(f.length===this.anchors.length)f=true}else f=false;for(var i=0,b;b=this.lis[i];i++)a(b).toggleClass("ui-state-disabled",f===true||a.inArray(i,f)!==-1);this.options.disabled=
f},_setupFx:function(f){if(f)if(a.isArray(f)){this.hideFx=f[0];this.showFx=f[1]}else this.hideFx=this.showFx=f},_resetStyle:function(f,i){!a.support.opacity&&i.opacity&&f[0].style.removeAttribute("filter")},_setupEvents:function(f){this.anchors.unbind(".tabs");f&&this.anchors.bind(f.split(" ").join(".tabs ")+".tabs",a.proxy(this,"_eventHandler"));this.anchors.bind("click.tabs",function(i){i.preventDefault()})},_eventHandler:function(f){var i=this.options,b=this.active,h=a(f.currentTarget),k=h[0]===
b[0],l=k&&i.collapsible,j=l?a():this._getPanelForTab(h),m=!b.length?a():this._getPanelForTab(b),n=h.closest("li");b={oldTab:b,oldPanel:m,newTab:l?a():h,newPanel:j};f.preventDefault();if(n.hasClass("ui-state-disabled")||n.hasClass("ui-tabs-loading")||this.running||k&&!i.collapsible||this._trigger("beforeActivate",f,b)===false)h[0].blur();else{i.active=l?false:this.anchors.index(h);this.active=k?a():h;this.xhr&&this.xhr.abort();if(!m.length&&!j.length)throw"jQuery UI Tabs: Mismatching fragment identifier.";
if(j.length){this.load(this.anchors.index(h),f);h[0].blur()}this._toggle(f,b)}},_toggle:function(f,i){function b(){k.running=false;k._trigger("activate",f,i)}function h(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active");if(l.length&&k.showFx)l.animate(k.showFx,k.showFx.duration||"normal",function(){k._resetStyle(a(this),k.showFx);b()});else{l.show();b()}}var k=this,l=i.newPanel,j=i.oldPanel;k.running=true;if(j.length&&k.hideFx)j.animate(k.hideFx,k.hideFx.duration||"normal",function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");
k._resetStyle(a(this),k.hideFx);h()});else{i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");j.hide();h()}},_activate:function(f){f=this._findActive(f)[0];if(f!==this.active[0]){f=f||this.active[0];this._eventHandler({target:f,currentTarget:f,preventDefault:a.noop})}},_findActive:function(f){return typeof f==="number"?this.anchors.eq(f):typeof f==="string"?this.anchors.filter("[href$='"+f+"']"):a()},_getIndex:function(f){if(typeof f=="string")f=this.anchors.index(this.anchors.filter("[href$="+
f+"]"));return f},_destroy:function(){this.xhr&&this.xhr.abort();this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.unbind(".tabs").removeData("href.tabs").removeData("load.tabs");this.lis.unbind(".tabs").add(this.panels).each(function(){a.data(this,"destroy.tabs")?a(this).remove():a(this).removeClass("ui-state-default ui-corner-top ui-tabs-active ui-state-active ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom")});
return this},enable:function(f){var i=this.options.disabled;if(i!==false){if(f===g)i=false;else{f=this._getIndex(f);i=a.isArray(i)?a.map(i,function(b){return b!==f?b:null}):a.map(this.lis,function(b,h){return h!==f?h:null})}this._setupDisabled(i)}},disable:function(f){var i=this.options.disabled;if(i!==true){if(f===g)i=true;else{f=this._getIndex(f);if(a.inArray(f,i)!==-1)return;i=a.isArray(i)?a.merge([f],i).sort():[f]}this._setupDisabled(i)}},load:function(f,i){f=this._getIndex(f);var b=this,h=this.anchors.eq(f),
k=b._getPanelForTab(h),l={tab:h,panel:k};if(!c(h[0])){if(this.xhr=a.ajax({url:h.attr("href"),beforeSend:function(j,m){return b._trigger("beforeLoad",i,a.extend({jqXHR:j,ajaxSettings:m},l))}})){this.lis.eq(f).addClass("ui-tabs-loading");this.xhr.success(function(j){setTimeout(function(){k.html(j);b._trigger("load",i,l)},1)}).complete(function(j,m){setTimeout(function(){m==="abort"&&b.panels.stop(false,true);b.lis.eq(f).removeClass("ui-tabs-loading");j===b.xhr&&delete b.xhr})})}return this}},_getPanelForTab:function(f){return this.element.find(this._sanitizeSelector("#"+
a(f).attr("aria-controls")))}});if(a.uiBackCompat!==false){a.ui.tabs.prototype._ui=function(f,i){return{tab:f,panel:i,index:this.anchors.index(f)}};(function(f,i){i.url=function(b,h){this.anchors.eq(b).attr("href",h)}})(jQuery,jQuery.ui.tabs.prototype);(function(f,i){f.extend(i.options,{ajaxOptions:null,cache:false});var b=i._create,h=i._setOption,k=i._destroy,l=i.url||f.noop;f.extend(i,{_create:function(){b.call(this);var j=this;this.element.bind("tabsbeforeload.tabs",function(m,n){if(f.data(n.tab[0],
"cache.tabs"))m.preventDefault();else{f.extend(n.ajaxSettings,j.options.ajaxOptions,{error:function(o,p){try{j.options.ajaxOptions.error(o,p,n.tab.closest("li").index(),n.tab[0])}catch(q){}}});n.jqXHR.success(function(){j.options.cache&&f.data(n.tab[0],"cache.tabs",true)})}})},_setOption:function(j,m){j==="cache"&&m===false&&this.anchors.removeData("cache.tabs");h.apply(this,arguments)},_destroy:function(){this.anchors.removeData("cache.tabs");k.call(this)},url:function(j){this.anchors.eq(j).removeData("cache.tabs");
l.apply(this,arguments)}})})(jQuery,jQuery.ui.tabs.prototype);(function(f,i){i.abort=function(){this.xhr&&this.xhr.abort()}})(jQuery,jQuery.ui.tabs.prototype);a.widget("ui.tabs",a.ui.tabs,{options:{spinner:"<em>Loading&#8230;</em>"},_create:function(){this._super("_create");this._bind({tabsbeforeload:function(f,i){if(this.options.spinner){var b=i.tab.find("span"),h=b.html();b.html(this.options.spinner);i.jqXHR.complete(function(){b.html(h)})}}})}});(function(f,i){f.extend(i.options,{enable:null,disable:null});
var b=i.enable,h=i.disable;i.enable=function(k){var l=this.options,j;if(k&&l.disabled===true||f.isArray(l.disabled)&&f.inArray(k,l.disabled)!==-1)j=true;b.apply(this,arguments);j&&this._trigger("enable",null,this._ui(this.anchors[k],this.panels[k]))};i.disable=function(k){var l=this.options,j;if(k&&l.disabled===false||f.isArray(l.disabled)&&f.inArray(k,l.disabled)===-1)j=true;h.apply(this,arguments);j&&this._trigger("disable",null,this._ui(this.anchors[k],this.panels[k]))}})(jQuery,jQuery.ui.tabs.prototype);
(function(f,i){f.extend(i.options,{add:null,remove:null,tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"});i.add=function(b,h,k){if(k===g)k=this.anchors.length;var l=this.options;h=f(l.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,h));b=!b.indexOf("#")?b.replace("#",""):this._tabId(h.find("a")[0]);h.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);h.find("a").attr("aria-controls",b);var j=k>=this.lis.length,m=this.element.find("#"+b);if(!m.length){m=
this._createPanel(b);if(j)k>0?m.insertAfter(this.panels.eq(-1)):m.appendTo(this.element);else m.insertBefore(this.panels[k])}m.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").hide();j?h.appendTo(this.list):h.insertBefore(this.lis[k]);l.disabled=f.map(l.disabled,function(n){return n>=k?++n:n});this.refresh();this.lis.length===1&&l.active===false&&this.option("active",0);this._trigger("add",null,this._ui(this.anchors[k],this.panels[k]));return this};i.remove=function(b){b=this._getIndex(b);
var h=this.options,k=this.lis.eq(b).remove(),l=this._getPanelForTab(k.find("a[aria-controls]")).remove();if(k.hasClass("ui-tabs-active")&&this.anchors.length>2)this._activate(b+(b+1<this.anchors.length?1:-1));h.disabled=f.map(f.grep(h.disabled,function(j){return j!==b}),function(j){return j>=b?--j:j});this.refresh();this._trigger("remove",null,this._ui(k.find("a")[0],l[0]));return this}})(jQuery,jQuery.ui.tabs.prototype);(function(f,i){i.length=function(){return this.anchors.length}})(jQuery,jQuery.ui.tabs.prototype);
(function(f,i){f.extend(i.options,{idPrefix:"ui-tabs-"});i._tabId=function(b){return f(b).attr("aria-controls")||b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+ ++d}})(jQuery,jQuery.ui.tabs.prototype);(function(f,i){f.extend(i.options,{panelTemplate:"<div></div>"});i._createPanel=function(b){return f(this.options.panelTemplate).attr("id",b).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("destroy.tabs",true)}})(jQuery,jQuery.ui.tabs.prototype);
(function(f,i){var b=i._create,h=i._setOption,k=i._eventHandler;i._create=function(){var l=this.options;if(l.active===null&&l.selected!==g)l.active=l.selected===-1?false:l.selected;b.call(this);l.selected=l.active;if(l.selected===false)l.selected=-1};i._setOption=function(l,j){if(l!=="selected")return h.apply(this,arguments);var m=this.options;h.call(this,"active",j===-1?false:j);m.selected=m.active;if(m.selected===false)m.selected=-1};i._eventHandler=function(){k.apply(this,arguments);this.options.selected=
this.options.active;if(this.options.selected===false)this.options.selected=-1}})(jQuery,jQuery.ui.tabs.prototype);(function(f,i){f.extend(i.options,{show:null,select:null});var b=i._create,h=i._trigger;i._create=function(){b.call(this);this.options.active!==false&&this._trigger("show",null,this._ui(this.active[0],this._getPanelForTab(this.active)[0]))};i._trigger=function(k,l,j){if(!h.apply(this,arguments))return false;if(k==="beforeActivate"&&j.newTab.length)h.call(this,"select",l,{tab:j.newTab[0],
panel:j.newPanel[0],index:j.newTab.closest("li").index()});else k==="activate"&&j.newTab.length&&h.call(this,"show",l,{tab:j.newTab[0],panel:j.newPanel[0],index:j.newTab.closest("li").index()})}})(jQuery,jQuery.ui.tabs.prototype);(function(f,i){i.select=function(b){b=this._getIndex(b);if(b===-1)if(this.options.collapsible&&this.options.selected!==-1)b=this.options.selected;else return;this.anchors.eq(b).trigger(this.options.event+".tabs")}})(jQuery,jQuery.ui.tabs.prototype);var e=0;a.widget("ui.tabs",
a.ui.tabs,{options:{cookie:null},_create:function(){var f=this.options,i;if(f.active==null&&f.cookie){i=parseInt(this._cookie(),10);if(i===-1)i=false;f.active=i}this._super("_create")},_cookie:function(f){var i=[this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+ ++e)];if(arguments.length){i.push(f===false?-1:f);i.push(this.options.cookie)}return a.cookie.apply(null,i)},_refresh:function(){this._super("_refresh");this.options.cookie&&this._cookie(this.options.active,this.options.cookie)},
_eventHandler:function(){this._superApply("_eventHandler",arguments);this.options.cookie&&this._cookie(this.options.active,this.options.cookie)},_destroy:function(){this._super("_destroy");this.options.cookie&&this._cookie(null,this.options.cookie)}});a.widget("ui.tabs",a.ui.tabs,{_trigger:function(f,i,b){b=a.extend({},b);if(f==="load"){b.panel=b.panel[0];b.tab=b.tab[0]}return this._super("_trigger",f,i,b)}})}})(jQuery);
(function(a){var g=0;a.widget("ui.tooltip",{version:"1.9pre",options:{content:function(){return a(this).attr("title")},hide:true,items:"[title]",position:{my:"left+15 center",at:"right center",collision:"flipfit flipfit"},show:true,tooltipClass:null,close:null,open:null},_create:function(){this._bind({mouseover:"open",focusin:"open"});this.tooltips={}},_setOption:function(d,c){if(d==="disabled"){this[c?"_disable":"_enable"]();this.options[d]=c}else this._super("_setOption",d,c)},_disable:function(){var d=
this;a.each(this.tooltips,function(c,e){var f=a.Event("blur");f.target=f.currentTarget=e[0];d.close(f,true)});this.element.find(this.options.items).andSelf().each(function(){var c=a(this);c.is("[title]")&&c.data("tooltip-title",c.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).andSelf().each(function(){var d=a(this);d.data("tooltip-title")&&d.attr("title",d.data("tooltip-title"))})},open:function(d){var c,e=this,f=a(d?d.target:this.element).closest(this.options.items);
if(!(!f.length||f.attr("aria-describedby"))){f.data("tooltip-title")||f.data("tooltip-title",f.attr("title"));(c=this.options.content.call(f[0],function(i){setTimeout(function(){e._open(d,f,i)},1)}))&&e._open(d,f,c)}},_open:function(d,c,e){if(e){c.is("[title]")&&c.attr("title","");var f=this._find(c);if(!f.length){f=this._tooltip(c);c.attr("aria-describedby",f.attr("id"))}f.find(".ui-tooltip-content").html(e);f.stop(true).position(a.extend({of:c},this.options.position)).hide();this._show(f,this.options.show);
this._trigger("open",d,{tooltip:f});this._bind(c,{mouseleave:"close",blur:"close",keyup:function(i){if(i.keyCode==a.ui.keyCode.ESCAPE){i=a.Event(i);i.currentTarget=c[0];this.close(i,true)}}})}},close:function(d,c){var e=this,f=a(d?d.currentTarget:this.element),i=this._find(f);if(!(!c&&document.activeElement===f[0])){f.data("tooltip-title")&&f.attr("title",f.data("tooltip-title"));f.removeAttr("aria-describedby");i.stop(true);this._hide(i,this.options.hide,function(){a(this).remove();delete e.tooltips[this.id]});
f.unbind("mouseleave.tooltip blur.tooltip keyup.tooltip");this._trigger("close",d,{tooltip:i})}},_tooltip:function(d){var c="ui-tooltip-"+g++,e=a("<div>").attr({id:c,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));a("<div>").addClass("ui-tooltip-content").appendTo(e);e.appendTo(document.body);a.fn.bgiframe&&e.bgiframe();this.tooltips[c]=d;return e},_find:function(d){return(d=d.attr("aria-describedby"))?a("#"+d):a()},_destroy:function(){a.each(this.tooltips,
function(d){a("#"+d).remove()})}})})(jQuery);