function illum_rotator (controller) {
    
    var totalWidth = 0; // 
    
    jQuery(".product").each(function() {
    	totalWidth += jQuery(this).width() + 40;
    });
    
    jQuery(".rotator-container").css({width : totalWidth});
    
    var controller = {
	    time : 15000,
	    running : true,
	    increase_speed : function() {
			console.log('increase speed');
	    }
	};
	
	var queue = new Queue();
	
	jQuery(".product").each(function() {
	    var thisProduct = jQuery(this);
	    offset_left = thisProduct.offset().left + thisProduct.width() + 200;
		    
	    thisProduct.css({
	        'top' : 0,
	        'left' : - offset_left
	    }); 
	    queue.enqueue(thisProduct);
	});
	
	function run() {
	    var tp = queue.dequeue();
	    var distance = 800 + tp.width() + 20 + 400; 
	
	    tp.animate({'left' : '+=' + distance + 'px'}, controller.time, function() {
	        queue.enqueue(tp);
	        console.log('added item');
	        tp.css('opacity', 0).animate({'left' : '-=' + distance + 'px'}, 100, function(){
	            tp.css('opacity', 1);      
	        });    
	    });   
	    console.log('queue size is: ' + queue.getSize());
	   
	    setTimeout(run, controller.time / 9);
	}
	
	run();
	
	jQuery("p#next").hover(
	    function() {
	        controller.increase_speed();
	    },
	    function() {
	        console.log("hover out");
	    }
	);    
    
   	
};    
