(function(jQuery) {
jQuery.fn.daMove1 = function(para) {
	para = jQuery.extend({
        type:"left",
		num:1,
		left:false,
		right:false,
		move:false,
		speed:600
    }, para || {});
    var o = jQuery(this);
	var star = 0;
	var moveX = 0;
	var end = para.num;
	var ow = o.width();
	var oh = o.height();
	var co = o.children();
	var len = co.length;
	var oHtml = o.html();
	o.empty();
	o.css({
		"position":"relative"
	});
	o.append("<div class='daMove1BigBox'></div>");
	var bigBox = jQuery(".daMove1BigBox");
	bigBox.css({
		"width":"auto",
		"height":"auto",
		"position":"absolute",
		"left":"0px",
		"top":"0px"
	});
	var count = Math.ceil(len/para.num);
	for(var i=0;i<count;i++){
		bigBox.append("<div class='daMove1Box'></div>");
	}
	var box = jQuery(".daMove1Box");
	box.css({
		"width":ow,
		"height":oh,
		"float":"left",
		"display":"inline"
	});
	box.each(function(i){
		jQuery(this).css({
			"z-index":i
		});
		jQuery(this).append(co.slice(star,end));
		star = star+para.num;
		end = end +para.num;
	});
	if(para.left && para.right){
		var left = jQuery(para.left);
		var right = jQuery(para.right);
	}else{
		alert("±êÇ©Î´¶¨Òå");
		return false;
	}
	if(!para.move){
		moveX = ow;
	}else{
		moveX = para.move;
	}
	left.css({
		"cursor":"pointer"
	});
	right.css({
		"cursor":"pointer"
	});
	if(para.type == "left"){
		bigBox.css({
			"width":ow*count,
			"height":oh
		});
	}
	
	left.bind("click",function(){
		if(parseInt(bigBox.css("left"))>-ow*(count-1)){
			bigBox.animate({
				"left":"-="+moveX+"px"
			},para.speed);
		}else{
			return false;
		}
	});
	right.bind("click",function(){
		if(parseInt(bigBox.css("left"))<0){
			bigBox.animate({
				"left":"+="+moveX+"px"
			},para.speed);
		}else{
			return false;
		}
	});

	
};
})(jQuery);
