Add active classes dynamically to menu