image preloading -- advice neeed

image preloading -- advice neeed

Hi,
I have a page which features fifty small ( < 10KB) images. They need to all be available to a script which makes them visible according to class.

Any recommendations about jQ plugins, or the best way?...
maybe this, in the head of the page?

$(window).load( function(){
    $.preloadImages = function() {
      for (var i = 0; i < arguments.length; i++) {  $("<img />").attr("src", arguments[i]); }

    $.preloadImages("folder1/img1.jpg",// "folder1/img50.jpg");
    };
});