(function ($) {
    "use strict";
    $(window).on('elementor/frontend/init', () => {
        elementorFrontend.hooks.addAction('frontend/element_ready/bikys-image-hotspot.default', ($scope) => {
            let $hotspot_dot = $('.hotspot_dot',$scope),
                $content = $('.hostpot-content',$scope);

            $hotspot_dot.on('mouseenter',function (e) {
                e.preventDefault();
                $hotspot_dot.removeClass('active');
                $content.removeClass('active');
                $(this).addClass('active');
                let class_active = $(this).attr('data-controls');
                $scope.find(class_active).addClass('active');
            });
            $content.on('mouseenter',function (e) {
                e.preventDefault();
                $hotspot_dot.removeClass('active');
                $content.removeClass('active');
                $(this).addClass('active');
                let class_active = $(this).attr('data-controls');
                $scope.find(class_active).addClass('active');
            })
        });
    });

})(jQuery);
