function get_look_suggs(key,cont){ 
   var script_name = 'ajax/getCategories.php';
   var params = { 'q':key }
   $.get(script_name,params,
         function(obj){ 
           // obj is just array of strings
           var res = [];
           for(var i=0;i<obj.length;i++){
             res.push({ id:i , value:obj[i]});
           }
           // will build suggestions list
           cont(res); 
         },
         'json');
}

$(document).ready(function(){
    $('input.complete').autocomplete({ajax_get:get_look_suggs});
});
