More problems with settimeout

More problems with settimeout

Hello,

I just cant seem to understand how this settimeout function works.

 $("#mapwindow").dialog({                            
  autoOpen: false,                                  
  modal: true,                                      
  show: 'slide',                                    
  hide: 'slide',                                    
  height: 400,                                      
  width: 500,                                       
  buttons: {                                        
      Close: function() {                           
       $( this ).dialog( "close" );                 
      }                                             
     }                                              
}); //dialog              

setTimeout(function() {   
$('#mapwindow').dialog( "open" );                          
},5000);                 

But it is executing the function without any delay.

What the heck am I doing wrong