Ti posto il codice:
Codice PHP:
/* Before Slide Transition
----------------------------*/
beforeAnimation : function(direction){
$('#supersized .slide-'+vars.current_slide+' img')
if (api.options.progress_bar && !vars.is_paused) $(vars.progress_bar).stop().animate({left : -$(window).width()}, 0 );
/* Update Fields
----------------------------*/
// Update slide caption
if ($(vars.slide_caption).length){
(api.getField('title')) ? $(vars.slide_caption).html(api.getField('title')) : $(vars.slide_caption).html('');
}
// Update slide number
if (vars.slide_current.length){
$(vars.slide_current).html(vars.current_slide + 1);
}
// Highlight current thumbnail and adjust row position
if (api.options.thumb_links){
$('.current-thumb').removeClass('current-thumb');
$('li', vars.thumb_list).eq(vars.current_slide).addClass('current-thumb');
// If thumb out of view
if ($(vars.thumb_list).width() > $(vars.thumb_tray).width()){
// If next slide direction
if (direction == 'next'){
if (vars.current_slide == 0){
vars.thumb_page = 0;
$(vars.thumb_list).stop().animate({'left': vars.thumb_page}, {duration:500, easing:'easeOutExpo'});
} else if ($('.current-thumb').offset().left - $(vars.thumb_tray).offset().left >= vars.thumb_interval){
vars.thumb_page = vars.thumb_page - vars.thumb_interval;
$(vars.thumb_list).stop().animate({'left': vars.thumb_page}, {duration:500, easing:'easeOutExpo'});
}
// If previous slide direction
}else if(direction == 'prev'){
if (vars.current_slide == api.options.slides.length - 1){
vars.thumb_page = Math.floor($(vars.thumb_list).width() / vars.thumb_interval) * -vars.thumb_interval;
if ($(vars.thumb_list).width() <= -vars.thumb_page) vars.thumb_page = vars.thumb_page + vars.thumb_interval;
$(vars.thumb_list).stop().animate({'left': vars.thumb_page}, {duration:500, easing:'easeOutExpo'});
} else if ($('.current-thumb').offset().left - $(vars.thumb_tray).offset().left < 0){
if (vars.thumb_page + vars.thumb_interval > 0) return false;
vars.thumb_page = vars.thumb_page + vars.thumb_interval;
$(vars.thumb_list).stop().animate({'left': vars.thumb_page}, {duration:500, easing:'easeOutExpo'});
}
}
}
}
},
/* After Slide Transition
----------------------------*/
afterAnimation : function(){
$('#supersized .slide-'+vars.current_slide+' img').stop().animate({'opacity':1},2500)
if (api.options.progress_bar && !vars.is_paused) theme.progressBar(); // Start progress bar
},
Ho inserito solo la parte beforeAnimation e afterAnimation.
Non preoccuparti, se ti va e quando hai tempo.
Gentilissimo