title: Dialog close event not firing
body: <p>This is not working like I expect it:</p>
  
  <pre><code>$("#generalContactWindow").dialog({
      autoOpen: false,
      draggable: true,
      width: 600, height: 'auto',
      closeOnEscape: true,
      modal: true,
      resizable: false,
      close: function(event, ui) {
          _gaq.push(['_trackEvent', 'DetailsGeneralForm', 'HideForm', document.location.href]); 
          console.log('_trackEvent DetailsGeneralForm HideForm called');
      }
  });
  </code></pre>
  
  <p>The part with <code>_gaq.push(['_trackEvent', 'DetailsGeneralForm', 'HideForm', document.location.href]);</code> will never happen if I click on the close button or press escape key.</p>
  
  <p>The close link looks like this:</p>
  
  <pre><code>&lt;a class="ui-dialog-titlebar-close" href="#" unselectable="on" style="-moz-user-select: none;"&gt;&lt;span unselectable="on" style="-moz-user-select: none;"&gt;X&lt;/span&gt;&lt;/a&gt;
  </code></pre>
  
  <p>I think this is the standard.</p>
  
  <p>Reason for all this is that I need to track the opening and the closing of the dialog.
  I can track the opening quite well, but just not the closing. What should I do?</p>
  
  <p>Thanks in advance!</p>