
/*---------------------------------
  * Testimonials controller
----------------------------------*/
function testimonials_controller() {
	var root_div = "text";
	var testimonials_obj = new testimonials_widget(root_div);
	testimonials_obj.show_testimonials();
	
	update_testimonials_navigation('testimonials');
}

function prisoners_controller() {
	var root_div = "text";
	var testimonials_obj = new testimonials_widget(root_div);
	testimonials_obj.show_prisoners();
	
	update_testimonials_navigation('prisoners');
}

function service_providers_controller () {
	var root_div = "text";
	var testimonials_obj = new testimonials_widget(root_div);
	testimonials_obj.show_providers();
	
	update_testimonials_navigation('providers');
}

function project_artwork_controller() {
	var root_div = "text";
	var testimonials_obj = new testimonials_widget(root_div);
	testimonials_obj.show_project_artwork();
	
	update_testimonials_navigation('artwork');
}


/*---------------------------------
	* Teachers Letters
----------------------------------*/
function teacher_quotes_controller() {
	var root_div = "text";
	var testimonials_obj = new testimonials_widget(root_div);
	testimonials_obj.show_testimonials();
		
	update_teacher_sub_navigation('quotes');
}

function teacher_A_controller() {
	var root_div = "text";
	var testimonials_obj = new testimonials_widget(root_div);
	testimonials_obj.show_teacher_A();
	
	update_teacher_sub_navigation('A');
	
}

function teacher_B_controller() {
	var root_div = "text";
	var testimonials_obj = new testimonials_widget(root_div);
	testimonials_obj.show_teacher_B();
	
	update_teacher_sub_navigation('B');
	
}


/*---------------------------------
	* Providers Letters
------------------------------------*/
function provider_A_controller() {
	var root_div = "text";
	var testimonials_obj = new testimonials_widget(root_div);
	testimonials_obj.show_provider_A();
	
	update_providers_sub_navigation('full_circle');
}

function provider_B_controller() {
	var root_div = "text";
	var testimonials_obj = new testimonials_widget(root_div);
	testimonials_obj.show_provider_B();
	
	update_providers_sub_navigation('peace_builder');
}


/*---------------------------------
	* Prisoners Letters
----------------------------------*/
function prisoner_A_controller() {
	var root_div = "text";
	var testimonials_obj = new testimonials_widget(root_div);
	testimonials_obj.show_prisoner_A();
	
	update_sub_navigation('A');
}
function prisoner_B_controller() {
	var root_div = "text";
	var testimonials_obj = new testimonials_widget(root_div);
	testimonials_obj.show_prisoner_B();
	
	update_sub_navigation('B');
}
function prisoner_C_controller() {
	var root_div = "text";
	var testimonials_obj = new testimonials_widget(root_div);
	testimonials_obj.show_prisoner_C();
	
	update_sub_navigation('C');
}
function prisoner_D_controller() {
	var root_div = "text";
	var testimonials_obj = new testimonials_widget(root_div);
	testimonials_obj.show_prisoner_D();
	
	update_sub_navigation('D');
}




/*---------------------------------
	* Display Helpers
----------------------------------*/
function update_sub_navigation(button) {
	var root_div = "text";
	var testimonials_obj = new testimonials_widget(root_div);
	testimonials_obj.update_prisoners_navigation(button);	
	
	window.scrollTo(0,0);
}

function update_providers_sub_navigation(button) {
	var root_div = "text";
	var testimonials_obj = new testimonials_widget(root_div);
	testimonials_obj.update_providers_navigation(button);	
	
	window.scrollTo(0,0);
}

function update_teacher_sub_navigation(ext) {
	var root_div = "text";
	var testimonials_obj = new testimonials_widget(root_div);
	testimonials_obj.update_teachers_navigation(ext);
	
	window.scrollTo(0,0);
}

function update_testimonials_navigation (button) {


	window.scrollTo(0,0);
	
	switch (button) {		
		case "prisoners":
			$('link_1').className = "active";		
			$('link_2').className = "button";
			$('link_3').className = "button";
			$('link_4').className = "button";
			break;		
		case "testimonials":
			$('link_1').className = "button";
			$('link_2').className = "active";
			$('link_3').className = "button";
			$('link_4').className = "button";
			break;
		case "providers":
			$('link_1').className = "button";
			$('link_2').className = "button";
			$('link_3').className = "active";
			$('link_4').className = "button";
			break;
		case "artwork":
			$('link_1').className = "button";
			$('link_2').className = "button";
			$('link_3').className = "button";
			$('link_4').className = "active";
			break;
		default:
			alert('Loading...');
	}
}
