function chagePic(options){
	this.cur_change_pic = null;	//当前切换的图片
	this.img = options.img;
	this.li = null;
	this.timeer = null;
	var _this = this;
	
	//执行输出li选项
	if(this.img==null)	return ;
	for(var i=0;i<this.img.length;i++){
		options.li.append("<li>"+(i+1)+"</li>");
	}
	this.li = options.li.children("li");
	
	//给图片加事件
	$(this.img).each(function(k,o){
		$(o).hover(function(){
				clearInterval(_this.timeer);
			},
			function(){
				_this.timeer = setInterval(function(){_this.get_change();},options.timeout);
			}
		)
	})
	
	$(this.li).each(function(k,o){
		$(o).click(function(){
			_this.set_cahge(k);				
		})						 
	})
	
	this.set_cahge = function(index){
		_this.cur_change_pic = index;
		_this.get_change();
	}
	
	//顺序的切换
	this.get_change = function(){
		
		if(_this.cur_change_pic>_this.img.length-1){
			_this.cur_change_pic = 0;
		}
		
		this.img.eq(_this.cur_change_pic).show().siblings("a").hide();
		this.li.eq(_this.cur_change_pic).addClass('now').siblings().removeClass('now');
		_this.cur_change_pic++;
		if(this.img.size()<2){
			return ;
		}
	}
	
	if(options.chaged_li==null){
		this.cur_change_pic = 0;
		this.get_change();
	}else{
		this.cur_change_pic = options.chaged_li;
		this.get_change();
	}
	this.timeer = setInterval(function(){_this.get_change();},options.timeout);
}
