rem: .slideUp('medium', function () { $(fieldset).addClass('collapsed'); fieldset.animating = false; } ) 
add: $('fieldset.collapsible > legend').each(function() { var fieldset = $(this.parentNode);  if ($('input.error, textarea.error, select.error', fieldset).size() > 0) { fieldset.removeClass('collapsed'); }    var text = this.innerHTML; $(this).empty().append($('<a href="#">'+ text +'</a>').click(function() { var fieldset = $(this).parents('fieldset:first')[0];  if (!fieldset.animating) { fieldset.animating = true; Drupal.toggleFieldset(fieldset); } return false; })).after($('<div class="fieldset-wrapper"></div>').append(fieldset.children(':not(legend)'))); }); 
context:             .slideUp('medium', function () { $(fieldset).addClass('collapsed'); fieldset.animating = false; } )
meta: 1288	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1288/57eecc45f6dee8d0df453937cdbd5765e4174d44/collapse.js/clean/misc/collapse.js