jQuery(document).ready(function(t){t.fn.scrollBottom=function(){return t(document).height()-this.scrollTop()-this.height()},t(".x-btn-navbar, .x-btn-navbar-search, .x-btn-widgetbar").click(function(t){t.preventDefault()}),t('iframe[src*="youtube.com"]').each(function(){var n=t(this).attr("src");t(this).attr(t(this).attr("src").indexOf("?")>0?{src:n+"&wmode=transparent",wmode:"Opaque"}:{src:n+"?wmode=transparent",wmode:"Opaque"})}),t("body").on("click",".x-iso-container .flex-direction-nav a",function(){setTimeout(function(){$window.smartresize()},750)}),t("body.x-masonry-active").on("keyup",function(t){t.which>=37&&t.which<=40&&setTimeout(function(){$window.smartresize()},750)})}),jQuery(function(t){function n(t){t.addClass(u).siblings(r).removeClass(u),Modernizr&&Modernizr.touchevents&&(t.siblings(r).data(l,0),t.find("."+u).removeClass(u).data(l,0))}function a(t){t.find("."+u).removeClass(u)}function e(a){clearTimeout(d.id);var e=t(a.target).closest("li");e.hasClass("menu-item-has-children")&&n(e)}function o(n){clearTimeout(d.id);var e=t.contains(document.getElementsByClassName("x-nav-wrap desktop")[0],n.toElement),o=e?500:1e3,i=t(this).closest("ul");d.id=setTimeout(function(){a(i)},o)}function i(a){var e=t(a.target).closest("li");e.data(l,e.data(l)+1),e.hasClass("menu-item-has-children")&&1===e.data(l)&&(a.preventDefault(),a.stopPropagation(),n(e))}function s(){t(r).data(l,0),a(c)}var c=t(".desktop .x-nav"),r="li.menu-item-has-children",u="x-active",l="x-action",d={};Modernizr&&Modernizr.touchevents?(t(r).data(l,0),c.on("touchstart click",r,i),c.on("touchstart click",function(t){t.stopPropagation()}),t("body").on("touchstart click",s)):(c.hoverIntent({over:e,out:o,selector:r}),c.on("focusin",r,e),c.on("focusout",r,o));var f=t(".mobile .x-nav"),h=f.find("li.menu-item-has-children > a"),m=f.find(".sub-menu");h.each(function(n){t(this).append('<div class="x-sub-toggle" data-toggle="collapse" data-target=".sub-menu.sm-'+n+'"><span><i class="x-icon-angle-double-down" data-x-icon="&#xf103;"></i></span></div>')}),m.each(function(n){t(this).addClass("sm-"+n+" collapse")}),t(".x-sub-toggle").on("click",function(n){n.preventDefault(),t(this).toggleClass(u).closest("li").toggleClass(u)})}),jQuery(function(t){function n(){return t(".x-navbar-wrap").offset().top-t("#wpadminbar").outerHeight()}var a=t("body"),e=t(".x-navbar");if(a.hasClass("x-navbar-fixed-top-active")&&e.length>0){var o="";a.hasClass("x-boxed-layout-active")&&(o=" x-container max width"),t(window).scroll(function(){t(this).scrollTop()>=n()?e.addClass("x-navbar-fixed-top"+o):e.removeClass("x-navbar-fixed-top"+o)})}}),jQuery(function(t){function n(){e.toggleClass("in"),setTimeout(function(){o.val("")},350)}var a=t(".x-btn-navbar-search"),e=t(".x-searchform-overlay"),o=e.find(".search-query"),i=27;a.on("touchstart click",function(t){t.preventDefault(),e.toggleClass("in"),o.focus()}),e.on("touchstart click",function(a){t(a.target).hasClass("search-query")||n()}),t(document).keydown(function(t){t.which===i&&e.hasClass("in")&&n()})});