Rails is a server side framework. What you are talking about seems to fall into the family of single page app. For that, custom js will definitely be needed. Rails does not have any major powers on client.
That said, I recommend you take a look into angularjs. It will cut-down your javascript code length by orders of magnitude and is a much better approach to client side javascript. It's readily testable too.
Even if you do choose to stay with jquery, prototype or some other traditional library, you can separate chunks of reusable code regarding ajax and all into various modules and reference them all over. It will reduce mess and help extensibility in long run. (But do take a look at angularjs if not already done so).