// ########## DND OPTIONS ##########

function dndOptions(e,id) {
  Sortable.create(e,
    {
      tag:'fieldset',
      only:'dnd',
      constraint:false,
      onUpdate:function() {
        poststring = Sortable.serialize(e);
        new Ajax.Request(
          path_post+'product/options_ajax,'+e+'.html',
          {
            method:'post',
            postBody:poststring+'&criteria_id='+id,
            onSuccess:function(ajax) {
            }
          }
        );
      }
    }
  )
}

// ########## DND CRITERIA ##########

function dndCriteria(e,id) {
  Sortable.create(e,
    {
      tag:'li',
      only:'dnd',
      constraint:false,
      onUpdate:function() {
        poststring = Sortable.serialize(e);
        new Ajax.Request(
          path_post+'product/criteria_ajax,'+id+','+e+'.html',
          {
            method:'post',
            postBody:poststring,
            onSuccess:function(ajax) {
            }
          }
        );
      }
    }
  )
}
