(function($) {
	
	$.fn.contentSlider = function(options) {
		var defaults = {
			speed: 2000,
			duration: 6200
		};
		
		var config = $.extend(defaults,options);
		
		this.each(function() {
			var $this = $(this);
			
			$this.wrap("<div id=\"wrapper\"></div>");
			//left: "-780px"left: "0px"
			var timer = window.setInterval(function() {
				$this.animate({opacity:0}, config.speed, function() {
					$this.css({left: "0px"}).children(":first").remove().appendTo($this);
				}).animate({opacity:1}, config.speed);
			}, config.duration);
		});
		
		return this;
	};
})(jQuery);
$(document).ready(function(){
	$("#slider").contentSlider();
});