function rand(min, max) {
	return min + parseInt(Math.random() * (max - min + 1));
}

jQuery(function() {
	var topics = ["me", "career", "journeys", "sports"];
	//fadeMenuIn(topics);
	registerDetails(topics);
});

function fadeMenuIn(topics) {
	for(i = 0; i < topics.length; i++) {
		jQuery(".menu ." + topics[i]).delay(rand(0, 400)).fadeIn(rand(300, 700));
	}
}

function registerDetails(topics) {
	for(i = 0; i < topics.length; i++) {
		registerDetail(topics[i]);
	}
}

function registerDetail(topic) {
	jQuery(".menu ." + topic).mouseenter(function () {
		jQuery(".details ." + topic).fadeIn(200);
	});

	jQuery(".menu ." + topic).mouseleave(function () {
		jQuery(".details ." + topic).fadeOut(300);
	});
}
