$(document).ready(function() {
    
    $(".progress-value").each(function() {
        $(this).animate({
            'width': $(this).data('value')
        }, 1500);
    })

    wow = new WOW({
        boxClass: 'wow',
        animateClass: 'animated',
        offset: 200,
        mobile: false,
        live: false
    });
    wow.init();

    // menu --------------
    $(".fixed-bottom-nav ul li").on("click", function() {
        $(this).addClass("active").siblings().removeClass("active");
    })

    // profile img --------------
    $(function() {
        $("#input-profile").change(function() {
            readURL1(this);
        });
    });


    function readURL1(input) {
        if (input.files && input.files[0]) {
            var reader = new FileReader();

            reader.onload = function(e) {
                //alert(e.target.result);
                $('#img-profile').attr('src', e.target.result);
            }

            reader.readAsDataURL(input.files[0]);
        }
    }
});


$(document).ready(function() {
    // payment carousel
    $('.payment .owl-carousel').owlCarousel({
        loop: true,
        margin: 30,
        mouseDrag: true,
        autoplay: true,
        dots: false,
        nav: true,
        navText: ['<i class="fas fa-chevron-left"></i>',
            '<i class="fas fa-chevron-right"></i>'
        ],
        responsiveClass: true,
        responsive: {
            0: {
                items: 1,
                autoplay: true,
            },
            767: {
                items: 2,
                autoplay: true,
            },
            1000: {
                items: 3
            }
        }
    });
});

$(document).ready(function() {
    //packages carousel
    $('.packages-carousel').owlCarousel({
        rtl: true,
        margin: 10,
        responsive: {
            0: {
                items: 1,
                loop: true,
                nav: true,
                mouseDrag: true,
                touchDrag: true

            },
            600: {
                items: 2,
                loop: true,
                nav: true,
                mouseDrag: true,
                touchDrag: true
            },
            1000: {
                items: 3,
                loop: false,
                nav: false,
                mouseDrag: false,
                touchDrag: false,
            }
        }
    })
});

//steps carousel
$('.steps-carousel').owlCarousel({
    rtl: true,
    margin: 10,
    loop: false,
    responsive: {
        0: {
            items: 1,
            loop: true,
            nav: true,
            mouseDrag: true,
            touchDrag: true

        },
        600: {
            items: 2,
            loop: true,
            nav: true,
            mouseDrag: true,
            touchDrag: true
        },
        1000: {
            items: 5,
            loop: false,
            nav: false,
            mouseDrag: false,
            touchDrag: false,
        }
    }
})
$(".see-more-btn").click(function() {
    $(".see-more-content").show();
    $(".see-more-btn").hide();
});
//about carousel
$('.about-carousel').owlCarousel({
    rtl: true,
    margin: 10,
    items: 1,
    loop: true,
    nav: true,
    mouseDrag: true,
    touchDrag: true,
})

// //show password
// const togglePassword = document.querySelector('#togglePassword');
// const password = document.querySelector('#password');

// togglePassword.addEventListener('click', function(e) {
//     // toggle the type attribute
//     const type = password.getAttribute('type') === 'password' ? 'text' : 'password';
//     password.setAttribute('type', type);
//     // toggle the eye slash icon
//     this.classList.toggle('fa-eye-slash');
// });