var newsPaging={onPageLoad:!1,isNewsList:!1,init:function(){window.onpopstate=function(n){var t=n.state;t!==null&&typeof t!="undefined"&&newsPaging.insertTable(t)};window.onload=function(){var n=history.state;n!==null&&typeof n!="undefined"&&newsPaging.insertTable(n)}},setPageHistory:function(n){var r,i,u;if(newsPaging.isNewsList!==!1){var f=$.param({newsPage:n+1}),e=$(".jq-newsList").parent().html(),o={table:e,page:n+1},t=window.location.href;t=t.replace(/(&|\?)newsPage=\d+/g,"");r=/[\?]/;i="";i=r.test(t)?"&":"?";u=`${t}${i}${f.toString()}`;history.replaceState(o,"",u);newsPaging.isNewsList=!1}},insertTable:function(n){var r=$(".jq-newsList").parent(),t,i;r.html(n.table);t=$(".jq-newsList").parent().find(".morelink");t.length&&typeof pagerDictionary!="undefined"&&(i=t.attr("id"),pagerDictionary[i]=n.page)},checkPager:function(n){var t=n.closest("#pagebodycontent");newsPaging.isNewsList=t.children(".jq-newsList").length?!0:!1},checkForVideoThumbs:function(){var n,t;(typeof newsPaging.videoCheckUrl=="undefined"||newsPaging.videoCheckUrl===null||newsPaging.videoCheckUrl!=="")&&(n=$(".jq-videothumb"));t=n.removeClass("jq-videothumb").addClass("jq-videothumbfetching").map(function(){var n=$(this);return n.prop("id")+"|"+n.closest(".jq-fig").data("emptyfileids")}).get().join(";");$.ajax({url:newsPaging.videoCheckUrl,data:"ids="+t,method:"POST",success:function(n){if(typeof n.args!="undefined"){var t=JSON.parse(n.args[0]);$.each(t,function(n,t){var i=$("#"+t.rowGuid).removeClass("jq-videothumbfetching");(t.src||!1)&&i.prop("src",t.src)})}},complete:function(){$(".jq-videothumbfetching",n).addClass("jq-videothumb").removeClass("jq-videothumbfetching")}})}}