/* jquery.layout 1.3.0 - Release Candidate 30.51  $Date: 2012-05-12 08:00:00 (Sat, 12 May 2012) $ $Rev: 303005 $ */
(function(b){function aa(a){return"string"===b.type(a)}function la(a,c){if(b.isArray(c))for(var d=0,f=c.length;d<f;d++){var h=c[d];try{aa(h)&&(h=eval(h)),b.isFunction(h)&&h(a)}catch(l){}}}var Ca=Math.min,C=Math.max,qa=Math.floor;b.layout={version:"1.3.rc30.51",revision:0.033005,language:{Open:"Open",Close:"Close",Resize:"Resize",Slide:"Slide Open",Pin:"Pin",Unpin:"Un-Pin",noRoomToOpenTip:"Not enough room to show this pane.",minSizeWarning:"Panel has reached its minimum size",maxSizeWarning:"Panel has reached its maximum size",
pane:"pane",selector:"selector",errButton:"Error Adding Button \n\nInvalid ",errContainerMissing:"UI Layout Initialization Error\n\nThe specified layout-container does not exist.",errCenterPaneMissing:"UI Layout Initialization Error\n\nThe center-pane element does not exist.\n\nThe center-pane is a required element.",errContainerHeight:"UI Layout Initialization Warning\n\nThe layout-container \"CONTAINER\" has no height.\n\nTherefore the layout is 0-height and hence 'invisible'!"},browser:{mozilla:!!b.browser.mozilla,
webkit:!!b.browser.webkit||!!b.browser.safari,msie:!!b.browser.msie,isIE6:!!b.browser.msie&&6==b.browser.version,version:b.browser.version},effects:{slide:{all:{duration:"fast"},north:{direction:"up"},south:{direction:"down"},east:{direction:"right"},west:{direction:"left"}},drop:{all:{duration:"slow"},north:{direction:"up"},south:{direction:"down"},east:{direction:"right"},west:{direction:"left"}},scale:{all:{duration:"fast"}},blind:{},clip:{},explode:{},fade:{},fold:{},puff:{},size:{all:{easing:"swing"}}},
config:{optionRootKeys:"effects panes north south west east center".split(" "),allPanes:["north","south","west","east","center"],borderPanes:["north","south","west","east"],oppositeEdge:{north:"south",south:"north",east:"west",west:"east"},offscreenCSS:{left:"-99999px",right:"auto"},offscreenReset:"offscreenReset",hidden:{visibility:"hidden"},visible:{visibility:"visible"},resizers:{cssReq:{position:"absolute",padding:0,margin:0,fontSize:"1px",textAlign:"left",overflow:"hidden"},cssDemo:{background:"#DDD",
border:"none"}},togglers:{cssReq:{position:"absolute",display:"block",padding:0,margin:0,overflow:"hidden",textAlign:"center",fontSize:"1px",cursor:"pointer",zIndex:1},cssDemo:{background:"#AAA"}},content:{cssReq:{position:"relative"},cssDemo:{overflow:"auto",padding:"3px"},cssDemoPane:{overflow:"hidden",padding:0}},panes:{cssReq:{position:"absolute",margin:0},cssDemo:{padding:"3px",background:"#FFF",border:"1px solid #BBB",overflow:"auto"}},north:{side:"Top",sizeType:"Height",dir:"horz",cssReq:{top:0,
bottom:"auto",left:0,right:0,width:"auto"}},south:{side:"Bottom",sizeType:"Height",dir:"horz",cssReq:{top:"auto",bottom:0,left:0,right:0,width:"auto"}},east:{side:"Right",sizeType:"Width",dir:"vert",cssReq:{left:"auto",right:0,top:"auto",bottom:"auto",height:"auto"}},west:{side:"Left",sizeType:"Width",dir:"vert",cssReq:{left:0,right:"auto",top:"auto",bottom:"auto",height:"auto"}},center:{dir:"center",cssReq:{left:"auto",right:"auto",top:"auto",bottom:"auto",height:"auto",width:"auto"}}},callbacks:{},
getParentPaneElem:function(a){a=b(a);if(a=a.data("layout")||a.data("parentLayout")){a=a.container;if(a.data("layoutPane"))return a;a=a.closest("."+b.layout.defaults.panes.paneClass);if(a.data("layoutPane"))return a}return null},getParentPaneInstance:function(a){return(a=b.layout.getParentPaneElem(a))?a.data("layoutPane"):null},getParentLayoutInstance:function(a){return(a=b.layout.getParentPaneElem(a))?a.data("parentLayout"):null},getEventObject:function(b){return"object"===typeof b&&b.stopPropagation?
b:null},parsePaneName:function(a){var c=b.layout.getEventObject(a);return c?(c.stopPropagation(),b(this).data("layoutEdge")):a},plugins:{draggable:!!b.fn.draggable,effects:{core:!!b.effects,slide:b.effects&&b.effects.slide}},onCreate:[],onLoad:[],onReady:[],onDestroy:[],onUnload:[],afterOpen:[],afterClose:[],scrollbarWidth:function(){return window.scrollbarWidth||b.layout.getScrollbarSize("width")},scrollbarHeight:function(){return window.scrollbarHeight||b.layout.getScrollbarSize("height")},getScrollbarSize:function(a){var c=
b('<div style="position: absolute; top: -10000px; left: -10000px; width: 100px; height: 100px; overflow: scroll;"></div>').appendTo("body"),d={width:c.width()-c[0].clientWidth,height:c.height()-c[0].clientHeight};c.remove();window.scrollbarWidth=d.width;window.scrollbarHeight=d.height;return a.match(/^(width|height)$/)?d[a]:d},showInvisibly:function(a,c){if(!a)return{};a.jquery||(a=b(a));var d={display:a.css("display"),visibility:a.css("visibility")};return c||"none"===d.display?(a.css({display:"block",
visibility:"hidden"}),d):{}},getElementDimensions:function(a){var c={},d=c.css={},f={},h,l,j=b.layout.cssNum,p=a.offset();c.offsetLeft=p.left;c.offsetTop=p.top;b.each(["Left","Right","Top","Bottom"],function(j,p){h=d["border"+p]=b.layout.borderWidth(a,p);l=d["padding"+p]=b.layout.cssNum(a,"padding"+p);f[p]=h+l;c["inset"+p]=l});c.offsetWidth=a.innerWidth();c.offsetHeight=a.innerHeight();c.outerWidth=a.outerWidth();c.outerHeight=a.outerHeight();c.innerWidth=C(0,c.outerWidth-f.Left-f.Right);c.innerHeight=
C(0,c.outerHeight-f.Top-f.Bottom);d.width=a.width();d.height=a.height();d.top=j(a,"top",!0);d.bottom=j(a,"bottom",!0);d.left=j(a,"left",!0);d.right=j(a,"right",!0);return c},getElementCSS:function(b,c){var d={},f=b[0].style,h=c.split(","),l=["Top","Bottom","Left","Right"],j=["Color","Style","Width"],p,y,L,O,C,B;for(O=0;O<h.length;O++)if(p=h[O],p.match(/(border|padding|margin)$/))for(C=0;4>C;C++)if(y=l[C],"border"===p)for(B=0;3>B;B++)L=j[B],d[p+y+L]=f[p+y+L];else d[p+y]=f[p+y];else d[p]=f[p];return d},
cssWidth:function(a,c){var d=b.layout.borderWidth,f=b.layout.cssNum;if(0>=c)return 0;if(!b.support.boxModel)return c;d=c-d(a,"Left")-d(a,"Right")-f(a,"paddingLeft")-f(a,"paddingRight");return C(0,d)},cssHeight:function(a,c){var d=b.layout.borderWidth,f=b.layout.cssNum;if(0>=c)return 0;if(!b.support.boxModel)return c;d=c-d(a,"Top")-d(a,"Bottom")-f(a,"paddingTop")-f(a,"paddingBottom");return C(0,d)},cssNum:function(a,c,d){a.jquery||(a=b(a));var f=b.layout.showInvisibly(a),c=b.curCSS(a[0],c,!0),d=d&&
"auto"==c?c:parseInt(c,10)||0;a.css(f);return d},borderWidth:function(a,c){a.jquery&&(a=a[0]);var d="border"+c.substr(0,1).toUpperCase()+c.substr(1);return"none"===b.curCSS(a,d+"Style",!0)?0:parseInt(b.curCSS(a,d+"Width",!0),10)||0},isMouseOverElem:function(a,c){var d=b(c||this),f=d.offset(),h=f.top,f=f.left,l=f+d.outerWidth(),d=h+d.outerHeight(),j=a.pageX,p=a.pageY;return b.layout.browser.msie&&0>j&&0>p||j>=f&&j<=l&&p>=h&&p<=d},msg:function(a,c,d,f){b.isPlainObject(a)&&window.debugData?("string"===
typeof c?(f=d,d=c):"object"===typeof d&&(f=d,d=null),d=d||"log( <object> )",f=b.extend({sort:!1,returnHTML:!1,display:!1},f),!0===c||f.display?debugData(a,d,f):window.console&&console.log(debugData(a,d,f))):c?alert(a):window.console?console.log(a):(c=b("#layoutLogger"),c.length||(c=b('<div id="layoutLogger" style="position: '+(b.support.fixedPosition?"fixed":"absolute")+'; top: 5px; z-index: 999999; max-width: 25%; overflow: hidden; border: 1px solid #000; border-radius: 5px; background: #FBFBFB; box-shadow: 0 2px 10px rgba(0,0,0,0.3);"><div style="font-size: 13px; font-weight: bold; padding: 5px 10px; background: #F6F6F6; border-radius: 5px 5px 0 0; cursor: move;"><span style="float: right; padding-left: 7px; cursor: pointer;" title="Remove Console" onclick="$(this).closest(\'#layoutLogger\').remove()">X</span>Layout console.log</div><ul style="font-size: 13px; font-weight: none; list-style: none; margin: 0; padding: 0 0 2px;"></ul></div>').appendTo("body"),
c.css("left",b(window).width()-c.outerWidth()-5),b.ui.draggable&&c.draggable({handle:":first-child"})),c.children("ul").append('<li style="padding: 4px 10px; margin: 0; border-top: 1px solid #CCC;">'+a.replace(/\</g,"&lt;").replace(/\>/g,"&gt;")+"</li>"))}};var G=b.layout.language;b.layout.defaults={name:"",containerSelector:"",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:3,spacing_closed:3,togglerLength_open:50,togglerLength_closed:50,togglerAlign_open:"center",togglerAlign_closed:"center",togglerTip_open:G.Close,togglerTip_closed:G.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:G.noRoomToOpenTip,resizerTip:G.Resize,sliderTip:G.Slide,sliderCursor:"pointer",slideTrigger_open:"click",slideTrigger_close:"mouseleave",slideDelay_open:300,slideDelay_close:300,hideTogglerOnSlide:!1,preventQuickSlideClose:b.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}};b.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"]};b.layout.transformData=function(b){var c={panes:{},center:{}},d,f,h,l,j,p,y;if("object"!==typeof b)return c;
for(f in b){d=c;j=b[f];h=f.split("__");y=h.length-1;for(p=0;p<=y;p++)l=h[p],p===y?d[l]=j:d[l]||(d[l]={}),d=d[l]}return c};b.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 c(b,c){for(var d=b.split("."),f=d.length-1,j={branch:a,key:d[f]},h=0,m;h<f;h++)m=d[h],j.branch=void 0==j.branch[m]?c?j.branch[m]={}:{}:j.branch[m];
return j}var d=b.layout.backwardCompatibility.map,f,h,l,j;for(j in d)f=c(j),l=f.branch[f.key],void 0!==l&&(h=c(d[j],!0),h.branch[h.key]=l,delete f.branch[f.key])},renameAllOptions:function(a){var c=b.layout.backwardCompatibility.renameOptions;c(a);a.defaults&&("object"!==typeof a.panes&&(a.panes={}),b.extend(!0,a.panes,a.defaults),delete a.defaults);a.panes&&c(a.panes);b.each(b.layout.config.allPanes,function(b,f){a[f]&&c(a[f])});return a}};b.fn.layout=function(a){function c(g){if(!g)return!0;var v=
g.keyCode;if(33>v)return!0;var a={38:"north",40:"south",37:"west",39:"east"},x=g.shiftKey,e=g.ctrlKey,k,q,c,i;e&&(37<=v&&40>=v)&&m[a[v]].enableCursorHotkey?i=a[v]:(e||x)&&b.each(j.borderPanes,function(g,b){k=m[b];q=k.customHotkey;c=k.customHotkeyModifier;if(x&&"SHIFT"==c||e&&"CTRL"==c||e&&x)if(q&&v===(isNaN(q)||9>=q?q.toUpperCase().charCodeAt(0):q))return i=b,!1});if(!i||!u[i]||!m[i].closable||o[i].isHidden)return!0;ma(i);g.stopPropagation();return g.returnValue=!1}function d(g){if(E()){this&&this.tagName&&
(g=this);var v;aa(g)?v=u[g]:b(g).data("layoutRole")?v=b(g):b(g).parents().each(function(){if(b(this).data("layoutRole"))return v=b(this),!1});if(v&&v.length){var a=v.data("layoutEdge"),g=o[a];g.cssSaved&&f(a);if(g.isSliding||g.isResizing||g.isClosed)g.cssSaved=!1;else{var x={zIndex:m.zIndexes.resizer_normal+1},e={},k=v.css("overflow"),q=v.css("overflowX"),c=v.css("overflowY");"visible"!=k&&(e.overflow=k,x.overflow="visible");q&&!q.match(/visible|auto/)&&(e.overflowX=q,x.overflowX="visible");c&&!c.match(/visible|auto/)&&
(e.overflowY=q,x.overflowY="visible");g.cssSaved=e;v.css(x);b.each(j.allPanes,function(g,b){b!=a&&f(b)})}}}}function f(g){if(E()){this&&this.tagName&&(g=this);var v;aa(g)?v=u[g]:b(g).data("layoutRole")?v=b(g):b(g).parents().each(function(){if(b(this).data("layoutRole"))return v=b(this),!1});if(v&&v.length){var g=v.data("layoutEdge"),g=o[g],a=g.cssSaved||{};!g.isSliding&&!g.isResizing&&v.css("zIndex",m.zIndexes.pane_normal);v.css(a);g.cssSaved=!1}}}var h=b.layout.browser,l=b.layout.language,j=b.layout.config,
p=b.layout.cssWidth,y=b.layout.cssHeight,L=b.layout.getElementDimensions,O=b.layout.getElementCSS,G=b.layout.getEventObject,B=b.layout.parsePaneName,m=b.extend(!0,{},b.layout.defaults);m.effects=b.extend(!0,{},b.layout.effects);var o={id:"layout"+b.now(),initialized:!1,container:{},north:{},south:{},east:{},west:{},center:{}},P={north:null,south:null,east:null,west:null,center:null},H={data:{},set:function(g,b,a){H.clear(g);H.data[g]=setTimeout(b,a)},clear:function(g){var b=H.data;b[g]&&(clearTimeout(b[g]),
delete b[g])}},ba=function(g,v){b.layout.msg(m.name+" / "+g,v&&m.showErrorMessages)},z=function(g,v,a){var x=v?m[v]:m,e=g+(g.match(/_/)?"":"_end"),k=e.match(/_end$/)?e.substr(0,e.length-4):"",q=x[e],c="NC",i=[];!q&&k&&(q=x[k]);q&&(aa(q)&&(q.match(/,/)?(i=q.split(","),q=eval(i[0])):q=eval(q)),b.isFunction(q)&&(c=i.length?q(i[1]):v&&u[v]?q(v,u[v],o[v],m[v],m.name):q(A,o,m,m.name)));!a&&!1!==c&&(v?(u[v].triggerHandler("layoutpane"+e,[v,u[v],o[v],m[v],m.name]),k&&u[v].triggerHandler("layoutpane"+k,[v,
u[v],o[v],m[v],m.name])):w.triggerHandler("layout"+e,[v,u[v],o[v],m[v],m.name]));("onresize_end"===g||"onsizecontent_end"===g)&&Da(v);return c},Wa=function(g){if(!h.mozilla){var b=u[g];"IFRAME"===o[g].tagName?b.css(j.hidden).css(j.visible):b.find("IFRAME").css(j.hidden).css(j.visible)}},ra=function(g){var b=u[g],g=j[g].dir,b={minWidth:1001-p(b,1E3),minHeight:1001-y(b,1E3)};"horz"===g&&(b.minSize=b.minHeight);"vert"===g&&(b.minSize=b.minWidth);return b},V=function(g,a,t){t||(t=j[g].dir);aa(a)&&a.match(/%/)&&
(a="100%"===a?-1:parseInt(a,10)/100);if(0===a)return 0;if(1<=a)return parseInt(a,10);var x=m,e=0;"horz"==t?e=r.innerHeight-(u.north?x.north.spacing_open:0)-(u.south?x.south.spacing_open:0):"vert"==t&&(e=r.innerWidth-(u.west?x.west.spacing_open:0)-(u.east?x.east.spacing_open:0));if(-1===a)return e;if(0<a)return qa(e*a);if("center"==g)return 0;var t="horz"===t?"height":"width",x=u[g],g="height"===t?N[g]:!1,e=b.layout.showInvisibly(x),k=x.css(t),c=g?g.css(t):0;x.css(t,"auto");g&&g.css(t,"auto");a="height"===
t?x.outerHeight():x.outerWidth();x.css(t,k).css(e);g&&g.css(t,c);return a},ca=function(g,b){var a=u[g],x=m[g],e=o[g],k=b?x.spacing_open:0,x=b?x.spacing_closed:0;return!a||e.isHidden?0:e.isClosed||e.isSliding&&b?x:"horz"===j[g].dir?a.outerHeight()+k:a.outerWidth()+k},T=function(g,b){if(E()){var a=m[g],x=o[g],e=j[g],k=e.dir;e.side.toLowerCase();e.sizeType.toLowerCase();var e=void 0!=b?b:x.isSliding,c=a.spacing_open,d=j.oppositeEdge[g],i=o[d],f=u[d],h=!f||!1===i.isVisible||i.isSliding?0:"horz"==k?f.outerHeight():
f.outerWidth(),d=(!f||i.isHidden?0:m[d][!1!==i.isClosed?"spacing_closed":"spacing_open"])||0,i="horz"==k?r.innerHeight:r.innerWidth,f=ra("center"),f="horz"==k?C(m.center.minHeight,f.minHeight):C(m.center.minWidth,f.minWidth),e=i-c-(e?0:V("center",f,k)+h+d),k=x.minSize=C(V(g,a.minSize),ra(g).minSize),e=x.maxSize=Ca(a.maxSize?V(g,a.maxSize):1E5,e),x=x.resizerPosition={},c=r.insetTop,h=r.insetLeft,d=r.innerWidth,i=r.innerHeight,a=a.spacing_open;switch(g){case "north":x.min=c+k;x.max=c+e;break;case "west":x.min=
h+k;x.max=h+e;break;case "south":x.min=c+i-e-a;x.max=c+i-k-a;break;case "east":x.min=h+d-e-a,x.max=h+d-k-a}}},Ea=function(g,a){var t=b(g),x=t.data("layoutRole"),e=t.data("layoutEdge"),c=m[e][x+"Class"],e="-"+e,q=t.hasClass(c+"-closed")?"-closed":"-open",d="-closed"===q?"-open":"-closed",q=c+"-hover "+(c+e+"-hover ")+(c+q+"-hover ")+(c+e+q+"-hover ");a&&(q+=c+d+"-hover "+(c+e+d+"-hover "));"resizer"==x&&t.hasClass(c+"-sliding")&&(q+=c+"-sliding-hover "+(c+e+"-sliding-hover "));return b.trim(q)},Fa=
function(g,a){var t=b(a||this);g&&"toggler"===t.data("layoutRole")&&g.stopPropagation();t.addClass(Ea(t))},U=function(g,a){var t=b(a||this);t.removeClass(Ea(t,!0))},Xa=function(){b.fn.disableSelection&&b("body").disableSelection()},Ya=function(g,a){var t=a||this,x=b(t).data("layoutEdge"),e=x+"ResizerLeave";H.clear(x+"_openSlider");H.clear(e);a?!o[x].isResizing&&b.fn.enableSelection&&b("body").enableSelection():H.set(e,function(){Ya(g,t)},200)},E=function(){return o.initialized||o.creatingLayout?!0:
sa()},sa=function(g){var a=m;if(!w.is(":visible"))return!g&&(h.webkit&&"BODY"===w[0].tagName)&&setTimeout(function(){sa(!0)},50),!1;if(!Za("center").length)return m.showErrorMessages&&ba(l.errCenterPaneMissing,!0),!1;o.creatingLayout=!0;b.extend(r,L(w));b.each(j.allPanes,function(g,b){$a(b,!0)});Ga();b.each(j.borderPanes,function(g,b){u[b]&&o[b].isVisible&&(T(b),W(b))});X("center");b.each(j.allPanes,function(g,b){var a=m[b];u[b]&&(o[b].isVisible&&(fa(b),a.triggerEventsOnLoad?z("onresize_end",b):Da(b)),
a.initChildLayout&&a.childOptions&&Ha(b))});a.scrollToBookmarkOnLoad&&(g=self.location,g.hash&&g.replace(g.hash));A.hasParentLayout?a.resizeWithWindow=!1:a.resizeWithWindow&&b(window).bind("resize."+I,ob);delete o.creatingLayout;o.initialized=!0;la(A,b.layout.onReady);z("onload_end");return!0},Ha=function(g,b){var a=B.call(this,g),c=u[a];if(c){var e=N[a],k=b||m[a].childOptions,c=k.containerSelector?c.find(k.containerSelector):e||c,q=(e=c.length)?P[a]=c.data("layout")||null:null;!q&&(e&&k)&&(q=P[a]=
c.eq(0).layout(k)||null);q&&(q.hasParentLayout=!0)}A[a].child=P[a]},ob=function(){var g=Number(m.resizeWithWindowDelay);10>g&&(g=100);H.clear("winResize");H.set("winResize",function(){H.clear("winResize");H.clear("winResizeRepeater");var g=L(w);(g.innerWidth!==r.innerWidth||g.innerHeight!==r.innerHeight)&&ga()},g);H.data.winResizeRepeater||ab()},ab=function(){var g=Number(m.resizeWithWindowMaxDelay);0<g&&H.set("winResizeRepeater",function(){ab();ga()},g)},bb=function(){z("onunload_start");la(A,b.layout.onUnload);
z("onunload_end")},cb=function(g){g=g?g.split(","):j.borderPanes;b.each(g,function(g,a){var x=m[a];if(x.enableCursorHotkey||x.customHotkey)return b(document).bind("keydown."+I,c),!1})},Za=function(g){g=m[g].paneSelector;if("#"===g.substr(0,1))return w.find(g).eq(0);var b=w.children(g).eq(0);return b.length?b:w.children("form:first").children(g).eq(0)},$a=function(g,b){if(b||E()){var a=m[g],c=o[g],e=j[g],k=e.dir,q="center"===g,M={},i=u[g],D,h;i?Ia(g,!1,!0,!1):N[g]=!1;i=u[g]=Za(g);if(i.length){i.data("layoutCSS")||
i.data("layoutCSS",O(i,"position,top,left,bottom,right,width,height,overflow,zIndex,display,backgroundColor,padding,margin,border"));A[g]={name:g,pane:u[g],content:N[g],options:m[g],state:o[g],child:P[g]};i.data({parentLayout:A,layoutPane:A[g],layoutEdge:g,layoutRole:"pane"}).css(e.cssReq).css("zIndex",m.zIndexes.pane_normal).css(a.applyDemoStyles?e.cssDemo:{}).addClass(a.paneClass+" "+a.paneClass+"-"+g).bind("mouseenter."+I,Fa).bind("mouseleave."+I,U);e={hide:"",show:"",toggle:"",close:"",open:"",
slideOpen:"",slideClose:"",slideToggle:"",size:"manualSizePane",sizePane:"manualSizePane",sizeContent:"",sizeHandles:"",enableClosable:"",disableClosable:"",enableSlideable:"",disableSlideable:"",enableResizable:"",disableResizable:"",swapPanes:"swapPanes",swap:"swapPanes",move:"swapPanes",removePane:"removePane",remove:"removePane",createChildLayout:"",resizeChildLayout:"",resizeAll:"resizeAll",resizeLayout:"resizeAll"};for(h in e)i.bind("layoutpane"+h.toLowerCase()+"."+I,A[e[h]||h]);Ja(g,!1);q||
(D=c.size=V(g,a.size),q=V(g,a.minSize)||1,h=V(g,a.maxSize)||1E5,0<D&&(D=C(Ca(D,h),q)),c.isClosed=!1,c.isSliding=!1,c.isResizing=!1,c.isHidden=!1,c.pins||(c.pins=[]));c.tagName=i[0].tagName;c.edge=g;c.noRoom=!1;c.isVisible=!0;switch(g){case "north":M.top=r.insetTop;M.left=r.insetLeft;M.right=r.insetRight;break;case "south":M.bottom=r.insetBottom;M.left=r.insetLeft;M.right=r.insetRight;break;case "west":M.left=r.insetLeft;break;case "east":M.right=r.insetRight}"horz"===k?M.height=y(i,D):"vert"===k&&
(M.width=p(i,D));i.css(M);"horz"!=k&&X(g,!0);a.initClosed&&a.closable&&!a.initHidden?Y(g,!0,!0):a.initHidden||a.initClosed?Ka(g):c.noRoom||i.css("display","block");i.css("visibility","visible");a.showOverflowOnHover&&i.hover(d,f);o.initialized&&(Ga(g),cb(g),ga(),c.isVisible&&(a.triggerEventsOnLoad?z("onresize_end",g):Da(g)),a.initChildLayout&&a.childOptions&&Ha(g))}else u[g]=!1}},Ga=function(g){g=g?g.split(","):j.borderPanes;b.each(g,function(g,a){var c=u[a];F[a]=!1;K[a]=!1;if(c){var e=m[a],c=o[a],
k=e.resizerClass,q=e.togglerClass;j[a].side.toLowerCase();var d="-"+a,i=A[a],f=i.resizer=F[a]=b("<div></div>"),i=i.toggler=e.closable?K[a]=b("<div></div>"):!1;!c.isVisible&&e.slidable&&f.attr("title",e.sliderTip).css("cursor",e.sliderCursor);f.attr("id","#"==e.paneSelector.substr(0,1)?e.paneSelector.substr(1)+"-resizer":"").data({parentLayout:A,layoutPane:A[a],layoutEdge:a,layoutRole:"resizer"}).css(j.resizers.cssReq).css("zIndex",m.zIndexes.resizer_normal).css(e.applyDemoStyles?j.resizers.cssDemo:
{}).addClass(k+" "+k+d).hover(Fa,U).hover(Xa,Ya).appendTo(w);i&&(i.attr("id","#"==e.paneSelector.substr(0,1)?e.paneSelector.substr(1)+"-toggler":"").data({parentLayout:A,layoutPane:A[a],layoutEdge:a,layoutRole:"toggler"}).css(j.togglers.cssReq).css(e.applyDemoStyles?j.togglers.cssDemo:{}).addClass(q+" "+q+d).hover(Fa,U).bind("mouseenter",Xa).appendTo(f),e.togglerContent_open&&b("<span>"+e.togglerContent_open+"</span>").data({layoutEdge:a,layoutRole:"togglerContent"}).data("layoutRole","togglerContent").data("layoutEdge",
a).addClass("content content-open").css("display","none").appendTo(i),e.togglerContent_closed&&b("<span>"+e.togglerContent_closed+"</span>").data({layoutEdge:a,layoutRole:"togglerContent"}).addClass("content content-closed").css("display","none").appendTo(i),db(a));var e=a,h=b.layout.plugins.draggable,e=e?e.split(","):j.borderPanes;b.each(e,function(g,a){var e=m[a];if(!h||!u[a]||!e.resizable){e.resizable=false;return true}var c=o[a],v=m.zIndexes,i=j[a],t=i.dir=="horz"?"top":"left",k=a+",center,"+
j.oppositeEdge[a]+(i.dir=="horz"?",west,east":""),q=F[a],d=e.resizerClass,x=0,f,D,M=d+"-drag",r=d+"-"+a+"-drag",y=d+"-dragging",A=d+"-"+a+"-dragging",B=d+"-dragging-limit",E=d+"-"+a+"-dragging-limit",C=false;c.isClosed||q.attr("title",e.resizerTip).css("cursor",e.resizerCursor);q.draggable({containment:w[0],axis:i.dir=="horz"?"y":"x",delay:0,distance:1,grid:e.resizingGrid,helper:"clone",opacity:e.resizerDragOpacity,addClasses:false,zIndex:v.resizer_drag,start:function(g,v){e=m[a];c=o[a];D=e.livePaneResizing;
if(false===z("ondrag_start",a))return false;c.isResizing=true;H.clear(a+"_closeSlider");T(a);f=c.resizerPosition;x=v.position[t];q.addClass(M+" "+r);C=false;b("body").disableSelection();ta(k)},drag:function(g,b){if(!C){b.helper.addClass(y+" "+A).css({right:"auto",bottom:"auto"}).children().css("visibility","hidden");C=true;c.isSliding&&u[a].css("zIndex",v.pane_sliding)}var i=0;if(b.position[t]<f.min){b.position[t]=f.min;i=-1}else if(b.position[t]>f.max){b.position[t]=f.max;i=1}if(i){b.helper.addClass(B+
" "+E);window.defaultStatus=i>0&&a.match(/north|west/)||i<0&&a.match(/south|east/)?l.maxSizeWarning:l.minSizeWarning}else{b.helper.removeClass(B+" "+E);window.defaultStatus=""}if(D&&Math.abs(b.position[t]-x)>=e.liveResizingTolerance){x=b.position[t];p(g,b,a)}},stop:function(g,e){b("body").enableSelection();window.defaultStatus="";q.removeClass(M+" "+r);c.isResizing=false;p(g,e,a,true,k)}})});var p=function(g,a,b,e,c){var v=a.position,i=j[b],g=m[b],a=o[b],t;switch(b){case "north":t=v.top;break;case "west":t=
v.left;break;case "south":t=r.offsetHeight-v.top-g.spacing_open;break;case "east":t=r.offsetWidth-v.left-g.spacing_open}t=t-r["inset"+i.side];if(e){false!==z("ondrag_end",b)&&ua(b,t,false,true);La();a.isSliding&&c&&ta(c,true)}else if(!(Math.abs(t-a.size)<g.liveResizingTolerance)){ua(b,t,false,true);da.each(eb)}};c.isVisible?Ma(a):(Na(a),ea(a,!0))}});ha()},Ja=function(g,a){if(E()){var b=m[g],c=b.contentSelector,e=A[g],k=u[g],d;c&&(d=e.content=N[g]=b.findNestedContent?k.find(c).eq(0):k.children(c).eq(0));
d&&d.length?(d.data("layoutRole","content"),d.data("layoutCSS")||d.data("layoutCSS",O(d,"height")),d.css(j.content.cssReq),b.applyDemoStyles&&(d.css(j.content.cssDemo),k.css(j.content.cssDemoPane)),o[g].content={},!1!==a&&fa(g)):e.content=N[g]=!1}},eb=function(){var g=b(this),a=g.data("layoutMask"),a=o[a];"IFRAME"==a.tagName&&a.isVisible&&g.css({top:a.offsetTop,left:a.offsetLeft,width:a.outerWidth,height:a.outerHeight})},ta=function(a,c){var t=a?a.split(","):b.layout.config.allPanes,d=m.zIndexes,
e,k;b.each(t,function(a,g){k=o[g];e=m[g];if(k.isVisible&&(!c&&e.maskContents||e.maskObjects)){for(var i=b([]),t,f=0,j=da.length;f<j;f++)t=da.eq(f),t.data("layoutMask")===g&&(i=i.add(t));if(!i.length){i=u[g];t=o[g];var f=m[g],j=m.zIndexes,h=b([]),p,l,r,y,z;if(f.maskContents||f.maskObjects)for(z=0;z<(f.maskObjects?2:1);z++)p=f.maskObjects&&0==z,l=document.createElement(p?"iframe":"div"),r=b(l).data("layoutMask",g),l.className="ui-layout-mask ui-layout-mask-"+g,y=l.style,y.display="block",y.position=
"absolute",p&&(l.frameborder=0,l.src="about:blank",y.opacity=0,y.filter="Alpha(Opacity='0')",y.border=0),"IFRAME"==t.tagName?(y.zIndex=j.pane_normal+1,w.append(l)):(r.addClass("ui-layout-mask-inside-pane"),y.zIndex=f.maskZindex||j.content_mask,y.top=0,y.left=0,y.width="100%",y.height="100%",i.append(l)),h=h.add(l),da=da.add(l);i=h}i.each(function(){eb.call(this);this.style.zIndex=k.isSliding?d.pane_sliding+1:d.pane_normal+1;this.style.display="block"})}})},La=function(){var a;b.each(b.layout.config.borderPanes,
function(b,c){if(o[c].isResizing)return a=!0,!1});a||da.hide()},Ia=function(a,c,t,d){if(E()){var a=B.call(this,a),e=u[a],k=N[a],q=F[a],f=K[a];e&&b.isEmptyObject(e.data())&&(e=!1);k&&b.isEmptyObject(k.data())&&(k=!1);q&&b.isEmptyObject(q.data())&&(q=!1);f&&b.isEmptyObject(f.data())&&(f=!1);e&&e.stop(!0,!0);var i=m[a],j=P[a]||(e?e.data("layout"):0)||(k?k.data("layout"):0)||null;if((void 0!==d?d:i.destroyChildLayout)&&j&&!j.destroyed)j.destroy(!0),j.destroyed&&(j=null);e&&c&&!j?e.remove():e&&e[0]&&(c=
i.paneClass,d=c+"-"+a,c=[c,c+"-open",c+"-closed",c+"-sliding",d,d+"-open",d+"-closed",d+"-sliding"],b.merge(c,Ea(e,!0)),e.removeClass(c.join(" ")).removeData("parentLayout").removeData("layoutPane").removeData("layoutRole").removeData("layoutEdge").removeData("autoHidden").unbind("."+I),k&&k.data("layout")?(k.width(k.width()),j.resizeAll()):k&&k.css(k.data("layoutCSS")).removeData("layoutCSS").removeData("layoutRole"),e.data("layout")||e.css(e.data("layoutCSS")).removeData("layoutCSS"));f&&f.remove();
q&&q.remove();A[a]=u[a]=N[a]=F[a]=K[a]=P[a]=!1;t||ga()}},va=function(a){var b=u[a],c=b[0].style;m[a].useOffscreenClose?(b.data(j.offscreenReset)||b.data(j.offscreenReset,{left:c.left,right:c.right}),b.css(j.offscreenCSS)):b.hide().removeData(j.offscreenReset)},fb=function(a){var b=u[a],a=m[a],c=j.offscreenCSS,d=b.data(j.offscreenReset),e=b[0].style;b.show().removeData(j.offscreenReset);if(a.useOffscreenClose&&d&&(e.left==c.left&&(e.left=d.left),e.right==c.right))e.right=d.right},Ka=function(a,b){if(E()){var c=
B.call(this,a),d=m[c],e=o[c],k=F[c];u[c]&&!e.isHidden&&!(o.initialized&&!1===z("onhide_start",c))&&(e.isSliding=!1,k&&k.hide(),!o.initialized||e.isClosed?(e.isClosed=!0,e.isHidden=!0,e.isVisible=!1,o.initialized||va(c),X("horz"===j[c].dir?"":"center"),(o.initialized||d.triggerEventsOnLoad)&&z("onhide_end",c)):(e.isHiding=!0,Y(c,!1,b)))}},wa=function(a,b,c,d){if(E()){var a=B.call(this,a),e=o[a];u[a]&&e.isHidden&&!1!==z("onshow_start",a)&&(e.isSliding=!1,e.isShowing=!0,!1===b?Y(a,!0):ia(a,!1,c,d))}},
ma=function(a,b){if(E()){var c=G(a),d=B.call(this,a),e=o[d];c&&c.stopImmediatePropagation();e.isHidden?wa(d):e.isClosed?ia(d,!!b):Y(d)}},Y=function(a,b,c,d){function e(){i.isMoving=!1;ea(k,!0);var a=j.oppositeEdge[k];o[a].noRoom&&(T(a),W(a));La();if(!d&&(o.initialized||h.triggerEventsOnLoad))p||z("onclose_end",k),p&&z("onshow_end",k),r&&z("onhide_end",k)}var k=B.call(this,a);if(!o.initialized&&u[k])a=o[k],va(k),a.isClosed=!0,a.isVisible=!1;else if(E()){var f=u[k],h=m[k],i=o[k],D=j[k],l,p,r;w.queue(function(a){if(!f||
!h.closable&&!i.isShowing&&!i.isHiding||!b&&i.isClosed&&!i.isShowing)return a();var g=!i.isShowing&&!1===z("onclose_start",k);p=i.isShowing;r=i.isHiding;delete i.isShowing;delete i.isHiding;if(g)return a();l=!c&&!i.isClosed&&"none"!=h.fxName_close;i.isMoving=!0;i.isClosed=!0;i.isVisible=!1;r?i.isHidden=!0:p&&(i.isHidden=!1);i.isSliding?na(k,!1):X("horz"===j[k].dir?"":"center",!1);Na(k);l?(ta("center"+("horz"==D.dir?",west,east":""),!0),xa(k,!0),f.hide(h.fxName_close,h.fxSettings_close,h.fxSpeed_close,
function(){xa(k,false);i.isClosed&&e();a()})):(va(k),e(),a())})}},Na=function(a){var c=F[a],d=K[a],f=m[a],e=j[a].side.toLowerCase(),k=f.resizerClass,q=f.togglerClass,h="-"+a;c.css(e,r["inset"+j[a].side]).removeClass(k+"-open "+k+h+"-open").removeClass(k+"-sliding "+k+h+"-sliding").addClass(k+"-closed "+k+h+"-closed").unbind("dblclick."+I);f.resizable&&b.layout.plugins.draggable&&c.draggable("disable").removeClass("ui-state-disabled").css("cursor","default").attr("title","");d&&(d.removeClass(q+"-open "+
q+h+"-open").addClass(q+"-closed "+q+h+"-closed").attr("title",f.togglerTip_closed),d.children(".content-open").hide(),d.children(".content-closed").css("display","block"));Oa(a,!1);o.initialized&&ha()},ia=function(a,b,c,d){function e(){i.isMoving=!1;Wa(k);i.isSliding||(La(),X("vert"==j[k].dir?"center":"",!1));Ma(k)}if(E()){var k=B.call(this,a),f=u[k],h=m[k],i=o[k],D=j[k],l,p;w.queue(function(a){if(!f||!h.resizable&&!h.closable&&!i.isShowing||i.isVisible&&!i.isSliding)return a();if(i.isHidden&&!i.isShowing)a(),
wa(k,!0);else{h.autoResize&&i.size!=h.size?Z(k,h.size,!0,!0,!0):T(k,b);var g=z("onopen_start",k);if("abort"===g)return a();"NC"!==g&&T(k,b);if(i.minSize>i.maxSize)return Oa(k,!1),!d&&h.noRoomToOpenTip&&alert(h.noRoomToOpenTip),a();b?na(k,!0):i.isSliding?na(k,!1):h.slidable&&ea(k,!1);i.noRoom=!1;W(k);p=i.isShowing;delete i.isShowing;l=!c&&i.isClosed&&"none"!=h.fxName_open;i.isMoving=!0;i.isVisible=!0;i.isClosed=!1;p&&(i.isHidden=!1);l?(g="center"+("horz"==D.dir?",west,east":""),i.isSliding&&(g+=","+
j.oppositeEdge[k]),ta(g,!0),xa(k,!0),f.show(h.fxName_open,h.fxSettings_open,h.fxSpeed_open,function(){xa(k,false);i.isVisible&&e();a()})):(fb(k),e(),a())}})}},Ma=function(a,c){var d=u[a],f=F[a],e=K[a],k=m[a],q=o[a],h=j[a].side.toLowerCase(),i=k.resizerClass,D=k.togglerClass,l="-"+a;f.css(h,r["inset"+j[a].side]+ca(a)).removeClass(i+"-closed "+i+l+"-closed").addClass(i+"-open "+i+l+"-open");q.isSliding?f.addClass(i+"-sliding "+i+l+"-sliding"):f.removeClass(i+"-sliding "+i+l+"-sliding");k.resizerDblClickToggle&&
f.bind("dblclick",ma);U(0,f);k.resizable&&b.layout.plugins.draggable?f.draggable("enable").css("cursor",k.resizerCursor).attr("title",k.resizerTip):q.isSliding||f.css("cursor","default");e&&(e.removeClass(D+"-closed "+D+l+"-closed").addClass(D+"-open "+D+l+"-open").attr("title",k.togglerTip_open),U(0,e),e.children(".content-closed").hide(),e.children(".content-open").css("display","block"));Oa(a,!q.isSliding);b.extend(q,L(d));o.initialized&&(ha(),fa(a,!0));if(!c&&(o.initialized||k.triggerEventsOnLoad)&&
d.is(":visible"))z("onopen_end",a),q.isShowing&&z("onshow_end",a),o.initialized&&z("onresize_end",a)},gb=function(a){function b(){e.isClosed?e.isMoving||ia(d,!0):na(d,!0)}if(E()){var c=G(a),d=B.call(this,a),e=o[d],a=m[d].slideDelay_open;c&&c.stopImmediatePropagation();e.isClosed&&c&&"mouseenter"===c.type&&0<a?H.set(d+"_openSlider",b,a):b()}},Pa=function(a){function c(){e.isClosed?na(f,!1):e.isMoving||Y(f)}if(E()){var d=G(a),f=B.call(this,a),a=m[f],e=o[f],k=e.isMoving?1E3:300;!e.isClosed&&!e.isResizing&&
("click"===a.slideTrigger_close?c():a.preventQuickSlideClose&&e.isMoving||a.preventPrematureSlideClose&&d&&b.layout.isMouseOverElem(d,u[f])||(d?H.set(f+"_closeSlider",c,C(a.slideDelay_close,k)):c()))}},xa=function(a,b){var c=u[a],d=o[a],e=m[a],f=m.zIndexes;b?(c.css({zIndex:f.pane_animate}),"south"==a?c.css({top:r.insetTop+r.innerHeight-c.outerHeight()}):"east"==a&&c.css({left:r.insetLeft+r.innerWidth-c.outerWidth()})):(c.css({zIndex:d.isSliding?f.pane_sliding:f.pane_normal}),"south"==a?c.css({top:"auto"}):
"east"==a&&!c.css("left").match(/\-99999/)&&c.css({left:"auto"}),h.msie&&(e.fxOpacityFix&&"slide"!=e.fxName_open&&c.css("filter")&&1==c.css("opacity"))&&c[0].style.removeAttribute("filter"))},ea=function(a,b){var c=m[a],d=F[a],e=c.slideTrigger_open.toLowerCase();if(d&&(!b||c.slidable))e.match(/mouseover/)?e=c.slideTrigger_open="mouseenter":e.match(/click|dblclick|mouseenter/)||(e=c.slideTrigger_open="click"),d[b?"bind":"unbind"](e+"."+I,gb).css("cursor",b?c.sliderCursor:"default").attr("title",b?
c.sliderTip:"")},na=function(a,b){function c(b){H.clear(a+"_closeSlider");b.stopPropagation()}var d=m[a],e=o[a],f=m.zIndexes,q=d.slideTrigger_close.toLowerCase(),h=b?"bind":"unbind",i=u[a],j=F[a];e.isSliding=b;H.clear(a+"_closeSlider");b&&ea(a,!1);i.css("zIndex",b?f.pane_sliding:f.pane_normal);j.css("zIndex",b?f.pane_sliding+2:f.resizer_normal);q.match(/click|mouseleave/)||(q=d.slideTrigger_close="mouseleave");j[h](q,Pa);"mouseleave"===q&&(i[h]("mouseleave."+I,Pa),j[h]("mouseenter."+I,c),i[h]("mouseenter."+
I,c));b?"click"===q&&!d.resizable&&(j.css("cursor",b?d.sliderCursor:"default"),j.attr("title",b?d.togglerTip_open:"")):H.clear(a+"_closeSlider")},W=function(a,c,d,f){var c=m[a],e=o[a],k=j[a],q=u[a],h=F[a],i="vert"===k.dir,D=!1;if("center"===a||i&&e.noVerticalRoom)(D=0<=e.maxHeight)&&e.noRoom?(fb(a),h&&h.show(),e.isVisible=!0,e.noRoom=!1,i&&(e.noVerticalRoom=!1),Wa(a)):!D&&!e.noRoom&&(va(a),h&&h.hide(),e.isVisible=!1,e.noRoom=!0);if("center"!==a)if(e.minSize<=e.maxSize){if(e.size>e.maxSize?Z(a,e.maxSize,
d,f,!0):e.size<e.minSize?Z(a,e.minSize,d,f,!0):h&&(e.isVisible&&q.is(":visible"))&&(d=k.side.toLowerCase(),f=e.size+r["inset"+k.side],b.layout.cssNum(h,d)!=f&&h.css(d,f)),e.noRoom)e.wasOpen&&c.closable?c.autoReopen?ia(a,!1,!0,!0):e.noRoom=!1:wa(a,e.wasOpen,!0,!0)}else e.noRoom||(e.noRoom=!0,e.wasOpen=!e.isClosed&&!e.isSliding,e.isClosed||(c.closable?Y(a,!0,!0):Ka(a,!0)))},ua=function(a,b,c,d){if(E()){var a=B.call(this,a),e=m[a],f=o[a],f=e.livePaneResizing&&!f.isResizing;e.autoResize=!1;Z(a,b,c,f,
d)}},Z=function(a,c,d,f,e){function k(){for(var a="width"===Q?D.outerWidth():D.outerHeight(),a=[{pane:h,count:1,target:c,actual:a,correct:c===a,attempt:c,cssSize:H}],e=a[0],g="Inaccurate size after resizing the "+h+"-pane.";!e.correct;){thisTry={pane:h,count:e.count+1,target:c};thisTry.attempt=e.actual>c?C(0,e.attempt-(e.actual-c)):C(0,e.attempt+(c-e.actual));thisTry.cssSize=("horz"==j[h].dir?y:p)(u[h],thisTry.attempt);D.css(Q,thisTry.cssSize);thisTry.actual="width"==Q?D.outerWidth():D.outerHeight();
thisTry.correct=c===thisTry.actual;m.showDebugMessages&&(1===a.length&&(ba(g,!1),ba(e,!1)),ba(thisTry,!1));if(3<a.length)break;a.push(thisTry);e=a[a.length-1]}i.size=c;b.extend(i,L(D));i.isVisible&&D.is(":visible")&&(Va&&Va.css(A,c+r[pb]),fa(h));!d&&(!O&&o.initialized&&i.isVisible)&&z("onresize_end",h);d||(i.isSliding||X("horz"==j[h].dir?"":"center",O,f),ha());e=j.oppositeEdge[h];c<G&&o[e].noRoom&&(T(e),W(e,!1,d));m.showDebugMessages&&1<a.length&&ba(g+"\nSee the Error Console for details.",!0)}if(E()){var h=
B.call(this,a),l=m[h],i=o[h],D=u[h],Va=F[h],A=j[h].side.toLowerCase(),Q=j[h].sizeType.toLowerCase(),pb="inset"+j[h].side,O=i.isResizing&&!l.triggerEventsDuringLiveResize,I=!0!==e&&l.animatePaneSizing,G,H;w.queue(function(a){T(h);G=i.size;c=V(h,c);c=C(c,V(h,l.minSize));c=Ca(c,i.maxSize);if(c<i.minSize)a(),W(h,!1,d);else{if(!f&&c===G)return a();!d&&(o.initialized&&i.isVisible)&&z("onresize_start",h);H=("horz"==j[h].dir?y:p)(u[h],c);if(I&&D.is(":visible")){var e=b.layout.effects.size[h]||b.layout.effects.size.all,
e=l.fxSettings_size.easing||e.easing,g=m.zIndexes,r={};r[Q]=H+"px";i.isMoving=!0;D.css({zIndex:g.pane_animate}).show().animate(r,l.fxSpeed_size,e,function(){D.css({zIndex:i.isSliding?g.pane_sliding:g.pane_normal});i.isMoving=!1;k();a()})}else D.css(Q,H),D.is(":visible")?k():(i.size=c,b.extend(i,L(D))),a();b.isFunction(b(".x").jqGrid)&&b(".jqgrid").setGridWidth(b(".ui-layout-center").width()-50)}})}},X=function(a,c,d){a=(a?a:"east,west,center").split(",");b.each(a,function(a,e){if(u[e]){var g=m[e],
f=o[e],h=u[e],i=!0,j={},i={top:ca("north",!0),bottom:ca("south",!0),left:ca("west",!0),right:ca("east",!0),width:0,height:0};i.width=r.innerWidth-i.left-i.right;i.height=r.innerHeight-i.bottom-i.top;i.top+=r.insetTop;i.bottom+=r.insetBottom;i.left+=r.insetLeft;i.right+=r.insetRight;b.extend(f,L(h));if("center"===e){if(!d&&f.isVisible&&i.width===f.outerWidth&&i.height===f.outerHeight)return!0;b.extend(f,ra(e),{maxWidth:i.width,maxHeight:i.height});j=i;j.width=p(h,j.width);j.height=y(h,j.height);i=
0<=j.width&&0<=j.height;if(!o.initialized&&g.minWidth>f.outerWidth){var g=g.minWidth-f.outerWidth,l=m.east.minSize||0,w=m.west.minSize||0,Q=o.east.size,A=o.west.size,B=Q,E=A;0<g&&(o.east.isVisible&&Q>l)&&(B=C(Q-l,Q-g),g-=Q-B);0<g&&(o.west.isVisible&&A>w)&&(E=C(A-w,A-g),g-=A-E);if(0===g){Q!=l&&Z("east",B,!0,d,!0);A!=w&&Z("west",E,!0,d,!0);X("center",c,d);return}}}else{f.isVisible&&!f.noVerticalRoom&&b.extend(f,L(h),ra(e));if(!d&&!f.noVerticalRoom&&i.height===f.outerHeight)return!0;j.top=i.top;j.bottom=
i.bottom;j.height=y(h,i.height);f.maxHeight=j.height;i=0<=f.maxHeight;i||(f.noVerticalRoom=!0)}i?(!c&&o.initialized&&z("onresize_start",e),h.css(j),ha(e),f.noRoom&&(!f.isClosed&&!f.isHidden)&&W(e),f.isVisible&&(b.extend(f,L(h)),o.initialized&&fa(e))):!f.noRoom&&f.isVisible&&W(e);if(!f.isVisible)return!0;"center"===e&&(f=b.layout.browser,f=f.isIE6||f.msie&&!b.support.boxModel,u.north&&(f||"IFRAME"==o.north.tagName)&&u.north.css("width",p(u.north,r.innerWidth)),u.south&&(f||"IFRAME"==o.south.tagName)&&
u.south.css("width",p(u.south,r.innerWidth)));!c&&o.initialized&&z("onresize_end",e)}});b.isFunction(b(".x").jqGrid)&&b(".jqgrid").setGridWidth(b(".ui-layout-center").width()-50)},ga=function(){if(o.initialized){if(w.is(":visible:")&&(b.extend(o.container,L(w)),r.outerHeight)){if(!1===z("onresizeall_start"))return!1;var a,c,d;b.each(["south","north","east","west"],function(a,b){u[b]&&(d=o[b],c=m[b],c.autoResize&&d.size!=c.size?Z(b,c.size,!0,!0,!0):(T(b),W(b,!1,!0,!0)))});X("",!0,!0);ha();c=m;b.each(j.allPanes,
function(b,c){(a=u[c])&&o[c].isVisible&&z("onresize_end",c)});z("onresizeall_end")}}else sa()},Da=function(a){a=B.call(this,a);if(m[a].resizeChildLayout){var b=u[a],c=N[a],d=A[a],e=P[a];d.child&&!e&&(e=d.child.container,e=P[a]=(e?e.data("layout"):0)||null);e&&e.destroyed&&(e=P[a]=null);e||(e=P[a]=b.data("layout")||(c?c.data("layout"):0)||null);d.child=P[a];e&&e.resizeAll()}},fa=function(a,c){if(E()){var d=B.call(this,a),d=d?d.split(","):j.allPanes;b.each(d,function(a,e){function g(a){return C(l.css.paddingBottom,
parseInt(a.css("marginBottom"),10)||0)}function d(){var a=m[e].contentIgnoreSelector,a=i.nextAll().not(a||":lt(0)"),b=a.filter(":visible"),c=b.filter(":last");p={top:i[0].offsetTop,height:i.outerHeight(),numFooters:a.length,hiddenFooters:a.length-b.length,spaceBelow:0};p.spaceAbove=p.top;p.bottom=p.top+p.height;p.spaceBelow=c.length?c[0].offsetTop+c.outerHeight()-p.bottom+g(c):g(i)}var f=u[e],i=N[e],t=m[e],l=o[e],p=l.content;if(!f||!i||!f.is(":visible"))return!0;if(!i.length&&(Ja(e,!1),!i))return;
if(!1!==z("onsizecontent_start",e)){if(!l.isMoving&&!l.isResizing||t.liveContentResizing||c||void 0==p.top)d(),0<p.hiddenFooters&&"hidden"===f.css("overflow")&&(f.css("overflow","visible"),d(),f.css("overflow","hidden"));f=l.innerHeight-(p.spaceAbove-l.css.paddingTop)-(p.spaceBelow-l.css.paddingBottom);if(!i.is(":visible")||p.height!=f){var r=i,t=r;aa(r)?t=u[r]:r.jquery||(t=b(r));r=y(t,f);t.css({height:r,visibility:"visible"});0<r&&0<t.innerWidth()?t.data("autoHidden")&&(t.show().data("autoHidden",
!1),h.mozilla||t.css(j.hidden).css(j.visible)):!t.data("autoHidden")&&t.hide().data("autoHidden",!0);p.height=f}o.initialized&&z("onsizecontent_end",e)}})}},ha=function(a){a=(a=B.call(this,a))?a.split(","):j.borderPanes;b.each(a,function(a,c){var g=m[c],e=o[c],d=u[c],f=F[c],h=K[c],i;if(d&&f){var l=j[c].dir,w=e.isClosed?"_closed":"_open",A=g["spacing"+w],z=g["togglerAlign"+w],w=g["togglerLength"+w],B;if(0===A)f.hide();else{!e.noRoom&&!e.isHidden&&f.show();"horz"===l?(B=r.innerWidth,e.resizerLength=
B,d=b.layout.cssNum(d,"left"),f.css({width:p(f,B),height:y(f,A),left:-9999<d?d:r.insetLeft})):(B=d.outerHeight(),e.resizerLength=B,f.css({height:y(f,B),width:p(f,A),top:r.insetTop+ca("north",!0)}));U(g,f);if(h){if(0===w||e.isSliding&&g.hideTogglerOnSlide){h.hide();return}h.show();if(!(0<w)||"100%"===w||w>B)w=B,z=0;else if(aa(z))switch(z){case "top":case "left":z=0;break;case "bottom":case "right":z=B-w;break;default:z=qa((B-w)/2)}else d=parseInt(z,10),z=0<=z?d:B-w+d;if("horz"===l){var E=p(h,w);h.css({width:E,
height:y(h,A),left:z,top:0});h.children(".content").each(function(){i=b(this);i.css("marginLeft",qa((E-i.outerWidth())/2))})}else{var C=y(h,w);h.css({height:C,width:p(h,A),top:z,left:0});h.children(".content").each(function(){i=b(this);i.css("marginTop",qa((C-i.outerHeight())/2))})}U(0,h)}if(!o.initialized&&(g.initHidden||e.noRoom))f.hide(),h&&h.hide()}}})},db=function(a){if(E()){var b=B.call(this,a),a=K[b],c=m[b];a&&(c.closable=!0,a.bind("click."+I,function(a){a.stopPropagation();ma(b)}).css("visibility",
"visible").css("cursor","pointer").attr("title",o[b].isClosed?c.togglerTip_closed:c.togglerTip_open).show())}},Oa=function(a,c){b.layout.plugins.buttons&&b.each(o[a].pins,function(d,f){b.layout.buttons.setPinState(A,b(f),a,c)})},w=b(this).eq(0);if(!w.length)return m.showErrorMessages&&ba(l.errContainerMissing,!0),null;if(w.data("layoutContainer")&&w.data("layout"))return w.data("layout");var u={},N={},F={},K={},da=b([]),r=o.container,I=o.id,A={options:m,state:o,container:w,panes:u,contents:N,resizers:F,
togglers:K,hide:Ka,show:wa,toggle:ma,open:ia,close:Y,slideOpen:gb,slideClose:Pa,slideToggle:function(a){a=B.call(this,a);ma(a,!0)},setSizeLimits:T,_sizePane:Z,sizePane:ua,sizeContent:fa,swapPanes:function(a,c){function d(a){var c=u[a],e=N[a];return!c?!1:{pane:a,P:c?c[0]:!1,C:e?e[0]:!1,state:b.extend(!0,{},o[a]),options:b.extend(!0,{},m[a])}}function f(a,c){if(a){var e=a.P,d=a.C,g=a.pane,h=j[c],k=h.side.toLowerCase(),l="inset"+h.side,t=b.extend({},o[c]),v=m[c],q={resizerCursor:v.resizerCursor};b.each(["fxName",
"fxSpeed","fxSettings"],function(a,b){q[b+"_open"]=v[b+"_open"];q[b+"_close"]=v[b+"_close"];q[b+"_size"]=v[b+"_size"]});u[c]=b(e).data({layoutPane:A[c],layoutEdge:c}).css(j.hidden).css(h.cssReq);N[c]=d?b(d):!1;m[c]=b.extend({},a.options,q);o[c]=b.extend({},a.state);e.className=e.className.replace(RegExp(v.paneClass+"-"+g,"g"),v.paneClass+"-"+c);Ga(c);h.dir!=j[g].dir?(e=p[c]||0,T(c),e=C(e,o[c].minSize),ua(c,e,!0,!0)):F[c].css(k,r[l]+(o[c].isVisible?ca(c):0));a.state.isVisible&&!t.isVisible?Ma(c,!0):
(Na(c),ea(c,!0));a=null}}if(E()){var e=B.call(this,a);o[e].edge=c;o[c].edge=e;if(!1===z("onswap_start",e)||!1===z("onswap_start",c))o[e].edge=e,o[c].edge=c;else{var h=d(e),l=d(c),p={};p[e]=h?h.state.size:0;p[c]=l?l.state.size:0;u[e]=!1;u[c]=!1;o[e]={};o[c]={};K[e]&&K[e].remove();K[c]&&K[c].remove();F[e]&&F[e].remove();F[c]&&F[c].remove();F[e]=F[c]=K[e]=K[c]=!1;f(h,c);f(l,e);h=l=p=null;u[e]&&u[e].css(j.visible);u[c]&&u[c].css(j.visible);ga();z("onswap_end",e);z("onswap_end",c)}}},initContent:Ja,addPane:$a,
removePane:Ia,createChildLayout:Ha,enableClosable:db,disableClosable:function(a,b){if(E()){var c=B.call(this,a),d=K[c];d&&(m[c].closable=!1,o[c].isClosed&&ia(c,!1,!0),d.unbind("."+I).css("visibility",b?"hidden":"visible").css("cursor","default").attr("title",""))}},enableSlidable:function(a){if(E()){var a=B.call(this,a),b=F[a];b&&b.data("draggable")&&(m[a].slidable=!0,s.isClosed&&ea(a,!0))}},disableSlidable:function(a){if(E()){var a=B.call(this,a),b=F[a];b&&(m[a].slidable=!1,o[a].isSliding?Y(a,!1,
!0):(ea(a,!1),b.css("cursor","default").attr("title",""),U(null,b[0])))}},enableResizable:function(a){if(E()){var a=B.call(this,a),b=F[a],c=m[a];b&&b.data("draggable")&&(c.resizable=!0,b.draggable("enable"),o[a].isClosed||b.css("cursor",c.resizerCursor).attr("title",c.resizerTip))}},disableResizable:function(a){if(E()){var a=B.call(this,a),b=F[a];b&&b.data("draggable")&&(m[a].resizable=!1,b.draggable("disable").css("cursor","default").attr("title",""),U(null,b[0]))}},allowOverflow:d,resetOverflow:f,
destroy:function(a){b(window).unbind("."+I);b(document).unbind("."+I);w.clearQueue().removeData("layout").removeData("layoutContainer").removeClass(m.containerClass).unbind("."+I);da.remove();b.each(j.allPanes,function(b,c){Ia(c,!1,!0,a)});w.data("layoutCSS")&&!w.data("layoutRole")&&w.css(w.data("layoutCSS")).removeData("layoutCSS");"BODY"===r.tagName&&(w=b("html")).data("layoutCSS")&&w.css(w.data("layoutCSS")).removeData("layoutCSS");la(A,b.layout.onDestroy);bb();for(n in A)n.match(/^(container|options)$/)||
delete A[n];A.destroyed=!0;return A},initPanes:E,resizeAll:ga,runCallbacks:z,hasParentLayout:!1,children:P,north:!1,south:!1,west:!1,east:!1,center:!1},Qa;var R,Ra,J,ya,$,ja,S,a=b.layout.transformData(a),a=b.layout.backwardCompatibility.renameAllOptions(a);if(!b.isEmptyObject(a.panes)){R=b.layout.optionsMap.noDefault;$=0;for(ja=R.length;$<ja;$++)J=R[$],delete a.panes[J];R=b.layout.optionsMap.layout;$=0;for(ja=R.length;$<ja;$++)J=R[$],delete a.panes[J]}R=b.layout.optionsMap.layout;var qb=b.layout.config.optionRootKeys;
for(J in a)ya=a[J],0>b.inArray(J,qb)&&0>b.inArray(J,R)&&(a.panes[J]||(a.panes[J]=b.isPlainObject(ya)?b.extend(!0,{},ya):ya),delete a[J]);b.extend(!0,m,a);b.each(j.allPanes,function(c,d){j[d]=b.extend(!0,{},j.panes,j[d]);Ra=m.panes;S=m[d];if("center"===d){R=b.layout.optionsMap.center;c=0;for(ja=R.length;c<ja;c++)if(J=R[c],!a.center[J]&&(a.panes[J]||!S[J]))S[J]=Ra[J]}else{S=m[d]=b.extend({},Ra,S);var f=m[d],h=m.panes;f.fxSettings||(f.fxSettings={});h.fxSettings||(h.fxSettings={});b.each(["_open","_close",
"_size"],function(a,c){var g="fxName"+c,j="fxSpeed"+c,i="fxSettings"+c,l=f[g]=f[g]||h[g]||f.fxName||h.fxName||"none";if(l==="none"||!b.effects||!b.effects[l]||!m.effects[l])l=f[g]="none";l=m.effects[l]||{};g=l.all||null;l=l[d]||null;f[j]=f[j]||h[j]||f.fxSpeed||h.fxSpeed||null;f[i]=b.extend({},g,l,h.fxSettings,f.fxSettings,h[i],f[i])});delete f.fxName;delete f.fxSpeed;delete f.fxSettings;S.resizerClass||(S.resizerClass="ui-layout-resizer");S.togglerClass||(S.togglerClass="ui-layout-toggler")}S.paneClass||
(S.paneClass="ui-layout-pane")});var za=a.zIndex,oa=m.zIndexes;0<za&&(oa.pane_normal=za,oa.content_mask=C(za+1,oa.content_mask),oa.resizer_normal=C(za+2,oa.resizer_normal));delete m.panes;var rb=m;o.creatingLayout=!0;la(A,b.layout.onCreate);if(!1===z("onload_start"))Qa="cancel";else{var Sa=w[0],hb=r.tagName=Sa.tagName,ib=r.id=Sa.id,jb=r.className=Sa.className,pa=m,Aa=pa.name,kb="BODY"===hb,ka={},Ta=w.data("parentLayout"),Ua=w.data("layoutEdge"),lb=Ta&&Ua;r.selector=w.selector.split(".slice")[0];r.ref=
(pa.name?pa.name+" layout / ":"")+hb+(ib?"#"+ib:jb?".["+jb+"]":"");w.data({layout:A,layoutContainer:I}).addClass(pa.containerClass);var mb={destroy:"",initPanes:"",resizeAll:"resizeAll",resize:"resizeAll"};for(Aa in mb)w.bind("layout"+Aa.toLowerCase()+"."+I,A[mb[Aa]||Aa]);lb&&(A.hasParentLayout=!0,Ta[Ua].child=Ta.children[Ua]=w.data("layout"));if(!w.data("layoutCSS")){if(kb){var ka=b.extend(O(w,"overflow,position,margin,padding,border"),{height:w.css("height"),overflow:w.css("overflow"),overflowX:w.css("overflowX"),
overflowY:w.css("overflowY")}),Ba=b("html");Ba.data("layoutCSS",{height:"auto",overflow:Ba.css("overflow"),overflowX:Ba.css("overflowX"),overflowY:Ba.css("overflowY")})}else ka=O(w,"overflow,position,margin,padding,border,top,bottom,left,right,width,height,overflow,overflowX,overflowY");w.data("layoutCSS",ka)}try{if(kb)b("html").css({height:"100%",overflow:"hidden",overflowX:"hidden",overflowY:"hidden"}),b("body").css({position:"relative",height:"100%",overflow:"hidden",overflowX:"hidden",overflowY:"hidden",
margin:0,padding:0,border:"none"}),b.extend(r,L(w));else{var ka={overflow:"hidden",overflowX:"hidden",overflowY:"hidden"},nb=w.css("position");w.css("height");if(!lb&&(!nb||!nb.match(/fixed|absolute|relative/)))ka.position="relative";w.css(ka);w.is(":visible")&&(b.extend(r,L(w)),pa.showErrorMessages&&1>r.innerHeight&&ba(l.errContainerHeight.replace(/CONTAINER/,r.ref),!0))}}catch(sb){}cb();b(window).bind("unload."+I,bb);la(A,b.layout.onLoad);rb.initPanes&&sa();delete o.creatingLayout;Qa=o.initialized}return"cancel"===
Qa?null:A};b.ui||(b.ui={});b.ui.cookie={acceptsCookies:!!navigator.cookieEnabled,read:function(a){for(var c=document.cookie,c=c?c.split(";"):[],d,f=0,h=c.length;f<h;f++){d=b.trim(c[f]).split("=");if(d[0]==a)return decodeURIComponent(d[1])}return null},write:function(a,b,d){var f="",h="",l=false,d=d||{},j=d.expires;if(j&&j.toUTCString)h=j;else if(j===null||typeof j==="number"){h=new Date;if(j>0)h.setDate(h.getDate()+j);else{h.setFullYear(1970);l=true}}h&&(f=f+(";expires="+h.toUTCString()));d.path&&
(f=f+(";path="+d.path));d.domain&&(f=f+(";domain="+d.domain));d.secure&&(f=f+";secure");document.cookie=a+"="+(l?"":encodeURIComponent(b))+f},clear:function(a){b.ui.cookie.write(a,"",{expires:-1})}};b.cookie||(b.cookie=function(a,c,d){var f=b.ui.cookie;if(c===null)f.clear(a);else{if(c===void 0)return f.read(a);f.write(a,c,d)}});b.layout.plugins.stateManagement=!0;b.layout.config.optionRootKeys.push("stateManagement");b.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}};b.layout.optionsMap.layout.push("stateManagement");b.layout.state={saveCookie:function(a,c,d){var f=a.options,h=f.stateManagement,d=b.extend(true,{},h.cookie,d||null),a=a.state.stateData=a.readState(c||h.stateKeys);b.ui.cookie.write(d.name||f.name||"Layout",b.layout.state.encodeJSON(a),d);return b.extend(true,{},a)},deleteCookie:function(a){a=a.options;b.ui.cookie.clear(a.stateManagement.cookie.name||a.name||"Layout")},readCookie:function(a){a=
a.options;return(a=b.ui.cookie.read(a.stateManagement.cookie.name||a.name||"Layout"))?b.layout.state.decodeJSON(a):{}},loadCookie:function(a){var c=b.layout.state.readCookie(a);if(c){a.state.stateData=b.extend(true,{},c);a.loadState(c)}return c},loadState:function(a,c,d){c=b.layout.transformData(c);if(!b.isEmptyObject(c)){b.extend(true,a.options,c);if(a.state.initialized){var f,h,l,j,p,y=d===false;b.each(b.layout.config.borderPanes,function(b,d){state=a.state[d];h=c[d];if(typeof h=="object"){l=h.size;
p=h.initClosed;j=h.initHidden;(f=state.isVisible)||a.sizePane(d,l,false,false);j===true?a.hide(d,y):p===false?a.open(d,false,y):p===true?a.close(d,false,y):j===false&&a.show(d,false,y);f&&a.sizePane(d,l,false,y)}})}}},readState:function(a,c){var d={},f={isClosed:"initClosed",isHidden:"initHidden"},h=a.state,l=b.layout.config.allPanes,j,p,y;if(!c)c=a.options.stateManagement.stateKeys;b.isArray(c)&&(c=c.join(","));for(var c=c.replace(/__/g,".").split(","),C=0,G=c.length;C<G;C++){j=c[C].split(".");p=
j[0];j=j[1];if(!(b.inArray(p,l)<0)){y=h[p][j];if(y!=void 0){j=="isClosed"&&h[p].isSliding&&(y=true);(d[p]||(d[p]={}))[f[j]?f[j]:j]=y}}}return d},encodeJSON:function(a){function b(a){var f=[],h=0,l,j,p;for(l in a){j=a[l];p=typeof j;p=="string"?j='"'+j+'"':p=="object"&&(j=b(j));f[h++]='"'+l+'":'+j}return"{"+f.join(",")+"}"}return b(a)},decodeJSON:function(a){try{return b.parseJSON?b.parseJSON(a):window.eval("("+a+")")||{}}catch(c){return{}}},_create:function(a){var c=b.layout.state;b.extend(a,{readCookie:function(){return c.readCookie(a)},
deleteCookie:function(){c.deleteCookie(a)},saveCookie:function(b,d){return c.saveCookie(a,b,d)},loadCookie:function(){return c.loadCookie(a)},loadState:function(b,d){c.loadState(a,b,d)},readState:function(b){return c.readState(a,b)},encodeJSON:c.encodeJSON,decodeJSON:c.decodeJSON});a.state.stateData={};var d=a.options.stateManagement;if(d.enabled)d.autoLoad?a.loadCookie():a.state.stateData=a.readCookie()},_unload:function(a){var b=a.options.stateManagement;if(b.enabled)b.autoSave?a.saveCookie():a.state.stateData=
a.readState()}};b.layout.onCreate.push(b.layout.state._create);b.layout.onUnload.push(b.layout.state._unload);b.layout.plugins.buttons=!0;b.layout.defaults.autoBindCustomButtons=!1;b.layout.optionsMap.layout.push("autoBindCustomButtons");G=b.layout.language;b.layout.buttons={init:function(a){var c=a.options.name||"",d;b.each(["toggle","open","close","pin","toggle-slide","open-slide"],function(f,h){b.each(b.layout.config.borderPanes,function(f,j){b(".ui-layout-button-"+h+"-"+j).each(function(){d=b(this).data("layoutName")||
b(this).attr("layoutName");(d==void 0||d===c)&&a.bindButton(this,h,j)})})})},get:function(a,c,d,f){var h=b(c),a=a.options,l=a.showErrorMessages;if(h.length)if(b.inArray(d,b.layout.config.borderPanes)<0){l&&b.layout.msg(G.errButton+G.pane+": "+d,true);h=b("")}else{c=a[d].buttonClass+"-"+f;h.addClass(c+" "+c+"-"+d).data("layoutName",a.name)}else l&&b.layout.msg(G.errButton+G.selector+": "+c,true);return h},bind:function(a,c,d,f){var h=b.layout.buttons;switch(d.toLowerCase()){case "toggle":h.addToggle(a,
c,f);break;case "open":h.addOpen(a,c,f);break;case "close":h.addClose(a,c,f);break;case "pin":h.addPin(a,c,f);break;case "toggle-slide":h.addToggle(a,c,f,true);break;case "open-slide":h.addOpen(a,c,f,true)}return a},addToggle:function(a,c,d,f){b.layout.buttons.get(a,c,d,"toggle").click(function(b){a.toggle(d,!!f);b.stopPropagation()});return a},addOpen:function(a,c,d,f){b.layout.buttons.get(a,c,d,"open").attr("title",G.Open).click(function(b){a.open(d,!!f);b.stopPropagation()});return a},addClose:function(a,
c,d){b.layout.buttons.get(a,c,d,"close").attr("title",G.Close).click(function(b){a.close(d);b.stopPropagation()});return a},addPin:function(a,c,d){var f=b.layout.buttons,h=f.get(a,c,d,"pin");if(h.length){var l=a.state[d];h.click(function(c){f.setPinState(a,b(this),d,l.isSliding||l.isClosed);l.isSliding||l.isClosed?a.open(d):a.close(d);c.stopPropagation()});f.setPinState(a,h,d,!l.isClosed&&!l.isSliding);l.pins.push(c)}return a},setPinState:function(a,b,d,f){var h=b.attr("pin");if(!(h&&f===(h=="down"))){a=
a.options[d].buttonClass+"-pin";h=a+"-"+d;d=a+"-up "+h+"-up";a=a+"-down "+h+"-down";b.attr("pin",f?"down":"up").attr("title",f?G.Unpin:G.Pin).removeClass(f?d:a).addClass(f?a:d)}},syncPinBtns:function(a,c,d){b.each(state[c].pins,function(f,h){b.layout.buttons.setPinState(a,b(h),c,d)})},_load:function(a){var c=b.layout.buttons;b.extend(a,{bindButton:function(b,d,l){return c.bind(a,b,d,l)},addToggleBtn:function(b,d,l){return c.addToggle(a,b,d,l)},addOpenBtn:function(b,d,l){return c.addOpen(a,b,d,l)},
addCloseBtn:function(b,d){return c.addClose(a,b,d)},addPinBtn:function(b,d){return c.addPin(a,b,d)}});for(var d=0;d<4;d++)a.state[b.layout.config.borderPanes[d]].pins=[];a.options.autoBindCustomButtons&&c.init(a)},_unload:function(){}};b.layout.onLoad.push(b.layout.buttons._load);b.layout.plugins.browserZoom=!0;b.layout.defaults.browserZoomCheckInterval=1E3;b.layout.optionsMap.layout.push("browserZoomCheckInterval");b.layout.browserZoom={_init:function(a){b.layout.browserZoom.ratio()!==false&&b.layout.browserZoom._setTimer(a)},
_setTimer:function(a){if(!a.destroyed){var c=a.options,d=a.state,f=a.hasParentLayout?5E3:Math.max(c.browserZoomCheckInterval,100);setTimeout(function(){if(!a.destroyed&&c.resizeWithWindow){var f=b.layout.browserZoom.ratio();if(f!==d.browserZoom){d.browserZoom=f;a.resizeAll()}b.layout.browserZoom._setTimer(a)}},f)}},ratio:function(){function a(a,b){return(parseInt(a,10)/parseInt(b,10)*100).toFixed()}var c=window,d=screen,f=document,h=f.documentElement||f.body,l=b.layout.browser,j=l.version,p,y,C;return l.msie&&
j>8||!l.msie?false:d.deviceXDPI?a(d.deviceXDPI,d.systemXDPI):l.webkit&&(p=f.body.getBoundingClientRect)?a(p.left-p.right,f.body.offsetWidth):l.webkit&&(y=c.outerWidth)?a(y,c.innerWidth):(y=d.width)&&(C=h.clientWidth)?a(y,C):false}};b.layout.onReady.push(b.layout.browserZoom._init)})(jQuery);