changes to gallery ajax