complete ajax for category search, looks ugly as sin though