var ZemRPResponse=[];
jQuery(function(c){window._wp_rp_request_id=window._wp_rp_request_id||((new Date).getTime()%60466176/60466176).toString(36).substr(2,5)+Math.random().toString(36).substr(2,10);var h=c(window),i=c(".related_post"),d=!1,a=i.find("li").length,e=-1,j=function(){var b=window._wp_rp_wp_ajax_url+"?action=wp_rp_load_articles&post_id="+window._wp_rp_post_id+"&from="+a+"&count=50";!d&&e!==a&&(d=!0,c.get(b,function(b){c.each(b,function(b,c){ZemRPResponse.push(c)});e=a;a+=b.length;d=!1},"json"))};window.onfocus=
function(){};window.onblur=function(){};j();h.scroll(function(){var b=i.children(":first");if(h.height()+document.body.scrollTop>b.offset().top){for(var b=0,a=[],d={};10>b;b+=1)(d=ZemRPResponse.shift())&&a.push(d);var e=c(".related_post"),f=e.find("li").last().data("position")+1,g;c.each(a,function(b,a){g=c('<li data-position="'+f+'" data-poid="'+a.id+'"><a href="'+a.url+'" class="wp_rp_thumbnail">'+a.img+'</a><a href="'+a.url+'" class="wp_rp_title">'+a.title+"</a></li>");g.data("position",f);g.data("poid",
a.id);e.append(g);f+=1});20>=ZemRPResponse.length&&j()}})});
