
	// fu: buildWheresFromForm
	function buildWheresFromForm( s ){
		
		var criteria = $.extend( true, { }, configs[ s ].criteria );					
		var curVal = "";
		var curKeys = [ ];
		
		
		// Iterate through all distinct types
		for( w in configs[ s ].wheres ){
		
			// Iterate through all of the associated fields
			for( var cf = 0; cf < configs[ s ].wheres[ w ].length;  cf++ ){
				
				switch( configs[ s ].wheres[ w ][ cf ].TYPE ){
				
					case "text":
						
						curVal = $( '#' + configs[ s ].wheres[ w ][ cf ].ID ).val( );
					
						if( curVal != "" ){
						
							// If it's the first criteria for this type, add the type object
							if( criteria[ w ] == undefined ){
								
								criteria[ w ] = [ ];
								
							}
							
							criteria[ w ].push( { idf: configs[ s ].wheres[ w ][ cf ].IDF, type: "text", val: curVal } );
							
						}
						
						
					break;
					
					case "select":
						
						curVal = configs[ s ].ajax_selects[ configs[ s ].wheres[ w ][ cf ].ID ];
						
						curKeys = [ ];
						
						for(var keyy in curVal){ if( curVal[ keyy ] ){ curKeys.push(keyy); } }
						   
						if( curKeys.length > 0 ){
							
							if( criteria[ w ] == undefined ){
								
								criteria[ w ] = [ ];
								
							}
							
							// If this is destinations, overwrite the destinations default item instead of pushing it
							if( w == 3668 && configs[ s ].wheres[ w ][ cf ].IDF == 20414 ){
									
								for( var i = 0; i < criteria[ w ].length; i++ ){
										
									if( criteria[ w ][ i ].idf == 20414 ){
									
										criteria[ w ][ i ] = { idf: configs[ s ].wheres[ w ][ cf ].IDF, type: "select", val: curKeys };
									
									}
									
								}
							
							} else {
								
								criteria[ w ].push( { idf: configs[ s ].wheres[ w ][ cf ].IDF, type: "select", val: curKeys } );
							
							}
							
						}
						
					break;
				
				}
				
				
			} // Iterate through fields
		
		
		} // Iterate through types
		
		
			// Manually add fish groups here
			if( configs[ s ].specialFishingSearch == 'group' ){
			
				configs[ s ].curFishTypes = [ ];
						
				for( var keyy in configs[ s ].ajax_selects.input_fish_types ){ if( configs[ s ].ajax_selects.input_fish_types[ keyy ] ){ configs[ s ].curFishTypes.push( keyy ); } }
						
				//if( configs[ s ].curFishTypes.length == 0 ){
					
					//for( var keyy in configs[ s ].alls.input_fish_types ){ if( configs[ s ].alls.input_fish_types[ keyy ] ){ configs[ s ].curFishTypes.push( keyy ); } }
				
				//} 
				
			}
		
		
			// Manually add special lodging searches here
			if( configs[ s ].specialLodgingSearch == 'group' || configs[ s ].specialLodgingSearch == 'parent' ){
			
				var curBrands = [ ];
						
				for( var keyy in configs[ s ].ajax_selects.input_brand ){ if( configs[ s ].ajax_selects.input_brand[ keyy ] ){ curBrands.push( keyy ); } }
						
				if( curBrands.length == 0 ){
					
					for( var keyy in configs[ s ].alls.input_brand ){ if( configs[ s ].alls.input_brand[ keyy ] ){ curBrands.push( keyy ); } }
				
				} 
				
				if( criteria[ 3647 ] == undefined ){ criteria[ 3647 ] = [ ]; }
				
					criteria[ 3647 ].push( { idf: 20140, type: "select", val: curBrands } );
				
			}
		
		
		return criteria;
		
	} // fux: buildWheresFromForm
	
	// fu: initializeSRPMap
	function initializeSRPMap( s, idMap ) {
                
		//console.log( idMap + ": " + "srpMap#v.index#" );
		  if( GBrowserIsCompatible( ) ) { 
		  
			configs[ s ].srpMap = new GMap2(document.getElementById( idMap ));
			configs[ s ].srpMap.addMapType(G_PHYSICAL_MAP);
			configs[ s ].srpMap.addControl(new GSmallZoomControl3D());
			
			var mapControl = new GHierarchicalMapTypeControl();
				mapControl.clearRelationships();
				mapControl.addRelationship(G_SATELLITE_MAP, G_HYBRID_MAP, "Labels", false);
			
			configs[ s ].srpMap.addControl(mapControl);
			configs[ s ].srpMapBounds = new GLatLngBounds();
			
	//		 the below needs to be called after the map is pop-upped
	//		 in addition to here.  The setCenter call here initializes the map center regardless
	//		 of the map width & height, and then is called again after the markers are added
	
			configs[ s ].srpMap.setCenter(new GLatLng(40.771592,-111.888189), 8);
	
		  }
		  
	}
	
	// fu: manageKeystrokeSearching
	function manageKeystrokeSearching( s, id ){
	
		// Clear any previous timeout
		clearTimeout( configs[ s ].keystrokes[ id ] );
	
		// Set a new timeout
		configs[ s ].keystrokes[ id ] = setTimeout( function( ){ surch( s, true ); }, 300 );
	
	}
	
	// fu: manageLocaleControl
	function manageLocaleControl( s, id_destinations ){
		
		
		var dests = configs[ s ].ajax_selects[ configs[ s ].idDestinationControl ];
		var ht = '';
		var picks = 0;
		var instantiateMultiselect = false;
		var loques = '';
		var crits = [ ];
		var multiArgs = { oneOrMoreSelected: '*' };
		var maxLoquesToShow = 15;
		
		
		// Calculate if they picked 1 or not 1 option
		for( pick in dests ){
			
			if( dests[ pick ] == true ){
		
				picks++;
				crits.push( pick );
			
			}
		
		}
		
			
			if( picks == 0 ){
				
				ht += '<br/><span style="padding: 4px; font-size: 11px; font-weight: 700; color: rgb(17, 17, 17);">No locales available</span>';
				
			} else {
			
				// Get the locales if not already gotten
				//if( configs[ s ].localeCache[ id_destinations ] == undefined )
				loques = toQuery( $.cfc( 'ajax.locales', 'glbi', { id_destinations: crits, idType: configs[ s ].idt } ) );
				
				
				//localeCache#v.index#[ id_destinations ] = toQuery( $.cfc( 'app.destination_locales__parent_destination', 'get', { id_destinations: id_destinations, include: 'destination_locales' } ) );
				
				if( loques.rc > 0 ){
				
				// Get a local copy
					
					instantiateMultiselect = true;
					
					configs[ s ].alls[ configs[ s ].idLocaleControl ] = { };
					
					ht += "<select id='" + configs[ s ].idLocaleControl + "'>";
					
						ht += "<option value=''></option>";
					
						for( var ci = 0; ci < Math.min( maxLoquesToShow, loques.rc ); ci++ ){
						
							configs[ s ].alls[ configs[ s ].idLocaleControl ][ loques.id_destination_locales[ ci ] ] = true;
							ht += "<option value='" + loques.id_destination_locales[ ci ] + "'>" + loques.display[ ci ] + "</option>";
						
						}
						
						// Show the user a message if there are more items than displayable
						if( loques.rc > maxLoquesToShow ){
							
							multiArgs.message = "Not all locales are shown. Select fewer destinations to narrow this list.";
							
						}
					
					ht += "</select>";
					
				} else {
				
					ht += '<br/><span style="padding: 4px; font-size: 11px; font-weight: 700; color: rgb(17, 17, 17);">No locales available</span>';
				
				}
					
			}
				
			
		
		// Update the page
		$( '#locales' + s ).html( ht );
		
		// Deselect the selection?
		//$( '#' + configs[ s ].idLocaleControl ).attr( 'disabled', true );
		
		if( instantiateMultiselect ){
			
		  $( "#" + configs[ s ].idLocaleControl ).multiSelect( multiArgs, function( e ){ var xange = $( e ); selectAndSearch( s, configs[ s ].idLocaleControl, xange.val( ), xange.attr( 'checked' ) ); } );	
		
		}
		
	} // fux: manageLocaleControl
	
	
	// fu: paginate
	function paginate( s ){
		
		var ht = "";
		var showing = "";
		
		if( configs[ s ].includePages ){
		
		// Calculate the number of pages
		ht += '<div class="paginationNumbers">';
		
		/* Between 1-9 */
		if( configs[ s ].page < 9 ){
					
					if( configs[ s ].pages == 1 ){
						
					} else {
						
						ht += 'Page';
						
						if( configs[ s ].page > 1 ){
							ht += '<a href="#top" onclick=" configs[ ' + s + ' ].page = ' + ( configs[ s ].page - 1 ) + '; surch( ' + s + ' ); " >Prev</a>...';
						}
						else {
							ht += '<span>Prev</span>';
						}
					
						/* Middle pages */				
						for( var i = 1; i <= Math.min( 9, configs[ s ].pages ); i++ ){
						
							if( i == configs[ s ].page ){
								
								ht += '<span>' + i + '</span>';
								
							} else {
								
								ht += '<a href="#top" onclick=" configs[ ' + s + ' ].page = ' + i + '; surch( ' + s + ' ); " >' + i + '</a>';
							
							}
						
						} 
					
					
						/* Next Page */
						if( configs[ s ].items > ( configs[ s ].page * configs[ s ].itemsPerPage ) ){									
							ht += '...<a href="#top" onclick=" configs[ ' + s + ' ].page = configs[ ' + s + ' ].page + 1; surch( ' + s + ' ); " >Next</a>';
						}
						else { 
							ht += '...<span>Next</span>';
						}
						
						if( configs[ s ].pages > 9 ){
							ht += '<a href="#top" onclick=" configs[ ' + s + ' ].page = ' + configs[ s ].pages + '; surch( ' + s + ' ); " >Last</a>';
						}
						
					}
			
			} else {
			/* End */
			if( configs[ s ].page > ( configs[ s ].pages - 9 ) ){
						
						ht += 'Page';
				
						ht += '<a href="#top" onclick=" configs[ ' + s + ' ].page = 1; surch( ' + s + ' );" >First</a>';
					
						ht += '<a href="#top" onclick=" configs[ ' + s + ' ].page = ' + ( configs[ s ].page - 1 ) + '; surch( ' + s + ' );" >Prev</a>...';
					
						/* Middle pages */					
						for( var i = configs[ s ].pages - 9; i <= configs[ s ].pages; i++ ){
						
							if( i == configs[ s ].page ){
								
								ht += '<span>' + i + '</span>';
								
							} else {
								
								ht += '<a href="#top" onclick=" configs[ ' + s + ' ].page = ' + i + '; surch( ' + s + ' );" >' + i + '</a>';
							
							}
						
						} 
					
						if( configs[ s ].page < configs[ s ].pages )
						ht += '...<a href="#top" onclick=" configs[ ' + s + ' ].page = ' + ( configs[ s ].page + 1 ) + '; surch( ' + s + ' );" >Next</a>';
						else 
						ht += '...<span>Next</span>';
					
					
			} else {
			/* Middle */
							
						
						ht += 'Page';
						
						/* First and prev page */
						ht += '<a href="#top" onclick=" configs[ ' + s + ' ].page = 1; surch( ' + s + ' ); " >First</a>';
						ht += '<a href="#top" onclick=" configs[ ' + s + ' ].page = configs[ ' + s + ' ].page - 1; surch( ' + s + ' ); " >Prev</a>...';
					
					
						/* Middle pages */				
						for( var i = configs[ s ].page - 3; i <= Math.min( configs[ s ].pages, configs[ s ].page + 3 ); i++ ){
						
							if( i == configs[ s ].page ){
								
								ht += '<span>' + i + '</span>';
								
							} else {
								
								ht += '<a href="#top" onclick=" configs[ ' + s + ' ].page = ' + i + '; surch( ' + s + ' );" >' + i + '</a>';
							
							}
						
						} 
					
					
						/* Last and next page */
						ht += '...<a href="#top" onclick=" configs[ ' + s + ' ].page = configs[ ' + s + ' ].page + 1; surch( ' + s + ' ); " >Next</a>';
						ht += '<a href="#top" onclick=" configs[ ' + s + ' ].page = ' + configs[ s ].pages + '; surch( ' + s + ' ); " >Last</a>';
		
			}
		
		}
		
		ht += '</div>';
	
		}
	
		// Showing
		
		showing += '<div class="paginationCounter">Showing ';
		
		showing += '<span class="resultsCounter">' + ( ( configs[ s ].page * configs[ s ].itemsPerPage ) - ( configs[ s ].itemsPerPage - 1 ) ) + '-' + ( Math.min( configs[ s ].page * configs[ s ].itemsPerPage, configs[ s ].items ) ) + '</span>of<span class="resultsCounter">' + configs[ s ].items + '</span></div>';
		
		//$( '#paginationShowingTop' + s ).html( showing );
		
		
		
		ht += '<div class="paginationCounter">Showing ';
		
		ht += '<span class="resultsCounter">' + ( ( configs[ s ].page * configs[ s ].itemsPerPage ) - ( configs[ s ].itemsPerPage - 1 ) ) + '-';
		
		
			if( configs[ s ].includePages ) {
				
				ht += ( Math.min( configs[ s ].page * configs[ s ].itemsPerPage, configs[ s ].items ) ) + '</span>of<span class="resultsCounter">' + configs[ s ].items + '</span></div>';
			
			} else {
			
				ht += configs[ s ].items + '</span>of<span class="resultsCounter">' + configs[ s ].items + '</span></div>';
			
			}
		
		// Update both the top and bottom with the new pagination
		$( '#pagingBottom' + s ).html( ht );
		
	} // fux: paginate
	
	
				
	// fu: paginateTop
	function paginateTop( s ){
		
		var ht = "";
		/* var showing = ""; */
		
		if( configs[ s ].includePages ){
		
		// Calculate the number of pages
		ht += '<div class="paginationNumbers">';
		
		/* Between 1-3 */
		if( configs[ s ].page < 3 ){
					
					if( configs[ s ].pages == 1 ){
						
					} else {
						
						ht += 'Page';
						
						if( configs[ s ].page > 1 ){
							ht += '<a href="#top" onclick=" configs[ ' + s + ' ].page = ' + ( configs[ s ].page - 1 ) + '; surch( ' + s + ' ); " >Prev</a>...';
						}
						else {
							ht += '<span>Prev</span>';
						}
					
						/* Middle pages */					
						for( var i = 1; i <= Math.min( 3, configs[ s ].pages ); i++ ){
						
							if( i == configs[ s ].page ){
								
								ht += '<span>' + i + '</span>';
								
							} else {
								
								ht += '<a href="#top" onclick=" configs[ ' + s + ' ].page = ' + i + '; surch( ' + s + ' ); " >' + i + '</a>';
							
							}
						
						} 
					
					
						/* Next page */
						if( configs[ s ].items > ( configs[ s ].page * configs[ s ].itemsPerPage ) ){									
							ht += '...<a href="#top" onclick=" configs[ ' + s + ' ].page = configs[ ' + s + ' ].page + 1; surch( ' + s + ' ); " >Next</a>';
						}
						else { 
							ht += '...<span>Next</span>';
						}
						
						if( configs[ s ].pages > 3 ){
							ht += '<a href="#top" onclick=" configs[ ' + s + ' ].page = ' + configs[ s ].pages + '; surch( ' + s + ' ); " >Last</a>';
						}
						
					}
			
			} else {
			/* End */
			if( configs[ s ].page > ( configs[ s ].pages - 3 ) ){
						
						ht += 'Page';
				
						ht += '<a href="#top" onclick=" configs[ ' + s + ' ].page = 1; surch( ' + s + ' ); return false;" >First</a>';
					
						ht += '<a href="#top" onclick=" configs[ ' + s + ' ].page = ' + ( configs[ s ].page - 1 ) + '; surch( ' + s + ' ); " >Prev</a>...';
					
						/* Middle pages */					
						for( var i = configs[ s ].pages - 3; i <= configs[ s ].pages; i++ ){
						
							if( i != 0 ){
									
								if( i == configs[ s ].page ){
									
									ht += '<span>' + i + '</span>';
									
								} else {
									
									ht += '<a href="#top" onclick=" configs[ ' + s + ' ].page = ' + i + '; surch( ' + s + ' ); " >' + i + '</a>';
								
								}
								
							}
						} 
					
					
						if( configs[ s ].page < configs[ s ].pages )
						ht += '...<a href="#top" onclick=" configs[ ' + s + ' ].page = ' + ( configs[ s ].page + 1 ) + '; surch( ' + s + ' ); " >Next</a>';
						else 
						ht += '...<span>Next</span>';
					
					
			} else {
			/* Middle */
							
						
						
						ht += 'Page';
						
						
						ht += '<a href="#top" onclick=" configs[ ' + s + ' ].page = 1; surch( ' + s + ' ); return false;" >First</a>';
						ht += '<a href="#top" onclick=" configs[ ' + s + ' ].page = configs[ ' + s + ' ].page - 1; surch( ' + s + ' ); " >Prev</a>...';
					
									
						for( var i = configs[ s ].page - 1; i <= Math.min( configs[ s ].pages, configs[ s ].page + 1 ); i++ ){
						
							if( i == configs[ s ].page ){
								
								ht += '<span>' + i + '</span>';
								
							} else {
								
								ht += '<a href="#top" onclick="configs[ ' + s + ' ].page = ' + i + '; surch( ' + s + ' ); " >' + i + '</a>';
							
							}
						
						} 
					
					
						ht += '...<a href="#top" onclick=" configs[ ' + s + ' ].page = configs[ ' + s + ' ].page + 1; surch( ' + s + ' ); " >Next</a>';
						ht += '<a href="#top" onclick=" configs[ ' + s + ' ].page = ' + configs[ s ].pages + '; surch( ' + s + '); " >Last</a>';
						
						
						
						
						
		
			}
		
		}
	
		
		
		ht += '</div>';
		
	}
		
		ht += '<div class="paginationCounter">Showing ';
		
		ht += '<span class="resultsCounter">' + ( ( configs[ s ].page * configs[ s ].itemsPerPage ) - ( configs[ s ].itemsPerPage - 1 ) ) + '-';
		
			if( configs[ s ].includePages ){
				
				ht += ( Math.min( configs[ s ].page * configs[ s ].itemsPerPage, configs[ s ].items ) ) + '</span>of<span class="resultsCounter">' + configs[ s ].items + '</span></div>';
		
			} else {
				
				ht += configs[ s ].items + '</span>of<span class="resultsCounter">' + configs[ s ].items + '</span></div>';
				
			}
		
		// Update both the top and bottom with the new pagination
		$( '#pagingTop' + s ).html( ht );
		
		
		
	} // fux: paginateTop
	
	
	
	// fu: plotSingleItem
	function plotSingleItem( s, point, name, icon, url ) {
	
		var markerItem = createMarker( point, name, icon, url );	
		
			configs[ s ].srpMap.addOverlay( markerItem );
		
		var tooltip = new Tooltip( markerItem, name, 4 );
			
			markerItem.tooltip = tooltip; 
			
			configs[ s ].srpMap.addOverlay( tooltip );
			
		configs[ s ].srpMapBounds.extend( point );
		// configs[ s ].srpMap.setCenter( configs[ s ].srpMapBounds.getCenter(), configs[ s ].srpMap.getBoundsZoomLevel( configs[ s ].srpMapBounds ) );
		
	} // fux: plotSingleItem
	
	// fu: randomizeResults	
	function randomizeResults( data_A, data_B ){
	
		return 0.5 - Math.random();
		
	} // fux: randomizeResults

	// fu: repaginate
	function repaginate( s, r ){
		
		r = toQuery( r );
		
		// If it's the first set of results on the page, hide the controls if applicable
		if( configs[ s ].firstServe ){
			
			configs[ s ].firstServe = false;
			
			if( r.tot[ 0 ] == 0 ){
			
				// Hide stuff and mod dual display
				if( searches > 1 ){
					
					$( '#tc' + s ).attr( 'disabled', true );
					$( '#topicControlContainer' + s ).addClass( 'topicControlDisabled' );
					
					if( s == 1 )
					$( '#tc2' ).attr( 'checked', true );
					
					// Current config index
					cci = ( s == 1 )?2:1;
					
					// Manually switch the radio button
					$( '#tc' + ( s == 1 )?2:1 ).attr( 'checked', true );
					
					// Current config
					cc = configs[ cci ];
					
					// Swap out the intro text
					$( '#intro_text_1_text' ).html( cc.intro );
					
					// Swap in/out visibility
					for( var i = 1; i <= searches; i++ ){
						
						if( i != cci ){
							$( '#search' + i ).hide( );
						}
					
					}
					
					$( '#search' + cci ).show( );
					$( '#topicControlLabel' + s ).html( 'Show' );
				
				}
			
			} else {
			
				if( r.tot[ 0 ] <= 10 ){
				
					$( '#topicControlLabel' + s ).html( 'Show' );
				
				}
			
			}
			
		}
		
		
		
		configs[ s ].items = r.tot[ 0 ];
		configs[ s ].page = 1;
		configs[ s ].pages = Math.floor( r.tot[ 0 ] / configs[ s ].itemsPerPage );
		
		if( ( r.tot[ 0 ] % configs[ s ].itemsPerPage ) != 0 )
		configs[ s ].pages++;
		
		// RPP control
		if( configs[ s ].items <= 10 || configs[ s ].disableRPP ){
			$( '#rpp' + s ).attr( 'disabled', true );
		}
		else {
			$( '#rpp' + s ).attr( 'disabled', false );	
		}
		
		if( configs[ s ].defaultResults ){
		
			// Hide the form if less than a page
			if( configs[ s ].pages == 1 ){
			
				$( "#searchForm" + s + ",#h3Results" + s + ",#searchControlsFooter" + s + ",#h3Results" + s ).hide( );
				
			} 
			
			if( configs.length == 1 && configs[ s ].pages == 1 ){
				
				$( "#h3Search" + s ).addClass('noBorder').text(' '); 
				
			}
			
			configs[ s ].defaultResults = false;
		
		}		
		
		if( r.tot[ 0 ] > 0 ){
		
			paginateTop( s );
			paginate( s );
			
		} else {
			
			$( '#pagingBottom' + s + ',#pagingTop' + s ).html( "<div align='center' style='font-size: 20px; font-weight: 700; '>No results matched your criteria</div>" );
			$( '#paginationShowingTop' + s ).html( "" );
		}
				
	} // fux: repaginate
	
	
	// fu: mergeFeatured
	function mergeFeatured( s, r ){
		
		var q = toQuery( r );
		
		configs[ s ].featured = q.rc;
		configs[ s ].upgraded = 0;
		configs[ s ].featuredOrder = [ ];
		configs[ s ].upgradedOrder = [ ];
		configs[ s ].featuredQuery = q;
		
		// Randomize the new order
		for( var i = 0; i < q.rc; i++ ){
			if( q.featuring[ i ] == 1 ){
				configs[ s ].featuredOrder[ i ] = i;
			} else {
				configs[ s ].upgradedOrder[ i - configs[ s ].featuredOrder.length ] = i;
			}
		}
		
		configs[ s ].featuredOrder.sort( randomizeResults );
		configs[ s ].upgradedOrder.sort( randomizeResults );
		configs[ s ].upgraded = configs[ s ].upgradedOrder.length;
		configs[ s ].featuredItems = configs[ s ].featured - configs[ s ].upgraded;
		configs[ s ].curFeaturedIndex++;
		
		
		
	} // fux: mergeFeatured
	
	
	
	// fu: surch
	function surch( s, includeRepagination ){
		
		configs[ s ].params.itemsPerPage = configs[ s ].itemsPerPage;		
		configs[ s ].params.config.wheres = buildWheresFromForm( s );
		
		/*<cfif request.signature.content eq 'Photos-Videos'>
		
			#v.js#.params.base = 'destinations'; #v.js#.params.id = #v.request.destination.id_destinations#;
		
		<cfelseif not hasForm>
		
			#v.js#.params.base = 'destinations'; #v.js#.params.id = #v.request.destination.id_destinations#;
		
		</cfif>*/
		
		
		// Only send the aggregate requests when a change in search criteria happens
		// During pagination simply modify the pagination display
		if( includeRepagination ){
		
			configs[ s ].curSearchIndex++;
		
			configs[ s ].page = 1;
			configs[ s ].params.page = configs[ s ].page;
			configs[ s ].params.count = true;
		
			if( configs[ s ].specialFishingSearch != '' ){
			
				configs[ s ].params.specialFishingSearch = configs[ s ].curFishTypes;
			
			}
		
			if( configs[ s ].specialLodgingSearch != '' ){
			
				configs[ s ].params.specialLodgingSearch = configs[ s ].specialLodgingSearch;
			
			}
		
		
			if( configs[ s ].specialSearch != '' ){
			
				configs[ s ].params.specialSearch = configs[ s ].specialSearch;
			
			}
		
		
			// Get the count
			$.cfc( 'ajax.search', 'search' + configs[ s ].manualSearch, configs[ s ].params, function( r ){ repaginate( s, r ); } );
			
			configs[ s ].params.count = false;
			configs[ s ].params.featuredOnly = true;
			configs[ s ].params.itemsPerPage = 500000;	
			
			// Get all of the featured items for this set separately
			$.cfc( 'ajax.search', 'search' + configs[ s ].manualSearch, configs[ s ].params, function( r ){ mergeFeatured( s, r ); } );
			
			configs[ s ].params.featuredOnly = false;
			configs[ s ].params.itemsPerPage = configs[ s ].itemsPerPage;	
			
		
		} else {
		
			configs[ s ].params.page = configs[ s ].page;
			paginateTop( s );
			paginate( s );
		
		}
		
		configs[ s ].params.count = false;
		
		// Swap in loading graphic
		//$( '##resultsSet' ).html( '<div align="center"><br/><br/><img src="/media/interface/loading.gif" /></div>' );
		
		// Scrape form for configurations and update params object
		/*
		$.cfc( 'ajax.search', 'search<cfif v.request.signature.content eq 'Photos-Videos'>Media<!--- <cfelseif v.request.signature.content eq 'Houseboat-Rentals'>Houseboats ---><cfelseif not hasForm>NearbyDests</cfif>', #v.js#.params, updateResults#v.index# );
		*/
		
		$.cfc( 'ajax.search', 'search' + configs[ s ].manualSearch, configs[ s ].params, configs[ s ].search );
		
		return false;
		
	} // fux: surch
	
	// fu: resetMultis
	function resetMultis( s ){
		
		for( inpu in configs[ s ].ajax_selects ){
			
			configs[ s ].ajax_selects[ inpu ] = { };
			
		}
		
	} // fux: resetMultis

	// fu: selectAndSearch
	function selectAndSearch( s, id, xange, checked ){
		
			// If they picked select all, reset the struct
			if( xange != 'on' ){
			
				if( configs[ s ].ajax_selects[ id ][ xange ] == undefined || configs[ s ].ajax_selects[ id ][ xange ] == false ){ 
				
					configs[ s ].ajax_selects[ id ][ xange ] = checked; 
				
				} else { 
				
					configs[ s ].ajax_selects[ id ][ xange ] = checked 
					
				}; 
			
			} else {
			
				// Simulate manual clicks either way
				configs[ s ].ajax_selects[ id ] = { };
			
				if( checked ){
					
					$.extend( true, configs[ s ].ajax_selects[ id ], configs[ s ].alls[ id ] );
				
				}
			}
			
			
			surch( s, true );
		
	} // fux: selectAndSearch
	
            
            


