$("a[href^="http://"]").click(function(){ this.target = "_blank";});
$(function(){ $("a[href^="http://"]").attr({"target":"_blank"})})