jQuery.noConflict()(function($) {
    jQuery('.nice-select').niceSelect();
    jQuery('.js-select').niceSelect();
    jQuery('.wpc-filters-widget-select').niceSelect();
    jQuery('.wpc-orderby-select').niceSelect();
    jQuery('.acf-gallery-sort').niceSelect('update');



    const mediaQueryDesktop = window.matchMedia('(max-width: 1200px)');
    function handleDesktopChange(e) {
        if (e.matches) {
            jQuery('.js-filter-content').hide();
        } else {
            jQuery('.js-filter-content').show();
        }
    }

    mediaQueryDesktop.addListener(handleDesktopChange);
    handleDesktopChange(mediaQueryDesktop);
    $('.js-more-filter').on('click', function () {
        $(this).parent().next('.js-filter-content').slideToggle();
    });


    new VenoBox({
        selector: 'a.tmtransport_brochure',
        navigation: false,
    });


    $("form#form_draft_disabled").submit(false);


    if($('input[name="max_operating_weight"]').val() == 0){

        $('.wpc-filters-section.wpc-filter-operating_weight').hide();

    }

    if($('input[name="max_digging_weight"]').val() == 0){

        $('.wpc-filters-section.wpc-filter-digging_weight').hide();

    }


});