$(document).ready(function(){
    //DOM is ready, lets go
    
    //Apply CSS class to all A links that end in .pdf
    $("a[href$='.pdf']").addClass("PDF");
    
    //Apply CSS class to all A links that end in .doc
    $("a[href$='.doc']").addClass("DOC");
    
    //Apply CSS class to all A links that end in .xls
    $("a[href$='.xls']").addClass("XLS");
    
    //Apply CSS class to all A links that end in .ppt
    $("a[href$='.ppt']").addClass("PPT");
    
    //Apply CSS class to all A links that start with http://
    $("a[href^='http://']").addClass("ExternalLink");
    
    //Apply CSS class to all A links that start with mailto:
    $("a[href^='mailto:']").addClass("Mail");
    
    
});
