Seditio Source
Root |
./othercms/b2evolution_7.2.3/rsc/js/build/evo_generic.bmin.js
/* This file includes ALL generic files that may be used on any page of front-office and back-office */

function evo_prevent_key_enter(e){jQuery(e).keypress(function(e){if(13==e.keyCode)return!1})}function link_attachment_window(e,t,n,i,o,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===i?"":i,fm_highlight:void 0===o?"":o,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 o=t[n];window["ajax_form_offset_"+o.form_number]=jQuery("#ajax_form_number_"+o.form_number).offset().top,window["request_sent_"+o.form_number]=!1,window["ajax_form_loading_number_"+o.form_number]=0;var r="get_form_"+o.form_number;window[r]=function(){var i="#ajax_form_number_"+o.form_number;window["ajax_form_loading_number_"+o.form_number]++,jQuery.ajax({url:htsrv_url+"anon_async.php",type:"POST",data:o.json_params,success:function(e){jQuery(i).html(ajax_debug_clear(e))},error:function(e,t,n){jQuery(".loader_ajax_form",i).after('<div class="red center">'+n+": "+e.responseText+"</div>"),window["ajax_form_loading_number_"+o.form_number]<3&&setTimeout(function(){jQuery(".loader_ajax_form",i).next().remove(),window[r]()},1e3)}})};var e="check_and_show_"+o.form_number;window[e]=function(e){if(!window["request_sent_"+o.form_number]){var t=null!=typeof e&&e;(t=t||jQuery(window).scrollTop()>=window["ajax_form_offset_"+o.form_number]-jQuery(window).height()-20)&&(window["request_sent_"+o.form_number]=!0,window[r]())}},jQuery(window).scroll(function(){window[e]()}),jQuery(window).resize(function(){window[e]()}),window[e](o.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 i=0;i<n.series.length;i++)n._original.data.push(n.series[i].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(i=0;i<n._original.data.length;i++){for(var o=[],r=7,a=1;0<r;r--,a++)o.unshift([r,n._original.data[i][n._original.data[i].length-a][1]]);n._week.data.push(o),n._week.xLabels=n._original.xLabels.slice(-7)}if(jQuery(n.target).width()<650){if("last_week"!=n._display){for(i=0;i<n.series.length;i++)n.series[i].data=n._week.data[i];n.axes.xaxis.ticks=n._week.xLabels,n._display="last_week"}}else if("last_month"!=n._display){for(i=0;i<n.series.length;i++)n.series[i].data=n._original.data[i];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++)void 0,i=e[n],window.init_edit_item_tags_icon(i.input_ID,i.widget_ID);delete e}var i;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"),i=t.attr("data-target");return t.closest("li").hasClass("active")||(jQuery.get(n,function(e){jQuery(i).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 o=evo_user_identity_form_config;window.replace_form_params=function(e,t){return t=void 0===t?"":' id="'+t+'"',e.replace("#fieldstart#",o.fieldstart).replace("#fieldend#",o.fieldend).replace("#labelclass#",o.labelclass).replace("#labelstart#",o.labelstart).replace("#labelend#",o.labelend).replace("#inputstart#",o.inputstart).replace("#inputend#",o.inputend)},jQuery("#button_add_field").click(function(){var e=jQuery(this).prev().find("option:selected").val();if(""==e)return window.field_type_error(o.msg_select_field_type),!1;window.field_type_error_clear();var t=o.params;return jQuery.ajax({type:"POST",url:htsrv_url+"anon_async.php",data:"action=get_user_new_field&user_id="+o.user_ID+"&field_id="+e+t,success:function(e){if("[0]"==(e=ajax_debug_clear(e)))window.field_type_error(o.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(o.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 i=jQuery(this),e=i.attr("rel").replace(/^add_ufdf_(\d+)$/,"$1"),t=o.params;jQuery.ajax({type:"POST",url:htsrv_url+"anon_async.php",data:"action=get_user_new_field&user_id="+o.user_ID+"&field_id="+e+t,success:function(e){if("[0]"==(e=ajax_debug_clear(e)))window.field_type_error(o.msg_field_already_added);else{if(e=window.replace_form_params(e),0==parseInt(e.replace(/^\[(\d+)\](.*)/,"$1")))return window.field_type_error(o.msg_field_already_added),!1;var t=i.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_"]',i=o.max_organizations,r=0;jQuery(document).on("click","span.add_org",function(){var t=jQuery(this),e=o.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>=i&&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<i&&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 o=Object.values(evo_status_dropdown_button_config);for(n=0;n<o.length;n++)!function(){var l=o[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"),i=t.parent().parent(),o=i.parent().parent(),r=i.find("button"),a=r.parent().find("button:first"),s=o.find('input[type="submit"]:not(.quick-publish)').add(r);return"published"==n?o.find(".quick-publish").hide():o.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),i.removeClass("open"),"submit"==a.attr("type")&&a.click(),i.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(),i=new Array;if(e&&0<e.length){for(var o in e=e.split(","))i.push({id:e[o].trim(),name:e[o].trim()});n.token_input_params.prePopulate=i}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"),i=(n=null==n||0==n.length?[]:n.split(",")).indexOf(t);-1===i||n.splice(i,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,i,o){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 i=e?jQuery(this):jQuery(this).prev();if(i.hasClass("fa")||i.hasClass("glyphicon")){if(""!=i.data("toggle")){var o=i.hasClass("fa")?"fa":"glyphicon";null==i.data("toggle-orig-class")&&i.data("toggle-orig-class",i.attr("class").replace(new RegExp("^"+o+" (.+)$","g"),"$1")),i.hasClass(i.data("toggle-orig-class"))?i.removeClass(i.data("toggle-orig-class")).addClass(o+"-"+i.data("toggle")):i.removeClass(o+"-"+i.data("toggle")).addClass(i.data("toggle-orig-class"))}}else{var r=i.css("background-position");i.css("background-position",i.data("xy")),i.data("xy",r)}var a=i.attr("title");i.attr("title",i.data("title")),i.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"),i=document.getElementById("p-time"),o="",r=document.getElementById(u.login_id);null!=r&&""!=r.value&&(o=r.value);var a="",s=document.getElementById(u.email_id);null!=s&&""!=s.value&&(a=s.value);var l=[o,a],_=zxcvbn(e.value,l.concat(u.blacklist)),c="red",d=u.msg_status_very_weak;switch(0==e.value.length?(t.style.display="none",n.style.display="none",i.style.display="none"):(t.style.display="block",n.style.display="block",i.style.display="block"),_.score){case 1:c="#F88158",d=u.msg_status_weak;break;case 2:c="#FBB917",d=u.msg_status_soso;break;case 3:c="#8BB381",d=u.msg_status_good;break;case 4:c="#59E817",d=u.msg_status_great}t.style.width=20*_.score+20+"%",t.style.background=c,u.disp_status&&(n.innerHTML=d),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),i=jQuery("#pass2_status"),o="",r=/^[^\<\&\>]+$/g;t.val().length&&null==t.val().match(r)||n.val().length&&null==n.val().match(r)?(o=u.msg_illegal_char,t[0].setCustomValidity(t.val().match(r)?"":o),n[0].setCustomValidity(n.val().match(r)?"":o),i.html(u.error_icon+" "+o)):0<t.val().length&&t.val().length<e||0<n.val().length&&n.val().length<e?(o=u.msg_min_pwd_len,t[0].setCustomValidity(t.val().length<e?o:""),n[0].setCustomValidity(n.val().length<e?o:""),i.html(u.error_icon+" "+o)):n.val()!=t.val()?(o=u.msg_pwd_not_matching,t[0].setCustomValidity(""),n[0].setCustomValidity(o),i.html(u.error_icon+" "+o)):(t[0].setCustomValidity(o),n[0].setCustomValidity(o),i.html(o))}),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 i=jQuery(this).parent().find(".pass_check_twice");i.length&&(""==jQuery(this).val()?i.show():i.hide());var o=jQuery(this).parent().find(".pass_check_warning");jQuery.trim(jQuery(this).val())!=jQuery(this).val()?o.length||jQuery(this).parent().append('<span class="pass_check_warning notes field_error">'+r.msg_pwd_trim_warning+"</span>"):o.length&&o.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,i=(e.login_icon_available,e.login_icon_exists),o=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(i+" "+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(o.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,i){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]});i(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),i=jQuery(".checklist_add_btn"),o=jQuery(".checklist_close_btn");null==t&&(t=0===jQuery(".add_checklist_line_input",e).is(":visible").length),1==t?(i.html(_.button_label_add),n.show(),o.show(),n.focus()):0==t&&(i.html(_.button_label_add_an_item),n.hide(),o.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),i=_.checklist_line_template;if(i=(i=i.replace(/\$checklist_line_ID\$/g,e.check_ID)).replace(/\$checklist_line_label\$/g,e.check_label),i=jQuery(i),n.append(i),window.dragndrop_checklist_lines(i),r.hasClass("add_checklist_line_input")){r.val("");var o=r.get(0);o.setAttribute("style","height:"+o.scrollHeight+"px;overflow-y:hidden;"),o.style.height="auto",o.style.height=o.scrollHeight+"px",r.focus()}}else if("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(),i=t.closest(".checklist_line"),o=jQuery('input[type="checkbox"]',i),r=i.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_"+o.val()),s.attr("name","checklist_line_input_"+o.val()),s.val(n),s.data("checkId",o.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"),i=t.closest(".checklist_line_label");setTimeout(function(){i.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"),i=jQuery('input[type="checkbox"]',n),o=n.closest("div.checklist_wrapper");return window.toggle_add_checklist_line_input(o,!1),window.delete_checklist_line(t,i.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 o=r.js_prefix+r.plugin_code+"_";window[o+"tagButtons"]=new Array,window[o+"tagOpenTags"]=new Array,window[o+"tagButton"]=function(e,t,n,i,o,r,a,s){this.id=e,this.display=t,this.style=n,this.tagStart=i,this.tagEnd=o,this.access=r,this.title=a,this.open=s};for(var e=Object.values(r.tag_buttons),n=0,i=e.length;n<i;n++)window[o+"tagButtons"][window[o+"tagButtons"].length]=new window[o+"tagButton"]("tag_"+e[n].title,e[n].name,"",e[n].start,e[n].end,"",e[n].title);window[o+"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="'+o+"tagInsertTag|"+r.js_prefix+"b2evoCanvas|"+t+'" value="'+e.display+'" />'},window[o+"tagAddTag"]=function(e){""!=window[o+"tagButtons"][e].tagEnd&&(window[o+"tagOpenTags"][window[o+"tagOpenTags"].length]=e,document.getElementById(window[o+"tagButtons"][e].id).style.fontWeight="bold")},window[o+"tagRemoveTag"]=function(e){for(n=0,i=window[o+"tagOpenTags"].length;n<i;n++)window[o+"tagOpenTags"][n]==e&&(window[o+"tagOpenTags"].splice(n,1),document.getElementById(window[o+"tagButtons"][e].id).style.fontWeight="normal")},window[o+"tagCheckOpenTags"]=function(e){var t=0;for(n=0,i=window[o+"tagOpenTags"].length;n<i;n++)window[o+"tagOpenTags"][n]==e&&t++;return 0<t},window[o+"tagCloseAllTags"]=function(){var e=window[o+"tagOpenTags"].length;for(n=0;n<e;n++)window[o+"tagInsertTag"](window[r.js_prefix+"b2evoCanvas"],window[o+"tagOpenTags"][window[o+"tagOpenTags"].length-1])},window[o+"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[o+"tagButtons"].length;t<n;t++)e+=window[o+"tagGetButton"](window[o+"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="'+o+'tagCloseAllTags" title="'+r.btn_title_close_all_tags+'" value="X" />',e+=r.toolbar_group_after,jQuery("."+o+"toolbar").html(e)},window[o+"tagInsertTag"]=function(e,t){var n=b2evo_Callbacks.trigger_callback("get_selected_text_for_"+e.id),i=!1;if(null==n||0==n)if(document.selection)e.focus(),n=document.selection.createRange().text,i=!0;else if(e.selectionStart||"0"==e.selectionStart){n=e.selectionStart!=e.selectionEnd}n?textarea_wrap_selection(e,window[o+"tagButtons"][t].tagStart,window[o+"tagButtons"][t].tagEnd,0):window[o+"tagCheckOpenTags"](t)&&""!=window[o+"tagButtons"][t].tagEnd?(textarea_wrap_selection(e,"",window[o+"tagButtons"][t].tagEnd,0),window[o+"tagRemoveTag"](t)):(textarea_wrap_selection(e,window[o+"tagButtons"][t].tagStart,"",0),window[o+"tagAddTag"](t)),i&&e.focus()},window[o+"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 i=r.target_ID,o=r.temp_ID,a=r.target_type,s=new Array;window.inline_button=function(e,t,n,i,o){this.id=e,this.text=t,this.type=n,this.title=i,this.style=o},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,i=0;i<s.length;i++){var o=s[i];n+='<input type="button" id="'+o.id+'" title="'+o.title+'"'+(void 0!==o.style?' style="'+o.style+'"':"")+' class="'+r.button_class+'" data-func="insert_inline|'+o.type+'" value="'+o.text+'" />'}n+=r.toolbar_group_after,jQuery("."+t+r.plugin_code+"_toolbar").html(n)},window.insert_inline=function(){switch(a){case"Item":if(!i&&!o)return alert(evo_js_lang_alert_before_insert_item),!1;break;case"Comment":if(!i)return alert(evo_js_lang_alert_before_insert_comment),!1;break;case"EmailCampaign":if(!i)return alert(evo_js_lang_alert_before_insert_emailcampaign),!1;break;case"Message":if(!i&&!o)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==o?(t=a,i):(t="temporary",o),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(o){window[o.js_prefix+"markdown_btns"]=new Array,window[o.js_prefix+"markdown_open_tags"]=new Array,window.markdown_btn=function(e,t,n,i,o,r,a,s){this.id=e,this.text=t,this.title=n,this.tag_start=i,this.tag_end=o,this.style=r,this.open=a,this.grp_pos=s},o.enable_text_styles&&(window[o.js_prefix+"markdown_btns"][window[o.js_prefix+"markdown_btns"].length]=new markdown_btn(o.js_prefix+"mrkdwn_bold","bold",o.btn_title_bold,"**","**","font-weight:bold"),window[o.js_prefix+"markdown_btns"][window[o.js_prefix+"markdown_btns"].length]=new markdown_btn(o.js_prefix+"mrkdwn_italic","italic",o.btn_title_italic,"*","*","font-style:italic",-1,"last")),o.enable_links&&(window[o.js_prefix+"markdown_btns"][window[o.js_prefix+"markdown_btns"].length]=new markdown_btn(o.js_prefix+"mrkdwn_link","link",o.btn_title_link,"","","text-decoration:underline",-1,o.enable_images?void 0:"last")),o.enable_images&&(window[o.js_prefix+"markdown_btns"][window[o.js_prefix+"markdown_btns"].length]=new markdown_btn(o.js_prefix+"mrkdwn_img","img",o.btn_title_image,"","","",-1,"last")),window[o.js_prefix+"markdown_btns"][window[o.js_prefix+"markdown_btns"].length]=new markdown_btn(o.js_prefix+"mrkdwn_h1","H1",o.btn_title_h1,"\n# ","","",-1),window[o.js_prefix+"markdown_btns"][window[o.js_prefix+"markdown_btns"].length]=new markdown_btn(o.js_prefix+"mrkdwn_h2","H2",o.btn_title_h2,"\n## ","","",-1),window[o.js_prefix+"markdown_btns"][window[o.js_prefix+"markdown_btns"].length]=new markdown_btn(o.js_prefix+"mrkdwn_h3","H3",o.btn_title_h3,"\n### ","","",-1),window[o.js_prefix+"markdown_btns"][window[o.js_prefix+"markdown_btns"].length]=new markdown_btn(o.js_prefix+"mrkdwn_h4","H4",o.btn_title_h4,"\n#### ","","",-1),window[o.js_prefix+"markdown_btns"][window[o.js_prefix+"markdown_btns"].length]=new markdown_btn(o.js_prefix+"mrkdwn_h5","H5",o.btn_title_h5,"\n##### ","","",-1),window[o.js_prefix+"markdown_btns"][window[o.js_prefix+"markdown_btns"].length]=new markdown_btn(o.js_prefix+"mrkdwn_h6","H6",o.btn_title_h6,"\n###### ","","",-1,"last"),window[o.js_prefix+"markdown_btns"][window[o.js_prefix+"markdown_btns"].length]=new markdown_btn(o.js_prefix+"mrkdwn_li","li",o.btn_title_li,"\n* ","","",-1),window[o.js_prefix+"markdown_btns"][window[o.js_prefix+"markdown_btns"].length]=new markdown_btn(o.js_prefix+"mrkdwn_ol","ol",o.btn_title_ol,"\n1. ","","",-1),window[o.js_prefix+"markdown_btns"][window[o.js_prefix+"markdown_btns"].length]=new markdown_btn(o.js_prefix+"mrkdwn_blockquote","blockquote",o.btn_title_blockquote,"\n> ","","",-1,"last"),window[o.js_prefix+"markdown_btns"][window[o.js_prefix+"markdown_btns"].length]=new markdown_btn(o.js_prefix+"mrkdwn_codespan","codespan",o.btn_title_codespan,"`","`","",-1),window[o.js_prefix+"markdown_btns"][window[o.js_prefix+"markdown_btns"].length]=new markdown_btn(o.js_prefix+"mrkdwn_preblock","preblock",o.btn_title_preblock,"\n\t","","",-1,"last"),window[o.js_prefix+"markdown_btns"][window[o.js_prefix+"markdown_btns"].length]=new markdown_btn(o.js_prefix+"mrkdwn_codeblock","codeblock",o.btn_title_codeblock,"\n```\n","\n```\n","",-1,"last"),window[o.js_prefix+"markdown_btns"][window[o.js_prefix+"markdown_btns"].length]=new markdown_btn(o.js_prefix+"mrkdwn_hr","hr",o.btn_title_hr,"\n---\n","","",-1),window[o.js_prefix+"markdown_btns"][window[o.js_prefix+"markdown_btns"].length]=new markdown_btn(o.js_prefix+"mrkdwn_br","<br>",o.btn_title_br,"  \n","","",-1),window[o.js_prefix+"markdown_get_btn"]=function(e,t){var n="";return e.id==window[o.js_prefix+"mrkdwn_img"]?n+='<input type="button" id="'+e.id+'" accesskey="'+e.access+'" title="'+e.title+'" style="'+e.style+'" class="'+o.toolbar_button_class+'" data-func="'+o.js_prefix+"markdown_insert_lnkimg|"+o.js_prefix+'b2evoCanvas|img" value="'+e.text+'" />':e.id==o.js_prefix+"mrkdwn_link"?n+='<input type="button" id="'+e.id+'" accesskey="'+e.access+'" title="'+e.title+'" style="'+e.style+'" class="'+o.toolbar_button_class+'" data-func="'+o.js_prefix+"markdown_insert_lnkimg|"+o.js_prefix+'b2evoCanvas" value="'+e.text+'" />':n+='<input type="button" id="'+e.id+'" accesskey="'+e.access+'" title="'+e.title+'" style="'+e.style+'" class="'+o.toolbar_button_class+'" data-func="'+o.js_prefix+"markdown_insert_tag|"+o.js_prefix+"b2evoCanvas|"+t+'" value="'+e.text+'" />',n},window[o.js_prefix+"markdown_add_tag"]=function(e){""!=window[o.js_prefix+"markdown_btns"][e].tag_end&&(window[o.js_prefix+"markdown_open_tags"][window[o.js_prefix+"markdown_open_tags"].length]=e,document.getElementById(window[o.js_prefix+"markdown_btns"][e].id).value="/"+document.getElementById(window[o.js_prefix+"markdown_btns"][e].id).value)},window[o.js_prefix+"markdown_remove_tag"]=function(e){for(n=0;n<window[o.js_prefix+"markdown_open_tags"].length;n++)window[o.js_prefix+"markdown_open_tags"][n]==e&&(window[o.js_prefix+"markdown_open_tags"].splice(n,1),document.getElementById(window[o.js_prefix+"markdown_btns"][e].id).value=document.getElementById(window[o.js_prefix+"markdown_btns"][e].id).value.replace("/",""))},window[o.js_prefix+"markdown_check_open_tags"]=function(e){var t=0;for(n=0;n<window[o.js_prefix+"markdown_open_tags"].length;n++)window[o.js_prefix+"markdown_open_tags"][n]==e&&t++;return 0<t},window[o.js_prefix+"markdown_close_all_tags"]=function(){for(var e=window[o.js_prefix+"markdown_open_tags"].length,t=0;t<e;t++)window[o.js_prefix+"markdown_insert_tag"](window[o.js_prefix+"b2evoCanvas"],window[o.js_prefix+"markdown_open_tags"][window[o.js_prefix+"markdown_open_tags"].length-1])},window[o.js_prefix+"markdown_toolbar"]=function(e){for(var t=o.toolbar_title_before+e+o.toolbar_title_after+o.toolbar_group_before,n=0;n<window[o.js_prefix+"markdown_btns"].length;n++)t+=window[o.js_prefix+"markdown_get_btn"](window[o.js_prefix+"markdown_btns"][n],n),"last"==window[o.js_prefix+"markdown_btns"][n].grp_pos&&0<n&&n<window[o.js_prefix+"markdown_btns"].length-1&&(t+=o.toolbar_group_after+o.toolbar_group_before);t+=o.toolbar_group_after+o.toolbar_group_before+'<input type="button" id="'+o.js_prefix+'mrkdwn_close" class="'+o.toolbar_button_class+'" data-func="'+o.js_prefix+'markdown_close_all_tags" title="'+o.btn_title_close_all_tags+'" value="X" />'+o.toolbar_group_after,jQuery("."+o.js_prefix+o.plugin_code+"_toolbar").html(t)},window[o.js_prefix+"markdown_insert_tag"]=function(e,t){var n=b2evo_Callbacks.trigger_callback("get_selected_text_for_"+e.id),i=!1;if(null==n)if(document.selection)e.focus(),n=document.selection.createRange().text,i=!0;else if(e.selectionStart||"0"==e.selectionStart){n=e.selectionStart!=e.selectionEnd}n?textarea_wrap_selection(e,window[o.js_prefix+"markdown_btns"][t].tag_start,window[o.js_prefix+"markdown_btns"][t].tag_end,0):window[o.js_prefix+"markdown_check_open_tags"](t)&&""!=window[o.js_prefix+"markdown_btns"][t].tag_end?(textarea_wrap_selection(e,"",window[o.js_prefix+"markdown_btns"][t].tag_end,0),window[o.js_prefix+"markdown_remove_tag"](t)):(textarea_wrap_selection(e,window[o.js_prefix+"markdown_btns"][t].tag_start,"",0),window[o.js_prefix+"markdown_add_tag"](t)),i&&e.focus()},window[o.js_prefix+"markdown_insert_lnkimg"]=function(e,t){var n=prompt(o.prompt_url+":","http://");if(n){n="["+prompt(o.prompt_text+":","")+"]("+n;var i=prompt(o.prompt_title+":","");""!=i&&(n+=' "'+i+'"'),n+=")",void 0!==t&&"img"==t&&(n="!"+n),textarea_wrap_selection(e,n,"",1)}},window[o.js_prefix+"markdown_toolbar"](o.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(i){window.polls_toolbar=function(e,t){var n=i.toolbar_title_before+e+i.toolbar_title_after+i.toolbar_group_before+'<input type="button" title="'+i.button_title+'" class="'+i.button_class+'" data-func="polls_load_window|'+t+'" value="'+i.button_value+'" />'+i.toolbar_group_after;jQuery("."+t+i.plugin_code+"_toolbar").html(n)},window.polls_load_window=function(e){return openModalWindow('<div id="poll_wrapper"></div>',"auto","",!0,i.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>";i.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(o){o=o||"",polls_api_request("polls","#poll_wrapper",function(e){var t='<div id="'+o+'polls_list">';for(var n in t+="<ul>",e.polls){var i=e.polls[n];t+='<li><a href="#" data-poll-id="'+i.pqst_ID+'" data-prefix="'+o+'">'+i.pqst_question_text+"</a></li>"}t+="</ul>",t+="</div>",jQuery("#poll_wrapper").html(t),jQuery(document).on("click","#"+o+"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(i.toolbar_title,i.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,i,o){this.id=e,this.text=t,this.tag=n,this.title=i,this.style=o},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,i=window[r.js_prefix+"shortcodes_buttons"].length;n<i;n++){var o=window[r.js_prefix+"shortcodes_buttons"][n];t+='<input type="button" id="'+o.id+'" title="'+o.title+'"'+(void 0!==o.style?' style="'+o.style+'"':"")+' class="'+r.toolbar_button_class+'" data-func="'+r.js_prefix+"shortcodes_insert_tag|"+r.js_prefix+"b2evoCanvas|"+n+'" value="'+o.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,i,o,r){this.id=e,this.text=t,this.tag_open=n,this.tag_close=i,this.title=o,this.style=r}("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,i=window[r.js_prefix+"widescroll_buttons"].length;n<i;n++){var o=window[r.js_prefix+"widescroll_buttons"][n];t+='<input type="button" id="'+o.id+'" title="'+o.title+'"'+(void 0!==o.style?' style="'+o.style+'"':"")+' class="'+r.toolbar_button_class+'" data-func="'+r.js_prefix+"widescroll_insert_tag|"+r.js_prefix+"b2evoCanvas|"+n+'" value="'+o.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 i=jQuery(t).find("input");0<i.length&&(jQuery(t).find("span.field_error").remove(),i.addClass("field_error"),void 0!==n.responseText&&i.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,i){jQuery("#"+i+"_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("#"+i+"_city_ID").html(ajax_debug_clear(e)),jQuery("#"+i+"_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,c=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,o,n){var r="comment_"+e,a="[id="+r+"]";if(void 0===f[r]){f[r]=t;var s=fadeInStatus(a,t),i=get_show_statuses(),l=get_expiry_status(),_=get_current_page(),c=get_itemid(),d=get_limit(),u={blogid:p.blog_ID,commentid:e,status:t,limit:d,action:"set_comment_status",request_from:o,moderation:"commentlist",statuses:i,expiry_status:l,itemid:c,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"==o){fadeIn(a,s);var t=ajax_debug_clear(e).split(":"),n=t[0];if(""==n)return;var i=jQuery(a).attr("class");i=i.replace(/vs_([a-z]+)/g,"vs_"+n),jQuery(a).attr("class",i),update_moderation_buttons(a,t[1],t[2])}else"dashboard"==o||"coll_settings"==o?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 i="#comment_"+t,o=fadeInStatus(i,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(i,o),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 i="";if("update"==e){var o=n.find("textarea");if(0==o.length)return;i=o.val()}return jQuery.ajax({type:"POST",url:htsrv_url+"async.php",data:{commentid:t,action:"edit_comment",comment_action:e,comment_content:i,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,i){if(void 0===i&&(i="feedback"),"meta"==i&&!confirm(p.delete_confirmation_msg))return!1;var o="comment_"+e,r="#"+o;if(void 0===f[o]){f[o]="deleted";var t=fadeIn(r,"#fcc"),a=get_show_statuses(),s=get_expiry_status(),l=get_itemid(),_=get_current_page(),c=get_limit();if("meta"!=i){var d=jQuery("#recycle_bin");0<d.length&&""==d.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){d.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:i,statuses:a,expiry_status:s,currentpage:_,limit:c,crumb_comment:p.crumb_comment},success:function(e){var t="meta"==i?"#comments":"#recycle_bin";jQuery(r).transfer({to:t,duration:700},function(){delete f[o],"dashboard"==n||"coll_settings"==n?updateCommentsList(o):(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[o]}})}},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 i=get_itemid();refresh_item_comments(i)},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 i=0;for(var o in _){var r=n.find("#"+_[o]);if(0!==r.length)r.remove(),n.find(".hidden_comment:first").removeClass("hidden_comment"),i+=1}_.length=0,jQuery("#comments_container").html(n.html());var a=jQuery("#comments_container [id^=comment_]");for(var o in c=a?a.length:0,t)switch(t[o]){case"published":jQuery("#"+o).css("backgroundColor","#339900");break;case"deprecated":jQuery("#"+o).css("backgroundColor","#656565");break;case"deleted":jQuery("#"+o).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)-i;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,i){"dashboard"==e||"coll_settings"==e?jQuery("#comments_container").slideUp("fast",refreshComments(e)):jQuery("#comments_container").fadeTo("slow",.1,function(){refresh_item_comments(t,n,i)})},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 i=get_show_statuses(),o=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:i,expiry_status:o,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){c-=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"),c<6&&refreshComments("dashboard")},window.update_moderation_buttons=function(e,t,n){var i=p.button_class_group+" ";void 0!==e&&(i=e+" "+i),e=i+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(c,l,e){var a,_,d,u,p,f,h,o,w,g,m,y,v,b,s,j,k,x,Q,T,C,I,D,E,S,O,M,A,q,P,t,$,B,i={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",L="cbox",z=L+"Element",W=L+"_closed",F=L+"_purge",R=!c.support.opacity;function r(e,t,n){return n=l.createElement("div"),e&&(n.id=L+e),n.style.cssText=t||"",c(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 k.photo||/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i.test(e)}function U(e){for(e in k=c.extend({},c.data(S,H)))c.isFunction(k[e])&&"on"!==e.substring(0,2)&&(k[e]=k[e].call(S));k.rel=k.rel||S.rel||"nofollow",k.href=k.href||c(S).attr("href"),k.title=k.title||S.title,"string"==typeof k.href&&(k.href=c.trim(k.href))}function X(e,t){t&&t.call(S),c.event.trigger(e)}function K(e){if(!P){if(S=e,x={},U(),p=c(S),O=0,"nofollow"!==k.rel&&(p=c("."+z).filter(function(){return(c.data(this,H).rel||this.rel)===k.rel}),-1===(O=p.index(S))&&(p=p.add(S),O=p.length-1)),!A){if(A=q=!0,_.show(),k.returnFocus)try{S.blur(),c(S).one(W,function(){try{this.focus()}catch(e){}})}catch(e){}a.css({cursor:k.overlayClose?"pointer":"auto"}).show(),k.w=N(k.initialWidth,"x"),k.h=N(k.initialHeight,"y"),B.position(),X("cbox_open",k.onOpen),j.add(g).hide(),s.html(k.close).show(),o=L+"Slideshow_",r="click."+L,k.slideshow&&p[1]?(n=function(){y.text(k.slideshowStop).one(r,i),_.removeClass(o+"off").addClass(o+"on"),t=setInterval(function(){A&&(k.loop||O!=p.length-1)||i(),B.next()},k.slideshowSpeed)},i=function(){clearInterval(t),y.text(k.slideshowStart).one(r,n),_.removeClass(o+"on").addClass(o+"off")},k.slideshowAuto?n():i()):_.removeClass(o+"off "+o+"on")}B.load(!0)}var t,n,i,o,r}(B=c.fn[H]=c[H]=function(e,t){var n=this;if(e=e||{},!n[0]){if(n.selector)return n;n=c("<a/>"),e.open=!0}return t&&(e.onComplete=t),n.each(function(){c.data(this,H,c.extend({},c.data(this,H)||i,e)),c(this).addClass(z)}),(c.isFunction(e.open)&&e.open.call(n)||e.open)&&K(n[0]),n}).init=function(){f=c(e),_=r().attr({id:H,class:R?L+"IE":""}),a=r("Overlay").hide(),d=r("Wrapper"),u=r("Content").append(h=r("LoadedContent","width:0; height:0; overflow:hidden"),w=r("LoadingOverlay").add(r("LoadingGraphic")),g=r("Title"),$infoBar=r("InfoBar").append($nav=r("Navigation").append(b=r("Previous"),m=r("Current"),v=r("Next")),$voting=r("Voting"),y=r("Slideshow"),s=r("Close"),$open=r("Open"))),d.append(u),o=r(!1,"position:absolute; width:9999px; visibility:hidden; display:none"),c("body").prepend(a,_.append(d,o)),$voting.data("voting_positions_done",0),previous_title="",u.children().on("mouseenter",function(){c(this).addClass("hover")}).on("mouseleave",function(){c(this).removeClass("hover")}).addClass("hover"),Q=u.outerHeight(!0)-u.height(),T=u.outerWidth(!0)-u.width(),I=h.outerHeight(!0),D=h.outerWidth(!0),C=I,E=s.height()+4,_.css({"padding-bottom":Q,"padding-right":T}).hide(),v.on("click",function(){B.next()}),b.on("click",function(){B.prev()}),s.on("click",function(){B.close()}),$open.on("click",function(){B.close()}),j=v.add(b).add(m).add(y),u.children().removeClass("hover"),a.on("click",function(){k.overlayClose&&B.close()}),c(l).bind("keydown."+L,function(e){var t=e.keyCode;A&&k.escKey&&27===t&&(e.preventDefault(),B.close()),A&&k.arrowKey&&p[1]&&(37===t?(e.preventDefault(),b.trigger("click")):39===t&&(e.preventDefault(),v.trigger("click")))})},B.remove=function(){_.add(a).remove(),c("."+z).removeData(H).removeClass(z)},B.position=function(e,t){var n=null==x.pw||k.w>x.pw?k.w:x.pw,i=null==x.ph||k.h>x.ph?k.h:x.ph,o=c("#colorbox .voting_wrapper");parseInt(u.css("border-bottom")),$infoBar.css({minHeight:E+"px"}),I=n<=700&&$voting.is(":visible")?(o.addClass("compact"),2*C-3):(o.removeClass("compact"),C);var r=0,a=0;function s(e){u[0].style.width=e.style.width,w[0].style.height=w[1].style.height=u[0].style.height=e.style.height}f.unbind("resize."+L),_.hide(),k.fixed?_.css({position:"fixed"}):(r=f.scrollTop(),a=f.scrollLeft(),_.css({position:"absolute"})),!1!==k.right?a+=Math.max(f.width()-n-D-T-N(k.right,"x"),0):!1!==k.left?a+=N(k.left,"x"):a+=Math.round(Math.max(f.width()-n-D-T,0)/2),!1!==k.bottom?r+=Math.max(l.documentElement.clientHeight-i-I-Q-N(k.bottom,"y"),0):!1!==k.top?r+=N(k.top,"y"):r+=Math.round(Math.max(l.documentElement.clientHeight-i-I-Q,0)/2),_.show(),e=_.width()===n+D&&_.height()===i+I?0:e||0,d[0].style.width=d[0].style.height="9999px",_.dequeue().animate({width:n+D,height:i+I,top:r,left:a},{duration:e,complete:function(){s(this),q=!1,d[0].style.width=n+D+T+"px",d[0].style.height=i+I+Q+"px",t&&t(),setTimeout(function(){f.bind("resize."+L,B.position)},1),B.resizeVoting(),d.parent().width()<380?y.hide():y.show()},step:function(){s(this)}})},B.resize=function(e){if(A){if((e=e||{}).width&&(k.w=N(e.width,"x")-D-T),e.innerWidth&&(k.w=N(e.innerWidth,"x")),h.css({width:k.w}),e.height&&(k.h=N(e.height,"y")-I-Q),e.innerHeight&&(k.h=N(e.innerHeight,"y")),!e.innerHeight&&!e.height){var t=h.wrapInner("<div style='overflow:auto'></div>").children();k.h=t.outerHeight(),t.replaceWith(t.children())}h.css({height:k.h}),x.pw=k.w,x.ph=k.h,B.position("none"===k.transition?0:k.speed)}},B.prep=function(e){if(A){var t,l="none"===k.transition?0:k.speed;h.remove(),(h=r("LoadedContent").append(e)).hide().appendTo(o.show()).css({width:(k.w=k.w||h.width(),k.w=k.mw&&k.mw<k.w?k.mw:k.w,k.w=k.minWidth&&k.minWidth>k.w?k.minWidth:k.w,x.pw=null==x.pw||k.w>x.pw?k.w:x.pw,x.pw),overflow:k.scrolling?"auto":"hidden"}).css({height:(k.h=k.h||h.height(),k.h=k.mh&&k.mh<k.h?k.mh:k.h,k.h=k.minHeight&&k.minHeight>k.h?k.minHeight:k.h,x.ph=null==x.ph||k.h>x.ph?k.h:x.ph,x.ph)}).prependTo(u),o.hide(),c(M).css({float:"none"}),t=function(){var e,t,n,i,o,r,a=p.length;function s(){R&&_[0].style.removeProperty("filter")}A&&(r=function(){clearTimeout($),w.hide(),X("cbox_complete",k.onComplete)},R&&M&&h.fadeIn(100),g.add(h).show(),1<a?("string"==typeof k.current&&380<h.width()&&m.html(k.current.replace("{current}",O+1).replace("{total}",a)).show(),v[k.loop||O<a-1?"show":"hide"]().html(k.next),b[k.loop||O?"show":"hide"]().html(k.previous),e=O?p[O-1]:p[a-1],n=O<a-1?p[O+1]:p[0],k.slideshow&&380<h.width()&&y.show(),k.preloading&&(i=c.data(n,H).href||n.href,t=c.data(e,H).href||e.href,i=c.isFunction(i)?i.call(n):i,t=c.isFunction(t)?t.call(e):t,V(i)&&(c("<img/>")[0].src=i),V(t)&&(c("<img/>")[0].src=t))):j.hide(),k.iframe?(o=c("<iframe/>").addClass(L+"Iframe")[0],k.fastIframe?r():c(o).one("load",r),o.name=L+ +new Date,o.src=k.href,k.scrolling||(o.scrolling="no"),R&&(o.frameBorder=0,o.allowTransparency="true"),c(o).appendTo(h).one(F,function(){o.src="//about:blank"})):r(),"fade"===k.transition?_.fadeTo(l,1,s):s())},"fade"===k.transition?_.fadeTo(l,0,function(){B.position(0,t)}):B.position(l,t)}},B.load=function(e){var t,n,i=B.prep;M=!(q=!0),S=p[O],e||U(),X(F),X("cbox_load",k.onLoad),previous_title=k.title,k.displayVoting&&""!=k.votingUrl&&""!=S.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,k.votingUrl,S.id,!0)):""!=$voting.html()&&($voting.html("").hide(),$voting.data("voting_positions_done",0)),k.h=k.height?N(k.height,"y")-I-Q:k.innerHeight&&N(k.innerHeight,"y"),k.w=k.width?N(k.width,"x")-D-T:k.innerWidth&&N(k.innerWidth,"x"),k.mw=k.w,k.mh=k.h,k.maxWidth&&(k.mw=N(k.maxWidth,"x")-D-T,k.mw=k.w&&k.w<k.mw?k.w:k.mw),k.maxHeight&&(k.mh=N(k.maxHeight,"y")-I-Q,k.mh=k.h&&k.h<k.mh?k.h:k.mh),t=k.href,$=setTimeout(function(){w.show()},100),k.inline?(r().hide().insertBefore(c(t)[0]).one(F,function(){c(this).replaceWith(h.children())}),i(c(t))):k.iframe?i(" "):k.html?i(k.html):V(t)?(c(M=new Image).addClass(L+"Photo").on("error",function(){k.title=!1,i(r("Error").text("This image could not be loaded"))}).on("load",function(){var e;M.onload=null,k.scalePhotos&&(n=function(){M.height-=M.height*e,M.width-=M.width*e},k.mw&&M.width>k.mw&&(e=(M.width-k.mw)/M.width,n()),k.mh&&M.height>k.mh&&(e=(M.height-k.mh)/M.height,n())),k.h&&(M.style.marginTop=Math.max(k.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||k.loop)&&(M.onclick=function(e){B.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{B.resize({width:k.mw,height:k.mh+parseInt(h.css("margin-bottom"))});var n=jQuery(this).offset(),i=void 0!==e.pageX?e.pageX:t.originalEvent.touches[0].pageX,o=void 0!==e.pageY?e.pageY:t.originalEvent.touches[0].pageY,r=(i-n.left)/jQuery(this).width(),a=(o-n.top)/jQuery(this).height();M.className=M.className+" zoomout",c(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(){i(M)},1)}),setTimeout(function(){M.src=t},1)):t&&o.load(t,k.data,function(e,t,n){i("error"===t?r("Error").text("Request unsuccessful: "+n.statusText):c(this).contents())})},B.next=function(){!q&&p[1]&&(O<p.length-1||k.loop)&&(O=O<p.length-1?O+1:0,B.load())},B.prev=function(){!q&&p[1]&&(O||k.loop)&&(O=O?O-1:p.length-1,B.load())},B.close=function(){A&&!P&&(A=!(P=!0),X("cbox_cleanup",k.onCleanup),f.unbind("."+L),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(W,k.onClosed)},1)}))},B.resizeVoting=function(){var e=c("#colorbox .voting_wrapper"),t=d.parent().width();t<=480?m.hide():m.show(),$infoBar.css({minHeight:E+"px"}),I=t<=700&&$voting.is(":visible")?(e.addClass("compact"),2*C-3):(e.removeClass("compact"),C)},B.element=function(){return c(S)},B.settings=i,t=function(e){0!==e.button&&void 0!==e.button||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),K(this))},c(l).on("click","."+z,t),c(B.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),i=n.data("lastTouch")||0,o=(new Date).getTime(),r=o-i;20<r&&r<500?(n.data("lastTouch",0),n.trigger("dblclick",e)):n.data("lastTouch",o)}},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">&nbsp;</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,i){var o=s.find("#voting_action"),r=o.length?o.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,i)):(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 i=e.parent(),o=t;i&&("transparent"==o||"rgba(0, 0, 0, 0)"==o);)o=i.css("backgroundColor"),i=i.parent();"HTML"!=i[0].tagName&&(t=o)}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(oe){"use strict";var re="left",ae="right",se="up",le="down",_e="none",ce="doubletap",de="longtap",ue="horizontal",pe="vertical",fe="all",he="move",we="end",ge="cancel",me="ontouchstart"in window,ye="TouchSwipe";function i(e,k){var t=me||!k.fallbackToMouseEvents,n=t?"touchstart":"mousedown",i=t?"touchmove":"mousemove",o=t?"touchend":"mouseup",r=t?null:"mouseleave",a="touchcancel",x=0,Q=null,T=0,C=0,I=0,D=1,E=0,S=0,O=null,s=oe(e),M="start",A=0,q=null,l=0,P=0,_=0,c=0,d=0,u=null;try{s.bind(n,p),s.bind(a,w)}catch(e){oe.error("events not supported "+n+","+a+" on jQuery.swipe")}function p(e){if(!0!==s.data(ye+"_intouch")&&!(0<oe(e.target).closest(k.excludedElements,s).length)){var t,n=e.originalEvent?e.originalEvent:e,i=me?n.touches[0]:n;return M="start",me?A=n.touches.length:e.preventDefault(),S=Q=null,D=1,E=I=C=T=x=0,q=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}(),(o={})[re]=ee(re),o[ae]=ee(ae),o.up=ee(se),o[le]=ee(le),O=o,X(),!me||A===k.fingers||k.fingers===fe||L()?(J(0,i),l=ie(),2==A&&(J(1,n.touches[1]),C=I=ne(q[0].start,q[1].start)),(k.swipeStatus||k.pinchStatus)&&(t=B(n,M))):t=!1,!1===t?(B(n,M=ge),t):(Y(!0),null)}var o}function f(e){var t,n,i,o,r,a,s,l,_,c,d,u,p,f,h,w,g,m=e.originalEvent?e.originalEvent:e;if(M!==we&&M!==ge&&!K()){var y,v=G(me?m.touches[0]:m);if(P=ie(),me&&(A=m.touches.length),M=he,2==A&&(0==C?(J(1,m.touches[1]),C=I=ne(q[0].start,q[1].start)):(G(m.touches[1]),I=ne(q[0].end,q[1].end),q[0].end,q[1].end,S=D<1?"out":"in"),D=(I/C*1).toFixed(2),E=Math.abs(C-I)),A===k.fingers||k.fingers===fe||!me||L()){if(function(e,t){if(k.allowPageScroll===_e||L())e.preventDefault();else{var n="auto"===k.allowPageScroll;switch(t){case re:(k.swipeLeft&&n||!n&&k.allowPageScroll!=ue)&&e.preventDefault();break;case ae:(k.swipeRight&&n||!n&&k.allowPageScroll!=ue)&&e.preventDefault();break;case se:(k.swipeUp&&n||!n&&k.allowPageScroll!=pe)&&e.preventDefault();break;case le:(k.swipeDown&&n||!n&&k.allowPageScroll!=pe)&&e.preventDefault()}}}(e,(_=v.start,c=v.end,u=c,p=(d=_).x-u.x,f=u.y-d.y,h=Math.atan2(f,p),(w=Math.round(180*h/Math.PI))<0&&(w=360-Math.abs(w)),Q=(g=w)<=45&&0<=g?re:g<=360&&315<=g?re:135<=g&&g<=225?ae:45<g&&g<135?le:se)),s=v.start,l=v.end,x=Math.round(Math.sqrt(Math.pow(l.x-s.x,2)+Math.pow(l.y-s.y,2))),T=te(),r=Q,a=x,a=Math.max(a,Z(r)),O[r].distance=a,(k.swipeStatus||k.pinchStatus)&&(y=B(m,M)),!k.triggerOnTouchEnd||k.triggerOnTouchLeave){var b=!0;if(k.triggerOnTouchLeave){var j={left:(o=(i=oe(i=this)).offset()).left,right:o.left+i.outerWidth(),top:o.top,bottom:o.top+i.outerHeight()};t=v.end,n=j,b=t.x>n.left&&t.x<n.right&&t.y>n.top&&t.y<n.bottom}!k.triggerOnTouchEnd&&b?M=$(he):k.triggerOnTouchLeave&&!b&&(M=$(we)),M!=ge&&M!=we||B(m,M)}}else B(m,M=ge);!1===y&&B(m,M=ge)}}function h(e){var t=e.originalEvent;return me&&0<t.touches.length?(_=ie(),c=event.touches.length+1,!0):(K()&&(A=c),e.preventDefault(),P=ie(),T=te(),b()?B(t,M=ge):k.triggerOnTouchEnd||0==k.triggerOnTouchEnd&&M===he?B(t,M=we):!k.triggerOnTouchEnd&&N()?y(t,M=we,"tap"):M===he&&B(t,M=ge),Y(!1),null)}function w(){I=C=l=P=A=0,D=1,X(),Y(!1)}function g(e){var t=e.originalEvent;k.triggerOnTouchLeave&&B(t,M=$(we))}function m(){s.unbind(n,p),s.unbind(a,w),s.unbind(i,f),s.unbind(o,h),r&&s.unbind(r,g),Y(!1)}function $(e){var t=e,n=j(),i=v(),o=b();return!n||o?t=ge:!i||e!=he||k.triggerOnTouchEnd&&!k.triggerOnTouchLeave?!i&&e==we&&k.triggerOnTouchLeave&&(t=ge):t=we,t}function B(e,t){var n=void 0;return z()&&W()||W()?n=y(e,t,"swipe"):(H()&&L()||L())&&!1!==n&&(n=y(e,t,"pinch")),U()&&V()&&!1!==n?n=y(e,t,ce):T>k.longTapThreshold&&x<10&&k.longTap&&!1!==n?n=y(e,t,de):1!==A&&me||!isNaN(x)&&0!==x||!N()||!1===n||(n=y(e,t,"tap")),t===ge&&w(),t===we&&(me?0==e.touches.length&&w():w()),n}function y(e,t,n){var i=void 0;if("swipe"==n){if(s.trigger("swipeStatus",[t,Q||null,x||0,T||0,A]),k.swipeStatus&&!1===(i=k.swipeStatus.call(s,e,t,Q||null,x||0,T||0,A)))return!1;if(t==we&&z()){if(s.trigger("swipe",[Q,x,T,A]),k.swipe&&!1===(i=k.swipe.call(s,e,Q,x,T,A)))return!1;switch(Q){case re:s.trigger("swipeLeft",[Q,x,T,A]),k.swipeLeft&&(i=k.swipeLeft.call(s,e,Q,x,T,A));break;case ae:s.trigger("swipeRight",[Q,x,T,A]),k.swipeRight&&(i=k.swipeRight.call(s,e,Q,x,T,A));break;case se:s.trigger("swipeUp",[Q,x,T,A]),k.swipeUp&&(i=k.swipeUp.call(s,e,Q,x,T,A));break;case le:s.trigger("swipeDown",[Q,x,T,A]),k.swipeDown&&(i=k.swipeDown.call(s,e,Q,x,T,A))}}}if("pinch"==n){if(s.trigger("pinchStatus",[t,S||null,E||0,T||0,A,D]),k.pinchStatus&&!1===(i=k.pinchStatus.call(s,e,t,S||null,E||0,T||0,A,D)))return!1;if(t==we&&H())switch(S){case"in":s.trigger("pinchIn",[S||null,E||0,T||0,A,D]),k.pinchIn&&(i=k.pinchIn.call(s,e,S||null,E||0,T||0,A,D));break;case"out":s.trigger("pinchOut",[S||null,E||0,T||0,A,D]),k.pinchOut&&(i=k.pinchOut.call(s,e,S||null,E||0,T||0,A,D))}}return"tap"==n?t!==ge&&t!==we||(clearTimeout(u),V()&&!U()?(d=ie(),u=setTimeout(oe.proxy(function(){d=null,s.trigger("tap",[e.target]),k.tap&&(i=k.tap.call(s,e,e.target))},this),k.doubleTapThreshold)):(d=null,s.trigger("tap",[e.target]),k.tap&&(i=k.tap.call(s,e,e.target)))):n==ce?t!==ge&&t!==we||(clearTimeout(u),d=null,s.trigger("doubletap",[e.target]),k.doubleTap&&(i=k.doubleTap.call(s,e,e.target))):n==de&&(t!==ge&&t!==we||(clearTimeout(u),d=null,s.trigger("longtap",[e.target]),k.longTap&&(i=k.longTap.call(s,e,e.target)))),i}function v(){var e=!0;return null!==k.threshold&&(e=x>=k.threshold),e}function b(){var e=!1;return null!==k.cancelThreshold&&null!==Q&&(e=Z(Q)-x>=k.cancelThreshold),e}function j(){return!(k.maxTimeThreshold&&T>=k.maxTimeThreshold)}function H(){var e=F(),t=R(),n=null===k.pinchThreshold||E>=k.pinchThreshold;return e&&t&&n}function L(){return!!(k.pinchStatus||k.pinchIn||k.pinchOut)}function z(){var e=j(),t=v(),n=F(),i=R();return!b()&&i&&n&&t&&e}function W(){return!!(k.swipe||k.swipeStatus||k.swipeLeft||k.swipeRight||k.swipeUp||k.swipeDown)}function F(){return A===k.fingers||k.fingers===fe||!me}function R(){return 0!==q[0].end.x}function N(){return!!k.tap}function V(){return!!k.doubleTap}function U(){if(null==d)return!1;var e=ie();return V()&&e-d<=k.doubleTapThreshold}function X(){c=_=0}function K(){var e=!1;return _&&ie()-_<=k.fingerReleaseThreshold&&(e=!0),e}function Y(e){!0===e?(s.bind(i,f),s.bind(o,h),r&&s.bind(r,g)):(s.unbind(i,f,!1),s.unbind(o,h,!1),r&&s.unbind(r,g,!1)),s.data(ye+"_intouch",!0===e)}function J(e,t){var n=void 0!==t.identifier?t.identifier:0;return q[e].identifier=n,q[e].start.x=q[e].end.x=t.pageX||t.clientX,q[e].start.y=q[e].end.y=t.pageY||t.clientY,q[e]}function G(e){var t=function(e){for(var t=0;t<q.length;t++)if(q[t].identifier==e)return q[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(O[e])return O[e].distance}function ee(e){return{direction:e,distance:0}}function te(){return P-l}function ne(e,t){var n=Math.abs(e.x-t.x),i=Math.abs(e.y-t.y);return Math.round(Math.sqrt(n*n+i*i))}function ie(){return(new Date).getTime()}this.enable=function(){return s.bind(n,p),s.bind(a,w),s},this.disable=function(){return m(),s},this.destroy=function(){return m(),s.data(ye,null),s},this.option=function(e,t){if(void 0!==k[e]){if(void 0===t)return k[e];k[e]=t}else oe.error("Option "+e+" does not exist on jQuery.swipe.options");return null}}oe.fn.swipe=function(e){var t=oe(this),n=t.data(ye);if(n&&"string"==typeof e){if(n[e])return n[e].apply(this,Array.prototype.slice.call(arguments,1));oe.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=oe.extend({},oe.fn.swipe.defaults,n),this.each(function(){var e=oe(this),t=e.data(ye);t||(t=new i(this,n),e.data(ye,t))})}.apply(this,arguments);return t},oe.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"},oe.fn.swipe.phases={PHASE_START:"start",PHASE_MOVE:he,PHASE_END:we,PHASE_CANCEL:ge},oe.fn.swipe.directions={LEFT:re,RIGHT:ae,UP:se,DOWN:le,IN:"in",OUT:"out"},oe.fn.swipe.pageScroll={NONE:_e,HORIZONTAL:ue,VERTICAL:pe,AUTO:"auto"},oe.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,i,o){"undefined"!=typeof colorbox_is_zoomed&&colorbox_is_zoomed||jQuery.colorbox.next()},swipeRight:function(e,t,n,i,o){"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")}))});