$(document).ready(function(){
    $("a[href$='.pdf']").addClass("pdf");
	$("a[href$='.doc']").addClass("doc");
	//Add external link icon to external links - 
	$('a').filter(function() {
		//Compare the anchor tag's host name with location's host name
	    return this.hostname && this.hostname !== location.hostname;
	  }).addClass("external").attr("target","_blank");
});

