// JavaScript Document
$(document).ready(function() {
		var divHeight = $('.text-leftnarrower').height();
		var scrollImageHeight = $('#scroll-image').height();
		var imageCount = scrollImageHeight / 212;
		var imageIncrease = 212;
		var i = 0;
		
		$('#scroll-body').animate({
		   'height': divHeight-58 + 'px' 
		 }, "slow");

		$("div.scroll-down").click(function(){
			//Make if statement that if top is more less than 0 to animate, if equal or more than do not animate
			if ( (-scrollImageHeight + imageIncrease) < i) { 
				$("#scroll-image").animate({
					top : "-=" + imageIncrease + 'px'
				}, "medium");
				
			i = i - imageIncrease;
			} 
			
	   });
		$("div.scroll-up").click(function(){
			//Make if statement that if top is less than 0 to animate, if equal or more than do not animate
			if (0 > i) { 
				$("#scroll-image").animate({
					top : "+=" + imageIncrease + 'px'
				}, "medium");
				i = i + imageIncrease;
			} 
	   });	

});
