/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  February 9th 2010 11:12:47 PM PST                            */
/*      Machine:  10.16.139.104                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/3qjara4kghyco8gg.pkg.js h:2yvppfhn                        */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/3qjara4kghyco8gg.pkg.js                                   */

if (window.CavalryLogger) { CavalryLogger.start_js(["js\/3qjara4kghyco8gg.pkg.js"]); }

function friend_source(_L0){if(typeof(_L0)=='object')_L0=_L0[0];this.bootstrap=this.bootstrap.bind(this,_L0);this.parent.construct(this);}friend_source.extend('static_source');friend_source.prototype.text_noinput=friend_source.prototype.text_placeholder=_tx("\u0417\u0430\u043f\u043e\u0447\u043d\u0435\u0442\u0435 \u0437\u0430 \u0438\u0437\u043f\u0438\u0441\u0432\u0430\u0442\u0435 \u0438\u043c\u0435");friend_source.friends={};friend_source.friends_index={};friend_source.viewer_id=0;friend_source.prototype.cache_results=true;friend_source.prototype.bootstrap=function(_L0){if(friend_source.friends[_L0]){this.values=friend_source.friends[_L0];this.index=friend_source.friends_index[_L0];this.ready();}else new AsyncRequest().setMethod('GET').setReadOnly(true).setURI('/ajax/typeahead_friends.php?'+_L0).setHandler(function(_L1){friend_source.friends[_L0]=this.values=this.filter_excluded(_L1.getPayload().friends);this.viewer_id=_L1.getPayload().viewer_id;this.build_index();friend_source.friends_index[_L0]=this.index;}.bind(this)).send();};friend_source.dirty=function(){friend_source.friends={};friend_source.friends_index={};typeaheadpro.dirty_instances();};friend_source.prototype.gen_html=function(_L0,_L1){var _L2=_L0.n||'&nbsp;';if(_L0.n===false){_L2=_tx("0 \u043f\u0440\u0438\u044f\u0442\u0435\u043b\u0438");}else if(typeof(_L0.n)=="object"){var _L3=[];for(var k in _L0.n)_L3.push(_L0.n[k]);if(_L3.length>3){_L2=_tx("{name1}, {name2}, {count} \u0434\u0440\u0443\u0433\u0438",{name1:_L3[0],name2:_L3[1],count:_L3.length-2});}else if(_L3.length){_L2=_L3.join(', ');}else _L2=_tx("0 \u043f\u0440\u0438\u044f\u0442\u0435\u043b\u0438");}return ['<div>',typeahead_source.highlight_found(_L0.t,_L1),'</div><div><small>',_L2,'</small></div>'].join('');};friend_source.prototype.search_value=function(_L0){if(_L0=='\x5e\x5f\x5e')return [{t:_L0,n:'\x6b\x65\x6b\x65',i:10,it:'http://static.ak.facebook.com/pics/t_default.jpg'}];return this.parent.search_value(_L0);};friend_source.prototype._sort_text_obj=function(a,b){if(a.e&&!b.e)return 1;if(!a.e&&b.e)return -1;if(this.viewer_id==a.i)return -1;if(this.viewer_id==b.i)return 1;return a.t.localeCompare(b.t);};
function token(obj,_L1,_L2){if(obj.is&&(_L1.count_names(obj.is)>_L1.max_selections)){new ContextualDialog().setContext(_L1.obj).setTitle(_tx("\u041d\u0435 \u043c\u043e\u0436\u0435 \u0434\u0430 \u0441\u0435 \u0434\u043e\u0431\u0430\u0432\u0438 \u0441\u043f\u0438\u0441\u044a\u043a.")).setBody(_tx("\u041c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u0438\u0437\u043f\u0440\u0430\u0442\u0438\u0442\u0435 \u0441\u044a\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0434\u043e \u043d\u0430\u0439-\u043c\u043d\u043e\u0433\u043e 20 \u0447\u043e\u0432\u0435\u043a\u0430 \u043d\u0430\u0432\u0435\u0434\u043d\u044a\u0436.")).show().setAutohide(1500);return null;}this.tokenizer=_L1;this.element=document.createElement('a');CSS.setClass(this.element,'token'+('class' in obj?' '+obj['class']:''));this.element.href='#';this.element.tabIndex=-1;this.element.onclick=function(_L3){return this._onclick(_L3?_L3:window.event);}.bind(this);this.element.onmousedown=function(_L3){(_L3?_L3:window.event).cancelBubble=true;return false;};this.render_obj(obj);this.obj=obj;this.element.token=this;this.tokenizer.hide_inline_placeholder();_L2?this.tokenizer.obj.insertBefore(this.element,_L2):this.tokenizer.obj.appendChild(this.element);}token.prototype.render_obj=function(obj){var _L1='';if(obj.np){var _L2='';}else var _L2='fb_protected="true" ';var _L3='class="fb_token_hidden_input" ';if(obj.e){_L1=['<input type="hidden" ',_L3,_L2,'name="emails[]" value="',obj.e,'" />'].join('');}else if(obj.i||obj.i===0){_L1=['<input type="hidden" ',_L3,_L2,'name="',this.tokenizer.obj.name,'[]" value="',obj.i,'" />'].join('');}else if(obj.is){for(var i=0,il=obj.is.length;i<il;i++)_L1+=['<input type="hidden" ',_L3,_L2,'name="',this.tokenizer.obj.name,'[]" value="',obj.is[i],'" />'].join('');this.explodable=true;this.n=obj.n;}this.text=obj.t;this.element.innerHTML=['<span><span><span><span>',_L1,htmlspecialchars(obj.t),'<span onclick="this.parentNode.parentNode.parentNode.parentNode.parentNode.token.remove(true); event.cancelBubble=true; return false;" ','onmouseover="CSS.setClass(this, \'x_hover\');" onmouseout="CSS.setClass(this, \'x\');" class="x">&nbsp;</span>','</span></span></span></span>'].join('');this.obj=obj;};token.prototype._onclick=function(_L0){var _L1=(new Date()).getTime();if(this.explodable&&this.tokenizer.last_select_time&&(_L1-this.tokenizer.last_select_time<1400)){var _L2=this.n;this.remove();var _L3=this.tokenizer.obj.getElementsByTagName('input');var _L4={};for(var i=0;i<_L3.length;++i)if(_L3[i].name==this.tokenizer.obj.id+'[]')_L4[_L3[i].value]=true;for(var id in _L2)if(!_L4[id])new token({'t':_L2[id],'i':id},this.tokenizer);}else this.select();this.tokenizer.last_select_time=_L1;_L0.cancelBubble=true;return false;};token.prototype.select=function(_L0){if(this.tokenizer.selected_token&&!_L0)this.tokenizer.selected_token.deselect();CSS.setClass(this.element,trim(this.element.className.replace('token_selected',''))+' token_selected');this.tokenizer.tab_stop_ignore_focus=true;if(this.tokenizer.tab_stop.disabled)this.tokenizer.tab_stop.disabled=false;this.tokenizer.tab_stop.focus();this.tokenizer.selected_token=this;if(_L0!==true){setTimeout(function(){this.select(true);}.bind(this),0);}else setTimeout(function(){this.tab_stop_ignore_focus=false;}.bind(this.tokenizer),0);};token.prototype.remove=function(_L0){this.element.parentNode.removeChild(this.element);this.element.token=null;this.tokenizer.selected_token=null;if(_L0)this.tokenizer._onmousedown();if(this.obj)this.tokenizer._ontokenremoved(this.obj);};token.prototype.deselect=function(){CSS.setClass(this.element,trim(this.element.className.replace('token_selected','')));this.tokenizer.selected_token=null;};
function tokenizer_input(_L0,_L1){if(!tokenizer_input.hacks){tokenizer_input.should_use_borderless_hack=ua.safari();tokenizer_input.should_use_shadow_hack=ua.ie()<8||ua.opera();tokenizer_input.hacks=true;}this.tokenizer=_L0;_L0.tokenizer_input=this;this.obj=document.createElement('input');this.obj.input=this;this.obj.tabIndex=-1;this.obj.size=1;this.obj.onmousedown=function(_L3){(_L3?_L3:window.event).cancelBubble=true;}.bind(this);this.shadow=document.createElement('span');CSS.setClass(this.shadow,'tokenizer_input_shadow');this.element=document.createElement('div');CSS.setClass(this.element,'tokenizer_input'+(tokenizer_input.should_use_borderless_hack?' tokenizer_input_borderless':''));this.element.appendChild(document.createElement('div'));this.element.firstChild.appendChild(this.obj);var _L2=(tokenizer_input.should_use_shadow_hack?DOM.getRootElement():this.element.firstChild);_L2.appendChild(this.shadow);_L1?_L0.obj.insertBefore(this.element,_L1):_L0.obj.appendChild(this.element);this.tokenizer.tab_stop.disabled=true;this.update_shadow();this.update_shadow=this.update_shadow.bind(this);this.tokenizer.inputs.push(this);this.parent.construct(this,this.obj,this.tokenizer.typeahead_source);if(this.focused){this.focus();this.obj.select();}copy_properties(this,_L0.properties||{});setInterval(this.update_shadow.bind(this),100);}tokenizer_input.extend('typeaheadpro');tokenizer_input.prototype.gen_nomatch=tokenizer_input.prototype.gen_loading=tokenizer_input.prototype.gen_placeholder=tokenizer_input.prototype.gen_noinput='';tokenizer_input.prototype.max_display=8;tokenizer_input.prototype.setup_anchor=function(){return this.tokenizer.obj;};tokenizer_input.prototype.update_shadow=function(){if(this.obj===null)return;try{var val=this.obj.value;}catch(e){return;}if(this.shadow_input!=val){this.shadow.innerHTML=htmlspecialchars((this.shadow_input=val)+'^_^');if(tokenizer_input.should_use_shadow_hack){this.obj.style.width=this.shadow.offsetWidth+'px';this.obj.value=val;}}};tokenizer_input.prototype._onblur=function(e){if(this.parent._onblur(e)===false)return false;this.tokenizer._onblur(e);if(this.changed&&!this.interactive){this.dirty_results();this.changed=false;return;}if(this.changed||this.interactive)this.select_suggestion(this.selectedindex);setTimeout(function(){this.disabled=false;}.bind(this.tokenizer.tab_stop),1000);tokenizerToDestroy=this;setTimeout(function(){tokenizerToDestroy.destroy();},0);};tokenizer_input.prototype._onfocus=function(){this.tokenizer.tab_stop.disabled=true;this.parent._onfocus();return true;};tokenizer_input.prototype._onkeydown=function(_L0){switch(_L0.keyCode){case 13:break;case 37:case 8:if(this.get_selection_start()!=0||this.obj.value!='')break;var _L1=this.element.previousSibling;if(_L1&&_L1.token)setTimeout(_L1.token.select.bind(_L1.token),0);break;case 39:case 46:if(this.get_selection_start()!=this.obj.value.length)break;var _L2=this.element.nextSibling;if(_L2&&_L2.token)setTimeout(_L2.token.select.bind(_L2.token),0);break;case 188:this._onkeydown({keyCode:13});return false;case 9:if(this.obj.value){this.advance_focus();this._onkeydown({keyCode:13});return false;}else if(!_L0.shiftKey){this.advance_focus();this.parent._onkeydown(_L0);return false;}break;}return this.parent._onkeydown(_L0);};tokenizer_input.prototype._onkeypress=function(_L0){switch(_L0.keyCode){case 9:return false;}setTimeout(this.update_shadow,0);return this.parent._onkeypress(_L0);};tokenizer_input.prototype.select_suggestion=function(_L0){if(this.suggestions&&_L0>=0&&this.suggestions.length>_L0){var _L1=this.tokenizer.obj.getElementsByTagName('input');var id=this.suggestions[_L0].i;for(i=0;i<_L1.length;i++)if(_L1[i].name==this.tokenizer.obj.id+'[]'&&_L1[i].value==id)return false;}return this.parent.select_suggestion(_L0);};tokenizer_input.prototype.get_selection_start=function(){if(this.obj.selectionStart!=undefined){return this.obj.selectionStart;}else return Math.abs(document.selection.createRange().moveStart('character',-1024));};tokenizer_input.prototype.onselect=function(obj){if(this.get_value()==''&&this.last_key==13){return this.tokenizer.onsubmit();}else if(obj){var _L1=this.tokenizer.obj.getElementsByTagName('input');for(i=0;i<_L1.length;i++)if(_L1[i].name==this.tokenizer.obj.id+'[]'&&_L1[i].value==obj.i)return false;new token(obj,this.tokenizer,this.element);this.clear();if(this.tokenizer.max_selections<=this.tokenizer.count_names())this.destroy.bind(this).defer();this.tokenizer._ontokenadded(obj);}this.tokenizer.typeahead_source.onselect_not_found.call(this);return false;};tokenizer_input.prototype._onsubmit=function(){return false;};tokenizer_input.prototype.capture_submit=function(){return false;};tokenizer_input.prototype.clear=function(){this.parent.clear();this.update_shadow();};tokenizer_input.prototype.destroy=function(){this.parent.destroy();if(this.shadow&&tokenizer_input.should_use_shadow_hack)DOM.remove(this.shadow);if(this.element)DOM.remove(this.element);if(this.tokenizer){var _L0=this.tokenizer.inputs.indexOf(this);if(_L0!=-1)this.tokenizer.inputs.splice(_L0,1);}this.tokenizer=this.element=this.shadow=null;return null;};
function tokenizer(obj,_L1,_L2,_L3,_L4){if(ua.safari()<500){tokenizer.valid_arrow_count=0;tokenizer.valid_arrow_event=function(){return tokenizer.valid_arrow_count++%2==0;};}else tokenizer.valid_arrow_event=function(){return true;};this.obj=obj;this.obj.tokenizer=this;this.obj.name=obj.id;this.typeahead_source=_L1;while(!/\btokenizer\b/.test(this.obj.className))this.obj=this.obj.parentNode;this.tab_stop=this.obj.getElementsByTagName('input')[0];this.inputs=[];this.tokenizer_inputs=[];this.obj.onmousedown=function(_L5){return this._onmousedown(_L5?_L5:window.event);}.bind(this);this.tab_stop.onfocus=function(_L5){return this._onfocus(_L5?_L5:window.event);}.bind(this);this.tab_stop.onblur=function(_L5){return this.tab_stop_onblur(_L5?_L5:window.event);}.bind(this);this.tab_stop.onkeydown=function(_L5){return this.tab_stop_onkeydown(_L5?_L5:window.event);}.bind(this);if(!_L2&&elementY(this.obj)>0&&this.obj.offsetWidth)this._onfocus();this.max_selections=_L3;copy_properties(this,_L4||{});this.properties=_L4;if(this.inline_placeholder_text)this.init_inline_placeholder();}tokenizer.prototype.onsubmit=bagofholding;tokenizer.prototype.setName=function(_L0){this.obj.name=_L0;};tokenizer.is_empty=function(obj){if(CSS.hasClass(obj,'tokenizer_locked')){return obj.getElementsByTagName('input').length==0;}else return (!obj.tokenizer||obj.tokenizer.count_names()==0);};tokenizer.prototype.get_token_values=function(){var r=[];var _L1=this.obj.getElementsByTagName('input');for(var i=0;i<_L1.length;++i)if(_L1[i].name&&_L1[i].value)r.push(_L1[i].value);return r;};tokenizer.prototype.get_token_strings=function(){var r=[];var _L1=this.obj.getElementsByTagName('a');for(var i=0;i<_L1.length;++i)if(typeof _L1[i].token!='undefined')r.push(_L1[i].token.text);return r;};tokenizer.prototype.clear=function(){var _L0=this.obj.getElementsByTagName('a');for(var i=_L0.length-1;i>=0;--i)if(typeof _L0[i].token!='undefined')_L0[i].token.remove();};tokenizer.prototype.clear_current_input=function(){this.tokenizer_input.clear();};tokenizer.prototype._onmousedown=function(_L0){if(this.onfocus)this.onfocus();this.hide_inline_placeholder();setTimeout(function(){if(!this.inputs.length){if(this.max_selections>this.count_names()){this.tokenizer_inputs.push(new tokenizer_input(this));}else{var _L1=this.obj.getElementsByTagName('a');for(var i=_L1.length-1;i>=0;i--)if(typeof _L1[i].token!='undefined'){_L1[i].token.select();break;}}}else this.inputs[0].focus();}.bind(this),0);_L0?_L0.cancelBubble=true:false;return false;};tokenizer.prototype._onfocus=function(_L0){if(this.tab_stop_ignore_focus){this.tab_stop_ignore_focus=false;return;}this._onmousedown();};tokenizer.prototype._onblur=function(_L0){if(this.onblur)this.onblur();this.show_inline_placeholder();};tokenizer.prototype.tab_stop_onblur=function(_L0){this.selected_token?this.selected_token.deselect():false;};tokenizer.prototype.tab_stop_onkeydown=function(_L0){if(!_L0.keyCode||!this.selected_token)return;switch(_L0.keyCode){case 8:case 46:var tok=this.selected_token;var _L2=tok.element.previousSibling;if(_L2&&_L2.input){_L2.input.element.focus();}else this.tokenizer_inputs.push(new tokenizer_input(this,tok.element));tok.remove();return false;case 37:if(!tokenizer.valid_arrow_event())break;var tok=this.selected_token;var _L2=tok.element.previousSibling;if(_L2&&_L2.input){_L2.input.element.focus();}else if(this.max_selections>this.count_names()){this.tokenizer_inputs.push(new tokenizer_input(this,tok.element));}else return false;tok.deselect();return false;case 39:if(!tokenizer.valid_arrow_event())break;var tok=this.selected_token;var _L3=tok.element.nextSibling;if(_L3&&_L3.input){_L3.input.focus();}else if(this.max_selections>this.count_names()){var _L4=new tokenizer_input(this,tok.element.nextSibling);this.tokenizer_inputs.push(_L4);}else return false;tok.deselect();return false;}};tokenizer.prototype.count_names=function(_L0){var _L1=this.obj.getElementsByTagName('input');var _L2={};var _L3=0;for(var i=0;i<_L1.length;i++)if(_L1[i].type=='hidden'&&!_L2[_L1[i].value]){_L2[_L1[i].value]=true;++_L3;}if(_L0)for(var j=0;j<_L0.length;j++)if(!_L2[_L0[j]]){_L2[_L0[j]]=true;++_L3;}return _L3;};tokenizer.prototype.disable=function(){this.tab_stop.parentNode.removeChild(this.tab_stop);this.obj.className+=' tokenizer_locked';};tokenizer.prototype._ontokenadded=function(obj){if(this.ontokenadded)this.ontokenadded.call(this,obj);};tokenizer.prototype._ontokenremoved=function(obj){if(this.ontokenremoved)this.ontokenremoved.call(this,obj);};tokenizer.prototype._ontokennotfound=function(_L0){if(this.ontokennotfound)this.ontokennotfound.call(this,_L0);};tokenizer.prototype.init_inline_placeholder=function(){if(this.inline_placeholder)return;var _L0=$N('span',{className:'inline_placeholder'},this.inline_placeholder_text);if(!tokenizer.is_empty(this.obj))_L0.setStyle('display','none');this.obj.appendChild(_L0);this.inline_placeholder=_L0;};tokenizer.prototype.show_inline_placeholder=function(){if(this.inline_placeholder&&tokenizer.is_empty(this.obj))show(this.inline_placeholder);};tokenizer.prototype.hide_inline_placeholder=function(){if(this.inline_placeholder&&shown(this.inline_placeholder))hide(this.inline_placeholder);};tokenizer.prototype.get_source=function(){return this.typeahead_source;};tokenizer.prototype.set_source=function(_L0){this.typeahead_source=_L0;if(this.tokenizer_inputs.length)for(var ii=0;ii<this.tokenizer_inputs.length;ii++)this.tokenizer_inputs[ii].set_source(_L0);if(this.tokenizer_input)this.tokenizer_input.set_source(_L0);};

if (window.Bootloader) { Bootloader.done(["js\/3qjara4kghyco8gg.pkg.js"]); }