title: JQuery UI dialog with destroy option and return to initial state
body: <p>I have a trouble with JQuery Dialog.</p>
  
  <p>I have this code : (initially is a simple DIV before clicking on second button called Maximize)</p>
  
  <p><a href="http://pastebin.com/BnpZ1AMA" rel="nofollow">http://pastebin.com/BnpZ1AMA</a></p>
  
  <p>After clicking "Maximize", the visible div becomes dialog.
  But when I want to return to div (initial state),it doesn't appear anymore on screen. In documentation,there say "Remove the dialog functionality completely. This will return the element back to its pre-init state."</p>
  
  <p>I have javascript code :</p>
  
  <pre><code>           function makeit(data,maximize,minimize)
              {
                  $(data).dialog();
                  $(maximize).hide();
                  $(minimize).show();
              }
  
              function remakeit(data,maximize,minimize)
              {
                  $(data).dialog("destroy");
                  $(maximize).show();
                  $(minimize).hide();
              }
  </code></pre>
  
  <p>Is "destroy" good option or what need I to change back to DIV element ?</p>
  
  <p>Thank you</p>