
/*	jquery fader plugin 
	jonathan derouchie 2009
	----------------------------------------	*/
	
	(function($){
		$.fn.fader = function(options){
	
			return this.each(function() {
				var $this = $(this), 
				defaults = {
					fade_in: 0, 
					fade_out: 0, 
					fade_time: 2500
				},
				settings = $.extend({}, defaults, options);
				
				setInterval(function() {
					if(($this).children(':visible').is(':last-child')) {
						$this.children(':visible').fadeOut(settings.fade_out,function() {
							$this.children(':first').fadeIn(settings.fade_in);});
					} else {
						$this.children(':visible').fadeOut(settings.fade_out,function() { 
							$(this).next().fadeIn(settings.fade_in); });
					}
				}, settings.fade_time);
			});
		};
	})(jQuery);

