How mix jquery based ui packages and ruby on rails

I am trying to use jqx ui that is based on jquqery I have following
questions

  1. How do I generate the right id and name for the element without
    setting
    the element name and id in the format model name [attribute] ? Example
    <%= f.text_field :country_id %> generates
    sets the element id and name to bank[country_id]

2.how do i set the form element attributes like action ? Do i just use
form_tag to generate the form?

Thanks Anant