 (function($) {  
   
 $.fn.referenceShow = function(options) {  
     return this.each(function() {     
         
         var  
           $this = $(this),   
             
           defaults = {  
             speed: 2000,   
             delay: 4000,   
			 items_shown:3,
             list_item_width: $this.children('div.reference').outerWidth() 
          },  
           settings = $.extend({}, defaults, options);   		
	
		for(var i=1;i<=settings.items_shown;i++){
			$this.children('div.reference:nth-child('+i+')').css('display','block');
		}
		
		   
       setInterval(function() { 
			$this.children('div.reference:first')  
					.animate({marginLeft : '-' + settings.list_item_width, opacity: 'hide' },  
						settings.speed,  
						function() {  
							$this.children('div.reference:first').appendTo($this).css('marginLeft', 0);
					}  
				); // end animate  
				$this.children('div.reference:nth-child('+(settings.items_shown+1)+')').animate({opacity:'show'},settings.speed);
      	 }, settings.delay); // end setInterval  
     });  
 }  
 })(jQuery);