window.Ya||(window.Ya={});
Ya.URL||(Ya.URL=function(g,d){function l(){return i.hash.substr(1)}var i=g.location;return{parseQuery:function(c,d,g){var f={},j,e,a,b;if(!c)return f;d||(d="&");g||(g="=");c=c.split(d);for(a=0,b=c.length;a<b;++a){d=c[a].split(g);try{j="undefined"!==typeof d[1]?decodeURIComponent(d[1]):"",e=decodeURIComponent(d[0]),f.hasOwnProperty(e)?Array.isArray(f[e])?f[e].push(j):f[e]=[f[e],j]:f[e]=j}catch(h){}}return f},buildQuery:function(c,d,g){var f="",j,e,a,b,h;if(!c)return f;d||(d="&");g||(g="=");for(h in c)if(c.hasOwnProperty(h)){e=
[].concat(c[h]);for(a=0,b=e.length;a<b;++a)j=typeof e[a],j="object"===j||"undefined"===j?"":encodeURIComponent(e[a]),f+=d+encodeURIComponent(h)+g+j}return f.substr(d.length)},removeQueryParams:function(c,d){var g=d.join("|");d.length&&(c=c.replace(RegExp("("+g+")(=[^&]*)(&|$)","g"),""));return c.replace(/&(?=&|$)/g,"")},onHashChange:function(){function c(){var a=l();a!==f&&("function"===typeof g&&g(f),f=a);j=setTimeout(c,e)}var g,i="onhashchange"in d,f=l(),j,e=100;return function(a){i?d.onhashchange=
function(){a(f);f=l()}:(g=a,j||c())}}(),setHash:function(c,d){d?i.replace(i.pathname+i.search+"#"+c):i.hash="#"+c},getHash:l}}(document,window));window.Ya||(window.Ya={});
Ya.Site||(Ya.Site=function(g,d){function l(){return o.staticHost+"v"+a+"/js/"}function i(a,b){var c=g.createElement("script"),h=g.head||g.getElementsByTagName("head")[0]||g.documentElement;c.type="text/javascript";c.async=!0;c.charset="utf-8";c.src=a;h.insertBefore(c,h.firstChild);c.onload=c.onreadystatechange=function(){var a=c.readyState;if(!a||"loaded"===a||"complete"===a)"function"===typeof b&&b(),h&&c.parentNode&&h.removeChild(c),c=c.onload=c.onreadystatechange=null}}function c(a){var b=a,c,
h=0,d=g.getElementsByTagName("head")[0],e,s,j=function(a){return b[a].kamikaze?function(){b[a].callback();g.getElementsByTagName("head")[0].removeChild(s)}:b[a].callback},i=function(a){"undefined"!==typeof c.onreadystatechange?c.onreadystatechange=function(){if("complete"===this.readyState||"loaded"===this.readyState)a(),a=function(){}}:c.onload=a};for(f(a)||(b=[a]);h<b.length;h++)c=g.createElement(b[h].tag),"script"===b[h].tag?(c.setAttribute("type","text/javascript"),b[h].defer&&(c.defer=!0),e=
"src"):"link"===b[h].tag?(c.setAttribute("rel","stylesheet"),e="href"):"style"===b[h].tag&&c.setAttribute("type","text/css"),b[h].callback&&"function"===typeof b[h].callback&&i(j(h)),b[h].source?c.setAttribute(e,b[h].source):b[h].innerHTML&&("style"===b[h].tag?c.styleSheet?c.styleSheet.cssText=b[h].innerHTML:c.appendChild(g.createTextNode(b[h].innerHTML)):c.innerHTML=b[h].innerHTML),s=d.appendChild(c)}function m(){var a=p.fn.jquery;return a>=j&&a<=e}function k(a,b){switch(a){case "type":return b===
parseInt(b,10)&&0<=b&&5>=b;case "webopt":case "websearch":case "arrow":case "suggest":case "site_suggest":case "fake":return"boolean"===typeof b;case "bg":return/^#[0-9a-f]{6}|transparent$/i.test(b);case "fg":return/^#[0-9a-f]{6}$/i.test(b);case "fontsize":return b===parseInt(b,10);case "encoding":return/^[a-z0-9_\-]*$/i.test(b);case "language":return/ru|uk|en|tr/.test(b);case "logo":return/rb|rw|ww/.test(b);case "tld":return/ru|ua|by|kz|com|com.tr/.test(b);case "searchid":case "clid":return/^[0-9]{0,20}$/.test(b);
case "target":return/_self|_blank/.test(b);case "p":return/^[0-9]*$/.test(b);case "web":case "noreask":return/0|1/.test(b);case "how":return/tm/.test(b);case "constraintid":case "date":case "within":case "from_day":case "from_month":case "from_year":case "to_day":case "to_month":case "to_year":case "publicname":return!0;case "surl":case "text":case "action":return"string"===typeof b;case "htmlcss":case "updatehash":return!0;default:return!1}}function f(a){return"[object Array]"===Object.prototype.toString.call(a)}
var j="1.4.0",e="1.6.2",a="2.0",b="initial",h=[],s=g.location,p=d.jQuery,t,n="https:"===s.protocol?"https:":"http:",r=[],u=!1;"CSS1Compat"!==g.compatMode&&(g.documentElement.className+=" ya-page_css_quirks");var o={staticHost:n+"//site.yandex.net/",serp:n+"//yandex.%tld%/sitesearch",suggest:n+"//sitesuggest.yandex.ru/suggest-ya.cgi?v=2",suggest_tr:n+"//sitesuggest.yandex.com.tr/suggest-ya.cgi?v=3&uil=tr",jquery:n+"//yandex.st/jquery/1.6.2/jquery.min.js",serpStatic:n+"//yandex.st/sitesearch2/36.1.7/pages/",
opensearch:"//yandex.ru/sitesearch/opensearch.xml?"};if(d.ya_site_path)for(var q in ya_site_path)ya_site_path.hasOwnProperty(q)&&(o[q]="http"===ya_site_path[q].substr(0,4)?ya_site_path[q]:n+ya_site_path[q]);return{appendToHead:c,i18n:{ru:function(){var a=a||{};a.site=a.site||{};a.site.external_form={btn_find:function(){return"\u041d\u0430\u0439\u0442\u0438"},webopt_internet:function(){return"\u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435"},webopt_site:function(){return"\u043d\u0430 \u0441\u0430\u0439\u0442\u0435"},
yandex:function(){return"\u042f\u043d\u0434\u0435\u043a\u0441"}};a=a||{};a.site=a.site||{};a.site.external_frame={loading_results:function(){return"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f..."}};return a.site},uk:function(){var a=a||{};a.site=a.site||{};a.site.external_form={btn_find:function(){return"\u0417\u043d\u0430\u0439\u0442\u0438"},webopt_internet:function(){return"\u0432 \u0456\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0456"},
webopt_site:function(){return"\u043d\u0430 \u0441\u0430\u0439\u0442\u0456"},yandex:function(){return"\u042f\u043d\u0434\u0435\u043a\u0441"}};a=a||{};a.site=a.site||{};a.site.external_frame={loading_results:function(){return"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0438 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0443\u044e\u0442\u044c\u0441\u044f..."}};return a.site},en:function(){var a=a||{};a.site=a.site||{};a.site.external_form={btn_find:function(){return"Search"},webopt_internet:function(){return"internet"},
webopt_site:function(){return"website"},yandex:function(){return"Yandex"}};a=a||{};a.site=a.site||{};a.site.external_frame={loading_results:function(){return"Loading results..."}};return a.site},tr:function(){var a=a||{};a.site=a.site||{};a.site.external_form={btn_find:function(){return"Bul "},webopt_internet:function(){return"internette "},webopt_site:function(){return"sitede "},yandex:function(){return"Yandex'te"}};a=a||{};a.site=a.site||{};a.site.external_frame={loading_results:function(){return"Sonu\u00e7lar y\u00fckleniyor..."}};
return a.site}},loadJS:i,loadJQuery:function(a,c){c=c||this;p&&m()&&(Ya.Site.$=Ya.jQuery=p,b="loaded");"loaded"===b?setTimeout(function(){a.call(c,Ya.Site.$)},50):(h.push({callback:a,ctx:c}),"initial"===b&&(b="loading",i(o.jquery,function(){"undefined"!==typeof d.jQuery&&(p=d.jQuery);Ya.Site.$=Ya.jQuery=p.noConflict(!0);for(b="loaded";h.length;){var a=h.shift();a.callback.call(a.ctx,Ya.Site.$)}})))},loadEasyXDM:function(a){if(t)a(t);else{var b=!1,c=!1;"object"===typeof d.JSON&&d.JSON?b=!0:i(l()+"json.js",
function(){b=!0;c&&a(t)});i(l()+"easyxdm.js",function(){c=!0;t=d.easyXDM;b&&a(t)})}},queryParams:Ya.URL.parseQuery(s.search.substr(1).replace(/\+/g," ")),isValidParam:k,pathToImages:function(b){var c={ru:"",uk:"",en:"en/",tr:"en/"};return o.staticHost+"v"+a+"/i/"+(b&&k("language",b)?c[b]:"")},pathToJS:l,pathToSuggest:function(a){return"tr"===a?o.suggest_tr:o.suggest},pathToSerp:function(a){return o.serp.replace("%tld%",a||"ru")},pathToSerpStatic:function(){return o.serpStatic},pathToOpensearch:function(a){return o.opensearch.replace("%tld%",
a||"ru")},addEvent:function(a,b,c){d.addEventListener?a.addEventListener(b,c,!1):a.attachEvent("on"+b,c)},removeEvent:function(a,b,c){d.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent("on"+b,c)},isArray:f,VERSION:a,pushOpensearch:function(a){var b={SERP:a.SERP,sid:a.sid,web:a.web,lang:a.lang,tld:a.tld};a.title&&(b.title=a.title);a.action&&(b.action=a.action);a.favicon&&(b.favicon=a.favicon);a.delayed&&(b.delayed=a.delayed);f(r)||(r=[]);r.push(b);c({tag:"script",defer:!0,kamikaze:!0,
source:l()+"opensearch.js",callback:function(){}})},getOpensearch:function(){var a;if(!u&&r.length){for(var b=0,c=r.length;b<c;b++)if(r[b].SERP){a=r[b];u=!0;break}a||(a=r[0])}else a=null;r=[];return a}}}(document,window));
Ya.Site.Form||(Ya.Site.Form=function(g,d){function l(){switch(m){case "jquery_loading":break;case "jquery_loaded":i();m="inited";break;case "inited":i();break;default:j.loadJQuery(function(a){m="jquery_loaded";k=a;l()}),m="jquery_loading"}}function i(){k("div."+c.blockName+"_inited_no").each(function(){new c(this)})}function c(a){this.node=a;this.$node=k(a);var b=this.$node.find('input[name="text"]'),h=b.val();0!==b.length&&(this.id=c.blockName+c.instances.length,a.id=this.id,this.buildParams(),this.params.searchid&&
(this.i18n_keyset=j.i18n[this.params.language]().external_form,this.buildAction().buildCSS().buildHTML().buildSuggest().buildInputHint().addOpensearch().initEvents(),this.set({text:h,web:+this.params.websearch+""}),f&&f[this.params.searchid]&&this.set(f[this.params.searchid]),this.show(),d.$&&d.$.fn&&d.$.fn.trigger&&d.$(this.node).trigger("Ya.ya-site-form-ready"),c.instances.push(this)))}var m="not_inited",k,f,j=Ya.Site,e=c.prototype;e.buildAction=function(){var a=this.params.action.split("?");this.action=
a[0];this.userParams=a[1]?Ya.URL.removeQueryParams(a[1],["text","web","searchid","l10n","reqenc"]):"";return this};e.buildParams=function(){this.params={};this.buildOnclickParams();return this};e.buildOnclickParams=function(){var a="function"===typeof this.node.onclick&&this.node.onclick()||{},b,h;for(b in c.onclickParams)c.onclickParams.hasOwnProperty(b)&&(h=a[b],this.params[b]="undefined"!==typeof h&&j.isValidParam(b,h)?h:c.onclickParams[b]);this.node.onclick=null;this.node.removeAttribute("onclick");
return this};e.buildCSS=function(){var a="",b=-1!==d.navigator.userAgent.toLowerCase().indexOf("msie")&&(!g.documentMode||8>g.documentMode),a=a+"#ya-site-form,#ya-site-form .ya-site-form__form,#ya-site-form .ya-site-form__input,#ya-site-form .ya-site-form__input-text,#ya-site-form .ya-site-form__submit,#ya-site-form .ya-site-form__search-precise{font-size:12px!important;color:#000!important}#ya-site-form .ya-site-form__form-form{display:block}#ya-site-form .ya-site-form__form-form,#ya-site-form .ya-site-form__input,#ya-site-form .ya-site-form__search-precise,#ya-site-form .ya-site-form__search-precise__radio,#ya-site-form .ya-site-form__gap,#ya-site-form .ya-site-form__gap-i,#ya-site-form .ya-site-form__logo-img{margin:0;padding:0}#ya-site-form{margin:0!important;padding:0!important}#ya-site-form .ya-site-form__logo-wrap{width:65px;vertical-align:top;border-collapse:collapse}#ya-site-form .ya-site-form__logo{display:block;width:52px;margin:0;padding:0 6px 0 0;text-decoration:none}#ya-site-form .ya-site-form__logo-img{width:52px;height:21px;border:0!important}#ya-site-form .ya-site-form__search-wrap{border-collapse:collapse}#ya-site-form .ya-site-form__search{font-size:12px!important;width:100%}#ya-site-form .ya-site-form__search-input,#ya-site-form .ya-site-form__search-precise,{border:0}#ya-site-form .ya-site-form__search-input{padding:6px}#ya-site-form .ya-site-form__search-input-layout,#ya-site-form .ya-site-form__search-input-layout-l,#ya-site-form .ya-site-form__search-input-layout-r{font-size:12px!important;padding:0;vertical-align:middle;border:0;border-collapse:collapse}#ya-site-form .ya-site-form__search-input-layout,#ya-site-form .ya-site-form__search-input-layout-l{width:100%}#ya-site-form .ya-site-form__search-precise{padding:0 18px 5px 6px;text-align:left;vertical-align:top}#ya-site-form .ya-site-form__search-precise-i{white-space:nowrap}#ya-site-form .ya-site-form__search-precise__radio{width:auto;margin:0 .3em 0 0;vertical-align:middle;background:none}#ya-site-form .ya-site-form__search-precise__label{margin:0 .4em 0 0;padding:0;vertical-align:middle}#ya-site-form .ya-site-form__input-text{width:100%;margin:0!important;cursor:text;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #7f9db9;outline-style:none}#ya-site-form .ya-site-form__input-text_type_hint{background-repeat:no-repeat;background-position:.2em 50%}#ya-site-form .ya-site-form__submit{display:block;width:auto;margin:0 0 0 5px}#ya-site-form .ya-site-form__arrow-wrap{overflow:hidden;width:30px;padding:0;vertical-align:middle}#ya-site-form .ya-site-form__arrow{position:relative}#ya-site-form .ya-site-form__arrow-a{position:absolute;top:50%;right:0;width:0;height:0;margin-top:-59px;border:solid transparent;border-width:59px 0 59px 30px;-moz-border-end-style:dotted}#ya-site-form .ya-site-form__wrap{width:100%;table-layout:fixed;border-collapse:collapse}#ya-site-form .ya-site-form__gap{border:0}#ya-site-form .ya-site-form__gap-i{width:9em}#ya-site-form.ya-site-form_arrow_yes .ya-site-form__search-input{padding-right:0}#ya-site-form.ya-site-form_logo_left .ya-site-form__logo{margin-top:4px;margin-left:5px}#ya-site-form.ya-site-form_logo_top .ya-site-form__logo{display:block;margin:6px 0 0 6px}#ya-site-form .ya-site-form__submit_type_image{width:19px;height:15px;outline:none;cursor:pointer;border:0}";
b&&(a+="#ya-site-form .ya-site-form__logo{-font:0/0 a!important;-height:21px;-cursor:pointer}#ya-site-form .ya-site-form__logo-img{-display:none}#ya-site-form .ya-site-form__arrow-wrap{position:relative}#ya-site-form .ya-site-form__arrow{overflow:hidden;position:absolute;top:0;right:0;bottom:0;left:0}#ya-site-form .ya-site-form__input{zoom:1;padding-right:4px}* html #ya-site-form .ya-site-form__input-text{float:left}.ya-page_css_quirks #ya-site-form .ya-site-form__input{padding-right:0}#ya-site-form .ya-site-form__submit{-margin-left:8px}.ya-page_css_quirks #ya-site-form .ya-site-form__submit{-margin-left:5px}#ya-site-form .ya-site-form__submit_type_image{-margin-left:5px}#ya-site-form .ya-site-form__search-precise__radio{margin:-3px 3px -3px -3px}#ya-site-form .ya-site-form__gap,#ya-site-form .ya-site-form__gap-i{font:0/0 a!important}#ya-site-form .ya-site-form__gap-i{width:110px}#ya-site-form.ya-site-form_arrow_yes .ya-site-form__search-input{-padding-right:6px}#ya-site-form.ya-site-form_arrow_yes .ya-site-form__arrow-wrap{-display:none}");
a+="#ya-site-form ."+c.blockName+"__submit_type_image { background: url("+this.pathToImages()+"search.png) no-repeat }";a+="#ya-site-form ."+c.blockName+"__input-text_type_hint { background-image:url("+this.pathToImages()+"yandex-hint.png) }";a+="#ya-site-form ."+c.blockName+"__form * { font-size: "+this.params.fontsize+"px !important }";a+="#ya-site-form ."+c.blockName+"__search, #ya-site-form ."+c.blockName+"__search td, #ya-site-form .yaform__precise-i { background-color: "+this.params.bg+" !important }";
a+="#ya-site-form ."+c.blockName+"__search-precise__label { color:"+this.params.fg+" !important }";a+="#ya-site-form ."+c.blockName+"__arrow-a { border-left-color: "+this.params.bg+" }";b&&(a+="#ya-site-form ."+c.blockName+"__gap, #ya-site-form ."+c.blockName+"__gap-i { font: 0/0 a !important }",a+="#ya-site-form ."+c.blockName+"__logo { background: url(#); -filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+this.pathToImages()+"yandex52x21x24-"+this.params.logo+".png) }");k("head").append('<style type="text/css">'+
a.replace(/#ya-site-form/g,"#"+this.id)+"</style>");return this};e.buildHTML=function(){var a="",b,h="",f="",d="";this.isArrow()&&(this.$node.addClass(c.blockName+"_arrow_yes"),d='<td class="'+c.blockName+'__arrow-wrap"><div class="'+c.blockName+'__arrow"><div class="'+c.blockName+'__arrow-a"></div></div></td>');b='<td class="'+c.blockName+'__logo-wrap"><a class="'+c.blockName+'__logo" href="http://www.yandex.'+this.params.tld+'"><img class="'+c.blockName+'__logo-img"src="'+this.pathToImages()+"yandex52x21x24-"+
this.params.logo+'.png"alt="'+this.i18n("yandex")+'"/></a></td>';this.isTopLogo()&&(this.$node.addClass(c.blockName+"_logo_top"),f="<tr>"+b+"</tr>");this.isLeftLogo()&&(this.$node.addClass(c.blockName+"_logo_left"),h=b);this.isTransparent()&&this.$node.addClass(c.blockName+"_bg_transparent");this.isInputHint()&&this.$node.addClass(c.blockName+"_logo_hint");this.isRadioButtons()&&(a='<tr><td class="'+c.blockName+'__search-precise"><span class="'+c.blockName+'__search-precise-i"><input class="'+c.blockName+
'__search-precise__radio"type="radio" name="web" value="0" id="'+this.id+'__radio-0"/><label class="'+c.blockName+'__search-precise__label"for="'+this.id+'__radio-0">'+this.i18n("webopt_site")+'</label></span> <span class="'+c.blockName+'__search-precise-i"><input class="'+c.blockName+'__search-precise__radio"type="radio" name="web" value="1" id="'+this.id+'__radio-1"/><label class="'+c.blockName+'__search-precise__label"for="'+this.id+'__radio-1">'+this.i18n("webopt_internet")+"</label></span></td></tr>");
b=this.isImageButton()?'<input class="'+c.blockName+"__submit "+c.blockName+'__submit_type_image" type="button" value="" />':'<input class="'+c.blockName+'__submit" type="button" value="'+this.i18n("btn_find")+'" />';this.$node.html('<div class="'+c.blockName+'__form"><table class="'+c.blockName+'__wrap" cellpadding="0" cellspacing="0"><tr>'+h+'<td class="'+c.blockName+'__search-wrap">'+('<table class="'+c.blockName+'__search" cellpadding="0" cellspacing="0">'+f+'<tr><td class="'+c.blockName+'__search-input">'+
('<table class="'+c.blockName+'__search-input-layout"><tr><td class="'+c.blockName+'__search-input-layout-l"><div class="'+c.blockName+'__input"><input name="text" type="text" value="" class="'+c.blockName+'__input-text" /></div></td><td class="'+c.blockName+'__search-input-layout-r">'+b+"</td></tr></table>")+"</td></tr>"+a+'<tr><td class="'+c.blockName+'__gap"><div class="'+c.blockName+'__gap-i" /></td></tr></table>')+"</td>"+d+"</tr></table></div>");this.$input=this.$node.find("input[name=text]");
this.$button=this.$node.find("input[type=button]");return this};e.buildSuggest=function(){if(!this.isSuggest())return this;var a=this,b=k('<div class="ya-site-suggest" />').insertAfter(this.$input);Ya.Site.Suggest.add(b,{$input:a.$input,$form:a.$node,$button:a.$button,getURL:function(){return a.pathToSuggest()+"&callback=?&site=%23"+a.params.searchid},id:this.id,sid:a.params.searchid,permanent:!0});a.$node.bind("submit",function(b,c){a.submit(c)});return this};e.buildInputHint=function(){if(!this.isInputHint())return this;
var a=c.blockName+"__input-text_type_hint",b=this.$input,h=!1;b.focus(function(){h=!0;b.removeClass(a)}).blur(function(){h=!1}).bind("blur change",function(){b.val()?b.removeClass(a):h||b.addClass(a)}).blur();return this};e.initEvents=function(){var a=this;a.isSuggest()||(a.$button.click(function(b){a.submit(b.type)}),a.$input.keypress(function(b){13===b.keyCode&&a.submit(b.type)}));return this};e.submit=function(a){"_self"!==this.params.target?"mousedown"!==a&&d.open(this.buildSubmitURL(),"ya_site_results"):
g.location.href=this.buildSubmitURL();return this};e.buildSubmitURL=function(){var a=this.action+"?searchid="+this.params.searchid+"&text="+encodeURIComponent(this.$input.val())+"&web="+this.getWebParam(),b="undefined"!==typeof this.params.constraintid&&null!==this.params.constraintid?"&constraintid="+this.params.constraintid:"";this.isYandexPageResults()?a+="&l10n="+this.params.language+b:(this.userParams&&(a+="&"+encodeURI(this.userParams)),this.hash?a+="#"+this.hash.replace(/(^noreask=[^&]*&?|&noreask=[^&]*)/,
""):""!==b&&(a+="#"+b.substr(1)));return a};e.i18n=function(a){var b=this.i18n_keyset[a],c=Array.prototype.slice.call(arguments,1);return b.apply(d,c)};e.isImageButton=function(){return-1!==k.inArray(this.params.type,[1,3,4])};e.isInputHint=function(){return-1!==k.inArray(this.params.type,[2,3])};e.isTopLogo=function(){return-1!==k.inArray(this.params.type,[4,5])};e.isLeftLogo=function(){return-1!==k.inArray(this.params.type,[0,1])};e.isRadioButtons=function(){return this.params.webopt};e.isArrow=
function(){return this.isTransparent()?!1:this.params.arrow};e.isTransparent=function(){return"transparent"===this.params.bg};e.isSuggest=function(){return this.params.suggest};e.isYandexPageResults=function(){return/yandex\..{2,6}\/sitesearch/.test(this.params.action)};e.pathToImages=function(){return j.pathToImages(this.params.language)};e.pathToSuggest=function(){return j.pathToSuggest(this.params.language)};e.show=function(){this.$node.removeClass(c.blockName+"_inited_no").addClass(c.blockName+
"_inited_yes");return this};e.hide=function(){this.$node.removeClass(c.blockName+"_inited_yes").addClass(c.blockName+"_inited_no");return this};e.getWebParam=function(){return this.isRadioButtons()?this.$node.find('input[name="web"]:checked').val():this.params.websearch?"1":"0"};e.setWebParam=function(a){this.isRadioButtons()&&this.$node.find('input[name="web"][value="'+a+'"]').attr("checked","checked");return this};e.set=function(a){a.hasOwnProperty("text")&&j.isValidParam("text",a.text)&&this.$input.val(a.text).change();
a.hasOwnProperty("web")&&j.isValidParam("web",a.web)&&(this.setWebParam(a.web),this.params.websearch="1"===a.web);a.hasOwnProperty("hash")&&(this.hash=a.hash);return this};e.addOpensearch=function(){Ya.Site.pushOpensearch({SERP:!1,action:this.action,sid:this.params.searchid,web:this.getWebParam(),lang:this.params.language,tld:this.params.tld,title:this.params.publicname||location.hostname});return this};c.instances=[];c.blockName="ya-site-form";c.onclickParams={type:2,logo:"rb",arrow:!0,webopt:!1,
websearch:!1,bg:"#ffcc00",fg:"#000000",fontsize:12,suggest:!1,site_suggest:!0,language:"ru",tld:"ru",fake:!1,action:j.pathToSerp(),searchid:null,target:"_self",constraintid:null,publicname:null};return{init:l,instances:c.instances,set:function(a,b){var h,d;f||(f={});f[a]=b;for(h=0,d=c.instances.length;h<d;++h)c.instances[h].params.searchid===a&&c.instances[h].set(b)}}}(document,window));
Ya.Site.Suggest||(Ya.Site.Suggest=function(){function g(){var k,f;switch(l){case "inited":case "suggest_loading":break;case "suggest_loaded":l="inited";for(k=0,f=m.length;k<f;++k)d(m[k][0],m[k][1]);break;default:c.loadJS(c.pathToJS()+"suggest.js",function(){c.loadJQuery(function(d){l="suggest_loaded";i=c.Suggest.getConstructor(d);g()})}),l="suggest_loading"}}function d(c,d){"inited"===l?i.call(c,d):(g(),m.push([c,d]))}var l="not_inited",i,c=Ya.Site,m=[];return{add:d}}());
Ya.Site.Metrika||(Ya.Site.Metrika=function(g,d){function l(f){this.counter=f;if(parseInt(f,10)===f){var j=this,e=function(){var a=d["yaCounter"+f]=new Ya.Metrika({id:f,ut:"noindex"});a.clickmap();a.trackLinks({external:!0})},a=function(a){return function(){j.watch_js_loading=!1;e();a&&a()}};!d.Ya||!Ya.Metrika?c.$(function(){if(k)d.yandex_metrika_callback=a(d.yandex_metrika_callback);else{var b=g,c=b.createElement("script");c.type="text/javascript";c.src="//mc.yandex.ru/metrika/watch.js";c.setAttribute("async",
"true");d.yandex_metrika_callback=a(d.yandex_metrika_callback);b.documentElement.firstChild.appendChild(c);k=!0}}):e()}}var i=g.location,c=Ya.Site,m={},k=!1;l.prototype.hit=function(){!d["yaCounter"+this.counters]&&d["yaCounter"+this.counter].hit&&"function"===typeof d["yaCounter"+this.counter].hit&&d["yaCounter"+this.counter].hit(i.toString());return this};return{addOrHit:function(c){m[c]?m[c].hit():m[c]=new l(c)}}}(document,window));
Ya.Site.Results||(Ya.Site.Results=function(g,d){function l(a,b){function c(){e=Math.abs(e-b)<g?b:e+g*i;d.scrollTo(a,e);e!==b&&setTimeout(c,j)}var e=f.CheckVisibility.getWindowScroll()[1],g=30,j=10,i=b>e?1:-1;c()}function i(a){if(a){var b=this,c=j.getHash(),d=j.removeQueryParams(c,["rpc"]);d!==c&&j.setHash(d,!0);b.node=a;b.buildParams();null===b.params.text||null===b.params.searchid&&null===b.params.clid||(b.searchId=b.params.searchid||b.params.clid,b.addOpensearch(),f.Form&&f.Form.set(b.searchId,
{text:b.params.text,web:b.params.web}),b.i18n_keyset=f.i18n[b.params.language]().external_frame,null!==b.params.htmlcss?Ya.Site.loadJQuery(b.initHTML,b):(j.onHashChange(function(){b.onHashChange()}),b.load()),i.instances.push(this))}}var c=g.location,m="not_inited",k,f=Ya.Site,j=Ya.URL,e=i.prototype;e.onHashChange=function(){var a,b,c,d;if(this.isSilentHashChange)this.isSilentHashChange=!1;else if(a=!1,b={},c=j.parseQuery(j.getHash()),c.rpc)this.processRpcHashParam(c.rpc),delete c.rpc,this.setSearchParams(c);
else{for(d in i.hashParams)i.hashParams.hasOwnProperty(d)&&(b[d]=this.params[d]);this.buildHashParams(c);for(d in i.hashParams)if(i.hashParams.hasOwnProperty(d)&&this.params[d]!==b[d]){a=!0;break}a&&this.load()}};e.processRpcHashParam=function(a){this.onIframeLoad().resizeIframe(parseInt(a,10)).hideLoader();return this};e.buildParams=function(){this.params={};this.buildOnclickParams().buildQueryParams().buildHashParams();return this};e.buildOnclickParams=function(){var a="function"===typeof this.node.onclick&&
this.node.onclick()||{},b,c;for(b in i.onclickParams)i.onclickParams.hasOwnProperty(b)&&(c=a[b],this.params[b]="undefined"!==typeof c&&f.isValidParam(b,c)?c:i.onclickParams[b]);this.node.onclick=null;this.node.removeAttribute("onclick");return this};e.buildQueryParams=function(){var a=f.queryParams,b,c;for(b in i.queryParams)i.queryParams.hasOwnProperty(b)&&(c=a[b],f.isArray(c)&&(c=c[0]),this.params[b]="undefined"!==typeof c&&f.isValidParam(b,c)?c:i.queryParams[b]);return this};e.buildHashParams=
function(a){var b,c;a||(a=j.parseQuery(j.getHash()));for(b in i.hashParams)i.hashParams.hasOwnProperty(b)&&(c=a[b],f.isArray(c)&&"constraintid"!==b&&(c=c[0]),"noreask"===b&&"1"!==c?delete this.params[b]:this.params[b]="undefined"!==typeof c&&f.isValidParam(b,c)?c:i.hashParams[b]);return this};e.createIframe=function(){var a=this;a.rpc=new k.Rpc({remote:a.buildIframeURL(),container:this.node,swf:f.pathToJS()+"easyxdm.swf",local:c.protocol+"//"+c.host+c.pathname+c.search,onReady:function(){a.hideLoader()},
props:{style:{height:"0",width:"100%",minWidth:"400px",minHeight:"600px",margin:"0",borderWidth:"0"},frameBorder:"0",scrolling:"no",allowTransparency:"true"}},{local:{resizeIframe:function(b){a.resizeIframe(b)},setSearchParams:function(b){a.setSearchParams(b)},onLoad:function(b){a.onIframeLoad(b)},checkBlocksVisibility:function(b){b&&f.CheckVisibility.check(a.getIframeNode(),b,function(b){a.rpc.checkedBlock(b)})}},remote:{checkedBlock:{}}});return a};e.resizeIframe=function(a){this.getIframeNode().style.height=
a+"px";return this};e.onIframeLoad=function(a){var b=f.CheckVisibility.getWindowSize(),d=f.CheckVisibility.getWindowScroll(),e=f.CheckVisibility.getBlockOffset(this.getIframeNode());(e[1]>b[1]+d[1]||e[1]<d[1])&&l(0,e[1]);a||(a={});f.$(g).trigger("addOpensearch",a.opensearchTitle||c.hostname);a.counter&&f.Metrika.addOrHit(parseInt(a.counter,10));return this};e.setSearchParams=function(a){var b=j.buildQuery(a),c=j.getHash();this.buildHashParams(a);c!==b&&(this.isSilentHashChange=!0,j.setHash(b,!0));
b=j.removeQueryParams(b,["p","surl","how"]);f.Form&&f.Form.set(this.searchId,{hash:b});return this};e.getIframeNode=function(){return this.iframe||(this.iframe=this.node.getElementsByTagName("iframe")[0])};e.load=function(){var a=this;a.destroy().showLoader();f.loadEasyXDM(function(b){k=b;a.createIframe()});return a};e.isSilentHashChange=!1;e.buildIframeURL=function(){var a=f.pathToSerp(this.params.tld)+"?",b={text:this.params.text,web:this.params.web,l10n:this.params.language,frame:1,v:f.VERSION},
c="searchid,clid,encoding,p,how,surl,constraintid,date,within,from_day,from_month,from_year,to_day,to_month,to_year,noreask".split(","),d,e,g;for(d=0,e=c.length;d<e;++d)g=c[d],this.params[g]&&(b[g]=this.params[g],"surl"===g&&(b.pug="u"));return a+j.buildQuery(b)};e.showLoader=function(a){var b,c=function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};this.loader||(this.loader=g.createElement("div"),this.loader.innerHTML='<table style="color: inherit !important; width: auto; height: 3em; padding: 0.5em 0 0;"><tr><td>'+
this.i18n("loading_results")+'<div style="width: 100%; height: 1em; background: url('+f.pathToImages()+'loader__progress.gif) repeat-x;"></div></td></tr></table>');this.extWrapper?(b={position:"absolute",top:0,left:0,width:"97%",backgroundColor:"#fff",zIndex:999,padding:"20px 0 20px 3%"},c(this.loader.style,b),this.extWrapper.insertBefore(this.loader,this.extWrapper.firstChild)):this.node.appendChild(this.loader);a&&this.extWrapper&&(this.paranja||(this.paranja=g.createElement("div"),a={position:"absolute",
top:0,left:0,width:"100%",height:"100%",backgroundColor:"#fff",opacity:0.8,filter:"alpha(opacity=80)",zIndex:998},b={position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:0,filter:"alpha(opacity=0)",border:0},c(this.paranja.style,a),this.paranja.innerHTML="<iframe></iframe>",c(this.paranja.firstChild.style,b)),this.extWrapper.insertBefore(this.paranja,this.extWrapper.firstChild));return this};e.hideLoader=function(){this.paranja&&this.paranja.parentNode&&this.paranja.parentNode.removeChild(this.paranja);
this.loader&&this.loader.parentNode&&this.loader.parentNode.removeChild(this.loader);return this};e.destroy=function(){this.rpc&&this.rpc.destroy();this.iframe=null;return this};e.i18n=function(a){var b=this.i18n_keyset[a],c=Array.prototype.slice.call(arguments,1);return b.apply(d,c)};e.prepareSerpUrlToHash=function(a){var b=i.getKeysFromObjects([i.onclickParams,i.queryParams,{topdoc:1,html:1}]);return j.removeQueryParams(a,b).replace(RegExp("(^|&)[a-z_]+=(?=(&|$))","g"),"").replace(/^&/,"")};e.initHTML=
function(){var a=this,b=encodeURIComponent(d.location.protocol+"//"+d.location.host+d.location.pathname+d.location.search),c=g.createElement("div"),e=a.node;Ya.Site.$&&function(d){d(e).empty();c.style.position="relative";a.node.appendChild(c);a.extWrapper=a.node.firstChild;a.fetchingInProgress=!1;a.showLoader(!0);d(e).bind("Ya.site-get-results",function(b,c){var d=f.CheckVisibility.getWindowSize(),h=f.CheckVisibility.getWindowScroll(),i=f.CheckVisibility.getBlockOffset(e),q=g.createElement("a");a.fetchingInProgress||
(a.fetchingInProgress=!0,q.setAttribute("href",c.url),q=a.prepareSerpUrlToHash(q.search.substr(1)),!0===a.params.updatehash&&j.setHash(q),a.buildHashParams(j.parseQuery(q)),q=j.removeQueryParams(q,["p","surl","how"]),f.Form&&f.Form.set(a.searchId,{hash:q}),(!a.loader||!a.loader.parentNode)&&a.showLoader(!0),(i[1]>d[1]+h[1]||i[1]<h[1])&&l(0,i[1]),c&&c.url&&f.appendToHead({tag:"script",source:f.pathToSerp(a.params.tld)+c.url,kamikaze:!0}))});d(e).bind("Ya.site-results-delivered",function(b,c){a.loadHTML(c)});
d(e).bind("Ya.site-results-show",function(){a.hideLoader();a.loader.parentNode&&delete a.loader;d(e).find(".b-wrapper").css({display:"block"})});f.appendToHead({tag:"script",source:f.pathToSerpStatic()+"search-htmlcss/_wrapper.js",callback:function(){d(e).trigger("Ya.site-get-results",{url:"?html=1&topdoc="+b+"&"+j.removeQueryParams(j.buildQuery(a.params),["how"])})}})}(Ya.Site.$)};e.loadHTML=function(a){var b=this,e=b.node,i=b.extWrapper,j;(function(k,n){var l=function(a){var b=a.elem.data(a.attrName),
c;if("undefined"===typeof b||"1.4.2"===n.fn.jquery&&null===b)if(c=a.elem.attr("data-"+a.attrName),a.isString&&"undefined"!==typeof c)b=c;else try{b=JSON&&JSON.parse&&JSON.parse(a.elem.attr("data-"+a.attrName))}catch(d){b=a.defaultValue}return b},m;n(i).find(".b-wrapper").remove();i.innerHTML+=a;b.loader=i.childNodes[0];b.paranja&&(b.paranja=b.loader,b.loader=i.childNodes[1]);"function"!==typeof n(".b-wrapper")[0].onclick&&n(".b-wrapper .i-bem").each(function(){var a=n(this)[0];a.onclick=new Function(a.getAttribute("onclick"))});
(function(a){a(".b-serp-item__image-snippet").each(function(){var b=a(this),c=g.createElement("img");c.src=b.css("background-image").replace(/^url\(['"]?(.*)['"]?\).*$/,"$1");a(c).bind("error",function(){b.parent(".b-serp-item").removeClass("b-serp-item_media_image b-serp-item_media_video").end().remove()})})})(n);(function(a){var b;a("body").hasClass("b-page_type_search-index")&&(a=a('head link[type="application/opensearchdescription+xml"]'),(b=a.length&&a.attr("href"))&&/yandex\.[a-z.]{2,6}\/sitesearch\/opensearch\.xml/.test(b)&&
a.attr("href",b.replace(/(yandex\.)[a-z.]{2,6}(\/sitesearch\/opensearch\.xml)/,"$1ru$2")))})(n);BEM.DOM.init();Lego.init(l({elem:n(".b-page__js-lego"),attrName:"lego",defaultValue:{id:"sitesearch"}}));Report=l({elem:n(".b-page__js-report"),attrName:"report"});m=l({elem:n(".b-page__opensearch"),attrName:"opensearch"});n(".b-statcounter__pps-metrika").each(function(a,b){b.onclick&&"function"===typeof b.onclick&&f.Metrika.addOrHit(parseInt(b.onclick(),10))});n(g).trigger("addOpensearch",m.title||c.hostname);
Lego.blockInit();(j=l({elem:n(".b-page__user-style-css"),attrName:"user-style-css",isString:!0}))&&(j=j.replace(/body/g,"#ya-site-results").replace(/(:link:hover,|:visited:hover,)/g,"#ya-site-results $1"));Ya.Site.appendToHead({tag:"style",innerHTML:j});n(e).trigger("Ya.site-results-show");b.fetchingInProgress=!1;d.$&&d.$(g).trigger("yass.ready")}).call(b,d,Ya.Site.$)};e.addOpensearch=function(){Ya.Site.pushOpensearch({SERP:!0,sid:this.params.searchid,web:this.params.web,lang:this.params.language,
tld:this.params.tld,delayed:!0});return this};i.getKeysFromObjects=function(a){for(var b,c=[];a.length;){b=a.pop();for(var d in b)b.hasOwnProperty(d)&&c.push(d)}return c};i.onclickParams={encoding:"",language:"ru",tld:"ru",htmlcss:null,updatehash:!1};i.queryParams={searchid:null,clid:null,text:null,web:"0"};i.hashParams={p:null,how:null,surl:null,constraintid:null,date:null,within:null,from_day:null,from_month:null,from_year:null,to_day:null,to_month:null,to_year:null,noreask:"0"};i.instances=[];
return{init:function(){"inited"!==m&&(new i(g.getElementById("ya-site-results")),m="inited")},triggerResultsDelivered:function(a){Ya.Site.$&&Ya.Site.$("#ya-site-results").trigger("Ya.site-results-delivered",a)}}}(document,window));
Ya.Site.CheckVisibility||(Ya.Site.CheckVisibility=function(g,d){function l(){return[g.compatMode===k&&p[a]||g.body[a]||0,g.compatMode===k&&p[b]||g.body[b]||0]}function i(){return[d.pageXOffset||p[h]||g.body[h]||0,d.pageYOffset||p[s]||g.body[s]||0]}function c(a){for(var b=0,c=0;a;)b+=parseInt(a.offsetLeft,10),c+=parseInt(a.offsetTop,10),a=a.offsetParent;return[b,c]}function m(){var a=c(n),b=0,g;for(g in t)if(t.hasOwnProperty(g)){var h=t[g],h=[h[0]+a[0],h[1]+a[1],h[2],h[3]],k=l(),p=i();h[0]+h[2]>=p[0]&&
h[0]<p[0]+k[0]&&h[1]+h[3]>=p[1]&&h[1]<p[1]+k[1]?("function"===typeof r&&r(g),delete t[g]):++b}0===b&&(o.removeEvent(d,e,m),o.removeEvent(d,f,m),o.removeEvent(d,j,m),u=!1)}var k="CSS1Compat",f="resize",j="load",e="scroll",a="clientWidth",b="clientHeight",h="scrollLeft",s="scrollTop",p=g.documentElement,t,n,r,u=!1,o=Ya.Site;return{check:function(a,b,c){n=a;t=b;r=c;u||(o.addEvent(d,e,m),o.addEvent(d,f,m),o.addEvent(d,j,m),u=!0);m()},getWindowSize:l,getWindowScroll:i,getBlockOffset:c}}(document,window));
Ya.Site.Iframe||(Ya.Site.Iframe=function(g,d){function l(){if("0"===a.query.xdm_p)k.addEvent(d,"load",function(){e.rpc=g.documentElement&&g.documentElement.scrollHeight||g.body.scrollHeight||0;d.parent.location.replace(a.query.xdm_e+"#"+Ya.URL.buildQuery(e));d.focus()});else var f=new a.Rpc({swf:k.pathToJS()+"easyxdm.swf",onReady:function(){d.focus();var a=$(".b-statcounter__pps-metrika:eq(0)")[0],a=a&&a.onclick&&"function"===typeof a.onclick?a.onclick():void 0;f.onLoad({opensearchTitle:$("link[rel=search]").attr("title"),
counter:a});f.resizeIframe(g.documentElement&&g.documentElement.scrollHeight||g.body.scrollHeight||0);b.length&&f.checkBlocksVisibility(c());f.setSearchParams(e)}},{local:{checkedBlock:function(a){b.hasOwnProperty(a)&&k.loadJS(b[a])}},remote:{onLoad:{},resizeIframe:{},setSearchParams:{},checkBlocksVisibility:{}}})}function i(a,c){b[a]=c;++b.length}function c(){var a={},c,d,e;for(c in b)if(b.hasOwnProperty(c)&&"length"!==c&&(d=g.getElementById(c)))e=k.CheckVisibility.getBlockOffset(d),a[c]=[e[0],e[1],
d.clientWidth,d.clientHeight];return a}var m="not_inited",k=Ya.Site,f=k.queryParams,j="p,how,surl,constraintid,date,within,from_day,from_month,from_year,to_day,to_month,to_year,noreask".split(","),e={},a,b={length:0},h,s;return{init:function(){if("inited"!==m&&d.parent!==d){d.direct_check_visibility=i;for(h=0,s=j.length;h<s;++h)f.hasOwnProperty(j[h])&&(e[j[h]]=f[j[h]]);k.loadEasyXDM(function(b){a=b;l()});m="inited"}}}}(document,window));
(function(g){var d=g.yandex_site_callbacks;if(d)for(;d.length;)d.shift()();g.yandex_site_callbacks=null})(window);
