/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  February 10th 2010 12:39:07 AM PST                           */
/*      Machine:  10.16.139.101                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/2kw20ls2uuio080s.pkg.js h:9yw8f49t                        */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/2kw20ls2uuio080s.pkg.js                                   */

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

function ads_fetch_admarket_ad(_L0,_L1,_L2,_L3,_L4,_L5){var _L6={'page':_L0,'location':_L1,'adnetwork_id':_L2,'netego':_L5?_L5:false};var r=new AsyncRequest().setURI(muffinize('/muffins/ajax/fetch_admarket_muffin.php')).setData(_L6).setHandler(_L3).setErrorHandler(_L4).send();}
function dropmenu(_L0){if(this==window){return new dropmenu(_L0);}else{this.className=null;this.menu=null;this.menuClickArea=null;this.showHandler=null;this.hideHandler=null;this.alignment=null;this.direction=null;this.isShown=false;this.canHide=false;this.show_hooks=[];this.hide_hooks=[];this.clickTarget=$(_L0);this.displayTarget=$(_L0);this.id=null;this.rtl=false;this._clickToHide=true;this._markupContentCallback=bagofholding;this.clickHandle=this.clickTarget.listen('click',this.toggle.bind(this));this.container=ge('dropmenu_container')||document.body;return this;}}dropmenu.ALIGN_RIGHT=1;dropmenu.ALIGN_LEFT=2;dropmenu.DIRECTION_UP=3;dropmenu.DIRECTION_DOWN=4;dropmenu.INSTANCES={};dropmenu.prototype.setPosition=function(_L0){this.alignment=_L0;return this;};dropmenu.prototype.setDirection=function(_L0){this.direction=_L0;return this;};dropmenu.prototype.setMenuClickArea=function(id){this.menuClickArea=$(id);return this;};dropmenu.prototype.setDisplayTarget=function(id){this.displayTarget=$(id);return this;};dropmenu.prototype.setClickToHide=function(_L0){this._clickToHide=_L0;return this;};dropmenu.prototype.setMarkupContent=function(id,_L1,_L2){this.menuContent=_L2;this.className=_L1;this.id=id;return this;};dropmenu.prototype.setMarkupContentCallback=function(fn){this._markupContentCallback=fn;return this;};dropmenu.prototype._getMarkupContent=function(){return this.menuContent||this._markupContentCallback();};dropmenu.prototype.registerHTMLMenu=function(_L0){this.registered_menu_id=_L0;return this;};dropmenu.prototype.addHook=function(_L0,fn){this[_L0+'_hooks'].push(fn);return this;};dropmenu.prototype.removeHook=function(_L0,fn){for(var i=0;i<this[_L0+'_hooks'].length;i++)if(fn==this[_L0+'_hooks'][i]){this[_L0+'_hooks'].splice(i,1);return true;}return this;};dropmenu.prototype.toggle=function(e){if(!this.isShown){this._show();this.canHide=false;}else this._hide();if(e)$E(e).prevent();};dropmenu.prototype.show=function(){this._show();};dropmenu.prototype.hide=function(){if(!this.menu)return;this._hide();};dropmenu.prototype.destroy=function(){if(this.menu&&this.menu.parentNode){this.menu.parentNode.removeChild(this.menu);this.menu=null;}};dropmenu.prototype._buildMenu=function(){if(intl_locale_is_rtl()&&!this.rtl){this.alignment=(this.alignment==dropmenu.ALIGN_RIGHT)?dropmenu.ALIGN_LEFT:dropmenu.ALIGN_RIGHT;this.rtl=true;}if(this.registered_menu_id){this.menu=$(this.registered_menu_id);if(this.alignment||this.direction)this.container.appendChild(this.menu);}else this._buildDynamicMenu();dropmenu.INSTANCES[this.id]=this;this.menuClickArea=this.menuClickArea||DOM.scry(this.menu,'div.menu_content');this.menuClickArea.onclick=chain(this.menuClickArea.onclick,Event.stop);var _L0=DOM.scry(this.menu,'a');for(var i=0;i<_L0.length;i++)addEventBase(_L0[i],'click',function(){if(this._clickToHide)this._hide();}.bind(this),this.menu_id+'_link_'+i);};dropmenu.prototype._buildDynamicMenu=function(){this.menu=document.createElement('div');this.menu.className='dropdown_menu hidden_elem '+(this.className?' '+this.className:'');this.menu.id='dropdown_menu_'+this.id;var _L0=this._getMarkupContent();if(!is_scalar(_L0)){DOM.setContent(this.menu,_L0);}else set_inner_html(this.menu,_L0);this.container.appendChild(this.menu);};dropmenu.prototype._positionMenu=function(){if(this.alignment||this.direction||(!this.alignment&&!this.direction&&!this.registered_menu_id)){if(this.menu.parentNode!=this.container)this.container.appendChild(this.menu);var _L0=Vector2.getElementPosition(this.displayTarget,'document');var _L1=Vector2.getElementPosition(this.container,'document');var x=_L0.x-_L1.x;var y=_L0.y-_L1.y+this.displayTarget.offsetHeight;if(this.alignment==dropmenu.ALIGN_RIGHT||this.direction==dropmenu.DIRECTION_UP){CSS.removeClass(this.menu,'hidden_elem');this.menu.style.left='-9999px';this.menu.style.top='-9999px';if(this.alignment==dropmenu.ALIGN_RIGHT){var _L4=this.menu.offsetWidth;x=x+this.displayTarget.offsetWidth-_L4;}if(this.direction==dropmenu.DIRECTION_UP){var _L5=this.menu.offsetHeight;y=y-this.displayTarget.offsetHeight-_L5+1;}CSS.addClass(this.menu,'hidden_elem');}this.menu.style.left=x+'px';this.menu.style.top=y+'px';}};dropmenu.prototype._onclick=function(_L0){this._hide();return false;};dropmenu.prototype._show=function(){if(!this.menu)this._buildMenu();this._positionMenu();CSS.removeClass(this.menu,'hidden_elem');var _L0=this._documentHideHandler.bind(this);this.click_event=addEventBase(document.body,'click',_L0,this.menu.id);onbeforeunloadRegister(_L0);this.isShown=true;for(var i=0;i<this.show_hooks.length;i++)this.show_hooks[i]();};dropmenu.prototype._documentHideHandler=function(e){if(!this.canHide){this.canHide=true;}else this._hide();};dropmenu.prototype._hide=function(){if(this.menu)CSS.addClass(this.menu,'hidden_elem');if(this.click_event)removeEventBase(document.body,'click',this.click_event,this.menu.id);this.click_event=null;this.isShown=false;for(var i=0;i<this.hide_hooks.length;i++)this.hide_hooks[i]();if(!this.registered_menu_id)this.destroy();};dropmenu.prototype._build_menu_shim=function(){this.shim=null;if(ua.ie()<7){this.shim=document.createElement('iframe');CSS.setClass(shim,'iframe_shim');this.container.appendChild(this.shim);}};dropmenu.getExistingInstance=function(id){return dropmenu.INSTANCES[id];};function flyout_menu(_L0){if(this==window){return new flyout_menu(_L0);}else{this.title='';this.parent.construct(this,_L0);}}flyout_menu.extend('dropmenu');flyout_menu.prototype.setMarkupContent=function(id,_L1,_L2,_L3){this.parent.setMarkupContent(id,_L1,_L3);this.title=_L2;return this;};flyout_menu.prototype.setIconPosition=function(_L0){this.iconElem=_L0;return this;};flyout_menu.prototype._buildDynamicMenu=function(){this.menu=document.createElement('div');CSS.addClass(this.menu,(this.className||'')+' flyout_menu hidden_elem');if(this.alignment==dropmenu.ALIGN_RIGHT)CSS.addClass(this.menu,'flyout_menu_left');this.menu.id='flyout_menu_'+this.id;var _L0='content_'+this.id;var _L1=[];_L1.push('<div class="flyout_menu_header_shadow">');_L1.push('<div class="flyout_menu_header clearfix">');_L1.push('<div class="flyout_menu_mask"></div>');_L1.push('<div class="flyout_menu_title">'+this.title+'</div>');_L1.push('</div></div>');_L1.push('<div class="flyout_menu_content_shadow">');_L1.push('<div class="menu_content" id="content_'+this.id+'">');_L1.push('</div></div>');set_inner_html(this.menu,_L1.join(''));this.container.appendChild(this.menu);var _L2=this._getMarkupContent();if(!is_scalar(_L2)){DOM.setContent($(_L0),_L2);}else set_inner_html($(_L0),_L2);this.menuClickArea=$(_L0);};flyout_menu.prototype._positionMenu=function(){if(this.alignment||(!this.alignment&&!this.registered_menu_id)){var x;var _L1=this.iconElem?this.iconElem:this.clickTarget;switch(this.alignment){case dropmenu.ALIGN_LEFT:case null:x=elementX(_L1)-elementX(this.container);break;case dropmenu.ALIGN_RIGHT:this.menu.style.left='-9999px';this.menu.style.top='-9999px';CSS.removeClass(this.menu,'hidden_elem');var _L2=Vector2.getElementDimensions(this.menu).x;var _L3=Rect.getElementBounds(_L1).r-elementX(this.container);var _L4=4;x=_L3-_L2+_L4*2;CSS.addClass(this.menu,'hidden_elem');break;}var y=elementY(_L1)-elementY(this.container);this.menu.style.left=x+'px';this.menu.style.top=y+'px';}};function hover_menu(_L0){if(this==window){return new hover_menu(_L0);}else{this.parent.construct(this,_L0);this.timeOut=0;this.clickHandle.remove();this.enterTimer=null;this.exitTimer=null;}}hover_menu.extend('dropmenu');hover_menu.prototype.setTimeoutInterval=function(_L0){this.timeOut=_L0;return this;};hover_menu.prototype._clickTarget_onmouseover=function(_L0,e){clearTimeout(this.exitTimer);if(!this.isShown)this.enterTimer=setTimeout(function(){this._show();}.bind(this),this.timeOut);};hover_menu.prototype._clickTarget_onmouseout=function(_L0,e){e=e||window.event;var _L2=(e.relatedTarget)?e.relatedTarget:e.toElement;if(DOM.contains(_L0,_L2))return;clearTimeout(this.enterTimer);if(this.isShown&&!DOM.contains(this.menu,_L2))this.exitTimer=setTimeout(function(){this._hide();}.bind(this),this.timeOut);};hover_menu.prototype._menu_onmouseover=function(_L0,e){clearTimeout(this.exitTimer);};hover_menu.prototype._menu_onmouseout=function(_L0,e){e=e||window.event;var _L2=(e.relatedTarget)?e.relatedTarget:e.toElement;if(DOM.contains(_L0,_L2))return;clearTimeout(this.enterTimer);if(this.isShown)this.exitTimer=setTimeout(function(){this._hide();}.bind(this),this.timeOut);};hover_menu.prototype.initialize=function(){if(!this.menu)this._buildMenu();this.clickTarget.listen('mouseover',this._clickTarget_onmouseover.bind(this,this.clickTarget));this.clickTarget.listen('mouseout',this._clickTarget_onmouseout.bind(this,this.clickTarget));this.menu.listen('mouseout',this._menu_onmouseout.bind(this,this.menu));this.menu.listen('mouseover',this._menu_onmouseover.bind(this,this.menu));this._positionMenu();return this;};
function newBoxAdded(_L0,_L1,_L2,_L3){if(!ge(_L3+_L1))return;var _L4=$(_L3+_L1);var _L5=document.createElement('div');var _L6='<div class="popcontent_advanced border_frame">'+'<div class="pop_content popcontent_old" id="pop_content"></div>'+'<div class="dialog_buttons">'+'<input type="submit" class="inputsubmit inputbutton" value="Keep"/>'+'<input type="submit" class="inputaux inputbutton" value="Remove">'+'</div></div>';set_inner_html(_L5,_L6);_L5.getElementsByTagName('input')[0].onclick=function(){animation(_L4.previousSibling).to('opacity',0).duration(200).hide().go();return false;};_L5.getElementsByTagName('input')[1].onclick=function(){removeAppBox(_L0,_L1,_L2,_L3);DOM.remove(_L4.previousSibling);};CSS.addClass(_L5,'add_new_box_border');_L5.childNodes[0].style.width=_L4.offsetWidth+20+'px';_L5.childNodes[0].style.position='absolute';_L5.childNodes[0].childNodes[0].style.height=_L4.offsetHeight+9+'px';_L4.parentNode.insertBefore(_L5,_L4);animation(DOMScroll.getScrollRoot()).to('scrollTop',elementY(_L4)-40).ease(animation.ease.end).duration(800).go();}function removeAppBox(_L0,_L1,_L2,_L3){if(!ge(_L3+_L1))return false;new AsyncRequest().setURI('/ajax/profile/box.php').setData({profile_id:_L0,app_id:_L1,action:'remove',tab_id:_L2}).send();var _L4=$(_L3+_L1);animation(_L4).to('opacity',0).duration(200).hide().ondone(DOM.remove.bind(null,_L3+_L1)).go();return false;}function moveToTab(_L0,_L1,_L2,_L3,_L4,_L5){new AsyncRequest().setURI('/ajax/profile/box.php').setData({to_tab:_L3,profile_id:_L0,app_id:_L1,action:'move_to_tab',from_tab:_L2}).setHandler(function(_L6){tab_controller.dirtyCachedView(_L4);if(_L4=='feed'||_L4=='wall')tab_controller.dirtyCachedView('box_3');DOM.remove('box_app_'+_L1);goURI(_L5);DOMScroll.scrollTo(new Vector2(0,0,'document'),false);}).send();return false;}
function ProfileTabController(id,_L1,_L2,_L3,_L4,_L5,_L6,_L7,_L8,_L9,_La,_Lb,_Lc,_Ld){this.tabs={};this.addTabLink=null;this.moreLink=null;this.topBar=_L3;this.numTabs=0;addEventBase($('top_bar_pic'),'click',function(_L15,_L16){_L15.onselect('wall');return Event.kill(_L16);}.bind(null,this));var _Le=_L4.getElementsByTagName('li');for(var i=0;i<_Le.length;i++){var attr=_Le[i].getAttributeNode('view');if(attr?attr.specified:false){var view=_Le[i].getAttribute('view');if(CSS.hasClass(_Le[i],'selected'))this.currentView=view;this._hookUpTab(_Le[i],view);this.tabs[view]=_Le[i];var _L12=_Le[i].getElementsByTagName('a')[0];$(_L12).listen('click',function(_L15){if(this.activeDrag)return _L15.kill();});if(_Le[i].getElementsByTagName('a').length>1){var _L13=_Le[i].getElementsByTagName('a')[1];this._hookUpEdit(_L13,view,_L12.innerHTML);}this.numTabs++;}}if(ge(_L7)){this.tab_more=$(_L7);this.moreDropMenu=dropmenu(this.tab_more.childNodes[0]).registerHTMLMenu('menu_tab_more').setPosition(dropmenu.ALIGN_LEFT).addHook('show',function(){CSS.addClass(this.tab_more,'selected_tab_more');}.bind(this)).addHook('hide',function(){CSS.removeClass(this.tab_more,'selected_tab_more');}.bind(this));}if(ge(_L8)){this.add_tab=$(_L8);CSS.removeClass(this.add_tab,'hidden_elem');this.addMenu=flyout_menu(this.add_tab.childNodes[0]).registerHTMLMenu('flyout_menu_profile_add_tab').setMenuClickArea(DOM.find($('profile_tab_add'),'div.add_tab_app_typeahead')).setPosition(dropmenu.ALIGN_LEFT).addHook('show',function(){CSS.addClass(this.add_tab,'selected_menu_icon');}.bind(this)).addHook('hide',function(){CSS.removeClass(this.add_tab,'selected_menu_icon');}.bind(this));}this.id=id;this.viewer=_L1;this.is_impersonated=_La;this.can_edit=_L2;this.root=_L4;this.canvas=_L5;this.leftColumn=_L5.firstChild;this.href='';this.cachedTabs={};this.ads_wanted=_Lb;this.rightColumn=$('tab_canvas');if(!_L9){this.cachedTabs[_L6]=this.rightColumn.childNodes[0];}else onloadRegister(this.selectView.bind(this,_L6));this.nonSortables=_Lc;this.maxSortableTabs=ProfileTabController.MAX_TABS-this.nonSortables.length;this.composerTab=_Ld;if(_L2){this.sortableMainRoot=$('profile_tabs');this.sortableMoreRoot=this.tab_more&&this.tab_more.getElementsByTagName('ul')[0];this.sortableMain=new SortableGroup();if(this.sortableMore=this.sortableMoreRoot&&new SortableGroup())this.sortableMain.link(this.sortableMore);this.sortableMain.setLinkJumpHandler(this.onSortableLinkJump.bind(this));for(view in this.tabs){var tab=this.tabs[view];if(!this.nonSortables.contains(tab.getAttribute('view')))(tab.parentNode==this.sortableMainRoot?this.sortableMain:this.sortableMore).addSortable(view,tab,tab.getElementsByTagName('a')[0]);}this.sortableMain.setOrderChangeHandler(this.saveTabOrder.bind(this));this.sortableMore.setOrderChangeHandler(this.saveTabOrder.bind(this));}PageTransitions.registerHandler(bind(this,'handleNavigation',_L6));tab_controller=this;}ProfileTabController.MAX_TABS=6;ProfileTabController.viewasTabs=['photos','info','posts','wall','box_3'];ProfileTabController.twoColumnViews={'posts':true,'info':true,'wall':true};ProfileTabController.facebookTabs=['wall','posts','info','photos','box_3','app_2347471856','app_2392950137','app_2344061033','app_2373072738','app_6261817190'];ProfileTabController.prototype.getLastDisplayedView=function(){var _L0=this.sortableMain.getOrder();if(!_L0.length)return null;return _L0[_L0.length-1];};ProfileTabController.prototype.getFirstOverflowView=function(){var _L0=this.sortableMore.getOrder();if(!_L0.length)return null;return _L0[0];};ProfileTabController.prototype.onSortableLinkJump=function(key){var _L1=this.sortableMain.getOrder(),_L2=null;if(_L1.length>this.maxSortableTabs){for(var i=_L1.length-1;i>=0;i--)if(_L1[i]!=key&&_L1[i]!=this.currentView){_L2=_L1[i];break;}this.sortableMoreRoot.insertBefore(this.tabs[_L2],this.sortableMoreRoot.firstChild);this.sortableMore.migrateLinkedSortable(_L2);}else if(_L1.length<this.maxSortableTabs){_L1=this.sortableMore.getOrder();for(var i=0;i<_L1.length;i++)if(_L1[i]!=key){_L2=_L1[i];break;}this.sortableMainRoot.insertBefore(this.tabs[_L2],this.tab_more);this.sortableMain.migrateLinkedSortable(_L2);}if(this.moreDropMenu)this.moreDropMenu._positionMenu();};ProfileTabController.prototype._hookUpTab=function(tab,_L1,_L2){var _L3=null;if(this.numTabs>=ProfileTabController.MAX_TABS){if(_L2){var _L4=$('tabs_more_menu').firstChild;_L4.appendChild(tab);this.numTabs++;CSS.removeClass(this.tab_more,'hidden_elem');_L3=this.sortableMore;}}else if(_L2){if(this.tab_more){this.root.insertBefore(tab,this.tab_more);}else this.root.insertBefore(tab,this.add_tab);this.numTabs++;_L3=this.sortableMain;}if(_L3)_L3.addSortable(_L1,tab,tab.getElementsByTagName('a')[0]);};ProfileTabController.prototype.onselect=function(_L0){if(this.currentView==_L0||this.waitingForAjax)return;goURI(URI.getRequestURI().addQueryData({v:_L0}));};ProfileTabController.prototype._hookUpEdit=function(_L0,_L1,_L2){var _L3=document.createElement('div');var _L4=document.createElement('a');_L4.innerHTML=_tx("\u0418\u0437\u0442\u0440\u0438\u0439 \u0442\u0430\u0431");_L4.setAttribute('href','#');_L4.onclick=this.deleteTab.bind(this,_L1);_L3.appendChild(_L4);flyout_menu(_L0).setMarkupContent('edit_menu_'+_L1,'link_menu flyout_menu_18',_tx("\u041e\u043f\u0446\u0438\u0438 \u043d\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0438"),_L3).addHook('show',function(){CSS.addClass(_L0,'selected');}.bind(this)).addHook('hide',function(){CSS.removeClass(_L0,'selected');}.bind(this));return false;};ProfileTabController.prototype.handleNavigation=function(_L0,uri){var _L2=uri.getQueryData();var _L3=_L2.viewas||this.viewer;var _L4=function(_L8){if(this.ads_wanted&&parseInt(this.viewer)>0)ads_refresh(this.currentView,new URI(uri).getPath(),false,false,false,_L8);PageTransitions.transitionComplete();}.bind(this);if(_L2.app_page){this.selectPage(_L2.fbhref,_L4);return true;}if(_L2.story_fbid)return false;if(!(ProfileURIController.isDestinationURIProfilePage(uri)&&_L3==this.viewer))return false;if(!_L2.v&&this.currentView==_L0)return false;if(window.ProfilePhotosTabController){var _L5=ProfilePhotosTabController.transitionHandler(this.currentView,uri,_L0);if(_L5!==null)return _L5;}var _L6={'v':1,'id':1,'viewas':1,'ref':1};for(var _L7 in _L2)if(!_L6[_L7])return false;if(_L2.ref=='search')search_log_2nd_action('Select tab:'+_L2.v);this.selectView(_L2.v||_L0,_L4);return true;};ProfileTabController.prototype.selectView=function(_L0,_L1){if(this.addMenu)this.addMenu.hide();if(this.is_impersonated&&!ProfileTabController.viewasTabs.contains(_L0)){var uri=URI.getRequestURI().addQueryData({'v':_L0});if(this.viewer)uri.addQueryData({'viewas':this.id});uri.go();return false;}if(!this.tabs[_L0]){new URI('/profile.php').addQueryData({'v':_L0}).go();return false;}this.selectTab(_L0);if(!ProfileTabController.twoColumnViews[_L0]&&ProfileTabController.twoColumnViews[this.currentView]){CSS.removeClass(document.body,'profile_two_columns');}else if(ProfileTabController.twoColumnViews[_L0]&&!ProfileTabController.twoColumnViews[this.currentView])CSS.addClass(document.body,'profile_two_columns');this.changePage(_L0,'',_L1);};ProfileTabController.prototype.selectTab=function(_L0){if(intl_locale_is_rtl()){var _L1='padding-left';}else var _L1='padding-right';for(var i in this.tabs)if(i==_L0){if(this.sortableMore&&this.sortableMore.getOrder().contains(_L0)){var _L3=this.getLastDisplayedView();var _L4=this.tabs[_L3];var _L5=this.getFirstOverflowView();var _L6=this.tabs[_L5];var _L7=_L4.previousSibling;DOM.insertBefore(_L4,_L6);DOM.insertAfter(_L7,this.tabs[i]);this.sortableMore.migrateLinkedSortable(_L3);this.sortableMain.migrateLinkedSortable(_L0);}if(this.tabs[i].childNodes[1]){animation(this.tabs[i].childNodes[0]).from(_L1,'11px').to(_L1,'25px').duration(100).go();animation(this.tabs[i].childNodes[1]).from('width','0').to('width','19px').duration(100).go();}CSS.addClass(this.tabs[i],'selected');}else if(CSS.hasClass(this.tabs[i],'selected')){CSS.removeClass(this.tabs[i],'selected');if(this.tabs[i].childNodes[1])animation(this.tabs[i].childNodes[0]).from(_L1,'25px').to(_L1,'11px').duration(100).go();}};ProfileTabController.prototype.selectPage=function(_L0,_L1){this.changePage(this.currentView,_L0,_L1);};ProfileTabController.prototype.fetchPage=function(_L0,_L1,_L2,_L3,_L4){_L3=_L3||'';subdomain=ProfileTabController.facebookTabs.contains(_L0)?'www':'apps';var _L5={id:this.id,v:_L0,href:_L1,iframe:true};if(this.is_impersonated&&this.viewer)_L5['viewas']=this.viewer;new AsyncRequest().setOption('useIframeTransport',true).setReadOnly(true).setMethod('GET').setURI(new URI('/ajax/profile/tab.php').setSubdomain(subdomain)).setData(_L5).setContextData('src_tab_name',_L3).setContextData('dst_tab_name',_L0).setNectarActionData().setHandler(function(_L6){var _L7=_L6.getPayload();if(_L7.redirect){goURI(_L7.redirect);}else{var _L8=!_L1;_L2(HTML(_L7.tab_content),_L0,_L8,_L7.additional_content);}}.bind(this)).setFinallyHandler(function(_L6){this.waitingForAjax=false;_L4&&_L4(0);}.bind(this)).send();this.waitingForAjax=true;};ProfileTabController.prototype.changePage=function(_L0,_L1,_L2){var _L3=this.rightColumn;while(this.rightColumn.childNodes.length)this.rightColumn.removeChild(this.rightColumn.childNodes[0]);CSS.addClass(this.rightColumn,'loading');var _L4=this.currentView;this.currentView=_L0;this.href=_L1;var _L5=function(_L6,_L0,_L7,_L8){if(_L8)for(var i=0;i<_L8.length;++i){var _La=_L8[i];DOM.setContent($(_La.div_id),HTML(_La.html));}CSS.removeClass(_L3,'loading');var _Lb;if(_L6 instanceof HTML){var d=$N('div');_L3.appendChild(d);DOM.setContent(d,_L6);if(_L7)this.cachedTabs[_L0]=d;_Lb=false;}else{_L3.appendChild(_L6);_Lb=true;}}.bind(this);if(this.cachedTabs[_L0]&&!_L1&&(_L4!=_L0)){_L5(this.cachedTabs[_L0],_L0,true);_L2&&_L2(1);}else this.fetchPage(_L0,_L1,_L5,_L4,_L2);};ProfileTabController.prototype.dirtyCachedView=function(_L0){if(this.cachedTabs[_L0])delete this.cachedTabs[_L0];};ProfileTabController.prototype.addNewTab=function(_L0,_L1,_L2,_L3){if(this.addMenu)this.addMenu.hide();var _L4=document.createElement('li');var _L5=document.createElement('a');CSS.setClass(_L5,'tab_link');_L5.innerHTML=_L2;var _L6=document.createElement('a');CSS.setClass(_L6,'edit');_L4.appendChild(_L5);_L4.appendChild(_L6);if(_L3){new AsyncRequest().setURI('/ajax/profile/tab.php').setData({id:this.id,action:'add_app_tab'}).setHandler(function(_L7){var _L8='box_'+_L7.payload.tab_id;_L4.setAttribute('view',_L8);this._hookUpTab(_L4,_L8,true);this._hookUpView(_L4,_L5,_L6,_L2,_L8);if(_L0)CSS.addClass(_L0,'hidden_elem');}.bind(this)).send();}else new AsyncRequest().setURI('/ajax/profile/tab.php').setData({id:this.id,action:'add_tab',tab_id:_L1}).setHandler(function(_L7){var _L8=(_L2=="Photos"?'photos':'app_'+_L1);_L4.setAttribute('view',_L8);this._hookUpTab(_L4,_L8,true);this._hookUpView(_L4,_L5,_L6,_L2,_L8);if(_L0)CSS.addClass(_L0,'hidden_elem');}.bind(this)).send();};ProfileTabController.prototype._hookUpView=function(_L0,_L1,_L2,_L3,_L4){var _L5=ProfileURIController.getCurrentProfileBaseURI();var _L6={v:_L4};if(this.is_impersonated&&this.viewer)_L6['viewas']=this.viewer;_L1.href=_L5.addQueryData(_L6).toString();this._hookUpEdit(_L2,_L4,_L3);this.tabs[_L4]=_L0;this.onselect(_L4);};ProfileTabController.prototype.editTabName=function(_L0,e){var _L2=_L0.split('_')[1];var tab=this.tabs[_L0];tab.style.width=tab.offsetWidth-2+'px';tab.style.height=tab.offsetheight+'px';var _L4=tab.firstChild.offsetWidth-16;for(var i=0;i<tab.childNodes.length;i++)hide(tab.childNodes[i]);var _L6=document.createElement('form');var _L7=DOM.find(tab,'.app_tab_title').innerHTML;_L6.innerHTML='<input type="text" id="tab_name_edit" class="inputtext" style="width:'+_L4+'px" value="'+_L7+'">';tab.appendChild(_L6);$('tab_name_edit').focus();function _L8(e){_L6.onsubmit();}function _L9(e){Event.kill(e);}_L6.onsubmit=function(){var _La=_L6.firstChild.value;var _Lb=DOM.find(tab,'.app_tab_title');_Lb.innerHTML=_La;tab.removeChild(_L6);for(var i=0;i<tab.childNodes.length;i++)show(tab.childNodes[i]);document.body.removeEventListener('click',_L8,false);tab.removeEventListener('click',_L9,true);new AsyncRequest().setURI('/ajax/profile/tab.php').setData({id:this.id,action:'rename_tab',tab_id:_L2,tab_name:_La}).send();tab.style.width=null;return false;}.bind(this);document.body.addEventListener('click',_L8,false);tab.addEventListener('click',_L9,true);Event.kill(e);};ProfileTabController.prototype.deleteTab=function(_L0){var _L1;if(_L0=='photos'){_L1=2305272732;}else _L1=_L0.split('_')[1];new AsyncRequest().setURI('/ajax/profile/tab.php').setData({id:this.id,action:'delete_tab',tab_id:_L1}).send();var _L2=this.getFirstOverflowView();var _L3=this.tabs[_L2];var _L4=this.getLastDisplayedView();var _L5=this.tabs[_L4];if(_L2)DOM.insertAfter(_L5,_L3);this.sortableMain.migrateLinkedSortable(_L2);this.sortableMain.removeSortable(_L0);this.root.removeChild(this.tabs[_L0]);delete this.tabs[_L0];this.numTabs--;var _L6=ge('new_tab_'+_L1);if(_L6)CSS.removeClass(_L6,'hidden_elem');var _L7=this.getFirstOverflowView();if(!_L7)CSS.addClass(this.tab_more,'hidden_elem');this.onselect('wall');return false;};ProfileTabController.prototype.saveTabOrder=function(){var _L0=this.sortableMain.getOrder();if(this.sortableMore)_L0=_L0.concat(this.sortableMore.getOrder());new AsyncRequest().setURI('/ajax/profile/tab.php').setData({id:this.id,action:'reorder_tabs',tab_order:_L0}).send();};var ProfileURIController={_profileId:0,_profilePage:false,init:function(_L0){this._profileId=_L0;this._profileURI=URI.getRequestURI();this._setProfilePage(true);onunloadRegister(this._setProfilePage.bind(this,false));},_setProfilePage:function(_L0){this._profilePage=_L0;},isProfilePage:function(){return this._profilePage;},isDestinationURIProfilePage:function(uri){if(!this.isProfilePage())return false;var _L1=uri.getQueryData().id;if(uri.getPath()=='/profile.php')return _L1==this._profileId;return this._profileURI.getPath()==uri.getPath();},getCurrentProfileBaseURI:function(){var _L0=URI.getMostRecentURI();var _L1=_L0.getQueryData().id;var _L2={};if(_L1)_L2.id=_L1;return _L0.setQueryData(_L2);}};
function motion_spawn_delete_dialog(_L0,_L1){var _L2={v:_L0,delete_dialog:true};if(_L1)_L2.parent_oid=_L1;new AsyncRequest().setURI('/ajax/motion.php').setData(_L2).setHandler(function(_L3){dialog_data=_L3.getPayload();_motion_show_delete_dialog(_L0,dialog_data.preview_content,dialog_data.success_content,_L1);}).send();}function _motion_show_delete_dialog(_L0,_L1,_L2,_L3){var _L4=new Dialog().setTitle(_L1.title).setBody(_L1.html).setButtons([Dialog.newButton(_L1.verb.toLowerCase(),_L1.verb,'',function(){_motion_delete_video(_L0,_L2,_L3);}),Dialog.CANCEL]).show();}function _motion_delete_video(_L0,_L1,_L2){var _L3={delete_video:true,v:_L0};if(_L2)_L3.parent_oid=_L2;new AsyncRequest().setURI('/ajax/motion.php').setData(_L3).setHandler(function(_L4){var _L5=Dialog.getCurrent();if(_L5)_L5.hide();new Dialog().setTitle(_L1.title).setBody(_L1.html).show();goURI.bind(null,_L1.url).defer(2000);}).send();}function motion_show_profile_video_dialog(_L0,_L1,_L2){var _L3=new Dialog().setTitle(_L1.title).setBody(_L1.html).setButtons([Dialog.newButton('make-profile-video',_tx("\u041d\u0430\u043f\u0440\u0430\u0432\u0438 \u0432\u0438\u0434\u0435\u043e \u043d\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u0430"),'',function(){_motion_set_profile_video(_L0,_L2);}),Dialog.CANCEL]).show();}function _motion_set_profile_video(_L0,_L1){new AsyncRequest().setURI('/ajax/motion.php').setData({profile_video:1,v:_L0}).setHandler(function(_L2){goURI('/video/video.php?profile&v='+_L0);return true;}).send();}function video_send_email_when_processed(_L0,_L1){var _L2={action:'set_send_email',video_id:_L0,send_email:_L1?1:0};new AsyncRequest().setURI('/ajax/motion_upload.php').setData(_L2).setHandler(function(_L3){$('notification_status').innerHTML=_L3.getPayload();}).send();}var recorder_dialog;function motion_submit_video_handler(_L0){video_id=_L0['video_id'];video_category=_L0['video_category'];oid=_L0['parent_oid'];if(!video_id)goURI('/video/editvideo.php?error');switch(video_category){case 1:new AsyncRequest().setURI('/ajax/motion_fvr_dialog.php').setData({'action':'fvr_get_permalink','video_id':video_id}).setHandler(function(_L1){inboxAttachments.attach_link_url(ge('attachment_stage_area'),_L1.getPayload(),true);}).send();break;case 2:new AsyncRequest().setURI('/ajax/motion.php').setData({obj_attach:1,v:video_id,parent_oid:oid}).setHandler(function(_L1){goURI('/video/editvideo.php?created&v='+video_id+'&oid='+oid);}).send();break;case 0:default:goURI('/video/editvideo.php?created&v='+video_id);break;}}function video_add_video_msg_inputs(_L0){video_id=_L0['video_id'];if(inboxAttachments.is_active){var _L1=ge(inboxAttachments.edit_id);}else var _L1=ge(wallAttachments.edit_id);if(_L1)if(ge('video_msg_id')){$('video_msg_id').value=video_id;}else{var _L2=document.createElement('input');_L2.name='attachment[params][0]';_L2.id='video_msg_id';_L2.value=video_id;_L2.type='hidden';var _L3=document.createElement('input');_L3.name='attachment[type]';_L3.id='video_msg_share_type';_L3.value=15;_L3.type='hidden';_L1.appendChild(_L2);_L1.appendChild(_L3);}}function video_remove_video_msg_inputs(){if(inboxAttachments.is_active){var _L0=ge(inboxAttachments.edit_id);}else var _L0=ge(wallAttachments.edit_id);if(_L0){var _L1=ge('video_msg_id');if(_L1){_L0.removeChild(_L1);var _L2=ge('video_msg_share_type');if(_L2)_L0.removeChild(_L2);}}}function video_toggle_dialog(_L0,_L1){var _L2={action:'toggle_dialog',dialog_type:_L0,dialog_value:_L1};new AsyncRequest().setURI('/ajax/motion_invite.php').setData(_L2).setHandler(function(_L3){}).send();}

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