
function parseEmail() {
	// replace the " dot " and " at " words with the appropriate symbols
	var email = this.title.replace(/ dot /gi, ".").replace(/ at /i, "@");

	// create the anchor
	var link = document.createElement("a");

	link.className = this.className;
	link.href = "mailto:" + email;
	link.title = email;

	link.appendChild(this.firstChild.cloneNode(true));

	this.parentNode.replaceChild(link, this);
}

$(function() {
	$("span.email").each(parseEmail);
});