You could get all anchors and attach an onclick event that will call the tracker function. Something like this:
var links = document.getElementsByTagName('a');
for (var i = 0; i < links.length; ++i) {
links[i].addEventListener('click', fireAnalyticsEvent, false);
}
function fireAnalyticsEvent(ev) {
_gaq.push(['_trackEvent', 'category', 'action', 'opt_label', ev.srcElement.getAttribute('href')]);
}
However, bear in mind that as far as outgoing links that are opened at the same tab are concerned, GA is not reliable: the request to analytics might be cut off when the page navigates to the new URL. If this is what you are trying to track then you would have to use a server-side redirect system to track the clicks (something like a python/php/your fave server language that will get the URL as a parameter, perform the tracking logic, and then return 302 redirect headers to have the client navigate to the URL that it got as input).