$(document).ready(function(){

//the listed code

$(".roll").hover(
function() {
curr = $(this).find("img").attr("src");
over = curr.replace(/-off\./, '-on.');
$(this).find("img").attr({ src: over});
},
function() {
$(this).find("img").attr({ src: curr});
}
)

$(".roll").find("img").each(function(i) {
temp = this.src;
pre = temp.replace(/-off\./, '-on.');
preload_image_object = new Image();
preload_image_object.src = pre;
});

//the listed code

}); 
