$(function() {
    $('img[src*="_off."]')
        .hover(function() {
            $(this).attr('src', $(this).attr('src').replace('_off.', '_on.'));
        }, function() {
            $(this).attr('src', $(this).attr('src').replace('_on.', '_off.'));
        })
        .each(function() {
            (new Image()).src = $(this).attr('src').replace('_off.', '_on.');
        })
    ;
});

