var current = 0;
var total = 0;

$(document).ready(function() {	
	$("#next").click(function(){
		nextProject();
	});
	$("#previous").click(function(){
		previousProject();
	});	
});

function changeToProject(id){
	$("#project_"+current).hide();
	$("#position_"+current).attr("class", "");
	current = id;
	$("#project_"+current).show();
	$("#position_"+current).attr("class", "active");
	
}

function nextProject(){
	changeToProject( (current+1) % total );
}
function previousProject(){
	var temp = (current-1) % total;
	if(temp < 0) temp = total - 1;
	changeToProject( temp );
}


