function scrollThumbs(thumbHeight, numberOf){
	// Rod Scroll V1.0 - A thumbnail scroller.
	// The up arrow click
	var numberThumbs = $('#thumbs img').size();
	// console.log(numberThumbs);
	barHeight = thumbHeight * numberOf;
	
	// Fade out the up button by default
	$('#up_btn').css('opacity', '0.2');
	$('#up_btn').css('cursor', 'arrow');

	var currentTop = parseInt($('#thumbs').css('top'));
	var newTop = currentTop - barHeight;
	var minTop = -(numberThumbs)*thumbHeight;
	
	if (newTop <= minTop) {
		// Fade out the down button by if there arent enough images to warant scrolling.
		$('#down_btn').css('opacity', '0.2');
		$('#down_btn').css('cursor', 'arrow');
	};
	
	$('#up_btn').click(function(){
		var currentTop = parseInt($('#thumbs').css('top'));
		// console.log('barheight: ' + barHeight);
		// console.log('currentTop: ' + currentTop);
		if ($('#thumbs').css('top') <= '0') {
			var newTop = currentTop + barHeight;
			// console.log(newTop);
			
			$('#thumbs').animate({'top': newTop+'px'}, function(){
				// console.log('done move');
				if (parseInt($('#thumbs').css('top')) == 0) {
					// If the bar has returned to zero fade out the up btn.
					$('#up_btn').css('opacity', '0.2');
					$('#up_btn').css('cursor', 'arrow');
				};
			});
			
			// Make the up button active.
			if ($('#down_btn').css('opacity') == 0.2) {
				$('#down_btn').css('opacity', '1.0');
				$('#down_btn').css('cursor', 'pointer');
			}
		} 
		// console.log('up');
		return false;
	});

	// The down arrow click
	$('#down_btn').click(function(){
		var currentTop = parseInt($('#thumbs').css('top'));		
		var newTop = currentTop - barHeight;
		var minTop = -(numberThumbs)*thumbHeight;
		// console.log('minTop:' + minTop);
		// console.log('barheight: ' + barHeight);
		// console.log('currentTop: ' + currentTop);
		// console.log('newTop is: ' + newTop);
		if (newTop > minTop) {
			$('#thumbs').animate({'top': newTop +'px' }, function(){
				var nextTop = parseInt($('#thumbs').css('top')) - barHeight;		
				// console.log('minTop:' + minTop);
				// console.log('nextTop: ' + nextTop);
				if (minTop >= nextTop) {
					// console.log('full steamed');
					$('#down_btn').css('opacity', '0.2');
					$('#down_btn').css('cursor', 'arrow');
				};
			});
		} 
		// Fade the up_Btn back in.
		$('#up_btn').css('opacity', '1.0');
		$('#up_btn').css('cursor', 'pointer');
		
		// console.log('down');
		return false;
	});
	
	$(document).ready(function(){
		// Document is ready
		$('.imageload').click(function(){
			var rel = $(this).attr('rel');
			// console.log('rel is:' + rel);
			$('#bigimage img').fadeOut('fast', function(){
				// bigimage is the containing div
				$('#bigimage').replaceWith('<div id="bigimage"><img src="../_graphics/pictures/' + rel + 'zm.jpg"</div>');
			});
			return false;
		})
	});
}
