// bunnybomb.js
//this moves da pictures, yo

	$(document).ready(function(){
							   
		$('.section:first').css("left", "28em"); //27em
	
		$('#smallicons a').click(function () {					 
			checkThumb = $('#smallicons a').index(this);
			$('.section').each(function(){
				
				checkSection = $('.section').index(this);
				if (checkSection == checkThumb){
					$(this).animate({left: "28em"}, 1500); //left: 27em
				}
				
				else {
					$(this).animate({left: "150em"}, 800); //150em
				}
						   
			});
			
		});
		//previous buttons
		$('.buttonPrev').click(function () {
			checkPrev = $('.buttonPrev').index(this);
			$('.section').each(function() {
				checkSectionPrev = $('.section').index(this);
				if (checkSectionPrev == checkPrev) {
					$(this).animate({left: "28em"}, 1500);
				}
				else {
					$(this).animate({left: "150em"}, 800);
				}
			});
		});
		
		//next buttons
		$('.buttonNext').click(function () {
			checkNext = $('.buttonNext').index(this);
			$('.section').each(function() {
				checkSectionNext = $('.section').index(this);
				if (checkSectionNext == checkNext + 1) {
					$(this).animate({left: "28em"}, 1500);
				}
				else {
					$(this).animate({left: "150em"}, 800);
				}
			});
		});
		
		
		

	}); // End of Doc Ready
