Popup Undefined Issue - custom.js