// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
if(typeof Element == 'undefined' || typeof Element.Methods == 'undefined')
  throw("application.js requires including prototype.js library");

Element.addMethods({swap: function(element1, element2) {
    Element.hide(element1);
    Element.show(element2);
}});

Event.addBehavior.reassignAfterAjax = true;
Event.addBehavior({
    '#orders div.pagination a': Remote.Link,
    '#orders a.sort': Remote.Link,
    'th.pagination a': Remote.Link,
    'th a.sort': Remote.Link
})
