I have this line of code:
$(\'#sitesAccordion .groupOfSites\').click(function() { var lastOpenSite = $(this).siblings().hasClass(\':not(.closedTab)\'); c
I don't know if this was true at the time of the original posting, but the siblings method allows selectors, so a reduction of what the OP listed should work.
$(this).siblings(':not(.closedTab)');