changing links doesnt work with jquery
<p>I have got this link:</p>

<pre><code>&lt;a href="http://iml.com/wmaster.ashx?WID=124904080515&amp;amp;cbname=liveealve&amp;amp;LinkID=701&amp;amp;queryid=138&amp;amp;from=freevideo6&amp;amp;promocode=BETLNK&amp;amp;FRefID=-1&amp;amp;FRefP=none&amp;amp;FRefQS=none" rel="nofollow" title="Visit imLive.com" target="_blank" class="sitelink_external imlive"&gt;Visit imLive.com&lt;/a&gt;
</code></pre>

<p>I want to use this code to add/change different url parameters:</p>

<pre><code> $("a.sitelink_external.imlive").each(function(){
    $params=getUrlVars(document.URL);
       var promocode_addition='';
      if('INFO'==$params['ref']){
            promocode_addition='LCI';

      } 
    $(this).attr("href", 'http://im.com/wmaster.ashx?WID=124904080515&amp;cbname=limdeaive&amp;LinkID=701&amp;queryid=138&amp;promocode=LCDIMLRV" + i + promocode_addition+"&amp;"FRefID=" + FRefID + "&amp;FRefP=" + FRefP + "&amp;FRefQS=" + FRefQS');

});
</code></pre>

<p>The problem is that that jquery code doesnt work..I tried to move it to document ready..but it doesnt work there too..</p>
