jQuery(document).ready(function($){var e=0;var f=klpu_vars.server_time-parseInt((new Date()).getTime()/1000);$.post(klpu_vars.ajaxurl,{action:'klpu_get_popups'},function(a){var b=$.parseJSON(a);e=parseInt(b['popup_count']);if('undefined'==e||null==b||1>e){return}$('body').prepend('
'+b['popups']+'
');$('div.klpu-item:nth-child(1)').slideDown(300)});$('.klpu-close-btn').live('click',function(){var c=$(this).siblings().val();var d=$("input:checkbox[ id=klpu-close_id-"+c+"]").is(":checked");$('.klpu-item_id-'+c).slideUp(600,function(){if(true==d){var a=new Date();var b=new Date(a.getTime());b.setDate(b.getDate()+1);document.cookie='klpu-tick-'+c+'='+parseInt(a.getTime()/1000+f)+'; path=/; expires='+b.toGMTString()+';'}$(this).remove();if(0==(--e)){$('.kl-popup').remove();return}$('div.klpu-item:nth-child(1)').slideDown(300)})})});