var rollover_orig;

function setupRollovers()
{
  // Implement rollovers b1.gif -> b1a.gif
  // Preload all rollovers
  $('.fright a img').each(function() {
    // Set the original src
    var rollsrc, rollON;
    rollsrc = $(this).attr("src");
    rollON = rollsrc.replace(/\.gif$/ig,"a.gif");
    $("<img>").attr("src", rollON);
  });
  $('.fright a').mouseover(function() {
      var matches, imgsrcON;
      rollover_orig = $(this).children("img").attr("src");
      matches = rollover_orig.match(/a\./);
      if (!matches) {
        imgsrcON = rollover_orig.replace(/\.gif$/ig,"a.gif");
        $(this).children("img").attr("src", imgsrcON);
      }
    });
  $('.fright a').mouseout(function(){
    $(this).children("img").attr("src", rollover_orig);
  });
}
