1InitMenuNavigationAim = function () { 2 var $block = $(".menu-navigation__sections-wrapper .menu-navigation__sections:not(.aim-init)"); 3 if ($block.length) { 4 $block.addClass("aim-init"); 5 loadScripts(arAsproOptions["SITE_TEMPLATE_PATH"] + "/vendor/js/jquery.menu-aim.js", function () { 6 $block.menuAim({ 7 firstActiveRow: true, 8 rowSelector: "> .menu-navigation__sections-item", 9 activate: function activate(a) { 10 var _this = $(a), 11 index = _this.index(), 12 items = _this.closest(".menu-navigation__sections-wrapper").next(), 13 link = _this.find("> a"); 14 15 _this.siblings().find("> a").addClass("dark_link"); 16 link.addClass("colored_theme_text").removeClass("dark_link"); 17 items.find(".parent-items").siblings().hide(); 18 items.find(".parent-items").eq(index).show(); 19 }, 20 deactivate: function deactivate(a) { 21 var _this = $(a), 22 index = _this.index(), 23 items = _this.closest(".menu-navigation__sections-wrapper").next(), 24 link = _this.find("> a"); 25 26 link.removeClass("colored_theme_text").addClass("dark_link"); 27 items.find(".parent-items").siblings().hide(); 28 }, 29 }); 30 }); 31 } 32}; 33 34readyDOM(function () { 35 window.asproAllProgressBar = document.querySelectorAll(".header-progress-bar__inner"); 36}); 37 38/*progress bar in header*/ 39function updateProgressBar() { 40 let allProgressBar = typeofExt(window.asproAllProgressBar) === "nodelist" ? window.asproAllProgressBar : false; 41 if (allProgressBar && allProgressBar.length) { 42 let scrollHeight = Math.max( 43 document.body.scrollHeight, 44 document.documentElement.scrollHeight, 45 document.body.offsetHeight, 46 document.documentElement.offsetHeight, 47 document.body.clientHeight, 48 document.documentElement.clientHeight 49 ); 50 let scrollTop = window.pageYOffset || document.documentElement.scrollTop; 51 let clientHeight = document.documentElement.clientHeight; 52 let scrollProcent = Math.round((scrollTop / (scrollHeight - clientHeight)) * 100); 53 if (allProgressBar.length) { 54 for (let item = 0; item < allProgressBar.length; item++) { 55 allProgressBar[item].style.width = scrollProcent + "%"; 56 } 57 } 58 } 59} 60/**/ 61 62$(document).ready(function () { 63 //dropdown-select 64 $(document).on("click", ".dropdown-select .dropdown-select__title", function () { 65 var _this = $(this), 66 menu = _this.parent().find("> .dropdown-select__list"); 67 68 menu.stop().slideToggle(300); 69 _this.toggleClass('dropdown-select__title--opened'); 70 }); 71 72 // close select 73 $("html, body").on("mousedown", function (e) { 74 if (typeof e.target.className == "string" && e.target.className.indexOf("adm") < 0) { 75 e.stopPropagation(); 76 if (!$(e.target).closest(".dropdown-select").length) { 77 BX.onCustomEvent("onCloseDropDown"); 78 } 79 80 } 81 }); 82 BX.addCustomEvent("onCloseDropDown", () => { 83 $(".dropdown-select .dropdown-select__title").removeClass('dropdown-select__title--opened'); 84 $(".dropdown-select__list:visible").stop().slideUp(); 85 }) 86 /**/ 87 88 /*side head block*/ 89 $(document).on("click", ".slide-block .slide-block__head", function (e) { 90 var _this = $(this), 91 menu = _this.siblings(".slide-block__body"), 92 bVisibleMeu = menu.is(":visible"), 93 animate = bVisibleMeu ? "slideUp" : "slideDown"; 94 95 if (!_this.hasClass("clicked") && menu.length && !_this.hasClass("ignore") && !$(e.target).attr("href")) { 96 var type = _this.data("id"); 97 _this.addClass("clicked"); 98 99 if (bVisibleMeu) $.cookie(type + "_CLOSED", "Y"); 100 else $.removeCookie(type + "_CLOSED"); 101 102 menu.stop().slideToggle({ 103 duration: 150, 104 start: function () { 105 _this.toggleClass("closed"); 106 }, 107 complete: function () { 108 _this.removeClass("clicked"); 109 110 if (typeof window["stickySidebar"] !== "undefined") { 111 window["stickySidebar"].updateSticky(); 112 } 113 } 114 }); 115 } 116 }); 117 /**/ 118 119 /**/ 120 $(".switch-item-block .switch-item-block__icons").on("click", function () { 121 var $this = $(this), 122 animationTime = 200; 123 124 if ($this.hasClass("switch-item-block__icons--small") && !$this.hasClass("active")) { 125 $this.addClass("active"); 126 $this.siblings(".switch-item-block__icons--big").removeClass("active"); 127 $this 128 .closest(".switch-item-block") 129 .find(".switch-item-block__count-wrapper--big") 130 .fadeOut(animationTime, function () { 131 $this.closest(".switch-item-block").find(".switch-item-block__count-wrapper--small").fadeIn(animationTime); 132 }); 133 134 $this 135 .closest(".switch-item-block") 136 .siblings(".big-gallery-block") 137 .fadeOut(animationTime, function () { 138 $this.closest(".switch-item-block").siblings(".small-gallery-block").fadeIn(animationTime); 139 }); 140 } else if ($this.hasClass("switch-item-block__icons--big") && !$this.hasClass("active")) { 141 $this.addClass("active"); 142 $this.siblings(".switch-item-block__icons--small").removeClass("active"); 143 $this 144 .closest(".switch-item-block") 145 .find(".switch-item-block__count-wrapper--small") 146 .fadeOut(animationTime, function () { 147 $this.closest(".switch-item-block").find(".switch-item-block__count-wrapper--big").fadeIn(animationTime); 148 }); 149 150 $this 151 .closest(".switch-item-block") 152 .siblings(".small-gallery-block") 153 .fadeOut(animationTime, function () { 154 $this.closest(".switch-item-block").siblings(".big-gallery-block").fadeIn(animationTime); 155 }); 156 } 157 setTimeout(function () { 158 InitLazyLoad(); 159 }, 300); 160 }); 161 /**/ 162 163 /*many items menu*/ 164 165 // InitMenuNavigationAim(); 166 /**/ 167 168 /*progress bar in header*/ 169 window.addEventListener("scroll", throttle(updateProgressBar, 200)); 170 /**/ 171 172 /*show password*/ 173 $(".form-control:not(.eye-password-ignore) [type=password]").each(function (item) { 174 let passBlock = $(this).closest(".form-control"); 175 let labelBlock = passBlock.find(".label_block"); 176 if (labelBlock.length) { 177 labelBlock.addClass("eye-password"); 178 } else { 179 passBlock.addClass("eye-password"); 180 } 181 }); 182 $(document).on("click", ".eye-password:not(.eye-password-ignore)", function (event) { 183 let input = this.querySelector("input"); 184 let eyeWidth = 56; 185 if (this.clientWidth - eyeWidth < event.offsetX) { 186 if (input.type == "password") { 187 input.type = "text"; 188 this.classList.add("password-show"); 189 } else if (input.type == "text") { 190 input.type = "password"; 191 this.classList.remove("password-show"); 192 } 193 } 194 }); 195 /**/ 196});
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.