/* jquery.layout 1.3.0 - Release Candidate 30.4 $Date: 2012-03-10 08:00:00 (Sat, 10 Mar 2012) $ $Rev: 303004 $ Copyright (c) 2012 Fabrizio Balliano (http://www.fabrizioballiano.net) Kevin Dalman (http://allpro.net) Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html) and MIT (http://www.opensource.org/licenses/mit-license.php) licenses. Changelog: http://layout.jquery-dev.net/changelog.cfm#1.3.0.rc30.2 Docs: http://layout.jquery-dev.net/documentation.html Tips: http://layout.jquery-dev.net/tips.html Help: http://groups.google.com/group/jquery-ui-layout */ (function(c){function M(a){return"string"===c.type(a)}function ca(a,e){if(c.isArray(e))for(var f=0,g=e.length;f').appendTo("body"),f={width:e.width()- e[0].clientWidth,height:e.height()-e[0].clientHeight};e.remove();window.scrollbarWidth=f.width;window.scrollbarHeight=f.height;return a.match(/^(width|height)$/)?f[a]:f},showInvisibly:function(a,e){if(!a)return{};a.jquery||(a=c(a));var f={display:a.css("display"),visibility:a.css("visibility")};return e||"none"===f.display?(a.css({display:"block",visibility:"hidden"}),f):{}},getElementDimensions:function(a){var e={},f=e.css={},g={},k,q,i=c.layout.cssNum,r=a.offset();e.offsetLeft=r.left;e.offsetTop= r.top;c.each(["Left","Right","Top","Bottom"],function(i,r){k=f["border"+r]=c.layout.borderWidth(a,r);q=f["padding"+r]=c.layout.cssNum(a,"padding"+r);g[r]=k+q;e["inset"+r]=q});e.offsetWidth=a.innerWidth();e.offsetHeight=a.innerHeight();e.outerWidth=a.outerWidth();e.outerHeight=a.outerHeight();e.innerWidth=J(0,e.outerWidth-g.Left-g.Right);e.innerHeight=J(0,e.outerHeight-g.Top-g.Bottom);f.width=a.width();f.height=a.height();f.top=i(a,"top",!0);f.bottom=i(a,"bottom",!0);f.left=i(a,"left",!0);f.right= i(a,"right",!0);return e},getElementCSS:function(c,e){var f={},g=c[0].style,k=e.split(","),q=["Top","Bottom","Left","Right"],i=["Color","Style","Width"],r,E,F,I,o,p;for(I=0;Io;o++)if(E=q[o],"border"===r)for(p=0;3>p;p++)F=i[p],f[r+E+F]=g[r+E+F];else f[r+E]=g[r+E];else f[r]=g[r];return f},cssWidth:function(a,e){var f=c.layout.borderWidth,g=c.layout.cssNum;if(0>=e)return 0;if(!c.support.boxModel)return e;f=e-f(a,"Left")-f(a,"Right")- g(a,"paddingLeft")-g(a,"paddingRight");return J(0,f)},cssHeight:function(a,e){var f=c.layout.borderWidth,g=c.layout.cssNum;if(0>=e)return 0;if(!c.support.boxModel)return e;f=e-f(a,"Top")-f(a,"Bottom")-g(a,"paddingTop")-g(a,"paddingBottom");return J(0,f)},cssNum:function(a,e,f){a.jquery||(a=c(a));var g=c.layout.showInvisibly(a),e=c.curCSS(a[0],e,!0),f=f&&"auto"==e?e:parseInt(e,10)||0;a.css(g);return f},borderWidth:function(a,e){a.jquery&&(a=a[0]);var f="border"+e.substr(0,1).toUpperCase()+e.substr(1); return"none"===c.curCSS(a,f+"Style",!0)?0:parseInt(c.curCSS(a,f+"Width",!0),10)||0},isMouseOverElem:function(a,e){var f=c(e||this),g=f.offset(),k=g.top,g=g.left,q=g+f.outerWidth(),f=k+f.outerHeight(),i=a.pageX,r=a.pageY;return c.layout.browser.msie&&0>i&&0>r||i>=g&&i<=q&&r>=k&&r<=f},msg:function(a,e,f,g){c.isPlainObject(a)&&window.debugData?("string"===typeof e?(g=f,f=e):"object"===typeof f&&(g=f,f=null),f=f||"log( )",g=c.extend({sort:!1,returnHTML:!1,display:!1},g),!0===e||g.display?debugData(a, f,g):window.console&&console.log(debugData(a,f,g))):e?alert(a):window.console&&console.log(a)}};var v=c.layout.language;c.layout.defaults={name:"",containerClass:"ui-layout-container",scrollToBookmarkOnLoad:!0,resizeWithWindow:!0,resizeWithWindowDelay:200,resizeWithWindowMaxDelay:0,onresizeall_start:null,onresizeall_end:null,onload_start:null,onload_end:null,onunload_start:null,onunload_end:null,autoBindCustomButtons:!1,initPanes:!0,showErrorMessages:!0,showDebugMessages:!1,zIndex:null,zIndexes:{pane_normal:0, content_mask:1,resizer_normal:2,pane_sliding:100,pane_animate:1E3,resizer_drag:1E4},panes:{applyDemoStyles:!1,closable:!0,resizable:!0,slidable:!0,initClosed:!1,initHidden:!1,contentSelector:".ui-layout-content",contentIgnoreSelector:".ui-layout-ignore",findNestedContent:!1,paneClass:"ui-layout-pane",resizerClass:"ui-layout-resizer",togglerClass:"ui-layout-toggler",buttonClass:"ui-layout-button",minSize:0,maxSize:0,spacing_open:6,spacing_closed:6,togglerLength_open:50,togglerLength_closed:50,togglerAlign_open:"center", togglerAlign_closed:"center",togglerTip_open:v.Close,togglerTip_closed:v.Open,togglerContent_open:"",togglerContent_closed:"",resizerDblClickToggle:!0,autoResize:!0,autoReopen:!0,resizerDragOpacity:1,maskContents:!1,maskObjects:!1,maskZindex:null,resizingGrid:!1,livePaneResizing:!1,liveContentResizing:!1,liveResizingTolerance:1,noRoomToOpenTip:v.noRoomToOpenTip,resizerTip:v.Resize,sliderTip:v.Slide,sliderCursor:"pointer",slideTrigger_open:"click",slideTrigger_close:"mouseleave",slideDelay_open:300, slideDelay_close:300,hideTogglerOnSlide:!1,preventQuickSlideClose:c.layout.browser.webkit,preventPrematureSlideClose:!1,showOverflowOnHover:!1,enableCursorHotkey:!0,customHotkeyModifier:"SHIFT",fxName:"slide",fxSpeed:null,fxSettings:{},fxOpacityFix:!0,animatePaneSizing:!1,childOptions:null,initChildLayout:!0,destroyChildLayout:!0,resizeChildLayout:!0,triggerEventsOnLoad:!1,triggerEventsDuringLiveResize:!0,onshow_start:null,onshow_end:null,onhide_start:null,onhide_end:null,onopen_start:null,onopen_end:null, onclose_start:null,onclose_end:null,onresize_start:null,onresize_end:null,onsizecontent_start:null,onsizecontent_end:null,onswap_start:null,onswap_end:null,ondrag_start:null,ondrag_end:null},north:{paneSelector:".ui-layout-north",size:"auto",resizerCursor:"n-resize",customHotkey:""},south:{paneSelector:".ui-layout-south",size:"auto",resizerCursor:"s-resize",customHotkey:""},east:{paneSelector:".ui-layout-east",size:200,resizerCursor:"e-resize",customHotkey:""},west:{paneSelector:".ui-layout-west", size:200,resizerCursor:"w-resize",customHotkey:""},center:{paneSelector:".ui-layout-center",minWidth:0,minHeight:0}};c.layout.optionsMap={layout:"stateManagement,effects,zIndexes,name,zIndex,scrollToBookmarkOnLoad,showErrorMessages,resizeWithWindow,resizeWithWindowDelay,resizeWithWindowMaxDelay,onresizeall,onresizeall_start,onresizeall_end,onload,onunload,autoBindCustomButtons".split(","),center:"paneClass,contentSelector,contentIgnoreSelector,findNestedContent,applyDemoStyles,triggerEventsOnLoad,showOverflowOnHover,maskContents,maskObjects,liveContentResizing,childOptions,initChildLayout,resizeChildLayout,destroyChildLayout,onresize,onresize_start,onresize_end,onsizecontent,onsizecontent_start,onsizecontent_end".split(","), noDefault:["paneSelector","resizerCursor","customHotkey"]};c.layout.transformData=function(c){var e={panes:{},center:{}},f,g,k,q,i,r,E;if("object"!==typeof c)return e;for(g in c){f=e;i=c[g];k=g.split("__");E=k.length-1;for(r=0;r<=E;r++)q=k[r],r===E?f[q]=i:f[q]||(f[q]={}),f=f[q]}return e};c.layout.backwardCompatibility={map:{applyDefaultStyles:"applyDemoStyles",resizeNestedLayout:"resizeChildLayout",resizeWhileDragging:"livePaneResizing",resizeContentWhileDragging:"liveContentResizing",triggerEventsWhileDragging:"triggerEventsDuringLiveResize", maskIframesOnResize:"maskContents",useStateCookie:"stateManagement.enabled","cookie.autoLoad":"stateManagement.autoLoad","cookie.autoSave":"stateManagement.autoSave","cookie.keys":"stateManagement.stateKeys","cookie.name":"stateManagement.cookie.name","cookie.domain":"stateManagement.cookie.domain","cookie.path":"stateManagement.cookie.path","cookie.expires":"stateManagement.cookie.expires","cookie.secure":"stateManagement.cookie.secure"},renameOptions:function(a){function e(c,e){for(var f=c.split("."), g=f.length-1,i={branch:a,key:f[g]},p=0,k;pl)return!0;var z={38:"north",40:"south",37:"west",39:"east"},B=b.shiftKey,h=b.ctrlKey,a,m,j,u;h&&37<=l&&40>=l&&o[z[l]].enableCursorHotkey?u=z[l]:(h||B)&&c.each(i.borderPanes,function(b,c){a=o[c];m=a.customHotkey;j=a.customHotkeyModifier;if(B&&"SHIFT"==j||h&&"CTRL"==j||h&&B)if(m&&l===(isNaN(m)||9>=m?m.toUpperCase().charCodeAt(0):m))return u=c,!1});if(!u||!w[u]||!o[u].closable||p[u].isHidden)return!0; da(u);b.stopPropagation();return b.returnValue=!1}function f(b){if(A()){this&&this.tagName&&(b=this);var l;M(b)?l=w[b]:c(b).data("layoutRole")?l=c(b):c(b).parents().each(function(){if(c(this).data("layoutRole"))return l=c(this),!1});if(l&&l.length){var z=l.data("layoutEdge"),b=p[z];b.cssSaved&&g(z);if(b.isSliding||b.isResizing||b.isClosed)b.cssSaved=!1;else{var B={zIndex:o.zIndexes.resizer_normal+1},h={},a=l.css("overflow"),m=l.css("overflowX"),j=l.css("overflowY");"visible"!=a&&(h.overflow=a,B.overflow= "visible");m&&!m.match(/visible|auto/)&&(h.overflowX=m,B.overflowX="visible");j&&!j.match(/visible|auto/)&&(h.overflowY=m,B.overflowY="visible");b.cssSaved=h;l.css(B);c.each(i.allPanes,function(b,l){l!=z&&g(l)})}}}}function g(b){if(A()){this&&this.tagName&&(b=this);var l;M(b)?l=w[b]:c(b).data("layoutRole")?l=c(b):c(b).parents().each(function(){if(c(this).data("layoutRole"))return l=c(this),!1});if(l&&l.length){var b=l.data("layoutEdge"),b=p[b],z=b.cssSaved||{};!b.isSliding&&!b.isResizing&&l.css("zIndex", o.zIndexes.pane_normal);l.css(z);b.cssSaved=!1}}}var k=c.layout.browser,q=c.layout.language,i=c.layout.config,r=c.layout.cssWidth,E=c.layout.cssHeight,F=c.layout.getElementDimensions,I=c.layout.getElementCSS,o=c.extend(!0,{},c.layout.defaults);o.effects=c.extend(!0,{},c.layout.effects);var p={id:"layout"+c.now(),initialized:!1,container:{},north:{},south:{},east:{},west:{},center:{}},v={north:null,south:null,east:null,west:null,center:null},K={data:{},set:function(b,l,c){K.clear(b);K.data[b]=setTimeout(l, c)},clear:function(b){var l=K.data;l[b]&&(clearTimeout(l[b]),delete l[b])}},V=function(b,l){c.layout.msg(b,l&&o.showErrorMessages)},C=function(b,l){if(l){var z;try{if("function"===typeof l)z=l;else if(M(l))if(l.match(/,/)){var a=l.split(",");z=eval(a[0]);if("function"==typeof z&&1b&&(b=100);K.clear("winResize");K.set("winResize",function(){K.clear("winResize");K.clear("winResizeRepeater");var b=F(t);(b.innerWidth!==x.innerWidth||b.innerHeight!==x.innerHeight)&&$()},b);K.data.winResizeRepeater||Da()},Da=function(){var b=Number(o.resizeWithWindowMaxDelay);0< b&&K.set("winResizeRepeater",function(){Da();$()},b)},Ea=function(){var b=o;C(null,b.onunload_start);ca(y,c.layout.onUnload);C(null,b.onunload_end||b.onunload)},Fa=function(b){b=b?b.split(","):i.borderPanes;c.each(b,function(b,a){var B=o[a];if(B.enableCursorHotkey||B.customHotkey)return c(document).bind("keydown."+H,e),!1})},Pa=function(){function b(b){var l=o[b],a=o.panes;l.fxSettings||(l.fxSettings={});a.fxSettings||(a.fxSettings={});c.each(["_open","_close","_size"],function(h,z){var m="fxName"+ z,j="fxSpeed"+z,B="fxSettings"+z,e=l[m]=l[m]||a[m]||l.fxName||a.fxName||"none";if(e==="none"||!c.effects||!c.effects[e]||!o.effects[e])e=l[m]="none";e=o.effects[e]||{};m=e.all||null;e=e[b]||null;l[j]=l[j]||a[j]||l.fxSpeed||a.fxSpeed||null;l[B]=c.extend({},m,e,a.fxSettings,l.fxSettings,a[B],l[B])});delete l.fxName;delete l.fxSpeed;delete l.fxSettings}var l,z,B,h,e,m;a=c.layout.transformData(a);a=c.layout.backwardCompatibility.renameAllOptions(a);if(!c.isEmptyObject(a.panes)){l=c.layout.optionsMap.noDefault; h=0;for(e=l.length;hc.inArray(B,j)&&0>c.inArray(B,l)&&(a.panes[B]||(a.panes[B]=c.isPlainObject(h)?c.extend(!0,{},h):h),delete a[B]);c.extend(!0,o,a);c.each(i.allPanes,function(h,j){i[j]=c.extend(!0,{},i.panes,i[j]);z=o.panes;m=o[j];if("center"===j){l=c.layout.optionsMap.center;h=0;for(e=l.length;h"),u=u.toggler=e.closable?G[a]=c("
"):!1;!h.isVisible&&e.slidable&&g.attr("title",e.sliderTip).css("cursor",e.sliderCursor);g.attr("id","#"==e.paneSelector.substr(0,1)?e.paneSelector.substr(1)+"-resizer":"").data("parentLayout",y).data("layoutRole","resizer").data("layoutEdge",a).css(i.resizers.cssReq).css("zIndex",o.zIndexes.resizer_normal).css(e.applyDemoStyles?i.resizers.cssDemo:{}).addClass(f+" "+f+j).hover(pa,P).hover(Aa,Ba).appendTo(t); u&&(u.attr("id","#"==e.paneSelector.substr(0,1)?e.paneSelector.substr(1)+"-toggler":"").data("parentLayout",y).data("layoutRole","toggler").data("layoutEdge",a).css(i.togglers.cssReq).css(e.applyDemoStyles?i.togglers.cssDemo:{}).addClass(m+" "+m+j).hover(pa,P).bind("mouseenter",Aa).appendTo(g),e.togglerContent_open&&c(""+e.togglerContent_open+"").data("layoutRole","togglerContent").data("layoutEdge",a).addClass("content content-open").css("display","none").appendTo(u),e.togglerContent_closed&& c(""+e.togglerContent_closed+"").data("layoutRole","togglerContent").data("layoutEdge",a).addClass("content content-closed").css("display","none").appendTo(u),Ja(a));Qa(a);h.isVisible?ua(a):(va(a),Y(a,!0))}});ea()},Ia=function(b,a){if(A()){var c=o[b],e=c.contentSelector,h=y[b],f=w[b],m;e&&(m=h.content=O[b]=c.findNestedContent?f.find(e).eq(0):f.children(e).eq(0));m&&m.length?(m.data("layoutRole","content"),m.data("layoutCSS")||m.data("layoutCSS",I(m,"height")),m.css(i.content.cssReq), c.applyDemoStyles&&(m.css(i.content.cssDemo),f.css(i.content.cssDemoPane)),p[b].content={},!1!==a&&aa(b)):h.content=O[b]=!1}},Qa=function(b){var a=c.layout.plugins.draggable,b=b?b.split(","):i.borderPanes;c.each(b,function(b,h){var f=o[h];if(!a||!w[h]||!f.resizable)return f.resizable=!1,!0;var m=p[h],j=o.zIndexes,u=i[h],g="horz"==u.dir?"top":"left",k=h+",center,"+i.oppositeEdge[h]+("horz"==u.dir?",west,east":""),r=D[h],x=f.resizerClass,E=0,v,A,F=x+"-drag",y=x+"-"+h+"-drag",I=x+"-dragging",J=x+"-"+ h+"-dragging",H=x+"-dragging-limit",G=x+"-"+h+"-dragging-limit",M=!1;m.isClosed||r.attr("title",f.resizerTip).css("cursor",f.resizerCursor);r.draggable({containment:t[0],axis:"horz"==u.dir?"y":"x",delay:0,distance:1,grid:f.resizingGrid,helper:"clone",opacity:f.resizerDragOpacity,addClasses:!1,zIndex:j.resizer_drag,start:function(b,a){f=o[h];m=p[h];A=f.livePaneResizing;if(!1===C(h,f.ondrag_start))return!1;m.isResizing=!0;K.clear(h+"_closeSlider");N(h);v=m.resizerPosition;E=a.position[g];r.addClass(F+ " "+y);M=!1;c("body").disableSelection();ja(k)},drag:function(b,a){M||(a.helper.addClass(I+" "+J).css({right:"auto",bottom:"auto"}).children().css("visibility","hidden"),M=!0,m.isSliding&&w[h].css("zIndex",j.pane_sliding));var c=0;a.position[g]v.max&&(a.position[g]=v.max,c=1);c?(a.helper.addClass(H+" "+G),window.defaultStatus=0c&&h.match(/south|east/)?q.maxSizeWarning:q.minSizeWarning):(a.helper.removeClass(H+" "+G),window.defaultStatus= "");A&&Math.abs(a.position[g]-E)>=f.liveResizingTolerance&&(E=a.position[g],e(b,a,h))},stop:function(b,a){c("body").enableSelection();window.defaultStatus="";r.removeClass(F+" "+y);m.isResizing=!1;e(b,a,h,!0,k)}})});var e=function(b,a,c,l,e){var f=a.position,z=i[c],b=o[c],a=p[c],g;switch(c){case "north":g=f.top;break;case "west":g=f.left;break;case "south":g=x.offsetHeight-f.top-b.spacing_open;break;case "east":g=x.offsetWidth-f.left-b.spacing_open}g-=x["inset"+z.side];l?(!1!==C(c,b.ondrag_end||b.ondrag)&& ka(c,g,!1,!0),wa(),a.isSliding&&e&&ja(e,!0)):Math.abs(g-a.size)j.maxSize)return xa(b,!1),!e&&m.noRoomToOpenTip&& alert(m.noRoomToOpenTip),o();a?fa(b,!0):j.isSliding?fa(b,!1):m.slidable&&Y(b,!1);j.noRoom=!1;R(b);r=j.isShowing;delete j.isShowing;k=!c&&j.isClosed&&"none"!=m.fxName_open;j.isMoving=!0;j.isVisible=!0;j.isClosed=!1;r&&(j.isHidden=!1);if(k){var p="center"+("horz"==g.dir?",west,east":"");j.isSliding&&(p+=","+i.oppositeEdge[b]);ja(p,!0);ma(b,!0);f.show(m.fxName_open,m.fxSettings_open,m.fxSpeed_open,function(){ma(b,false);j.isVisible&&h();o()})}else f.show(),h(),o()}})}},ua=function(b,a){var e=w[b],f= D[b],h=G[b],g=o[b],m=p[b],j=i[b].side.toLowerCase(),u=g.resizerClass,k=g.togglerClass,r="-"+b;f.css(j,x["inset"+i[b].side]+W(b)).removeClass(u+"-closed "+u+r+"-closed").addClass(u+"-open "+u+r+"-open");m.isSliding?f.addClass(u+"-sliding "+u+r+"-sliding"):f.removeClass(u+"-sliding "+u+r+"-sliding");g.resizerDblClickToggle&&f.bind("dblclick",da);P(0,f);g.resizable&&c.layout.plugins.draggable?f.draggable("enable").css("cursor",g.resizerCursor).attr("title",g.resizerTip):m.isSliding||f.css("cursor","default"); h&&(h.removeClass(k+"-closed "+k+r+"-closed").addClass(k+"-open "+k+r+"-open").attr("title",g.togglerTip_open),P(0,h),h.children(".content-closed").hide(),h.children(".content-open").css("display","block"));xa(b,!m.isSliding);c.extend(m,F(e));p.initialized&&(ea(),aa(b,!0));if(!a&&(p.initialized||g.triggerEventsOnLoad)&&e.is(":visible"))C(b,g.onopen_end||g.onopen),m.isShowing&&C(b,g.onshow_end||g.onshow),p.initialized&&(C(b,g.onresize_end||g.onresize),X(b))},La=function(b){function a(){h.isClosed? h.isMoving||ba(f,!0):fa(f,!0)}if(A()){var e=M(b)?null:b,f=e?c(this).data("layoutEdge"):b,h=p[f],b=o[f].slideDelay_open;e&&e.stopImmediatePropagation();h.isClosed&&e&&"mouseenter"===e.type&&0h.maxSize?U(b,h.maxSize,e,f,!0):h.sizea?J(0,t.attempt-(t.actual-a)):J(0,t.attempt+(a-t.actual));thisTry.cssSize=("horz"==i[b].dir?E:r)(w[b],thisTry.attempt);u.css(v,thisTry.cssSize);thisTry.actual="width"==v?u.outerWidth():u.outerHeight();thisTry.correct=a===thisTry.actual;o.showDebugMessages&&(1===h.length&&(V(L,!1),V(t,!1)),V(thisTry,!1));if(3g.outerWidth){var q=f.minWidth-g.outerWidth,t=o.east.minSize||0,v=o.west.minSize||0,y=p.east.size,A=p.west.size,I=y,D=A;0t&&(I=J(y-t,y-q),q-=y-I);0v&&(D=J(A-v,A-q),q-=A-D);if(0===q){y!=t&&U("east",I,!0,e,!0);A!=v&& U("west",D,!0,e,!0);S("center",a,e);return}}}else{g.isVisible&&!g.noVerticalRoom&&c.extend(g,F(j),ha(h));if(!e&&!g.noVerticalRoom&&i.height===g.outerHeight)return!0;k.top=i.top;k.bottom=i.bottom;k.height=E(j,i.height);g.maxHeight=k.height;i=0<=g.maxHeight;i||(g.noVerticalRoom=!0)}i?(!a&&p.initialized&&C(h,f.onresize_start),j.css(k),g.noRoom&&!g.isClosed&&!g.isHidden&&R(h),g.isVisible&&(c.extend(g,F(j)),p.initialized&&aa(h))):!g.noRoom&&g.isVisible&&R(h);if(!g.isVisible)return!0;"center"===h&&(g=c.layout.browser, g=g.isIE6||g.msie&&!c.support.boxModel,w.north&&(g||"IFRAME"==p.north.tagName)&&w.north.css("width",r(w.north,x.innerWidth)),w.south&&(g||"IFRAME"==p.south.tagName)&&w.south.css("width",r(w.south,x.innerWidth)));!a&&p.initialized&&(C(h,f.onresize_end||f.onresize),X(h))}})},$=function(){if(p.initialized){if(t.is(":visible:")&&(c.extend(p.container,F(t)),x.outerHeight)){if(!1===C(null,o.onresizeall_start))return!1;var b,a,e;c.each(["south","north","east","west"],function(b,c){w[c]&&(e=p[c],a=o[c],a.autoResize&& e.size!=a.size?U(c,a.size,!0,!0,!0):(N(c),R(c,!1,!0,!0)))});S("",!0,!0);ea();a=o;c.each(i.allPanes,function(c,e){if((b=w[e])&&p[e].isVisible)C(e,a[e].onresize_end||a[e].onresize),X(e)});C(null,a.onresizeall_end||a.onresizeall)}}else ia()},X=function(b){if(o[b].resizeChildLayout){var a=w[b],c=O[b],e=y[b],f=v[b];e.child&&!f&&(f=e.child.container,f=v[b]=(f?f.data("layout"):0)||null);f&&f.destroyed&&(f=v[b]=null);f||(f=v[b]=a.data("layout")||(c?c.data("layout"):0)||null);e.child=v[b];f&&f.resizeAll()}}, aa=function(b,a){A()&&(b=b?b.split(","):i.allPanes,c.each(b,function(b,c){function e(b){return J(k.css.paddingBottom,parseInt(b.css("marginBottom"),10)||0)}function f(){var b=o[c].contentIgnoreSelector,b=j.nextAll().not(b||":lt(0)"),a=b.filter(":visible"),g=a.filter(":last");q={top:j[0].offsetTop,height:j.outerHeight(),numFooters:b.length,hiddenFooters:b.length-a.length,spaceBelow:0};q.spaceAbove=q.top;q.bottom=q.top+q.height;q.spaceBelow=g.length?g[0].offsetTop+g.outerHeight()-q.bottom+e(g):e(j)} var g=w[c],j=O[c],i=o[c],k=p[c],q=k.content;if(!g||!j||!g.is(":visible"))return!0;if(!1!==C(null,i.onsizecontent_start)){if(!k.isMoving&&!k.isResizing||i.liveContentResizing||a||void 0==q.top)f(),0A)t=A,y=0;else if(M(y))switch(y){case "top":case "left":y=0;break;case "bottom":case "right":y=A-t;break;default:y=ga((A-t)/2)}else g=parseInt(y,10),y=0<=y?g:A-t+g;if("horz"===q){var C=r(j,t);j.css({width:C,height:E(j,v),left:y,top:0});j.children(".content").each(function(){u=c(this);u.css("marginLeft",ga((C-u.outerWidth())/2))})}else{var I=E(j,t);j.css({height:I,width:r(j,v),top:y,left:0}); j.children(".content").each(function(){u=c(this);u.css("marginTop",ga((I-u.outerHeight())/2))})}P(0,j)}if(!p.initialized&&(e.initHidden||f.noRoom))k.hide(),j&&j.hide()}}})},Ja=function(b){if(A()){var a=G[b],c=o[b];a&&(c.closable=!0,a.bind("click."+H,function(a){a.stopPropagation();da(b)}).css("visibility","visible").css("cursor","pointer").attr("title",p[b].isClosed?c.togglerTip_closed:c.togglerTip_open).show())}},xa=function(a,e){c.layout.plugins.buttons&&c.each(p[a].pins,function(f,g){c.layout.buttons.setPinState(y, c(g),a,e)})},t=c(this).eq(0);if(!t.length)return o.showErrorMessages&&V(q.errContainerMissing,!0),null;if(t.data("layoutContainer")&&t.data("layout"))return t.data("layout");var w={},O={},D={},G={},Z=c([]),x=p.container,H=p.id,y={options:o,state:p,container:t,panes:w,contents:O,resizers:D,togglers:G,hide:ta,show:la,toggle:da,open:ba,close:T,slideOpen:La,slideClose:ya,slideToggle:function(a){da(a,!0)},setSizeLimits:N,_sizePane:U,sizePane:ka,sizeContent:aa,swapPanes:function(a,e){function f(a){var b= w[a],e=O[a];return!b?!1:{pane:a,P:b?b[0]:!1,C:e?e[0]:!1,state:c.extend(!0,{},p[a]),options:c.extend(!0,{},o[a])}}function g(a,b){if(a){var e=a.P,f=a.C,h=a.pane,k=i[b],l=k.side.toLowerCase(),q="inset"+k.side,t=c.extend({},p[b]),r=o[b],z={resizerCursor:r.resizerCursor};c.each(["fxName","fxSpeed","fxSettings"],function(a,b){z[b+"_open"]=r[b+"_open"];z[b+"_close"]=r[b+"_close"];z[b+"_size"]=r[b+"_size"]});w[b]=c(e).data("layoutEdge",b).css(i.hidden).css(k.cssReq);O[b]=f?c(f):!1;o[b]=c.extend({},a.options, z);p[b]=c.extend({},a.state);e.className=e.className.replace(RegExp(r.paneClass+"-"+h,"g"),r.paneClass+"-"+b);ra(b);k.dir!=i[h].dir?(e=m[b]||0,N(b),e=J(e,p[b].minSize),ka(b,e,!0,!0)):D[b].css(l,x[q]+(p[b].isVisible?W(b):0));a.state.isVisible&&!t.isVisible?ua(b,!0):(va(b),Y(b,!0));a=null}}if(A()){p[a].edge=e;p[e].edge=a;var h=!1;!1===C(a,o[a].onswap_start)&&(h=!0);!h&&!1===C(e,o[e].onswap_start)&&(h=!0);if(h)p[a].edge=a,p[e].edge=e;else{var h=f(a),k=f(e),m={};m[a]=h?h.state.size:0;m[e]=k?k.state.size: 0;w[a]=!1;w[e]=!1;p[a]={};p[e]={};G[a]&&G[a].remove();G[e]&&G[e].remove();D[a]&&D[a].remove();D[e]&&D[e].remove();D[a]=D[e]=G[a]=G[e]=!1;g(h,e);g(k,a);h=k=m=null;w[a]&&w[a].css(i.visible);w[e]&&w[e].css(i.visible);$();C(a,o[a].onswap_end||o[a].onswap);C(e,o[e].onswap_end||o[e].onswap)}}},createChildLayout:qa,destroy:function(a){c(window).unbind("."+H);c(document).unbind("."+H);t.clearQueue().removeData("layout").removeData("layoutContainer").removeClass(o.containerClass);Z.remove();c.each(i.allPanes, function(c,e){sa(e,!1,!0,a)});t.data("layoutCSS")&&!t.data("layoutRole")&&t.css(t.data("layoutCSS")).removeData("layoutCSS");"BODY"===x.tagName&&(t=c("html")).data("layoutCSS")&&t.css(t.data("layoutCSS")).removeData("layoutCSS");ca(y,c.layout.onDestroy);Ea();for(n in y)n.match(/^(container|options)$/)||delete y[n];y.destroyed=!0},addPane:Ha,removePane:sa,initPanes:A,initContent:Ia,resizeAll:$,allowOverflow:f,resetOverflow:g,enableClosable:Ja,disableClosable:function(a,c){if(A()){var e=G[a];e&&(o[a].closable= !1,p[a].isClosed&&ba(a,!1,!0),e.unbind("."+H).css("visibility",c?"hidden":"visible").css("cursor","default").attr("title",""))}},enableSlidable:function(a){if(A()){var c=D[a];c&&c.data("draggable")&&(o[a].slidable=!0,s.isClosed&&Y(a,!0))}},disableSlidable:function(a){if(A()){var c=D[a];c&&(o[a].slidable=!1,p[a].isSliding?T(a,!1,!0):(Y(a,!1),c.css("cursor","default").attr("title",""),P(null,c[0])))}},enableResizable:function(a){if(A()){var c=D[a],e=o[a];c&&c.data("draggable")&&(e.resizable=!0,c.draggable("enable"), p[a].isClosed||c.css("cursor",e.resizerCursor).attr("title",e.resizerTip))}},disableResizable:function(a){if(A()){var c=D[a];c&&c.data("draggable")&&(o[a].resizable=!1,c.draggable("disable").css("cursor","default").attr("title",""),P(null,c[0]))}},trigger:function(a,c){var e=o;(e=c&&e[c]?e[c][a]:e[a])&&C(c||null,e)},hasParentLayout:!1,children:v,north:!1,south:!1,west:!1,east:!1,center:!1};return"cancel"===function(){Pa();var a=o;p.creatingLayout=!0;ca(y,c.layout.onCreate);if(!1===C(null,a.onload_start))return"cancel"; var e=t[0],f=x.tagName=e.tagName,g=x.id=e.id,h=x.className=e.className,e=o,k="BODY"===f,i={};x.selector=t.selector.split(".slice")[0];x.ref=(e.name?e.name+" layout / ":"")+f+(g?"#"+g:h?".["+h+"]":"");t.data("layout",y).data("layoutContainer",H).addClass(e.containerClass);t.data("layoutCSS")||(k?(i=c.extend(I(t,"overflow,position,margin,padding,border"),{height:t.css("height"),overflow:t.css("overflow"),overflowX:t.css("overflowX"),overflowY:t.css("overflowY")}),f=c("html"),f.data("layoutCSS",{height:"auto", overflow:f.css("overflow"),overflowX:f.css("overflowX"),overflowY:f.css("overflowY")})):i=I(t,"overflow,position,margin,padding,border,top,bottom,left,right,width,height,overflow,overflowX,overflowY"),t.data("layoutCSS",i));try{if(k)c("html").css({height:"100%",overflow:"hidden",overflowX:"hidden",overflowY:"hidden"}),c("body").css({position:"relative",height:"100%",overflow:"hidden",overflowX:"hidden",overflowY:"hidden",margin:0,padding:0,border:"none"}),c.extend(x,F(t));else{var i={overflow:"hidden", overflowX:"hidden",overflowY:"hidden"},j=t.css("position");t.css("height");if(!t.data("layoutRole")&&(!j||!j.match(/fixed|absolute|relative/)))i.position="relative";t.css(i);t.is(":visible")&&(c.extend(x,F(t)),e.showErrorMessages&&1>x.innerHeight&&V(q.errContainerHeight.replace(/CONTAINER/,x.ref),!0))}}catch(r){}Fa();c(window).bind("unload."+H,Ea);ca(y,c.layout.onLoad);if(j=t.data("parentLayout"))y.hasParentLayout=!0,f=t.data("layoutEdge"),j[f].child=j.children[f]=y;a.initPanes&&ia();delete p.creatingLayout; return p.initialized}()?null:y};c.ui||(c.ui={});c.ui.cookie={acceptsCookies:!!navigator.cookieEnabled,read:function(a){for(var e=document.cookie,e=e?e.split(";"):[],f,g=0,k=e.length;g0)k.setDate(k.getDate()+i);else{k.setFullYear(1970);q=true}}k&&(g=g+(";expires="+k.toUTCString())); f.path&&(g=g+(";path="+f.path));f.domain&&(g=g+(";domain="+f.domain));f.secure&&(g=g+";secure");document.cookie=a+"="+(q?"":encodeURIComponent(c))+g},clear:function(a){c.ui.cookie.write(a,"",{expires:-1})}};c.cookie||(c.cookie=function(a,e,f){var g=c.ui.cookie;if(e===null)g.clear(a);else{if(e===void 0)return g.read(a);g.write(a,e,f)}});c.layout.plugins.stateManagement=!0;c.layout.config.optionRootKeys.push("stateManagement");c.layout.defaults.stateManagement={enabled:!1,autoSave:!0,autoLoad:!0,stateKeys:"north.size,south.size,east.size,west.size,north.isClosed,south.isClosed,east.isClosed,west.isClosed,north.isHidden,south.isHidden,east.isHidden,west.isHidden", cookie:{name:"",domain:"",path:"",expires:"",secure:!1}};c.layout.optionsMap.layout.push("stateManagement");c.layout.state={saveCookie:function(a,e,f){var g=a.options,k=g.stateManagement,f=c.extend(true,{},k.cookie,f||null),a=a.state.stateData=a.readState(e||k.stateKeys);c.ui.cookie.write(f.name||g.name||"Layout",c.layout.state.encodeJSON(a),f);return c.extend(true,{},a)},deleteCookie:function(a){a=a.options;c.ui.cookie.clear(a.stateManagement.cookie.name||a.name||"Layout")},readCookie:function(a){a= a.options;return(a=c.ui.cookie.read(a.stateManagement.cookie.name||a.name||"Layout"))?c.layout.state.decodeJSON(a):{}},loadCookie:function(a){var e=c.layout.state.readCookie(a);if(e){a.state.stateData=c.extend(true,{},e);a.loadState(e)}return e},loadState:function(a,e,f){e=c.layout.transformData(e);if(!c.isEmptyObject(e)){c.extend(true,a.options,e);if(a.state.initialized){var g,k,q,i,r,v=f===false;c.each(c.layout.config.borderPanes,function(c,f){state=a.state[f];k=e[f];if(typeof k=="object"){q=k.size; r=k.initClosed;i=k.initHidden;(g=state.isVisible)||a.sizePane(f,q,false,false);i===true?a.hide(f,v):r===false?a.open(f,false,v):r===true?a.close(f,false,v):i===false&&a.show(f,false,v);g&&a.sizePane(f,q,false,v)}})}}},readState:function(a,e){var f={},g={isClosed:"initClosed",isHidden:"initHidden"},k=a.state,q=c.layout.config.allPanes,i,r,v;if(!e)e=a.options.stateManagement.stateKeys;c.isArray(e)&&(e=e.join(","));for(var e=e.replace(/__/g,".").split(","),F=0,I=e.length;F 8||!q.msie?false:f.deviceXDPI?a(f.deviceXDPI,f.systemXDPI):q.webkit&&(r=g.body.getBoundingClientRect)?a(r.left-r.right,g.body.offsetWidth):q.webkit&&(v=e.outerWidth)?a(v,e.innerWidth):(v=f.width)&&(F=k.clientWidth)?a(v,F):false}};c.layout.onReady.push(c.layout.browserZoom._init)})(jQuery);