$().ready(function(){function findValueCallback(event,data,formatted){$("<li>").html(!data?"No match!":"Selected: "+formatted).appendTo("#result");}
function formatItem(row){return row[0]+" (<strong>id: "+row[1]+"</strong>)";}
function formatResult(row){return row[0].replace(/(<.+?>)/gi,'');}
$(":text, textarea").result(findValueCallback).next().click(function(){$(this).prev().search();});$("#singleBirdRemote").result(function(event,data,formatted){if(data)
$(this).parent().next().find("input").val(data[1]);});$("#clear").click(function(){$(":input").unautocomplete();});});