$(document).ready(function() {
  $('a[href*=#]').click(function() {
 if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
   && location.hostname == this.hostname) {
    var $target = $(this.hash);
    $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
    if ($target.length) {
     $target.ScrollTo(400);
     return false;
    }
 };
  });
});

jQuery.iUtil = {
    getPosition: function (e) {
        var x = 0;
        var y = 0;
        var a = false;
        var b = e.style;
        if (jQuery(e).css('display') == 'none') {
            oldVisibility = b.visibility;
            oldPosition = b.position;
            b.visibility = 'hidden';
            b.display = 'block';
            b.position = 'absolute';
            a = true
        }
        var c = e;
        while (c) {
            x += c.offsetLeft + (c.currentStyle && !jQuery.browser.opera ? parseInt(c.currentStyle.borderLeftWidth) || 0 : 0);
            y += c.offsetTop + (c.currentStyle && !jQuery.browser.opera ? parseInt(c.currentStyle.borderTopWidth) || 0 : 0);
            c = c.offsetParent
        }
        c = e;
        while (c && c.tagName && c.tagName.toLowerCase() != 'body') {
            x -= c.scrollLeft || 0;
            y -= c.scrollTop || 0;
            c = c.parentNode
        }
        if (a) {
            b.display = 'none';
            b.position = oldPosition;
            b.visibility = oldVisibility
        }
        return {
            x: x,
            y: y
        }
    },
    getPositionLite: function (a) {
        var x = 0,
        y = 0;
        while (a) {
            x += a.offsetLeft || 0;
            y += a.offsetTop || 0;
            a = a.offsetParent
        }
        return {
            x: x,
            y: y
        }
    },
    getSize: function (e) {
        var w = jQuery.css(e, 'width');
        var h = jQuery.css(e, 'height');
        var a = 0;
        var b = 0;
        var c = e.style;
        if (jQuery(e).css('display') != 'none') {
            a = e.offsetWidth;
            b = e.offsetHeight
        } else {
            oldVisibility = c.visibility;
            oldPosition = c.position;
            c.visibility = 'hidden';
            c.display = 'block';
            c.position = 'absolute';
            a = e.offsetWidth;
            b = e.offsetHeight;
            c.display = 'none';
            c.position = oldPosition;
            c.visibility = oldVisibility
        }
        return {
            w: w,
            h: h,
            wb: a,
            hb: b
        }
    },
    getSizeLite: function (a) {
        return {
            wb: a.offsetWidth || 0,
            hb: a.offsetHeight || 0
        }
    },
    getClient: function (e) {
        var h, w, de;
        if (e) {
            w = e.clientWidth;
            h = e.clientHeight
        } else {
            de = document.documentElement;
            w = window.innerWidth || self.innerWidth || (de && de.clientWidth) || document.body.clientWidth;
            h = window.innerHeight || self.innerHeight || (de && de.clientHeight) || document.body.clientHeight
        }
        return {
            w: w,
            h: h
        }
    },
    getScroll: function (e) {
        var t, l, w, h, iw, ih;
        if (e && e.nodeName.toLowerCase() != 'body') {
            t = e.scrollTop;
            l = e.scrollLeft;
            w = e.scrollWidth;
            h = e.scrollHeight;
            iw = 0;
            ih = 0
        } else {
            if (document.documentElement && document.documentElement.scrollTop) {
                t = document.documentElement.scrollTop;
                l = document.documentElement.scrollLeft;
                w = document.documentElement.scrollWidth;
                h = document.documentElement.scrollHeight
            } else if (document.body) {
                t = document.body.scrollTop;
                l = document.body.scrollLeft;
                w = document.body.scrollWidth;
                h = document.body.scrollHeight
            }
            iw = self.innerWidth || document.documentElement.clientWidth || document.body.clientWidth || 0;
            ih = self.innerHeight || document.documentElement.clientHeight || document.body.clientHeight || 0
        }
        return {
            t: t,
            l: l,
            w: w,
            h: h,
            iw: iw,
            ih: ih
        }
    },
    getMargins: function (e, a) {
        var c = jQuery(e);
        var t = c.css('marginTop') || '';
        var r = c.css('marginRight') || '';
        var b = c.css('marginBottom') || '';
        var l = c.css('marginLeft') || '';
        if (a) return {
            t: parseInt(t) || 0,
            r: parseInt(r) || 0,
            b: parseInt(b) || 0,
            l: parseInt(l)
        };
        else return {
            t: t,
            r: r,
            b: b,
            l: l
        }
    },
    getPadding: function (e, a) {
        var c = jQuery(e);
        var t = c.css('paddingTop') || '';
        var r = c.css('paddingRight') || '';
        var b = c.css('paddingBottom') || '';
        var l = c.css('paddingLeft') || '';
        if (a) return {
            t: parseInt(t) || 0,
            r: parseInt(r) || 0,
            b: parseInt(b) || 0,
            l: parseInt(l)
        };
        else return {
            t: t,
            r: r,
            b: b,
            l: l
        }
    },
    getBorder: function (e, a) {
        var c = jQuery(e);
        var t = c.css('borderTopWidth') || '';
        var r = c.css('borderRightWidth') || '';
        var b = c.css('borderBottomWidth') || '';
        var l = c.css('borderLeftWidth') || '';
        if (a) return {
            t: parseInt(t) || 0,
            r: parseInt(r) || 0,
            b: parseInt(b) || 0,
            l: parseInt(l) || 0
        };
        else return {
            t: t,
            r: r,
            b: b,
            l: l
        }
    },
    getPointer: function (a) {
        var x = a.pageX || (a.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft)) || 0;
        var y = a.pageY || (a.clientY + (document.documentElement.scrollTop || document.body.scrollTop)) || 0;
        return {
            x: x,
            y: y
        }
    },
    traverseDOM: function (a, b) {
        b(a);
        a = a.firstChild;
        while (a) {
            jQuery.iUtil.traverseDOM(a, b);
            a = a.nextSibling
        }
    },
    purgeEvents: function (c) {
        jQuery.iUtil.traverseDOM(c, function (a) {
            for (var b in a) {
                if (typeof a[b] === 'function') {
                    a[b] = null
                }
            }
        })
    },
    centerEl: function (a, b) {
        var c = $.iUtil.getScroll();
        var d = $.iUtil.getSize(a);
        if (!b || b == 'vertically') $(a).css({
            top: c.t + ((Math.max(c.h, c.ih) - c.t - d.hb) / 2) + 'px'
        });
        if (!b || b == 'horizontally') $(a).css({
            left: c.l + ((Math.max(c.w, c.iw) - c.l - d.wb) / 2) + 'px'
        })
    },
    fixPNG: function (a, b) {
        var c = $('img[@src*="png"]', a || document),
        png;
        c.each(function () {
            png = this.src;
            this.src = b;
            this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + png + "')"
        })
    }
};
[].indexOf || (Array.prototype.indexOf = function (v, n) {
    n = (n == null) ? 0 : n;
    var m = this.length;
    for (var i = n; i < m; i++) if (this[i] == v) return i;
    return - 1
});
jQuery.fxCheckTag = function (e) {
    if (/^tr$|^td$|^tbody$|^caption$|^thead$|^tfoot$|^col$|^colgroup$|^th$|^body$|^header$|^script$|^frame$|^frameset$|^option$|^optgroup$|^meta$/i.test(e.nodeName)) return false;
    else return true
};
jQuery.fx.destroyWrapper = function (e, a) {
    var c = e.firstChild;
    var b = c.style;
    b.position = a.position;
    b.marginTop = a.margins.t;
    b.marginLeft = a.margins.l;
    b.marginBottom = a.margins.b;
    b.marginRight = a.margins.r;
    b.top = a.top + 'px';
    b.left = a.left + 'px';
    e.parentNode.insertBefore(c, e);
    e.parentNode.removeChild(e)
};
jQuery.fx.buildWrapper = function (e) {
    if (!jQuery.fxCheckTag(e)) return false;
    var t = jQuery(e);
    var a = e.style;
    var b = false;
    var c = {};
    c.position = t.css('position');
    if (t.css('display') == 'none') {
        oldVisibility = t.css('visibility');
        a.visibility = 'hidden';
        a.display = '';
        b = true
    }
    c.sizes = jQuery.iUtil.getSize(e);
    c.margins = jQuery.iUtil.getMargins(e);
    var d = e.currentStyle ? e.currentStyle.styleFloat: t.css('float');
    c.top = parseInt(t.css('top')) || 0;
    c.left = parseInt(t.css('left')) || 0;
    var f = 'w_' + parseInt(Math.random() * 10000);
    var g = document.createElement(/^img$|^br$|^input$|^hr$|^select$|^textarea$|^object$|^iframe$|^button$|^form$|^table$|^ul$|^dl$|^ol$/i.test(e.nodeName) ? 'div': e.nodeName);
    jQuery.attr(g, 'id', f);
    g.className = 'fxWrapper';
    var h = g.style;
    var i = 0;
    var j = 0;
    if (c.position == 'relative' || c.position == 'absolute') {
        i = c.top;
        j = c.left
    }
    h.display = 'none';
    h.top = i + 'px';
    h.left = j + 'px';
    h.position = c.position != 'relative' && c.position != 'absolute' ? 'relative': c.position;
    h.overflow = 'hidden';
    h.height = c.sizes.hb + 'px';
    h.width = c.sizes.wb + 'px';
    h.marginTop = c.margins.t;
    h.marginRight = c.margins.r;
    h.marginBottom = c.margins.b;
    h.marginLeft = c.margins.l;
    if (jQuery.browser.msie) {
        h.styleFloat = d
    } else {
        h.cssFloat = d
    }
    e.parentNode.insertBefore(g, e);
    a.marginTop = '0px';
    a.marginRight = '0px';
    a.marginBottom = '0px';
    a.marginLeft = '0px';
    a.position = 'absolute';
    a.listStyle = 'none';
    a.top = '0px';
    a.left = '0px';
    if (b) {
        a.display = 'none';
        a.visibility = oldVisibility
    }
    g.appendChild(e);
    h.display = 'block';
    return {
        oldStyle: c,
        wrapper: jQuery(g)
    }
};
jQuery.fx.namedColors = {
    aqua: [0, 255, 255],
    azure: [240, 255, 255],
    beige: [245, 245, 220],
    black: [0, 0, 0],
    blue: [0, 0, 255],
    brown: [165, 42, 42],
    cyan: [0, 255, 255],
    darkblue: [0, 0, 139],
    darkcyan: [0, 139, 139],
    darkgrey: [169, 169, 169],
    darkgreen: [0, 100, 0],
    darkkhaki: [189, 183, 107],
    darkmagenta: [139, 0, 139],
    darkolivegreen: [85, 107, 47],
    darkorange: [255, 140, 0],
    darkorchid: [153, 50, 204],
    darkred: [139, 0, 0],
    darksalmon: [233, 150, 122],
    darkviolet: [148, 0, 211],
    fuchsia: [255, 0, 255],
    gold: [255, 215, 0],
    green: [0, 128, 0],
    indigo: [75, 0, 130],
    khaki: [240, 230, 140],
    lightblue: [173, 216, 230],
    lightcyan: [224, 255, 255],
    lightgreen: [144, 238, 144],
    lightgrey: [211, 211, 211],
    lightpink: [255, 182, 193],
    lightyellow: [255, 255, 224],
    lime: [0, 255, 0],
    magenta: [255, 0, 255],
    maroon: [128, 0, 0],
    navy: [0, 0, 128],
    olive: [128, 128, 0],
    orange: [255, 165, 0],
    pink: [255, 192, 203],
    purple: [128, 0, 128],
    red: [255, 0, 0],
    silver: [192, 192, 192],
    white: [255, 255, 255],
    yellow: [255, 255, 0]
};
jQuery.fx.parseColor = function (a, b) {
    if (jQuery.fx.namedColors[a]) return {
        r: jQuery.fx.namedColors[a][0],
        g: jQuery.fx.namedColors[a][1],
        b: jQuery.fx.namedColors[a][2]
    };
    else if (result = /^rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)$/.exec(a)) return {
        r: parseInt(result[1]),
        g: parseInt(result[2]),
        b: parseInt(result[3])
    };
    else if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)$/.exec(a)) return {
        r: parseFloat(result[1]) * 2.55,
        g: parseFloat(result[2]) * 2.55,
        b: parseFloat(result[3]) * 2.55
    };
    else if (result = /^#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/.exec(a)) return {
        r: parseInt("0x" + result[1] + result[1]),
        g: parseInt("0x" + result[2] + result[2]),
        b: parseInt("0x" + result[3] + result[3])
    };
    else if (result = /^#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/.exec(a)) return {
        r: parseInt("0x" + result[1]),
        g: parseInt("0x" + result[2]),
        b: parseInt("0x" + result[3])
    };
    else return b == true ? false: {
        r: 255,
        g: 255,
        b: 255
    }
};
jQuery.fx.cssProps = {
    borderBottomWidth: 1,
    borderLeftWidth: 1,
    borderRightWidth: 1,
    borderTopWidth: 1,
    bottom: 1,
    fontSize: 1,
    height: 1,
    left: 1,
    letterSpacing: 1,
    lineHeight: 1,
    marginBottom: 1,
    marginLeft: 1,
    marginRight: 1,
    marginTop: 1,
    maxHeight: 1,
    maxWidth: 1,
    minHeight: 1,
    minWidth: 1,
    opacity: 1,
    outlineOffset: 1,
    outlineWidth: 1,
    paddingBottom: 1,
    paddingLeft: 1,
    paddingRight: 1,
    paddingTop: 1,
    right: 1,
    textIndent: 1,
    top: 1,
    width: 1,
    zIndex: 1
};
jQuery.fx.colorCssProps = {
    backgroundColor: 1,
    borderBottomColor: 1,
    borderLeftColor: 1,
    borderRightColor: 1,
    borderTopColor: 1,
    color: 1,
    outlineColor: 1
};
jQuery.fx.cssSides = ['Top', 'Right', 'Bottom', 'Left'];
jQuery.fx.cssSidesEnd = {
    'borderWidth': ['border', 'Width'],
    'borderColor': ['border', 'Color'],
    'margin': ['margin', ''],
    'padding': ['padding', '']
};
jQuery.fn.extend({
    animate: function (b, c, d, f) {
        return this.queue(function () {
            var a = jQuery.speed(c, d, f);
            var e = new jQuery.fxe(this, a, b)
        })
    },
    pause: function (b, c) {
        return this.queue(function () {
            var a = jQuery.speed(b, c);
            var e = new jQuery.pause(this, a)
        })
    },
    stop: function (a) {
        return this.each(function () {
            if (this.animationHandler) jQuery.stopAnim(this, a)
        })
    },
    stopAll: function (a) {
        return this.each(function () {
            if (this.animationHandler) jQuery.stopAnim(this, a);
            if (this.queue && this.queue['fx']) this.queue.fx = []
        })
    }
});
jQuery.extend({
    pause: function (a, b) {
        var z = this,
        values;
        z.step = function () {
            if (jQuery.isFunction(b.complete)) b.complete.apply(a)
        };
        z.timer = setInterval(function () {
            z.step()
        },
        b.duration);
        a.animationHandler = z
    },
    easing: {
        linear: function (p, n, a, b, c) {
            return p * b + a
        },
        swing: function (p, n, a, b, c) {
            return (( - Math.cos(p * Math.PI) / 2) + 0.5) * b + a
        }
    },
    fxe: function (f, g, h) {
        var z = this,
        values;
        var y = f.style;
        var k = jQuery.css(f, "overflow");
        var l = jQuery.css(f, "display");
        var o = {};
        z.startTime = (new Date()).getTime();
        g.easing = g.easing && jQuery.easing[g.easing] ? g.easing: 'linear';
        z.getValues = function (a, b) {
            if (jQuery.fx.cssProps[a]) {
                if (b == 'show' || b == 'hide' || b == 'toggle') {
                    if (!f.orig) f.orig = {};
                    var r = parseFloat(jQuery.curCSS(f, a));
                    f.orig[a] = r && r > -10000 ? r: (parseFloat(jQuery.css(f, a)) || 0);
                    b = b == 'toggle' ? (l == 'none' ? 'show': 'hide') : b;
                    g[b] = true;
                    o[a] = b == 'show' ? [0, f.orig[a]] : [f.orig[a], 0];
                    if (a != 'opacity') y[a] = o[a][0] + (a != 'zIndex' && a != 'fontWeight' ? 'px': '');
                    else jQuery.attr(y, "opacity", o[a][0])
                } else {
                    o[a] = [parseFloat(jQuery.curCSS(f, a)), parseFloat(b) || 0]
                }
            } else if (jQuery.fx.colorCssProps[a]) o[a] = [jQuery.fx.parseColor(jQuery.curCSS(f, a)), jQuery.fx.parseColor(b)];
            else if (/^margin$|padding$|border$|borderColor$|borderWidth$/i.test(a)) {
                var m = b.replace(/\s+/g, ' ').replace(/rgb\s*\(\s*/g, 'rgb(').replace(/\s*,\s*/g, ',').replace(/\s*\)/g, ')').match(/([^\s]+)/g);
                switch (a) {
                case 'margin':
                case 'padding':
                case 'borderWidth':
                case 'borderColor':
                    m[3] = m[3] || m[1] || m[0];
                    m[2] = m[2] || m[0];
                    m[1] = m[1] || m[0];
                    for (var i = 0; i < jQuery.fx.cssSides.length; i++) {
                        var c = jQuery.fx.cssSidesEnd[a][0] + jQuery.fx.cssSides[i] + jQuery.fx.cssSidesEnd[a][1];
                        o[c] = a == 'borderColor' ? [jQuery.fx.parseColor(jQuery.curCSS(f, c)), jQuery.fx.parseColor(m[i])] : [parseFloat(jQuery.curCSS(f, c)), parseFloat(m[i])]
                    }
                    break;
                case 'border':
                    for (var i = 0; i < m.length; i++) {
                        var d = parseFloat(m[i]);
                        var e = !isNaN(d) ? 'Width': (!/transparent|none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset/i.test(m[i]) ? 'Color': false);
                        if (e) {
                            for (var j = 0; j < jQuery.fx.cssSides.length; j++) {
                                c = 'border' + jQuery.fx.cssSides[j] + e;
                                o[c] = e == 'Color' ? [jQuery.fx.parseColor(jQuery.curCSS(f, c)), jQuery.fx.parseColor(m[i])] : [parseFloat(jQuery.curCSS(f, c)), d]
                            }
                        } else {
                            y['borderStyle'] = m[i]
                        }
                    }
                    break
                }
            } else {
                y[a] = b
            }
            return false
        };
        for (p in h) {
            if (p == 'style') {
                var q = jQuery.parseStyle(h[p]);
                for (np in q) {
                    this.getValues(np, q[np])
                }
            } else if (p == 'className') {
                if (document.styleSheets) for (var i = 0; i < document.styleSheets.length; i++) {
                    var s = document.styleSheets[i].cssRules || document.styleSheets[i].rules || null;
                    if (s) {
                        for (var j = 0; j < s.length; j++) {
                            if (s[j].selectorText == '.' + h[p]) {
                                var u = new RegExp('\.' + h[p] + ' {');
                                var v = s[j].style.cssText;
                                var q = jQuery.parseStyle(v.replace(u, '').replace(/}/g, ''));
                                for (np in q) {
                                    this.getValues(np, q[np])
                                }
                            }
                        }
                    }
                }
            } else {
                this.getValues(p, h[p])
            }
        }
        y.display = l == 'none' ? 'block': l;
        y.overflow = 'hidden';
        z.step = function () {
            var t = (new Date()).getTime();
            if (t > g.duration + z.startTime) {
                clearInterval(z.timer);
                z.timer = null;
                for (p in o) {
                    if (p == "opacity") jQuery.attr(y, "opacity", o[p][1]);
                    else if (typeof o[p][1] == 'object') y[p] = 'rgb(' + o[p][1].r + ',' + o[p][1].g + ',' + o[p][1].b + ')';
                    else y[p] = o[p][1] + (p != 'zIndex' && p != 'fontWeight' ? 'px': '')
                }
                if (g.hide || g.show) for (var p in f.orig) if (p == "opacity") jQuery.attr(y, p, f.orig[p]);
                else y[p] = "";
                y.display = g.hide ? 'none': (l != 'none' ? l: 'block');
                y.overflow = k;
                f.animationHandler = null;
                if (jQuery.isFunction(g.complete)) g.complete.apply(f)
            } else {
                var n = t - this.startTime;
                var a = n / g.duration;
                for (p in o) {
                    if (typeof o[p][1] == 'object') {
                        y[p] = 'rgb(' + parseInt(jQuery.easing[g.easing](a, n, o[p][0].r, (o[p][1].r - o[p][0].r), g.duration)) + ',' + parseInt(jQuery.easing[g.easing](a, n, o[p][0].g, (o[p][1].g - o[p][0].g), g.duration)) + ',' + parseInt(jQuery.easing[g.easing](a, n, o[p][0].b, (o[p][1].b - o[p][0].b), g.duration)) + ')'
                    } else {
                        var b = jQuery.easing[g.easing](a, n, o[p][0], (o[p][1] - o[p][0]), g.duration);
                        if (p == "opacity") jQuery.attr(y, "opacity", b);
                        else y[p] = b + (p != 'zIndex' && p != 'fontWeight' ? 'px': '')
                    }
                }
            }
        };
        z.timer = setInterval(function () {
            z.step()
        },
        13);
        f.animationHandler = z
    },
    stopAnim: function (a, b) {
        if (b) a.animationHandler.startTime -= 100000000;
        else {
            window.clearInterval(a.animationHandler.timer);
            a.animationHandler = null;
            jQuery.dequeue(a, "fx")
        }
    }
});
jQuery.parseStyle = function (a) {
    var b = {};
    if (typeof a == 'string') {
        a = a.toLowerCase().split(';');
        for (var i = 0; i < a.length; i++) {
            rule = a[i].split(':');
            if (rule.length == 2) {
                b[jQuery.trim(rule[0].replace(/\-(\w)/g, function (m, c) {
                    return c.toUpperCase()
                }))] = jQuery.trim(rule[1])
            }
        }
    }
    return b
};
jQuery.fn.extend({
    ScrollTo: function (a, b, c) {
        o = jQuery.speed(a);
        return this.queue('interfaceFX', function () {
            new jQuery.fx.ScrollTo(this, o, b, c)
        })
    },
    ScrollToAnchors: function (a, b, c) {
        return this.each(function () {
            jQuery('a[@href*="#"]', this).click(function (e) {
                parts = this.href.split('#');
                jQuery('#' + parts[1]).ScrollTo(a, b, c);
                return false
            })
        })
    }
});
jQuery.fx.ScrollTo = function (e, o, a, b) {
    var z = this;
    z.o = o;
    z.e = e;
    z.axis = /vertical|horizontal/.test(a) ? a: false;
    z.easing = b;
    p = jQuery.iUtil.getPosition(e);
    s = jQuery.iUtil.getScroll();
    z.clear = function () {
        clearInterval(z.timer);
        z.timer = null;
        //jQuery.dequeue(z.e, 'interfaceFX')
		jQuery(e).dequeue('interfaceFX');
    };
    z.t = (new Date).getTime();
    s.h = s.h > s.ih ? (s.h - s.ih) : s.h;
    s.w = s.w > s.iw ? (s.w - s.iw) : s.w;
    z.endTop = p.y > s.h ? s.h: p.y;
    z.endLeft = p.x > s.w ? s.w: p.x;
    z.startTop = s.t;
    z.startLeft = s.l;
    z.step = function () {
        var t = (new Date).getTime();
        var n = t - z.t;
        var p = n / z.o.duration;
        if (t >= z.o.duration + z.t) {
            z.clear();
            setTimeout(function () {
                z.scroll(z.endTop, z.endLeft)
            },
            13)
        } else {
            if (!z.axis || z.axis == 'vertical') {
                if (!jQuery.easing || !jQuery.easing[z.easing]) {
                    st = (( - Math.cos(p * Math.PI) / 2) + 0.5) * (z.endTop - z.startTop) + z.startTop
                } else {
                    st = jQuery.easing[z.easing](p, n, z.startTop, (z.endTop - z.startTop), z.o.duration)
                }
            } else {
                st = z.startTop
            }
            if (!z.axis || z.axis == 'horizontal') {
                if (!jQuery.easing || !jQuery.easing[z.easing]) {
                    sl = (( - Math.cos(p * Math.PI) / 2) + 0.5) * (z.endLeft - z.startLeft) + z.startLeft
                } else {
                    sl = jQuery.easing[z.easing](p, n, z.startLeft, (z.endLeft - z.startLeft), z.o.duration)
                }
            } else {
                sl = z.startLeft
            }
            z.scroll(st, sl)
        }
    };
    z.scroll = function (t, l) {
        window.scrollTo(l, t)
    };
    z.timer = setInterval(function () {
        z.step()
    },
    13)
}