!function(e){jQuery.fn.menuzord=function(n){function i(n){"fade"==f.effect?e(n).children(".dropdown, .megamenu").stop(!0,!0).delay(f.showDelay).fadeIn(f.showSpeed).addClass(f.animation):e(n).children(".dropdown, .megamenu").stop(!0,!0).delay(f.showDelay).slideDown(f.showSpeed).addClass(f.animation)}function t(n){"fade"==f.effect?e(n).children(".dropdown, .megamenu").stop(!0,!0).delay(f.hideDelay).fadeOut(f.hideSpeed).removeClass(f.animation):e(n).children(".dropdown, .megamenu").stop(!0,!0).delay(f.hideDelay).slideUp(f.hideSpeed).removeClass(f.animation),e(n).children(".dropdown, .megamenu").find(".dropdown, .megamenu").stop(!0,!0).delay(f.hideDelay).fadeOut(f.hideSpeed)}function o(){e(g).find(".dropdown, .megamenu").hide(0),navigator.userAgent.match(/Mobi/i)||window.navigator.msMaxTouchPoints>0||"click"==f.trigger?(e(".menuzord-menu > li > a, .menuzord-menu ul.dropdown li a").bind("click touchstart",function(n){return n.stopPropagation(),n.preventDefault(),e(this).parent("li").siblings("li").find(".dropdown, .megamenu").stop(!0,!0).fadeOut(300),"none"==e(this).siblings(".dropdown, .megamenu").css("display")?(i(e(this).parent("li")),!1):(t(e(this).parent("li")),void(window.location.href=e(this).attr("href")))}),e(document).bind("click.menu touchstart.menu",function(n){0==e(n.target).closest(".menuzord").length&&e(".menuzord-menu").find(".dropdown, .megamenu").fadeOut(300)})):e(w).bind("mouseenter",function(){i(this)}).bind("mouseleave",function(){t(this)})}function d(){e(g).find(".dropdown, .megamenu").hide(0),e(g).find(".indicator").each(function(){e(this).parent("a").siblings(".dropdown, .megamenu").length>0&&e(this).bind("click",function(n){e(g).scrollTo({top:45,left:0},600),"A"==e(this).parent().prop("tagName")&&n.preventDefault(),"none"==e(this).parent("a").siblings(".dropdown, .megamenu").css("display")?(e(this).parent("a").siblings(".dropdown, .megamenu").delay(f.showDelay).slideDown(f.showSpeed),e(this).parent("a").parent("li").siblings("li").find(".dropdown, .megamenu").slideUp(f.hideSpeed)):e(this).parent("a").siblings(".dropdown, .megamenu").slideUp(f.hideSpeed)})})}function a(){var n=e(g).children("li").children(".dropdown, .megamenu");if(e(window).innerWidth()>v)for(var i=e(p).outerWidth(!0),t=0;t<n.length;t++)e(n[t]).parent("li").position().left+e(n[t]).outerWidth()>i?e(n[t]).css("right",0):((i==e(n[t]).outerWidth()||i-e(n[t]).outerWidth()<20)&&e(n[t]).css("left",0),e(n[t]).parent("li").position().left+e(n[t]).outerWidth()<i&&e(n[t]).css("right","auto"))}function r(){e(g).hide(0),e(m).show(0).click(function(){"none"==e(g).css("display")?e(g).slideDown(f.showSpeed):e(g).slideUp(f.hideSpeed).find(".dropdown, .megamenu").hide(f.hideSpeed)})}function s(){e(g).show(0),e(m).hide(0)}function l(){e(p).find("li, a").unbind(),e(document).unbind("click.menu touchstart.menu")}function u(){function n(n){var i=e(n).find(".menuzord-tabs-nav > li"),t=e(n).find(".menuzord-tabs-content");e(i).bind("click touchstart",function(n){n.stopPropagation(),n.preventDefault(),e(i).removeClass("active"),e(this).addClass("active"),e(t).hide(0),e(t[e(this).index()]).show(0)})}if(e(g).find(".menuzord-tabs").length>0)for(var i=e(g).find(".menuzord-tabs"),t=0;t<i.length;t++)n(i[t])}function c(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}function h(){if(a(),c()<=v&&b>v&&(l(),f.responsive?(r(),d()):o()),c()>v&&v>=y&&(l(),s(),o()),b=c(),y=c(),u(),/MSIE (\d+\.\d+);/.test(navigator.userAgent)&&c()<v){var n=new Number(RegExp.$1);8==n&&(e(m).hide(0),e(g).show(0),l(),o())}}var f;e.extend(f={showSpeed:300,hideSpeed:300,trigger:"hover",showDelay:0,hideDelay:0,effect:"fade",align:"left",responsive:!0,animation:"none",indentChildren:!0,indicatorFirstLevel:"+",indicatorSecondLevel:"+",scrollable:!0,scrollableMaxHeight:400},n);var m,p=e(this),g=e(p).children(".menuzord-menu"),w=e(g).find("li"),v=992,b=2e3,y=200;e(g).children("li").children("a").each(function(){e(this).siblings(".dropdown, .megamenu").length>0&&e(this).append("<span class='indicator'>"+f.indicatorFirstLevel+"</span>")}),e(g).find(".dropdown").children("li").children("a").each(function(){e(this).siblings(".dropdown").length>0&&e(this).append("<span class='indicator'>"+f.indicatorSecondLevel+"</span>")}),"right"==f.align&&e(g).addClass("menuzord-right"),f.indentChildren&&e(g).addClass("menuzord-indented"),f.responsive&&(e(p).addClass("menuzord-responsive").prepend("<a href='javascript:void(0)' class='showhide'><em></em><em></em><em></em></a>"),m=e(p).children(".showhide")),f.scrollable&&f.responsive&&e(g).css("max-height",f.scrollableMaxHeight).addClass("scrollable").append("<li class='scrollable-fix'></li>"),h(),e(window).resize(function(){h(),a()})}}(jQuery),function(e){"use strict";e(["jquery"],function(e){function n(n){return e.isFunction(n)||"object"==typeof n?n:{top:n,left:n}}var i=e.scrollTo=function(n,i,t){return e(window).scrollTo(n,i,t)};return i.defaults={axis:"xy",duration:parseFloat(e.fn.jquery)>=1.3?0:1,limit:!0},i.window=function(n){return e(window)._scrollable()},e.fn._scrollable=function(){return this.map(function(){var n=this,i=!n.nodeName||-1!=e.inArray(n.nodeName.toLowerCase(),["iframe","#document","html","body"]);if(!i)return n;var t=(n.contentWindow||n).document||n.ownerDocument||n;return/webkit/i.test(navigator.userAgent)||"BackCompat"==t.compatMode?t.body:t.documentElement})},e.fn.scrollTo=function(t,o,d){return"object"==typeof o&&(d=o,o=0),"function"==typeof d&&(d={onAfter:d}),"max"==t&&(t=9e9),d=e.extend({},i.defaults,d),o=o||d.duration,d.queue=d.queue&&d.axis.length>1,d.queue&&(o/=2),d.offset=n(d.offset),d.over=n(d.over),this._scrollable().each(function(){function a(e){l.animate(c,o,d.easing,e&&function(){e.call(this,u,d)})}if(null!=t){var r,s=this,l=e(s),u=t,c={},h=l.is("html,body");switch(typeof u){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(u)){u=n(u);break}if(u=h?e(u):e(u,this),!u.length)return;case"object":(u.is||u.style)&&(r=(u=e(u)).offset())}var f=e.isFunction(d.offset)&&d.offset(s,u)||d.offset;e.each(d.axis.split(""),function(e,n){var t="x"==n?"Left":"Top",o=t.toLowerCase(),m="scroll"+t,p=s[m],g=i.max(s,n);if(r)c[m]=r[o]+(h?0:p-l.offset()[o]),d.margin&&(c[m]-=parseInt(u.css("margin"+t))||0,c[m]-=parseInt(u.css("border"+t+"Width"))||0),c[m]+=f[o]||0,d.over[o]&&(c[m]+=u["x"==n?"width":"height"]()*d.over[o]);else{var w=u[o];c[m]=w.slice&&"%"==w.slice(-1)?parseFloat(w)/100*g:w}d.limit&&/^\d+$/.test(c[m])&&(c[m]=c[m]<=0?0:Math.min(c[m],g)),!e&&d.queue&&(p!=c[m]&&a(d.onAfterFirst),delete c[m])}),a(d.onAfter)}}).end()},i.max=function(n,i){var t="x"==i?"Width":"Height",o="scroll"+t;if(!e(n).is("html,body"))return n[o]-e(n)[t.toLowerCase()]();var d="client"+t,a=n.ownerDocument.documentElement,r=n.ownerDocument.body;return Math.max(a[o],r[o])-Math.min(a[d],r[d])},i})}("function"==typeof define&&define.amd?define:function(e,n){"undefined"!=typeof module&&module.exports?module.exports=n(require("jquery")):n(jQuery)});