$('.main-delivery').on('change', '[data-delivery-seller-input]', function(e) {
   $('[data-ordering-sellers="ordering"]').hide();
});

$('body').on('click update', '[data-custom-opener]', function(e) {
   let $this = $(e.currentTarget),
      $target = $($this.data('custom-opener')),
      checked = $this.is('.active');

   if (e.type != 'update')
      checked = !checked;

   $target[checked ? 'slideDown' : 'slideUp']()[checked ? 'addClass' : 'removeClass']('active').trigger('opened');
   $this[checked ? 'addClass' : 'removeClass']('active');

   return !$this.is('a');
}).find('[data-custom-opener]').trigger('update');
