Hide Email with JavaScript - MooTools

HTML

<span class=mail>info at domain dot com</span>

MooTools

$(document.body).getElements(.mail).each(function(el) {
var spt = el.get(text);
var at = / at /;
var dot = / dot /g;
var addr = spt.replace(at,'@').replace(dot,'.');
el.set(html,'<a href='mailto:+addr+' title=+addr+>'+ addr +</a>);
});