\n * @module avast.web.tabsAnchor\n * @requires module:jquery\n * @copyright Avast Software s.r.o ©2014-2015\n */\n\navm.define('avast.web.tabsAnchor', (function() {\n\n\tvar $ = avm.require('jquery'),\n\t\t$window = $(window),\n\t\twaypoints = avm.require('avast.web.waypoints'),\n\t\tlastScrollTop = 0,\n\t\tdirection;\n\n\tvar tabsAnchor = {\n\t\tdefaults: {\n\t\t\tbehavior: 'slideIn'\n\t\t},\n\t\tinit: function(nId, options){\n\t\t\tvar opts = this.options = $.extend(true, this.defaults, options);\n\n\t\t\tif(nId && $(nId).length > 0) {\n\t\t\t\tthis.stick(nId);\n\t\t\t\tthis.highlight(nId);\n\t\t\t\tthis.handleClick(nId);\n\t\t\t\tthis.visible(nId);\n\t\t\t}\n\t\t},\n\t\tvisible: function(nId) {\n\t\t\tvar $bar = $(nId),\n\t\t\t\twindowScrollTop = $window.scrollTop(),\n\t\t\t\t$wrapper = $(nId).parent(),\n\t\t\t\twrapperOffsetTop = $wrapper.offset().top;\n\n\t\t\tif (windowScrollTop > wrapperOffsetTop) {\n\t\t\t\t$bar.addClass('sticky');\n\t\t\t} else {\n\t\t\t\t$bar.removeClass('sticky');\n\t\t\t}\n\t\t},\n\t\tstick: function(nId){\n\t\t\tif(typeof waypoints === 'function'){\n\n\t\t\t\tvar clone = $(''),\n\t\t\t\t\t$this = $(nId),\n\t\t\t\t\tfirstItemId = $(nId + ' ul:first li:first-child').find('a').attr('href'),\n\t\t\t\t\tlastItemId = $(nId + ' ul:first li:last-child').find('a').attr('href'),\n\t\t\t\t\th = this.options.height ? this.options.height : $this.outerHeight(),\n\t\t\t\t\tp = $this.css('marginTop'),\n\t\t\t\t\tsTop = $window.scrollTop(),\n\t\t\t\t\troot = this;\n\n\t\t\t\tif(firstItemId && firstItemId.indexOf('#') !== 0){\n\t\t\t\t\tfirstItemId = '-';\n\t\t\t\t}\n\n\t\t\t\tif(lastItemId && lastItemId.indexOf('#') !== 0){\n\t\t\t\t\tlastItemId = '-';\n\t\t\t\t}\n\n\t\t\t\t// Find correct anchored element\n\t\t\t\tif($(firstItemId).length === 0){\n\t\t\t\t\t$(nId + ' ul:first li').each(function(){\n\t\t\t\t\t\tvar $this = $(this);\n\t\t\t\t\t\tvar anchorId = $this.find('a').attr('href');\n\t\t\t\t\t\tif(anchorId){\n\t\t\t\t\t\t\tif(anchorId.indexOf('#') !== 0){\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($(anchorId).length > 0){\n\t\t\t\t\t\t\tfirstItemId = anchorId;\n\t\t\t\t\t\t\treturn false; // stop loop with first success\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// TODO: Cure situation when item is in nav without approp section on page. Sticky bar is not hide when moved to top.\n\t\t\t\t// first tab reached\n $window.on('resize scroll', function() {\n var st = $(this).scrollTop();\n if (st > lastScrollTop){\n direction = 'down';\n } else {\n direction = 'up';\n }\n\t\t\t\t\tlastScrollTop = st;\n\t\t\t\t\t\n\t\t\t\t\tif ($this.parent().hasClass('partscreen')) {\n\t\t\t\t\t\troot.visible(nId);\n\t\t\t\t\t} else if ($(firstItemId).length > 0 && waypoints($(firstItemId), null, null, true)) {\n $this.addClass('sticky');\n if(root.options.behavior === 'static' && $('#tabs-anchor-clone').length < 1) {\n clone.height(h);\n $this.before(clone);\n }\n } else {\n $this.removeClass('sticky');\n if(root.options.behavior === 'static') {\n clone.remove();\n }\n }\n\n // last tab reached\n if ($(lastItemId).length > 0 && waypoints($(lastItemId), null, null, true)) {\n\t\t\t\t\t\t$this.addClass('sticky');\n\t\t\t\t\t\tif(root.options.behavior === 'static' && $('#tabs-anchor-clone').length < 1) {\n\t\t\t\t\t\t\tclone.height(h);\n\t\t\t\t\t\t\t$this.before(clone);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($(lastItemId).length > 0 && $(lastItemId).offset().top + $(lastItemId).outerHeight() - $(nId).outerHeight() < $window.scrollTop()) {\n\t\t\t\t\t\t$this.removeClass('sticky');\n\t\t\t\t\t\tif(root.options.behavior === 'static') {\n\t\t\t\t\t\t\tclone.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n });\n\t\t\t}\n\t\t},\n\t\thighlight: function(nId) {\n\t\t\tvar lastSection;\n\n\t\t\t$(nId + ' ul:first').find('a').each(function(){\n\t\t\t\tvar href = $(this).attr('href');\n\t\t\t\tvar id = href.replace(/#/,'');\n\n\t\t\t\t$('#content-holder').children().each(function(index){\n\t\t\t\t\tif(id == $(this).attr('id')){\n\t\t\t\t\t\t$(this).addClass('tabs-anchor-section');\n\t\t\t\t\t\t// last child\n\t\t\t\t\t\tlastSection = $(this);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tif(lastSection){\n\t\t\t\tlastSection.addClass('last-anchor-section');\n\t\t\t}\n\n\t\t\t$('.tabs-anchor-section').each(function() {\n\t\t\t\tvar $self = $(this);\n\t\t\t\tif ($self.length > 0) {\n\t\t\t\t\t$window.on('resize scroll', function() {\n\t\t\t\t\t\tif (waypoints($self, null, null, true)) {\n\t\t\t\t\t\t\tvar id;\n\t\n\t\t\t\t\t\t\t$(nId + ' ul:first').find('a').removeClass('active');\n\t\t\t\t\t\t\t\tid = $self.attr('id');\n\t\t\t\t\t\t\t\t$('[href=\"#'+ id +'\"]').addClass('active');\n\t\n\t\n\t\t\t\t\t\t\tvar el = $self;\n\t\t\t\t\t\t\tvar timeout = setTimeout(function(){\n\t\t\t\t\t\t\t\t$(el).trigger({\n\t\t\t\t\t\t\t\t\ttype: 'passed.waypoint',\n\t\t\t\t\t\t\t\t\tdirection: direction,\n\t\t\t\t\t\t\t\t\toffset: 500\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tclearTimeout(timeout);\n\t\t\t\t\t\t\t}, 100);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n });\n\t\t},\n\t\thandleClick: function(nId) {\n\t\t\tvar $item = $(nId + ' ul li a');\n\n\t\t\t$item.on('click', function(event) {\n\t\t\t\tfunction updateActiveItem() {\n\t\t\t\t\t$item.removeClass('active');\n\t\t\t\t\t$(event.target).addClass('active');\n\t\t\t\t\tclearTimeout($.data(this, 'scrollTimer'));\n\n\t\t\t\t\t// Wait until page stops scrolling\n\t\t\t\t\t$.data(this, 'scrollTimer', setTimeout(function() {\n\t\t\t\t\t\t$(event.target).addClass('active');\n\t\t\t\t\t\t$window.off('scroll', updateActiveItem)\n\t\t\t\t\t}, 50));\n\t\t\t\t}\n\n\t\t\t\t$window.on('scroll', updateActiveItem);\n\t\t\t});\n\t\t}\n\t};\n\n\treturn tabsAnchor;\n\n})());\n\n/**\n * Avast brcmpgid parameter\n * @version 1.0.0\n * @author Jaroslav Slaby \n * @module avast.web.brcmpgid\n * @requires avast.url.unserialize\n * @requires avast.web.linkDecorator\n * @copyright Avast Software s.r.o ©2021\n */\n\n(function() {\n\t'use strict';\n\n\t\tvar unserialize = avm.require('avast.url.unserialize'),\n\t\t\tlinkDecorator = avm.require('avast.web.linkDecorator'),\n\t\t\tqs = unserialize(),\n\t\t\tproductId = 'ASB',\n\t\t\tre = /^[a-z0-9]+$/i;\n\n\t\t\tif (qs && qs.brcmpgid && re.test(qs.brcmpgid) || qs && qs.pc && re.test(qs.pc)) {\n\n\t\t\t\tvar ASBLinks = document.querySelectorAll('[data-download-name*=\"' + productId + '\"]')\n\n\t\t\t\tfor (var i = 0; i < ASBLinks.length; i++) {\n\t\t\t\t\tif ('URLSearchParams' in window) {\n\t\t\t\t\t\tvar el = ASBLinks[i],\n\t\t\t\t\t\t\tdownloadURL,\n\t\t\t\t\t\t\tdownloadQueryString;\n\n\t\t\t\t\t\tif(!/ANDROID|IOS/.test(el.getAttribute('data-download-name'))) {\n\t\t\t\t\t\t\tif (el.href) {\n\t\t\t\t\t\t\t\tdownloadURL = new URL(el.href);\n\t\t\t\t\t\t\t\tdownloadQueryString = new URLSearchParams(downloadURL.search);\n\n\t\t\t\t\t\t\t\tdownloadQueryString.set('product', el.getAttribute('data-download-name') + '-CID');\n\n\t\t\t\t\t\t\t\tif (qs.brcmpgid !== undefined) {\n\t\t\t\t\t\t\t\t\tdownloadQueryString.set('tag', qs.brcmpgid);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (qs.pc !== undefined) {\n\t\t\t\t\t\t\t\tdownloadQueryString.set('pc', qs.pc);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tdownloadURL.search = downloadQueryString.toString();\n\t\t\t\t\t\t\t\tel.href = downloadURL.toString();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// IE fallback\n\t\t\t\t\t\tvar el = ASBLinks[i],\n\t\t\t\t\t\thref,\n\t\t\t\t\t\tdownloadQueryString;\n\n\t\t\t\t\t\tif(!/ANDROID|IOS/.test(el.getAttribute('data-download-name'))) {\n\t\t\t\t\t\t\tdownloadQueryString = el.search;\n\t\t\t\t\t\t\thref = el.href.replace(downloadQueryString, '');\n\n\t\t\t\t\t\t\tel.href = href + downloadQueryString.replace('=' + el.getAttribute('data-download-name') + '&', '=' + el.getAttribute('data-download-name') + '-CID&');\n\n\t\t\t\t\t\t\tlinkDecorator(el, 'tag', 'tag=null', qs.brcmpgid);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\treturn;\n\n})();\n\n/**\n * Decorate Buy Links with Campaign Marker if Present in URL\n * @version 1.0.0\n * @author Fedor KuÅ¡Å¡ \n * @module avast.web.mobileTracking\n * @requires jquery\n * @requires avast.storage.cookieStorage\n * @requires avast.url.unserialize\n */\n\navm.define('avast.web.campaignMarkerDecorator', $(document).ready(function() {\n\t'use strict';\n\tvar cookieStorage = avm.require('avast.storage.cookieStorage'),\n\t\t$cartLink = $('.bi-cart-link'),\n\t\tunserializedUrl = avm.require('avast.url.unserialize')(window.location.href),\n\t\tcmpgMarker = unserializedUrl.campaignMarker,\n\t\tCMPGNMARKER = 'campaignMarker',\n\n\t\tgetExpirationTime = function(minutes) {\n\t\t\tvar now = new Date();\n\t\t\tnow.setTime(now.getTime() + minutes * 60 * 1000);\n\t\t\treturn now.toUTCString();\n\t\t};\n\n\tif (cmpgMarker && cmpgMarker.length > 0) {\n\t\tcookieStorage.setItem('campaignMarker', cmpgMarker, getExpirationTime(30), '/', location.hostname, false);\n\t}\n\n\t$cartLink.on('click', function() {\n\t\tif (cookieStorage.getItem('campaignMarker') && cookieStorage.getItem('campaignMarker').length > 0)\t{\n\n\t\t\tvar link = $(this).attr('href'),\n\t\t\t\tisCampaignMarker = link.indexOf(CMPGNMARKER),\n\t\t\t\tupdatedLink = [],\n\t\t\t\tcampainMarker = cookieStorage.getItem(CMPGNMARKER);\n\n\t\t\t// if cartlink parameters in query param (avast)\n\t\t\t// else cartlink parameters in link (avast,avg)\n\t\t\tif (link.indexOf('?') >= 0) {\n\t\t\t\tvar linkVariables1 = link.split('&');\n\n\t\t\t\tlinkVariables1.forEach(function(item) {\n\t\t\t\t\tvar params = item.split('=');\n\t\t\t\t\tif (params[0] === 'CampaignMarker') {\n\t\t\t\t\t\tupdatedLink.push(params[0] + '=' + params[1] + '-' + campainMarker);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tupdatedLink.push(item);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t$(this).attr('href', updatedLink.join('&'));\n\t\t\t} else {\n\t\t\t\tvar linkVariables = link.split('/');\n\n\t\t\t\tlinkVariables.forEach(function(item) {\n\t\t\t\t\tvar params = item.split('.');\n\n\t\t\t\t\tif (params[0] === CMPGNMARKER) {\n\t\t\t\t\t\tupdatedLink.push(params[0] + '.' + params[1] + '-' + campainMarker);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tupdatedLink.push(item);\n\t\t\t\t\t}\n\t\t\t\t\tif (params[0] === 'Currency' && isCampaignMarker === -1) {\n\t\t\t\t\t\tupdatedLink.push(CMPGNMARKER + '.' + campainMarker);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t$(this).attr('href', updatedLink.join('/'));\n\t\t\t}\n\t\t}\n\t});\n}));\n\n/**\n * Avast CampaignMarker (decorate cart links and update data attributes)\n * @version 0.0.5\n * @author Ales Gabriel, Jaroslav Slaby \n * @module avast.web.campaignMarkerCookie\n * @requires module:avast.storage.cookieStorage\n * @copyright Avast Software s.r.o ©2020\n */\n\navm.define('avast.web.campaignMarkerCookie', function() {\n\n\tvar cookieStorage = avm.require('avast.storage.cookieStorage');\n\n\tvar cm = {\n\t\tcookie: '__trSrc',\n\t\tSMBCookeValue: cookieStorage.getItem('__smbChannelSrc'),\n\t\tels: document.querySelectorAll('a[data-campaign-marker]'),\n\t\tgetCampaignMarkerCookie: function(cookie) {\n\t\t\tvar cookieName = cookie,\n\t\t\t\tcookieValue = cookieStorage.getItem(cookieName),\n\t\t\t\tresult;\n\n\t\t\tif (cookieValue && encodeURIComponent) {\n\t\t\t\tcookieValue = encodeURIComponent(cookieValue);\n\t\t\t\tresult = cookieValue;\n\t\t\t}\n\t\t\treturn result;\n\t\t},\n\t\treplaceCookieString: function(str, cookie) {\n\t\t\tvar re = /~trSrcCookieValue/;\n\n\t\t\treturn str.replace(re, '~' + cookie);\n\t\t},\n\t\tdecorateCartLink: function(data) {\n\t\t\tvar href,\n\t\t\t\tel = data.currentTarget,\n\t\t\t\tcookieValue = cm.getCampaignMarkerCookie(cm.cookie) || '';\n\n\t\t\tif (el) {\n\t\t\t\tel.href = cm.replaceCookieString(el.href, cookieValue);\n\n\t\t\t\thref = el.href;\n\t\t\t}\n\n\t\t\treturn href;\n\t\t},\n\t\tupdateDataAttr: function(data) {\n\t\t\tvar campaignMarker,\n\t\t\t\tel = data.currentTarget,\n\t\t\t\tcookieValue = cm.getCampaignMarkerCookie(cm.cookie) || '';\n\n\t\t\tif (el.dataset && el.dataset.campaignMarker) {\n\t\t\t\tel.dataset.campaignMarker = cm.replaceCookieString(el.dataset.campaignMarker, cookieValue);\n\n\t\t\t\tcampaignMarker = el.dataset.campaignMarker;\n\t\t\t}\n\n\t\t\treturn campaignMarker;\n\t\t},\n\n\t\t/**\n\t\t *\n\t\t * @param {HTMLElement|NodeList} els List of elements\n\t\t */\n\n\t\tsetCampaignMarkerCookie: function(els) {\n\t\t\tvar nodeList = els || cm.els,\n\t\t\t\tnodes = els instanceof HTMLElement ? [els] : Array.prototype.slice.call(nodeList),\n\t\t\t\tcookieValue = cm.getCampaignMarkerCookie(cm.cookie),\n\t\t\t\tSMBCookeValue = cm.SMBCookeValue,\n\t\t\t\tSMBRegExp = /smbChannelSrcCookieValue-/,\n\t\t\t\tlinks = [];\n\n\t\t\tif (cookieValue) {\n\t\t\t\tnodes.forEach(function(el) {\n\t\t\t\t\tvar result = {\n\t\t\t\t\t\tel: el\n\t\t\t\t\t};\n\n\t\t\t\t\tresult.link = cm.decorateCartLink({\n\t\t\t\t\t\tcurrentTarget: el\n\t\t\t\t\t});\n\t\t\t\t\tresult.dataAttr = cm.updateDataAttr({\n\t\t\t\t\t\tcurrentTarget: el\n\t\t\t\t\t});\n\n\t\t\t\t\tlinks.push(result);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t// Register mousedown event.\n\t\t\t\t// FIXME: Move to scanner on DOM ready.\n\t\t\t\tnodes.forEach(function(el) {\n\t\t\t\t\tel.addEventListener('mousedown', cm.decorateCartLink);\n\t\t\t\t\tel.addEventListener('mousedown', cm.updateDataAttr);\n\t\t\t\t\tel.addEventListener('focus', cm.decorateCartLink);\n\t\t\t\t\tel.addEventListener('focus', cm.updateDataAttr);\n\n\t\t\t\t\tlinks.push({\n\t\t\t\t\t\tel: el,\n\t\t\t\t\t\tevt: 'mousedown',\n\t\t\t\t\t\tcallback: cm.decorateCartLink\n\t\t\t\t\t});\n\t\t\t\t\tlinks.push({\n\t\t\t\t\t\tel: el,\n\t\t\t\t\t\tevt: 'mousedown',\n\t\t\t\t\t\tcallback: cm.updateDataAttr\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tnodes.forEach(function(el) {\n\t\t\t\tif (el.href.match(SMBRegExp) || el.getAttribute('data-campaign-marker').match(SMBRegExp)) {\n\t\t\t\t\tif (cm.SMBCookeValue !== null) {\n\t\t\t\t\t\tvar cookieValue = cm.SMBCookeValue.slice(-1) === '-' ? cm.SMBCookeValue : cm.SMBCookeValue + '-';\n\t\t\t\t\t\tel.href = el.href.replace(SMBRegExp, cookieValue);\n\t\t\t\t\t\tel.dataset.campaignMarker = el.dataset.campaignMarker.replace(SMBRegExp, cookieValue);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tel.href = el.href.replace(SMBRegExp, '');\n\t\t\t\t\t\tel.dataset.campaignMarker = el.dataset.campaignMarker.replace(SMBRegExp, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\treturn links;\n\t\t}\n\t};\n\n\treturn cm;\n\n});\n\n/**\n * Display Chrome Offer in non-chrome browsers\n * @version 1.2.0\n * @author Ales Gabriel \n * @module avast.web.chromeBanner\n * @requires jquery\n * @requires avast.detect\n * @requires avast.url.unserialize\n * @requires avast.web.tracker\n */\navm.define('avast.web.chromeBanner', (function () {\n\t'use strict';\n\n\tvar $ = avm.require('jquery');\n\tvar detect = avm.require('avast.detect')();\n\tvar urlParams = avm.require('avast.url.unserialize')();\n\tvar tracker = avm.require('avast.web.tracker');\n\n\t// Chrome banner\n\tvar chromeBanner = {\n\t\tinit: function(){\n\t\t\tvar hasBanner = $('#offer-chrome').length;\n\t\t\tvar isChrome = detect.browser.isChrome;\n\t\t\tvar product = (typeof urlParams.product === 'string') ? urlParams.product : '';\n\t\t\tvar isMsBuild = (product.indexOf('-ONLINE-MS') > -1) ? true : false;\n\t\t\tvar isAsb = /ASB/.test(product);\n\n\t\t\tif(hasBanner){\n\t\t\t\tif(!isChrome && !isMsBuild && !isAsb){\n\t\t\t\t\tthis.show();\n\t\t\t\t\t$('#offer-chrome').on('click', '.button', this.trackClick);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tshow: function(e){\n\t\t\tvar url = document.location.href,\n\t\t\t\tpExt = url.match(/[?&]p_ext=([^&]*)/),\n\t\t\t\tpExtVal = pExt ? pExt[1].toLowerCase() : '';\n\n\t\t\tif (url.indexOf('?') > -1) {\n\t\t\t\turl = url.substr(0, url.indexOf(\"?\"));\n\t\t\t}\n\n\t\t\tif(pExtVal.indexOf('chrome') == -1 && !/secure-browser/.test(url)){\n\t\t\t\t$('#offer-chrome').show();\n\t\t\t\ttracker.track('chromeOffer.view', e);\n\t\t\t}\n\t\t},\n\t\ttrackClick: function(e){\n\t\t\ttracker.track('chromeOffer.click', e);\n\t\t}\n\t};\n\n\treturn chromeBanner;\n\n})());\n\n/**\n * Cookie Consent - perform cookie consent\n * @version 1.0.0\n * @author Michal Langhoffer\n * @requires jquery\n * @requires avast.storage.cookieStorage\n */\n\navm.define('avast.web.cookieConsent', function() {\n 'use strict';\n var $ = avm.require('jquery'),\n cookieStorage = avm.require('avast.storage.cookieStorage'),\n cookieName = 'consentAccepted',\n domainName = window.location.hostname.substring(3);\n\n $(document).ready(function() {\n var CookieBar = {},\n $footer = $('#footer'),\n footerInitialPadding = $footer.css('padding-bottom'),\n footerInitialMargin = $footer.css('margin-bottom'),\n mediaQuery = function () {\n var screen = (window.getComputedStyle) ? window.getComputedStyle(document.body, ':after').getPropertyValue('content') : '';\n return screen;\n },\n mobileScreen = (mediaQuery() === '\\'mobile\\'' || mediaQuery() === \"\\\"mobile\\\"\" || mediaQuery() === \"mobile\") ? true : false;\n\n CookieBar.cookieDom = $('.js-cookie-bar');\n CookieBar.cookieCloseDom = $('.js-cookie-bar .js-close');\n\n /**\n * @description Close the cookie-bar by removing it from the DOM, and saving this preference to the local storage\n */\n CookieBar.close = function() {\n var today = new Date(),\n expire = new Date();\n\n expire.setTime(today.getTime() + 3600000 * 24 * 14); // 14 days\n\n try {\n cookieStorage.setItem(cookieName, 'true', expire.toGMTString(), '/', domainName);\n dataLayer.push({\n 'event': 'cookie-bar-consent-granted'\n });\n } catch (error) {\n console.log('Unable to store preference in local storage, cookiebar will show upon next visit', error);\n\t\t\t}\n\n CookieBar.cookieDom.remove();\n\n if (mobileScreen) {\n $footer.css('padding-bottom', footerInitialPadding);\n } else {\n $footer.css('margin-bottom', footerInitialMargin);\n }\n };\n\n /**\n * @description Initialise the CookieBar component, by binding all the event handlers\n */\n CookieBar.initialise = function() {\n // Cookiebar will be visible either when the key doesn't exist (getItem returns null) or returns another value than \"true\"\n if (cookieStorage.getItem(cookieName) !== 'true') {\n CookieBar.cookieDom.addClass('visible');\n\n CookieBar.cookieDom.on('transitionend webkitTransitionEnd oTransitionEnd', function(event) {\n if (mobileScreen) {\n $footer.css('padding-bottom', CookieBar.cookieDom.height() + 'px');\n } else {\n $footer.css('margin-bottom', CookieBar.cookieDom.height() + 'px');\n }\n });\n dataLayer.push({\n 'event': 'cookie-bar-displayed'\n });\n CookieBar.cookieCloseDom.click(CookieBar.close);\n } else {\n CookieBar.cookieDom.remove();\n if (mobileScreen) {\n $footer.css('padding-bottom', footerInitialPadding);\n }\n }\n };\n\n CookieBar.initialise();\n });\n});\n\n/**\n * Avast Config Module\n * @version 0.13.0\n * @module avast.web.config\n * @author Ales Gabriel \n * @requires module:avast.detect\n * @requires module:jquery\n * @requires module:avast.web.appendPbld\n * @requires module:avast.web.aswparam\n * @requires module:avast.web.cj\n * @requires module:avast.web.couponCode\n * @requires module:avast.hadd\n * @requires module:avast.web.navigation\n * @requires module:avast.web.tabs\n * @requires module:avast.web.tabsAnchor\n * @requires module:avast.scroll.smoothScroll\n * @requires module:avast.web.setLanguage\n * @requires module:avast.web.chromeBanner\n * @requires module:avast.web.tracker\n * @requires module:avast.web.cookieConsent\n * @requires module:avast.web.footer\n * @requires module:avast.web.campaignMarkerCookie\n * @requires module:avast.web.linkScanner\n * @copyright AVAST Software s.r.o.\n */\n\navm.define('avast.web.config', (function() {\n\t'use strict';\n\n\tvar $ = avm.require('jquery');\n\n\t// Prevent log errors on browsers without console.\n\tif (!window.console) {\n\t\twindow.console = {\n\t\t\tlog: function() {}\n\t\t};\n\t}\n\n\t// Config environment\n\tvar config = {\n\t\toptions: {},\n\n\t\t/**\n\t\t * Basic setup - init modules + legacy\n\t\t */\n\t\tinit: function() {\n\t\t\tvar opts = window.avastGlobals ? window.avastGlobals.web || {} : {};\n\t\t\tvar legacy = this.legacySettings(opts);\n\t\t\tvar boot = this.boot;\n\n\t\t\t/**\n\t\t\t * Global namespace options\n\t\t\t */\n\t\t\tthis.options = opts;\n\n\t\t\t/*\n\t\t\t * Support former avast config settings in global namespace\n\t\t\t */\n\t\t\tthis.exportLegacy(legacy, window);\n\n\t\t\t/**\n\t\t\t * Global modules\n\t\t\t *\n\t\t\t * @description Boot global modules. First param of boot function is a module name.\n\t\t\t * Second is init function. Module is passed os parameter.\n\t\t\t */\n\n\t\t\t// Init legacy free modules\n\t\t\tavm.require('avast.web.tracker');\n\n\t\t\t/*\n\t\t\t *\n\t\t\t * !!! COMMENTS WITH avm.require STATEMENT BEFORE EACH boot ARE MANDATORY !!!\n\t\t\t * CORRECT ORDER DURING CONCAT IS NOT GUARANTED WITHOUT THAT.\n\t\t\t *\n\t\t\t */\n\n\t\t\t$(document).ready(function() {\n\t\t\t\tvar disabledModules = avastGlobals.disabledModules || [];\n\n\t\t\t\t// avm.require('avast.web.appendPbld') - Add p_bld param to cart links\n\t\t\t\tboot('avast.web.appendPbld', function(module) {\n\t\t\t\t\tif (!avast.disableAppendPbld) {\n\t\t\t\t\t\tmodule.init();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// avm.require('avast.web.aswparam') - Pack and add ASWPARAM to cart links\n\t\t\t\tboot('avast.web.aswparam', function(module) {\n\t\t\t\t\tif (!avast.disableAswparam) {\n\t\t\t\t\t\tmodule.init();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// avm.require('avast.web.cj') - Set CJ cookie\n\t\t\t\tboot('avast.web.cj', function(module) {\n\t\t\t\t\tif (!avast.disableCj) {\n\t\t\t\t\t\tmodule.init();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// avm.require('avast.web.couponCode') - Add couponcode param to cart links\n\t\t\t\tboot('avast.web.couponCode', function(module) {\n\t\t\t\t\tif (!avast.disableShowCouponCode) {\n\t\t\t\t\t\tmodule.init();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// avm.require('avast.hadd') - Add couponcode param to cart links\n\t\t\t\tboot('avast.hadd', function(module) {\n\t\t\t\t\tif (!avast.disableHadd) {\n\t\t\t\t\t\tvar hadd = module();\n\t\t\t\t\t\thadd.init();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// avm.require('avast.web.navigation') - Navigation\n\t\t\t\tboot('avast.web.navigation', function(module) {\n\t\t\t\t\tvar navSel = '.js-navigation-bootstrap';\n\t\t\t\t\tif (document.querySelector(navSel)) {\n\t\t\t\t\t\tmodule(navSel);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// avm.require('avast.web.tabs') - Tabs in v8 style. Not initialized if tabs in sticky bar.\n\t\t\t\tboot('avast.web.tabs', function(module) {\n\t\t\t\t\tif (!avast.disableTabs && $('#tabs-anchor').hasClass('tabs-nav')) {\n\t\t\t\t\t\tmodule.init('#content-holder', {\n\t\t\t\t\t\t\ttabs: '#tabs-anchor li'\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// avm.require('avast.web.tabsAnchor') - Tabs in v8 style. Not initialized if tabs in sticky bar.\n\t\t\t\tboot('avast.web.tabsAnchor', function(module) {\n\t\t\t\t\tvar detect = avm.require('avast.detect')();\n\t\t\t\t\tvar ie6zh = detect.browser.isInternetExplorer && detect.browser.version === '6.0' && window.avastGlobals.web.locale === 'zh-cn' ? 1 : 0;\n\n\t\t\t\t\tif (!avast.disableTabsAnchor && !ie6zh) {\n\t\t\t\t\t\t// window.avast.tabsAnchor = window.avast.tabsAnchor || module;\n\t\t\t\t\t\tmodule.init('#tabs-anchor');\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// avm.require('avast.scroll.smoothScroll') - Animate scrolls\n\t\t\t\tboot('avast.scroll.smoothScroll', function(module) {\n\t\t\t\t\tif (!avast.disableSmoothScroll) {\n\t\t\t\t\t\tmodule();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// avm.require('avast.web.chromeBanner') - Chrome banner visibility and tracking\n\t\t\t\tboot('avast.web.chromeBanner', function(module) {\n\t\t\t\t\tmodule.init();\n\t\t\t\t});\n\n\t\t\t\t// avm.require('avast.web.setLanguage') - Chrome banner visibility and tracking\n\t\t\t\tboot('avast.web.setLanguage', function(module) {\n\t\t\t\t\tif (!avast.disableSetLanguage) {\n\t\t\t\t\t\tmodule(opts.locale || '');\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// avm.require('avast.web.slider') - BxSlider wrapper\n\t\t\t\tboot('avast.web.slider', function(slider) {\n\t\t\t\t\tvar detect = avm.require('avast.detect')();\n\t\t\t\t\tvar ie6zh = detect.browser.isInternetExplorer && detect.browser.version === '6.0' && window.avastGlobals.web.locale === 'zh-cn' ? 1 : 0;\n\n\t\t\t\t\tif (avast.disableSlider) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Product slider\n\t\t\t\t\tif ($('#features .slider-slides').length > 0) {\n\t\t\t\t\t\tslider.init('v9', '#features .slider-slides', {\n\t\t\t\t\t\t\tpager: false\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\t// index slider (also used on business)\n\t\t\t\t\tif ($('#top .slider-slides').length > 0 && !ie6zh) {\n\t\t\t\t\t\tslider.init('v9hp', '#top .slider-slides', {\n\t\t\t\t\t\t\tpager: true,\n\t\t\t\t\t\t\tpagerSelector: '#top .control',\n\t\t\t\t\t\t\tbuildPager: function() {\n\t\t\t\t\t\t\t\treturn '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t// Rum log\n\t\t\t\t\t\trum.track('error', {\n\t\t\t\t\t\t\tmessage: 'Slider #top called'\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\t// Extra sliders on /index + /online-backup + /grimefighter\n\t\t\t\t\tif ($('#results .slider-slides, #whybackup .slider-slides').length > 0) {\n\t\t\t\t\t\tvar context = $('#results, #whybackup');\n\t\t\t\t\t\tvar ppBx = $('#results .slider-slides, #whybackup .slider-slides').bxSlider({\n\t\t\t\t\t\t\tauto: false,\n\t\t\t\t\t\t\tpager: true,\n\t\t\t\t\t\t\tpagerSelector: '#results .control, #whybackup .control',\n\t\t\t\t\t\t\tinfiniteLoop: true,\n\t\t\t\t\t\t\tmoveSlides: 1,\n\t\t\t\t\t\t\tminSlides: 1,\n\t\t\t\t\t\t\tmaxSlides: 1,\n\t\t\t\t\t\t\tslideWidth: 900,\n\t\t\t\t\t\t\tslideMargin: 0,\n\t\t\t\t\t\t\tcontrols: false,\n\t\t\t\t\t\t\tnextSelector: '',\n\t\t\t\t\t\t\tprevSelector: '',\n\t\t\t\t\t\t\tuseCSS: false,\n\t\t\t\t\t\t\tonSliderLoad: function() {\n\t\t\t\t\t\t\t\t$('.bx-clone').css('visibility', 'visible');\n\t\t\t\t\t\t\t\t$('#results-slides').css('visibility', 'visible');\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuildPager: function(slideIndex) {\n\t\t\t\t\t\t\t\treturn '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tcontext.find('.prev').click(function(e) {\n\t\t\t\t\t\t\tppBx.goToPrevSlide();\n\t\t\t\t\t\t\te.preventDefault(); // FIXME\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tcontext.find('.next').click(function(e) {\n\t\t\t\t\t\t\tppBx.goToNextSlide();\n\t\t\t\t\t\t\te.preventDefault(); // FIXME\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t// Rum log\n\t\t\t\t\t\trum.track('error', {\n\t\t\t\t\t\t\tmessage: 'Slider #results#whybackup called'\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\t// Sliders on /business\n\t\t\t\t\tif ($('#results-business .slider-slides').length > 0) {\n\t\t\t\t\t\t// Rum log\n\t\t\t\t\t\trum.track('error', {\n\t\t\t\t\t\t\tmessage: 'Slider #results-business called'\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// avm.require('avast.web.cookieConsent') - Cookie consent bar\n\t\t\t\tboot('avast.web.cookieConsent', function(module) {\n\t\t\t\t\tif (!avast.disableCookieConsent) {\n\t\t\t\t\t\tmodule();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// avm.require('avast.web.footer') - Footer scripts (langugage selector)\n\t\t\t\tboot('avast.web.footer', function(module) {\n\t\t\t\t\tmodule();\n\t\t\t\t});\n\n\t\t\t\t// avm.require('avast.web.campaignMarkerCookie') - Cookie consent bar\n\t\t\t\tboot('avast.web.campaignMarkerCookie', function(module) {\n\t\t\t\t\tvar cm = module();\n\t\t\t\t\tcm.setCampaignMarkerCookie();\n\t\t\t\t});\n\n\t\t\t\t// avm.require('avast.web.linkScanner') - Scan and update cart/download links\n\t\t\t\tboot('avast.web.linkScanner', function(module) {\n\t\t\t\t\tvar scanner = module();\n\n\t\t\t\t\tif (avastGlobals.web.language === 'en') {\n\t\t\t\t\t\tscanner.init({\n\t\t\t\t\t\t\ttasks: ['downloadPopup'],\n\t\t\t\t\t\t\tselectors: ['[data-download-name^=\"FAV-\"]:not([data-behavior=\"downloadPage\"])']\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t/*\n\t\t\t\t * jQuery plugins\n\t\t\t\t */\n\n\t\t\t\t// Return to the top of the page button\n\t\t\t\tif (typeof $.fn.slideTop === 'function') {\n\t\t\t\t\t$('#content-holder').slideTop();\n\t\t\t\t}\n\t\t\t\t// Initialize tooltip plugin\n\t\t\t\tif (typeof $.fn.tooltip === 'function' &&\n\t\t\t\t\tnavigator.userAgent.indexOf('aclwebview') === -1 &&\n\t\t\t\t\tArray.prototype.indexOf &&\n\t\t\t\t\tdisabledModules.indexOf('tooltip') === -1 &&\n\t\t\t\t\tavastGlobals.web.contentGroup !== 'SMB') {\n\t\t\t\t\t$('#content-holder').tooltip();\n\t\t\t\t}\n\n\t\t\t\t// Set class for comparison table cell with tick\n\t\t\t\tif ($('#comparison').length > 0) {\n\t\t\t\t\t$('#comparison table tr.feature span.yes').closest('td').addClass('cell-tick');\n\t\t\t\t}\n\t\t\t\tif ($('#compare-table').length > 0) {\n\t\t\t\t\t$('#compare-table table tr.feature span.yes').closest('td').addClass('cell-tick');\n\t\t\t\t}\n\t\t\t\tif ($('#compare').length > 0) {\n\t\t\t\t\t$('#compare table tr.feature span.yes').closest('td').addClass('cell-tick');\n\t\t\t\t}\n\n\t\t\t\t// FIX height in IE\n\t\t\t\tvar detect = avm.require('avast.detect')();\n\n\t\t\t\tif (detect.browser.isInternetExplorer) {\n\t\t\t\t\tvar topHeight = $('#top.fullscreen .AVsizer .absolute-center').height();\n\n\t\t\t\t\tif (topHeight) {\n\t\t\t\t\t\t$('#top.fullscreen .AVsizer').css({\n\t\t\t\t\t\t\tminHeight: topHeight + 25 + 'px'\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Invoke global modules\n\t\t * @param {string} moduleName Module name\n\t\t * @param {Function} fn Init function\n\t\t * @returns {*} Module instance. Object is prefered\n\t\t */\n\t\tboot: function(moduleName, fn) {\n\t\t\tvar config = this;\n\t\t\tvar req = avm.require;\n\t\t\tvar module = moduleName ? req(moduleName, false) : null;\n\n\t\t\ttry {\n\t\t\t\tfn.call(config, module);\n\t\t\t} catch (e) {\n\t\t\t\t// console.log(moduleName + ': ' + e); // Send custom RUM event here?\n\t\t\t\treturn false;\n\t\t\t} finally {\n\t\t\t\treturn module;\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * legacySettings Config settings in global namespace\n\t\t * @param {Object} opts Settings options\n\t\t * @returns {Object} Object equals former global namespace settings\n\t\t */\n\t\tlegacySettings: function(opts) {\n\t\t\tvar detect = avm.require('avast.detect')();\n\n\t\t\tif (opts) {\n\t\t\t\treturn {\n\t\t\t\t\tlocale: opts.locale,\n\t\t\t\t\tRootPath: opts.RootPath,\n\t\t\t\t\tavast: {\n\t\t\t\t\t\tlocale: opts.locale,\n\t\t\t\t\t\tnumberDecimalSeparator: opts.numberDecimalSeparator,\n\t\t\t\t\t\tnumberThousandSeparator: opts.numberThousandSeparator,\n\t\t\t\t\t\tresponsive: opts.responsive,\n\t\t\t\t\t\trootPath: opts.RootPath,\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tlocale: opts.locale,\n\t\t\t\t\t\t\trootPath: opts.RootPath\n\t\t\t\t\t\t},\n\t\t\t\t\t\tgetOS: function() {\n\t\t\t\t\t\t\treturn detect.os.name;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tgetWinVersion: function() {\n\t\t\t\t\t\t\treturn detect.os.version;\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttabsAnchor: (function() {\n\t\t\t\t\t\t\treturn avm.require('avast.web.tabsAnchor');\n\t\t\t\t\t\t})(),\n\t\t\t\t\t\tslider: (function() {\n\t\t\t\t\t\t\treturn avm.require('avast.web.slider');\n\t\t\t\t\t\t})(),\n\t\t\t\t\t\thadd: (function() {\n\t\t\t\t\t\t\treturn avm.require('avast.hadd')();\n\t\t\t\t\t\t})()\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Extend global namespace with avast variables\n\t\t * @param {Object} src Object to be merged\n\t\t * @param {Object} target Object to be extended\n\t\t * @returns {string} Not merged variables\n\t\t */\n\t\texportLegacy: function(src, target) {\n\t\t\tvar skipped;\n\n\t\t\tfor (var key in src) {\n\t\t\t\tif (Object.prototype.toString.call(src[key]) !== '[object Object]' && src[key] !== null) {\n\t\t\t\t\tif (!(key in target)) {\n\t\t\t\t\t\ttarget[key] = src[key];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tskipped = !skipped ? key : skipped + ', ' + key;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttarget[key] = target[key] || {};\n\t\t\t\t\tthis.exportLegacy(src[key], target[key]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// todo: log skipped\n\t\t\t// console.log('settings: %o', target);\n\t\t\treturn target;\n\t\t},\n\n\t\t/**\n\t\t * Get current config options\n\t\t * @return {Object} Config options\n\t\t */\n\t\tgetConfig: function() {\n\t\t\treturn this.options;\n\t\t}\n\t};\n\n\t// Run config\n\tconfig.init();\n\n\treturn config;\n})());\n"]}