Issue with JQuery Each function
<p>I have a jquery function to hide email ids on the webpage to avoid spambots.
I am trying to replace all the span tags with class 'mailme' to valid email ids with the help of this function. The code was working for 1 span tag but since its changed to multiple spans with the help of each method, its not working.</p>

<p>Html</p>

<pre><code>&lt;span class="mailme"&gt;myemail at mydomain dot com&lt;/span&gt;
</code></pre>

<p>jQuery</p>

<pre><code>$('span.mailme').each(function(){
var spt = "#" + $(this).attr("id");
var at = / at /;
var dot = / dot /g;
var addr = $(spt).text().replace(at,"@").replace(dot,".");
$(spt).after('&lt;a href="mailto:'+addr+'" title="Send an email"&gt;'+ addr +'&lt;/a&gt;')
.hover(function(){window.status="Send a letter!";}, function(){window.status="";});
$(spt).remove();
});
</code></pre>
