$(document).ready(function () {
    'use strict';

    // if advanced filter exists
    if ($('.advancedFilter').length) {
        
        var filter = $('#productFilter'),
            trigger_sections = $('#productFilter, .triggerAdvancedProductFilterWrap'),
            mobile_done_button = $('.triggerAdvancedProductFilterWrap');

        filter.addClass('isClickable');

        $('.js_triggerAdvancedProductFilter').on('click', function () {
            trigger_sections.addClass('filterVisible');
        });

        $('.js_triggerAdvancedProductFilterClose').on('click', function () {
            trigger_sections.removeClass('filterVisible');
            $('#updateFilter').trigger('click');
        });
        
    }
});
