$(document).ready(function() {
	jQuery('ul.sf-menu').superfish(); 
  $("#masthead img").each(function() {
    rollsrc = $(this).attr("src");
    rollON = rollsrc.replace(/.jpg$/ig,"Over.jpg");
    $("<img>").attr("src", rollON);
  });
  $("#masthead a").mouseover(function(){
    imgsrc = $(this).children("img").attr("src");
    if (imgsrc) {
      matches = imgsrc.match(/Over/);
    }
    else {
      matches = true;
    }
    if (!matches) {
      imgsrcON = imgsrc.replace(/.jpg$/ig,"Over.jpg"); // strip off extension
      $(this).children("img").attr("src", imgsrcON);
    }
  });
  $("#masthead a").mouseout(function(){
    $(this).children("img").attr("src", imgsrc);
  });
});