One thing to note that is not included in the example that Ryan posted is that you could also pre load the images with
css.
In your
CSS something like:
#fooPreLoad {
height:0;
overflow:hidden;
background: url("foo.jpg") top left no-repeat;
display:none !important;
}
then the images will be loaded before the page loads fully thus cached thus out of the way.
in your
HTML put:
<div id="fooPreLoad"> </div>