jQuery(document).ready(function($) {
    var api = $('div.scrollable').scrollable({
    
    size: 1,
    globalNav: true
    
  }).circular().autoscroll({
    
    autoplay: true,
    interval: 5000,
    api: true
    
  });
  
  api.onBeforeSeek(function(event,index) {
  
  	var element = $("div.scrollable");
  	
  	if (element.css('opacity') == 0) {
  		return true;
  	}
  	
  	element.fadeTo("slow", 0, function() {
  	  api.seekTo(index);
  	});
  
  	return false;
  
  }).onSeek(function(){
  
  	$("div.scrollable").fadeTo('slow', 1);
  
  });
  
});