var Help = Behavior.create({
  initialize: function() {
    this.help = this.element;
    this.hide_button = this.help.down('.close');
    this.cookie_name = this.help.getAttribute("data-cookie-name");
    
    this.hide_button.observeExclusively('click', this.hide.bind(this));
    
    if(Cookie.get(this.cookie_name) == "true") {
      this.hide();
    }
  },
    
  hide: function() {
    Cookie.set(this.cookie_name, "true", 365);
    this.help.hide();
  }
});

Event.addBehavior({
  '.help': Help
});
