/*
  onClick of TR's with class qf_header_tr, hide all following sibling TR's 
  until you find the next TR with a class of "qf_header_tr"
  
  See also /local/shared/style/quick_form.css
*/

$(document).ready(function(){
  
  $('.qf_header_tr').toggle(
    function(){  
    	// Hide sibling rows until we find the next header 'section'.
      $(this).nextAll().each(function(){
      	if($(this).hasClass('qf_header_tr')) { return false; } 
      	$(this).hide();
      });
    },
    function() {
      // Show sibling rows until we find the next header 'section'.
      $(this).nextAll().each(function(){
      	if($(this).hasClass('qf_header_tr')) { return false; } 
      	$(this).show();
      });
    }
  );
  
  
});
