Is this piece of Javascript inefficient?
<p>I was just wondering whether this snippet of Javascript is going to slow down my site:</p>

<pre><code>$(function(){
 var realLink = location.href;
 $( "#nav a" ).each(
  function( intIndex ){
   String.prototype.startsWith = function(str){
    return (this.indexOf(str) === 0);
   }
   var pageLink = $(this).attr("href");

   if ( realLink.startsWith(pageLink) )
    $(this).parent().addClass("active");   
  }
 );
});
</code></pre>

<p>It only loops about 5-7 times, and I don't have very much Javascript looping experience.</p>
