remove dependence on CSS3 :not selector

This change is made necessary because not every browser that implements querySelectorAll implements all of CSS selectors
Merge pull request #4105 from cmcnulty/drop_not_selector

remove dependence on CSS3 :not selector