require(["modernizr-1.6.min.js","jquery-ui-1.8.2.js","placeholder.jquery.js","rails.js"],function(){if(!Modernizr.placeholder){$("textarea").placeholder();$("input[autofocus=true]").focus()}$(".collapsable > ul").addClass("dont_look");$(".collapsable > h6, .collapsable > h5").addClass("right_arrow");$(".collapsable > h6, .collapsable > h5").click(function(){$(this).toggleClass("down_arrow").toggleClass("right_arrow");$(this).parent().children("ul").slideToggle().toggleClass("dont_look")})});
define("main",function(){});
window.Modernizr=function(b,c,d){function f(r,s){return(""+r).indexOf(s)!==-1}function a(r,s){for(var w in r)if(k[r[w]]!==d&&(!s||s(r[w],m)))return true}function e(r,s){var w=r.charAt(0).toUpperCase()+r.substr(1);w=(r+" "+q.join(w+" ")+w).split(" ");return!!a(w,s)}function g(){h.input=function(r){for(var s=0,w=r.length;s<w;s++)x[r[s]]=!!(r[s]in i);return x}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));h.inputtypes=function(r){for(var s=0,w,D=r.length;s<
D;s++){i.setAttribute("type",r[s]);if(w=i.type!=="text"){i.value=l;if(/^range$/.test(i.type)&&i.style.WebkitAppearance!==d){j.appendChild(i);w=c.defaultView;w=w.getComputedStyle&&w.getComputedStyle(i,null).WebkitAppearance!=="textfield"&&i.offsetHeight!==0;j.removeChild(i)}else/^(search|tel)$/.test(i.type)||(w=/^(url|email)$/.test(i.type)?i.checkValidity&&i.checkValidity()===false:i.value!=l)}u[r[s]]=!!w}return u}("search tel url email datetime date month week time datetime-local number range color".split(" "))}
var h={},j=c.documentElement,m=c.createElement("modernizr"),k=m.style,i=c.createElement("input"),l=":)",n=Object.prototype.toString,o=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),q="Webkit Moz O ms Khtml".split(" "),v={svg:"http://www.w3.org/2000/svg"},p={},u={},x={},y=[],E,F=function(r){var s=document.createElement("style"),w=c.createElement("div");s.textContent=r+"{#modernizr{height:3px}}";(c.head||c.getElementsByTagName("head")[0]).appendChild(s);w.id="modernizr";j.appendChild(w);r=w.offsetHeight===
3;s.parentNode.removeChild(s);w.parentNode.removeChild(w);return!!r},z=function(){var r={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return function(s,w){w=w||document.createElement(r[s]||"div");s="on"+s;var D=s in w;if(!D){w.setAttribute||(w=document.createElement("div"));if(w.setAttribute&&w.removeAttribute){w.setAttribute(s,"");D=typeof w[s]=="function";if(typeof w[s]!="undefined")w[s]=d;w.removeAttribute(s)}}return D}}(),G={}.hasOwnProperty,O;O=
typeof G!=="undefined"&&typeof G.call!=="undefined"?function(r,s){return G.call(r,s)}:function(r,s){return s in r&&typeof r.constructor.prototype[s]==="undefined"};p.flexbox=function(){var r=c.createElement("div"),s=c.createElement("div");(function(D,C,B,H){C+=":";D.style.cssText=(C+o.join(B+";"+C)).slice(0,-C.length)+(H||"")})(r,"display","box","width:42px;padding:0;");s.style.cssText=o.join("box-flex:1;")+"width:10px;";r.appendChild(s);j.appendChild(r);var w=s.offsetWidth===42;r.removeChild(s);
j.removeChild(r);return w};p.canvas=function(){var r=c.createElement("canvas");return!!(r.getContext&&r.getContext("2d"))};p.canvastext=function(){return!!(h.canvas&&typeof c.createElement("canvas").getContext("2d").fillText=="function")};p.webgl=function(){var r=c.createElement("canvas");try{if(r.getContext("webgl"))return true}catch(s){}try{if(r.getContext("experimental-webgl"))return true}catch(w){}return false};p.touch=function(){return"ontouchstart"in b||F("@media ("+o.join("touch-enabled),(")+
"modernizr)")};p.geolocation=function(){return!!navigator.geolocation};p.postmessage=function(){return!!b.postMessage};p.websqldatabase=function(){return!!b.openDatabase};p.indexedDB=function(){for(var r=-1,s=q.length;++r<s;){var w=q[r].toLowerCase();if(b[w+"_indexedDB"]||b[w+"IndexedDB"])return true}return false};p.hashchange=function(){return z("hashchange",b)&&(document.documentMode===d||document.documentMode>7)};p.history=function(){return!!(b.history&&history.pushState)};p.draganddrop=function(){return z("drag")&&
z("dragstart")&&z("dragenter")&&z("dragover")&&z("dragleave")&&z("dragend")&&z("drop")};p.websockets=function(){return"WebSocket"in b};p.rgba=function(){k.cssText="background-color:rgba(150,255,150,.5)";return f(k.backgroundColor,"rgba")};p.hsla=function(){k.cssText="background-color:hsla(120,40%,100%,.5)";return f(k.backgroundColor,"rgba")||f(k.backgroundColor,"hsla")};p.multiplebgs=function(){k.cssText="background:url(//:),url(//:),red url(//:)";return/(url\s*\(.*?){3}/.test(k.background)};p.backgroundsize=
function(){return e("backgroundSize")};p.borderimage=function(){return e("borderImage")};p.borderradius=function(){return e("borderRadius","",function(r){return f(r,"orderRadius")})};p.boxshadow=function(){return e("boxShadow")};p.textshadow=function(){return c.createElement("div").style.textShadow===""};p.opacity=function(){var r=o.join("opacity:.5;")+"";k.cssText=r;return f(k.opacity,"0.5")};p.cssanimations=function(){return e("animationName")};p.csscolumns=function(){return e("columnCount")};p.cssgradients=
function(){var r=("background-image:"+o.join("gradient(linear,left top,right bottom,from(#9f9),to(white));background-image:")+o.join("linear-gradient(left top,#9f9, white);background-image:")).slice(0,-17);k.cssText=r;return f(k.backgroundImage,"gradient")};p.cssreflections=function(){return e("boxReflect")};p.csstransforms=function(){return!!a(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])};p.csstransforms3d=function(){var r=!!a(["perspectiveProperty","WebkitPerspective",
"MozPerspective","OPerspective","msPerspective"]);if(r)r=F("@media ("+o.join("transform-3d),(")+"modernizr)");return r};p.csstransitions=function(){return e("transitionProperty")};p.fontface=function(){var r,s=c.head||c.getElementsByTagName("head")[0]||j,w=c.createElement("style"),D=c.implementation||{hasFeature:function(){return false}};w.type="text/css";s.insertBefore(w,s.firstChild);r=w.sheet||w.styleSheet;s=D.hasFeature("CSS2","")?function(C){if(!(r&&C))return false;var B=false;try{r.insertRule(C,
0);B=!/unknown/i.test(r.cssRules[0].cssText);r.deleteRule(r.cssRules.length-1)}catch(H){}return B}:function(C){if(!(r&&C))return false;r.cssText=C;return r.cssText.length!==0&&!/unknown/i.test(r.cssText)&&r.cssText.replace(/\r+|\n+/g,"").indexOf(C.split(" ")[0])===0};h._fontfaceready=function(C){C(h.fontface)};return s('@font-face { font-family: "font"; src: "font.ttf"; }')};p.video=function(){var r=c.createElement("video"),s=!!r.canPlayType;if(s){s=new Boolean(s);s.ogg=r.canPlayType('video/ogg; codecs="theora"');
s.h264=r.canPlayType('video/mp4; codecs="avc1.42E01E"')||r.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');s.webm=r.canPlayType('video/webm; codecs="vp8, vorbis"')}return s};p.audio=function(){var r=c.createElement("audio"),s=!!r.canPlayType;if(s){s=new Boolean(s);s.ogg=r.canPlayType('audio/ogg; codecs="vorbis"');s.mp3=r.canPlayType("audio/mpeg;");s.wav=r.canPlayType('audio/wav; codecs="1"');s.m4a=r.canPlayType("audio/x-m4a;")||r.canPlayType("audio/aac;")}return s};p.localstorage=function(){try{return"localStorage"in
b&&b.localStorage!==null}catch(r){return false}};p.sessionstorage=function(){try{return"sessionStorage"in b&&b.sessionStorage!==null}catch(r){return false}};p.webWorkers=function(){return!!b.Worker};p.applicationcache=function(){return!!b.applicationCache};p.svg=function(){return!!c.createElementNS&&!!c.createElementNS(v.svg,"svg").createSVGRect};p.inlinesvg=function(){var r=document.createElement("div");r.innerHTML="<svg/>";return(r.firstChild&&r.firstChild.namespaceURI)==v.svg};p.smil=function(){return!!c.createElementNS&&
/SVG/.test(n.call(c.createElementNS(v.svg,"animate")))};p.svgclippaths=function(){return!!c.createElementNS&&/SVG/.test(n.call(c.createElementNS(v.svg,"clipPath")))};for(var P in p)if(O(p,P)){E=P.toLowerCase();h[E]=p[P]();y.push((h[E]?"":"no-")+E)}h.input||g();h.crosswindowmessaging=h.postmessage;h.historymanagement=h.history;h.addTest=function(r,s){r=r.toLowerCase();if(!h[r]){s=!!s();j.className+=" "+(s?"":"no-")+r;h[r]=s;return h}};k.cssText="";m=i=null;b.attachEvent&&function(){var r=c.createElement("div");
r.innerHTML="<elem></elem>";return r.childNodes.length!==1}()&&function(r,s){function w(I){for(var K=-1;++K<B;)I.createElement(C[K])}function D(I,K){for(var T=I.length,Q=-1,S,U=[];++Q<T;){S=I[Q];K=S.media||K;U.push(D(S.imports,K));U.push(S.cssText)}return U.join("")}var C="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video".split("|"),B=C.length,H=RegExp("<(/*)(abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video)",
"gi"),L=RegExp("\\b(abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video)\\b(?!.*[;}])","gi"),A=s.createDocumentFragment(),N=s.documentElement,R=N.firstChild,M=s.createElement("style"),J=s.createElement("body");M.media="all";w(s);w(A);r.attachEvent("onbeforeprint",function(){for(var I=-1;++I<B;)for(var K=s.getElementsByTagName(C[I]),T=K.length,Q=-1;++Q<T;)if(K[Q].className.indexOf("iepp_")<0)K[Q].className+=" iepp_"+
C[I];R.insertBefore(M,R.firstChild);M.styleSheet.cssText=D(s.styleSheets,"all").replace(L,".iepp_$1");A.appendChild(s.body);N.appendChild(J);J.innerHTML=A.firstChild.innerHTML.replace(H,"<$1bdo")});r.attachEvent("onafterprint",function(){J.innerHTML="";N.removeChild(J);R.removeChild(M);N.appendChild(A.firstChild)})}(this,document);h._enableHTML5=true;h._version="1.6";j.className=j.className.replace(/\bno-js\b/,"")+" js";j.className+=" "+y.join(" ");return h}(this,this.document);
define("modernizr-1.6.min.js",function(){});
(function(b){b.ui=b.ui||{};if(!b.ui.version){b.extend(b.ui,{version:"1.8.2",plugin:{add:function(c,d,f){c=b.ui[c].prototype;for(var a in f){c.plugins[a]=c.plugins[a]||[];c.plugins[a].push([d,f[a]])}},call:function(c,d,f){if((d=c.plugins[d])&&c.element[0].parentNode)for(var a=0;a<d.length;a++)c.options[d[a][0]]&&d[a][1].apply(c.element,f)}},contains:function(c,d){return document.compareDocumentPosition?c.compareDocumentPosition(d)&16:c!==d&&c.contains(d)},hasScroll:function(c,d){if(b(c).css("overflow")==
"hidden")return false;d=d&&d=="left"?"scrollLeft":"scrollTop";var f=false;if(c[d]>0)return true;c[d]=1;f=c[d]>0;c[d]=0;return f},isOverAxis:function(c,d,f){return c>d&&c<d+f},isOver:function(c,d,f,a,e,g){return b.ui.isOverAxis(c,f,e)&&b.ui.isOverAxis(d,a,g)},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}});b.fn.extend({_focus:b.fn.focus,focus:function(c,d){return typeof c==="number"?this.each(function(){var f=this;setTimeout(function(){b(f).focus();d&&d.call(f)},c)}):this._focus.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect",
"none")},scrollParent:function(){var c;c=b.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(b.curCSS(this,"position",1))&&/(auto|scroll)/.test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",
1))}).eq(0);return/fixed/.test(this.css("position"))||!c.length?b(document):c},zIndex:function(c){if(c!==undefined)return this.css("zIndex",c);if(this.length){c=b(this[0]);for(var d;c.length&&c[0]!==document;){d=c.css("position");if(d=="absolute"||d=="relative"||d=="fixed"){d=parseInt(c.css("zIndex"));if(!isNaN(d)&&d!=0)return d}c=c.parent()}}return 0}});b.extend(b.expr[":"],{data:function(c,d,f){return!!b.data(c,f[3])},focusable:function(c){var d=c.nodeName.toLowerCase(),f=b.attr(c,"tabindex");return(/input|select|textarea|button|object/.test(d)?
!c.disabled:"a"==d||"area"==d?c.href||!isNaN(f):!isNaN(f))&&!b(c)["area"==d?"parents":"closest"](":hidden").length},tabbable:function(c){var d=b.attr(c,"tabindex");return(isNaN(d)||d>=0)&&b(c).is(":focusable")}})}})(jQuery);
(function(b){var c=b.fn.remove;b.fn.remove=function(d,f){return this.each(function(){if(!f)if(!d||b.filter(d,[this]).length)b("*",this).add(this).each(function(){b(this).triggerHandler("remove")});return c.call(b(this),d,f)})};b.widget=function(d,f,a){var e=d.split(".")[0],g;d=d.split(".")[1];g=e+"-"+d;if(!a){a=f;f=b.Widget}b.expr[":"][g]=function(h){return!!b.data(h,d)};b[e]=b[e]||{};b[e][d]=function(h,j){arguments.length&&this._createWidget(h,j)};f=new f;f.options=b.extend({},f.options);b[e][d].prototype=
b.extend(true,f,{namespace:e,widgetName:d,widgetEventPrefix:b[e][d].prototype.widgetEventPrefix||d,widgetBaseClass:g},a);b.widget.bridge(d,b[e][d])};b.widget.bridge=function(d,f){b.fn[d]=function(a){var e=typeof a==="string",g=Array.prototype.slice.call(arguments,1),h=this;a=!e&&g.length?b.extend.apply(null,[true,a].concat(g)):a;if(e&&a.substring(0,1)==="_")return h;e?this.each(function(){var j=b.data(this,d),m=j&&b.isFunction(j[a])?j[a].apply(j,g):j;if(m!==j&&m!==undefined){h=m;return false}}):this.each(function(){var j=
b.data(this,d);if(j){a&&j.option(a);j._init()}else b.data(this,d,new f(a,this))});return h}};b.Widget=function(d,f){arguments.length&&this._createWidget(d,f)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(d,f){this.element=b(f).data(this.widgetName,this);this.options=b.extend(true,{},this.options,b.metadata&&b.metadata.get(f)[this.widgetName],d);var a=this;this.element.bind("remove."+this.widgetName,function(){a.destroy()});this._create();
this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(d,f){var a=d,e=this;if(arguments.length===0)return b.extend({},e.options);if(typeof d==="string"){if(f===undefined)return this.options[d];a={};a[d]=f}b.each(a,function(g,
h){e._setOption(g,h)});return e},_setOption:function(d,f){this.options[d]=f;if(d==="disabled")this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(d,f,a){var e=this.options[d];f=b.Event(f);f.type=(d===this.widgetEventPrefix?d:this.widgetEventPrefix+d).toLowerCase();a=a||{};if(f.originalEvent){d=
b.event.props.length;for(var g;d;){g=b.event.props[--d];f[g]=f.originalEvent[g]}}this.element.trigger(f,a);return!(b.isFunction(e)&&e.call(this.element[0],f,a)===false||f.isDefaultPrevented())}}})(jQuery);
(function(b){b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var c=this;this.element.bind("mousedown."+this.widgetName,function(d){return c._mouseDown(d)}).bind("click."+this.widgetName,function(d){if(c._preventClickEvent){c._preventClickEvent=false;d.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(c){c.originalEvent=c.originalEvent||{};if(!c.originalEvent.mouseHandled){this._mouseStarted&&
this._mouseUp(c);this._mouseDownEvent=c;var d=this,f=c.which==1,a=typeof this.options.cancel=="string"?b(c.target).parents().add(c.target).filter(this.options.cancel).length:false;if(!f||a||!this._mouseCapture(c))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(c)&&this._mouseDelayMet(c)){this._mouseStarted=this._mouseStart(c)!==false;if(!this._mouseStarted){c.preventDefault();
return true}}this._mouseMoveDelegate=function(e){return d._mouseMove(e)};this._mouseUpDelegate=function(e){return d._mouseUp(e)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);b.browser.safari||c.preventDefault();return c.originalEvent.mouseHandled=true}},_mouseMove:function(c){if(b.browser.msie&&!c.button)return this._mouseUp(c);if(this._mouseStarted){this._mouseDrag(c);return c.preventDefault()}if(this._mouseDistanceMet(c)&&
this._mouseDelayMet(c))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,c)!==false)?this._mouseDrag(c):this._mouseUp(c);return!this._mouseStarted},_mouseUp:function(c){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=c.target==this._mouseDownEvent.target;this._mouseStop(c)}return false},_mouseDistanceMet:function(c){return Math.max(Math.abs(this._mouseDownEvent.pageX-
c.pageX),Math.abs(this._mouseDownEvent.pageY-c.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
(function(b){b.widget("ui.draggable",b.ui.mouse,{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(c){var d=
this.options;if(this.helper||d.disabled||b(c.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(c);if(!this.handle)return false;return true},_mouseStart:function(c){var d=this.options;this.helper=this._createHelper(c);this._cacheHelperProportions();if(b.ui.ddmanager)b.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};b.extend(this.offset,{click:{left:c.pageX-this.offset.left,top:c.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(c);this.originalPageX=c.pageX;this.originalPageY=c.pageY;d.cursorAt&&this._adjustOffsetFromHelper(d.cursorAt);d.containment&&this._setContainment();if(this._trigger("start",c)===false){this._clear();return false}this._cacheHelperProportions();
b.ui.ddmanager&&!d.dropBehaviour&&b.ui.ddmanager.prepareOffsets(this,c);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(c,true);return true},_mouseDrag:function(c,d){this.position=this._generatePosition(c);this.positionAbs=this._convertPositionTo("absolute");if(!d){d=this._uiHash();if(this._trigger("drag",c,d)===false){this._mouseUp({});return false}this.position=d.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";b.ui.ddmanager&&b.ui.ddmanager.drag(this,c);return false},_mouseStop:function(c){var d=false;if(b.ui.ddmanager&&!this.options.dropBehaviour)d=b.ui.ddmanager.drop(this,c);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||b.isFunction(this.options.revert)&&this.options.revert.call(this.element,
d)){var f=this;b(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){f._trigger("stop",c)!==false&&f._clear()})}else this._trigger("stop",c)!==false&&this._clear();return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(c){var d=!this.options.handle||!b(this.options.handle,this.element).length?true:false;b(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==
c.target)d=true});return d},_createHelper:function(c){var d=this.options;c=b.isFunction(d.helper)?b(d.helper.apply(this.element[0],[c])):d.helper=="clone"?this.element.clone():this.element;c.parents("body").length||c.appendTo(d.appendTo=="parent"?this.element[0].parentNode:d.appendTo);c[0]!=this.element[0]&&!/(fixed|absolute)/.test(c.css("position"))&&c.css("position","absolute");return c},_adjustOffsetFromHelper:function(c){if(typeof c=="string")c=c.split(" ");if(b.isArray(c))c={left:+c[0],top:+c[1]||
0};if("left"in c)this.offset.click.left=c.left+this.margins.left;if("right"in c)this.offset.click.left=this.helperProportions.width-c.right+this.margins.left;if("top"in c)this.offset.click.top=c.top+this.margins.top;if("bottom"in c)this.offset.click.top=this.helperProportions.height-c.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var c=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],
this.offsetParent[0])){c.left+=this.scrollParent.scrollLeft();c.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&b.browser.msie)c={top:0,left:0};return{top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var c=this.element.position();return{top:c.top-
(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:c.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}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var c=this.options;if(c.containment==
"parent")c.containment=this.helper[0].parentNode;if(c.containment=="document"||c.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,b(c.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(b(c.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(c.containment)&&
c.containment.constructor!=Array){var d=b(c.containment)[0];if(d){c=b(c.containment).offset();var f=b(d).css("overflow")!="hidden";this.containment=[c.left+(parseInt(b(d).css("borderLeftWidth"),10)||0)+(parseInt(b(d).css("paddingLeft"),10)||0)-this.margins.left,c.top+(parseInt(b(d).css("borderTopWidth"),10)||0)+(parseInt(b(d).css("paddingTop"),10)||0)-this.margins.top,c.left+(f?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(b(d).css("borderLeftWidth"),10)||0)-(parseInt(b(d).css("paddingRight"),
10)||0)-this.helperProportions.width-this.margins.left,c.top+(f?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(b(d).css("borderTopWidth"),10)||0)-(parseInt(b(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else if(c.containment.constructor==Array)this.containment=c.containment},_convertPositionTo:function(c,d){if(!d)d=this.position;c=c=="absolute"?1:-1;var f=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],
this.offsetParent[0]))?this.offsetParent:this.scrollParent,a=/(html|body)/i.test(f[0].tagName);return{top:d.top+this.offset.relative.top*c+this.offset.parent.top*c-(b.browser.safari&&b.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():a?0:f.scrollTop())*c),left:d.left+this.offset.relative.left*c+this.offset.parent.left*c-(b.browser.safari&&b.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():
a?0:f.scrollLeft())*c)}},_generatePosition:function(c){var d=this.options,f=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,a=/(html|body)/i.test(f[0].tagName),e=c.pageX,g=c.pageY;if(this.originalPosition){if(this.containment){if(c.pageX-this.offset.click.left<this.containment[0])e=this.containment[0]+this.offset.click.left;if(c.pageY-this.offset.click.top<this.containment[1])g=this.containment[1]+
this.offset.click.top;if(c.pageX-this.offset.click.left>this.containment[2])e=this.containment[2]+this.offset.click.left;if(c.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(d.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/d.grid[1])*d.grid[1];g=this.containment?!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.top<this.containment[1])?g-d.grid[1]:g+d.grid[1]:g;e=this.originalPageX+
Math.round((e-this.originalPageX)/d.grid[0])*d.grid[0];e=this.containment?!(e-this.offset.click.left<this.containment[0]||e-this.offset.click.left>this.containment[2])?e:!(e-this.offset.click.left<this.containment[0])?e-d.grid[0]:e+d.grid[0]:e}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(b.browser.safari&&b.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():a?0:f.scrollTop()),left:e-this.offset.click.left-
this.offset.relative.left-this.offset.parent.left+(b.browser.safari&&b.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():a?0:f.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(c,d,f){f=f||this._uiHash();b.ui.plugin.call(this,c,[d,f]);if(c=="drag")this.positionAbs=
this._convertPositionTo("absolute");return b.Widget.prototype._trigger.call(this,c,d,f)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});b.extend(b.ui.draggable,{version:"1.8.2"});b.ui.plugin.add("draggable","connectToSortable",{start:function(c,d){var f=b(this).data("draggable"),a=f.options,e=b.extend({},d,{item:f.element});f.sortables=[];b(a.connectToSortable).each(function(){var g=b.data(this,"sortable");
if(g&&!g.options.disabled){f.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger("activate",c,e)}})},stop:function(c,d){var f=b(this).data("draggable"),a=b.extend({},d,{item:f.element});b.each(f.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;f.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(c);this.instance.options.helper=this.instance.options._helper;
f.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",c,a)}})},drag:function(c,d){var f=b(this).data("draggable"),a=this;b.each(f.sortables,function(){this.instance.positionAbs=f.positionAbs;this.instance.helperProportions=f.helperProportions;this.instance.offset.click=f.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=
1;this.instance.currentItem=b(a).clone().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]};c.target=this.instance.currentItem[0];this.instance._mouseCapture(c,true);this.instance._mouseStart(c,true,true);this.instance.offset.click.top=f.offset.click.top;this.instance.offset.click.left=f.offset.click.left;this.instance.offset.parent.left-=f.offset.parent.left-this.instance.offset.parent.left;
this.instance.offset.parent.top-=f.offset.parent.top-this.instance.offset.parent.top;f._trigger("toSortable",c);f.dropped=this.instance.element;f.currentItem=f.element;this.instance.fromOutside=f}this.instance.currentItem&&this.instance._mouseDrag(c)}else if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",c,this.instance._uiHash(this.instance));this.instance._mouseStop(c,true);this.instance.options.helper=
this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();f._trigger("fromSortable",c);f.dropped=false}})}});b.ui.plugin.add("draggable","cursor",{start:function(){var c=b("body"),d=b(this).data("draggable").options;if(c.css("cursor"))d._cursor=c.css("cursor");c.css("cursor",d.cursor)},stop:function(){var c=b(this).data("draggable").options;c._cursor&&b("body").css("cursor",c._cursor)}});b.ui.plugin.add("draggable","iframeFix",{start:function(){var c=
b(this).data("draggable").options;b(c.iframeFix===true?"iframe":c.iframeFix).each(function(){b('<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(b(this).offset()).appendTo("body")})},stop:function(){b("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});b.ui.plugin.add("draggable","opacity",{start:function(c,d){c=b(d.helper);d=b(this).data("draggable").options;
if(c.css("opacity"))d._opacity=c.css("opacity");c.css("opacity",d.opacity)},stop:function(c,d){c=b(this).data("draggable").options;c._opacity&&b(d.helper).css("opacity",c._opacity)}});b.ui.plugin.add("draggable","scroll",{start:function(){var c=b(this).data("draggable");if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML")c.overflowOffset=c.scrollParent.offset()},drag:function(c){var d=b(this).data("draggable"),f=d.options,a=false;if(d.scrollParent[0]!=document&&d.scrollParent[0].tagName!=
"HTML"){if(!f.axis||f.axis!="x")if(d.overflowOffset.top+d.scrollParent[0].offsetHeight-c.pageY<f.scrollSensitivity)d.scrollParent[0].scrollTop=a=d.scrollParent[0].scrollTop+f.scrollSpeed;else if(c.pageY-d.overflowOffset.top<f.scrollSensitivity)d.scrollParent[0].scrollTop=a=d.scrollParent[0].scrollTop-f.scrollSpeed;if(!f.axis||f.axis!="y")if(d.overflowOffset.left+d.scrollParent[0].offsetWidth-c.pageX<f.scrollSensitivity)d.scrollParent[0].scrollLeft=a=d.scrollParent[0].scrollLeft+f.scrollSpeed;else if(c.pageX-
d.overflowOffset.left<f.scrollSensitivity)d.scrollParent[0].scrollLeft=a=d.scrollParent[0].scrollLeft-f.scrollSpeed}else{if(!f.axis||f.axis!="x")if(c.pageY-b(document).scrollTop()<f.scrollSensitivity)a=b(document).scrollTop(b(document).scrollTop()-f.scrollSpeed);else if(b(window).height()-(c.pageY-b(document).scrollTop())<f.scrollSensitivity)a=b(document).scrollTop(b(document).scrollTop()+f.scrollSpeed);if(!f.axis||f.axis!="y")if(c.pageX-b(document).scrollLeft()<f.scrollSensitivity)a=b(document).scrollLeft(b(document).scrollLeft()-
f.scrollSpeed);else if(b(window).width()-(c.pageX-b(document).scrollLeft())<f.scrollSensitivity)a=b(document).scrollLeft(b(document).scrollLeft()+f.scrollSpeed)}a!==false&&b.ui.ddmanager&&!f.dropBehaviour&&b.ui.ddmanager.prepareOffsets(d,c)}});b.ui.plugin.add("draggable","snap",{start:function(){var c=b(this).data("draggable"),d=c.options;c.snapElements=[];b(d.snap.constructor!=String?d.snap.items||":data(draggable)":d.snap).each(function(){var f=b(this),a=f.offset();this!=c.element[0]&&c.snapElements.push({item:this,
width:f.outerWidth(),height:f.outerHeight(),top:a.top,left:a.left})})},drag:function(c,d){for(var f=b(this).data("draggable"),a=f.options,e=a.snapTolerance,g=d.offset.left,h=g+f.helperProportions.width,j=d.offset.top,m=j+f.helperProportions.height,k=f.snapElements.length-1;k>=0;k--){var i=f.snapElements[k].left,l=i+f.snapElements[k].width,n=f.snapElements[k].top,o=n+f.snapElements[k].height;if(i-e<g&&g<l+e&&n-e<j&&j<o+e||i-e<g&&g<l+e&&n-e<m&&m<o+e||i-e<h&&h<l+e&&n-e<j&&j<o+e||i-e<h&&h<l+e&&n-e<m&&
m<o+e){if(a.snapMode!="inner"){var q=Math.abs(n-m)<=e,v=Math.abs(o-j)<=e,p=Math.abs(i-h)<=e,u=Math.abs(l-g)<=e;if(q)d.position.top=f._convertPositionTo("relative",{top:n-f.helperProportions.height,left:0}).top-f.margins.top;if(v)d.position.top=f._convertPositionTo("relative",{top:o,left:0}).top-f.margins.top;if(p)d.position.left=f._convertPositionTo("relative",{top:0,left:i-f.helperProportions.width}).left-f.margins.left;if(u)d.position.left=f._convertPositionTo("relative",{top:0,left:l}).left-f.margins.left}var x=
q||v||p||u;if(a.snapMode!="outer"){q=Math.abs(n-j)<=e;v=Math.abs(o-m)<=e;p=Math.abs(i-g)<=e;u=Math.abs(l-h)<=e;if(q)d.position.top=f._convertPositionTo("relative",{top:n,left:0}).top-f.margins.top;if(v)d.position.top=f._convertPositionTo("relative",{top:o-f.helperProportions.height,left:0}).top-f.margins.top;if(p)d.position.left=f._convertPositionTo("relative",{top:0,left:i}).left-f.margins.left;if(u)d.position.left=f._convertPositionTo("relative",{top:0,left:l-f.helperProportions.width}).left-f.margins.left}if(!f.snapElements[k].snapping&&
(q||v||p||u||x))f.options.snap.snap&&f.options.snap.snap.call(f.element,c,b.extend(f._uiHash(),{snapItem:f.snapElements[k].item}));f.snapElements[k].snapping=q||v||p||u||x}else{f.snapElements[k].snapping&&f.options.snap.release&&f.options.snap.release.call(f.element,c,b.extend(f._uiHash(),{snapItem:f.snapElements[k].item}));f.snapElements[k].snapping=false}}}});b.ui.plugin.add("draggable","stack",{start:function(){var c=b(this).data("draggable").options;c=b.makeArray(b(c.stack)).sort(function(f,a){return(parseInt(b(f).css("zIndex"),
10)||0)-(parseInt(b(a).css("zIndex"),10)||0)});if(c.length){var d=parseInt(c[0].style.zIndex)||0;b(c).each(function(f){this.style.zIndex=d+f});this[0].style.zIndex=d+c.length}}});b.ui.plugin.add("draggable","zIndex",{start:function(c,d){c=b(d.helper);d=b(this).data("draggable").options;if(c.css("zIndex"))d._zIndex=c.css("zIndex");c.css("zIndex",d.zIndex)},stop:function(c,d){c=b(this).data("draggable").options;c._zIndex&&b(d.helper).css("zIndex",c._zIndex)}})})(jQuery);
(function(b){b.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var c=this.options,d=c.accept;this.isover=0;this.isout=1;this.accept=b.isFunction(d)?d:function(f){return f.is(d)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};b.ui.ddmanager.droppables[c.scope]=b.ui.ddmanager.droppables[c.scope]||[];b.ui.ddmanager.droppables[c.scope].push(this);
c.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var c=b.ui.ddmanager.droppables[this.options.scope],d=0;d<c.length;d++)c[d]==this&&c.splice(d,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(c,d){if(c=="accept")this.accept=b.isFunction(d)?d:function(f){return f.is(d)};b.Widget.prototype._setOption.apply(this,arguments)},_activate:function(c){var d=b.ui.ddmanager.current;this.options.activeClass&&
this.element.addClass(this.options.activeClass);d&&this._trigger("activate",c,this.ui(d))},_deactivate:function(c){var d=b.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);d&&this._trigger("deactivate",c,this.ui(d))},_over:function(c){var d=b.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",c,this.ui(d))}},_out:function(c){var d=b.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",c,this.ui(d))}},_drop:function(c,d){var f=d||b.ui.ddmanager.current;if(!f||(f.currentItem||f.element)[0]==this.element[0])return false;var a=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var e=
b.data(this,"droppable");if(e.options.greedy&&!e.options.disabled&&e.options.scope==f.options.scope&&e.accept.call(e.element[0],f.currentItem||f.element)&&b.ui.intersect(f,b.extend(e,{offset:e.element.offset()}),e.options.tolerance)){a=true;return false}});if(a)return false;if(this.accept.call(this.element[0],f.currentItem||f.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",
c,this.ui(f));return this.element}return false},ui:function(c){return{draggable:c.currentItem||c.element,helper:c.helper,position:c.position,offset:c.positionAbs}}});b.extend(b.ui.droppable,{version:"1.8.2"});b.ui.intersect=function(c,d,f){if(!d.offset)return false;var a=(c.positionAbs||c.position.absolute).left,e=a+c.helperProportions.width,g=(c.positionAbs||c.position.absolute).top,h=g+c.helperProportions.height,j=d.offset.left,m=j+d.proportions.width,k=d.offset.top,i=k+d.proportions.height;switch(f){case "fit":return j<
a&&e<m&&k<g&&h<i;case "intersect":return j<a+c.helperProportions.width/2&&e-c.helperProportions.width/2<m&&k<g+c.helperProportions.height/2&&h-c.helperProportions.height/2<i;case "pointer":return b.ui.isOver((c.positionAbs||c.position.absolute).top+(c.clickOffset||c.offset.click).top,(c.positionAbs||c.position.absolute).left+(c.clickOffset||c.offset.click).left,k,j,d.proportions.height,d.proportions.width);case "touch":return(g>=k&&g<=i||h>=k&&h<=i||g<k&&h>i)&&(a>=j&&a<=m||e>=j&&e<=m||a<j&&e>m);default:return false}};
b.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(c,d){var f=b.ui.ddmanager.droppables[c.options.scope]||[],a=d?d.type:null,e=(c.currentItem||c.element).find(":data(droppable)").andSelf(),g=0;a:for(;g<f.length;g++)if(!(f[g].options.disabled||c&&!f[g].accept.call(f[g].element[0],c.currentItem||c.element))){for(var h=0;h<e.length;h++)if(e[h]==f[g].element[0]){f[g].proportions.height=0;continue a}f[g].visible=f[g].element.css("display")!="none";if(f[g].visible){f[g].offset=
f[g].element.offset();f[g].proportions={width:f[g].element[0].offsetWidth,height:f[g].element[0].offsetHeight};a=="mousedown"&&f[g]._activate.call(f[g],d)}}},drop:function(c,d){var f=false;b.each(b.ui.ddmanager.droppables[c.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&b.ui.intersect(c,this,this.options.tolerance))f=f||this._drop.call(this,d);if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],c.currentItem||c.element)){this.isout=1;
this.isover=0;this._deactivate.call(this,d)}}});return f},drag:function(c,d){c.options.refreshPositions&&b.ui.ddmanager.prepareOffsets(c,d);b.each(b.ui.ddmanager.droppables[c.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var f=b.ui.intersect(c,this,this.options.tolerance);if(f=!f&&this.isover==1?"isout":f&&this.isover==0?"isover":null){var a;if(this.options.greedy){var e=this.element.parents(":data(droppable):eq(0)");if(e.length){a=b.data(e[0],"droppable");
a.greedyChild=f=="isover"?1:0}}if(a&&f=="isover"){a.isover=0;a.isout=1;a._out.call(a,d)}this[f]=1;this[f=="isout"?"isover":"isout"]=0;this[f=="isover"?"_over":"_out"].call(this,d);if(a&&f=="isout"){a.isout=0;a.isover=1;a._over.call(a,d)}}}})}}})(jQuery);
(function(b){b.widget("ui.resizable",b.ui.mouse,{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 f=this,a=this.options;this.element.addClass("ui-resizable");b.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,
_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&b.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(b('<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=a.handles||(!b(".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 e=this.handles.split(",");this.handles={};for(var g=0;g<e.length;g++){var h=b.trim(e[g]),j=b('<div class="ui-resizable-handle '+("ui-resizable-"+h)+'"></div>');/sw|se|ne|nw/.test(h)&&j.css({zIndex:++a.zIndex});"se"==h&&j.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[h]=".ui-resizable-"+h;this.element.append(j)}}this._renderAxis=function(m){m=m||this.element;for(var k in this.handles){if(this.handles[k].constructor==
String)this.handles[k]=b(this.handles[k],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var i=b(this.handles[k],this.element),l=0;l=/sw|ne|nw|se|n|s/.test(k)?i.outerHeight():i.outerWidth();i=["padding",/ne|nw|n/.test(k)?"Top":/se|sw|s/.test(k)?"Bottom":/^e$/.test(k)?"Right":"Left"].join("");m.css(i,l);this._proportionallyResize()}b(this.handles[k])}};this._renderAxis(this.element);this._handles=b(".ui-resizable-handle",this.element).disableSelection();
this._handles.mouseover(function(){if(!f.resizing){if(this.className)var m=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);f.axis=m&&m[1]?m[1]:"se"}});if(a.autoHide){this._handles.hide();b(this.element).addClass("ui-resizable-autohide").hover(function(){b(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(!f.resizing){b(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var f=function(e){b(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};
if(this.elementIsWrapper){f(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);f(this.originalElement);return this},_mouseCapture:function(f){var a=false;for(var e in this.handles)if(b(this.handles[e])[0]==f.target)a=true;return!this.options.disabled&&a},_mouseStart:function(f){var a=this.options,e=this.element.position(),
g=this.element;this.resizing=true;this.documentScroll={top:b(document).scrollTop(),left:b(document).scrollLeft()};if(g.is(".ui-draggable")||/absolute/.test(g.css("position")))g.css({position:"absolute",top:e.top,left:e.left});b.browser.opera&&/relative/.test(g.css("position"))&&g.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();e=c(this.helper.css("left"));var h=c(this.helper.css("top"));if(a.containment){e+=b(a.containment).scrollLeft()||0;h+=b(a.containment).scrollTop()||0}this.offset=
this.helper.offset();this.position={left:e,top:h};this.size=this._helper?{width:g.outerWidth(),height:g.outerHeight()}:{width:g.width(),height:g.height()};this.originalSize=this._helper?{width:g.outerWidth(),height:g.outerHeight()}:{width:g.width(),height:g.height()};this.originalPosition={left:e,top:h};this.sizeDiff={width:g.outerWidth()-g.width(),height:g.outerHeight()-g.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio:
this.originalSize.width/this.originalSize.height||1;a=b(".ui-resizable-"+this.axis).css("cursor");b("body").css("cursor",a=="auto"?this.axis+"-resize":a);g.addClass("ui-resizable-resizing");this._propagate("start",f);return true},_mouseDrag:function(f){var a=this.helper,e=this.originalMousePosition,g=this._change[this.axis];if(!g)return false;e=g.apply(this,[f,f.pageX-e.left||0,f.pageY-e.top||0]);if(this._aspectRatio||f.shiftKey)e=this._updateRatio(e,f);e=this._respectSize(e,f);this._propagate("resize",
f);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(e);this._trigger("resize",f,this.ui());return false},_mouseStop:function(f){this.resizing=false;var a=this.options;if(this._helper){var e=this._proportionallyResizeElements,g=e.length&&/textarea/i.test(e[0].nodeName);e=g&&b.ui.hasScroll(e[0],"left")?0:this.sizeDiff.height;
g={width:this.size.width-(g?0:this.sizeDiff.width),height:this.size.height-e};e=parseInt(this.element.css("left"),10)+(this.position.left-this.originalPosition.left)||null;var h=parseInt(this.element.css("top"),10)+(this.position.top-this.originalPosition.top)||null;a.animate||this.element.css(b.extend(g,{top:h,left:e}));this.helper.height(this.size.height);this.helper.width(this.size.width);this._helper&&!a.animate&&this._proportionallyResize()}b("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");
this._propagate("stop",f);this._helper&&this.helper.remove();return false},_updateCache:function(f){this.offset=this.helper.offset();if(d(f.left))this.position.left=f.left;if(d(f.top))this.position.top=f.top;if(d(f.height))this.size.height=f.height;if(d(f.width))this.size.width=f.width},_updateRatio:function(f){var a=this.position,e=this.size,g=this.axis;if(f.height)f.width=e.height*this.aspectRatio;else if(f.width)f.height=e.width/this.aspectRatio;if(g=="sw"){f.left=a.left+(e.width-f.width);f.top=
null}if(g=="nw"){f.top=a.top+(e.height-f.height);f.left=a.left+(e.width-f.width)}return f},_respectSize:function(f){var a=this.options,e=this.axis,g=d(f.width)&&a.maxWidth&&a.maxWidth<f.width,h=d(f.height)&&a.maxHeight&&a.maxHeight<f.height,j=d(f.width)&&a.minWidth&&a.minWidth>f.width,m=d(f.height)&&a.minHeight&&a.minHeight>f.height;if(j)f.width=a.minWidth;if(m)f.height=a.minHeight;if(g)f.width=a.maxWidth;if(h)f.height=a.maxHeight;var k=this.originalPosition.left+this.originalSize.width,i=this.position.top+
this.size.height,l=/sw|nw|w/.test(e);e=/nw|ne|n/.test(e);if(j&&l)f.left=k-a.minWidth;if(g&&l)f.left=k-a.maxWidth;if(m&&e)f.top=i-a.minHeight;if(h&&e)f.top=i-a.maxHeight;if((a=!f.width&&!f.height)&&!f.left&&f.top)f.top=null;else if(a&&!f.top&&f.left)f.left=null;return f},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var f=this.helper||this.element,a=0;a<this._proportionallyResizeElements.length;a++){var e=this._proportionallyResizeElements[a];if(!this.borderDif){var g=
[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],h=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];this.borderDif=b.map(g,function(j,m){j=parseInt(j,10)||0;m=parseInt(h[m],10)||0;return j+m})}b.browser.msie&&(b(f).is(":hidden")||b(f).parents(":hidden").length)||e.css({height:f.height()-this.borderDif[0]-this.borderDif[2]||0,width:f.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var f=
this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||b('<div style="overflow:hidden;"></div>');var a=b.browser.msie&&b.browser.version<7,e=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-e+"px",top:this.elementOffset.top-e+"px",zIndex:++f.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(f,
a){return{width:this.originalSize.width+a}},w:function(f,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(f,a,e){return{top:this.originalPosition.top+e,height:this.originalSize.height-e}},s:function(f,a,e){return{height:this.originalSize.height+e}},se:function(f,a,e){return b.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[f,a,e]))},sw:function(f,a,e){return b.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,a,
e]))},ne:function(f,a,e){return b.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[f,a,e]))},nw:function(f,a,e){return b.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,a,e]))}},_propagate:function(f,a){b.ui.plugin.call(this,f,[a,this.ui()]);f!="resize"&&this._trigger(f,a,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,
originalPosition:this.originalPosition}}});b.extend(b.ui.resizable,{version:"1.8.2"});b.ui.plugin.add("resizable","alsoResize",{start:function(){var f=b(this).data("resizable").options,a=function(e){b(e).each(function(){b(this).data("resizable-alsoresize",{width:parseInt(b(this).width(),10),height:parseInt(b(this).height(),10),left:parseInt(b(this).css("left"),10),top:parseInt(b(this).css("top"),10)})})};if(typeof f.alsoResize=="object"&&!f.alsoResize.parentNode)if(f.alsoResize.length){f.alsoResize=
f.alsoResize[0];a(f.alsoResize)}else b.each(f.alsoResize,function(e){a(e)});else a(f.alsoResize)},resize:function(){var f=b(this).data("resizable"),a=f.options,e=f.originalSize,g=f.originalPosition,h={height:f.size.height-e.height||0,width:f.size.width-e.width||0,top:f.position.top-g.top||0,left:f.position.left-g.left||0},j=function(m,k){b(m).each(function(){var i=b(this),l=b(this).data("resizable-alsoresize"),n={};b.each((k&&k.length?k:["width","height","top","left"])||["width","height","top","left"],
function(o,q){if((o=(l[q]||0)+(h[q]||0))&&o>=0)n[q]=o||null});if(/relative/.test(i.css("position"))&&b.browser.opera){f._revertToRelativePosition=true;i.css({position:"absolute",top:"auto",left:"auto"})}i.css(n)})};typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?b.each(a.alsoResize,function(m,k){j(m,k)}):j(a.alsoResize)},stop:function(){var f=b(this).data("resizable");if(f._revertToRelativePosition&&b.browser.opera){f._revertToRelativePosition=false;el.css({position:"relative"})}b(this).removeData("resizable-alsoresize-start")}});
b.ui.plugin.add("resizable","animate",{stop:function(f){var a=b(this).data("resizable"),e=a.options,g=a._proportionallyResizeElements,h=g.length&&/textarea/i.test(g[0].nodeName),j=h&&b.ui.hasScroll(g[0],"left")?0:a.sizeDiff.height;h={width:a.size.width-(h?0:a.sizeDiff.width),height:a.size.height-j};j=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null;var m=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(b.extend(h,m&&
j?{top:m,left:j}:{}),{duration:e.animateDuration,easing:e.animateEasing,step:function(){var k={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};g&&g.length&&b(g[0]).css({width:k.width,height:k.height});a._updateCache(k);a._propagate("resize",f)}})}});b.ui.plugin.add("resizable","containment",{start:function(){var f=b(this).data("resizable"),a=f.element,e=f.options.containment;if(a=e instanceof
b?e.get(0):/parent/.test(e)?a.parent().get(0):e){f.containerElement=b(a);if(/document/.test(e)||e==document){f.containerOffset={left:0,top:0};f.containerPosition={left:0,top:0};f.parentData={element:b(document),left:0,top:0,width:b(document).width(),height:b(document).height()||document.body.parentNode.scrollHeight}}else{var g=b(a),h=[];b(["Top","Right","Left","Bottom"]).each(function(k,i){h[k]=c(g.css("padding"+i))});f.containerOffset=g.offset();f.containerPosition=g.position();f.containerSize={height:g.innerHeight()-
h[3],width:g.innerWidth()-h[1]};e=f.containerOffset;var j=f.containerSize.height,m=f.containerSize.width;m=b.ui.hasScroll(a,"left")?a.scrollWidth:m;j=b.ui.hasScroll(a)?a.scrollHeight:j;f.parentData={element:a,left:e.left,top:e.top,width:m,height:j}}}},resize:function(f){var a=b(this).data("resizable"),e=a.options,g=a.containerOffset,h=a.position;f=a._aspectRatio||f.shiftKey;var j={top:0,left:0},m=a.containerElement;if(m[0]!=document&&/static/.test(m.css("position")))j=g;if(h.left<(a._helper?g.left:
0)){a.size.width+=a._helper?a.position.left-g.left:a.position.left-j.left;if(f)a.size.height=a.size.width/e.aspectRatio;a.position.left=e.helper?g.left:0}if(h.top<(a._helper?g.top:0)){a.size.height+=a._helper?a.position.top-g.top:a.position.top;if(f)a.size.width=a.size.height*e.aspectRatio;a.position.top=a._helper?g.top:0}a.offset.left=a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;e=Math.abs((a._helper?a.offset.left-j.left:a.offset.left-j.left)+a.sizeDiff.width);g=
Math.abs((a._helper?a.offset.top-j.top:a.offset.top-g.top)+a.sizeDiff.height);h=a.containerElement.get(0)==a.element.parent().get(0);j=/relative|absolute/.test(a.containerElement.css("position"));if(h&&j)e-=a.parentData.left;if(e+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-e;if(f)a.size.height=a.size.width/a.aspectRatio}if(g+a.size.height>=a.parentData.height){a.size.height=a.parentData.height-g;if(f)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var f=b(this).data("resizable"),
a=f.options,e=f.containerOffset,g=f.containerPosition,h=f.containerElement,j=b(f.helper),m=j.offset(),k=j.outerWidth()-f.sizeDiff.width;j=j.outerHeight()-f.sizeDiff.height;f._helper&&!a.animate&&/relative/.test(h.css("position"))&&b(this).css({left:m.left-g.left-e.left,width:k,height:j});f._helper&&!a.animate&&/static/.test(h.css("position"))&&b(this).css({left:m.left-g.left-e.left,width:k,height:j})}});b.ui.plugin.add("resizable","ghost",{start:function(){var f=b(this).data("resizable"),a=f.options,
e=f.size;f.ghost=f.originalElement.clone();f.ghost.css({opacity:0.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");f.ghost.appendTo(f.helper)},resize:function(){var f=b(this).data("resizable");f.ghost&&f.ghost.css({position:"relative",height:f.size.height,width:f.size.width})},stop:function(){var f=b(this).data("resizable");f.ghost&&f.helper&&f.helper.get(0).removeChild(f.ghost.get(0))}});
b.ui.plugin.add("resizable","grid",{resize:function(){var f=b(this).data("resizable"),a=f.options,e=f.size,g=f.originalSize,h=f.originalPosition,j=f.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var m=Math.round((e.width-g.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((e.height-g.height)/(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(j)){f.size.width=g.width+m;f.size.height=g.height+a}else if(/^(ne)$/.test(j)){f.size.width=g.width+m;f.size.height=g.height+a;f.position.top=h.top-
a}else{if(/^(sw)$/.test(j)){f.size.width=g.width+m;f.size.height=g.height+a}else{f.size.width=g.width+m;f.size.height=g.height+a;f.position.top=h.top-a}f.position.left=h.left-m}}});var c=function(f){return parseInt(f,10)||0},d=function(f){return!isNaN(parseInt(f,10))}})(jQuery);
(function(b){b.widget("ui.selectable",b.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var d;this.refresh=function(){d=b(c.options.filter,c.element[0]);d.each(function(){var f=b(this),a=f.offset();b.data(this,"selectable-item",{element:this,$element:f,left:a.left,top:a.top,right:a.left+f.outerWidth(),bottom:a.top+f.outerHeight(),startselected:false,selected:f.hasClass("ui-selected"),
selecting:f.hasClass("ui-selecting"),unselecting:f.hasClass("ui-unselecting")})})};this.refresh();this.selectees=d.addClass("ui-selectee");this._mouseInit();this.helper=b("<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(c){var d=this;this.opos=[c.pageX,
c.pageY];if(!this.options.disabled){var f=this.options;this.selectees=b(f.filter,this.element[0]);this._trigger("start",c);b(f.appendTo).append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:c.clientX,top:c.clientY,width:0,height:0});f.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var a=b.data(this,"selectable-item");a.startselected=true;if(!c.metaKey){a.$element.removeClass("ui-selected");a.selected=false;a.$element.addClass("ui-unselecting");
a.unselecting=true;d._trigger("unselecting",c,{unselecting:a.element})}});b(c.target).parents().andSelf().each(function(){var a=b.data(this,"selectable-item");if(a){var e=!c.metaKey||!a.$element.hasClass("ui-selected");a.$element.removeClass(e?"ui-unselecting":"ui-selected").addClass(e?"ui-selecting":"ui-unselecting");a.unselecting=!e;a.selecting=e;(a.selected=e)?d._trigger("selecting",c,{selecting:a.element}):d._trigger("unselecting",c,{unselecting:a.element});return false}})}},_mouseDrag:function(c){var d=
this;this.dragged=true;if(!this.options.disabled){var f=this.options,a=this.opos[0],e=this.opos[1],g=c.pageX,h=c.pageY;if(a>g){var j=g;g=a;a=j}if(e>h){j=h;h=e;e=j}this.helper.css({left:a,top:e,width:g-a,height:h-e});this.selectees.each(function(){var m=b.data(this,"selectable-item");if(!(!m||m.element==d.element[0])){var k=false;if(f.tolerance=="touch")k=!(m.left>g||m.right<a||m.top>h||m.bottom<e);else if(f.tolerance=="fit")k=m.left>a&&m.right<g&&m.top>e&&m.bottom<h;if(k){if(m.selected){m.$element.removeClass("ui-selected");
m.selected=false}if(m.unselecting){m.$element.removeClass("ui-unselecting");m.unselecting=false}if(!m.selecting){m.$element.addClass("ui-selecting");m.selecting=true;d._trigger("selecting",c,{selecting:m.element})}}else{if(m.selecting)if(c.metaKey&&m.startselected){m.$element.removeClass("ui-selecting");m.selecting=false;m.$element.addClass("ui-selected");m.selected=true}else{m.$element.removeClass("ui-selecting");m.selecting=false;if(m.startselected){m.$element.addClass("ui-unselecting");m.unselecting=
true}d._trigger("unselecting",c,{unselecting:m.element})}if(m.selected)if(!c.metaKey&&!m.startselected){m.$element.removeClass("ui-selected");m.selected=false;m.$element.addClass("ui-unselecting");m.unselecting=true;d._trigger("unselecting",c,{unselecting:m.element})}}}});return false}},_mouseStop:function(c){var d=this;this.dragged=false;b(".ui-unselecting",this.element[0]).each(function(){var f=b.data(this,"selectable-item");f.$element.removeClass("ui-unselecting");f.unselecting=false;f.startselected=
false;d._trigger("unselected",c,{unselected:f.element})});b(".ui-selecting",this.element[0]).each(function(){var f=b.data(this,"selectable-item");f.$element.removeClass("ui-selecting").addClass("ui-selected");f.selecting=false;f.selected=true;f.startselected=true;d._trigger("selected",c,{selected:f.element})});this._trigger("stop",c);this.helper.remove();return false}});b.extend(b.ui.selectable,{version:"1.8.2"})})(jQuery);
(function(b){b.widget("ui.sortable",b.ui.mouse,{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(){this.containerCache={};this.element.addClass("ui-sortable");
this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var c=this.items.length-1;c>=0;c--)this.items[c].item.removeData("sortable-item");return this},_setOption:function(c,d){if(c==="disabled"){this.options[c]=d;this.widget()[d?"addClass":"removeClass"]("ui-sortable-disabled")}else b.Widget.prototype._setOption.apply(this,
arguments)},_mouseCapture:function(c,d){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(c);var f=null,a=this;b(c.target).parents().each(function(){if(b.data(this,"sortable-item")==a){f=b(this);return false}});if(b.data(c.target,"sortable-item")==a)f=b(c.target);if(!f)return false;if(this.options.handle&&!d){var e=false;b(this.options.handle,f).find("*").andSelf().each(function(){if(this==c.target)e=true});if(!e)return false}this.currentItem=
f;this._removeCurrentsFromItems();return true},_mouseStart:function(c,d,f){d=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(c);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");b.extend(this.offset,
{click:{left:c.pageX-this.offset.left,top:c.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(c);this.originalPageX=c.pageX;this.originalPageY=c.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(b("body").css("cursor"))this._storedCursor=b("body").css("cursor");b("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",
c,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!f)for(f=this.containers.length-1;f>=0;f--)this.containers[f]._trigger("activate",c,this._uiHash(this));if(b.ui.ddmanager)b.ui.ddmanager.current=this;b.ui.ddmanager&&!d.dropBehaviour&&b.ui.ddmanager.prepareOffsets(this,c);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(c);return true},_mouseDrag:function(c){this.position=this._generatePosition(c);this.positionAbs=this._convertPositionTo("absolute");
if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var d=this.options,f=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-c.pageY<d.scrollSensitivity)this.scrollParent[0].scrollTop=f=this.scrollParent[0].scrollTop+d.scrollSpeed;else if(c.pageY-this.overflowOffset.top<d.scrollSensitivity)this.scrollParent[0].scrollTop=f=this.scrollParent[0].scrollTop-d.scrollSpeed;if(this.overflowOffset.left+
this.scrollParent[0].offsetWidth-c.pageX<d.scrollSensitivity)this.scrollParent[0].scrollLeft=f=this.scrollParent[0].scrollLeft+d.scrollSpeed;else if(c.pageX-this.overflowOffset.left<d.scrollSensitivity)this.scrollParent[0].scrollLeft=f=this.scrollParent[0].scrollLeft-d.scrollSpeed}else{if(c.pageY-b(document).scrollTop()<d.scrollSensitivity)f=b(document).scrollTop(b(document).scrollTop()-d.scrollSpeed);else if(b(window).height()-(c.pageY-b(document).scrollTop())<d.scrollSensitivity)f=b(document).scrollTop(b(document).scrollTop()+
d.scrollSpeed);if(c.pageX-b(document).scrollLeft()<d.scrollSensitivity)f=b(document).scrollLeft(b(document).scrollLeft()-d.scrollSpeed);else if(b(window).width()-(c.pageX-b(document).scrollLeft())<d.scrollSensitivity)f=b(document).scrollLeft(b(document).scrollLeft()+d.scrollSpeed)}f!==false&&b.ui.ddmanager&&!d.dropBehaviour&&b.ui.ddmanager.prepareOffsets(this,c)}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--){f=this.items[d];var a=f.item[0],e=this._intersectsWithPointer(f);if(e)if(a!=this.currentItem[0]&&this.placeholder[e==1?"next":"prev"]()[0]!=a&&!b.ui.contains(this.placeholder[0],a)&&(this.options.type=="semi-dynamic"?!b.ui.contains(this.element[0],a):true)){this.direction=e==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(f))this._rearrange(c,
f);else break;this._trigger("change",c,this._uiHash());break}}this._contactContainers(c);b.ui.ddmanager&&b.ui.ddmanager.drag(this,c);this._trigger("sort",c,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(c,d){if(c){b.ui.ddmanager&&!this.options.dropBehaviour&&b.ui.ddmanager.drop(this,c);if(this.options.revert){var f=this;d=f.placeholder.offset();f.reverting=true;b(this.helper).animate({left:d.left-this.offset.parent.left-f.margins.left+(this.offsetParent[0]==
document.body?0:this.offsetParent[0].scrollLeft),top:d.top-this.offset.parent.top-f.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){f._clear(c)})}else this._clear(c,d);return false}},cancel:function(){if(this.dragging){this._mouseUp();this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate",
null,this._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,this._uiHash(this));this.containers[c].containerCache.over=0}}}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();b.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?b(this.domPosition.prev).after(this.currentItem):
b(this.domPosition.parent).prepend(this.currentItem);return this},serialize:function(c){var d=this._getItemsAsjQuery(c&&c.connected),f=[];c=c||{};b(d).each(function(){var a=(b(c.item||this).attr(c.attribute||"id")||"").match(c.expression||/(.+)[-=_](.+)/);if(a)f.push((c.key||a[1]+"[]")+"="+(c.key&&c.expression?a[1]:a[2]))});return f.join("&")},toArray:function(c){var d=this._getItemsAsjQuery(c&&c.connected),f=[];c=c||{};d.each(function(){f.push(b(c.item||this).attr(c.attribute||"id")||"")});return f},
_intersectsWith:function(c){var d=this.positionAbs.left,f=d+this.helperProportions.width,a=this.positionAbs.top,e=a+this.helperProportions.height,g=c.left,h=g+c.width,j=c.top,m=j+c.height,k=this.offset.click.top,i=this.offset.click.left;k=a+k>j&&a+k<m&&d+i>g&&d+i<h;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>c[this.floating?"width":"height"]?k:g<d+this.helperProportions.width/
2&&f-this.helperProportions.width/2<h&&j<a+this.helperProportions.height/2&&e-this.helperProportions.height/2<m},_intersectsWithPointer:function(c){var d=b.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,c.top,c.height);c=b.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,c.left,c.width);d=d&&c;c=this._getDragVerticalDirection();var f=this._getDragHorizontalDirection();if(!d)return false;return this.floating?f&&f=="right"||c=="down"?2:1:c&&(c=="down"?2:1)},_intersectsWithSides:function(c){var d=
b.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,c.top+c.height/2,c.height);c=b.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,c.left+c.width/2,c.width);var f=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return this.floating&&a?a=="right"&&c||a=="left"&&!c:f&&(f=="down"&&d||f=="up"&&!d)},_getDragVerticalDirection:function(){var c=this.positionAbs.top-this.lastPositionAbs.top;return c!=0&&(c>0?"down":"up")},_getDragHorizontalDirection:function(){var c=
this.positionAbs.left-this.lastPositionAbs.left;return c!=0&&(c>0?"right":"left")},refresh:function(c){this._refreshItems(c);this.refreshPositions();return this},_connectWith:function(){var c=this.options;return c.connectWith.constructor==String?[c.connectWith]:c.connectWith},_getItemsAsjQuery:function(c){var d=[],f=[],a=this._connectWith();if(a&&c)for(c=a.length-1;c>=0;c--)for(var e=b(a[c]),g=e.length-1;g>=0;g--){var h=b.data(e[g],"sortable");if(h&&h!=this&&!h.options.disabled)f.push([b.isFunction(h.options.items)?
h.options.items.call(h.element):b(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}f.push([b.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):b(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(c=f.length-1;c>=0;c--)f[c][0].each(function(){d.push(this)});return b(d)},_removeCurrentsFromItems:function(){for(var c=this.currentItem.find(":data(sortable-item)"),
d=0;d<this.items.length;d++)for(var f=0;f<c.length;f++)c[f]==this.items[d].item[0]&&this.items.splice(d,1)},_refreshItems:function(c){this.items=[];this.containers=[this];var d=this.items,f=[[b.isFunction(this.options.items)?this.options.items.call(this.element[0],c,{item:this.currentItem}):b(this.options.items,this.element),this]],a=this._connectWith();if(a)for(var e=a.length-1;e>=0;e--)for(var g=b(a[e]),h=g.length-1;h>=0;h--){var j=b.data(g[h],"sortable");if(j&&j!=this&&!j.options.disabled){f.push([b.isFunction(j.options.items)?
j.options.items.call(j.element[0],c,{item:this.currentItem}):b(j.options.items,j.element),j]);this.containers.push(j)}}for(e=f.length-1;e>=0;e--){c=f[e][1];var m=f[e][0];h=0;for(a=m.length;h<a;h++){g=b(m[h]);g.data("sortable-item",c);d.push({item:g,instance:c,width:0,height:0,left:0,top:0})}}},refreshPositions:function(c){if(this.offsetParent&&this.helper)this.offset.parent=this._getParentOffset();for(var d=this.items.length-1;d>=0;d--){var f=this.items[d],a=this.options.toleranceElement?b(this.options.toleranceElement,
f.item):f.item;if(!c){f.width=a.outerWidth();f.height=a.outerHeight()}a=a.offset();f.left=a.left;f.top=a.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--){a=this.containers[d].element.offset();this.containers[d].containerCache.left=a.left;this.containers[d].containerCache.top=a.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(c){var d=c||this,f=d.options;if(!f.placeholder||f.placeholder.constructor==String){var a=f.placeholder;f.placeholder={element:function(){var e=b(document.createElement(d.currentItem[0].nodeName)).addClass(a||d.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!a)e.style.visibility="hidden";return e},update:function(e,g){if(!(a&&!f.forcePlaceholderSize)){g.height()||g.height(d.currentItem.innerHeight()-
parseInt(d.currentItem.css("paddingTop")||0,10)-parseInt(d.currentItem.css("paddingBottom")||0,10));g.width()||g.width(d.currentItem.innerWidth()-parseInt(d.currentItem.css("paddingLeft")||0,10)-parseInt(d.currentItem.css("paddingRight")||0,10))}}}}d.placeholder=b(f.placeholder.element.call(d.element,d.currentItem));d.currentItem.after(d.placeholder);f.placeholder.update(d,d.placeholder)},_contactContainers:function(c){for(var d=null,f=null,a=this.containers.length-1;a>=0;a--)if(!b.ui.contains(this.currentItem[0],
this.containers[a].element[0]))if(this._intersectsWith(this.containers[a].containerCache)){if(!(d&&b.ui.contains(this.containers[a].element[0],d.element[0]))){d=this.containers[a];f=a}}else if(this.containers[a].containerCache.over){this.containers[a]._trigger("out",c,this._uiHash(this));this.containers[a].containerCache.over=0}if(d)if(this.containers.length===1){this.containers[f]._trigger("over",c,this._uiHash(this));this.containers[f].containerCache.over=1}else if(this.currentContainer!=this.containers[f]){d=
1E4;a=null;for(var e=this.positionAbs[this.containers[f].floating?"left":"top"],g=this.items.length-1;g>=0;g--)if(b.ui.contains(this.containers[f].element[0],this.items[g].item[0])){var h=this.items[g][this.containers[f].floating?"left":"top"];if(Math.abs(h-e)<d){d=Math.abs(h-e);a=this.items[g]}}if(a||this.options.dropOnEmpty){this.currentContainer=this.containers[f];a?this._rearrange(c,a,null,true):this._rearrange(c,null,this.containers[f].element,true);this._trigger("change",c,this._uiHash());this.containers[f]._trigger("change",
c,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[f]._trigger("over",c,this._uiHash(this));this.containers[f].containerCache.over=1}}},_createHelper:function(c){var d=this.options;c=b.isFunction(d.helper)?b(d.helper.apply(this.element[0],[c,this.currentItem])):d.helper=="clone"?this.currentItem.clone():this.currentItem;c.parents("body").length||b(d.appendTo!="parent"?d.appendTo:this.currentItem[0].parentNode)[0].appendChild(c[0]);if(c[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(c[0].style.width==""||d.forceHelperSize)c.width(this.currentItem.width());if(c[0].style.height==""||d.forceHelperSize)c.height(this.currentItem.height());return c},_adjustOffsetFromHelper:function(c){if(typeof c=="string")c=c.split(" ");if(b.isArray(c))c={left:+c[0],top:+c[1]||
0};if("left"in c)this.offset.click.left=c.left+this.margins.left;if("right"in c)this.offset.click.left=this.helperProportions.width-c.right+this.margins.left;if("top"in c)this.offset.click.top=c.top+this.margins.top;if("bottom"in c)this.offset.click.top=this.helperProportions.height-c.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var c=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],
this.offsetParent[0])){c.left+=this.scrollParent.scrollLeft();c.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&b.browser.msie)c={top:0,left:0};return{top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var c=this.currentItem.position();return{top:c.top-
(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:c.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 c=this.options;
if(c.containment=="parent")c.containment=this.helper[0].parentNode;if(c.containment=="document"||c.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,b(c.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(b(c.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(c.containment)){var d=
b(c.containment)[0];c=b(c.containment).offset();var f=b(d).css("overflow")!="hidden";this.containment=[c.left+(parseInt(b(d).css("borderLeftWidth"),10)||0)+(parseInt(b(d).css("paddingLeft"),10)||0)-this.margins.left,c.top+(parseInt(b(d).css("borderTopWidth"),10)||0)+(parseInt(b(d).css("paddingTop"),10)||0)-this.margins.top,c.left+(f?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(b(d).css("borderLeftWidth"),10)||0)-(parseInt(b(d).css("paddingRight"),10)||0)-this.helperProportions.width-
this.margins.left,c.top+(f?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(b(d).css("borderTopWidth"),10)||0)-(parseInt(b(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(c,d){if(!d)d=this.position;c=c=="absolute"?1:-1;var f=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,a=/(html|body)/i.test(f[0].tagName);return{top:d.top+
this.offset.relative.top*c+this.offset.parent.top*c-(b.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():a?0:f.scrollTop())*c),left:d.left+this.offset.relative.left*c+this.offset.parent.left*c-(b.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():a?0:f.scrollLeft())*c)}},_generatePosition:function(c){var d=this.options,f=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],
this.offsetParent[0]))?this.offsetParent:this.scrollParent,a=/(html|body)/i.test(f[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();var e=c.pageX,g=c.pageY;if(this.originalPosition){if(this.containment){if(c.pageX-this.offset.click.left<this.containment[0])e=this.containment[0]+this.offset.click.left;if(c.pageY-this.offset.click.top<this.containment[1])g=this.containment[1]+this.offset.click.top;
if(c.pageX-this.offset.click.left>this.containment[2])e=this.containment[2]+this.offset.click.left;if(c.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(d.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/d.grid[1])*d.grid[1];g=this.containment?!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.top<this.containment[1])?g-d.grid[1]:g+d.grid[1]:g;e=this.originalPageX+Math.round((e-
this.originalPageX)/d.grid[0])*d.grid[0];e=this.containment?!(e-this.offset.click.left<this.containment[0]||e-this.offset.click.left>this.containment[2])?e:!(e-this.offset.click.left<this.containment[0])?e-d.grid[0]:e+d.grid[0]:e}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(b.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():a?0:f.scrollTop()),left:e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+
(b.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():a?0:f.scrollLeft())}},_rearrange:function(c,d,f,a){f?f[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 e=this,g=this.counter;window.setTimeout(function(){g==e.counter&&e.refreshPositions(!a)},0)},_clear:function(c,d){this.reverting=false;var f=[];!this._noFinalSort&&
this.currentItem[0].parentNode&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var a in this._storedCSS)if(this._storedCSS[a]=="auto"||this._storedCSS[a]=="static")this._storedCSS[a]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!d&&f.push(function(e){this._trigger("receive",e,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)f.push(function(e){this._trigger("update",e,this._uiHash())});if(!b.ui.contains(this.element[0],this.currentItem[0])){d||f.push(function(e){this._trigger("remove",e,this._uiHash())});for(a=this.containers.length-1;a>=0;a--)if(b.ui.contains(this.containers[a].element[0],this.currentItem[0])&&!d){f.push(function(e){return function(g){e._trigger("receive",g,this._uiHash(this))}}.call(this,this.containers[a]));f.push(function(e){return function(g){e._trigger("update",
g,this._uiHash(this))}}.call(this,this.containers[a]))}}for(a=this.containers.length-1;a>=0;a--){d||f.push(function(e){return function(g){e._trigger("deactivate",g,this._uiHash(this))}}.call(this,this.containers[a]));if(this.containers[a].containerCache.over){f.push(function(e){return function(g){e._trigger("out",g,this._uiHash(this))}}.call(this,this.containers[a]));this.containers[a].containerCache.over=0}}this._storedCursor&&b("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",c,this._uiHash());for(a=0;a<f.length;a++)f[a].call(this,c);this._trigger("stop",c,this._uiHash())}return false}d||this._trigger("beforeStop",c,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(a=
0;a<f.length;a++)f[a].call(this,c);this._trigger("stop",c,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){b.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},_uiHash:function(c){var d=c||this;return{helper:d.helper,placeholder:d.placeholder||b([]),position:d.position,originalPosition:d.originalPosition,offset:d.positionAbs,item:d.currentItem,sender:c?c.element:null}}});b.extend(b.ui.sortable,{version:"1.8.2"})})(jQuery);
jQuery.effects||function(b){function c(k){var i;if(k&&k.constructor==Array&&k.length==3)return k;if(i=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(k))return[parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10)];if(i=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(k))return[parseFloat(i[1])*2.55,parseFloat(i[2])*2.55,parseFloat(i[3])*2.55];if(i=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(k))return[parseInt(i[1],
16),parseInt(i[2],16),parseInt(i[3],16)];if(i=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(k))return[parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16),parseInt(i[3]+i[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(k))return h.transparent;return h[b.trim(k).toLowerCase()]}function d(k,i){var l;do{l=b.curCSS(k,i);if(l!=""&&l!="transparent"||b.nodeName(k,"body"))break;i="backgroundColor"}while(k=k.parentNode);return c(l)}function f(){var k=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,
i={},l,n;if(k&&k.length&&k[0]&&k[k[0]])for(var o=k.length;o--;){l=k[o];if(typeof k[l]=="string"){n=l.replace(/\-(\w)/g,function(q,v){return v.toUpperCase()});i[n]=k[l]}}else for(l in k)if(typeof k[l]==="string")i[l]=k[l];return i}function a(k){var i,l;for(i in k){l=k[i];if(l==null||b.isFunction(l)||i in m||/scrollbar/.test(i)||!/color/i.test(i)&&isNaN(parseFloat(l)))delete k[i]}return k}function e(k,i){var l={_:0},n;for(n in i)if(k[n]!=i[n])l[n]=i[n];return l}function g(k,i,l,n){if(typeof k=="object"){n=
i;l=null;i=k;k=i.effect}if(b.isFunction(i)){n=i;l=null;i={}}if(b.isFunction(l)){n=l;l=null}if(typeof i=="number"||b.fx.speeds[i]){n=l;l=i;i={}}i=i||{};l=l||i.duration;l=b.fx.off?0:typeof l=="number"?l:b.fx.speeds[l]||b.fx.speeds._default;n=n||i.complete;return[k,i,l,n]}b.effects={};b.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(k,i){b.fx.step[i]=function(l){if(!l.colorInit){l.start=d(l.elem,i);l.end=c(l.end);l.colorInit=
true}l.elem.style[i]="rgb("+Math.max(Math.min(parseInt(l.pos*(l.end[0]-l.start[0])+l.start[0],10),255),0)+","+Math.max(Math.min(parseInt(l.pos*(l.end[1]-l.start[1])+l.start[1],10),255),0)+","+Math.max(Math.min(parseInt(l.pos*(l.end[2]-l.start[2])+l.start[2],10),255),0)+")"}});var h={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]},j=["add","remove","toggle"],m={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};b.effects.animateClass=function(k,i,l,n){if(b.isFunction(l)){n=l;l=null}return this.each(function(){var o=b(this),q=o.attr("style")||" ",v=a(f.call(this)),p,u=o.attr("className");b.each(j,function(x,
y){k[y]&&o[y+"Class"](k[y])});p=a(f.call(this));o.attr("className",u);o.animate(e(v,p),i,l,function(){b.each(j,function(x,y){k[y]&&o[y+"Class"](k[y])});if(typeof o.attr("style")=="object"){o.attr("style").cssText="";o.attr("style").cssText=q}else o.attr("style",q);n&&n.apply(this,arguments)})})};b.fn.extend({_addClass:b.fn.addClass,addClass:function(k,i,l,n){return i?b.effects.animateClass.apply(this,[{add:k},i,l,n]):this._addClass(k)},_removeClass:b.fn.removeClass,removeClass:function(k,i,l,n){return i?
b.effects.animateClass.apply(this,[{remove:k},i,l,n]):this._removeClass(k)},_toggleClass:b.fn.toggleClass,toggleClass:function(k,i,l,n,o){return typeof i=="boolean"||i===undefined?l?b.effects.animateClass.apply(this,[i?{add:k}:{remove:k},l,n,o]):this._toggleClass(k,i):b.effects.animateClass.apply(this,[{toggle:k},i,l,n])},switchClass:function(k,i,l,n,o){return b.effects.animateClass.apply(this,[{add:i,remove:k},l,n,o])}});b.extend(b.effects,{version:"1.8.2",save:function(k,i){for(var l=0;l<i.length;l++)i[l]!==
null&&k.data("ec.storage."+i[l],k[0].style[i[l]])},restore:function(k,i){for(var l=0;l<i.length;l++)i[l]!==null&&k.css(i[l],k.data("ec.storage."+i[l]))},setMode:function(k,i){if(i=="toggle")i=k.is(":hidden")?"show":"hide";return i},getBaseline:function(k,i){var l;switch(k[0]){case "top":l=0;break;case "middle":l=0.5;break;case "bottom":l=1;break;default:l=k[0]/i.height}switch(k[1]){case "left":k=0;break;case "center":k=0.5;break;case "right":k=1;break;default:k=k[1]/i.width}return{x:k,y:l}},createWrapper:function(k){if(k.parent().is(".ui-effects-wrapper"))return k.parent();
var i={width:k.outerWidth(true),height:k.outerHeight(true),"float":k.css("float")},l=b("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});k.wrap(l);l=k.parent();if(k.css("position")=="static"){l.css({position:"relative"});k.css({position:"relative"})}else{b.extend(i,{position:k.css("position"),zIndex:k.css("z-index")});b.each(["top","left","bottom","right"],function(n,o){i[o]=k.css(o);if(isNaN(parseInt(i[o],10)))i[o]="auto"});
k.css({position:"relative",top:0,left:0})}return l.css(i).show()},removeWrapper:function(k){if(k.parent().is(".ui-effects-wrapper"))return k.parent().replaceWith(k);return k},setTransition:function(k,i,l,n){n=n||{};b.each(i,function(o,q){unit=k.cssUnit(q);if(unit[0]>0)n[q]=unit[0]*l+unit[1]});return n}});b.fn.extend({effect:function(k){var i=g.apply(this,arguments);i={options:i[1],duration:i[2],callback:i[3]};var l=b.effects[k];return l&&!b.fx.off?l.call(this,i):this},_show:b.fn.show,show:function(k){if(!k||
typeof k=="number"||b.fx.speeds[k])return this._show.apply(this,arguments);else{var i=g.apply(this,arguments);i[1].mode="show";return this.effect.apply(this,i)}},_hide:b.fn.hide,hide:function(k){if(!k||typeof k=="number"||b.fx.speeds[k])return this._hide.apply(this,arguments);else{var i=g.apply(this,arguments);i[1].mode="hide";return this.effect.apply(this,i)}},__toggle:b.fn.toggle,toggle:function(k){if(!k||typeof k=="number"||b.fx.speeds[k]||typeof k=="boolean"||b.isFunction(k))return this.__toggle.apply(this,
arguments);else{var i=g.apply(this,arguments);i[1].mode="toggle";return this.effect.apply(this,i)}},cssUnit:function(k){var i=this.css(k),l=[];b.each(["em","px","%","pt"],function(n,o){if(i.indexOf(o)>0)l=[parseFloat(i),o]});return l}});b.easing.jswing=b.easing.swing;b.extend(b.easing,{def:"easeOutQuad",swing:function(k,i,l,n,o){return b.easing[b.easing.def](k,i,l,n,o)},easeInQuad:function(k,i,l,n,o){return n*(i/=o)*i+l},easeOutQuad:function(k,i,l,n,o){return-n*(i/=o)*(i-2)+l},easeInOutQuad:function(k,
i,l,n,o){if((i/=o/2)<1)return n/2*i*i+l;return-n/2*(--i*(i-2)-1)+l},easeInCubic:function(k,i,l,n,o){return n*(i/=o)*i*i+l},easeOutCubic:function(k,i,l,n,o){return n*((i=i/o-1)*i*i+1)+l},easeInOutCubic:function(k,i,l,n,o){if((i/=o/2)<1)return n/2*i*i*i+l;return n/2*((i-=2)*i*i+2)+l},easeInQuart:function(k,i,l,n,o){return n*(i/=o)*i*i*i+l},easeOutQuart:function(k,i,l,n,o){return-n*((i=i/o-1)*i*i*i-1)+l},easeInOutQuart:function(k,i,l,n,o){if((i/=o/2)<1)return n/2*i*i*i*i+l;return-n/2*((i-=2)*i*i*i-2)+
l},easeInQuint:function(k,i,l,n,o){return n*(i/=o)*i*i*i*i+l},easeOutQuint:function(k,i,l,n,o){return n*((i=i/o-1)*i*i*i*i+1)+l},easeInOutQuint:function(k,i,l,n,o){if((i/=o/2)<1)return n/2*i*i*i*i*i+l;return n/2*((i-=2)*i*i*i*i+2)+l},easeInSine:function(k,i,l,n,o){return-n*Math.cos(i/o*(Math.PI/2))+n+l},easeOutSine:function(k,i,l,n,o){return n*Math.sin(i/o*(Math.PI/2))+l},easeInOutSine:function(k,i,l,n,o){return-n/2*(Math.cos(Math.PI*i/o)-1)+l},easeInExpo:function(k,i,l,n,o){return i==0?l:n*Math.pow(2,
10*(i/o-1))+l},easeOutExpo:function(k,i,l,n,o){return i==o?l+n:n*(-Math.pow(2,-10*i/o)+1)+l},easeInOutExpo:function(k,i,l,n,o){if(i==0)return l;if(i==o)return l+n;if((i/=o/2)<1)return n/2*Math.pow(2,10*(i-1))+l;return n/2*(-Math.pow(2,-10*--i)+2)+l},easeInCirc:function(k,i,l,n,o){return-n*(Math.sqrt(1-(i/=o)*i)-1)+l},easeOutCirc:function(k,i,l,n,o){return n*Math.sqrt(1-(i=i/o-1)*i)+l},easeInOutCirc:function(k,i,l,n,o){if((i/=o/2)<1)return-n/2*(Math.sqrt(1-i*i)-1)+l;return n/2*(Math.sqrt(1-(i-=2)*
i)+1)+l},easeInElastic:function(k,i,l,n,o){k=1.70158;var q=0,v=n;if(i==0)return l;if((i/=o)==1)return l+n;q||(q=o*0.3);if(v<Math.abs(n)){v=n;k=q/4}else k=q/(2*Math.PI)*Math.asin(n/v);return-(v*Math.pow(2,10*(i-=1))*Math.sin((i*o-k)*2*Math.PI/q))+l},easeOutElastic:function(k,i,l,n,o){k=1.70158;var q=0,v=n;if(i==0)return l;if((i/=o)==1)return l+n;q||(q=o*0.3);if(v<Math.abs(n)){v=n;k=q/4}else k=q/(2*Math.PI)*Math.asin(n/v);return v*Math.pow(2,-10*i)*Math.sin((i*o-k)*2*Math.PI/q)+n+l},easeInOutElastic:function(k,
i,l,n,o){k=1.70158;var q=0,v=n;if(i==0)return l;if((i/=o/2)==2)return l+n;q||(q=o*0.3*1.5);if(v<Math.abs(n)){v=n;k=q/4}else k=q/(2*Math.PI)*Math.asin(n/v);if(i<1)return-0.5*v*Math.pow(2,10*(i-=1))*Math.sin((i*o-k)*2*Math.PI/q)+l;return v*Math.pow(2,-10*(i-=1))*Math.sin((i*o-k)*2*Math.PI/q)*0.5+n+l},easeInBack:function(k,i,l,n,o,q){if(q==undefined)q=1.70158;return n*(i/=o)*i*((q+1)*i-q)+l},easeOutBack:function(k,i,l,n,o,q){if(q==undefined)q=1.70158;return n*((i=i/o-1)*i*((q+1)*i+q)+1)+l},easeInOutBack:function(k,
i,l,n,o,q){if(q==undefined)q=1.70158;if((i/=o/2)<1)return n/2*i*i*(((q*=1.525)+1)*i-q)+l;return n/2*((i-=2)*i*(((q*=1.525)+1)*i+q)+2)+l},easeInBounce:function(k,i,l,n,o){return n-b.easing.easeOutBounce(k,o-i,0,n,o)+l},easeOutBounce:function(k,i,l,n,o){return(i/=o)<1/2.75?n*7.5625*i*i+l:i<2/2.75?n*(7.5625*(i-=1.5/2.75)*i+0.75)+l:i<2.5/2.75?n*(7.5625*(i-=2.25/2.75)*i+0.9375)+l:n*(7.5625*(i-=2.625/2.75)*i+0.984375)+l},easeInOutBounce:function(k,i,l,n,o){if(i<o/2)return b.easing.easeInBounce(k,i*2,0,
n,o)*0.5+l;return b.easing.easeOutBounce(k,i*2-o,0,n,o)*0.5+n*0.5+l}})}(jQuery);
(function(b){b.effects.blind=function(c){return this.queue(function(){var d=b(this),f=["position","top","left"],a=b.effects.setMode(d,c.options.mode||"hide"),e=c.options.direction||"vertical";b.effects.save(d,f);d.show();var g=b.effects.createWrapper(d).css({overflow:"hidden"}),h=e=="vertical"?"height":"width";e=e=="vertical"?g.height():g.width();a=="show"&&g.css(h,0);var j={};j[h]=a=="show"?e:0;g.animate(j,c.duration,c.options.easing,function(){a=="hide"&&d.hide();b.effects.restore(d,f);b.effects.removeWrapper(d);
c.callback&&c.callback.apply(d[0],arguments);d.dequeue()})})}})(jQuery);
(function(b){b.effects.bounce=function(c){return this.queue(function(){var d=b(this),f=["position","top","left"],a=b.effects.setMode(d,c.options.mode||"effect"),e=c.options.direction||"up",g=c.options.distance||20,h=c.options.times||5,j=c.duration||250;/show|hide/.test(a)&&f.push("opacity");b.effects.save(d,f);d.show();b.effects.createWrapper(d);var m=e=="up"||e=="down"?"top":"left";e=e=="up"||e=="left"?"pos":"neg";g=c.options.distance||(m=="top"?d.outerHeight({margin:true})/3:d.outerWidth({margin:true})/
3);if(a=="show")d.css("opacity",0).css(m,e=="pos"?-g:g);if(a=="hide")g/=h*2;a!="hide"&&h--;if(a=="show"){var k={opacity:1};k[m]=(e=="pos"?"+=":"-=")+g;d.animate(k,j/2,c.options.easing);g/=2;h--}for(k=0;k<h;k++){var i={},l={};i[m]=(e=="pos"?"-=":"+=")+g;l[m]=(e=="pos"?"+=":"-=")+g;d.animate(i,j/2,c.options.easing).animate(l,j/2,c.options.easing);g=a=="hide"?g*2:g/2}if(a=="hide"){k={opacity:0};k[m]=(e=="pos"?"-=":"+=")+g;d.animate(k,j/2,c.options.easing,function(){d.hide();b.effects.restore(d,f);b.effects.removeWrapper(d);
c.callback&&c.callback.apply(this,arguments)})}else{i={};l={};i[m]=(e=="pos"?"-=":"+=")+g;l[m]=(e=="pos"?"+=":"-=")+g;d.animate(i,j/2,c.options.easing).animate(l,j/2,c.options.easing,function(){b.effects.restore(d,f);b.effects.removeWrapper(d);c.callback&&c.callback.apply(this,arguments)})}d.queue("fx",function(){d.dequeue()});d.dequeue()})}})(jQuery);
(function(b){b.effects.clip=function(c){return this.queue(function(){var d=b(this),f=["position","top","left","height","width"],a=b.effects.setMode(d,c.options.mode||"hide"),e=c.options.direction||"vertical";b.effects.save(d,f);d.show();var g=b.effects.createWrapper(d).css({overflow:"hidden"});g=d[0].tagName=="IMG"?g:d;var h={size:e=="vertical"?"height":"width",position:e=="vertical"?"top":"left"};e=e=="vertical"?g.height():g.width();if(a=="show"){g.css(h.size,0);g.css(h.position,e/2)}var j={};j[h.size]=
a=="show"?e:0;j[h.position]=a=="show"?0:e/2;g.animate(j,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){a=="hide"&&d.hide();b.effects.restore(d,f);b.effects.removeWrapper(d);c.callback&&c.callback.apply(d[0],arguments);d.dequeue()}})})}})(jQuery);
(function(b){b.effects.drop=function(c){return this.queue(function(){var d=b(this),f=["position","top","left","opacity"],a=b.effects.setMode(d,c.options.mode||"hide"),e=c.options.direction||"left";b.effects.save(d,f);d.show();b.effects.createWrapper(d);var g=e=="up"||e=="down"?"top":"left";e=e=="up"||e=="left"?"pos":"neg";var h=c.options.distance||(g=="top"?d.outerHeight({margin:true})/2:d.outerWidth({margin:true})/2);if(a=="show")d.css("opacity",0).css(g,e=="pos"?-h:h);var j={opacity:a=="show"?1:
0};j[g]=(a=="show"?e=="pos"?"+=":"-=":e=="pos"?"-=":"+=")+h;d.animate(j,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){a=="hide"&&d.hide();b.effects.restore(d,f);b.effects.removeWrapper(d);c.callback&&c.callback.apply(this,arguments);d.dequeue()}})})}})(jQuery);
(function(b){b.effects.explode=function(c){return this.queue(function(){var d=c.options.pieces?Math.round(Math.sqrt(c.options.pieces)):3,f=c.options.pieces?Math.round(Math.sqrt(c.options.pieces)):3;c.options.mode=c.options.mode=="toggle"?b(this).is(":visible")?"hide":"show":c.options.mode;var a=b(this).show().css("visibility","hidden"),e=a.offset();e.top-=parseInt(a.css("marginTop"),10)||0;e.left-=parseInt(a.css("marginLeft"),10)||0;for(var g=a.outerWidth(true),h=a.outerHeight(true),j=0;j<d;j++)for(var m=
0;m<f;m++)a.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-m*(g/f),top:-j*(h/d)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/f,height:h/d,left:e.left+m*(g/f)+(c.options.mode=="show"?(m-Math.floor(f/2))*(g/f):0),top:e.top+j*(h/d)+(c.options.mode=="show"?(j-Math.floor(d/2))*(h/d):0),opacity:c.options.mode=="show"?0:1}).animate({left:e.left+m*(g/f)+(c.options.mode=="show"?0:(m-Math.floor(f/2))*(g/f)),top:e.top+
j*(h/d)+(c.options.mode=="show"?0:(j-Math.floor(d/2))*(h/d)),opacity:c.options.mode=="show"?1:0},c.duration||500);setTimeout(function(){c.options.mode=="show"?a.css({visibility:"visible"}):a.css({visibility:"visible"}).hide();c.callback&&c.callback.apply(a[0]);a.dequeue();b("div.ui-effects-explode").remove()},c.duration||500)})}})(jQuery);
(function(b){b.effects.fade=function(c){return this.queue(function(){var d=b(this),f=b.effects.setMode(d,c.options.mode||"hide");d.animate({opacity:f},{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){c.callback&&c.callback.apply(this,arguments);d.dequeue()}})})}})(jQuery);
(function(b){b.effects.fold=function(c){return this.queue(function(){var d=b(this),f=["position","top","left"],a=b.effects.setMode(d,c.options.mode||"hide"),e=c.options.size||15,g=!!c.options.horizFirst,h=c.duration?c.duration/2:b.fx.speeds._default/2;b.effects.save(d,f);d.show();var j=b.effects.createWrapper(d).css({overflow:"hidden"}),m=a=="show"!=g,k=m?["width","height"]:["height","width"];m=m?[j.width(),j.height()]:[j.height(),j.width()];var i=/([0-9]+)%/.exec(e);if(i)e=parseInt(i[1],10)/100*
m[a=="hide"?0:1];if(a=="show")j.css(g?{height:0,width:e}:{height:e,width:0});g={};i={};g[k[0]]=a=="show"?m[0]:e;i[k[1]]=a=="show"?m[1]:0;j.animate(g,h,c.options.easing).animate(i,h,c.options.easing,function(){a=="hide"&&d.hide();b.effects.restore(d,f);b.effects.removeWrapper(d);c.callback&&c.callback.apply(d[0],arguments);d.dequeue()})})}})(jQuery);
(function(b){b.effects.highlight=function(c){return this.queue(function(){var d=b(this),f=["backgroundImage","backgroundColor","opacity"],a=b.effects.setMode(d,c.options.mode||"show"),e={backgroundColor:d.css("backgroundColor")};if(a=="hide")e.opacity=0;b.effects.save(d,f);d.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(e,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){a=="hide"&&d.hide();b.effects.restore(d,f);a=="show"&&!b.support.opacity&&
this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);d.dequeue()}})})}})(jQuery);
(function(b){b.effects.pulsate=function(c){return this.queue(function(){var d=b(this),f=b.effects.setMode(d,c.options.mode||"show");times=(c.options.times||5)*2-1;duration=c.duration?c.duration/2:b.fx.speeds._default/2;isVisible=d.is(":visible");animateTo=0;if(!isVisible){d.css("opacity",0).show();animateTo=1}if(f=="hide"&&isVisible||f=="show"&&!isVisible)times--;for(f=0;f<times;f++){d.animate({opacity:animateTo},duration,c.options.easing);animateTo=(animateTo+1)%2}d.animate({opacity:animateTo},duration,
c.options.easing,function(){animateTo==0&&d.hide();c.callback&&c.callback.apply(this,arguments)});d.queue("fx",function(){d.dequeue()}).dequeue()})}})(jQuery);
(function(b){b.effects.puff=function(c){return this.queue(function(){var d=b(this),f=b.effects.setMode(d,c.options.mode||"hide"),a=parseInt(c.options.percent,10)||150,e=a/100,g={height:d.height(),width:d.width()};b.extend(c.options,{fade:true,mode:f,percent:f=="hide"?a:100,from:f=="hide"?g:{height:g.height*e,width:g.width*e}});d.effect("scale",c.options,c.duration,c.callback);d.dequeue()})};b.effects.scale=function(c){return this.queue(function(){var d=b(this),f=b.extend(true,{},c.options),a=b.effects.setMode(d,
c.options.mode||"effect"),e=parseInt(c.options.percent,10)||(parseInt(c.options.percent,10)==0?0:a=="hide"?0:100),g=c.options.direction||"both",h=c.options.origin;if(a!="effect"){f.origin=h||["middle","center"];f.restore=true}h={height:d.height(),width:d.width()};d.from=c.options.from||(a=="show"?{height:0,width:0}:h);e={y:g!="horizontal"?e/100:1,x:g!="vertical"?e/100:1};d.to={height:h.height*e.y,width:h.width*e.x};if(c.options.fade){if(a=="show"){d.from.opacity=0;d.to.opacity=1}if(a=="hide"){d.from.opacity=
1;d.to.opacity=0}}f.from=d.from;f.to=d.to;f.mode=a;d.effect("size",f,c.duration,c.callback);d.dequeue()})};b.effects.size=function(c){return this.queue(function(){var d=b(this),f=["position","top","left","width","height","overflow","opacity"],a=["position","top","left","overflow","opacity"],e=["width","height","overflow"],g=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],j=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],m=b.effects.setMode(d,
c.options.mode||"effect"),k=c.options.restore||false,i=c.options.scale||"both",l=c.options.origin,n={height:d.height(),width:d.width()};d.from=c.options.from||n;d.to=c.options.to||n;if(l){l=b.effects.getBaseline(l,n);d.from.top=(n.height-d.from.height)*l.y;d.from.left=(n.width-d.from.width)*l.x;d.to.top=(n.height-d.to.height)*l.y;d.to.left=(n.width-d.to.width)*l.x}var o={from:{y:d.from.height/n.height,x:d.from.width/n.width},to:{y:d.to.height/n.height,x:d.to.width/n.width}};if(i=="box"||i=="both"){if(o.from.y!=
o.to.y){f=f.concat(h);d.from=b.effects.setTransition(d,h,o.from.y,d.from);d.to=b.effects.setTransition(d,h,o.to.y,d.to)}if(o.from.x!=o.to.x){f=f.concat(j);d.from=b.effects.setTransition(d,j,o.from.x,d.from);d.to=b.effects.setTransition(d,j,o.to.x,d.to)}}if(i=="content"||i=="both")if(o.from.y!=o.to.y){f=f.concat(g);d.from=b.effects.setTransition(d,g,o.from.y,d.from);d.to=b.effects.setTransition(d,g,o.to.y,d.to)}b.effects.save(d,k?f:a);d.show();b.effects.createWrapper(d);d.css("overflow","hidden").css(d.from);
if(i=="content"||i=="both"){h=h.concat(["marginTop","marginBottom"]).concat(g);j=j.concat(["marginLeft","marginRight"]);e=f.concat(h).concat(j);d.find("*[width]").each(function(){child=b(this);k&&b.effects.save(child,e);var q={height:child.height(),width:child.width()};child.from={height:q.height*o.from.y,width:q.width*o.from.x};child.to={height:q.height*o.to.y,width:q.width*o.to.x};if(o.from.y!=o.to.y){child.from=b.effects.setTransition(child,h,o.from.y,child.from);child.to=b.effects.setTransition(child,
h,o.to.y,child.to)}if(o.from.x!=o.to.x){child.from=b.effects.setTransition(child,j,o.from.x,child.from);child.to=b.effects.setTransition(child,j,o.to.x,child.to)}child.css(child.from);child.animate(child.to,c.duration,c.options.easing,function(){k&&b.effects.restore(child,e)})})}d.animate(d.to,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d.to.opacity===0&&d.css("opacity",d.from.opacity);m=="hide"&&d.hide();b.effects.restore(d,k?f:a);b.effects.removeWrapper(d);c.callback&&
c.callback.apply(this,arguments);d.dequeue()}})})}})(jQuery);
(function(b){b.effects.shake=function(c){return this.queue(function(){var d=b(this),f=["position","top","left"];b.effects.setMode(d,c.options.mode||"effect");var a=c.options.direction||"left",e=c.options.distance||20,g=c.options.times||3,h=c.duration||c.options.duration||140;b.effects.save(d,f);d.show();b.effects.createWrapper(d);var j=a=="up"||a=="down"?"top":"left",m=a=="up"||a=="left"?"pos":"neg";a={};var k={},i={};a[j]=(m=="pos"?"-=":"+=")+e;k[j]=(m=="pos"?"+=":"-=")+e*2;i[j]=(m=="pos"?"-=":"+=")+
e*2;d.animate(a,h,c.options.easing);for(e=1;e<g;e++)d.animate(k,h,c.options.easing).animate(i,h,c.options.easing);d.animate(k,h,c.options.easing).animate(a,h/2,c.options.easing,function(){b.effects.restore(d,f);b.effects.removeWrapper(d);c.callback&&c.callback.apply(this,arguments)});d.queue("fx",function(){d.dequeue()});d.dequeue()})}})(jQuery);
(function(b){b.effects.slide=function(c){return this.queue(function(){var d=b(this),f=["position","top","left"],a=b.effects.setMode(d,c.options.mode||"show"),e=c.options.direction||"left";b.effects.save(d,f);d.show();b.effects.createWrapper(d).css({overflow:"hidden"});var g=e=="up"||e=="down"?"top":"left";e=e=="up"||e=="left"?"pos":"neg";var h=c.options.distance||(g=="top"?d.outerHeight({margin:true}):d.outerWidth({margin:true}));if(a=="show")d.css(g,e=="pos"?-h:h);var j={};j[g]=(a=="show"?e=="pos"?
"+=":"-=":e=="pos"?"-=":"+=")+h;d.animate(j,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){a=="hide"&&d.hide();b.effects.restore(d,f);b.effects.removeWrapper(d);c.callback&&c.callback.apply(this,arguments);d.dequeue()}})})}})(jQuery);
(function(b){b.effects.transfer=function(c){return this.queue(function(){var d=b(this),f=b(c.options.to),a=f.offset();f={top:a.top,left:a.left,height:f.innerHeight(),width:f.innerWidth()};a=d.offset();var e=b('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(c.options.className).css({top:a.top,left:a.left,height:d.innerHeight(),width:d.innerWidth(),position:"absolute"}).animate(f,c.duration,c.options.easing,function(){e.remove();c.callback&&c.callback.apply(d[0],arguments);
d.dequeue()})})}})(jQuery);
(function(b){b.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},_create:function(){var c=this.options,d=this;this.running=0;this.element.addClass("ui-accordion ui-widget ui-helper-reset");this.element.children("li").addClass("ui-accordion-li-fix");
this.headers=this.element.find(c.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){b(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){b(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){b(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){b(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
if(c.navigation){var f=this.element.find("a").filter(c.navigationFilter);if(f.length){var a=f.closest(".ui-accordion-header");this.active=a.length?a:f.closest(".ui-accordion-content").prev()}}this.active=this._findActive(this.active||c.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");this._createIcons();this.resize();this.element.attr("role","tablist");this.headers.attr("role",
"tab").bind("keydown",function(e){return d._keydown(e)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();this.active.length?this.active.attr("aria-expanded","true").attr("tabIndex","0"):this.headers.eq(0).attr("tabIndex","0");b.browser.safari||this.headers.find("a").attr("tabIndex","-1");c.event&&this.headers.bind(c.event+".accordion",function(e){d._clickHandler.call(d,e,this);e.preventDefault()})},_createIcons:function(){var c=
this.options;if(c.icons){b("<span/>").addClass("ui-icon "+c.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(c.icons.header).toggleClass(c.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var c=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");
this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabIndex");this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var d=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(c.autoHeight||c.fillHeight)d.css("height",
"");return this},_setOption:function(c,d){b.Widget.prototype._setOption.apply(this,arguments);c=="active"&&this.activate(d);if(c=="icons"){this._destroyIcons();d&&this._createIcons()}},_keydown:function(c){var d=b.ui.keyCode;if(!(this.options.disabled||c.altKey||c.ctrlKey)){var f=this.headers.length,a=this.headers.index(c.target),e=false;switch(c.keyCode){case d.RIGHT:case d.DOWN:e=this.headers[(a+1)%f];break;case d.LEFT:case d.UP:e=this.headers[(a-1+f)%f];break;case d.SPACE:case d.ENTER:this._clickHandler({target:c.target},
c.target);c.preventDefault()}if(e){b(c.target).attr("tabIndex","-1");b(e).attr("tabIndex","0");e.focus();return false}return true}},resize:function(){var c=this.options,d;if(c.fillSpace){if(b.browser.msie){var f=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}d=this.element.parent().height();b.browser.msie&&this.element.parent().css("overflow",f);this.headers.each(function(){d-=b(this).outerHeight(true)});this.headers.next().each(function(){b(this).height(Math.max(0,
d-b(this).innerHeight()+b(this).height()))}).css("overflow","auto")}else if(c.autoHeight){d=0;this.headers.next().each(function(){d=Math.max(d,b(this).height())}).height(d)}return this},activate:function(c){this.options.active=c;c=this._findActive(c)[0];this._clickHandler({target:c},c);return this},_findActive:function(c){return c?typeof c=="number"?this.headers.filter(":eq("+c+")"):this.headers.not(this.headers.not(c)):c===false?b([]):this.headers.filter(":eq(0)")},_clickHandler:function(c,d){var f=
this.options;if(!f.disabled)if(c.target){c=b(c.currentTarget||d);d=c[0]==this.active[0];f.active=f.collapsible&&d?false:b(".ui-accordion-header",this.element).index(c);if(!(this.running||!f.collapsible&&d)){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(f.icons.headerSelected).addClass(f.icons.header);if(!d){c.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(f.icons.header).addClass(f.icons.headerSelected);
c.next().addClass("ui-accordion-content-active")}g=c.next();a=this.active.next();e={options:f,newHeader:d&&f.collapsible?b([]):c,oldHeader:this.active,newContent:d&&f.collapsible?b([]):g,oldContent:a};f=this.headers.index(this.active[0])>this.headers.index(c[0]);this.active=d?b([]):c;this._toggle(g,a,e,d,f)}}else if(f.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(f.icons.headerSelected).addClass(f.icons.header);
this.active.next().addClass("ui-accordion-content-active");var a=this.active.next(),e={options:f,newHeader:b([]),oldHeader:f.active,newContent:b([]),oldContent:a},g=this.active=b([]);this._toggle(g,a,e)}},_toggle:function(c,d,f,a,e){var g=this.options,h=this;this.toShow=c;this.toHide=d;this.data=f;var j=function(){if(h)return h._completed.apply(h,arguments)};this._trigger("changestart",null,this.data);this.running=d.size()===0?c.size():d.size();if(g.animated){f={};f=g.collapsible&&a?{toShow:b([]),
toHide:d,complete:j,down:e,autoHeight:g.autoHeight||g.fillSpace}:{toShow:c,toHide:d,complete:j,down:e,autoHeight:g.autoHeight||g.fillSpace};if(!g.proxied)g.proxied=g.animated;if(!g.proxiedDuration)g.proxiedDuration=g.duration;g.animated=b.isFunction(g.proxied)?g.proxied(f):g.proxied;g.duration=b.isFunction(g.proxiedDuration)?g.proxiedDuration(f):g.proxiedDuration;a=b.ui.accordion.animations;var m=g.duration,k=g.animated;if(k&&!a[k]&&!b.easing[k])k="slide";a[k]||(a[k]=function(i){this.slide(i,{easing:k,
duration:m||700})});a[k](f)}else{if(g.collapsible&&a)c.toggle();else{d.hide();c.show()}j(true)}d.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();c.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(c){var d=this.options;this.running=c?0:--this.running;if(!this.running){d.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");this._trigger("change",null,this.data)}}});b.extend(b.ui.accordion,
{version:"1.8.2",animations:{slide:function(c,d){c=b.extend({easing:"swing",duration:300},c,d);if(c.toHide.size())if(c.toShow.size()){var f=c.toShow.css("overflow"),a=0,e={},g={},h;d=c.toShow;h=d[0].style.width;d.width(parseInt(d.parent().width(),10)-parseInt(d.css("paddingLeft"),10)-parseInt(d.css("paddingRight"),10)-(parseInt(d.css("borderLeftWidth"),10)||0)-(parseInt(d.css("borderRightWidth"),10)||0));b.each(["height","paddingTop","paddingBottom"],function(j,m){g[m]="hide";j=(""+b.css(c.toShow[0],
m)).match(/^([\d+-.]+)(.*)$/);e[m]={value:j[1],unit:j[2]||"px"}});c.toShow.css({height:0,overflow:"hidden"}).show();c.toHide.filter(":hidden").each(c.complete).end().filter(":visible").animate(g,{step:function(j,m){if(m.prop=="height")a=m.end-m.start===0?0:(m.now-m.start)/(m.end-m.start);c.toShow[0].style[m.prop]=a*e[m.prop].value+e[m.prop].unit},duration:c.duration,easing:c.easing,complete:function(){c.autoHeight||c.toShow.css("height","");c.toShow.css("width",h);c.toShow.css({overflow:f});c.complete()}})}else c.toHide.animate({height:"hide"},
c);else c.toShow.animate({height:"show"},c)},bounceslide:function(c){this.slide(c,{easing:c.down?"easeOutBounce":"swing",duration:c.down?1E3:200})}}})})(jQuery);
(function(b){b.widget("ui.autocomplete",{options:{minLength:1,delay:300},_create:function(){var c=this,d=this.element[0].ownerDocument;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(f){var a=b.ui.keyCode;switch(f.keyCode){case a.PAGE_UP:c._move("previousPage",f);break;case a.PAGE_DOWN:c._move("nextPage",f);break;case a.UP:c._move("previous",f);f.preventDefault();
break;case a.DOWN:c._move("next",f);f.preventDefault();break;case a.ENTER:case a.NUMPAD_ENTER:c.menu.active&&f.preventDefault();case a.TAB:if(!c.menu.active)return;c.menu.select(f);break;case a.ESCAPE:c.element.val(c.term);c.close(f);break;case a.LEFT:case a.RIGHT:case a.SHIFT:case a.CONTROL:case a.ALT:case a.COMMAND:case a.COMMAND_RIGHT:case a.INSERT:case a.CAPS_LOCK:case a.END:case a.HOME:break;default:clearTimeout(c.searching);c.searching=setTimeout(function(){c.search(null,f)},c.options.delay);
break}}).bind("focus.autocomplete",function(){c.selectedItem=null;c.previous=c.element.val()}).bind("blur.autocomplete",function(f){clearTimeout(c.searching);c.closing=setTimeout(function(){c.close(f);c._change(f)},150)});this._initSource();this.response=function(){return c._response.apply(c,arguments)};this.menu=b("<ul></ul>").addClass("ui-autocomplete").appendTo("body",d).mousedown(function(){setTimeout(function(){clearTimeout(c.closing)},13)}).menu({focus:function(f,a){a=a.item.data("item.autocomplete");
false!==c._trigger("focus",null,{item:a})&&/^key/.test(f.originalEvent.type)&&c.element.val(a.value)},selected:function(f,a){a=a.item.data("item.autocomplete");false!==c._trigger("select",f,{item:a})&&c.element.val(a.value);c.close(f);f=c.previous;if(c.element[0]!==d.activeElement){c.element.focus();c.previous=f}c.selectedItem=a},blur:function(){c.menu.element.is(":visible")&&c.element.val(c.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");b.fn.bgiframe&&this.menu.element.bgiframe()},
destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();b.Widget.prototype.destroy.call(this)},_setOption:function(c){b.Widget.prototype._setOption.apply(this,arguments);c==="source"&&this._initSource()},_initSource:function(){var c,d;if(b.isArray(this.options.source)){c=this.options.source;this.source=function(f,a){a(b.ui.autocomplete.filter(c,f.term))}}else if(typeof this.options.source===
"string"){d=this.options.source;this.source=function(f,a){b.getJSON(d,f,a)}}else this.source=this.options.source},search:function(c,d){c=c!=null?c:this.element.val();if(c.length<this.options.minLength)return this.close(d);clearTimeout(this.closing);if(this._trigger("search")!==false)return this._search(c)},_search:function(c){this.term=this.element.addClass("ui-autocomplete-loading").val();this.source({term:c},this.response)},_response:function(c){if(c.length){c=this._normalize(c);this._suggest(c);
this._trigger("open")}else this.close();this.element.removeClass("ui-autocomplete-loading")},close:function(c){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this._trigger("close",c);this.menu.element.hide();this.menu.deactivate()}},_change:function(c){this.previous!==this.element.val()&&this._trigger("change",c,{item:this.selectedItem})},_normalize:function(c){if(c.length&&c[0].label&&c[0].value)return c;return b.map(c,function(d){if(typeof d==="string")return{label:d,value:d};return b.extend({label:d.label||
d.value,value:d.value||d.label},d)})},_suggest:function(c){var d=this.menu.element.empty().zIndex(this.element.zIndex()+1),f;this._renderMenu(d,c);this.menu.deactivate();this.menu.refresh();this.menu.element.show().position({my:"left top",at:"left bottom",of:this.element,collision:"none"});c=d.width("").width();f=this.element.width();d.width(Math.max(c,f))},_renderMenu:function(c,d){var f=this;b.each(d,function(a,e){f._renderItem(c,e)})},_renderItem:function(c,d){return b("<li></li>").data("item.autocomplete",
d).append("<a>"+d.label+"</a>").appendTo(c)},_move:function(c,d){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(c)||this.menu.last()&&/^next/.test(c)){this.element.val(this.term);this.menu.deactivate()}else this.menu[c](d);else this.search(null,d)},widget:function(){return this.menu.element}});b.extend(b.ui.autocomplete,{escapeRegex:function(c){return c.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")},filter:function(c,d){var f=new RegExp(b.ui.autocomplete.escapeRegex(d),
"i");return b.grep(c,function(a){return f.test(a.label||a.value||a)})}})})(jQuery);
(function(b){b.widget("ui.menu",{_create:function(){var c=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(d){if(b(d.target).closest(".ui-menu-item a").length){d.preventDefault();c.select(d)}});this.refresh()},refresh:function(){var c=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex",
-1).mouseenter(function(d){c.activate(d,b(this).parent())}).mouseleave(function(){c.deactivate()})},activate:function(c,d){this.deactivate();if(this.hasScroll()){var f=d.offset().top-this.element.offset().top,a=this.element.attr("scrollTop"),e=this.element.height();if(f<0)this.element.attr("scrollTop",a+f);else f>e&&this.element.attr("scrollTop",a+f-e+d.height())}this.active=d.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",c,{item:d})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");
this._trigger("blur");this.active=null}},next:function(c){this.move("next",".ui-menu-item:first",c)},previous:function(c){this.move("prev",".ui-menu-item:last",c)},first:function(){return this.active&&!this.active.prev().length},last:function(){return this.active&&!this.active.next().length},move:function(c,d,f){if(this.active){c=this.active[c+"All"](".ui-menu-item").eq(0);c.length?this.activate(f,c):this.activate(f,this.element.children(d))}else this.activate(f,this.element.children(d))},nextPage:function(c){if(this.hasScroll())if(!this.active||
this.last())this.activate(c,this.element.children(":first"));else{var d=this.active.offset().top,f=this.element.height(),a=this.element.children("li").filter(function(){var e=b(this).offset().top-d-f+b(this).height();return e<10&&e>-10});a.length||(a=this.element.children(":last"));this.activate(c,a)}else this.activate(c,this.element.children(!this.active||this.last()?":first":":last"))},previousPage:function(c){if(this.hasScroll())if(!this.active||this.first())this.activate(c,this.element.children(":last"));
else{var d=this.active.offset().top,f=this.element.height();result=this.element.children("li").filter(function(){var a=b(this).offset().top-d+f-b(this).height();return a<10&&a>-10});result.length||(result=this.element.children(":first"));this.activate(c,result)}else this.activate(c,this.element.children(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element.attr("scrollHeight")},select:function(c){this._trigger("selected",c,{item:this.active})}})})(jQuery);
(function(b){var c,d=function(a){b(":ui-button",a.target.form).each(function(){var e=b(this).data("button");setTimeout(function(){e.refresh()},1)})},f=function(a){var e=a.name,g=a.form,h=b([]);if(e)h=g?b(g).find("[name='"+e+"']"):b("[name='"+e+"']",a.ownerDocument).filter(function(){return!this.form});return h};b.widget("ui.button",{options:{text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",d);this._determineButtonType();
this.hasTitle=!!this.buttonElement.attr("title");var a=this,e=this.options,g=this.type==="checkbox"||this.type==="radio",h="ui-state-hover"+(!g?" ui-state-active":"");if(e.label===null)e.label=this.buttonElement.html();if(this.element.is(":disabled"))e.disabled=true;this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",function(){if(!e.disabled){b(this).addClass("ui-state-hover");this===c&&b(this).addClass("ui-state-active")}}).bind("mouseleave.button",
function(){e.disabled||b(this).removeClass(h)}).bind("focus.button",function(){b(this).addClass("ui-state-focus")}).bind("blur.button",function(){b(this).removeClass("ui-state-focus")});g&&this.element.bind("change.button",function(){a.refresh()});if(this.type==="checkbox")this.buttonElement.bind("click.button",function(){if(e.disabled)return false;b(this).toggleClass("ui-state-active");a.buttonElement.attr("aria-pressed",a.element[0].checked)});else if(this.type==="radio")this.buttonElement.bind("click.button",
function(){if(e.disabled)return false;b(this).addClass("ui-state-active");a.buttonElement.attr("aria-pressed",true);var j=a.element[0];f(j).not(j).map(function(){return b(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",false)});else{this.buttonElement.bind("mousedown.button",function(){if(e.disabled)return false;b(this).addClass("ui-state-active");c=this;b(document).one("mouseup",function(){c=null})}).bind("mouseup.button",function(){if(e.disabled)return false;b(this).removeClass("ui-state-active")}).bind("keydown.button",
function(j){if(e.disabled)return false;if(j.keyCode==b.ui.keyCode.SPACE||j.keyCode==b.ui.keyCode.ENTER)b(this).addClass("ui-state-active")}).bind("keyup.button",function(){b(this).removeClass("ui-state-active")});this.buttonElement.is("a")&&this.buttonElement.keyup(function(j){j.keyCode===b.ui.keyCode.SPACE&&b(this).click()})}this._setOption("disabled",e.disabled)},_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"){this.buttonElement=this.element.parents().last().find("[for="+this.element.attr("id")+"]");this.element.addClass("ui-helper-hidden-accessible");var a=this.element.is(":checked");a&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",a)}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 ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());
this.hasTitle||this.buttonElement.removeAttr("title");b.Widget.prototype.destroy.call(this)},_setOption:function(a,e){b.Widget.prototype._setOption.apply(this,arguments);if(a==="disabled")e?this.element.attr("disabled",true):this.element.removeAttr("disabled");this._resetButton()},refresh:function(){var a=this.element.is(":disabled");a!==this.options.disabled&&this._setOption("disabled",a);if(this.type==="radio")f(this.element[0]).each(function(){b(this).is(":checked")?b(this).button("widget").addClass("ui-state-active").attr("aria-pressed",
true):b(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 a=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon ui-button-text-only"),
e=b("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(a.empty()).text(),g=this.options.icons,h=g.primary&&g.secondary;if(g.primary||g.secondary){a.addClass("ui-button-text-icon"+(h?"s":""));g.primary&&a.prepend("<span class='ui-button-icon-primary ui-icon "+g.primary+"'></span>");g.secondary&&a.append("<span class='ui-button-icon-secondary ui-icon "+g.secondary+"'></span>");if(!this.options.text){a.addClass(h?"ui-button-icons-only":"ui-button-icon-only").removeClass("ui-button-text-icons ui-button-text-icon");
this.hasTitle||a.attr("title",e)}}else a.addClass("ui-button-text-only")}}});b.widget("ui.buttonset",{_create:function(){this.element.addClass("ui-buttonset");this._init()},_init:function(){this.refresh()},_setOption:function(a,e){a==="disabled"&&this.buttons.button("option",a,e);b.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){this.buttons=this.element.find(":button, :submit, :reset, :checkbox, :radio, a, :data(button)").filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()},
destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");b.Widget.prototype.destroy.call(this)}})})(jQuery);
(function(b){function c(){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};b.extend(this._defaults,this.regional[""]);this.dpDiv=b('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')}function d(a,e){b.extend(a,
e);for(var g in e)if(e[g]==null||e[g]==undefined)a[g]=e[g];return a}b.extend(b.ui,{datepicker:{version:"1.8.2"}});var f=(new Date).getTime();b.extend(c.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){d(this._defaults,a||{});return this},_attachDatepicker:function(a,e){var g=null;for(var h in this._defaults){var j=a.getAttribute("date:"+h);if(j){g=g||{};try{g[h]=eval(j)}catch(m){g[h]=
j}}}h=a.nodeName.toLowerCase();j=h=="div"||h=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var k=this._newInst(b(a),j);k.settings=b.extend({},e||{},g||{});if(h=="input")this._connectDatepicker(a,k);else j&&this._inlineDatepicker(a,k)},_newInst:function(a,e){return{id:a[0].id.replace(/([^A-Za-z0-9_])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:e,dpDiv:!e?this.dpDiv:b('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}},
_connectDatepicker:function(a,e){var g=b(a);e.append=b([]);e.trigger=b([]);if(!g.hasClass(this.markerClassName)){this._attachments(g,e);g.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(h,j,m){e.settings[j]=m}).bind("getData.datepicker",function(h,j){return this._get(e,j)});this._autoSize(e);b.data(a,"datepicker",e)}},_attachments:function(a,e){var g=this._get(e,"appendText"),h=this._get(e,"isRTL");e.append&&
e.append.remove();if(g){e.append=b('<span class="'+this._appendClass+'">'+g+"</span>");a[h?"before":"after"](e.append)}a.unbind("focus",this._showDatepicker);e.trigger&&e.trigger.remove();g=this._get(e,"showOn");if(g=="focus"||g=="both")a.focus(this._showDatepicker);if(g=="button"||g=="both"){g=this._get(e,"buttonText");var j=this._get(e,"buttonImage");e.trigger=b(this._get(e,"buttonImageOnly")?b("<img/>").addClass(this._triggerClass).attr({src:j,alt:g,title:g}):b('<button type="button"></button>').addClass(this._triggerClass).html(j==
""?g:b("<img/>").attr({src:j,alt:g,title:g})));a[h?"before":"after"](e.trigger);e.trigger.click(function(){b.datepicker._datepickerShowing&&b.datepicker._lastInput==a[0]?b.datepicker._hideDatepicker():b.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var e=new Date(2009,11,20),g=this._get(a,"dateFormat");if(g.match(/[DM]/)){var h=function(j){for(var m=0,k=0,i=0;i<j.length;i++)if(j[i].length>m){m=j[i].length;k=i}return k};e.setMonth(h(this._get(a,
g.match(/MM/)?"monthNames":"monthNamesShort")));e.setDate(h(this._get(a,g.match(/DD/)?"dayNames":"dayNamesShort"))+20-e.getDay())}a.input.attr("size",this._formatDate(a,e).length)}},_inlineDatepicker:function(a,e){var g=b(a);if(!g.hasClass(this.markerClassName)){g.addClass(this.markerClassName).append(e.dpDiv).bind("setData.datepicker",function(h,j,m){e.settings[j]=m}).bind("getData.datepicker",function(h,j){return this._get(e,j)});b.data(a,"datepicker",e);this._setDate(e,this._getDefaultDate(e),
true);this._updateDatepicker(e);this._updateAlternate(e)}},_dialogDatepicker:function(a,e,g,h,j){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=b('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);b("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};b.data(this._dialogInput[0],"datepicker",a)}d(a.settings,h||{});e=e&&e.constructor==
Date?this._formatDate(a,e):e;this._dialogInput.val(e);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");a.settings.onSelect=g;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);
b.blockUI&&b.blockUI(this.dpDiv);b.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var e=b(a),g=b.data(a,"datepicker");if(e.hasClass(this.markerClassName)){var h=a.nodeName.toLowerCase();b.removeData(a,"datepicker");if(h=="input"){g.append.remove();g.trigger.remove();e.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else if(h=="div"||h=="span")e.removeClass(this.markerClassName).empty()}},
_enableDatepicker:function(a){var e=b(a),g=b.data(a,"datepicker");if(e.hasClass(this.markerClassName)){var h=a.nodeName.toLowerCase();if(h=="input"){a.disabled=false;g.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(h=="div"||h=="span")e.children("."+this._inlineClass).children().removeClass("ui-state-disabled");this._disabledInputs=b.map(this._disabledInputs,function(j){return j==a?null:j})}},_disableDatepicker:function(a){var e=
b(a),g=b.data(a,"datepicker");if(e.hasClass(this.markerClassName)){var h=a.nodeName.toLowerCase();if(h=="input"){a.disabled=true;g.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(h=="div"||h=="span")e.children("."+this._inlineClass).children().addClass("ui-state-disabled");this._disabledInputs=b.map(this._disabledInputs,function(j){return j==a?null:j});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;
for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]==a)return true;return false},_getInst:function(a){try{return b.data(a,"datepicker")}catch(e){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(a,e,g){var h=this._getInst(a);if(arguments.length==2&&typeof e=="string")return e=="defaults"?b.extend({},b.datepicker._defaults):h?e=="all"?b.extend({},h.settings):this._get(h,e):null;var j=e||{};if(typeof e=="string"){j={};j[e]=g}if(h){this._curInst==h&&
this._hideDatepicker();var m=this._getDateDatepicker(a,true);d(h.settings,j);this._attachments(b(a),h);this._autoSize(h);this._setDateDatepicker(a,m);this._updateDatepicker(h)}},_changeDatepicker:function(a,e,g){this._optionDatepicker(a,e,g)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,e){if(a=this._getInst(a)){this._setDate(a,e);this._updateDatepicker(a);this._updateAlternate(a)}},_getDateDatepicker:function(a,e){(a=this._getInst(a))&&
!a.inline&&this._setDateFromField(a,e);return a?this._getDate(a):null},_doKeyDown:function(a){var e=b.datepicker._getInst(a.target),g=true,h=e.dpDiv.is(".ui-datepicker-rtl");e._keyEvent=true;if(b.datepicker._datepickerShowing)switch(a.keyCode){case 9:b.datepicker._hideDatepicker();g=false;break;case 13:g=b("td."+b.datepicker._dayOverClass,e.dpDiv).add(b("td."+b.datepicker._currentClass,e.dpDiv));g[0]?b.datepicker._selectDay(a.target,e.selectedMonth,e.selectedYear,g[0]):b.datepicker._hideDatepicker();
return false;case 27:b.datepicker._hideDatepicker();break;case 33:b.datepicker._adjustDate(a.target,a.ctrlKey?-b.datepicker._get(e,"stepBigMonths"):-b.datepicker._get(e,"stepMonths"),"M");break;case 34:b.datepicker._adjustDate(a.target,a.ctrlKey?+b.datepicker._get(e,"stepBigMonths"):+b.datepicker._get(e,"stepMonths"),"M");break;case 35:if(a.ctrlKey||a.metaKey)b.datepicker._clearDate(a.target);g=a.ctrlKey||a.metaKey;break;case 36:if(a.ctrlKey||a.metaKey)b.datepicker._gotoToday(a.target);g=a.ctrlKey||
a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey)b.datepicker._adjustDate(a.target,h?+1:-1,"D");g=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)b.datepicker._adjustDate(a.target,a.ctrlKey?-b.datepicker._get(e,"stepBigMonths"):-b.datepicker._get(e,"stepMonths"),"M");break;case 38:if(a.ctrlKey||a.metaKey)b.datepicker._adjustDate(a.target,-7,"D");g=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||a.metaKey)b.datepicker._adjustDate(a.target,h?-1:+1,"D");g=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)b.datepicker._adjustDate(a.target,
a.ctrlKey?+b.datepicker._get(e,"stepBigMonths"):+b.datepicker._get(e,"stepMonths"),"M");break;case 40:if(a.ctrlKey||a.metaKey)b.datepicker._adjustDate(a.target,+7,"D");g=a.ctrlKey||a.metaKey;break;default:g=false}else if(a.keyCode==36&&a.ctrlKey)b.datepicker._showDatepicker(this);else g=false;if(g){a.preventDefault();a.stopPropagation()}},_doKeyPress:function(a){var e=b.datepicker._getInst(a.target);if(b.datepicker._get(e,"constrainInput")){e=b.datepicker._possibleChars(b.datepicker._get(e,"dateFormat"));
var g=String.fromCharCode(a.charCode==undefined?a.keyCode:a.charCode);return a.ctrlKey||g<" "||!e||e.indexOf(g)>-1}},_doKeyUp:function(a){a=b.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal)try{if(b.datepicker.parseDate(b.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,b.datepicker._getFormatConfig(a))){b.datepicker._setDateFromField(a);b.datepicker._updateAlternate(a);b.datepicker._updateDatepicker(a)}}catch(e){b.datepicker.log(e)}return true},_showDatepicker:function(a){a=a.target||
a;if(a.nodeName.toLowerCase()!="input")a=b("input",a.parentNode)[0];if(!(b.datepicker._isDisabledDatepicker(a)||b.datepicker._lastInput==a)){var e=b.datepicker._getInst(a);b.datepicker._curInst&&b.datepicker._curInst!=e&&b.datepicker._curInst.dpDiv.stop(true,true);var g=b.datepicker._get(e,"beforeShow");d(e.settings,g?g.apply(a,[a,e]):{});e.lastVal=null;b.datepicker._lastInput=a;b.datepicker._setDateFromField(e);if(b.datepicker._inDialog)a.value="";if(!b.datepicker._pos){b.datepicker._pos=b.datepicker._findPos(a);
b.datepicker._pos[1]+=a.offsetHeight}var h=false;b(a).parents().each(function(){h|=b(this).css("position")=="fixed";return!h});if(h&&b.browser.opera){b.datepicker._pos[0]-=document.documentElement.scrollLeft;b.datepicker._pos[1]-=document.documentElement.scrollTop}g={left:b.datepicker._pos[0],top:b.datepicker._pos[1]};b.datepicker._pos=null;e.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});b.datepicker._updateDatepicker(e);g=b.datepicker._checkOffset(e,g,h);e.dpDiv.css({position:b.datepicker._inDialog&&
b.blockUI?"static":h?"fixed":"absolute",display:"none",left:g.left+"px",top:g.top+"px"});if(!e.inline){g=b.datepicker._get(e,"showAnim");var j=b.datepicker._get(e,"duration"),m=function(){b.datepicker._datepickerShowing=true;var k=b.datepicker._getBorders(e.dpDiv);e.dpDiv.find("iframe.ui-datepicker-cover").css({left:-k[0],top:-k[1],width:e.dpDiv.outerWidth(),height:e.dpDiv.outerHeight()})};e.dpDiv.zIndex(b(a).zIndex()+1);b.effects&&b.effects[g]?e.dpDiv.show(g,b.datepicker._get(e,"showOptions"),j,
m):e.dpDiv[g||"show"](g?j:null,m);if(!g||!j)m();e.input.is(":visible")&&!e.input.is(":disabled")&&e.input.focus();b.datepicker._curInst=e}}},_updateDatepicker:function(a){var e=this,g=b.datepicker._getBorders(a.dpDiv);a.dpDiv.empty().append(this._generateHTML(a)).find("iframe.ui-datepicker-cover").css({left:-g[0],top:-g[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){b(this).removeClass("ui-state-hover");
this.className.indexOf("ui-datepicker-prev")!=-1&&b(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&b(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){if(!e._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])){b(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");b(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&b(this).addClass("ui-datepicker-prev-hover");
this.className.indexOf("ui-datepicker-next")!=-1&&b(this).addClass("ui-datepicker-next-hover")}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();g=this._getNumberOfMonths(a);var h=g[1];h>1?a.dpDiv.addClass("ui-datepicker-multi-"+h).css("width",17*h+"em"):a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");a.dpDiv[(g[0]!=1||g[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");
a==b.datepicker._curInst&&b.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input.focus()},_getBorders:function(a){var e=function(g){return{thin:1,medium:2,thick:3}[g]||g};return[parseFloat(e(a.css("border-left-width"))),parseFloat(e(a.css("border-top-width")))]},_checkOffset:function(a,e,g){var h=a.dpDiv.outerWidth(),j=a.dpDiv.outerHeight(),m=a.input?a.input.outerWidth():0,k=a.input?a.input.outerHeight():0,i=document.documentElement.clientWidth+b(document).scrollLeft(),
l=document.documentElement.clientHeight+b(document).scrollTop();e.left-=this._get(a,"isRTL")?h-m:0;e.left-=g&&e.left==a.input.offset().left?b(document).scrollLeft():0;e.top-=g&&e.top==a.input.offset().top+k?b(document).scrollTop():0;e.left-=Math.min(e.left,e.left+h>i&&i>h?Math.abs(e.left+h-i):0);e.top-=Math.min(e.top,e.top+j>l&&l>j?Math.abs(j+k):0);return e},_findPos:function(a){for(var e=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1);)a=a[e?"previousSibling":"nextSibling"];
a=b(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var e=this._curInst;if(!(!e||a&&e!=b.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(e,"showAnim");var g=this._get(e,"duration"),h=function(){b.datepicker._tidyDialog(e);this._curInst=null};b.effects&&b.effects[a]?e.dpDiv.hide(a,b.datepicker._get(e,"showOptions"),g,h):e.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?g:null,h);a||h();if(a=this._get(e,"onClose"))a.apply(e.input?e.input[0]:null,[e.input?e.input.val():
"",e]);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(b.blockUI){b.unblockUI();b("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(b.datepicker._curInst){a=b(a.target);a[0].id!=b.datepicker._mainDivId&&a.parents("#"+b.datepicker._mainDivId).length==0&&!a.hasClass(b.datepicker.markerClassName)&&
!a.hasClass(b.datepicker._triggerClass)&&b.datepicker._datepickerShowing&&!(b.datepicker._inDialog&&b.blockUI)&&b.datepicker._hideDatepicker()}},_adjustDate:function(a,e,g){a=b(a);var h=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(h,e+(g=="M"?this._get(h,"showCurrentAtPos"):0),g);this._updateDatepicker(h)}},_gotoToday:function(a){a=b(a);var e=this._getInst(a[0]);if(this._get(e,"gotoCurrent")&&e.currentDay){e.selectedDay=e.currentDay;e.drawMonth=e.selectedMonth=e.currentMonth;
e.drawYear=e.selectedYear=e.currentYear}else{var g=new Date;e.selectedDay=g.getDate();e.drawMonth=e.selectedMonth=g.getMonth();e.drawYear=e.selectedYear=g.getFullYear()}this._notifyChange(e);this._adjustDate(a)},_selectMonthYear:function(a,e,g){a=b(a);var h=this._getInst(a[0]);h._selectingMonthYear=false;h["selected"+(g=="M"?"Month":"Year")]=h["draw"+(g=="M"?"Month":"Year")]=parseInt(e.options[e.selectedIndex].value,10);this._notifyChange(h);this._adjustDate(a)},_clickMonthYear:function(a){a=this._getInst(b(a)[0]);
a.input&&a._selectingMonthYear&&!b.browser.msie&&a.input.focus();a._selectingMonthYear=!a._selectingMonthYear},_selectDay:function(a,e,g,h){var j=b(a);if(!(b(h).hasClass(this._unselectableClass)||this._isDisabledDatepicker(j[0]))){j=this._getInst(j[0]);j.selectedDay=j.currentDay=b("a",h).html();j.selectedMonth=j.currentMonth=e;j.selectedYear=j.currentYear=g;this._selectDate(a,this._formatDate(j,j.currentDay,j.currentMonth,j.currentYear))}},_clearDate:function(a){a=b(a);this._getInst(a[0]);this._selectDate(a,
"")},_selectDate:function(a,e){a=this._getInst(b(a)[0]);e=e!=null?e:this._formatDate(a);a.input&&a.input.val(e);this._updateAlternate(a);var g=this._get(a,"onSelect");if(g)g.apply(a.input?a.input[0]:null,[e,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a);else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var e=this._get(a,"altField");if(e){var g=this._get(a,"altFormat")||
this._get(a,"dateFormat"),h=this._getDate(a),j=this.formatDate(g,h,this._getFormatConfig(a));b(e).each(function(){b(this).val(j)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var e=a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((e-a)/864E5)/7)+1},parseDate:function(a,e,g){if(a==null||e==null)throw"Invalid arguments";e=typeof e=="object"?e.toString():e+"";if(e=="")return null;
for(var h=(g?g.shortYearCutoff:null)||this._defaults.shortYearCutoff,j=(g?g.dayNamesShort:null)||this._defaults.dayNamesShort,m=(g?g.dayNames:null)||this._defaults.dayNames,k=(g?g.monthNamesShort:null)||this._defaults.monthNamesShort,i=(g?g.monthNames:null)||this._defaults.monthNames,l=g=-1,n=-1,o=-1,q=false,v=function(z){(z=E+1<a.length&&a.charAt(E+1)==z)&&E++;return z},p=function(z){v(z);z=new RegExp("^\\d{1,"+(z=="@"?14:z=="!"?20:z=="y"?4:z=="o"?3:2)+"}");z=e.substring(y).match(z);if(!z)throw"Missing number at position "+
y;y+=z[0].length;return parseInt(z[0],10)},u=function(z,G,O){z=v(z)?O:G;for(G=0;G<z.length;G++)if(e.substr(y,z[G].length)==z[G]){y+=z[G].length;return G+1}throw"Unknown name at position "+y;},x=function(){if(e.charAt(y)!=a.charAt(E))throw"Unexpected literal at position "+y;y++},y=0,E=0;E<a.length;E++)if(q)if(a.charAt(E)=="'"&&!v("'"))q=false;else x();else switch(a.charAt(E)){case "d":n=p("d");break;case "D":u("D",j,m);break;case "o":o=p("o");break;case "m":l=p("m");break;case "M":l=u("M",k,i);break;
case "y":g=p("y");break;case "@":var F=new Date(p("@"));g=F.getFullYear();l=F.getMonth()+1;n=F.getDate();break;case "!":F=new Date((p("!")-this._ticksTo1970)/1E4);g=F.getFullYear();l=F.getMonth()+1;n=F.getDate();break;case "'":if(v("'"))x();else q=true;break;default:x()}if(g==-1)g=(new Date).getFullYear();else if(g<100)g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(g<=h?0:-100);if(o>-1){l=1;n=o;do{h=this._getDaysInMonth(g,l-1);if(n<=h)break;l++;n-=h}while(1)}F=this._daylightSavingAdjust(new Date(g,
l-1,n));if(F.getFullYear()!=g||F.getMonth()+1!=l||F.getDate()!=n)throw"Invalid date";return F},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(a,e,g){if(!e)return"";var h=(g?g.dayNamesShort:null)||this._defaults.dayNamesShort,j=(g?
g.dayNames:null)||this._defaults.dayNames,m=(g?g.monthNamesShort:null)||this._defaults.monthNamesShort;g=(g?g.monthNames:null)||this._defaults.monthNames;var k=function(v){(v=q+1<a.length&&a.charAt(q+1)==v)&&q++;return v},i=function(v,p,u){p=""+p;if(k(v))for(;p.length<u;)p="0"+p;return p},l=function(v,p,u,x){return k(v)?x[p]:u[p]},n="",o=false;if(e)for(var q=0;q<a.length;q++)if(o)if(a.charAt(q)=="'"&&!k("'"))o=false;else n+=a.charAt(q);else switch(a.charAt(q)){case "d":n+=i("d",e.getDate(),2);break;
case "D":n+=l("D",e.getDay(),h,j);break;case "o":n+=i("o",(e.getTime()-(new Date(e.getFullYear(),0,0)).getTime())/864E5,3);break;case "m":n+=i("m",e.getMonth()+1,2);break;case "M":n+=l("M",e.getMonth(),m,g);break;case "y":n+=k("y")?e.getFullYear():(e.getYear()%100<10?"0":"")+e.getYear()%100;break;case "@":n+=e.getTime();break;case "!":n+=e.getTime()*1E4+this._ticksTo1970;break;case "'":if(k("'"))n+="'";else o=true;break;default:n+=a.charAt(q)}return n},_possibleChars:function(a){for(var e="",g=false,
h=function(m){(m=j+1<a.length&&a.charAt(j+1)==m)&&j++;return m},j=0;j<a.length;j++)if(g)if(a.charAt(j)=="'"&&!h("'"))g=false;else e+=a.charAt(j);else switch(a.charAt(j)){case "d":case "m":case "y":case "@":e+="0123456789";break;case "D":case "M":return null;case "'":if(h("'"))e+="'";else g=true;break;default:e+=a.charAt(j)}return e},_get:function(a,e){return a.settings[e]!==undefined?a.settings[e]:this._defaults[e]},_setDateFromField:function(a,e){if(a.input.val()!=a.lastVal){var g=this._get(a,"dateFormat"),
h=a.lastVal=a.input?a.input.val():null,j,m;j=m=this._getDefaultDate(a);var k=this._getFormatConfig(a);try{j=this.parseDate(g,h,k)||m}catch(i){this.log(i);h=e?"":h}a.selectedDay=j.getDate();a.drawMonth=a.selectedMonth=j.getMonth();a.drawYear=a.selectedYear=j.getFullYear();a.currentDay=h?j.getDate():0;a.currentMonth=h?j.getMonth():0;a.currentYear=h?j.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},
_determineDate:function(a,e,g){var h=function(m){var k=new Date;k.setDate(k.getDate()+m);return k},j=function(m){try{return b.datepicker.parseDate(b.datepicker._get(a,"dateFormat"),m,b.datepicker._getFormatConfig(a))}catch(k){}var i=(m.toLowerCase().match(/^c/)?b.datepicker._getDate(a):null)||new Date,l=i.getFullYear(),n=i.getMonth();i=i.getDate();for(var o=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,q=o.exec(m);q;){switch(q[2]||"d"){case "d":case "D":i+=parseInt(q[1],10);break;case "w":case "W":i+=parseInt(q[1],
10)*7;break;case "m":case "M":n+=parseInt(q[1],10);i=Math.min(i,b.datepicker._getDaysInMonth(l,n));break;case "y":case "Y":l+=parseInt(q[1],10);i=Math.min(i,b.datepicker._getDaysInMonth(l,n));break}q=o.exec(m)}return new Date(l,n,i)};if(e=(e=e==null?g:typeof e=="string"?j(e):typeof e=="number"?isNaN(e)?g:h(e):e)&&e.toString()=="Invalid Date"?g:e){e.setHours(0);e.setMinutes(0);e.setSeconds(0);e.setMilliseconds(0)}return this._daylightSavingAdjust(e)},_daylightSavingAdjust:function(a){if(!a)return null;
a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(a,e,g){var h=!e,j=a.selectedMonth,m=a.selectedYear;e=this._restrictMinMax(a,this._determineDate(a,e,new Date));a.selectedDay=a.currentDay=e.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=e.getMonth();a.drawYear=a.selectedYear=a.currentYear=e.getFullYear();if((j!=a.selectedMonth||m!=a.selectedYear)&&!g)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(h?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||
a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var e=new Date;e=this._daylightSavingAdjust(new Date(e.getFullYear(),e.getMonth(),e.getDate()));var g=this._get(a,"isRTL"),h=this._get(a,"showButtonPanel"),j=this._get(a,"hideIfNoPrevNext"),m=this._get(a,"navigationAsDateFormat"),k=this._getNumberOfMonths(a),i=this._get(a,"showCurrentAtPos"),l=this._get(a,"stepMonths"),n=k[0]!=1||k[1]!=1,o=this._daylightSavingAdjust(!a.currentDay?
new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),q=this._getMinMaxDate(a,"min"),v=this._getMinMaxDate(a,"max");i=a.drawMonth-i;var p=a.drawYear;if(i<0){i+=12;p--}if(v){var u=this._daylightSavingAdjust(new Date(v.getFullYear(),v.getMonth()-k[0]*k[1]+1,v.getDate()));for(u=q&&u<q?q:u;this._daylightSavingAdjust(new Date(p,i,1))>u;){i--;if(i<0){i=11;p--}}}a.drawMonth=i;a.drawYear=p;u=this._get(a,"prevText");u=!m?u:this.formatDate(u,this._daylightSavingAdjust(new Date(p,i-l,1)),this._getFormatConfig(a));
u=this._canAdjustMonth(a,-1,p,i)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+f+".datepicker._adjustDate('#"+a.id+"', -"+l+", 'M');\" title=\""+u+'"><span class="ui-icon ui-icon-circle-triangle-'+(g?"e":"w")+'">'+u+"</span></a>":j?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+u+'"><span class="ui-icon ui-icon-circle-triangle-'+(g?"e":"w")+'">'+u+"</span></a>";var x=this._get(a,"nextText");x=!m?x:this.formatDate(x,this._daylightSavingAdjust(new Date(p,
i+l,1)),this._getFormatConfig(a));j=this._canAdjustMonth(a,+1,p,i)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+f+".datepicker._adjustDate('#"+a.id+"', +"+l+", 'M');\" title=\""+x+'"><span class="ui-icon ui-icon-circle-triangle-'+(g?"w":"e")+'">'+x+"</span></a>":j?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+x+'"><span class="ui-icon ui-icon-circle-triangle-'+(g?"w":"e")+'">'+x+"</span></a>";l=this._get(a,"currentText");x=this._get(a,"gotoCurrent")&&
a.currentDay?o:e;l=!m?l:this.formatDate(l,x,this._getFormatConfig(a));m=!a.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(a,"closeText")+"</button>":"";h=h?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(g?m:"")+(this._isInRange(a,x)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+
f+".datepicker._gotoToday('#"+a.id+"');\">"+l+"</button>":"")+(g?"":m)+"</div>":"";m=parseInt(this._get(a,"firstDay"),10);m=isNaN(m)?0:m;l=this._get(a,"showWeek");x=this._get(a,"dayNames");this._get(a,"dayNamesShort");var y=this._get(a,"dayNamesMin"),E=this._get(a,"monthNames"),F=this._get(a,"monthNamesShort"),z=this._get(a,"beforeShowDay"),G=this._get(a,"showOtherMonths"),O=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var P=this._getDefaultDate(a),r="",s=0;s<k[0];s++){for(var w=
"",D=0;D<k[1];D++){var C=this._daylightSavingAdjust(new Date(p,i,a.selectedDay)),B=" ui-corner-all",H="";if(n){H+='<div class="ui-datepicker-group';if(k[1]>1)switch(D){case 0:H+=" ui-datepicker-group-first";B=" ui-corner-"+(g?"right":"left");break;case k[1]-1:H+=" ui-datepicker-group-last";B=" ui-corner-"+(g?"left":"right");break;default:H+=" ui-datepicker-group-middle";B="";break}H+='">'}H+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+B+'">'+(/all|left/.test(B)&&s==0?g?
j:u:"")+(/all|right/.test(B)&&s==0?g?u:j:"")+this._generateMonthYearHeader(a,i,p,q,v,s>0||D>0,E,F)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var L=l?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(B=0;B<7;B++){var A=(B+m)%7;L+="<th"+((B+m+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+x[A]+'">'+y[A]+"</span></th>"}H+=L+"</tr></thead><tbody>";L=this._getDaysInMonth(p,i);if(p==a.selectedYear&&i==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,
L);B=(this._getFirstDayOfMonth(p,i)-m+7)%7;L=n?6:Math.ceil((B+L)/7);A=this._daylightSavingAdjust(new Date(p,i,1-B));for(var N=0;N<L;N++){H+="<tr>";var R=!l?"":'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(A)+"</td>";for(B=0;B<7;B++){var M=z?z.apply(a.input?a.input[0]:null,[A]):[true,""],J=A.getMonth()!=i,I=J&&!O||!M[0]||q&&A<q||v&&A>v;R+='<td class="'+((B+m+6)%7>=5?" ui-datepicker-week-end":"")+(J?" ui-datepicker-other-month":"")+(A.getTime()==C.getTime()&&i==a.selectedMonth&&
a._keyEvent||P.getTime()==A.getTime()&&P.getTime()==C.getTime()?" "+this._dayOverClass:"")+(I?" "+this._unselectableClass+" ui-state-disabled":"")+(J&&!G?"":" "+M[1]+(A.getTime()==o.getTime()?" "+this._currentClass:"")+(A.getTime()==e.getTime()?" ui-datepicker-today":""))+'"'+((!J||G)&&M[2]?' title="'+M[2]+'"':"")+(I?"":' onclick="DP_jQuery_'+f+".datepicker._selectDay('#"+a.id+"',"+A.getMonth()+","+A.getFullYear()+', this);return false;"')+">"+(J&&!G?"&#xa0;":I?'<span class="ui-state-default">'+A.getDate()+
"</span>":'<a class="ui-state-default'+(A.getTime()==e.getTime()?" ui-state-highlight":"")+(A.getTime()==o.getTime()?" ui-state-active":"")+(J?" ui-priority-secondary":"")+'" href="#">'+A.getDate()+"</a>")+"</td>";A.setDate(A.getDate()+1);A=this._daylightSavingAdjust(A)}H+=R+"</tr>"}i++;if(i>11){i=0;p++}H+="</tbody></table>"+(n?"</div>"+(k[0]>0&&D==k[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");w+=H}r+=w}r+=h+(b.browser.msie&&parseInt(b.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':
"");a._keyEvent=false;return r},_generateMonthYearHeader:function(a,e,g,h,j,m,k,i){var l=this._get(a,"changeMonth"),n=this._get(a,"changeYear"),o=this._get(a,"showMonthAfterYear"),q='<div class="ui-datepicker-title">',v="";if(m||!l)v+='<span class="ui-datepicker-month">'+k[e]+"</span>";else{k=h&&h.getFullYear()==g;var p=j&&j.getFullYear()==g;v+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+f+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" onclick=\"DP_jQuery_"+f+".datepicker._clickMonthYear('#"+
a.id+"');\">";for(var u=0;u<12;u++)if((!k||u>=h.getMonth())&&(!p||u<=j.getMonth()))v+='<option value="'+u+'"'+(u==e?' selected="selected"':"")+">"+i[u]+"</option>";v+="</select>"}o||(q+=v+(m||!(l&&n)?"&#xa0;":""));if(m||!n)q+='<span class="ui-datepicker-year">'+g+"</span>";else{i=this._get(a,"yearRange").split(":");var x=(new Date).getFullYear();k=function(y){y=y.match(/c[+-].*/)?g+parseInt(y.substring(1),10):y.match(/[+-].*/)?x+parseInt(y,10):parseInt(y,10);return isNaN(y)?x:y};e=k(i[0]);i=Math.max(e,
k(i[1]||""));e=h?Math.max(e,h.getFullYear()):e;i=j?Math.min(i,j.getFullYear()):i;for(q+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+f+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+f+".datepicker._clickMonthYear('#"+a.id+"');\">";e<=i;e++)q+='<option value="'+e+'"'+(e==g?' selected="selected"':"")+">"+e+"</option>";q+="</select>"}q+=this._get(a,"yearSuffix");if(o)q+=(m||!(l&&n)?"&#xa0;":"")+v;q+="</div>";return q},_adjustInstDate:function(a,e,g){var h=
a.drawYear+(g=="Y"?e:0),j=a.drawMonth+(g=="M"?e:0);e=Math.min(a.selectedDay,this._getDaysInMonth(h,j))+(g=="D"?e:0);h=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(h,j,e)));a.selectedDay=h.getDate();a.drawMonth=a.selectedMonth=h.getMonth();a.drawYear=a.selectedYear=h.getFullYear();if(g=="M"||g=="Y")this._notifyChange(a)},_restrictMinMax:function(a,e){var g=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");e=g&&e<g?g:e;return e=a&&e>a?a:e},_notifyChange:function(a){var e=this._get(a,
"onChangeMonthYear");if(e)e.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,e){return this._determineDate(a,this._get(a,e+"Date"),null)},_getDaysInMonth:function(a,e){return 32-(new Date(a,e,32)).getDate()},_getFirstDayOfMonth:function(a,e){return(new Date(a,e,1)).getDay()},_canAdjustMonth:function(a,e,g,h){var j=this._getNumberOfMonths(a);
g=this._daylightSavingAdjust(new Date(g,h+(e<0?e:j[0]*j[1]),1));e<0&&g.setDate(this._getDaysInMonth(g.getFullYear(),g.getMonth()));return this._isInRange(a,g)},_isInRange:function(a,e){var g=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!g||e.getTime()>=g.getTime())&&(!a||e.getTime()<=a.getTime())},_getFormatConfig:function(a){var e=this._get(a,"shortYearCutoff");e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);return{shortYearCutoff:e,dayNamesShort:this._get(a,
"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,e,g,h){if(!e){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}e=e?typeof e=="object"?e:this._daylightSavingAdjust(new Date(h,g,e)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}});b.fn.datepicker=
function(a){if(!b.datepicker.initialized){b(document).mousedown(b.datepicker._checkExternalClick).find("body").append(b.datepicker.dpDiv);b.datepicker.initialized=true}var e=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,[this[0]].concat(e));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,[this[0]].concat(e));
return this.each(function(){typeof a=="string"?b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,[this].concat(e)):b.datepicker._attachDatepicker(this,a)})};b.datepicker=new c;b.datepicker.initialized=false;b.datepicker.uuid=(new Date).getTime();b.datepicker.version="1.8.2";window["DP_jQuery_"+f]=b})(jQuery);
(function(b){b.widget("ui.dialog",{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:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");var c=this,d=c.options,f=d.title||c.originalTitle||"&#160;",a=b.ui.dialog.getTitleId(c.element),e=(c.uiDialog=b("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+
d.dialogClass).css({zIndex:d.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(j){if(d.closeOnEscape&&j.keyCode&&j.keyCode===b.ui.keyCode.ESCAPE){c.close(j);j.preventDefault()}}).attr({role:"dialog","aria-labelledby":a}).mousedown(function(j){c.moveToTop(false,j)});c.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(e);var g=(c.uiDialogTitlebar=b("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(e),
h=b('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(j){c.close(j);return false}).appendTo(g);(c.uiDialogTitlebarCloseText=b("<span></span>")).addClass("ui-icon ui-icon-closethick").text(d.closeText).appendTo(h);b("<span></span>").addClass("ui-dialog-title").attr("id",
a).html(f).prependTo(g);if(b.isFunction(d.beforeclose)&&!b.isFunction(d.beforeClose))d.beforeClose=d.beforeclose;g.find("*").add(g).disableSelection();d.draggable&&b.fn.draggable&&c._makeDraggable();d.resizable&&b.fn.resizable&&c._makeResizable();c._createButtons(d.buttons);c._isOpen=false;b.fn.bgiframe&&e.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){this.overlay&&this.overlay.destroy();this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");
this.uiDialog.remove();this.originalTitle&&this.element.attr("title",this.originalTitle);return this},widget:function(){return this.uiDialog},close:function(c){var d=this,f;if(false!==d._trigger("beforeClose",c)){d.overlay&&d.overlay.destroy();d.uiDialog.unbind("keypress.ui-dialog");d._isOpen=false;if(d.options.hide)d.uiDialog.hide(d.options.hide,function(){d._trigger("close",c)});else{d.uiDialog.hide();d._trigger("close",c)}b.ui.dialog.overlay.resize();if(d.options.modal){f=0;b(".ui-dialog").each(function(){if(this!==
d.uiDialog[0])f=Math.max(f,b(this).css("z-index"))});b.ui.dialog.maxZ=f}return d}},isOpen:function(){return this._isOpen},moveToTop:function(c,d){var f=this.options;if(f.modal&&!c||!f.stack&&!f.modal)return this._trigger("focus",d);if(f.zIndex>b.ui.dialog.maxZ)b.ui.dialog.maxZ=f.zIndex;if(this.overlay){b.ui.dialog.maxZ+=1;this.overlay.$el.css("z-index",b.ui.dialog.overlay.maxZ=b.ui.dialog.maxZ)}c={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};b.ui.dialog.maxZ+=
1;this.uiDialog.css("z-index",b.ui.dialog.maxZ);this.element.attr(c);this._trigger("focus",d);return this},open:function(){if(!this._isOpen){var c=this.options,d=this.uiDialog;this.overlay=c.modal?new b.ui.dialog.overlay(this):null;d.next().length&&d.appendTo("body");this._size();this._position(c.position);d.show(c.show);this.moveToTop(true);c.modal&&d.bind("keypress.ui-dialog",function(f){if(f.keyCode===b.ui.keyCode.TAB){var a=b(":tabbable",this),e=a.filter(":first");a=a.filter(":last");if(f.target===
a[0]&&!f.shiftKey){e.focus(1);return false}else if(f.target===e[0]&&f.shiftKey){a.focus(1);return false}}});b([]).add(d.find(".ui-dialog-content :tabbable:first")).add(d.find(".ui-dialog-buttonpane :tabbable:first")).add(d).filter(":first").focus();this._trigger("open");this._isOpen=true;return this}},_createButtons:function(c){var d=this,f=false,a=b("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");d.uiDialog.find(".ui-dialog-buttonpane").remove();typeof c==="object"&&
c!==null&&b.each(c,function(){return!(f=true)});if(f){b.each(c,function(e,g){e=b('<button type="button"></button>').text(e).click(function(){g.apply(d.element[0],arguments)}).appendTo(a);b.fn.button&&e.button()});a.appendTo(d.uiDialog)}},_makeDraggable:function(){function c(g){return{position:g.position,offset:g.offset}}var d=this,f=d.options,a=b(document),e;d.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(g,
h){e=f.height==="auto"?"auto":b(this).height();b(this).height(b(this).height()).addClass("ui-dialog-dragging");d._trigger("dragStart",g,c(h))},drag:function(g,h){d._trigger("drag",g,c(h))},stop:function(g,h){f.position=[h.position.left-a.scrollLeft(),h.position.top-a.scrollTop()];b(this).removeClass("ui-dialog-dragging").height(e);d._trigger("dragStop",g,c(h));b.ui.dialog.overlay.resize()}})},_makeResizable:function(c){function d(g){return{originalPosition:g.originalPosition,originalSize:g.originalSize,
position:g.position,size:g.size}}c=c===undefined?this.options.resizable:c;var f=this,a=f.options,e=f.uiDialog.css("position");c=typeof c==="string"?c:"n,e,s,w,se,sw,ne,nw";f.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:f.element,maxWidth:a.maxWidth,maxHeight:a.maxHeight,minWidth:a.minWidth,minHeight:f._minHeight(),handles:c,start:function(g,h){b(this).addClass("ui-dialog-resizing");f._trigger("resizeStart",g,d(h))},resize:function(g,h){f._trigger("resize",g,d(h))},
stop:function(g,h){b(this).removeClass("ui-dialog-resizing");a.height=b(this).height();a.width=b(this).width();f._trigger("resizeStop",g,d(h));b.ui.dialog.overlay.resize()}}).css("position",e).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var c=this.options;return c.height==="auto"?c.minHeight:Math.min(c.minHeight,c.height)},_position:function(c){var d=[],f=[0,0];c=c||b.ui.dialog.prototype.options.position;if(typeof c==="string"||typeof c==="object"&&
"0"in c){d=c.split?c.split(" "):[c[0],c[1]];if(d.length===1)d[1]=d[0];b.each(["left","top"],function(a,e){if(+d[a]===d[a]){f[a]=d[a];d[a]=e}})}else if(typeof c==="object"){if("left"in c){d[0]="left";f[0]=c.left}else if("right"in c){d[0]="right";f[0]=-c.right}if("top"in c){d[1]="top";f[1]=c.top}else if("bottom"in c){d[1]="bottom";f[1]=-c.bottom}}(c=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position({my:d.join(" "),at:d.join(" "),offset:f.join(" "),of:window,
collision:"fit",using:function(a){var e=b(this).css(a).offset().top;e<0&&b(this).css("top",a.top-e)}});c||this.uiDialog.hide()},_setOption:function(c,d){var f=this.uiDialog,a=f.is(":data(resizable)"),e=false;switch(c){case "beforeclose":c="beforeClose";break;case "buttons":this._createButtons(d);break;case "closeText":this.uiDialogTitlebarCloseText.text(""+d);break;case "dialogClass":f.removeClass(this.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+d);break;case "disabled":d?
f.addClass("ui-dialog-disabled"):f.removeClass("ui-dialog-disabled");break;case "draggable":d?this._makeDraggable():f.draggable("destroy");break;case "height":e=true;break;case "maxHeight":a&&f.resizable("option","maxHeight",d);e=true;break;case "maxWidth":a&&f.resizable("option","maxWidth",d);e=true;break;case "minHeight":a&&f.resizable("option","minHeight",d);e=true;break;case "minWidth":a&&f.resizable("option","minWidth",d);e=true;break;case "position":this._position(d);break;case "resizable":a&&
!d&&f.resizable("destroy");a&&typeof d==="string"&&f.resizable("option","handles",d);!a&&d!==false&&this._makeResizable(d);break;case "title":b(".ui-dialog-title",this.uiDialogTitlebar).html(""+(d||"&#160;"));break;case "width":e=true;break}b.Widget.prototype._setOption.apply(this,arguments);e&&this._size()},_size:function(){var c=this.options,d;this.element.css({width:"auto",minHeight:0,height:0});d=this.uiDialog.css({height:"auto",width:c.width}).height();this.element.css(c.height==="auto"?{minHeight:Math.max(c.minHeight-
d,0),height:"auto"}:{minHeight:0,height:Math.max(c.height-d,0)}).show();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});b.extend(b.ui.dialog,{version:"1.8.2",uuid:0,maxZ:0,getTitleId:function(c){c=c.attr("id");if(!c){this.uuid+=1;c=this.uuid}return"ui-dialog-title-"+c},overlay:function(c){this.$el=b.ui.dialog.overlay.create(c)}});b.extend(b.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:b.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),
function(c){return c+".dialog-overlay"}).join(" "),create:function(c){if(this.instances.length===0){setTimeout(function(){b.ui.dialog.overlay.instances.length&&b(document).bind(b.ui.dialog.overlay.events,function(f){return b(f.target).zIndex()>=b.ui.dialog.overlay.maxZ})},1);b(document).bind("keydown.dialog-overlay",function(f){if(c.options.closeOnEscape&&f.keyCode&&f.keyCode===b.ui.keyCode.ESCAPE){c.close(f);f.preventDefault()}});b(window).bind("resize.dialog-overlay",b.ui.dialog.overlay.resize)}var d=
(this.oldInstances.pop()||b("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});b.fn.bgiframe&&d.bgiframe();this.instances.push(d);return d},destroy:function(c){this.oldInstances.push(this.instances.splice(b.inArray(c,this.instances),1)[0]);this.instances.length===0&&b([document,window]).unbind(".dialog-overlay");c.remove();var d=0;b.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var c,
d;if(b.browser.msie&&b.browser.version<7){c=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);d=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return c<d?b(window).height()+"px":c+"px"}else return b(document).height()+"px"},width:function(){var c,d;if(b.browser.msie&&b.browser.version<7){c=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);d=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return c<
d?b(window).width()+"px":c+"px"}else return b(document).width()+"px"},resize:function(){var c=b([]);b.each(b.ui.dialog.overlay.instances,function(){c=c.add(this)});c.css({width:0,height:0}).css({width:b.ui.dialog.overlay.width(),height:b.ui.dialog.overlay.height()})}});b.extend(b.ui.dialog.overlay.prototype,{destroy:function(){b.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
(function(b){b.ui=b.ui||{};var c=/left|center|right/,d=/top|center|bottom/,f=b.fn.position,a=b.fn.offset;b.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=b.extend({},e);var g=b(e.of),h=(e.collision||"flip").split(" "),j=e.offset?e.offset.split(" "):[0,0],m,k,i;if(e.of.nodeType===9){m=g.width();k=g.height();i={top:0,left:0}}else if(e.of.scrollTo&&e.of.document){m=g.width();k=g.height();i={top:g.scrollTop(),left:g.scrollLeft()}}else if(e.of.preventDefault){e.at="left top";m=k=
0;i={top:e.of.pageY,left:e.of.pageX}}else{m=g.outerWidth();k=g.outerHeight();i=g.offset()}b.each(["my","at"],function(){var l=(e[this]||"").split(" ");if(l.length===1)l=c.test(l[0])?l.concat(["center"]):d.test(l[0])?["center"].concat(l):["center","center"];l[0]=c.test(l[0])?l[0]:"center";l[1]=d.test(l[1])?l[1]:"center";e[this]=l});if(h.length===1)h[1]=h[0];j[0]=parseInt(j[0],10)||0;if(j.length===1)j[1]=j[0];j[1]=parseInt(j[1],10)||0;if(e.at[0]==="right")i.left+=m;else if(e.at[0]==="center")i.left+=
m/2;if(e.at[1]==="bottom")i.top+=k;else if(e.at[1]==="center")i.top+=k/2;i.left+=j[0];i.top+=j[1];return this.each(function(){var l=b(this),n=l.outerWidth(),o=l.outerHeight(),q=b.extend({},i);if(e.my[0]==="right")q.left-=n;else if(e.my[0]==="center")q.left-=n/2;if(e.my[1]==="bottom")q.top-=o;else if(e.my[1]==="center")q.top-=o/2;q.left=parseInt(q.left);q.top=parseInt(q.top);b.each(["left","top"],function(v,p){b.ui.position[h[v]]&&b.ui.position[h[v]][p](q,{targetWidth:m,targetHeight:k,elemWidth:n,
elemHeight:o,offset:j,my:e.my,at:e.at})});b.fn.bgiframe&&l.bgiframe();l.offset(b.extend(q,{using:e.using}))})};b.ui.position={fit:{left:function(e,g){var h=b(window);g=e.left+g.elemWidth-h.width()-h.scrollLeft();e.left=g>0?e.left-g:Math.max(0,e.left)},top:function(e,g){var h=b(window);g=e.top+g.elemHeight-h.height()-h.scrollTop();e.top=g>0?e.top-g:Math.max(0,e.top)}},flip:{left:function(e,g){if(g.at[0]!=="center"){var h=b(window);h=e.left+g.elemWidth-h.width()-h.scrollLeft();var j=g.my[0]==="left"?
-g.elemWidth:g.my[0]==="right"?g.elemWidth:0,m=-2*g.offset[0];e.left+=e.left<0?j+g.targetWidth+m:h>0?j-g.targetWidth+m:0}},top:function(e,g){if(g.at[1]!=="center"){var h=b(window);h=e.top+g.elemHeight-h.height()-h.scrollTop();var j=g.my[1]==="top"?-g.elemHeight:g.my[1]==="bottom"?g.elemHeight:0,m=g.at[1]==="top"?g.targetHeight:-g.targetHeight,k=-2*g.offset[1];e.top+=e.top<0?j+g.targetHeight+k:h>0?j+m+k:0}}}};if(!b.offset.setOffset){b.offset.setOffset=function(e,g){if(/static/.test(b.curCSS(e,"position")))e.style.position=
"relative";var h=b(e),j=h.offset(),m=parseInt(b.curCSS(e,"top",true),10)||0,k=parseInt(b.curCSS(e,"left",true),10)||0;j={top:g.top-j.top+m,left:g.left-j.left+k};"using"in g?g.using.call(e,j):h.css(j)};b.fn.offset=function(e){var g=this[0];if(!g||!g.ownerDocument)return null;if(e)return this.each(function(){b.offset.setOffset(this,e)});return a.call(this)}}})(jQuery);
(function(b){b.widget("ui.progressbar",{options:{value:0},_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this._valueMin(),"aria-valuemax":this._valueMax(),"aria-valuenow":this._value()});this.valueDiv=b("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);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();b.Widget.prototype.destroy.apply(this,arguments)},value:function(c){if(c===undefined)return this._value();this._setOption("value",c);return this},_setOption:function(c,d){switch(c){case "value":this.options.value=d;this._refreshValue();this._trigger("change");break}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var c=this.options.value;if(typeof c!=="number")c=0;if(c<this._valueMin())c=this._valueMin();if(c>this._valueMax())c=this._valueMax();return c},
_valueMin:function(){return 0},_valueMax:function(){return 100},_refreshValue:function(){var c=this.value();this.valueDiv[c===this._valueMax()?"addClass":"removeClass"]("ui-corner-right").width(c+"%");this.element.attr("aria-valuenow",c)}});b.extend(b.ui.progressbar,{version:"1.8.2"})})(jQuery);
(function(b){b.widget("ui.slider",b.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var c=this,d=this.options;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&&this.element.addClass("ui-slider-disabled ui-disabled");
this.range=b([]);if(d.range){if(d.range===true){this.range=b("<div></div>");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]]}else this.range=b("<div></div>");this.range.appendTo(this.element).addClass("ui-slider-range");if(d.range==="min"||d.range==="max")this.range.addClass("ui-slider-range-"+d.range);this.range.addClass("ui-widget-header")}b(".ui-slider-handle",this.element).length===0&&b("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");
if(d.values&&d.values.length)for(;b(".ui-slider-handle",this.element).length<d.values.length;)b("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");this.handles=b(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(f){f.preventDefault()}).hover(function(){d.disabled||b(this).addClass("ui-state-hover")},function(){b(this).removeClass("ui-state-hover")}).focus(function(){if(d.disabled)b(this).blur();
else{b(".ui-slider .ui-state-focus").removeClass("ui-state-focus");b(this).addClass("ui-state-focus")}}).blur(function(){b(this).removeClass("ui-state-focus")});this.handles.each(function(f){b(this).data("index.ui-slider-handle",f)});this.handles.keydown(function(f){var a=true,e=b(this).data("index.ui-slider-handle"),g,h,j;if(!c.options.disabled){switch(f.keyCode){case b.ui.keyCode.HOME:case b.ui.keyCode.END:case b.ui.keyCode.PAGE_UP:case b.ui.keyCode.PAGE_DOWN:case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:a=
false;if(!c._keySliding){c._keySliding=true;b(this).addClass("ui-state-active");g=c._start(f,e);if(g===false)return}break}j=c.options.step;g=c.options.values&&c.options.values.length?(h=c.values(e)):(h=c.value());switch(f.keyCode){case b.ui.keyCode.HOME:h=c._valueMin();break;case b.ui.keyCode.END:h=c._valueMax();break;case b.ui.keyCode.PAGE_UP:h=c._trimAlignValue(g+(c._valueMax()-c._valueMin())/5);break;case b.ui.keyCode.PAGE_DOWN:h=c._trimAlignValue(g-(c._valueMax()-c._valueMin())/5);break;case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:if(g===
c._valueMax())return;h=c._trimAlignValue(g+j);break;case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:if(g===c._valueMin())return;h=c._trimAlignValue(g-j);break}c._slide(f,e,h);return a}}).keyup(function(f){var a=b(this).data("index.ui-slider-handle");if(c._keySliding){c._keySliding=false;c._stop(f,a);c._change(f,a);b(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(c){var d=this.options,f,a,e,g,h,j;if(d.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();f={x:c.pageX,y:c.pageY};a=this._normValueFromMouse(f);e=this._valueMax()-this._valueMin()+1;h=this;this.handles.each(function(m){var k=Math.abs(a-h.values(m));if(e>k){e=k;g=b(this);j=m}});if(d.range===true&&this.values(1)===d.min){j+=1;g=b(this.handles[j])}if(this._start(c,
j)===false)return false;this._mouseSliding=true;h._handleIndex=j;g.addClass("ui-state-active").focus();d=g.offset();this._clickOffset=!b(c.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:c.pageX-d.left-g.width()/2,top:c.pageY-d.top-g.height()/2-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)};a=this._normValueFromMouse(f);this._slide(c,j,a);return this._animateOff=true},_mouseStart:function(){return true},
_mouseDrag:function(c){var d=this._normValueFromMouse({x:c.pageX,y:c.pageY});this._slide(c,this._handleIndex,d);return false},_mouseStop:function(c){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(c,this._handleIndex);this._change(c,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(c){var d;
if(this.orientation==="horizontal"){d=this.elementSize.width;c=c.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{d=this.elementSize.height;c=c.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}d=c/d;if(d>1)d=1;if(d<0)d=0;if(this.orientation==="vertical")d=1-d;c=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+d*c)},_start:function(c,d){var f={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){f.value=
this.values(d);f.values=this.values()}return this._trigger("start",c,f)},_slide:function(c,d,f){var a;if(this.options.values&&this.options.values.length){a=this.values(d?0:1);if(this.options.values.length===2&&this.options.range===true&&(d===0&&f>a||d===1&&f<a))f=a;if(f!==this.values(d)){a=this.values();a[d]=f;c=this._trigger("slide",c,{handle:this.handles[d],value:f,values:a});this.values(d?0:1);c!==false&&this.values(d,f,true)}}else if(f!==this.value()){c=this._trigger("slide",c,{handle:this.handles[d],
value:f});c!==false&&this.value(f)}},_stop:function(c,d){var f={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){f.value=this.values(d);f.values=this.values()}this._trigger("stop",c,f)},_change:function(c,d){if(!this._keySliding&&!this._mouseSliding){var f={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){f.value=this.values(d);f.values=this.values()}this._trigger("change",c,f)}},value:function(c){if(arguments.length){this.options.value=
this._trimAlignValue(c);this._refreshValue();this._change(null,0)}return this._value()},values:function(c,d){var f,a,e;if(arguments.length>1){this.options.values[c]=this._trimAlignValue(d);this._refreshValue();this._change(null,c)}if(arguments.length)if(b.isArray(arguments[0])){f=this.options.values;a=arguments[0];for(e=0;e<f.length;e+=1){f[e]=this._trimAlignValue(a[e]);this._change(null,e)}this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(c):this.value();
else return this._values()},_setOption:function(c,d){var f,a=0;if(b.isArray(this.options.values))a=this.options.values.length;b.Widget.prototype._setOption.apply(this,arguments);switch(c){case "disabled":if(d){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");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(f=0;f<a;f+=1)this._change(null,f);this._animateOff=false;break}},_value:function(){var c=this.options.value;return c=this._trimAlignValue(c)},_values:function(c){var d,f;if(arguments.length){d=this.options.values[c];
return d=this._trimAlignValue(d)}else{d=this.options.values.slice();for(f=0;f<d.length;f+=1)d[f]=this._trimAlignValue(d[f]);return d}},_trimAlignValue:function(c){if(c<this._valueMin())return this._valueMin();if(c>this._valueMax())return this._valueMax();var d=this.options.step>0?this.options.step:1,f=c%d;c=c-f;if(Math.abs(f)*2>=d)c+=f>0?d:-d;return parseFloat(c.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var c=
this.options.range,d=this.options,f=this,a=!this._animateOff?d.animate:false,e,g={},h,j,m,k;if(this.options.values&&this.options.values.length)this.handles.each(function(i){e=(f.values(i)-f._valueMin())/(f._valueMax()-f._valueMin())*100;g[f.orientation==="horizontal"?"left":"bottom"]=e+"%";b(this).stop(1,1)[a?"animate":"css"](g,d.animate);if(f.options.range===true)if(f.orientation==="horizontal"){if(i===0)f.range.stop(1,1)[a?"animate":"css"]({left:e+"%"},d.animate);if(i===1)f.range[a?"animate":"css"]({width:e-
h+"%"},{queue:false,duration:d.animate})}else{if(i===0)f.range.stop(1,1)[a?"animate":"css"]({bottom:e+"%"},d.animate);if(i===1)f.range[a?"animate":"css"]({height:e-h+"%"},{queue:false,duration:d.animate})}h=e});else{j=this.value();m=this._valueMin();k=this._valueMax();e=k!==m?(j-m)/(k-m)*100:0;g[f.orientation==="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[a?"animate":"css"](g,d.animate);if(c==="min"&&this.orientation==="horizontal")this.range.stop(1,1)[a?"animate":"css"]({width:e+"%"},
d.animate);if(c==="max"&&this.orientation==="horizontal")this.range[a?"animate":"css"]({width:100-e+"%"},{queue:false,duration:d.animate});if(c==="min"&&this.orientation==="vertical")this.range.stop(1,1)[a?"animate":"css"]({height:e+"%"},d.animate);if(c==="max"&&this.orientation==="vertical")this.range[a?"animate":"css"]({height:100-e+"%"},{queue:false,duration:d.animate})}}});b.extend(b.ui.slider,{version:"1.8.2"})})(jQuery);
(function(b){function c(){return++f}function d(){return++a}var f=0,a=0;b.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'},_create:function(){this._tabify(true)},_setOption:function(e,g){if(e=="selected")this.options.collapsible&&
g==this.options.selected||this.select(g);else{this.options[e]=g;this._tabify()}},_tabId:function(e){return e.title&&e.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+c()},_sanitizeSelector:function(e){return e.replace(/:/g,"\\:")},_cookie:function(){var e=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+d());return b.cookie.apply(null,[e].concat(b.makeArray(arguments)))},_ui:function(e,g){return{tab:e,panel:g,index:this.anchors.index(e)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var e=
b(this);e.html(e.data("label.tabs")).removeData("label.tabs")})},_tabify:function(e){function g(p,u){p.css({display:""});!b.support.opacity&&u.opacity&&p[0].style.removeAttribute("filter")}this.list=this.element.find("ol,ul").eq(0);this.lis=b("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return b("a",this)[0]});this.panels=b([]);var h=this,j=this.options,m=/^#.+/;this.anchors.each(function(p,u){var x=b(u).attr("href"),y=x.split("#")[0],E;if(y&&(y===location.toString().split("#")[0]||
(E=b("base")[0])&&y===E.href)){x=u.hash;u.href=x}if(m.test(x))h.panels=h.panels.add(h._sanitizeSelector(x));else if(x!="#"){b.data(u,"href.tabs",x);b.data(u,"load.tabs",x.replace(/#.*$/,""));x=h._tabId(u);u.href="#"+x;u=b("#"+x);if(!u.length){u=b(j.panelTemplate).attr("id",x).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(h.panels[p-1]||h.list);u.data("destroy.tabs",true)}h.panels=h.panels.add(u)}else j.disabled.push(p)});if(e){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
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");if(j.selected===undefined){location.hash&&this.anchors.each(function(p,u){if(u.hash==location.hash){j.selected=p;return false}});if(typeof j.selected!="number"&&j.cookie)j.selected=parseInt(h._cookie(),10);if(typeof j.selected!="number"&&this.lis.filter(".ui-tabs-selected").length)j.selected=
this.lis.index(this.lis.filter(".ui-tabs-selected"));j.selected=j.selected||(this.lis.length?0:-1)}else if(j.selected===null)j.selected=-1;j.selected=j.selected>=0&&this.anchors[j.selected]||j.selected<0?j.selected:0;j.disabled=b.unique(j.disabled.concat(b.map(this.lis.filter(".ui-state-disabled"),function(p){return h.lis.index(p)}))).sort();b.inArray(j.selected,j.disabled)!=-1&&j.disabled.splice(b.inArray(j.selected,j.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");
if(j.selected>=0&&this.anchors.length){this.panels.eq(j.selected).removeClass("ui-tabs-hide");this.lis.eq(j.selected).addClass("ui-tabs-selected ui-state-active");h.element.queue("tabs",function(){h._trigger("show",null,h._ui(h.anchors[j.selected],h.panels[j.selected]))});this.load(j.selected)}b(window).bind("unload",function(){h.lis.add(h.anchors).unbind(".tabs");h.lis=h.anchors=h.panels=null})}else j.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));this.element[j.collapsible?"addClass":
"removeClass"]("ui-tabs-collapsible");j.cookie&&this._cookie(j.selected,j.cookie);e=0;for(var k;k=this.lis[e];e++)b(k)[b.inArray(e,j.disabled)!=-1&&!b(k).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");j.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(j.event!="mouseover"){var i=function(p,u){u.is(":not(.ui-state-disabled)")&&u.addClass("ui-state-"+p)},l=function(p,u){u.removeClass("ui-state-"+p)};this.lis.bind("mouseover.tabs",
function(){i("hover",b(this))});this.lis.bind("mouseout.tabs",function(){l("hover",b(this))});this.anchors.bind("focus.tabs",function(){i("focus",b(this).closest("li"))});this.anchors.bind("blur.tabs",function(){l("focus",b(this).closest("li"))})}var n,o;if(j.fx)if(b.isArray(j.fx)){n=j.fx[0];o=j.fx[1]}else n=o=j.fx;var q=o?function(p,u){b(p).closest("li").addClass("ui-tabs-selected ui-state-active");u.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal",function(){g(u,o);h._trigger("show",
null,h._ui(p,u[0]))})}:function(p,u){b(p).closest("li").addClass("ui-tabs-selected ui-state-active");u.removeClass("ui-tabs-hide");h._trigger("show",null,h._ui(p,u[0]))},v=n?function(p,u){u.animate(n,n.duration||"normal",function(){h.lis.removeClass("ui-tabs-selected ui-state-active");u.addClass("ui-tabs-hide");g(u,n);h.element.dequeue("tabs")})}:function(p,u){h.lis.removeClass("ui-tabs-selected ui-state-active");u.addClass("ui-tabs-hide");h.element.dequeue("tabs")};this.anchors.bind(j.event+".tabs",
function(){var p=this,u=b(this).closest("li"),x=h.panels.filter(":not(.ui-tabs-hide)"),y=b(h._sanitizeSelector(this.hash));if(u.hasClass("ui-tabs-selected")&&!j.collapsible||u.hasClass("ui-state-disabled")||u.hasClass("ui-state-processing")||h._trigger("select",null,h._ui(this,y[0]))===false){this.blur();return false}j.selected=h.anchors.index(this);h.abort();if(j.collapsible)if(u.hasClass("ui-tabs-selected")){j.selected=-1;j.cookie&&h._cookie(j.selected,j.cookie);h.element.queue("tabs",function(){v(p,
x)}).dequeue("tabs");this.blur();return false}else if(!x.length){j.cookie&&h._cookie(j.selected,j.cookie);h.element.queue("tabs",function(){q(p,y)});h.load(h.anchors.index(this));this.blur();return false}j.cookie&&h._cookie(j.selected,j.cookie);if(y.length){x.length&&h.element.queue("tabs",function(){v(p,x)});h.element.queue("tabs",function(){q(p,y)});h.load(h.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";b.browser.msie&&this.blur()});this.anchors.bind("click.tabs",
function(){return false})},destroy:function(){var e=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var g=b.data(this,"href.tabs");if(g)this.href=g;var h=b(this).unbind(".tabs");b.each(["href","load","cache"],function(j,m){h.removeData(m+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){b.data(this,
"destroy.tabs")?b(this).remove():b(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});e.cookie&&this._cookie(null,e.cookie);return this},add:function(e,g,h){if(h===undefined)h=this.anchors.length;var j=this,m=this.options;g=b(m.tabTemplate.replace(/#\{href\}/g,e).replace(/#\{label\}/g,g));e=!e.indexOf("#")?e.replace("#",""):this._tabId(b("a",g)[0]);g.addClass("ui-state-default ui-corner-top").data("destroy.tabs",
true);var k=b("#"+e);k.length||(k=b(m.panelTemplate).attr("id",e).data("destroy.tabs",true));k.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(h>=this.lis.length){g.appendTo(this.list);k.appendTo(this.list[0].parentNode)}else{g.insertBefore(this.lis[h]);k.insertBefore(this.panels[h])}m.disabled=b.map(m.disabled,function(i){return i>=h?++i:i});this._tabify();if(this.anchors.length==1){m.selected=0;g.addClass("ui-tabs-selected ui-state-active");k.removeClass("ui-tabs-hide");
this.element.queue("tabs",function(){j._trigger("show",null,j._ui(j.anchors[0],j.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[h],this.panels[h]));return this},remove:function(e){var g=this.options,h=this.lis.eq(e).remove(),j=this.panels.eq(e).remove();if(h.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(e+(e+1<this.anchors.length?1:-1));g.disabled=b.map(b.grep(g.disabled,function(m){return m!=e}),function(m){return m>=e?--m:m});this._tabify();this._trigger("remove",
null,this._ui(h.find("a")[0],j[0]));return this},enable:function(e){var g=this.options;if(b.inArray(e,g.disabled)!=-1){this.lis.eq(e).removeClass("ui-state-disabled");g.disabled=b.grep(g.disabled,function(h){return h!=e});this._trigger("enable",null,this._ui(this.anchors[e],this.panels[e]));return this}},disable:function(e){var g=this.options;if(e!=g.selected){this.lis.eq(e).addClass("ui-state-disabled");g.disabled.push(e);g.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[e],this.panels[e]))}return this},
select:function(e){if(typeof e=="string")e=this.anchors.index(this.anchors.filter("[href$="+e+"]"));else if(e===null)e=-1;if(e==-1&&this.options.collapsible)e=this.options.selected;this.anchors.eq(e).trigger(this.options.event+".tabs");return this},load:function(e){var g=this,h=this.options,j=this.anchors.eq(e)[0],m=b.data(j,"load.tabs");this.abort();if(!m||this.element.queue("tabs").length!==0&&b.data(j,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(e).addClass("ui-state-processing");
if(h.spinner){var k=b("span",j);k.data("label.tabs",k.html()).html(h.spinner)}this.xhr=b.ajax(b.extend({},h.ajaxOptions,{url:m,success:function(i,l){b(g._sanitizeSelector(j.hash)).html(i);g._cleanup();h.cache&&b.data(j,"cache.tabs",true);g._trigger("load",null,g._ui(g.anchors[e],g.panels[e]));try{h.ajaxOptions.success(i,l)}catch(n){}},error:function(i,l){g._cleanup();g._trigger("load",null,g._ui(g.anchors[e],g.panels[e]));try{h.ajaxOptions.error(i,l,e,j)}catch(n){}}}));g.element.dequeue("tabs");return this}},
abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(e,g){this.anchors.eq(e).removeData("cache.tabs").data("load.tabs",g);return this},length:function(){return this.anchors.length}});b.extend(b.ui.tabs,{version:"1.8.2"});b.extend(b.ui.tabs.prototype,{rotation:null,rotate:function(e,g){var h=this,j=this.options,m=h._rotate||(h._rotate=
function(k){clearTimeout(h.rotation);h.rotation=setTimeout(function(){var i=j.selected;h.select(++i<h.anchors.length?i:0)},e);k&&k.stopPropagation()});g=h._unrotate||(h._unrotate=!g?function(k){k.clientX&&h.rotate(null)}:function(){t=j.selected;m()});if(e){this.element.bind("tabsshow",m);this.anchors.bind(j.event+".tabs",g);m()}else{clearTimeout(h.rotation);this.element.unbind("tabsshow",m);this.anchors.unbind(j.event+".tabs",g);delete this._rotate;delete this._unrotate}return this}})})(jQuery);
define("jquery-ui-1.8.2.js",function(){});
(function(b){b.fn.placeholder=function(){function c(d){return b(d).val()==b(d).attr("placeholder")}return this.each(function(){b(this).find(":input, :textarea").each(function(){if(b(this).attr("type")=="password"){var d=b("<input type='text'>");d.attr("rel",b(this).attr("id"));d.attr("value",b(this).attr("placeholder"));b(this).parent().append(d);d.hide();var f=function(e){if(b(e).val()==""||c(e)){b(e).hide();b("input[rel="+b(e).attr("id")+"]").show()}};d.focus(function(){b(this).hide();b("input#"+
b(this).attr("rel")).show().focus()});b(this).blur(function(){f(this,false)});f(this)}else{var a=function(e,g){if(b(e).val()==""||g&&c(e))b(e).val(b(e).attr("placeholder"))};b(this).focus(function(){b(this).val()==b(this).attr("placeholder")&&b(this).val("")});b(this).blur(function(){a(b(this),false)});a(this,true)}});b(this).submit(function(){b(this).find(":input").each(function(){b(this).val()==b(this).attr("placeholder")&&b(this).val("")});b(this).find(":textarea").each(function(){b(this).val()==
b(this).attr("placeholder")&&b(this).val("")})})})}})(jQuery);define("placeholder.jquery.js",function(){});
jQuery(function(b){var c=b("meta[name=csrf-token]").attr("content"),d=b("meta[name=csrf-param]").attr("content");b.fn.extend({triggerAndReturn:function(f,a){f=new jQuery.Event(f);this.trigger(f,a);return f.result!==false},callRemote:function(){var f=this,a=f.is("form")?f.serializeArray():[],e=f.attr("method")||f.attr("data-method")||"GET",g=f.attr("action")||f.attr("href");if(g!==undefined){f.triggerAndReturn("ajax:before")&&b.ajax({url:g,data:a,type:e.toUpperCase(),beforeSend:function(h){h.setRequestHeader("Accept",
"text/javascript");f.trigger("ajax:loading",h)},success:function(h,j,m){f.trigger("ajax:success",[h,j,m])},complete:function(h){f.trigger("ajax:complete",h)},error:function(h,j,m){f.trigger("ajax:failure",[h,j,m])}});f.trigger("ajax:after")}}});b("a[data-confirm],input[data-confirm]").live("click",function(){var f=b(this);if(f.triggerAndReturn("confirm"))if(!confirm(f.attr("data-confirm")))return false});b('form[data-remote="true"]').live("submit",function(f){b(this).callRemote();f.preventDefault()});
b('a[data-remote="true"],input[data-remote="true"]').live("click",function(f){b(this).callRemote();f.preventDefault()});b("a[data-method][data-remote!=true]").live("click",function(f){var a=b(this),e=a.attr("href");a=a.attr("data-method");e=b('<form method="post" action="'+e+'">');a=b('<input name="_method" value="'+a+'" type="hidden" />');var g=b('<input name="'+d+'" value="'+c+'" type="hidden" />');e.hide().append(a).append(g).appendTo("body");f.preventDefault();e.submit()});b('form[data-remote="true"]').live("ajax:before",
function(){b(this).children("input[data-disable-with]").each(function(){var f=b(this);f.data("enable_with",f.val()).attr("value",f.attr("data-disable-with")).attr("disabled","disabled")})});b('form[data-remote="true"]').live("ajax:after",function(){b(this).children("input[data-disable-with]").each(function(){var f=b(this);f.removeAttr("disabled").val(f.data("enable_with"))})})});define("rails.js",function(){});