to get the URL attached you can do something like...
var url = $("a:first").attr('href');
this will give you the URL but doesnt guarantee absolute or relative.
To find the absolute URL you can further check
if(!url.startsWith("http")) { url = "http://www.mysite.com" + url}