// JavaScript Document
var slides ={  
  lists:'.tabs li',
  currents:0,
  init: function(){           
           var prev;            
           tab = new Fx.Scroll('slides', { wait: false, duration: 1200, transition: Fx.Transitions.Bounce.easeOut });                 
              $$(slides.lists).each(function(el,key){
               
                  el.addEvents({
                          'mouseover': function(){                          
                            //nothing now
                          },
                          'click': function(){
                              id = $('slide-'+key);        
                              prev.removeClass('active');
                              this.addClass('active');                             
                               //scroll and show element                 
  	                           tab.toElement( id );
                               prev=el; 
                          }
                         
                  });
                
                  //show the current tab and slide
                  if(slides.currents==key){
                      el.addClass('active');
                      id = $('slide-'+key);
                      tab.toElement( id ); 
                      prev=el; //assign current slide to prev to apply style on li
                   }                
                  
              });

  }            
}



