Replace alert javascript with Sweet alert