"use strict";

/**
 * Servicenavigation toggle event dispatcher for z-index swapping
 */

;
(function ($, window, document, undefined) {
  'use strict';

  var $document,
    $docElement,
    $servicemenu = $('.js-servicenavigation'),
    init = function init() {
      if ($servicemenu.length) {
        $document = $(document);
        $docElement = $(document.documentElement);
        $servicemenu.on('hide.zf.dropdown', function () {
          $docElement.removeClass('is-ServiceNavigationOpen');
        });
        $servicemenu.on('show.zf.dropdown', function () {
          $docElement.addClass('is-ServiceNavigationOpen');
        });
      }
    };
  init();
})(jQuery, window, document);