jQuery(function(a){function e(){"2"==a(".radiotype-nl:checked").val()?a(".automatic-nl").show():(a(".automatic-nl").hide(),a('label[for="subject"] p.description').html(wysijatrans.descstandard)),i(),a("#params-when-article").is(":hidden")||t()}function t(){a(".sub-when-article").hide(),s();var e=autofields["when-article"].valueshow[a("#params-when-article").val()];void 0!=e&&a.each(e,function(e,t){a("#params-"+t).show(),a("#params-label-"+t).show()})}function n(){"immediate"==a("#params-numberofwhat").val()?a("#params-numberafter").hide():a("#params-numberafter").show()}function i(){a(".sub-event").hide(),s();var e=autofields.event.valueshow[a("#params-event").val()];"1"==a(".radiotype-nl:checked").val()||"2"==a(".radiotype-nl:checked").val()&&"new-articles"==a("#params-event").val()?(a(".listcheckboxes").show(),"2"==a(".radiotype-nl:checked").val()&&a('label[for="subject"] p.description').html(wysijatrans.descauto)):(a(".listcheckboxes").hide(),a('label[for="subject"] p.description').html(wysijatrans.descstandard)),void 0!=e&&a.each(e,function(e,t){a("#params-"+t).show(),a("#params-label-"+t).show()}),n()}function r(){var e={};return a(".checkbox.checklists").each(function(){a(this).attr("checked")&&(e[a(this).attr("id")]={total:parseInt(a("#"+a(this).attr("id")+"count").val()),title:a(this).attr("alt")})}),e}function s(){var e=r(),t=0;for(j in e)t+=e[j].total;return a("#immediatewarning").html(wysijatrans.immediatewarning.replace("[number]",t)),"new-articles"==a("#params-event").val()&&"immediate"==a("#params-when-article").val()&&parseInt(wysijatrans.possibleemails)<parseInt(t)?a("#immediatewarning").show():a("#immediatewarning").hide(),!1}a(document).ready(function(){s(),e()}),a(".radiotype-nl").change(function(){e()}),a("#params-event").change(function(){i(),a("#params-when-article").is(":hidden")||t()}),a("#params-when-article").change(function(){t()}),a("#params-numberofwhat").change(function(){n()}),a(".checklists").change(function(){s()})});