attachRollOverEvent = function(imageId) {
    $(imageId).mouseover(
    function() {
        $(this).attr("src", $(this).attr("src").split('_off').join('_on'))
    });
    $(imageId).mouseout(function() { $(this).attr("src", $(this).attr("src").split('_on').join('_off')) }
  );
}

$().ready(
  function() {
      attachRollOverEvent(".rollover");
  }
);