title: jQuery UI Delay not work
body: <p>why the delay doesn't work in this code?</p>
  
  <pre><code>$(function() {
      $( "#button" ).click(function() {
          $("#dialog").dialog({
                show: { effect: 'fade', direction: "up" },
                hide: { effect: 'fade', direction: "down" },
           }).delay(1000).dialog( "close" );
           return false;
      });
  
   });
  </code></pre>
  
  <p>Thank you!</p>