/* ---------- Parallax C-parallax-v2 21-04-06 Scripts ---------- */

try
{
  let controller = new ScrollMagic.Controller({ globalSceneOptions: { triggerHook: 'onEnter', duration: '200%' } });

  // build scenes
  new ScrollMagic.Scene({ triggerElement: '#parallax' })
    .setTween('#parallax > div.parallax-image',
      {
        y: '80%',
        ease: Linear.easeNone
      })
    .addTo(controller);

  // Removes link button from parallax if there is no text
  $('.parallax-button').text() === '' ? $('.parallax-button').css('display', 'none') : $('.parallax-button').css('display', 'inline-block');
}
catch (error)
{
  //  console.log("Scroll Magic doesn't exist");
}
