$(function() {
  $('span.email').each(function() {
    $(this).wrap("<a></a>");
    var address = $(this).text().replace(" at ", "@");
    $(this).parent().attr('href', 'mailto:' + address);
    if ($(this).hasClass('hide_address')) {
      $(this).text('Email');
    } else {
      $(this).text(address);
    }
  });
});

