_dafa = window._dafa || []; if( typeof renY == 'undefined') { renY = function(n){var e,t,a,i,o;(null==window.ylist&&(window.ylist=[]),window.ylist.indexOf(n)>=0)||(window.ylist.push(n),e=window,t=window.document,e[a="yandexContextAsyncCallbacks"]=e[a]||[],e[a].push(function(){Ya.Context.AdvManager.render({blockId:n.slice(11),renderTo:n,async:!0,onRender:function(e){onAppear(document.getElementById(n),function(){_dafa.push(["trackConversion","rbyyandex",this.id.slice(11),null])}),window.appearHandler.check()}})}),o=t.getElementsByTagName("script")[0],(i=t.createElement("script")).type="text/javascript",i.src="//an.yandex.ru/system/context.js",i.async=!0,o.parentNode.insertBefore(i,o))} } if( typeof renYVsp == 'undefined') { renYVsp = function(n){var e,t,a,i,o;(null==window.ylist&&(window.ylist=[]),window.ylist.indexOf(n)>=0)||(window.ylist.push(n),e=window,t=window.document,e[a="yandexContextAsyncCallbacks"]=e[a]||[],e[a].push(function(){Ya.Context.AdvManager.render({blockId:n.slice(11),renderTo:n,type:'fullscreen',platform:'touch',async:!0,onRender:function(e){ _dafa = window._dafa || []; _dafa.push(["trackConversion","rbyyandex",n.slice(11),null]) }})}),o=t.getElementsByTagName("script")[0],(i=t.createElement("script")).type="text/javascript",i.src="//an.yandex.ru/system/context.js",i.async=!0,o.parentNode.insertBefore(i,o))} } _dafa.push( ['trackMarker', 'RSYA 20-12-16', 'nn' ] ) var template = 'nn', isMobile = window.matchMedia("only screen and (max-width: 640px)").matches, full = new RegExp('/full/').exec(window.location.href) document.addEventListener( 'readystatechange', function () { if (document.readyState != "complete") return; if( isMobile ) { var header = document.querySelector( 'header' ), footer = document.body.lastChild, firstBlock = document.createElement( 'div' ), secondBlock = document.createElement( 'div' ) if( template == 'ya' || template == 'ya_top' || ( template == 'ys' && document.body.classList.contains( 'page_article' ) && full == null ) || ( template == 'ys_top' && document.body.classList.contains( 'page_article' ) && full == null ) ) { firstBlock.id = 'XXXXX' firstBlock.classList.add( 'rbyyandex' ) header.after( firstBlock ) renY( firstBlock.id ); } if( template == 'ya' || template == 'ya_vsp' || ( template == 'ys' && document.body.classList.contains( 'page_article' ) && full == null ) || ( template == 'ys_vsp' && document.body.classList.contains( 'page_article' ) && full == null ) ) { secondBlock.id = 'XXXXX' secondBlock.classList.add( 'rbyyandex' ) footer.after( secondBlock ) renYVsp( secondBlock.id ); } } })