// replaces emails in the form <a class="e">daniel[at]roseman.org.uk</a>
// with clickable links
// based on code from http://www.htmldog.com/ptg/archives/000063.php
(function() {
    if (document.getElementsByTagName) {
        var a = document.getElementsByTagName("a"),
        i;
        for (i = 0; i < a.length; i++) {
            if (a[i].className && a[i].className == "e") {
                address_to_replace = a[i].firstChild;
                real_address=address_to_replace.nodeValue.replace("[at]", "@");
                address_to_replace.nodeValue=real_address; 
                address_to_replace.parentNode.setAttribute("href", "mailto:"+real_address);
            }
        }
    }
})()

