title: Modifying a script to select divs randomly
body: <p>i have a piece of modified code that was posted by user: Jashwant.
  I'm wondering if anyone might be able to help me modify this further so that the fist div tag with class "box" is selected randomly.</p>
  
  <pre><code>var wzprboxactive = 0;
  $('.wzprboxbtn').click(function(e) {
  jQuery.fx.off = true;
  var $wzprboxbtn = $(this);
  var $box = $('#area-wrap').find('.box'); 
  $box.eq(wzprboxactive).show(function() {
      if ($wzprboxbtn.hasClass('next')) {
          if (wzprboxactive == $box.length - 1) {
              wzprboxactive = 0;
          }
          else {
              wzprboxactive ++;
          }
      }
      else {
          if (wzprboxactive == 0) {
              wzprboxactive = $box.length - 1;
          }
          else {
              wzprboxactive --;
          }
      } 
      $box.eq(wzprboxactive).hide();      
  });
  
  e.preventdefault();
       return false;
  });
  </code></pre>
  
  <p>For example, I have 2 div containers both with class 'box' the script I assume selects the first container with the matching class and displays it while hiding the other, i'd like to modify this so the first selected 'box' is chosen randomly.</p>
  
  <p>Any suggestions would be greatly appreciated!</p>