﻿function EmailReplace($container) {
    var emailPattern = new RegExp("([a-zA-Z0-9\.\_\-]+@[a-zA-Z0-9\.\-]+[a-zA-Z]{2,4})","g");

    $container.each(function () {
        $cont = $(this);
        $cont.html($cont.html().replace(emailPattern, '<a href=\"mailto:$&\">$&</a>'));
    });
}

$(function(){
    EmailReplace($(".content p"));
    EmailReplace($(".content pre"));
});
