title: Remove anchor from url - add string to url - and append anchor at the end again
body: <p>I'm searching for a jquery solution that converts the following URL:</p>
  
  <p><a href="http://www.mysite.com/longpage.html#title3" rel="nofollow">http://www.mysite.com/longpage.html#title3</a></p>
  
  <p>into</p>
  
  <p><a href="http://www.mysite.com/longpage.html?var=1#title3" rel="nofollow">http://www.mysite.com/longpage.html?var=1#title3</a></p>
  
  <p>Simply adding the "?var=1" is no problem. But the anchor only works when it's placed at the end of the URL.</p>