PageSourceSearch

https://jasper.co.za/Webmodules/menubuilder/Onsite/menuStyle/stand…/menu.min.js?t=11/12/2025%204:28:08%20PM

js jasper.co.za collected 2026-10-08 05:52:10 UTC 13,878 bytes, 1 lines download raw bytes

1!function(factory){"use strict";"function"==typeof define&&define.amd?define(["jquery"],factory):"undefined"!=typeof exports?module.exports=factory(require("jquery")):factory(jQuery)}((function($){"use strict";var MenuBuilder=window.MenuBuilder||{};(MenuBuilder=class MenuBuilder{constructor(element,settings){var dataSettings,_=this;_.defaults={isMobile:null,mainsubmenu:"standard",responsive:"hamburger",move:"normal",padding:"off"},_.userAgent=navigator.userAgent,_.isMobile=/(Mobile|Android|IPhone|IPad|Windows Phone)/.test(_.userAgent),_.$Elm=$(element),$("div:not(.top-bar) .logo:not(nav#mb_menu_ctn .mb_logo, [data-original]):not(), .logo:not(nav#mb_menu_ctn .mb_logo, [data-original]), .logo[data-original]:not(nav#mb_menu_ctn .mb_logo) >a ,body.kenesis-body > .logo ").hide(),$(_.$Elm).closest(".topnav").addClass("topnavmenu").removeClass("topnav"),_.windowWidth=window.innerWidth,_.windowHeight=window.outerHeight,$(_.$Elm).css({maxWidth:_.windowWidth+"px"}),_.setScreenOffset(),_.elmWidth=$(_.$Elm).width(),_.$MenuCtn=$(_.$Elm).find(".mb_menu_item_ctn"),_.$ElmLogo=$(_.$MenuCtn).find(".mb_logo"),_.hamburgerMenuShow=!1,_.$mobileElm=$(_.$Elm).find(".mb_ul"),_.NavHeight=$(_.$Elm).height(),_.showMenu2=[],_.showMenu3=[],_.Align=$(_.$Elm).attr("data-align"),_.isOverlap=!1,dataSettings=$(element).data("standardmenu")||{},_.options=$.extend({},_.defaults,settings,dataSettings),_.WinResize=null,_.isMobileHeightSet=!1,_.$lastMainLi=_.isMobile?null:$(_.$Elm).find(".mb_ul > ul:last-child > li:last-child")[0].getBoundingClientRect(),_.init(!0)}}).prototype.init=function(creation){var _=this;$(_.$Elm).hasClass("menu_initialized")||($(_.$Elm).addClass("menu_initialized"),_.searchActivePage(),_.LogoWidth(),_.isOverlapping(),$(_.$Elm).attr("data-mobile",_.isMobile),$(".mobile-menu").remove(),$('link[href$="/Menu/Global.min.css"]').remove(),$('link[href$="/Menu/global.css"]').remove(),$('link[href$="/Menu/additions.min.css"]').remove(),_.eventListener(),_.hamburgerEvent(),_.addPadding(),setTimeout((()=>{_.levelsShowArr()}),1500))},MenuBuilder.prototype.addPadding=function(){var _=this;"off"!=_.options.padding&&(_.NavHeight=$(_.$Elm).height(),$(_.$Elm).closest(".internal").css({height:"0px","margin-bottom":_.NavHeight+"px"}))},MenuBuilder.prototype.searchActivePage=function(){var _=this,pageName=window.location.pathname.replace(/\/.*\/(.*).asp/g,"$1");pageName="/"==pageName||"Default"==pageName||"/Default.asp"==pageName?"Home":pageName.replace(/-/g," "),_.setActivePage(pageName),_.MainActive=$(_.$Elm).find("li[data='"+pageName+"']"),$(_.MainActive).parents().hasClass("mb_ul_3")?_.searchParentActive(3):$(_.MainActive).parents().hasClass("mb_ul_2")&&_.searchParentActive(2)},MenuBuilder.prototype.setActivePage=function(pname){$(this.$Elm).find("li[data='"+pname+"']").addClass("active")},MenuBuilder.prototype.searchParentActive=function(level){var _=this;if(1!=level){var clasz=3==level?"mb_ul_3":"mb_ul_2";if($(_.MainActive).parents().hasClass(clasz)){var sub2_Name=$(_.MainActive).closest("."+clasz).attr("data");_.setActivePage(sub2_Name),_.searchParentActive(level-1)}}},MenuBuilder.prototype.addPadding=function(){var _=this;"off"!=_.options.padding&&(_.NavHeight=$(_.$Elm).height(),$(_.$Elm).closest(".internal").css({height:"0px","margin-bottom":_.NavHeight+"px"}))},MenuBuilder.prototype.LogoWidth=function(){var _=this;const computedStyles=getComputedStyle($(_.$Elm)[0]);var logoW=parseInt(computedStyles.getPropertyValue("--logo-w")),pos=$(_.$Elm).find(".logo_ctn").attr("data-pos"),navW=$(_.$Elm).width(),newLogoW=100*logoW/navW;if($(_.$MenuCtn).find("> div.logo_ctn").width(newLogoW+"%"),(_.isMobile||_.isOverlap)&&setTimeout((()=>{var widAdd=$(_.$MenuCtn).find("> div.mb_add_in_menu").length>0?150:0;$(_.$MenuCtn).find("> div.logo_ctn").width(navW-60-widAdd+"px")}),1e3),"middle"!=pos)if($(_.$MenuCtn).find("> div.mb_add_in_menu").length>0){var inmenuW=$(_.$MenuCtn).find("> .mb_add_in_menu").width();$(_.$MenuCtn).find("> div.mb_ul").css({width:"calc("+(110-newLogoW)+"% - "+inmenuW+"px)"})}else $(_.$MenuCtn).find("> div.mb_ul").width(100-newLogoW+"%")},MenuBuilder.prototype.levelsShowArr=function(){var _=this;$(_.$Elm).find(".mb_ul_2").each(((idx,elm)=>
1{var elm3=$(elm).find("> .scroll_ctn"),data=elm3[0].getBoundingClientRect(),extraH=parseInt(window.getComputedStyle(elm3[0])["margin-top"])+parseInt(window.getComputedStyle(elm3[0])["margin-bottom"]),itemdata=elm.dataset,name=$(elm).attr("data");_.showMenu2.push({name:name,sub:itemdata.sub,show:!1,height:data.height+extraH,leave:null})})),$(_.$Elm).find(".mb_ul_3").each(((idx,elm)=>{var itemdata=elm.dataset,name=$(elm).attr("data");_.showMenu3.push({name:name,sub:itemdata.sub,show:!1})})),_.assignEvents()},MenuBuilder.prototype.assignEvents=function(){this.SetLevel2MaxHeight()},MenuBuilder.prototype.eventListener=function(){var _=this;"shrink"==_.options.move&&_.shrinkEvent(_.NavHeight,!1),$(window).on("resize",(()=>{_.WinResize&&(clearInterval(_.WinResize),_.WinResize=null),_.elmWidth=$(_.$Elm).width(),_.windowHeight=window.outerHeight,_.WinResize=setTimeout((()=>{_.hamburgerEvent(),_.addPadding(),_.assignEvents()}),1e3)}))},MenuBuilder.prototype.hamburgerEvent=function(){var _=this;if($(_.$Elm).attr({"data-isresponsive":_.isMobile||_.isOverlap}),_.isMobile||_.isOverlap){_.setMobileMaxHeight(),$(_.$Elm).find(".mb_ul").attr("data-hover",!1),("hamburger"==_.options.responsive||_.isMobile)&&($(_.$mobileElm).attr("aria-hidden",_.hamburgerMenuShow),$(_.$Elm).off("click tap","#nav-icon2").on("click tap","#nav-icon2",(function(){_.hamburgerMenuShow=$(_.$Elm).hasClass("open");var action=_.hamburgerMenuShow?"removeClass":"addClass";$(_.$Elm)[action]("open"),$(_.$mobileElm).attr("aria-hidden",_.hamburgerMenuShow),$(this).attr("aria-expanded",_.hamburgerMenuShow)})));var mainUls=$(_.$Elm).find("> .mb_menu_item_ctn >.mb_ul > ul");$(_.$Elm).off("click tap","button.expander").on("click tap","button.expander",(function(evt){evt.preventDefault(),evt.stopPropagation();var elmP=$(this).closest("li"),action=$(elmP).hasClass("open")?"removeClass":"addClass";"addClass"==action&&($(mainUls).find("li").removeClass("open"),$(elmP).parents("li")[action]("open")),$(this).closest("li")[action]("open")}))}else $(_.$Elm).off("click tap","#nav-icon2"),$(_.$Elm).off("click tap","button.expander"),$(_.$Elm).find(".mb_ul").attr("data-hover",!0).css({maxHeight:"unset"})},MenuBuilder.prototype.setMobileMaxHeight=function(){var _=this;if(!_.isMobileHeightSet){_.isMobileHeightSet=!0;var mainData=$(_.$Elm).find(".mb_ul")[0].getBoundingClientRect();$(_.$Elm).find(".mb_ul").css({maxHeight:_.windowHeight-mainData.bottom-120})}},MenuBuilder.prototype.isMenuMobile=function(){var a,check=!1;return a=this.options.isMobile||this.userAgent||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
1sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))&&(check=!0),check},MenuBuilder.prototype.getTranslateY=function({elm:elm}){const transform=$(elm).css(["transform"]);if(!transform||"none"===transform)return 0;const matrix=transform.match(/matrix(?:3d)?\((.+)\)/);if(matrix){const values=matrix[1].split(",").map(Number);return 6===values.length?values[5]:values[13]}return 0},MenuBuilder.prototype.SetLevel2MaxHeight=function(){var addtop,_=this,extrah=70,topAdditionElm=$(_.$Elm).find(">.mb_add_menu_ctn:first-child");topAdditionElm.length>0&&(addtop=topAdditionElm[0].getBoundingClientRect()),_.isMobile||_.isOverlap||$(_.$MenuCtn).find('ul[role="menubar"] > li:not([data-t="product"]):has(>.mb_ul_2)').each(((idx,elm)=>{var hasLevel3=$(elm).find(">.mb_ul_2 .mb_ul_3").length>0,elmPos=$(elm).find(">.mb_ul_2").position(),l2Data=$(elm).find(">.mb_ul_2>div>ul")[0].getBoundingClientRect(),currentheight=topAdditionElm.length>0?addtop.height:0;l2Data.height+elmPos.top+_.ScreenTop+currentheight>_.windowHeight&&(extrah+=elmPos.top+_.ScreenTop+currentheight,$(elm).find(">.mb_ul_2").attr({"data-over":!0}).css({maxHeight:"calc(100dvh - "+extrah+"px)",width:"auto"})),hasLevel3&&_.level2Event($(elm).find(">.mb_ul_2:has(.mb_ul_3)"))}))},MenuBuilder.prototype.level2Event=function(elmP){var _=this;$(elmP).each(((idx,elm)=>{$(elm).find("li:has(div.mb_ul_3)").off("mouseenter").on("mouseenter",(function(){var rectData1=this.getBoundingClientRect(),obj=($(this).find("div.mb_ul_3")[0].getBoundingClientRect(),"right"==_.Align?{top:rectData1.top,left:rectData1.right-rectData1.width}:{top:rectData1.top,left:rectData1.left+rectData1.width});$(this).find("div.mb_ul_3").css(obj),_.SetLevel3MaxHeight($(elmP))}))}))},MenuBuilder.prototype.SetLevel3MaxHeight=function(elmP){var _=this,extrah=70;$(elmP).find("li:has(>.mb_ul_3)").each(((idx,elm)=>{var ulElm=$(elm).find(".mb_ul_3>div>ul"),elmPos=$(elm).find(">.mb_ul_3").position();ulElm.height+elmPos.top+_.ScreenTop>_.windowHeight&&(extrah+=elmPos.top+_.ScreenTop,$(elm).find(">.mb_ul_3").attr({"data-over":!0}).css({maxHeight:"calc(100dvh - "+extrah+"px)",width:"auto"}))}))},MenuBuilder.prototype.level3Direction=function({elm:elm,elmP:elmP,ulElm:ulElm}){var l2Data=$(elmP)[0].getBoundingClientRect(),liData=$(elm)[0].getBoundingClientRect();switch(!0){case liData.top<l2Data.top:$(elm).find(".mb_ul_3").attr("data-showdir","down");break;case l3Data.top>l2Data.top+l2Data.height:$(elm).find(".mb_ul_3").attr("data-showdir","up");break;case liData.top+l3Data.height>l2Data.top+l2Data.height:$(elm).find(".mb_ul_3").attr("data-showdir","up");break;case liData.top+l3Data.height<l2Data.top+l2Data.height&&liData.top>l2Data.top:$(elm).find(".mb_ul_3").attr("data-showdir","down")}},MenuBuilder.prototype.setScreenOffset=function(){this.ScreenTop=$("body").offset().top},MenuBuilder.prototype.shrinkEvent=function(ctnHeight,reset){var _=this,$fwindow=$(window),scrollTop=window.pageYOffset||document.documentElement.scrollTop,isOver=!1;$fwindow.on("scroll resize",(function(){scrollTop=window.pageYOffset||document.documentElement.scrollTop,$(_.$Elm).mouseover((function(){isOver||(isOver=!0)})),$(_.$Elm).mouseout((function(){isOver&&(isOver=!1)}))})),$(_.$MenuCtn).each((function(index,evt){var newHeight,$contentObj=$(this),height=ctnHeight,speed=$contentObj.data("speed")||5.2;_.isMobile||$fwindow.on("scroll resize",(function(){40==(newHeight=height-scrollTop/speed<40?40:height-scrollTop/speed)?isOver||$(_.$Elm).find(">.mb_add_menu_ctn").slideUp():newHeight>40&&$(_.$Elm).find(">.mb_add_menu_ctn").slideDown(),$($contentObj).css({height:reset?height:newHeight,maxHeight:reset?height:newHeight})}))})),$(_.$ElmLogo).each((function(index,e){var $logo=$(this);const props=$($logo).css(["height","width","margin-top","margin-bottom"]);var height=parseInt(props.height),width=parseInt(props.width),marginTop=parseInt(props["margin-top"]),marginbottom=parseInt(props["margin-bottom"]);$fwindow.on("scroll resize",(function(){var newWidth=width-scrollTop/5.2<160?160:width-scrollTop/5.2,newHeight=height-scrollTop/5.2<40?40:height-scrollTop/5.2,newmarginTop=marginTop-scrollTop/26<0?0:marginTop-scrollTop/26,newmarginBottom=marginbottom-scrollTop/26<0?0:marginbottom-scrollTop/26;$($logo).css({width:$(window).width()<900?newWidth-50+"px":"100%",height:newHeight,"margin-top":ne
1wmarginTop,"margin-bottom":newmarginBottom})}))})),$fwindow.trigger("scroll")},MenuBuilder.prototype.isOverlapping=function(){var _=this;if(_.$lastMainLi){let el2=$(_.$Elm)[0];if($(_.$Elm).find(".mb_ul + div").length>0){let el3=$(_.$Elm).find(".mb_ul + div")[0];const rect2=el2.getBoundingClientRect(),rect3=el3.getBoundingClientRect();_.isOverlap=parseInt(_.$lastMainLi.right)>parseInt(rect3.left)||parseInt(rect3.right)>parseInt(rect2.right)}else{const rect2=el2.getBoundingClientRect();_.isOverlap=parseInt(_.$lastMainLi.right)>parseInt(rect2.right)}}},$.fn.StandHorStandMenu=function(){var i,ret,_=this,opt=arguments[0],args=Array.prototype.slice.call(arguments,1),l=_.length;for(i=0;i<l;i++)if("object"==typeof opt||void 0===opt?_[i].StandHorStandMenu=new MenuBuilder(_[i],opt):ret=_[i].StandHorStandMenu[opt].apply(_[i].StandHorStandMenu,args),void 0!==ret)return ret}}));

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.