Creation of interval

created the function slideloop to parse the contents of the slider