/**
 * Very basic slideshow to get around menu issue
 *
 * @author Andrew Bredow <andrew.bredow@liveoak360.com>
 */

(function($){
    $.fn.baSlideshow = function() {
        var current = 0,
            slides = [],
            display = '';
        var transition = function(el) {
            current = (current++ === slides.length-1) ? 0 : current;
            $.map(slides, function(el, i) {
                display = (i === current) ? 'block' : 'none';
                $(el).css('display', display);
            });
        };
        return this.each(function() {
            slides = $(this).children();
            window.setInterval(transition, 3400);
        });
    }
})(jQuery);
