<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script language="JavaScript">
    $(document).ready( function () {
        $("a[href^='http']:not([href*='" + location.hostname + "'])").attr('target', '_blank');
    })
</script>

Previous Post