(function ($) {
  $(window).on("elementor/frontend/init", function () {
    elementorFrontend.hooks.addAction(
      "frontend/element_ready/ignition-image-hover-effects.default",
      function ($scope) {
        var $images = $($scope).find(".ignition-image-hover-effects");

        $images.each(function () {
          var container = $(this);
          var image1 = container.data("image1");
          var image2 = container.data("image2");
          var displacement = container.data("displacement");
          new hoverEffect({
            parent: this.querySelector(".img-container"),
            intensity: 0.3,
            image1: image1,
            image2: image2,
            displacementImage: displacement,
          });
        });
      }
    );
  });
})(jQuery);
