
	
/*photoArea------------------*/
var PhotoAreaControl = function()
{
	this.photoLeng = $(".nanpa li").length;
	this.nowPhotoNum = 0;
	this.IndexCountUp = 0;
	this.timer;
	this.init();
};
PhotoAreaControl.prototype = {
	init : function()
	{
		var me = this;
		me.photoSwitch(me);
		//clearInterval(me.timer);
		me.timer = setInterval((function(){me.photoSwitch(me)}),4000);
	},
	
	photoSwitch : function(me)
	{	
		
		
		var targetImg = $(".nanpa li:eq(" + me.nowPhotoNum + ")");
		me.IndexCountUp += 1;
		targetImg.css({
			"opacity":	0,
			"z-index":	me.IndexCountUp,
			"display":	"block"
		});
		
		
		targetImg.stop();
		targetImg.animate(
		{
			opacity: 1
		},
		{
			duration: 500, 
			easing: "linear"
		});
		
		
		//countUp
		me.nowPhotoNum  = (me.nowPhotoNum == me.photoLeng - 1) ? 0 : me.nowPhotoNum + 1;
				
	}
}


$(function()
{
	var photoAreaControl = new PhotoAreaControl();
});






