$(document).ready(function() {
  $('a[href^=http]:not("[href*=://' + document.domain + ']")').each(function() {
    $(this).attr('href', '/outbound/?d=' + escape($(this).attr('href')));
  });
});
