pass to next/prev slide on drag. Cleaned the global vars