jQuery(document).ready(function ($) {
    $('#search-icon').on('click', function () {
        $('#search-form-container').toggle();
    });

    // Add a window resize event listener to reset the visibility on view change
    $(window).on('resize', function () {
        var windowWidth = $(window).width();
        if (windowWidth > 768) { // Assuming 768px is the breakpoint for mobile to desktop
            $('#search-form-container').show(); // Show search form container on desktop view
        } else {
            $('#search-form-container').hide(); // Hide search form container on mobile view
        }
    });

    // Trigger resize event to set initial state
    $(window).trigger('resize');
});



// icons
jQuery(document).ready(function ($) {
    $('#share-icon').on('click', function () {
        $('#icons-container').toggle();
    });

    // Add a window resize event listener to reset the visibility on view change
    $(window).on('resize', function () {
        var windowWidth = $(window).width();
        if (windowWidth > 768) { // Assuming 768px is the breakpoint for mobile to desktop
            $('#icons-container').show(); // Show search form container on desktop view
        } else {
            $('#icons-container').hide(); // Hide search form container on mobile view
        }
    });

    // Trigger resize event to set initial state
    $(window).trigger('resize');
});



// mail icons
jQuery(document).ready(function ($) {
    $('#mail-icon').on('click', function () {
        $('#mail-container').toggle();
    });

    // Add a window resize event listener to reset the visibility on view change
    $(window).on('resize', function () {
        var windowWidth = $(window).width();
        if (windowWidth > 768) { // Assuming 768px is the breakpoint for mobile to desktop
            $('#mail-container').show(); // Show search form container on desktop view
        } else {
            $('#mail-container').hide(); // Hide search form container on mobile view
        }
    });

    // Trigger resize event to set initial state
    $(window).trigger('resize');
});


// phn icons
jQuery(document).ready(function ($) {
    $('#phn-icon').on('click', function () {
        $('#phn-container').toggle();
    });

    // Add a window resize event listener to reset the visibility on view change
    $(window).on('resize', function () {
        var windowWidth = $(window).width();
        if (windowWidth > 768) { // Assuming 768px is the breakpoint for mobile to desktop
            $('#phn-container').show(); // Show search form container on desktop view
        } else {
            $('#phn-container').hide(); // Hide search form container on mobile view
        }
    });

    // Trigger resize event to set initial state
    $(window).trigger('resize');
});
