Wait for everything to load before showing
<p>I'm wondering if this is a good way to make sure all the images etc are loaded before the #main div is displayed?</p>

<p>In the #main div I have to load 97 images, and sometimes it isn't fast enough so it shows squares before displaying the image.</p>

<pre><code>$(document).ready(function(){
    $('#main').hide();
    $(window).load(function(){
        $('#main').show();
    });
});
</code></pre>

<p>Can someone give me some good advice?</p>
