/*!
Copyright 2010 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
var CJS=CJS||{};CJS.start=function(){CJS.init();CJS.findScripts();CJS.downloadScripts();if(CJS.defer){if("undefined"!=typeof(document.readyState)&&"complete"===document.readyState){CJS.processScripts()}else{CJS.addHandler(window,"load",CJS.processScripts)}}else{alert("Immediate processing is not currently supported.");CJS.processScripts()}};CJS.findScripts=function(){var d=document.getElementsByTagName("script");var a=d.length;for(var c=0;c<a;c++){var b=d[c];if("text/cjs"===CJS.getAttribute(b,"type")&&"undefined"===typeof(b.cjsfound)){CJS.aScripts[CJS.aScripts.length]=b;b.cjsfound=true}}};CJS.downloadScripts=function(){var a=CJS.aScripts.length;for(var c=0;c<a;c++){var b=CJS.aScripts[c];var d=CJS.getAttribute(b,"data-cjssrc")||CJS.getAttribute(b,"cjssrc");if(d){CJS.downloadScript(d)}}};CJS.downloadScript=function(a){CJS.dprint("downloading "+a);if(CJS.bIE||CJS.bOpera){CJS.downloadScriptImage(a)}else{CJS.downloadScriptObject(a)}};CJS.downloadScriptImage=function(b){var a=new Image();a.onload=function(){CJS.onloadCallback(b)};a.onerror=function(){CJS.onloadCallback(b)};a.src=b};CJS.downloadScriptObject=function(a){if("undefined"===typeof(document.body)||!document.body){setTimeout("CJS.downloadScriptObject('"+a+"')",50);return}var b=document.createElement("object");b.data=a;b.width=0;b.height=0;b.onload=function(){CJS.onloadCallback(a)};b.onerror=function(){CJS.onloadCallback(a)};document.body.appendChild(b)};CJS.onloadCallback=function(a){CJS.hLoaded[a]=true};CJS.execCallback=function(a){CJS.dprint("execCallback: "+a);if(0===CJS.aExecs.length){CJS.dprint("ERROR: We finished executing a script but the exec queue is empty: "+a);return}if(a==CJS.aExecs[0][0]){CJS.aExecs.splice(0,1)}else{CJS.dprint("ERROR: We finished executing a script that wasn't on the queue: "+a)}if(CJS.aExecs.length){CJS.execScript(CJS.aExecs[0][0],CJS.aExecs[0][1])}};CJS.processScripts=function(){CJS.processNextScript()};CJS.processNextScript=function(){if(CJS.aScripts.length){var a=CJS.aScripts[0];CJS.curScript=a;var c=CJS.getAttribute(a,"data-cjssrc")||CJS.getAttribute(a,"cjssrc");var b=CJS.getAttribute(a,"data-cjsexec")||CJS.getAttribute(a,"cjsexec");if(c){if("false"===b){CJS.aScripts.splice(0,1);setTimeout(CJS.processNextScript,0)}else{if(CJS.hLoaded[c]){CJS.processExternalScript(a,CJS.processNextScript);CJS.aScripts.splice(0,1)}else{CJS.dprint("processNextScript: waiting for script "+c);if("undefined"===typeof(a.startwait)){a.startwait=Number(new Date())}var d=Number(new Date())-a.startwait;if(d<CJS.maxWait){setTimeout(CJS.processNextScript,CJS.waitival)}else{alert("There was an error loading script: "+c)}}}}else{CJS.processInlineScript(a);CJS.aScripts.splice(0,1);setTimeout(CJS.processNextScript,0)}return}CJS.findScripts();if(CJS.aScripts.length){CJS.downloadScripts();setTimeout(CJS.processNextScript,0);return}document.write=CJS.docwriteOrig;CJS.dprint("DONE processing scripts")};CJS.processInlineScript=function(script){CJS.curScript=script;var code=script.text;CJS.dprint("processInlineScript: processing script code: "+code.substring(0,64));CJS.eval(code)};CJS.processExternalScript=function(a,c){var b=CJS.getAttribute(a,"data-cjssrc")||CJS.getAttribute(a,"cjssrc");CJS.dprint("processExternalScript: processing script "+b);CJS.execScript(b,c)};CJS.execScript=function(e,d){CJS.dprint("execScript: "+e);if(0===CJS.aExecs.length){CJS.aExecs[CJS.aExecs.length]=[e,d]}else{if(e!=CJS.aExecs[0][0]){CJS.dprint("execScript: queueing for later: "+e);CJS.aExecs[CJS.aExecs.length]=[e,d];return}}var f=(function(g){switch(typeof(g)){case"string":g=new Function(g);break;case"function":break;default:g=new Function()}return g})(d);var b=function(){if(this.readyState&&this.readyState!="complete"&&this.readyState!="loaded"){return}CJS.execCallback(e);this.onload=this.onreadystatechange=null;f()};var c=document.createElement("script");c.onload=c.onreadystatechange=b;c.src=e;var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(c,a)};CJS.eval=function(code){if(window.execScript){window.execScript(code)}else{var fn=function(){window.eval.call(window,code)};fn()}};CJS.init=function(){CJS.bInited=true;CJS.defer=("undefined"===typeof(CJS.defer)?true:CJS.defer);CJS.aScripts=[];CJS.hLoaded={};CJS.aExecs=[];CJS.bIE=(-1!=navigator.userAgent.indexOf("MSIE"));CJS.bChrome=(-1!=navigator.userAgent.indexOf("Chrome/"));CJS.bOpera=(-1!=navigator.userAgent.indexOf("Opera"));CJS.curScript=null;CJS.maxWait=5000;CJS.waitival=200;CJS.docwriteOrig=document.write;document.write=CJS.docwrite};CJS.getAttribute=function(f,d){var c=f.attributes;var b=c.length;for(var e=0;e<b;e++){var a=c[e];if(d===a.nodeName){return a.nodeValue}}return undefined};CJS.addHandler=function(c,d,b,a){a=(a)?true:false;if(c.addEventListener){c.addEventListener(d,b,a)}else{if(c.attachEvent){c.attachEvent("on"+d,b)}else{if(c["on"+d]){}else{c["on"+d]=b}}}};if("undefined"!=typeof(console)&&"undefined"!=typeof(console.log)){CJS.dprint=function(a){console.log("CJS "+Number(new Date())+": "+a)}}else{CJS.dprint=function(a){}}CJS.docwrite=function(f){if(CJS.curScript){if(!CJS.curScript.docwriteTarget){CJS.curScript.docwriteTarget=document.createElement("span");CJS.curScript.parentNode.insertBefore(CJS.curScript.docwriteTarget,CJS.curScript)}var e=f.indexOf("<script");if(-1===e){CJS.dprint("docwrite: "+f.substring(0,64));CJS.curScript.docwriteTarget.innerHTML+=f}else{var d=f.indexOf("<\/script>",e)+9;if(-1!=d){var c=f.substring(0,e);var a=f.substring(e,d);var b=f.substring(d+1);if(c){CJS.dprint("docwrite: "+c.substring(0,64));CJS.curScript.docwriteTarget.innerHTML+=c+b}CJS.docwriteScript(a)}}}else{CJS.dprint("ERROR: There's a problem with the async override of document.write.")}};CJS.docwriteScript=function(b){var a=b.match(/src='([^']*)/i)||b.match(/src="([^"]*)/i)||b.match(/src=([^ >]*)/i);if(a){var c=a[1];CJS.dprint("docwriteScript url = "+c);var d=document.createElement("script");d.src=c;document.body.appendChild(d)}else{}};CJS.start();
/*! 
 * See https://github.com/douglascrockford/JSON-js
 */
