title: set interval through the array in javascript
body: <p>How to set interval or may be timeout through the array, to produce effects for the element every 2 sec for example the 1-st idea is to programm something like this:</p>
  
  <pre><code>for (photoKey in arrBigPhotoes) {
        setInterval(function() {
          // alert(arrBigPhotoes[photoKey]);
  
            document.getElementById("big_photo").src='/upload/images/'+arrBigPhotoes[photoKey];
  
        }, 2000);
  }
  </code></pre>
  
  <p>But it didn't work properly. May be someone can help me with this task I'll be extremely glad.
  I'm also have a jQuery - the resolution may be through this library, but without any plug-ins.
  Thanks.</p>