$(document).ready(function(){
	
	//use this code to have first project default open
	//$(".project_list .project_details:gt(0)").hide();
	
	//hide all project_details
	$(".project_list .project1_details").hide();
	$(".project_list .project2_details").hide();
	$(".project_list .project3_details").hide();
	$(".project_list .project4_details").hide();
	$(".project_list .project5_details").hide();
	$(".project_list .project6_details").hide();
	$(".project_list .project7_details").hide();
	$(".project_list .project8_details").hide();
	$(".project_list .project9_details").hide();
	$(".project_list .project10_details").hide();
	$(".project_list .project11_details").hide();
	$(".project_list .project12_details").hide();
	$(".project_list .project13_details").hide();
	$(".project_list .project14_details").hide();
	$(".project_list .project15_details").hide();
	$(".project_list .project16_details").hide();
	$(".project_list .project17_details").hide();
	$(".project_list .project18_details").hide();
	$(".project_list .project19_details").hide();
	$(".project_list .project20_details").hide();
	
	//hide project rows after the 5th project
	// $(".project_list li:gt(4)").hide();

	
	//toggle project_details on and off
	$(".project1_head").click(function(){
		$(this).next(".project1_details").slideToggle(500)
		return false;
	});
	$(".project2_head").click(function(){
		$(this).next(".project2_details").slideToggle(500)
		return false;
	});
	$(".project3_head").click(function(){
		$(this).next(".project3_details").slideToggle(500)
		return false;
	});
	$(".project4_head").click(function(){
		$(this).next(".project4_details").slideToggle(500)
		return false;
	});
	$(".project5_head").click(function(){
		$(this).next(".project5_details").slideToggle(500)
		return false;
	});
	$(".project6_head").click(function(){
		$(this).next(".project6_details").slideToggle(500)
		return false;
	});
	$(".project7_head").click(function(){
		$(this).next(".project7_details").slideToggle(500)
		return false;
	});
	$(".project8_head").click(function(){
		$(this).next(".project8_details").slideToggle(500)
		return false;
	});
	$(".project9_head").click(function(){
		$(this).next(".project9_details").slideToggle(500)
		return false;
	});
	$(".project10_head").click(function(){
		$(this).next(".project10_details").slideToggle(500)
		return false;
	});
	$(".project11_head").click(function(){
		$(this).next(".project11_details").slideToggle(500)
		return false;
	});
	$(".project12_head").click(function(){
		$(this).next(".project12_details").slideToggle(500)
		return false;
	});
	$(".project13_head").click(function(){
		$(this).next(".project13_details").slideToggle(500)
		return false;
	});
	$(".project14_head").click(function(){
		$(this).next(".project14_details").slideToggle(500)
		return false;
	});
	$(".project15_head").click(function(){
		$(this).next(".project15_details").slideToggle(500)
		return false;
	});
	$(".project16_head").click(function(){
		$(this).next(".project16_details").slideToggle(500)
		return false;
	});
	$(".project17_head").click(function(){
		$(this).next(".project17_details").slideToggle(500)
		return false;
	});
	$(".project18_head").click(function(){
		$(this).next(".project18_details").slideToggle(500)
		return false;
	});
	$(".project19_head").click(function(){
		$(this).next(".project19_details").slideToggle(500)
		return false;
	});
	$(".project20_head").click(function(){
		$(this).next(".project20_details").slideToggle(500)
		return false;
	});
	
	//hide project images after the 1st project
	//$(".project_image:gt(0)").hide();
	
	//var $project_image = $(".project_image');
	//$(".rtarrow").click(function() {
	//	var lastParagraphPosition =
	//$(".project_image p:last").position();
	//	var scrollPosition =
	//$project_image.scrollTop() + lastParagraphPosition.top;
	//	$project_image.scrollTop(scrollPosition);
	//});

	//scroll feature, arrow rollovers
	$(".next1").click(function(){
		$(".project1_image").scrollTo('+=600px', 200);
		$(".caption1").scrollTo('+=700px', 0);
		return false;
	});
	$(".next1").mouseover(function(){
		$(this).toggleClass("next1on");
	});
	$(".next1").mouseout(function(){
		$(this).toggleClass("next1on");
	});
	
	$(".prev1").click(function(){
		$(".project1_image").scrollTo('-=600px', 200);
		$(".caption1").scrollTo('-=700px', 0);
		return false;
	});
	$(".prev1").mouseover(function(){
		$(this).toggleClass("prev1on");
	});
	$(".prev1").mouseout(function(){
		$(this).toggleClass("prev1on");
	});
	
	$(".next2").click(function(){
		$(".project2_image").scrollTo('+=600px', 200);
		return false;
	});
	$(".next2").mouseover(function(){
		$(this).toggleClass("next2on");
	});
	$(".next2").mouseout(function(){
		$(this).toggleClass("next2on");
	});

	$(".prev2").click(function(){
		$(".project2_image").scrollTo('-=600px', 200);
		return false;
	});
	$(".prev2").mouseover(function(){
		$(this).toggleClass("prev2on");
	});
	$(".prev2").mouseout(function(){
		$(this).toggleClass("prev2on");
	});
	
	$(".next3").click(function(){
		$(".project3_image").scrollTo('+=600px', 200);
		$(".caption3").scrollTo('+=700px', 0);
		return false;
	});
	$(".next3").mouseover(function(){
		$(this).toggleClass("next3on");
	});
	$(".next3").mouseout(function(){
		$(this).toggleClass("next3on");
	});

	$(".prev3").click(function(){
		$(".project3_image").scrollTo('-=600px', 200);
		$(".caption3").scrollTo('-=700px', 0);
		return false;
	});
	$(".prev3").mouseover(function(){
		$(this).toggleClass("prev3on");
	});
	$(".prev3").mouseout(function(){
		$(this).toggleClass("prev3on");
	});
	
	$(".next4").click(function(){
		$(".project4_image").scrollTo('+=600px', 200);
		return false;
	});
	$(".next4").mouseover(function(){
		$(this).toggleClass("next4on");
	});
	$(".next4").mouseout(function(){
		$(this).toggleClass("next4on");
	});

	$(".prev4").click(function(){
		$(".project4_image").scrollTo('-=600px', 200);
		return false;
	});
	$(".prev4").mouseover(function(){
		$(this).toggleClass("prev4on");
		});
	$(".prev4").mouseout(function(){
		$(this).toggleClass("prev4on");
		});
	
	$(".next5").click(function(){
		$(".project5_image").scrollTo('+=600px', 200);
		$(".caption5").scrollTo('+=700px', 0);
		return false;
		});
	$(".next5").mouseover(function(){
		$(this).toggleClass("next5on");
		});
	$(".next5").mouseout(function(){
		$(this).toggleClass("next5on");
		});

	$(".prev5").click(function(){
		$(".project5_image").scrollTo('-=600px', 200);
		$(".caption5").scrollTo('-=700px', 0);
		return false;
		});
	$(".prev5").mouseover(function(){
		$(this).toggleClass("prev5on");
		});
	$(".prev5").mouseout(function(){
		$(this).toggleClass("prev5on");
		});
		
	$(".next6").click(function(){
		$(".project6_image").scrollTo('+=600px', 200);
		$(".caption6").scrollTo('+=700px', 0);
		return false;
		});
	$(".next6").mouseover(function(){
		$(this).toggleClass("next6on");
		});
	$(".next6").mouseout(function(){
		$(this).toggleClass("next6on");
		});

	$(".prev6").click(function(){
		$(".project6_image").scrollTo('-=600px', 200);
		$(".caption6").scrollTo('-=700px', 0);
		return false;
		});
	
	$(".prev6").mouseover(function(){
		$(this).toggleClass("prev6on");
		});
	$(".prev6").mouseout(function(){
		$(this).toggleClass("prev6on");
		});
	
	$(".next7").click(function(){
		$(".project7_image").scrollTo('+=600px', 200);
		$(".caption7").scrollTo('+=700px', 0);
		return false;
		});
	$(".next7").mouseover(function(){
		$(this).toggleClass("next7on");
		});
	$(".next7").mouseout(function(){
		$(this).toggleClass("next7on");
		});

	$(".prev7").click(function(){
		$(".project7_image").scrollTo('-=600px', 200);
		$(".caption7").scrollTo('-=700px', 0);
		return false;
		});
	$(".prev7").mouseover(function(){
		$(this).toggleClass("prev7on");
		});
	$(".prev7").mouseout(function(){
		$(this).toggleClass("prev7on");
		});
	
	$(".next8").click(function(){
		$(".project8_image").scrollTo('+=600px', 200);
		$(".caption8").scrollTo('+=700px', 0);
		return false;
		});
	$(".next8").mouseover(function(){
		$(this).toggleClass("next8on");
		});
	$(".next8").mouseout(function(){
		$(this).toggleClass("next8on");
		});

	$(".prev8").click(function(){
		$(".project8_image").scrollTo('-=600px', 200);
		$(".caption8").scrollTo('-=700px', 0);
		return false;
		});
	$(".prev8").mouseover(function(){
		$(this).toggleClass("prev8on");
		});
	$(".prev8").mouseout(function(){
		$(this).toggleClass("prev8on");
		});
	
	$(".next9").click(function(){
		$(".project9_image").scrollTo('+=600px', 200);
		$(".caption9").scrollTo('+=700px', 0);
		return false;
		});
	$(".next9").mouseover(function(){
		$(this).toggleClass("next9on");
		});
	$(".next9").mouseout(function(){
		$(this).toggleClass("next9on");
		});

	$(".prev9").click(function(){
		$(".project9_image").scrollTo('-=600px', 200);
		$(".caption9").scrollTo('-=700px', 0);
		return false;
		});
	$(".prev9").mouseover(function(){
		$(this).toggleClass("prev9on");
		});
	$(".prev9").mouseout(function(){
		$(this).toggleClass("prev9on");
		});
	
	$(".next10").click(function(){
		$(".project10_image").scrollTo('+=600px', 200);
		$(".caption10").scrollTo('+=700px', 0);
		return false;
		});
	$(".next10").mouseover(function(){
		$(this).toggleClass("next10on");
		});
	$(".next10").mouseout(function(){
		$(this).toggleClass("next10on");
		});

	$(".prev10").click(function(){
		$(".project10_image").scrollTo('-=600px', 200);
		$(".caption10").scrollTo('-=700px', 0);
		return false;
		});
	$(".prev10").mouseover(function(){
		$(this).toggleClass("prev10on");
		});
	$(".prev10").mouseout(function(){
		$(this).toggleClass("prev10on");
		});
	
	$(".next11").click(function(){
		$(".project11_image").scrollTo('+=600px', 200);
		$(".caption11").scrollTo('+=700px', 0);
		return false;
		});
	$(".next11").mouseover(function(){
		$(this).toggleClass("next11on");
		});
	$(".next11").mouseout(function(){
		$(this).toggleClass("next11on");
		});

	$(".prev11").click(function(){
		$(".project11_image").scrollTo('-=600px', 200);
		$(".caption11").scrollTo('-=700px', 0);
		return false;
		});
	$(".prev11").mouseover(function(){
		$(this).toggleClass("prev11on");
		});
	$(".prev11").mouseout(function(){
		$(this).toggleClass("prev11on");
		});
	
	$(".next12").click(function(){
		$(".project12_image").scrollTo('+=600px', 200);
		$(".caption12").scrollTo('+=700px', 0);
		return false;
		});
	$(".next12").mouseover(function(){
		$(this).toggleClass("next12on");
		});
	$(".next12").mouseout(function(){
		$(this).toggleClass("next12on");
		});

	$(".prev12").click(function(){
		$(".project12_image").scrollTo('-=600px', 200);
		$(".caption12").scrollTo('-=700px', 0);
		return false;
		});
	$(".prev12").mouseover(function(){
		$(this).toggleClass("prev12on");
		});
	$(".prev12").mouseout(function(){
		$(this).toggleClass("prev12on");
		});
	
	$(".next13").click(function(){
		$(".project13_image").scrollTo('+=600px', 200);
		$(".caption13").scrollTo('+=700px', 0);
		return false;
		});
	$(".next13").mouseover(function(){
		$(this).toggleClass("next13on");
		});
	$(".next13").mouseout(function(){
		$(this).toggleClass("next13on");
		});

	$(".prev13").click(function(){
		$(".project13_image").scrollTo('-=600px', 200);
		$(".caption13").scrollTo('-=700px', 0);
		return false;
		});
	$(".prev13").mouseover(function(){
		$(this).toggleClass("prev13on");
		});
	$(".prev13").mouseout(function(){
		$(this).toggleClass("prev13on");
		});
	
	$(".next14").click(function(){
		$(".project14_image").scrollTo('+=600px', 200);
		$(".caption14").scrollTo('+=700px', 0);
		return false;
		});
	$(".next14").mouseover(function(){
		$(this).toggleClass("next14on");
		});
	$(".next14").mouseout(function(){
		$(this).toggleClass("next14on");
		});

	$(".prev14").click(function(){
		$(".project14_image").scrollTo('-=600px', 200);
		$(".caption14").scrollTo('-=700px', 0);
		return false;
		});
	$(".prev14").mouseover(function(){
		$(this).toggleClass("prev14on");
		});
	$(".prev14").mouseout(function(){
		$(this).toggleClass("prev14on");
		});

	$(".next15").click(function(){
		$(".project15_image").scrollTo('+=600px', 200);
		$(".caption15").scrollTo('+=700px', 0);
		return false;
		});
	$(".next15").mouseover(function(){
		$(this).toggleClass("next15on");
		});
	$(".next15").mouseout(function(){
		$(this).toggleClass("next15on");
		});

	$(".prev15").click(function(){
		$(".project15_image").scrollTo('-=600px', 200);
		$(".caption15").scrollTo('-=700px', 0);
		return false;
		});
	$(".prev15").mouseover(function(){
		$(this).toggleClass("prev15on");
		});
	$(".prev15").mouseout(function(){
		$(this).toggleClass("prev15on");
		});

	$(".next16").click(function(){
		$(".project16_image").scrollTo('+=600px', 200);
		$(".caption16").scrollTo('+=700px', 0);
		return false;
		});
	$(".next16").mouseover(function(){
		$(this).toggleClass("next16on");
		});
	$(".next16").mouseout(function(){
		$(this).toggleClass("next16on");
		});

	$(".prev17").click(function(){
		$(".project17_image").scrollTo('-=600px', 200);
		$(".caption17").scrollTo('-=700px', 0);
		return false;
		});
	$(".prev17").mouseover(function(){
		$(this).toggleClass("prev17on");
		});
	$(".prev17").mouseout(function(){
		$(this).toggleClass("prev17on");
		});

	$(".next18").click(function(){
		$(".project18_image").scrollTo('+=600px', 200);
		$(".caption18").scrollTo('+=700px', 0);
		return false;
		});
	$(".next18").mouseover(function(){
		$(this).toggleClass("next18on");
		});
	$(".next18").mouseout(function(){
		$(this).toggleClass("next18on");
		});
	
	$(".prev18").click(function(){
		$(".project18_image").scrollTo('-=600px', 200);
		$(".caption18").scrollTo('-=700px', 0);
		return false;
		});
	$(".prev18").mouseover(function(){
		$(this).toggleClass("prev18on");
		});
	$(".prev18").mouseout(function(){
		$(this).toggleClass("prev18on");
		});
	
	$(".next19").click(function(){
		$(".project19_image").scrollTo('+=600px', 200);
		$(".caption19").scrollTo('+=700px', 0);
		return false;
		});
	$(".next19").mouseover(function(){
		$(this).toggleClass("next19on");
		});
	$(".next19").mouseout(function(){
		$(this).toggleClass("next19on");
		});

	$(".prev19").click(function(){
		$(".project19_image").scrollTo('-=600px', 200);
		$(".caption19").scrollTo('-=700px', 0);
		return false;
		});
	$(".prev19").mouseover(function(){
		$(this).toggleClass("prev19on");
		});
	$(".prev19").mouseout(function(){
		$(this).toggleClass("prev19on");
		});
	
	$(".next20").click(function(){
		$(".project20_image").scrollTo('+=600px', 200);
		$(".caption20").scrollTo('+=700px', 0);
		return false;
		});
	$(".next20").mouseover(function(){
		$(this).toggleClass("next20on");
		});
	$(".next20").mouseout(function(){
		$(this).toggleClass("next20on");
		});
	
	$(".prev20").click(function(){
		$(".project20_image").scrollTo('-=600px', 200);
		$(".caption20").scrollTo('-=700px', 0);
		return false;
		});
	$(".prev20").mouseover(function(){
		$(this).toggleClass("prev20on");
		});
	$(".prev20").mouseout(function(){
		$(this).toggleClass("prev20on");
		});
	$(".next20").click(function(){
		$(".project20_image").scrollTo('+=600px', 200);
		$(".caption20").scrollTo('+=700px', 0);
		return false;
		});
	$(".next20").mouseover(function(){
		$(this).toggleClass("next20on");
		});
	$(".next20").mouseout(function(){
		$(this).toggleClass("next20on");
		});

	$(".prev20").click(function(){
		$(".project20_image").scrollTo('-=600px', 200);
		$(".caption20").scrollTo('-=700px', 0);
		return false;
		});
	$(".prev20").mouseover(function(){
		$(this).toggleClass("prev20on");
		});
	$(".prev20").mouseout(function(){
		$(this).toggleClass("prev20on");
		});

	//collapse all project details
	$(".collapse_all_projects").click(function(){
		$(".project1_details").slideUp(500)
		$(".project2_details").slideUp(500)
		$(".project3_details").slideUp(500)
		$(".project4_details").slideUp(500)
		$(".project5_details").slideUp(500)
		$(".project6_details").slideUp(500)
		$(".project7_details").slideUp(500)
		$(".project8_details").slideUp(500)
		$(".project9_details").slideUp(500)
		$(".project10_details").slideUp(500)
		$(".project11_details").slideUp(500)
		$(".project12_details").slideUp(500)
		$(".project13_details").slideUp(500)
		$(".project14_details").slideUp(500)
		$(".project15_details").slideUp(500)
		$(".project16_details").slideUp(500)
		$(".project17_details").slideUp(500)
		$(".project18_details").slideUp(500)
		$(".project19_details").slideUp(500)
		$(".project20_details").slideUp(500)
		return false;
		});

	//expand all project details
	$(".show_all_projects").click(function(){
		$(this).hide()
		$(".show_recent_only").show()
		$(".project_list li:gt(6)").slideDown()
		return false;
	});

	//show recent projects only
	$(".show_recent_only").click(function(){
		$(this).hide()
		$(".show_all_projects").show()
		$(".project_list li:gt(6)").slideUp()
		return false;
	});

 	});
