function TimedReplacement(c, d) {
    try {
        if (!(this instanceof TimedReplacement)) return new TimedReplacement(c, d);
        this.location = c;
        this.callback = d ||
        function (a) {
            if (!a) return !1;
            if (a = a[this.location] || !1) if (a.type === "text") document.getElementById(this.location).innerHTML = a.value;
            else if (a.type === "image") document.getElementById(this.location).src = a.value;
            else if (a.type === "hero" && slides) for (var b in slides) if (slides[b].promo == this.location) slides[b].src = a.value;
            return !0
        };
        this.fetch = function () {
            if (!this.location || !this.callback) return !1;
            var a = document.createElement("script"),
                b = "cb" + +new Date,
                c = this;
            TimedReplacement[b] = function (d) {
                c.callback(d);
                delete TimedReplacement[b];
                document.getElementsByTagName("head")[0].removeChild(a)
            };
            a.src = "//artbeads.net/a.php?cb=TimedReplacement." + b;
            document.getElementsByTagName("head")[0].appendChild(a)
        }
    }
    catch(e){}
};
