function switcher(){jQuery("#events-form, #templates-form, #settings-form").find('.form-group input[type="checkbox"]').bootstrapSwitch({size:"mini",onColor:"danger",offColor:"default",onText:'',offText:''})}function loadPage(){setTimeout(function(){jQuery(".message_output").fadeOut("slow")},5000);loadDateTimePickerPlugin();jQuery("#aoph-overlay, #aoph-loader").hide()}function addMessages(a){if(typeof a.AophTestNotifications.message==="undefined"){a.AophTestNotifications.error=1;a.AophTestNotifications.message="Подписка на Web Push уведомления завершилась неудачей"}if(a&&!a.AophTestNotifications.error){if(jQuery(".message_output").hasClass(".alert-success")){success_block.html(a.AophTestNotifications.message)}else{jQuery(".message_output").html('
'+a.AophTestNotifications.message+"
")}}else{if(jQuery(".message_output").hasClass(".alert-danger")){error_block.html(a.AophTestNotifications.message)}else{jQuery(".message_output").html(''+a.AophTestNotifications.message+"
")}}}function reloadForm(e,b,d,a){jQuery("#aoph-overlay, #aoph-loader").show();var c="aoph_load_form_"+e;if(d.AophTestNotifications&&d.AophTestNotifications.id_form){var e="#aoph-"+d.AophTestNotifications.id_form}else{var e="#aoph-"+e}jQuery(e).load(a+"admin-ajax.php?action="+c,{data:d},function(){loadPage();getBalance(b);if(d.AophTestNotifications&&d.AophTestNotifications.action&&d.AophTestNotifications.action=="subscribe"){addMessages(d)}})}jQuery(document).ready(function(){loadPage();jQuery(document).delegate("#aoph-settings-tab a","click",function(a){jQuery(".message_output").hide();a.preventDefault();jQuery(this).tab("show")});jQuery(document).delegate(".tips","mouseover",function(a){jQuery(this).tooltip("show")})});