Let\'s say I have the following code:
google
Use this for every external link
$('a[href^="http://"], a[href^="https://"]').attr('target', '_blank');