rewriting slider gallery with window