Expand a Details Box When Clicking a Repeater Button For a Specific Product

So I figured out how to manage 3 different product details boxes by selecting a specific repeater item button. Here is my code :

//PRODUCTS BUTTONS 
$w ( "#nexairRepeater" ). forEachItem (( $item ,  itemData ,  index ) => { 
    $item ( "#nexairButtons" ). onClick ( **function**  () { 
        **if** ( $item ( "#nexairSku" ). text  ===  "SKU: NSV-2500" ) { 
            **if** (  $w ( "#nsv2500InfosBox" ). collapsed  ) { 
            $w ( "#nsv2500InfosBox" ). expand (); 
            $w ( "#nexair50InfosBox" ). collapse (); 
            $w ( "#nsv5000InfosBox" ). collapse (); 
        }  **else**  { 
            $w ( "#nsv2500InfosBox" ). collapse (); 
        }} 

        **else if** ( $item ( "#nexairSku" ). text  ===  "SKU: NEXAIR5.0" ) { 
            **if** (  $w ( "#nexair50InfosBox" ). collapsed  ) { 
            $w ( "#nexair50InfosBox" ). expand (); 
            $w ( "#nsv2500InfosBox" ). collapse (); 
            $w ( "#nsv5000InfosBox" ). collapse (); 
        }  **else**  { 
            $w ( "#nexair50InfosBox" ). collapse (); 
        }} 

        **else if** ( $item ( "#nexairSku" ). text  ===  "SKU: NSV-5000" ) { 
            **if** (  $w ( "#nsv5000InfosBox" ). collapsed  ) { 
            $w ( "#nsv5000InfosBox" ). expand (); 
            $w ( "#nsv2500InfosBox" ). collapse (); 
            $w ( "#nexair50InfosBox" ). collapse (); 
        }  **else**  { 
            $w ( "#nsv5000InfosBox" ). collapse (); 
        }} 
    }); 
});