MAES gallery js to js file