Show selected element and fix active links on resize