// Alternate promotional images
// Slideshow done with the cycle plugin with jQuery
// Author: Eric Pauley, with help from Daniel Lucas
// August 25, 2009
// Documentation:  http://malsup.com/jquery/cycle/
//                 http://malsup.com/jquery/cycle/options.html

$(document).ready(function() {

  $("#artbox > div ").css("display","block");
  $("#artbox")
    .cycle({
    random: 1,
    fx: 'fade',
    delay: 2500,
    timeout: 5000,
    speedIn: 500,
    speedOut: 500,
    pause: 1,
    pager: '#artboxnav',
    pagerClick: function(zeroBasedSlideIndex, slideElement) {
      // Add 1 to "zeroBasedSlideIndex" simply to make the
      // number correspond to what's displayed in the artbox.
      var slideIndex = zeroBasedSlideIndex + 1;
      // Call the navigation log script with the slide
      // number in the query parameters.  Note that the
      // log script doesn't actually do anything.  It simply
      // exists so that requests to it get logged by Apache.
      $.get('/artbox-scripts/artboxnavlog.php?n=' + slideIndex);
    }
  });
	
});

