title: Ajaxed div hide and show hides only after div load
body: <p>I have this issue. I'm working on a jquery ajaxed site. I have the main content div in the middle and on top the navigation. I need to AJAX the content, because I have flash backgound so that the flash video won't start from beginning after every page load. The only way I was able to do this was with this sort of code:</p>
  
  <pre><code>$(document).ready(function(){
  
  
  $.ajaxSetup ({  
           cache: false  
           }); 
  
  //For loading
       var ajax_load = "&lt;img src='img/load.gif' alt='loading...' /&gt;&lt;p&gt;";  
  
   //  Var
      var loadPage1 = "page1.html";
  
  //  Load page
      $("#page1").click(function(){
              $("#content").hide(2000);
              $("#content").html(ajax_load).load(loadPage1);
              $("#content").show(2000);
  });
  </code></pre>
  
  <p>All other ways to get the div didn't work because there was issues on getting plugins etc. working in the ajaxed div (content).</p>
  
  <p>So... everythig is working fine - but, the div loads it's content from page1.html and shows it and only after this does it hide it and show it. So it loads the page and then does the effects I want to.</p>
  
  <p>Do I need to queue this some how or what's the proper jquery way? I tried delay, stop etc.. but can't seem to solve this out. It's propably very simple.</p>
  
  <p>Thanks.</p>