use closest instead of parent

This allows you to wrap other elements around the .close button without breaking the script.
Merge pull request #9 from WouterSioen/patch-1

use closest instead of parent