Gallery filtering

I got this far mcgraphics.us/history
css is in historystyle.css

img-filter.js

Could you tell me what goes where?
I don’t know javascript.

The bottom half has more images that I’d initially placed.