Changing anchors using $(this).attr('target', '_blank') causes link to open in new window AND current window
<p>Hey there, I recently wrote some Jquery to make all links external to a site have the target="_blank" using the following code:</p>

<pre><code>$('div#outer-wrapper a').each(function(){
    var hrefpull = $(this).attr("href");
    if (typeof hrefpull != 'undefined'){
        if (hrefpull.charAt(0) == '/' || hrefpull.charAt(0) == '#' || hrefpull.charAt(0) == ''){
            // Skips over anything with a / # or nothing!
            }else{
            var checker = hrefpull.split("/");
            if (checker[2] != $baseUrl){
                $(this).attr('target', '_blank')
            }
        }
    }
});
</code></pre>

<p>Now it adds target="_blank" no problem... however... when I click on a link, it loads the link in both a new window and the current window. What is causing this, and how do I fix this?</p>
