var preLoadImg = new Object();

function initRollOvers(){
	$("img.rollover").each(function(){
		var imgSrc = this.src;
		if (imgSrc.lastIndexOf('_on') == -1) {
			var sep = imgSrc.lastIndexOf('.');
			var onSrc = imgSrc.substr(0, sep) + '_on' + imgSrc.substr(sep, 4);
			preLoadImg[imgSrc] = new Image();
			preLoadImg[imgSrc].src = onSrc;
			$(this).hover(
				function() { this.src = onSrc; },
				function() { this.src = imgSrc; }
			);
		}
	});
}
$(function(){
	initRollOvers();
});
