!function(i){"use strict";i(document).ready(function(){var o=!1;if(i(".youzify-directory-search-form").bind("keyup paste",function(){i(this).closest(".youzify").find('.dir-search input[type="text"]').val(i(this).val())}),i(document).on("keypress",".youzify-directory-search-form",function(e){13==e.which&&(e.preventDefault(),i(this).closest(".youzify").find('.dir-search input[type="submit"]').click())}),i("#youzify").on("click","a.page-numbers",function(e){var r=i(this).clone().html('<i class="fas fa-spinner fa-spin"></i>');i(this).hide(0,function(){r.insertAfter(i(this))})}),i("#youzify-groups-list,#youzify-members-list").on("click","a.group-button:not(.membership-requested),.friendship-button:not(.awaiting_response_friend) a",function(e){e.preventDefault(),i(this).addClass("youzify-btn-loading")}),i("#directory-show-search").on("click",function(e){e.preventDefault(),i(".youzify-directory-filter #members-order-select,.youzify-directory-filter #groups-order-select,.youzify-directory-filter .item-list-tabs:not(#subnav) ul").fadeOut(1),i("#youzify-directory-search-box").fadeToggle()}),i("#directory-show-filter").on("click",function(e){e.preventDefault(),i("#youzify-directory-search-box,.youzify-directory-filter .item-list-tabs:not(#subnav) ul").fadeOut(1),i(".youzify-directory-filter #members-order-select, .youzify-directory-filter #groups-order-select").fadeToggle()}),i("#directory-show-menu").on("click",function(e){e.preventDefault(),i("#youzify-directory-search-box,.youzify-directory-filter #members-order-select,.youzify-directory-filter #groups-order-select").fadeOut(1),i(".youzify-directory-filter .item-list-tabs:not(#subnav) ul").fadeToggle()}),i("#youzify-members-list")[0]){var e=document.querySelector("#youzify-members-list");imagesLoaded(e,function(){new Masonry(e,{itemSelector:"#youzify-members-list > li"})})}if(i("#youzify-groups-list")[0]){var r=document.querySelector("#youzify-groups-list");imagesLoaded(r,function(){new Masonry(r,{itemSelector:"#youzify-groups-list li"})})}i("#directory-show-search a").on("click",function(e){e.preventDefault(),i("#youzify-directory-search-box").fadeToggle()}),i("#directory-show-filter a").on("click",function(e){e.preventDefault(),i(".youzify-directory-filter #members-order-select, .youzify-directory-filter #groups-order-select").fadeToggle()}),i("#members_search, #groups_search").on("click",function(){i(window).off("resize")}),i(".youzify-directory").on("click","a.page-numbers",function(){var e=i(this).closest(".youzify-directory-shortcode");e.get(0)&&(o=e.data())}),i.ajaxPrefilter(function(e,r,i){if(0!=o&&r.hasOwnProperty("data")&&r.data.hasOwnProperty("action")){var t=r.data.action;"members_filter"!=t&&"groups_filter"!=t||(e.data+="&custom_args="+JSON.stringify(o),o=!1)}})})}(jQuery);