!function (e) { e.fn.extend({ mobilepanel: function (a) { var i = { panelLeft: "data-position", paneltype: "data-type", speed: 400, wrapperid: "#wrapper", cssmenu: ".menu-mobile", widthshow: 992, heightmo: !1, easing: null }, a = e.extend(i, a); return this.each(function () { function i(a, i) { a.hasClass("open") ? (b(), e("html,body").stop(!0, !0).animate({ scrollTop: 0 }, 200), e(i).after('
'), T.heightmo && k(i), o(i, !0, !0, !1, !1)) : o(i, !1, !1, !0, !1), e(".mask-panel[data-id='" + i + "']").click(function () { return o(i, !1, !1, !0, !0), e("html,body").stop(!0, !0).animate({ scrollTop: 0 }, 500), e(T.wrapperid).css("min-height", "100%"), y(), !1 }), e(i).find("[href='" + i + "']").click(function () { return o(i, !1, !1, !0, !0), e(T.wrapperid).css("min-height", "100%"), y(), !1 }) } function t(a) { e(T.wrapperid).css("min-height", e(window).height() + "px"), e(window).width() < T.widthshow & L.hasClass("open") ? (T.heightmo && k(a), s(a, !0, !0)) : s(a, !1, !1) } function s(a, i, t) { n(a, i), t ? e(".mask-panel[data-id='" + a + "']").show() : e(".mask-panel[data-id='" + a + "']").hide() } function o(a, i, t, s, o) { n(a, i), t ? e(T.wrapperid).addClass("overflow") : e(T.wrapperid).removeClass("overflow"), o && e("[href='" + a + "']").removeClass("open"), s && e(".mask-panel[data-id='" + a + "']").remove() } function n(a, i) { i ? e(a).addClass("mobile-active") : e(a).removeClass("mobile-active") } function r(a, i, t) { a.hasClass("open") ? (b(), e(i).after('
'), e("html,body").stop(!0, !0).animate({ scrollTop: 0 }, 10), T.heightmo && k(i), l(i, t, !0, !0, !1, !1)) : l(i, t, !1, !1, !0, !1), e(".mask-panel[data-id='" + i + "']").click(function () { return l(i, t, !1, !1, !0, !0), e("html,body").stop(!0, !0).animate({ scrollTop: 0 }, 500), e(T.wrapperid).css("min-height", "100%"), y(), !1 }), e(i).find("[href='" + i + "']").click(function () { return l(i, t, !1, !1, !0, !0), e(T.wrapperid).css("min-height", "100%"), y(), !1 }) } function p(a, i) { e(T.wrapperid).css("min-height", e(window).height() + "px"), e(window).width() < T.widthshow & L.hasClass("open") ? (T.heightmo && k(a), d(a, !0, !0, i)) : d(a, !1, !1, i) } function d(a, i, t, s) { h(a, i, s), t ? e(".mask-panel[data-id='" + a + "']").show() : e(".mask-panel[data-id='" + a + "']").hide() } function l(a, i, t, s, o, n) { s ? e(T.wrapperid).addClass("overflow") : e(T.wrapperid).removeClass("overflow"), h(a, t, i), n && e("[href='" + a + "']").removeClass("open"), o && e(".mask-panel[data-id='" + a + "']").remove() } function h(a, i, t) { var s = "mobile-active-right"; "true" == t.toLowerCase() && (s = "mobile-active-left"), i ? e(a).addClass("open-in").stop(!0, !0).animate({ opacity: 1 }, 10, function () { e("body").addClass(s) }) : e(a).removeClass("open-in").stop(!0, !0).animate({ opacity: 0 }, 10, function () { e("body").removeClass(s) }) } function m(a, i, t, s, o) { "true" == t.toLowerCase() ? e(i).css({ left: "-100%", right: "auto" }) : e(i).css({ left: "auto", right: "-100%" }), a.hasClass("open") && (b(), e("html,body").stop(!0, !0).animate({ scrollTop: 0 }, 200), e(i).after('
'), T.heightmo && k(i), u(i, t, "0", T.speed, E, !0, !1, !1, !1)), e(".mask-panel[data-id='" + i + "']").click(function () { return u(i, t, "-100%", T.speed, E, !1, !0, !0, !0), e("html,body").stop(!0, !0).animate({ scrollTop: 0 }, 500), e(T.wrapperid).css("min-height", "100%"), y(), !1 }), e(i).find("[href='" + i + "']").click(function () { return u(i, t, "-100%", T.speed, E, !1, !0, !0, !0), e(T.wrapperid).css("min-height", "100%"), y(), !1 }) } function c(a, i) { e(T.wrapperid).css("min-height", "100%"), e(window).width() < T.widthshow & L.hasClass("open") ? (T.heightmo && k(a), f(a, i, "0", T.speed, E, !1, !0, !1, !1, !0)) : f(a, i, "-100%", T.speed, E, !1, !0, !1, !1, !1) } function f(a, i, t, s, o, n, r, p, d, l) { u(a, i, t, s, o, n, r, p, d), l ? e(".mask-panel[data-id='" + a + "']").show() : e(".mask-panel[data-id='" + a + "']").hide() } function u(a, i, t, s, o, n, r, p, d) { n && e(T.wrapperid).addClass("overflow"), "TRUE" == i.toUpperCase() ? e(a).stop(!0, !0).animate({ left: t }, s, o, function () { r && e(T.wrapperid).removeClass("overflow"), d && e("[href='" + a + "']").removeClass("open"), p && e(".mask-panel[data-id='" + a + "']").remove() }) : e(a).stop(!0, !0).animate({ right: t }, s, o, function () { r && e(T.wrapperid).removeClass("overflow"), d && e("[href='" + a + "']").removeClass("open"), p && e(".mask-panel[data-id='" + a + "']").remove() }) } function w(a, i, t, s, o) { "true" == t.toLowerCase() ? e(i).css({ left: 0, right: "auto" }) : e(i).css({ left: "auto", right: 0 }), a.hasClass("open") && (b(), e("html,body").stop(!0, !0).animate({ scrollTop: 0 }, 200), e(i).after('
'), T.heightmo && k(i), g(i, t, "240px", T.speed, E, !0, !1, !1, !1)), e(".mask-panel[data-id='" + i + "']").click(function () { return g(i, t, "0", T.speed, E, !1, !0, !0, !0), e("html,body").stop(!0, !0).animate({ scrollTop: 0 }, 500), e(T.wrapperid).css("min-height", "100%"), y(), !1 }), e(i).find("[href='" + i + "']").click(function () { return g(i, t, "0", T.speed, E, !1, !0, !0, !0), e(T.wrapperid).css("min-height", "100%"), y(), !1 }) } function v(a, i) { e(T.wrapperid).css("min-height", "100%"), e(window).width() < T.widthshow & L.hasClass("open") ? (T.heightmo && k(a), C(name, i, "240px", T.speed, E, !0, !1, !1, !1, !0)) : C(name, i, "0", T.speed, E, !1, !0, !0, !0, !1) } function C(a, i, t, s, o, n, r, p, d, l) { g(a, i, t, s, o, n, r, p, d), l ? e(".mask-panel[data-id='" + a + "']").show() : e(".mask-panel[data-id='" + a + "']").hide() } function g(a, i, t, s, o, n, r, p, d) { e("body").removeClass("mobile-active-left mobile-active-right"), n && e(T.wrapperid).addClass("overflow"); var l; clearTimeout(l), l = setTimeout(function () { "true" == i.toLowerCase() ? (e("body").addClass("mobile-active-left"), e("#wrapper-in").css({ right: "auto", left: 0 }).stop(!0, !0).animate({ left: t }, s, o, function () { r && e(T.wrapperid).removeClass("overflow"), d && e("[href='" + a + "']").removeClass("open"), p && e(".mask-panel[data-id='" + a + "']").remove() })) : (e("body").addClass("mobile-active-right"), e("#wrapper-in").css({ left: "auto", right: 0 }).stop(!0, !0).animate({ right: t }, s, o, function () { r && e(T.wrapperid).removeClass("overflow"), d && e("[href='" + a + "']").removeClass("open"), p && e(".mask-panel[data-id='" + a + "']").remove() })), 0 == t ? e(a).removeClass("open-in").stop(!0, !0).animate({ opacity: 0 }, s) : e(a).addClass("open-in").stop(!0, !0).animate({ opacity: 1 }, s) }, 300) } function k(a) { var i = e(a).find(T.cssmenu).outerHeight(); if (i > e(document).height()) e(T.wrapperid).css("min-height", i + "px"); else { var t = e(a).find(".menu-mobile").outerHeight(); e(T.wrapperid).css("min-height", t + "px") } } function b() { "true" == z.toLowerCase() ? e("body").addClass("panel-overlay") : e("body").addClass("panel-reveal") } function y() { var a; clearTimeout(a), a = setTimeout(function () { e("body").removeClass("panel-overlay panel-reveal") }, 300) } var T = a, L = e(this), x = L.attr(T.panelLeft), z = L.attr(T.paneltype), P = function () { var e = document.createElement("div"), a = ["WebkitPerspective", "MozPerspective", "OPerspective", "msPerspective"]; for (var i in a) if (void 0 !== e.style[a[i]]) return !0; return !1 }(); if (T.easing) var E = T.easing; else var E = "swing"; P || ("true" == z ? e(".mobile-panel").css("left", "-100%") : e(name).removeClass("open-in").stop(!0, !0).animate({ opacity: 0 }, 0)), L.click(function (a) { e(this).toggleClass("open"); var s = e(this).attr("href"); return P ? "true" == z.toLowerCase() ? (i(e(this), s), e(window).resize(function () { t(s) })) : (r(e(this), s, x), e(window).resize(function () { p(s, x) })) : "true" == z.toLowerCase() ? (m(e(this), s, x, T.speed, E), e(window).resize(function () { c(s, x) })) : (w(e(this), s, x, T.speed, E), e(window).resize(function () { v(s, x) })), T.heightmo || e(s).find(".menu-in").stop(!0, !0).animate({ scrollTop: 0 }, 100), !1 }) }) } }) }(jQuery);