/*smooth scroll*/
!function(a) {
    a(window).load(function() {
        a.browser.chrome = /chrome/.test(navigator.userAgent.toLowerCase()),
        !navigator.platform.match(/(Mac|iPhone|iPod|iPad)/i) && a.browser.chrome && function() {
            function b() {
                if (document.body) {
                    var a = document.body
                      , b = document.documentElement
                      , c = window.innerHeight
                      , d = a.scrollHeight;
                    if (G = 0 <= document.compatMode.indexOf("CSS") ? b : a,
                    H = a,
                    E = !0,
                    top != self)
                        C = !0;
                    else if (d > c && (a.offsetHeight <= c || b.offsetHeight <= c)) {
                        var e = !1
                          , d = function() {
                            e || b.scrollHeight == document.height || (e = !0,
                            setTimeout(function() {
                                b.style.height = document.height + "px",
                                e = !1
                            }, 500))
                        };
                        b.style.height = "auto",
                        setTimeout(d, 10),
                        i("DOMNodeInserted", d),
                        i("DOMNodeRemoved", d),
                        G.offsetHeight <= c && (c = document.createElement("div"),
                        c.style.clear = "both",
                        a.appendChild(c))
                    }
                    -1 < document.URL.indexOf("mail.google.com") && (c = document.createElement("style"),
                    c.innerHTML = ".iu { visibility: hidden }",
                    (document.getElementsByTagName("head")[0] || b).appendChild(c)),
                    F || B || (a.style.backgroundAttachment = "scroll",
                    b.style.backgroundAttachment = "scroll")
                }
            }
            function c(b, c, d, e) {
                if (e || (e = 1e3),
                l(c, d),
                u) {
                    var f = +new Date - L;
                    v > f && (f = (1 + 30 / f) / 2) > 1 && (f = Math.min(f, w),
                    c *= f,
                    d *= f),
                    L = +new Date
                }
                if (J.push({
                    x: c,
                    y: d,
                    lastX: 0 > c ? .99 : -.99,
                    lastY: 0 > d ? .99 : -.99,
                    start: +new Date
                }),
                !K) {
                    if (a("body").hasClass("shrk-page-initializing"))
                        return;
                    var g = b === document.body
                      , h = function() {
                        for (var a = +new Date, f = 0, i = 0, j = 0; j < J.length; j++) {
                            var k = J[j]
                              , l = a - k.start
                              , m = l >= p
                              , q = m ? 1 : l / p;
                            r && (q = n(q)),
                            l = k.x * q - k.lastX >> 0,
                            q = k.y * q - k.lastY >> 0,
                            f += l,
                            i += q,
                            k.lastX += l,
                            k.lastY += q,
                            m && (J.splice(j, 1),
                            j--)
                        }
                        g ? window.scrollBy(f, i) : (f && (b.scrollLeft += f),
                        i && (b.scrollTop += i)),
                        c || d || (J = []),
                        J.length ? O(h, b, e / o + 1) : K = !1
                    };
                    O(h, b, 0),
                    K = !0
                }
            }
            function d(a) {
                E || b();
                var d = a.target
                  , e = h(d);
                if (!e || a.defaultPrevented || k(H, "embed") || k(d, "embed") && /\.pdf/i.test(d.src))
                    return !0;
                var d = a.wheelDeltaX || 0
                  , f = a.wheelDeltaY || 0;
                d || f || (f = a.wheelDelta || 0),
                1.2 < Math.abs(d) && (d *= q / 120),
                1.2 < Math.abs(f) && (f *= q / 120),
                c(e, -d, -f),
                a.preventDefault()
            }
            function f(a) {
                H = a.target
            }
            function g(a, b) {
                for (var c = a.length; c--; )
                    M[N(a[c])] = b;
                return b
            }
            function h(a) {
                var b = []
                  , c = G.scrollHeight;
                do {
                    var d = M[N(a)];
                    if (d)
                        return g(b, d);
                    if (b.push(a),
                    c === a.scrollHeight) {
                        if (!C || G.clientHeight + 10 < c)
                            return g(b, document.body)
                    } else if (a.clientHeight + 10 < a.scrollHeight && (overflow = getComputedStyle(a, "").getPropertyValue("overflow-y"),
                    "scroll" === overflow || "auto" === overflow))
                        return g(b, a)
                } while (a = a.parentNode)
            }
            function i(a, b, c) {
                window.addEventListener(a, b, c || !1)
            }
            function k(a, b) {
                return (a.nodeName || "").toLowerCase() === b.toLowerCase()
            }
            function l(a, b) {
                a = a > 0 ? 1 : -1,
                b = b > 0 ? 1 : -1,
                (D.x !== a || D.y !== b) && (D.x = a,
                D.y = b,
                J = [],
                L = 0)
            }
            function m(a) {
                var b;
                return a *= s,
                1 > a ? b = a - (1 - Math.exp(-a)) : (b = Math.exp(-1),
                a = 1 - Math.exp(-(a - 1)),
                b += a * (1 - b)),
                b * t
            }
            function n(a) {
                return a >= 1 ? 1 : 0 >= a ? 0 : (1 == t && (t /= m(1)),
                m(a))
            }
            var H, o = 150, p = 800, q = 150, r = !0, s = 6, t = 1, u = !0, v = 20, w = 1, B = !1, C = !1, D = {
                x: 0,
                y: 0
            }, E = !1, F = !0, G = document.documentElement, J = [], K = !1, L = +new Date, M = {};
            setInterval(function() {
                M = {}
            }, 1e4);
            var N = function() {
                var a = 0;
                return function(b) {
                    return b.uniqueID || (b.uniqueID = a++)
                }
            }()
              , O = function() {
                return window.requestAnimationFrame || window.webkitRequestAnimationFrame || function(a, b, c) {
                    window.setTimeout(a, c || 1e3 / 60)
                }
            }();
            i("mousedown", f),
            i("mousewheel", d),
            i("load", b)
        }()
    })
}(jQuery);