$(document).ready(function(){
	// Outbound Link Tracking - Requires GA to be set up
	// Check every click on an <a> tag
	$("a").click(function(){
		// Get the <a> tag link destination
		var href = $(this).attr("href");
		// Get the current page location
		var loc = location.href;
		// Check to see if the http protocol is being used
		if (href.indexOf("http://") == 0) {
			// If so, strip out the http://www. and everything after the end of the domain name
			var str = loc.substring(11, loc.indexOf("/", 7));
			// Check to see if the link destination does not contain the current domain i.e. it's an outbound link
			if (href.indexOf(str) == -1) {
				// Call the GA pageTracker
				var pageTracker=_gat._getTracker("UA-1326139-1");
				// If it's an outbound link then grab the title attribute value
				var title = $(this).attr("title");
				// Now try calling the GA event tracking script and send the title and destination details with a type of "Outbound Links"
				try { pageTracker._trackEvent("Outbound Links", title, href); } catch(err) {}
			}
		}
	});
});