$('a').attr('target', '_blank');
document.body.onload = function(){ for(i=0;i<document.getElementsByTagName('a').length;i++){ document.getElementsByTagName('a')[i].target = '_blank';}}