$(document).ready(function() 
{ 
    $('.Obfuscated').each(deObfuscateEmail);
    $('.mailbutton').each(deObfuscateEmailButton);
}); 

function deObfuscateEmail(i) 
{ 
    /* 
        get the text and replace 
    */ 
    var content = $(this).text().replace(/ AT /g, '@').replace(/ DOT /g, '.'); 
    
    /* 
        replace span with a link 
    */ 
    $(this).replaceWith($('<a href="mailto:'+content+'" title="contact by email">'+content+'</a>')); 
}

function deObfuscateEmailButton(i) 
{ 
    /* 
        get the text and replace 
    */ 
    var content = $(this).attr('href').replace(/ AT /g, '@').replace(/ DOT /g, '.'); 
    /* 
        replace span with a link 
    */ 
    $(this).attr('href', 'mailto:'+content); 
}
