//
// jquery.image-preload.js
//
// jQuery plugin to preload images.
//
// Author: Johannes Marbach
//
// Copyright (c) 2009, rapidrabbit GbR.
// All rights reserved.
//

(function($) {
    
    /// Preloads images from a given list of locations.
    $.image_preload = function() {
        for (var i = 0; i < arguments.length; ++i) {
            var img = $('<img src="' + arguments[i] + '"/>');
            if ($.image_preload.cache) $.image_preload.cache.push(img);
        }
    }
    
    /// IE needs a cache for image objects.
    if (navigator.appName == 'Microsoft Internet Explorer')
        $.image_preload.cache = new Array();
    
})(jQuery);
