$(document).ready(function() {
    $('h2.img').each(function() {
      string = $(this).text();
      filename = string.toLowerCase().replace(/ /g, '-').replace(/([^0-9a-z-])/g,'');
      $(this).html('<img src="/images/' + filename + '.png" alt="' + string + '" />');
    });
});