(function($) {
    $.fn.newsScroll = function(options) {
        // For each item in the wrapped set, perform the following. 
	this.each(function() {
            var $this = $(this),
            defaults = {
                speed: 1000,
                delay: 5000,
                //list_item_height: $this.children('dd').outerHeight()
		list_item_height: $this.children('div').outerHeight()
            },
            settings = $.extend({}, defaults, options);
            
            setInterval(function() {
                // Get the very first list item in the wrapped set.
                //$this.children('dd:first')
		$this.children('div:first')
                    .animate({
                        marginTop : '-' + settings.list_item_height,
                        opacity: 'hide'
                        }, settings.speed,
                        function() {
                            //$this.children('dd:first')
			    $this.children('div:first')
                                .appendTo($this)
                                .css('marginTop', 0)
                                .fadeIn(200);
                        }
                    );
            }, settings.delay);
        });
        
        return this;
    }
})(jQuery);