
Citysearch.Listing.Search.Roundup=new Class({Extends:Citysearch.Listing.Search,initialize:function(pageType,options){if(Citysearch.logging>=3){console.info("INFO: Citysearch.Listing.Search.Roundup.initialize");}
Citysearch.AjaxInit.activeRequest=new Request();this.id.pageType=pageType;this.id.whereFieldId="roundupWhere";this.id.whatFieldId="roundupWhat";this.id.geoFilterId="geoFilter";this.id.ppFormId="ppForm";this.id.rppFieldBlockId="rpp";this.id.ppSelectId="ppSelect";this.id.ppSortId="ppSort";this.id.ppSubmitId="ppSubmit";this.id.hideClass="hide";this.id.pagingClass="paging";this.defaults.popupLimitSm=10;this.defaults.popupLimitMed=20;this.defaults.popupWidthSm=225;this.defaults.popupWidthMed=500;this.defaults.popupWidthLg=780;this.defaults.scrollToTop=true;this.defaults=$merge(this.defaults,options);},hijaxWhere:function(){if($(this.id.whereFieldId)){var whereFieldObj=$(this.id.whereFieldId);this.whereComplete=new Citysearch.AutoComplete(whereFieldObj,'/search/autocomplete',{'interval':50,'superviseInterval':10});}},hijaxWhat:function(){if($(this.id.whatFieldId)){var whatFieldObj=$(this.id.whatFieldId);this.whatComplete=new Citysearch.AutoComplete(whatFieldObj,'/search/whatautocomplete',{'interval':50,'superviseInterval':10,'hiddenFieldName':'catId'});}}});var roundupSearch=new Citysearch.Listing.Search.Roundup('search_grid_lists',{'updateTarget':$('roundupSearch')});if(window.location.href.contains('#')&&!window.location.href.contains('#done')){window.addEvent('domready',function(){roundupSearch.backButtonFix();roundupSearch.postViaAjax(Citysearch.AjaxInit.hijaxHref($(roundupSearch.id.ppFormId).action),$('roundupSearch'));});window.addEvent('beforeunload',function(){if(Citysearch.TempConfig.Search.searchMap){window.location.hash=Citysearch.TempConfig.Search.searchMap;}});}
else{window.addEvent('domready',function(){roundupSearch.hijaxPaging();roundupSearch.hijaxPerPage(Citysearch.TempConfig.Search.totalResults);roundupSearch.hijaxSort();roundupSearch.showRefineMoreLink('GEO',$('geoFilter'),'Locations');roundupSearch.hijaxWhere();roundupSearch.hijaxWhat();});if(!Citysearch.TempConfig.Search.ajax){window.addEvent('beforeunload',function(){if(Citysearch.TempConfig.Search.searchMap){window.location.hash=Citysearch.TempConfig.Search.searchMap;}});}}