Move photos JS to global.js