resize slides with js