(function($) {
  var cache = [];
  // Arguments are image paths relative to the current page.
  $.preLoadImages = function() {
    var args_len = arguments.length;
    for (var i = args_len; i--;) {
      var cacheImage = document.createElement('img');
      cacheImage.src = arguments[i];
      cache.push(cacheImage);
    }
  }
})(jQuery)

$(document).ready(function(){
	$('img.rolloverimg').each(function(){
		jQuery.preLoadImages($(this).attr("src").replace('_start','_rollover'));
		$(this).hover(
			function() {
				$(this).attr("src",$(this).attr("src").replace('_start','_rollover'));
				}, 
			function() {
				$(this).attr("src",$(this).attr("src").replace('_rollover','_start'));
				}
			);
		});
});