Update script.js

Added controller for hidding gallery after click on section.