$(function() {
    $('a').filter(function() { return this.hostname && this.hostname !== location.hostname && this.hostname !== 'candipromotions.co.uk' && this.hostname !== 'candi.decode.uk.com' && this.hostname !== 'candi-0.9.dev'; })
    .add('a[href$="pdf"]')
        .attr('target', '_blank')
    .filter(':not(:has(img))').addClass('linkAway');
});