1 2(function($){var windowSel=$(window);var bodySel=$('body');var fixedSel=$('.mkhb-fixed');var stickySel=$('.mkhb-sticky');var normalRespNav=$('.mkhb-navigation-resp__normal');var stickyRespNav=$('.mkhb-navigation-resp__sticky');var windowHeight=windowSel.height();var adminBarHeight=0;function mkhbGetOffset(offset,device){var deviceEl=$('.mkhb-'+device);var $deviceHeight=deviceEl.height();var $offset=0;if(typeof offset==='string'&&offset!=='header'){$offset=Math.round((parseInt(offset)/100)*windowHeight)}else if(typeof offset==='number'){$offset=parseInt(offset)} 3if(0==$offset||isNaN($offset)){$offset=$deviceHeight;if(deviceEl.hasClass('mkhb-overlap')){$offset=deviceEl.children('.mkhb-device-container').height()}} 4if($deviceHeight>$offset){$offset=$deviceHeight} 5return $offset} 6function mkhbUpdateTop(){adminBarHeight=$('#wpadminbar').height();adminBarHeight=(adminBarHeight==null)?0:adminBarHeight} 7function mkhbSetFixedHeight(selector){selector.each(function(e){var thisSel=$(this);if(!thisSel.hasClass('mkhb-overlap')){var childHeight=thisSel.children('.mkhb-device-container').height();thisSel.height(childHeight)}})} 8function mkhbSlideDown(current,offset,device,curHeight){var onScroll=function onScroll(){var addOffset=mkhbAddRespNormal(offset,device);if(windowSel.scrollTop()>addOffset){current.css({'top':adminBarHeight});current.addClass('mkhb-sticky--active')}
8else{current.css({'top':-curHeight});current.removeClass('mkhb-sticky--active');mkhbHideRespBurger()}};onScroll();windowSel.on('scroll',onScroll)} 9function mkhbLazy(current,offset,device,curHeight){var lastScrollPos=0;var onScroll=function onScroll(){var addOffset=mkhbAddRespNormal(offset,device);var scrollPos=windowSel.scrollTop();if(scrollPos>addOffset&&scrollPos<lastScrollPos){current.css({'top':adminBarHeight});current.addClass('mkhb-sticky--active')}else{current.css({'top':-curHeight});current.removeClass('mkhb-sticky--active');mkhbHideRespBurger()} 10lastScrollPos=scrollPos};onScroll();windowSel.on('scroll',onScroll)} 11function mkhbHideRespBurger(){if(stickyRespNav.length<=0){return} 12if($('body[class*="mkhb-navigation-resp--opened"]')<=0){return} 13stickyRespNav.each(function(){var wrap=$(this);var id=wrap.attr('id').replace('-wrap','');var current=$('#'+id).find('.mkhb-navigation-resp');if(bodySel.hasClass('mkhb-navigation-resp--opened-'+id)){current.removeClass('is-active').find('.mkhb-navigation-resp__container').removeClass('fullscreen-active');bodySel.removeClass('mkhb-navigation-resp--opened-'+id).addClass('mkhb-navigation-resp--closed-'+id).trigger('mkhb-navigation-resp--closed-'+id);wrap.hide()}})} 14function mkhbAddRespNormal(offset,device){if(normalRespNav.length<=0){return offset} 15if($('body[class*="mkhb-navigation-resp--opened"]')<=0){return offset} 16var deviceEl=$('.mkhb-'+device);var deviceHeight=deviceEl.height();normalRespNav.each(function(){var current=$(this);var height=current.height();var id=current.attr('id').replace('-wrap','');if(bodySel.hasClass('mkhb-navigation-resp--opened-'+id)){var newOffset=deviceHeight+parseInt(height);if(newOffset>offset){offset=newOffset} 17return offset}});return offset} 18var resizeHeader=function resizeHeader(){var fixedRsz=$('.mkhb-fixed');if(fixedRsz.length>0){mkhbSetFixedHeight(fixedRsz)}} 19if(fixedSel.length>0){mkhbSetFixedHeight(fixedSel);windowSel.on('resize',resizeHeader)} 20var initialAction=function initialAction(){if(stickySel.length>0){stickySel.each(function(e){var current=$(this);var offset=current.data('offset');var device=current.data('device');offset=mkhbGetOffset(offset,device);mkhbUpdateTop();var curHeight=current.height();
20current.css({'top':-curHeight});var effect=current.data('effect');if(effect=='slide-down'){mkhbSlideDown(current,offset,device,curHeight)}else if(effect=='lazy'){mkhbLazy(current,offset,device,curHeight)}})}} 21windowSel.on('load',initialAction);windowSel.on('resize',mkhbUpdateTop)})(jQuery); 22 23
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.