Event.observe(window,'load', function() {
  if (Prototype.Browser.IE && navigator.userAgent.indexOf("MSIE 6") != -1)
    $$('#menu .menu li:first-child')[0].setStyle({'backgroundImage':'none'});
});

Worldsoul = {};

Worldsoul.couponPicker =  Class.create(Kwo.Dialog, {

  "initialize": function($super, input) {
    this.input = input;
    $super(this.refresh, {}, {"height": 83, "width":244});
    Kwo.setDialog(this);
  },
  
  "refresh": function(args) {
    Kwo.exec("/shop/dialog.couponpicker", args, 
             {"container": "support"});
  },

  "apply": function(code, id) {
    this.close();
    $("coupon-link-box", "coupon-code-box").invoke("toggle");
    $("coupon_id").setValue(id);
    $("coupon-code-box").update(code);
    Kwo.Cart.updateAmounts();
  }

});
Worldsoul.addComment = function () {
  if (window.location.href.lastIndexOf('#') == -1) window.location=window.location+'#add_comment';
  $('comment_items', 'comment_form').invoke('toggle');
  if ($('comment_form').visible() && 
      $('comment_content_input') &&
      $('comment_content_input').visible()) new Kwo.Editor('comment_content_input');
}