function in_array(needle, haystack, argStrict) {
    var key = '', strict = !!argStrict;
    if (strict) {
        for (key in haystack) {
            if (haystack[key] === needle) {
                return true;
            }
        }
    } else {
        for (key in haystack) {
            if (haystack[key] == needle) {
                return true;
            }
        }
    }
    return false;
}

$(document).ready(function() {
    $("a").click(function() {
        if (location.hostname != this.hostname && in_array(this.hostname,['www1.slankedoktor.dk','secure.e-doktor.dk','velkommen.slankedoktor.dk'])) {
            _gaq.push(['_link', this.href]);
        }
    });
});
