/*
 jquery.layout 1.3.0 - Release Candidate 29.8
 $Date: 2010-09-27 08:00:00 (Mon, 27 Sep 2010) $
 $Rev: 30298 $

 Copyright (c) 2010 
   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.

 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(f){var v=f.browser;f.layout={browser:{mozilla:v.mozilla,webkit:v.webkit||v.safari||!1,msie:v.msie,isIE6:v.msie&&6==v.version,boxModel:!1},scrollbarWidth:function(){return window.scrollbarWidth||f.layout.getScrollbarSize("width")},scrollbarHeight:function(){return window.scrollbarHeight||f.layout.getScrollbarSize("height")},getScrollbarSize:function(h){var s=f('<div style="position: absolute; top: -10000px; left: -10000px; width: 100px; height: 100px; overflow: scroll;"></div>').appendTo("body"),
r={width:s.width()-s[0].clientWidth,height:s.height()-s[0].clientHeight};s.remove();window.scrollbarWidth=r.width;window.scrollbarHeight=r.height;return h.match(/^(width|height)$/i)?r[h]:r},showInvisibly:function(h,s){if(!h)return{};h.jquery||(h=f(h));var r={display:h.css("display"),visibility:h.css("visibility")};return s||"none"==r.display?(h.css({display:"block",visibility:"hidden"}),r):{}},getElemDims:function(h){var s={},r=s.css={},t={},I,v,y=h.offset();s.offsetLeft=y.left;s.offsetTop=y.top;
f.each(["Left","Right","Top","Bottom"],function(z,y){I=r["border"+y]=f.layout.borderWidth(h,y);v=r["padding"+y]=f.layout.cssNum(h,"padding"+y);t[y]=I+v;s["inset"+y]=v});s.offsetWidth=h.innerWidth();s.offsetHeight=h.innerHeight();s.outerWidth=h.outerWidth();s.outerHeight=h.outerHeight();s.innerWidth=s.outerWidth-t.Left-t.Right;s.innerHeight=s.outerHeight-t.Top-t.Bottom;r.width=h.width();r.height=h.height();return s},getElemCSS:function(f,s){var r={},t=f[0].style,v=s.split(","),K=["Top","Bottom","Left",
"Right"],y=["Color","Style","Width"],z,J,O,T,U,aa;for(T=0;T<v.length;T++)if(z=v[T],z.match(/(border|padding|margin)$/))for(U=0;4>U;U++)if(J=K[U],"border"==z)for(aa=0;3>aa;aa++)O=y[aa],r[z+J+O]=t[z+J+O];else r[z+J]=t[z+J];else r[z]=t[z];return r},cssWidth:function(h,s){var r=f.layout.borderWidth,t=f.layout.cssNum;if(0>=s)return 0;if(!f.layout.browser.boxModel)return s;r=s-r(h,"Left")-r(h,"Right")-t(h,"paddingLeft")-t(h,"paddingRight");return 0<r?r:0},cssHeight:function(h,s){var r=f.layout.borderWidth,
t=f.layout.cssNum;if(0>=s)return 0;if(!f.layout.browser.boxModel)return s;r=s-r(h,"Top")-r(h,"Bottom")-t(h,"paddingTop")-t(h,"paddingBottom");return 0<r?r:0},cssNum:function(h,s){h.jquery||(h=f(h));var r=f.layout.showInvisibly(h),t=parseInt(f.curCSS(h[0],s,!0),10)||0;h.css(r);return t},borderWidth:function(h,s){h.jquery&&(h=h[0]);var r="border"+s.substr(0,1).toUpperCase()+s.substr(1);return"none"==f.curCSS(h,r+"Style",!0)?0:parseInt(f.curCSS(h,r+"Width",!0),10)||0}};f.fn.layout=function(h){function s(a){if(!a)return!0;
var b=a.keyCode;if(33>b)return!0;var c={38:"north",40:"south",37:"west",39:"east"},d=a.shiftKey,e=a.ctrlKey,p,g,k,m;e&&37<=b&&40>=b&&q[c[b]].enableCursorHotkey?m=c[b]:(e||d)&&f.each(l.borderPanes.split(","),function(a,c){p=q[c];g=p.customHotkey;k=p.customHotkeyModifier;if((d&&"SHIFT"==k||e&&"CTRL"==k||e&&d)&&g&&b==(isNaN(g)||9>=g?g.toUpperCase().charCodeAt(0):g))return m=c,!1});if(!m||!w[m]||!q[m].closable||n[m].isHidden)return!0;da(m);a.stopPropagation();return a.returnValue=!1}function r(a){this&&
this.tagName&&(a=this);var b;L(a)?b=w[a]:f(a).data("layoutRole")?b=f(a):f(a).parents().each(function(){if(f(this).data("layoutRole"))return b=f(this),!1});if(b&&b.length){var c=b.data("layoutEdge");a=n[c];a.cssSaved&&t(c);if(a.isSliding||a.isResizing||a.isClosed)a.cssSaved=!1;else{var d={zIndex:l.zIndex.pane_normal+2},e={},p=b.css("overflow"),g=b.css("overflowX"),k=b.css("overflowY");"visible"!=p&&(e.overflow=p,d.overflow="visible");g&&!g.match(/visible|auto/)&&(e.overflowX=g,d.overflowX="visible");
k&&!k.match(/visible|auto/)&&(e.overflowY=g,d.overflowY="visible");a.cssSaved=e;b.css(d);f.each(l.allPanes.split(","),function(a,b){b!=c&&t(b)})}}}function t(a){this&&this.tagName&&(a=this);var b;L(a)?b=w[a]:f(a).data("layoutRole")?b=f(a):f(a).parents().each(function(){if(f(this).data("layoutRole"))return b=f(this),!1});if(b&&b.length){a=b.data("layoutEdge");a=n[a];var c=a.cssSaved||{};a.isSliding||a.isResizing||b.css("zIndex",l.zIndex.pane_normal);b.css(c);a.cssSaved=!1}}function v(a,b,c){var d=
f(a);if(d.length)if(-1==l.borderPanes.indexOf(b))alert(C.errButton+C.Pane.toLowerCase()+": "+b);else return a=q[b].buttonClass+"-"+c,d.addClass(a+" "+a+"-"+b).data("layoutName",q.name),d;else alert(C.errButton+C.selector+": "+a);return null}function K(a,b,c){switch(b.toLowerCase()){case "toggle":y(a,c);break;case "open":z(a,c);break;case "close":J(a,c);break;case "pin":O(a,c);break;case "toggle-slide":y(a,c,!0);break;case "open-slide":z(a,c,!0)}}function y(a,b,c){(a=v(a,b,"toggle"))&&a.click(function(a){da(b,
!!c);a.stopPropagation()})}function z(a,b,c){(a=v(a,b,"open"))&&a.attr("title",C.Open).click(function(a){V(b,!!c);a.stopPropagation()})}function J(a,b){var c=v(a,b,"close");c&&c.attr("title",C.Close).click(function(a){P(b);a.stopPropagation()})}function O(a,b){var c=v(a,b,"pin");if(c){var d=n[b];c.click(function(a){U(f(this),b,d.isSliding||d.isClosed);d.isSliding||d.isClosed?V(b):P(b);a.stopPropagation()});U(c,b,!d.isClosed&&!d.isSliding);l[b].pins.push(a)}}function T(a,b){f.each(l[a].pins,function(c,
d){U(f(d),a,b)})}function U(a,b,c){var d=a.attr("pin");if(!d||c!=("down"==d)){var d=q[b].buttonClass+"-pin",e=d+"-"+b;b=d+"-up "+e+"-up";d=d+"-down "+e+"-down";a.attr("pin",c?"down":"up").attr("title",c?C.Unpin:C.Pin).removeClass(c?b:d).addClass(c?d:b)}}function aa(a){a=f.extend({},q.cookie,a||{}).name||q.name||"Layout";for(var b=document.cookie,b=b?b.split(";"):[],c,d=0,e=b.length;d<e;d++)if(c=f.trim(b[d]).split("="),c[0]==a)return Aa(decodeURIComponent(c[1]));return""}function qa(a,b){var c=f.extend({},
q.cookie,b||{}),d=c.name||q.name||"Layout",e="",p="",g=!1;c.expires.toUTCString?p=c.expires:"number"==typeof c.expires&&(p=new Date,0<c.expires?p.setDate(p.getDate()+c.expires):(p.setYear(1970),g=!0));p&&(e+=";expires="+p.toUTCString());c.path&&(e+=";path="+c.path);c.domain&&(e+=";domain="+c.domain);c.secure&&(e+=";secure");g?(n.cookie={},document.cookie=d+"="+e):(n.cookie=ra(a||c.keys),document.cookie=d+"="+encodeURIComponent(Ba(n.cookie))+e);return f.extend({},n.cookie)}function Ca(a){if(a=aa(a))n.cookie=
f.extend({},a),Da(a);return a}function Da(a){f.extend(!0,q,a)}function ra(a){var b={},c={isClosed:"initClosed",isHidden:"initHidden"},d,e,p;a||(a=q.cookie.keys);f.isArray(a)&&(a=a.join(","));a=a.replace(/__/g,".").split(",");for(var g=0,k=a.length;g<k;g++)d=a[g].split("."),e=d[0],d=d[1],0>l.allPanes.indexOf(e)||(p=n[e][d],void 0!=p&&("isClosed"==d&&n[e].isSliding&&(p=!0),(b[e]||(b[e]={}))[c[d]?c[d]:d]=p));return b}function Ba(a){function b(a){var d=[],e=0,f,g,k;for(f in a)g=a[f],k=typeof g,"string"==
k?g='"'+g+'"':"object"==k&&(g=b(g)),d[e++]='"'+f+'":'+g;return"{"+d.join(",")+"}"}return b(a)}function Aa(a){try{return window.eval("("+a+")")||{}}catch(b){return{}}}var C={Pane:__("Pane"),Open:__("Open"),Close:__("Close"),Resize:__("Resize"),Slide:__("Slide Open"),Pin:__("Pin"),Unpin:__("Un-Pin"),selector:__("selector"),msgNoRoom:__("Not enough room to show this pane."),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'!",errButton:"Error Adding Button \n\nInvalid "},q={name:"",scrollToBookmarkOnLoad:!0,resizeWithWindow:!0,resizeWithWindowDelay:200,resizeWithWindowMaxDelay:0,onresizeall_start:null,onresizeall_end:null,onload:null,onunload:null,autoBindCustomButtons:!1,zIndex:null,defaults:{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:C.Close,togglerTip_closed:C.Open,togglerContent_open:"",togglerContent_closed:"",resizerDblClickToggle:!0,
autoResize:!0,autoReopen:!0,resizerDragOpacity:1,maskIframesOnResize:!0,resizeNestedLayout:!0,resizeWhileDragging:!1,resizeContentWhileDragging:!1,noRoomToOpenTip:C.msgNoRoom,resizerTip:C.Resize,sliderTip:C.Slide,sliderCursor:"pointer",slideTrigger_open:"click",slideTrigger_close:"mouseleave",hideTogglerOnSlide:!1,preventQuickSlideClose:!(!f.browser.webkit&&!f.browser.safari),showOverflowOnHover:!1,enableCursorHotkey:!0,customHotkeyModifier:"SHIFT",fxName:"slide",fxSpeed:null,fxSettings:{},fxOpacityFix:!0,
triggerEventsOnLoad:!1,triggerEventsWhileDragging:!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},useStateCookie:!1,cookie:{name:"",autoSave:!0,autoLoad:!0,domain:"",path:"",expires:"",secure:!1,keys:"north.size,south.size,east.size,west.size,north.isClosed,south.isClosed,east.isClosed,west.isClosed,north.isHidden,south.isHidden,east.isHidden,west.isHidden"}},
sa={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"}}},n={id:"layout"+(new Date).getTime(),initialized:!1,container:{},north:{},south:{},east:{},west:{},center:{},cookie:{}},l={allPanes:"north,south,west,east,center",borderPanes:"north,south,west,east",altSide:{north:"south",
south:"north",east:"west",west:"east"},hidden:{visibility:"hidden"},visible:{visibility:"visible"},zIndex:{pane_normal:1,resizer_normal:2,iframe_mask:2,pane_sliding:100,pane_animate:1E3,resizer_drag:1E4},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:{},cssDemo:{overflow:"auto",padding:"10px"},cssDemoPane:{overflow:"hidden",padding:0}},panes:{cssReq:{position:"absolute",margin:0},cssDemo:{padding:"10px",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"},pins:[]},south:{side:"Bottom",sizeType:"Height",dir:"horz",cssReq:{top:"auto",bottom:0,left:0,right:0,width:"auto"},pins:[]},east:{side:"Right",
sizeType:"Width",dir:"vert",cssReq:{left:"auto",right:0,top:"auto",bottom:"auto",height:"auto"},pins:[]},west:{side:"Left",sizeType:"Width",dir:"vert",cssReq:{left:0,right:"auto",top:"auto",bottom:"auto",height:"auto"},pins:[]},center:{dir:"center",cssReq:{left:"auto",right:"auto",top:"auto",bottom:"auto",height:"auto",width:"auto"}}},G={data:{},set:function(a,b,c){G.clear(a);G.data[a]=setTimeout(b,c)},clear:function(a){var b=G.data;b[a]&&(clearTimeout(b[a]),delete b[a])}},L=function(a){try{return"string"==
typeof a||"object"==typeof a&&null!==a.constructor.toString().match(/string/i)}catch(b){return!1}},B=function(a,b){return Math.max(a,b)},Qa=function(a){var b,c={cookie:{},defaults:{fxSettings:{}},north:{fxSettings:{}},south:{fxSettings:{}},east:{fxSettings:{}},west:{fxSettings:{}},center:{fxSettings:{}}};a=a||{};a.effects||a.cookie||a.defaults||a.north||a.south||a.west||a.east||a.center?c=f.extend(!0,c,a):f.each(a,function(a,e){b=a.split("__");if(!b[1]||c[b[0]])c[b[1]?b[0]:"defaults"][b[1]?b[1]:b[0]]=
e});return c},Ea=function(a,b,c){function d(p){var g=l[p];g.doCallback?(e.push(p),p=g.callback.split(",")[1],p!=b&&0<=!f.inArray(p,e)&&d(p)):(g.doCallback=!0,g.callback=a+","+b+","+(c?1:0))}var e=[];f.each(l.borderPanes.split(","),function(a,b){if(l[b].isMoving)return d(b),!1})},Fa=function(a){a=l[a];l.isLayoutBusy=!1;delete a.isMoving;if(a.doCallback&&a.callback){a.doCallback=!1;var b=a.callback.split(","),c=0<b[2]?!0:!1;"open"==b[0]?V(b[1],c):"close"==b[0]&&P(b[1],c);a.doCallback||(a.callback=null)}},
A=function(a,b){if(b){var c;try{if("function"==typeof b)c=b;else if(L(b))if(b.match(/,/)){var d=b.split(",");c=eval(d[0]);if("function"==typeof c&&1<d.length)return c(d[1])}else c=eval(b);else return;if("function"==typeof c)return a&&w[a]?c(a,w[a],f.extend({},n[a]),q[a],q.name):c(Ga,f.extend({},n),q,q.name)}catch(e){}}},Ha=function(a,b){if(!a)return{};a.jquery||(a=f(a));var c={display:a.css("display"),visibility:a.css("visibility")};return b||"none"==c.display?(a.css({display:"block",visibility:"hidden"}),
c):{}},Ia=function(a){if(!n.browser.mozilla){var b=w[a];"IFRAME"==n[a].tagName?b.css(l.hidden).css(l.visible):b.find("IFRAME").css(l.hidden).css(l.visible)}},ba=function(a,b){a.jquery||(a=f(a));var c=Ha(a),d=parseInt(f.curCSS(a[0],b,!0),10)||0;a.css(c);return d},ga=function(a,b){a.jquery&&(a=a[0]);var c="border"+b.substr(0,1).toUpperCase()+b.substr(1);return"none"==f.curCSS(a,c+"Style",!0)?0:parseInt(f.curCSS(a,c+"Width",!0),10)||0},M=function(a,b){var c=L(a),d=c?w[a]:f(a);isNaN(b)&&(b=c?Q(a):d.outerWidth());
if(0>=b)return 0;if(!n.browser.boxModel)return b;c=b-ga(d,"Left")-ga(d,"Right")-ba(d,"paddingLeft")-ba(d,"paddingRight");return 0<c?c:0},N=function(a,b){var c=L(a),d=c?w[a]:f(a);isNaN(b)&&(b=c?Q(a):d.outerHeight());if(0>=b)return 0;if(!n.browser.boxModel)return b;c=b-ga(d,"Top")-ga(d,"Bottom")-ba(d,"paddingTop")-ba(d,"paddingBottom");return 0<c?c:0},Ra=function(a,b){return"horz"==l[a].dir?N(a,b):M(a,b)},ma=function(a){var b=l[a].dir;a={minWidth:1001-M(a,1E3),minHeight:1001-N(a,1E3)};"horz"==b&&(a.minSize=
a.minHeight);"vert"==b&&(a.minSize=a.minWidth);return a},Sa=function(a,b,c){var d=a;L(a)?d=w[a]:a.jquery||(d=f(a));a=N(d,b);d.css({height:a,visibility:"visible"});0<a&&0<d.innerWidth()?c&&d.data("autoHidden")&&(d.show().data("autoHidden",!1),n.browser.mozilla||d.css(l.hidden).css(l.visible)):c&&!d.data("autoHidden")&&d.hide().data("autoHidden",!0)},W=function(a,b,c){c||(c=l[a].dir);L(b)&&b.match(/%/)&&(b=parseInt(b,10)/100);if(0===b)return 0;if(1<=b)return parseInt(b,10);if(0<b){a=q;var d;"horz"==
c?d=x.innerHeight-(w.north?a.north.spacing_open:0)-(w.south?a.south.spacing_open:0):"vert"==c&&(d=x.innerWidth-(w.west?a.west.spacing_open:0)-(w.east?a.east.spacing_open:0));return Math.floor(d*b)}if("center"==a)return 0;d=w[a];c="horz"==c?"height":"width";a=Ha(d);var e=d.css(c);d.css(c,"auto");b="height"==c?d.outerHeight():d.outerWidth();d.css(c,e).css(a);return b},Q=function(a,b){var c=w[a],d=q[a],e=n[a],f=b?d.spacing_open:0,d=b?d.spacing_closed:0;return!c||e.isHidden?0:e.isClosed||e.isSliding&&
b?d:"horz"==l[a].dir?c.outerHeight()+f:c.outerWidth()+f},R=function(a,b){var c=q[a],d=n[a],e=l[a],f=e.dir;e.side.toLowerCase();e.sizeType.toLowerCase();var e=void 0!=b?b:d.isSliding,g=c.spacing_open,k=l.altSide[a],m=n[k],h=w[k],u=!h||!1===m.isVisible||m.isSliding?0:"horz"==f?h.outerHeight():h.outerWidth(),k=(!h||m.isHidden?0:q[k][!1!==m.isClosed?"spacing_closed":"spacing_open"])||0,m="horz"==f?x.innerHeight:x.innerWidth,h=ma("center"),h="horz"==f?B(q.center.minHeight,h.minHeight):B(q.center.minWidth,
h.minWidth),e=m-g-(e?0:W("center",h,f)+u+k),f=d.minSize=B(W(a,c.minSize),ma(a).minSize),g=c.maxSize?W(a,c.maxSize):1E5,e=Math.min(g,e),e=d.maxSize=e,d=d.resizerPosition={},g=x.insetTop,u=x.insetLeft,k=x.innerWidth,m=x.innerHeight,c=c.spacing_open;switch(a){case "north":d.min=g+f;d.max=g+e;break;case "west":d.min=u+f;d.max=u+e;break;case "south":d.min=g+m-e-c;d.max=g+m-f-c;break;case "east":d.min=u+k-e-c,d.max=u+k-f-c}},ca=function(a){var b={},c=b.css={},d={},e,p,g=a.offset();b.offsetLeft=g.left;b.offsetTop=
g.top;f.each(["Left","Right","Top","Bottom"],function(f,g){e=c["border"+g]=ga(a,g);p=c["padding"+g]=ba(a,"padding"+g);d[g]=e+p;b["inset"+g]=p});b.offsetWidth=a.innerWidth();b.offsetHeight=a.innerHeight();b.outerWidth=a.outerWidth();b.outerHeight=a.outerHeight();b.innerWidth=b.outerWidth-d.Left-d.Right;b.innerHeight=b.outerHeight-d.Top-d.Bottom;c.width=a.width();c.height=a.height();return b},ta=function(a,b){var c={},d=a[0].style,e=b.split(","),f=["Top","Bottom","Left","Right"],g=["Color","Style",
"Width"],k,m,h,l,n,q;for(l=0;l<e.length;l++)if(k=e[l],k.match(/(border|padding|margin)$/))for(n=0;4>n;n++)if(m=f[n],"border"==k)for(q=0;3>q;q++)h=g[q],c[k+m+h]=d[k+m+h];else c[k+m]=d[k+m];else c[k]=d[k];return c},ua=function(a,b){var c=f(a),d=c.data("layoutRole"),e=c.data("layoutEdge"),p=q[e][d+"Class"],e="-"+e,g=c.hasClass(p+"-closed")?"-closed":"-open",k="-closed"==g?"-open":"-closed",g=p+"-hover "+(p+e+"-hover ")+(p+g+"-hover ")+(p+e+g+"-hover ");b&&(g+=p+k+"-hover "+(p+e+k+"-hover "));"resizer"==
d&&c.hasClass(p+"-sliding")&&(g+=p+"-sliding-hover "+(p+e+"-sliding-hover "));return f.trim(g)},ha=function(a,b){var c=b||this;f(c).addClass(ua(c))},S=function(a,b){var c=b||this;f(c).removeClass(ua(c,!0))},Ta=function(a){f("body").disableSelection();ha(a,this)},Ja=function(a,b){var c=b||this,d=f(c).data("layoutEdge"),e=d+"ResizerLeave";G.clear(e);b?n[d].isResizing||f("body").enableSelection():(S(a,this),G.set(e,function(){Ja(a,c)},200))},Ua=function(){var a=Number(q.resizeWithWindowDelay)||100;0<
a&&(G.clear("winResize"),G.set("winResize",function(){G.clear("winResize");G.clear("winResizeRepeater");na()},a),G.data.winResizeRepeater||Ka())},Ka=function(){var a=Number(q.resizeWithWindowMaxDelay);0<a&&G.set("winResizeRepeater",function(){Ka();na()},a)},La=function(){var a=q;n.cookie=ra();a.useStateCookie&&a.cookie.autoSave&&qa();A(null,a.onunload)},Va=function(){f.each(l.borderPanes.split(","),function(a,b){var c=q[b];if(c.enableCursorHotkey||c.customHotkey)return f(document).bind("keydown."+
E,s),!1})},Wa=function(){function a(a){for(var c in b)void 0!=a[c]&&(a[b[c]]=a[c],delete a[c])}h=Qa(h);var b={applyDefaultStyles:"applyDemoStyles"};a(h.defaults);f.each(l.allPanes.split(","),function(b,c){a(h[c])});h.effects&&(f.extend(sa,h.effects),delete h.effects);f.extend(q.cookie,h.cookie);f.each("name zIndex scrollToBookmarkOnLoad resizeWithWindow resizeWithWindowDelay resizeWithWindowMaxDelay onresizeall onresizeall_start onresizeall_end onload onunload autoBindCustomButtons useStateCookie".split(" "),
function(a,b){void 0!==h[b]?q[b]=h[b]:void 0!==h.defaults[b]&&(q[b]=h.defaults[b],delete h.defaults[b])});f.each(["paneSelector","resizerCursor","customHotkey"],function(a,b){delete h.defaults[b]});f.extend(!0,q.defaults,h.defaults);l.center=f.extend(!0,{},l.panes,l.center);var c=q.zIndex;if(0===c||0<c)l.zIndex.pane_normal=c,l.zIndex.resizer_normal=c+1,l.zIndex.iframe_mask=c+1;f.extend(q.center,h.center);var d=f.extend(!0,{},q.defaults,h.defaults,q.center);f.each("paneClass contentSelector applyDemoStyles triggerEventsOnLoad showOverflowOnHover onresize onresize_start onresize_end resizeNestedLayout resizeContentWhileDragging onsizecontent onsizecontent_start onsizecontent_end".split(" "),
function(a,b){q.center[b]=d[b]});var e,p=q.defaults;f.each(l.borderPanes.split(","),function(a,b){l[b]=f.extend(!0,{},l.panes,l[b]);e=q[b]=f.extend(!0,{},q.defaults,q[b],h.defaults,h[b]);e.paneClass||(e.paneClass="ui-layout-pane");e.resizerClass||(e.resizerClass="ui-layout-resizer");e.togglerClass||(e.togglerClass="ui-layout-toggler");f.each(["_open","_close",""],function(a,c){var d="fxName"+c,g="fxSpeed"+c,l="fxSettings"+c;e[d]=h[b][d]||h[b].fxName||h.defaults[d]||h.defaults.fxName||e[d]||e.fxName||
p[d]||p.fxName||"none";var n=e[d];"none"!=n&&f.effects&&f.effects[n]&&(sa[n]||e[l]||e.fxSettings)||(n=e[d]="none");n=sa[n]||{};d=n.all||{};n=n[b]||{};e[l]=f.extend({},d,n,p.fxSettings||{},p[l]||{},e.fxSettings,e[l],h.defaults.fxSettings,h.defaults[l]||{},h[b].fxSettings,h[b][l]||{});e[g]=h[b][g]||h[b].fxSpeed||h.defaults[g]||h.defaults.fxSpeed||e[g]||e[l].duration||e.fxSpeed||e.fxSettings.duration||p.fxSpeed||p.fxSettings.duration||n.duration||d.duration||"normal"})})},Ma=function(a){a=q[a].paneSelector;
if("#"===a.substr(0,1))return F.find(a).eq(0);var b=F.children(a).eq(0);return b.length?b:F.children("form:first").children(a).eq(0)},Xa=function(){f.each(l.allPanes.split(","),function(a,b){var c=q[b],d=n[b],e=l[b],p=e.dir,g="center"==b,k={},m,h,u;X[b]=!1;m=w[b]=Ma(b);if(!m.length)return w[b]=!1,!0;m.data("layoutCSS")||m.data("layoutCSS",ta(m,"position,top,left,bottom,right,width,height,overflow,zIndex,display,backgroundColor,padding,margin,border"));m.data("layoutName",q.name).data("layoutRole",
"pane").data("layoutEdge",b).css(e.cssReq).css("zIndex",l.zIndex.pane_normal).css(c.applyDemoStyles?e.cssDemo:{}).addClass(c.paneClass+" "+c.paneClass+"-"+b).bind("mouseenter."+E,ha).bind("mouseleave."+E,S);Na(b,!1);g||(h=d.size=W(b,c.size),e=W(b,c.minSize)||1,u=W(b,c.maxSize)||1E5,0<h&&(h=B(Math.min(h,u),e)));d.tagName=f.prop?m.prop("tagName"):m.attr("tagName");d.edge=b;d.noRoom=!1;d.isVisible=!0;g||(d.isClosed=!1,d.isSliding=!1,d.isResizing=!1,d.isHidden=!1);switch(b){case "north":k.top=x.insetTop;
k.left=x.insetLeft;k.right=x.insetRight;break;case "south":k.bottom=x.insetBottom;k.left=x.insetLeft;k.right=x.insetRight;break;case "west":k.left=x.insetLeft;break;case "east":k.right=x.insetRight}"horz"==p?k.height=B(1,N(b,h)):"vert"==p&&(k.width=B(1,M(b,h)));m.css(k);"horz"!=p&&Y(b,!0);m.css({visibility:"visible",display:"block"});c.initClosed&&c.closable?P(b,!0,!0):(c.initHidden||c.initClosed)&&va(b);c.showOverflowOnHover&&m.hover(r,t)});Oa();f.each(l.borderPanes.split(","),function(a,b){w[b]&&
n[b].isVisible&&(R(b),Z(b))});Y("center");f.each(l.allPanes.split(","),function(a,b){var c=q[b];w[b]&&c.triggerEventsOnLoad&&n[b].isVisible&&A(b,c.onresize_end||c.onresize)});2>F.innerHeight()&&alert(C.errContainerHeight.replace(/CONTAINER/,x.ref))},Oa=function(a){a&&"all"!=a||(a=l.borderPanes);f.each(a.split(","),function(a,c){var d=w[c];D[c]=!1;H[c]=!1;if(d){var d=q[c],e=n[c],p=d.resizerClass,g=d.togglerClass;l[c].side.toLowerCase();var k="-"+c,m=D[c]=f("<div></div>"),h=d.closable?H[c]=f("<div></div>"):
!1;!e.isVisible&&d.slidable&&m.attr("title",d.sliderTip).css("cursor",d.sliderCursor);m.attr("id","#"==d.paneSelector.substr(0,1)?d.paneSelector.substr(1)+"-resizer":"").data("layoutRole","resizer").data("layoutEdge",c).css(l.resizers.cssReq).css("zIndex",l.zIndex.resizer_normal).css(d.applyDemoStyles?l.resizers.cssDemo:{}).addClass(p+" "+p+k).appendTo(F);h&&(h.attr("id","#"==d.paneSelector.substr(0,1)?d.paneSelector.substr(1)+"-toggler":"").data("layoutRole","toggler").data("layoutEdge",c).css(l.togglers.cssReq).css(d.applyDemoStyles?
l.togglers.cssDemo:{}).addClass(g+" "+g+k).appendTo(m).click(function(a){da(c);a.stopPropagation()}).hover(ha,S),d.togglerContent_open&&f("<span>"+d.togglerContent_open+"</span>").data("layoutRole","togglerContent").data("layoutEdge",c).addClass("content content-open").css("display","none").appendTo(h).hover(ha,S),d.togglerContent_closed&&f("<span>"+d.togglerContent_closed+"</span>").data("layoutRole","togglerContent").data("layoutEdge",c).addClass("content content-closed").css("display","none").appendTo(h).hover(ha,
S));Ya(c);e.isVisible?wa(c):(xa(c),ia(c,!0))}});ja("all")},Na=function(a,b){var c=q[a],d=c.contentSelector,e=w[a],f;d&&(f=X[a]=c.findNestedContent?e.find(d).eq(0):e.children(d).eq(0));f&&f.length?(f.css(l.content.cssReq),c.applyDemoStyles&&(f.css(l.content.cssDemo),e.css(l.content.cssDemoPane)),n[a].content={},!1!==b&&ea(a)):X[a]=!1},Za=function(){var a;f.each("toggle open close pin toggle-slide open-slide".split(" "),function(b,c){f.each(l.borderPanes.split(","),function(b,e){f(".ui-layout-button-"+
c+"-"+e).each(function(){a=f(this).data("layoutName")||f(this).attr("layoutName");void 0!=a&&a!=q.name||K(this,c,e)})})})},Ya=function(a){var b="function"==typeof f.fn.draggable,c;a&&"all"!=a||(a=l.borderPanes);f.each(a.split(","),function(a,e){var p=q[e],g=n[e],k=l[e],m="horz"==k.dir?"top":"left",h,u;if(!b||!w[e]||!p.resizable)return p.resizable=!1,!0;var s=D[e],r=p.resizerClass,t=r+"-drag",v=r+"-"+e+"-drag",y=r+"-dragging",z=r+"-"+e+"-dragging",B=r+"-dragging-limit",C=!1;g.isClosed||s.attr("title",
p.resizerTip).css("cursor",p.resizerCursor);s.hover(Ta,Ja);s.draggable({containment:F[0],axis:"horz"==k.dir?"y":"x",delay:0,distance:1,helper:"clone",opacity:p.resizerDragOpacity,addClasses:!1,zIndex:l.zIndex.resizer_drag,start:function(a,b){p=q[e];g=n[e];u=p.resizeWhileDragging;if(!1===A(e,p.ondrag_start))return!1;l.isLayoutBusy=!0;g.isResizing=!0;G.clear(e+"_closeSlider");R(e);h=g.resizerPosition;s.addClass(t+" "+v);C=!1;c=f(!0===p.maskIframesOnResize?"iframe":p.maskIframesOnResize).filter(":visible");
var d,k=0;c.each(function(){d="ui-layout-mask-"+ ++k;f(this).data("layoutMaskID",d);f('<div id="'+d+'" class="ui-layout-mask ui-layout-mask-'+e+'"/>').css({background:"#fff",opacity:"0.001",zIndex:l.zIndex.iframe_mask,position:"absolute",width:this.offsetWidth+"px",height:this.offsetHeight+"px"}).css(f(this).position()).appendTo(this.parentNode)});f("body").disableSelection()},drag:function(a,b){C||(b.helper.addClass(y+" "+z).children().css("visibility","hidden"),C=!0,g.isSliding&&w[e].css("zIndex",
l.zIndex.pane_sliding));var c=0;b.position[m]<h.min?(b.position[m]=h.min,c=-1):b.position[m]>h.max&&(b.position[m]=h.max,c=1);c?(b.helper.addClass(B),window.defaultStatus="Panel has reached its "+(0<c&&e.match(/north|west/)||0>c&&e.match(/south|east/)?"maximum":"minimum")+" size"):(b.helper.removeClass(B),window.defaultStatus="");u&&E(a,b,e)},stop:function(a,b){f("body").enableSelection();window.defaultStatus="";s.removeClass(t+" "+v+" "+B);g.isResizing=!1;l.isLayoutBusy=!1;E(a,b,e,!0)}});var E=function(a,
b,d,e){a=b.position;b=l[d];var g;switch(d){case "north":g=a.top;break;case "west":g=a.left;break;case "south":g=x.offsetHeight-a.top-p.spacing_open;break;case "east":g=x.offsetWidth-a.left-p.spacing_open}if(e){if(f("div.ui-layout-mask").each(function(){this.parentNode.removeChild(this)}),!1===A(d,p.ondrag_end||p.ondrag))return!1}else c.each(function(){f("#"+f(this).data("layoutMaskID")).css(f(this).position()).css({width:this.offsetWidth+"px",height:this.offsetHeight+"px"})});ya(d,g-x["inset"+b.side])}})},
va=function(a,b){var c=q[a],d=n[a],e=w[a],f=D[a];!e||d.isHidden||n.initialized&&!1===A(a,c.onhide_start)||(d.isSliding=!1,f&&f.hide(),!n.initialized||d.isClosed?(d.isClosed=!0,d.isHidden=!0,d.isVisible=!1,e.hide(),Y("horz"==l[a].dir?"all":"center"),(n.initialized||c.triggerEventsOnLoad)&&A(a,c.onhide_end||c.onhide)):(d.isHiding=!0,P(a,!1,b)))},oa=function(a,b,c,d){var e=q[a],f=n[a];w[a]&&f.isHidden&&!1!==A(a,e.onshow_start)&&(f.isSliding=!1,f.isShowing=!0,!1===b?P(a,!0):V(a,!1,c,d))},da=function(a,
b){L(a)||(a.stopImmediatePropagation(),a=f(this).data("layoutEdge"));var c=n,d;d=a;d=L(d)?f.trim(d):void 0==d||null==d?"":d;c=c[d];c.isHidden?oa(a):c.isClosed?V(a,!!b):P(a)},$a=function(a,b){var c=n[a];w[a].hide();c.isClosed=!0;c.isVisible=!1},P=function(a,b,c,d){function e(){if(k.isClosed){ia(a,!0);var b=l.altSide[a];n[b].noRoom&&(R(b),Z(b));d||!n.initialized&&!g.triggerEventsOnLoad||(m||A(a,g.onclose_end||g.onclose),m&&A(a,g.onshow_end||g.onshow),h&&A(a,g.onhide_end||g.onhide))}Fa(a)}if(n.initialized){var f=
w[a],g=q[a],k=n[a];c=!c&&!k.isClosed&&"none"!=g.fxName_close;var m=k.isShowing,h=k.isHiding;delete k.isShowing;delete k.isHiding;if(f&&g.closable&&(b||!k.isClosed||m))if(l.isLayoutBusy)Ea("close",a,b);else if(m||!1!==A(a,g.onclose_start))l[a].isMoving=!0,l.isLayoutBusy=!0,k.isClosed=!0,k.isVisible=!1,h?k.isHidden=!0:m&&(k.isHidden=!1),k.isSliding?ka(a,!1):Y("horz"==l[a].dir?"all":"center",!1),xa(a),c?(pa(a,!0),f.hide(g.fxName_close,g.fxSettings_close,g.fxSpeed_close,function(){pa(a,!1);e()})):(f.hide(),
e())}else $a(a)},xa=function(a){var b=D[a],c=H[a],d=q[a],e=l[a].side.toLowerCase(),p=d.resizerClass,g=d.togglerClass,k="-"+a;b.css(e,x["inset"+l[a].side]).removeClass(p+"-open "+p+k+"-open").removeClass(p+"-sliding "+p+k+"-sliding").addClass(p+"-closed "+p+k+"-closed").unbind("dblclick."+E);d.resizable&&"function"==typeof f.fn.draggable&&b.draggable("disable").removeClass("ui-state-disabled").css("cursor","default").attr("title","");c&&(c.removeClass(g+"-open "+g+k+"-open").addClass(g+"-closed "+
g+k+"-closed").attr("title",d.togglerTip_closed),c.children(".content-open").hide(),c.children(".content-closed").css("display","block"));T(a,!1);n.initialized&&ja("all")},V=function(a,b,c,d){function e(){k.isVisible&&(Ia(a),k.isSliding||Y("vert"==l[a].dir?"center":"all",!1),wa(a));Fa(a)}var f=w[a],g=q[a],k=n[a];c=!c&&k.isClosed&&"none"!=g.fxName_open;var m=k.isShowing;delete k.isShowing;!f||!g.resizable&&!g.closable||k.isVisible&&!k.isSliding||(k.isHidden&&!m?oa(a,!0):l.isLayoutBusy?Ea("open",a,
b):!1!==A(a,g.onopen_start)&&(R(a,b),k.minSize>k.maxSize?(T(a,!1),!d&&g.noRoomToOpenTip&&alert(g.noRoomToOpenTip)):(l[a].isMoving=!0,l.isLayoutBusy=!0,b?ka(a,!0):k.isSliding?ka(a,!1):g.slidable&&ia(a,!1),k.noRoom=!1,Z(a),k.isVisible=!0,k.isClosed=!1,m&&(k.isHidden=!1),c?(pa(a,!0),f.show(g.fxName_open,g.fxSettings_open,g.fxSpeed_open,function(){pa(a,!1);e()})):(f.show(),e()))))},wa=function(a,b){var c=w[a],d=D[a],e=H[a],p=q[a],g=n[a],k=l[a].side.toLowerCase(),m=p.resizerClass,h=p.togglerClass,u="-"+
a;d.css(k,x["inset"+l[a].side]+Q(a)).removeClass(m+"-closed "+m+u+"-closed").addClass(m+"-open "+m+u+"-open");g.isSliding?d.addClass(m+"-sliding "+m+u+"-sliding"):d.removeClass(m+"-sliding "+m+u+"-sliding");p.resizerDblClickToggle&&d.bind("dblclick",da);S(0,d);p.resizable&&"function"==typeof f.fn.draggable?d.draggable("enable").css("cursor",p.resizerCursor).attr("title",p.resizerTip):g.isSliding||d.css("cursor","default");e&&(e.removeClass(h+"-closed "+h+u+"-closed").addClass(h+"-open "+h+u+"-open").attr("title",
p.togglerTip_open),S(0,e),e.children(".content-closed").hide(),e.children(".content-open").css("display","block"));T(a,!g.isSliding);f.extend(g,ca(c));n.initialized&&(ja("all"),ea(a,!0));!b&&(n.initialized||p.triggerEventsOnLoad)&&c.is(":visible")&&(A(a,p.onopen_end||p.onopen),g.isShowing&&A(a,p.onshow_end||p.onshow),n.initialized&&(A(a,p.onresize_end||p.onresize),la(a)))},Pa=function(a){var b=typeof a,c="string"==b?a:f(this).data("layoutEdge");"object"==b&&a.stopImmediatePropagation();n[c].isClosed?
V(c,!0):ka(c,!0)},za=function(a){function b(a){d.isClosed?ka(c,!1):P(c)}var c=(L(a)?w[a]:f(this)).data("layoutEdge");a=q[c];var d=n[c];d.isClosed||d.isResizing||("click"==a.slideTrigger_close?b():a.preventQuickSlideClose&&l.isLayoutBusy||G.set(c+"_closeSlider",b,300))},pa=function(a,b){var c=w[a];if(b)c.css({zIndex:l.zIndex.pane_animate}),"south"==a?c.css({top:x.insetTop+x.innerHeight-c.outerHeight()}):"east"==a&&c.css({left:x.insetLeft+x.innerWidth-c.outerWidth()});else{c.css({zIndex:n[a].isSliding?
l.zIndex.pane_sliding:l.zIndex.pane_normal});"south"==a?c.css({top:"auto"}):"east"==a&&c.css({left:"auto"});var d=q[a];n.browser.msie&&d.fxOpacityFix&&"slide"!=d.fxName_open&&c.css("filter")&&1==c.css("opacity")&&c[0].style.removeAttribute("filter")}},ia=function(a,b){var c=q[a],d=D[a],e=c.slideTrigger_open;d&&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+"."+E,Pa).css("cursor",b?c.sliderCursor:
"default").attr("title",b?c.sliderTip:""))},ka=function(a,b){function c(b){G.clear(a+"_closeSlider");b.stopPropagation()}var d=q[a],e=l.zIndex,f=d.slideTrigger_close,g=b?"bind":"unbind",k=w[a],m=D[a];n[a].isSliding=b;G.clear(a+"_closeSlider");b&&ia(a,!1);k.css("zIndex",b?e.pane_sliding:e.pane_normal);m.css("zIndex",b?e.pane_sliding:e.resizer_normal);f.match(/click|mouseleave/)||(f=d.slideTrigger_close="mouseleave");m[g](f,za);"mouseleave"==f&&(k[g]("mouseleave."+E,za),m[g]("mouseenter."+E,c),k[g]("mouseenter."+
E,c));b?"click"!=f||d.resizable||(m.css("cursor",b?d.sliderCursor:"default"),m.attr("title",b?d.togglerTip_open:"")):G.clear(a+"_closeSlider")},Z=function(a,b,c,d){b=q[a];var e=n[a],f=l[a],g=w[a],k=D[a],m="vert"==f.dir,h=!1;if("center"==a||m&&e.noVerticalRoom)(h=e.minHeight<=e.maxHeight&&(m||e.minWidth<=e.maxWidth))&&e.noRoom?(g.show(),k&&k.show(),e.isVisible=!0,e.noRoom=!1,m&&(e.noVerticalRoom=!1),Ia(a)):h||e.noRoom||(g.hide(),k&&k.hide(),e.isVisible=!1,e.noRoom=!0);"center"!=a&&(e.minSize<=e.maxSize?
(e.size>e.maxSize?fa(a,e.maxSize,c,d):e.size<e.minSize?fa(a,e.minSize,c,d):k&&g.is(":visible")&&(c=f.side.toLowerCase(),d=e.size+x["inset"+f.side],ba(k,c)!=d&&k.css(c,d)),e.noRoom&&(e.wasOpen&&b.closable?b.autoReopen?V(a,!1,!0,!0):e.noRoom=!1:oa(a,e.wasOpen,!0,!0))):e.noRoom||(e.noRoom=!0,e.wasOpen=!e.isClosed&&!e.isSliding,b.closable?P(a,!0,!0):va(a,!0)))},ya=function(a,b,c){var d=q[a],e=d.resizeWhileDragging&&!l.isLayoutBusy;d.autoResize=!1;fa(a,b,c,e)},fa=function(a,b,c,d){var e=q[a],h=n[a],g=
w[a],k=D[a],m=l[a].side.toLowerCase(),s="inset"+l[a].side,u=l.isLayoutBusy&&!e.triggerEventsWhileDragging,r;R(a);r=h.size;b=W(a,b);b=B(b,W(a,e.minSize));b=Math.min(b,h.maxSize);if(b<h.minSize)Z(a,!1,c);else if(d||b!=r)!c&&n.initialized&&h.isVisible&&A(a,e.onresize_start),g.css(l[a].sizeType.toLowerCase(),B(1,Ra(a,b))),h.size=b,f.extend(h,ca(g)),k&&g.is(":visible")&&k.css(m,b+x[s]),ea(a),!c&&!u&&n.initialized&&h.isVisible&&(A(a,e.onresize_end||e.onresize),la(a)),c||(h.isSliding||Y("horz"==l[a].dir?
"all":"center",u,d),ja("all")),a=l.altSide[a],b<r&&n[a].noRoom&&(R(a),Z(a,!1,c))},Y=function(a,b,c){a&&"all"!=a||(a="east,west,center");f.each(a.split(","),function(a,e){if(w[e]){var h=q[e],g=n[e],k=w[e],m=!0,l={},m={top:Q("north",!0),bottom:Q("south",!0),left:Q("west",!0),right:Q("east",!0),width:0,height:0};m.width=x.innerWidth-m.left-m.right;m.height=x.innerHeight-m.bottom-m.top;m.top+=x.insetTop;m.bottom+=x.insetBottom;m.left+=x.insetLeft;m.right+=x.insetRight;f.extend(g,ca(k));if("center"==e){if(!c&&
g.isVisible&&m.width==g.outerWidth&&m.height==g.outerHeight)return!0;f.extend(g,ma(e),{maxWidth:m.width,maxHeight:m.height});l=m;l.width=M(e,m.width);l.height=N(e,m.height);m=0<l.width&&0<l.height;if(!m&&!n.initialized&&0<h.minWidth){var u=h.minWidth-g.outerWidth,r=q.east.minSize||0,s=q.west.minSize||0,t=n.east.size,v=n.west.size,y=t,z=v;0<u&&n.east.isVisible&&t>r&&(y=B(t-r,t-u),u-=t-y);0<u&&n.west.isVisible&&v>s&&(z=B(v-s,v-u),u-=v-z);if(0==u){t!=r&&fa("east",y,!0);v!=s&&fa("west",z,!0);Y("center",
b,c);return}}}else{f.extend(g,ca(k),ma(e));if(!c&&!g.noVerticalRoom&&m.height==g.outerHeight)return!0;l.top=m.top;l.bottom=m.bottom;l.height=N(e,m.height);g.maxHeight=B(0,l.height);m=0<g.maxHeight;m||(g.noVerticalRoom=!0)}m?(!b&&n.initialized&&A(e,h.onresize_start),k.css(l),f.extend(g,ca(k)),g.noRoom&&Z(e),n.initialized&&ea(e)):!g.noRoom&&g.isVisible&&Z(e);"center"==e&&(k=n.browser,k=k.isIE6||k.msie&&!k.boxModel,w.north&&(k||"IFRAME"==n.north.tagName)&&w.north.css("width",M(w.north,x.innerWidth)),
w.south&&(k||"IFRAME"==n.south.tagName)&&w.south.css("width",M(w.south,x.innerWidth)));!b&&n.initialized&&g.isVisible&&(A(e,h.onresize_end||h.onresize),la(e))}})},na=function(){f.extend(n.container,ca(F));if(x.outerHeight){if(!1===A(null,q.onresizeall_start))return!1;var a,b,c;f.each(["south","north","east","west"],function(a,e){w[e]&&(c=n[e],b=q[e],b.autoResize&&c.size!=b.size?fa(e,b.size,!0,!0):(R(e),Z(e,!1,!0,!0)))});Y("all",!0,!0);ja("all");b=q;f.each(l.allPanes.split(","),function(c,e){if(a=
w[e])n[e].isVisible&&A(e,b[e].onresize_end||b[e].onresize),la(e)});A(null,b.onresizeall_end||b.onresizeall)}},la=function(a){var b=w[a],c=X[a];q[a].resizeNestedLayout&&(b.data("layoutContainer")?b.layout().resizeAll():c&&c.data("layoutContainer")&&c.layout().resizeAll())},ea=function(a,b){a&&"all"!=a||(a=l.allPanes);f.each(a.split(","),function(a,d){function e(a){return B(r.css.paddingBottom,parseInt(a.css("marginBottom"),10)||0)}function f(){var a=q[d].contentIgnoreSelector,a=k.nextAll().not(a||
":lt(0)"),b=a.filter(":visible"),c=b.filter(":last");u={top:k[0].offsetTop,height:k.outerHeight(),numFooters:a.length,hiddenFooters:a.length-b.length,spaceBelow:0};u.spaceAbove=u.top;u.bottom=u.top+u.height;u.spaceBelow=c.length?c[0].offsetTop+c.outerHeight()-u.bottom+e(c):e(k)}var g=w[d],k=X[d],h=q[d],r=n[d],u=r.content;if(!g||!k||!g.is(":visible"))return!0;if(!1!==A(null,h.onsizecontent_start)){if(!l.isLayoutBusy||void 0==u.top||b||h.resizeContentWhileDragging)f(),0<u.hiddenFooters&&"hidden"==g.css("overflow")&&
(g.css("overflow","visible"),f(),g.css("overflow","hidden"));g=r.innerHeight-(u.spaceAbove-r.css.paddingTop)-(u.spaceBelow-r.css.paddingBottom);k.is(":visible")&&u.height==g||(Sa(k,g,!0),u.height=g);n.initialized&&(A(d,h.onsizecontent_end||h.onsizecontent),la(d))}})},ja=function(a){a&&"all"!=a||(a=l.borderPanes);f.each(a.split(","),function(a,c){var d=q[c],e=n[c],h=w[c],g=D[c],k=H[c],m;if(h&&g){var r=l[c].dir,u=e.isClosed?"_closed":"_open",s=d["spacing"+u],t=d["togglerAlign"+u],u=d["togglerLength"+
u],v;if(0==s)g.hide();else{e.noRoom||e.isHidden||g.show();"horz"==r?(v=h.outerWidth(),e.resizerLength=v,g.css({width:B(1,M(g,v)),height:B(0,N(g,s)),left:ba(h,"left")})):(v=h.outerHeight(),e.resizerLength=v,g.css({height:B(1,N(g,v)),width:B(0,M(g,s)),top:x.insetTop+Q("north",!0)}));S(d,g);if(k){if(0==u||e.isSliding&&d.hideTogglerOnSlide){k.hide();return}k.show();if(!(0<u)||"100%"==u||u>v)u=v,t=0;else if(L(t))switch(t){case "top":case "left":t=0;break;case "bottom":case "right":t=v-u;break;default:t=
Math.floor((v-u)/2)}else e=parseInt(t,10),t=0<=t?e:v-u+e;if("horz"==r){var y=M(k,u);k.css({width:B(0,y),height:B(1,N(k,s)),left:t,top:0});k.children(".content").each(function(){m=f(this);m.css("marginLeft",Math.floor((y-m.outerWidth())/2))})}else{var z=N(k,u);k.css({height:B(0,z),width:B(1,M(k,s)),top:t,left:0});k.children(".content").each(function(){m=f(this);m.css("marginTop",Math.floor((z-m.outerHeight())/2))})}S(0,k)}!n.initialized&&d.initHidden&&(g.hide(),k&&k.hide())}}})},F=f(this).eq(0);if(!F.length)return null;
if(F.data("layoutContainer"))return f.extend({},window[F.data("layoutContainer")]);var w={},X={},D={},H={},x=n.container,E=n.id;(function(){Wa();var a=q;if(!1===A(null,a.onload))return!1;if(!Ma("center").length)return alert(C.errCenterPaneMissing),null;a.useStateCookie&&a.cookie.autoLoad&&Ca();n.browser={mozilla:f.browser.mozilla,webkit:f.browser.webkit||f.browser.safari,msie:f.browser.msie,isIE6:f.browser.msie&&6==f.browser.version,boxModel:f.support.boxModel};var b=F,c=x.tagName=f.prop?b.prop("tagName"):
b.attr("tagName"),d="BODY"==c,e={};x.selector=b.selector.split(".slice")[0];x.ref=c+"/"+x.selector;b.data("layoutContainer",E).data("layoutName",q.name);b.data("layoutCSS")||(d?(e=f.extend(ta(b,"position,margin,padding,border"),{height:b.css("height"),overflow:b.css("overflow"),overflowX:b.css("overflowX"),overflowY:b.css("overflowY")}),c=f("html"),c.data("layoutCSS",{height:"auto",overflow:c.css("overflow"),overflowX:c.css("overflowX"),overflowY:c.css("overflowY")})):e=ta(b,"position,margin,padding,border,top,bottom,left,right,width,height,overflow,overflowX,overflowY"),
b.data("layoutCSS",e));try{if(d)f("html").css({height:"100%",overflow:"hidden",overflowX:"hidden",overflowY:"hidden"}),f("body").css({position:"relative",height:"100%",overflow:"hidden",overflowX:"hidden",overflowY:"hidden",margin:0,padding:0,border:"none"});else{var e={overflow:"hidden"},h=b.css("position");b.css("height");b.data("layoutRole")||h&&h.match(/fixed|absolute|relative/)||(e.position="relative");b.css(e);b.is(":visible")&&2>b.innerHeight()&&alert(C.errContainerHeight.replace(/CONTAINER/,
x.ref))}}catch(g){}f.extend(n.container,ca(b));Xa();ea();a.scrollToBookmarkOnLoad&&(b=self.location,b.hash&&b.replace(b.hash));a.autoBindCustomButtons&&Za();Va();a.resizeWithWindow&&!F.data("layoutRole")&&f(window).bind("resize."+E,Ua);f(window).bind("unload."+E,La);n.initialized=!0})();var Ga={options:q,state:n,container:F,panes:w,contents:X,resizers:D,togglers:H,toggle:da,hide:va,show:oa,open:V,close:P,slideOpen:Pa,slideClose:za,slideToggle:function(a){da(a,!0)},initContent:Na,sizeContent:ea,sizePane:ya,
swapPanes:function(a,b){function c(a){var b=w[a],c=X[a];return b?{pane:a,P:b?b[0]:!1,C:c?c[0]:!1,state:f.extend({},n[a]),options:f.extend({},q[a])}:!1}function d(a,b){if(a){var c=a.P,d=a.C,e=a.pane,h=l[b],p=h.side.toLowerCase(),r="inset"+h.side,s=f.extend({},n[b]),t=q[b],v={resizerCursor:t.resizerCursor};f.each(["fxName","fxSpeed","fxSettings"],function(a,b){v[b]=t[b];v[b+"_open"]=t[b+"_open"];v[b+"_close"]=t[b+"_close"]});w[b]=f(c).data("layoutEdge",b).css(l.hidden).css(h.cssReq);X[b]=d?f(d):!1;
q[b]=f.extend({},a.options,v);n[b]=f.extend({},a.state);c.className=c.className.replace(RegExp(t.paneClass+"-"+e,"g"),t.paneClass+"-"+b);Oa(b);h.dir!=l[e].dir?(c=g[b]||0,R(b),c=B(c,n[b].minSize),ya(b,c,!0)):D[b].css(p,x[r]+(n[b].isVisible?Q(b):0));a.state.isVisible&&!s.isVisible?wa(b,!0):(xa(b),ia(b,!0));a=null}}n[a].edge=b;n[b].edge=a;var e=!1;!1===A(a,q[a].onswap_start)&&(e=!0);e||!1!==A(b,q[b].onswap_start)||(e=!0);if(e)n[a].edge=a,n[b].edge=b;else{var e=c(a),h=c(b),g={};g[a]=e?e.state.size:0;
g[b]=h?h.state.size:0;w[a]=!1;w[b]=!1;n[a]={};n[b]={};H[a]&&H[a].remove();H[b]&&H[b].remove();D[a]&&D[a].remove();D[b]&&D[b].remove();D[a]=D[b]=H[a]=H[b]=!1;d(e,b);d(h,a);e=h=g=null;w[a]&&w[a].css(l.visible);w[b]&&w[b].css(l.visible);na();A(a,q[a].onswap_end||q[a].onswap);A(b,q[b].onswap_end||q[b].onswap)}},resizeAll:na,destroy:function(){f(window).unbind("."+E);f(document).unbind("."+E);window[E]=null;var a="BODY"==x.tagName,b,c,d,e;f.each(l.allPanes.split(","),function(a,g){b=w[g];if(!b)return!0;
"center"!=g&&(H[g]&&H[g].remove(),D[g].remove());c=q[g].paneClass;d=c+"-"+g;e=[c,c+"-open",c+"-closed",c+"-sliding",d,d+"-open",d+"-closed",d+"-sliding"];f.merge(e,ua(b,!0));b.removeClass(e.join(" ")).removeData("layoutRole").removeData("layoutEdge").unbind("."+E).unbind("mouseenter").unbind("mouseleave");b.data("layoutContainer")||b.css(b.data("layoutCSS"))});F.removeData("layoutContainer");F.data("layoutEdge")||F.css(F.data("layoutCSS"));a&&f("html").css(f("html").data("layoutCSS"));La();(a=q.name)&&
window[a]&&(window[a]=null)},setSizeLimits:R,bindButton:K,addToggleBtn:y,addOpenBtn:z,addCloseBtn:J,addPinBtn:O,allowOverflow:r,resetOverflow:t,encodeJSON:Ba,decodeJSON:Aa,getState:ra,getCookie:aa,saveCookie:qa,deleteCookie:function(){qa("",{expires:-1})},loadCookie:Ca,loadState:Da,cssWidth:M,cssHeight:N};return window[E]=Ga}})(jQuery);
var layoutState={options:{layoutName:"mywebsql",keys:"north__size,south__size,east__size,west__size,north__isClosed,south__isClosed,east__isClosed,west__isClosed,north__isHidden,south__isHidden,east__isHidden,west__isHidden",domain:"",path:"",expires:"60",secure:!1},data:{},clear:function(f){this.save(f,"layout",{expires:-1})},save:function(f,v,h){h=jQuery.extend({},this.options,h||{});var s=window[f||h.layoutName];v||(v=h.keys);"string"==typeof v&&(v=v.split(","));if(!s||!s.state||!v.length)return!1;
var r="number"==typeof h.expires,t=new Date,I="",K=!1;if(r||h.expires.toUTCString)r?0>=h.expires?(t.setYear(1970),K=!0):t.setTime(t.getTime()+864E5*h.expires):t=h.expires,I+=";expires="+t.toUTCString();h.path&&(I+=";path="+h.path);h.domain&&(I+=";domain="+h.domain);h.secure&&(I+=";secure");if(K)this.data={},$.cookies.set(f||h.layoutName,I,{path:EXTERNAL_PATH,hoursToLive:COOKIE_LIFETIME});else{for(var s=s.state,r={},t={isClosed:"initClosed",isHidden:"initHidden"},K=0<v[0].indexOf("__")?"__":".",y,
z,J,O=0;O<v.length;O++)y=v[O].split(K),z=y[0],y=y[1],0>"north,south,east,west,center".indexOf(z)||(J="isClosed"==y?s[z][y]||s[z].isSliding:s[z][y],void 0!=J&&("."==K?(r[z]||(r[z]={}),r[z][t[y]?t[y]:y]=J):r[z+K+(t[y]?t[y]:y)]=J));this.data=r;$.cookies.set(f||h.layoutName,encodeURIComponent(JSON.stringify(this.data))+I,{path:EXTERNAL_PATH,hoursToLive:COOKIE_LIFETIME})}return this.data},load:function(f){f||(f=this.options.layoutName);if(!f)return{};var v={};(ck=$.cookies.get(f))&&(v=JSON.parse(decodeURIComponent(ck)));
return this.data=v}};
