froBanner = Class.create();
froBanner.prototype = {

	timer :0,
	bannerList : [],
	bannerCount :0,

	targetItem:'item',

	intervalSpeed : 4000,

	initialize : function() {

	},
	start : function() {

		this.swapBanner();
		
		var self = this;
		this.timer = setInterval(function(){self.swapBanner();}, this.intervalSpeed);

	},
	swapBanner : function() {
		// reset counter
		if (this.bannerList.length <= this.bannerCount){
			this.bannerCount = 0;
		} 
		var image = this.bannerList[this.bannerCount][0];
		var href = this.bannerList[this.bannerCount]['1'];
		
		
		// swap add
		$(this.targetItem).innerHTML = "<a href=\"" + href + "\" target=\"_blank\"><img src=\"" + image + "\"/></a>";
		// count
		this.bannerCount +=1;
	}

};
