{"version":3,"file":"carousel.min.js","sources":["carousel.min.js"],"sourcesContent":["'use strict';\n\n(function ($, Drupal) {\n Drupal.behaviors.Carousel = {\n attach: function attach() {\n /* Client CAROUSEL */\n function clientCarousel() {\n var carousalCount3Block = 1;\n var carousalNextCount3Block = 2;\n var clientTotalCount = $('.visible-section .block').length + 1;\n var carousalNextTwoCount = 3;\n var visibleSection = $('.visible-section');\n $('.prev-next-controls .prev').click(function () {\n visibleSection.children(\".block:nth-child(\".concat(carousalCount3Block, \")\")).removeClass('active');\n visibleSection.children(\".block:nth-child(\".concat(carousalNextCount3Block, \")\")).removeClass('active');\n visibleSection.children(\".block:nth-child(\".concat(carousalNextTwoCount, \")\")).removeClass('active');\n if (carousalCount3Block > 1) {\n carousalCount3Block -= 1;\n $('.visible-section').children(\".block:nth-child(\".concat(carousalCount3Block, \")\")).addClass('active');\n } else {\n carousalCount3Block = clientTotalCount - 1;\n visibleSection.children(\".block:nth-child(\".concat(carousalCount3Block, \")\")).addClass('active');\n }\n if (carousalNextCount3Block > 1) {\n carousalNextCount3Block -= 1;\n $('.next-one-section').children(\".block:nth-child(\".concat(carousalNextCount3Block, \")\")).addClass('active');\n } else {\n carousalNextCount3Block = clientTotalCount - 1;\n $('.next-one-section').children(\".block:nth-child(\".concat(carousalNextCount3Block, \")\")).addClass('active');\n }\n if (carousalNextTwoCount > 1) {\n carousalNextTwoCount -= 1;\n $('.next-two-section').children(\".block:nth-child(\".concat(carousalNextTwoCount, \")\")).addClass('active');\n } else {\n carousalNextTwoCount = clientTotalCount - 1;\n $('.next-two-section').children(\".block:nth-child(\".concat(carousalNextTwoCount, \")\")).addClass('active');\n }\n });\n $('.prev-next-controls .next').click(function () {\n visibleSection.children(\".block:nth-child(\".concat(carousalCount3Block, \")\")).removeClass('active');\n $('.next-one-section').children(\".block:nth-child(\".concat(carousalNextCount3Block, \")\")).removeClass('active');\n $('.next-two-section').children(\".block:nth-child(\".concat(carousalNextTwoCount, \")\")).removeClass('active');\n carousalCount3Block += 1;\n carousalNextCount3Block += 1;\n carousalNextTwoCount += 1;\n if (carousalCount3Block < clientTotalCount) {\n visibleSection.children(\".block:nth-child(\".concat(carousalCount3Block, \")\")).addClass('active');\n } else {\n carousalCount3Block = 1;\n visibleSection.children(\".block:nth-child(\".concat(carousalCount3Block, \")\")).addClass('active');\n }\n if (carousalNextCount3Block < clientTotalCount) {\n $('.next-one-section').children(\".block:nth-child(\".concat(carousalNextCount3Block, \")\")).addClass('active');\n } else {\n carousalNextCount3Block = 1;\n $('.next-one-section').children(\".block:nth-child(\".concat(carousalNextCount3Block, \")\")).addClass('active');\n }\n if (carousalNextTwoCount < clientTotalCount) {\n $('.next-two-section').children(\".block:nth-child(\".concat(carousalNextTwoCount, \")\")).addClass('active');\n } else {\n carousalNextTwoCount = 1;\n $('.next-two-section').children(\".block:nth-child(\".concat(carousalNextTwoCount, \")\")).addClass('active');\n }\n });\n }\n clientCarousel();\n\n /* Three Block Image\n NEED MORE DESCRIPTION FOR THIS FUNCTION */\n $('.half-heading-half-carousal .visible-section').children('.block:nth-child(1)').addClass('active');\n $('.half-heading-half-carousal .next-one-section').children('.block:nth-child(2)').addClass('active');\n $('.half-heading-half-carousal .next-two-section').children('.block:nth-child(3)').addClass('active');\n /* CAROUSEL\n careers page */\n $('.carousel-half-and-half-descriptive-block').owlCarousel({\n loop: true,\n margin: 0,\n nav: true,\n mouseDrag: false,\n touchDrag: false,\n dots: false,\n autoplay: false,\n autoplayTimeout: 5000,\n autoHeight: true,\n items: 1\n });\n /* Team page */\n var $teamCarousel = $('.teamPopupCarousel').owlCarousel({\n loop: true,\n margin: 0,\n nav: true,\n mouseDrag: false,\n touchDrag: false,\n dots: false,\n autoplay: false,\n autoplayTimeout: 5000,\n autoHeight: true,\n items: 1,\n URLhashListener: true,\n startPosition: 'URLHash'\n });\n /* TEAM WORKING */\n $('.close-popup').click(function () {\n $('.team-popup').hide();\n $('.team-popup-top').hide();\n });\n /* CLICK */\n $('.team-section').children('.contentWrapper-1290').children('ul').children('li').click(function (event) {\n event.preventDefault();\n var childIndex = $(this).index();\n if ($(window).width() < 481) {\n if ($(this).children('.content').children('p').css('display') === 'none') {\n $('.team-section').children('.contentWrapper-1290').children('ul').children('li').children('.content').children('p').hide();\n $(this).children('.content').children('p').slideDown();\n $(this).children('.content').children('.team-mobile-close-btn').show();\n $('html, body').stop().animate({\n scrollTop: $(this).children('.content').offset().top\n }, 1000, 'linear');\n }\n } else {\n $('.team-popup').show();\n }\n $teamCarousel.trigger('refresh.owl.carousel');\n $teamCarousel.trigger('to.owl.carousel', childIndex);\n });\n $('.team-mobile-close-btn').click(function (event) {\n event.preventDefault();\n $(this).parent('.content').children('p').slideUp();\n $(this).hide();\n $('html, body').stop().animate({\n scrollTop: $(this).parent('.content').parent('li').offset().top - 150\n }, 1000, 'linear');\n });\n /* SLIDER for the social */\n var carouselSection = $('.carousel-section');\n carouselSection.find('.first-images').each(function () {\n var src = $(this).find('article').find('img').attr('src');\n $('.first-image-box').find('.image-wrapper').append(\"\"));\n });\n carouselSection.find('.second-images').each(function () {\n var src = $(this).find('article').find('img').attr('src');\n $('.second-image-box').find('.image-wrapper').append(\"
\"));\n });\n carouselSection.find('.third-images').each(function () {\n var src = $(this).find('article').find('img').attr('src');\n $('.third-image-box').find('.image-wrapper').append(\"
\"));\n });\n var firstCount = 0;\n $('.first-image-box').find('.image-wrapper').find('img').each(function () {\n $(this).css('transform', \"translate(-\".concat(firstCount, \"00%, 0%) matrix(1, 0, 0, 1, 0, 0)\"));\n firstCount += 1;\n if (firstCount === 1) {\n $('.carousel-social-nav').append(\"