/*
 * jQuery plugins
 * Spam-safe email address replacement
 */

(function($) {

var ver = '1.0';

$.fn.twsafemail = function() {
  //alert(this.text());
  //var spt = $('span.tw-safemail');
  var at = / at /;
  var dot = / dot /g;

  this.each(function() {
    var addr = $(this).text().replace(at,"@").replace(dot,".");
    $(this).after('<a id="mailto" href="mailto:'+addr+'?subject=Enquiry from debbierimmer.co.nz" title="Send an email">'+ addr +'<\/a>')
    .hover(function(){window.status="Send a letter!";}, function(){window.status="";});
    $(this).remove();
  });

};

})(jQuery);
