// jQuery
$(document).ready(function() {
	$("a[@href^=http://superfamicom.org]").each(function(){
		var thelink = $(this).attr("href");
	//	$(this).attr("onclick", "urchinTracker ('/outgoing:"+thelink+"');");
		$(this).attr("onclick", "pageTracker._trackPageview(\"/outgoing/" + thelink + "/\"");
	});
});

/*
(function(){
function init(){
	if(arguments.callee.done) return;
	arguments.callee.done = true;
	if(_timer) clearInterval(_timer);
	var myAnchors = document.getElementsByTagName("a");
	for(var i = 0; i < myAnchors.length; i++){
		myAnchors[i].onclick = trackOutBoundLinks;
	}
};
if(document.addEventListener){
	document.addEventListener("DOMContentLoaded", init, false);
};
/*@cc_on @*/
/*@if(@_win32)
	document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
	var script = $("__ie_onload");
	script.onreadystatechange = function(){
		if(this.readyState == "complete"){
			init(); // call the onload handler
		}
	};
/*@end @*/
/*
if(/WebKit/i.test(navigator.userAgent)) { // sniff
	var _timer = setInterval(function() {
		if(/loaded|complete/.test(document.readyState)){
			init(); // call the onload handler
		}
	}, 10);
};
window.onload = init;
function trackOutBoundLinks(){
	var thelink = this.href;
	if(thelink.indexOf(location.hostname) == -1){
//		urchinTracker('/outgoing/' + thelink + '');
		pageTracker._trackPageview('/outgoing/' + thelink + '');
		document.location.href = '' + thelink + '';
		return false;
	}
}
}).call(this);
*/