var nav = function(max){
this.max = max;
this.current = this.current || -1;
this.next = function(){
this.current = this.current < this.max - 1 ? this.current + 1 : 0;
this.slide(this.current)
};
this.prev = function(){
this.current = this.current > 0 ? this.current - 1 : this.max - 1;
this.slide(this.current)
};
this.slide = function(current){
$('#slideshow img').fadeOut(1500, 'easeOutQuart');
$('#slideshow #thumbs span').removeClass('active');
$('#slideshow #thumbs span#'+current).addClass('active');
$('#slideshow img#'+current).fadeIn(1500, 'easeOutQuart');
}
};
var slider = new nav($('#slideshow img').length);
slider.next()
Вот так вроде и должно, но только первый блок выцветает