improve check for whether flag block is collected or not, add handler for flag link clicks to toggle class on parent ul.menu