using debug=false and checking if divs exist before running galleria on page load