function AddArticleInfo(n,t,i,r,u){var f=jQuery(n),e=f.offset().top,o=e+f.height();articles.push({start:e,end:o,title:t,url:i,image:r,description:u})}function AdjustHeader(n){"use strict";var t=jQuery("#"+n+"_headerContent"),r=jQuery("#"+n+"_fullImage"),i=jQuery("#"+n+"_sticky-description");window.setHeight=function(){if(t.length!==0){var n=t.offset().top,u=n+r.height(),f=$window.height()+$window.scrollTop(),e=Math.min(u,f),o=i.children(".b-grid-table__cell").height(),s=Math.abs(e-o-n);i.css("top",s+"px")}};$window.on("resize",setHeight);setHeight()}function ScrollToElement(n,t,i){n.preventDefault();var r=jQuery(n.target).attr("href"),u=jQuery(r).offset().top;jQuery("body,html").animate({scrollTop:u+(jQuery(window).scrollTop()>0?t:i)},1500)}function SetRightColumn(n,t,i){var u=0,e=[],f=4,r;jQuery.each(jQuery('div[id*="art_'+n+'_c"]'),function(n,t){var i=jQuery(t),r=i.height(),f=Math.floor(r/blockHeightWithMargin);f>0&&(u=u+r,e.push({id:i.attr("id"),blocksCount:f}))});u>=t&&(f=5);u>=i&&(f=7);r=1;jQuery.each(e,function(t,i){for(var e,o=jQuery("#"+i.id),u=1;u<=i.blocksCount;u++){if(r>f)return;e=jQuery("#art_"+n+"_r"+r);o.append(e);ActivateDelayedBanner(n,r);r++}});AdjustRightColumn(n)}function SetSticky(n){var t={offset_top:80,offset_bottom:20,spacer:!1};jQuery("#art_"+n+"_r2 > div").stick_in_parent(t);jQuery("#art_"+n+"_r5 > div").stick_in_parent(t)}function ActivateDelayedBanner(n,t){var r=jQuery("#art_"+n+"_r"+t+" div[banner-container]"),i;r&&(i=r.attr("id"),i&&window.delayedBanners&&window.delayedBanners[i]&&typeof window.delayedBanners[i]=="function"&&window.delayedBanners[i]())}function AdjustRightColumn(n){var r=screen.height,u=jQuery("#art_"+n+"_r2"),t=jQuery("#art_"+n+"_r5"),o=u.parent(),l=t.parent(),f,e,v,i,a,s,c,h;o.is(l)?(f=o.children('div[id*="art_'+n+'_r"]').length,e=o.height(),i=e-blockHeightWithMargin*f,i+blockHeightWithMargin<=r?(u.height(blockHeight),t.height(blockHeight),t.css("margin-top",blockMargin+i-12+"px")):(a=i+blockHeightWithMargin*2-r,a>i/2?(s=i/2,c=i/2-(r-blockHeightWithMargin*2),s>r-blockHeight&&(c=c+s-(r-blockHeight),s=r-blockHeight),u.height(blockHeight+s),t.height(blockHeight+c),t.css("margin-top",blockMargin+r-blockHeightWithMargin*2-12+"px")):(u.height(blockHeight+a),t.height(blockHeight),t.css("margin-top",blockMargin+r-blockHeightWithMargin*2-12+"px")))):(f=o.children('div[id*="art_'+n+'_r"]').length,e=o.height(),i=e-blockHeightWithMargin*f,u.height(blockHeight+i),f=l.children('div[id*="art_'+n+'_r"]').length,e=l.height(),i=e-blockHeightWithMargin*f,h=t.offset().top-(u.offset().top+u.height()),h<r?i<=r-h?(t.height(blockHeight),t.css("margin-top",blockMargin+i-12+"px")):(t.height(blockHeight+i-(r-h)),t.css("margin-top",blockMargin+r-h-12+"px")):t.height(v))}var articles=[],articleReturnUrl,currentArticle=0,$window=jQuery(window),$ogTitle=jQuery('meta[property="og:title"]'),$title=jQuery("title"),$ogImage=jQuery('meta[property="og:image"]'),$ogDescription=jQuery('meta[property="og:description"]');jQuery(function(){$window.on("scroll",function(){var n=$window.scrollTop()+$window.height()/2;jQuery.each(articles,function(t,i){if(t!==currentArticle&&n>=i.start&&n<i.end){currentArticle=t;var r={path:i.url,scrollTop:0};window.UpdateLoginUrl&&typeof UpdateLoginUrl=="function"&&window.UpdateLoginUrl(i.url);window.history.replaceState(r,i.title,i.url);$ogTitle.attr("content",i.title);$title.text(i.title);$ogImage.attr("content",i.image);$ogDescription.attr("content",i.description);return}})})});jQuery(function(){jQuery(".b-template-table").wrap("<div class='b-wrapper-table'><\/div>");jQuery(".b-sorting-table").tablesorter();browser.msie11||(jQuery(".b-table-pager").tablesorterPager({container:jQuery(".pager")}),jQuery("#pager").hide());jQuery(".all_in_pager").click(function(){var n=jQuery(this);n.data("showed")?(jQuery(".b-table-pager").tablesorterPager({container:jQuery(".pager"),size:20}),jQuery(".all_in_pager").text("Весь список"),jQuery(".next_pager").show(),jQuery(".prev_pager").show(),n.data("showed",!1)):(jQuery(".b-table-pager").tablesorterPager({container:jQuery(".pager"),size:9999}),jQuery(".all_in_pager").text("Постранично"),jQuery(".next_pager").hide(),jQuery(".prev_pager").hide(),n.data("showed",!0))})});var blockHeight=400,blockMargin=45,blockHeightWithMargin=445;(function(n){var t=function(n){function o(){if(u){t&&console.debug("DpGoogleCharts already inited");return}t&&console.debug("DpGoogleCharts start loading");u=!0;n.charts.load(e,{packages:["corechart","charteditor"]});n.charts.setOnLoadCallback(function(){t&&console.debug("google.charts.setOnLoadCallback reached");r=!0;f()});setTimeout(function(){r=!0;f()},5e3)}function s(n){r?(t&&console.debug("addChartCallback => cb runned"),setTimeout(n,200)):(t&&console.debug("addChartCallback => cb added"),i.push(n))}function f(){if(!r){t&&console.debug("renderCharts => charts not loaded yet");return}if(i.length===0){t&&console.debug("renderCharts => charts already loaded, but not callbacks provided");return}for(t&&console.debug("renderCharts => total count: "+i.length);i.length>0;)i[0](),i.splice(0,1)}var r=!1,i=[],u=!1,t=!0,e="45";return o(),{addChartCallback:s}};window.dpGoogleCharts||(window.dpGoogleCharts=new t(n))})(google)