Pure Javascript Responsive Image Gallery