/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  February 10th 2010 3:20:57 AM PST                            */
/*      Machine:  10.16.139.107                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/4hwdl7uxif0gckc4.pkg.js h:9qs54m03                        */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/4hwdl7uxif0gckc4.pkg.js                                   */

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

function network_source(_L0){this.get_selected_type=_L0;this.parent.construct(this);this.ready();}network_source.extend('typeahead_source');network_source.prototype.cache_results=true;network_source.prototype.search_limit=200;network_source.prototype.text_placeholder=network_source.prototype.text_noinput=_tx("Enter a city, workplace, school, or region.");network_source.prototype.base_uri='';network_source.prototype.allow_fake_results=true;network_source.prototype.search_value=function(_L0){this.search_text=_L0;var _L1={q:_L0};if((type=typeof(this.get_selected_type))!='undefined')_L1['t']=(type!='string')?JSON.encode(this.get_selected_type):this.get_selected_type;if((type=typeof(this.t))!='undefined')_L1['t']=(type!='string')?JSON.encode(this.t):this.t;if(this.show_email)_L1['show_email']=1;if(this.show_network_type)_L1['show_network_type']=1;if(this.disable_school_status)_L1['disable_school_status']=1;new AsyncRequest().setReadOnly(true).setMethod('GET').setURI('/ajax/typeahead_networks.php').setData(_L1).setHandler(function(_L2){this.owner.found_suggestions(_L2.getPayload(),this.search_text);}.bind(this)).setErrorHandler(function(_L2){this.owner.found_suggestions(false,this.search_text);}.bind(this)).send();};network_source.prototype.gen_html=function(_L0,_L1){return ['<div>',typeahead_source.highlight_found(_L0.t,_L1),'</div><div><small>',typeahead_source.highlight_found(_L0.l,_L1),'</small></div>'].join('');};
function NoResultsDisplayer(_L0){this.hitAnyErrors=false;this.producedAnyResults=false;this.anyFiltersApplied=false;this.sources=_L0;}NoResultsDisplayer.init=function(_L0){NoResultsDisplayer._instance=new NoResultsDisplayer(_L0);};NoResultsDisplayer.instance=function(){return NoResultsDisplayer._instance;};copy_properties(NoResultsDisplayer.prototype,{producedResults:function(){this.producedAnyResults=true;},hitError:function(){this.hitAnyErrors=true;},filtersApplied:function(){this.anyFiltersApplied=true;},visit:function(_L0){this.sources.remove(_L0);if(this.sources.length==0&&!this.producedAnyResults&&!this.hitAnyErrors){show('search_no_results_message');if(!this.anyFiltersApplied)hide('search_filter_bar');}}});
function UIIntentionalStreamSearch(_L0,_L1,_L2,_L3,_L4,_L5,_L6,_L7){copy_properties(this,{searchSessionId:_L6,extraSearchParams:_L7});this.parent.construct(this,_L0,_L1,_L2,_L3,0,0,_L4,_L5);this.setAutoRefreshConfig({inactive_threshold:30*1000,fast_refresh_rate:10*1000,slow_refresh_rate:300*1000,allow_auto_refresh:true,allow_polling:true,min_refresh_interval:10*1000});this.enableAutoRefresh(true);}UIIntentionalStreamSearch.prototype.getValidParams=function(){return UIIntentionalStreamSearch.VALID_PARAMS;};UIIntentionalStreamSearch.prototype.getEndpoint=function(){return UIIntentionalStreamSearch.ENDPOINT;};UIIntentionalStreamSearch.prototype.refresh=function(_L0,_L1,_L2){_L1.sessionId=this.searchSessionId;this.parent.refresh(_L0,_L1,_L2);};UIIntentionalStreamSearch.prototype.getCurrentParams=function(){params=this.parent.getCurrentParams();copy_properties(params,this.extraSearchParams);return params;};UIIntentionalStreamSearch.prototype.schedulePoll=function(_L0){if(this.isInactive())this.allowPolling=false;this.parent.schedulePoll(_L0);};UIIntentionalStreamSearch.prototype.userActivity=function(){this.allowPolling=true;this.parent.userActivity();};UIIntentionalStreamSearch.extend('UIIntentionalStream');copy_properties(UIIntentionalStreamSearch,{VALID_PARAMS:null,ENDPOINT:'/ajax/stream/search.php'});
function UIResultRenderer(_L0){this.filter=_L0;this.queryBox=$('SearchPageInput');}UIResultRenderer.prototype={refresh:function(_L0,_L1){var _L2=this._handleResponse.bind(this,_L0,_L1);var _L3=this._handleFinally.bind(this);var _L4=this._handleError.bind(this);new AsyncRequest().setURI(UIResultRenderer.ENDPOINT).setReadOnly(true).setMethod('GET').setData(_L0).setHandler(_L2).setErrorHandler(_L4).setTransportErrorHandler(_L4).setFinallyHandler(_L3).send();return this;},_handleResponse:function(_L0,_L1,_L2){for(var i in UIIntentionalStream.instances)try{var _L4=UIIntentionalStream.instances[i];if(_L4)_L4.unload();}catch(e){}this.queryBox.value=_L0.q;var _L5=_L2.getPayload();if(!_L5['is_default_view'])_L5.is_default_view=false;CSS.conditionClass(UIResultRenderer.middle_column,'UIResultRenderer_DefaultPadding',_L5.is_default_view);NoResultsDisplayer.init(["object","stream","web"]);var _L6=UIResultRenderer.search_pagelets;for(var _L7 in _L6)_L6[_L7].getElement(true).setContent(HTML(_L5[_L7]));if(_L5.filter_list_filter&&_L1)this.filter.setInlineContent(_L1,HTML(_L5.filter_list_filter));DOMScroll.scrollTo(new Vector2(0,0,'document'),false);},_handleFinally:function(){if(this.filter)this.filter.setLoading(false);PageTransitions.transitionComplete();},_handleError:bagofholding};UIResultRenderer.ENDPOINT='/ajax/search/results.php';
function UISearchFilter(_L0,_L1,_L2,_L3){this.parent.construct(this,_L0,_L1,_L2);this.query=_L3;this.typeData={};this.resultRenderer=new UIResultRenderer(this);PageTransitions.registerHandler(this.handlePageTransition.bind(this));}UISearchFilter.extend('UIFilterList');UISearchFilter.prototype={handlePageTransition:function(uri){var _L1=UISearchFilter.SEARCH_REF_UNIVERSAL;var _L2=UISearchFilter.SEARCH_ROOT;var _L3=UISearchFilter.SEARCH_FILTER_SRC;var _L4=UISearchFilter.SEARCH_FILTER_OBJ_TYPE;var _L5=UISearchFilter.SEARCH_FILTER_FRIENDS;var _L6=UISearchFilter.SEARCH_FILTER_GLOBAL;var _L7=UISearchFilter.SEARCH_FILTER_QUERY;var _L8=uri.getQueryData();if(uri.getPath()!=_L2||_L8.ref==_L1)return false;this.typeData[_L4]=_L8[_L4];this.typeData[_L5]=_L8[_L5];this.typeData[_L6]=_L8[_L6];var _L9=this.getItems();for(var i=0;i<_L9.length;i++){var _Lb=_L9[i];var t=new URI(_Lb.link.href).getQueryData();if(t[_L4]==this.typeData[_L4]&&t[_L5]==this.typeData[_L5]&&t[_L6]==this.typeData[_L6]){if(_Lb!==this.getSelectedItem())this.selectItem(_Lb);break;}}var _Ld={};_Ld[_L7]=_L8[_L7];this.items.each(function(_Lb){var tmp=new URI(_Lb.link.href).addQueryData(_Ld);_Lb.link.href=tmp.toString();});this.setLoading(true);this.resultRenderer.refresh(_L8,_Lb);return true;}};copy_properties(UISearchFilter,{SEARCH_REF_UNIVERSAL:'search',SEARCH_ROOT:'/search/',SEARCH_FILTER_SRC:'flt',SEARCH_FILTER_QUERY:'q',SEARCH_FILTER_OBJ_TYPE:'o',SEARCH_FILTER_FRIENDS:'fr',SEARCH_FILTER_GLOBAL:'gl'});

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