jQuery(document).ready(function($){av_nonce=av_settings.nonce;av_ajax=av_settings.ajax;av_theme=av_settings.theme;av_msg_1=av_settings.msg_1;av_msg_2=av_settings.msg_2;av_msg_3=av_settings.msg_3;function check_theme_file(current){var id=parseInt(current||0);var file=av_files[id];$.post(av_ajax,{'action':'get_ajax_response','_ajax_nonce':av_nonce,'_theme_file':file,'_action_request':'check_theme_file'},function(input){var item=$('#av_template_'+id);if(input){input=eval('('+input+')');if(!input.nonce||input.nonce !=av_nonce){return;}item.addClass('danger');var i=0;var lines=input.data;var len=lines.length;for(i;i').replace(/@\/span@/g,'');var md5=lines[i+2];var file=item.text();item.append('

'+av_msg_1+''+av_msg_2+' '+num+''+line+'

');$('#'+md5).click(function(){$.post(av_ajax,{'action':'get_ajax_response','_ajax_nonce':av_nonce,'_file_md5':$(this).attr('id'),'_action_request':'update_white_list'},function(input){if(!input){return;}input=eval('('+input+')');if(!input.nonce||input.nonce !=av_nonce){return;}var parent=$('#'+input.data[0]).parent();if(parent.parent().children().length<=1){parent.parent().hide('slow').remove();}parent.hide('slow').remove();});return false;});}}else{item.addClass('done');}av_files_loaded++;if(av_files_loaded>=av_files_total){$('#av_manual .alert').text(av_msg_3).fadeIn().fadeOut().fadeIn().fadeOut().fadeIn().animate({opacity:1.0},500).fadeOut('slow',function(){$(this).empty();});}else{check_theme_file(id+1);}});}$('#av_manual a.button').click(function(){$.post(av_ajax,{action:'get_ajax_response',_ajax_nonce:av_nonce,_action_request:'get_theme_files'},function(input){if(!input){return;}input=eval('('+input+')');if(!input.nonce||input.nonce !=av_nonce){return;}var output='';av_files=input.data;av_files_total=av_files.length;av_files_loaded=0;jQuery.each(av_files,function(i,val){output+='
'+val+'
';});$('#av_manual .alert').empty();$('#av_manual .output').empty().append(output);check_theme_file();});return false;});function manage_options(){var id='av_cronjob_enable';$('#'+id).parents('.form-table').find('input[id!="'+id+'"]').attr('disabled',!$('#'+id).attr('checked'));}$('#av_cronjob_enable').click(manage_options);manage_options();});