function toasterError(error){
    // alert(error)
    toastr.options.closeButton = true;
    toastr.options.showMethod = 'slideDown';
    toastr.options.hideMethod = 'slideUp';
    toastr.options.closeMethod = 'slideUp';
    toastr.options.closeDuration = 200;
    toastr.options.showDuration = 200;
    toastr.options.preventDuplicates = true;
    toastr.options.progressBar = true;
    toastr.options.positionClass = "toast-top-right";
    toastr.options.newestOnTop = true;
    toastr.options.showEasing = 'swing';
    toastr.options.hideEasing = 'linear';
    toastr.error(error);
}
function toasterSuccess(success){
    toastr.options.closeButton = true;
    toastr.options.showMethod = 'slideDown';
    toastr.options.hideMethod = 'slideUp';
    toastr.options.closeMethod = 'slideUp';
    toastr.options.closeDuration = 200;
    toastr.options.showDuration = 200;
    toastr.options.preventDuplicates = true;
    toastr.options.progressBar = true;
    toastr.options.positionClass = "toast-top-right";
    toastr.options.newestOnTop = true;
    toastr.options.showEasing = 'swing';
    toastr.options.hideEasing = 'linear';
    toastr.success(success);
}
//intialization plugins
$(document).ready(function () {
    //animation icon toggler of navbar
    $(`.navbar-toggler`).click(function() {
        $(`.navbar-toggler`).toggleClass(`active`);
    });
    //Wow intit
    wow = new WOW({
        boxClass: 'wow',
        animateClass: 'animated',
        offset: 200,
        mobile: true,
        live: false
    });
    wow.init();
    //fancybox
    $("[data-fancybox]").fancybox({
        selector: '[data-fancybox="images"]',
        // loop: true
    });
    //tooltip
    $(function () {
        $('[data-toggle="tooltip"]').tooltip();
    });
    /*Loading page */
    // $(window).on("load", function(){
    //     $(".loading-page")
    //     .fadeOut(2000 , function(){
    //         $("body").css("overflow" , "auto");
    //         $("this").fadeOut(1500 , function(){
    //             $(this).remove();
    //         });
    //     });
    // });

    $('.counter').countUp({
        delay: 10,
        time: 2000
    });
});

//Swiper
var swiper = new Swiper('.partners-sec .partner-swiper', {
    // loop: true,
    speed: 900,
    slidesPerView: 2,
    spaceBetween: 10,
    // autoplay: {
    //     delay: 2500,
    // },
    navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev',
    },
    pagination: {
        el: '.partners-sec .swiper-pagination',
        clickable: true
    },
    breakpoints: {
        640: {
            slidesPerView: 2,
            spaceBetween: 20,
        },
        768: {
            slidesPerView: 3,
            spaceBetween: 20,
        },
        1024: {
            slidesPerView: 5,
            spaceBetween: 20,
        },
    }
});

var swiper = new Swiper('.doctors-sec .doctor-swiper', {
    // loop: true,
    speed: 900,
    slidesPerView: 1,
    spaceBetween: 15,
    effect: 'fade',
    // autoplay: {
    //     delay: 2500,
    // },
    navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev',
    },
    pagination: {
        el: '.doctors-sec .swiper-pagination',
        type: "fraction",
    },
});

var swiper = new Swiper('.feedback-sec .feedback-swiper', {
    loop: true,
    speed: 900,
    slidesPerView: 1.3,
    spaceBetween: 15,
    centeredSlides: true,
    // effect: 'fade',
    // autoplay: {
    //     delay: 2500,
    // },
    navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev',
    },
    // pagination: {
    //     el: '.feedback-sec .swiper-pagination',
    //     type: "fraction",
    // },
    breakpoints: {
        640: {
            spaceBetween: 20,
        },
        768: {
            spaceBetween: 30,
        },
        1024: {
            spaceBetween: 40,
        },
    }
});
// var swiper = new Swiper(' .swiper-container', {
//     loop: true,
//     speed: 900,
//     slidesPerView: 1,
//     spaceBetween: 15,
//     // autoplay: {
//     //     delay: 2500,
//     // },
//     navigation: {
//         nextEl: '.swiper-button-next',
//         prevEl: '.swiper-button-prev',
//     },
//     pagination: {
//         el: '.swiper-pagination',
//         clickable: true
//     },
//     breakpoints: {
//         640: {
//             slidesPerView: 2,
//             spaceBetween: 20,
//         },
//         768: {
//             slidesPerView: 3,
//             spaceBetween: 20,
//         },
//         1024: {
//             slidesPerView: 5,
//             spaceBetween: 20,
//         },
//     }
// });

// ------------ loader -----------
$(window).on("load", function() {
    $("#preloader").addClass("isdone");
});
