AUI.add("aui-overlay-mask",function(P){var F=P.Lang,I=F.isArray,J=F.isString,M=F.isNumber,U=F.isValue,Z=P.config,N=P.UA,R=(N.ie&&N.version.major<=6),Y="absolute",E="alignPoints",W="background",X="boundingBox",K="contentBox",T="fixed",Q="height",B="offsetHeight",G="offsetWidth",S="opacity",V="overlaymask",O="position",H="target",C="width";var D=P.Component.create({NAME:V,ATTRS:{alignPoints:{value:["tl","tl"],validator:I},background:{lazyAdd:false,value:null,validator:J,setter:function(A){if(A){this.get(K).setStyle(W,A);}return A;}},target:{cloneDefaultValue:false,lazyAdd:false,value:Z.doc,setter:function(L){var A=this;var c=P.one(L);var b=A._isDoc=c.compareTo(Z.doc);var a=A._isWin=c.compareTo(Z.win);A._fullPage=b||a;return c;}},opacity:{value:0.5,validator:M,setter:function(A){return this._setOpacity(A);}},shim:{value:P.UA.ie},visible:{value:false},zIndex:{value:1000}},EXTENDS:P.OverlayBase,prototype:{bindUI:function(){var A=this;D.superclass.bindUI.apply(this,arguments);A.after("targetChange",A._afterTargetChange);A.after("visibleChange",A._afterVisibleChange);P.on("windowresize",P.bind(A.refreshMask,A));},syncUI:function(){var A=this;A.refreshMask();},getTargetSize:function(){var L=this;var d=L.get(H);var b=L._isDoc;var a=L._isWin;var A=d.get(B);var c=d.get(G);if(R){if(a){c=P.DOM.winWidth();A=P.DOM.winHeight();}else{if(b){c=P.DOM.docWidth();A=P.DOM.docHeight();}}}else{if(L._fullPage){A="100%";c="100%";}}return{height:A,width:c};},refreshMask:function(){var L=this;var f=L.get(E);var e=L.get(H);var b=L.get(X);var d=L.getTargetSize();var a=L._fullPage;b.setStyles({position:(R||!a)?Y:T,left:0,top:0});var A=d.height;var c=d.width;if(U(A)){L.set(Q,A);}if(U(c)){L.set(C,c);}if(!a){L.align(e,f);}},_setOpacity:function(L){var A=this;A.get(K).setStyle(S,L);return L;},_uiSetVisible:function(L){var A=this;D.superclass._uiSetVisible.apply(this,arguments);if(L){A._setOpacity(A.get(S));}},_afterTargetChange:function(L){var A=this;A.refreshMask();},_afterVisibleChange:function(L){var A=this;A._uiSetVisible(L.newVal);},_uiSetXY:function(){var A=this;if(!A._fullPage||R){D.superclass._uiSetXY.apply(A,arguments);}}}});P.OverlayMask=D;},"1.0.1",{requires:["aui-base","aui-overlay-base","event-resize"],skinnable:true});