$(document).ready(function(){
$("a[href]").each(function(){
var _1=$(this).attr("href");
var _2=/\.(zip|exe|pdf|doc*|xls*|ppt*|mp3|rar|7z)$/i;
if((_1.match(/^https?\:/i))&&(!_1.match(document.domain))){
$(this).click(function(){
var _3=_1.replace(/^https?\:\/\//i,"");
_gaq.push(["_trackEvent","outbound",_3,location.href]);
});
}else{
if(_1.match(/^mailto\:/i)){
$(this).click(function(){
var _4=_1.replace(/^mailto\:/i,"");
_gaq.push(["_trackEvent","mailto",_4,location.href]);
});
}else{
if(_1.match(_2)){
$(this).click(function(){
var _5=(/[.]/.exec(_1))?/[^.]+$/.exec(_1):undefined;
var _6=_1.replace(/^https?\:\/\/(www.)mydomain\.com\//i,"");
_gaq.push(["_trackEvent","download-"+_5,_6,location.href]);
});
}
}
}
});
});


