var host = document.location.host.replace(/www\./, '');
$(document.body).on('click', 'a', function () {
if (this.href && this.href.indexOf(host) == -1) {
$(this).attr('target', '_blank');
}
});
Возможно кому-нибудь понадобится.