How to make sure my behavior is triggered before AJAX?
I got it working now. The way to do it was:


Get all elements that are in "exclusive" groups using classes, .each over them
For each element, change beforeSubmit using $(this).attr('id') as index for ajax table
Because I was not able to get element to point to a specific element (it always pointed to entire form), I used helper variable at the beginning of .each loop.


Resulting code is like this:

(function($) { 
  Drupal.behaviors.behavior_name = {
    attach: function (context, settings) {

      $('select.exclusive', context).each(function(){
        var triggering_element = $(this);
        Drupal.ajax[$(this).attr('id')].options.beforeSubmit = function (form_values, element, options) {
          // Make all not selected
          $("[exclusivity_group='"+triggering_element.attr('exclusivity_group')+"']").not(triggering_element).find("option").attr('selected', false);
          // select "all"
          $("[exclusivity_group='"+triggering_element.attr('exclusivity_group')+"']").not(triggering_element).find("option[value='all']").attr('selected', true);

        };
      });
    }
  };
})(jQuery);