var balloon = function(sID) {
	this.oWrapper = document.getElementById("festivalballoon");

	this.oBalloon = {
		obj: document.getElementById(sID),
		x: Math.random() * this.oWrapper.clientWidth,
		y: Math.random() * 100,
		strength: {
			x: 0.1 + Math.random() / 10,
			y: -Math.random() * 5 - 1
		},
		amplifier: Math.random() * 20,
		angle: 0
	}

	this.setTimer();
};

balloon.prototype.setTimer = function() {
	this.move();

	var oSelf = this;
	setTimeout(function() {
		oSelf.setTimer()
	}, 20);
};

balloon.prototype.move = function() {
	var oBalloon = this.oBalloon;

	oBalloon.y += oBalloon.strength.y;

	// if(oBalloon.y  + 125 > this.oWrapper.clientHeight ){
	if (oBalloon.y + 125 < 0) {
		oBalloon.y = this.oWrapper.clientHeight;
		oBalloon.obj.style.bottom = 0;
	}

	oBalloon.angle += oBalloon.strength.x;
	oBalloon.obj.style.top = oBalloon.y + "px";
	oBalloon.obj.style.left = oBalloon.x + oBalloon.amplifier * Math.sin(oBalloon.angle) + "px";
};
