$(document).ready(function () {
    $('.swiper-blog .blog-slide .items.fullwidth').siblings().addClass("nowidth");
    $(document).on("click", ".swiper-blog .blog-slide  .items .img", function() {
        console.log('item clicked');
        $(this).parent(".items").addClass("fullwidth");
        $(this).parent(".items").siblings().addClass("nowidth");
        $(".swiper-blog").addClass("bottom");
    });

    $(document).on("click", ".swiper-blog .blog-slide  .items .cls , .blog .overlay , .swiper-blog .slick-nav", function() {
        $(".swiper-blog .items").removeClass("fullwidth , nowidth");
        $(".swiper-blog").removeClass("bottom");
    });
    $('.currentItem .img').trigger('click')
});

$('.company_search').change(async function () {

    const company_id = $(this).val(),
        url = route,
        method = 'POST',
        data = {company_id};


    const response=await ajax({
        url,
        data,
        dataType: 'html',
        method
    });

    if (response) {
        $('.swiper-blog').html(response);
    }



});
