Event.addBehavior({
/*
"#admin_order_list .show_hide:mousedown": function(event) {
  thead = this.parentNode.parentNode.parentNode;
  tbody = findNextTag(thead, 'TBODY');

  if ((tbody) && (tbody.className == 'order_content')) {
    if (tbody.style.display == 'none') {
      tbody.style.display = '';
      this.src = "/images/arrow_up.png";
    } else {
      tbody.style.display = 'none';
      this.src = "/images/arrow_down.png";
    }
  }
},*/
/*"#cart img.remove_product:mousedown": function(event) {

    new Ajax.Request('/cart/remove/' + this.name, {asynchronous:true, evalScripts:true});
    return false;
  
},*/
"#product form:submit": function(event) {

    new Ajax.Request(this.action, {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)});
    return false;
  
},
/*"#product_list form:submit": function(event) {

    new Ajax.Request(this.action, {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)});
    return false;
  
},*/
"#update:click": function(event) {

    form = this.parentNode.parentNode.parentNode;
    new Ajax.Request(form.action, {asynchronous:true, evalScripts:true, parameters:Form.serialize(form)});
    return false;
  
},
/*"#left_menu ul li:mouseover": function(event) {
    tmp = findChildTag(this, 'P');
    if (tmp) {
      tmp.className=tmp.className.replace('hover', '');
      tmp.className = tmp.className + ' hover';
    }

    tmp = findChildTag(this, 'DIV');
    if (tmp) {
      tmp.className=tmp.className + ' hover';
      tmp = findNextTag(tmp, 'DIV');
      if (tmp) {
        tmp.className=tmp.className.replace('hover', '');
        tmp.className=tmp.className + ' hover';
      }
    }

    return true;
  
},
"#left_menu ul li:mouseout": function(event) {


    tmp = findChildTag(this, 'P');
    if (tmp) {
      tmp.className=tmp.className.replace('hover', '');
    }

    tmp = findChildTag(this, 'DIV');
    if (tmp) {
      tmp.className=tmp.className.replace('hover', '');
      tmp = findNextTag(tmp, 'DIV');
      if (tmp) {
        tmp.className=tmp.className.replace('hover', '');
      }
    }

    return true;
  
},*/
"#product_list .product:mouseover": function(event) {

    this.className = this.className.replace('hover', '');
    this.className = this.className + ' hover';

    return false;
  
},
"#product_list .product:mouseout": function(event) {

    this.className=this.className.replace('hover', '');

    return false;
  
},
"#cart .cart_product:mouseover": function(event) {

    this.className=this.className.replace('hover', '');
    this.className = this.className + ' hover';

    return false;
  
},
"#cart .cart_product:mouseout": function(event) {

    this.className=this.className.replace('hover', '');

    return false;
  
},
"#sitemap .up:mousedown": function(event) {
submitListChange(this, 'UP');return false;
},
"#sitemap .down:mousedown": function(event) {
submitListChange(this, 'DOWN');return false;
},
"#sitemap .left:mousedown": function(event) {
submitListChange(this, 'LEFT');return false;
},
"#sitemap .right:mousedown": function(event) {
submitListChange(this, 'RIGHT');return false;
},
"#sitemap .expand:mousedown": function(event) {
toggleTree(this);
}
});
