Isn't this incorrect though? All of those variables are locals to a different function. Maybe this works in JS, but that's a little weird if it does...

Maybe my last comment was unclear. I meant that I thought you should move the definition of hideAll() to be right after the definition for ul (so it would go var categorySelector, then var ul, then function hideAll).