
Oh!.. You don't want to send the page to a different URL, you actuall want to write an <a></a> link to the page... I misunderstood.
You would just need to change
var before = '<a href="
http://www.yahoo.com">Yahoo.com</a>';
var current = '<a href="
http://www.google.com">Google.com</a>';