Added the popup hide show functionality