var isHome = false;
window.c4j = {};
c4j.time = function() { return (new Date).getTime() };

(function() {
    var a = window.c4j.f = {};
    a.f = 1;
    a.s = 1;
    a.a = (new Date).getTime();

    function m(b, g, e, f) {
        var d, c = [], i = [];
        for (var h = 0, k; k = b[h++]; ) {
            var l = document.getElementById(k);
            if (l) {
                c.push(l)
            }
        }
        for (var h = 0, j; j = g[h++]; ) {
            var o = n(j[0], j[1]);
            while (d = o.pop()) {
                c.push(d)
            }
        }
        while (d = c.pop()) {
            i.push([d, "opacity", e, f, 0, ""]);
        }

        return i
    };

    function n(b, g) {
        var e = [];
        for (var f = document.getElementsByTagName(b), d = 0, c = f[d]; c = f[d++]; ) {
            if (c.className == g) {
                e.push(c);
            }
        }
        return e
    };

    c4j.fade = function(b) {
        //if (isHome) {
            b = b || window.event;
            var g = 1;

            if (b && b.type == "mousemove") {
                var e = b.clientX, f = b.clientY;
                g = a.x || a.y ? Math.abs(a.x - e) + Math.abs(a.y - f) : 0;
                a.x = e;
                a.y = f
            }

            var d = (new Date).getTime(), c = d - a.a;

            if (c4j.fx && g && c > 602)
                if (a.f) {
                a.f = 0;
                // i contains the ids of elements you want to fade-in
                // h contains [element, class] pairs for elements you want to fade-in
                var i = ["hdr", "ftr", "icons", "divicvregister", "divjobsearch", "divforum", "divnews"], h = [["div", "hgh"]];
                c4j.fx.animate(602, m(i, h, 0, 1))
            }
        };
    //}

})();

(function() {
    var fn = 0, g = [];
    c4j.fx = {};
    c4j.fx.linear = function(a) { return a };

    c4j.fx.animate = function(a, d, e) {
        for (var c = 0, b; b = d[c++]; ) {
            b[5] = b[5] == null ? "px" : b[5];
            b[4] = b[4] || c4j.fx.linear;
            h(b[0], b[1], b[2] + b[5])
        }
        g.push({ b: a, a: e, d: c4j.time(), c: d });
        fn = fn || window.setInterval(i, 15)
    };

    function i() {
        for (var a = 0, d; d = g[a++]; )
            j(d) || g.splice(--a, 1);
        if (!g.length) {
            window.clearInterval(fn);
            fn = 0
        }
    };

    function j(a) {
        var d = c4j.time() - a.d;
        if (d >= a.b) {
            for (var e = 0, c; c = a.c[e++]; ) {
                h(c[0], c[1], c[3] + c[5]);
            }
            a.a && a.a();
            return 0
        } else {
            for (var e = 0, c; c = a.c[e++]; ) {
                var b = c[2] + (c[3] - c[2]) * c[4](d / a.b);
                if (c[5] == "px") {
                    b = Math.round(b);
                }
                h(c[0], c[1], b + c[5])
            }
            return 1
        }
    };

    function h(a) {
        for (var d = 1; d < arguments.length; d += 2) {
            var e = arguments[d], c = arguments[d + 1], b = a.style;

            if (b && e in b) {
                b[e] = c;
            }
            else if (e in a) {
                a[e] = c;
            }

            if (b && "filter" in b) {
                b["filter"] = 'alpha(opacity=' + c * 100 + ')';
            }
            else if ("filter" in a) {
                a["filter"] = 'alpha(opacity=' + c * 100 + ')';
            }
        }
        return a
    };

})();