var blockObj = function( mainWidth, imageWidth, name ){
 	this._mainWidth = mainWidth;
	this._imageWidth = imageWidth + 22;
	this._name = name;
	this._currentPos = 0;
	this._viewDivis = $( '#' + this._name + ' .blockImages_outter_container' ).width() / this._imageWidth;
	this._numb = $( '#' + this._name + ' .blockImages_outter_container .blockImages_outter' ).children().size();
	this._remainder = (this._numb - Math.round(this._viewDivis)) * this._imageWidth;
	this._timer;
	this._timerSet();
 };
blockObj.prototype._timerSet = function(){
	var obj = this;
	this._timer = setInterval( 
		function(){
			obj.moveImage();
		}
		, 6000 
	);
};
blockObj.prototype.moveImage = function(){
	var obj = this;	
	if ( this._remainder == this._currentPos ) {
		$('#' + this._name + ' .blockImages_outter_container .blockImages_outter').animate({
			left: '0'
		}, 1000);
		this._currentPos = 0;
	} else {
		$('#' + this._name + ' .blockImages_outter_container .blockImages_outter').animate({
			left: '-=' + obj._imageWidth
		}, 1000);
		this._currentPos += this._imageWidth;
	}
}

