added animation for bar collapse