// Script used to colapse chapter details
var boxes = document.querySelectorAll(".chapter_row");
var numSelected = 0;
var maxSelected = 3;
for(var i = 0;i<boxes.length;i++){
    
    boxes[i].addEventListener("click", function(){        
        if(this.classList.contains("selected")){
            this.classList.remove("selected");
            numSelected--;
        }
        else if(numSelected<maxSelected){
            this.classList.add("selected");
            numSelected++;
        }
    });
}
// 