/*

liam = document.getElementsByClassName('liam');

for(l=0;l<liam.length;l++){
	if(liam[l].innerHTML.indexOf("+")>-1){
		liam[l].innerHTML = edoced(liam[l].innerHTML);
	}
	liam[l].title = edoced(liam[l].title);
	liam[l].style.display = "inline";
	liam[l].onclick = function (){
		liame = this.title;
		document.location.href="mailto:"+liame;
	}
}

*/


jQuery(".liam").each(function(index) {
	if(jQuery(this).text().indexOf("+")>-1){
		jQuery(this).text( 
			edoced( 
				jQuery(this).text() 
			) 
		);
	}
	jQuery(this).attr(
		'title',
		edoced(
			jQuery(this).attr('title')
		)
	);
	jQuery(this).css("display","inline");
	jQuery(this).click(
		function (){
			document.location.href="mailto:"+jQuery(this).attr('title')
		}
	);
	
});

function edoced(rts){
	str="";
	for(s=0;s<=rts.length;s++){
		str += rts.charAt(rts.length-s);
	}
	var reg = new RegExp("[+]", "gi");
	str = str.replace(reg,"@");
	
	var reg = new RegExp("[-]", "gi");
	str = str.replace(reg,".");
	
	return str;
}
