show / hide images based on checkbox state

show / hide images based on checkbox state

Hello Guys,

I've got a little HTML to get me started on this  http://pastebin.com/G41V9Wt5.

What you can see is that I have a bunch of images which form a chart, each of the images has multiple classes.

I want to write a function which when called fades in/out images dependant on whether all related checkboxes are checked or not.

Checkboxes are related to the images by id on the checkbox and class on the image, as I'm sure you can see.

The idea being that I will be calling this method each time a checkbox is checked.

Can anyone help me shape this one up? It's really messing with my melon just trying to get my head around the concept of how it should be structures. I've not done much work with elements and multiple classes like this.

Robert