/**
 * @class Ext.FadeInWindow
 * @extends Ext.Window
 * @author Anna Fijol
*/
Ext.namespace('Ext.ux');
Ext.ux.FadeInWindow = Ext.extend(Ext.Window, {	
	initComponent : function(){
	    this.initTools();
	    Ext.ux.FadeInWindow.superclass.initComponent.call(this);
	},
    // private
    afterShow : function(isAnim){
    	this.proxy.hide();
        this.el.setStyle('display', 'block');
       // this.el.show();
        this.el.fadeIn({
           	 endOpacity: 1, //can be any value between 0 and 1 (e.g. .5)
           	 easing: 'backIn',
           	 duration: this.fadeInDuration});
        if(this.maximized){
            this.fitContainer();
        }
        if(Ext.isMac && Ext.isGecko2){ // work around stupid FF 2.0/Mac scroll bar bug
            this.cascade(this.setAutoScroll);
        }

        if(this.monitorResize || this.modal || this.constrain || this.constrainHeader){
            Ext.EventManager.onWindowResize(this.onWindowResize, this);
        }
        this.doConstrain();
        this.doLayout();
        if(this.keyMap){
            this.keyMap.enable();
        }
        this.toFront();
        this.updateHandles();
        if(isAnim && (Ext.isIE || Ext.isWebKit)){
            var sz = this.getSize();
            this.onResize(sz.width, sz.height);
        }
        this.onShow();
        this.fireEvent('show', this);
    }
})
