var Wick = Wick || {};
Wick.ChatBot = (function () {
  let $backToTop = $('#back-to-top'),
    chatBotBtnClass = '.chat-bot',
    backToTopWithChatClass = 'back-to-top--with-chat';

  function chatBotClassHandler(){
    window.onload = function(){
      let chatBotElement = $(chatBotBtnClass);
      if(chatBotElement.length) {
        $backToTop.addClass(backToTopWithChatClass);
      }
    }
  }

  function init(){
    chatBotClassHandler();
  }

  init();
})();
