/**
 * Changes news back and forth on front page
 *
 * @param {Number} direction
 */
function changeNews(direction) {
	var link = $('#newsLinks a:visible'),
		index = link.index(),
		links = $('#newsLinks a');

	if (links.length > 1) {
		link.hide();

		if (direction < 0) {
			if (index) {
				$(links[index - 1]).show();
			} else {
				$(links[links.length - 1]).show();
			}
		} else {
			if (index < links.length - 1) {
				$(links[index + 1]).show();
			} else {
				$(links[0]).show();
			}
		}
	}
}
