Basically what I want the script to do, is add my affiliate ID to all Amazon links posted by my users.(Kinda what SO is doing, minus the whole redirect/racking thing)
Here is the code I'm using, and for some reason it's not working.
<script type="text/javascript">
$(document).ready(function() {
$('a[href*='amazon.com']').each(function() { this.href = this.href.replace(/\?.*$/,"") + $.query.load(this.href).set("tag","affID").toString();});
});
</script>