$(function()
{
	var howMany = 6;
    $("#next").click(function()
       {
        var current = parseInt($(this).attr("title"));
        slide(current);
		var next = current + 1;
		var previous = current - 1;
		if(next > howMany){ next = 1;}else{ next = current + 1}
		if(previous < 1){ previous = howMany}else{ previous = current - 1}
		$(this).attr("title", next);
		$("#previous").attr("title", previous);
       });

	$("#previous").click(function(){
        var current = parseInt($(this).attr("title"));
        slide(current);
		var next = current + 1;
		var previous = current - 1;
		if(next > howMany){ next = 1;}else{ next = current + 1}
		if(previous < 1){ previous = howMany}else{ previous = current - 1}
		$(this).attr("title", previous);
		$("#next").attr("title", next);

	});
	
});

function slide(menu)
{
	$(".fromOurMenu").hide();
	$("#"+menu).fadeIn("slow");
}


