diff --git a/library/js/ahb.js b/library/js/ahb.js
index 4e1b45fd46c2be2e6a269d3b1b8dc809b24e40c0..950866c5422cbe3402711a08fab90ea5c2b1f589 100644
--- a/library/js/ahb.js
+++ b/library/js/ahb.js
@@ -1,4 +1,4 @@
-(function ($, Drupal, drupalSettings) {
+(function ($, Drupal, drupalSettings, Cookies) {
     'use strict';
 
     Drupal.behaviors.youtubeModal = {
@@ -23,7 +23,7 @@
             });
 
             // Show/hide help blocks by cookie.
-            var hiddenArray = ($.cookie('AHB_hidden') !== undefined) ? $.parseJSON($.cookie('AHB_hidden')) : [];
+            var hiddenArray = (Cookies.get('AHB_hidden') !== undefined) ? $.parseJSON(Cookies.get('AHB_hidden')) : [];
             $('.block-help-item').each(function () {
               // Show if block is not in the hidden array.
               if ($.inArray($(this).data('block-id'), hiddenArray) === -1 || $.inArray($(this).data('block-id'), hiddenArray) === false) {
@@ -35,9 +35,9 @@
               var block = $(this).parent();
               hiddenArray.push($(block).data('block-id'));
               $(block).addClass('hidden');
-              $.cookie('AHB_hidden', JSON.stringify(hiddenArray), {'path': '/' + drupalSettings.path.currentPath});
+              Cookies.set('AHB_hidden', JSON.stringify(hiddenArray), {'path': '/' + drupalSettings.path.currentPath});
             });
         }
     };
 
-})(jQuery, Drupal, drupalSettings);
+})(jQuery, Drupal, drupalSettings, window.Cookies);