/*
 * jQuery UI 1.8
 *
 * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI
 */
jQuery.ui||(function(b){b.ui={version:"1.8",plugin:{add:function(j,i,g){var h=b.ui[j].prototype;for(var a in g){h.plugins[a]=h.plugins[a]||[];h.plugins[a].push([i,g[a]])}},call:function(a,i,j){var g=a.plugins[i];if(!g||!a.element[0].parentNode){return}for(var h=0;h<g.length;h++){if(a.options[g[h][0]]){g[h][1].apply(a.element,j)}}}},contains:function(a,e){return document.compareDocumentPosition?a.compareDocumentPosition(e)&16:a!==e&&a.contains(e)},hasScroll:function(f,h){if(b(f).css("overflow")=="hidden"){return false}var a=(h&&h=="left")?"scrollLeft":"scrollTop",g=false;if(f[a]>0){return true}f[a]=1;g=(f[a]>0);f[a]=0;return g},isOverAxis:function(f,a,e){return(f>a)&&(f<(a+e))},isOver:function(h,l,i,j,a,k){return b.ui.isOverAxis(h,i,a)&&b.ui.isOverAxis(l,j,k)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};b.fn.extend({_focus:b.fn.focus,focus:function(a,d){return typeof a==="number"?this.each(function(){var c=this;setTimeout(function(){b(c).focus();(d&&d.call(c))},a)}):this._focus.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var a;if((b.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){a=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)}else{a=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"))||!a.length?b(document):a},zIndex:function(f){if(f!==undefined){return this.css("zIndex",f)}if(this.length){var h=b(this[0]),a,g;while(h.length&&h[0]!==document){a=h.css("position");if(a=="absolute"||a=="relative"||a=="fixed"){g=parseInt(h.css("zIndex"));if(!isNaN(g)&&g!=0){return g}}h=h.parent()}}return 0}});b.extend(b.expr[":"],{data:function(e,f,a){return !!b.data(e,a[3])},focusable:function(f){var e=f.nodeName.toLowerCase(),a=b.attr(f,"tabindex");return(/input|select|textarea|button|object/.test(e)?!f.disabled:"a"==e||"area"==e?f.href||!isNaN(a):!isNaN(a))&&!b(f)["area"==e?"parents":"closest"](":hidden").length},tabbable:function(d){var a=b.attr(d,"tabindex");return(isNaN(a)||a>=0)&&b(d).is(":focusable")}})})(jQuery);
/*
 * jQuery UI Widget 1.8
 *
 * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Widget
 */
(function(c){var d=c.fn.remove;c.fn.remove=function(b,a){return this.each(function(){if(!a){if(!b||c.filter(b,[this]).length){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")})}}return d.call(c(this),b,a)})};c.widget=function(k,i,l){var j=k.split(".")[0],a;k=k.split(".")[1];a=j+"-"+k;if(!l){l=i;i=c.Widget}c.expr[":"][a]=function(e){return !!c.data(e,k)};c[j]=c[j]||{};c[j][k]=function(f,e){if(arguments.length){this._createWidget(f,e)}};var b=new i();b.options=c.extend({},b.options);c[j][k].prototype=c.extend(true,b,{namespace:j,widgetName:k,widgetEventPrefix:c[j][k].prototype.widgetEventPrefix||k,widgetBaseClass:a},l);c.widget.bridge(k,c[j][k])};c.widget.bridge=function(a,b){c.fn[a]=function(j){var l=typeof j==="string",k=Array.prototype.slice.call(arguments,1),i=this;j=!l&&k.length?c.extend.apply(null,[true,j].concat(k)):j;if(l&&j.substring(0,1)==="_"){return i}if(l){this.each(function(){var f=c.data(this,a),e=f&&c.isFunction(f[j])?f[j].apply(f,k):f;if(e!==f&&e!==undefined){i=e;return false}})}else{this.each(function(){var e=c.data(this,a);if(e){if(j){e.option(j)}e._init()}else{c.data(this,a,new b(j,this))}})}return i}};c.Widget=function(b,a){if(arguments.length){this._createWidget(b,a)}};c.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(b,a){this.element=c(a).data(this.widgetName,this);this.options=c.extend(true,{},this.options,c.metadata&&c.metadata.get(a)[this.widgetName],b);var f=this;this.element.bind("remove."+this.widgetName,function(){f.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 "+this.namespace+"-state-disabled")},widget:function(){return this.element},option:function(b,a){var g=b,h=this;if(arguments.length===0){return c.extend({},h.options)}if(typeof b==="string"){if(a===undefined){return this.options[b]}g={};g[b]=a}c.each(g,function(f,e){h._setOption(f,e)});return h},_setOption:function(b,a){this.options[b]=a;if(b==="disabled"){this.widget()[a?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",a)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(k,j,i){var a=this.options[k];j=c.Event(j);j.type=(k===this.widgetEventPrefix?k:this.widgetEventPrefix+k).toLowerCase();i=i||{};if(j.originalEvent){for(var l=c.event.props.length,b;l;){b=c.event.props[--l];j[b]=j.originalEvent[b]}}this.element.trigger(j,i);return !(c.isFunction(a)&&a.call(this.element[0],j,i)===false||j.isDefaultPrevented())}}})(jQuery);
/*
 * jQuery UI Mouse 1.8
 *
 * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Mouse
 *
 * Depends:
 *	jquery.ui.widget.js
 */
(function(b){b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(d){return a._mouseDown(d)}).bind("click."+this.widgetName,function(d){if(a._preventClickEvent){a._preventClickEvent=false;d.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(g){g.originalEvent=g.originalEvent||{};if(g.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(g));this._mouseDownEvent=g;var h=this,f=(g.which==1),a=(typeof this.options.cancel=="string"?b(g.target).parents().add(g.target).filter(this.options.cancel).length:false);if(!f||a||!this._mouseCapture(g)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){h.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(g)&&this._mouseDelayMet(g)){this._mouseStarted=(this._mouseStart(g)!==false);if(!this._mouseStarted){g.preventDefault();return true}}this._mouseMoveDelegate=function(c){return h._mouseMove(c)};this._mouseUpDelegate=function(c){return h._mouseUp(c)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(b.browser.safari||g.preventDefault());g.originalEvent.mouseHandled=true;return true},_mouseMove:function(a){if(b.browser.msie&&!a.button){return this._mouseUp(a)}if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,a)!==false);(this._mouseStarted?this._mouseDrag(a):this._mouseUp(a))}return !this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(a.target==this._mouseDownEvent.target);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return(Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance)},_mouseDelayMet:function(a){return this.mouseDelayMet},_mouseStart:function(a){},_mouseDrag:function(a){},_mouseStop:function(a){},_mouseCapture:function(a){return true}})})(jQuery);(function(k){k.ui=k.ui||{};var n=/left|center|right/,l="center",m=/top|center|bottom/,j="center",i=k.fn.position,h=k.fn.offset;k.fn.position=function(e){if(!e||!e.of){return i.apply(this,arguments)}e=k.extend({},e);var b=k(e.of),g=(e.collision||"flip").split(" "),a=e.offset?e.offset.split(" "):[0,0],c,f,d;if(e.of.nodeType===9){c=b.width();f=b.height();d={top:0,left:0}}else{if(e.of.scrollTo&&e.of.document){c=b.width();f=b.height();d={top:b.scrollTop(),left:b.scrollLeft()}}else{if(e.of.preventDefault){e.at="left top";c=f=0;d={top:e.of.pageY,left:e.of.pageX}}else{c=b.outerWidth();f=b.outerHeight();d=b.offset()}}}k.each(["my","at"],function(){var p=(e[this]||"").split(" ");if(p.length===1){p=n.test(p[0])?p.concat([j]):m.test(p[0])?[l].concat(p):[l,j]}p[0]=n.test(p[0])?p[0]:l;p[1]=m.test(p[1])?p[1]:j;e[this]=p});if(g.length===1){g[1]=g[0]}a[0]=parseInt(a[0],10)||0;if(a.length===1){a[1]=a[0]}a[1]=parseInt(a[1],10)||0;if(e.at[0]==="right"){d.left+=c}else{if(e.at[0]===l){d.left+=c/2}}if(e.at[1]==="bottom"){d.top+=f}else{if(e.at[1]===j){d.top+=f/2}}d.left+=a[0];d.top+=a[1];return this.each(function(){var s=k(this),u=s.outerWidth(),v=s.outerHeight(),w=k.extend({},d);if(e.my[0]==="right"){w.left-=u}else{if(e.my[0]===l){w.left-=u/2}}if(e.my[1]==="bottom"){w.top-=v}else{if(e.my[1]===j){w.top-=v/2}}k.each(["left","top"],function(o,p){if(k.ui.position[g[o]]){k.ui.position[g[o]][p](w,{targetWidth:c,targetHeight:f,elemWidth:u,elemHeight:v,offset:a,my:e.my,at:e.at})}});if(k.fn.bgiframe){s.bgiframe()}s.offset(k.extend(w,{using:e.using}))})};k.ui.position={fit:{left:function(d,c){var a=k(window),b=d.left+c.elemWidth-a.width()-a.scrollLeft();d.left=b>0?d.left-b:Math.max(0,d.left)},top:function(d,c){var a=k(window),b=d.top+c.elemHeight-a.height()-a.scrollTop();d.top=b>0?d.top-b:Math.max(0,d.top)}},flip:{left:function(e,d){if(d.at[0]==="center"){return}var b=k(window),c=e.left+d.elemWidth-b.width()-b.scrollLeft(),f=d.my[0]==="left"?-d.elemWidth:d.my[0]==="right"?d.elemWidth:0,a=-2*d.offset[0];e.left+=e.left<0?f+d.targetWidth+a:c>0?f-d.targetWidth+a:0},top:function(e,c){if(c.at[1]==="center"){return}var a=k(window),b=e.top+c.elemHeight-a.height()-a.scrollTop(),f=c.my[1]==="top"?-c.elemHeight:c.my[1]==="bottom"?c.elemHeight:0,d=c.at[1]==="top"?c.targetHeight:-c.targetHeight,g=-2*c.offset[1];e.top+=e.top<0?f+c.targetHeight+g:b>0?f+d+g:0}}};if(!k.offset.setOffset){k.offset.setOffset=function(b,e){if(/static/.test(k.curCSS(b,"position"))){b.style.position="relative"}var c=k(b),g=c.offset(),f=parseInt(k.curCSS(b,"top",true),10)||0,a=parseInt(k.curCSS(b,"left",true),10)||0,d={top:(e.top-g.top)+f,left:(e.left-g.left)+a};if("using" in e){e.using.call(b,d)}else{c.css(d)}};k.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument){return null}if(b){return this.each(function(){k.offset.setOffset(this,b)})}return h.call(this)}}}(jQuery));(function(f){f.widget("ui.resizable",f.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:1000},_create:function(){var m=this,b=this.options;this.element.addClass("ui-resizable");f.extend(this,{_aspectRatio:!!(b.aspectRatio),aspectRatio:b.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:b.helper||b.ghost||b.animate?b.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&f.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})}this.element.wrap(f('<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=b.handles||(!f(".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 a=this.handles.split(",");this.handles={};for(var l=0;l<a.length;l++){var c=f.trim(a[l]),n="ui-resizable-"+c;var i=f('<div class="ui-resizable-handle '+n+'"></div>');if(/sw|se|ne|nw/.test(c)){i.css({zIndex:++b.zIndex})}if("se"==c){i.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[c]=".ui-resizable-"+c;this.element.append(i)}}this._renderAxis=function(j){j=j||this.element;for(var g in this.handles){if(this.handles[g].constructor==String){this.handles[g]=f(this.handles[g],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var q=f(this.handles[g],this.element),k=0;k=/sw|ne|nw|se|n|s/.test(g)?q.outerHeight():q.outerWidth();var h=["padding",/ne|nw|n/.test(g)?"Top":/se|sw|s/.test(g)?"Bottom":/^e$/.test(g)?"Right":"Left"].join("");j.css(h,k);this._proportionallyResize()}if(!f(this.handles[g]).length){continue}}};this._renderAxis(this.element);this._handles=f(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!m.resizing){if(this.className){var g=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}m.axis=g&&g[1]?g[1]:"se"}});if(b.autoHide){this._handles.hide();f(this.element).addClass("ui-resizable-autohide").hover(function(){f(this).removeClass("ui-resizable-autohide");m._handles.show()},function(){if(!m.resizing){f(this).addClass("ui-resizable-autohide");m._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(c){f(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);var 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);b(this.originalElement);return this},_mouseCapture:function(b){var a=false;for(var c in this.handles){if(f(this.handles[c])[0]==b.target){a=true}}return !this.options.disabled&&a},_mouseStart:function(l){var b=this.options,m=this.element.position(),n=this.element;this.resizing=true;this.documentScroll={top:f(document).scrollTop(),left:f(document).scrollLeft()};if(n.is(".ui-draggable")||(/absolute/).test(n.css("position"))){n.css({position:"absolute",top:m.top,left:m.left})}if(f.browser.opera&&(/relative/).test(n.css("position"))){n.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var a=d(this.helper.css("left")),k=d(this.helper.css("top"));if(b.containment){a+=f(b.containment).scrollLeft()||0;k+=f(b.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:a,top:k};this.size=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()};this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()};this.originalPosition={left:a,top:k};this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()};this.originalMousePosition={left:l.pageX,top:l.pageY};this.aspectRatio=(typeof b.aspectRatio=="number")?b.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var c=f(".ui-resizable-"+this.axis).css("cursor");f("body").css("cursor",c=="auto"?this.axis+"-resize":c);n.addClass("ui-resizable-resizing");this._propagate("start",l);return true},_mouseDrag:function(A){var x=this.helper,y=this.options,r={},b=this,v=this.originalMousePosition,o=this.axis;var a=(A.pageX-v.left)||0,c=(A.pageY-v.top)||0;var w=this._change[o];if(!w){return false}var s=w.apply(this,[A,a,c]),u=f.browser.msie&&f.browser.version<7,z=this.sizeDiff;if(this._aspectRatio||A.shiftKey){s=this._updateRatio(s,A)}s=this._respectSize(s,A);this._propagate("resize",A);x.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(s);this._trigger("resize",A,this.ui());return false},_mouseStop:function(q){this.resizing=false;var p=this.options,b=this;if(this._helper){var r=this._proportionallyResizeElements,u=r.length&&(/textarea/i).test(r[0].nodeName),s=u&&f.ui.hasScroll(r[0],"left")?0:b.sizeDiff.height,n=u?0:b.sizeDiff.width;var a={width:(b.size.width-n),height:(b.size.height-s)},o=(parseInt(b.element.css("left"),10)+(b.position.left-b.originalPosition.left))||null,c=(parseInt(b.element.css("top"),10)+(b.position.top-b.originalPosition.top))||null;if(!p.animate){this.element.css(f.extend(a,{top:c,left:o}))}b.helper.height(b.size.height);b.helper.width(b.size.width);if(this._helper&&!p.animate){this._proportionallyResize()}}f("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",q);if(this._helper){this.helper.remove()}return false},_updateCache:function(b){var a=this.options;this.offset=this.helper.offset();if(e(b.left)){this.position.left=b.left}if(e(b.top)){this.position.top=b.top}if(e(b.height)){this.size.height=b.height}if(e(b.width)){this.size.width=b.width}},_updateRatio:function(c,j){var b=this.options,a=this.position,k=this.size,l=this.axis;if(c.height){c.width=(k.height*this.aspectRatio)}else{if(c.width){c.height=(k.width/this.aspectRatio)}}if(l=="sw"){c.left=a.left+(k.width-c.width);c.top=null}if(l=="nw"){c.top=a.top+(k.height-c.height);c.left=a.left+(k.width-c.width)}return c},_respectSize:function(w,B){var y=this.helper,z=this.options,b=this._aspectRatio||B.shiftKey,c=this.axis,E=e(w.width)&&z.maxWidth&&(z.maxWidth<w.width),v=e(w.height)&&z.maxHeight&&(z.maxHeight<w.height),A=e(w.width)&&z.minWidth&&(z.minWidth>w.width),a=e(w.height)&&z.minHeight&&(z.minHeight>w.height);if(A){w.width=z.minWidth}if(a){w.height=z.minHeight}if(E){w.width=z.maxWidth}if(v){w.height=z.maxHeight}var C=this.originalPosition.left+this.originalSize.width,o=this.position.top+this.size.height;var x=/sw|nw|w/.test(c),D=/nw|ne|n/.test(c);if(A&&x){w.left=C-z.minWidth}if(E&&x){w.left=C-z.maxWidth}if(a&&D){w.top=o-z.minHeight}if(v&&D){w.top=o-z.maxHeight}var u=!w.width&&!w.height;if(u&&!w.left&&w.top){w.top=null}else{if(u&&!w.top&&w.left){w.left=null}}return w},_proportionallyResize:function(){var a=this.options;if(!this._proportionallyResizeElements.length){return}var i=this.helper||this.element;for(var k=0;k<this._proportionallyResizeElements.length;k++){var c=this._proportionallyResizeElements[k];if(!this.borderDif){var l=[c.css("borderTopWidth"),c.css("borderRightWidth"),c.css("borderBottomWidth"),c.css("borderLeftWidth")],b=[c.css("paddingTop"),c.css("paddingRight"),c.css("paddingBottom"),c.css("paddingLeft")];this.borderDif=f.map(l,function(j,g){var h=parseInt(j,10)||0,o=parseInt(b[g],10)||0;return h+o})}if(f.browser.msie&&!(!(f(i).is(":hidden")||f(i).parents(":hidden").length))){continue}c.css({height:(i.height()-this.borderDif[0]-this.borderDif[2])||0,width:(i.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var i=this.element,a=this.options;this.elementOffset=i.offset();if(this._helper){this.helper=this.helper||f('<div style="overflow:hidden;"></div>');var j=f.browser.msie&&f.browser.version<7,c=(j?1:0),b=(j?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+b,height:this.element.outerHeight()+b,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++a.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(a,b,c){return{width:this.originalSize.width+b}},w:function(c,k,l){var a=this.options,j=this.originalSize,b=this.originalPosition;return{left:b.left+k,width:j.width-k}},n:function(c,k,l){var a=this.options,j=this.originalSize,b=this.originalPosition;return{top:b.top+l,height:j.height-l}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(a,b,c){return f.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[a,b,c]))},sw:function(a,b,c){return f.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[a,b,c]))},ne:function(a,b,c){return f.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[a,b,c]))},nw:function(a,b,c){return f.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[a,b,c]))}},_propagate:function(a,b){f.ui.plugin.call(this,a,[b,this.ui()]);(a!="resize"&&this._trigger(a,b,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}}});f.extend(f.ui.resizable,{version:"1.8"});f.ui.plugin.add("resizable","alsoResize",{start:function(i,c){var j=f(this).data("resizable"),a=j.options;var b=function(g){f(g).each(function(){f(this).data("resizable-alsoresize",{width:parseInt(f(this).width(),10),height:parseInt(f(this).height(),10),left:parseInt(f(this).css("left"),10),top:parseInt(f(this).css("top"),10)})})};if(typeof(a.alsoResize)=="object"&&!a.alsoResize.parentNode){if(a.alsoResize.length){a.alsoResize=a.alsoResize[0];b(a.alsoResize)}else{f.each(a.alsoResize,function(h,g){b(h)})}}else{b(a.alsoResize)}},resize:function(n,l){var o=f(this).data("resizable"),c=o.options,m=o.originalSize,a=o.originalPosition;var b={height:(o.size.height-m.height)||0,width:(o.size.width-m.width)||0,top:(o.position.top-a.top)||0,left:(o.position.left-a.left)||0},p=function(h,g){f(h).each(function(){var j=f(this),i=f(this).data("resizable-alsoresize"),k={},r=g&&g.length?g:["width","height","top","left"];f.each(r||["width","height","top","left"],function(v,q){var u=(i[q]||0)+(b[q]||0);if(u&&u>=0){k[q]=u||null}});if(/relative/.test(j.css("position"))&&f.browser.opera){o._revertToRelativePosition=true;j.css({position:"absolute",top:"auto",left:"auto"})}j.css(k)})};if(typeof(c.alsoResize)=="object"&&!c.alsoResize.nodeType){f.each(c.alsoResize,function(h,g){p(h,g)})}else{p(c.alsoResize)}},stop:function(b,a){var c=f(this).data("resizable");if(c._revertToRelativePosition&&f.browser.opera){c._revertToRelativePosition=false;el.css({position:"relative"})}f(this).removeData("resizable-alsoresize-start")}});f.ui.plugin.add("resizable","animate",{stop:function(r,b){var a=f(this).data("resizable"),q=a.options;var s=a._proportionallyResizeElements,w=s.length&&(/textarea/i).test(s[0].nodeName),v=w&&f.ui.hasScroll(s[0],"left")?0:a.sizeDiff.height,o=w?0:a.sizeDiff.width;var u={width:(a.size.width-o),height:(a.size.height-v)},p=(parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left))||null,c=(parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top))||null;a.element.animate(f.extend(u,c&&p?{top:c,left:p}:{}),{duration:q.animateDuration,easing:q.animateEasing,step:function(){var g={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)};if(s&&s.length){f(s[0]).css({width:g.width,height:g.height})}a._updateCache(g);a._propagate("resize",r)}})}});f.ui.plugin.add("resizable","containment",{start:function(A,b){var C=f(this).data("resizable"),w=C.options,u=C.element;var z=w.containment,v=(z instanceof f)?z.get(0):(/parent/.test(z))?u.parent().get(0):z;if(!v){return}C.containerElement=f(v);if(/document/.test(z)||z==document){C.containerOffset={left:0,top:0};C.containerPosition={left:0,top:0};C.parentData={element:f(document),left:0,top:0,width:f(document).width(),height:f(document).height()||document.body.parentNode.scrollHeight}}else{var o=f(v),x=[];f(["Top","Right","Left","Bottom"]).each(function(g,h){x[g]=d(o.css("padding"+h))});C.containerOffset=o.offset();C.containerPosition=o.position();C.containerSize={height:(o.innerHeight()-x[3]),width:(o.innerWidth()-x[1])};var c=C.containerOffset,B=C.containerSize.height,p=C.containerSize.width,y=(f.ui.hasScroll(v,"left")?v.scrollWidth:p),a=(f.ui.hasScroll(v)?v.scrollHeight:B);C.parentData={element:v,left:c.left,top:c.top,width:y,height:a}}},resize:function(B,c){var E=f(this).data("resizable"),z=E.options,C=E.containerSize,o=E.containerOffset,v=E.size,u=E.position,b=E._aspectRatio||B.shiftKey,D={top:0,left:0},A=E.containerElement;if(A[0]!=document&&(/static/).test(A.css("position"))){D=o}if(u.left<(E._helper?o.left:0)){E.size.width=E.size.width+(E._helper?(E.position.left-o.left):(E.position.left-D.left));if(b){E.size.height=E.size.width/z.aspectRatio}E.position.left=z.helper?o.left:0}if(u.top<(E._helper?o.top:0)){E.size.height=E.size.height+(E._helper?(E.position.top-o.top):E.position.top);if(b){E.size.width=E.size.height*z.aspectRatio}E.position.top=E._helper?o.top:0}E.offset.left=E.parentData.left+E.position.left;E.offset.top=E.parentData.top+E.position.top;var w=Math.abs((E._helper?E.offset.left-D.left:(E.offset.left-D.left))+E.sizeDiff.width),a=Math.abs((E._helper?E.offset.top-D.top:(E.offset.top-o.top))+E.sizeDiff.height);var x=E.containerElement.get(0)==E.element.parent().get(0),y=/relative|absolute/.test(E.containerElement.css("position"));if(x&&y){w-=E.parentData.left}if(w+E.size.width>=E.parentData.width){E.size.width=E.parentData.width-w;if(b){E.size.height=E.size.width/E.aspectRatio}}if(a+E.size.height>=E.parentData.height){E.size.height=E.parentData.height-a;if(b){E.size.width=E.size.height*E.aspectRatio}}},stop:function(x,h){var b=f(this).data("resizable"),w=b.options,r=b.position,o=b.containerOffset,y=b.containerPosition,v=b.containerElement;var u=f(b.helper),a=u.offset(),c=u.outerWidth()-b.sizeDiff.width,s=u.outerHeight()-b.sizeDiff.height;if(b._helper&&!w.animate&&(/relative/).test(v.css("position"))){f(this).css({left:a.left-y.left-o.left,width:c,height:s})}if(b._helper&&!w.animate&&(/static/).test(v.css("position"))){f(this).css({left:a.left-y.left-o.left,width:c,height:s})}}});f.ui.plugin.add("resizable","ghost",{start:function(c,b){var j=f(this).data("resizable"),a=j.options,i=j.size;j.ghost=j.originalElement.clone();j.ghost.css({opacity:0.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");j.ghost.appendTo(j.helper)},resize:function(c,b){var h=f(this).data("resizable"),a=h.options;if(h.ghost){h.ghost.css({position:"relative",height:h.size.height,width:h.size.width})}},stop:function(c,b){var h=f(this).data("resizable"),a=h.options;if(h.ghost&&h.helper){h.helper.get(0).removeChild(h.ghost.get(0))}}});f.ui.plugin.add("resizable","grid",{resize:function(w,c){var a=f(this).data("resizable"),s=a.options,p=a.size,r=a.originalSize,q=a.originalPosition,b=a.axis,o=s._aspectRatio||w.shiftKey;s.grid=typeof s.grid=="number"?[s.grid,s.grid]:s.grid;var u=Math.round((p.width-r.width)/(s.grid[0]||1))*(s.grid[0]||1),v=Math.round((p.height-r.height)/(s.grid[1]||1))*(s.grid[1]||1);if(/^(se|s|e)$/.test(b)){a.size.width=r.width+u;a.size.height=r.height+v}else{if(/^(ne)$/.test(b)){a.size.width=r.width+u;a.size.height=r.height+v;a.position.top=q.top-v}else{if(/^(sw)$/.test(b)){a.size.width=r.width+u;a.size.height=r.height+v;a.position.left=q.left-u}else{a.size.width=r.width+u;a.size.height=r.height+v;a.position.top=q.top-v;a.position.left=q.left-u}}}}});var d=function(a){return parseInt(a,10)||0};var e=function(a){return !isNaN(parseInt(a,10))}})(jQuery);(function(b){b.widget("ui.selectable",b.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var a=this;this.element.addClass("ui-selectable");this.dragged=false;var d;this.refresh=function(){d=b(a.options.filter,a.element[0]);d.each(function(){var f=b(this);var c=f.offset();b.data(this,"selectable-item",{element:this,$element:f,left:c.left,top:c.top,right:c.left+f.outerWidth(),bottom:c.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(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper")},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(e){var a=this;this.opos=[e.pageX,e.pageY];if(this.options.disabled){return}var f=this.options;this.selectees=b(f.filter,this.element[0]);this._trigger("start",e);b(f.appendTo).append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:e.clientX,top:e.clientY,width:0,height:0});if(f.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var c=b.data(this,"selectable-item");c.startselected=true;if(!e.metaKey){c.$element.removeClass("ui-selected");c.selected=false;c.$element.addClass("ui-unselecting");c.unselecting=true;a._trigger("unselecting",e,{unselecting:c.element})}});b(e.target).parents().andSelf().each(function(){var c=b.data(this,"selectable-item");if(c){c.$element.removeClass("ui-unselecting").addClass("ui-selecting");c.unselecting=false;c.selecting=true;c.selected=true;a._trigger("selecting",e,{selecting:c.element});return false}})},_mouseDrag:function(j){var p=this;this.dragged=true;if(this.options.disabled){return}var n=this.options;var o=this.opos[0],k=this.opos[1],a=j.pageX,l=j.pageY;if(o>a){var m=a;a=o;o=m}if(k>l){var m=l;l=k;k=m}this.helper.css({left:o,top:k,width:a-o,height:l-k});this.selectees.each(function(){var d=b.data(this,"selectable-item");if(!d||d.element==p.element[0]){return}var c=false;if(n.tolerance=="touch"){c=(!(d.left>a||d.right<o||d.top>l||d.bottom<k))}else{if(n.tolerance=="fit"){c=(d.left>o&&d.right<a&&d.top>k&&d.bottom<l)}}if(c){if(d.selected){d.$element.removeClass("ui-selected");d.selected=false}if(d.unselecting){d.$element.removeClass("ui-unselecting");d.unselecting=false}if(!d.selecting){d.$element.addClass("ui-selecting");d.selecting=true;p._trigger("selecting",j,{selecting:d.element})}}else{if(d.selecting){if(j.metaKey&&d.startselected){d.$element.removeClass("ui-selecting");d.selecting=false;d.$element.addClass("ui-selected");d.selected=true}else{d.$element.removeClass("ui-selecting");d.selecting=false;if(d.startselected){d.$element.addClass("ui-unselecting");d.unselecting=true}p._trigger("unselecting",j,{unselecting:d.element})}}if(d.selected){if(!j.metaKey&&!d.startselected){d.$element.removeClass("ui-selected");d.selected=false;d.$element.addClass("ui-unselecting");d.unselecting=true;p._trigger("unselecting",j,{unselecting:d.element})}}}});return false},_mouseStop:function(e){var a=this;this.dragged=false;var f=this.options;b(".ui-unselecting",this.element[0]).each(function(){var c=b.data(this,"selectable-item");c.$element.removeClass("ui-unselecting");c.unselecting=false;c.startselected=false;a._trigger("unselected",e,{unselected:c.element})});b(".ui-selecting",this.element[0]).each(function(){var c=b.data(this,"selectable-item");c.$element.removeClass("ui-selecting").addClass("ui-selected");c.selecting=false;c.selected=true;c.startselected=true;a._trigger("selected",e,{selected:c.element})});this._trigger("stop",e);this.helper.remove();return false}});b.extend(b.ui.selectable,{version:"1.8"})})(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 g=this.options,a=this;this.running=0;this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(g.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(g.navigation){var h=this.element.find("a").filter(g.navigationFilter);if(h.length){var f=h.closest(".ui-accordion-header");if(f.length){this.active=f}else{this.active=h.closest(".ui-accordion-content").prev()}}}this.active=this._findActive(this.active||g.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();if(b.browser.msie){this.element.find("a").css("zoom","1")}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(c){return a._keydown(c)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!b.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(g.event){this.headers.bind((g.event)+".accordion",function(c){a._clickHandler.call(a,c,this);c.preventDefault()})}},_createIcons:function(){var a=this.options;if(a.icons){b("<span/>").addClass("ui-icon "+a.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(a.icons.header).toggleClass(a.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 d=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 a=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(d.autoHeight||d.fillHeight){a.css("height","")}return this},_setOption:function(a,d){b.Widget.prototype._setOption.apply(this,arguments);if(a=="active"){this.activate(d)}if(a=="icons"){this._destroyIcons();if(d){this._createIcons()}}},_keydown:function(j){var h=this.options,i=b.ui.keyCode;if(h.disabled||j.altKey||j.ctrlKey){return}var k=this.headers.length;var a=this.headers.index(j.target);var l=false;switch(j.keyCode){case i.RIGHT:case i.DOWN:l=this.headers[(a+1)%k];break;case i.LEFT:case i.UP:l=this.headers[(a-1+k)%k];break;case i.SPACE:case i.ENTER:this._clickHandler({target:j.target},j.target);j.preventDefault()}if(l){b(j.target).attr("tabIndex","-1");b(l).attr("tabIndex","0");l.focus();return false}return true},resize:function(){var e=this.options,f;if(e.fillSpace){if(b.browser.msie){var a=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}f=this.element.parent().height();if(b.browser.msie){this.element.parent().css("overflow",a)}this.headers.each(function(){f-=b(this).outerHeight(true)});this.headers.next().each(function(){b(this).height(Math.max(0,f-b(this).innerHeight()+b(this).height()))}).css("overflow","auto")}else{if(e.autoHeight){f=0;this.headers.next().each(function(){f=Math.max(f,b(this).height())}).height(f)}}return this},activate:function(a){this.options.active=a;var d=this._findActive(a)[0];this._clickHandler({target:d},d);return this},_findActive:function(a){return a?typeof a=="number"?this.headers.filter(":eq("+a+")"):this.headers.not(this.headers.not(a)):a===false?b([]):this.headers.filter(":eq(0)")},_clickHandler:function(r,n){var p=this.options;if(p.disabled){return}if(!r.target){if(!p.collapsible){return}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(p.icons.headerSelected).addClass(p.icons.header);this.active.next().addClass("ui-accordion-content-active");var l=this.active.next(),o={options:p,newHeader:b([]),oldHeader:p.active,newContent:b([]),oldContent:l},q=(this.active=b([]));this._toggle(q,l,o);return}var m=b(r.currentTarget||n);var k=m[0]==this.active[0];p.active=p.collapsible&&k?false:b(".ui-accordion-header",this.element).index(m);if(this.running||(!p.collapsible&&k)){return}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(p.icons.headerSelected).addClass(p.icons.header);if(!k){m.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(p.icons.header).addClass(p.icons.headerSelected);m.next().addClass("ui-accordion-content-active")}var q=m.next(),l=this.active.next(),o={options:p,newHeader:k&&p.collapsible?b([]):m,oldHeader:this.active,newContent:k&&p.collapsible?b([]):q,oldContent:l},a=this.headers.index(this.active[0])>this.headers.index(m[0]);this.active=k?b([]):m;this._toggle(q,l,o,k,a);return},_toggle:function(y,q,s,p,o){var w=this.options,a=this;this.toShow=y;this.toHide=q;this.data=s;var x=function(){if(!a){return}return a._completed.apply(a,arguments)};this._trigger("changestart",null,this.data);this.running=q.size()===0?y.size():q.size();if(w.animated){var u={};if(w.collapsible&&p){u={toShow:b([]),toHide:q,complete:x,down:o,autoHeight:w.autoHeight||w.fillSpace}}else{u={toShow:y,toHide:q,complete:x,down:o,autoHeight:w.autoHeight||w.fillSpace}}if(!w.proxied){w.proxied=w.animated}if(!w.proxiedDuration){w.proxiedDuration=w.duration}w.animated=b.isFunction(w.proxied)?w.proxied(u):w.proxied;w.duration=b.isFunction(w.proxiedDuration)?w.proxiedDuration(u):w.proxiedDuration;var n=b.ui.accordion.animations,v=w.duration,r=w.animated;if(r&&!n[r]&&!b.easing[r]){r="slide"}if(!n[r]){n[r]=function(c){this.slide(c,{easing:r,duration:v||700})}}n[r](u)}else{if(w.collapsible&&p){y.toggle()}else{q.hide();y.show()}x(true)}q.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();y.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(a){var d=this.options;this.running=a?0:--this.running;if(this.running){return}if(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",animations:{slide:function(a,l){a=b.extend({easing:"swing",duration:300},a,l);if(!a.toHide.size()){a.toShow.animate({height:"show"},a);return}if(!a.toShow.size()){a.toHide.animate({height:"hide"},a);return}var q=a.toShow.css("overflow"),m=0,p={},n={},o=["height","paddingTop","paddingBottom"],r;var k=a.toShow;r=k[0].style.width;k.width(parseInt(k.parent().width(),10)-parseInt(k.css("paddingLeft"),10)-parseInt(k.css("paddingRight"),10)-(parseInt(k.css("borderLeftWidth"),10)||0)-(parseInt(k.css("borderRightWidth"),10)||0));b.each(o,function(e,c){n[c]="hide";var d=(""+b.css(a.toShow[0],c)).match(/^([\d+-.]+)(.*)$/);p[c]={value:d[1],unit:d[2]||"px"}});a.toShow.css({height:0,overflow:"hidden"}).show();a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(n,{step:function(d,c){if(c.prop=="height"){m=(c.end-c.start===0)?0:(c.now-c.start)/(c.end-c.start)}a.toShow[0].style[c.prop]=(m*p[c.prop].value)+p[c.prop].unit},duration:a.duration,easing:a.easing,complete:function(){if(!a.autoHeight){a.toShow.css("height","")}a.toShow.css("width",r);a.toShow.css({overflow:q});a.complete()}})},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1000:200})}}})})(jQuery);(function(i){var k,l="ui-button ui-widget ui-state-default ui-corner-all",g="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",j=function(a){i(":ui-button",a.target.form).each(function(){var b=i(this).data("button");setTimeout(function(){b.refresh()},1)})},h=function(c){var d=c.name,b=c.form,a=i([]);if(d){if(b){a=i(b).find("[name='"+d+"']")}else{a=i("[name='"+d+"']",c.ownerDocument).filter(function(){return !this.form})}}return a};i.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",j);this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var e=this,c=this.options,b=this.type==="checkbox"||this.type==="radio",a="ui-state-hover"+(!b?" ui-state-active":""),d="ui-state-focus";if(c.label===null){c.label=this.buttonElement.html()}if(this.element.is(":disabled")){c.disabled=true}this.buttonElement.addClass(l).attr("role","button").bind("mouseenter.button",function(){if(c.disabled){return}i(this).addClass("ui-state-hover");if(this===k){i(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){if(c.disabled){return}i(this).removeClass(a)}).bind("focus.button",function(){i(this).addClass(d)}).bind("blur.button",function(){i(this).removeClass(d)});if(b){this.element.bind("change.button",function(){e.refresh()})}if(this.type==="checkbox"){this.buttonElement.bind("click.button",function(){if(c.disabled){return false}i(this).toggleClass("ui-state-active");e.buttonElement.attr("aria-pressed",e.element[0].checked)})}else{if(this.type==="radio"){this.buttonElement.bind("click.button",function(){if(c.disabled){return false}i(this).addClass("ui-state-active");e.buttonElement.attr("aria-pressed",true);var f=e.element[0];h(f).not(f).map(function(){return i(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",false)})}else{this.buttonElement.bind("mousedown.button",function(){if(c.disabled){return false}i(this).addClass("ui-state-active");k=this;i(document).one("mouseup",function(){k=null})}).bind("mouseup.button",function(){if(c.disabled){return false}i(this).removeClass("ui-state-active")}).bind("keydown.button",function(f){if(c.disabled){return false}if(f.keyCode==i.ui.keyCode.SPACE||f.keyCode==i.ui.keyCode.ENTER){i(this).addClass("ui-state-active")}}).bind("keyup.button",function(){i(this).removeClass("ui-state-active")});if(this.buttonElement.is("a")){this.buttonElement.keyup(function(f){if(f.keyCode===i.ui.keyCode.SPACE){i(this).click()}})}}}this._setOption("disabled",c.disabled)},_determineButtonType:function(){if(this.element.is(":checkbox")){this.type="checkbox"}else{if(this.element.is(":radio")){this.type="radio"}else{if(this.element.is("input")){this.type="input"}else{this.type="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");if(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(l+" "+g).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());if(!this.hasTitle){this.buttonElement.removeAttr("title")}i.Widget.prototype.destroy.call(this)},_setOption:function(b,a){i.Widget.prototype._setOption.apply(this,arguments);if(b==="disabled"){if(a){this.element.attr("disabled",true)}else{this.element.removeAttr("disabled")}}this._resetButton()},refresh:function(){var a=this.element.is(":disabled");if(a!==this.options.disabled){this._setOption("disabled",a)}if(this.type==="radio"){h(this.element[0]).each(function(){if(i(this).is(":checked")){i(this).button("widget").addClass("ui-state-active").attr("aria-pressed",true)}else{i(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",false)}})}else{if(this.type==="checkbox"){if(this.element.is(":checked")){this.buttonElement.addClass("ui-state-active").attr("aria-pressed",true)}else{this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",false)}}}},_resetButton:function(){if(this.type==="input"){if(this.options.label){this.element.val(this.options.label)}return}var a=this.buttonElement,b=i("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(a.empty()).text(),c=this.options.icons,d=c.primary&&c.secondary;if(c.primary||c.secondary){a.addClass("ui-button-text-icon"+(d?"s":""));if(c.primary){a.prepend("<span class='ui-button-icon-primary ui-icon "+c.primary+"'></span>")}if(c.secondary){a.append("<span class='ui-button-icon-secondary ui-icon "+c.secondary+"'></span>")}if(!this.options.text){a.addClass(d?"ui-button-icons-only":"ui-button-icon-only").removeClass("ui-button-text-icons ui-button-text-icon");if(!this.hasTitle){a.attr("title",b)}}}else{a.addClass("ui-button-text-only")}}});i.widget("ui.buttonset",{_create:function(){this.element.addClass("ui-buttonset");this._init()},_init:function(){this.refresh()},_setOption:function(b,a){if(b==="disabled"){this.buttons.button("option",b,a)}i.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 i(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 i(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");i.Widget.prototype.destroy.call(this)}})}(jQuery));(function(c){var d="ui-dialog ui-widget ui-widget-content ui-corner-all ";c.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:1000},_create:function(){this.originalTitle=this.element.attr("title");var b=this,a=b.options,n=a.title||b.originalTitle||"&#160;",s=c.ui.dialog.getTitleId(b.element),m=(b.uiDialog=c("<div></div>")).appendTo(document.body).hide().addClass(d+a.dialogClass).css({zIndex:a.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(e){if(a.closeOnEscape&&e.keyCode&&e.keyCode===c.ui.keyCode.ESCAPE){b.close(e);e.preventDefault()}}).attr({role:"dialog","aria-labelledby":s}).mousedown(function(e){b.moveToTop(false,e)}),q=b.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(m),r=(b.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(m),o=c('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){o.addClass("ui-state-hover")},function(){o.removeClass("ui-state-hover")}).focus(function(){o.addClass("ui-state-focus")}).blur(function(){o.removeClass("ui-state-focus")}).click(function(e){b.close(e);return false}).appendTo(r),p=(b.uiDialogTitlebarCloseText=c("<span></span>")).addClass("ui-icon ui-icon-closethick").text(a.closeText).appendTo(o),u=c("<span></span>").addClass("ui-dialog-title").attr("id",s).html(n).prependTo(r);if(c.isFunction(a.beforeclose)&&!c.isFunction(a.beforeClose)){a.beforeClose=a.beforeclose}r.find("*").add(r).disableSelection();if(a.draggable&&c.fn.draggable){b._makeDraggable()}if(a.resizable&&c.fn.resizable){b._makeResizable()}b._createButtons(a.buttons);b._isOpen=false;if(c.fn.bgiframe){m.bgiframe()}},_init:function(){if(this.options.autoOpen){this.open()}},destroy:function(){var a=this;if(a.overlay){a.overlay.destroy()}a.uiDialog.hide();a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");a.uiDialog.remove();if(a.originalTitle){a.element.attr("title",a.originalTitle)}return a},widget:function(){return this.uiDialog},close:function(a){var f=this,b;if(false===f._trigger("beforeClose",a)){return}if(f.overlay){f.overlay.destroy()}f.uiDialog.unbind("keypress.ui-dialog");f._isOpen=false;if(f.options.hide){f.uiDialog.hide(f.options.hide,function(){f._trigger("close",a)})}else{f.uiDialog.hide();f._trigger("close",a)}c.ui.dialog.overlay.resize();if(f.options.modal){b=0;c(".ui-dialog").each(function(){if(this!==f.uiDialog[0]){b=Math.max(b,c(this).css("z-index"))}});c.ui.dialog.maxZ=b}return f},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var j=this,h=j.options,i;if((h.modal&&!a)||(!h.stack&&!h.modal)){return j._trigger("focus",b)}if(h.zIndex>c.ui.dialog.maxZ){c.ui.dialog.maxZ=h.zIndex}if(j.overlay){c.ui.dialog.maxZ+=1;j.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}i={scrollTop:j.element.attr("scrollTop"),scrollLeft:j.element.attr("scrollLeft")};c.ui.dialog.maxZ+=1;j.uiDialog.css("z-index",c.ui.dialog.maxZ);j.element.attr(i);j._trigger("focus",b);return j},open:function(){if(this._isOpen){return}var b=this,a=b.options,f=b.uiDialog;b.overlay=a.modal?new c.ui.dialog.overlay(b):null;if(f.next().length){f.appendTo("body")}b._size();b._position(a.position);f.show(a.show);b.moveToTop(true);if(a.modal){f.bind("keypress.ui-dialog",function(j){if(j.keyCode!==c.ui.keyCode.TAB){return}var k=c(":tabbable",this),e=k.filter(":first"),l=k.filter(":last");if(j.target===l[0]&&!j.shiftKey){e.focus(1);return false}else{if(j.target===e[0]&&j.shiftKey){l.focus(1);return false}}})}c([]).add(f.find(".ui-dialog-content :tabbable:first")).add(f.find(".ui-dialog-buttonpane :tabbable:first")).add(f).filter(":first").focus();b._trigger("open");b._isOpen=true;return b},_createButtons:function(a){var b=this,h=false,g=c("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");b.uiDialog.find(".ui-dialog-buttonpane").remove();if(typeof a==="object"&&a!==null){c.each(a,function(){return !(h=true)})}if(h){c.each(a,function(j,e){var f=c('<button type="button"></button>').text(j).click(function(){e.apply(b.element[0],arguments)}).appendTo(g);if(c.fn.button){f.button()}});g.appendTo(b.uiDialog)}},_makeDraggable:function(){var j=this,b=j.options,a=c(document),h;function i(e){return{position:e.position,offset:e.offset}}j.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(f,e){h=b.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");j._trigger("dragStart",f,i(e))},drag:function(f,e){j._trigger("drag",f,i(e))},stop:function(f,e){b.position=[e.position.left-a.scrollLeft(),e.position.top-a.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(h);j._trigger("dragStop",f,i(e));c.ui.dialog.overlay.resize()}})},_makeResizable:function(a){a=(a===undefined?this.options.resizable:a);var k=this,b=k.options,l=k.uiDialog.css("position"),i=(typeof a==="string"?a:"n,e,s,w,se,sw,ne,nw");function j(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}k.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:k.element,maxWidth:b.maxWidth,maxHeight:b.maxHeight,minWidth:b.minWidth,minHeight:k._minHeight(),handles:i,start:function(f,e){c(this).addClass("ui-dialog-resizing");k._trigger("resizeStart",f,j(e))},resize:function(f,e){k._trigger("resize",f,j(e))},stop:function(f,e){c(this).removeClass("ui-dialog-resizing");b.height=c(this).height();b.width=c(this).width();k._trigger("resizeStop",f,j(e));c.ui.dialog.overlay.resize()}}).css("position",l).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;if(a.height==="auto"){return a.minHeight}else{return Math.min(a.minHeight,a.height)}},_position:function(g){var b=[],a=[0,0],h;g=g||c.ui.dialog.prototype.options.position;if(typeof g==="string"||(typeof g==="object"&&"0" in g)){b=g.split?g.split(" "):[g[0],g[1]];if(b.length===1){b[1]=b[0]}c.each(["left","top"],function(e,f){if(+b[e]===b[e]){a[e]=b[e];b[e]=f}})}else{if(typeof g==="object"){if("left" in g){b[0]="left";a[0]=g.left}else{if("right" in g){b[0]="right";a[0]=-g.right}}if("top" in g){b[1]="top";a[1]=g.top}else{if("bottom" in g){b[1]="bottom";a[1]=-g.bottom}}}}h=this.uiDialog.is(":visible");if(!h){this.uiDialog.show()}this.uiDialog.css({top:0,left:0}).position({my:b.join(" "),at:b.join(" "),offset:a.join(" "),of:window,collision:"fit",using:function(e){var f=c(this).css(e).offset().top;if(f<0){c(this).css("top",e.top-f)}}});if(!h){this.uiDialog.hide()}},_setOption:function(i,b){var k=this,l=k.uiDialog,a=l.is(":data(resizable)"),j=false;switch(i){case"beforeclose":i="beforeClose";break;case"buttons":k._createButtons(b);break;case"closeText":k.uiDialogTitlebarCloseText.text(""+b);break;case"dialogClass":l.removeClass(k.options.dialogClass).addClass(d+b);break;case"disabled":if(b){l.addClass("ui-dialog-disabled")}else{l.removeClass("ui-dialog-disabled")}break;case"draggable":if(b){k._makeDraggable()}else{l.draggable("destroy")}break;case"height":j=true;break;case"maxHeight":if(a){l.resizable("option","maxHeight",b)}j=true;break;case"maxWidth":if(a){l.resizable("option","maxWidth",b)}j=true;break;case"minHeight":if(a){l.resizable("option","minHeight",b)}j=true;break;case"minWidth":if(a){l.resizable("option","minWidth",b)}j=true;break;case"position":k._position(b);break;case"resizable":if(a&&!b){l.resizable("destroy")}if(a&&typeof b==="string"){l.resizable("option","handles",b)}if(!a&&b!==false){k._makeResizable(b)}break;case"title":c(".ui-dialog-title",k.uiDialogTitlebar).html(""+(b||"&#160;"));break;case"width":j=true;break}c.Widget.prototype._setOption.apply(k,arguments);if(j){k._size()}},_size:function(){var a=this.options,b;this.element.css("width","auto").hide();b=this.uiDialog.css({height:"auto",width:a.width}).height();this.element.css(a.height==="auto"?{minHeight:Math.max(a.minHeight-b,0),height:"auto"}:{minHeight:0,height:Math.max(a.height-b,0)}).show();if(this.uiDialog.is(":data(resizable)")){this.uiDialog.resizable("option","minHeight",this._minHeight())}}});c.extend(c.ui.dialog,{version:"1.8",uuid:0,maxZ:0,getTitleId:function(b){var a=b.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),create:function(a){if(this.instances.length===0){setTimeout(function(){if(c.ui.dialog.overlay.instances.length){c(document).bind(c.ui.dialog.overlay.events,function(f){return(c(f.target).zIndex()>=c.ui.dialog.overlay.maxZ)})}},1);c(document).bind("keydown.dialog-overlay",function(f){if(a.options.closeOnEscape&&f.keyCode&&f.keyCode===c.ui.keyCode.ESCAPE){a.close(f);f.preventDefault()}});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var b=(this.oldInstances.pop()||c("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});if(c.fn.bgiframe){b.bgiframe()}this.instances.push(b);return b},destroy:function(b){this.oldInstances.push(this.instances.splice(c.inArray(b,this.instances),1)[0]);if(this.instances.length===0){c([document,window]).unbind(".dialog-overlay")}b.remove();var a=0;c.each(this.instances,function(){a=Math.max(a,this.css("z-index"))});this.maxZ=a},height:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(a<b){return c(window).height()+"px"}else{return a+"px"}}else{return c(document).height()+"px"}},width:function(){var b,a;if(c.browser.msie&&c.browser.version<7){b=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);a=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(b<a){return c(window).width()+"px"}else{return b+"px"}}else{return c(document).width()+"px"}},resize:function(){var a=c([]);c.each(c.ui.dialog.overlay.instances,function(){a=a.add(this)});a.css({width:0,height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()})}});c.extend(c.ui.dialog.overlay.prototype,{destroy:function(){c.ui.dialog.overlay.destroy(this.$el)}})}(jQuery));(function(f){var d=0,e=0;f.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(b,a){if(b=="selected"){if(this.options.collapsible&&a==this.options.selected){return}this.select(a)}else{this.options[b]=a;this._tabify()}},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+(++d)},_sanitizeSelector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var a=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+(++e));return f.cookie.apply(null,[a].concat(f.makeArray(arguments)))},_ui:function(a,b){return{tab:a,panel:b,index:this.anchors.index(a)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var a=f(this);a.html(a.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){this.list=this.element.find("ol,ul").eq(0);this.lis=f("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return f("a",this)[0]});this.panels=f([]);var a=this,y=this.options;var z=/^#.+/;this.anchors.each(function(k,m){var l=f(m).attr("href");var j=l.split("#")[0],h;if(j&&(j===location.toString().split("#")[0]||(h=f("base")[0])&&j===h.href)){l=m.hash;m.href=l}if(z.test(l)){a.panels=a.panels.add(a._sanitizeSelector(l))}else{if(l!="#"){f.data(m,"href.tabs",l);f.data(m,"load.tabs",l.replace(/#.*$/,""));var n=a._tabId(m);m.href="#"+n;var g=f("#"+n);if(!g.length){g=f(y.panelTemplate).attr("id",n).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[k-1]||a.list);g.data("destroy.tabs",true)}a.panels=a.panels.add(g)}else{y.disabled.push(k)}}});if(b){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(y.selected===undefined){if(location.hash){this.anchors.each(function(g,h){if(h.hash==location.hash){y.selected=g;return false}})}if(typeof y.selected!="number"&&y.cookie){y.selected=parseInt(a._cookie(),10)}if(typeof y.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){y.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}y.selected=y.selected||(this.lis.length?0:-1)}else{if(y.selected===null){y.selected=-1}}y.selected=((y.selected>=0&&this.anchors[y.selected])||y.selected<0)?y.selected:0;y.disabled=f.unique(y.disabled.concat(f.map(this.lis.filter(".ui-state-disabled"),function(g,h){return a.lis.index(g)}))).sort();if(f.inArray(y.selected,y.disabled)!=-1){y.disabled.splice(f.inArray(y.selected,y.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(y.selected>=0&&this.anchors.length){this.panels.eq(y.selected).removeClass("ui-tabs-hide");this.lis.eq(y.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[y.selected],a.panels[y.selected]))});this.load(y.selected)}f(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else{y.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[y.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(y.cookie){this._cookie(y.selected,y.cookie)}for(var v=0,c;(c=this.lis[v]);v++){f(c)[f.inArray(v,y.disabled)!=-1&&!f(c).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(y.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(y.event!="mouseover"){var w=function(h,g){if(g.is(":not(.ui-state-disabled)")){g.addClass("ui-state-"+h)}};var s=function(h,g){g.removeClass("ui-state-"+h)};this.lis.bind("mouseover.tabs",function(){w("hover",f(this))});this.lis.bind("mouseout.tabs",function(){s("hover",f(this))});this.anchors.bind("focus.tabs",function(){w("focus",f(this).closest("li"))});this.anchors.bind("blur.tabs",function(){s("focus",f(this).closest("li"))})}var A,u;if(y.fx){if(f.isArray(y.fx)){A=y.fx[0];u=y.fx[1]}else{A=u=y.fx}}function x(g,h){g.css({display:""});if(!f.support.opacity&&h.opacity){g[0].style.removeAttribute("filter")}}var o=u?function(g,h){f(g).closest("li").addClass("ui-tabs-selected ui-state-active");h.hide().removeClass("ui-tabs-hide").animate(u,u.duration||"normal",function(){x(h,u);a._trigger("show",null,a._ui(g,h[0]))})}:function(g,h){f(g).closest("li").addClass("ui-tabs-selected ui-state-active");h.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,h[0]))};var i=A?function(h,g){g.animate(A,A.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");g.addClass("ui-tabs-hide");x(g,A);a.element.dequeue("tabs")})}:function(j,g,h){a.lis.removeClass("ui-tabs-selected ui-state-active");g.addClass("ui-tabs-hide");a.element.dequeue("tabs")};this.anchors.bind(y.event+".tabs",function(){var k=this,g=f(this).closest("li"),h=a.panels.filter(":not(.ui-tabs-hide)"),j=f(a._sanitizeSelector(this.hash));if((g.hasClass("ui-tabs-selected")&&!y.collapsible)||g.hasClass("ui-state-disabled")||g.hasClass("ui-state-processing")||a._trigger("select",null,a._ui(this,j[0]))===false){this.blur();return false}y.selected=a.anchors.index(this);a.abort();if(y.collapsible){if(g.hasClass("ui-tabs-selected")){y.selected=-1;if(y.cookie){a._cookie(y.selected,y.cookie)}a.element.queue("tabs",function(){i(k,h)}).dequeue("tabs");this.blur();return false}else{if(!h.length){if(y.cookie){a._cookie(y.selected,y.cookie)}a.element.queue("tabs",function(){o(k,j)});a.load(a.anchors.index(this));this.blur();return false}}}if(y.cookie){a._cookie(y.selected,y.cookie)}if(j.length){if(h.length){a.element.queue("tabs",function(){i(k,h)})}a.element.queue("tabs",function(){o(k,j)});a.load(a.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(f.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var a=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 c=f.data(this,"href.tabs");if(c){this.href=c}var b=f(this).unbind(".tabs");f.each(["href","load","cache"],function(j,i){b.removeData(i+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(f.data(this,"destroy.tabs")){f(this).remove()}else{f(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"].join(" "))}});if(a.cookie){this._cookie(null,a.cookie)}return this},add:function(m,n,o){if(o===undefined){o=this.anchors.length}var p=this,c=this.options,a=f(c.tabTemplate.replace(/#\{href\}/g,m).replace(/#\{label\}/g,n)),b=!m.indexOf("#")?m.replace("#",""):this._tabId(f("a",a)[0]);a.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var l=f("#"+b);if(!l.length){l=f(c.panelTemplate).attr("id",b).data("destroy.tabs",true)}l.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(o>=this.lis.length){a.appendTo(this.list);l.appendTo(this.list[0].parentNode)}else{a.insertBefore(this.lis[o]);l.insertBefore(this.panels[o])}c.disabled=f.map(c.disabled,function(g,h){return g>=o?++g:g});this._tabify();if(this.anchors.length==1){c.selected=0;a.addClass("ui-tabs-selected ui-state-active");l.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){p._trigger("show",null,p._ui(p.anchors[0],p.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[o],this.panels[o]));return this},remove:function(h){var b=this.options,a=this.lis.eq(h).remove(),c=this.panels.eq(h).remove();if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(h+(h+1<this.anchors.length?1:-1))}b.disabled=f.map(f.grep(b.disabled,function(g,i){return g!=h}),function(g,i){return g>=h?--g:g});this._tabify();this._trigger("remove",null,this._ui(a.find("a")[0],c[0]));return this},enable:function(b){var a=this.options;if(f.inArray(b,a.disabled)==-1){return}this.lis.eq(b).removeClass("ui-state-disabled");a.disabled=f.grep(a.disabled,function(c,h){return c!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]));return this},disable:function(b){var c=this,a=this.options;if(b!=a.selected){this.lis.eq(b).addClass("ui-state-disabled");a.disabled.push(b);a.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}return this},select:function(a){if(typeof a=="string"){a=this.anchors.index(this.anchors.filter("[href$="+a+"]"))}else{if(a===null){a=-1}}if(a==-1&&this.options.collapsible){a=this.options.selected}this.anchors.eq(a).trigger(this.options.event+".tabs");return this},load:function(c){var k=this,a=this.options,l=this.anchors.eq(c)[0],j=f.data(l,"load.tabs");this.abort();if(!j||this.element.queue("tabs").length!==0&&f.data(l,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(c).addClass("ui-state-processing");if(a.spinner){var b=f("span",l);b.data("label.tabs",b.html()).html(a.spinner)}this.xhr=f.ajax(f.extend({},a.ajaxOptions,{url:j,success:function(h,i){f(k._sanitizeSelector(l.hash)).html(h);k._cleanup();if(a.cache){f.data(l,"cache.tabs",true)}k._trigger("load",null,k._ui(k.anchors[c],k.panels[c]));try{a.ajaxOptions.success(h,i)}catch(g){}},error:function(g,i,h){k._cleanup();k._trigger("load",null,k._ui(k.anchors[c],k.panels[c]));try{a.ajaxOptions.error(g,i,c,l)}catch(h){}}}));k.element.dequeue("tabs");return this},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(a,b){this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",b);return this},length:function(){return this.anchors.length}});f.extend(f.ui.tabs,{version:"1.8"});f.extend(f.ui.tabs.prototype,{rotation:null,rotate:function(j,b){var l=this,a=this.options;var k=l._rotate||(l._rotate=function(g){clearTimeout(l.rotation);l.rotation=setTimeout(function(){var h=a.selected;l.select(++h<l.anchors.length?h:0)},j);if(g){g.stopPropagation()}});var c=l._unrotate||(l._unrotate=!b?function(g){if(g.clientX){l.rotate(null)}}:function(g){t=a.selected;k()});if(j){this.element.bind("tabsshow",k);this.anchors.bind(a.event+".tabs",c);k()}else{clearTimeout(l.rotation);this.element.unbind("tabsshow",k);this.anchors.unbind(a.event+".tabs",c);delete this._rotate;delete this._unrotate}return 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(a){if(a===undefined){return this._value()}this._setOption("value",a);return this},_setOption:function(a,d){switch(a){case"value":this.options.value=d;this._refreshValue();this._trigger("change");break}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number"){a=0}if(a<this._valueMin()){a=this._valueMin()}if(a>this._valueMax()){a=this._valueMax()}return a},_valueMin:function(){return 0},_valueMax:function(){return 100},_refreshValue:function(){var a=this.value();this.valueDiv[a===this._valueMax()?"addClass":"removeClass"]("ui-corner-right").width(a+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8"})})(jQuery);$(document).ready(function(){$(".ui-tabs").tabs();$(".ui-button").button()});