adding animation to hidePane() showPane()