Javascript works inline in webform but not as standalone
I think you can use default druypal behaviors

  Drupal.behaviors.mywebform = {
      attach: function (context, settings) {
    var ac_config = {
            source: "/example/sites/all/themes/skeletontheme/js/democities.php",
            select: function(event, ui){
                $("#edit-submitted-info-company").val(ui.item.company);
                            $("#edit-submitted-info-address").val(ui.item.address);
                            $("#edit-submitted-info-address2").val(ui.item.address2);
                            $("#edit-submitted-info-city").val(ui.item.city);
                $("#edit-submitted-info-state").val(ui.item.state);
                $("#edit-submitted-info-zip").val(ui.item.zip);
            },
            minLength:1
        };
        $("#edit-submitted-info-company").autocomplete(ac_config);
        }
    }


Hope it will help!