Replace image gallery script with new more advanced one