/* global tarteaucitron */
jQuery(window).resize(function () {
  jQuery('.fusion-person').each(function () {
    // console.log(jQuery(this));
    // jQuery(this).height(jQuery(this).parent().height());
  })
})

jQuery(document).ready(function () {
  // console.log('ready');
  jQuery(window).trigger('resize')

  jQuery('.menu-item a').mouseenter(function () {
    jQuery('.fusion-main-menu').find('.menu-item').each(function () {
      if (jQuery(this).hasClass('current-menu-item')) {
        jQuery(this).find('.fusion-arrow-svg').css({
          opacity: 0,
          visibility: "hidden",
        })
      }
    })

  })

  jQuery('.fusion-main-menu').find('.menu-item').each(function () {
    if (jQuery(this).hasClass('current-menu-item')) {
      jQuery(this).find('.fusion-arrow-svg').css({
        opacity: 1,
        visibility: "visible",
      })
    }
  })

  jQuery('.person-name').each(function () {
    var sName = jQuery(this).text().split(' ')[1]
    jQuery(this).html(jQuery(this).text().split(' ')[0] + '<br><strong>' + sName + '</strong>')
  })

  tarteaucitron.init({
    "privacyUrl": "/mentions-legales", /* Privacy policy url */
    "cookieName": "tartaucitron", /* Cookie name */
    "orientation": "bottom", /* Banner position (top - bottom) */
    "showAlertSmall": true, /* Show the small banner on bottom right */
    "cookieslist": true, /* Show the cookie list */
    "adblocker": false, /* Show a Warning if an adblocker is detected */
    "AcceptAllCta": true, /* Show the accept all button when highPrivacy on */
    "highPrivacy": false, /* Disable auto consent */
    "handleBrowserDNTRequest": false, /* If Do Not Track == 1, disallow all */
    "removeCredit": false, /* Remove credit link */
    "moreInfoLink": true, /* Show more info link */
    "useExternalCss": false /* If false, the tarteaucitron.css file will be loaded */
    //"cookieDomain": ".my-multisite-domaine.fr" /* Shared cookie for subdomain website */
  });

  (tarteaucitron.job = tarteaucitron.job || []).push('youtube');

  tarteaucitron.user.gtagUa = 'G-XXXXXXXXXX';
  tarteaucitron.user.gtagMore = function () { /* add here your optionnal gtag() */ };
  (tarteaucitron.job = tarteaucitron.job || []).push('gtag');
})


