' }},[{ source: $.fn.autocomplete.sources.hits(killers, { hitsPerPage: 5 }), name: 'd1', templates: { header: '
Serial Killers
', suggestion: function(suggestion) { cell =''+ suggestion._highlightResult.name.value +'
'+ suggestion._highlightResult.alias.value +'
'; return cell; }}},{ source: $.fn.autocomplete.sources.hits(books, { hitsPerPage: 2 }), name: 'd2', templates: { header: 'Books
', suggestion: function(suggestion) { if(suggestion._highlightResult.title.value.length > 35){ title = suggestion._highlightResult.title.value.substring(0,35); }else{ title = suggestion._highlightResult.title.value; } cell =''+ suggestion.title +'
'+ suggestion._highlightResult.isbn.value +'
'; return cell; }}}]);