function beams(){
	var self = this;
	
	this.setBeamTimers = function(){
		this.setBeam1();
		this.setBeam2();
		this.setBeam3();
		this.setBeam4();
	};
	
	this.setBeam1 = function(){
		setTimeout(function(){self.fadeBeam($("#beam1"));}, (rand(4, 6)*1000));
	};
	
	this.setBeam2 = function(){
		setTimeout(function(){self.fadeBeam($("#beam2"));}, (rand(2, 10)*1000));
	};
	
	this.setBeam3 = function(){
		setTimeout(function(){self.fadeBeam($("#beam3"));}, (rand(5, 15)*1000));
	};
	
	this.setBeam4 = function(){
		setTimeout(function(){self.fadeBeam($("#beam4"));}, (rand(1, 5)*1000));
	};
	
	this.fadeBeam = function(ele){
		var beam = $(ele).attr('id');
		var f = beam.charAt(0).toUpperCase();
		
		$(ele).fadeIn((rand(1.5, 4)*1000), function(){
			$(this).fadeOut((rand(2, 4)*1000), function(){
				eval('self.set'+(f + beam.substr(1))+'();');
			});
		});
	};
};

var beam = new beams();
beam.setBeamTimers();