{"version":3,"sources":["../../dev/j/windows-fav-animation-main-build.js"],"names":["$","document","ready","itemMouseEnterListener","index","$section","attr","itemMouseLeaveListener","initAfterPulseEntryAnimationEnds","removeClass","addClass","$animation","on","initAfterHoverOverAnimation","off","n","$items","initAfterIconsEntryAnimationEnds","each","this","mouseenter","parent","waypoints","avm","require","$window","window","$simple","hasClass","detect","browser","isInternetExplorer","version","indexOf","isSafari","$wrongDeviceDownloadWarning","$downloadButtonsFAV","not","$platformPlaceholder","find","$popupClose","$downloadButtonAndroid","$downloadButtonIOS","platformPlaceholderText","os","isAndroid","avastGlobals","isIOS","removeAttr","location","hash","event","preventDefault","text"],"mappings":"CAAA,WACG,YAwGFA,GAAEC,UAAUC,MAtGI,WAQf,QAASC,GAAuBC,GAC/BC,EAASC,KAAK,oBAAqBF,EAAQ,GAG5C,QAASG,KACRF,EAASC,KAAK,oBAAqB,OAGpC,QAASE,KAERH,EAASI,YAAY,4BAErBJ,EAASK,SAAS,0BAGlBC,EAAWC,GAAG,YAAaC,GAG3BF,EAAWG,IAAI,+DAAgEN,GAE/EO,GAAK,EAGN,QAASF,KAERR,EAASI,YAAY,0BAErBJ,EAASK,SAAS,4BAGlBM,EAAOJ,GAAG,gBAAiBK,GAG3BN,EAAWG,IAAI,YAAaD,GAG7B,QAASI,KAERZ,EAASI,YAAY,4BAErBJ,EAASK,SAAS,0BAGlBM,EAAOF,IAAI,gBAAiBG,GAG5BD,EAAOE,KAAK,SAAUd,GACrBJ,EAAEmB,MAAMC,WAAW,WAClBjB,EAAuBC,OAKzBO,EAAWC,GAAG,aAAcL,GA5D7B,GAAIQ,GAAI,EAEJJ,EAAaX,EAAE,iBACfK,EAAWM,EAAWU,SAEtBL,EAAShB,EAAE,qBA2DfW,GAAWC,GAAG,+DAAgEJ,EAE9E,IAAIc,GAAYC,IAAIC,QAAQ,uBAC3BC,EAAUzB,EAAE0B,QACZC,EAAU3B,EAAE,UAEbyB,GAAQb,GAAG,gBAAiB,WACvBU,EAAUK,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EAAmBhC,SAAS","file":"windows-fav-animation-main-build.js","sourcesContent":["(function() {\n \t'use strict';\n\t// var domLoad = function domLoad() {};\n\tvar animation = function() {\n\t\tvar n = 0;\n\n\t\tvar $animation = $('.av-animation');\n\t\tvar $section = $animation.parent();\n\t\t// var $items = $animation.querySelectorAll('.av-animation-item');\n\t\tvar $items = $('.av-animation-item');\n\n\t\tfunction itemMouseEnterListener(index) {\n\t\t\t$section.attr('data-av-animation', index + 1);\n\t\t}\n\n\t\tfunction itemMouseLeaveListener() {\n\t\t\t$section.attr('data-av-animation', 'all');\n\t\t}\n\n\t\tfunction initAfterPulseEntryAnimationEnds() {\n\t\t\t// pulse entry animation\n\t\t\t$section.removeClass('av-animation-pulse-entry');\n\t\t\t// start pulsing\n\t\t\t$section.addClass('av-animation-pulse-ing');\n\n\t\t\t// listen to start icons entry animation\n\t\t\t$animation.on('mouseover', initAfterHoverOverAnimation);\n\n\t\t\t// remove listener because we need it to run only once\n\t\t\t$animation.off('webkitAnimationEnd oanimationend msAnimationEnd animationend', initAfterPulseEntryAnimationEnds);\n\n\t\t\tn += 1;\n\t\t}\n\n\t\tfunction initAfterHoverOverAnimation() {\n\t\t\t// stop pulsing\n\t\t\t$section.removeClass('av-animation-pulse-ing');\n\t\t\t// icons come in\n\t\t\t$section.addClass('av-animation-icons-entry');\n\n\t\t\t// listen for icons entry animation end\n\t\t\t$items.on('transitionend', initAfterIconsEntryAnimationEnds);\n\n\t\t\t// remove listener because we need it to run only once\n\t\t\t$animation.off('mouseover', initAfterHoverOverAnimation);\n\t\t}\n\n\t\tfunction initAfterIconsEntryAnimationEnds() {\n\t\t\t// entry ends\n\t\t\t$section.removeClass('av-animation-icons-entry');\n\t\t\t// icons are active\n\t\t\t$section.addClass('av-animation-icons-ing');\n\n\t\t\t// remove listener because we need it to run only once\n\t\t\t$items.off('transitionend', initAfterIconsEntryAnimationEnds);\n\n\t\t\t// show text on hover over icons\n\t\t\t$items.each(function (index) {\n\t\t\t\t$(this).mouseenter(function () {\n\t\t\t\t\titemMouseEnterListener(index);\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t// remove text only when mouse leaves the whole animation area\n\t\t\t$animation.on('mouseleave', itemMouseLeaveListener);\n\t\t}\n\n\t\t// run once the entry animation finishes\n\t\t$animation.on('webkitAnimationEnd oanimationend msAnimationEnd animationend', initAfterPulseEntryAnimationEnds);\n\n\t\tvar waypoints = avm.require('avast.web.waypoints'),\n\t\t\t$window = $(window),\n\t\t\t$simple = $('#simple');\n\n\t\t$window.on('resize scroll', function() {\n\t\t\tif (waypoints($simple)) {\n\t\t\t\tif ($section.hasClass('av-animation-out-viewport')) {\n\t\t\t\t\t$section.removeClass('av-animation-out-viewport');\n\t\t\t\t} else {\n\t\t\t\t\t$section.addClass('av-animation-in-viewport av-animation-pulse-entry');\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tvar detect = avm.require('avast.detect')();\n\t\tif (detect.browser.isInternetExplorer) {\n\t\t\tif (detect.browser.version.indexOf('8.') > -1 || detect.browser.version.indexOf('9.') > -1 || detect.browser.version.indexOf('10.') > -1 || detect.browser.version.indexOf('11.') > -1) {\n\t\t\t\t// SVG not supported, image fallback will be visible\n\t\t\t} else {\n\t\t\t\t$('.av-animation-wrap').addClass('supported');\n\t\t\t}\n\t\t} else if (detect.browser.isSafari) {\n\t\t\tif (detect.browser.version.indexOf('7.') > -1 || detect.browser.version.indexOf('8.') > -1 || detect.browser.version.indexOf('9.') > -1 || detect.browser.version.indexOf('10.') > -1) {\n\t\t\t\t$('.av-animation-wrap').addClass('supported');\n\t\t\t} else {\n\t\t\t\t// SVG not supported, image fallback will be visible\n\t\t\t}\n\t\t} else {\n\t\t\t\t$('.av-animation-wrap').addClass('supported');\n\t\t\t}\n\t\t};\n\n\t// document.addEventListener('DOMContentLoaded', domLoad, false);\n\n\t//window.addEventListener('load', winLoad, false);\n\t$(document).ready(animation());\n\t// window.addEventListener('resize', function () {}, false);\n})();\n\n// Oops popup - OO-8299\n(function() {\n\t'use strict';\n\tvar detect = avm.require('avast.detect')(),\n\t\t$wrongDeviceDownloadWarning = $('.js-wrong-device-download-warning'),\n\t\t$downloadButtonsFAV = $('[href*=\"download-thank-you.php?product=FAV-ONLINE\"]').not('.js-windows-link'),\n\t\t$platformPlaceholder = $wrongDeviceDownloadWarning.find('.js-platform-placeholder'),\n\t\t$popupClose = $wrongDeviceDownloadWarning.find('.js-popup-close'),\n\t\t$downloadButtonAndroid = $wrongDeviceDownloadWarning.find('.js-android'),\n\t\t$downloadButtonIOS = $wrongDeviceDownloadWarning.find('.js-ios'),\n\t\tplatformPlaceholderText = detect.os.isAndroid ? 'Android' : 'iOS',\n\t\tglobals = avastGlobals ? avastGlobals : {};\n\n\n\tif (detect.os.isAndroid || detect.os.isIOS) {\n\t\t$downloadButtonsFAV.removeAttr('data-bi-download-name');\n\t\t$downloadButtonsFAV.removeClass('bi-download-link');\n\n\t\t$popupClose.on('click', function() {\n\t\t\t$wrongDeviceDownloadWarning.removeClass('show');\n\t\t\twindow.location.hash = '';\n\t\t});\n\n\t\t$downloadButtonsFAV.on('click', function(event) {\n\t\t\tevent.preventDefault();\n\t\t\t$wrongDeviceDownloadWarning.addClass('show');\n\t\t\twindow.location.hash = 'oops';\n\t\t});\n\n\t\t$platformPlaceholder.text(platformPlaceholderText);\n\t\tdetect.os.isAndroid ? $downloadButtonAndroid.addClass('show') : $downloadButtonIOS.addClass('show');\n\t}\n})();\n// Oops popup - OO-8299\n"]}