Added media to url for gapp images
Changed the js loop type used for locations to please IE