title: How to recall a function with Jquery in this example?
body: <p>How to recall a function and have the 
  dialog box keep coming back when click 'cancel' button with Jquery in this example?
  I am sure it is easy but still learning some of the basics here.
  Thanks</p>
  
  <pre><code>function definitelyClose() {
      window.location = 'http://www.google.com'
  };
  var autoCloseTimer;
  var timeoutObject;
  var timePeriod = 5000;
  var warnPeriod = 10000;
  $(document).ready(function() {
      $('#proba').dialog({
          autoOpen: false
      });
      setTimeout(function() {
          $('#proba').attr('title', 'Warning').text('Sesion will expire').dialog('open');
          $('#proba').dialog({
              buttons: {
                  'Cancel': function() {
                      $(this).dialog('close');
                      clearTimeout(autoCloseTimer);
                  }
              }
          });
          autoCloseTimer = setTimeout('definitelyClose()', warnPeriod);
      }, timePeriod);
  });​
  </code></pre>