jQuery(function($){
	
	$('#featured-projects a.prev, #featured-projects a.next').click(function(e){
		e.preventDefault();
		update_projects($(this).attr('class'));
	});
	
	function update_projects(_class){
		var fp = $('#featured-projects');
		var c = fp.find('li.current');
			c.removeClass('current');
		if(_class == 'next'){
			c.next().addClass('current');
			if(c.next().next().length == 0)
				fp.find('a.next').hide();
			fp.find('a.prev').show();
		}else{
			c.prev().addClass('current');
			if(c.prev().prev().length == 0)
				fp.find('a.prev').hide();
			fp.find('a.next').show();
		}
			
	}
});
