$.pageCount=0;
$.totalPages = 0;
$.blockWidth=185;
	
$(document).ready(function() {
	
	$('.text').verticalalign({'heightParent':350});
	if($('#description-content').size() > 0) { $('#description-content').textScroll({scrollUp:'#description-scroll #scroll-up-01',scrollDown:'#description-scroll #scroll-down-01'}); }
	if($('#profile-content').size() > 0) { $('#profile-content').textScroll({scrollUp:'#profile-scroll #scroll-up-02',scrollDown:'#profile-scroll #scroll-down-02'}); }
	if($('#testimonial-content').size() > 0) { $('#testimonial-content').textScroll({scrollUp:'#testimonial-scroll #scroll-up-01',scrollDown:'#testimonial-scroll #scroll-down-01'}); }
	
	$.totalPages = Number($('a.job').length)-1;
	
	/* --------------------------------------------------------- */
	/* NAVIGATIE STRUCTUUR
	/* --------------------------------------------------------- */
	$('#ffwd').click(function(e) {
		e.preventDefault();
		AnimateFFWD();
	});
	
	$('#rwd').click(function(e) {
		e.preventDefault();
		AnimateRWD();
	});
	
	
//	function AnimateFFWD() {
//		alert(0);
//		var x		= -$.blockWidth * ($.pageCount+1);
//		$("#jobs-container").animate({"left": x}, 250);
//		$.pageCount++;
//	}
//	function AnimateRWD() {
//		var x		= -$.blockWidth * ($.pageCount-1);
//		$("#jobs-container").animate({"left": x}, 250);
//		$.pageCount--;
//	}
	//setTimeout(AnimateRWD,450);
	
});

function AnimateFFWD() {
	if($.pageCount < $.totalPages) {
		var x		= -$.blockWidth * ($.pageCount+1);
		$("#jobs-container").animate({"left": x}, 250);
		$.pageCount++;
	}
}
function AnimateRWD() {
	if($.pageCount > 0) {
		var x		= -$.blockWidth * ($.pageCount-1);
		$("#jobs-container").animate({"left": x}, 250);
		$.pageCount--;
	}
}
