title: Jquery: Doing an interval, timout, then interval again
body: <p>I'm trying to do a reveal of a list of elements 1 after another in a setInterval for 5 seconds but after the 7th element, i want to wait for 60 seconds, meaning a timeout and continue the interval. </p>
  
  <p>Following is my code, I can get it done but the problem with this code is that it does the timeout repetatively on every 7th element, however, i'm only looking to do it on the 1st 7th occurance and not on all the 7th element.</p>
  
  <pre><code>    $(document).ready(function(){
          var index=0;
          var firstInterval=setInterval(function(){
              if(index==7){
                  $("#love p:hidden:first").fadeIn(2000);
                  clearInterval(firstInterval);
                  index=0;
                  return;
              }else{
                  $("#love p:hidden:first").fadeIn(2000);
                  index++;
              }
              var timeout=setTimeout(function(){
                  $("#love p:hidden:first").fadeIn(2000);
                  var secondInterval=setInterval(function(){
                      $("#love p.2nd_batch:hidden:first").fadeIn(2000);
                  },5000);
                  clearTimeout(timeout);
              },60000);
          },5000);
      });
  </code></pre>
  
  <p>Any help would be greatly appreciated. thanks</p>