/**
 * Function which replaces all boxes of class EMAIL with 
 * a MAILTO link
 * 
 * @author Vlada Kobetic
 * @see Prototype Framework for dependencies
 */
function processEmailAddresses() {
	var spans = $$(".email");
	var	pattern = /(.+)\(zavinac\)(.+)\(tecka\)(.+)/;
	spans.each(function(elem) {
		elem.replace(elem.innerHTML.gsub(pattern,function(match) {
			var email = match[1]+'@'+match[2]+'.'+match[3];
			return '<a href="mailto:'+email+'">'+email+'</a>';
		}));
	});
}
