Boggled -

You are making things more complicated than they need to be for your situation.
Instead of making headings that link to the first category in each section, and then hiding that category name, just make those category names look like headings. Use the built-in switch:
PHP Code:
    switch(true) {
// to make a specific category stand out define a new class in the stylesheet example: A.category-holiday
// uncomment the select below and set the cPath=3 to the cPath= your_categories_id
// many variations of this can be done
//      case ($box_categories_array[$i]['path'] == 'cPath=3'):
//        $new_style = 'category-holiday';
//        break; 
and make a case for each of categories 1-6, referencing 'category-heading':
PHP Code:
      case ($box_categories_array[$i]['path'] == 'cPath=1'):
        
$new_style 'category-heading';
        break;
      case (
$box_categories_array[$i]['path'] == 'cPath=2'):
        
$new_style 'category-heading';
        break; 
and then style a.category-heading {} the same as you have styled .catBoxHeading1.