/*    HTTP Host:  b.static.ak.fbcdn.net                                        */
/*    Generated:  October 27th 2009 4:10:49 PM PDT                             */
/*      Machine:  10.16.140.110                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/ec01ciwev88ckgco.pkg.js h:1vrfvajq                        */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/ec01ciwev88ckgco.pkg.js                                   */

function pymkGrid(_L0,_L1){copy_properties(this,{used_ids:[],boxes_displayed:0,payload_timeouts:0,grid_id:null,pymk_more_link:null,show_explanation:null});if(_L0&&ge(_L0)){this.grid_id=_L0;this.show_explanation=!!_L1;this.grid_obj=$(_L0);var _L2=DOM.scry(this.grid_obj,'div.friend_grid_col');for(var i=0;i<_L2.length;i++){div_id=_L2[i].getAttribute('id');index=div_id.lastIndexOf('_');this.used_ids.push(parseInt(div_id.substring(index+1)));this.boxes_displayed++;}var _L4=DOM.scry(this.grid_obj,'a.show_more');if(_L4)this.pymk_more_link=_L4[0];}else Util.error('pymkGrid: Either the grid you have specified is invalid or is not detectable in the DOM.');}copy_properties(pymkGrid.prototype,{addFriend:function(uid,_L1,_L2,_L3,log){this.modifyFriendship(uid,'add',null,_L1,_L2,_L3,log);return;},hideFriend:function(uid,_L1,_L2,_L3){this.modifyFriendship(uid,'blacklist',null,_L1,_L2,_L3);return;},modifyFriendship:function(uid,_L1,_L2,_L3,_L4,_L5,log){var _L7=this.getGridData($('fg_'+this.grid_id+'_'+uid));var _L8={used:this.used_ids,replace:uid,get:1,explanation:this.show_explanation,page:_L3,ajax_id:this.grid_id};if(_L1=='blacklist'){_L8.click_type='hide';_L8.blacklist_type='blacklist';_L8.score=_L4;_L8.source=_L5;}else if(log){_L8.click_type='add';_L8.score=_L4;_L8.source=_L5;}new AsyncRequest().setURI('/ajax/friend_guess.php').setData(_L8).setHandler(bind(this,this.asyncHandleModify)).setReplayable(false).send();var _L9=$('fg_'+this.grid_id+'_'+uid);animation(_L9).from('opacity',1).to('opacity',0).duration(300).go();if(_L2)_L2.addTo('outgoing',_L2.constructGridItem(_L7));return;},asyncHandleRefresh:function(_L0){payload=_L0.getPayload();if(payload.victim&&payload.victim.length>0){for(var i=0;i<payload.victim.length;i++)if(this.used_ids[i])animation($('fg_'+this.grid_id+'_'+this.used_ids[i])).from('opacity',1).to('opacity',0).duration(300).go();for(var i=0;i<payload.victim.length;i++)if(this.used_ids[i])this.replaceItem(this.used_ids[i],payload.victim[i]);for(var i=0;i<payload.victim.length;i++)this.used_ids.unshift(payload.victim[i].uid);}if(!payload.more)this._hideMoreLink();},asyncHandleModify:function(_L0){payload=_L0.getPayload();if(payload.victim&&payload.victim.length>0){this.replaceItem(payload.replace,payload.victim[0]);}else this.hideItem(payload.replace);return;},replaceItem:function(_L0,_L1){var _L2='fg_'+this.grid_id+'_'+_L0;var _L3='fg_'+this.grid_id+'_'+_L1.uid;if(!ge(_L3)){var _L4=DOM.create('div',{id:_L3,className:'friend_grid_col clearfix'},HTML(_L1.box_content));DOM.replace($(_L2),_L4);animation($(_L3)).from('opacity',0).to('opacity',1).duration(400).go();this.used_ids.push(_L1.uid);}else this.hideItem(_L0);},hideItem:function(_L0){this.payload_timeouts++;var _L1='fg_'+this.grid_id+'_'+_L0;var _L2=null;var _L3=$$('#home_sidebar .sidebar_item.pymk');if(1==_L3.length&&1==$$('#pymk_ajax_grid .friend_grid_row').length){_L2=animation(_L3[0]);}else{$(_L1).unreplaceable=true;var _L4=$(_L1).parentNode;var _L5=true;for(var i=0;i<_L4.childNodes.length;i++)if(!_L4.childNodes[i].unreplaceable){_L5=false;break;}if(_L5)_L2=animation(_L4).ondone(DOM.remove.bind(null,_L4));}if(_L2)_L2.to('height',0).duration(550).hide().ease(animation.ease.end).go();this._hideMoreLink();},constructGridItem:function(_L0){return this.constructRawGridItem(_L0.uid,_L0.content);},constructRawGridItem:function(uid,_L1){var _L2=document.createElement('div');CSS.addClass(_L2,'friend_grid_col');_L2.setAttribute('id','friend_'+uid);_L2.innerHTML=_L1;return _L2;},getGridData:function(_L0){if(CSS.hasClass(_L0,'friend_grid_col')){var _L1={content:_L0.innerHTML,uid:_L0.getAttribute('id').toString().slice(3)};return _L1;}},_removeID:function(uid){for(var i=0;i<this.used_ids.length;i++)if(this.used_ids[i]==uid)this.used_ids.splice(i,1);return;},_hideMoreLink:function(){if(this.pymk_more_link){this.pymk_more_link.style.visibility='hidden';this.pymk_more_link=null;}}});function pymk_friend_added(_L0){pymk_disable_add_friend_links(_L0.uid);pymk_add_friend(_L0.uid,_L0.render_explanation,null,_L0.page,null,null,null,_L0.grid_id);}function pymk_friend_added_no_ajax(_L0){pymk_disable_add_friend_links(_L0.uid);var _L1={uid:_L0.uid,page:_L0.page,click_type:'add',score:_L0.score,source:_L0.source};new AsyncSignal('/ajax/pymk_logging.php',_L1).send();}function pymk_disable_add_friend_links(uid){var _L1=DOM.scry(document,'a.fg_add_'+uid);for(var i=0;i<_L1.length;i++){var _L3=$N('span',{className:'holder inactive'},_tx("Friend Requested"));DOM.replace(_L1[i],_L3);}var _L4=DOM.scry(document,'a.fg_hide_'+uid);for(var i=0;i<_L4.length;i++)DOM.remove(_L4[i]);}function pymk_page_added(uid,_L1,_L2,_L3,_L4,log,_L6){pymk_add_friend(uid,_L1,null,_L2,_L3,_L4,log,_L6);}function pymk_add_friend(uid,_L1,_L2,_L3,_L4,_L5,log,_L7){if(!_L2){if(!_L7)_L7='pymk_ajax_grid';_L2=new pymkGrid(_L7,_L1||false);}_L2.addFriend(uid,_L3,_L4,_L5,log);}function pymk_hide_friend(uid,_L1,_L2,_L3,_L4,_L5,_L6){if(!_L2){if(!_L6)_L6='pymk_ajax_grid';_L2=new pymkGrid(_L6,_L1);}if(!_L4)_L4=-1;if(!_L5)_L5='u';_L2.hideFriend(uid,_L3,_L4,_L5);}function pymk_log_profile_click(uid,_L1,_L2,_L3){var _L4={click_type:'profile',replace:uid,page:_L1,score:_L2,source:_L3};new AsyncRequest().setURI('/ajax/friend_guess.php').setData(_L4).setReplayable(false).send();}function req_ab_friend_confirmed(_L0){var _L1=DOM.scry(document,'a.fg_add_'+_L0.uid);for(var i=0;i<_L1.length;i++){var _L3=$N('span',{className:'holder inactive'},_L0.confirmed_text);DOM.replace(_L1[i],_L3);}var _L4=DOM.scry(document,'a.fg_hide_'+_L0.uid);for(var i=0;i<_L4.length;i++)DOM.remove(_L4[i]);var _L5={friend_id:_L0.uid,click_type:'req_ab_friend_confirmed'};new AsyncSignal('/ajax/requests/ab_logging.php',_L5).send();}function req_ab_log_profile_click(uid){var _L1={friend_id:uid,click_type:'req_ab_profile_click'};new AsyncSignal('/ajax/requests/ab_logging.php',_L1).send();}
function UINav(_L0,_L1,_L2){this.controller=_L0;this.data=_L2;copy_properties(this,{controller:_L0,data:_L2,items:[],selectedItem:null,selectedClass:this.selectedClass||''});this.initializeItems(_L1);UINav.instances[_L0.id]=this;}UINav.instances={};UINav.prototype.getItemContainers=abstractMethod;UINav.prototype.getItemLinks=abstractMethod;UINav.prototype.getItems=function(){return this.items;};UINav.prototype.initializeItems=function(_L0){var _L1=this.getItemContainers();for(var i=0;i<_L1.length;i++){var _L3=(_L1[i].scry('a')||[])[0];if(!_L3)break;var _L4={};if(this.is_wrapped){_L4=(_L0[i]||{});}else _L4={'container':_L1[i],'link':_L3,'data':(_L0[i]||{})};this.items.push(_L4);if(CSS.hasClass(_L4.container,this.selectedClass))this.selectedItem=_L4;_L4.addClickHandler=this.addClickHandler.bind(this,_L4);_L4.addClickHandler(this.selectItem.bind(this,_L4));}};UINav.prototype.selectItem=function(_L0){if(_L0==this.selectedItem)return true;if(this.selectedItem)CSS.removeClass(this.selectedItem.container,this.selectedClass);if(_L0)CSS.addClass(_L0.container,this.selectedClass);this.selectedItem=_L0;return true;};UINav.prototype.deselectAll=function(){if(this.selectedItem)CSS.removeClass(this.selectedItem.container,this.selectedClass);this.selectedItem=null;};UINav.prototype.getSelectedItem=function(){return this.selectedItem;};UINav.prototype.addClickHandler=function(_L0,_L1){if(typeof _L0=='function'){_L1=_L0;this.getItems().each(function(_L1,_L0){this.addClickHandler(_L0,_L1);}.bind(this,_L1));return true;}else return Event.listen(_L0.link,'click',_L1);};function UINavGeneric(_L0,_L1,_L2){if(!this.selectedClass)this.selectedClass='UINavGeneric_ItemSelected';this.parent.construct(this,_L0,_L1,_L2);}UINavGeneric.extend('UINav');UINavGeneric.prototype.getItemContainers=function(){if(!this.containers)this.containers=DOM.scry(this.controller,'li');return this.containers;};UINavGeneric.prototype.getItemLinks=function(){if(!this.containerLinks)this.containerLinks=DOM.scry(this.controller,'li a');return this.containerLinks;};function UITabStructure(_L0,_L1,_L2){if(!this.selectedClass)this.selectedClass='UITabStructure_TabSelected';this.parent.construct(this,_L0,_L1,_L2);}UITabStructure.extend('UINavGeneric');UITabStructure.prototype.getItemContainers=function(){if(!this.tab_containers){this.tab_containers=[];var _L0=DOM.scry(this.controller,'li');for(var i=0;i<_L0.length;i++)this.tab_containers.push(_L0[i].childNodes[0]);}return this.tab_containers;};function UISourceList(_L0,_L1,_L2){if(!this.selectedClass)this.selectedClass='UISourceList_ItemSelected';this.parent.construct(this,_L0,_L1,_L2);}UISourceList.extend('UINavGeneric');
function UIFilterList(_L0,_L1,_L2){this.selectedClass='selected';this._itemsContainer=DOM.scry(_L0,'div.UIFilterList_List')[0];this.parent.construct(this,_L0,_L1,_L2);}UIFilterList.extend('UINav');UIFilterList.prototype.getItemContainers=function(){if(!this.containers)this.containers=DOM.scry(this.controller,'div.UIFilterList_Item');return this.containers;};UIFilterList.prototype.getItemLinks=function(){if(!this.containerLinks)this.containerLinks=DOM.scry(this.controller,'div.UIFilterList_Item a');return this.containerLinks;};UIFilterList.prototype.resetItemContainers=function(){this.containers=null;};UIFilterList.prototype.resetItemLinks=function(){this.containerLinks=null;};UIFilterList.prototype.setEditIconHandler=function(_L0){this._editIconHandler=_L0;return this;};UIFilterList.prototype.setLoading=function(_L0){CSS.conditionClass(this.controller,'UIFilterList_Loading',_L0);};UIFilterList.prototype.setCreateLinkHandler=function(_L0){var _L1=DOM.find(this.controller,'a.UIFilterList_Create');_L1.listen('click',_L0);};UIFilterList.prototype.addItem=function(_L0,_L1,pos,_L3,_L4){if(!pos)pos=0;var _L5=this.getItems();_L4=_L4?_L4:{};var _L6=$N('div',{className:'UIFilterList_Item'});var _L7=$N('a',{className:'UIFilterList_ItemLink',href:_L1});if(_L3){var _L8=$N('span',{className:'UIImageBlock_Image UIFilterList_Icon'});_L8.setStyle('backgroundImage','url('+_L3+')');var _L9=$N('div',{className:'UIImageBlock clearfix'});_L9.appendContent(_L8);_L9.appendContent($N('div',{className:'UIImageBlock_Content UIFilterList_Title'},_L0));_L7.appendContent(_L9);}else _L7.appendContent($N('div',{className:'UIImageBlock_Content UIFilterList_Title '+'UIFilterList_TitleWithoutIcon'},_L0));var _La=$N('span',{className:'UIFilterList_LoadingIndicator'});_L6.setContent([_L7,_La]);var _Lb={container:_L6,link:_L7,data:_L4};if(_L5.length>0){if(this.getItems()[pos]){DOM.insertBefore(_L6,_L5[pos].container);}else{pos=pos-1;DOM.insertAfter(_L5[pos].container,_L6);}}else{this._itemsContainer.appendContent(_L6);CSS.removeClass(this.controller,'UIFilterList_HasBlankState');}this.getItems().splice(pos,0,_Lb);this.getItemContainers().splice(pos,0,_Lb.container);this.getItemLinks().splice(pos,0,_Lb.link);return _Lb;};UIFilterList.prototype.setItemTitle=function(_L0,_L1){var _L2=DOM.find(_L0.link,'div.UIFilterList_Title');_L2.setContent(_L1);};UIFilterList.prototype.removeItem=function(_L0){var _L1=this.getItems();var _L2=null;for(var i=0;i<_L1.length;i++)if(_L1[i]==_L0){_L2=i;break;}if(_L2!=null){if(this.selectedItem==_L0)this.selectItem(null);this.getItemContainers().splice(_L2,1);this.getItemLinks().splice(_L2,1);this.getItems().splice(_L2,1);DOM.remove(_L0.container);}if(_L1.length==0)CSS.addClass(this.controller,'UIFilterList_HasBlankState');};

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