added javascript for active tabs