refactored and implemented Accordion JS callback

Added Accordion callback so content flows height-wise when sidebar is
expanded.