Added HTTPS support (autodetect), event.preventDefault() on close click, bigger z-index for Bootstrap navbar compatibility