// Paste your JS code here, don't include script tags

(function ($) {
    var quotes = $(".sliding_msg--li");
    var quoteIndex = -1;

    function showNextQuote() {
        ++quoteIndex;
        quotes
            .eq(quoteIndex % quotes.length)
            .fadeIn(1000)
            .delay(2000)
            .fadeOut(1000, showNextQuote);
    }

    showNextQuote();

    var usps = $(".sliding_msg-usp");
    var uspsIndex = -1;

    function showNextUsp() {
        ++uspsIndex;
        usps
            .eq(uspsIndex % usps.length)
            .fadeIn(1000)
            .delay(2000)
            .fadeOut(1000, showNextUsp);
    }

    showNextUsp();
    
})(jQuery);
