Resolved issue with incorrect panel display.
Also some jquery selectors have been replaced in order to improve efficiency