/*
 * jQuery SPEmail plug-in 1.0
 * (c) 2008 Richard Chiriboga
 * Inspired by David Walsh's blog on spam proofing emails using moo tools.
 *
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
*/
$.fn.spemail = function(c, b) { var a = c.split(","); if (b == "linkbase") this.each(function() { el = $(this); el.each(function() { el.attr("href", "mailto:" + el.attr("href").replace(a[0], "@").replace(a[1], ".")); el.attr("title", el.attr("href").replace(a[0], "@").replace(a[1], ".").replace("mailto.", "Email: ")); el.html(el.attr("href").replace(a[0], "@").replace(a[1], ".").replace("mailto.", "").replace("mailto:", "")) }) }); else if (b == "mailbase") this.each(function() { el = $(this); el.each(function() { el.html('<a href="mailto:' + el.html().replace(a[0], "@").replace(a[1], ".") + '" title="Email: ' + el.html().replace(a[0], "@").replace(a[1], ".") + '">' + el.html().replace(a[0], "@").replace(a[1], ".") + "</a>") }) }); else b == "plainbase" && this.each(function() { el = $(this); el.each(function() { el.html(el.html().replace(a[0], "@").replace(a[1], ".")) }) }) };
