// SeViR Simple Horizontal Accordion @2007
// http://letmehaveblog.blogspot.com
jQuery.fn.extend({
  haccordion: function(params){
    var jQ = jQuery;
    var params = jQ.extend({
      speed: 500,
      headerclass: "accheader",
      contentclass: "acccontent",
      contentwidth: 680,
	  openone:2
    },params);
	
	//var uc = jQ(this+".acccontent")[2];
	//alert($(uc).html());
	//$(uc).animate({width: params.contentwidth+"px"},params.speed);
	
	return this.each(function(index){
	jQ("."+params.headerclass,this).each(function(index){
														if(index == params.openone)
														{
															var p = jQ(this).parent()[0];
															p.opened = this;
															jQ(this).next("div."+params.contentclass).animate({	width: params.contentwidth + "px"}, params.speed);
														}
														}).click(function(){
	var p = jQ(this).parent()[0];
	if (p.opened != "undefined")
	{
		jQ(p.opened).next("div."+params.contentclass).animate({	width: "0px"},params.speed);
	}
	p.opened = this;
	jQ(this).next("div."+params.contentclass).animate({	width: params.contentwidth + "px"}, params.speed);
	
	});
	});
	}
});
