function interactive_education_mobile_menu_open() {
  jQuery(".side_nav").addClass('show');
}
function interactive_education_mobile_menu_close() {
  jQuery(".side_nav").removeClass('show');
}

jQuery(function($){
  $('.toggle').click(function () {
    interactive_education_Keyboard_loop($('.side_nav'));
  });
});

var interactive_education_Keyboard_loop = function (elem) {
  var interactive_education_tabbable = elem.find('select, input, textarea, button, a').filter(':visible');
  var interactive_education_firstTabbable = interactive_education_tabbable.first();
  var interactive_education_lastTabbable = interactive_education_tabbable.last();
  interactive_education_firstTabbable.focus();

  interactive_education_lastTabbable.on('keydown', function (e) {
    if ((e.which === 9 && !e.shiftKey)) {
      e.preventDefault();
      interactive_education_firstTabbable.focus();
    }
  });

  interactive_education_firstTabbable.on('keydown', function (e) {
    if ((e.which === 9 && e.shiftKey)) {
      e.preventDefault();
      interactive_education_lastTabbable.focus();
    }
  });

  elem.on('keyup', function (e) {
    if (e.keyCode === 27) {
      elem.hide();
    };
  });
};

jQuery(document).ready(function($) {
  var isRtl = $('html').attr('dir') === 'rtl'; // Check if the site is RTL

  $('#banner-area .owl-carousel').owlCarousel({
      loop: true,
      margin: 0,
      nav: false,
      dots: false,
      rtl: isRtl, // Enable RTL if true
      navText: [
          isRtl ? '<span>NEXT</span>' : '<span>PREV</span>', // Adjust based on RTL
          isRtl ? '<span>PREV</span>' : '<span>NEXT</span>'  // Adjust based on RTL
      ],
      responsive: {
          0: {
              items: 1,
              dots: false,
          },
          600: {
              items: 1,
          },
          1000: {
              items: 1,
          }
      }
  });
});

jQuery(window).scroll(function () {
    if (jQuery(this).scrollTop() >= 200) {
        jQuery("#return-to-top").fadeIn();
    } else {
        jQuery("#return-to-top").fadeOut();
    }
});

jQuery("#return-to-top").click(function () {
    jQuery("html, body").animate({ scrollTop: 0 }, 600);
});

jQuery(document).ready(function($) {
  $(window).scroll(function() {
      if ($('.sticky-header').length) {
          if ($(this).scrollTop() > 50) {
              $('.header-main-area.sticky-header').addClass('sticky-active');
          } else {
              $('.header-main-area.sticky-header').removeClass('sticky-active');
          }
      }
  });
});