{"version":3,"sources":["../../../dev/j/lp/lp-a8cl.js"],"names":["equalizeTabsSections","getMaxHeight","array","Math","max","apply","$carousel","each","$self","$","this","$selfTabSections","find","heights","push","height","avm","require","waypoints","$document","document","$window","window","$tab","$more","$close","$graph","on","$target","closest","hasClass","animate","scrollTop","offset","top","toggleClass","removeClass","$selfCarousel","$selfSections","$selfTabs","tabIndex","index","eq","addClass","ready","decorate","unserializeUrl","params","location","href","key"],"mappings":"CAAA,WACC,YAoDA,SAASA,KACR,GAAIC,GAAe,SAASC,GAC3B,MAAOC,MAAKC,IAAIC,MAAMF,KAAMD,GAG7BI,GAAUC,KAAK,WACd,GAAIC,GAAQC,EAAEC,MACbC,EAAmBH,EAAMI,KAAK,mBAC9BC,IAGDF,GAAiBJ,KAAK,WACrB,GAAIC,GAAQC,EAAEC,KACdG,GAAQC,KAAKN,EAAMO,YAIpBJ,EAAiBJ,KAAK,WACTE,EAAEC,MACRK,OAAOd,EAAaY,QAtE7B,GAAIJ,GAAIO,IAAIC,QAAQ,UACnBC,EAAYF,IAAIC,QAAQ,uBACxBE,EAAYV,EAAEW,UACdC,EAAUZ,EAAEa,QAEZC,GADSd,EAAE,aACJA,EAAE,YACTe,EAAQf,EAAE,YACVgB,EAAShB,EAAE,aAEXH,GADWG,EAAE,eACDA,EAAE,iBACdiB,EAASjB,EAAE,YAOZe,GAAMG,GAAG,QAAS,WACjB,GAAIC,GAAUnB,EAAEC,MAAMmB,QAAQ,eAE1BD,GAAQE,SAAS,WACpBrB,EAAE,cAAcsB,SACfC,UAAWJ,EAAQK,SAASC,IAAM,KAChC,KAGJN,EAAQO,YAAY,YAIrBV,EAAOE,GAAG,QAAS,WACJlB,EAAEC,MAAMmB,QAAQ,gBACtBO,YAAY,YAKrBb,EAAKI,GAAG,aAAc,WACrB,GAAInB,GAAQC,EAAEC,MACb2B,EAAgB7B,EAAMqB,QAAQ,gBAC9BS,EAAgBD,EAAczB,KAAK,mBACnC2B,EAAYF,EAAczB,KAAK,WAC/B4B,EAAWD,EAAUE,MAAMjC,EAE5B+B,GAAUH,YAAY,UACtBE,EAAcF,YAAY,UAC1BG,EAAUG,GAAGF,GAAUG,SAAS,UAChCL,EAAcI,GAAGF,GAAUG,SAAS,YA4BrCxB,EAAUyB,MAAM,WACf5C,MAEDqB,EAAQM,GAAG,SAAU,WACpB3B,MAGDqB,EAAQM,GAAG,gBAAiB,WACvBT,EAAUQ,EAAQ,MACrBA,EAAOiB,SAAS,YAKlB,IAAIE,GAAW7B,IAAIC,QAAQ,2BAC1B6B,EAAiB9B,IAAIC,QAAQ,yBAC7B8B,EAASD,EAAexB,OAAO0B,SAASC,KAEzC,KAAK,GAAIC,KAAOH,GACfF,EAAS,gBAAiBK","file":"lp-a8cl.js","sourcesContent":["(function() {\n\t'use strict';\n\tvar $ = avm.require('jquery'),\n\t\twaypoints = avm.require('avast.web.waypoints'),\n\t\t$document = $(document),\n\t\t$window = $(window),\n\t\t$entry = $('.js-entry'),\n\t\t$tab = $('.js-tab'),\n\t\t$more = $('.js-more'),\n\t\t$close = $('.js-close'),\n\t\t$tooltip = $('.js-tooltip'),\n\t\t$carousel = $('.js-carousel'),\n\t\t$graph = $('.js-graph');\n\n\n\n\n// Info box panels\n\t// adds .expanded to closest .js-info-box\n\t$more.on('click', function() {\n\t\tvar $target = $(this).closest('.js-info-box');\n\n\t\tif ($target.hasClass('expand')) {\n\t\t\t$('html, body').animate({\n\t\t\t\tscrollTop: $target.offset().top - 405\n\t\t\t}, 500);\n\t\t}\n\n\t\t$target.toggleClass('expand');\n\t});\n\n\t// removes .expanded when clicking close\n\t$close.on('click', function() {\n\t\tvar $target = $(this).closest('.js-info-box');\n\t\t$target.removeClass('expand');\n\t});\n\n \n// Tabs switcher\n\t$tab.on('mouseenter', function() {\n\t\tvar $self = $(this),\n\t\t\t$selfCarousel = $self.closest('.js-carousel'),\n\t\t\t$selfSections = $selfCarousel.find('.js-tab-section'),\n\t\t\t$selfTabs = $selfCarousel.find('.js-tab'),\n\t\t\ttabIndex = $selfTabs.index($self);\n\n\t\t$selfTabs.removeClass('active');\n\t\t$selfSections.removeClass('active');\n\t\t$selfTabs.eq(tabIndex).addClass('active');\n\t\t$selfSections.eq(tabIndex).addClass('active');\n\t});\n\n// Equalize heights of tabs sections\n\tfunction equalizeTabsSections() {\n\t\tvar getMaxHeight = function(array) {\n\t\t\treturn Math.max.apply(Math, array);\n\t\t};\n\n\t\t$carousel.each(function() {\n\t\t\tvar $self = $(this),\n\t\t\t\t$selfTabSections = $self.find('.js-tab-section'),\n\t\t\t\theights = [];\n\n\t\t\t// Collect heights of tabs section for current carousel\n\t\t\t$selfTabSections.each(function() {\n\t\t\t\tvar $self = $(this);\n\t\t\t\theights.push($self.height());\n\t\t\t});\n\n\t\t\t// Set heights of tabs section for current carousel\n\t\t\t$selfTabSections.each(function() {\n\t\t\t\tvar $self = $(this);\n\t\t\t\t$self.height(getMaxHeight(heights));\n\t\t\t});\n\t\t});\n\t}\n\n\t$document.ready(function() {\n\t\tequalizeTabsSections();\n\t});\n\t$window.on('resize', function() {\n\t\tequalizeTabsSections();\n\t});\n// Animated graph section\n\t$window.on('resize scroll', function() {\n\t\tif (waypoints($graph, 0.75)) {\n\t\t\t$graph.addClass('animate');\n\t\t}\n\t});\n\n\n\tvar decorate = avm.require('avast.web.linkDecorator'),\n\t\tunserializeUrl = avm.require('avast.url.unserialize'),\n\t\tparams = unserializeUrl(window.location.href);\n\n\tfor (var key in params) {\n\t\tdecorate('.bi-cart-link', key);\n\t}\n\t// /Decorate links\n})();\n"]}