jQuery(document).ready(function() {  

	
	//var speed = 15000;
	//var run = setInterval('rotate()', speed);
	
	
    //if user clicked on prev button  
    jQuery('#prev').click(function() {  

			jQuery('.clientPage').fadeOut('slow', function() {
				//move the last item and put it as first item                 
				jQuery('.client:first').before(jQuery('.client:last'));             

				jQuery('.clientPage').fadeIn('slow');
			
			
			});

  
        //cancel the link behavior              
        return false;  
              
    });  
	
	
  
   
    //if user clicked on next button  
    jQuery('#next').click(function() {  
      
		jQuery('.clientPage').fadeOut('slow', function() {
				//move the last item and put it as first item                 
				jQuery('.client:last').after(jQuery('.client:first'));                                          
				jQuery('.clientPage').fadeIn('slow');
				
        
		});

                   
        //cancel the link behavior  
        return false;  
          
    }); 
	/*
	jQuery('.buttons').hover(

		function() {
			clearInterval(run);
		}
	); 
    jQuery('.clientPage').hover(

		function() {
			clearInterval(run);
		},
		function() {
			run = setInterval('rotate()', speed);
		}
	); 
	*/

          
});  

function rotate() {
	jQuery('#next').click();
}

  
