Add minimize captions functionality