/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  January 27th 2010 12:20:18 PM PST                            */
/*      Machine:  10.16.139.109                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/7mv1oroh6l0ck8oo.pkg.js h:37b2ck5a                        */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/7mv1oroh6l0ck8oo.pkg.js                                   */

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

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');};
function UIStaticHomeFilter(_L0,_L1,_L2,_L3,_L4,_L5){this.parent.construct(this,_L0,_L2,_L4);copy_properties(this,{root:_L0,stream:_L5,assoc_id:_L1,num_visible:_L3});if(this.stream){UIStaticHomeFilter.activate(this,this.stream.getID());var _L6=function(){UIStaticHomeFilter.active[this.stream.getID()].each(function(_L8){if(this!==_L8)_L8.deselectAll();}.bind(this));}.bind(this);this.addClickHandler(_L6);this.stream.setHomeFilter(this);}var _L7=UIStaticHomeFilter.handlePageTransition.bind(this);PageTransitions.registerHandler(_L7);this.editModeLink=_L0.find('a.UIFilterList_EditLink');this.editModeLink.listen('click',this.enableEdit.bind(this));if(CSS.hasClass(this.root,'UIFilterList_ShowHiddenSection'))this.enableEdit();Arbiter.subscribe(Arbiter.LIST_EDITOR_LISTS_CHANGED,this._listsChanged.bind(this),Arbiter.SUBSCRIBE_NEW);}UIStaticHomeFilter.extend('UIFilterList');UIStaticHomeFilter.prototype={loadFilterByKey:function(_L0){if(_L0==UIIntentionalStream.FEED_FILTER_KEY_NEW_HIGHLIGHTS||_L0==UIIntentionalStream.FEED_FILTER_KEY_NEWS_FEED)_L0=UIIntentionalStream.FEED_FILTER_KEY_DUAL_NEWS_FEED;for(var i=0,l=this.items.length;i<l;i++){var _L3=this.items[i];if(_L3.data.filter==_L0)return this.selectItem(_L3);}return false;},_listsChanged:function(_L0,_L1){if(_L0==Arbiter.LIST_EDITOR_LISTS_CHANGED)if(_L1.is_new_list){var _L1={new_key:'fl'+'_'+_L1.list_info.list_id,id:this.assoc_id};new AsyncRequest().setURI('/ajax/filterlist.php').setData(_L1).setHandler(function(_L2){goURI(URI('/home.php').addQueryData({filter:_L2}),true);}.bind(null,_L1.new_key)).send();}else goURI(URI('/home.php'),true);}};UIStaticHomeFilter.handlePageTransition=function(uri){var _L1=uri.getQueryData();if(!this.stream||_L1.disable_nile||_L1.ref||(uri.getPath()!='/'&&uri.getPath()!='/home.php'))return false;this.loadFilterByKey(_L1.filter);var _L2={filter:_L1.filter};this.stream.refresh(UIIntentionalStream.REFRESH_TRANSITION,_L1,_L2);return true;};UIStaticHomeFilter.activate=function(_L0,_L1){if(!UIStaticHomeFilter.active[_L1])UIStaticHomeFilter.active[_L1]=[];UIStaticHomeFilter.active[_L1].push(_L0);};UIStaticHomeFilter.active={};UIStaticHomeFilter.prototype.enableEdit=function(){if(this.homeFilter){this.homeFilter.beginEditMode();}else Bootloader.loadComponents('UIHomeFilter',this.loadedResources.bind(this));};UIStaticHomeFilter.prototype.loadedResources=function(){this.homeFilter=new UIHomeFilter(this.controller,this.assoc_id,this.items,this.num_visible,this.data,true);this.homeFilter.beginEditMode();};

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