/* This includes 11 files: build/evo_generic.bmin.js, src/bootstrap-evo_modal_window.js, src/evo_images.js, src/evo_user_crop.js, src/evo_user_report.js, src/evo_user_contact_groups.js, src/evo_rest_api.js, src/evo_item_flag.js, src/evo_links.js, src/evo_forms.js, ajax.js */
function evo_prevent_key_enter(e){jQuery(e).keypress(function(e){if(13==e.keyCode)return!1})}function link_attachment_window(e,t,n,o,i,r){openModalWindow('<span class="loader_img loader_user_report absolute_center" title="'+evo_link_attachment_window_config.loader_title+'"></span>',"90%","80%",!0,evo_link_attachment_window_config.window_title,"",!0);var a={action:"link_attachment",link_owner_type:e,link_owner_ID:t,crumb_link:evo_link_attachment_window_config.crumb_link,root:void 0===n?"":n,path:void 0===o?"":o,fm_highlight:void 0===i?"":i,prefix:void 0===r?"":r};return jQuery.ajax({type:"POST",url:htsrv_url+"async.php",data:a,success:function(e){openModalWindow(e,"90%","80%",!0,evo_link_attachment_window_config.window_title,"")}}),!1}"undefined"==typeof evoFadeBg&&(evoFadeBg=function evoFadeBg(selector,bgs,options){var origBg=jQuery(selector).css("backgroundColor"),speed=options&&options.speed||'"slow"',toEval="jQuery(selector).animate({ backgroundColor: ";for(e in bgs)"string"==typeof bgs[e]&&(toEval+='"'+bgs[e]+'"}, '+speed+" ).animate({ backgroundColor: ");toEval+="origBg }, "+speed+', "", function(){jQuery( this ).css( "backgroundColor", "" );});',eval(toEval)}),"undefined"==typeof evoFadeSuccess&&(evoFadeSuccess=function(e){evoFadeBg(e,new Array("#ddff00","#bbff00"))}),jQuery(document).ready(function(){if("undefined"!=typeof evo_init_scroll_to_top&&(window.offset=400,offset_opacity=1200,scroll_top_duration=700,$slide_top=jQuery(".slide-top"),jQuery(window).scroll(function(){jQuery(this).scrollTop()>offset?$slide_top.addClass("slide-top-visible"):$slide_top.removeClass("slide-top-visible")}),$slide_top.on("click",function(e){e.preventDefault(),jQuery("body, html").animate({scrollTop:0},scroll_top_duration)})),"undefined"!=typeof evo_init_datepicker&&jQuery(evo_init_datepicker.selector).datepicker(evo_init_datepicker.config),"undefined"!=typeof evo_link_position_config&&(window.displayInlineReminder=evo_link_position_config.display_inline_reminder,window.deferInlineReminder=evo_link_position_config.defer_inline_reminder,jQuery(document).on("change",evo_link_position_config.selector,{url:evo_link_position_config.url,crumb:evo_link_position_config.crumb},function(e){"inline"==this.value&&window.displayInlineReminder&&!window.deferInlineReminder&&(alert(evo_link_position_config.alert_msg),window.displayInlineReminder=!1),evo_link_change_position(this,e.data.url,e.data.crumb)})),"undefined"!=typeof evo_itemform_renderers__click&&jQuery("#itemform_renderers .dropdown-menu").on("click",function(e){e.stopPropagation()}),"undefined"!=typeof evo_commentform_renderers__click&&jQuery("#commentform_renderers .dropdown-menu").on("click",function(e){e.stopPropagation()}),"undefined"!=typeof evo_init_comment_reply_config&&(jQuery(document).on("click","a.comment_reply",function(){var e=jQuery(this).attr("rel");jQuery("a.comment_reply_current").remove(),jQuery("input[name=reply_ID]").remove(),jQuery("a.comment_reply").removeClass("active").html(evo_init_comment_reply_config.reply_button_msg);var t='<a href="'+evo_init_comment_reply_config.link_back_url+"#c"+e+'" class="comment_reply_current" rel="'+e+'">'+evo_init_comment_reply_config.link_back_specific_comment_msg+"</a>",n='<input type="hidden" name="reply_ID" value="'+e+'" />';return jQuery("#evo_comment_form_id_"+evo_init_comment_reply_config.item_ID).prepend(t+n),jQuery(this).addClass("active").html(evo_init_comment_reply_config.link_back_current_comment_msg),jQuery(window).scrollTop(jQuery("#evo_comment_form_id_"+evo_init_comment_reply_config.item_ID).offset().top-30),!1}),jQuery(document).on("click","a.comment_reply_current",function(){var e=jQuery(this).attr("rel");return jQuery(window).scrollTop(jQuery("a#c"+e).offset().top-10),!1})),"undefined"!=typeof evo_disp_download_delay_config&&(window.b2evo_download_timer=evo_disp_download_delay_config,window.downloadInterval=setInterval(function(){jQuery("#download_timer").html(window.b2evo_download_timer),0==window.b2evo_download_timer&&(clearInterval(window.downloadInterval),jQuery("#download_help_url").show()),window.b2evo_download_timer--},1e3),jQuery("#download_timer_js").show()),"undefined"!=typeof evo_skin_bootstrap_forum__quote_button_click&&jQuery(".quote_button").click(function(){var e=jQuery("form[id^=evo_comment_form_id_]");return 0==e.length||(e.attr("action",jQuery(this).attr("href")),e.submit(),!1)}),"undefined"!=typeof evo_ajax_form_config)for(var t=Object.values(evo_ajax_form_config),n=0;n<t.length;n++)!function(){var i=t[n];window["ajax_form_offset_"+i.form_number]=jQuery("#ajax_form_number_"+i.form_number).offset().top,window["request_sent_"+i.form_number]=!1,window["ajax_form_loading_number_"+i.form_number]=0;var r="get_form_"+i.form_number;window[r]=function(){var o="#ajax_form_number_"+i.form_number;window["ajax_form_loading_number_"+i.form_number]++,jQuery.ajax({url:htsrv_url+"anon_async.php",type:"POST",data:i.json_params,success:function(e){jQuery(o).html(ajax_debug_clear(e))},error:function(e,t,n){jQuery(".loader_ajax_form",o).after('<div class="red center">'+n+": "+e.responseText+"</div>"),window["ajax_form_loading_number_"+i.form_number]<3&&setTimeout(function(){jQuery(".loader_ajax_form",o).next().remove(),window[r]()},1e3)}})};var e="check_and_show_"+i.form_number;window[e]=function(e){if(!window["request_sent_"+i.form_number]){var t=null!=typeof e&&e;(t=t||jQuery(window).scrollTop()>=window["ajax_form_offset_"+i.form_number]-jQuery(window).height()-20)&&(window["request_sent_"+i.form_number]=!0,window[r]())}},jQuery(window).scroll(function(){window[e]()}),jQuery(window).resize(function(){window[e]()}),window[e](i.load_ajax_form_on_page_load)}();if("undefined"!=typeof evo_thread_form_config&&(window.check_multiple_recipients=function(){1<jQuery('input[name="thrd_recipients_array[login][]"]').length?jQuery("#multiple_recipients").show():jQuery("#multiple_recipients").hide()},window.check_form_thread=function(){return""==jQuery("input#token-input-thrd_recipients").val()||(alert(evo_thread_form_config.missing_username_msg),jQuery("input#token-input-thrd_recipients").focus(),!1)},evo_thread_form_config.token_input_config.tokenFormatter=function(e){return"<li>"+e[evo_thread_form_config.username_display]+'<input type="hidden" name="thrd_recipients_array[id][]" value="'+e.id+'" /><input type="hidden" name="thrd_recipients_array[login][]" value="'+e.login+'" /></li>'},evo_thread_form_config.token_input_config.resultsFormatter=function(e){var t=e.login;return null!=e.fullname&&void 0!==e.fullname&&(t+="<br />"+e.fullname),"<li>"+e.avatar+"<div>"+t+"</div><span></span></li>"},evo_thread_form_config.token_input_config.onAdd=function(){window.check_multiple_recipients()},evo_thread_form_config.token_input_config.onDelete=function(){window.check_multiple_recipients()},evo_thread_form_config.token_input_config.onReady=function(){evo_thread_form_config.thrd_recipients_has_error&&jQuery(".token-input-list-facebook").addClass("token-input-list-error"),jQuery("#thrd_recipients").removeAttr("required")},jQuery("#thrd_recipients").tokenInput(restapi_url+"users/recipients",evo_thread_form_config.token_input_config),window.check_multiple_recipients()),"undefined"!=typeof evo_comment_form_preview_button_config&&jQuery("input[type=submit].preview.btn-info").val(evo_comment_form_preview_button_config.button_value),"undefined"!=typeof evo_user_func__callback_filter_userlist&&(jQuery("#country").change(function(){jQuery(this),jQuery.ajax({type:"POST",url:htsrv_url+"anon_async.php",data:"action=get_regions_option_list&ctry_id="+jQuery(this).val(),success:function(e){jQuery("#region").html(ajax_debug_clear(e)),1<jQuery("#region option").length?jQuery("#region_filter").show():jQuery("#region_filter").hide(),window.load_subregions(0)}})}),jQuery("#region").change(function(){window.load_subregions(jQuery(this).val())}),jQuery("#subregion").change(function(){window.load_cities(jQuery("#country").val(),jQuery("#region").val(),jQuery(this).val())}),window.load_subregions=function(t){jQuery.ajax({type:"POST",url:htsrv_url+"anon_async.php",data:"action=get_subregions_option_list&rgn_id="+t,success:function(e){jQuery("#subregion").html(ajax_debug_clear(e)),1<jQuery("#subregion option").length?jQuery("#subregion_filter").show():jQuery("#subregion_filter").hide(),load_cities(jQuery("#country").val(),t,0)}})},window.load_cities=function(e,t,n){void 0===e&&(e=0),jQuery.ajax({type:"POST",url:htsrv_url+"anon_async.php",data:"action=get_cities_option_list&ctry_id="+e+"&rgn_id="+t+"&subrg_id="+n,success:function(e){jQuery("#city").html(ajax_debug_clear(e)),1<jQuery("#city option").length?jQuery("#city_filter").show():jQuery("#city_filter").hide()}})}),"undefined"!=typeof coll_activity_stats_widget_config&&(window.coll_activity_stats_widget_resize_timer,window.resize_coll_activity_stat_widget=function(){for(var e=Object.values(window.activity_stats_widgets),t=0;t<e.length;t++){var n=e[t];if(null==n._original){n._display=coll_activity_stats_widget_config.time_period,n._original={data:[],xLabels:[]};for(var o=0;o<n.series.length;o++)n._original.data.push(n.series[o].data);n._original.xLabels=n.axes.xaxis.ticks}if(null==n._week)if(n._week={data:[],xLabels:[]},7==n._original.xLabels.length)n._week=n._original;else for(o=0;o<n._original.data.length;o++){for(var i=[],r=7,a=1;0<r;r--,a++)i.unshift([r,n._original.data[o][n._original.data[o].length-a][1]]);n._week.data.push(i),n._week.xLabels=n._original.xLabels.slice(-7)}if(jQuery(n.target).width()<650){if("last_week"!=n._display){for(o=0;o<n.series.length;o++)n.series[o].data=n._week.data[o];n.axes.xaxis.ticks=n._week.xLabels,n._display="last_week"}}else if("last_month"!=n._display){for(o=0;o<n.series.length;o++)n.series[o].data=n._original.data[o];n.axes.xaxis.ticks=n._original.xLabels,n._display="last_month"}n.replot({resetAxes:!0})}},jQuery(window).resize(function(){clearTimeout(window.coll_activity_stats_widget_resize_timer),window.coll_activity_stats_widget_resize_timer=setTimeout(window.resize_coll_activity_stat_widget,100)})),"undefined"!=typeof evo_item_tags_widget_config){window.add_quick_tag=function(e,t){var n=jQuery(t).text();jQuery("#item_tags_"+e).tokenInput("add",{id:n,name:n})},window.init_edit_item_tags_icon=function(e,t){jQuery("#evo_widget_item_tags_edit_icon_"+t).click(function(){return jQuery("#evo_widget_item_tags_edit_form_"+t).show(),jQuery("input#token-input-"+e,"#evo_widget_item_tags_edit_form_"+t).focus(),jQuery("#evo_widget_item_tags_list_"+t).hide(),!1})};var e=Object.values(evo_item_tags_widget_config);for(n=0;n<e.length;n++)o=e[n],window.init_edit_item_tags_icon(o.input_ID,o.widget_ID);delete e}var o;if("undefined"!=typeof evo_workflow_properties_widget_config&&jQuery("[id^=evo_widget_item_workflow_properties_] a").click(function(){var e=jQuery(this).closest("[id^=evo_widget_item_workflow_properties_]");return e.next("[id^=evo_widget_item_workflow_form_]").show(),e.hide(),!1}),"undefined"!=typeof evo_display_attachments_fieldset_config&&function(){for(var e=Object.values(evo_display_attachments_fieldset_config),t=0;t<e.length;t++)jQuery("#"+e[t].fieldset_prefix+e[t].form_id).show()}(),"undefined"!=typeof evo_tabs_ajax_load__click&&jQuery('[data-toggle="tabajax"]').click(function(e){var t=jQuery(this),n=t.attr("href"),o=t.attr("data-target");return t.closest("li").hasClass("active")||(jQuery.get(n,function(e){jQuery(o).html(e)}),t.tab("show")),!1}),"undefined"!=typeof evo_contact_list_view_config&&(window.get_selected_users=function(){var e="";return jQuery("input[name^=contacts]").each(function(){jQuery(this).is(":checked")&&(e+=jQuery(this).val()+",")}),0<e.length&&(e=e.substr(0,e.length-1)),e},jQuery("#send_selected_recipients").click(function(){var e="",t=window.get_selected_users();return 0<t.length&&(e="&recipients="+t),location.href=evo_contact_list_view_config.recipients_link_url+e,!1}),jQuery("#add_group_contacts").submit(function(){jQuery("input[name=users]").val(window.get_selected_users())})),"undefined"!=typeof evo_user_identity_form_config&&function(){var i=evo_user_identity_form_config;window.replace_form_params=function(e,t){return t=void 0===t?"":' id="'+t+'"',e.replace("#fieldstart#",i.fieldstart).replace("#fieldend#",i.fieldend).replace("#labelclass#",i.labelclass).replace("#labelstart#",i.labelstart).replace("#labelend#",i.labelend).replace("#inputstart#",i.inputstart).replace("#inputend#",i.inputend)},jQuery("#button_add_field").click(function(){var e=jQuery(this).prev().find("option:selected").val();if(""==e)return window.field_type_error(i.msg_select_field_type),!1;window.field_type_error_clear();var t=i.params;return jQuery.ajax({type:"POST",url:htsrv_url+"anon_async.php",data:"action=get_user_new_field&user_id="+i.user_ID+"&field_id="+e+t,success:function(e){if("[0]"==(e=ajax_debug_clear(e)))window.field_type_error(i.msg_field_already_added);else{if(e=window.replace_form_params(e),0==parseInt(e.replace(/^\[(\d+)\](.*)/,"$1"))){var t=parseInt(e.replace(/(.*)fieldset id="ffield_uf_add_(\d+)_(.*)/,"$2"));if(jQuery("#new_field_type option[value="+t+"]").remove(),0<jQuery("[id^=uf_new_"+t+"], [id^=uf_add_"+t+"]").length)return window.field_type_error(i.msg_field_already_added),!1}jQuery("#ffield_new_field_type").before(e.replace(/^\[\d+\](.*)/,"$1")),jQuery("span[rel^=add_ufdf_]").show(),bind_autocomplete(jQuery("#ffield_new_field_type").prev().prev().find("input[id^=uf_add_][autocomplete=on]"))}}}),!1}),jQuery(document).on("focus","[rel^=ufdf_]",function(){var e=parseInt(jQuery(this).attr("rel").replace(/^ufdf_(\d+)$/,"$1"));0<e&&(jQuery("#new_field_type").val(e),window.field_type_error_clear())}),jQuery("#new_field_type").change(function(){window.field_type_error_clear()}),window.field_type_error=function(e){jQuery("select#new_field_type").addClass("field_error");var t=jQuery("select#new_field_type").next().find("span.field_error");0<t.length?t.html(e):jQuery("select#new_field_type").next().append('<span class="field_error">'+e+"</span>")},window.field_type_error_clear=function(){jQuery("select#new_field_type").removeClass("field_error").next().find("span.field_error").remove()},jQuery("span[rel^=add_ufdf_]").show(),jQuery(document).on("click","span[rel^=add_ufdf_]",function(){var o=jQuery(this),e=o.attr("rel").replace(/^add_ufdf_(\d+)$/,"$1"),t=i.params;jQuery.ajax({type:"POST",url:htsrv_url+"anon_async.php",data:"action=get_user_new_field&user_id="+i.user_ID+"&field_id="+e+t,success:function(e){if("[0]"==(e=ajax_debug_clear(e)))window.field_type_error(i.msg_field_already_added);else{if(e=window.replace_form_params(e),0==parseInt(e.replace(/^\[(\d+)\](.*)/,"$1")))return window.field_type_error(i.msg_field_already_added),!1;var t=o.parent().parent().parent();t.after(e.replace(/^\[\d+\](.*)/,"$1")).next().find("span[rel^=add_ufdf_]").show();var n=t.next().find("input[id^=uf_add_]");"on"==n.attr("autocomplete")&&bind_autocomplete(n),n.focus()}}})}),jQuery(document).on("mouseover","span[rel^=add_ufdf_]",function(){jQuery(this).parent().prev().focus(),jQuery(this).css("z-index",jQuery(this).parent().prev().css("z-index"))}),jQuery(document).on("mouseout","span[rel^=add_ufdf_]",function(){var e=jQuery(this).parent().prev();if(e.is(":focus"))return!1;e.blur()});var n='[id^="ffield_organizations_"]',o=i.max_organizations,r=0;jQuery(document).on("click","span.add_org",function(){var t=jQuery(this),e=i.params;e+="undefined"!=typeof remove_obj_after_org_adding?"&first_org=1":"",jQuery.ajax({type:"POST",url:htsrv_url+"anon_async.php",data:"action=get_user_new_org"+e,success:function(e){e=window.replace_form_params(ajax_debug_clear(e),"ffield_organizations_"+r),t.closest(n).after(e),"undefined"!=typeof remove_obj_after_org_adding&&(remove_obj_after_org_adding.remove(),delete remove_obj_after_org_adding),jQuery(n).length>=o&&jQuery("span.add_org").hide(),1<jQuery(n).length?jQuery("span.remove_org").show():jQuery("span.remove_org").hide(),r++}})}),jQuery(document).on("click","span.remove_org",function(){1<jQuery(n).length?jQuery(this).closest(n).remove():(remove_obj_after_org_adding=jQuery(this).closest(n),jQuery(this).parent().find("span.add_org").click()),jQuery(n).length<o&&jQuery("span.add_org").show(),0<jQuery(n).length?jQuery("span.remove_org").show():jQuery("span.remove_org").hide()}),window.bind_autocomplete=function(e){0<e.length&&e.autocomplete({source:function(e,t){jQuery.getJSON(htsrv_url+"anon_async.php?action=get_user_field_autocomplete",{term:e.term,attr_id:this.element[0].getAttribute("id")},t)}})},bind_autocomplete(jQuery("input[id^=uf_][autocomplete=on]"))}(),"undefined"!=typeof evo_user_organization_config&&jQuery(document).on("click","span[rel^=org_status_]",function(){var t=jQuery(this),e=evo_user_organization_config.params;jQuery.ajax({type:"POST",url:htsrv_url+"anon_async.php",data:"action=change_user_org_status&status="+t.attr("rel")+"&crumb_userorg="+evo_user_organization_config.crumb_userorg+e,success:function(e){t.after(ajax_debug_clear(e)).remove()}})}),"undefined"!=typeof evo_item_type_change_buttons_config&&jQuery("button[data-item-type]").on("click",function(){jQuery("[required]").removeAttr("required"),jQuery("input[name=item_typ_ID]").val(jQuery(this).data("item-type")),jQuery(this).closest("form").append('<input type="hidden" name="action" value="'+evo_item_type_change_buttons_config.action+'">').submit()}),"undefined"!=typeof evo_status_dropdown_button_config){var i=Object.values(evo_status_dropdown_button_config);for(n=0;n<i.length;n++)!function(){var l=i[n];jQuery("."+l.type+"_status_dropdown li a").click(function(){var e=l.tooltip_titles_js_array,t=jQuery(this).parent(),n=t.attr("rel"),o=t.parent().parent(),i=o.parent().parent(),r=o.find("button"),a=r.parent().find("button:first"),s=i.find('input[type="submit"]:not(.quick-publish)').add(r);return"published"==n?i.find(".quick-publish").hide():i.find(".quick-publish").show(),s.each(function(){jQuery(this).attr("class",jQuery(this).attr("class").replace(/btn-status-[^\s]+/,"btn-status-"+n))}),a.find("span:first").html(t.find("span:last").html()),jQuery("input[type=hidden][name="+l.type+"_status]").val(n),o.removeClass("open"),"submit"==a.attr("type")&&a.click(),o.tooltip("hide").attr("data-original-title",e[n]).tooltip("show"),!1})}()}if("undefined"!=typeof evo_init_onchange_newcat&&jQuery("#new_category_name").keypress(function(){var e=jQuery("#sel_maincat_new");e.attr("checked")||(e.attr("checked",!0),jQuery("#sel_extracat_new").attr("checked",!0))}),"undefined"!=typeof evo_autocomplete_tags_config){window.init_autocomplete_tags=function(t,n){if(!n&&window.evo_autocomplete_input_tag_configs[t]&&(n=window.evo_autocomplete_input_tag_configs[t]),n){var e=jQuery(t).val(),o=new Array;if(e&&0<e.length){for(var i in e=e.split(","))o.push({id:e[i].trim(),name:e[i].trim()});n.token_input_params.prePopulate=o}n.update_by_ajax&&(n.token_input_params.onAdd=function(e){n.use_quick_tags&&window.evo_update_item_quick_tags(e),window.evo_update_item_tags_by_ajax(n.item_ID,t,e,"add")},n.token_input_params.onDelete=function(e){window.evo_update_item_tags_by_ajax(n.item_ID,t,e,"delete")}),jQuery(t).tokenInput(restapi_url+"tags",n.token_input_params)}},window.evo_update_item_quick_tags=function(e){var t=e.name.trim(),n=jQuery.cookie("quick_item_tags"),o=(n=null==n||0==n.length?[]:n.split(",")).indexOf(t);-1===o||n.splice(o,1),n.push(t),n=n.splice(-5),jQuery.cookie("quick_item_tags",n.join(","),{domain:evo_autocomplete_tags_config.cookie_domain,path:evo_autocomplete_tags_config.cookie_path})},window.evo_update_item_tags_by_ajax=function(e,t,n,o,i){var r=jQuery(".token-input-"+t.substr(1));r.removeClass("token-input-list-error").addClass("token-input-list-process"),jQuery.ajax({type:"POST",url:htsrv_url+"action.php",data:{mname:"collections",action:"update_tags",item_ID:e,item_tags:jQuery(t).val(),crumb_collections_update_tags:evo_autocomplete_tags_config.crumb_collections_update_tags},success:function(){r.removeClass("token-input-list-process")},error:function(){r.removeClass("token-input-list-process").addClass("token-input-list-error")}})},window.evo_autocomplete_input_tag_configs=window.evo_autocomplete_input_tag_configs||{};for(var r=Object.values(evo_autocomplete_input_tags_config),a=(n=0,r.length);n<a;n++)!function(){var e=r[n],t="#"+e.input_ID;window.evo_autocomplete_input_tag_configs[t]=e,0!=jQuery("#suggest_item_tags").length&&!jQuery("#suggest_item_tags").is(":checked")||window.init_autocomplete_tags(t,e),jQuery("#suggest_item_tags").click(function(){jQuery(this).is(":checked")?(jQuery(t).hide(),window.init_autocomplete_tags(t)):(jQuery(t).show(),jQuery(t).parent().find("ul.token-input-list-facebook").remove())}),evo_prevent_key_enter("#token-input-"+e.input_ID)}();delete r}"undefined"!=typeof evo_fieldset_folding_config&&(jQuery(document).on("click","span[id^=icon_folding_], span[id^=title_folding_]",function(){var e=jQuery(this).attr("id").match(/^icon_folding_/),t=jQuery(this).closest(".fieldset_wrapper"),n=e?jQuery(this).prev():jQuery(this).prev().prev();if(0==t.length||0==n.length)return!1;"1"==n.val()?(t.removeClass("folded"),n.val("0")):(t.addClass("folded"),n.val("1"));var o=e?jQuery(this):jQuery(this).prev();if(o.hasClass("fa")||o.hasClass("glyphicon")){if(""!=o.data("toggle")){var i=o.hasClass("fa")?"fa":"glyphicon";null==o.data("toggle-orig-class")&&o.data("toggle-orig-class",o.attr("class").replace(new RegExp("^"+i+" (.+)$","g"),"$1")),o.hasClass(o.data("toggle-orig-class"))?o.removeClass(o.data("toggle-orig-class")).addClass(i+"-"+o.data("toggle")):o.removeClass(i+"-"+o.data("toggle")).addClass(o.data("toggle-orig-class"))}}else{var r=o.css("background-position");o.css("background-position",o.data("xy")),o.data("xy",r)}var a=o.attr("title");o.attr("title",o.data("title")),o.data("title",a)}),jQuery("input[type=hidden][id^=folding_value_]").each(function(){var e=jQuery(this).closest(".fieldset_wrapper");"1"==jQuery(this).val()?e.addClass("folded"):e.removeClass("folded")}),jQuery(".field_error").closest(".fieldset_wrapper.folded").find("span[id^=icon_folding_]").click()),"undefined"!=typeof evo_init_item_list_clipboard_js&&(window.clipboard=new ClipboardJS("a.clipboard-copy")),"undefined"!=typeof evo_item_checklist_config&&(window.update_checklist_tab_badge=function(){var e=document.getElementById("checklist_counter"),t=document.querySelectorAll('.checklist_lines .checklist_line input[type="checkbox"]:not(:checked)').length;if(e)0<t?e.innerHTML=t:e.remove();else if(0<t){var n=document.querySelector('a[href="#checklist"][data-toggle="tab"]');n&&((e=document.createElement("span")).classList.add("badge","badge-important"),e.innerHTML=t,e.setAttribute("id","checklist_counter"),n.appendChild(document.createTextNode(" ")),n.appendChild(e))}},jQuery(".checklist_lines").on("click",'.checklist_line input[type="checkbox"]',window.update_checklist_tab_badge))}),jQuery(document).ready(function(){if("undefined"!=typeof evo_init_password_indicator_config){var u=evo_init_password_indicator_config;window.passcheck=function(){var e=jQuery("input#"+u.pass1_id);if(0!=e.length){u.field_width||(u.field_width=e.outerWidth());var t=jQuery("input#"+u.pass2_id);0!=t.length&&t.css("width",u.field_width-2+"px"),e.css("width",u.field_width-2+"px"),e.attr("onkeyup","return passinfo( this );"),e.parent().append('<div id="p-container"><div id="p-result"></div><div id="p-status"></div><div id="p-time"></div></div>'),jQuery("head").append("<style>#p-container { position: relative; margin-top: 4px; height:5px; border: 1px solid #CCC; font-size: 84%; line-height:normal; color: #999; background: #FFF } #p-result { height:5px } #p-status { position:absolute; width: 100px; top:-5px; left: "+(u.field_width+8)+"px } #p-time { position:absolute; width: 400px } </style>"),jQuery("#p-container").css("width",e.outerWidth()-2);var n=parseInt(e.css("margin-left"));0<n&&jQuery("#p-container").css("margin-left",n+"px")}},window.passinfo=function(e){var t=document.getElementById("p-result"),n=document.getElementById("p-status"),o=document.getElementById("p-time"),i="",r=document.getElementById(u.login_id);null!=r&&""!=r.value&&(i=r.value);var a="",s=document.getElementById(u.email_id);null!=s&&""!=s.value&&(a=s.value);var l=[i,a],_=zxcvbn(e.value,l.concat(u.blacklist)),d="red",c=u.msg_status_very_weak;switch(0==e.value.length?(t.style.display="none",n.style.display="none",o.style.display="none"):(t.style.display="block",n.style.display="block",o.style.display="block"),_.score){case 1:d="#F88158",c=u.msg_status_weak;break;case 2:d="#FBB917",c=u.msg_status_soso;break;case 3:d="#8BB381",c=u.msg_status_good;break;case 4:d="#59E817",c=u.msg_status_great}t.style.width=20*_.score+20+"%",t.style.background=d,u.disp_status&&(n.innerHTML=c),u.disp_time&&(document.getElementById("p-time").innerHTML=u.msg_est_crack_time+": "+_.crack_time_display)},function(){var e;e=function(){var e,t;return(t=document.createElement("script")).src=u.rsc_url+"js/zxcvbn.js",t.type="text/javascript",t.async=!0,(e=document.getElementsByTagName("script")[0]).parentNode.insertBefore(t,e)},null!=window.attachEvent?window.attachEvent("onload",e):window.addEventListener("load",e,!1)}.call(this),jQuery("input#"+u.pass1_id+", input#"+u.pass2_id).keyup(function(){var e=u.min_pwd_len,t=jQuery("input#"+u.pass1_id),n=jQuery("input#"+u.pass2_id),o=jQuery("#pass2_status"),i="",r=/^[^\<\&\>]+$/g;t.val().length&&null==t.val().match(r)||n.val().length&&null==n.val().match(r)?(i=u.msg_illegal_char,t[0].setCustomValidity(t.val().match(r)?"":i),n[0].setCustomValidity(n.val().match(r)?"":i),o.html(u.error_icon+" "+i)):0<t.val().length&&t.val().length<e||0<n.val().length&&n.val().length<e?(i=u.msg_min_pwd_len,t[0].setCustomValidity(t.val().length<e?i:""),n[0].setCustomValidity(n.val().length<e?i:""),o.html(u.error_icon+" "+i)):n.val()!=t.val()?(i=u.msg_pwd_not_matching,t[0].setCustomValidity(""),n[0].setCustomValidity(i),o.html(u.error_icon+" "+i)):(t[0].setCustomValidity(i),n[0].setCustomValidity(i),o.html(i))}),window.passcheck()}}),jQuery(document).ready(function(){if("undefined"!=typeof evo_init_password_edit_config){var r=evo_init_password_edit_config;window.user_pass_clear_style=function(e){jQuery(e).each(function(){jQuery(this).parent().find("span.field_error span:visible").length?jQuery(this).addClass("field_error"):jQuery(this).removeClass("field_error")})},jQuery("#current_user_pass").keyup(function(){var e=jQuery(this).parent().find("span.field_error");e.length&&(""==jQuery(this).val()?e.show():e.hide()),user_pass_clear_style("#current_user_pass")}),jQuery("#edited_user_pass1, #edited_user_pass2").keyup(function(){var e=jQuery(this).parent().find(".pass_check_min");e.length&&(jQuery.trim(jQuery(this).val()).length>=r.user_minpwdlen?e.hide():e.show());var t=jQuery(".pass_check_diff");t.length&&jQuery("#edited_user_pass1").val()==jQuery(" #edited_user_pass2").val()&&t.hide();var n=jQuery(this).parent().find(".pass_check_new");n.length&&(""==jQuery(this).val()?n.show():n.hide());var o=jQuery(this).parent().find(".pass_check_twice");o.length&&(""==jQuery(this).val()?o.show():o.hide());var i=jQuery(this).parent().find(".pass_check_warning");jQuery.trim(jQuery(this).val())!=jQuery(this).val()?i.length||jQuery(this).parent().append('<span class="pass_check_warning notes field_error">'+r.msg_pwd_trim_warning+"</span>"):i.length&&i.remove(),user_pass_clear_style("#edited_user_pass1, #edited_user_pass2")})}}),jQuery(document).ready(function(){if("undefined"!=typeof evo_init_login_validator_config){var e=evo_init_login_validator_config,n=e.login_icon_load,o=(e.login_icon_available,e.login_icon_exists),i=e.login_icon_error,r=e.login_text_empty,a=(e.login_text_available,e.login_text_exists),s=jQuery("#register_form input#"+e.login_id);s.change(function(){var t=jQuery("#login_status_msg");""==jQuery(this).val()?(jQuery("#login_status").html(""),t.html(r).attr("class","notes")):(jQuery("#login_status").html(n),jQuery.ajax({type:"POST",url:e.login_htsrv_url+"anon_async.php",data:"action=validate_login&login="+jQuery(this).val(),success:function(e){"exists"==(e=ajax_debug_clear(e))?(jQuery("#login_status").html(""),t.html(o+" "+a).attr("class","red"),s[0].setCustomValidity(a)):"available"==e?(jQuery("#login_status").html(""),t.html(""),s[0].setCustomValidity("")):(jQuery("#login_status").html(""),t.html(i.replace("$error_msg$",e.replace(/(<([^>]+)>)/gi,""))+" "+e).attr("class","red"),s[0].setCustomValidity(e.replace(/(<([^>]+)>)/gi,"")))}}))})}}),jQuery(document).ready(function(){"undefined"!=typeof evo_skin_bootstrap_forums__post_list_header&&jQuery("#evo_workflow_status_filter").change(function(){var e=location.href.replace(/([\?&])((status|redir)=[^&]*(&|$))+/,"$1"),t=jQuery(this).val();""!==t&&(e+=(-1==e.indexOf("?")?"?":"&")+"status="+t+"&redir=no"),location.href=e.replace("?&","?").replace(/\?$/,"")})}),jQuery(document).ready(function(){"undefined"!=typeof evo_autocomplete_login_config&&(jQuery("input.autocomplete_login").on("added",function(){jQuery("input.autocomplete_login").each(function(){if(!jQuery(this).hasClass("tt-input")&&!jQuery(this).hasClass("tt-hint")){var t="";t=jQuery(this).hasClass("only_assignees")?restapi_url+evo_autocomplete_login_config.url:restapi_url+"users/logins",jQuery(this).data("status")&&(t+="&status="+jQuery(this).data("status")),jQuery(this).typeahead(null,{displayKey:"login",source:function(e,o){jQuery.ajax({type:"GET",dataType:"JSON",url:t,data:{q:e},success:function(e){var t=new Array;for(var n in e.list)t.push({login:e.list[n]});o(t)}})}})}})}),jQuery("input.autocomplete_login").trigger("added"),evo_prevent_key_enter(evo_autocomplete_login_config.selector))}),jQuery(document).ready(function(){"undefined"!=typeof evo_widget_poll_initialize&&(jQuery('.evo_poll__selector input[type="checkbox"]').on("click",function(){var e=jQuery(this).closest(".evo_poll__table"),t=jQuery(".evo_poll__selector input:checked",e).length>=e.data("max-answers");jQuery(".evo_poll__selector input[type=checkbox]:not(:checked)",e).prop("disabled",t)}),jQuery(".evo_poll__table").each(function(){var e=jQuery(this);e.width()>e.parent().width()&&(jQuery(".evo_poll__title",e).css("white-space","normal"),jQuery(".evo_poll__title label",e).css({width:Math.floor(e.parent().width()/2)+"px","word-wrap":"break-word"}))}))}),jQuery(document).ready(function(){if("undefined"!=typeof evo_init_checklist_lines_config){var _=evo_init_checklist_lines_config;window.toggle_add_checklist_line_input=function(e,t){var n=jQuery(".add_checklist_line_input",e),o=jQuery(".checklist_add_btn"),i=jQuery(".checklist_close_btn");null==t&&(t=0===jQuery(".add_checklist_line_input",e).is(":visible").length),1==t?(o.html(_.button_label_add),n.show(),i.show(),n.focus()):0==t&&(o.html(_.button_label_add_an_item),n.hide(),i.hide())},window.update_checklist_line=function(r,e){jQuery.ajax({type:"POST",url:htsrv_url+"action.php",data:{mname:"collections",action:"checklist_line",item_ID:_.item_ID,check_ID:e,check_label:r.val(),check_checked:r.checked,crumb_collections_checklist_line:_.crumb_checklist_line},dataType:"json",success:function(e){if("add"==e.status){var t=r.closest("div.checklist_wrapper"),n=jQuery(".checklist_lines",t),o=_.checklist_line_template;if(o=(o=o.replace(/\$checklist_line_ID\$/g,e.check_ID)).replace(/\$checklist_line_label\$/g,e.check_label),o=jQuery(o),n.append(o),window.dragndrop_checklist_lines(o),r.hasClass("add_checklist_line_input")){r.val("");var i=r.get(0);i.setAttribute("style","height:"+i.scrollHeight+"px;overflow-y:hidden;"),i.style.height="auto",i.style.height=i.scrollHeight+"px",r.focus()}}else"update"==e.status&&r.closest(".checklist_line_label").html(e.check_label)},error:function(){console.error("Add/update checklist line request error.")}})},window.toggle_checklist_line=function(e,t){jQuery.ajax({type:"POST",url:htsrv_url+"action.php",data:{mname:"collections",action:"checklist_line",item_action:"toggle_check",item_ID:_.item_ID,check_ID:t,check_checked:jQuery(e).is(":checked"),crumb_collections_checklist_line:_.crumb_checklist_line},dataType:"json",success:function(e){},error:function(){console.error("Add/update checklist line request error.")}})},window.delete_checklist_line=function(t,e){jQuery.ajax({type:"POST",url:htsrv_url+"action.php",data:{mname:"collections",action:"checklist_line",item_action:"delete",item_ID:_.item_ID,check_ID:e,crumb_collections_checklist_line:_.crumb_checklist_line},dataType:"json",success:function(e){"delete"==e.status&&jQuery(t).closest(".checklist_line").remove()},error:function(){console.error("Delete checklist line request error.")}})},window.reorder_checklist_lines=function(e){var n=[];jQuery(".checklist_line",e).each(function(e,t){n.push(jQuery("input",t).val())}),jQuery.ajax({type:"POST",url:htsrv_url+"action.php",data:{mname:"collections",action:"checklist_line",item_action:"reorder",item_ID:_.item_ID,item_order:n,crumb_collections_checklist_line:_.crumb_checklist_line},dataType:"json",success:function(e){},error:function(){console.error("Delete checklist line request error.")}})},window.dragndrop_checklist_lines=function(e){jQuery(e).draggable({axis:"y",helper:"original",scroll:!0,scrollSensitivity:100,zIndex:999,opacity:.8,cursor:"move",cancel:"input,textarea,button,select,option,a",stop:function(){jQuery(this).removeAttr("style")}}).addClass("draggable_checklist_line"),jQuery(e).droppable({accept:".draggable_checklist_line",hoverClass:"droppable-hover",greedy:!0,tolerance:"pointer",delay:1e3,drop:function(e,t){var n=jQuery(this).closest(".checklist_lines");jQuery(this).after(t.draggable),window.reorder_checklist_lines(n)}})},jQuery(".checklist_add_btn").on("click",function(){var e=jQuery(this).closest("div.checklist_wrapper"),t=jQuery("textarea.add_checklist_line_input",e);t.is(":visible")?window.update_checklist_line(t):window.toggle_add_checklist_line_input(e,!0)}),jQuery(".checklist_close_btn").on("click",function(){var e=jQuery(this).closest("div.checklist_wrapper");window.toggle_add_checklist_line_input(e,!1)}),jQuery(document).on("click",".checklist_lines label .checklist_line_label",function(e){var t=jQuery(this),n=t.html(),o=t.closest(".checklist_line"),i=jQuery('input[type="checkbox"]',o),r=o.closest("div.checklist_wrapper");if(e.preventDefault(),0===t.has("textarea.checklist_line_input").length){window.toggle_add_checklist_line_input(r,!1);var a=jQuery(_.checklist_line_input_template),s=jQuery("textarea.checklist_line_input",a);s.attr("id","checklist_line_input_"+i.val()),s.attr("name","checklist_line_input_"+i.val()),s.val(n),s.data("checkId",i.val()),s.data("content",n),t.html(s);var l=s.get(0);l.setAttribute("style","height:"+l.scrollHeight+"px;overflow-y:hidden;"),l.style.height="auto",l.style.height=l.scrollHeight+"px",s.focus()}}),jQuery(document).on("blur",".checklist_lines .checklist_line_label .checklist_line_input",function(e){var t=jQuery(this),n=t.data("content"),o=t.closest(".checklist_line_label");setTimeout(function(){o.html(n)},10)}),jQuery(document).on("keypress",".checklist_line_input",function(e){var t=jQuery(this);13==e.keyCode&&(e.preventDefault(),t.val().length&&window.update_checklist_line(t,t.data("checkId")))}),jQuery(document).on("change",'.checklist_lines .checklist_line input[type="checkbox"]',function(e){var t=jQuery(this);window.toggle_checklist_line(t,t.val())}),jQuery(document).on("click",".checklist_lines .checklist_line .checklist_line_delete",function(e){var t=jQuery(this),n=t.closest(".checklist_line"),o=jQuery('input[type="checkbox"]',n),i=n.closest("div.checklist_wrapper");return window.toggle_add_checklist_line_input(i,!1),window.delete_checklist_line(t,o.val()),!1}),jQuery(document).on("input","textarea.checklist_line_input",function(e){this.style.height="auto",this.style.height=this.scrollHeight+"px"}),window.dragndrop_checklist_lines(".checklist_lines .checklist_line, .checklist_droparea")}}),jQuery(document).ready(function(){if("undefined"!=typeof evo_plugin_auto_anchors_settings){jQuery("h1, h2, h3, h4, h5, h6").each(function(){if(jQuery(this).attr("id")&&jQuery(this).hasClass("evo_auto_anchor_header")){var e=location.href.replace(/#.+$/,"")+"#"+jQuery(this).attr("id");jQuery(this).append(' <a href="'+e+'" class="evo_auto_anchor_link" style="visibility:hidden"><span class="fa fa-link"></span></a>')}});var t=jQuery("#evo_toolbar").length?jQuery("#evo_toolbar").height():0;jQuery(".evo_auto_anchor_link").on("click",function(){var e=jQuery(this).attr("href");return jQuery("html,body").animate({scrollTop:jQuery(this).offset().top-t-evo_plugin_auto_anchors_settings.offset_scroll},function(){window.history.pushState("","",e)}),!1})}}),jQuery(document).ready(function(){if("undefined"!=typeof evo_init_custom_tags_toolbar_config)for(var e=Object.values(evo_init_custom_tags_toolbar_config),t=0;t<e.length;t++){var r=e[t];!function(){var i=r.js_prefix+r.plugin_code+"_";window[i+"tagButtons"]=new Array,window[i+"tagOpenTags"]=new Array,window[i+"tagButton"]=function(e,t,n,o,i,r,a,s){this.id=e,this.display=t,this.style=n,this.tagStart=o,this.tagEnd=i,this.access=r,this.title=a,this.open=s};for(var e=Object.values(r.tag_buttons),n=0,o=e.length;n<o;n++)window[i+"tagButtons"][window[i+"tagButtons"].length]=new window[i+"tagButton"]("tag_"+e[n].title,e[n].name,"",e[n].start,e[n].end,"",e[n].title);window[i+"tagGetButton"]=function(e,t){return'<input type="button" id="'+e.id+'" accesskey="'+e.access+'" title="'+e.title+'" style="'+e.style+'" class="'+r.toolbar_button_class+'" data-func="'+i+"tagInsertTag|"+r.js_prefix+"b2evoCanvas|"+t+'" value="'+e.display+'" />'},window[i+"tagAddTag"]=function(e){""!=window[i+"tagButtons"][e].tagEnd&&(window[i+"tagOpenTags"][window[i+"tagOpenTags"].length]=e,document.getElementById(window[i+"tagButtons"][e].id).style.fontWeight="bold")},window[i+"tagRemoveTag"]=function(e){for(n=0,o=window[i+"tagOpenTags"].length;n<o;n++)window[i+"tagOpenTags"][n]==e&&(window[i+"tagOpenTags"].splice(n,1),document.getElementById(window[i+"tagButtons"][e].id).style.fontWeight="normal")},window[i+"tagCheckOpenTags"]=function(e){var t=0;for(n=0,o=window[i+"tagOpenTags"].length;n<o;n++)window[i+"tagOpenTags"][n]==e&&t++;return 0<t},window[i+"tagCloseAllTags"]=function(){var e=window[i+"tagOpenTags"].length;for(n=0;n<e;n++)window[i+"tagInsertTag"](window[r.js_prefix+"b2evoCanvas"],window[i+"tagOpenTags"][window[i+"tagOpenTags"].length-1])},window[i+"tagToolbar"]=function(){var e=r.toolbar_title_before+r.toolbar_label+" "+r.toolbar_title_after;e+=r.toolbar_group_before;for(var t=0,n=window[i+"tagButtons"].length;t<n;t++)e+=window[i+"tagGetButton"](window[i+"tagButtons"][t],t);e+=r.toolbar_group_after+r.toolbar_group_before,e+='<input type="button" id="tag_close" class="'+r.toolbar_button_class+'" data-func="'+i+'tagCloseAllTags" title="'+r.btn_title_close_all_tags+'" value="X" />',e+=r.toolbar_group_after,jQuery("."+i+"toolbar").html(e)},window[i+"tagInsertTag"]=function(e,t){var n=b2evo_Callbacks.trigger_callback("get_selected_text_for_"+e.id),o=!1;null!=n&&0!=n||(document.selection?(e.focus(),n=document.selection.createRange().text,o=!0):!e.selectionStart&&"0"!=e.selectionStart||(n=e.selectionStart!=e.selectionEnd)),n?textarea_wrap_selection(e,window[i+"tagButtons"][t].tagStart,window[i+"tagButtons"][t].tagEnd,0):window[i+"tagCheckOpenTags"](t)&&""!=window[i+"tagButtons"][t].tagEnd?(textarea_wrap_selection(e,"",window[i+"tagButtons"][t].tagEnd,0),window[i+"tagRemoveTag"](t)):(textarea_wrap_selection(e,window[i+"tagButtons"][t].tagStart,"",0),window[i+"tagAddTag"](t)),o&&e.focus()},window[i+"tagToolbar"]()}()}}),jQuery(document).ready(function(){if("undefined"!=typeof evo_plugin_table_contents_settings){var n=jQuery("#evo_toolbar").length?jQuery("#evo_toolbar").height():0;jQuery(".evo_plugin__table_of_contents a").on("click",function(){var e=jQuery("#"+jQuery(this).data("anchor"));if(0==e.length||!e.prop("tagName").match(/^h[1-6]$/i))return!0;var t=jQuery(this).attr("href");return jQuery("html,body").animate({scrollTop:e.offset().top-n-evo_plugin_table_contents_settings.offset_scroll},function(){window.history.pushState("","",t)}),!1})}}),jQuery(document).ready(function(){if(window.evo_init_shortlinks_toolbar=function(n){window.shortlinks_toolbar=function(e){var t=n.toolbar_title_before+e+n.toolbar_title_after+n.toolbar_group_before+'<input type="button" title="'+n.button_title+'" class="'+n.button_class+'" data-func="shortlinks_load_window|'+n.js_prefix+'" value="'+n.button_value+'" />'+n.toolbar_group_after;jQuery("."+n.js_prefix+n.plugin_code+"_toolbar").html(t)},window.shortlinks_toolbar(n.toolbar_title)},"undefined"!=typeof evo_init_shortlinks_toolbar_config){for(var e=Object.values(evo_init_shortlinks_toolbar_config),t=0;t<e.length;t++)window.evo_init_shortlinks_toolbar(e[t]);delete e}}),jQuery(document).ready(function(){if(window.evo_init_inlines_toolbar=function(r){var o=r.target_ID,i=r.temp_ID,a=r.target_type,s=new Array;window.inline_button=function(e,t,n,o,i){this.id=e,this.text=t,this.type=n,this.title=o,this.style=i},s[s.length]=new window.inline_button("inline_image","image","image",r.button_title,""),window.inline_toolbar=function(e,t){for(var n=r.toolbar_title_before+e+r.toolbar_title_after+r.toolbar_group_before,o=0;o<s.length;o++){var i=s[o];n+='<input type="button" id="'+i.id+'" title="'+i.title+'"'+(void 0!==i.style?' style="'+i.style+'"':"")+' class="'+r.button_class+'" data-func="insert_inline|'+i.type+'" value="'+i.text+'" />'}n+=r.toolbar_group_after,jQuery("."+t+r.plugin_code+"_toolbar").html(n)},window.insert_inline=function(){switch(a){case"Item":if(!o&&!i)return alert(evo_js_lang_alert_before_insert_item),!1;break;case"Comment":if(!o)return alert(evo_js_lang_alert_before_insert_comment),!1;break;case"EmailCampaign":if(!o)return alert(evo_js_lang_alert_before_insert_emailcampaign),!1;break;case"Message":if(!o&&!i)return alert(evo_js_lang_alert_before_insert_message),!1}"undefined"!=typeof tinyMCE&&void 0!==tinyMCE.activeEditor&&tinyMCE.activeEditor?(tinyMCE.execCommand("mceFocus",!1,tinyMCE.activeEditor.id),tinyMCE.execCommand("evo_view_edit_inline",!1,tinyMCE.activeEditor.id)):(openModalWindow('<span class="loader_img loader_user_report absolute_center" title="'+evo_js_lang_loading+'..."></span>',"80%","",!0,evo_js_lang_select_image_insert,"",!0),jQuery.ajax({type:"POST",url:r.insert_inline_url,success:function(e){var t,n;n=null==i?(t=a,o):(t="temporary",i),openModalWindow(e,"90%","80%",!0,"Select image","","","","","",function(){evo_link_refresh_list(t,n,"refresh"),evo_link_fix_wrapper_height()})}}))},window.inline_toolbar(r.toolbar_title,r.prefix)},"undefined"!=typeof evo_init_inlines_toolbar_config){for(var e=Object.values(evo_init_inlines_toolbar_config),t=0;t<e.length;t++)window.evo_init_inlines_toolbar(e[t]);delete e}}),jQuery(document).ready(function(){if(window.evo_init_markdown_toolbar=function(i){window[i.js_prefix+"markdown_btns"]=new Array,window[i.js_prefix+"markdown_open_tags"]=new Array,window.markdown_btn=function(e,t,n,o,i,r,a,s){this.id=e,this.text=t,this.title=n,this.tag_start=o,this.tag_end=i,this.style=r,this.open=a,this.grp_pos=s},i.enable_text_styles&&(window[i.js_prefix+"markdown_btns"][window[i.js_prefix+"markdown_btns"].length]=new markdown_btn(i.js_prefix+"mrkdwn_bold","bold",i.btn_title_bold,"**","**","font-weight:bold"),window[i.js_prefix+"markdown_btns"][window[i.js_prefix+"markdown_btns"].length]=new markdown_btn(i.js_prefix+"mrkdwn_italic","italic",i.btn_title_italic,"*","*","font-style:italic",-1,"last")),i.enable_links&&(window[i.js_prefix+"markdown_btns"][window[i.js_prefix+"markdown_btns"].length]=new markdown_btn(i.js_prefix+"mrkdwn_link","link",i.btn_title_link,"","","text-decoration:underline",-1,i.enable_images?void 0:"last")),i.enable_images&&(window[i.js_prefix+"markdown_btns"][window[i.js_prefix+"markdown_btns"].length]=new markdown_btn(i.js_prefix+"mrkdwn_img","img",i.btn_title_image,"","","",-1,"last")),window[i.js_prefix+"markdown_btns"][window[i.js_prefix+"markdown_btns"].length]=new markdown_btn(i.js_prefix+"mrkdwn_h1","H1",i.btn_title_h1,"\n# ","","",-1),window[i.js_prefix+"markdown_btns"][window[i.js_prefix+"markdown_btns"].length]=new markdown_btn(i.js_prefix+"mrkdwn_h2","H2",i.btn_title_h2,"\n## ","","",-1),window[i.js_prefix+"markdown_btns"][window[i.js_prefix+"markdown_btns"].length]=new markdown_btn(i.js_prefix+"mrkdwn_h3","H3",i.btn_title_h3,"\n### ","","",-1),window[i.js_prefix+"markdown_btns"][window[i.js_prefix+"markdown_btns"].length]=new markdown_btn(i.js_prefix+"mrkdwn_h4","H4",i.btn_title_h4,"\n#### ","","",-1),window[i.js_prefix+"markdown_btns"][window[i.js_prefix+"markdown_btns"].length]=new markdown_btn(i.js_prefix+"mrkdwn_h5","H5",i.btn_title_h5,"\n##### ","","",-1),window[i.js_prefix+"markdown_btns"][window[i.js_prefix+"markdown_btns"].length]=new markdown_btn(i.js_prefix+"mrkdwn_h6","H6",i.btn_title_h6,"\n###### ","","",-1,"last"),window[i.js_prefix+"markdown_btns"][window[i.js_prefix+"markdown_btns"].length]=new markdown_btn(i.js_prefix+"mrkdwn_li","li",i.btn_title_li,"\n* ","","",-1),window[i.js_prefix+"markdown_btns"][window[i.js_prefix+"markdown_btns"].length]=new markdown_btn(i.js_prefix+"mrkdwn_ol","ol",i.btn_title_ol,"\n1. ","","",-1),window[i.js_prefix+"markdown_btns"][window[i.js_prefix+"markdown_btns"].length]=new markdown_btn(i.js_prefix+"mrkdwn_blockquote","blockquote",i.btn_title_blockquote,"\n> ","","",-1,"last"),window[i.js_prefix+"markdown_btns"][window[i.js_prefix+"markdown_btns"].length]=new markdown_btn(i.js_prefix+"mrkdwn_codespan","codespan",i.btn_title_codespan,"`","`","",-1),window[i.js_prefix+"markdown_btns"][window[i.js_prefix+"markdown_btns"].length]=new markdown_btn(i.js_prefix+"mrkdwn_preblock","preblock",i.btn_title_preblock,"\n\t","","",-1,"last"),window[i.js_prefix+"markdown_btns"][window[i.js_prefix+"markdown_btns"].length]=new markdown_btn(i.js_prefix+"mrkdwn_codeblock","codeblock",i.btn_title_codeblock,"\n```\n","\n```\n","",-1,"last"),window[i.js_prefix+"markdown_btns"][window[i.js_prefix+"markdown_btns"].length]=new markdown_btn(i.js_prefix+"mrkdwn_hr","hr",i.btn_title_hr,"\n---\n","","",-1),window[i.js_prefix+"markdown_btns"][window[i.js_prefix+"markdown_btns"].length]=new markdown_btn(i.js_prefix+"mrkdwn_br","<br>",i.btn_title_br," \n","","",-1),window[i.js_prefix+"markdown_get_btn"]=function(e,t){var n="";return e.id==window[i.js_prefix+"mrkdwn_img"]?n+='<input type="button" id="'+e.id+'" accesskey="'+e.access+'" title="'+e.title+'" style="'+e.style+'" class="'+i.toolbar_button_class+'" data-func="'+i.js_prefix+"markdown_insert_lnkimg|"+i.js_prefix+'b2evoCanvas|img" value="'+e.text+'" />':e.id==i.js_prefix+"mrkdwn_link"?n+='<input type="button" id="'+e.id+'" accesskey="'+e.access+'" title="'+e.title+'" style="'+e.style+'" class="'+i.toolbar_button_class+'" data-func="'+i.js_prefix+"markdown_insert_lnkimg|"+i.js_prefix+'b2evoCanvas" value="'+e.text+'" />':n+='<input type="button" id="'+e.id+'" accesskey="'+e.access+'" title="'+e.title+'" style="'+e.style+'" class="'+i.toolbar_button_class+'" data-func="'+i.js_prefix+"markdown_insert_tag|"+i.js_prefix+"b2evoCanvas|"+t+'" value="'+e.text+'" />',n},window[i.js_prefix+"markdown_add_tag"]=function(e){""!=window[i.js_prefix+"markdown_btns"][e].tag_end&&(window[i.js_prefix+"markdown_open_tags"][window[i.js_prefix+"markdown_open_tags"].length]=e,document.getElementById(window[i.js_prefix+"markdown_btns"][e].id).value="/"+document.getElementById(window[i.js_prefix+"markdown_btns"][e].id).value)},window[i.js_prefix+"markdown_remove_tag"]=function(e){for(n=0;n<window[i.js_prefix+"markdown_open_tags"].length;n++)window[i.js_prefix+"markdown_open_tags"][n]==e&&(window[i.js_prefix+"markdown_open_tags"].splice(n,1),document.getElementById(window[i.js_prefix+"markdown_btns"][e].id).value=document.getElementById(window[i.js_prefix+"markdown_btns"][e].id).value.replace("/",""))},window[i.js_prefix+"markdown_check_open_tags"]=function(e){var t=0;for(n=0;n<window[i.js_prefix+"markdown_open_tags"].length;n++)window[i.js_prefix+"markdown_open_tags"][n]==e&&t++;return 0<t},window[i.js_prefix+"markdown_close_all_tags"]=function(){for(var e=window[i.js_prefix+"markdown_open_tags"].length,t=0;t<e;t++)window[i.js_prefix+"markdown_insert_tag"](window[i.js_prefix+"b2evoCanvas"],window[i.js_prefix+"markdown_open_tags"][window[i.js_prefix+"markdown_open_tags"].length-1])},window[i.js_prefix+"markdown_toolbar"]=function(e){for(var t=i.toolbar_title_before+e+i.toolbar_title_after+i.toolbar_group_before,n=0;n<window[i.js_prefix+"markdown_btns"].length;n++)t+=window[i.js_prefix+"markdown_get_btn"](window[i.js_prefix+"markdown_btns"][n],n),"last"==window[i.js_prefix+"markdown_btns"][n].grp_pos&&0<n&&n<window[i.js_prefix+"markdown_btns"].length-1&&(t+=i.toolbar_group_after+i.toolbar_group_before);t+=i.toolbar_group_after+i.toolbar_group_before+'<input type="button" id="'+i.js_prefix+'mrkdwn_close" class="'+i.toolbar_button_class+'" data-func="'+i.js_prefix+'markdown_close_all_tags" title="'+i.btn_title_close_all_tags+'" value="X" />'+i.toolbar_group_after,jQuery("."+i.js_prefix+i.plugin_code+"_toolbar").html(t)},window[i.js_prefix+"markdown_insert_tag"]=function(e,t){var n=b2evo_Callbacks.trigger_callback("get_selected_text_for_"+e.id),o=!1;null==n&&(document.selection?(e.focus(),n=document.selection.createRange().text,o=!0):!e.selectionStart&&"0"!=e.selectionStart||(n=e.selectionStart!=e.selectionEnd)),n?textarea_wrap_selection(e,window[i.js_prefix+"markdown_btns"][t].tag_start,window[i.js_prefix+"markdown_btns"][t].tag_end,0):window[i.js_prefix+"markdown_check_open_tags"](t)&&""!=window[i.js_prefix+"markdown_btns"][t].tag_end?(textarea_wrap_selection(e,"",window[i.js_prefix+"markdown_btns"][t].tag_end,0),window[i.js_prefix+"markdown_remove_tag"](t)):(textarea_wrap_selection(e,window[i.js_prefix+"markdown_btns"][t].tag_start,"",0),window[i.js_prefix+"markdown_add_tag"](t)),o&&e.focus()},window[i.js_prefix+"markdown_insert_lnkimg"]=function(e,t){var n=prompt(i.prompt_url+":","http://");if(n){n="["+prompt(i.prompt_text+":","")+"]("+n;var o=prompt(i.prompt_title+":","");""!=o&&(n+=' "'+o+'"'),n+=")",void 0!==t&&"img"==t&&(n="!"+n),textarea_wrap_selection(e,n,"",1)}},window[i.js_prefix+"markdown_toolbar"](i.toolbar_title+": ")},"undefined"!=typeof evo_init_markdown_toolbar_config){for(var e=Object.values(evo_init_markdown_toolbar_config),n=0;n<e.length;n++)window.evo_init_markdown_toolbar(e[n]);delete e}}),jQuery(document).ready(function(){if(window.evo_init_polls_toolbar=function(o){window.polls_toolbar=function(e,t){var n=o.toolbar_title_before+e+o.toolbar_title_after+o.toolbar_group_before+'<input type="button" title="'+o.button_title+'" class="'+o.button_class+'" data-func="polls_load_window|'+t+'" value="'+o.button_value+'" />'+o.toolbar_group_after;jQuery("."+t+o.plugin_code+"_toolbar").html(n)},window.polls_load_window=function(e){return openModalWindow('<div id="poll_wrapper"></div>',"auto","",!0,o.modal_window_title,["Insert Poll"],!0),polls_load_polls(e),!1},window.polls_api_request=function(e,t,n){jQuery.ajax({url:restapi_url+e}).then(n,function(e){polls_api_print_error(t,e)})},window.polls_api_print_error=function(e,t){if("string"!=typeof t&&void 0===t.code&&(t=void 0===t.responseJSON?t.statusText:t.responseJSON),void 0===t.code)var n='<h4 class="text-danger">Unknown error: '+t+"</h4>";else n='<h4 class="text-danger">'+t.message+"</h4>",o.debug&&(n+="<div><b>Code:</b> "+t.code+"</div><div><b>Status:</b> "+t.data.status+"</div>");jQuery(e).html(n)},window.polls_load_polls=function(i){i=i||"",polls_api_request("polls","#poll_wrapper",function(e){var t='<div id="'+i+'polls_list">';for(var n in t+="<ul>",e.polls){var o=e.polls[n];t+='<li><a href="#" data-poll-id="'+o.pqst_ID+'" data-prefix="'+i+'">'+o.pqst_question_text+"</a></li>"}t+="</ul>",t+="</div>",jQuery("#poll_wrapper").html(t),jQuery(document).on("click","#"+i+"polls_list a[data-poll-id]",function(){"undefined"!=typeof tinyMCE&&void 0!==tinyMCE.activeEditor&&tinyMCE.activeEditor&&tinyMCE.execCommand("mceFocus",!1,tinyMCE.activeEditor.id);var e=jQuery(this).data("prefix")?jQuery(this).data("prefix"):"";return textarea_wrap_selection(window[e+"b2evoCanvas"],"[poll:"+jQuery(this).data("pollId")+"]","",0),closeModalWindow(),!1})})},window.polls_toolbar(o.toolbar_title,o.prefix)},"undefined"!=typeof evo_init_polls_toolbar_config){for(var e=Object.values(evo_init_polls_toolbar_config),t=0;t<e.length;t++)window.evo_init_polls_toolbar(e[t]);delete e}}),jQuery(document).ready(function(){if(window.evo_init_shortcodes_toolbar=function(r){window[r.js_prefix+"shortcodes_buttons"]=new Array,window.shortcodes_button=function(e,t,n,o,i){this.id=e,this.text=t,this.tag=n,this.title=o,this.style=i},window[r.js_prefix+"shortcodes_buttons"][window[r.js_prefix+"shortcodes_buttons"].length]=new shortcodes_button("shortcodes_teaserbreak","[teaserbreak]","[teaserbreak]",r.btn_title_teaserbreak,""),window[r.js_prefix+"shortcodes_buttons"][window[r.js_prefix+"shortcodes_buttons"].length]=new shortcodes_button("shortcodes_pagebreak","[pagebreak]","[pagebreak]",r.btn_title_pagebreak,""),window[r.js_prefix+"shortcodes_toolbar"]=function(e){for(var t=r.toolbar_title_before+e+r.toolbar_title_after+r.toolbar_group_before,n=0,o=window[r.js_prefix+"shortcodes_buttons"].length;n<o;n++){var i=window[r.js_prefix+"shortcodes_buttons"][n];t+='<input type="button" id="'+i.id+'" title="'+i.title+'"'+(void 0!==i.style?' style="'+i.style+'"':"")+' class="'+r.toolbar_button_class+'" data-func="'+r.js_prefix+"shortcodes_insert_tag|"+r.js_prefix+"b2evoCanvas|"+n+'" value="'+i.text+'" />'}t+=r.toolbar_group_after,jQuery("."+r.js_prefix+r.plugin_code+"_toolbar").html(t)},window[r.js_prefix+"shortcodes_insert_tag"]=function(e,t){"undefined"!=typeof tinyMCE&&void 0!==tinyMCE.activeEditor&&tinyMCE.activeEditor&&tinyMCE.execCommand("mceFocus",!1,tinyMCE.activeEditor.id),textarea_wrap_selection(e,window[r.js_prefix+"shortcodes_buttons"][t].tag,"",0)},window[r.js_prefix+"shortcodes_toolbar"](r.toolbar_title+": ")},"undefined"!=typeof evo_init_shortcodes_toolbar_config){for(var e=Object.values(evo_init_shortcodes_toolbar_config),t=0;t<e.length;t++)window.evo_init_shortcodes_toolbar(e[t]);delete e}}),jQuery(document).ready(function(){if("undefined"!=typeof evo_init_widescroll_toolbar_config)for(var e=Object.values(evo_init_widescroll_toolbar_config),t=0;t<e.length;t++){var r=e[t];window[r.js_prefix+"widescroll_buttons"]=new Array,window[r.js_prefix+"widescroll_buttons"][window[r.js_prefix+"widescroll_buttons"].length]=new function(e,t,n,o,i,r){this.id="widescroll",this.text="wide scroll",this.tag_open='<div class="wide_scroll">',this.tag_close="</div>",this.title=i,this.style=""}("widescroll","wide scroll",'<div class="wide_scroll">',"</div>",r.btn_title_teaserbreak,""),window[r.js_prefix+"widescroll_toolbar"]=function(e){for(var t=r.toolbar_title_before+e+r.toolbar_title_after+r.toolbar_group_before,n=0,o=window[r.js_prefix+"widescroll_buttons"].length;n<o;n++){var i=window[r.js_prefix+"widescroll_buttons"][n];t+='<input type="button" id="'+i.id+'" title="'+i.title+'"'+(void 0!==i.style?' style="'+i.style+'"':"")+' class="'+r.toolbar_button_class+'" data-func="'+r.js_prefix+"widescroll_insert_tag|"+r.js_prefix+"b2evoCanvas|"+n+'" value="'+i.text+'" />'}t+=r.toolbar_group_after,jQuery("."+r.js_prefix+r.plugin_code+"_toolbar").html(t)},window[r.js_prefix+"widescroll_insert_tag"]=function(e,t){"undefined"!=typeof tinyMCE&&void 0!==tinyMCE.activeEditor&&tinyMCE.activeEditor&&tinyMCE.execCommand("mceFocus",!1,tinyMCE.activeEditor.id),textarea_wrap_selection(e,window[r.js_prefix+"widescroll_buttons"][t].tag_open,window[r.js_prefix+"widescroll_buttons"][t].tag_close,0)},window[r.js_prefix+"widescroll_toolbar"](r.toolbar_title+": ")}}),jQuery(document).ready(function(){"undefined"!=typeof evo_plugin_videoplug_config&&(jQuery(evo_plugin_videoplug_config.youtube_lazyload_selector).each(function(){var e=jQuery(this),t=new Image;t.src="https://img.youtube.com/vi/"+e.data("embed")+"/sddefault.jpg",t.addEventListener("load",function(){e.append(t)})}),jQuery(evo_plugin_videoplug_config.youtube_lazyload_selector).click(function(){var e=document.createElement("iframe");e.setAttribute("frameborder","0"),e.setAttribute("allowfullscreen",""),e.setAttribute("allow","accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"),e.setAttribute("src","https://www.youtube.com/embed/"+jQuery(this).data("embed")+"?rel=0&showinfo=0&autoplay=1"),jQuery(this).html(e)}))}),jQuery(document).ready(function(){if("undefined"!=typeof evo_init_editable_column_config)for(var keys=Object.keys(evo_init_editable_column_config),i=0;i<keys.length;i++)!function(){var config=evo_init_editable_column_config[keys[i]];0<jQuery(config.column_selector).length&&jQuery(config.column_selector).editable(config.ajax_url,{data:function(value,settings){if(value=ajax_debug_clear(value),"select"==config.field_type){var result=value.match(/rel="([^"]*)"/);return config.options_eval?eval(config.options_eval):config.options instanceof Object?jQuery.extend({},config.options,{selected:result[1]}):config.options}var result=value.match(/>\s*([^<]+)\s*</);return result[1]==config.null_text?"":result[1]},type:config.field_type,class_name:config.field_class,name:config.new_field_name,tooltip:config.tooltip,event:"click",onblur:"text"==config.field_type?"submit":"cancel",onedit:function(e,t){var n=jQuery(t).width();jQuery(t).css({width:n,"max-width":n})},callback:function(settings,original){if(config.colored_cells){jQuery(this).html(ajax_debug_clear(settings));var link=jQuery(this).find("a");jQuery(this).css("background-color","none"==link.attr("color")?"transparent":link.attr("color")),link.removeAttr("color")}else"function"==typeof evoFadeSuccess&&evoFadeSuccess(this);config.callback_code&&eval(config.callback_code)},submitdata:function(value,settings){var return_obj={};return return_obj[config.ID_name]=eval(config.ID_value),return_obj},onerror:function(e,t,n){"function"==typeof evoFadeFailure&&evoFadeFailure(t);var o=jQuery(t).find("input");0<o.length&&(jQuery(t).find("span.field_error").remove(),o.addClass("field_error"),void 0!==n.responseText&&o.after('<span class="note field_error">'+n.responseText+"</span>"))}})}()}),jQuery(document).ready(function(){if("undefined"!=typeof evo_regional_config){window.check_regional_required_fields=function(e){jQuery("#"+e+"_rgn_ID, #"+e+"_subrg_ID, #"+e+"_city_ID").each(function(){void 0!==jQuery(this).attr("required")||!0===jQuery(this).data("required")?(1<jQuery(this).find("option").length?jQuery(this).attr("required","required"):jQuery(this).removeAttr("required"),jQuery(this).data("required",!0)):jQuery(this).data("required",!1)})},window.load_regions=function(e,t,n){jQuery("#"+n+"_rgn_ID").next().find("button").hide().next().show(),jQuery.ajax({type:"POST",url:htsrv_url+"anon_async.php",data:"action=get_regions_option_list&page=edit&mode=load_all&ctry_id="+e+"&rgn_id="+t,success:function(e){jQuery("#"+n+"_rgn_ID").next().find("button").show().next().hide();var t=(e=ajax_debug_clear(e)).split("-##-");jQuery("#"+n+"_rgn_ID").html(t[0]),jQuery("#"+n+"_subrg_ID").html(t[1]),jQuery("#"+n+"_city_ID").html(t[2]),window.check_regional_required_fields(n)}})},window.load_subregions=function(e,t,n){jQuery("#"+n+"_subrg_ID").next().find("button").hide().next().show(),jQuery.ajax({type:"POST",url:htsrv_url+"anon_async.php",data:"action=get_subregions_option_list&page=edit&mode=load_all&ctry_id="+e+"&rgn_id="+t,success:function(e){jQuery("#"+n+"_subrg_ID").next().find("button").show().next().hide();var t=(e=ajax_debug_clear(e)).split("-##-");jQuery("#"+n+"_subrg_ID").html(t[0]),jQuery("#"+n+"_city_ID").html(t[1]),window.check_regional_required_fields(n)}})},window.load_cities=function(e,t,n,o){jQuery("#"+o+"_city_ID").next().find("button").hide().next().show(),jQuery.ajax({type:"POST",url:htsrv_url+"anon_async.php",data:"action=get_cities_option_list&page=edit&ctry_id="+e+"&rgn_id="+t+"&subrg_id="+n,success:function(e){jQuery("#"+o+"_city_ID").html(ajax_debug_clear(e)),jQuery("#"+o+"_city_ID").next().find("button").show().next().hide(),window.check_regional_required_fields()}})};for(var t=Object.values(evo_regional_config),n=0;n<t.length;n++)!function(){var e=t[n];window.check_regional_required_fields(e.prefix),jQuery("#"+e.prefix+"_ctry_ID").change(function(){window.load_regions(jQuery(this).val(),0,e.prefix)}),jQuery("#"+e.prefix+"_rgn_ID").change(function(){window.load_subregions(jQuery("#"+e.prefix+"_ctry_ID").val(),jQuery(this).val(),e.prefix)}),jQuery("#"+e.prefix+"_subrg_ID").change(function(){window.load_cities(jQuery("#"+e.prefix+"_ctry_ID").val(),jQuery("#"+e.prefix+"_rgn_ID").val(),jQuery(this).val(),e.prefix)}),jQuery("#button_refresh_region").click(function(){return window.load_regions(jQuery("#"+e.prefix+"_ctry_ID").val(),0,e.prefix),!1}),jQuery("#button_refresh_subregion").click(function(){return window.load_subregions(jQuery("#"+e.prefix+"_ctry_ID").val(),jQuery("#"+e.prefix+"_rgn_ID").val(),e.prefix),!1}),jQuery("#button_refresh_city").click(function(){return window.load_cities(jQuery("#"+e.prefix+"_ctry_ID").val(),jQuery("#"+e.prefix+"_rgn_ID").val(),jQuery("#"+e.prefix+"_subrg_ID").val(),e.prefix),!1})}()}}),jQuery(function(){jQuery('[data-toggle="tooltip"]').tooltip({html:!0})}),jQuery(document).ready(function(){if("undefined"!=typeof evo_comment_funcs_config){var p=evo_comment_funcs_config,f=new Array,_=new Array,d=p.displayed,t=!1;window.isDefined=function(e){return void 0!==e},window.fadeIn=function(e,t){if(0!=jQuery(e).length){"TR"==jQuery(e).get(0).tagName&&(e+=" td");var n=jQuery(e).css("backgroundColor");return jQuery(e).animate({backgroundColor:t},200),n}},window.fadeInStatus=function(e,t){switch(t){case"published":return fadeIn(e,"#99EE44");case"community":return fadeIn(e,"#2E8BB9");case"protected":return fadeIn(e,"#FF9C2A");case"review":return fadeIn(e,"#CC0099");case"deprecated":return fadeIn(e,"#656565");case"deleted":return fadeIn(e,"#fcc");case"spam":return fadeIn(e,"#ffc9c9");case"notsure":return fadeIn(e,"#bbbbbb");case"ok":return fadeIn(e,"#bcffb5")}},window.delete_comment_url=function(e){var t="#commenturl_"+e;fadeIn(t,"#fcc"),jQuery.ajax({type:"POST",url:htsrv_url+"async.php",data:{blogid:p.blog_ID,commentid:e,action:"delete_comment_url",crumb_comment:p.crumb_comment},success:function(e){jQuery(t).remove()}})},window.show_modified=function(){for(var e in f)fadeInStatus("#"+e,f[e])},window.setCommentStatus=function(e,t,i,n){var r="comment_"+e,a="[id="+r+"]";if(void 0===f[r]){f[r]=t;var s=fadeInStatus(a,t),o=get_show_statuses(),l=get_expiry_status(),_=get_current_page(),d=get_itemid(),c=get_limit(),u={blogid:p.blog_ID,commentid:e,status:t,limit:c,action:"set_comment_status",request_from:i,moderation:"commentlist",statuses:o,expiry_status:l,itemid:d,currentpage:_,redirect_to:n,crumb_comment:p.crumb_comment};p.is_admin_page&&(u.is_backoffice=1),jQuery.ajax({type:"POST",url:htsrv_url+"anon_async.php",data:u,success:function(e){if(delete f[r],"front"==i){fadeIn(a,s);var t=ajax_debug_clear(e).split(":"),n=t[0];if(""==n)return;var o=jQuery(a).attr("class");o=o.replace(/vs_([a-z]+)/g,"vs_"+n),jQuery(a).attr("class",o),update_moderation_buttons(a,t[1],t[2])}else"dashboard"==i||"coll_settings"==i?updateCommentsList(r):(jQuery("#comments_container").html(ajax_debug_clear(e)),jQuery(".vote_spam").show(),show_modifieds())},error:function(e){e&&""!=e.statusText&&evoAlert(e.statusText),fadeIn(a,s),delete f[r]}})}},jQuery(".vote_spam").show(),window.setCommentVote=function(t,n,e){var o="#comment_"+t,i=fadeInStatus(o,e),r="";switch(e){case"spam":r=p.button_class_button_red;break;case"ok":r=p.button_class_button_green}var a={blog:p.blog_ID,commentid:t,type:n,vote:e,action:"set_comment_vote",b2evo_icons_type:p.b2evo_icons_type,crumb_comment:p.crumb_comment};p.is_admin_page&&(a.is_backoffice=1),""!=r&&jQuery("#vote_"+n+"_"+t).find(p.button_class_button).addClass(r),jQuery.ajax({type:"POST",url:htsrv_url+"anon_async.php",data:a,success:function(e){fadeIn(o,i),jQuery("#vote_"+n+"_"+t).after(ajax_debug_clear(e)),jQuery("#vote_"+n+"_"+t).remove()}})},window.edit_comment=function(e,t){var n=jQuery("#editable_comment_"+t);if(0==n.length)return!0;var o="";if("update"==e){var i=n.find("textarea");if(0==i.length)return;o=i.val()}return jQuery.ajax({type:"POST",url:htsrv_url+"async.php",data:{commentid:t,action:"edit_comment",comment_action:e,comment_content:o,crumb_comment:p.crumb_comment},success:function(e){n.html(ajax_debug_clear(e)),window.init_autocomplete_usernames&&init_autocomplete_usernames()}}),!1},window.deleteComment=function(e,n,o){if(void 0===o&&(o="feedback"),"meta"==o&&!confirm(p.delete_confirmation_msg))return!1;var i="comment_"+e,r="#"+i;if(void 0===f[i]){f[i]="deleted";var t=fadeIn(r,"#fcc"),a=get_show_statuses(),s=get_expiry_status(),l=get_itemid(),_=get_current_page(),d=get_limit();if("meta"!=o){var c=jQuery("#recycle_bin");0<c.length&&""==c.html()&&jQuery.ajax({type:"POST",url:htsrv_url+"async.php",data:{action:"get_opentrash_link",blog:p.blog_ID,request_from:n,crumb_comment:p.crumb_comment},success:function(e){c.replaceWith(ajax_debug_clear(e))}})}jQuery.ajax({type:"POST",url:htsrv_url+"async.php",data:{blogid:p.blog_ID,commentid:e,action:"delete_comment",request_from:n,itemid:l,comment_type:o,statuses:a,expiry_status:s,currentpage:_,limit:d,crumb_comment:p.crumb_comment},success:function(e){var t="meta"==o?"#comments":"#recycle_bin";jQuery(r).transfer({to:t,duration:700},function(){delete f[i],"dashboard"==n||"coll_settings"==n?updateCommentsList(i):(jQuery("#comments_container").html(ajax_debug_clear(e)),jQuery(".vote_spam").show(),show_modifieds())})},error:function(e){e&&""!=e.statusText&&evoAlert(e.statusText),""!=t&&fadeIn(r,t),delete f[i]}})}},window.ban_url=function(e){openModalWindow('<span class="loader_img loader_ban_url absolute_center" title="'+p.loading_msg+'"></span><iframe id="modal_window_frame_ban" src="'+p.admin_url+"?ctrl=antispam&action=ban&display_mode=js&mode=iframe&request=checkban&keyword="+e+"&crumb_antispam="+p.crumb_antispam+'" width="100%" height="500px" frameborder="0" style="display:none"></iframe>',"90%","",!0,p.confirm_ban_delete_title,[p.perform_selected_operations_msg,"btn-danger","#antispam_ban"],!0,!1,"modal_window_frame_ban");var t=jQuery(".modal-footer button:submit").not("[data-dismiss=modal]");t.on("click",function(){addSpinner(this)}),jQuery("#modal_window_frame_ban").on("load",function(){t.hasClass("btn-spinner")&&(t.removeClass("btn-spinner"),t.css("width","-=24px"))})},window.refreshAfterBan=function(e){for(var t=String(e).split(","),n=0;n<t.length;++n)fadeIn("#comment_"+t[n],"#fcc");var o=get_itemid();refresh_item_comments(o)},window.closedModalAfterBan=function(){jQuery("#server_messages").html("").append(jQuery("#modal_window_frame_ban").contents().find(".action_messages")),closeModalWindow()},window.processResult=function(e,t){var n=jQuery("<div/>");n.html(e);var o=0;for(var i in _){var r=n.find("#"+_[i]);0!==r.length&&(r.remove(),n.find(".hidden_comment:first").removeClass("hidden_comment"),o+=1)}_.length=0,jQuery("#comments_container").html(n.html());var a=jQuery("#comments_container [id^=comment_]");for(var i in d=a?a.length:0,t)switch(t[i]){case"published":jQuery("#"+i).css("backgroundColor","#339900");break;case"deprecated":jQuery("#"+i).css("backgroundColor","#656565");break;case"deleted":jQuery("#"+i).css("backgroundColor","#fcc")}var s=jQuery("#new_badge").val();if("0"==s)jQuery("#comments_block").effect("blind",{},200),jQuery("#comments_block").remove();else{var l=parseInt(s)-o;jQuery("#badge").text(l)}},window.refreshComments=function(e){t||(t=!0,jQuery.ajax({type:"POST",url:htsrv_url+"async.php",data:{blogid:p.blog_ID,action:"refresh_comments",request_from:e,crumb_comment:p.crumb_comment},success:function(e){processResult(ajax_debug_clear(e),f),jQuery("#comments_container").slideDown("fast"),jQuery(".vote_spam").show(),t=!1},error:function(e){e&&""!=e.statusText&&evoAlert(e.statusText),t=!1}}))},window.startRefreshComments=function(e,t,n,o){"dashboard"==e||"coll_settings"==e?jQuery("#comments_container").slideUp("fast",refreshComments(e)):jQuery("#comments_container").fadeTo("slow",.1,function(){refresh_item_comments(t,n,o)})},window.endRefreshComments=function(e){jQuery("#comments_container").html(e),jQuery("#comments_container").fadeTo("slow",1),jQuery(".vote_spam").show()},window.get_current_page=function(){return isDefined(jQuery("#currentpage"))&&isDefined(jQuery("#currentpage").attr("value"))?jQuery("#currentpage").attr("value"):1},window.get_limit=function(){var e=jQuery("select[name$=_per_page]");return isDefined(e)?e.val():0},window.get_show_statuses=function(){return jQuery("#only_moderation")&&jQuery("#only_moderation").is(":checked")?"#only_moderation#":jQuery("#only_valid")&&jQuery("#only_valid").is(":checked")?"#only_valid#":"#all#"},window.get_expiry_status=function(){var e="active";return jQuery("#show_expiry_all")&&jQuery("#show_expiry_all").prop("checked")&&(e="all"),e},window.get_itemid=function(){var e=jQuery("#comments_container").attr("value");return isDefined(e)||(e=-1),e},window.refresh_item_comments=function(e,t,n){var o=get_show_statuses(),i=get_expiry_status();isDefined(t)||(t=get_current_page()),isDefined(e)||(e=-1),void 0===n&&(n="feedback"),jQuery.ajax({type:"POST",url:htsrv_url+"async.php",data:{blogid:p.blog_ID,action:"refresh_comments",request_from:p.request_from,itemid:e,statuses:o,expiry_status:i,currentpage:t,comment_type:n},success:function(e){endRefreshComments(ajax_debug_clear(e)),show_modifieds()},error:function(e){e&&""!=e.statusText&&evoAlert(e.statusText)}})},window.decrease_comments_number=function(e){var t=parseInt(jQuery("#badge").text());t&&(t-=e,jQuery("#badge").text(t))},window.updateCommentsList=function(e){d-=1,decrease_comments_number(1),jQuery("#"+e).remove(),jQuery(".hidden_comment:first").removeClass("hidden_comment"),t&&_.push(e),jQuery(".dashboard_post:visible").removeClass("dashboard_post_odd dashboard_post_even"),jQuery(".dashboard_post:visible:even").addClass("dashboard_post_even"),jQuery(".dashboard_post:visible:odd").addClass("dashboard_post_odd"),d<6&&refreshComments("dashboard")},window.update_moderation_buttons=function(e,t,n){var o=p.button_class_group+" ";void 0!==e&&(o=e+" "+o),e=o+p.button_class_text,jQuery(e).removeClass("first-child last-child btn_next_status"),jQuery(e+".btn_raise_status_"+t).addClass("btn_next_status"),jQuery(e+".btn_lower_status_"+n).addClass("btn_next_status"),jQuery(e+":visible:first").addClass("first-child"),jQuery(e+":visible:last").addClass("last-child")}}}),jQuery(document).ready(function(){if("undefined"!=typeof evo_user_funcs_config){var n=evo_user_funcs_config;window.userfield_criteria_autocomplete=function(e){if(0<e.find("option:selected[rel=suggest]").length){var n=e.val();e.nextAll("input").first().autocomplete({source:function(e,t){jQuery.getJSON(htsrv_url+"anon_async.php?action=get_user_field_autocomplete",{term:e.term,attr_id:n},t)}})}else e.nextAll("input").first().autocomplete().autocomplete("destroy")},jQuery(document).on("change","select[id^=criteria_type]",function(){window.userfield_criteria_autocomplete(jQuery(this))});for(var e=0;e<jQuery("select[id^=criteria_type]").length;e++)window.userfield_criteria_autocomplete(jQuery("select[id^=criteria_type]:eq("+e+")"));n.can_edit_user_level&&jQuery(".user_level_edit").each(function(){0==jQuery(this).find("a").length&&jQuery(this).removeClass("user_level_edit")}),window.merge_duplicated_users=function(e){var t=jQuery("[name=selected_user_ID]:checked");return 0==t.length?alert(n.msg_select_remaining_account):location.href=jQuery(e).attr("href")+"&selected_user_ID="+t.val(),!1}}}),function(d,l,e){var a,_,c,u,p,f,h,i,m,g,w,y,v,b,s,j,Q,k,x,C,T,I,D,S,E,O,M,A,q,P,t,$,z,o={transition:"elastic",speed:300,width:!1,initialWidth:"600",innerWidth:!1,minWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,minHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,preloading:!0,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",openNewWindowText:"open in new window",open:!1,returnFocus:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:!1,displayVoting:!1,votingUrl:""},H="colorbox",W="cbox",B=W+"Element",L=W+"_closed",F=W+"_purge",R=!d.support.opacity;function r(e,t,n){return n=l.createElement("div"),e&&(n.id=W+e),n.style.cssText=t||"",d(n)}function N(e,t){return Math.round((/%/.test(e)?("x"===t?f.width():f.height())/100:1)*parseInt(e,10))}function V(e){return Q.photo||/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i.test(e)}function U(e){for(e in Q=d.extend({},d.data(E,H)))d.isFunction(Q[e])&&"on"!==e.substring(0,2)&&(Q[e]=Q[e].call(E));Q.rel=Q.rel||E.rel||"nofollow",Q.href=Q.href||d(E).attr("href"),Q.title=Q.title||E.title,"string"==typeof Q.href&&(Q.href=d.trim(Q.href))}function X(e,t){t&&t.call(E),d.event.trigger(e)}function K(e){if(!P){if(E=e,k={},U(),p=d(E),O=0,"nofollow"!==Q.rel&&(p=d("."+B).filter(function(){return(d.data(this,H).rel||this.rel)===Q.rel}),-1===(O=p.index(E))&&(p=p.add(E),O=p.length-1)),!A){if(A=q=!0,_.show(),Q.returnFocus)try{E.blur(),d(E).one(L,function(){try{this.focus()}catch(e){}})}catch(e){}a.css({cursor:Q.overlayClose?"pointer":"auto"}).show(),Q.w=N(Q.initialWidth,"x"),Q.h=N(Q.initialHeight,"y"),z.position(),X("cbox_open",Q.onOpen),j.add(g).hide(),s.html(Q.close).show(),i=W+"Slideshow_",r="click."+W,Q.slideshow&&p[1]?(n=function(){y.text(Q.slideshowStop).one(r,o),_.removeClass(i+"off").addClass(i+"on"),t=setInterval(function(){A&&(Q.loop||O!=p.length-1)||o(),z.next()},Q.slideshowSpeed)},o=function(){clearInterval(t),y.text(Q.slideshowStart).one(r,n),_.removeClass(i+"on").addClass(i+"off")},Q.slideshowAuto?n():o()):_.removeClass(i+"off "+i+"on")}z.load(!0)}var t,n,o,i,r}(z=d.fn[H]=d[H]=function(e,t){var n=this;if(e=e||{},!n[0]){if(n.selector)return n;n=d("<a/>"),e.open=!0}return t&&(e.onComplete=t),n.each(function(){d.data(this,H,d.extend({},d.data(this,H)||o,e)),d(this).addClass(B)}),(d.isFunction(e.open)&&e.open.call(n)||e.open)&&K(n[0]),n}).init=function(){f=d(e),_=r().attr({id:H,class:R?W+"IE":""}),a=r("Overlay").hide(),c=r("Wrapper"),u=r("Content").append(h=r("LoadedContent","width:0; height:0; overflow:hidden"),m=r("LoadingOverlay").add(r("LoadingGraphic")),g=r("Title"),$infoBar=r("InfoBar").append($nav=r("Navigation").append(b=r("Previous"),w=r("Current"),v=r("Next")),$voting=r("Voting"),y=r("Slideshow"),s=r("Close"),$open=r("Open"))),c.append(u),i=r(!1,"position:absolute; width:9999px; visibility:hidden; display:none"),d("body").prepend(a,_.append(c,i)),$voting.data("voting_positions_done",0),previous_title="",u.children().on("mouseenter",function(){d(this).addClass("hover")}).on("mouseleave",function(){d(this).removeClass("hover")}).addClass("hover"),x=u.outerHeight(!0)-u.height(),C=u.outerWidth(!0)-u.width(),I=h.outerHeight(!0),D=h.outerWidth(!0),T=I,S=s.height()+4,_.css({"padding-bottom":x,"padding-right":C}).hide(),v.on("click",function(){z.next()}),b.on("click",function(){z.prev()}),s.on("click",function(){z.close()}),$open.on("click",function(){z.close()}),j=v.add(b).add(w).add(y),u.children().removeClass("hover"),a.on("click",function(){Q.overlayClose&&z.close()}),d(l).bind("keydown."+W,function(e){var t=e.keyCode;A&&Q.escKey&&27===t&&(e.preventDefault(),z.close()),A&&Q.arrowKey&&p[1]&&(37===t?(e.preventDefault(),b.trigger("click")):39===t&&(e.preventDefault(),v.trigger("click")))})},z.remove=function(){_.add(a).remove(),d("."+B).removeData(H).removeClass(B)},z.position=function(e,t){var n=null==k.pw||Q.w>k.pw?Q.w:k.pw,o=null==k.ph||Q.h>k.ph?Q.h:k.ph,i=d("#colorbox .voting_wrapper");parseInt(u.css("border-bottom")),$infoBar.css({minHeight:S+"px"}),I=n<=700&&$voting.is(":visible")?(i.addClass("compact"),2*T-3):(i.removeClass("compact"),T);var r=0,a=0;function s(e){u[0].style.width=e.style.width,m[0].style.height=m[1].style.height=u[0].style.height=e.style.height}f.unbind("resize."+W),_.hide(),Q.fixed?_.css({position:"fixed"}):(r=f.scrollTop(),a=f.scrollLeft(),_.css({position:"absolute"})),!1!==Q.right?a+=Math.max(f.width()-n-D-C-N(Q.right,"x"),0):!1!==Q.left?a+=N(Q.left,"x"):a+=Math.round(Math.max(f.width()-n-D-C,0)/2),!1!==Q.bottom?r+=Math.max(l.documentElement.clientHeight-o-I-x-N(Q.bottom,"y"),0):!1!==Q.top?r+=N(Q.top,"y"):r+=Math.round(Math.max(l.documentElement.clientHeight-o-I-x,0)/2),_.show(),e=_.width()===n+D&&_.height()===o+I?0:e||0,c[0].style.width=c[0].style.height="9999px",_.dequeue().animate({width:n+D,height:o+I,top:r,left:a},{duration:e,complete:function(){s(this),q=!1,c[0].style.width=n+D+C+"px",c[0].style.height=o+I+x+"px",t&&t(),setTimeout(function(){f.bind("resize."+W,z.position)},1),z.resizeVoting(),c.parent().width()<380?y.hide():y.show()},step:function(){s(this)}})},z.resize=function(e){if(A){if((e=e||{}).width&&(Q.w=N(e.width,"x")-D-C),e.innerWidth&&(Q.w=N(e.innerWidth,"x")),h.css({width:Q.w}),e.height&&(Q.h=N(e.height,"y")-I-x),e.innerHeight&&(Q.h=N(e.innerHeight,"y")),!e.innerHeight&&!e.height){var t=h.wrapInner("<div style='overflow:auto'></div>").children();Q.h=t.outerHeight(),t.replaceWith(t.children())}h.css({height:Q.h}),k.pw=Q.w,k.ph=Q.h,z.position("none"===Q.transition?0:Q.speed)}},z.prep=function(e){if(A){var t,l="none"===Q.transition?0:Q.speed;h.remove(),(h=r("LoadedContent").append(e)).hide().appendTo(i.show()).css({width:(Q.w=Q.w||h.width(),Q.w=Q.mw&&Q.mw<Q.w?Q.mw:Q.w,Q.w=Q.minWidth&&Q.minWidth>Q.w?Q.minWidth:Q.w,k.pw=null==k.pw||Q.w>k.pw?Q.w:k.pw,k.pw),overflow:Q.scrolling?"auto":"hidden"}).css({height:(Q.h=Q.h||h.height(),Q.h=Q.mh&&Q.mh<Q.h?Q.mh:Q.h,Q.h=Q.minHeight&&Q.minHeight>Q.h?Q.minHeight:Q.h,k.ph=null==k.ph||Q.h>k.ph?Q.h:k.ph,k.ph)}).prependTo(u),i.hide(),d(M).css({float:"none"}),t=function(){var e,t,n,o,i,r,a=p.length;function s(){R&&_[0].style.removeProperty("filter")}A&&(r=function(){clearTimeout($),m.hide(),X("cbox_complete",Q.onComplete)},R&&M&&h.fadeIn(100),g.add(h).show(),1<a?("string"==typeof Q.current&&380<h.width()&&w.html(Q.current.replace("{current}",O+1).replace("{total}",a)).show(),v[Q.loop||O<a-1?"show":"hide"]().html(Q.next),b[Q.loop||O?"show":"hide"]().html(Q.previous),e=O?p[O-1]:p[a-1],n=O<a-1?p[O+1]:p[0],Q.slideshow&&380<h.width()&&y.show(),Q.preloading&&(o=d.data(n,H).href||n.href,t=d.data(e,H).href||e.href,o=d.isFunction(o)?o.call(n):o,t=d.isFunction(t)?t.call(e):t,V(o)&&(d("<img/>")[0].src=o),V(t)&&(d("<img/>")[0].src=t))):j.hide(),Q.iframe?(i=d("<iframe/>").addClass(W+"Iframe")[0],Q.fastIframe?r():d(i).one("load",r),i.name=W+ +new Date,i.src=Q.href,Q.scrolling||(i.scrolling="no"),R&&(i.frameBorder=0,i.allowTransparency="true"),d(i).appendTo(h).one(F,function(){i.src="//about:blank"})):r(),"fade"===Q.transition?_.fadeTo(l,1,s):s())},"fade"===Q.transition?_.fadeTo(l,0,function(){z.position(0,t)}):z.position(l,t)}},z.load=function(e){var t,n,o=z.prep;M=!(q=!0),E=p[O],e||U(),X(F),X("cbox_load",Q.onLoad),previous_title=Q.title,Q.displayVoting&&""!=Q.votingUrl&&""!=E.id?(0==$voting.data("voting_positions_done")&&(0==I&&(I=h.outerHeight(!0)),$voting.data("voting_positions_done",1)),$voting.show(),init_voting_bar($voting,Q.votingUrl,E.id,!0)):""!=$voting.html()&&($voting.html("").hide(),$voting.data("voting_positions_done",0)),Q.h=Q.height?N(Q.height,"y")-I-x:Q.innerHeight&&N(Q.innerHeight,"y"),Q.w=Q.width?N(Q.width,"x")-D-C:Q.innerWidth&&N(Q.innerWidth,"x"),Q.mw=Q.w,Q.mh=Q.h,Q.maxWidth&&(Q.mw=N(Q.maxWidth,"x")-D-C,Q.mw=Q.w&&Q.w<Q.mw?Q.w:Q.mw),Q.maxHeight&&(Q.mh=N(Q.maxHeight,"y")-I-x,Q.mh=Q.h&&Q.h<Q.mh?Q.h:Q.mh),t=Q.href,$=setTimeout(function(){m.show()},100),Q.inline?(r().hide().insertBefore(d(t)[0]).one(F,function(){d(this).replaceWith(h.children())}),o(d(t))):Q.iframe?o(" "):Q.html?o(Q.html):V(t)?(d(M=new Image).addClass(W+"Photo").on("error",function(){Q.title=!1,o(r("Error").text("This image could not be loaded"))}).on("load",function(){var e;M.onload=null,Q.scalePhotos&&(n=function(){M.height-=M.height*e,M.width-=M.width*e},Q.mw&&M.width>Q.mw&&(e=(M.width-Q.mw)/M.width,n()),Q.mh&&M.height>Q.mh&&(e=(M.height-Q.mh)/M.height,n())),Q.h&&(M.style.marginTop=Math.max(Q.h-M.height,0)/2+"px"),jQuery(M).removeClass("zoomin zoomout"),colorbox_is_zoomed=!1;var l=0,_=0,t=M.naturalWidth>1.1*M.width||M.naturalHeight>1.1*M.height;t&&(M.className=M.className+" zoomin"),!t&&p[1]&&(O<p.length-1||Q.loop)&&(M.onclick=function(e){z.next()}),t&&jQuery(M).bind("click dblclick",function(e,t){if(colorbox_is_zoomed)M.className=M.className.replace(/zoomout/,""),M.width=l,M.height=_,jQuery(this).parent().scrollLeft(0).scrollTop(0),jQuery(this).css({position:"relative",top:"0",left:"0"});else{z.resize({width:Q.mw,height:Q.mh+parseInt(h.css("margin-bottom"))});var n=jQuery(this).offset(),o=void 0!==e.pageX?e.pageX:t.originalEvent.touches[0].pageX,i=void 0!==e.pageY?e.pageY:t.originalEvent.touches[0].pageY,r=(o-n.left)/jQuery(this).width(),a=(i-n.top)/jQuery(this).height();M.className=M.className+" zoomout",d(M).css({position:"static",top:0,left:0,transform:"none"}),l=M.width,_=M.height,M.removeAttribute("width"),M.removeAttribute("height");var s=jQuery(this).parent()[0];jQuery(this).parent().scrollLeft(r*(s.scrollWidth-s.clientWidth)).scrollTop(a*(s.scrollHeight-s.clientHeight))}colorbox_is_zoomed=!colorbox_is_zoomed}),R&&(M.style.msInterpolationMode="bicubic"),setTimeout(function(){o(M)},1)}),setTimeout(function(){M.src=t},1)):t&&i.load(t,Q.data,function(e,t,n){o("error"===t?r("Error").text("Request unsuccessful: "+n.statusText):d(this).contents())})},z.next=function(){!q&&p[1]&&(O<p.length-1||Q.loop)&&(O=O<p.length-1?O+1:0,z.load())},z.prev=function(){!q&&p[1]&&(O||Q.loop)&&(O=O?O-1:p.length-1,z.load())},z.close=function(){A&&!P&&(A=!(P=!0),X("cbox_cleanup",Q.onCleanup),f.unbind("."+W),a.fadeTo(200,0),_.stop().fadeTo(300,0,function(){_.add(a).css({opacity:1,cursor:"auto"}).hide(),X(F),h.remove(),setTimeout(function(){P=!1,X(L,Q.onClosed)},1)}))},z.resizeVoting=function(){var e=d("#colorbox .voting_wrapper"),t=c.parent().width();t<=480?w.hide():w.show(),$infoBar.css({minHeight:S+"px"}),I=t<=700&&$voting.is(":visible")?(e.addClass("compact"),2*T-3):(e.removeClass("compact"),T)},z.element=function(){return d(E)},z.settings=o,t=function(e){0!==e.button&&void 0!==e.button||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),K(this))},d(l).on("click","."+B,t),d(z.init)}(jQuery,document,this),jQuery.event.special.dblclick={setup:function(e,t){jQuery(this).bind("touchstart.dblclick",jQuery.event.special.dblclick.handler)},teardown:function(e){jQuery(this).unbind("touchstart.dblclick")},handler:function(e){var t=e.target,n=jQuery(t),o=n.data("lastTouch")||0,i=(new Date).getTime(),r=i-o;20<r&&r<500?(n.data("lastTouch",0),n.trigger("dblclick",e)):n.data("lastTouch",i)}},window.init_voting_bar=function(s,l,e,t){function _(){if("cboxVoting"==s.attr("id")){var e=jQuery("#colorbox").width(),t=s.width();e<t&&jQuery("#colorbox").css({left:jQuery("#colorbox").position().left-Math.round(t-e)/2,width:t})}}if(t&&(s.html('<div class="loading"> </div>'),jQuery.ajax({type:"POST",url:l+"&vote_ID="+e,success:function(e){s.html(ajax_debug_clear(e)),jQuery("a.action_icon",s).data("votingPanel",s),_(),window.votingAdjust()}})),null==jQuery(s).data("initialized")){function n(t,e,n,o){var i=s.find("#voting_action"),r=i.length?i.val():l;0<s.find("#votingID").length&&(r+="&vote_ID="+s.find("#votingID").val()),0<s.find("#widgetID").length&&(r+="&widget_ID="+s.find("#widgetID").val()),0<s.find("#skinID").length&&(r+="&skin_ID="+s.find("#skinID").val());var a=s.css("backgroundColor");jQuery(t).is(":checkbox")?jQuery(t).is(":checked")?(r+="&checked=1",window.votingFadeIn(s,n)):(r+="&checked=0",window.votingFadeIn(s,o)):(jQuery(t).removeAttr("id"),window.votingFadeIn(s,n)),jQuery.ajax({type:"POST",url:r+"&vote_action="+e,success:function(e){jQuery(t).is(":checkbox")||(s.html(ajax_debug_clear(e)),_()),window.votingFadeIn(s,a),window.votingAdjust()}})}s.on("click","a.action_icon",function(){return!1}),s.on("click","#votingLike",function(){n(this,"like","#bcffb5")}),s.on("click","#votingNoopinion",function(){n(this,"noopinion","#bbb")}),s.on("click","#votingDontlike",function(){n(this,"dontlike","#ffc9c9")}),s.on("click","#votingInappropriate",function(){n(this,"inappropriate","#dcc","#bbb")}),s.on("click","#votingSpam",function(){n(this,"spam","#dcc","#bbb")}),jQuery(s).data("initialized",!0)}},window.votingFadeIn=function(e,t){var n="transparent"==t||"rgba(0, 0, 0, 0)"==t;if(n){for(var o=e.parent(),i=t;o&&("transparent"==i||"rgba(0, 0, 0, 0)"==i);)i=o.css("backgroundColor"),o=o.parent();"HTML"!=o[0].tagName&&(t=i)}e.animate({backgroundColor:t},200,function(){n&&e.css("background-color","transparent")})},window.votingAdjust=function(){$prev=jQuery("#cboxPrevious"),$wrap=jQuery("#cboxWrapper"),$voting=jQuery("#cboxVoting"),$prev.width();var e=$("#colorbox .voting_wrapper"),t=($("#colorbox .voting_wrapper > .btn-group"),$("#colorbox .vote_title_panel"),$("#colorbox .vote_others"),$("#colorbox .separator"),$wrap.parent().width());e.removeClass("compact"),t<=700&&e.addClass("compact")},jQuery(document).ready(function(){"undefined"!=typeof evo_init_comment_voting_config&&jQuery("span[id^=vote_helpful_").each(function(){window.init_voting_bar(jQuery(this),evo_init_comment_voting_config.action_url,jQuery(this).find("#votingID").val(),!1)}),"undefined"!=typeof evo_init_item_voting_config&&jQuery("span[id^=vote_item_").each(function(){window.init_voting_bar(jQuery(this),evo_init_item_voting_config.action_url,jQuery(this).find("#votingID").val(),!1)})}),function(e){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}(function(ie){"use strict";var re="left",ae="right",se="up",le="down",_e="none",de="doubletap",ce="longtap",ue="horizontal",pe="vertical",fe="all",he="move",me="end",ge="cancel",we="ontouchstart"in window,ye="TouchSwipe";function o(e,b){var t=we||!b.fallbackToMouseEvents,n=t?"touchstart":"mousedown",o=t?"touchmove":"mousemove",i=t?"touchend":"mouseup",r=t?null:"mouseleave",a="touchcancel",j=0,Q=null,k=0,x=0,C=0,T=1,I=0,D=0,S=null,s=ie(e),E="start",O=0,M=null,l=0,A=0,_=0,d=0,c=0,u=null;try{s.bind(n,p),s.bind(a,m)}catch(e){ie.error("events not supported "+n+","+a+" on jQuery.swipe")}function p(e){if(!0!==s.data(ye+"_intouch")&&!(0<ie(e.target).closest(b.excludedElements,s).length)){var t,n=e.originalEvent?e.originalEvent:e,o=we?n.touches[0]:n;return E="start",we?O=n.touches.length:e.preventDefault(),D=Q=null,T=1,I=C=x=k=j=0,M=function(){for(var e=[],t=0;t<=5;t++)e.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0});return e}(),(i={})[re]=ee(re),i[ae]=ee(ae),i.up=ee(se),i[le]=ee(le),S=i,X(),!we||O===b.fingers||b.fingers===fe||W()?(Y(0,o),l=oe(),2==O&&(Y(1,n.touches[1]),x=C=ne(M[0].start,M[1].start)),(b.swipeStatus||b.pinchStatus)&&(t=P(n,E))):t=!1,!1===t?(P(n,E=ge),t):(J(!0),null)}var i}function f(e){var t,n,o,i,r,a,s,l,_,d,c,u,p,f,h,m,g=e.originalEvent?e.originalEvent:e;if(E!==me&&E!==ge&&!K()){var w,y=G(we?g.touches[0]:g);if(A=oe(),we&&(O=g.touches.length),E=he,2==O&&(0==x?(Y(1,g.touches[1]),x=C=ne(M[0].start,M[1].start)):(G(g.touches[1]),C=ne(M[0].end,M[1].end),M[0].end,M[1].end,D=T<1?"out":"in"),T=(C/x*1).toFixed(2),I=Math.abs(x-C)),O===b.fingers||b.fingers===fe||!we||W()){if(function(e,t){if(b.allowPageScroll===_e||W())e.preventDefault();else{var n="auto"===b.allowPageScroll;switch(t){case re:(b.swipeLeft&&n||!n&&b.allowPageScroll!=ue)&&e.preventDefault();break;case ae:(b.swipeRight&&n||!n&&b.allowPageScroll!=ue)&&e.preventDefault();break;case se:(b.swipeUp&&n||!n&&b.allowPageScroll!=pe)&&e.preventDefault();break;case le:(b.swipeDown&&n||!n&&b.allowPageScroll!=pe)&&e.preventDefault()}}}(e,(_=y.start,c=y.end,u=(d=_).x-c.x,p=c.y-d.y,f=Math.atan2(p,u),(h=Math.round(180*f/Math.PI))<0&&(h=360-Math.abs(h)),Q=(m=h)<=45&&0<=m?re:m<=360&&315<=m?re:135<=m&&m<=225?ae:45<m&&m<135?le:se)),s=y.start,l=y.end,j=Math.round(Math.sqrt(Math.pow(l.x-s.x,2)+Math.pow(l.y-s.y,2))),k=te(),r=Q,a=j,a=Math.max(a,Z(r)),S[r].distance=a,(b.swipeStatus||b.pinchStatus)&&(w=P(g,E)),!b.triggerOnTouchEnd||b.triggerOnTouchLeave){var v=!0;if(b.triggerOnTouchLeave)n={left:(i=(o=ie(o=this)).offset()).left,right:i.left+o.outerWidth(),top:i.top,bottom:i.top+o.outerHeight()},v=(t=y.end).x>n.left&&t.x<n.right&&t.y>n.top&&t.y<n.bottom;!b.triggerOnTouchEnd&&v?E=q(he):b.triggerOnTouchLeave&&!v&&(E=q(me)),E!=ge&&E!=me||P(g,E)}}else P(g,E=ge);!1===w&&P(g,E=ge)}}function h(e){var t=e.originalEvent;return we&&0<t.touches.length?(_=oe(),d=event.touches.length+1,!0):(K()&&(O=d),e.preventDefault(),A=oe(),k=te(),$()?P(t,E=ge):b.triggerOnTouchEnd||0==b.triggerOnTouchEnd&&E===he?P(t,E=me):!b.triggerOnTouchEnd&&N()?y(t,E=me,"tap"):E===he&&P(t,E=ge),J(!1),null)}function m(){C=x=l=A=O=0,T=1,X(),J(!1)}function g(e){var t=e.originalEvent;b.triggerOnTouchLeave&&P(t,E=q(me))}function w(){s.unbind(n,p),s.unbind(a,m),s.unbind(o,f),s.unbind(i,h),r&&s.unbind(r,g),J(!1)}function q(e){var t=e,n=z(),o=v(),i=$();return!n||i?t=ge:!o||e!=he||b.triggerOnTouchEnd&&!b.triggerOnTouchLeave?!o&&e==me&&b.triggerOnTouchLeave&&(t=ge):t=me,t}function P(e,t){var n=void 0;return B()&&L()||L()?n=y(e,t,"swipe"):(H()&&W()||W())&&!1!==n&&(n=y(e,t,"pinch")),U()&&V()&&!1!==n?n=y(e,t,de):k>b.longTapThreshold&&j<10&&b.longTap&&!1!==n?n=y(e,t,ce):1!==O&&we||!isNaN(j)&&0!==j||!N()||!1===n||(n=y(e,t,"tap")),t===ge&&m(),t===me&&(we?0==e.touches.length&&m():m()),n}function y(e,t,n){var o=void 0;if("swipe"==n){if(s.trigger("swipeStatus",[t,Q||null,j||0,k||0,O]),b.swipeStatus&&!1===(o=b.swipeStatus.call(s,e,t,Q||null,j||0,k||0,O)))return!1;if(t==me&&B()){if(s.trigger("swipe",[Q,j,k,O]),b.swipe&&!1===(o=b.swipe.call(s,e,Q,j,k,O)))return!1;switch(Q){case re:s.trigger("swipeLeft",[Q,j,k,O]),b.swipeLeft&&(o=b.swipeLeft.call(s,e,Q,j,k,O));break;case ae:s.trigger("swipeRight",[Q,j,k,O]),b.swipeRight&&(o=b.swipeRight.call(s,e,Q,j,k,O));break;case se:s.trigger("swipeUp",[Q,j,k,O]),b.swipeUp&&(o=b.swipeUp.call(s,e,Q,j,k,O));break;case le:s.trigger("swipeDown",[Q,j,k,O]),b.swipeDown&&(o=b.swipeDown.call(s,e,Q,j,k,O))}}}if("pinch"==n){if(s.trigger("pinchStatus",[t,D||null,I||0,k||0,O,T]),b.pinchStatus&&!1===(o=b.pinchStatus.call(s,e,t,D||null,I||0,k||0,O,T)))return!1;if(t==me&&H())switch(D){case"in":s.trigger("pinchIn",[D||null,I||0,k||0,O,T]),b.pinchIn&&(o=b.pinchIn.call(s,e,D||null,I||0,k||0,O,T));break;case"out":s.trigger("pinchOut",[D||null,I||0,k||0,O,T]),b.pinchOut&&(o=b.pinchOut.call(s,e,D||null,I||0,k||0,O,T))}}return"tap"==n?t!==ge&&t!==me||(clearTimeout(u),V()&&!U()?(c=oe(),u=setTimeout(ie.proxy(function(){c=null,s.trigger("tap",[e.target]),b.tap&&(o=b.tap.call(s,e,e.target))},this),b.doubleTapThreshold)):(c=null,s.trigger("tap",[e.target]),b.tap&&(o=b.tap.call(s,e,e.target)))):n==de?t!==ge&&t!==me||(clearTimeout(u),c=null,s.trigger("doubletap",[e.target]),b.doubleTap&&(o=b.doubleTap.call(s,e,e.target))):n==ce&&(t!==ge&&t!==me||(clearTimeout(u),c=null,s.trigger("longtap",[e.target]),b.longTap&&(o=b.longTap.call(s,e,e.target)))),o}function v(){var e=!0;return null!==b.threshold&&(e=j>=b.threshold),e}function $(){var e=!1;return null!==b.cancelThreshold&&null!==Q&&(e=Z(Q)-j>=b.cancelThreshold),e}function z(){return!(b.maxTimeThreshold&&k>=b.maxTimeThreshold)}function H(){var e=F(),t=R(),n=null===b.pinchThreshold||I>=b.pinchThreshold;return e&&t&&n}function W(){return!!(b.pinchStatus||b.pinchIn||b.pinchOut)}function B(){var e=z(),t=v(),n=F(),o=R();return!$()&&o&&n&&t&&e}function L(){return!!(b.swipe||b.swipeStatus||b.swipeLeft||b.swipeRight||b.swipeUp||b.swipeDown)}function F(){return O===b.fingers||b.fingers===fe||!we}function R(){return 0!==M[0].end.x}function N(){return!!b.tap}function V(){return!!b.doubleTap}function U(){if(null==c)return!1;var e=oe();return V()&&e-c<=b.doubleTapThreshold}function X(){d=_=0}function K(){var e=!1;return _&&oe()-_<=b.fingerReleaseThreshold&&(e=!0),e}function J(e){!0===e?(s.bind(o,f),s.bind(i,h),r&&s.bind(r,g)):(s.unbind(o,f,!1),s.unbind(i,h,!1),r&&s.unbind(r,g,!1)),s.data(ye+"_intouch",!0===e)}function Y(e,t){var n=void 0!==t.identifier?t.identifier:0;return M[e].identifier=n,M[e].start.x=M[e].end.x=t.pageX||t.clientX,M[e].start.y=M[e].end.y=t.pageY||t.clientY,M[e]}function G(e){var t=function(e){for(var t=0;t<M.length;t++)if(M[t].identifier==e)return M[t]}(void 0!==e.identifier?e.identifier:0);return t.end.x=e.pageX||e.clientX,t.end.y=e.pageY||e.clientY,t}function Z(e){if(S[e])return S[e].distance}function ee(e){return{direction:e,distance:0}}function te(){return A-l}function ne(e,t){var n=Math.abs(e.x-t.x),o=Math.abs(e.y-t.y);return Math.round(Math.sqrt(n*n+o*o))}function oe(){return(new Date).getTime()}this.enable=function(){return s.bind(n,p),s.bind(a,m),s},this.disable=function(){return w(),s},this.destroy=function(){return w(),s.data(ye,null),s},this.option=function(e,t){if(void 0!==b[e]){if(void 0===t)return b[e];b[e]=t}else ie.error("Option "+e+" does not exist on jQuery.swipe.options");return null}}ie.fn.swipe=function(e){var t=ie(this),n=t.data(ye);if(n&&"string"==typeof e){if(n[e])return n[e].apply(this,Array.prototype.slice.call(arguments,1));ie.error("Method "+e+" does not exist on jQuery.swipe")}else if(!(n||"object"!=typeof e&&e))return function(n){return!n||void 0!==n.allowPageScroll||void 0===n.swipe&&void 0===n.swipeStatus||(n.allowPageScroll=_e),void 0!==n.click&&void 0===n.tap&&(n.tap=n.click),n=n||{},n=ie.extend({},ie.fn.swipe.defaults,n),this.each(function(){var e=ie(this),t=e.data(ye);t||(t=new o(this,n),e.data(ye,t))})}.apply(this,arguments);return t},ie.fn.swipe.defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"label, button, input, select, textarea, a, .noSwipe"},ie.fn.swipe.phases={PHASE_START:"start",PHASE_MOVE:he,PHASE_END:me,PHASE_CANCEL:ge},ie.fn.swipe.directions={LEFT:re,RIGHT:ae,UP:se,DOWN:le,IN:"in",OUT:"out"},ie.fn.swipe.pageScroll={NONE:_e,HORIZONTAL:ue,VERTICAL:pe,AUTO:"auto"},ie.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:fe}});var b2evo_colorbox_params={maxWidth:480<jQuery(window).width()?"95%":"100%",maxHeight:480<jQuery(window).height()?"90%":"100%",slideshow:!0,slideshowAuto:!1};function init_colorbox(e){if("object"==typeof e&&0!=e.length){var t=e.attr("rel").match(/lightbox\[([a-z]+)/i);switch(t=t?t[1]:""){case"p":e.colorbox(b2evo_colorbox_params_post);break;case"c":e.colorbox(b2evo_colorbox_params_cmnt);break;case"user":e.colorbox(b2evo_colorbox_params_user);break;default:e.colorbox(b2evo_colorbox_params)}}}jQuery(document).ready(function(){"undefined"!=typeof b2evo_colorbox_params_post&&"undefined"!=typeof b2evo_colorbox_params_cmnt&&"undefined"!=typeof b2evo_colorbox_params_user&&"undefined"!=typeof b2evo_colorbox_params_other&&(b2evo_colorbox_params_post=jQuery.extend({},b2evo_colorbox_params,b2evo_colorbox_params_post),b2evo_colorbox_params_cmnt=jQuery.extend({},b2evo_colorbox_params,b2evo_colorbox_params_cmnt),b2evo_colorbox_params_user=jQuery.extend({},b2evo_colorbox_params,b2evo_colorbox_params_user),b2evo_colorbox_params=jQuery.extend({},b2evo_colorbox_params,b2evo_colorbox_params_other),jQuery('a[rel^="lightbox"]').each(function(){init_colorbox(jQuery(this))}),jQuery("#colorbox").swipe({swipeLeft:function(e,t,n,o,i){"undefined"!=typeof colorbox_is_zoomed&&colorbox_is_zoomed||jQuery.colorbox.next()},swipeRight:function(e,t,n,o,i){"undefined"!=typeof colorbox_is_zoomed&&colorbox_is_zoomed||jQuery.colorbox.prev()}}),jQuery(document).on("click","#colorbox img.cboxPhoto",function(){jQuery(this).hasClass("zoomout")?jQuery("#colorbox").swipe("disable"):jQuery("#colorbox").swipe("enable")}))});var modal_window_js_initialized=!1;function openModalWindow(e,t,n,o,i,r,a,s,l,_,d){var c=void 0===t||"auto"==t?"":"width:"+t+";",u=void 0===n||0==n||""==n?"":"height:"+n,p=u.match(/%$/i)?" evo_modal_window__percent_height":"",f=void 0===r||!1!==r,h="form";if(void 0!==r&&""!=r)if("object"==typeof r){var m=r[0],g=r[1];h=void 0===r[2]?"form":r[2]}else m=r,g="btn-primary";if(void 0!==a&&a&&jQuery("#modal_window").remove(),0==jQuery("#modal_window").length){var w='<div id="modal_window" class="modal fade'+p+'" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog" style="'+c+u+'"><div class="modal-content">';if(void 0!==i&&""!=i&&(w+='<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h4 class="modal-title">'+i+"</h4></div>"),w+='<div class="modal-body">'+e,l){jQuery("#"+l);w+="<script>jQuery( document ).ready( function() {var iframe = jQuery( '#"+l+"' );iframe.on( 'load', function() {iframe.closest( '.modal-body' ).find( 'span.loader_img' ).remove();setModalIFrameUnload( '"+l+"' );});});<\/script>"}w+="</div>",f&&(w+='<div class="modal-footer">',void 0!==r&&""!=r&&(w+='<button class="btn '+g+'" type="submit" style="display:none">'+m+"</button>"),w+='<button class="btn btn-default" data-dismiss="modal" aria-hidden="true">'+evo_js_lang_close+"</button></div>"),w+="</div></div></div>",jQuery("body").append(w)}else jQuery("#modal_window .modal-body").html(e);void 0!==l?jQuery("#"+l).on("load",function(){prepareModalWindow(jQuery(this).contents(),h,f,s),jQuery("#modal_window .loader_img").remove(),jQuery("#"+l).show()}):prepareModalWindow("#modal_window",h,f,s),"function"==typeof _&&jQuery("#modal_window").on("shown.bs.modal",_);var y={};modal_window_js_initialized&&(y="show"),jQuery("#modal_window").modal(y),c||(jQuery("#modal_window .modal-dialog").css({display:"table",width:"auto"}),jQuery("#modal_window .modal-dialog .modal-content").css({display:"table-cell"})),jQuery("#modal_window").on("hidden.bs.modal",function(){jQuery(this).remove(),"function"==typeof d&&d()}),modal_window_js_initialized=!0}function prepareModalWindow(e,t,n,o){n&&(void 0!==o&&o||(jQuery("legend",e).remove(),jQuery("#close_button",e).remove(),jQuery(".panel, .panel-body",e).removeClass("panel panel-default panel-body")),0==jQuery(t+" input[type=submit]",e).length?jQuery("#modal_window .modal-footer button[type=submit]").hide():(jQuery(t+" input[type=submit]",e).hide(),jQuery("#modal_window .modal-footer button[type=submit]").show()),jQuery(t,e).change(function(){var e=jQuery(this).find("input[type=submit]");0<e.length?(e.hide(),jQuery("#modal_window .modal-footer button[type=submit]").show()):jQuery("#modal_window .modal-footer button[type=submit]").hide()}),jQuery("#modal_window .modal-footer button[type=submit]").off("click"),jQuery("#modal_window .modal-footer button[type=submit]").on("click",function(){1!==jQuery(this).data("click_init")&&(jQuery(t+" input[type=submit]",e).click(),jQuery(this).data("click_init",1))}));var i="";jQuery(t+" a.btn",e).each(function(){i+="<a href="+jQuery(this).attr("href")+'><button type="button" class="'+jQuery(this).attr("class")+'">'+jQuery(this).html()+"</button></a> ",jQuery(this).remove()}),jQuery("#modal_window .modal-footer").prepend(i),0<jQuery(t+" #current_modal_title",e).length&&jQuery("#modal_window .modal-title").html(jQuery(t+" #current_modal_title",e).html())}function closeModalWindow(e,t){return void 0===e&&(e=window.document),"function"==typeof t&&jQuery("#modal_window").on("hidden.bs.modal",t),jQuery("#modal_window",e).modal("hide"),!1}function setModalIFrameUnload(e){var n=jQuery("#"+e);n[0].contentWindow.onunload=function(){var e=n.closest(".modal-body"),t=jQuery('<span class="loader_img absolute_center" title="'+evo_js_lang_loading+'"></span>');jQuery(e).prepend(t)}}function user_crop_avatar(e,t,n){void 0===n&&(n="avatar");var o=750,i=jQuery(window).width(),r=jQuery(window).height(),a=r/i,s=10,l=10;s=320<(i=o<i?o:i<320?320:i)-2*s?10:0,l=320<(r=o<r?o:r<320?320:r)-2*l?10:0;var _=o<i?o:i,d=o<r?o:r;openModalWindow('<span id="spinner" class="loader_img loader_user_report absolute_center" title="'+evo_js_lang_loading+'"></span>',_+"px",d+"px",!0,evo_js_lang_crop_profile_pic,[evo_js_lang_crop,"btn-primary"],!0);var c=jQuery("div.modal-dialog div.modal-body").length?jQuery("div.modal-dialog div.modal-body"):jQuery("#overlay_page"),u=parseInt(c.css("paddingTop")),p=parseInt(c.css("paddingRight")),f=parseInt(c.css("paddingBottom")),h=parseInt(c.css("paddingLeft")),m=(jQuery("div.modal-dialog div.modal-body").length?parseInt(c.css("min-height")):d-100)-(u+f),g={user_ID:e,file_ID:t,aspect_ratio:a,content_width:_-(h+p),content_height:m,display_mode:"js",crumb_user:evo_js_crumb_user};return evo_js_is_backoffice?(g.ctrl="user",g.user_tab="crop",g.user_tab_from=n):(g.blog=evo_js_blog,g.disp="avatar",g.action="crop"),jQuery.ajax({type:"POST",url:evo_js_user_crop_ajax_url,data:g,success:function(e){openModalWindow(e,_+"px",d+"px",!0,evo_js_lang_crop_profile_pic,[evo_js_lang_crop,"btn-primary"])}}),!1}function user_report(e,t){openModalWindow('<span class="loader_img loader_user_report absolute_center" title="'+evo_js_lang_loading+'"></span>',"auto","",!0,evo_js_lang_report_user,[evo_js_lang_report_this_user_now,"btn-danger"],!0);var n={action:"get_user_report_form",user_ID:e,crumb_user:evo_js_crumb_user};return evo_js_is_backoffice?(n.is_backoffice=1,n.user_tab=t):n.blog=evo_js_blog,jQuery.ajax({type:"POST",url:evo_js_user_report_ajax_url,data:n,success:function(e){openModalWindow(e,"auto","",!0,evo_js_lang_report_user,[evo_js_lang_report_this_user_now,"btn-danger"])}}),!1}function user_contact_groups(e){return openModalWindow('<span class="loader_img loader_user_report absolute_center" title="'+evo_js_lang_loading+'"></span>',"auto","",!0,evo_js_lang_contact_groups,evo_js_lang_save,!0),jQuery.ajax({type:"POST",url:evo_js_user_contact_groups_ajax_url,data:{action:"get_user_contact_form",blog:evo_js_blog,user_ID:e,crumb_user:evo_js_crumb_user},success:function(e){openModalWindow(e,"auto","",!0,evo_js_lang_contact_groups,evo_js_lang_save)}}),!1}function evo_rest_api_request(url,params_func,func_method,method){var params=params_func,func=func_method;"function"==typeof params_func&&(func=params_func,params={},method=func_method),void 0===method&&(method="GET"),jQuery.ajax({contentType:"application/json; charset=utf-8",type:method,url:restapi_url+url,data:params}).then(function(data,textStatus,jqXHR){"object"==typeof jqXHR.responseJSON&&eval(func)(data,textStatus,jqXHR)})}function evo_rest_api_print_error(e,t,n){if("string"!=typeof t&&void 0===t.code&&(t=void 0===t.responseJSON?t.statusText:t.responseJSON),void 0===t.code)var o='<h4 class="text-danger">Unknown error: '+t+"</h4>";else{o='<h4 class="text-danger">'+t.message+"</h4>";n&&(o+="<div><b>Code:</b> "+t.code+"</div><div><b>Status:</b> "+t.data.status+"</div>")}evo_rest_api_end_loading(e,o)}function evo_rest_api_start_loading(e){jQuery(e).addClass("evo_rest_api_loading").append('<div class="evo_rest_api_loader">loading...</div>')}function evo_rest_api_end_loading(e,t){jQuery(e).removeClass("evo_rest_api_loading").html(t).find(".evo_rest_api_loader").remove()}function evo_link_initialize_fieldset(n){if(0<jQuery("#"+n+"attachments_fieldset_table").length){var e=jQuery("#"+n+"attachments_fieldset_table").height();e=320<e?320:e<97?97:e,jQuery("#"+n+"attachments_fieldset_wrapper").height(e),jQuery("#"+n+"attachments_fieldset_wrapper").resizable({minHeight:80,handles:"s",zIndex:0,resize:function(e,t){jQuery("#"+n+"attachments_fieldset_wrapper").resizable("option","maxHeight",jQuery("#"+n+"attachments_fieldset_table").height()),evo_link_update_overlay(n)}}),jQuery(document).on("click","#"+n+"attachments_fieldset_wrapper .ui-resizable-handle",function(){var e=jQuery("#"+n+"attachments_fieldset_table").height(),t=jQuery("#"+n+"attachments_fieldset_wrapper").height()+80;jQuery("#"+n+"attachments_fieldset_wrapper").css("height",e<t?e:t),evo_link_update_overlay(n)})}}function evo_link_update_overlay(e){jQuery("#"+e+"attachments_fieldset_overlay").length&&jQuery("#"+e+"attachments_fieldset_overlay").css("height",jQuery("#"+e+"attachments_fieldset_wrapper").closest(".panel").height())}function evo_link_fix_wrapper_height(e){var t=void 0===e?"":e,n=jQuery("#"+t+"attachments_fieldset_table").height();jQuery("#"+t+"attachments_fieldset_wrapper").height()!=n&&jQuery("#"+t+"attachments_fieldset_wrapper").height(jQuery("#"+t+"attachments_fieldset_table").height())}function evo_link_change_position(n,e,t){var o=n,i=n.value,r=n.id.substr(17);return jQuery.get(e+"anon_async.php?action=set_object_link_position&link_ID="+r+"&link_position="+i+"&crumb_link="+t,{},function(e,t){"OK"==(e=ajax_debug_clear(e))?(evoFadeSuccess(jQuery(o).closest("tr")),jQuery(o).closest("td").removeClass("error"),"cover"!=i&&"background"!=i||jQuery("select[name=link_position][id!="+n.id+"] option[value=cover]:selected").each(function(){jQuery(this).parent().val("aftermore"),evoFadeSuccess(jQuery(this).closest("tr"))})):(jQuery(o).val(e),evoFadeFailure(jQuery(o).closest("tr")),jQuery(o.form).closest("td").addClass("error"))}),!1}function evo_link_insert_inline(e,t,n,o,i,r){if(null==o&&(o=0),void 0!==r){var a="["+e+":"+t;n.length&&(a+=":"+n),a+="]",void 0!==i&&!1!==i&&(a+=i+"[/"+e+"]");var s=jQuery("#display_position_"+t);0!=s.length&&"inline"!=s.val()?(deferInlineReminder=!0,evo_rest_api_request("links/"+t+"/position/inline",function(e){s.val("inline"),evoFadeSuccess(s.closest("tr")),s.closest("td").removeClass("error"),textarea_wrap_selection(r,a,"",o,window.document)},"POST"),deferInlineReminder=!1):textarea_wrap_selection(r,a,"",o,window.document)}}function evo_link_delete(o,i,r,e){return evo_rest_api_request("links/"+r,{action:e},function(e){if("item"==i||"comment"==i||"emailcampaign"==i||"message"==i){var t=window.b2evoCanvas;if(null!=t){var n=new RegExp("\\[(image|file|inline|video|audio|thumbnail):"+r+":?[^\\]]*\\]","ig");textarea_str_replace(t,n,"",window.document)}}jQuery(o).closest("tr").remove(),evo_link_fix_wrapper_height()},"DELETE"),!1}function evo_link_change_order(l,e,_){return evo_rest_api_request("links/"+e+"/"+_,function(e){var t=jQuery(l).closest("tr"),n=t.find("span[data-order]");if("move_up"==_){var o=n.attr("data-order"),i=jQuery(t.prev()).find("span[data-order]"),r=i.attr("data-order");t.prev().before(t),n.attr("data-order",r),i.attr("data-order",o)}else{o=n.attr("data-order");var a=jQuery(t.next()).find("span[data-order]"),s=a.attr("data-order");t.next().after(t),n.attr("data-order",s),a.attr("data-order",o)}evoFadeSuccess(t)},"POST"),!1}function evo_link_attach(e,t,n,o,i){return evo_rest_api_request("links",{action:"attach",type:e,object_ID:t,root:n,path:o},function(e){void 0===i&&(i="");var t=jQuery("#"+i+"attachments_fieldset_table .results table",window.parent.document),n=jQuery(e.list_content);t.replaceWith(jQuery("table",n)).promise().done(function(e){setTimeout(function(){window.parent.evo_link_fix_wrapper_height()},10)})}),!1}function evo_link_ajax_loading_overlay(e){var t=jQuery("#"+(void 0===e?"":e)+"attachments_fieldset_table"),n=!1;return 0==t.find(".results_ajax_loading").length&&(n=jQuery('<div class="results_ajax_loading"><div> </div></div>'),t.css("position","relative"),n.css({width:t.width(),height:t.height()}),t.append(n)),n}function evo_link_refresh_list(e,t,n,o){var i=void 0===o?"":o,r=evo_link_ajax_loading_overlay(i);return void 0===n&&(n="refresh"),r&&evo_rest_api_request("links",{action:n,type:e.toLowerCase(),object_ID:t,prefix:i},function(e){jQuery("#"+i+"attachments_fieldset_table").html(e.html),window.evo_init_dragdrop_button_config&&window.evo_init_dragdrop_button_config["fieldset_"+i]&&init_uploader(window.evo_init_dragdrop_button_config["fieldset_"+i]),evo_link_fix_wrapper_height(i),r.remove()}),!1}function evo_link_sort_list(e){var n,o=void 0===e?"":e,i=jQuery("#"+o+"attachments_fieldset_table tbody.filelist_tbody tr");i.sort(function(e,t){var n=parseInt(jQuery("span[data-order]",e).attr("data-order")),o=parseInt(jQuery("span[data-order]",t).attr("data-order"));return(n=n||i.length)<(o=o||i.length)?-1:o<n?1:0}),$.each(i,function(e,t){n=(0===e?jQuery(t).prependTo("#"+o+"attachments_fieldset_table tbody.filelist_tbody"):jQuery(t).insertAfter(n),t)})}function ajax_debug_clear(e){return e=(e=e.replace(/<!-- Ajax response end -->/,"")).replace(/(<div class="jslog">[\s\S]*)/i,""),jQuery.trim(e)}function ajax_response_is_correct(e){return!!e.match(/<!-- Ajax response end -->/)&&""!=(e=ajax_debug_clear(e))}jQuery(document).ready(function(){jQuery("img.loadimg").each(function(){jQuery(this).prop("complete")?(jQuery(this).removeClass("loadimg"),""==jQuery(this).attr("class")&&jQuery(this).removeAttr("class")):jQuery(this).on("load",function(){jQuery(this).removeClass("loadimg"),""==jQuery(this).attr("class")&&jQuery(this).removeAttr("class")})})}),jQuery(document).on("click","a.evo_post_flag_btn",function(){var t=jQuery(this),e=parseInt(t.data("id"));return 0<e&&(t.data("status","inprogress"),jQuery("span",jQuery(this)).addClass("fa-x--hover"),evo_rest_api_request("collections/"+t.data("coll")+"/items/"+e+"/flag",function(e){e.flag?(t.find("span:first").show(),t.find("span:last").hide()):(t.find("span:last").show(),t.find("span:first").hide()),jQuery("span",t).removeClass("fa-x--hover"),setTimeout(function(){t.removeData("status")},500)},"PUT")),!1}),jQuery(document).on("mouseover","a.evo_post_flag_btn",function(){"inprogress"!=jQuery(this).data("status")&&jQuery("span",jQuery(this)).addClass("fa-x--hover")}),jQuery(document).on("keydown","textarea, input",function(e){!e.metaKey&&!e.ctrlKey||13!=e.keyCode&&10!=e.keyCode||jQuery(this).closest("form").submit()}),jQuery(document).on("click","button[data-checkbox-control]",function(){var e=!0;switch(jQuery(this).data("checkbox-control-type")){case"uncheck":e=!1;break;case"reverse":e=function(e,t){return!t}}("$all$"==jQuery(this).data("checkbox-control")?jQuery(this).closest("form").find("input[type=checkbox]"):jQuery('input[type=checkbox][name="'+jQuery(this).data("checkbox-control")+'[]"]')).prop("checked",e)}),jQuery(document).on("mouseover mouseout","button[data-checkbox-control]",function(e){var t=jQuery(this).data("checkbox-control-type");("$all$"==jQuery(this).data("checkbox-control")?jQuery(this).closest("form").find("input[type=checkbox]"):jQuery('input[type=checkbox][name="'+jQuery(this).data("checkbox-control")+'[]"]')).each(function(){"mouseout"==e.type?jQuery(this).unwrap(".checkbox_surround"):0==jQuery(this).parent("span.checkbox_surround").length&&("check"==t&&!jQuery(this).prop("checked")||"uncheck"==t&&jQuery(this).prop("checked")||"reverse"==t)&&jQuery(this).wrap('<span class="checkbox_surround"></span>')})});