Close a div after posting form
<p>This is probably a very easy one to answer but still getting my head around structuring functions and bits in jQuery (and jquerytools). I've managed to parse the form and receive an email from the script but instead of displaying an alert box I would like to display another small div with a thank you message for X number of seconds before it closes the divs, clears the form and goes back to the main page.</p>

<p>Here's the code I'm running:</p>

<pre><code>&lt;script&gt; 
jQuery(document).ready(function() {
  jQuery ("a[rel]").overlay({mask: {color: '#000', loadSpeed: 200,opacity: 0.5}, top: '25%',} );
            jQuery('#form').ajaxForm(function() { 
                alert("Thank you for your comment!"); 
            }); 

});
&lt;/script&gt;

&lt;div class="home-block"&gt;
  &lt;div class="home-block-content"&gt;
    &lt;div class="home-block-col1"&gt;
      &lt;h2&gt;call us&lt;/h2&gt;
      why not call our friendly designers or let us call you... &lt;span class="callus"&gt;0845 6808107&lt;/span&gt;&lt;br&gt;
      &lt;a href="#" rel="#callback" class="simpledialog"&gt;request a call back&lt;/a&gt;&lt;/div&gt;
    &lt;div class="home-block-col2"&gt;&lt;a href="#" rel="#callback" class="simpledialog"&gt;&lt;img src="{{skin url=""}}images/media/callus.png" border="0" alt="call us"  /&gt;&lt;/a&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="clear-block"&gt;&lt;br&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;div class="simple_overlay" id="callback"&gt; Please enter your details and we will call you back...&lt;br /&gt;
  &lt;br /&gt;
  &lt;form id="form" name="form" method="post" action="{{skin url=""}}forms/callbackscript.php"&gt;
    &lt;div class="callback-label"&gt;Name:&lt;/div&gt;
    &lt;div class="callback-field"&gt;
    &lt;input name="name" type="text" size="25" class="callback-input"&gt;&lt;/div&gt;&lt;div class="clear-block"&gt;&lt;/div&gt;
    &lt;div class="callback-label"&gt;Phone Number:&lt;/div&gt;
    &lt;div class="callback-field"&gt;
    &lt;input name="phone" type="text" size="25" class="callback-input"&gt;&lt;/div&gt;&lt;div class="clear-block"&gt;&lt;/div&gt;
    &lt;div class="callback-label"&gt;Callback time*:&lt;/div&gt;
    &lt;div class="callback-field"&gt;
    &lt;select name="howsoon" class="callback-select"&gt;
    &lt;option value="ASAP"&gt;As soon as possible&lt;/option&gt;
    &lt;option value="AM"&gt;AM&lt;/option&gt;
    &lt;option value="PM"&gt;PM&lt;/option&gt;
    &lt;/select&gt;&lt;/div&gt;&lt;div class="clear-block"&gt;&lt;/div&gt;
    &lt;div class="callback-label"&gt;Your Question:&lt;/div&gt;
    &lt;div class="callback-field"&gt;
      &lt;textarea name="question" cols="27" rows="3" class="callback-input"&gt;&lt;/textarea&gt;&lt;div class="clear-block"&gt;&lt;/div&gt;
    &lt;/div&gt;
&lt;div class="callback-label"&gt;&lt;/div&gt;&lt;div class="callback-field"&gt;
&lt;input type="submit" name="Submit" value="Submit" /&gt;
  &lt;/form&gt;&lt;/div&gt;&lt;div class="clear-block"&gt;&lt;/div&gt;
&lt;div class="note"&gt;*Please note we can only call back between the hours of 8-5 Monday-Friday and 9-1 on Saturday&lt;/div&gt;
&lt;div class="clear-block"&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>
