1function checkNavColor(slider) { 2 var nav_color_flex = slider.find(".swiper-slide-active").data("nav_color"), 3 menu_color = slider.find(".swiper-slide-active").data("color"); 4 5 const allowChangeBySlider = typeof window.headerLogo !== 'undefined' && window.headerLogo.allowChangeBySlider; 6 7 if (nav_color_flex == "dark") slider.find(".swiper-pagination").addClass("flex-dark"); 8 else slider.find(".swiper-pagination").removeClass("flex-dark"); 9 if (typeof checkNavColor.hasLongBanner === "undefined") { 10 checkNavColor.hasLongBanner = $(".header_opacity").length; 11 } 12 // if (checkNavColor.hasLongBanner && typeof logo_depend_banners === 'function') logo_depend_banners(menu_color); 13 if (checkNavColor.hasLongBanner) { 14 var logoOpacity = 15 $("body.header_opacity").length && 16 (!$("header.header--offset").length || 17 $("header .logo").closest(".header__top-part").length || 18 ($("header.header--offset").length && 19 ($("header .header__main-inner.bg_none").length || $("header .header__sub-inner.bg_none").length))); 20 var bLogoImg = $("body:not(.left_header_column) header .logo img").length && logoOpacity; 21 if (bLogoImg && allowChangeBySlider) { 22 $("header .logo img").attr("src", arAsproOptions.THEME.LOGO_IMAGE); 23 } 24 $("header").removeClass("light dark"); 25 if (menu_color == "light") { 26 $("header").addClass(menu_color); 27 if (bLogoImg && allowChangeBySlider) { 28 if (arAsproOptions.THEME.LOGO_IMAGE_WHITE) 29 $("header .logo img").attr("src", arAsproOptions.THEME.LOGO_IMAGE_WHITE); 30 } 31 } 32 } 33 34 var eventdata = { slider: slider }; 35 BX.onCustomEvent("onSlide", [eventdata]); 36} 37 38readyDOM(function () { 39 $(".main-slider").mouseenter(function () { 40 if (!$(this).hasClass("video_visible") && $(this).data("swiper")) { 41 if ($(this).data("swiper").params.autoplay.enabled) { 42 $(this).data("swiper").autoplay.stop(); 43 } 44 } 45 }); 46 47 $(".main-slider").mouseleave(function () { 48 if (!$(this).hasClass("video_visible") && $(this).data("swiper")) { 49 if ($(this).data("swiper").params.autoplay.enabled) { 50 $(this).data("swiper").autoplay.start(); 51 } 52 } 53 }); 54}); 55 56BX.addCustomEvent("onSetSliderOptions", function (options) { 57 if ("type" in options && options.type === "main_banner") { 58 if (typeof arAsproOptions["THEME"] != "undefined") { 59 const slideshowSpeed = Math.abs(parseInt(arAsproOptions["THEME"]["BIGBANNER_SLIDESSHOWSPEED"])); 60 const animationSpeed = Math.abs(parseInt(arAsproOptions["THEME"]["BIGBANNER_ANIMATIONSPEED"])); 61 62 options.autoplay = slideshowSpeed && arAsproOptions["THEME"]["BIGBANNER_ANIMATIONTYPE"].length ? {} : false; 63 // options.autoplay.pauseOnMouseEnter = true; 64 // options.autoplay.disableOnInteraction = false; 65 options.effect = arAsproOptions["THEME"]["BIGBANNER_ANIMATIONTYPE"] === "FADE" ? "fade" : "slide"; 66 if (animationSpeed >= 0) { 67 options.speed = animationSpeed; 68 } 69 if (slideshowSpeed >= 0) { 70 options.autoplay.delay = slideshowSpeed; 71 } 72 /*if (arAsproOptions["THEME"]["BIGBANNER_ANIMATIONTYPE"] !== "FADE") { 73 options.direction = 74 arAsproOptions["THEME"]["BIGBANNER_ANIMATIONTYPE"] === "SLIDE_VERTICAL" ? "vertical" : "horizontal"; 75 }*/ 76 } 77 78 if ("CURRENT_BANNER_INDEX" in arAsproOptions && arAsproOptions["CURRENT_BANNER_INDEX"]) { 79 currentBannerIndex = arAsproOptions["CURRENT_BANNER_INDEX"] - 1; 80 if (currentBannerIndex < options.countSlides) { 81 options.initialSlide = currentBannerIndex; 82 // options.autoplay = false; 83 } 84 } 85 } 86}); 87 88BX.addCustomEvent("onSlideChanges", function (eventdata) { 89 if ("slider" in eventdata && eventdata.slider) { 90 const slider = eventdata.slider; 91 if (slider && slider.params) { 92 if ("type" in slider.params && slider.params.type === "main_banner") { 93 setTimeout(function () { 94 checkNavColor($(slider.el)); 95 }, 100); 96 } 97 } 98 } 99});
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.