title: Raphael and changing the attr() of a set of elements (out of scope?)
body: <p>I have created a <code>set()</code> of Raphaeljs elements called 'nav'. I am trying to change the <code>attr()</code> of said elements on <code>mousemove</code>, but for some reason the <code>set()</code> comes back with <code>Array length 0</code>...</p>
  
  <p>There is a JSFiddle available here:
  <strong><a href="http://jsfiddle.net/neuroflux/g8wHa/1/" rel="nofollow">http://jsfiddle.net/neuroflux/g8wHa/1/</a></strong></p>
  
  <p>And this is a snippet of the loop and function:</p>
  
  <pre><code>function init() {
                  sketch = Raphael(10, 10, 800, 600);
                  nav = sketch.set();
                  runNavigation();
                  document.addEventListener('mousemove',checkMouse);
              };
  
              function runNavigation() {
                  for (var a = 0; a &lt; 5; a++) {
                      navButton = sketch.rect(navX + (a*105), 10, 100, 100, 32, 32).attr({
                          stroke:'#666',
                          fill:'#dedede'
                      }).click(function(){
                          alert(0);
                      });
                      nav.push = navButton;
                  }
              };
  
              function checkMouse(e) {
                  mX = e.pageX;
                  mY = e.pageY;
  
                  /* This section is broken... */
                  /* It says the Array's length is 0 */
                  console.log('x: '+mX);
                  console.log('y: '+mY);
                  console.log('Element: ');
                  console.log(nav);
                  nav.attr({
                      y:mX/2,
                      x:mY/2
                  });
                  /*****************************/
              };
  </code></pre>
  
  <p>Thanks in advance!</p>