

          $(document).ready(function(){
        
        
        
          // Add smooth scrolling to all links
          $('.page-anchor-link').on('click', function(event) {

            // Make sure this.hash has a value before overriding default behavior
       
              // Prevent default anchor click behavior
              event.preventDefault();

              // Store hash
              var hash = this.hash;

              // Using jQuery's animate() method to add smooth page scroll
              // The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area
              $('html, body').animate({
                // Offset by the height of the nav (115) + the height of the subnav (48)
                scrollTop: $(hash).offset().top -163
              }, 500, function(){

                // Add hash (#) to URL when done scrolling (default click behavior)
                // window.location.hash = hash;
              });
          }); // End if
          
          
            $(function(){var navHeight=163;var sectionMargin=60*2;var marginsHeight=163+sectionMargin;var sectionOffset=$(".parallax-section").offset().top;var sectionHeight=$(".web-stack-container").innerHeight();var sectionEnd=$(".parallax-section + section").offset().top;$(window).scroll(function(){var windowTop=$(window).scrollTop();if(sectionOffset-windowTop<navHeight){$('.parallax-section .web-stack-container').addClass("sticky");}
if(sectionEnd-windowTop<sectionHeight+marginsHeight){$('.parallax-section .web-stack-container').removeClass("sticky");$('.parallax-section .web-stack-container').addClass("sticky-bottom");}
if(sectionOffset-windowTop>navHeight){$('.parallax-section .web-stack-container').removeClass("sticky");}
if(sectionEnd-windowTop>sectionHeight+marginsHeight){$('.parallax-section .web-stack-container').removeClass("sticky-bottom");}});var blockAnimate=function(x){var block1Id=$(x);var block1Offset=block1Id.offset().top;var block1Label=x.replace('#','');var relatedBlock=$('[data-matching-block="'+block1Label+'"]');$(window).scroll(function(){var windowTop=$(window).scrollTop();if(block1Offset-windowTop<navHeight+300){block1Id.addClass("active");relatedBlock.addClass("active");}
if(block1Offset-windowTop>navHeight+300){block1Id.removeClass("active");relatedBlock.removeClass("active");}
if(block1Offset-windowTop<navHeight+00){block1Id.addClass("complete");}
if(block1Offset-windowTop>navHeight+00){block1Id.removeClass("complete");}});}
blockAnimate('#parallax-block-01');blockAnimate('#parallax-block-02');blockAnimate('#parallax-block-03');blockAnimate('#parallax-block-04');blockAnimate('#parallax-block-05');blockAnimate('#parallax-block-06');});
          
          
         
        });


