var Base64 = {_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789*-=",encode:function(a) {
    var b = "",d,c,f,g,h,e,j = 0;
    for (a = Base64._utf8_encode(a); j < a.length;) {
        d = a.charCodeAt(j++);
        c = a.charCodeAt(j++);
        f = a.charCodeAt(j++);
        g = d >> 2;
        d = (d & 3) << 4 | c >> 4;
        h = (c & 15) << 2 | f >> 6;
        e = f & 63;
        if (isNaN(c))h = e = 64; else if (isNaN(f))e = 64;
        b = b + this._keyStr.charAt(g) + this._keyStr.charAt(d) + this._keyStr.charAt(h) + this._keyStr.charAt(e)
    }
    return b
},decode:function(a) {
    var b = "",d,c,f,g,h,e = 0;
    for (a = a.replace(/[^A-Za-z0-9\*\-\=]/g,
            ""); e < a.length;) {
        d = this._keyStr.indexOf(a.charAt(e++));
        c = this._keyStr.indexOf(a.charAt(e++));
        g = this._keyStr.indexOf(a.charAt(e++));
        h = this._keyStr.indexOf(a.charAt(e++));
        d = d << 2 | c >> 4;
        c = (c & 15) << 4 | g >> 2;
        f = (g & 3) << 6 | h;
        b += String.fromCharCode(d);
        if (g != 64)b += String.fromCharCode(c);
        if (h != 64)b += String.fromCharCode(f)
    }
    return Base64._utf8_decode(b)
},_utf8_encode:function(a) {
    a = a.replace(/\r\n/g, "\n");
    for (var b = "",d = 0; d < a.length; d++) {
        var c = a.charCodeAt(d);
        if (c < 128)b += String.fromCharCode(c); else {
            if (c > 127 && c < 2048)b +=
                    String.fromCharCode(c >> 6 | 192); else {
                b += String.fromCharCode(c >> 12 | 224);
                b += String.fromCharCode(c >> 6 & 63 | 128)
            }
            b += String.fromCharCode(c & 63 | 128)
        }
    }
    return b
},_utf8_decode:function(a) {
    for (var b = "",d = 0,c = c1 = c2 = 0; d < a.length;) {
        c = a.charCodeAt(d);
        if (c < 128) {
            b += String.fromCharCode(c);
            d++
        } else if (c > 191 && c < 224) {
            c2 = a.charCodeAt(d + 1);
            b += String.fromCharCode((c & 31) << 6 | c2 & 63);
            d += 2
        } else {
            c2 = a.charCodeAt(d + 1);
            c3 = a.charCodeAt(d + 2);
            b += String.fromCharCode((c & 15) << 12 | (c2 & 63) << 6 | c3 & 63);
            d += 3
        }
    }
    return b
}},m = location.search.split("dirreq=");
if (m.length == 1) {
    m = location.search.split("_openstat=");
    if (m.length == 2)try {
        m[1] = Base64.decode(m[1]);
        m[1] = m[1].substr(m[1].indexOf(";"))
    } catch(err) {
    }
}
var s = location.pathname + m[0];
if (s.lastIndexOf("&") == s.length - 1)s = s.substr(0, s.length - 1);
if (s.lastIndexOf("?") == s.length - 1)s = s.substr(0, s.length - 1);
var uid = undefined,_gaq = _gaq || [];
_gaq.push(function() {
    var a = _gaq._createAsyncTracker(UAID);
    a._setDomainName("none");
    a._addOrganic("nova.rambler.ru", "query");
    a._addOrganic("go.mail.ru", "q");
    a._addOrganic("nigma.ru", "s");
    a._addOrganic("sm.aport.ru", "r");
    a._addOrganic("gogo.ru", "q");
    m.length >= 2 && a._setCustomVar(2, "key", String(m[1]).substr(0, 50), 2);
    uid = a._getVisitorCustomVar(1);
    if (uid == undefined) {
        var b = document.createElement("script");
        b.type = "text/javascript";
        b.async = true;
        b.src = "http://yabedaga.appspot.com/?id=" +
                a._visitCode() + "&host=" + location.host;
        (document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(b)
    } else {
        a._trackPageview(s);
        typeof plid == "function" && google.setOnLoadCallback(plid)
    }
});
try {
    for (var buck = [8,10,15,20,30,60,120],cq = 0,i = 0; i < buck.length; i++)setTimeout(function() {
        try {
            _gaq.push(["_trackEvent",s,s + "__TIMER__" + String(buck[cq]),"page_timer"]);
            cq++
        } catch(a) {
        }
    }, buck[i] * 1E3);
    var scrolled_fired = 0,scroll_fired = 0;
    $(window).scroll(function() {
        if (scroll_fired == 0) {
            var a = s + "__scroll__" + String(buck[cq]);
            _gaq.push(["_trackEvent",s,a,"scroll"]);
            scroll_fired = 1
        }
        a = $(document).height();
        var b = $(window).height() + $(window).scrollTop();
        if (a <= b + 50 && scrolled_fired == 0) {
            a = s + "__scrolled__" + String(buck[cq]);
            _gaq.push(["_trackEvent",s,a,"scrolled"]);
            scrolled_fired = 1
        }
    })
} catch(err$$2) {
}
(function() {
    var a = document.createElement("script");
    a.type = "text/javascript";
    a.async = true;
    a.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";
    (document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(a)
})();
