$(document).ready(function() { 
    // initialize scrollable  
    $("div.conveyor").scrollable({ 
        size: 1, 
        clickable: false,
        loop: true, 
        interval: 4000,
        speed: 600,
        
        items: '.posts',
        prev: ".controls#prev",
        navi: ".controls#navi",
        next: ".controls#next",
        
        // when seek starts make items little transparent
        onBeforeSeek: function() {
            this.getItems().fadeTo(300, 0.2);		
        },
        
        // when seek ends resume items to full transparency
        onSeek: function() {
            this.getItems().fadeTo(300, 1);
        }
    });     
    
    function clickPlay() {
        scrollStart();
    }
    
    function clickPause() {
    }
    
    function scrollStart() {
        setTimer();
    }
    
    function scrollStop() {
        clearInterval(timer);
    }
}); 
