window.hideAssociation=function(o,i){jQuery("#associations .control-group").each(function(){jQuery(this).find(".control-label label").attr("for").replace("_id","")==o+"_associations_"+i.replace("-","_")&&jQuery(this).hide()})},window.showAssociationMessage=function(){jQuery("#associations .control-group").hide(),jQuery("#associations").prepend('<div id="associations-notice" class="alert alert-info">'+Joomla.JText._("JGLOBAL_ASSOC_NOT_POSSIBLE")+"</div>")},!function(){jQuery(document).ready(function(o){var i=Joomla.getOptions("system.associations.edit"),s=i.formControl||"jform";1==i.hidden?window.showAssociationMessage():window.hideAssociation(s,o("#"+s+"_language").val()),o("#"+s+"_language").on("change",function(){Joomla.removeMessages(),o("#associations-notice").remove();var i=!1;o("#associations .control-group").each(function(){var a=o(this).find(".control-label label").attr("for").replace("_id","").replace("jform_associations_","");o(this).show(),i||""===o("#"+s+"_associations_"+a+"_id").val()||(i=!0),o("#"+s+"_associations_"+a+"_clear").click()}),i&&Joomla.renderMessages({warning:[Joomla.JText._("JGLOBAL_ASSOCIATIONS_RESET_WARNING")]});var a=o(this).val();"*"==a?window.showAssociationMessage():window.hideAssociation(s,a)})})}(window,document,Joomla);
