$(document).ready(function() {
  $("a[href^=http]").click(function(){
    //find the links pointing to a URL
    if(this.href.indexOf(location.hostname) == -1) {
      //check if they point outside
      window.open( $(this).attr('href') ); //force open the new window
      return false;
    }
  });
}); 

