﻿
var domains = ["www.dematic.com","www.dematic.cn","blog-na.dematic.com","www.dematicplanet.com","www.automatedlibrarysystems.com","www.dematic.com.au","www.dematic.us","www.dematic.de"];
var currentURL = document.URL
var check = false

$(document).ready(function () {

    $('a').each(function (index) {
        if (this.href.indexOf("https") >= 0 || this.href.indexOf("http") >= 0) {
            var href = this.href
            jQuery.each(domains, function (index) {
                if (href.indexOf(this) >= 0) {
                    if (currentURL.indexOf(this) >= 0) {

                    } else {
                        check = true    
                    }
                }
            });
        }

        if (check == true) {
            if (currentURL.indexOf("aktion=a") >= 0) {
            } else {
                $(this).attr('onclick', "_gaq.push(['_link', '" + href + "']); return false;");
            }
            check = false
        }
    });

})
