// SeViR Simple Horizontal Accordion @2007
// http://letmehaveblog.blogspot.com
jQuery.fn.extend({
  haccordion: function(params){
    var params = $.extend({
      speed: 300,
      headerclass: "header",
      contentclass: "content",
      contentwidth: 280
    },params);
    return this.each(function(){
      $("."+params.headerclass,this).click(function(){
        var p = $(this).parent()[0];
        if (p.opened != "undefined"){
          $(p.opened).next("div."+params.contentclass).animate({
            width: "0px"
          },params.speed);
        }
        p.opened = this;
        $(this).next("div."+params.contentclass).animate({
          width: params.contentwidth + "px"
        }, params.speed);
      });
    });
  }
});

  $(function(){
   $(".haccordion").haccordion();
  });