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