function pixel_charity_nonprofit_mobile_menu_open() {
  jQuery(".side_nav").addClass('show');
}
function pixel_charity_nonprofit_mobile_menu_close() {
  jQuery(".side_nav").removeClass('show');
}

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

var pixel_charity_nonprofit_Keyboard_loop = function (elem) {
  var pixel_charity_nonprofit_tabbable = elem.find('select, input, textarea, button, a').filter(':visible');
  var pixel_charity_nonprofit_firstTabbable = pixel_charity_nonprofit_tabbable.first();
  var pixel_charity_nonprofit_lastTabbable = pixel_charity_nonprofit_tabbable.last();
  pixel_charity_nonprofit_firstTabbable.focus();

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

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

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

jQuery('#banner-area .owl-carousel').owlCarousel({
  loop: true,
  margin: 40,
  center: true, // Keep center class for highlighting
  items: 3,
  responsive: {
    0: {
      items: 1
    },
    600: {
      items: 1
    },
    768: {
      items: 2
    },
    992: {
      items: 3
    }
  },
  onChanged: function(event) {
    setTimeout(function() {
      jQuery('.owl-item').removeClass('active-big');
      jQuery('.owl-item.active.center').addClass('active-big');
    });
  }
});

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) {
              $('.upper-header-area.sticky-header').addClass('sticky-active');
          } else {
              $('.upper-header-area.sticky-header').removeClass('sticky-active');
          }
      }
  });
});