
$(function(){
    left=-4061;
    var nxt = function(){
       if (left==-305){
               $("#slideshow .body").animate({"left": "-4061px"}, "slow");
               left=-4061;
             } else{
       
          $("#slideshow .body").animate({"left": "+=939px"}, "slow");
          left+=939;
      }   
   	      return false;  
   	  };
    var inter = setInterval(nxt, 6000);
    
  $('.play').hide();
  $('.play').click(function(){
    inter = setInterval(nxt, 6000);
    $('.play').hide();
    $('.pause').show();
  });
  
  $('.pause').click(function(){
    clearInterval(inter);
    $('.play').show();
    $('.pause').hide();
  }); 
   
  
      
    $(".next").click(nxt);
      
       $(".back").click(function(){
            if(left==-4061){
                      $("#slideshow .body").animate({"left": "-305"}, "slow");
                      left=-305;
                    }else{
         
             $("#slideshow .body").animate({"left": "-=939px"}, "slow");
             left-=939;
         }
            
           
   	      return false;  
   	  });    
      
     
     
     
  });
