").next(":first");this.panelDock.attr("role","panelDock").css("float",c.collapseType=="slide-left"?"left":"right");this.panelFrame.attr("role","panelFrame").css({"float":c.collapseType=="slide-left"?"left":"right",overflow:"hidden"})}if(c.collapsed){this.panelDock.append(this.panelBox)}else{this.panelFrame.append(this.panelBox)}}if(c.collapsed){b.toggle(0,true)}}else{this.titleTextBox.css("cursor","default")}if(!c.accordion&&c.draggable&&a.fn.draggable){this._makeDraggable()}this.panelBox.show()}},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-panel-"+this.options.id);return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_makeDraggable:function(){this.panelBox.draggable({containment:"document",handle:".ui-panel-header",cancel:".ui-panel-content",cursor:"move"});this.contentBox.css("position","absolute")},_clickHandler:function(b,c){var d=this.options;if(d.disabled){return false}this.toggle(d.collapseSpeed);return false},toggle:function(f,i){var m=this,d=this.options,l=this.panelBox,h=this.contentBox,b=this.headerBox,k=this.titleTextBox,n=this.titleText,j=this.ctrlBox,g=this.panelDock,c="";if(!jQuery.support.leadingWhitespace){c="-ie"}if(h.css("display")=="none"){this._trigger("unfold")}else{this._trigger("fold")}if(j){j.toggle(0)}if(d.collapseType=="default"){if(f==0){if(j){j.hide()}h.hide()}else{h.slideToggle(f)}}else{if(f==0){d.collapsed=false;if(j){j.hide()}h.hide()}else{h.toggle()}if(d.collapsed==false){if(d.trueVerticalText){b.toggleClass("ui-panel-vtitle").css("height",d.vHeight);if(c==""){var e="height:"+(parseInt(d.vHeight)-50)+"px;width:100%;position:absolute;bottom:0;left:0;";k.empty().append('
').css("height",d.vHeight)}k.toggleClass("ui-panel-vtext"+c)}else{b.attr("align","center");k.html(k.text().replace(/(.)/g,"$1
"))}l.animate({width:"2.4em"},f);if(d.stackable){if(i){g.append(l)}else{g.prepend(l)}}}else{if(d.stackable){this.panelFrame.append(l)}if(d.trueVerticalText){b.toggleClass("ui-panel-vtitle").css("height","auto");k.empty().append(n);k.toggleClass("ui-panel-vtext"+c)}else{b.attr("align","left");k.html(k.text().replace(/
/g," "))}l.animate({width:d.width},f)}}if(((f!=0||d.trueVerticalText)&&d.cookie==null)||(!i&&d.cookie!=null)){d.collapsed=!d.collapsed}this.panelBox.data("collapsed",d.collapsed);if(!i){if(d.cookie){m._cookie(Number(d.collapsed),d.cookie)}if(d.accordion){a("."+d.accordion+"[role='panel'][id!='"+(d.id)+"']:not(:data(collapsed))").panel("toggle",f,true)}}this.collapseButton.toggleClass(this.iconBtnClpsd).toggleClass(this.iconBtn);b.toggleClass("ui-corner-all")},content:function(b){this.contentTextBox.html(b)},destroy:function(){var b=this.options;this.headerBox.html(this.titleText).removeAttr("align").removeAttr("style").removeClass("ui-panel-vtitle ui-corner-all "+b.headerClass);this.contentBox.removeClass(b.contentClass).removeAttr("style").html(b.content);this.panelBox.removeAttr("role").removeAttr("style").removeData("collapsed").unbind(".panel").removeClass(b.widgetClass);if(b.stackable&&a.inArray(b.collapseType,["slide-right","slide-left"])>-1){this.panelDock.before(this.panelBox);if(this.panelDock.children("div[role=panel]").length==0&&this.panelFrame.children("div[role=panel]").length==0){this.panelDock.remove();this.panelFrame.remove()}}if(b.cookie){this._cookie(null,b.cookie)}return this},_buttonHover:function(b){var c=this.options;b.bind({mouseover:function(){a(this).addClass(c.hoverClass)},mouseout:function(){a(this).removeClass(c.hoverClass)}})}});a.extend(a.ui.panel,{version:"0.6"})})(jQuery);