Options for CLOSE Event on jQuery modal dialog box

Hi ,

jQuery question from a noob…

This event is triggered when the dialog is closed.
Code examples

Supply a callback function to handle the close event as an init option.

    $( ".selector" ).dialog({
       close: function(event, ui) { ... }

Bind to the close event by type: dialogclose.

    $( ".selector" ).bind( "dialogclose", function(event, ui) {

On this page in the jQuery UI Events tab, I want to have the dialog box close as a fade after about 5 seconds. I don’t know how to code this.

My user inputs their email address in a textbox and clicks submit button. The jQuery dialog (modal) box opens confirming the submission and thanking the person for signing up. After about 5 seconds, the dialog box fades out and the page refreshes (like posting back to itself) with an empty textbox.

Here’s the HTML:

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">

<script src="/ui/library/formSubscribe.js" language="javascript"></script>
<script src="js/jquery.modalbox-1.2.1-min.js"></script>
<script type="text/javascript" language="javascript">
$(document).ready(function() {
    $( "#confirm_thanks" ).dialog({ modal: true });

<body vlink="" alink="" link="" bgcolor="">
<table border="0" cellspacing="0" cellpadding="5">
<form name="form" method="post" action="">
<td valign="top"><span style="color:#CC0000">*</span></td><td valign="top" align="left">Email:
                  </td><td><input type="hidden" name="EMAIL_REQUIRED" value="T"><input type="hidden" name="EMAIL_DATATYPE" value="email"><input type="text" name="EMAIL" value="" maxlength="4000"></td>
<td align="center" colspan="3"><input id="confirm_thanks" type="button" name="submit" value="Submit" onClick="f_validateEmail()"></td>