//Looks for any <a> tag where the href attribute ends in .??? e.g. .xls 
//and adds the target=_blank attribute 
$(document).ready(function(){
  $('a[href$=".pdf"],a[href$=".xls"],a[href$=".xlsx"],a[href$=".doc"],a[href$=".docx"]').attr('target','_blank');   
});
