// source --> http://blog.andinoschool.edu.pe/wp-content/plugins/buddypress/bp-templates/bp-legacy/js/buddypress.min.js?ver=4.3.0 function bp_get_directory_preference(e,t){var i={filter:"",scope:"",extras:""};if(!directoryPreferences.hasOwnProperty(e)){var a={};for(var s in i)i.hasOwnProperty(s)&&(a[s]=i[s]);directoryPreferences[e]=a}return BP_DTheme.store_filter_settings&&(directoryPreferences[e][t]=jq.cookie("bp-"+e+"-"+t)),directoryPreferences[e][t]}function bp_set_directory_preference(e,t,i){var a={filter:"",scope:"",extras:""};if(!directoryPreferences.hasOwnProperty(e)){var s={};for(var r in a)a.hasOwnProperty(r)&&(s[r]=a[r]);directoryPreferences[e]=s}BP_DTheme.store_filter_settings&&jq.cookie("bp-"+e+"-"+t,i,{path:"/",secure:"https:"===window.location.protocol}),directoryPreferences[e][t]=i}function bp_init_activity(){var e=bp_get_directory_preference("activity","scope"),t=bp_get_directory_preference("activity","filter");void 0!==t&&jq("#activity-filter-select").length&&jq('#activity-filter-select select option[value="'+t+'"]').prop("selected",!0),void 0!==e&&jq(".activity-type-tabs").length&&(jq(".activity-type-tabs li").each(function(){jq(this).removeClass("selected")}),jq("#activity-"+e+", .item-list-tabs li.current").addClass("selected"))}function bp_init_objects(e){jq(e).each(function(t){var i=bp_get_directory_preference(e[t],"scope"),a=bp_get_directory_preference(e[t],"filter");void 0!==a&&jq("#"+e[t]+"-order-select select").length&&jq("#"+e[t]+'-order-select select option[value="'+a+'"]').prop("selected",!0),void 0!==i&&jq("div."+e[t]).length&&(jq(".item-list-tabs li").each(function(){jq(this).removeClass("selected")}),jq("#"+e[t]+"-"+i+", #object-nav li.current").addClass("selected"))})}function bp_filter_request(e,t,i,a,s,r,n,o,c){if("activity"===e)return!1;null===i&&(i="all"),bp_set_directory_preference(e,"scope",i),bp_set_directory_preference(e,"filter",t),bp_set_directory_preference(e,"extras",n),jq(".item-list-tabs li").each(function(){jq(this).removeClass("selected")}),jq("#"+e+"-"+i+", #object-nav li.current").addClass("selected"),jq(".item-list-tabs li.selected").addClass("loading"),jq('.item-list-tabs select option[value="'+t+'"]').prop("selected",!0),"friends"!==e&&"group_members"!==e||(e="members"),bp_ajax_request&&bp_ajax_request.abort();var l={};l["bp-"+e+"-filter"]=bp_get_directory_preference(e,"filter"),l["bp-"+e+"-scope"]=bp_get_directory_preference(e,"scope");var d=encodeURIComponent(jq.param(l));bp_ajax_request=jq.post(ajaxurl,{action:e+"_filter",cookie:d,object:e,filter:t,search_terms:s,scope:i,page:r,extras:n,template:c},function(e){if("pag-bottom"===o&&jq("#subnav").length){var t=jq("#subnav").parent();jq("html,body").animate({scrollTop:t.offset().top},"slow",function(){jq(a).fadeOut(100,function(){jq(this).html(e),jq(this).fadeIn(100)})})}else jq(a).fadeOut(100,function(){jq(this).html(e),jq(this).fadeIn(100)});jq(".item-list-tabs li.selected").removeClass("loading")})}function bp_activity_request(e,t){bp_set_directory_preference("activity","scope",e),bp_set_directory_preference("activity","filter",t),jq(".item-list-tabs li").each(function(){jq(this).removeClass("selected loading")}),jq("#activity-"+e+", .item-list-tabs li.current").addClass("selected"),jq("#object-nav.item-list-tabs li.selected, div.activity-type-tabs li.selected").addClass("loading"),jq('#activity-filter-select select option[value="'+t+'"]').prop("selected",!0),jq(".widget_bp_activity_widget h2 span.ajax-loader").show(),bp_ajax_request&&bp_ajax_request.abort();var i={"bp-activity-filter":bp_get_directory_preference("activity","filter"),"bp-activity-scope":bp_get_directory_preference("activity","scope")},a=encodeURIComponent(jq.param(i));bp_ajax_request=jq.post(ajaxurl,{action:"activity_widget_filter",cookie:a,_wpnonce_activity_filter:jq("#_wpnonce_activity_filter").val(),scope:e,filter:t},function(e){jq(".widget_bp_activity_widget h2 span.ajax-loader").hide(),jq("div.activity").fadeOut(100,function(){jq(this).html(e.contents),jq(this).fadeIn(100),bp_legacy_theme_hide_comments()}),void 0!==e.feed_url&&jq(".directory #subnav li.feed a, .home-page #subnav li.feed a").attr("href",e.feed_url),jq(".item-list-tabs li.selected").removeClass("loading")},"json")}function bp_legacy_theme_hide_comments(){var e,t,i,a=jq("div.activity-comments");if(!a.length)return!1;a.each(function(){jq(this).children("ul").children("li").length<5||(comments_div=jq(this),e=comments_div.parents("#activity-stream > li"),t=jq(this).children("ul").children("li"),i=" ",jq("#"+e.attr("id")+" li").length&&(i=jq("#"+e.attr("id")+" li").length),t.each(function(a){a'+BP_DTheme.show_x_comments.replace("%d",i)+""))}))})}function checkAll(){var e,t=document.getElementsByTagName("input");for(e=0;e0&&(object=jq("#whats-new-post-object").val()),e=jq.extend({action:"post_update",cookie:bp_get_cookies(),_wpnonce_post_update:jq("#_wpnonce_post_update").val(),content:content,object:object,item_id:item_id,since:t,_bp_as_nonce:jq("#_bp_as_nonce").val()||""},s),jq.post(ajaxurl,e,function(e){if(a.find("*").each(function(){(jq.nodeName(this,"textarea")||jq.nodeName(this,"input"))&&jq(this).prop("disabled",!1)}),e[0]+e[1]==="-1")a.prepend(e.substr(2,e.length)),jq("#"+a.attr("id")+" div.error").hide().fadeIn(200);else{if(0===jq("ul.activity-list").length&&(jq("div.error").slideUp(100).remove(),jq("#message").slideUp(100).remove(),jq("div.activity").append('