Select/Deselect all checkboxes with jquery

The following javascript code is an example of selecting/deselecting all checkboxes;

CODE