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