Add active tab functionality