$().ready(function(){

    var featureShow = $('#feature .feature').slideshow({
        delay: 6000
    });
    
    $('.ctrl-paginator').colorPaginator();
    
    $('#next-feature').click(function(){
        featureShow.stop().next();
        return false;
    });
    
    $('#prev-feature').click(function(){
        featureShow.stop().prev();
        return false;
    });
    
   // init front page filter
    $('.post').each(function(){
        var $this = $(this);
        var $c = $this.children('h3');
        if($c.length) {
            var d = $c.attr('class').split(' ')
            if(d.length > 0) {
                Color.filter.add($this.closest('li.ctrl-paginator-page').get(0), d);
            }
        }
    });

    
});
