how can i show subpanels collapsed in community version

Hi everyone.

I need to show collapsed all subpanels in contacts' detailview by default.

Actually i use jquery to do this action, but i think that there should be another more elegant way to do it.

My jquery code:
$(document).ready(function(){
    $('#hide_link_contacts_oms2b_pagocuotas_1').click(function() {
         $('#list_subpanel_contacts_oms2b_pagocuotas_1').hide();
    })
    $('#show_link_contacts_oms2b_pagocuotas_1').click(function() {
         $('#list_subpanel_contacts_oms2b_pagocuotas_1').show();
    })    
    if  (!$('#list_subpanel_contacts_oms2b_pagocuotas_1').is(':hidden')){
        $('#hide_link_contacts_oms2b_pagocuotas_1').trigger('click');
        $('#show_link_contacts_oms2b_pagocuotas_1').show();
        $('#hide_link_contacts_oms2b_pagocuotas_1').hide();
    }
    
});
Thank you very much in advance.