Refractoring js plugins
Add finction change gallery type