function auditLinkTargets(container_name) {
    // make sure we have JS & a DOM like we expect.
    if (!document.getElementById || !document.getElementsByTagName) return true;
    if (!document.getElementById(container_name)) return true;

    // we will only re-target links in named container (i.e. excludes header & footer)
    var container = document.getElementById(container_name);
    var links = container.getElementsByTagName('a');

    var ct = links.length;
    for (var i=0; i<ct; i++) {
        if (links[i].target) { // skip link with target attribute set
            if (links[i].target == 'new') {
                // change 'new' to '_blank'
                links[i].target = '_blank';
            }

        // check for manual over-ride
        } else if (/\s?target_new\s?/.test(links[i].className)) {  // new window
            links[i].target = '_blank';
        } else if (/\s?target_self\s?/.test(links[i].className)) { // force here
            // do nothing

        // otherwise process href and choose target
        } else {
            // if url doesn't contain :// or url contains salon.com in domain name. fantastic
            if (/^\w+:\/\//.test(links[i].href)==false || /^\w+:\/\/(\w+\.)*salon.com\//i.test(links[i].href)) {
                // salon, do nothing
            } else {
                links[i].target = '_blank';
            }
        }
    }
}

window.onload = function(e) {
  auditLinkTargets('site_container');
}
