(function (jQuery) {
    jQuery.fn.quotenews = function (options) {

        var selector = jQuery(this).selector;
        //Hiding all the testimonials, except for the first one.
        jQuery(selector + ' li').hide().eq(0).show();

        // A self executing function that loops through the testimonials:
        (function showNextTestimonial() {

            // Wait for 7.5 seconds and hide the currently visible testimonial:
            jQuery(selector + ' li:visible').delay(7500).fadeOut('slow', function () {

                // Move it to the back:
                jQuery(this).appendTo(selector + ' ul');

                // Show the next testimonial:
                jQuery(selector + ' li:first').fadeIn('slow', function () {

                    // Call the function again:
                    showNextTestimonial();
                });
            });
        })();
    }
})(jQuery);

