/*! WPMU Dev code library - v3.0.1 * http://premium.wpmudev.org/ * Copyright (c) 2016; * Licensed GPLv2+ */ jQuery(function(){function e(){var e=jQuery(".wpmui-list-table.has-details"),t=e.find(".list-card.detail-mode"),n=jQuery(window).innerHeight()-132;t.length&&t.height(n)}function t(){var t=jQuery(this).parents(".list-card"),i=t.parents(".wpmui-list-table"),r=jQuery(window).innerHeight()-132;i.hasClass("has-details")?n():(window.scrollTo(0,0),i.addClass("has-details"),t.addClass("detail-mode"),t.height(r),t.hide(),jQuery(window).on("resize",e),e(),window.setTimeout(function(){t.show()},10))}function n(t){var n=!1;if(void 0===t&&(n=!0),void 0!==t&&void 0!==t.target){var i=jQuery(t.target);i.hasClass("wpmui-list-table")&&(n=!0)}if(n){var r=jQuery(".list-card.detail-mode"),o=jQuery(".wpmui-list-table.has-details");o.removeClass("has-details"),r.removeClass("detail-mode"),r.height("auto"),jQuery(window).off("resize",e)}}function i(e,t){var n=jQuery(this),i=n.parents(".list-card");!0!==t._is_detail&&(t.value?i.addClass("active"):i.removeClass("active"))}function r(){var e=jQuery(this),t=e.data("filter"),n=jQuery(".list-card"),i=e.parents(".wp-filter").find(".current");switch(i.removeClass("current"),e.addClass("current"),t){case"active":n.hide().filter(".active").show();break;case"inactive":n.show().filter(".active").hide();break;case"all":n.show();break;default:jQuery(document).trigger("list-filter",[t,n])}return!1}jQuery(document).on("wpmui-radio-slider-updated",".wpmui-radio-slider",i),jQuery(document).on("click",".toggle-details",t),jQuery(document).on("click",".has-details",n),jQuery(document).on("click",".wp-filter .filter",r)});