I posted a different one here that borrows from this but uses symbols.
See updated version here
To get your all checked animation. Just add some code to count the number of selected in the window.selectedCheckBoxes array, if the number is n# then do something.