$(document).ready(function() {
 
  // Add pdf icons to pdf links
  $("a[href$='.pdf']").addClass("pdf");
  //$(".pdf").append("{umbracoBytes}");
 
  // Add txt icons to document links (rtf, txt)
  $("a[href$='.txt'], a[href$='.rft']").addClass("txt");
 
  // Add vcf icon to document links (vcf)
  $("a[href$='.vcf']").addClass("address");
 
  // Add word icons to word document links
  $("a[href$='.doc'], a[href$='.docx']").addClass("word");
 
  // Add zip icons to Zip file links (zip, rar)
  $("a[href$='.zip'], a[href$='.rar']").addClass("zip"); 
 
  // Add email icons to email links
  $("a[href^='mailto:']").addClass("email");
  
  //Add external link icon to external links - DISABLED!!
  //$('a').filter(function() {
    //Compare the anchor tag's host name with location's host name
     // return this.hostname && this.hostname !== location.hostname;
   // }).addClass("external");
  //You might also want to set the _target attribute to blank
  /*
  $('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");
  */
});

