Preload in the background?

Preload in the background?

Hi,

I am adding a few images to my page like this:

  1. $('body').append('<div id="galleryContainer" class="galleryContainer"></div>');
    var galleryContainer = $('#galleryContainer');   


  2. var imageCount = imageArray.length; //imageArray is a array which contains the URLs to the images
  3.     for(i = 0; i < imageCount ;i++)
  4.     {
  5.         $("<img/>").attr("src", imageArray[i]).appendTo(galleryContainer);
  6.     }     
this work, but I want to do this in the background. That means, I want to show my page and then, if all images are loaded, I want to show 'galleryContainer'.
Right now, the whole page is loaded and then shown....

Maybe someone has a little tip for me?!

Thanks, Alex