Tutorial Find all Internal Links
Find all links that start with the sites domain, a slash, relative file path, or a hashtag.
var siteURL = "http://" + top.location.host.toString();
var $internalLinks = $("a[href^='"+siteURL+"'], a[href^='/'], a[href^='./'], a[href^='../'], a[href^='#']");