/*    HTTP Host:  b.static.ak.fbcdn.net                                        */
/*    Generated:  January 26th 2010 9:32:13 PM PST                             */
/*      Machine:  10.16.139.110                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/8mbjan5wytwc0kg8.pkg.js h:dln8pdwj                        */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/8mbjan5wytwc0kg8.pkg.js                                   */

if (window.CavalryLogger) { CavalryLogger.start_js(["js\/8mbjan5wytwc0kg8.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');};

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