js tweak to gallery images