I'm programming a site slideshow right now for a company, and I need it to rotate automatically, and also if the user pushes pause, click the arrows to continue moving through the slideshow without restarting the interval, I am having trouble doing it though. any help would be appreciated

//interval for rotating pics if the paused status is equal to 0 which is default
if(pausedStatus==0){
autoRotater=setInterval(function(){
//after the interval hits 5 seconds, the old image is faded out and the new Image is brought in with a fadeIn
$(description).fadeOut('slow');
$(newImg).fadeOut('slow' ,function(){
i++;
//if i is greater then the length of the 2 dimensional array, i goes back to 0
if(i >= slideImages.length){
i=0;

//when the right arrow is clicked, the interval is cleared and set again by the click
$('#right').click(function(){
clearInterval(autoRotater);

//after the interval hits 5 seconds, the old image is faded out and the new Image is brought in with a fadeIn
$(description).fadeOut('slow');
$(newImg).fadeOut('slow' ,function(){
i++;
//if i is greater then the length of the 2 dimensional array, i goes back to 0
if(i >= slideImages.length){
i=0;

autoRotater=setInterval(function(){
$(description).fadeOut('slow');
$(newImg).fadeOut('slow' ,function(){
i++;
//if i is greater then the length of the 2 dimensional array, i goes back to 0
if(i >= slideImages.length){
i=0;

//after the interval hits 5 seconds, the old image is faded out and the new Image is brought in with a fadeIn
$(description).fadeOut('slow');
$(newImg).fadeOut('slow' ,function(){
i--;
//if i is greater then the length of the 2 dimensional array, i goes back to 0
if(i < 0){
i=slideImages.length-1;
}

autoRotater=setInterval(function(){
$(description).fadeOut('slow');
$(newImg).fadeOut('slow' ,function(){
i++;
//if i is greater then the length of the 2 dimensional array, i goes back to 0
if(i >= slideImages.length){
i=0;

//after the interval hits 5 seconds, the old image is faded out and the new Image is brought in with a fadeIn
$(description).fadeOut('slow');
$(newImg).fadeOut('slow' ,function(){
i++;
//if i is greater then the length of the 2 dimensional array, i goes back to 0
if(i >= slideImages.length){
i=0;

//when the right arrow is clicked, the interval is cleared and set again by the click
$('#right').click(function(){

//after the interval hits 5 seconds, the old image is faded out and the new Image is brought in with a fadeIn
$(description).fadeOut('slow');
$(newImg).fadeOut('slow' ,function(){
i++;
//if i is greater then the length of the 2 dimensional array, i goes back to 0
if(i >= slideImages.length){
i=0;

//after the interval hits 5 seconds, the old image is faded out and the new Image is brought in with a fadeIn
$(description).fadeOut('slow');
$(newImg).fadeOut('slow' ,function(){
i--;
//if i is greater then the length of the 2 dimensional array, i goes back to 0
if(i < 0){
i=slideImages.length-1;
}