(function($) {
	var cache = $('<div />').attr('id','cacher').css({'display':'none'});
	// Arguments are image paths relative to the current page.
	$.preLoadImages = function( json , indx ) {
		$.each(json, function(i){
			$('<img />')
				.attr( 'src' , json[i][indx] )
				.load(function(){
			        cache.append( $(this) );  
			    });
		});
	};
})(jQuery);
