jQuery(document).ready(function () {
      function plastic_surgery_clinic_search_loop_focus(element) {
      var plastic_surgery_clinic_focus = element.find('select, input, textarea, button, a[href]');
      var plastic_surgery_clinic_firstFocus = plastic_surgery_clinic_focus[0];  
      var plastic_surgery_clinic_lastFocus = plastic_surgery_clinic_focus[plastic_surgery_clinic_focus.length - 1];
      var KEYCODE_TAB = 9;

      element.on('keydown', function plastic_surgery_clinic_search_loop_focus(e) {
        var isTabPressed = (e.key === 'Tab' || e.keyCode === KEYCODE_TAB);

        if (!isTabPressed) { 
          return; 
        }

        if ( e.shiftKey ) /* shift + tab */ {
          if (document.activeElement === plastic_surgery_clinic_firstFocus) {
            plastic_surgery_clinic_lastFocus.focus();
              e.preventDefault();
            }
          } else /* tab */ {
          if (document.activeElement === plastic_surgery_clinic_lastFocus) {
            plastic_surgery_clinic_firstFocus.focus();
              e.preventDefault();
            }
          }
      });
    }
    jQuery('.search-box span a').click(function(){
        jQuery(".serach_outer").slideDown(1000);
        plastic_surgery_clinic_search_loop_focus(jQuery('.serach_outer'));
    });

    jQuery('.closepop a').click(function(){
        jQuery(".serach_outer").slideUp(1000);
    });
});

(function( $ ) {
    $(document).ready(function(){
        $(".department-list").hide();
        $("button.department-btn").click(function(){
            $(".department-list").toggle();
        });
    });
})( jQuery );