On click save link to variable and redirect to differnet link
<p>I have a webpage with many links on it. I want to add a script to work through out the whole page that when any link on the page is clicked on the page it will save that link to a variable and then redirect to to www.redirectlink.com</p>

<p>SO far I have </p>

<pre><code>$('a').click(function(){
location.href='http://www.redirectlink.com';
return false;
});
</code></pre>

<p>Is this right and how would I make it save the original url in a variable that I can use later on on the www.redirectlink.com page</p>
