Adding new javascript for home gallery