/*
----------------------
    Equal Col
----------------------
*/

(function($) {
    $.fn.equalize = function() {
        var eqSel = $(this);
        var aceHeight = 0;
        $(eqSel).each(function(){
            if( $(this).height() >= aceHeight ){
                aceHeight = $(this).height();
            }
        });
        $(eqSel).each(function(){$(this).height(aceHeight);});    
    };
})(jQuery);

/*
----------------------
    DOM Ready:
----------------------
*/

$(document).ready(function(){
    //Equalize:
    $('.equal-y').equalize();
    $('.equal-z').equalize();
    
    //Initialize Homepage Scroller:
    if ( jQuery().scrollable ){ 
        $("#stories").scrollable({
            
            items: '#items',    //The item wrapper
            keyboard: false,    //Scroll using keyboard
            circular: true,         //Loop to first item
            size: 1,            //The number of items to scroll
            speed: 2000,         //The speed of the transition
            next: '.item'         //The next btn
            
        }).autoscroll({ interval: 10000 });
    };
    
    
});