var JSON;if(!JSON){JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){if(typeof rep[i]==="string"){k=rep[i];v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}}());jQuery.extend(jQuery.expr[":"],{focus:function(a){return a==document.activeElement}});function Sources(){this.sources={}}Sources.prototype={getSource:function(b,d,g,f,j){var a=this.sources[b];if((a&&!j)||(a&&j&&a.info)){d(a,f)}else{var c=new Source({id:b});this.sources[b]=c;var h=this;var e=function(k,l){c.setByJSON(k);d(c,l)};var i=function(k){g(k)};(function(k){jQuery.ajax({url:friendsURL("ajax/source"),data:{requestid:b},dataType:"json",success:function(l){e(l,k)},error:function(l){i(l,k)}})})(f)}},addSource:function(a){if(this.sources[a.id]){return this.sources[a.id].setByJSON(a)}this.sources[a.id]=new Source(a);return this.sources[a.id]}};var g_controls=new Object();var g_controlsInst={};var g_source=null;var g_sources=new Sources();function init(e,b){var g=e;if(!g){g=document;commonInit()}if(b){g_source=new Source(b);g_sources.addSource(g_source)}wrapUsernames(g);if(typeof(ProfileEdit)=="function"){var d=["code","div"];var a=[];for(var h=0;h<d.length;h++){var l=y5.Dom.getDescendants(document,d[h],new RegExp("\\bc-[\\w-]+",""));a=a.concat(l)}for(var h in g_controls){var m=g_controls[h].prototype.TAGNAME;var c=g_controls[h].prototype.CLASSNAME;g_controlsInst[h]=[];for(var f=0;f<a.length;f++){var k=a[f];if(k.tagName.toLowerCase()==m&&isClass(k,c)){g_controlsInst[h][f]=new g_controls[h](k);delClass(k,c)}}}}initAutoareas(g)}function initAutoareas(d){var a=getByTagName("textarea",d);for(var c=0,b=a.length;c<b;c++){new Autoarea(a[c*2]);a=getByTagName("textarea",d)}}function destruct(){for(var b in g_controlsInst){for(var a=0,d=g_controlsInst[b].length;a<d;a++){var c=g_controlsInst[b][a];if(c){if(typeof(c.destruct)==="function"){c.destruct()}g_controlsInst[b][a]=null}}}}y5.require(["Dom","Events"],function(){new y5.AEventListener("unload",destruct,window,true);y5.Events.observe("dom:loaded",setCounter,y5,true)});function setCounter(){var d=y5.Dom.getDescendant(document,"table","b-head");if(d){var c=y5.Dom.getDescendant(d,"span","b-yauser");if(c){new y5.AEventListener("click",function(){r(this,"stred/pid=116/cid=1249")},c,true,this)}}var b=y5.$("actions_mine");if(b){var a=y5.Dom.getDescendant(b,"a","*");new y5.AEventListener("click",function(){r(this,"stred/pid=116/cid=1282")},a,true,this)}}function wrapUsernames(b){var e=y5.Dom.getDescendants(b,"span","b-yauser");for(var c=0,a=e.length;c<a;c++){var d=e[c];if(d&&y5.Dom.textContent(d).length>10){new WrappingText(d)}}}function getParams(_element){var f=_element.onclick;if(f){return f()}var params=String(_element.getAttribute("onclick"));var pos=params.indexOf("[");if(pos!=-1){return eval(params.substring(pos,params.indexOf("]")+1))}return null}function yauser(a,c){var e=c||false;var d=new RegExp("^(\\W*?)(\\w|[\u00a0-\uffff]|S(?!.*\\w))(.*)$");var b=a.title&&/\S+/.test(a.title)?a.title.match(d):a.login.match(d);if(b){return ya.templates.user.Ya({url:friendsFullURL(a.login),userWithUpperLetter:ya.templates.user.userWithUpperLetter({firstPart:b[2],secondPart:b[3]}),qu:(e&&a.qu)?ya.templates.user.Qu({qu:a.qu}):""})}return null}function yausercardBase(a){var d=new RegExp("^(\\W*?)(\\w|[\u00a0-\uffff]|S(?!.*\\w))(.*)$"),c=a.name?a.name:a.title?a.title:a.login?a.login:"",b=c.match(d),e=a.picture_url?a.picture_url+"small":g_source.getDefaultUserpicName(a.sex,"small");if(b){return'<a class="b-userpic b-userpic_type_small" href="'+a.url+'"><img src="'+e+'"class="b-userpic__img"/><i class="b-userpic__i"></i></a><b class="b-user"><a href="'+a.url+'" class="b-user__link">'+b[1]+'<b class="b-user__first-letter">'+b[2]+"</b>"+b[3]+"</a></b>"}else{return""}}function yausercard(a,b){var c=yausercardBase(a);b=b||"b-usercard";if(c){return'<span class="'+b+'"><span class="'+b+'-i">'+c+"</span></span>"}else{return""}}function yausercardWithButton(a,c,b){var d=yausercardBase(a);b=b||"b-usercard";if(d){return'<span class="'+b+'b-usercard_type_add"><span class="'+b+'-i">'+d+'</span><a href="/" class="b-pseudo-link"><img alt="'+c+'" src="//yandex.st/lego/_/La6qi18Z8LwgnZdsAr1qy1GwCwo.gif" class="b-ico"></a></span>'}else{return""}}function yausercardWithLink(b,d,c,e,a){var f=yausercardBase(b);e=e||"b-usercard";if(f){return'<span class="'+e+' b-usercard_type_celebrate"><span class="'+e+'__i">'+f+'<span class="b-usercard__celebrate'+(a?" b-usercard__celebrate_bday_today":"")+'"><a href="'+c+'" class="b-link">'+d+"</a></span></span></span>"}else{return""}}function errImg(a,b){a.onerror=null;a.src=g_globals.img_base+"empty_userpic-"+b+".png"}function viewText(b){var a=document.getElementById(b);var c=document.getElementById(b+"-d");if(c.style.display=="block"){c.style.display="none";a.src=g_globals.img_base+"txt9-plus.gif"}else{c.style.display="block";a.src=g_globals.img_base+"txt9-minus.gif"}return false}function saveStateForm(a){var b=document.forms.post;if(!b){return true}b.action=a;b.submit();return false}function checkChangeForm(){window.onbeforeunload=function(a){return"Вы не сохранили изменения. Действительно хотите уйти отсюда?"}}function WrappingText(a,c,b){this.wrapping_length=c||10;this.wrapping_length_min=b||3;this.wrapping_regexp=new RegExp("\\S{"+(this.wrapping_length+1)+"}");this.wrapTextNodes(this._searchTextNodes(a))}WrappingText.prototype={_searchTextNodes:function(b){var c=[];for(var a=0;a<b.childNodes.length;a++){var d=b.childNodes[a];if(d.nodeType==3){if(this.searchLongWord(d.nodeValue,this.wrapping_length)!=-1){c[c.length]=d}}else{c=c.concat(this._searchTextNodes(d))}}return c},searchLongWord:function(a){return a.search(this.wrapping_regexp)},splitLongWord:function(a){var b=this.searchLongWord(a);if(b!=-1){if(a.length-(b+this.wrapping_length)<this.wrapping_length_min){return null}return{word:a.substring(0,b+this.wrapping_length),last:a.substring(b+this.wrapping_length,a.length)}}return null},wrapTextNodes:function(a){for(var b=0;b<a.length;b++){var c=a[b];c.parentNode.replaceChild(this.createWrappedText(c.nodeValue,this.wrapping_length),c)}},createWrappedText:function(b){var a,c;if(document.createDocumentFragment){c=document.createDocumentFragment()}else{c=document.createElement("span")}while((a=this.splitLongWord(b))){c.appendChild(document.createTextNode(a.word));c.appendChild(document.createElement("wbr"));b=a.last}c.appendChild(document.createTextNode(b));return c}};function open_cut(c,a){a.blur();y5.Dom.removeNode(document.getElementById("oc"+c));var b=document.getElementById("cut"+c);if(b){onclickToSrc(b);$(b).yshow().find(".cut-content").yshow()}return false}function onclickToSrc(d){var e=d.getElementsByTagName("img");for(var c=0,a=e.length;c<a;c++){var b=e[c];if(b.onclick){b.src=b.onclick()}}}function cleanLogin(){y5.$("t").checked=0;var a=y5.$("l");var b=y5.$("s");setInterval(function(){if(a.value){clean(a)}if(b.value){clean(b)}},100)}function ChFormElementValue(c,b,e){var d=document.forms[c];var a=d.elements[b];a.value+=e;d.submit();return false}var g_form,g_searchInput,g_activeInput;document.documentElement.id="js";function addEvent(c,a,b){if(c.addEventListener){c.addEventListener(a,b,0)}else{if(c.attachEvent){c.attachEvent("on"+a,b)}}}function commonKeydown(c){if(!c){c=window.event}var a=c.keyCode;if(c.ctrlKey){if(!g_activeInput){if((a==13)&&(document.forms.length==1)){g_form.submit()}else{if(a==38){g_searchInput.focus()}else{if(a==37){var b=document.getElementById("previous_page");if(b){location.href=b.href}}else{if(a==39){var d=document.getElementById("next_page");if(d){location.href=d.href}}}}}}else{if((a==38)&&(document.forms[0]==g_activeInput.form)&&g_activeInput.select){g_activeInput.select()}}}else{if((a==27)&&(typeof(keydownEsc)=="function")){keydownEsc(c)}}}function commonInit(b){g_form=document.forms[0];addEvent(document,"keydown",commonKeydown);if(g_form){if(typeof(initTabs)=="function"){initTabs(g_form)}for(var d=0,a=document.forms.length;d<a;d++){var g=document.forms[d];for(var c=0,h=g.length;c<h;c++){var e=g.elements[c];if((e.tagName.toLowerCase()=="textarea")||(e.type&&e.type=="text")){if(!g_searchInput){g_searchInput=e}addEvent(e,"focus",function(){g_activeInput=this});addEvent(e,"blur",function(){g_activeInput=null})}}}if(b&&g_searchInput){g_searchInput.focus()}}if(typeof(addEmptyTitleAndBorderToAllImages)=="function"){addEmptyTitleAndBorderToAllImages(document)}if(typeof(applyDecoration)=="function"){applyDecoration(document)}}function getCookie(g){var f=document.cookie;if(f.length<1){return false}var a=f.indexOf(g+"=");if(a==-1){return false}a+=(g.length+1);var d=f.indexOf(";",a);return unescape((d==-1)?f.substring(a):f.substring(a,d))}function r(c,b){new Image().src=location.protocol+"//clck.yandex.ru/click/dtype="+b+"/rnd="+((new Date()).getTime()+Math.round(Math.random()*100))+"/*"+(c?(c.href||location.href):"")}function clean(b){var c=b.previousSibling;if(c){b.onblur=function(){if(!b.value){c.style.top=""}};c.style.top="-9999px"}}function cleanIfNotEmpty(b){var d=[];for(var a=0;a<b.length;a++){d[a]=document.getElementById(b[a])}var c=function(){for(var e=0;e<d.length;e++){if(d[e].value){clean(d[e])}}};setInterval(c,100)}function getById(a){if(document.getElementById){return document.getElementById(a)}else{if(document.all){return document.all[a]}}return null}var _cacheByTagName=[];function getByTagName(a,c){if(!c){c=document}var b=c.getElementsByTagName(a);return b}function associateEventWithObject(c,a,b){return function(d){return c[a](this,b,d||window.event)}}function isClass(d,e){if(d&&d.className){var c=(typeof(e)=="string")?new Array(e):e;for(var b=0,a=c.length;b<a;b++){if(new RegExp("(^|\\s+)"+c[b]+"(\\s+|$)","").test(d.className)){return c[b]}}}return null}function addClass(a,b){if(!a.length&&isClass(a,b)){return}modifyClass(a,b,function(c,d){if(c.className&&!/^\s*$/.test(c.className)){if(!isClass(c,d)){c.className=c.className+" "+d}}else{c.className=d}})}function delClass(a,b){if(!a.length&&!isClass(a,b)){return}try{modifyClass(a,b,function(d,e){d.className=d.className.replace(new RegExp("\\b"+e+"\\b","g"),"").replace(/^\s|\s$/,"")})}catch(c){alert([a.id,b])}}function replaceClass(c,b,a){delClass(c,b);addClass(c,a)}function switchClass(b,d,c,a){if(isClass(b,d)){replaceClass(b,d,c)}else{if(isClass(b,c)){replaceClass(b,c,d)}else{if(a){addClass(b,a)}}}}function modifyClass(d,e,c){if(d.length){for(var b=0,a=d.length;b<a;b++){c(d[b],e)}}else{c(d,e)}}function getParentOrSelfByClass(a,b){var c=a;while(c.tagName){if(isClass(c,b)){return c}c=c.parentNode}return null}function getParentOrSelfByTagName(b,a){var c=b;while(c.tagName){if(c.tagName.toLowerCase()==a){return c}c=c.parentNode}return null}function getElementsByTagNameAndClass(g,b,f){var e;if(b=="*"){e=g.all?g.all:g.getElementsByTagName("*")}else{e=g.getElementsByTagName(b)}var c=[];for(var d=0,a=e.length;d<a;d++){if(isClass(e[d],f)){c[c.length]=e[d]}}return c}function getChildrenByTagName(d,a){var c=d.firstChild;var b=new Array();while(c!=null){if(c.tagName&&((a=="*")||(new String(c.tagName).toLowerCase()==a))){b[b.length]=c}c=c.nextSibling}return b}function getChildrenByTagNameAndClass(f,a,e){var d=getChildrenByTagName(f,a);var b=new Array();for(var c=0;c<d.length;c++){if(isClass(d[c],e)){b[b.length]=d[c]}}return b}function getPrevElement(d,a){var e=d.previousSibling;var f=(typeof(a)=="string")?new Array(a):a;while(e!=null){if(e.tagName){var b=new String(e.tagName).toLowerCase();for(var c=0;c<f.length;c++){if((b==f[c])||(f[c]=="*")){return e}}}e=e.previousSibling}return null}function getNextElement(d,a){var e=d.nextSibling;var f=(typeof(a)=="string")?new Array(a):a;while(e!=null){if(e.tagName){var b=new String(e.tagName).toLowerCase();for(var c=0;c<f.length;c++){if((b==f[c])||(f[c]=="*")){return e}}}e=e.nextSibling}return e}function getOffsetLeft(a){var c=a;var b=c.offsetLeft;while((c=c.offsetParent)!=null){b+=c.offsetLeft}return b}function getOffsetTop(a){var c=a;var b=c.offsetTop;while((c=c.offsetParent)!=null){b+=c.offsetTop}return b}function insertAfter(a,b){if(b.nextSibling){b.parentNode.insertBefore(a,b.nextSibling)}else{b.parentNode.appendChild(a)}}function appendInputField(b,c){var a;try{a='<input type="'+c.type+'" name="'+c.name+'"';if(c.id){a+='id="'+c.id+'"'}if(c.value){a+='value="'+c.value+'"'}a+=">";a=document.createElement(a)}catch(d){a=document.createElement("input");a.type=c.type;a.name=c.name;if(c.id){a.id=c.id}if(c.value){a.value=c.value}}return b.appendChild(a)}function Source(a){this.id=null;this.login=null;this.type=null;this.title=null;this.qu=null;this.sex="man";this.userpics=[];this.info=null;this.mood="";this.status="normal";this.setByJSON(a);this.currentUserpicId=0}Source.prototype={setByJSON:function(b){for(var a in b){this[a]=b[a]}return this},hasUserpics:function(){return this.userpics&&(this.userpics.length>0)},getUserpicsCount:function(){return this.userpics.length},getUserpicId:function(b){var a=b||0;if(this.userpics[a]){return this.userpics[a][0]}return null},getUserpicName:function(c,b){var a=c||0;if(this.userpics[a]){return this.userpics[a][1]}return this.getDefaultUserpicNameShort(null,b)},getDefaultUserpicNameShort:function(b,a){return this.getDefaultUserpicName(b,a).replace(/^\w+:\/\/[^\/]+/i,"")},getDefaultUserpicName:function(d,b){b=b||"normal";if(this.type=="community"){return this.userpic.replace("normal(.png)?$",b)}var c=this.sex||d||"man";var a=(typeof this.default_userpic=="object"?this.default_userpic[c]:this.default_userpic)+b;return a},getUserpic:function(a){var c=a.id||0;var b=a.size||"normal";if(this.userpics[c]&&this.userpics[c][1]!=""){return g_globals.userpic_base+this.id+"/"+this.getUserpicName(c)+"-"+b}return this.getDefaultUserpicName(0,a.size)},getUserpicContent:function(a){var c=a.size||"normal";var f=a.simple||false;var e=a.src||this.getUserpic(a);var b=a.loaded!==false;var d;if(b){d="<img"+(a.id?" id='"+a.id+"'":"")+(a.className?" class='"+a.className+"'":"")+" src='"+e+"'' alt='userpic'/>"}else{d="<code class='Friends-later-ImageLoadable' onclick='return {src:\""+e+"\"}'>"}if(!f){d="<i class='b-userpic "+c+"'><b><i><a class='no-link'>"+d+"</a></i></b></i>"}return d},yauser:function(b){var c=b||false;var a=this.title&&/\S+/.test(this.title)?this.title:this.login;a=y5.Strings.normalize(a);var a='<span class="b-yauser"><a href="'+friendsFullURL(this)+'"><b>'+a.substr(0,1)+"</b>"+a.substring(1)+"</a>";if(c&&this.qu){a+="<sup>"+this.qu+"</sup>"}a+="</span>";return a}};window.JZ=(function(b){(function(c){c.proxy||(c.proxy=function(f,e,d){if(arguments.length===2){if(typeof e==="string"){d=f;f=d[e];e=undefined}else{if(e&&!jQuery.isFunction(e)){d=e;e=undefined}}}if(!e&&f){e=function(){return f.apply(d||this,arguments)}}if(f){e.guid=f.guid=f.guid||e.guid||jQuery.guid++}return e})})(jQuery);(function(g){var d=(function(){_}).toString().indexOf("_")>-1,c=g.browser.msie,e=c?["toString","valueOf"]:null,h=function(){};function f(j,i,k){var m=false;if(c){var l=[];g.each(e,function(){k.hasOwnProperty(this)&&(m=true)&&l.push({name:this,val:k[this]})});if(m){g.each(k,function(n){l.push({name:n,val:this})});k=l}}g.each(k,function(o,p){if(m){o=p.name;p=p.val}if(g.isFunction(j[o])&&g.isFunction(p)&&(!d||p.toString().indexOf(".__base")>-1)){var n=j[o];i[o]=function(){var s=this.__base;this.__base=n;var q=p.apply(this,arguments);this.__base=s;return q}}else{i[o]=p}})}g.inherit=function(){var j=g.isFunction(arguments[0]),p=j?arguments[0]:h,l=arguments[j?1:0]||{},n=arguments[j?2:1],i=l.__constructor||(j&&p.prototype.__constructor)?function(){this.__constructor.apply(this,arguments)}:function(){};if(!j){i.prototype=l;i.prototype.__self=i.prototype.constructor=i;return g.extend(i,n)}g.extend(i,p);var m=function(){},k=p.prototype;m.prototype=p.prototype;i.prototype=new m();var o=i.prototype;o.__self=o.constructor=i;f(k,o,l);n&&f(p,i,n);return i}})(jQuery);(function(c){c.extend({debounce:function(e,f,g,d){if(arguments.length==3&&typeof g!="boolean"){d=g;g=false}var h;return function(){var i=arguments;d=d||this;if(g&&!h){e.apply(d,i)}clearTimeout(h);h=setTimeout(function(){if(!g){e.apply(d,i)}h=null},f)}},throttle:function(g,h,f){var i,e,d;return function(){e=arguments;d=true;if(!i){(function(){if(d){g.apply(f,e);d=false;i=setTimeout(arguments.callee,h)}else{i=null}})()}}}})})(jQuery);(function(d){var c=1;d.identify=function(e){return e.__id||(e.__id=c++)}})(jQuery);(function(d){var c=function(h,f,g){var e=[d.identify(h),d.identify(f)];d.each(g,function(){e.push(typeof this,this)});return e.join("\x0B")};d.memoize=function(e){return function(){!e.__memoize&&(e.__memoize={});var f=c(e,this,arguments);return e.__memoize[f]||(e.__memoize[f]=e.apply(this,arguments))}}})(jQuery);(function(){var c={getSelection:function(){var d=this.jquery?this[0]:this;return(("selectionStart" in d&&function(){var e=d.selectionEnd-d.selectionStart;return{start:d.selectionStart,end:d.selectionEnd,length:e,text:d.value.substr(d.selectionStart,e)}})||(document.selection&&function(){d.focus();var f=document.selection.createRange();if(f==null){return{start:0,end:d.value.length,length:0}}var e=d.createTextRange();var g=e.duplicate();e.moveToBookmark(f.getBookmark());g.setEndPoint("EndToStart",e);return{start:g.text.length,end:g.text.length+f.text.length,length:f.text.length,text:f.text}})||function(){return{start:0,end:d.value.length,length:0}})()},replaceSelection:function(){var d=this.jquery?this[0]:this;var f=arguments[0]||"";return(("selectionStart" in d&&function(){d.value=d.value.substr(0,d.selectionStart)+f+d.value.substr(d.selectionEnd,d.value.length);return this})||(document.selection&&function(){d.focus();document.selection.createRange().text=f;return this})||function(){d.value+=f;return this})()}};jQuery.each(c,function(d){jQuery.fn[d]=this})})();var a={CSS_CLASS_WIDGET:"jz",onInit:function(d,c){d.bind("init.jz",c).each(function(){b(this).data("jz")&&c.call(window,b.Event("init.jz"),b(this).data("jz"))})},registerWidget:function(c,f,d,e){this.Builder.registerWidget(c,f,d,e);return this},_throwException:function(c){throw"JZException: "+c},_identifyNode:function(c){return c.id||("__id-"+b.identify(c))}};b.fn.jz=function(d){var c;this.each(function(g){var j=b(this),e=j.data("jz");if(d===false){e&&e.remove(true)}else{if(!e){var h=j.closest("form");if(h[0]){var f=h.data("jz-builder");(f||new a.Builder()).build(f?j:h)}}}g==0&&(c=j.data("jz"))});return c};a.Observable=b.inherit({bind:function(j,k,h,e){this._observers||(this._observers={});if(b.isFunction(k)){e=h;h=k}var g=0,f=j.split(" "),c,d;while(c=f[g++]){d=c.indexOf(".")>-1;c=d?c.split("."):c;j=d?c.shift():c;(this._observers[j]||(this._observers[j]=[])).push({ns:d?c.sort().join("."):null,fn:h,data:k,ctx:e})}return this},unbind:function(l,n){if(this._observers){if(l){var d=0,c,g=l.split(" "),f,h,k,e,m;while(k=g[d++]){e=k.indexOf(".")>-1;k=e?k.split("."):k;l=e?k.shift():k;m=e?new RegExp("(^|\\.)"+k.sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;if(l){f=this._observers[l];if(f){c=0;while(h=f[c++]){if((!n||n===h.fn)&&(!e||(e&&h.ns&&m.test(h.ns)))){f.splice(--c,1)}}}}else{for(l in this._observers){f=this._observers[l];c=0;while(h=f[c++]){if((!n||n===h.fn)&&h.ns&&m.test(h.ns)){f.splice(--c,1)}}}}}}else{delete this._observers}}return this},trigger:function(k,j){if(this._observers){typeof k==="string"&&(k=b.Event(k));var c=k.type.indexOf(".")>-1,h=c?k.type.split("."):null;if(c){k.type=h.shift();h=new RegExp("(^|\\.)"+h.sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}var l=this._observers[k.type];if(l){var g=0,d,f;while(d=l[g++]){if(!c||(d.ns&&h.test(d.ns))){k.data=d.data;f=d.fn.call(d.ctx||window,k,j);if(typeof f!=="undefined"){k.result=f;if(f===false){k.preventDefault();k.stopPropagation()}}}}}}return this}});a.Widget=b.inherit(a.Observable,{__constructor:function(c,d,e){this._elem=c.data("jz",this);this._classElem=d||c;this._params=b.extend(this._getDefaultParams(e),e);this._parent=this._form=null;this._isInited=this._isRequired=false;this._isValid=true;this._isEnabled=!this._elem.attr("disabled");this._val=this._initialVal=null;this._dependencies={};this._dependFromIds={}},getElement:function(){return this._elem},getId:b.memoize(function(){return a._identifyNode(this._elem[0])}),getName:b.memoize(function(){return this._extractName()}),focus:function(){this._elem[0].focus();return this},hasCSSClass:function(c){return this._classElem.hasClass(c)},addCSSClass:function(c){this._classElem.addClass(c);return this},removeCSSClass:function(c){this._classElem.removeClass(c);return this},replaceCSSClass:function(c,d){this.hasCSSClass(c)&&this.removeCSSClass(c);return this.addCSSClass(d)},init:function(){return this._isInited?this._reinit():this._init()},isRequired:function(){return this._isRequired},isValid:function(){return this._isValid},isReady:function(){return !this.isEnabled()||(!this.isRequired()&&this.isValid())},isEnabled:function(){return this._isEnabled},show:function(){return this.removeCSSClass(this.__self.CSS_CLASS_INVISIBLE)},hide:function(){return this.addCSSClass(this.__self.CSS_CLASS_INVISIBLE)},enable:function(c){if(this.isEnabled()||!this._parent.isEnabled()){return this}if(c&&this._dependencies.enabled){return this._checkDependencies("enabled")}this._enableElems();var d=this.removeCSSClass(this.__self.CSS_CLASS_DISABLED).isReady();this._isEnabled=true;d!=this.isReady()&&this.trigger("ready-change",this);this.isChanged()&&this.trigger("initial-value-change",true);return this.trigger("enable",this)},disable:function(){if(this.isEnabled()){this._disableElems();var c=this.addCSSClass(this.__self.CSS_CLASS_DISABLED).isReady();this._isEnabled=false;c!=this.isReady()&&this.trigger("ready-change",this);this.isChanged()&&this.trigger("initial-value-change",false);this.trigger("disable",this)}return this},val:function(c){return typeof c=="undefined"?this._val.get():this._setVal(this._processVal(this._createVal(c)))},getValue:function(){return this.val()},setValue:function(c){return this.val(c)},addDependence:function(d,c){this._dependencies[d]=c;var e=this;b.each(c.getFrom(),function(){e._dependFromIds[this.getId()]||(e._bindTo(this,{"value-change enable disable":this._onChangeDependFromWidget,remove:this._onRemoveDependFromWidget})._dependFromIds[this.getId()]=true)})},remove:function(c){this._triggerRemove()._parent&&this._parent._removeChild(this);var d=this._classElem;this._destruct();c&&d.remove()},reset:function(){if(this._hasVal()){this._setNoReady(false);this._setVal(this._initialVal)}return this},addChild:function(){},_bindTo:function(f,d,e,c){if(b.isFunction(e)){c=e;e=null}var g=this;typeof d=="string"?f.bind(d,e,b.proxy(c,g)):b.each(d,function(h){g._bindTo(f,h,e,this)});return g},_bindToElem:function(d,e,c){return this._bindTo(this._elem,d,e,c)},_init:function(){this._bindEvents()._hasVal()&&this._initVal();this._isInited=true;this._params.focusOnInit&&this.focus();return this},_reinit:function(){if(this._hasVal()){this._setNoReady(false);this.isChanged()&&this.removeCSSClass(this.__self.CSS_CLASS_CHANGED);this._initialVal=this._val}return this},_extractName:function(){return this._elem.attr("name")},_createVal:function(c){return new a.Value(c)},_processVal:function(c){return c},_getVal:function(){return this._val},_setVal:function(e,c){if(!this._val.isEqual(e)){var d=this.isChanged();this._val=e;c||this._setValToElem(e);d==this.trigger("value-change",this).isChanged()||this[(d?"remove":"add")+"CSSClass"](this.__self.CSS_CLASS_CHANGED).trigger("initial-value-change",!d)}return this},_setForm:function(c){(this._form=c)._addWidget(this);return this},_getDefaultParams:function(c){return{focusOnInit:false}},_delete:function(){var c=this;b.each(arguments,function(d,e){delete c[e]})},_destruct:function(){this._unbindAll();this._elem.removeData("jz");this._delete("_elem","_classElem","_params","_parent","_val","_initialVal","_dependencies","_dependFromIds")},_unbindAll:function(){this._elem.unbind();this._classElem.unbind();this.unbind()},_hasVal:function(){return false},_initVal:function(){this._initialVal=(this._val=this._createVal(this._extractValFromElem())).clone()},isChanged:function(){return this._hasVal()&&!this._initialVal.isEqual(this._val)},_updateValue:function(){this._setVal(this._createVal(this._extractValFromElem()),true)},_checkDependencies:(function(){var c=["enabled","valid","required"];return function(g,k,l){var f=0,j,m,e=!!g?[g]:c,d=e.length,h=this.isReady();while(f<d){m=this._dependencies[j=e[f++]];if(m||l){this[this.__self._dependenceTypeToFn(j)](m?m.check():{result:true,params:{}})}}h!=this.isReady()&&this.trigger("ready-change",this);return this}})(),_checkRequired:function(c){return this._getVal().match(c.pattern)},_processEnabledDependenceCheck:function(c){if(c.result){var d=this.isEnabled();this.enable().show();c.params.focusOnEnable&&!d&&this.focus()}else{this.disable();c.params.hideOnDisable&&this.hide()}},_processRequiredDependenceCheck:function(c){this._updateRequired(!c.result)},_processValidDependenceCheck:function(c){this._updateValid(c.result);var e=this,d=c.params.invalidCSSClasses;d&&b.each(d,function(){e[(this.add?"add":"remove")+"CSSClass"](this.name)})},_updateRequired:function(d){var c=this.__self;(d?this.replaceCSSClass(c.CSS_CLASS_REQUIRED_OK,c.CSS_CLASS_REQUIRED):this.replaceCSSClass(c.CSS_CLASS_REQUIRED,c.CSS_CLASS_REQUIRED_OK).removeCSSClass(c.CSS_CLASS_NOREADY_REQUIRED))._isRequired=d},_updateValid:function(d){var c=this.__self;(d?(this._getVal().isEmpty()?this.removeCSSClass(c.CSS_CLASS_INVALID+" "+c.CSS_CLASS_INVALID_OK):this.replaceCSSClass(c.CSS_CLASS_INVALID,c.CSS_CLASS_INVALID_OK)).removeCSSClass(c.CSS_CLASS_NOREADY_INVALID):this.replaceCSSClass(c.CSS_CLASS_INVALID_OK,c.CSS_CLASS_INVALID))._isValid=d},_setNoReady:function(d){var c=(d?"add":"remove")+"CSSClass";this.isRequired()&&this[c](this.__self.CSS_CLASS_NOREADY_REQUIRED);this.isValid()||this[c](this.__self.CSS_CLASS_NOREADY_INVALID)},_processFirstUnreadyWidget:function(){if(!this.isReady()){return this}},_extractValFromElem:function(){return this._elem.val()},_setValToElem:function(c){this._elem.val(c.toString())},_triggerRemove:function(){return this.trigger("remove",this)},_onChangeDependFromWidget:function(){this._checkDependencies()},_onRemoveDependFromWidget:function(c,d){var e=this;b.each(this._dependencies,function(g){var f=this.removeFrom(d);f?e._dependencies[g]=f:delete e._dependencies[g];e._checkDependencies(g,false,true)});delete this._dependFromIds[d.getId()]},_bindEvents:function(){return this},_enableElems:function(){},_disableElems:function(){},_beforeSubmit:function(){}},{CSS_CLASS_HIDDEN:a.CSS_CLASS_WIDGET+"-hidden",CSS_CLASS_INVISIBLE:a.CSS_CLASS_WIDGET+"-invisible",CSS_CLASS_INITED:a.CSS_CLASS_WIDGET+"-inited",CSS_CLASS_CHANGED:a.CSS_CLASS_WIDGET+"-changed",CSS_CLASS_FOCUSED:a.CSS_CLASS_WIDGET+"-focused",CSS_CLASS_SELECTED:a.CSS_CLASS_WIDGET+"-selected",CSS_CLASS_DISABLED:a.CSS_CLASS_WIDGET+"-disabled",CSS_CLASS_REQUIRED:a.CSS_CLASS_WIDGET+"-required",CSS_CLASS_REQUIRED_OK:a.CSS_CLASS_WIDGET+"-required-ok",CSS_CLASS_INVALID:a.CSS_CLASS_WIDGET+"-invalid",CSS_CLASS_INVALID_OK:a.CSS_CLASS_WIDGET+"-invalid-ok",CSS_CLASS_NOREADY_REQUIRED:a.CSS_CLASS_WIDGET+"-noready-required",CSS_CLASS_NOREADY_INVALID:a.CSS_CLASS_WIDGET+"-noready-invalid",_dependenceTypeToFn:b.memoize(function(c){return"_process"+c.charAt(0).toUpperCase()+c.substr(1).toLowerCase()+"DependenceCheck"})});a.Widget.Input=b.inherit(a.Widget,{__constructor:function(){this.__base.apply(this,arguments);this._isFocused=false},_bindEvents:function(){return this._bindToElem({focus:this._onFocus,blur:this._onBlur})},_onFocus:function(){this.addCSSClass(this.__self.CSS_CLASS_FOCUSED)._isFocused=true;this.trigger("focus")},_onBlur:function(){this.removeCSSClass(this.__self.CSS_CLASS_FOCUSED)._isFocused=false;this.trigger("blur")},_hasVal:function(){return true},_enableElems:function(){this._elem.attr("disabled",false)},_disableElems:function(){this._elem.attr("disabled",true)}});a.Widget.Input.Text=b.inherit(a.Widget.Input,{__constructor:function(){this.__base.apply(this,arguments);this._hintShowed=false},_init:function(){this.__base()._isFocused||this._updatePlaceholder();return this},_bindEvents:function(){return this.__base()._bindToElem("input change keyup blur",this._onChange)},_onFocus:function(){this.__base();this._updatePlaceholder()},_onBlur:function(){this.__base();this._updatePlaceholder()},_onChange:function(){this._updateValue()},_updatePlaceholder:function(){if(this._params.placeholder){var d=this._hintShowed,c=this._getVal().isEmpty();this._hintShowed?(this._isFocused||!c)&&(d=false):(!this._isFocused&&c)&&(d=true);d!=this._hintShowed&&this._getPlaceholder()[((this._hintShowed=d)?"remove":"add")+"Class"](this.__self.CSS_CLASS_HIDDEN)}},_setValToElem:function(){this._updatePlaceholder();this.__base.apply(this,arguments)},_getPlaceholder:b.memoize(function(){return b('<label for="'+this.getId()+'" class="'+this.__self.CSS_CLASS_PLACEHOLDER+'">'+this._params.placeholder+"</label>").insertBefore(this._elem.attr("id",this.getId()))}),_destruct:function(){this._params.placeholder&&this._getPlaceholder().remove();this.__base()}},{CSS_CLASS_PLACEHOLDER:a.CSS_CLASS_WIDGET+"-placeholder"});a.Widget.Input.Text.Combo=b.inherit(a.Widget.Input.Text,{__constructor:function(){this.__base.apply(this,arguments);this._isListShowed=this._preventOnBlur=this._preventOnFocus=this._preventUpdate=this._focusOnBlur=false;this._hilightedIndex=-1;this._itemsCount=0;this._lastSearchVal=this._keyDownValue=this._updateList=this._reposTimer=this._lastOffset=null},_init:function(){this.__base()._elem.attr("autocomplete","off");this._params.arrow&&this._params.arrow.attr("tabIndex",-1);this._updateList=b.debounce(function(d){if(this._elem){if(!this._params.showListOnEmpty&&this._elem.val()===""){return this._hideList()}var c=typeof d=="undefined"?this._elem.val():d;if(this._lastSearchVal===this._elem.val()&&typeof d=="undefined"){return this._showList()}this._getStorage().filter(this._lastSearchVal=c,b.proxy(this._onStorageFilter,this))}},this._params.debounceInterval);return this},_onStorageFilter:function(d,e){if(this._lastSearchVal==d){this._itemsCount=e.length;this._hilightedIndex=-1;if(!e.length){return this._hideList()}var c=this._elem.val(),f=this;this._getList().html(b.map(e,function(h,g){c==h&&(f._hilightedIndex=g);return f._params.listItemRenderFn(h,c,d)}).join(""));this._showList()}},_bindEvents:function(){var c=b.browser.opera?"keypress":"keydown",d={keyup:this._onKeyUp};d[c]=this._onKeyDown;this.__base()._bindToElem(d);var e=this._params.arrow;e&&this._bindTo(e,{mousedown:this._onArrowMouseDown,mouseup:this._onArrowMouseUp,click:this._onArrowClick});return this},_onFocus:function(){if(!this._preventOnFocus){this.__base();if(!this._preventUpdate){if(this._params.showAllOnFocus){this._updateList("");this._lastSearchVal=this._elem.val()}else{this._updateList()}}else{this._preventUpdate=false}}else{this._preventOnFocus=false}},_onBlur:function(){if(!this._preventOnBlur){this.__base();this._hideList()}else{this._preventOnBlur=false}if(this._focusOnBlur){this._focusOnBlur=false;setTimeout(b.proxy(function(){this.focus()._refocus()},this),0)}},_onArrowMouseDown:function(){if(this.isEnabled()){this._preventOnBlur=true;this._params.arrow.addClass(this.__self.CSS_CLASS_ARROW_PRESSED)}},_onArrowMouseUp:function(){this.isEnabled()&&this._params.arrow.removeClass(this.__self.CSS_CLASS_ARROW_PRESSED)},_onArrowClick:function(){if(!this.isEnabled()){return}if(this._isListShowed){this._hideList();this._preventOnFocus=true;this.focus()}else{this._preventUpdate=true;this.focus()._refocus()._updateList("");this._preventOnBlur=false}return false},_onKeyDown:function(c){if(this._keyDownValue!==null){return}this._keyDownValue=this._elem.val();if(c.metaKey||c.ctrlKey||c.shiftKey||c.altKey){return}switch(c.keyCode){case 13:if(this._isListShowed){this._itemsCount=0;this._hilightedIndex=-1;this.val(this._lastSearchVal=this._keyDownValue)._hideList();return false}break;case 38:this._prev();return false;case 40:this._next();return false}},_onKeyUp:function(c){if(!this._isFocused||c.metaKey||c.ctrlKey||c.shiftKey||c.altKey){return}c.keyCode!=9&&this._keyDownValue!=this._elem.val()&&this._updateList();this._keyDownValue=null},_prev:function(){this._isListShowed&&this._hilightItemByIndex((this._hilightedIndex>0?this._hilightedIndex:this._itemsCount)-1)},_next:function(){this._isListShowed&&this._hilightItemByIndex(this._hilightedIndex<this._itemsCount-1?this._hilightedIndex+1:0)},_hilightItemByIndex:function(c){this._getList().find("li").eq(this._hilightedIndex).removeClass(this.__self.CSS_CLASS_SELECTED).end().eq(c).addClass(this.__self.CSS_CLASS_SELECTED);this._selectItemByIndex(this._hilightedIndex=c)._keyDownValue=this.val()},_selectItemByIndex:function(d){if(this._isListShowed){var e=this.val(this._lastSearchVal=this._getList().find("li").eq(d).text())._elem[0];if(e.createTextRange&&!e.selectionStart){var c=e.createTextRange();c.move("character",this._elem.val().length);c.select()}}return this},_showList:function(){if(this._isListShowed||!this._isFocused||!this._itemsCount||(this._itemsCount==1&&this._hilightedIndex==0)){return}this._getListContainer().removeClass(this.__self.CSS_CLASS_INVISIBLE);this._reposList();this._isListShowed=true},_hideList:function(){if(this._isListShowed){this._reposTimer&&clearTimeout(this._reposTimer);this._getListContainer().addClass(this.__self.CSS_CLASS_INVISIBLE);this._isListShowed=false}},_reposList:function(){var e=this._elem.offset(),d=e.left,c=e.top+this._elem.outerHeight();if(!(this._lastOffset&&this._lastOffset.left==d&&this._lastOffset.top==c)){this._lastOffset={left:d,top:c};this._getListContainer().css({width:this._elem.outerWidth()+"px",left:d+"px",top:c+"px"})}this._params.reposList&&(this._reposTimer=setTimeout(b.proxy(arguments.callee,this),50))},_getListContainer:b.memoize(function(){var c=b('<div class="'+this.__self.CSS_CLASS_LIST+" "+this.__self.CSS_CLASS_INVISIBLE+'"><iframe frameborder="0" tabindex="-1"/><ul/></div>');this._bindTo(c,"mousedown",function(d){this._preventUpdate=this._focusOnBlur=true;this.val(this._lastSearchVal=b(d.target).closest("li").text()).focus()._hideList();setTimeout(b.proxy(function(){this._focusOnBlur=false},this),50);return false});return c.appendTo("body")}),_getList:b.memoize(function(){return this._getListContainer().find("ul")}),_getStorage:b.memoize(function(){var c=this;return c._params.storage.source=="remote"?new a.Storage.Remote(b.extend({name:c._params.storage.name||this.getName(),widgets:b.map((c._params.storage.values||"").split(","),function(d){var d=b.trim(d);return d?c._form.getWidgetByName(d):null})},c._params.storage)):new a.Storage.Local(c._params.storage)}),_refocus:function(){if(document.selection){var c=this._elem[0].createTextRange();c.collapse(true);c.moveStart("character",1000);c.moveEnd("character",1000);c.select()}return this},_enableElems:function(){this.__base();this._enableArrow(true)},_disableElems:function(){this.__base();this._enableArrow(false)},_enableArrow:function(c){var d=this._params.arrow;d&&(d[(c?"remove":"add")+"Class"](this.__self.CSS_CLASS_DISABLED))[0].tagName=="INPUT"&&d.attr("disabled",!c)},_getDefaultParams:function(c){return b.extend(this.__base(),{showAllOnFocus:false,showListOnEmpty:true,reposList:false,debounceInterval:c.storage.source=="remote"?200:50,listItemRenderFn:this.__self._listItemRender})},_destruct:function(){this._hideList();this.__base();this._getListContainer().remove()},_unbindAll:function(){this.__base();this._params.arrow&&this._params.arrow.unbind()}},{CSS_CLASS_LIST:a.CSS_CLASS_WIDGET+"-list",CSS_CLASS_ARROW_PRESSED:a.CSS_CLASS_WIDGET+"-comboarrow-pressed",_listItemRender:function(e,d,c){var f=e.toLowerCase().indexOf(c.toLowerCase());return"<li"+(d==e?' class="'+this.CSS_CLASS_SELECTED+'"':"")+">"+(f>-1?e.substr(0,f)+"<strong>"+e.substr(f,c.length)+"</strong>"+e.substr(f+c.length):e)+"</li>"}});a.Widget.Container=b.inherit(a.Widget,{__constructor:function(){this.__base.apply(this,arguments);this._children=[]},addChild:function(){var c=0,d;while(d=arguments[c++]){(d._parent=this)._children.push(d)}return this},focus:function(){var c=this._children[0];c&&c.focus();return this},enable:function(c){return this.__base(c)._applyFnToChildren("enable",[true])},disable:function(){return this.__base()._applyFnToChildren("disable")},reset:function(){return this.__base()._applyFnToChildren("reset")},_removeChild:function(e){var d=this._children,c=0,f;while(f=d[c++]){if(f===e){d.splice(c-1,1);return true}}return false},_init:function(){this._applyFnToChildren("_init").__base();var d=this._children,c=0,e;while(e=d[c++]){this._bindChildEvents(e)}return this},_reinit:function(){return this._applyFnToChildren("_reinit").__base()},_bindChildEvents:function(c){this._hasVal()||this._bindTo(c,"value-change enable disable",this._onChildChange)},_onChildChange:function(){this.trigger("value-change",this)},_setForm:function(c){return this._applyFnToChildren("_setForm",arguments).__base(c)},_checkDependencies:function(c,d){this.__base(c,d);d&&this._applyFnToChildren("_checkDependencies",arguments);return this},_beforeSubmit:function(){this._applyFnToChildren("_beforeSubmit").__base()},_checkRequired:function(g){if(this._hasVal()){return this.__base(g)}var e=this._children,d=0,h,c=0;while(h=e[d++]){if(h._dependencies.required){h.isRequired()||++c}else{var f=g.pattern;g.pattern=g.patternChild;h._checkRequired(g)&&++c;g.pattern=f}if(c>=g.min){return true}}return false},_processFirstUnreadyWidget:function(){var c=this.__base();if(c||this._hasVal()){return c}return this._processFirstUnreadyChildWidget()},_processFirstUnreadyChildWidget:function(){var d=this._children,c=0,f,e;while(f=d[c++]){if(e=f._processFirstUnreadyWidget()){return e}}},_destruct:function(){this._applyFnToChildren("_destruct").__base();delete this._children},_triggerRemove:function(){return this._applyFnToChildren("_triggerRemove").__base()},_applyFnToChildren:function(d,c){var f=this._children,e=0,g;while(g=f[e++]){g[d].apply(g,c||[])}return this}});a.Widget.Container.Form=b.inherit(a.Widget.Container,{__constructor:function(){this.__base.apply(this,arguments);this._widgetsByName={};this._widgetsDataById={};this._unreadyWidgetIds={};this._unreadyCounter=this._changedCounter=0},isChanged:function(){return this._changedCounter>0},isReady:function(){return this._unreadyCounter==0&&(!this._params.heedChanges||this.isChanged())},getWidgetByName:function(c){return this._widgetsByName[c]},getWidgetById:function(c){return this._widgetsDataById[c].widget},serialize:function(){var c={};b.each(this._widgetsByName,function(d){this._hasVal()&&this.isEnabled()&&(c[d]=this.val())});return c},submit:function(){this._elem.submit()},init:function(c){c?c._setForm(this)._init()._checkDependencies(null,true):this.__base();return this},_init:function(){this._setForm(this).__base()._checkDependencies().addCSSClass(this.__self.CSS_CLASS_INITED).__self._addInstance(this);this._unreadyCounter==0&&this.trigger("ready-change",this);this._elem.trigger("init.jz",this);return this},_reinit:function(){this._changedCounter=0;return this.__base()},_bindChildEvents:function(){},_bindEvents:function(){return this._bindToElem({submit:this._onSubmit,keydown:function(c){c.keyCode==27&&c.preventDefault()}})},_onSubmit:function(){if(this.isReady()){this._beforeSubmit();var c=this._params.preventSubmit;this.trigger("before-submit",this);return !c}var d=this;if(this._unreadyCounter>0){b.each(this._unreadyWidgetIds,function(e){d._widgetsDataById[e].widget._setNoReady(true)});this._params.focusOnNoReady&&this._processFirstUnreadyWidget().focus()}return false},_processFirstUnreadyWidget:function(){return this._processFirstUnreadyChildWidget()},_checkDependencies:function(){var c=this;b.each(c._widgetsDataById,function(){c!==this.widget&&this.widget._checkDependencies()});return c},_getDefaultParams:function(){return{heedChanges:false,preventSubmit:false,focusOnNoReady:true}},_addWidget:function(c){this._widgetsDataById[c.getId()]={widget:c,isReady:true};!!c.getName()&&(this._widgetsByName[c.getName()]=c);c!==this._bindTo(c,"focus",function(){this.__self._currentInstance=this})&&this._bindTo(c,{"ready-change":this._onWidgetReadyChange,remove:this._onWidgetRemove});c._hasVal()&&this._bindTo(c,"initial-value-change",this._onWidgetInitialValueChange)},_onWidgetReadyChange:function(g,f){var c=f.getId(),h=this._widgetsDataById[c],d=f.isReady();if(h.isReady!=d){this._unreadyCounter+=(h.isReady=d)?-1:1;d?delete this._unreadyWidgetIds[c]:this._unreadyWidgetIds[c]=true;this.trigger("ready-change",this)}},_onWidgetInitialValueChange:function(d,f){var c=this._changedCounter;this._changedCounter=c+(f?1:-1);c+this._changedCounter==1&&this.trigger("ready-change",this)},_onWidgetRemove:function(f,d){var c=d.getId(),g=this._widgetsDataById[c];if(g){delete this._widgetsDataById[c];!!d.getName()&&delete this._widgetsByName[d.getName()];if(!g.isReady){this._unreadyCounter--;delete this._unreadyWidgetIds[c]}this._changedCounter++;this.trigger("ready-change",this)}},_destruct:function(){this.removeCSSClass(this.__self.CSS_CLASS_INITED).__base();this.__self._removeInstance(this);this._delete("_widgetsByName","_widgetsDataById","_unreadyWidgetIds")}},{_currentInstance:null,_instanceCounter:0,_addInstance:function(c){this._currentInstance=c;++this._instanceCounter==1&&b(document).bind("keyup.jz",b.proxy(function(d){this._currentInstance&&d.keyCode==13&&d.ctrlKey&&this._currentInstance.submit()},null,this))},_removeInstance:function(c){this._currentInstance==c&&(this._currentInstance=null);--this._instanceCounter==0&&b(document).unbind("keyup.jz")}});a.Storage=b.inherit({__constructor:function(c){this._params=c},filter:function(c,d){}});a.Storage.Remote=b.inherit(a.Storage,{filter:function(c,e){var d=this._params;b.ajax(b.extend({success:function(f){e(c,f)},error:function(){e(c,[])},dataType:"json",data:(function(){var f={};f[d.name]=c;b.each(d.widgets,function(){f[this.getName()]=this.val()});return f})()},d.ajax))}});a.Value=b.inherit({__constructor:function(c){this._val=null;this.reset();typeof c!="undefined"&&this.set(c)},reset:function(){this.set("")},get:function(){return this._val},set:function(c){this._val=c.toString()},match:function(c){return c.test(this.get())},clone:function(){return new this.__self(this.get())},isEqual:function(c){return this._checkForCompareTypes(c)&&this.get()===new this.__self((c instanceof a.Value)?c.get():c).get()},isGreater:function(c){return this._checkForCompareTypes(c)&&this.get().length>new this.__self((c instanceof a.Value)?c.get():c).get().length},isGreaterOrEqual:function(c){return this.isGreater(c)||this.isEqual(c)},isLess:function(c){return this._checkForCompareTypes(c)&&!this.isGreaterOrEqual(c)},isLessOrEqual:function(c){return this._checkForCompareTypes(c)&&!this.isGreater(c)},isEmpty:function(){return this.get()===""},toString:function(){return this.get().toString()},_checkForCompareTypes:function(c){return c instanceof this.__self||typeof c=="string"}});a.Builder=b.inherit({__constructor:function(){this._widgets=[];this._widgetsByName={};this._widgetsById={}},build:function(f){var j=this,e=this._widgets.length,g,h;b.each(f.add(f.find("."+a.CSS_CLASS_WIDGET)),function(k){g=j._makeWidgetByElem(b(this));j._widgets.push(j._widgetsById[g.getId()]=g);k==0&&(h=g)});var d=j._widgets,c=e;while(g=d[c++]){g._hasVal()&&(j._widgetsByName[g.getName()]=g)}while(g=d[e++]){this._buildDependencies(g)}if(f[0].tagName.toLowerCase()=="form"){f.data("jz-builder",this);h.bind("remove",b.proxy(this._onFormRemove,this)).init()}else{d[0].init(h)}return h},_makeWidgetByElem:function(e){var d=this.__self,f=d._extractParamsFromElem(e),c=new (d._getWidgetClassByType(f.type))(e,d._getClassElem(e,f),f);f.type!="form"&&this._getParentWidget(e).addChild(c);return c},_getParentWidget:function(e){var d=e[0].parentNode,c=" "+a.CSS_CLASS_WIDGET+" ";do{if((" "+d.className+" ").indexOf(c)>-1){return this._widgetsById[a._identifyNode(d)]}}while(d=d.parentNode)},_buildDependencies:function(c){var d=c._params,e=this;b.each(["enabled","valid","required"],function(){this in d&&c.addDependence(this,e._buildDependence(this,c,d[this]))})},_buildDependence:function(c,e,d){return b.isArray(d)?(typeof d[0]=="string"?new a.Dependence.Composition.NOT({dependencies:[this._buildDependence(c,e,d[1])]}):new a.Dependence.Composition[d[1].toUpperCase()]({dependencies:[this._buildDependence(c,e,d[0]),this._buildDependence(c,e,d[2])]})):new a.Dependence[c.charAt(0).toUpperCase()+c.substr(1).toLowerCase()](b.extend(d,{widget:this._getFromWidget(d,e)}))},_getFromWidget:function(d,c){return d.id?this._widgetsById[d.id]:(d.name?this._widgetsByName[d.name]:c)||a._throwException('widget with name/id = "'+(d.id||d.name)+'" not found"')},_onFormRemove:function(d,c){c.getElement().removeData("jz-builder");delete this._widgets;delete this._widgetsByName;delete this._widgetsById}},{registerWidget:function(d,f,c,e){if(typeof f!="string"){e=c;c=f;f=undefined}this._types.push(d);this._typeToWidgetClass[d]=b.inherit(f?this._getWidgetClassByType(f):a.Widget,c,e)},_getClassElem:function(c,d){if(d.container){return c.closest(d.container)}switch(d.type){case"form":case"fieldset":case"button":case"submit":return c;case"rbgroup":case"cbgroup":case"state":return c.parent();default:return c.parent().parent()}},_extractParamsFromElem:function(d){var c=d[0].onclick?d[0].onclick().jz||{}:{};c.type||(c.type=this._extractTypeFromElem(d));if(c.type=="combo"){var e=d.parent().find("."+a.CSS_CLASS_WIDGET+"-comboarrow");e.length&&(c.arrow=e)}return c},_extractTypeFromElem:function(d){var c=d[0].tagName.toLowerCase();if(c=="input"){switch(d.attr("type")){case"radio":case"checkbox":return"state";case"button":return"button";case"image":case"submit":return"submit"}}return c=="select"||c=="fieldset"||c=="form"?c:(this._cssClassToType(d.attr("class"))||"text")},_types:["number","combo","datetime","date","fieldset","rbgroup","cbgroup","submit"],_typeRE:null,_rebuildTypeRE:function(){return this._typeRE=new RegExp(a.CSS_CLASS_WIDGET+"-("+this._types.join("|")+")")},_cssClassToType:function(c){return(c.match(this._typeRE||this._rebuildTypeRE())||[])[1]},_typeToWidgetClass:{text:a.Widget.Input.Text,combo:a.Widget.Input.Text.Combo,fieldset:a.Widget.Container,form:a.Widget.Container.Form},_getWidgetClassByType:function(c){return this._typeToWidgetClass[c]||a._throwException('undefined type "'+c+'"')}});return a})(jQuery);function undef(a){return a}function Autoarea(b,a){if(typeof b=="undefined"||y5.Classes.test(b,"js-not-resizable")){return}this.textarea=(typeof(b)!="string")?b:document.getElementById(b);if(this.textarea.autoarea){return}this.inplace=new MozillaInplace(b,a);if(typeof(document.execCommand)=="undefined"){return}this.bind();this.resizeArea()}Autoarea.prototype={bind:function(){var a=this;new y5.AEventListener("keyup",function(b){a.keyUp()},this.textarea,true);this.onerow=this.textarea.cloneNode(true);this.onerow.removeAttribute("id");this.onerow.removeAttribute("name");this.onerow.value="";this.onerow.style.position="absolute";this.onerow.style.top=0;this.onerow.style.left="-100%";this.onerow.style.visibility="hidden";this.onerow.style.height="1.2em";this.onerow.style.lineHeight="1.2em";this.textarea.style.lineHeight="1.2em";this.inplace.holster.style.lineHeight="1.2em";this.textarea.parentNode.appendChild(this.onerow);this.textarea.autoarea=this},keyUp:function(a){this.resizeArea()},resizeArea:function(){var a=this.inplace.getHeight();var b=this.textarea.rows*this.onerow.offsetHeight;if(a<b){a=b}a+=this.onerow.offsetHeight*2;this.textarea.style.height=a+"px"}};function MozillaInplace(b){var f=document.getElementById;var a=window.opera&&f;var e=a;var c=f&&(navigator.appName=="Netscape");var d=document.all&&document.all.item&&!e;this.isO8=a;this.isMZ=c;this.isIE=d;this.textarea=(typeof(b)!="string")?b:document.getElementById(b);this.bind();this.sophisticatedRegExp=new RegExp("^( +)",this.isMZ?"gmi":"gi")}MozillaInplace.prototype.bind=function(){var b=this.textarea;var d=this.getXY(b);var a=d[0];var e=d[1];this.holster=document.createElement("div");var c=this.holster;c.className="mozilla-inplace-holster";c.style.position="absolute";c.style.overflow="hidden";c.style.top=e+"px";c.style.left=(a-2000)+"px";if(document.getElementById("actionsMenusContainer")){document.getElementById("actionsMenusContainer").appendChild(c)}else{document.body.appendChild(c)}this.getCursor()};MozillaInplace.prototype.getXY=function(d){var b=(typeof(d)!="string")?d:document.getElementById(d);if(!b){return[-1,-1]}var a=0;var c=0;do{a+=parseInt(isNaN(parseInt(b.offsetLeft))?0:b.offsetLeft);c+=parseInt(isNaN(parseInt(b.offsetTop))?0:b.offsetTop);b=b.offsetParent}while(b);return[a,c]};MozillaInplace.prototype.getHeight=function(){var c=this.textarea;var e=this.holster;var f=c.value+"\n";var a="~spli\04tter~";var d=f.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(this.sophisticatedRegExp,a+"$1"+a).replace(/\n/g,"<br/>");var g=d.split(a);d="";for(var b=0;b<g.length;b++){if(b%2==0){d+=g[b]}else{d+=g[b].replace(/ /g,"&nbsp;")}}e.innerHTML=d;e.style.width=c.clientWidth+"px";return e.clientHeight};MozillaInplace.prototype.getCursor_ie=function(){var f=document.body;if((document.compatMode)&&(document.compatMode=="CSS1Compat")){f=document.documentElement}var b=document.selection;var g=b.createRange();var a=this.textarea;var e=f.scrollLeft+a.scrollLeft+g.boundingLeft;var c=f.scrollTop+a.scrollTop+g.boundingTop;return[e,c]};MozillaInplace.prototype.getCursor=function(){if(this.isIE){return this.getCursor_ie()}if(!this.isMZ){return false}var b=this.textarea;var a=0,c=0;try{a=b.selectionStart;c=b.selectionEnd}catch(d){}return this._getXYbySE(a,c)||false};MozillaInplace.prototype._getXYbySE=function(f,b){var j=this.textarea;var s=this.holster;var o="~spli\01tter~";var n="~spli\02tter~";var m="~spli\03tter~";var l="~spli\04tter~";var q=f;var w=b;var k=j.value;var c=k.substr(0,q);var v=k.substr(q);c=c.replace(/(\S*)$/i,n+"$1");v=v.replace(/^(\S*)/i,"$1"+m);k=c+o+v;var p="a"+new Date().getMilliseconds();var y=k.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\n/g,"<br/>").replace(o,"<span id='"+p+"' class='mozilla-inplace-cursor'></span>").replace(n,"<nobr>").replace(m,"</nobr>");var h=y.split(l);y="";for(var u=0;u<h.length;u++){if(u%2==0){y+=h[u]}else{y+=h[u].replace(/ /g,"&nbsp;")}}s.innerHTML=y;var g=document.defaultView.getComputedStyle(j,null).getPropertyValue("width");s.style.width=(parseInt((g).substr(0,g.length-2),10)-2)+"px";var e=document.getElementById(p);var a=this.getXY(s);var d=this.getXY(j);return[(e.offsetLeft+d[0]-j.scrollLeft),(e.offsetTop+d[1]-j.scrollTop),q,w]};MozillaInplace.prototype.getWordXY=function(b){var l=this.textarea;var k=" "+l.value.replace(/\r/ig,"")+" ";var h=[];var j=0;var a=0;var g=new RegExp("^\\W[^ ]+\\W$","");while(a>=0){a=k.indexOf(b,j);j=a+1;if(a>=0){var m=a-1;var e=b.length+2;if(m<0){m=0}var d=k.substr(m,e);if(g.test(d)){h[a-1]=a-1}}}if(this.isIE){return this._getMatchesXY_ie(b,h)}if(!this.isMZ){return[]}var c=[];for(var f in h){c[f]=this._getXYbySE(h[f],h[f]+b.length)}return c};MozillaInplace.prototype._getMatchesXY_ie=function(a,f){var g=document.body;if((document.compatMode)&&(document.compatMode=="CSS1Compat")){g=document.documentElement}var k=this.textarea;var b=[];for(var e in f){var h=k.createTextRange();h.collapse(true);h.moveStart("character",f[e]);h.moveEnd("character",a.length);var c=g.scrollLeft+k.scrollLeft+h.boundingLeft;var j=g.scrollTop+k.scrollTop+h.boundingTop;b[e]=[c,j,f[e],f[e]+a.length]}return b};MozillaInplace.prototype.makeSelection=function(b,c){if(this.isIE){return this._makeSelection_ie(b,c)}if(!this.isMZ){return false}var a=this.textarea;a.selectionStart=b;a.selectionEnd=c;return true};MozillaInplace.prototype._makeSelection_ie=function(b,d){var a=this.textarea;var c=a.createTextRange();c.collapse(true);c.moveStart("character",b);c.moveEnd("character",d-b);c.select();return c};MozillaInplace.prototype.replaceSelection=function(b){if(this.isIE){return this._replaceSelection_ie(b)}if(!this.isMZ){return false}var a=this.textarea;a.value=a.value.substr(0,a.selectionStart)+b+a.value.substr(a.selectionEnd);return true};MozillaInplace.prototype._replaceSelection_ie=function(b){var a=document.selection.createRange();a.text=b}
/*!	SWFObject v2.0 <http://code.google.com/p/swfobject/>
	Copyright (c) 2007 Geoff Stearns, Michael Williams, and Bobby van der Sluis
	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
;var swfobject=function(){var UNDEF="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFObjectExprInst",win=window,doc=document,nav=navigator,domLoadFnArr=[],regObjArr=[],timer=null,storedAltContent=null,storedAltContentId=null,isDomLoaded=false,isExpressInstallActive=false;var ua=function(){var w3cdom=typeof doc.getElementById!=UNDEF&&typeof doc.getElementsByTagName!=UNDEF&&typeof doc.createElement!=UNDEF&&typeof doc.appendChild!=UNDEF&&typeof doc.replaceChild!=UNDEF&&typeof doc.removeChild!=UNDEF&&typeof doc.cloneNode!=UNDEF,playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;if(d){d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");playerVersion[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);playerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);playerVersion[2]=/r/.test(d)?parseInt(d.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof win.ActiveXObject!=UNDEF){var a=null,fp6Crash=false;try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".7")}catch(e){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".6");playerVersion=[6,0,21];a.AllowScriptAccess="always"}catch(e){if(playerVersion[0]==6){fp6Crash=true}}if(!fp6Crash){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX)}catch(e){}}}if(!fp6Crash&&a){try{d=a.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");playerVersion=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)]}}catch(e){}}}}var u=nav.userAgent.toLowerCase(),p=nav.platform.toLowerCase(),webkit=/webkit/.test(u)?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,ie=false,windows=p?/win/.test(p):/win/.test(u),mac=p?/mac/.test(p):/mac/.test(u);
/*@cc_on
			ie = true;
			@if (@_win32)
				windows = true;
			@elif (@_mac)
				mac = true;
			@end
		@*/
return{w3cdom:w3cdom,pv:playerVersion,webkit:webkit,ie:ie,win:windows,mac:mac}}();var onDomLoad=function(){if(!ua.w3cdom){return}addDomLoadEvent(main);if(ua.ie&&ua.win){try{doc.write("<script id=__ie_ondomload defer=true src=//:><\/script>");var s=getElementById("__ie_ondomload");if(s){s.onreadystatechange=function(){if(this.readyState=="complete"){this.parentNode.removeChild(this);callDomLoadFunctions()}}}}catch(e){}}if(ua.webkit&&typeof doc.readyState!=UNDEF){timer=setInterval(function(){if(/loaded|complete/.test(doc.readyState)){callDomLoadFunctions()}},10)}if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("DOMContentLoaded",callDomLoadFunctions,null)}addLoadEvent(callDomLoadFunctions)}();function callDomLoadFunctions(){if(isDomLoaded){return}if(ua.ie&&ua.win){var s=createElement("span");try{var t=doc.getElementsByTagName("body")[0].appendChild(s);t.parentNode.removeChild(t)}catch(e){return}}isDomLoaded=true;if(timer){clearInterval(timer);timer=null}var dl=domLoadFnArr.length;for(var i=0;i<dl;i++){domLoadFnArr[i]()}}function addDomLoadEvent(fn){if(isDomLoaded){fn()}else{domLoadFnArr[domLoadFnArr.length]=fn}}function addLoadEvent(fn){if(typeof win.addEventListener!=UNDEF){win.addEventListener("load",fn,false)}else{if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("load",fn,false)}else{if(typeof win.attachEvent!=UNDEF){win.attachEvent("onload",fn)}else{if(typeof win.onload=="function"){var fnOld=win.onload;win.onload=function(){fnOld();fn()}}else{win.onload=fn}}}}}function main(){var rl=regObjArr.length;for(var i=0;i<rl;i++){var id=regObjArr[i].id;if(ua.pv[0]>0){var obj=getElementById(id);if(obj){regObjArr[i].width=obj.getAttribute("width")?obj.getAttribute("width"):"0";regObjArr[i].height=obj.getAttribute("height")?obj.getAttribute("height"):"0";if(hasPlayerVersion(regObjArr[i].swfVersion)){if(ua.webkit&&ua.webkit<312){fixParams(obj)}setVisibility(id,true)}else{if(regObjArr[i].expressInstall&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){showExpressInstall(regObjArr[i])}else{displayAltContent(obj)}}}}else{setVisibility(id,true)}}}function fixParams(obj){var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var e=createElement("embed"),a=nestedObj.attributes;if(a){var al=a.length;for(var i=0;i<al;i++){if(a[i].nodeName.toLowerCase()=="data"){e.setAttribute("src",a[i].nodeValue)}else{e.setAttribute(a[i].nodeName,a[i].nodeValue)}}}var c=nestedObj.childNodes;if(c){var cl=c.length;for(var j=0;j<cl;j++){if(c[j].nodeType==1&&c[j].nodeName.toLowerCase()=="param"){e.setAttribute(c[j].getAttribute("name"),c[j].getAttribute("value"))}}}obj.parentNode.replaceChild(e,obj)}}function fixObjectLeaks(id){if(ua.ie&&ua.win&&hasPlayerVersion("8.0.0")){win.attachEvent("onunload",function(){var obj=getElementById(id);if(obj){for(var i in obj){if(typeof obj[i]=="function"){obj[i]=function(){}}}obj.parentNode.removeChild(obj)}})}}function showExpressInstall(regObj){isExpressInstallActive=true;var obj=getElementById(regObj.id);if(obj){if(regObj.altContentId){var ac=getElementById(regObj.altContentId);if(ac){storedAltContent=ac;storedAltContentId=regObj.altContentId}}else{storedAltContent=abstractAltContent(obj)}if(!(/%$/.test(regObj.width))&&parseInt(regObj.width,10)<310){regObj.width="310"}if(!(/%$/.test(regObj.height))&&parseInt(regObj.height,10)<137){regObj.height="137"}doc.title=doc.title.slice(0,47)+" - Flash Player Installation";var pt=ua.ie&&ua.win?"ActiveX":"PlugIn",dt=doc.title,fv="MMredirectURL="+win.location+"&MMplayerType="+pt+"&MMdoctitle="+dt,replaceId=regObj.id;if(ua.ie&&ua.win&&obj.readyState!=4){var newObj=createElement("div");replaceId+="SWFObjectNew";newObj.setAttribute("id",replaceId);obj.parentNode.insertBefore(newObj,obj);obj.style.display="none";win.attachEvent("onload",function(){obj.parentNode.removeChild(obj)})}createSWF({data:regObj.expressInstall,id:EXPRESS_INSTALL_ID,width:regObj.width,height:regObj.height},{flashvars:fv},replaceId)}}function displayAltContent(obj){if(ua.ie&&ua.win&&obj.readyState!=4){var el=createElement("div");obj.parentNode.insertBefore(el,obj);el.parentNode.replaceChild(abstractAltContent(obj),el);obj.style.display="none";win.attachEvent("onload",function(){obj.parentNode.removeChild(obj)})}else{obj.parentNode.replaceChild(abstractAltContent(obj),obj)}}function abstractAltContent(obj){var ac=createElement("div");if(ua.win&&ua.ie){ac.innerHTML=obj.innerHTML}else{var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var c=nestedObj.childNodes;if(c){var cl=c.length;for(var i=0;i<cl;i++){if(!(c[i].nodeType==1&&c[i].nodeName.toLowerCase()=="param")&&!(c[i].nodeType==8)){ac.appendChild(c[i].cloneNode(true))}}}}}return ac}function createSWF(attObj,parObj,id){var r,el=getElementById(id);if(typeof attObj.id==UNDEF){attObj.id=id}if(ua.ie&&ua.win){var att="";for(var i in attObj){if(attObj[i]!=Object.prototype[i]){if(i=="data"){parObj.movie=attObj[i]}else{if(i.toLowerCase()=="styleclass"){att+=' class="'+attObj[i]+'"'}else{if(i!="classid"){att+=" "+i+'="'+attObj[i]+'"'}}}}}var par="";for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par+='<param name="'+j+'" value="'+parObj[j]+'" />'}}el.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+att+">"+par+"</object>";fixObjectLeaks(attObj.id);r=getElementById(attObj.id)}else{if(ua.webkit&&ua.webkit<312){var e=createElement("embed");e.setAttribute("type",FLASH_MIME_TYPE);for(var k in attObj){if(attObj[k]!=Object.prototype[k]){if(k=="data"){e.setAttribute("src",attObj[k])}else{if(k.toLowerCase()=="styleclass"){e.setAttribute("class",attObj[k])}else{if(k!="classid"){e.setAttribute(k,attObj[k])}}}}}for(var l in parObj){if(parObj[l]!=Object.prototype[l]){e.setAttribute(l,parObj[l])}}el.parentNode.replaceChild(e,el);r=e}else{var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in attObj){if(attObj[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){o.setAttribute("class",attObj[m])}else{if(m!="classid"){o.setAttribute(m,attObj[m])}}}}for(var n in parObj){if(parObj[n]!=Object.prototype[n]){createObjParam(o,n,parObj[n])}}el.parentNode.replaceChild(o,el);r=o}}return r}function createObjParam(el,pName,pValue){var p=createElement("param");p.setAttribute("name",pName);p.setAttribute("value",pValue);el.appendChild(p)}function getElementById(id){return doc.getElementById(id)}function createElement(el){return doc.createElement(el)}function hasPlayerVersion(rv){var pv=ua.pv,v=rv.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt(v[1],10);v[2]=parseInt(v[2],10);return(pv[0]>v[0]||(pv[0]==v[0]&&pv[1]>v[1])||(pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]))?true:false}function createCSS(sel,decl){if(ua.ie&&ua.mac){return}var h=doc.getElementsByTagName("head")[0],s=createElement("style");s.setAttribute("type","text/css");s.setAttribute("media","screen");if(!(ua.ie&&ua.win)&&typeof doc.createTextNode!=UNDEF){s.appendChild(doc.createTextNode(sel+" {"+decl+"}"))}h.appendChild(s);if(ua.ie&&ua.win&&typeof doc.styleSheets!=UNDEF&&doc.styleSheets.length>0){var ls=doc.styleSheets[doc.styleSheets.length-1];if(typeof ls.addRule==OBJECT){ls.addRule(sel,decl)}}}function setVisibility(id,isVisible){var v=isVisible?"visible":"hidden";if(isDomLoaded){getElementById(id).style.visibility=v}else{createCSS("#"+id,"visibility:"+v)}}return{registerObject:function(objectIdStr,swfVersionStr,xiSwfUrlStr){if(!ua.w3cdom||!objectIdStr||!swfVersionStr){return}var regObj={};regObj.id=objectIdStr;regObj.swfVersion=swfVersionStr;regObj.expressInstall=xiSwfUrlStr?xiSwfUrlStr:false;regObjArr[regObjArr.length]=regObj;setVisibility(objectIdStr,false)},getObjectById:function(objectIdStr){var r=null;if(ua.w3cdom&&isDomLoaded){var o=getElementById(objectIdStr);if(o){var n=o.getElementsByTagName(OBJECT)[0];if(!n||(n&&typeof o.SetVariable!=UNDEF)){r=o}else{if(typeof n.SetVariable!=UNDEF){r=n}}}}return r},embedSWF:function(swfUrlStr,replaceElemIdStr,widthStr,heightStr,swfVersionStr,xiSwfUrlStr,flashvarsObj,parObj,attObj){if(!ua.w3cdom||!swfUrlStr||!replaceElemIdStr||!widthStr||!heightStr||!swfVersionStr){return}widthStr+="";heightStr+="";if(hasPlayerVersion(swfVersionStr)){setVisibility(replaceElemIdStr,false);var att=(typeof attObj==OBJECT)?attObj:{};att.data=swfUrlStr;att.width=widthStr;att.height=heightStr;var par=(typeof parObj==OBJECT)?parObj:{};if(typeof flashvarsObj==OBJECT){for(var i in flashvarsObj){if(flashvarsObj[i]!=Object.prototype[i]){if(typeof par.flashvars!=UNDEF){par.flashvars+="&"+i+"="+flashvarsObj[i]}else{par.flashvars=i+"="+flashvarsObj[i]}}}}addDomLoadEvent(function(){createSWF(att,par,replaceElemIdStr);if(att.id==replaceElemIdStr){setVisibility(replaceElemIdStr,true)}});return true}else{if(xiSwfUrlStr&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){setVisibility(replaceElemIdStr,false);addDomLoadEvent(function(){var regObj={};regObj.id=regObj.altContentId=replaceElemIdStr;regObj.width=widthStr;regObj.height=heightStr;regObj.expressInstall=xiSwfUrlStr;showExpressInstall(regObj)});return true}}return false},getFlashPlayerVersion:function(){return{major:ua.pv[0],minor:ua.pv[1],release:ua.pv[2]}},hasFlashPlayerVersion:hasPlayerVersion,createSWF:function(attObj,parObj,replaceElemIdStr){if(ua.w3cdom&&isDomLoaded){return createSWF(attObj,parObj,replaceElemIdStr)}else{return undefined}},createCSS:function(sel,decl){if(ua.w3cdom){createCSS(sel,decl)}},addDomLoadEvent:addDomLoadEvent,addLoadEvent:addLoadEvent,getQueryParamValue:function(param){var q=doc.location.search||doc.location.hash;if(param==null){return q}if(q){var pairs=q.substring(1).split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return pairs[i].substring((pairs[i].indexOf("=")+1))}}}return""},expressInstallCallback:function(){if(isExpressInstallActive&&storedAltContent){var obj=getElementById(EXPRESS_INSTALL_ID);if(obj){obj.parentNode.replaceChild(storedAltContent,obj);if(storedAltContentId){setVisibility(storedAltContentId,true);if(ua.ie&&ua.win){storedAltContent.style.display="block"}}storedAltContent=null;storedAltContentId=null;isExpressInstallActive=false}}}}}();function yauserHost(b){var a=window.location.host;var c=window.location.host.indexOf(".");return b+a.substring(c)}function yacommunityHost(b){var a=window.location.host;var c=window.location.host.indexOf(".");return"clubs"+a.substring(c)+"/"+b}function yasourceLink(b){var a;if(y5.Types.string(b)){a=yauserHost(b)}else{if(b.type=="community"){a=yacommunityHost(b.login)}else{a=yauserHost(b.login)}}return"http://"+a+"/"}function friendsFullURL(a,b,c){return yasourceLink(a)+friendsURL4xml(b,c)}function friendsURL(a,d){var c;var e=g_globals.current_location.source;if(e.type&&e.type=="community"){c=yacommunityHost(e.login)}else{var b=new y5.URL();c=b.host()}return"http://"+c+"/"+friendsURL4xml(a,d)}function friendsURL4xml(a,b){if(!a){return""}if(b){return a+".xml?"+b}else{if(a.indexOf(".xml?")>-1){return a}else{return a+".xml"}}}Friends.UserPanelActions=new function(){this.createFromTag=function(a){new Friends.UserPanelActions.Constructor(a)}};Friends.UserPanelActions.Constructor=function(a){this.control=a;this.button=0;this.actionsMenu=0;this.actionsMenu_button=0;this.init()};Friends.UserPanelActions.Constructor.prototype=new function(){this.showActions=function(a,b){a.cancelBubble=true;this.adjustActionsMenu(null,b);return false};this.init=function(){var a=this;this.button=y5.Dom.getDescendant(this.control,"a","or");if(!this.button){return}if(!g_source){this.button.style.visibility="hidden"}new y5.AEventListener("click",function(b){a.showActions(b);b.stopPropagation();b.preventDefault()},this.button,true);y5.ShortCut.press([{key:y5.ShortCut.ENTER}],function(b){a.showActions(b,true);b.stopPropagation();b.preventDefault()},this.button,false);this.initActionsMenu()};this.destruct=function(){if(this.button){if(this.button.onclick){this.button.onclick=null}this.button=null}};this.initActionsMenu=function(){this.actionsMenu=y5.Dom.getDescendant(this.control,"div","b-actions-select");y5.Dom.getBody().appendChild(this.actionsMenu);var a=this.actionsMenu.getElementsByTagName("a");this.actionsMenuFirstLink=a[0];this.actionsMenu_button=a[1];this.actionsList=y5.Dom.getDescendant(this.control,"*","b-actions-list");y5.Utils.fakeFrame.init(this.actionsMenu);var b=this;if(y5.Vars.is_ie){this.actionsMenu.outListener=new y5.AEventListener("focusout",function(c){if(y5.Dom.isChild(c.toElement,b.actionsMenu)){return}b.adjustActionsMenu(false)},this.actionsMenu,false)}else{if(y5.Vars.is_opera){this.actionsMenu.outListener=new y5.AEventListener("keyup",function(c){if(y5.Dom.isChild(c.target,b.actionsMenu)){return}b.adjustActionsMenu(false)},document,false)}else{this.actionsMenu.outListener=new y5.AEventListener("blur",function(c){if(y5.Dom.isChild(c.explicitOriginalTarget,b.actionsMenu)){return}b.adjustActionsMenu(false)},document,false)}}this.actionsMenu.mousedownListener=new y5.AEventListener("mousedown",function(c){if(y5.Dom.isChild(c.target,b.actionsMenu)){return}b.adjustActionsMenu(false)},document,false);this.actionsMenu.resizeListener=new y5.AEventListener("resize",function(c){b.adjustActionsMenu(false)},window,false);new y5.AEventListener("click",function(c){b.adjustActionsMenu(false);c.preventDefault();c.stopPropagation()},this.actionsMenu_button,true)};this.adjustActionsMenu=function(b,c){if(b==null){b=(0==(this.actionsMenu.offsetHeight||0))}if(b){var a=y5.Dom.getOffsset(this.actionsList);this.actionsMenu.style.top=a[1]-6+"px";this.actionsMenu.style.left=a[0]-3+"px";this.actionsMenu.style.display="block";if(c){if((this.actionsMenuFirstLink.offsetHeight||0)>0){this.actionsMenuFirstLink.focus()}}else{if(this.actionsMenu.focus){this.actionsMenu.focus();this.actionsMenu.blur()}}this.actionsMenu.outListener.add();this.actionsMenu.mousedownListener.add();this.actionsMenu.resizeListener.add()}else{this.actionsMenu.style.display="none";this.actionsMenu.outListener.remove();this.actionsMenu.mousedownListener.remove();this.actionsMenu.resizeListener.remove()}y5.Utils.fakeFrame.adjust(this.actionsMenu)}};y5.require(["Events","Dom","Arrays","ShortCuts","Utils"],function(){y5.loaded("{Friends}.UserPanelActions")});(function(a){if(!a){a=window.Lego={}}a.messages=a.messages||{};a.message=function(c,b){return a.params.locale=="ru"?b:(a.messages[c]||b)}})(window.Lego);(function(){var a=function(){var b=document.documentElement.style;return typeof b.borderRadius==="string"||typeof b.WebkitBorderRadius==="string"||typeof b.KhtmlBorderRadius==="string"||typeof b.MozBorderRadius==="string"};document.documentElement.className+=a()?" m-border-radius":" m-no-border-radius"}());(function(b){if(!b){b=window.Lego={}}function a(c){return c.replace(/^(?:https?:)?\/\//,"")}b.c=function(d,c,j){var i=a((j&&j.host)||b.params["click-host"]||"clck.yandex.ru"),e=function(l,n,m,k){return n.indexOf("/dtype=")>-1?n:location.protocol+"//"+i+"/"+m+"/dtype="+l+"/rnd="+((new Date()).getTime()+Math.round(Math.random()*100))+(k?"/*"+(n.match(/^http/)?n:location.protocol+"//"+location.host+(n.match("^/")?n:"/"+n)):"/*data="+encodeURIComponent("url="+encodeURIComponent((n.match(/^http/)?n:location.protocol+"//"+location.host+(n.match("^/")?n:"/"+n)))))},g=function(){var k=document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0];var h=document.createElement("script");h.setAttribute("src",e(d,location.href,"jclck"));k.insertBefore(h,k.firstChild)};if(c){if(c.className.match(/b-pseudo-link/)||(c.href&&c.href.match(/^mailto:/))||(j&&j.noRedirect===true)){g()}else{if(c.href){var f=c.href;c.href=e(d,f,"redir");setTimeout(function(){c.href=f},500)}else{if(c.form){if(c.type.match(/submit|button|image/)){var f=c.form.action;c.form.action=e(d,f,"redir",true);setTimeout(function(){c.form.action=f},500)}else{g()}}else{if(c.action){c.action=e(d,c.action,"redir",true)}else{throw"counter.js: not link and not form!"}}}}}else{g()}}})(window.Lego);(function(a){if(!a){a=window.Lego={}}a.cp=function(f,c,e,b,d){a.c("stred/pid="+f+"/cid="+c+(e?"/path="+e:""),b,d)}})(window.Lego);(function(a){if(!a){a=window.Lego={}}a.ch=function(c,b){if(a.params["show-counters"]){a.cp(0,2219,c,b)}}})(window.Lego);(function(a){if(!a){a=window.Lego={}}a.getCookie=function(h){var g=document.cookie;if(g.length<1){return false}var d=g.indexOf(h+"=");if(d==-1){return false}d+=(h.length+1);var f=g.indexOf(";",d);return decodeURIComponent((f==-1)?g.substring(d):g.substring(d,f))}})(window.Lego);(function(a){if(!a){a=window.Lego={}}a.isSessionValid=function(){return !!a.getCookie("yandex_login")}})(window.Lego);(function(b,a){if(!a){a=window.Lego={}}a.init||(a.init=function(c){(c=a.params=b.extend({id:"",login:a.isSessionValid()?a.getCookie("yandex_login")||"":"",yandexuid:a.getCookie("yandexuid"),locale:"ru",retpath:window.location.toString(),"passport-host":"//passport.yandex.ru","pass-host":"//pass.yandex.ru","passport-msg":c.id,"social-host":"//social.yandex.ru","lego-path":"/lego","show-counters-percent":100},c,a.params))["show-counters"]=Math.round(Math.random()*100)<=c["show-counters-percent"];b(function(){c.oframebust&&a.oframebust(c.oframebust)});return c});a.block||(a.block={});a.blockInit||(a.blockInit=function(c,d){c=c||document;d=d||".g-js";b(c).find(d).each(function(){var h=b(this),g=this.onclick?this.onclick():{},e=g.name||"",f=a.block[e];if(f&&!h.data(e)){f.call(h,g);h.data(e,true).addClass(e+"_js_inited")}})});a.blockInitBinded||(a.blockInitBinded=!!b(document).ready(function(){a.blockInit()}))})(jQuery,window.Lego);(function(a){a=a||{};a.oframebustMatchDomain=function(g,h){g=Object.prototype.toString.call(g)==="[object Array]"?g:(function(){var d=[];for(var e in g){g.hasOwnProperty(e)&&d.push(e)}return d}());for(var c=0,b=g.length;c<b;c++){var k=g[c];if(typeof(k)=="string"){if(/(\?|\*)/.test(k)){var f=k.replace(/\./g,"\\.").replace(/\*/g,".*").replace(/\?/g,".{1}");if((new RegExp("^"+f+"$")).test(h)){return true}}else{if(h==k){return true}}}else{try{if(k.test(h)){return true}}catch(j){}}}}})(window.Lego);(function(a){if(!a){a=window.Lego={}}a.oframebust=function(c){if(location==top.location){return}var d=(location.search.match(/[&?]oframebust=([^&;]+)/)||[])[1];if(!d){top.location=location}if(a.oframebustMatchDomain(c,d)){var b=document.createElement("iframe");b.style.position="absolute";b.style.left="-999px";b.style.width="1px";b.src="//"+d+"/oframebust.html?"+encodeURIComponent(location.href);(function(){if(document.body&&document.body.firstChild){document.body.insertBefore(b,document.body.firstChild)}else{setTimeout(arguments.callee,0)}})();return}top.location=location}})(window.Lego);(function(c,b){var a=b.block["i-metrika"]=function(d){d.counter&&a.newCounter(d.counter)};a.counters=[];a.newCounter=function(d){a.counters.push(d)};a.callback=function(d){return function(){a.newCounter=function(g){var f=window["yaCounter"+g]=new Ya.Metrika({id:g,ut:"noindex"});f.clickmap();f.trackLinks({external:true})};var e;while(e=a.counters.shift()){a.newCounter(e)}d&&d()}};!(window.Ya&&Ya.Metrika)&&c(function(){var f=document,e=f.createElement("script");e.type="text/javascript";e.src="//mc.yandex.ru/metrika/watch.js";e.setAttribute("async","true");window.yandex_metrika_callback=a.callback(window.yandex_metrika_callback);f.documentElement.firstChild.appendChild(e)})})(jQuery,window.Lego);(function(c,a){var b=a.block["b-head-tabs"]=function(u){var e=c(this),x=c(".b-head-search"),w=x.find(".b-search .b-form-input input:first"),n=a.params.id,j=p(document.location.search),i={www:505,search:521,images:526}[n]||527,f={market:{cvredirect:1,clid:i}},l={news:{rpt:"nnews",grhow:"clutop"},haber:{rpt:"nnews2",grhow:"clutop"},yaca:{rpt:"rs2"},market:{cvredirect:1,clid:i},blogs:{ft:"blog"}},v=(function(){var y={};c.each(["news","yaca","market","blogs","maps","adresa","video","fotki","slovari","auto","images","music","www","aile","yandex","haber","gorsel"],function(){y[this]=["family"]});return y})(),q=(function(){var y={};c.each(["news","yaca","market","blogs","maps","adresa","video","fotki","slovari","auto","images","music","www","aile","yandex","haber","gorsel"],function(){y[this]=["noreask","family"]});return y})(),s=e.find(':not(strong)>a.b-head-tabs__link:not([href$="/all"])').map(function(){var z=this.host.split(".")[0],A=p(this.search),B=A.clid,y=c.param(c.extend(A,g(z,B)),true);return{node:this,clid:B,toServiceId:z,path:b.getHostToUrlMap()[z],host:this.host,searchHost:b.getHostMap()[z],noSearchParamsUrl:y?"?"+y:"",searchParams:c.extend(A,o(z,B))}}).filter(function(){return typeof this.path!=="undefined"}),m,t=x.find(".b-search__advanced")[0];if(t){var h=p(t.search),k=t.pathname.replace(/^\/?(.*)/,"$1");h.text="";s.push({node:t,clid:h.clid,toServiceId:n,path:k,host:t.host,noSearchParamsUrl:k+"?"+c.param(h,true),searchParams:h})}(function(){var y=c.trim(w.val())||u["default"];if(m!=y){m=y;c.each(s,function(){y&&(this.searchParams[b.getSearchParamName(this.toServiceId)]=y);this.node.href=[this.node.protocol+"/",y&&this.searchHost?this.searchHost:this.host,y?this.path+"?"+c.param(this.searchParams,true):this.noSearchParamsUrl].join("/")})}setTimeout(arguments.callee,200)})();function g(y,z){var A=f[y]||{};!A.clid&&z&&(A.clid=z);c.each(v[y]||[],function(){j[this]&&(A[this]=j[this])});return A}function o(z,A){var C=[].concat(q[z]),y=z+n;(y=="imageswww"||y=="wwwimages")&&C.push("site");var B=l[z]||{};c.each(C,function(){j[this]&&(B[this]=j[this])});!B.clid&&A&&z!=="www"&&(B.clid=A);return B}function p(y){var z={};c.each(y.substr(1).split("&"),function(D){var E=this.split("="),A=E[0],C=E[1];if(A){if(z.hasOwnProperty(A)){var B=z[A];c.isArray(B)?B.push(C):z[A]=[B,C]}else{z[A]=C}}});return c.decodeURIComponent!==undefined?d(z):z}function d(z){var y=["site"];c.each(z,function(A,B){if(c.inArray(A,y)>-1){z[A]=c.isArray(B)?B.map(function(C){return c.decodeURIComponent(C)}):c.decodeURIComponent(B)}});return z}};c.extend(b,{getHostToUrlMap:function(){var d={www:"yandsearch",market:"search.xml",maps:"",music:"#/search",video:"#search"};d.harita=d.maps;d.blogs=d.adresa=d.fotki=d.slovari=d.auto=d.market;d.news=d.yaca=d.images=d.gorsel=d.haber=d.aile=d.yandex=d.www;return d},getHostMap:function(){return{}},getSearchParamName:function(d){return"text"}})})(jQuery,window.Lego);(function(e){var b=(function(){_}).toString().indexOf("_")>-1,a=e.browser.msie,c=a?["toString","valueOf"]:null,f=function(){};function d(h,g,i){var k=false;if(a){var j=[];e.each(c,function(){i.hasOwnProperty(this)&&(k=true)&&j.push({name:this,val:i[this]})});if(k){e.each(i,function(l){j.push({name:l,val:this})});i=j}}e.each(i,function(m,n){if(k){m=n.name;n=n.val}if(e.isFunction(n)&&(!b||n.toString().indexOf(".__base")>-1)){var l=h[m]||function(){};g[m]=function(){var p=this.__base;this.__base=l;var o=n.apply(this,arguments);this.__base=p;return o}}else{g[m]=n}})}e.inherit=function(){var h=e.isFunction(arguments[0]),n=h?arguments[0]:f,j=arguments[h?1:0]||{},l=arguments[h?2:1],g=j.__constructor||(h&&n.prototype.__constructor)?function(){this.__constructor.apply(this,arguments)}:function(){};if(!h){g.prototype=j;g.prototype.__self=g.prototype.constructor=g;return e.extend(g,l)}e.extend(g,n);var k=function(){},i=k.prototype=n.prototype,m=g.prototype=new k();m.__self=m.constructor=g;d(i,m,j);l&&d(n,g,l);return g};e.inheritSelf=function(j,h,i){var g=j.prototype;d(g,g,h);i&&d(j,j,i);return j}})(jQuery);(function(c){var a=0,d="__"+(+new Date),b=function(){return"uniq"+ ++a};c.identify=function(g,f){if(!g){return b()}var e="uniqueID" in g?"uniqueID":d;return f||e in g?g[e]:g[e]=b()}})(jQuery);(function(a){a.isEmptyObject||(a.isEmptyObject=function(c){for(var b in c){return false}return true})})(jQuery);(function(d){var a="__"+ +new Date+"storage",c=function(f,e){return d.identify(f)+(e?d.identify(e):"")},b={buildEventName:function(f){return f},on:function(o,j,p,t,m){if(typeof o=="string"){if(d.isFunction(j)){t=p;p=j;j=undefined}var f=c(p,t),l=this[a]||(this[a]={}),g=o.split(" "),h=0,q;while(o=g[h++]){o=this.buildEventName(o);q=l[o]||(l[o]={ids:{},list:{}});if(!(f in q.ids)){var n=q.list,s={fn:p,data:j,ctx:t,special:m};if(n.last){n.last.next=s;s.prev=n.last}else{n.first=s}q.ids[f]=n.last=s}}}else{var k=this;d.each(o,function(u,i){k.on(u,i,j,m)})}return this},onFirst:function(i,h,g,f){return this.on(i,h,g,f,{one:true})},un:function(p,q,u){if(typeof p=="string"||typeof p=="undefined"){var n=this[a];if(n){if(p){var h=p.split(" "),k=0,s;while(p=h[k++]){p=this.buildEventName(p);if(s=n[p]){if(q){var g=c(q,u),f=s.ids;if(g in f){var o=s.list,t=f[g],j=t.prev,l=t.next;if(j){j.next=l}else{if(t===o.first){o.first=l}}if(l){l.prev=j}else{if(t===o.last){o.last=j}}delete f[g]}}else{delete this[a][p]}}}}else{delete this[a]}}}else{var m=this;d.each(p,function(v,i){m.un(v,i,u)})}return this},trigger:function(j,h){var l=this,k=l[a],i;typeof j==="string"?j=d.Event(l.buildEventName(i=j)):j.type=l.buildEventName(i=j.type);if(k&&(k=k[j.type])){var g=k.list.first,f;while(g){j.data=g.data;f=g.fn.call(g.ctx||l,j,h);if(typeof f!=="undefined"){j.result=f;if(f===false){j.preventDefault();j.stopPropagation()}}g.special&&g.special.one&&l.un(i,g.fn,g.ctx);g=g.next}}return this}};d.observable=d.inherit(b,b)})(jQuery);(function(e,g){var d=[],f={},a={};function c(j,i,h){return(j?"__elem_"+j:"")+"__mod"+(i?"_"+i:"")+(h?"_"+h:"")}function b(i,h,j){e.isFunction(i)?(h[c(j,"*","*")]=i):e.each(i,function(l,k){e.isFunction(k)?(h[c(j,l,"*")]=k):e.each(k,function(m,n){h[c(j,l,m)]=n})})}this.BEM=e.inherit(e.observable,{__constructor:function(i,j,h){var k=this;k._modCache=i||{};k._processingMods={};k.params=e.extend(k.getDefaultParams(),j);h!==false?k._init():k.afterCurrentEvent(k._init)},_init:function(){var h=this;if("_modCache" in h&&!h.hasMod("js","inited")){h.setMod("js","inited").trigger("init")}return h},changeThis:function(i,h){var j=this;return function(){return i.apply(h||j,arguments)}},afterCurrentEvent:function(i,h){this.__self.afterCurrentEvent(this.changeThis(i,h))},trigger:function(i,h){this.__base(i=this.buildEvent(i),h).__self.trigger(i,h);return this},buildEvent:function(h){typeof h=="string"&&(h=e.Event(h));h.block=this;return h},hasMod:function(k,l,i){var h=arguments.length,m=false;if(h==1){i="";l=k;k=g;m=true}else{if(h==2){if(typeof k=="string"){i=l;l=k;k=g}else{i="";m=true}}}var j=this.getMod(k,l)===i;return m?!j:j},getMod:function(j,k){var h=typeof j;if(h==="string"||h==="undefined"){k=j||k;var i=this._modCache;return k in i?i[k]:i[k]=this._extractModVal(k)}return this._getElemMod(k,j)},_getElemMod:function(j,h,i){return this._extractModVal(j,h,i)},getMods:function(k){var i=k&&typeof k!="string",l=this,h=[].slice.call(arguments,i?1:0),j=l._extractMods(h,i?k:g);if(!i){h.length?e.each(h,function(n,m){l._modCache[m]=j[m]}):l._modCache=j}return j},setMod:function(k,o,p){if(typeof p=="undefined"){p=o;o=k;k=g}var l=this;if(!k||k[0]){var m=(k&&k[0]?e.identify(k[0]):"")+"_"+o;if(this._processingMods[m]){return l}var j,i=k?l._getElemMod(o,k,j=l.__self._extractElemNameFrom(k)):l.getMod(o);if(i===p){return l}this._processingMods[m]=true;var h=true,n=[o,p,i];k&&n.unshift(k);e.each([["*","*"],[o,"*"],[o,p]],function(){h=l._callModFn(j,this[0],this[1],n)!==false&&h});!k&&h&&(l._modCache[o]=p);h&&l._afterSetMod(o,p,k,j);delete this._processingMods[m]}return l},_afterSetMod:function(j,h,i){},toggleMod:function(j,k,i,m,l){if(typeof j=="string"){l=m;m=i;i=k;k=j;j=g}if(typeof m=="undefined"){m=""}else{if(typeof m=="boolean"){l=m;m=""}}var h=this.getMod(j,k);(h==i||h==m)&&this.setMod(j,k,typeof l==="boolean"?(l?i:m):this.hasMod(j,k,i)?m:i);return this},delMod:function(h,i){if(!i){i=h;h=g}return this.setMod(h,i,"")},_callModFn:function(k,j,h,i){var l=c(k,j,h);return this[l]?this[l].apply(this,i):g},_extractModVal:function(i,h){return""},_extractMods:function(h,i){return{}},channel:function(i,h){return this.__self.channel(i,h)},getDefaultParams:function(){return{}},del:function(i){var h=[].slice.call(arguments);typeof i=="string"&&h.unshift(this);this.__self.del.apply(this.__self,h);return this},destruct:function(){delete this._modCache}},{_name:"i-bem",blocks:f,decl:function(h,i,k){if(typeof h=="string"){h={block:h}}else{if(h.name){h.block=h.name}}if(h.baseBlock&&!f[h.baseBlock]){throw ('baseBlock "'+h.baseBlock+'" for "'+h.block+'" is undefined')}if(i.onSetMod){b(i.onSetMod,i);delete i.onSetMod}if(i.onElemSetMod){e.each(i.onElemSetMod,function(n,m){b(m,i,n)});delete i.onElemSetMod}var j=f[h.baseBlock||h.block]||this;if(h.modName){e.each(i,function(m,n){e.isFunction(n)&&(i[m]=function(){var p;if(this.hasMod(h.modName,h.modVal)){p=n}else{var o=j.prototype[m];o&&o!==i[m]&&(p=this.__base)}return p?p.apply(this,arguments):g})})}var l;h.block==j._name?(l=e.inheritSelf(j,i,k))._processLive(true):(l=f[h.block]=e.inherit(j,i,k))._name=h.block;return l},_processLive:function(h){return false},create:function(i,h){typeof i=="string"&&(i={block:i});return new f[i.block](i.mods,h)},getName:function(){return this._name},_extractElemNameFrom:function(h){},afterCurrentEvent:function(i,h){d.push({fn:i,ctx:h})==1&&setTimeout(function(){var j,k=d.splice(0,d.length);while(j=k.shift()){j.fn.call(j.ctx||this)}},0)},changeThis:function(i,h){return function(){return i.apply(h||this,arguments)}},del:function(l){var k=typeof l=="string",j=k?0:1,h=arguments.length;k&&(l=this);while(j<h){delete l[arguments[j++]]}return this},channel:function(i,h){if(typeof i=="boolean"){h=i;i=g}i||(i="default");if(h){if(a[i]){a[i].un();delete a[i]}return}return a[i]||(a[i]=new e.observable())}})})(jQuery);(function(i,b,a){var g="_",c="__",d="[a-zA-Z0-9-]+";function e(l,j,k){k.push(g,l,g,j)}function f(l,m,j,k){k.push(l);j&&e(m,j,k)}function h(n,l,m,j,k){f(n,a,a,k);k.push(c,l);j&&e(m,j,k)}i.INTERNAL={NAME_PATTERN:d,MOD_DELIM:g,ELEM_DELIM:c,buildModPostfix:function(m,j,k){var l=k||[];e(m,j,l);return k?l:l.join("")},buildClass:function(p,n,o,j,k){var m=typeof o;if(m=="string"){if(typeof j!="string"){k=j;j=o;o=n;n=a}}else{if(m!="undefined"){k=o;o=a}else{if(n&&typeof n!="string"){k=n;n=a}}}if(!(n||o||k)){return p}var l=k||[];n?h(p,n,o,j,l):f(p,o,j,l);return k?l:l.join("")},buildClasses:function(n,m,l,j){var k=j||[];m?h(n,m,a,a,k):f(n,a,a,k);l&&b.each(l,function(p,o){if(o){k.push(" ");m?h(n,m,p,o,k):f(n,p,o,k)}});return j?k:k.join("")}}})(BEM,jQuery);(function(a){var b=a.event.special.leftclick={setup:function(){a(this).bind("click",b.handler)},teardown:function(){a(this).unbind("click",b.handler)},handler:function(c){if(!c.button){c.type="leftclick";a.event.handle.apply(this,arguments);c.type="click"}}}})(jQuery);(function(a,d){if(typeof JSON!="undefined"){return a.stringify=JSON.stringify}var c=Object.prototype.toString,e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,b={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};a.stringify=function(l){if(l===null){return"null"}if(typeof l==="undefined"){return d}switch(c.call(l)){case"[object String]":return'"'+(e.test(l)?l.replace(e,function(i){var m=b[i];return typeof m==="string"?m:"\\u"+("0000"+i.charCodeAt(0).toString(16)).slice(-4)}):l)+'"';case"[object Number]":case"[object Boolean]":return""+l;case"[object Array]":var k="[",j=0,f=l.length,h;while(j<f){h=a.stringify(l[j]);k+=(j++?",":"")+(typeof h=="undefined"?"null":h)}return k+"]";case"[object Object]":var k="{",j=0,h;for(var g in l){if(l.hasOwnProperty(g)){h=a.stringify(l[g]);typeof h!="undefined"&&(k+=(j++?",":"")+'"'+g+'":'+h)}}return k+"}";default:return d}}})(jQuery);(function(k,d,c){var g=k.INTERNAL,f=g.ELEM_DELIM,h={area:1,base:1,br:1,col:1,command:1,embed:1,hr:1,img:1,input:1,keygen:1,link:1,meta:1,param:1,source:1,wbr:1},i=g.buildClasses,j={};function e(l,m,n){(l[m]||(l[m]=[])).unshift(n)}function b(l,m){return m.modName?function(n){(n._currBlock.mods||{})[m.modName]===m.modVal&&l(n)}:l}function a(m,l){var o=d.isArray(l),n;d.isArray(m)?o?n=m.concat(l):(n=m).push(l):o?(n=l).unshift(m):n=[m,l];return n}k.HTML={decl:function(n,m){typeof n=="string"&&(n={name:n});var l=j[n.name]||(j[n.name]={});m.onBlock&&e(l,"_block",b(m.onBlock,n));if(m.onElem){d.isFunction(m.onElem)?e(l,"_elem",b(m.onElem,n)):d.each(m.onElem,function(p,o){e(l,"_elem"+(p==="*"?"":f+p),b(o,n))})}},build:function(m){var l=new this.Ctx(m);l._buildAll();return l._flush()},Ctx:d.inherit({__constructor:function(l){this._buffer=[];this._params=l;this._tParams=null;this._tParamsChanges=null;this._currBlock=c},pos:function(){return this._params._pos},isFirst:function(){return this._params._pos===1},isLast:function(){var l=this._params;return l._pos===l._siblingsCount},params:function(l){var m=this;if(typeof l=="undefined"){return m._params}m._params=l;return m},param:function(l,o,m,q){var p=this,n=p._params;if(typeof o=="undefined"){return n[l]}if(m||!(l in n)){n[l]=o}else{if(q){n[l]=d.extend(o,n[l])}}return p},attrs:function(m,l){return this.param("attrs",m,l,true)},attr:function(m,o,n){var p=this;if(typeof o=="undefined"){return(p._params.attrs||{})[m]}var l=p._params.attrs;l?(n||!(m in l))&&(l[m]=o):(p._params.attrs={})[m]=o;return p},tag:function(m,l){return this.param("tag",m,l)},cls:function(m,l){return this.param("cls",m,l)},mods:function(m,l){return this.param("mods",m,l,true)},mod:function(l,o,n){var p=this;if(typeof o=="undefined"){return(p._params.mods||{})[l]}var m=p._params.mods;m?(n||!(l in m))&&(m[l]=o):(p._params.mods={})[l]=o;return p},mix:function(n,l){var o=this,m=o._params;if(typeof n=="undefined"){return m.mix}if(l||!("mix" in m)){m.mix=n}else{m.mix=m.mix.concat(n)}return o},js:function(l){return this.param("js",l)},content:function(m,l){return this.param("content",m,l)},wrapContent:function(l){var n=this,m=n._params;l.content=m.content;m.content=l;return n},beforeContent:function(l){var n=this,m=n._params;m.content=a(l,m.content);return n},afterContent:function(l){var n=this,m=n._params;m.content=a(m.content,l);return n},wrap:function(l){var n=this,m=n._params;l.block||(l._currBlock=n._currBlock);l.content=m._wrapper?m._wrapper:m;m._wrapper=l;return n},tParam:function(l,o){var p=this,n=p._tParams||(p._tParams={});if(typeof o=="undefined"){return n[l]}var m=p._tParamsChanges||(p._tParamsChanges={});l in m||(m[l]=n[l]);n[l]=o;return p},generateId:function(){return d.identify()},_buildAll:function(){var t=this,m=t._buffer,s=t._params,p=typeof s;if(p=="string"||p=="number"){m.push(s)}else{if(d.isArray(s)){var o=0,l=s.length,n,q;while(o<l){t._params=n=s[o++];q=typeof n;if(q=="string"||q=="number"){m.push(n)}else{if(n){n._pos=o;n._siblingsCount=l;t._buildByDecl()}}}}else{if(s){t._params._pos=t._params._siblingsCount=1;t._buildByDecl()}}}},_build:function(){var q=this,m=q._buffer,p=q._params,l=p.tag||"div",o,n=p.block||p.elem;p.js&&((o={})[p.block]=p.js===true?{}:p.js);m.push("<",l);if(n||p.cls){m.push(' class="');if(n){i(p.block||q._currBlock.block,p.elem,p.mods,m);p.mix&&d.each(p.mix,function(s,t){if(t){m.push(" ");i(t.block,t.elem,t.mods,m);t.js&&((o||(o={}))[t.block]=t.js===true?{}:t.js)}})}p.cls&&m.push(n?" ":"",p.cls);o&&m.push(" i-bem");m.push('"')}o&&m.push(' onclick="return ',d.stringify(o).replace(/'/g,"\\'").replace(/"/g,"'"),'"');p.attrs&&d.each(p.attrs,function(s,t){typeof t!="undefined"&&t!==null&&t!==false&&m.push(" ",s,'="',t.toString().replace(/"/g,"&quot;"),'"')});if(h[l]){m.push("/>")}else{m.push(">");if(typeof p.content!="undefined"){q._params=p.content;q._buildAll()}m.push("</",l,">")}},_flush:function(){var l=this._buffer.join("");delete this._buffer;return l},_buildByDecl:function(){var o=this,s=o._currBlock,l=o._params;l._currBlock&&(o._currBlock=l._currBlock);l.block&&(o._currBlock=l);if(!l._wrapper){if(l.block||l.elem){var q=j[o._currBlock.block];if(q){var t;if(l.elem){t=q["_elem"+f+l.elem];q._elem&&(t=(t?t.concat(q._elem):q._elem))}else{t=q._block}if(t){var m=0,p;while(p=t[m++]){p(o)}}}}if(l._wrapper){l._currBlock=o._currBlock;o._params=l._wrapper;return o._buildAll()}}var u=o._tParamsChanges;o._tParamsChanges=null;o._build();o._currBlock=s;if(u){var n=o._tParams;d.each(u,function(v,w){typeof w=="undefined"?delete n[v]:n[v]=w})}}})}})(BEM,jQuery);(function(i,e,h){var d=e(window),y=e(document),m={},w={},A={},f={},p={},v=i.blocks,b=i.INTERNAL,k=b.NAME_PATTERN,o=b.MOD_DELIM,j=b.ELEM_DELIM,z=b.buildModPostfix,t=b.buildClass;function q(D,B){var C=D[0];e.each(s(C),function(E,G){c(G,C,E,B);var F=w[G.uniqId];if(F){F.domElem=F.domElem.add(D);e.extend(F.params,G)}else{a(E,D,G)}})}function a(I,E,D,B,J){if(typeof D=="boolean"){J=B;B=D;D=h}var F=E[0];D=c(D||s(F)[I],F,I);var H=D.uniqId;if(w[H]){return w[H]._init()}m[H]=m[H]?m[H].add(E):E;var G=v[I]||u.decl(I,{},{live:true});if(!(G._liveInitable=!!G._processLive())||B||D.live===false){var C=new G(m[H],D,!!B);delete m[H];J&&J.apply(C,Array.prototype.slice.call(arguments,4));return C}}function c(G,D,C,B){(G||(G={})).uniqId||(G.uniqId=(G.id?C+"-id-"+G.id:e.identify())+(B||e.identify()));var F=e.identify(D),E=A[F]||(A[F]={});E[C]||(E[C]=G);return G}function x(C,B,E){var D=C.find(B);return E?D:D.add(C.filter(B))}function s(B){var C=e.identify(B);return A[C]||(A[C]=g(B))}function g(D){var C=D.onclick||D.ondblclick;if(!C&&D.tagName.toLowerCase()=="body"){var E=e(D),B=E.attr("onclick")||E.attr("ondblclick");B&&(C=Function(B))}return C?C():{}}function l(B){delete A[e.identify(B)]}function n(){return y[0][e.support.boxModel?"documentElement":"body"]}e.fn.bem=function(B,C){return a(B,this,C,true)};var u=i.DOM=i.decl("i-bem__dom",{__constructor:function(C,D,B){var E=this;E.domElem=C;E._eventNameCache={};E._elemCache={};w[E._uniqId=D.uniqId||e.identify(E)]=E;E._needSpecialUnbind=false;E.__base(null,D,B)},findBlocksInside:function(B,C){return this._doBlocksMethod(this._buildFindBlocksParams("find",B,C))},findBlockInside:function(B,C){return this._doBlocksMethod(this._buildFindBlocksParams("find",B,C,true))},findBlocksOutside:function(B,C){return this._doBlocksMethod(this._buildFindBlocksParams("parents",B,C))},findBlockOutside:function(B,C){return this._doBlocksMethod(this._buildFindBlocksParams("closest",B,C))[0]},findBlocksOn:function(B,C){return this._doBlocksMethod(this._buildFindBlocksParams("",B,C))},findBlockOn:function(B,C){return this._doBlocksMethod(this._buildFindBlocksParams("",B,C,true))},_buildFindBlocksParams:function(B,C,E,D){return{select:B,elem:E?C:h,block:E||C,onlyFirst:D}},doBlocksMethodInside:function(C,D,E,B){return this._doBlocksMethod(this._buildDoBlocksMethodParams("find",C,D,E,B))},doBlocksMethodOutside:function(C,D,E,B){return this._doBlocksMethod(this._buildDoBlocksMethodParams("closest",C,D,E,B))},doBlocksMethodOn:function(C,D,E,B){return this._doBlocksMethod(this._buildDoBlocksMethodParams("",C,D,E,B))},doBlocksMethod:function(C,D,B){return this._doBlocksMethod({blocks:C,method:D,args:B})},_buildDoBlocksMethodParams:function(B,E,F,G,D){var C=typeof G=="string";return{select:B,elem:C?E:h,block:C?F:E,method:C?G:F,args:C?D:G}},_doBlocksMethod:function(C){var F=this;if(C.blocks){return e.map(C.blocks,function(K){return F._doBlockMethod(K,C.method,C.args)})}var E=C.elem?(typeof C.elem=="string"?this.findElem(C.elem):C.elem):this.domElem,D=typeof C.block=="string",J=D?C.block:C.block.blockName,B="."+(D?t(J):t(J,C.block.modName,C.block.modVal))+(C.onlyFirst?":first":""),G=E.filter(B);C.select&&(G=G.add(E[C.select](B)));if(C.onlyFirst){return G[0]?this._doBlockMethod(a(J,G.eq(0),true),C.method,C.args):null}if(C.method){return e.map(G,function(K){return F._doBlockMethod(a(J,e(K),true),C.method,C.args)})}var I=[],H={};e.each(G,function(K,L){var M=a(J,e(L),true);if(!H[M._uniqId]){H[M._uniqId]=true;I.push(M)}});return I},_doBlockMethod:function(C,D,B){return D?C[D].apply(C,B||[]):C},bindToDomElem:function(C,D,B){var E=this;B?C.bind(E._buildEventName(D),function(F){(F.data||(F.data={})).domElem=e(this);return B.apply(E,arguments)}):e.each(D,function(G,F){E.bindToDomElem(C,G,F)});return E},bindToDoc:function(C,B){this._needSpecialUnbind=true;return this.bindToDomElem(y,C,B)},bindToWin:function(C,B){this._needSpecialUnbind=true;return this.bindToDomElem(d,C,B)},bindTo:function(D,C,B){if(!C||e.isFunction(C)){B=C;C=D;D=this.domElem}else{if(typeof D=="string"){D=this.elem(D)}}return this.bindToDomElem(D,C,B)},unbindFromDomElem:function(B,C){B.unbind(this._buildEventName(C));return this},unbindFromDoc:function(B){return this.unbindFromDomElem(y,B)},unbindFromWin:function(B){return this.unbindFromDomElem(d,B)},unbindFrom:function(C,B){if(!B){B=C;C=this.domElem}else{if(typeof C=="string"){C=this.elem(C)}}return this.unbindFromDomElem(C,B)},_buildEventName:function(B){var C=this;return B.indexOf(" ")>1?e.map(B.split(" "),function(D){return C._buildOneEventName(D)}).join(" "):C._buildOneEventName(B)},_buildOneEventName:function(D){var F=this,B=F._eventNameCache;if(D in B){return B[D]}var E="."+F._uniqId;if(D.indexOf(".")<0){return B[D]=D+E}var C=".bem_"+F.__self._name;return B[D]=e.map(D.split("."),function(H,G){return G==0?H+C:C+"_"+H}).join("")+E},trigger:function(C,B){this.__base(C=this.buildEvent(C),B).domElem&&this._ctxTrigger(C,B);return this},_ctxTrigger:function(C,B){var F=this,E=f[F.__self._buildCtxEventName(C.type)],D={};E&&F.domElem.each(function(){var H=this,G=E.counter;while(H&&G){var J=e.identify(H,true);if(J){if(D[J]){break}var I=E.ctxs[J];if(I){e.each(I,function(L,K){K.fn.call(K.ctx||F,C,B)});G--}D[J]=true}H=H.parentNode}})},setMod:function(C,D,B){if(C&&typeof B!="undefined"&&C.length>1){var E=this;C.each(function(){E.setMod(e(this),D,B)});return E}return this.__base(C,D,B)},_extractModVal:function(F,C,E){var B=(C||this.domElem)[0],D;B&&(D=B.className.match(this.__self._buildModValRE(F,E||C)));return D?D[2]:""},_extractMods:function(B,F){var E={},C=!B.length,D=0;e.each((F||this.domElem)[0].className.match(this.__self._buildModValRE("("+(C?k:B.join("|"))+")",F,"g"))||[],function(G,H){var J=(H=e.trim(H)).lastIndexOf(o),I=H.substr(0,J-1).lastIndexOf(o);E[H.substr(I+1,J-I-1)]=H.substr(J+1);++D});D<B.length&&e.each(B,function(G,H){H in E||(E[H]="")});return E},_afterSetMod:function(H,D,F,G){var C=this.__self,B=C._buildModClassPrefix(H,G),E=C._buildModValRE(H,G),I=D==="";(F||this.domElem).each(function(){var J=this.className;J.indexOf(B)>-1?this.className=J.replace(E,(I?"":"$1"+B+D)+"$3"):I||e(this).addClass(B+D)});G&&this.dropElemCache(G,H,D)},findElem:function(E,G,F,D){if(arguments.length%2){D=F;F=G;G=E;E=this.domElem}else{if(typeof E=="string"){E=this.findElem(E)}}var C=this.__self,B="."+e.map(G.split(" "),function(H){return t(C._name,H,F,D)}).join(",.");return x(E,B)},_elem:function(C,E,B){var D=C+z(E,B);return this._elemCache[D]||(this._elemCache[D]=this.findElem(C,E,B))},elem:function(E,D,B){if(E.indexOf(" ")<0){return this._elem(E,D,B)}var C=e([]),F=this;e.each(E.split(" "),function(){C=C.add(F._elem(this,D,B))});return C},dropElemCache:function(E,D,B){if(E){var F=this,C=z(D,B);E.indexOf(" ")<0?delete F._elemCache[E+C]:e.each(E.split(" "),function(H,G){delete F._elemCache[G+C]})}else{this._elemCache={}}return this},elemParams:function(B){var C;if(typeof B=="string"){C=B;B=this.elem(B)}else{C=this.__self._extractElemNameFrom(B)}return g(B[0])[t(this.__self.getName(),C)]||{}},containsDomElem:function(B){return B.parents().andSelf().index(this.domElem)>-1},buildSelector:function(C,D,B){return this.__self.buildSelector(C,D,B)},destruct:function(C){var D=this,B=D.__self;D._isDestructing=true;D._needSpecialUnbind&&B.doc.add(B.win).unbind("."+D._uniqId);D.dropElemCache().domElem.each(function(E,F){e.each(s(F),function(G,H){var I=w[H.uniqId];I&&!I._isDestructing&&I.destruct()});l(F)});C||D.domElem.remove();delete w[D.un()._uniqId];delete D.domElem;delete D._elemCache;D.__base()}},{doc:y,win:d,_processLive:function(C){var E=this,D=E._liveInitable;if("live" in E){var B=typeof D=="undefined";if(B^C){if(e.isFunction(E.live)){D=E.live()!==false;E.live=function(){}}else{D=E.live}}}return D},init:function(C,E,D){if(!C||e.isFunction(C)){D=E;E=C;C=y}var B=e.identify();x(C,".i-bem").each(function(){q(e(this),B)});E&&this.afterCurrentEvent(function(){E.call(D||this,C)})},destruct:function(C,B,D){if(typeof C!="boolean"){D=B;B=C;C=h}x(B,".i-bem",D).each(function(){e.each(s(this),function(E,F){if(F.uniqId){var G=w[F.uniqId];G&&G.destruct(true)}});l(this)});C||(D?B.empty():B.remove())},update:function(B,C,E,D){this.destruct(B,true);this.init(B.html(C),E,D)},_buildCtxEventName:function(B){return this._name+":"+B},_liveClassBind:function(D,E,I,B){var H=this;if(E.indexOf(" ")>-1){e.each(E.split(" "),function(J,K){H._liveClassBind(D,K,I,B)})}else{var C=H._buildCtxEventName(E),G=p[C],F=e.identify(I);if(!G){G=p[C]={};y.bind(E,H.changeThis(H._liveClassTrigger,H))}G=G[D]||(G[D]={uniqIds:{},fns:[]});if(!(F in G.uniqIds)){G.fns.push({uniqId:F,fn:H._buildLiveEventFn(I,B)});G.uniqIds[F]=G.fns.length-1}}return this},_liveClassUnbind:function(E,F,I){var D=this._buildCtxEventName(F),H=p[D];if(H){if(I){if(H=H[E]){var G=e.identify(I);if(G in H.uniqIds){var C=H.uniqIds[G],B=H.fns.length-1;H.fns.splice(C,1);while(C<B){H.uniqIds[H.fns[C++].uniqId]=C-1}delete H.uniqIds[G]}}}else{delete H[E]}}return this},_liveClassTrigger:function(H){var G=p[this._buildCtxEventName(H.type)];if(G){var D=H.target,B=[];for(var I in G){G.hasOwnProperty(I)&&B.push(I)}do{var C=" "+D.className+" ",F=0;while(I=B[F++]){if(C.indexOf(" "+I+" ")>-1){var E=0,K=G[I].fns,J;while(J=K[E++]){J.fn.call(e(D),H)}if(H.isPropagationStopped()){return}B.splice(--F,1)}}}while(B.length&&(D=D.parentNode))}},_buildLiveEventFn:function(D,B){var C=this;return function(F){var E=[C._name,((F.data||(F.data={})).domElem=e(this)).closest(C.buildSelector()),true],G=a.apply(null,B?E.concat([D,F]):E);G&&(B||D.apply(G,arguments))}},liveInitOnEvent:function(C,B,D){return this.liveBindTo(C,B,D,true)},liveBindTo:function(F,C,E,B){if(!E){E=C;C=F;F=h}if(!F||typeof F=="string"){F={elemName:F}}var D=this;if(F.elemName&&F.elemName.indexOf(" ")>1){e.each(F.elemName.split(" "),function(G,H){D._liveClassBind(t(D._name,H,F.modName,F.modVal),C,E,B)});return D}return D._liveClassBind(t(D._name,F.elemName,F.modName,F.modVal),C,E,B)},liveUnbindFrom:function(C,B,E){var D=this;if(C.indexOf(" ")>1){e.each(C.split(" "),function(F,G){D._liveClassUnbind(t(D._name,G),B,E)});return D}return D._liveClassUnbind(t(D._name,C),B,E)},_liveInitOnBlockInit:function(C,E,D){var B=this._name;v[C].on("init",function(F){var G=F.block[D](B);E&&e.each(G,function(){E.call(this)})});return this},liveInitOnBlockInit:function(B,C){return this._liveInitOnBlockInit(B,C,"findBlocksOn")},liveInitOnBlockInsideInit:function(B,C){return this._liveInitOnBlockInit(B,C,"findBlocksOutside")},on:function(B,F,E,D,C){return B.jquery?this._liveCtxBind(B,F,E,D,C):this.__base(B,F,E,D)},un:function(B,E,D,C){return B.jquery?this._liveCtxUnbind(B,E,D,C):this.__base(B,E,D)},liveCtxBind:function(B,F,E,D,C){return this._liveCtxBind(B,F,E,D,C)},_liveCtxBind:function(B,G,F,E,D){if(e.isFunction(F)){D=E;E=F;F=h}var I=this;if(G.indexOf(" ")>-1){e.each(G.split(" "),function(J,K){I._liveCtxBind(B,K,F,E,D)})}else{var C=I._buildCtxEventName(G),H=f[C]||(f[C]={counter:0,ctxs:{}});B.each(function(){var K=e.identify(this),J=H.ctxs[K];if(!J){J=H.ctxs[K]={};++H.counter}J[e.identify(E)+(D?e.identify(D):"")]={fn:E,data:F,ctx:D}})}return I},liveCtxUnbind:function(B,E,D,C){return this._liveCtxBind(B,E,D,C)},_liveCtxUnbind:function(B,E,D,C){var G=this,F=f[E=G.buildEventName(E)];if(F){B.each(function(){var I=e.identify(this,true),H;if(I&&(H=F.ctxs[I])){D&&delete H[e.identify(D)+(C?e.identify(C):"")];if(!D||e.isEmptyObject(H)){F.counter--;delete F.ctxs[I]}}});F.counter||delete f[E]}return G},_extractElemNameFrom:function(B){var C=B[0].className.match(this._buildElemNameRE());return C?C[1]:h},extractParams:g,_buildModClassPrefix:function(C,B){return t(this._name)+(B?j+(typeof B==="string"?B:this._extractElemNameFrom(B)):"")+o+C+o},_buildModValRE:function(C,B,D){return new RegExp("(\\s?)"+this._buildModClassPrefix(C,B)+"("+k+")(\\s|$)",D)},_buildElemNameRE:function(){return new RegExp(this._name+j+"("+k+")(?:\\s|$)")},buildSelector:function(C,D,B){return"."+t(this._name,C,D,B)},getBlockByUniqId:function(B){return w[B]},getWindowSize:function(){var B=d[0];if(typeof B.innerWidth!="undefined"){return{width:B.innerWidth,height:B.innerHeight}}var C=n();return{width:C.clientWidth,height:C.clientHeight}}})})(BEM,jQuery);(function(a){BEM.DOM.decl("b-dropdowna",{onSetMod:{js:function(){this._getSwitcher().on("click",this._toggle,this)},disabled:function(c,b){this._getSwitcher().setMod(c,b);b=="yes"&&this.getPopup().hide()}},_getSwitcher:function(){return this._switcher||(this._switcher=this.findBlockInside("b-"+(this.getMod(this.elem("switcher"),"type")||"pseudo-link")))},_toggle:function(){this.getPopup().toggle(this.elem("switcher"))},getPopup:function(){return this._popup||(this._popup=this.findBlockInside("b-popupa")).on("outside-click",function(c,b){this._getSwitcher().containsDomElem(a(b.domEvent.target))&&c.preventDefault()},this)},destruct:function(){var b=this._popup;b&&b.destruct.apply(b,arguments);this.__base.apply(this,arguments)}},{live:function(){this.liveInitOnEvent("switcher","leftclick",function(){})}})})(jQuery);BEM.DOM.decl({name:"b-pseudo-link",modName:"is-bem",modVal:"yes"},{_onClick:function(a){a.preventDefault();this.hasMod("disabled","yes")||this.afterCurrentEvent(function(){this.trigger("click")})}},{live:function(){this.liveBindTo({modName:"is-bem",modVal:"yes"},"leftclick",function(a){this._onClick(a)})}});BEM.HTML.decl("b-pseudo-link",{onBlock:function(a){var b=a.param("url");a.tag(b?"a":"span").js(true);b&&a.attr("href",b)}});(function(d){var c,g=[],a=d.browser;function f(){return g.length?g.shift():c?c.clone():c=b()}function e(h){g.push(h)}function b(){return d((a.safari||a.webkit)&&navigator.userAgent.toLowerCase().indexOf("mobile")>-1?"<div/>":"<iframe"+(a.msie&&a.version<9?' frameborder="0"':"")+"/>")}BEM.DOM.decl("i-popup",{onSetMod:{visibility:{visible:function(){var h=this._getUnder(),i=h.parent();this.hasMod(h,"type","paranja")?i.is("body")||h.appendTo("body"):(i[0]!==this.domElem[0])&&h.prependTo(this.domElem);this._inBody||(this._inBody=!!this.domElem.appendTo("body"));this.trigger("show")},"":function(){var h=this._getUnder();this.hasMod(h,"type","paranja")&&h.remove();this._putUnder();this.trigger("hide")}}},_getUnder:function(){return this._under||(this._under=f().attr("class",this._underClass||(this._underClass=this.findElem("under").remove().attr("class"))))},_putUnder:function(){e(this._under);delete this._under},show:function(h){h&&this.domElem.css(h);return this.setMod("visibility","visible")},hide:function(){return this.delMod("visibility")}},{live:true})})(jQuery);BEM.HTML.decl("i-popup",{onBlock:function(a){a.mod("autoclosable","yes").js(true).wrapContent({elem:"content"}).afterContent({elem:"under",mods:a.param("underMods"),mix:a.param("underMix")}).param("zIndex")&&a.attr("style","z-index:"+(32700+a.param("zIndex")))}});(function(a){BEM.DOM.decl({name:"i-popup",modName:"autoclosable",modVal:"yes"},{onSetMod:{visibility:{visible:function(){var b=a.browser.opera?"keypress":"keydown";this.afterCurrentEvent(function(){this.bindToDoc("leftclick",function(c){this.containsDomElem(a(c.target))||this._onOutClick(c)}).bindToDoc(b,function(c){c.keyCode==27&&this.hide()})});this.__base.apply(this,arguments)},"":function(){return this.unbindFromDoc("leftclick keypress").__base.apply(this,arguments)}}},_onOutClick:function(b){var c=a.Event("outside-click");this.trigger(c,{domEvent:b});c.isDefaultPrevented()||this.hide()}})})(jQuery);(function(d){BEM.DOM.decl("b-popupa",{onSetMod:{js:function(){this._owner=null;this._isShowed=false;this._direction=this.getMod("direction")||"down"}},show:function(k){if(!this._isShowed||this._owner!==k){this._owner=k;this._getUnder().show({left:-10000,top:-10000});this.pos()}return this},hide:function(){this._isShowed&&this._getUnder().hide();return this},toggle:function(k){return this.isShowed()?this.hide():this.show(k)},pos:function(){var k=this._calcParams(this._owner);this.elem("tail").css(k.tailOffsets);this.setMod("direction",k.direction)._getUnder().show(k.offsets);return this},isShowed:function(){return this._isShowed},setDirection:function(k){if(this._direction!=k){this._direction=k;this.isShowed()&&this.pos()}},setContent:function(k,m,l){BEM.DOM.update(this.elem("content"),k,m,l);return this.isShowed()?this.pos():this},_isOwnerNode:function(){return !!(this._owner&&this._owner.jquery)},_calcDimensions:function(){var l=this._under.domElem,u=this.__self.doc,o=this._owner,v=this._isOwnerNode(),s=v?o.offset():o,m=v?o.outerWidth():e,n=v?o.outerHeight():e,q=u.scrollLeft(),p=u.scrollTop(),t=this.__self.getWindowSize(),k=parseInt(this.elem("content").css("border-top-width"),10);return{ownerLeft:s.left,ownerTop:s.top,ownerRight:s.left+m,ownerBottom:s.top+n,ownerMiddle:s.left+m/2,underWidth:l.outerWidth(),underHeight:l.outerHeight(),borderWidth:isNaN(k)?0:k,windowLeft:q,windowRight:q+t.width,windowTop:p,windowBottom:p+t.height}},_calcParams:function(){var p=this._calcDimensions();if(this.hasMod("adjustable","no")){return f(this._direction,p)}var k={},m=d.inArray(this._direction,a),l=m,o,n;do{o=a[m];n=k[o]=f(o,p);if(!n.factor){return n}++m==a.length&&(m=0)}while(m!==l);return k["down-right"]},destruct:function(){var k=this._under;if(!k){this.__base.apply(this,arguments)}else{if(!this._destructing){this._destructing=true;BEM.DOM.destruct(false,k.domElem);this.__base(true)}}},_getUnder:function(){var l=this;if(!l._under){var k=d(BEM.HTML.build({block:"i-popup",zIndex:this.params.zIndex,mods:{autoclosable:l.getMod("autoclosable")||"yes",fixed:l.hasMod("direction","fixed")&&"yes"},underMods:l.params.underMods,underMix:[{block:"b-popupa",elem:"under"}]}));(l._under=l.findBlockOn(k,"i-popup")).on({show:function(){l._isShowed=true;l.hasMod("adjustable","no")||(l.bindToWin("resize",l.pos)._isOwnerNode()&&l.bindToDomElem(l._owner.parents(),"scroll",l.pos));l.trigger("show")},hide:function(){l._isShowed=false;l.hasMod("adjustable","no")||(l.unbindFromWin("resize")._isOwnerNode()&&l.unbindFromDomElem(l._owner.parents(),"scroll"));l.trigger("hide")},"outside-click":function(){l.trigger.apply(l,arguments)}}).elem("content").append(l.domElem)}return l._under}},{live:function(){this.liveBindTo("close","leftclick",function(){this.hide()})}});var e=19,b=7,i=15,g=15,h=7,j=8,a=["up","up-right","up-left","down","down-right","down-left","right","right-up","left","left-up"];function f(o,p){var l,m,k,n;switch(o){case"down":case"up":l=c(m={left:p.ownerMiddle-p.underWidth/2,top:o=="down"?p.ownerBottom+h:p.ownerTop-p.underHeight-h},p);k={marginLeft:(p.ownerRight-p.ownerLeft)/2+p.ownerLeft-m.left-i/2,marginTop:(o=="down"?-h+p.borderWidth:-p.borderWidth)};break;case"down-right":case"down-left":case"up-right":case"up-left":n=o=="down-right"||o=="down-left"?"down":"up";l=c(m={left:(o=="down-right"||o=="up-right"?p.ownerLeft:p.ownerRight-p.underWidth),top:n=="down"?p.ownerBottom+h:p.ownerTop-p.underHeight-h},p);k={marginLeft:(p.ownerRight-p.ownerLeft)/2+p.ownerLeft-m.left-i/2,marginTop:(n=="down"?-h+p.borderWidth:-p.borderWidth)};break;case"left":case"right":l=c(m={left:(o=="left"?p.ownerLeft-p.underWidth-b:p.ownerRight+b),top:p.ownerTop-e+g/2},p);k={marginLeft:o=="left"?-p.borderWidth:-b+p.borderWidth,marginTop:e-g/2};break;case"left-up":case"right-up":l=c(m={left:(o=="left-up"?p.ownerLeft-p.underWidth-b:p.ownerRight+b),top:p.ownerTop+g/2+e-p.underHeight},p);n=o=="left-up"?"left":"right";k={marginLeft:n=="left"?-p.borderWidth:-b+p.borderWidth,marginTop:p.ownerTop-m.top+j-g/2}}return{direction:n||o,factor:l,offsets:m,tailOffsets:k}}function c(m,l){var k=0;l.windowTop>m.top&&(k+=l.windowTop-m.top);m.top+l.underHeight>l.windowBottom&&(k+=m.top+l.underHeight-l.windowBottom);l.windowLeft>m.left&&(k+=l.windowLeft-m.left);m.left+l.underWidth>l.windowRight&&(k+=m.left+l.underWidth-l.windowRight);return k}BEM.HTML.decl("b-popupa",{onBlock:function(k){var l=false;d.each(k.param("content"),function(m,n){return !(l=n.elem=="close")});k.mods({theme:"ffffff",direction:"down","has-close":l&&"yes"}).js(true).afterContent({elem:"shadow"})},onElem:{content:function(k){k.wrap({elem:"wrap-cell",tag:"td"}).wrap({tag:"tr"}).wrap({elem:"wrap",tag:"table"})},close:function(k){k.tag("i")},shadow:function(k){k.tag("i")},tail:function(k){k.tag("i").wrapContent({elem:"tail-i",tag:"i"})}}})})(jQuery);(function(b,a){a.block["b-dropdown"]=function(e){var d=b(this),c,i,g,j,h=false,l=false,k=function(){c=d.find(".b-dropdown__list");i=b('<div class="b-dropdown__popup"/>');g=b('<iframe class="b-dropdown__iframe" frameborder="0" src="javascript:\'<body style=\\\'background:none;overflow:hidden\\\'>\'"/>');j=c.clone(true).addClass("b-dropdown__list_clone").hide();c.before(i);i.after(j);f();b(document).keydown(function(m){if(m.keyCode==27&&!(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)){f()}}).click(function(m){if(!b(m.target).is(".b-dropdown *")){f()}}).bind("popupsClose.lego",f);l=true},f=(function(){if(h){return}i.css("visibility","hidden").before(c).hide();j.hide();h=true});d.find(".b-dropdown__or").click(function(n){n.preventDefault();if(!l){k()}if(d.hasClass("b-dropdown_state_disabled")){d.trigger("popupDisabled.lego");return}if(h){b(document).trigger("popupsClose.lego",{source:d[0]});var o=b.Event("popupOpen.lego");d.trigger(o);if(!o.isDefaultPrevented()){j.css("display","");i.append(c).css("visibility","");if(e.direction=="up"||d.hasClass("b-dropdown_direction_up")){var m=i.height()-j.height();i.css("margin-top",-(m-(parseInt(c.css("padding-bottom"),10)+parseInt(b(this).closest(".b-dropdown__item").css("padding-bottom"),10))))}i.prepend(g).css("display","");h=false}}else{f()}})}})(jQuery,window.Lego);(function(c,a){var b=a.block["b-head-user"]=function(){var d=c(this);if(a.params.login!=""||a.params.displayName){c.getJSON(b.getApiUrl(),{locale:a.params.locale,login:"yes","current-login":a.params.login,yu:a.getCookie("yandexuid")},function(e){b.buildHtml(e,d)})}};b.buildHtml=function(i,f){if(!i||!i.services){return}var j=i.displayName&&i.displayName.social,e=c("<div/>").text(b.getUserLogin(i)).html(),d=j?'<b class="b-user b-user_social_yes b-user_provider_'+j.provider+'"><span class="b-user__provider-ico"></span>'+e+"</b>":'<b class="b-user"><b class="b-user__first-letter">'+e.substring(0,1)+"</b>"+e.substring(1)+"</b>",h="<a class=\"b-pseudo-link b-pseudo-link_is-bem_yes i-bem\" onclick=\"return {'b-pseudo-link':{name:'b-pseudo-link'}}\""+(!j&&f.hasClass("b-head-user_type_com")?"":' href="'+(j?a.params["social-host"]:"http://i.yandex.ru")+'"')+">"+d+"</a>",g='<div class="b-dropdowna b-dropdowna_is-bem_yes i-bem" onclick="return {\'b-dropdowna\':{name:\'b-dropdowna\'}}"><span class="b-dropdowna__switcher">'+h+'</span><div class="i-popup i-popup_autoclosable_yes i-popup_is-bem_yes i-bem" onclick="return {\'i-popup\':{name:\'i-popup\'}}"><div class="i-popup__content"><div class="i-popup__under b-popupa__under"></div><div class="b-popupa b-popupa_theme_ffffff b-popupa_direction_down b-popupa_is-bem_yes i-bem b-dropdowna__popup" onclick="return {\'b-popupa\':{name:\'b-popupa\'}}"><i class="b-popupa__shadow"></i><i class="b-popupa__tail"><i class="b-popupa__tail-i"></i></i><table cellpadding="0" cellspasing="0" class="b-popupa__wrap"><tr><td class="b-popupa__wrap-cell"><div class="b-popupa__content"><div class="b-menu b-menu_layout_vert b-menu_preset_vmenu"><ul class="b-menu__layout-vert">';j&&f.addClass("b-head-user_social_yes");c.each(i.services,function(k){g+='<li class="b-menu__layout-vert-cell'+(k==0?" b-menu__layout-vert-cell_position_first":"")+'"><div class="b-menu__item">';if(a.params.id==this.id&&a.params.index){g+="<strong>"+this.title+"</strong>"}else{g+='<a class="b-link b-head-user__link" href="'+this.url+'" onmousedown="Lego.ch(\''+a.params.id+".login.myservices."+this.id+"',this)\">"+this.title+"</a>"}g+="</div></li>"});if(i.services.length){g+='<li class="b-menu__layout-vert-separator"><i class="b-menu__separator"></i></li>'}g+=b.getUserItems(i,f);g+="</ul></div></div></td></tr></table></div></div></div></div>";f.find(".b-user").replaceWith(g);BEM.DOM.init(f)};b.getApiUrl=function(){return a.params["pass-host"]+"/services?callback=?"};b.getUserItems=function(f){var e=f.displayName&&f.displayName.social?[{name:a.message("b-head-userinfo.user:profile","Мои профили"),url:a.params["social-host"]}]:[{name:a.message("b-head-userinfo.user:passport","Паспорт"),url:a.params["passport-host"]},{name:a.message("b-head-userinfo.user:change-password","Сменить пароль"),url:a.params["passport-host"]+"/passport?mode=changepass&retpath="+encodeURIComponent(a.params.retpath)+"/"}];var d="";c.each(e,function(h,g){d+='<li class="b-menu__layout-vert-cell'+(h==e.length-1?" b-menu__layout-vert-cell_position_last":"")+'"><div class="b-menu__item"><a class="b-link b-head-user__link" href="'+g.url+'">'+g.name+"</a></div></li>"});return d};b.getUserLogin=function(d){return a.params.displayName&&a.params.displayName.social&&a.params.displayName.name||d.displayName&&d.displayName.name||a.params.login||d.login}})(jQuery,window.Lego);(function(a){window.Lego||(window.Lego={block:{}});Lego.block["i-social"]=function(d){function e(j){var i=this,g={};this.url=j.startUrl+"?";delete j.startUrl;this.popupName=j.popupName;this.yaWindow=null;this.wTimer=null;this.paramsDefault=j;function l(){var m;if(!i.yaWindow){return true}try{m=i.yaWindow.closed}catch(n){m=true}return m}function k(){if(l()){i.wTimer=clearInterval(i.wTimer);i.onFailure({status:"error"})}}function f(w){var z=i.popupName,q=500,A=280,t=Math.round(((window.opera?window.innerWidth:screen.availWidth)-q)/2),x=Math.round(((window.opera?window.innerHeight:screen.availHeight)-A)/2),n="scrollbars=yes, resizable=1, menubar=0, toolbar=0, status=0, location=0, directories=0, left="+t+", top="+x+", width="+q+", height="+A;var s={};for(var v in i.paramsDefault){s[v]=i.paramsDefault[v]}for(var v in w){s[v]=w[v]}var y=["ddom="+(s.ddom||(location.hostname==document.domain?"":document.domain))];s.retpath+=(s.retpath.match("#")?"&":"#")+y.join("&");var m=i.url;var o=[];for(var u in s){o.push(encodeURIComponent(u)+"="+encodeURIComponent(s[u]))}m+=o.join("&");i.yaWindow=window.open(m,z,n);i.yaWindow.focus();if(i.yaWindow){i.wTimer=setInterval(k,500)}}function h(){this.handlers={onSuccess:null,onFailure:null};i.wTimer=clearInterval(i.wTimer);l()||i.yaWindow.close();i.yaWindow=false}this.start=function(n,m,o){h();i.handlers={onSuccess:n,onFailure:m};f(o)};this.onSuccess=function(n){h();var m=i.handlers.onSuccess;m&&m()};this.onFailure=function(n){h();var m=i.handlers.onFailure;m&&m()}}arguments.callee.Broker=e;var c=arguments.callee.defaultParams={startUrl:Lego.params["social-startUrl"]||Lego.params["social-host"]+"/broker/start",retpath:Lego.params["social-retpath"]||location.protocol+"//"+location.host+Lego.params["lego-path"]+"/blocks/i-social/closer/i-social__closer.html",consumer:Lego.params.id||"morda",popupName:"social_"+(Lego.params.id||"morda"),application:"",action_if_anonymous:"authorize",result_location:"fragment"};var b=arguments.callee.broker=new e(a.extend(c,d));return b}})(jQuery);(function(b,a){a.block["b-domik"]=function(z){var d=this,u=d.find(".b-domik__lock"),w=d.find(".b-domik__social"),l=arguments.callee,o=b('<input type="hidden" name="timestamp"/>'),k=false,x=this.attr("class").match(/\bb-domik_type_(\w+)\b/)[1];if(w.length&&a.params["social-host"]){if(a.params["social-providers"]){A(a.params["social-providers"])}else{b.getJSON(a.params["social-host"]+"/providers.jsonp?callback=?",function(E){A(E)})}var D=new a.block["i-social"];b(".b-domik__social-link").live("click",function(E){j();b(".b-domik__social-popup").each(function(){b(this).bem("b-popupa").hide()});D.start(function(){if(!a.params.retpath||top.location.href==a.params.retpath){top.location.reload()}else{top.location.href=a.params.retpath}},function(){w.removeClass("b-domik__social_loading_yes").css("height","")},{provider:this.onclick()["b-domik"].provider});E.preventDefault()})}function A(F){if(!F.length){w.remove();return}w.html(n(F));var G=w.find(".b-dropdowna");if(!G.length){return}BEM.DOM.init(G);var H=G.bem("b-dropdowna").getPopup();function E(){H.pos()}H.on("show",function(){b(window).scroll(E)}).on("hide",function(){b(window).unbind("scroll",E)})}function n(G){var H=[{block:"b-domik",elem:"social-title",content:a.message("b-domik:enter-with","Войти при помощи")}];G=b.grep(G,function(I){return I.enabled});var F=b.grep(G,function(I){return I.primary});F=b.map(F,function(I){return{block:"b-domik",tag:"a",elem:"social-link",content:{elem:"social-icon",mods:{provider:I.code},tag:"i"},js:{provider:I.code},attrs:{tabIndex:103}}});[].push.apply(H,F);function E(L){var K=b.map(L,function(N){return{block:"b-domik",tag:"a",elem:"social-link",mods:{},attrs:{tabIndex:103},js:{provider:N.code},content:[{tag:"i",elem:"social-icon",mods:{provider:N.code}},N.display_name]}});K.length%2&&(K[K.length]="");var J=[],M;for(var I=0;I<K.length;I++){I%2||J.push(M={tag:"tr",content:[]});M.content.push({tag:"td",elem:"provider",content:K[I]})}return J}if(F.length<G.length){H.push({tag:"div",block:"b-dropdowna",js:true,content:[{elem:"switcher",tag:"span",content:{tag:"a",block:"b-pseudo-link",mods:{"is-bem":"yes"},js:true,attrs:{href:a.message("b-domik:passport-link","http://passport.yandex.ru/"),tabIndex:103}}},{block:"b-popupa",js:true,tag:"div",mix:[{block:"b-dropdowna",elem:"popup"},{block:"b-domik",elem:"social-popup",mods:{type:x}}],content:[{elem:"tail",tag:"i"},{elem:"content",content:[{elem:"providers",tag:"table",content:E(G)}]}]}]})}H.push({block:"b-spin",mods:{theme:x=="bigform"?"blue-50":"blue-16"}});return BEM.HTML.build(H)}function j(){w.css("height",w.height()).addClass("b-domik__social_loading_yes")}l.isHTTPSSupported=false;d.append(o).submit(function(){o.val(+new Date);var E=d.attr("action");if(E&&a.block["b-domik"].isHTTPSSupported){d.attr("action",E.replace(/^http:/,"https:"))}});var s=d.find("input[name=login]"),t=d.find("input[type=submit]");s.change(function(){var E=s.val();E.indexOf("@")==-1&&/[а-яçğıöşü]/i.test(E)?i(z&&z.err_msg||a.message("b-domik:wrong-keyboard-layout","смените раскладку")):p()});s.change();var h;function i(E){!h&&(h=b('<div class="b-domik__error"/>').insertAfter(d.find(".b-domik__password")));h.text(E).show()}function p(){h&&h.hide()}function C(){var E=a.params["lego-static-host"];if(E){if(E.indexOf("https:")==0){return E}if(E.indexOf("http:")==0){return"https"+E.substr(4)}if(E.indexOf("//")==0){return"https:"+E}else{return"https://"+location.host+E}}else{return"https://"+location.host}}l.enableHTTPS=function(){l.isHTTPSSupported=true;u.addClass("b-domik__lock_visibility_visible")};function c(){if(k){return}k=true;b.ajax({url:C()+"/blocks/b-domik/check-https.js",cache:true,dataType:"script"})}c();l.checkForHTTPS=c;var y=l.getLockBaloonContent||function(){var F=/\(\(([^\)]+)\)\)/g;function E(I,H){return I.replace(F,'<a class="b-link" href="'+H+'">$1</a>')}var G=a.message("b-domik.lock-balloon:content","Логин и пароль будут передаваться в&#160;((безопасном режиме))");return E(G,a.message("b-domik.lock-balloon:linkHref","http://help.yandex.ru/mail/?id=1113446"))},e=b(BEM.HTML.build({block:"b-popupa",mods:{direction:"right",theme:"feffd6"},mix:[{block:"b-domik",elem:"lock-balloon"}],content:[{elem:"tail",tag:"i"},{elem:"content",content:y()}]}));d.append(e);var m=e.bem("b-popupa"),g=300,q;function f(){q=setTimeout(function(){m.hide()},g)}var B;function v(){q&&clearTimeout(q);q=null;m.show(u);if(!B){B=true;e.hover(v,f)}}u.hover(v,f)}})(jQuery,window.Lego);(function(b,a){a.block["b-hint-input"]=function(){var i=b(this),e=b("#"+i.attr("for")),g=function(){i.hide()},d=function(){i.show()},c=function(){h||e.val()?g():d()},h=false;e.bind("focus blur",function(j){h=j.type=="focus";c()}).bind("change mouseover",c);i.click(function(){e.focus()});e.change();var f=e.val();(function(){if(e.val()!=f){b(e).trigger("change");f=e.val()}setTimeout(arguments.callee,200)})()}})(jQuery,window.Lego);(function(b,a){a.block["b-domik_type_popup"]=function(h){var e=b(this),d;b(".b-head-userinfo__entry .b-pseudo-link").click(function(i){i.preventDefault();setTimeout(function(){c()},0)});function c(j){if(!d){g()}if(j){a.params.retpath=j}var i="&from="+a.params["passport-msg"]+"&retpath="+encodeURIComponent(a.params.retpath);e.attr("action",a.params["passport-host"]+"/passport?mode=auth"+i);d.find(".b-domik__register .b-domik__link").attr("href",a.params["passport-host"]+"/passport?mode="+(h.regMode||"register")+i);b(document).bind("keyup.b-domik",function(k){if(k.keyCode==27){f()}}).bind("click.b-domik",function(m){var l=b(m.target),k=l.parents().andSelf();if(l.is("input[type=button]")||k.index(d)==-1&&!k.is(".b-popupa")){f()}});!d.hasClass("b-domik_position_popup-50-50")&&window.scrollTo(0,0);d.show().find("input[name=login]").focus();b(document).trigger("show.b-domik_type_popup")}function f(){b(document).unbind(".b-domik");d.hide()}function g(){d=b('<form class="'+e.attr("class").replace("g-hidden","")+'" method="POST"><i class="b-domik__roof"></i><table class="b-domik__shadow"><tr><td class="b-domik__shadow__lt">&nbsp;</td><td class="b-domik__shadow__t"></td><td class="b-domik__shadow__rt">&nbsp;</td></tr><tr><td class="b-domik__shadow__l">&nbsp;</td><td class="b-domik__shadow__m"><div class="b-domik__form"><div class="b-domik__title">'+(h.title||a.message("b-domik:title","Вход"))+'</div><div class="b-domik__username"><label for="b-domik_popup-username" class="b-hint-input g-js" onclick="return {name:\'b-hint-input\'}">'+a.message("b-domik:login","логин")+'</label><div class="b-input"><input class="b-input__text" id="b-domik_popup-username" name="login" value="'+e.find("input[name=login]").val()+'" tabindex="11"/></div></div><div class="b-domik__password"><label for="b-domik_popup-password" class="b-hint-input g-js" onclick="return {name:\'b-hint-input\'}">'+a.message("b-domik:password","пароль")+'</label><div class="b-domik__lock"></div><div class="b-input"><input class="b-input__text" id="b-domik_popup-password" name="passwd" value="'+e.find("input[name=passwd]").val()+'" type="password" tabindex="11"/></div></div><div class="b-domik__permanent"><input class="b-domik__check" id="b-domik_popup-permanent" name="twoweeks" type="checkbox" value="yes" tabindex="11"/><label for="b-domik_popup-permanent" class="b-domik__permanent-label">'+a.message("b-domik:permanent","запомнить меня")+'</label> <span class="b-domik__help">(<a class="b-domik__link" href="'+a.message("b-domik:help-link","http://help.yandex.ru/passport/?id=922493")+'" tabindex="12">'+a.message("b-domik:help","что&nbsp;это")+'</a>)</span></div><div class="b-domik__button"><input class="b-domik__submit" type="submit" value="'+a.message("b-domik:logon","Войти")+'" tabindex="11"/><input class="b-domik__submit" type="button" value="'+a.message("b-domik:cancel","Отмена")+'" tabindex="11"/></div><div class="b-domik__social"></div><div class="b-domik__register"><a class="b-domik__link" href="" tabindex="11">'+(h.register||a.message("b-domik:register","Зарегистрироваться"))+'</a></div><div class="b-domik__remember"><a class="b-domik__remind" href="'+a.params["passport-host"]+'/passport?mode=restore" tabindex="11">'+a.message("b-domik:remember","Напомнить пароль")+'</a></div></div></td><td class="b-domik__shadow__r">&nbsp;</td></tr><tr><td class="b-domik__shadow__lb">&nbsp;</td><td class="b-domik__shadow__b"></td><td class="b-domik__shadow__rb">&nbsp;</td></tr></table><iframe class="b-popup-under" frameborder="0"></iframe></form>').submit(function(i){i.preventDefault();e.find("input[name=login]").val(d.find("input[name=login]").change().val()).end().find("input[name=passwd]").val(d.find("input[name=passwd]").change().val()).end().find("input[name=twoweeks]").attr("checked",d.find("input[name=twoweeks]").attr("checked")||false).end().append('<input type="hidden" name="timestamp" value="'+ +new Date+'"/>').attr("action",a.block["b-domik"].isHTTPSSupported?e.attr("action").replace(/^http:/,"https:"):e.attr("action")).submit()});if(a.block["b-domik"]){a.block["b-domik"].call(d)}b("body").append(d);a.blockInit(d)}arguments.callee.login=function(){var i=arguments;setTimeout(function(){c.apply(this,i)},0)}}})(jQuery,window.Lego);BEM.DOM.decl("b-form-button",{onSetMod:{js:function(){(this._href=this.domElem.attr("href"))&&this.isDisabled()&&this.domElem.removeAttr("href")},focused:{yes:function(){if(this.isDisabled()){return false}this.bindTo("keydown",this._onKeyDown).elem("input").focus()},"":function(){this.unbindFrom("keydown").elem("input").blur()}},disabled:function(c,a){var b=a=="yes";this.elem("input").attr("disabled",b);this._href&&(b?this.domElem.removeAttr("href"):this.domElem.attr("href",this._href));b&&this.domElem.keyup()},pressed:function(b,a){this.isDisabled()||this.trigger(a=="yes"?"press":"release")},hovered:{"":function(){this.delMod("pressed")}},"*":function(a){if(this.isDisabled()&&"hovered pressed".indexOf(a)>-1){return false}}},isDisabled:function(){return this.hasMod("disabled","yes")},url:function(a){if(typeof a=="undefined"){return this._href}else{this._href=a;this.isDisabled()||this.domElem.attr("href",a);return this}},_onKeyDown:function(b){var a=b.keyCode;if((a==13||a==32)&&!this._keyDowned){this._keyDowned=true;this.setMod("pressed","yes").bindTo("keyup",function(){this.delMod("pressed").unbindFrom("keyup");delete this._keyDowned;if(a==32&&this.domElem.attr("href")){document.location=this.domElem.attr("href")}})}},_onClick:function(a){this.isDisabled()?a.preventDefault():this.afterCurrentEvent(function(){this.trigger("click")})}},{live:function(){var a={mouseover:{name:"hovered",val:"yes"},mouseout:{name:"hovered"},mousedown:{name:"pressed",val:"yes"},mouseup:{name:"pressed"},focusin:{name:"focused",val:"yes"},focusout:{name:"focused"}};this.liveBindTo("leftclick",function(b){this._onClick(b)}).liveBindTo("mouseover mouseout mouseup focusin focusout",function(c){var b=a[c.type];this.setMod(b.name,b.val||"")}).liveBindTo("mousedown",function(c){var b=a[c.type];c.which==1&&this.setMod(b.name,b.val||"")})}});BEM.HTML.decl("b-form-button",{onBlock:function(a){a.tag(a.param("url")?"a":"span").attrs({href:a.param("url"),target:a.param("target")}).mods({theme:a.mod("theme")||"grey-19",height:a.mod("height")||19}).content([{elem:"left",tag:"i"},{elem:"content",tag:"span",content:{elem:"text",content:a.content(),tag:"span"}},((a.param("type")=="button"||a.param("type")=="submit")&&{elem:"input",tag:"input",attrs:{type:a.param("type"),disabled:a.param("disabled"),value:""}}),a.param("url")&&{elem:"click",tag:"i"}],true).js(true)}});(function(b,a){a.block["b-domik_type_bigform"]=function(d){var c=b(this);a.block["b-domik"]&&a.block["b-domik"].call(c);setTimeout(function(){c.find("input[name=login]").focus()},0)}})(jQuery,window.Lego);(function(c,b){var d;function a(e){e[0]&&!!e.attr("href")&&(window.location.href=e.attr("href"))}b.block["b-pager"]=function(e){if(d){return e.override&&(d=c(this))}d=c(this);if(e.keydownReaction){c(document).keydown(function(f){if(!f.ctrlKey||c(f.target).is("input, textarea")){return}if(f.keyCode==37){a(d.find(".b-pager__prev"))}else{if(f.keyCode==39){a(d.find(".b-pager__next"))}}})}}})(jQuery,window.Lego);$(function(){BEM.DOM.init()});(function(d){var c,b={},a=BEM.decl("i-loader",{},{load:function(g,k,j,h){if(typeof k!="string"){h=j;j=k;k=g}var e=b[g];if(e){if(e.successFns[0]){e.successFns.push(j);h&&e.errorFns.push(h)}else{if(e.error){h&&h()}else{this.afterCurrentEvent(j)}}return}var i=document,f=i.createElement("script"),l=function(){a._error(g)};f.type="text/javascript";f.charset="utf-8";f.src=!d.browser.msie||i.documentMode>8?k:k.replace(/(\.[^.]+)$/,".ie$1");f.onerror=l;setTimeout(function(){(c||(c=d("head")[0])).insertBefore(f,c.firstChild)},0);b[g]={successFns:[j],errorFns:h?[h]:[],timer:setTimeout(l,20000)}},loaded:function(e){var h=b[e.id];clearTimeout(h.timer);e.js&&e.js();e.css&&d("head").append('<style type="text/css">'+e.css+"</style>");var f=h.successFns,g;while(g=f.shift()){g()}},_error:function(f){var h=b[f],e=h.errorFns,g;h.error=true;while(g=e.shift()){g()}}})})(jQuery);(function(a){BEM.DOM.decl("b-head-stripe",{onSetMod:{js:function(){this.bindTo("leftclick",this._install);this.bindTo("close","leftclick",function(c){this._close(c)});var b=this.getMod("theme")||this.elem("theme").text();this._changeTheme(b)}},_install:function(c){c.preventDefault();var b=this.elem("install").attr("href");b&&(window.location=b)},_close:function(b){b.preventDefault();b.stopPropagation();a.get(this.elem("close").attr("href"));this.domElem.animate({"margin-top":"-20px"},500);this.setMod("state","closed")},_changeTheme:function(b){if(!b){return}var c=this;BEM.blocks["i-loader"].load("b-head-stripe_theme_"+b,Lego.params["lego-static-host"]+"/blocks/b-head-stripe/_theme/b-head-stripe_theme_"+b+".bembundle.js",function(){c.setMod("theme",b)})}})})(jQuery);$(document).ready(function(){$(".b-head-userinfo__search .b-form-input__input").focus(function(){$(this).parents(".b-head-userinfo__search .b-form-input").addClass("b-form-input_wide_yes");$(this).parents(".b-head-userinfo__search .b-form-input").find(".b-form-input__hint").removeClass("b-form-input__hint_visibility_visible");$(this).parents(".b-head-userinfo__search .b-form-input").find(".b-search-specification").removeClass("b-search-specification_state_off")});$(".b-head-userinfo__search .b-form-input__input").blur(function(){})});function BlogCompose(){this.form=null;this.defaultHeight=0;this.inplace=null}BlogCompose.prototype.init=function(b){this.form=b;this.form.reset();var a=document.getElementById("formBody"),c=this;if(a&&window.MozillaInplace){iTextAreaDefaultHeight=a.offsetHeight;a.onkeyup=a.onkeypress=function(){if(this.value.length){if(c.inplace){var d=c.inplace.getHeight()+50;this.style.height=d>c.defaultHeight?d:c.defaultHeight}}else{this.style.height=c.defaultHeight}};this.inplace=new MozillaInplace("formBody","hook")}};BlogCompose.prototype.checkSubmitForm=function(){$(this.form).find("input[name='title'],input[name='URL'],input[name='email']").each(function(){if($(this).hasClass("b-input-empty")){this.value=""}});$(this.form).find("input[name='URL']").each(function(){if(this.value!=""&&(!/^\w+:\/\//.test(this.value))){this.value="http://"+this.value}})};BlogCompose.prototype.saveFromW5g=function(){if((typeof tinyMCE!=="undefined")&&tinyMCE.activeEditor&&!tinyMCE.activeEditor.destroyed){tinyMCE.activeEditor.save()}};BlogCompose.prototype.sanitize=function(){if(this.form){this.checkSubmitForm();this.saveFromW5g()}};$(document).ready(function(){window.blogCompose=new BlogCompose();var a=document.getElementById("post");if(a){blogCompose.init(a);if(window.tinyMCE){w5ginit();window.w5GControl=new W5GControl(a,"w5g",g_globals.current_location.page=="posts_add_text")}}});(function(b){var a=b.ya||{};a.isShowLog=a.devMode=location.href.match(/kif\.yandex\.ru/gi);a.log=function(c){if(a.isShowLog&&b.console&&b.console.log){console.log(c)}};a.error=function(c,d){if(c instanceof Object&&c&&a.devMode){var e=c.info&&a.devMode?c.info:"";alert(e+d)}};a.random=function(){return String(Math.random()).substr(2,12)};a.onReadyNamespace=function(i,j){var d=i.split("."),k=null,h=(arguments.length>2)?arguments[2]:5000,c=0,f=500;var g=function(m,l){return m[l]||null};var e=function(){for(var n=0,m=d.length;n<m;n++){if(n===0&&d[n]==="window"){continue}else{k=g(k?k:b,d[n]);if(!k){if(c<h){c+=f;b.setTimeout(arguments.callee,f)}return}}}j(k)};e()};a.ready=a.onReadyNamespace;a.insistentCallback=function(d){var f=0,e=500;timeout=(arguments.length>1)?arguments[1]:5000;var c=function(g){try{g()}catch(i){var h=arguments.callee;if(f<timeout){f+=e;b.setTimeout(function(){h(g)},e)}}};c(d)};a.getParams=function(){return b.g_globals};a.getParamsFromAttr=function(e,c){var d=d||"onclick";return e[d]&&"function"===typeof e[d]?e[d]():null};a.getId=function(c){if(!c.id){c.id="id"+a.random()}return c.id};a.getIdSelector=function(c){return"#"+a.getId(c)};a.bindSelector=function(d,c){if(c.match(/^\./)){$(d).addClass(c.substring(1))}};a.unbindSelector=function(d,c){if(c.match(/^\./)){$(d).removeClass(c.substring(1))}};a.replaceSelector=function(d,c,e){$(d).removeClass(c.substring(1)).addClass(e.substring(1))};a.instances=function(){var c={};return{push:function(d){if(d instanceof Object&&d.info){c[d.info]=d}},list:function(){return c},getById:function(d){return Boolean(c[d])}}}();a.forceRedraw=function(d){d=d||null;if(d&&d.nodeType&&d.nodeType===1&&!d.nodeName.match(/body/i)){d.style.display="none";var c=d.offsetHeight;d.style.display="block"}};a.xmlEscape=function(c){return !c?c:c.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")};a.xmlDecode=function(c){return !c?c:c.replace(/&#39;/g,"'").replace(/&quot;/g,'"').replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&")}})(window);ya.loadScript=function(b,c,a){var a=arguments.length>2?arguments[2]:true;return CJS.execScript((a?b:b+"?yr="+ya.random()),c)};(function(a){a.url=function(b,d){loc=d||location;if(loc.protocol&&loc.host&&loc.pathname){var c=loc.pathname.match(/\/([\w-]+)\//);return(loc.protocol+"//"+loc.host+"/"+(loc.host.match(/^clubs/)&&c?c[1]+"/":"")+b)}}})(ya);ya.processTemplate=function(j,d){var g=d||{},l=[],i="",e,a=/\{\((\w*)\)(\(|\[)/g,k=/\{\((\w*)\)(\(|\[)|\)(?:\}|\[)/g,b=/\{\((\w*)\)(\(|\[)|\]\}/g,c=0,h=0,f={drop:-1,regexp:a};while(e=f.regexp.exec(j),e!==null){h=f.regexp.lastIndex;if(f.drop===-1){i+=j.substr(c,h-c-e[0].length)}c=h;if(e[1]){l.push({drop:f.drop,regexp:f.regexp});if(f.drop===-1){f.drop=g[e[1]]?-1:1}else{f.drop=0}if(e[2]==="["){f.regexp=b;f.drop=-f.drop}else{f.regexp=k}}else{if(e[0]===")["){f.drop=-f.drop;f.regexp=b}else{f=l.pop()}}f.regexp.lastIndex=h}i+=j.substr(h);return i.replace(/\{\s*([^{}\s]*)\s*\}/g,function(n,m){var o=g[m];return typeof o==="string"||typeof o==="number"?o:n})};(function(b){var a=function(g){var e=[],f;for(f in g){e.push(g[f])}return e},c=function(g,e){var f,h;if(!g){return e}g=g.split(".");for(f=0,h=g.length;f<h;f++){e=e[g[f]]}return e},d=function(e,j){var f=e.lastIndexOf("."),h=e.substr(0,f),g=c(h,window);return g[e.substr(f+1)].apply(g,a(j))};b.drawArray=function(f,k,j){var h,l,e="",g;for(h=0,l=f.length;h<l;h++){g=f[h].template||j;e+=b.drawObject(f[h],k,g)}return e};b.drawObject=function(f,k,j){var e,h;if(f instanceof Array){return b.drawArray(f,k,j)}else{if(typeof f!=="object"){return f}}var g;for(h in f){g=h.indexOf("@");if(g!==-1){e=h.substr(g+1);if(f[h] instanceof Array){f[h.substr(0,g)]=b.drawArray(f[h],k,e)}else{f[h.substr(0,g)]=b.drawObject(f[h],k,e)}delete f[h]}}if(!j){return f}if(j.indexOf("func:")===0){return d(j.substr(5),f)}else{return c(k,b.templates)[j](f)}}})(ya);
/*!
 * Copyright (c) 2010, Yahoo! Inc. All rights reserved.
 * Code licensed under the BSD License:
 * http://developer.yahoo.com/yui/license.html
 * version: 2.8.2r1
*/
ya.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=ya;for(c=(f[0]=="ya")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]]}}return g};ya.addParams=function(a,b){$.each(b,function(c,d){var e=new RegExp("("+c+"\\=)\\w+","gi");if(a.match(e)){a.replace(e,"$1"+d)}else{a+=(a.match(/\?/g)?"&":"?")+c+"="+encodeURI(d)}});return a};ya.queue={queues:{},add:function(a,c){var b=ya.queue.queues;b[a]=b[a]||[];b[a].push(c)},exec:function(f,c){var d,e,a;if(!ya.queue.queues[f]){return false}e=ya.queue.queues[f];a=e.length;if(!c){c=document}for(d=0;d<a;d++){try{e[d](c)}catch(b){ya.log("не могу выполнить функцию №"+d+", потому что "+b)}}}};(function(a,c){var b=function(){if(arguments.length){var d=arguments[0],e=arguments[1];if(e){return function(f){return a.processTemplate(d,c.extend({},e,f))}}else{return function(f){return a.processTemplate(d,f)}}}};a.namespace("template");a.template=b})(window.ya,jQuery);(function(c,a){var b=a.template;a.namespace("templates");c.extend(a.templates,{user:{Ya:b(['{userpic}<b class="b-user">','<a class="b-user__link" href="{url}">{userWithUpperLetter}</a></b>'].join(""),{userpic:""}),Social:b(['<b class="b-user b-user_social_yes b-user_provider_{provider}">','<a class="b-user__link" href="{url}"><i class="b-user__provider-ico"></i>{name}</a></b>'].join("")),Light:b(['<b class="b-user b-user_provider_yandex" title="{title}">','<i class="b-user__provider-ico"></i>{name}</b>'].join("")),Qu:b("<sup>{qu}</sup>"),userWithUpperLetter:b('<b class="b-user__first-letter">{firstPart}</b>{secondPart}')},error:b('<div class="b-error b-notify b-notify_type_error" style="position:absolute">{text}</div>'),loader:b('<div class="b-candy b-candy_state_on" style="width: 5.4em;"/>'),userpicSmall:b('<a class="b-userpic b-userpic_type_small" href="{url}"><img src="{userpicURL}" class="b-userpic__img"><i class="b-userpic__i"></i></a>&#160;'),"lego.b-form-button":b(['<span class="b-form-button b-form-button_theme_{theme} b-form-button_height_{height} i-bem" role="button">','<i class="b-form-button__left"></i>','<span class="b-form-button__content">','<span class="b-form-button__text">{title}</span>',"</span>",'<input hidefocus="true" type="{type}" value="{value}" name="{name}" class="b-form-button__input {cssclass}" tabindex="1"/>',"</span>"].join(""),{theme:"grey-19",height:"19",type:"submit",cssclass:""}),"lego.b-form-button.link":b(['<a href="{url}" class="b-form-button b-form-button_theme_{theme} b-form-button_height_{height} b-form-button_valign_middle" role="button">','<i class="b-form-button__left"></i>','<span class="b-form-button__content">','<span class="b-form-button__text">','<xsl:value-of select="{title}"/>',"</span>","</span>",'<i class="b-form-button__click"></i>',"</a>"].join(""),{title:"",theme:"grey-19",height:"19",url:""}),popupLoader:b('<img src="{imgbase}ajax-loader.gif" />',{imgbase:g_globals.img_base})})})(window.jQuery,window.ya);(function(a){a.getViewUserByType=function(b,f,h){if(arguments.length){f=f||"Yaru";h=h||false;switch(f){case"Social":b.name=a.xmlEscape(b.name);return a.templates.user.Social(b);case"Light":b.name=a.xmlEscape(b.name);if(!b.title){b.title="Пользователь без страницы на Яру"}return a.templates.user.Light(b);default:var e=b.name||b.title||b.login;if(!e){return"аноним"}var g=new RegExp("^(\\W*?)(\\w|[\\u00a0-\\uffff]|\\S(?!.*\\w))(.*)$"),d=e.match(g);if(d){var c=b.url?b.url:friendsFullURL(b);$.extend(b,{userWithUpperLetter:a.templates.user.userWithUpperLetter({firstPart:a.xmlEscape(d[2]),secondPart:a.xmlEscape(d[3])}),qu:"",url:c,userpic:h?a.templates.userpicSmall({url:c,userpicURL:b.picture_url+"small"}):""});return a.templates.user.Ya(b)}}}}})(ya);if(ya.devMode){$(document).ready(function(){ya.loadScript(g_globals.static_base+"/js/_ya.devMode.js")})}var search_settings={order:["diary_posts","club_posts","posts","my_diary_posts","diary","club","internet"],items:{diary:{key:"diary",title:"дневник",form:{action:"search_users_by_name.xml",params:[{name:"search_type",type:"hidden",value:"diary"}]}},posts:{key:"posts",title:"в я.ру",form:{action:"search_posts.xml",params:[{name:"search_type",type:"hidden",value:"posts"}]}},club:{key:"club",title:"клуб",form:{action:"search_clubs_by_name.xml",params:[{name:"search_type",type:"hidden",value:"club"}]}},internet:{key:"internet",title:"в интернете",form:{action:"http://yandex.ru/yandsearch",params:[{name:"search_type",type:"hidden",value:"internet"}]}}},cssSelectors:{container:".b-multisearch-container",selector_arrow:".darr",selector_with_value:".selected_value",inputFocus:".b-multisearch-focus",popupActive:".b-multisearch-popup-active",popup:".b-ya-search-p",popup_visible:".b-multisearch-popup-visible",popup_item:".b-ya-search-p-i",popup_item_selected:".b-dropdown__item-selected",bindedClassName:".b-multisearch-input",form_item:".b-ya-search-input"},templates:{darr:'<a class="{selector_arrow}" href="#">&#160;</a>',form_item:'<input class="{form_item}" type="{type}" name="{name}" value="{value}" />',popup:['<div class="b-dropdown__popup {popup}">','<iframe class="b-dropdown__iframe" frameborder="0" src="javascript:\'<body style=background:none;overflow:hidden>\'"></iframe>','<ul class="b-dropdown__list">{popup_items}</ul></div>'].join(""),popup_item:'<li class="b-dropdown__item {popup_item}"><a class="b-pseudo-link" onclick="return {\'type\':\'{key}\'}" href="#">{title}</a></li>',popup_item_selected:'<li class="b-dropdown__item {popup_item} {popup_item_selected}"><a class="b-pseudo-link" onclick="return {\'type\':\'{key}\'}" href="#">{title}</a></li>'}};(function(b,d){var e=function(f,h){var g=null;d.each(f,function(k,l){var j=l[h.name]&&l[h.name]==h.value;if(l[h.name]&&l[h.name]==h.value){g=l}});return g};var c=function(f){return f.replace(/\./,"")};var a=function(i,g){var f=this;this.$bindedElement=d(i);this.$bindedForm=this.$bindedElement.parents("form");this.$bindedElement.attr("autocomplete","off");this.options=d.extend({},this.options,g);this.$container=this.$bindedForm.find(this.options.cssSelectors.container);this.options.htmlSelectors={};d.each(this.options.cssSelectors,function(k,l){f.options.htmlSelectors[k]=c(l)});this.$popupElement=null;this.selectedItem=null;this.$container.append(ya.processTemplate(this.options.templates.darr,this.options.htmlSelectors));var j=e(this.options.items,{name:"selected",value:true});var h=function(k){f.$bindedElement.attr("title",k.title);f.selectedItem=k;f.prepareForm(k,f.options.templates.form_item)};if(j){h(j)}f.initChooser();f.initFocusChanger()};a.prototype.setDefaultValue=function(){this.$bindedElement[0].value=this.$bindedElement.attr("title")};a.prototype.initFocusChanger=function(){var f=this,h=f.options.cssSelectors,k=f.options.htmlSelectors;var g=function(){if(f.$bindedElement.attr("title")===f.$bindedElement[0].value){f.$bindedElement[0].value=""}f.$bindedForm.addClass(k.inputFocus)};if(f.$bindedElement.val()){g()}else{f.setDefaultValue()}var j=function(){f.$bindedForm.removeClass(k.popupActive).removeClass(k.inputFocus);f.setDefaultValue()};var i=function(){if(!f.$bindedElement[0].value.length&&f.$bindedElement.attr("title")!=f.$bindedElement[0].value&&!f.$bindedForm.hasClass(k.popupActive)){j()}};f.$bindedElement.focus(function(l){g()}).blur(function(l){window.setTimeout(i,200)})};a.prototype.prepareForm=function(k,g){var j=k.form,f=this,i=f.options.cssSelectors,l=f.options.htmlSelectors;if(!/^https?\:\/\//.test(j.action)){j.action=window.ya.base+j.action}ya.log(j.action);this.$bindedForm[0].action=j.action;this.$bindedForm.find(i.selector_arrow).text(k.title).addClass(l.selector_with_value);var h=function(m){if(m.useExisted){f.$bindedElement[0].name=m.name}else{if(f.$bindedForm[0][m.name]){f.$bindedForm[0][m.name].value=m.value}else{m.form_item=l.form_item;f.$bindedForm.prepend(ya.processTemplate(g,m))}}};d(i.form_item).remove();if(j.params){d.each(j.params,function(m,n){h(n)})}return true};a.prototype.initChooser=function(){var f=this,h=f.options.cssSelectors,k=f.options.htmlSelectors,g=f.$container.children(h.selector_arrow);var j=function(){if(f.$popupElement){f.$bindedElement[0].focus();f.$bindedForm.removeClass(k.popupActive);f.$popupElement.remove();f.$popupElement=null}};var i=function(){f.$popupElement=f.createPopup();f.$bindedForm.addClass(k.popupActive);var l=f.$popupElement.find(h.popup_item);l.click(function(n){var p=ya.getParamsFromAttr(n.target,"onclick");var o=p.type;var m=e(f.options.items,{name:"key",value:o});if(m){f.setSelectItem(m)}if(f.prepareForm(m,f.options.templates.form_item)){j()}});d(document).keydown(function(m){if(m.keyCode==27&&!(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)){j()}}).click(function(m){if(!d(m.target).is(h.selector_arrow)&&!d(m.target).is(h.popup)){j()}})};g.click(function(){if(f.$popupElement){j()}else{i()}})};a.prototype.setSelectItem=function(f){this.$bindedForm.find(this.options.cssSelectors.selector_arrow).html(f.title);this.selectedItem=f};a.prototype.createPopup=function(){var g=this,i=g.options.cssSelectors,m=g.options.htmlSelectors,j=g.options.templates;if(g.$bindedForm.children(i.popup)[0]){return}var f=e(g.options.items,{name:"default",value:true});var h=function(){var n=[];d.each(g.options.order,function(q,p){var s=g.options.items[p];if(s){var o=(g.selectedItem&&s.key===g.selectedItem.key)?ya.processTemplate(j.popup_item_selected,m):ya.processTemplate(j.popup_item,m);n.push(ya.processTemplate(o,s))}});return n.join("")}();g.$container.append(ya.processTemplate(j.popup,{popup_items:h,popup:m.popup}));var l=g.$bindedForm.find(i.popup),k=g.$bindedForm.find(i.selector_arrow).offset();return l};b.MultiSearch=a})(window,jQuery);$(document).ready(function(a){$(document).delegate(".b-login-popup","click",function(b){if(Lego&&Lego.block&&Lego.block["b-domik_type_popup"]&&Lego.block["b-domik_type_popup"].login&&Lego.block["b-domik_type_popup"].login instanceof Function){Lego.block["b-domik_type_popup"].login();b.preventDefault();b.stopPropagation()}})});(function(a){var b="g-hidden";a.fn.extend({yhide:function(){var c=arguments[0]||this;if(c instanceof a){return c.addClass(b)}},yshow:function(){var c=arguments[0]||this;if(c instanceof a){return c.removeClass(b)}},ytoggle:function(){var c=arguments[0]||this;if(c instanceof a){c.each(function(){var d=a(this);if(d.hasClass(b)){d.yshow()}else{d.yhide()}});return c}}})})(jQuery);(function(b,a){a.namespace("controls");a.controls.ChooseControlPermission=function(){this.controlSelector=".b-choose-permission";this.exportSelector=".b-export-item";var d=this;d.exportElements=[];var c=function(h){b.each(d.exportElements,function(j,k){k.disabled=h})};var g={"public":function(){c(false)},all_friends:function(){c(true)},"private":function(){c(true)}};var f=function(h){g[this.value].call(this)};var e=function(){b(d.exportSelector).each(function(h,j){d.exportElements.push(j)});b(d.controlSelector+":checked").each(f);b(d.controlSelector).bind("click",f)};return{init:e}};b(a.controls.ChooseControlPermission).trigger("ready")})(jQuery,ya);var targetNS=window.ya;(function(a,b){a.namespace("templates");a.templates.popup=a.template(['<div class="i-popup i-popup_autoclosable_yes i-popup_visibility_hidden" id="{id}">','<iframe class="i-popup__under b-popupa__under"></iframe>','<div class="i-popup__content">','<div class="b-popupa b-popupa_theme_ffffff b-popupa_direction_down b-dropdowna__popup_color_black b-dropdowna__popup_type_actions b-dropdowna__popup">','<i class="b-popupa__tail" style="margin-left: 3.5px; margin-top: -7px; "><i class="b-popupa__tail-i"></i></i>','<i class="b-popupa__shadow"></i>','<table class="b-popupa__wrap" cellpadding="0" cellspacing="0"><tbody><tr>','<td class="b-popupa__wrap-cell"><div class="b-popupa__content {contentClass}">{content}',"</div></td></tr></tbody></table>","</div>","</div>","</div>"].join(""))})(targetNS,jQuery);(function(a,d){var c=function(f){this.params=d.extend({id:"#id"+ya.random(),content:"",target:ya.getIdSelector(d("body")[0]),direction:"down"},f);this.info="Popup "+this.params.id+":";this.init()},b=7,e=7;c.prototype={bindTo:function(f){this.contextElementId=f;this.rebind()},selectors:{body:".b-popupa",content:".b-popupa__content",tail:".b-popupa__tail",visible:".i-popup_visibility_visible",hidden:".i-popup_visibility_hidden"},generatePopup:function(){var f=a.templates.popup({id:this.params.id.substring(1),content:this.params.content,contentClass:this.params.contentClass||""});d(this.params.target).append(f)},getAvailableDirections:function(k,h,t,v,n){var p=d(window).width(),j=d(window).height(),m=k.top-(window.pageYOffset?window.pageYOffset:document.body.scrollTop)-t,s=j+(window.pageYOffset?window.pageYOffset:document.body.scrollTop)-k.top-n-t,g=k.left-h,q=p-k.left-v-h,u,i,l=h/2,f=t/2,o={};m=m<0?-m:0;s=s<0?-s:0;g=g<0?-g:0;q=q<0?-q:0;u=(l>g?0:g-l)-(l>q?0:q-l);i=(f>m?0:m-f)-(f>s?0:s-f);if(Math.abs(u)<l){u-=l;if(!m){o.up=u}if(!s){o.down=u}}if(Math.abs(i)<f){i-=f;if(!g){o.left=i}if(!q){o.right=i}}return o},setCoordinates:function(n,p,k,i,q,s,o){var t=s/2,j=o/2,h=k.left,m=k.top,f=0,g=0,l;if(n==="up"){h+=p+t-e;m-=q+b;f=-p}else{if(n==="down"){h+=p+t-e;m+=o+b;f=-p;g=-b}else{if(n==="left"){h-=i+e;m+=p+j-b;g=-p}else{if(n==="right"){h+=s+e;m+=p+j-b;f=-e;g=-p}}}}d(this.params.id).css("top",m).css("left",h).find(this.selectors.tail).css("margin-left",f).css("margin-top",g);l=d(this.params.id).find(this.selectors.body)[0];l.className=l.className.replace(/b-popupa_direction_\w*/,"b-popupa_direction_"+n);this.lastDirection=n},rebind:function(){var g=d(this.contextElementId),j=g.offset(),f=d(this.params.id),h=f.width(),m=f.height(),n=g.width(),l=g.height(),i=this.getAvailableDirections(j,h,m,n,l),k=this.lastDirection||this.params.direction;if(i[k]!==undefined){this.setCoordinates(k,i[k],j,h,m,n,l)}else{for(k in i){this.setCoordinates(k,i[k],j,h,m,n,l);break}}a.log(this.info+"rebind")},attachHideEvents:function(){var f=this;d(this.contextElementId).bind("click.popup",function(g){f.hide();g.stopPropagation();return false});d(window).bind("resize.p"+this.params.id+" scroll.p"+this.params.id,function(){f.rebind()});window.setTimeout(function(){d("html").bind("click.popup",{popup:d(f.params.id)[0]},function(h){var g=h.target;while(g){if(g===h.data.popup){return}g=g.parentNode}f.hide()})},0)},detachHideEvents:function(){d("html").unbind("click.popup");d(window).unbind("resize.p"+this.params.id+" scroll.p"+this.params.id);d(this.contextElementId).unbind("click.popup")},show:function(f){this.hidden=false;this.rebind();ya.replaceSelector(this.params.id,this.selectors.hidden,this.selectors.visible);this.attachHideEvents()},hide:function(f){this.hidden=true;this.lastDirection=undefined;this.detachHideEvents();ya.replaceSelector(this.params.id,this.selectors.visible,this.selectors.hidden)},toggleView:function(){a.log(this.info+"toggleView: isHidden?"+this.hidden);if(this.hidden){this.show()}else{this.hide()}},update:function(f,g){d(this.params.id).find(this.selectors.content).html(f);this.bindTo(g||this.contextElementId)},init:function(){this.generatePopup();this.hidden=true},getId:function(){return this.params.id}};a.Popup=c})(targetNS,jQuery);(function(a,b){a.namespace("templates");a.templates.menuList=a.template(['<div class="b-menu b-menu_layout_vert b-menu_preset_vmenu">','<ul class="b-menu__layout-vert">{items}</ul>',"</div>"].join(""));a.templates.menuItem=a.template(['<li class="b-menu__layout-cell b-menu__layout-vert-cell">','<div class="b-menu__item">','<a class="b-link" href="{url}">{title}</a>',"</div>","</li>"].join(""))})(ya,jQuery);(function(a,c){var b=function(d){this.element=a.getIdSelector(d);this.params=a.getParamsFromAttr(d,"onclick");this.controlInfo="Menu "+this.element+": ";a.log(this.controlInfo+"init");this.attachEvents()};b.prototype={popupInit:function(){a.log(this.controlInfo+"popupInit");var f=this;for(var h=0,g="",e=f.params.items,d=e.length;h<d;h++){g+=a.templates.menuItem(e[h])}f.popup=new a.Popup({content:a.templates.menuList({items:g}),direction:"right"});f.popup.bindTo(c(f.element))},attachEvents:function(){var d=this;c(this.element).bind("click",function(f){if(!d.popup){d.popupInit()}d.popup.toggleView()})}};a.namespace("controls");a.controls.Menu=b;a.queue.add("onload",function(d){c(d).find(".b-control-menu").each(function(e,f){a.instances.push(new a.controls.Menu(f))})})})(ya,jQuery);var targetNS=window.ya;(function(b,c){b.namespace("templates");var a=b.template;b.templates.vote={itemVote:a(['<div class="b-poll">','<div class="b-poll__item">','<label class="b-poll__label">{input}<i class="b-poll__label-i">{title}</i></label>',"</div>","</div>"].join("")),itemResult:a(['<div class="b-poll__item">','<div class="b-poll__answer">','<div class="b-poll__result">','<div class="b-poll__result-graph" style="width: {percent}%"/>',"</div>{title}",'<span class="b-poll__num">{count}</span>',"</div>","</div>"].join("")),itemVoteSingle:a('<input type="radio" class="b-poll__input" name="vote-for" value="{value}" {checked}>',{checked:""}),itemVoteMultiply:a('<input type="checkbox" class="b-poll__input" name="vote-for" value="{value}" {checked}>',{checked:""}),layout:a('<div class="b-poll"><form>{items}{actions}</form></div>'),actionLink:a('<div class="b-poll__action"><span class="b-pseudo-link {selector}">{title}</span></div>'),expired:a('<div class="b-poll__action"><span>{title}</span></div>')}})(targetNS,jQuery);(function(a,b){a.namespace("locales.ru");a.locales.ru.vote={vote:"проголосовать",revote:"проголосовать заново",tovote:"вернуться к голосованию",expired:"время голосования истекло",results:"посмотреть результаты",unselected:"Вы не выбрали ни одного варианта",serverError:"Произошла ошибка при работе с сервером"};a.locale=a.locales.ru})(targetNS,jQuery);(function(b,c){var a=function(d){this.info="Vote control: ";this.id=b.getIdSelector(d);this.params=b.getParamsFromAttr(d,"onclick");this.init()};a.prototype={attachEvents:function(){b.log(this.info+"Attach Events");var d=this;c(this.id).delegate(this.selectors.revote,"click",function(){d.params.isResultsMode=false;d.draw()});c(this.id).delegate(this.selectors.results,"click",function(){d.params.isResultsMode=true;d.drawOrGetResults()});c(this.id).delegate(this.selectors.vote,"click",function(){d.params.isResultsMode=true;d.voteAction(true)})},getSelectedValues:function(){var d=[];c(this.id).find(this.selectors.inputChecked).each(function(e,f){d.push(f.value)});return d},update:function(d){c.extend(this.params,d);this.draw()},callbackOK:function(d){b.log(this.info+"callbackOK");this.update(d.data)},callbackNOK:function(){b.log(this.info+"callbackNOK");b.error(this,b.locale.vote.serverError)},voteAction:function(f){var e=null,d=this;if(f&&!this.getSelectedValues().length){b.error(this,b.locale.vote.unselected);return}var g={feed_id:this.params.feed_id,item_no:this.params.item_no};if(f){g.mode="results";g.vote_for=this.getSelectedValues().join(",")}c.ajax({url:f?ya.url("json_do_vote.xml"):ya.url("jsonp_vote.xml"),type:f?"POST":"GET",dataType:f?"json":"jsonp",data:g,success:function(){d.callbackOK.apply(d,arguments)},error:function(){d.callbackNOK.apply(d,arguments)}})},selectors:{inputChecked:".b-poll__input:checked",revote:".b-action-revote",vote:".b-action-vote",results:".b-action-get-results"},drawOrGetResults:function(){if(this.params.isResultsMode&&!this.params.voteResults){this.voteAction()}else{this.draw()}},init:function(){b.log(this.info+"init");b.log(this.params);this.attachEvents();if(this.params.voteResults){this.draw()}else{this.voteAction()}},getResultById:function(g){b.log(this.info+"getResultById");var f=this.params.voteResults;if(!f){return null}for(var e=0,d=f.length;e<d;e++){if(f[e]["number"]===g){return f[e]}}return null},getViewVote:function(){b.log(this.info+"getViewVote");var k=b.templates,f=this.params,m=f.vars,n="",j=null,d=f.isSingle?k.vote.itemVoteSingle:k.vote.itemVoteMultiply;for(var h=0,e=m.length;h<e;h++){j=this.getResultById(m[h].id);n+=k.vote.itemVote({input:d({value:m[h].id,checked:j&&j.voted?"checked":""}),title:m[h].title})}var g=k.vote.actionLink({title:b.locale.vote.vote,selector:this.selectors.vote.substring(1)})+k.vote.actionLink({title:b.locale.vote.results,selector:this.selectors.results.substring(1)});return k.vote.layout({items:n,actions:g})},getViewResults:function(){b.log(this.info+"getViewResults");var f=b.templates,k=this.params,g=k.vars,d="",j=null;for(var h=0,e=g.length;h<e;h++){j=this.getResultById(g[h].id);d+=f.vote.itemResult({value:g[h].id,percent:j?Math.round((j.votes*100)/k.votes):0,count:j?j.votes:0,title:g[h].title})}return f.vote.layout({items:d,actions:f.vote.actionLink({title:this.params.isMeVoted?b.locale.vote.revote:b.locale.vote.tovote,selector:this.selectors.revote.substring(1)})})},getViewExpired:function(){b.log(this.info+"getViewExpired");var f=b.templates,k=this.params,g=k.vars,d="",j=null;for(var h=0,e=g.length;h<e;h++){j=this.getResultById(g[h].id);d+=f.vote.itemResult({value:g[h].id,percent:j?Math.round((j.votes*100)/k.votes):0,count:j?j.votes:0,title:g[h].title})}return f.vote.layout({items:d,actions:f.vote.expired({title:b.locale.vote.expired})})},draw:function(){var d=this.params.expired?this.getViewExpired():this.params.isResultsMode?this.getViewResults():this.getViewVote();c(this.id).html(d)}};b.namespace("controls");b.controls.Vote=a;ya.queue.add("onload",function(d){c(d).find(".b-control-vote").each(function(f,g){ya.instances.push(new b.controls.Vote(g))})})})(targetNS,jQuery);y5.require(["Classes","Events"],function(){var a=function(){};a.prototype.register=function(){var d,c,b;for(b=0;b<arguments.length;b++){d=arguments[b];c=d[3]||this.control;this[d[0]]=y5.cssQuery(d[1],c)[0]}};a.prototype.show=function(){var c,b;for(b=0;b<arguments.length;b++){c=arguments[b];if(y5.Types.string(c)){c=this[c]}y5.Classes.remove(c,"g-hidden")}};a.prototype.hide=function(){var c,b;for(b=0;b<arguments.length;b++){c=arguments[b];if(y5.Types.string(c)){c=this[c]}y5.Classes.add(c,"g-hidden")}};a.prototype.on=function(d,c,b){y5.Events.observe(d,c,b,true,this);return this};Friends.BasicControl=a;y5.loaded("{Friends}.BasicControl")});y5.require(["{Friends}.BasicControl"],function(){var a=function(c){var b=function(){if(arguments.length>0){return this.init.apply(this,arguments)}};if(c){b.prototype=new c()}return b};Friends.CommonConstructor=a;y5.loaded("{Friends}.CommonConstructor")});y5.require(["Events","{Friends}.CommonConstructor"],function(){var a=Friends.CommonConstructor(Friends.BasicControl);a.prototype.init=function(c,d){this.control=c;this.params=d;this.input=y5.cssQuery("input[placeholder]",c)[0];if(!this.input){return}this.init=true;this.input.refInputPlaceholder=this;this.placeholder=this.input.getAttribute("placeholder");this.clearinput=true;var b=this.input.getAttribute("clearinput");if(b&&b=="no"){this.clearinput=false}if(this.placeholder&&this.input.value==""){this.disable(this.placeholder)}this.on("keyup",this.inputOut,this.input);this.on("focus",this.inputEnter,this.input);this.on("blur",this.inputOut,this.input);return this};a.prototype.inputEnter=function(b){if(this.isEmpty()){this.clearInput()}};a.prototype.inputOut=function(b){if(this.isEmpty()){var c=(b.type=="keyup"&&this.input.value!=this.placeholder)?"":this.placeholder;this.disable(c)}else{this.enable(this.input.value)}};a.prototype.isEmpty=function(){var b=(this.input.value==""||this.input.value==this.placeholder);return b};a.prototype.isTaint=function(){return !this.isEmpty()};a.prototype.clearInput=function(b){if(this.clearinput){this.input.value=""}var c=this.clearinput?"":this.input.value;this.disable(c)};a.prototype.disable=function(b){if(b!=this.input.value){this.input.value=b}y5.Classes.add(this.input,"b-input-empty")};a.prototype.enable=function(b){if(b!=this.input.value){this.input.value=b}y5.Classes.remove(this.input,"b-input-empty")};Friends.InputPlaceholder=a;y5.loaded("{Friends}.InputPlaceholder")});Friends.FriendControl=function(a){this.control=a;this.search=0;this.result=0;this.list=0;this.details=0;this.submit=0;this.textInitial="";this.searchSubmit=0;this.init()};Friends.FriendControl.prototype={clearSearchField:function(a){if(a.target.value==this.textInitial){a.target.value=""}y5.Classes.remove(a.target,"text-initial")},initialSearchField:function(a){if(y5.Strings.isEmpty(a.target.value)){y5.Classes.add(a.target,"text-initial");a.target.value=this.textInitial}},onCheckboxClick:function(b){b.stopPropagation();var a=y5.Dom.getDescendantOrSelf(b.target,"input","*");this.disableControl(a,(a.checked==""))},disableControl:function(g,f){var d=y5.Dom.getFollowing(y5.Dom.getAncestorOrSelf(g,"label","*"),"span","*")[0];y5.Classes.assign(d,"disabled",f);var c=y5.Dom.getDescendants(d,"input","*"),e,b;for(e=0,b=c.length;e<b;e++){c[e].disabled=f}},showUserInfo:function(){var c=this.list.selectedIndex;var d=this.list[c].value;var b=this.list[c].innerHTML;if(!d){return}this.setStatusMessage('Идёт загрузка карточки пользователя<br /><img src="'+g_globals.img_base+'bar.gif" alt=""/>');var a=this;g_sources.getSource(d,function(e){a.getUserResponseOK(e,{parent:a})},this.getUserResponseError,{parent:this},true)},getUserResponseOK:function(a,b){y5.Classes.remove(b.parent.details,"details-empty");b.parent.details.innerHTML=a.info||""},getUserResponseError:function(a,b){},onSearch:function(){this.setStatusMessage('Идёт загрузка пользователей<br /><img src="'+g_globals.img_base+'bar.gif" alt=""/>');var b=["textarea","select","button"];var d="input";var c=this.placeholders.filter(function(e){if(e.isEmpty()){d+='[name!="'+e.input.name+'"]'}return(!e.isEmpty()&&!y5.Strings.isVoid(e.input.value))})==0;b.push(d);if(c){this.setStatusMessage("Задан пустой поисковый запрос.");return false}var a=friendsURL("ajax/search_users",y5.FormCollector.collectTags(this.control,b));(function(e,f){jQuery.ajax({url:a,dataType:"json",success:function(g){e.searchResponseOK(g,f)},error:function(g){e.searchResponseError(g,f)}})})(this,{parent:this});return false},searchResponseOK:function(a,b){var c=b.parent;c.listParentNode.innerHTML=a.html;c.list=c.listParentNode.firstChild;if(c.list.length===0){c.setStatusMessage("никого не найдено");return}new y5.AEventListener("change",c.showUserInfo,c.list,true,c);c.list.selectedIndex=-1;c.setStatusMessage("&#8592;&#160;выберите человека")},searchResponseError:function(a){},setStatusMessage:function(a){y5.Classes.add(this.details,"details-empty");this.details.innerHTML=a},init:function(){var g=(y5.cssQuery('input[name="type"][type="hidden"]')[0]||{value:"unknown"}).value;y5.cssQuery(".b-write-friend-search input",this.control).forEach(function(a){y5.Events.observe("keypress",function(h){if(h.keyCode==13){h.preventDefault();h.stopPropagation();this.onSearch()}},a,true,this)},this);this.placeholders=y5.cssQuery(".Friends-later-InputPlaceholder",this.control).map(function(a){return new Friends.InputPlaceholder(a)});this.search=y5.Dom.getDescendant(this.control,"div","b-write-friend-search");this.searchSubmit=y5.Dom.getDescendant(this.search,"input","submit");y5.Events.observe("click",this.onSearch,this.searchSubmit,true,this);this.textInput=y5.Dom.getDescendant(this.search,"input","text");this.textInitial=this.textInput.value;new y5.AEventListener("focus",this.clearSearchField,this.textInput,true,this);new y5.AEventListener("blur",this.initialSearchField,this.textInput,true,this);var c=y5.Dom.getDescendants(this.search,"p","*"),d,b;for(d=0,b=c.length;d<b;d++){var f=y5.Dom.getDescendants(c[d],"label","*");if(f.length>0){y5.Events.observe("click",this.onCheckboxClick,f[0],true,this);this.disableControl(f[0],true)}}this.result=y5.Dom.getDescendant(this.control,"table","b-write-users-list");this.list=y5.Dom.getDescendants(y5.Dom.getDescendant(this.result,"td","list"),"select","*")[0];this.listParentNode=this.list.parentNode;this.details=y5.Dom.getDescendant(this.result,"td","details");var e=y5.Dom.getDescendant(this.control.parentNode,"div","b-write-submit");if(["congratulation","text"].indexOf(g)>-1){e=false}}};y5.require(["Strings","Dom","Classes","Events","Ajax","AjaxJS","FormCollector","{Friends}.InputPlaceholder"],function(){y5.loaded("{Friends}.FriendControl")});Friends.ProfileView=function(a){this.control=a;this.controlEdit=null;this.controlEditElements=[];this.headerId=null;this.contentNodeId=null;this.init();this.prevClassName=null};Friends.ProfileView.prototype={TAGNAME:"div",CLASSNAME:"c-profile-view",selectControl:function(b){var a=y5.Dom.getAncestorOrSelf(this.control,"*","b-profile-section-holster").parentNode;if(y5.Classes.test(a,"special")){this.control.style.borderColor=this.control.style.backgroundColor=getById(this.headerId).style.backgroundColor="#ffdba9"}else{this.control.style.borderColor="#c7c8ca"}},unselectControl:function(a){this.control.style.borderColor=this.control.style.backgroundColor=getById(this.headerId).style.backgroundColor=""},saveControlEditElements:function(){this.controlEditElements=[];var b=this.control.getElementsByTagName("input"),d,a;for(d=0,a=b.length;d<a;d++){var e=b[d];if(["hidden","text"].indexOf(e.type.toLowerCase())>-1){this.controlEditElements.push({element:e,value:e.value})}else{if(["checkbox","radio"].indexOf(e.type.toLowerCase())>-1){this.controlEditElements.push({element:e,checked:e.checked})}}}var c=this.control.getElementsByTagName("select");for(d=0,a=c.length;d<a;d++){var e=c[d];this.controlEditElements.push({element:e,value:e.value})}},cancelChanges:function(){var b,a;for(b=0,a=this.controlEditElements.length;b<a;b++){var c=this.controlEditElements[b];if(typeof(c.value)!=="undefined"){c.element.value=c.value}else{if(typeof(c.checked)!=="undefined"){c.element.checked=c.checked}else{if(typeof(c.display)!=="undefined"){c.element.style.display=c.display}}}if(c.element.type&&c.element.type=="text"){y5.Events.notify("y5:change",c.element,true,true)}}},editCategory:function(b){var c=this;var a={responseSuccess:function(d,f){c.container_edit=y5.Dom.getDescendant(c.control,"div","edit");c.container_view=y5.Dom.getDescendant(c.control,"div","view");c.container_edit.innerHTML=d;c.control.onclick=function(){return{name:c.categoryName}};var e=getById(c.contentNodeId);c.switchToProfileEdit();initAutoareas(e);appendInputField(e,{type:"hidden",name:"view_category",value:c.categoryName});c.controlEdit=new g_controls.ProfileEdit(e,false);c.controlEdit.activate=function(){return false};c.controlEdit.resizeAutoareas();c.controlEdit.trigger=function(g){g.preventDefault();g.stopPropagation();if(!c.controlEdit.saveButton.disabled){if(confirm("Профиль был изменен. Вы уверены, что хотите закрыть блок?")){c.cancelChanges();c.viewCategory()}}else{c.viewCategory()}return false};c.controlEdit.process_marking.responseSuccess=function(g,h){y5.Classes.add(c.controlEdit.spin,"g-hidden");c.viewCategory(g);c.controlEdit.tracker.initialState=c.controlEdit.tracker.controlsState()};y5.Components.init(c.control);c.saveControlEditElements()},responseError:function(d,e){y5.Console.error("Error loading form")}};jQuery.ajax({url:"ajax/profile_category_form.xml?category="+this.categoryName,dataType:"json",success:function(d){a.responseSuccess(d.html,{})},error:function(d){a.responseSuccess(d,{})}});b.preventDefault()},viewCategory:function(a){this.container_edit.style.display="none";y5.Classes.remove(getById(this.contentNodeId),"edit-mode");y5.Classes.remove(getById(this.headerId),"g-hidden");if(this.controlEdit.control.id=="id-category-special"){y5.Dom.removeNode(this.controlEdit.saveButton.parentNode)}else{y5.Classes.add(this.controlEdit.saveButton,"g-hidden")}y5.Classes.remove(y5.Dom.getAncestorOrSelf(this.control,"*","b-profile-section-holster"),"b-profile-section-holster-edit");this.control.className=this.prevClassName;getById(this.contentNodeId).className="profile-content";if(a){this.container_view.innerHTML=a}this.container_view.style.display="block";this.controlEdit.saveButton.disabled=true},init:function(){this.categoryName=this.control.getElementsByTagName("input")[0].value;this.contentNodeId=this.control.getElementsByTagName("fieldset")[0].id="id-category-"+this.categoryName.toLowerCase();this.headerId=this.control.getElementsByTagName("h3")[0].id="header-"+this.contentNodeId;var c=getById(this.headerId).getElementsByTagName("a");if(c){var d=this;function a(e){y5.Events.create("mouseover",function(f){d.selectControl(f)},e,true);y5.Events.create("mouseout",function(f){d.unselectControl(f)},e,true);y5.Events.create("click",function(f){if(!d.controlEdit||d.controlEdit.control.id=="id-category-special"){d.editCategory(f)}else{d.switchToProfileEdit();y5.Classes.add(getById(d.contentNodeId),"edit-mode");d.saveControlEditElements();y5.Classes.remove(d.controlEdit.saveButton,"g-hidden");d.controlEdit.resizeAutoareas();f.preventDefault()}},e,true)}for(var b=0;b<c.length;b++){a(c.item(b))}}},switchToProfileEdit:function(){this.prevClassName=this.control.className;y5.Classes.remove(this.control,"b-profile-view c-profile-view");var a=this.categoryName.toLowerCase();var b="Friends-c-ProfileBlock c-profile-edit b-profile-edit b-profile-edit-active g-line b-profile-edit-"+a+" y5-friendsprofile-"+a;y5.Classes.add(this.control,b);y5.Classes.add(y5.Dom.getAncestorOrSelf(this.control,"*","b-profile-section-holster"),"b-profile-section-holster-edit");y5.Classes.add(getById(this.headerId),"g-hidden");y5.Classes.add(getById(this.contentNodeId),"edit-mode");if(this.categoryName=="Special"){y5.Classes.remove(this.control.parentNode.parentNode,"special")}this.container_edit.style.display="block";this.container_view.style.display="none"}};y5.require(["Events","Ajax","AjaxJS","Dom","cssQuery","Components","Classes"],function(){y5.loaded("{Friends}.ProfileView")});Friends.PseudoWidgetControl=function(){if(arguments.length>0){var a=new Friends.PseudoWidgetControl();a.init.apply(a,arguments);return a}};Friends.PseudoWidgetControl.prototype={init:function(a,b){this.control=a;this.btn_update=null;this.ajaxMethod_get=(b.ajaxMethod_get.indexOf("/")===-1?"ajax/":"")+b.ajaxMethod_get;this.ajaxMethod_post="ajax/"+b.ajaxMethod_post;this.ajaxParamName=b.ajaxParamName;if(b.dont_update){this.show(this.control.innerHTML)}else{this.update()}},enliveReloadLinks:function(){y5.cssQuery("a.js-pseudowidget-reload",this.control).forEach(function(a){this.createNavigationLink(a)},this)},createNavigationLink:function(a){y5.Events.observe("click",function(){var b=a.onclick();this.update(null,b.href)},a,true,this)},update:function(g,d){var i,h=this,c;if(!this.btn_update){d=d||friendsURL(this.ajaxMethod_get);i="GET"}else{g.preventDefault();g.stopPropagation();var a=this.btn_update.onclick();if(a){c=y5.Elements.createFromHTML('<div class="loading">&#160;</div>');y5.Dom.insertBefore(c,this.btn_update);d=friendsURL(this.ajaxMethod_post,this.ajaxParamName+"="+a);i="POST"}else{return false}}function b(e){y5.Dom.removeNode(c);y5.Classes.add(this.control,"g-hidden");y5.Events.notify("y5:widget:responseError",this.control,true)}var f=new y5.Request.XML(d,{callbackContext:this,method:i});f.onload=this.responseOK;f.onerror=b;f.send()},responseOK:function(a){if(!a.responseText){y5.Classes.add(this.control,"g-hidden")}this.show(a.responseText);y5.Events.notify("y5:widget:responseOK",this.control,true);ya.queue.exec("onload",this.control);ya.queue.exec("moods",this.control)},show:function(a){this.control.innerHTML=a;y5.Events.notify("y5:widget:html",this.control,true);y5.Components.init(this.control);this.enliveReloadLinks();this.btn_update=y5.Dom.getDescendant(this.control,"a","update");if(!this.btn_update){return}new y5.AEventListener("click",this.update,this.btn_update,true,this)}};if(y5.is_opera){Friends.PseudoWidgetControl.showOpera=Friends.PseudoWidgetControl.show;Friends.PseudoWidgetControl.show=function(a){this.control.innerHTML="";y5.Utils.setTimeout(function(){this.showOpera(a)},1,this)}}y5.require(["Ajax","AjaxObject","Dom","Events","Elements","Utils","Classes","Fx"],function(){y5.loaded("{Friends}.PseudoWidgetControl")});y5.require(["Fx","{Friends}.CommonConstructor"],function(){var a=Friends.CommonConstructor(Friends.BasicControl);a.prototype.init=function(c,d){var b=this;this.control=c;this.params=d;this.host_id=this.params.host_id||"host_id";this.common_link_selectors=[".js-widget-navigation a","div.b-pager a"];if(this.params.link_selectors){this.common_link_selectors=this.common_link_selectors.concat(this.params.link_selectors)}this.onInit();if(this.params.hot_load){this.loadWidget(this.params.src,{},{no_fader:true})}else{this.onLoadHandler()}};a.prototype.onInit=function(){};a.prototype.onLoadHandler=function(){};a.prototype.modeLoading=function(c){this.mode="loading";if(c){jQuery(this.control).find(".b-viewport-loading").remove()}else{var b=$('<div class="b-viewport-loading b-post"><span class="b-candy_state_on">обновление...</span></div>');b.css({height:$(this.control).height()});jQuery(this.control).prepend(b)}};a.prototype._addParams=function(k,e){var d=new (y5.URL)(location.href),h={},g,c;for(g=1;g<e.length;g++){if(e[g] instanceof Array){for(c=0;c<e[g].length;c++){if(typeof d.getParam(e[g][c])!=="object"){h[e[g][c]]=d.getParam(e[g][c])}}}else{for(c in e[g]){if(typeof e[g][c]!=="function"&&typeof e[g][c]!=="object"){h[c]=e[g][c]}}}}var b=new y5.URL(k);for(c in b.Query){if(!(c in h)){h[c]=b.Query[c]}}var f=(new (y5.URL)(b.Path)).addParams(h).toString();return f};a.prototype.loadWidget=function(e,d,b){b=b||{};this.modeLoading(b.no_fader);d=this.makeParams(d);e=this._addParams(e,[e,d]);var c=new y5.Request.XML(e,{callbackContext:this});c.onload=function(f){this.loadWidgetHandler(f)};if(typeof this.server==="object"&&typeof this.server.abort==="function"){this.server.abort()}c.send();this.server=c};a.prototype.makeParams=function(c){var b=c;if(typeof b!=="object"){b={}}if(!(this.host_id in b)){b[this.host_id]=g_globals.current_location.source.id}return b};a.prototype.enliveCommonNavigation=function(){this.common_link_selectors.forEach(function(b){y5.cssQuery(b,this.control).forEach(function(c){this.createNavigationLink(c)},this)},this)};a.prototype.redrawHTML=function(b){var c=this;$(this.control).html(b);y5.Components.init(this.control);ya.queue.exec("onload",this.control);this.enliveCommonNavigation()};a.prototype.loadWidgetHandler=function(b){var c=b.responseText;this.redrawHTML(c);this.onLoadHandler()};a.prototype.parseGetQuery=function(b){var d={};var c=new y5.URL(b);c.queryKeys().forEach(function(e){d[e]=c.getParam(e)});return d};a.prototype.createNavigationLink=function(c){var b=this;var d=function(g){g.stopPropagation();g.preventDefault();var f=c.getAttribute("href");var h=b.parseGetQuery(f);b.loadWidget(b.params.src,h)};$(c).unbind("click.getWidgetByClick").bind("click.getWidgetByClick",d)};Friends.WidgetLoader=a;y5.loaded("{Friends}.WidgetLoader")});Friends.Tips=function(a,b){this.control=a;this.__listeners=[];this.init(a,b)};Friends.Tips.prototype={init:function(a,b){this.table=y5.Dom.getAncestor(this.control,"table","b-tips");this.submitPseudoBtn=y5.Dom.getDescendant(this.control,"a","update");this.__listeners.push(new y5.AEventListener("click",this.onRequest,this.submitPseudoBtn,true,this))},onRequest:function(c){c.preventDefault();var b=new y5.Request.Form(this.control.action);var a=this;b.onload=function(d){y5.Classes.add(a.table,"g-hidden")};b.onerror=b.onload;b.send(this.control)},dectruct:function(){var b,a;for(b=0,a=this.__listeners.length;b<a;b++){this.__listeners[b].remove()}}};y5.require(["Dom","Events","Request.Form"],function(){y5.loaded("{Friends}.Tips")});Friends.Statface=function(b,c){this.control=b;this.init(b,c);var a=y5.Dom.getDescendant(this.control,"*");y5.Events.observe("y5:widget:html",function(){this.init(this.control,c)},a,true,this)};Friends.Statface.prototype={init:function(o,f){var a=[],p,e,d,b,g,h;for(p=0,e=f.length;p<e;p++){var c=f[p];if(y5.Types.array(c.className)){for(d=0,b=c.className.length;d<b;d++){a=y5.Dom.getDescendants(this.control,"a",c.className[d])}}else{a=y5.Dom.getDescendants(this.control,"a",c.className)}for(h=0,g=a.length;h<g;h++){this.addOnclickCounter(a[h],c)}}},addOnclickCounter:function(a,b){b.path=b.path||"";y5.Events.observe("click",function(){Lego.cp(b.pid,b.cid,b.path,this.control)},a,true)}};y5.require(["Dom","URL","Events"],function(){y5.loaded("{Friends}.Statface")});(function(a){var b=a.template;a.namespace("templates.widgets");a.templates.widgets={layout:b('<div class="b-yaru-widget"><div class="b-yaru-widget__title"><div class="b-yaru-widget__title-link">{title}{(titleButton)( <span class="b-yaru-widget__title-button"><a href="{titleButtonLink}" class="b-link">{titleButton}</a></span>)}</div></div><div class="b-yaru-widget__body"><div class="b-yaru-widget-line"></div></div><div class="b-yaru-widget__actions"><div class="b-menu b-menu_layout_horiz-complex"><table cellpadding="0" class="b-menu__layout"><tr><td class="b-menu__layout-cell b-menu__layout-cell_first">{(moreAsUpdate)[<div class="b-menu__item"><span class="b-pseudo-link update">я в курсе</span></div>]}</td><td class="b-menu__layout-gap"></td><td class="b-menu__layout-cell b-menu_layout__layout-cell_position_last">{(allItems)({(moreAsUpdate)(<div class="b-menu__item"><a class="b-pseudo-link update">{allItems}</a></div>)[<div class="b-menu__item"><a class="b-link more" href="{moreLink}">{allItems}</a></div>]})}</td></tr></table></div></div></div>'),viewportLayout:b('<table class="b-post-filter b-post-filter_type_outdoor"><tr><td class="b-post-filter__title">{(titleButton)(<a class="b-form-button b-form-button_theme_grey-22 b-form-button_height_22 b-form-button_valign_middle i-bem b-form-button_js_inited" href="{titleButtonLink}"><i class="b-form-button__left"></i><span class="b-form-button__content"><span class="b-form-button__text">{titleButton}</span></span><i class="b-form-button__click"></i></a>)}</td><td class="b-post-filter__selector"></td></tr></table></div><div class="b-yaru-widget"><div class="b-yaru-widget__body"><div class="b-yaru-widget-line"></div></div><div class="b-yaru-widget__actions"><div class="b-menu b-menu_layout_horiz-complex"><table cellpadding="0" class="b-menu__layout"><tr><td class="b-menu__layout-cell b-menu__layout-cell_first"><div class="b-menu__item"><span class="b-pseudo-link update">показать ещё</span></div></td><td class="b-menu__layout-gap"></td><td class="b-menu__layout-cell b-menu__layout-cell_position_last"><div class="b-menu__item"><a href="{moreLink}" class="b-link all">{allItems}</a></div></td></tr></table></div></div></div>'),group:b('<div class="b-yaru-widget-entry"><div class="b-yaru-widget-day__title">{timestamp}</div>{items}</div>'),item:b('<div class="b-yaru-widget-answer">{user}&nbsp;&mdash; <span class="b-yaru-widget-answer__answer"><a class="b-link" href="{url}">{title}</a></span></div>'),likeItem:b('<div class="b-yaru-widget-answer">{user}&nbsp;{appreciate} запись <span class="b-yaru-widget-answer__answer"><a class="b-link" href="{url}">{title}</a></span></div>'),recommendItem:b('<div class="b-usercard b-usercard_type_adding b-recommend-item"><span class="b-usercard__i">{user}<div class="b-usercard__adding b-make-friend"><a href="#" class="b-pseudo-link" onclick="return { uid: \'{uid}\', id: \'{id}\'}">{actionTitle}</a></div></span></div>'),replyItem:b('<div class="b-yaru-widget-answer">{user}{separator} <span class="b-yaru-widget-answer__answer"><a class="b-link" href="{url}">{title}</a></span></div>'),photoItem:b('<div class="b-yaru-widget-photo__item"><a href="{url}" class="b-link"><img alt="{alt}" title="{alt}" src="{src}"></a></div>'),videoItem:b('<div class="b-yaru-widget-media__item"><div class="b-yaru-widget-media__head"><img alt="" src="//yandex.st/lego/_/La6qi18Z8LwgnZdsAr1qy1GwCwo.gif" class="b-ico">{duration}</div><a href="{url}" class="b-link"><img alt="" src="{src}"></a><div class="b-yaru-widget-media__desc"><a href="{url}" class="b-link">{title}</a></div></div>'),videoContainer:b('<div class="b-yaru-widget-media b-yaru-widget-media_type_video">{items}</div>'),albumsContainer:b('<div class="b-yaru-widget-photo b-yaru-widget-photo_type_album">{items}</div>'),videoCollection:a.template('<div class="b-yaru-widget-photo b-yaru-widget-photo_type_collection">{content}</div>',{content:""}),videoCollectionItem:b('<div class="b-yaru-widget-photo__item"><div class="b-yaru-widget-photo__thumb"><a class="b-link" href="{ url }"><span style="background-image:url({ cover });" class="b-ico-bg"><span class="b-ico-bg__center"></span></span></a></div><div class="b-yaru-widget-photo__title"><a class="b-link b-link_type_album-name" href="{url}">{name}</a></div><div class="b-yaru-widget-photo__comment">{count} видео</div></div>'),albumItem:b('<div class="b-yaru-widget-photo__item"><div class="b-yaru-widget-photo__thumb"><a href="{url}" class="b-link"><img alt="{title}" title="{title}" src="{src}" class="b-ico"></a></div><div class="b-yaru-widget-photo__title"><a href="{url}" class="b-link b-link_type_album-name">{title}</a></div><div class="b-yaru-widget-photo__comment">{count}</div></div>'),avatar:b("{user}"),holidayItem:b('<div class="b-yaru-widget-holiday"><div class="b-yaru-widget-holiday__title">{title}</div><div class="b-yaru-widget-holiday__celebrate"><a href="{url}" class="b-link">поздравить друзей</a></div></div>'),linkItem:b('<div class="b-yaru-widget-entry g-line"><div class="b-yaru-widget-entry__item"><div class="b-yaru-widget-entry__title"><a href="{url}" class="b-link">{title}</a></div><div class="b-yaru-widget-entry__info">{info}</div></div></div>'),wishlistItem:b('<div class="b-yaru-widget-entry g-line"><div class="b-yaru-widget-entry__item"><div class="b-yaru-widget-entry__img"><a href="{url}" class="b-link"><img alt="{title}" src="{src}" class="b-ico"></a></div><div class="b-yaru-widget-entry__title"><a href="{url}" class="b-link">{title}</a></div><div class="b-yaru-widget-entry__info">{info}</div></div></div>'),wishlistPromisedItem:b('<div class="b-yaru-widget-entry g-line"><div class="b-yaru-widget-entry__item"><div class="b-yaru-widget-entry__img"><a href="{url}" class="b-link"><img alt="{info}" src="{src}" class="b-ico"></a></div><div class="b-yaru-widget-entry__title"><a href="{url}" class="b-link">{title}</a></div><div class="b-yaru-widget-entry__info">{info}</div><div class="b-yaru-widget-entry__cancel" onclick="return {param}"><span class="b-pseudo-link">отменить</span></div></div></div>'),ratingInfo:b('<div class="b-yaru-widget-entry__info_type_rating"><a href="{url}" class="b-link"><img alt="Рейтинг блогов" title="" src="{src}" class="b-ico"></a></div>'),onload:b('<div class="loading">&nbsp;</div>'),empty:b(""),textResponse:b("{page}")}})(ya);(function(a,c){var b=function(d,e){this.$target=c(d);this.data=e;if(typeof d.onclick==="function"){c.extend(this.data,d.onclick())}this.ids="";this.data.layoutTemplateName=this.data.layoutTemplateName||"layout";this.data.groupTemplateName=this.data.groupTemplateName||"group";this.data.itemTemplateName=this.data.itemTemplateName||"item";this.data.containerTemplate=this.data.containerTemplate||a.template("{content}",{content:""});this.data.data=this.data.data||{};this.bindEvents=this.data.bindEvents?this.data.bindEvents:null;if(this.data.updateCallback){this.updateCallback=this.data.updateCallback}this.init()};b.prototype={selectors:{content:".b-yaru-widget-line",title:".b-yaru-widget__title-link"},destroy:function(){this.$target.html("");this.$target.yhide()},updateCallback:function(e){var d="",f,j,h=e.data,g=[];if(e.title){this.$title.html(e.title)}this.ids="";if(!h.length){if(this.data.emptyTemplateName){this.$inner.html(a.templates.widgets[this.data.emptyTemplateName](e));this.$target.yshow()}else{this.$target.yhide()}}else{for(f=0,j=h.length;f<j;f++){g.push(h[f].id)}if(this.data.groupBy){h=this.groupBy(this.data.groupBy,h);d=a.drawArray(h,"widgets",this.data.groupTemplateName)}else{d=a.drawArray(h,"widgets",this.data.itemTemplateName)}this.ids=g.join(",");this.$inner.html(this.data.containerTemplate({content:d}));this.$target.yshow()}if(this.bindEvents instanceof Function){this.bindEvents(e)}},groupBy:function(k,h){var e=[],g,l,f="",j,d={};for(g=0,l=h.length;g<l;g++){f=h[g][k];if(!d[f]){d[f]=[]}d[f].push(h[g])}for(f in d){j={};j["items@"+this.data.itemTemplateName]=d[f];j[k]=f;e.push(j)}return e},update:function(d){this.updateCallback(d)},drawWidget:function(){var d=this.$target;d.html(a.templates.widgets[this.data.layoutTemplateName](this.data));this.$inner=d.find(this.selectors.content);this.$title=d.find(this.selectors.title)},init:function(){var d=this;c.ajax({url:this.data.ajaxMethod_get,type:"get",data:this.data.data,dataType:"jsonp",success:function(e){if(e.status==="Success"){d.drawWidget();d.update(e);a.queue.exec("onload",d.$target[0])}}})}};a.namespace("controls");a.controls.JsonpWidget=b;a.controls.JsonpWidget.hideLinks=function(e){var d=this.$target,f=g_source?g_source.id:-1,g=e.data;d.find(".update").yhide();if(!g||!g.length){if(!e.page||f!==this.data.data.host_id){d.yhide()}else{d.find(".more").yhide()}}}})(ya,jQuery);(function(a,b){a.namespace("controls");var c=a.controls.DropdownFilters={};c.selectors={checkAll:".b-check-all",uncheckAll:".b-clear-all",form:"#filters",list:".b-menu",filterCheckox:":checkbox.filter"};c.switchTrigger=function(d){b(this).parents(c.selectors.list).find(c.selectors.filterCheckox).each(function(e,f){f.checked=d})};c.handlers={checkAll:function(d){c.switchTrigger.call(this,true)},uncheckAll:function(d){c.switchTrigger.call(this,false)},submit:function(d){b(this).find(".b-dropdown__list_clone").remove();if(this.elements.remember&&this.elements.remember.checked){c.handlers.filterAndSave.call(this,d)}else{c.handlers.filterOnce.call(this,d)}},filterAndSave:function(f){var d=this;d.action=ya.url("options_do_friendsfeed.xml")},filterOnce:function(n){var d=this,m=[],o=window.location.pathname;for(var j=0,g=d.elements.length;j<g;j++){var f=d.elements[j];if(f.name==="posttypes"&&f.checked){m.push(f.value)}else{if(f.name==="retpath"){o=f.value.replace(/(\?|&)(posttypes|sourcesfilter)=[^&]*/ig,"")}}}var k=b(d).find(':checkbox.source[checked=true][name!="read-self"]'),h="mine";if(k.length){h=(k.length==1)?k[0].value:"all"}n.preventDefault();n.stopPropagation();window.location=o+(o.indexOf("?")!==-1?"&":"?")+"posttypes="+m.join()+"&sourcesfilter="+h}};c.init=function(){ya.log("DropdownFilters: init");var d=function(){var f=c.selectors;var e=c.handlers;ya.log("DropdownFilters: attach events");b(f.checkAll).live("click",e.checkAll);b(f.uncheckAll).live("click",e.uncheckAll);b(f.form).live("submit",e.submit)};d()};c.init()})(window.ya,window.jQuery);(function(a,c){var b=function(d){var e=this;this.popup=new a.Popup({content:a.templates.popupLoader()});c(d).live("click",function(f){var g;if(e.targetElement===f.target&&!e.popup.hidden){return}e.targetElement=f.target;g=a.getParamsFromAttr(f.target,"onclick")||{};e.activatePopup(f.target);if(g.url){e.loadFromURL(g.url)}else{e.loadFromHTML(c(g.contentSelector,f.target).html())}})};b.prototype={activatePopup:function(d){this.popup.bindTo(d);this.popup.show()},loadFromURL:function(e){var d=this;this.popup.update(a.templates.popupLoader());c.ajax({url:e,success:function(f){d.callbackOK(f)},error:function(f){d.callbackNOK(f)}})},loadFromHTML:function(d){this.popup.update(d)},callbackOK:function(d){this.popup.update(d)},callbackNOK:function(){a.log("ошибка при загрузке содержимого loadablePopup");this.popup.hide()}};a.instances.push(new b(".js-filter"))})(ya,jQuery);(function(a){a.texts={"захотел":{one:"захотел",one:"захотела",one:"захотело"},"призвал":{one:"призвал",one:"призвала",one:"призвало"},"удалил":{one:"удалил",one:"удалила",one:"удалило"},"активный участник":{one:"активный участник",one:"активная участница",one:"активный участник"},"модель":{one:"модель",some:"моделей",many:"модели",zero:"нет моделей"},"желание":{one:"желание",some:"желаний",many:"желания",zero:"нет желаний"},"ответ":{one:"ответ",some:"ответов",many:"ответа",zero:"нет ответов"},"клуб":{one:"клуб",some:"клубов",many:"клуба",zero:"нет клубов"},"комментарий":{one:"комментарий",some:"комментариев",many:"комментария",zero:"нет комментариев"},"запись":{one:"запись",some:"записей",many:"записи",zero:"нет записей"},"модерационное уведомление":{one:"уведомление из клубов",some:"уведомлений из клубов",many:"уведомления из клубов",zero:"нет уведомлений из клубов"},"новая запись":{one:"новой записи",some:"новых записей",many:"новых записей",zero:"нет новых записей"},"год":{one:"год",some:"лет",many:"года",zero:"не указан"},"взаимный":{one:"взаимный",some:"взаимных",many:"взаимных",zero:"взаимных"},"друг":{one:"друг",one:"подруга",one:"друг",one:"друг",some:"друзей",many:"друга",zero:"нет друзей"},"модератор":{one:"модератор",some:"модераторов",many:"модератора",zero:"нет модераторов"},"участник":{one:"участник",some:"участников",many:"участника",zero:"нет участников"},"пользователь":{one:"пользователь",some:"пользователей",many:"пользователя",zero:"нет пользователей"},"друга":{one:"друга",one:"подругу",one:"друга",some:"друзей",many:"друга"},"ним":{one:"ним",one:"ней",one:"ним",some:"ними",many:"ними"},"другом":{one:"другом",some:"друзьями",many:"друзьями",zero:"нет друзей"},"человеком":{one:"человеком",some:"людьми",many:"людьми",zero:""},"человек":{one:"человек",some:"человек",many:"человека",zero:"нет никого"},"человека":{one:"человека",some:"человек",many:"человека",zero:"нет никого"},"человека2":{one:"человека",some:"человек",many:"человек",zero:"нет никого"},"раз":{one:"раз",some:"раз",many:"раза",zero:"поровну"},"автора":{one:"автора",some:"авторов",many:"авторов",zero:"нет авторов"},"метода":{one:"метода",some:"методов",many:"методов",zero:"методов"},"Дневник":{one:"Дневник",some:"Дневники",many:"Дневники",zero:"Дневников"},"приглашение":{one:"приглашение",some:"приглашений",many:"приглашения",zero:"0 приглашений"},"фотка":{one:"фотка",some:"фоток",many:"фотки",zero:"нет фоток"},"фотку":{one:"фотку",some:"фотки",many:"фотки",zero:"фотки"},"фотки":{one:"фотку",some:"фоток",many:"фотки",zero:"нет фоток"},"фото":{one:"фото",some:"фото",many:"фото",zero:"нет фото"},"отзыв":{one:"отзыв",some:"отзывов",many:"отзыва",zero:"0 отзывов"},"альбом":{one:"альбом",some:"альбомов",many:"альбома",zero:"нет альбомов"},"ролик":{one:"ролик",some:"роликов",many:"ролика",zero:""},"коллекцию":{one:"коллекцию",some:"коллекции",many:"коллекции",zero:"-"},"он":{one:"он",one:"она",one:"оно",some:"они",many:"они"},"его":{one:"его",one:"её",one:"его",some:"их",many:"их"},"отозвался":{one:"отозвался",one:"отозвалась",one:"отозвалось",some:"отозвались",many:"отозвались"},"спросил":{one:"спросил",one:"спросила",one:"спросило",some:"спросили",many:"спросили"},"написал":{one:"написал",one:"написала",one:"написало",some:"написали",many:"написали"},"ответил":{one:"ответил",one:"ответила",one:"ответило",some:"ответили",many:"ответили"},"добавил":{one:"добавил",one:"добавила",one:"добавило",some:"добавили",many:"добавили"},"пнул":{one:"пнул",one:"пнула",one:"пнуло",some:"пнули",many:"пнули"},"сменил":{one:"сменил",one:"сменила",one:"сменило",some:"сменили",many:"сменили"},"изменил":{one:"изменил",one:"изменила",one:"изменило",some:"изменили",many:"изменили"},"пригласил":{one:"пригласил",one:"пригласила",one:"пригласило",some:"пригласили",many:"пригласили"},"рассказал":{one:"рассказал",one:"рассказала",one:"рассказало",some:"рассказали",many:"рассказали"},"обратился":{one:"обратился",one:"обратилась",one:"обратилось",some:"обратились",many:"обратились"},"опубликовал":{one:"опубликовал",one:"опубликовала",one:"опубликовало",some:"опубликовали",many:"опубликовали"},"был":{one:"был",one:"была",one:"было",some:"были",many:"были"},"играл":{one:"играл",one:"играла",one:"играло",some:"играли",many:"играли"},"поиграл":{one:"поиграл",one:"поиграла",one:"поиграло",some:"поиграли",many:"поиграли"},"поймал":{one:"поймал",one:"поймала",one:"поймало",some:"поймали",many:"поймали"},"получил":{one:"получил",one:"получила",one:"получило",some:"получили",many:"получили"},"решил":{one:"решил",one:"решила",one:"решило",some:"решили",many:"решили"},"родился":{one:"родился",one:"родилась",one:"родилось",some:"родились",many:"родились"},"собрался":{one:"собрался",one:"собралась",one:"собралось",some:"собрались",many:"собрались"},"ему":{one:"ему",one:"ей",one:"ему",some:"им",many:"им"},"подружился":{one:"подружился",one:"подружилась",one:"подружилось",some:"подружились",many:"подружились"},"проголосовал":{one:"проголосовал",one:"проголосовала",one:"проголосовало",some:"проголосовали",many:"проголосовали"},"сделал":{one:"сделал",one:"сделала",one:"сделало",some:"сделали",many:"сделали"},"сказал":{one:"сказал",one:"сказала",one:"сказало",some:"сказали",many:"сказали"},"поссорился":{one:"поссорился",one:"поссорилась",one:"поссорилось",some:"поссорились",many:"поссорились"},"поделился":{one:"поделился",one:"поделилась",one:"поделилось",some:"поделились",many:"поделились"},"загрузил":{one:"загрузил",one:"загрузила",one:"загрузило",some:"загрузили",many:"загрузили"},"вывесил":{one:"вывесил",one:"вывесила",one:"вывесило",some:"вывесили",many:"вывесили"},"зарегистрировался":{one:"зарегистрировался",one:"зарегистрировалась",one:"зарегистрировалось",some:"зарегистрировались",many:"зарегистрировались"},"нашел":{one:"нашёл",one:"нашла",one:"нашло",some:"нашли",many:"нашли"},"присоединился":{one:"присоединился",one:"присоединилась",one:"присоединилось",some:"присоединились",many:"присоединились"},"задал":{one:"задал",one:"задала",one:"задало",some:"задали",many:"задали"},"ушёл":{one:"ушёл",one:"ушла",one:"ушло",some:"ушли",many:"ушли"},"поздравил":{one:"поздравил",one:"поздравила",one:"поздравило",some:"поздравили",many:"поздравили"},"пожаловался":{one:"пожаловался",one:"пожаловалась",one:"пожаловалось",some:"пожаловались",many:"пожаловались"},"любимого":{one:"любимого",one:"любимую",one:"любимое",some:"любимых",many:"любимых",zero:""},"которого":{one:"которого",some:"которых",many:"которых",zero:""},"который":{one:"который",some:"которые",many:"которые",zero:""},"знает":{one:"знает",some:"знают",many:"знают",zero:""},"переехал":{one:"переехал",some:"переехало",many:"переехало"},"может":{one:"может",some:"могут",many:"могут",zero:""},"умеет":{one:"умеет",some:"умеют",many:"умеют",zero:""},"подружившийся":{one:"подружившийся",some:"подружившихся",many:"подружившихся",zero:""},"считает":{one:"считает",some:"считают",many:"считают",zero:""},"хочет":{one:"хочет",some:"хотят",many:"хотят",zero:""},"ваш новый друг":{one:"ваш новый друг",some:"ваши новые друзья",many:"ваши новые друзья",zero:""},"новый друг":{one:"новый друг",some:"новые друзья",many:"новые друзья",zero:""},"новый друг2":{one:"новый друг",some:"новых друзей",many:"новых друга",zero:""},"непрочитанный ответ":{one:"непрочитанный ответ",some:"непрочитанных ответов",many:"непрочитанных ответа",zero:"Нет непрочитанных ответов"},"опубликован":{one:"опубликован",some:"опубликовано",many:"опубликовано",zero:"опубликовано"},"оценил":{one:"оценил",some:"оценили",many:"оценили",zero:"оценили"},"запись будет принята":{one:"запись будет принята",some:"записей будет принято",many:"записи будут приняты",zero:"ни одной записи не будет принято"},"запись будет удалена":{one:"запись будет удалена",some:"записей будeт удалено",many:"записи будут удалены",zero:"ни одной записи не будет удалено"},"пользователь будет забанен":{one:"пользователь будет забанен",some:"пользователей будет забанено",many:"пользователи будут забанены",zero:"ни одного пользователя не будет забаненно"}}})(ya);(function(a,b){a.decline=function(d,j){var e=d||0,k=j||"",c=e%10,f=e%100,i=e!=Math.round(e),h=arguments[2]||false,g=h&&(e>0)?e+" ":"";if(k){if(e===0){g+=k.zero}else{if(i){g+=k.many}else{if((f>=5)&&(f<=20)){g+=k.some}else{if(c==1){g+=k.one}else{if(c>=2&&c<=4){g+=k.many}else{g+=k.some}}}}}}return g}})(ya,jQuery);(function(a,b){a.getTextByGender=function(e,c){var d=e||"man",f=c||null;if(d&&f){switch(d){case"man":return f;case"woman":return(f+="a");default:return(f+="о")}}else{return""}}})(ya,jQuery);jQuery(document).ready(function(){ya.queue.exec("onload");if(jQuery.browser.msie&&parseInt(jQuery.browser.version,10)>=9){y5.Notify("dom:loaded",y5,null,true)}$(".b-informer-switcher").live("click",function(a){$(this).closest(".b-important-info").find(".b-informer-block").toggleClass("g-hidden");a.preventDefault()})});
