I've got a selection of checkboxes and when a certain checkbox is checked, it enables/disables other checkboxes. Is there a way using either JavaScript or jQuery, so that once a checkbox is disabled it returns the other checkboxes to the previous state?

For example, when the page is loaded checkboxes 1, 4 and 7 are enabled and the rest are disabled. When 1 is checked, it enables checkbox 2 and disables checkbox 4 and 7. However is there a way apart from using if statements, so that when checkbox 1 is unchecked, it enables 4 and 7 and disables 2?

Thanks