Moved javascript for loading gallery to application.js