function recordOutboundLink(link, category, action) {
  try {
    var myTracker=_gat._getTrackerByName('Linkcount');
    _gaq.push([myTracker._trackEvent, category, action]);
    setTimeout('document.location = "' + link.href + '"', 100)
  }catch(err){}
}

jQuery(document).ready(function() {

    jQuery('a').live("click", function(event) {
            if(jQuery(this).hasClass('count')) {
                jQuery.ajax({
                    dataType: 'html',
                    type: 'POST',
                    url: 'custom-content/linkcount.php',
                     data: ({
                        url: jQuery(this).attr('href')
                     })
                });
                recordOutboundLink( this , 'Outbound Links', jQuery(this).attr('href') );
            }
    });

});
