(function($) {

    /* jQuery dynamic object method */
    $.fn.fadeSequence = function(options) {
        return this.each(function() {   
            $.fadeSequence(this, options);
        });
    };

    /* jQuery static function */
    $.fadeSequence = function(container, options) {
        var settings = {
            'children':    null,
            'alternation': 'sequence',
            'timeout':     2000,
            'animation':   'fade',
            'speed':       'normal',
            'class':       'alternation',
            'height':      'auto'
        };
        if (options)
            $.extend(settings, options);
        if (settings.children === null)
            var elements = $(container).children();
        else
            var elements = $(container).children(settings.children);

			var current = 0;
			var max_div = ($(container).children().size()-1);
			for(current=0;current<=max_div;current++)
			{
				$(container)
					.children(settings.children)
					.eq(current)
					.animate({opacity: '1.0'},((settings.timeout*(current+1))), function () {
										$(this).fadeIn(settings.speed);
			
										});
			}




    };


})(jQuery);