link_to_remote with Modalbox.show

Hi
  In helper I have
change_email_link
  html = []
  html << change_email_js(:email => @email)
  html << %{
  <a href="#" onclick="javascript:popup_email();"
style='text-decoration:none;'>edit</a>
  }
  html.join
end
     Now
def change_email_js(options ={})
  %{
  <script>
  popup_email = function() {
  Modalbox.show('#{
    %{
    <div style="padding-left:20px">
   etc......
   #{link_to_remote 'Ok',{},{:class => :new_ui_blue_button}}
  </div>
  }.gsub("\n",'')}', {title:'&nbsp;',width:400, overlayClose:
false,modelPosition:'center',overlayDuration:0.001,slideDownDuration:0.001,slideUpDuration:0.0001});
  }
  </script>
}
end

       My problem is This does not popup the modalbox. But when I remove
the line
#{link_to_remote 'Ok',{},{:class => :new_ui_blue_button}} Or change
this link_to_remote to link_to everything works as expected What might
be the reason
Please help

Thanks in advance
Sijo