/**
 * Make sure all the anchors on the page referring to an external domain
 * have a target _blank attribute.
 */
$(document).ready(function(){

    // get the host
    var h = window.location.host.toLowerCase();

    // perform check on all the anchors
    $("a[href^='http']:not([href^='http://" + h + "']):not([href^='http://www." + h + "']), a[href$='.pdf']").attr("target", "_blank");
});
