$(document).ready(function() {
	// mail protege
	$('.eml').each(function(i){
		var ext = 'ch';
		var domain = '&#112;&#98;&#109;&#97;&#103;';
		var fulldom = domain + '.' + ext;
		var nm = $(this).html();
		var stylesStr = '';
		var styles = $(this).attr('style');
		if (styles) { stylesStr = ' style=\"' + styles + '\"'; }
		var ttlStr = '';
		var ttl = $(this).attr('title');
		if (ttl) { ttlStr = ttl; }
		var classStr = '';
		var classname = $(this).attr('class');
		if (classname) { classStr = ' class=\"' + classname + '\"'; }
		var dom = $(this).attr('alt');
		if (dom) { fulldom = dom; }
		if (ttlStr.length>0){
			$(this).html('<a' + stylesStr + classStr + ' href=\"mailto:' + nm + '@' + fulldom + '\">' + ttlStr + '</a>');
		} else {
			$(this).html('<a' + stylesStr + classStr + ' href=\"mailto:' + nm + '@' + fulldom + '\">' + nm + '@' + fulldom + '</a>');
		}
	});
});
