function debug () {
	return; // not debugging now
	console.log(arguments);
}


function bigbang () {

	var emails = document.getElementsByTagName("p");
	
	for(var i=0; i<emails.length ; i++ ){
		var tag = emails[i];
		if(tag.className == "email format-1"){
			var exp = /([\w]*)\sarroba\s([\w]*)\sponto\s([\w]{2,4})(\sponto\s([\w]{2,4}))?/gi
			var res = exp.exec(tag.innerHTML);
			debug(res);
			if (res.length > 3) {
				var email = res[1] + '@' + res[2] + '.' + res[3];
				debug(email);				var innermail = email.replace('wendelyleal','<span>wendelyleal</span>');				
				tag.innerHTML = '<a href="mailto:'+email+'">'+innermail+'</a>';
			}
			
		}
	}

}




//
// Checking if DOM is ready. Ugly enough.
// from: http://www.javascriptkit.com/dhtmltutors/domready.shtml
//

var alreadyrunflag=0 //flag to indicate whether target function has already been run

if (document.addEventListener)
  document.addEventListener("DOMContentLoaded", function(){alreadyrunflag=1; bigbang();}, false)
else if (document.all && !window.opera){
  document.write('<script type="text/javascript" id="contentloadtag" defer="defer" src="javascript:void(0)"><\/script>')
  var contentloadtag=document.getElementById("contentloadtag")
  contentloadtag.onreadystatechange=function(){
    if (this.readyState=="complete"){
      alreadyrunflag=1
      bigbang();
    }
  }
}

window.onload=function(){
  setTimeout("if (!alreadyrunflag){bigbang();}", 0)
}