

$(document).ready(function(){
    $("#projectInfo").toggle();
    $("#prevNextProject").toggle();
    $("#displaySS").toggle();
    $('#displayWrap').toggle();
     $.preload("#displayWrapSS img",{
        onFinish:function(e){
           $("#loading").animate({ 
                height: "0px",
                top:"197px",
                opacity: 0
        
      }, 400 );
          startSeqInt=setInterval(startSeq,1000); 
 		  }   
     });
     
  });

function   startSeq(){
    $("#loading").remove();
    $('#displayWrap').toggle();
    $('#displayWrap').cycle({
      fx:'wipeBK',
      autostopCount: 2,	
      autostop:1,
      cssBefore: { 
         clip: 'rect(200px 0px 200px 696px)'         
       },
       speed:600,
       timeout:   1000, 
       delay:     -1200  
      });
    clearInterval(startSeqInt);   
    startSlideshowInt=setInterval(startSlideshow,2000);   
    whiteImageInt=setInterval(removeWhiteImage,3500); 
    

}

function startSlideshow(){
    $("#displaySS").toggle();    
    $("#projectInfo").fadeIn(1200);
    $("#prevNextProject").fadeIn(1700);
    $('.slideshow').cycle({
      fx:'wipeBK',
      cssBefore: { 
         clip: 'rect(200px 0px 200px 696px)'         
       },
        speed:600,
        timeout:   8000, 
        delay:     -4000,  
        pager:  '#imgnav'
      });
    clearInterval(startSlideshowInt);   
}

function removeWhiteImage(){
   $(".displayImgAppear").remove();
   clearInterval(whiteImageInt); 
}