jQuery delay question
<p>I have a form which pops up in an overlay for a simple call back but trying to get it to function properly.</p>

<p>What I want is for it to display a small thankyou (speak to you soon) message before the overlay closes and fades out.</p>

<p>I've kind of got it working but there is no delay and the overlay doesn't fade out.</p>

<p>Here's the code:</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() { 
            jQuery("#message").html("Speak to you soon!"); //see footnote 
            jQuery("#callback").hide("blind",null, 10000,function(){
                setTimeout(close_message,10000);
            });
        }); 
    });

    function close_message() {
        jQuery('#message').hide("blind",null,1000,function(){
           window.location("&lt;url to the home page&gt;");//see footnote 2
         });
    }
&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;0844 8707026&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;div id="message"&gt;&lt;/div&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>
