var webcam = 1;

function set_cam(num) {
	this.webcam = num;
	$("#link_1").css("font-weight", "normal");
	$("#link_2").css("font-weight", "normal");
	$("#link_"+ this.webcam).css("font-weight", "bold");
	
	reloadCam();
}

function reloadCam() {
	var date = new Date();

	$("#image_webcam").attr("src", "");
	$("#image_webcam").attr("src", "webcam-"+ this.webcam +".jpg?date="+date.getMilliseconds());
}

var auto_reload = function () {
	reloadCam();
}

setInterval(auto_reload, 30000)