// JavaScript Document
 $(function(){
 $('#slider')
  .anythingSlider({
				  toggleControls      : true,
				  autoPlay            : true,
				  autoPlayLocked      : true,
				  navigationSize	  : false,
				  buildNavigation	  : false,
				  buildStartStop	  : false,
				  delay               : 6000
  })
  /* this code will make the caption appear when you hover over the panel
    remove the extra statements if you don't have captions in that location */
  .find('.panel')
    .find('div[class*=caption]').css({ position: 'absolute' }).end()
    .hover(function(){ showCaptions( $(this) ) }, function(){ hideCaptions( $(this) ); });

  showCaptions = function(el){
    var $this = el;
    if ($this.find('.caption').length) {
      $this.find('.caption')
        .show()
        .animate({ bottom: 0, opacity: 1 }, 400);
    }
  };
  hideCaptions = function(el){
    var $this = el;
    if ($this.find('.caption').length) {
      $this.find('.caption')
        .stop()
        .animate({ bottom: -50, opacity: 0 }, 350, function(){
          $this.find('.caption').hide(); });
    }
  };

  // hide all captions initially
  hideCaptions( $('#slider .panel') );
});
