Back button now closes modals

I added some js so that pushing the back button closes the modal windows instead of leaving the website