//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
    });
    /*Loading page */
    // $(window).on("load", function(){
    //     $(".loading-page")
    //     .fadeOut(2000 , function(){
    //         $("body").css("overflow" , "auto");
    //         $("this").fadeOut(1500 , function(){
    //             $(this).remove();
    //         });
    //     });
    // });  
});

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


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

var swiper = new Swiper('.partners-sec .partners_swiper', {
    loop: true,
    speed: 900,
    slidesPerView: 2,
    spaceBetween: 10,
    centeredSlides: true,
    // autoplay: {
    //     delay: 2500,
    // },
    navigation: {
        nextEl: '.partners-sec .swiper-button-next',
        prevEl: '.partners-sec .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: 25,
        },
    }
});

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

var swiper = new Swiper('.gallery-pg .galleryImg_swiper', {
    // loop: true,
    speed: 900,
    slidesPerView: 2,
    spaceBetween: 15,
    observer: true,
    observeParents: true,
    // autoplay: {
    //     delay: 2500,
    // },
    navigation: {
        nextEl: '.galleryImg_swiper .swiper-button-next',
        prevEl: '.galleryImg_swiper .swiper-button-prev',
    },
    pagination: {
        el: '.galleryImg_swiper  .swiper-pagination',
        clickable: true
    },
    breakpoints: {
        640: {
            slidesPerView: 2,
        },
        768: {
            slidesPerView: 3,
        },
        1024: {
            slidesPerView: 4,
        },
    }
});

var swiper = new Swiper('.gallery-pg .galleryVid_swiper', {
    // loop: true,
    speed: 900,
    slidesPerView: 2,
    spaceBetween: 15,
    observer: true,
    observeParents: true,
    // autoplay: {
    //     delay: 2500,
    // },
    navigation: {
        nextEl: '.galleryVid_swiper .swiper-button-next',
        prevEl: '.galleryVid_swiper .swiper-button-prev',
    },
    pagination: {
        el: '.galleryVid_swiper .swiper-pagination',
        clickable: true
    },
    breakpoints: {
        640: {
            slidesPerView: 2,
        },
        768: {
            slidesPerView: 3,
        },
        1024: {
            slidesPerView: 4,
        },
    }
});

// var swiper = new Swiper(' .swiper-container', {
//     // loop: true,
//     speed: 900,
//     slidesPerView: 1,
//     spaceBetween: 15,
//     // autoplay: {
//     //     delay: 2500,
//     // },
//     //In Tabs
//     // observer: true,
//     // observeParents: true,
//     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,
//             // Prevent swiper in lg screens
//             // allowTouchMove: false,
//             // preventClicks: false
//         },
//     }
// });

