title: How to Minimize/Maximize  jQuery Dialog?
body: <p>I am using <a href="http://jqueryui.com/docs/dialog/">jQuery UI Dialog</a>  to show a video. The video is working fine.</p>
  
  <p>What I want to do is minimize the Dialog-element just like in an OS or something like that. A small icon like (" - ") that would minimize my dialog and when I press (*) it would close the dialog but keep the video running in the background.</p>
  
  <p>Here's my code</p>
  
  <pre><code>//Watch Video
  
  $(".watchVideo").live('click',function(){
      if($('div.ui-dialog').length){
          $('div.ui-dialog').remove();
      }
  
      var path  = $(this).attr('rel');
      var title = $(this).attr('title');
  
      var $dialog = $('&lt;div&gt;', {
          title: translator['Watch Video']
      }).dialog({
          autoOpen: false,
          modal: true,
          width: 600,
          height: 500
      });
  
      var tab = '&lt;table  style="margin: 10px 10%;"&gt;&lt;tr&gt;&lt;td&gt;&lt;object id="MediaPlayer1" width="500" height="400" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft® Windows® Media Player components..." type="application/x-oleobject" align="middle"&gt;&lt;param name="'+title+'" value="'+path+'"&gt; &lt;param name="ShowStatusBar" value="True"&gt;  &lt;param name="DefaultFrame" value="mainFrame"&gt; &lt;param name="autostart" value="false"&gt;  &lt;embed type="application/x-mplayer2"  pluginspage = "http://www.microsoft.com/Windows/MediaPlayer/"  src="'+path+'"   autostart="false"  align="middle" width="500"    height="300"   defaultframe="rightFrame"  showstatusbar="true"&gt; &lt;/embed&gt;&lt;/object&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;';
  
      $('&lt;div id="updateContent"&gt;').html(tab).appendTo($dialog);
      $dialog.dialog('open');
      return false;
  
  });
  </code></pre>
  
  <p>where  var tab is equal to</p>
  
  <pre><code>&lt;object id="MediaPlayer1" width="500" height="400"
  classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
  codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
  standby="Loading Microsoft® Windows® Media Player components..."
  type="application/x-oleobject" align="middle"&gt;
      &lt;param name="FileName" value="YourFilesName.mpeg"&gt;
      &lt;param name="ShowStatusBar" value="True"&gt;
      &lt;param name="DefaultFrame" value="mainFrame"&gt;
      &lt;param name="autostart" value="false"&gt;
      &lt;embed type="application/x-mplayer2"
       pluginspage = "http://www.microsoft.com/Windows/MediaPlayer/"
       src="YourFilesName.mpeg"
       autostart="false"
       align="middle"
       width="500"
      height="300"
      defaultframe="rightFrame"
      showstatusbar="true"&gt;
   &lt;/embed&gt;
  </code></pre>
  
  <p></p>