moved gallery function call (it was visible on the page, oops)