Open and Close works without jQuery

Taking mielke's pull request and putting it in the version without jQuery, making it ready to pull.