!function(){"use strict";var e=function(e){if(!rey.vars.is_mobile){var r=e.querySelector(".rey-coverPanels");if(!rey.util.alreadyLoaded(r)){rey.util.imagesLoaded(r,(function(){r.classList.remove("--loading")}));var t=r.querySelectorAll(".cPanels-slide"),n=r.querySelectorAll(".cPanels-slideBg");t.forEach((e=>{e.addEventListener("mouseenter",(t=>{r.classList.remove("--no-bg"),r.classList.add("--hover");var o=parseInt(e.getAttribute("data-index"));n.length&&n[o]&&n[o].classList.add("--active")})),e.addEventListener("mouseleave",(()=>{r.classList.remove("--hover","--no-bg"),n.forEach((e=>{e.classList.remove("--active")}))}))}))}}},r=()=>{document.querySelectorAll(".elementor-widget-reycore-cover-panels").forEach((r=>{new e(r)}))};document.addEventListener("DOMContentLoaded",(()=>{"undefined"!=typeof rey?r():console.error("`rey` is undefined so this script will not run.")})),document.addEventListener("rey/preloader/loaded",(function(){r()})),rey.hooks.addAction("elementor/init",(function(r){r.registerElement({name:"reycore-cover-panels.default",cb:function(r){new e(r[0])}})}))}();