function slideCon(eleA,eleB,timeNum,eleHeight,up,down){
	this.eleA = eleA;
	this.eleB = eleB;
	this.timeNum = timeNum;
	this.eleHeight = eleHeight;
	this.up = up;
	this.down = down;
	this.cur = 0;
	var self = this;
	
	//定论鼠标划过时，自动轮换的处理
	$("#"+this.eleA+",#"+this.eleB).bind('mouseover',function(){
		clearTimeout(self.autoExt);
	});
	$("#"+this.eleA+",#"+this.eleB).bind('mouseout',function(){
		clearTimeout(self.autoExt);
		self.autoExt = setTimeout(function(){
			self.extInterval();
		},self.timeNum);
	});	
	
	$("#"+this.up+",#"+this.down).bind('mouseover',function(){
		//$(this).attr("class",$(this).attr("class")+"_over");
	}).bind('mouseout',function(){
		//$(this).attr("class",$(this).attr("class").replace(/_over/,""));
	});
	
	$("#"+this.up).click(function(){
		clearTimeout(self.autoExt);
		this.cur = this.cur + 1;
		self.extInterval();
		return false;
	});
	$("#"+this.down).click(function(){
		clearTimeout(self.autoExt);
		this.cur = this.cur - 1;
		self.extInterval_down();
		return false;
	});
	
	//开始自动轮换
	this.autoExt = setTimeout(function(){
		self.extInterval();
	},this.timeNum);
}

slideCon.prototype.extInterval = function(){
	var eleExtA,eleExtB;
	if(this.cur == $("#"+this.eleA+">div").length-1) {
		eleExtA = this.cur;
		eleExtB = 0;
		this.cur = 0;
	} else {
		eleExtA = this.cur;
		eleExtB = this.cur+1;
		this.cur = this.cur+1;
	}
	
	$("#"+this.eleA+">div:eq("+eleExtB+")").css({top:this.eleHeight+"px",display:"block"});
	$("#"+this.eleA+">div:eq("+eleExtA+")").animate({top:-this.eleHeight},"slow");
	$("#"+this.eleA+">div:eq("+eleExtB+")").animate({top:0},"slow");
	
	$("#"+this.eleB+">div:eq("+eleExtA+")").animate({ opacity: 'toggle' }, "slow");
	$("#"+this.eleB+">div:eq("+eleExtB+")").animate({ opacity: 'toggle' }, "slow");
	
	var self = this;
	this.autoExt = setTimeout(function(){
		self.extInterval();
	},this.timeNum);
}
slideCon.prototype.extInterval_down = function(){
	var eleExtA,eleExtB;
	if(this.cur == 0) {
		eleExtA = this.cur;
		eleExtB = $("#"+this.eleA+">div").length-1;
		this.cur = $("#"+this.eleA+">div").length-1;
	} else {
		eleExtA = this.cur;
		eleExtB = this.cur-1;
		this.cur = this.cur-1;
	}
	
	$("#"+this.eleA+">div:eq("+eleExtB+")").css({top:-this.eleHeight+"px",display:"block"});
	$("#"+this.eleA+">div:eq("+eleExtA+")").animate({top:this.eleHeight},"slow");
	$("#"+this.eleA+">div:eq("+eleExtB+")").animate({top:0},"slow");
	
	$("#"+this.eleB+">div:eq("+eleExtA+")").animate({ opacity: 'toggle' }, "slow");
	$("#"+this.eleB+">div:eq("+eleExtB+")").animate({ opacity: 'toggle' }, "slow");
	
	var self = this;
	this.autoExt = setTimeout(function(){
		self.extInterval_down();
	},this.timeNum);
}
