$(document).ready(function() {
        var hostname = window.location.hostname;
        $("a[href^=http://]").each(function(){
                if (!($(this).attr('href').match(hostname))) {
                        $(this).attr("target","_blank");
                }
        })
});
