jQuery(document).ready(function(t){"use strict";t(".gianism-wrap").find("h3,caption").each(function(e,i){t(i).attr("id","index_"+e),t("#index-list").append('<li><a href="#index_'+e+'">'+t(i).text()+"</a></li>")}),t(".gianism-admin-notice").click(function(e){e.preventDefault();const i=t(this);t.get(i.attr("data-endpoint")).done(function(t){t.success?i.parents("div.error").remove():window.alert("Error")}).fail(function(t){window.alert(t.responseJSON.data)})}),t(".gianism-toggle").each(function(e,i){const a=t(i),n=t(a.attr("data-target")),o=a.attr("data-valid").split(",");-1<o.indexOf(n.val())&&a.addClass("toggle"),n.change(function(){-1<o.indexOf(t(this).val())?a.addClass("toggle").effect("highlight"):a.hasClass("toggle")&&a.effect("highlight",{},400,function(){a.removeClass("toggle")})})})});