// Public domain donationware, see http://creativepony.com/journal/scripts/autoslidingtabs/
// Version 1.0

var AutoSlidingTabs = SlidingTabs.extend({
  initialize: function(buttonContainer, slideContainer, options) {
    this.options.autoSlideDelay = 3; // delay in seconds
    this.options.autoSlideDirection = 'next'; // or 'previous'
    this.autoSlide = true;
    
    this.parent.apply(this, arguments);
    
    this.autoSlider = (function() {
      if (this.autoSlide == true) {
        this[this.options.autoSlideDirection]();
        this.autoSlide = true;
      }
    }).periodical(this.options.autoSlideDelay * 1000, this);
  },
  
  changeTo: function(param) {
    this.parent(param);
    this.autoSlide = false;
  }
});// JavaScript Document