(function($){
    var setActive = function() {
        var self = $(this);

        // REMOVE ANY ACTIVE STATES
        $('.footer-socialmedia').removeClass('active');
        
        // SET CURRENT ACTIVE STATE
        self.addClass('active');
    };

    var scrollHandler = function() {
        $("html, body").animate({ scrollTop: 0 }, 600);
    }

    var init = function(){
        $('.footer-socialmedia').on('click', setActive);

        $('.scroll-top').on('click', scrollHandler);
    };

    $(init);

}(jQuery));

var ATVI = ATVI || {};

(function($, ATVI) {

    var init = function() {

        var $container = $(".footer-links .footer-col-4 ul");
    
        ATVI.utils.addPrivacyLinks($container);

    };

    $(init);

})(jQuery, ATVI);
(function() {

    var init = function() {

		initAnalytics();

    };

    var initAnalytics = function() {

		if(!dataLayer || !digitalData) return;

        //Back to Top button

        $(".scroll-top").on("click", function() {

            dataLayer.push({

                event: "interaction",
                action: "footer:Back To Top",
                label: "button",
                category: "interaction:activision:home"

            });

        });

    };

    $(init);

})();

