jQuery(document).ready(function($) {
    /* change FAQ icon*/
    $('.faq-header').on('click', function(e) {
        let id = e.delegateTarget.getAttribute('id');
        let max = e.delegateTarget.getAttribute('data');
        let ref = e.delegateTarget.getAttribute('ref');
        let expanded = e.delegateTarget.getAttribute('aria-expanded');

        if (expanded == 'true') {
            $('#'+id+' .icon #'+id+'-down').removeClass('hide');
            $('#'+id+' .icon #'+id+'-up').addClass('hide');
        } else {
            $('#'+id+' .icon #'+id+'-down').addClass('hide');
            $('#'+id+' .icon #'+id+'-up').removeClass('hide');
        }

        /*for (let index = 1; index <= max; index++) {
            if(id != 'heading'+ref+index) {
                $('#heading'+ref+index+' .icon #heading'+ref+index+'-down').removeClass('hide');
                $('#heading'+ref+index+' .icon #heading'+ref+index+'-up').addClass('hide');
            }
        }*/
    });
    /* change FAQ icon*/
});

