1require(['jquery', 'domReady!'], function ($) { 2 $(document).on({ 3 mouseenter: function () { 4 $(this).parents('#HearCountryMenu')?.find('#menu-country-toggle').click(); 5 }, 6 mouseleave: function () { 7 setTimeout(() => { 8 if(!$(this).parents('#HearCountryMenu').find('>div').hasClass('country-toggled')){ 9 $(this).parents('#HearCountryMenu')?.find('#menu-country-toggle').click(); 10 } 11 }, 100); 12 } 13 }, '#HearCountryMenu>button'); 14 $(document).on({ 15 mouseenter: function () { 16 $(this).addClass('country-toggled'); 17 }, 18 mouseleave: function () { 19 $(this).removeClass('country-toggled').parents('#HearCountryMenu')?.find('#menu-country-toggle').click(); 20 } 21 }, '#HearCountryMenu>div'); 22}); 23require(['jquery'], function($) { 24 25 $(document).ready(function (){ 26 $(".popupclose").click(function(){ 27 $("body").removeClass("open-popup-box"); 28 }); 29 $(".business-hours h4").click(function(){ 30 $(this).toggleClass("activeslide"); 31 $(this).next( "p").slideToggle("fast"); 32 }); 33 }); 34 35 $(document).mouseup(function(e) { 36 var popup = $('.mm-header .login-register-popup'); 37 if (!popup.is(e.target) && popup.has(e.target).length === 0) { 38 $('body').removeClass("showpopup"); 39 } 40 var popupSearchAutocomplete = $('.mm-header .mm-search'); 41 if (!popupSearchAutocomplete.is(e.target) && popupSearchAutocomplete.has(e.target).length === 0) { 42 if(typeof($("#minisearch-form-search input").val()) !== "undefined" && $("#minisearch-form-search input").val().length === 0){ 43 $("#custom-search").hide(); 44 } 45 $('#search_autocomplete').hide(); 46 } 47 }); 48 if($( window ).width() > 1280){ 49 /*if (!$("body").hasClass("customer-account-login")) { 50 $('.mm-header .showLoginPopup').mouseover(function() { 51 if (!$("body").hasClass("showpopup")) { 52 setTimeout(function(){ 53 $('body').addClass("showpopup"); 54 },0); 55 } 56 }); 57 } 58 $('.mm-header .showLoginPopup').mouseout(function() { 59 $('body').removeClass("showpopup"); 60 });*/ 61 if (!$("body").hasClass("customer-account-login")) { 62 $(".mm-header .showLoginPopup").hover(function(){ 63 if (!$("body").hasClass("showpopup")) { 64 $('body').addClass("showpopup"); 65 } 66 /* ajax google recaptcha - Added By MM-Suresh Jadav */ 67 if ($('#field-recaptcha-customer_login').is(':empty')){ 68 var loginButton = $('.popup-login-form').find('button[type=submit]'); 69 loginButton.attr("disabled", "disabled"); 70 71 $('.field-recaptcha-customer_login').remove(); 72 var number = 1 + Math.floor(Math.random() * 60); 73 $new_captchaElement = '<div class="field-recaptcha field-recaptcha-customer_login" id="field-recaptcha-customer_login_'+number+'"></div>'; 74 $($new_captchaElement).insertBefore($("#inline-badge-customer_login")); 75 76 $.ajax({ 77 url: '/ajaxrecaptcha/ajaxform/recaptcha', 78 data: {enableFor: 'customer_login'}, 79 type: "POST" 80 }).error(function (error){ 81 console.log(error); 82 }).done(function (data) { 83 $('.login-register-popup #popup-login-form #inline-badge-customer_login').html(data); 84 dataForm = $('.login-register-popup #popup-login-form'); 85 dataForm.mage('validation', {}); 86 var s = document.createElement("script"); 87 s.src = "https://www.google.com/recaptcha/api.js?render=explicit&onload=headerPopupRecaptcha"; 88 $("head").append(s); 89 setTimeout(function () { 90 loginButton.removeAttr('disabled'); 91 }, 3000); 92 }); 93 } 94 }, function(){ 95 if($('.popup-login-form .form-group.focused').length == 0){ 96 $('body').removeClass("showpopup"); 97 } 98 }); 99 }; 100 /*$('.mm-header .showLoginPopup').mouseout(function() { 101 $('body').removeClass("showpopup"); 102 });*/ 103 }else{ 104 105 if (!$("body").hasClass("customer-account-login")) { 106 $('.mm-header .loginPopup').click(function() { 107 $('body').addClass("showpopup"); 108 109 /* ajax google recaptcha - Added By MM-Suresh Jadav */ 110 if ($('#field-recaptcha-customer_login').is(':empty')){ 111 var loginButton = $('.popup-login-form').find('button[type=submit]'); 112 loginButton.attr("disabled", "disabled"); 113 114 $('.field-recaptcha-customer_login').remove(); 115 var number = 1 + Math.floor(Math.random() * 60); 116 $new_captchaElement = '<div class="field-recaptcha field-recaptcha-customer_login" id="field-recaptcha-customer_login_'+number+'"></div>'; 117 $($new_captchaElement).insertBefore($("#inline-badge-customer_login")); 118 119 $.ajax({ 120 url: '/ajaxrecaptcha/ajaxform/recaptcha', 121 data: {enableFor: 'customer_login'}, 122 type: "POST" 123 }).error(function (error){ 124 console.log(error); 125 }).done(function (data) { 126 $('.login-register-popup #popup-login-form #inline-badge-customer_login').html(data); 127 dataForm = $('.login-register-popup #popup-login-form'); 128 dataForm.mage('validation', {}); 129 var s = document.createElement("script"); 130 s.src = "https://www.google.com/recaptcha/api.js?render=explicit&onload=headerPopupRecaptcha"; 131 $("head").append(s); 132 setTimeout(function () { 133 loginButton.removeAttr('disabled'); 134 }, 3000); 135 }); 136 } 137 138 }); 139 140 $('.mm-header .loggedInUser').click(function() { 141 $('body').addClass("showpopup"); 142 }); 143 } 144 } 145 146 $( window ).on("load", function() { 147 setTimeout(function(){ 148 if($('.ribbon-banner-text').length){ 149 $('body').addClass('top-bar-height'); 150 }else{ 151 $('body').removeClass('top-bar-height'); 152 } 153 }, 1000); 154 }); 155 156 $(document).on("click",".close-topbar",function(){ 157 $('body').removeClass('top-bar-height'); 158 }); 159 160 $(document).mouseup(function(e) { 161 var popup = $('.mm-header .popupbox'); 162 if (!popup.is(e.target) && popup.has(e.target).length === 0) { 163 $('body').removeClass("open-popup-box"); 164 } 165}); 166 167 $(window).scroll(function(){ 168 if ($(window).scrollTop() > 117) { 169 $('body').addClass('fixed-header'); 170 } 171 else { 172 $('body').removeClass('fixed-header'); 173 } 174 }); 175 176 $(document).ready(function (){ 177 if ($(window).scrollTop() > 117) { 178 $('body').addClass('fixed-header'); 179 } 180 else { 181 $('body').removeClass('fixed-header'); 182 } 183 }); 184 185 $('#opensearcharea').on("click", function() { 186 $('body .page-header.amsearch-full-width button.amsearch-button.-full-search').trigger('click'); 187 }); 188 189 $(document).ready(function() { 190 let previousScrollTop = 0; 191 const MobileToggle = $('body'); 192 193 function handleScroll() { 194 let currentScroll = $(this).scrollTop(); 195 196 if (currentScroll === 0) { 197 MobileToggle.removeClass('scroll-up scroll-down'); 198 } else if (currentScroll > previousScrollTop) { 199 MobileToggle.removeClass('scroll-up').addClass('scroll-down'); 200 } else { 201 MobileToggle.removeClass('scroll-down').addClass('scroll-up'); 202 } 203 204 previousScrollTop = currentScroll <= 0 ? 0 : currentScroll; 205 } 206 207 $(window).on('scroll', handleScroll); 208 }); 209 210});
211/* This is test comment for Blog page issue */
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.