var SortBy = Class.create({
  
  initialize: function() {
    if( $('sort_by') ) {
      Element.observe('sort_by','change',this.sort.bindAsEventListener(this));
    }
  },
  
  sort: function(e) {
    
    var element = Event.element(e);
    window.location = element.getValue();
    
  }
  
});

document.observe('dom:loaded', function() { new SortBy(); });
