anchor.diff:      return result;
     };
   function level(e) {return parseInt(get_class_by_regexp(e,/level_\d+/).replace(/level_/,''));};
  -function new_level(e,level_value) {
  +function set_new_level(e,level_value) {
     old_class = get_class_by_regexp(e,/level_\d+/);
     e.removeClass(old_class);
     e.addClass('level_'+level_value);
  
positive.code: // callbacks:
  start: function(event,ui) {
  ui.helper.css('border','1px solid transparent');
  },
  beforeStop: function(event,ui) {
  level_shift = Math.round(ui.position.left/l_shift);
  if (level_shift > max_level) {level_shift=max_level+1;};
  new_level(ui.helper,level(ui.helper)+level_shift);
  //--------------------------------------
  ui.helper.css('border','1px solid blue');
  ui.helper.css('padding-left',(27+level(ui.helper)*l_shift)+'px')
  },
  update: function(event,ui){
  //send ajax to server
  
negative.code:   <script type="text/javascript">
      //<![CDATA[
    var l_shift = <%= @level_shift %>;
    var max_level = <%= @max_level %> - 1;
    function get_class_by_regexp(e,reg_exp) {
      classList = e.attr('class').split(' ');result = null;re = new RegExp(reg_exp);
      $.each(classList, function(index, klass) {
  