dojo.addOnLoad(function(){
	/**********************************************************
	 *                   EXTENSÃO DAS CLASSES                 *
	 **********************************************************/

	dijit.Dialog.prototype.show = function() {
	    if (this.open) {
	        return;
	    }
	    if (!this._alreadyInitialized) {
	        this._setup();
	        this._alreadyInitialized = true;
	    }
	    if (this._fadeOut.status() == "playing") {
	        this._fadeOut.stop();
	    }
	    this._modalconnects.push(dojo.connect(window, "onscroll", this, "layout"));
	    this._modalconnects.push(dojo.connect(dojo.doc.documentElement, "onkeypress", this, "_onKey"));
	    dojo.style(this.domNode, "opacity", 0);
	    this.domNode.style.visibility = "";
	    this.open = true;
	    this._loadCheck();
	    this._position();
	    this._fadeIn.play();
	    this._savedFocus = dijit.getFocus(this);
	    this._getFocusItems(this.domNode);
	    setTimeout(dojo.hitch(this, function () {dijit.focus(this._firstFocusItem);}), 50);

        if( this._moveable ){
        	this._moveable.destroy();
            this._moveable = new dojo.dnd.move.boxConstrainedMoveable(this.domNode, {
		        	handle: this.titleBar,
		        	box: dijit.getViewport(),
		        	within: true
            	}
            );
        }
	}
});

/*
 * Requires do Dojo
 */
dojo.require("dijit.Dialog");