<commit_before>/**
 * Author:
 * Fabz
 */

// require("./libs/skrollr");
// require("./libs/picturefill");

// Create a closure to maintain scope of the '$' and FBZ
;(function(FBZ, $) {

	$(function() {
		// Any globals go here in CAPS (but avoid if possible)

		// follow a singleton pattern
		// (http://addyosmani.com/resources/essentialjsdesignpatterns/book/#singletonpatternjavascript)
		FBZ.control.addLoadingCurtain();
		FBZ.control.readFromGoogleDocs();

	});// END DOC READY
	
	FBZ.model = {
		// add your data here 

		windowH	: 0, //browser screen 
		windowW	: 0,
		stageH	: window.innerHeight, //total document size
		stageW	: window.innerWidth,
		currentSection : 0,
		lastScrollTop : 0, // setting initial scrolltop as top of page
		direction : 0 ,// direction of scroll 1)up -1)down 0)static
		stateObj : {},
		currentSection : "home",
		i18n : null,
		noBrain : {},
		proyects: {},
		totalAmountOfProjects:0, 
		currentProjectIndex:0,
		initialProjectIndex:0,
		courses: {},
		totalAmountOfCourses:0,
		people : {},
		totalAmountOfPeople:0,
		proyectsHeight: 0,
		visibleScrollProjects : 0,
		totalScrollProjects: 0 ,	
		overFlowProjects: 0 		
	};

	FBZ.view = {

		// add dom elements here
		$stage 				:$(window),
		$header				:$('header'),
		$container			:$('container'),
		$block				:$('.block'),
		$langBtn			:$('.lang-btn'),
		$footer				:$('footer'),
		$scrollIcon 		:$('.intro-scroll-icon'),
		$projectArrowUp		:$('.arrow-up'),
		$projectArrowDown	:$('.arrow-down'),
		$projectScroller 	:$('.projects-scroller'),
		$projectsCardHolder	:$('.projects-holder'),
		$projectCard 		:$('.project-card'),
		$coursesContainers	:$('.course-container'),
		$staffContainer		:$('.people-staff'),
		$collabContainer	:$('.people-collaborators'),
		$footerList			:$('.footer-list'),
		$logosFooter		:$('.logo-footer'),

	};

	FBZ.control = {
		// add function here
		init : function () {
			console.debug('NullØbject is running');
			FBZ.control.defineStage();
			FBZ.control.resizeContentBlock();
			FBZ.control.scrollerControl();
			FBZ.control.onResizeStage();
			FBZ.control.multilingualEngine(); 
			FBZ.control.checkURL();
		//	FBZ.control.twitterWidget();
			FBZ.control.disappearScrollIcon();
	//		FBZ.control.interactiveBG();
			FBZ.control.determineSection();
			// FBZ.control.removeLoadingCurtain();
			FBZ.control.activateFooter();
		},

		activateFooter : function () { 

			//console.log(FBZ.view.$footerList, FBZ.view.$logosFooter);
			FBZ.view.$logosFooter.on("mouseover",FBZ.control.displayFooterList);
		},

		displayFooterList : function (e) {

			FBZ.view.$logosFooter.off("mouseover",FBZ.control.displayFooterList);

			var currentRolloveredSection = e.currentTarget.getAttribute("data");

			for (var i = 0 ; i < FBZ.view.$footerList.length ; i++ ) { 

				if( $(FBZ.view.$footerList[i]).hasClass(currentRolloveredSection) ) {

					FBZ.control.fadeShow( $(FBZ.view.$footerList[i]));
					// when the animation finishes reactivate btns
					setTimeout(function(){ 
						FBZ.view.$logosFooter.on("mouseover",FBZ.control.displayFooterList);

					}, 702);
				}else{ 
					FBZ.control.fadeHide( $(FBZ.view.$footerList[i]));
				}

			}

		},

		addLoadingCurtain : function() { 
			FBZ.control.fadeShow($(".curtain"));
		},

		removeLoadingCurtain : function() { 
			FBZ.control.fadeHide($(".curtain"));
		},

		determineSection : function () { 
			// this function determines the current page and assign it to a string

			var section = window.location.href.split("/");

			if ( section.length <= 4 ) { 

					FBZ.model.currentSection  = "home";

			} else { 

					FBZ.model.currentSection  = section[section.length-2];
			}

			//console.log(FBZ.model.currentSection);

		}, 

		sectionMonitor : function (index) { 

			console.log("index :", index);
			//if (index)
			if(FBZ.model.currentSection === "home" && index === 3 )  { 
				FBZ.slider.createInterval();
			}else { 
				FBZ.slider.deleteInterval();
			}


		},

		parseBrain : function () {

			FBZ.slider.init();
			// triggers the init func
			FBZ.control.init();

			if (	FBZ.model.currentSection == 'home' ) { 

				FBZ.control.initHome();

			} else if (	FBZ.model.currentSection == 'academy' ) { 

				FBZ.control.initAcademy();

			} else if (	FBZ.model.currentSection == 'labs' ) { 

				FBZ.control.initLabs();

			}

		},


		/// init specific per section

		initHome : function () { 

		//	console.log(" home");
			FBZ.control.populateProjects();
			FBZ.control.populatePeople();
		},

		initAcademy : function () { 

		//	console.log("academy init");
			FBZ.control.populateCourses();
		},

		initLabs : function () { 

//			console.log("labs init");

		},


		populateProjects :  function () { 
		//	console.log("populateProjects");

			FBZ.model.totalAmountOfProjects  = FBZ.model.noBrain.Projects.elements.length;
			 /// ,this is an injection of content coming from the no brain 
//			console.log(FBZ.model.noBrain.Projects.elements.length);
			for ( var i = 0 ; i < FBZ.model.noBrain.Projects.elements.length ; i ++ ) { 
//				console.log(FBZ.model.noBrain.Projects.elements[i]);
				if(FBZ.model.noBrain.Projects.elements[i].Privacy != "PRIVATE") {  

				FBZ.view.$projectsCardHolder.append(

						"<div class='project-card'>"+ 

											"<h3 data-translatable class='project-name'>"+FBZ.model.noBrain.Projects.elements[i].Name +"</h3>"+
											"<div class='project-image is-hidden'>"+
											FBZ.model.noBrain.Projects.elements[i].Image+"</div>"+
											// "<div class='project-text-wrapper is-hidden'>"+
										"<h3 data-translatable class='project-client is-hidden'>"+FBZ.model.noBrain.Projects.elements[i].Client +"</h3>"+
											"<p class='project-date is-hidden'>"+ FBZ.model.noBrain.Projects.elements[i].StartDate+"</p>"+
											"<p class='project-description is-hidden' data-translatable>"+FBZ.model.noBrain.Projects.elements[i].Description+"</p>"+
											// "</div><!--end project text-wrapper-->"+
											"<div class='project-keywords is-hidden' data-translatable>"+FBZ.model.noBrain.Projects.elements[i].Keywords+"<span></span></div>"+
										"</div><!--end project card-->");
				}
			}
			// to activate accordeon.
			FBZ.control.activateProjectsAccordeon();

		},

		populateCourses :  function () { 
	//		looconsole.log("populateCourses");

 			FBZ.model.totalAmountOfCourses  = FBZ.model.noBrain.Courses.elements.length;
// 			 /// ,this is an injection of content coming from the no brain 
		//	console.log(FBZ.model.noBrain.Courses.elements.length, FBZ.view.$coursesContainers);
			for ( var i = 0 ; i < FBZ.model.noBrain.Courses.elements.length ; i ++ ) { 
				console.log("container : ", FBZ.view.$coursesContainers[i]);
				if(FBZ.model.noBrain.Courses.elements[i].Privacy != "PRIVATE") {  
						
			//	$coursesContainers

				 $(FBZ.view.$coursesContainers[i]).append(

						"<div class='course-card'>"+ 


									"<div class='course-image'>"+
											FBZ.model.noBrain.Courses.elements[i].CoursePic+
									"</div>"+
									"<div class='course-box'>"+
										"<h3 data-translatable class='course-name'>"+FBZ.model.noBrain.Courses.elements[i].CourseName +"</h3>"+
										"<h4 data-translatable class='course-start-date'>"+FBZ.model.noBrain.Courses.elements[i].LessonDates.split(",")[0] +"</h3>"+

										"<p data-translatable class='course-teacher'>"+FBZ.model.noBrain.Courses.elements[i].TeacherName +"</p>"+
										"<div class='course-details is-hidden'>"+
											"<p data-translatable class='course-description'>"+FBZ.model.noBrain.Courses.elements[i].CourseDescription+"</p>"+
											"<p data-translatable class='course-students'>"+FBZ.model.noBrain.Courses.elements[i].StudentDescription+"</p>"+
											"<p data-translatable class='course-lessonDates'>"+FBZ.model.noBrain.Courses.elements[i].LessonDates+"</p>"+
											"<p data-translatable class='course-lessonHours'>"+FBZ.model.noBrain.Courses.elements[i].LessonHours+"</p>"+
											"<div class='teacher-image'>"+
												FBZ.model.noBrain.Courses.elements[i].TeacherPic+"</div>"+
											// "<h3 data-translatable class='course-client is-hidden'>"+FBZ.model.noBrain.Courses.elements[i].Client +"</h3>"+
											// 	"<p class='course-date is-hidden'>"+ FBZ.model.noBrain.Courses.elements[i].StartDate+"</p>"+
											// 	"<p class='course-description is-hidden' data-translatable>"+FBZ.model.noBrain.Courses.elements[i].Description+"</p>"+
											// 	// "</div><!--end course text-wrapper-->"+
											 	// "<button class='course-keywords is-hidden' href='"+FBZ.model.noBrain.Courses.elements[i].URL+"' data-translatable>"+FBZ.model.noBrain.Courses.elements[i].CTACopy+"</button>"+
										"</div>"+
									"</div>"+
								"</div><!--end course card-->"
										);
				}
			}

		},

		populatePeople : function () { 

			FBZ.model.totalAmountOfPeople = FBZ.model.noBrain.People.elements.length;

			FBZ.model.peoplePicBaseURL = "assets/img/people/";
			for ( var i = 0 ; i < FBZ.model.noBrain.People.elements.length ; i ++ ) { 
			//	console.log(FBZ.model.noBrain.People.elements[i]);
				
				var peopleCard = "<div class='people person-card "+FBZ.model.noBrain.People.elements[i].Rank+"'>"+ 
									"<div class='person-img-decoration'><img src='assets/img/circle_people.svg'/></div>"+

										"<div class='person-img'>"+
											"<picture>"+
												"<source srcset='"+FBZ.model.peoplePicBaseURL+FBZ.model.noBrain.People.elements[i].Pic+"_small.jpg' media='(max-width: 320px)'/>"+
												"<source srcset='"+FBZ.model.peoplePicBaseURL+FBZ.model.noBrain.People.elements[i].Pic+"_med.jpg' media='(max-width: 650px)'/>"+
												"<source srcset='"+FBZ.model.peoplePicBaseURL+FBZ.model.noBrain.People.elements[i].Pic+"_big.jpg' media='(max-width: 900px)'/>"+
												"<img srcset='"+FBZ.model.peoplePicBaseURL+FBZ.model.noBrain.People.elements[i].Pic+"_med.jpg' alt='"+FBZ.model.noBrain.People.elements[i].Name+" "+FBZ.model.noBrain.People.elements[i].LastName+"'/>"+
											"</picture>"+
										"</div>"+
											"<h3>"+FBZ.model.noBrain.People.elements[i].Name+" "+FBZ.model.noBrain.People.elements[i].LastName+"</h3>"+
											"<h4 data-translatable>"+FBZ.model.noBrain.People.elements[i].Role+"</h4>"+
									"</div><!-- end person-->";

				if (FBZ.model.noBrain.People.elements[i].Rank == "staff") {

					FBZ.view.$staffContainer.append(peopleCard);
				//	console.log("staff");
				}else { 
					FBZ.view.$collabContainer.append(peopleCard);
				}
			
			}
		},

		populateProjects :  function () { 
		//	console.log("populateProjects");

			FBZ.model.totalAmountOfProjects  = FBZ.model.noBrain.Projects.elements.length;
			 /// ,this is an injection of content coming from the no brain 
//			console.log(FBZ.model.noBrain.Projects.elements.length);
			for ( var i = 0 ; i < FBZ.model.noBrain.Projects.elements.length ; i ++ ) { 
//				console.log(FBZ.model.noBrain.Projects.elements[i]);
				if(FBZ.model.noBrain.Projects.elements[i].Privacy != "PRIVATE") {  

				FBZ.view.$projectsCardHolder.append(

						"<div class='project-card'>"+ 

											"<h3 data-translatable class='project-name'>"+FBZ.model.noBrain.Projects.elements[i].Name +"</h3>"+
											"<div class='project-image is-hidden'>"+
											FBZ.model.noBrain.Projects.elements[i].Image+"</div>"+
											// "<div class='project-text-wrapper is-hidden'>"+
										"<h3 data-translatable class='project-client is-hidden'>"+FBZ.model.noBrain.Projects.elements[i].Client +"</h3>"+
											"<p class='project-date is-hidden'>"+ FBZ.model.noBrain.Projects.elements[i].StartDate+"</p>"+
											"<p class='project-description is-hidden' data-translatable>"+FBZ.model.noBrain.Projects.elements[i].Description+"</p>"+
											// "</div><!--end project text-wrapper-->"+
											"<div class='project-keywords is-hidden' data-translatable>"+FBZ.model.noBrain.Projects.elements[i].Keywords+"<span></span></div>"+
										"</div><!--end project card-->");
				}
			}
			// to activate accordeon.
			FBZ.control.activateProjectsAccordeon();

		},

		activateProjectsAccordeon : function () {

			FBZ.model.visibleScrollProjects 			= FBZ.view.$projectScroller.height();
			FBZ.model.totalScrollProjects 				= FBZ.view.$projectsCardHolder.height();
			FBZ.model.overFlowProjects 					= FBZ.model.totalScrollProjects - FBZ.model.visibleScrollProjects;
			FBZ.model.proyectsHeight 					= $('.project-card').height();
			FBZ.model.currentProjectIndex				= Math.floor( FBZ.model.visibleScrollProjects / FBZ.model.proyectsHeight);
			FBZ.model.initialProjectIndex 				= FBZ.model.currentProjectIndex;

			FBZ.view.$projectScroller.css({ height : FBZ.model.proyectsHeight*FBZ.model.initialProjectIndex});

	//		console.log(FBZ.model.proyectsHeight,FBZ.model.currentProjectIndex, FBZ.model.totalAmountOfProjects );

			// on click car
			/// arrows nav
			FBZ.view.$projectArrowUp.on('click hover', function () {

				if (FBZ.model.currentProjectIndex >  FBZ.model.initialProjectIndex ) {
					FBZ.model.currentProjectIndex --;
				}

				FBZ.control.moveToProjectIndex(); 
			});

			FBZ.view.$projectArrowDown.on('click hover', function () {


				if (FBZ.model.totalAmountOfProjects-1 >  FBZ.model.currentProjectIndex ) {
					FBZ.model.currentProjectIndex ++;
				}

					FBZ.control.moveToProjectIndex(); 
			});
			//onClickOpenProjectCard
					FBZ.model.$projectCard 	 = $('.project-card');
					FBZ.model.$projectCard.on('click',FBZ.control.collapseOrExpandProjectSelector);

		},

		moveToProjectIndex : function () { 
				var posy =  FBZ.view.$projectScroller.height() - FBZ.model.proyectsHeight* FBZ.model.currentProjectIndex;
					FBZ.view.$projectsCardHolder.css({top: posy } );
			//		console.log(posy,FBZ.model.currentProjectIndex );
		},
<commit_msg>courses card population done, wit on click<commit_after>/**
 * Author:
 * Fabz
 */

// require("./libs/skrollr");
// require("./libs/picturefill");

// Create a closure to maintain scope of the '$' and FBZ
;(function(FBZ, $) {

	$(function() {
		// Any globals go here in CAPS (but avoid if possible)

		// follow a singleton pattern
		// (http://addyosmani.com/resources/essentialjsdesignpatterns/book/#singletonpatternjavascript)
		FBZ.control.addLoadingCurtain();
		FBZ.control.readFromGoogleDocs();

	});// END DOC READY
	
	FBZ.model = {
		// add your data here 

		windowH	: 0, //browser screen 
		windowW	: 0,
		stageH	: window.innerHeight, //total document size
		stageW	: window.innerWidth,
		currentSection : 0,
		lastScrollTop : 0, // setting initial scrolltop as top of page
		direction : 0 ,// direction of scroll 1)up -1)down 0)static
		stateObj : {},
		currentSection : "home",
		i18n : null,
		noBrain : {},
		proyects: {},
		totalAmountOfProjects:0, 
		currentProjectIndex:0,
		initialProjectIndex:0,
		courses: {},
		totalAmountOfCourses:0,
		people : {},
		totalAmountOfPeople:0,
		proyectsHeight: 0,
		visibleScrollProjects : 0,
		totalScrollProjects: 0 ,	
		overFlowProjects: 0 		
	};

	FBZ.view = {

		// add dom elements here
		$stage 				:$(window),
		$header				:$('header'),
		$container			:$('container'),
		$block				:$('.block'),
		$langBtn			:$('.lang-btn'),
		$footer				:$('footer'),
		$scrollIcon 		:$('.intro-scroll-icon'),
		$projectArrowUp		:$('.arrow-up'),
		$projectArrowDown	:$('.arrow-down'),
		$projectScroller 	:$('.projects-scroller'),
		$projectsCardHolder	:$('.projects-holder'),
		$projectCard 		:$('.project-card'),
		$coursesContainers	:$('.course-container'),
		$staffContainer		:$('.people-staff'),
		$collabContainer	:$('.people-collaborators'),
		$footerList			:$('.footer-list'),
		$logosFooter		:$('.logo-footer'),

	};

	FBZ.control = {
		// add function here
		init : function () {
			console.debug('NullØbject is running');
			FBZ.control.defineStage();
			FBZ.control.resizeContentBlock();
			FBZ.control.scrollerControl();
			FBZ.control.onResizeStage();
			FBZ.control.multilingualEngine(); 
			FBZ.control.checkURL();
		//	FBZ.control.twitterWidget();
			FBZ.control.disappearScrollIcon();
	//		FBZ.control.interactiveBG();
			FBZ.control.determineSection();
			// FBZ.control.removeLoadingCurtain();
			FBZ.control.activateFooter();
		},

		activateFooter : function () { 

			//console.log(FBZ.view.$footerList, FBZ.view.$logosFooter);
			FBZ.view.$logosFooter.on("mouseover",FBZ.control.displayFooterList);
		},

		displayFooterList : function (e) {

			FBZ.view.$logosFooter.off("mouseover",FBZ.control.displayFooterList);

			var currentRolloveredSection = e.currentTarget.getAttribute("data");

			for (var i = 0 ; i < FBZ.view.$footerList.length ; i++ ) { 

				if( $(FBZ.view.$footerList[i]).hasClass(currentRolloveredSection) ) {

					FBZ.control.fadeShow( $(FBZ.view.$footerList[i]));
					// when the animation finishes reactivate btns
					setTimeout(function(){ 
						FBZ.view.$logosFooter.on("mouseover",FBZ.control.displayFooterList);

					}, 702);
				}else{ 
					FBZ.control.fadeHide( $(FBZ.view.$footerList[i]));
				}

			}

		},

		addLoadingCurtain : function() { 
			FBZ.control.fadeShow($(".curtain"));
		},

		removeLoadingCurtain : function() { 
			FBZ.control.fadeHide($(".curtain"));
		},

		determineSection : function () { 
			// this function determines the current page and assign it to a string

			var section = window.location.href.split("/");

			if ( section.length <= 4 ) { 

					FBZ.model.currentSection  = "home";

			} else { 

					FBZ.model.currentSection  = section[section.length-2];
			}

			//console.log(FBZ.model.currentSection);

		}, 

		sectionMonitor : function (index) { 

			console.log("index :", index);
			//if (index)
			if(FBZ.model.currentSection === "home" && index === 3 )  { 
				FBZ.slider.createInterval();
			}else { 
				FBZ.slider.deleteInterval();
			}


		},

		parseBrain : function () {

			FBZ.slider.init();
			// triggers the init func
			FBZ.control.init();

			if (	FBZ.model.currentSection == 'home' ) { 

				FBZ.control.initHome();

			} else if (	FBZ.model.currentSection == 'academy' ) { 

				FBZ.control.initAcademy();

			} else if (	FBZ.model.currentSection == 'labs' ) { 

				FBZ.control.initLabs();

			}

		},


		/// init specific per section

		initHome : function () { 

		//	console.log(" home");
			FBZ.control.populateProjects();
			FBZ.control.populatePeople();
		},

		initAcademy : function () { 

		//	console.log("academy init");
			FBZ.control.populateCourses();
		},

		initLabs : function () { 

//			console.log("labs init");

		},


		populateProjects :  function () { 
		//	console.log("populateProjects");

			FBZ.model.totalAmountOfProjects  = FBZ.model.noBrain.Projects.elements.length;
			 /// ,this is an injection of content coming from the no brain 
//			console.log(FBZ.model.noBrain.Projects.elements.length);
			for ( var i = 0 ; i < FBZ.model.noBrain.Projects.elements.length ; i ++ ) { 
//				console.log(FBZ.model.noBrain.Projects.elements[i]);
				if(FBZ.model.noBrain.Projects.elements[i].Privacy != "PRIVATE") {  

				FBZ.view.$projectsCardHolder.append(

						"<div class='project-card'>"+ 

											"<h3 data-translatable class='project-name'>"+FBZ.model.noBrain.Projects.elements[i].Name +"</h3>"+
											"<div class='project-image is-hidden'>"+
											FBZ.model.noBrain.Projects.elements[i].Image+"</div>"+
											// "<div class='project-text-wrapper is-hidden'>"+
										"<h3 data-translatable class='project-client is-hidden'>"+FBZ.model.noBrain.Projects.elements[i].Client +"</h3>"+
											"<p class='project-date is-hidden'>"+ FBZ.model.noBrain.Projects.elements[i].StartDate+"</p>"+
											"<p class='project-description is-hidden' data-translatable>"+FBZ.model.noBrain.Projects.elements[i].Description+"</p>"+
											// "</div><!--end project text-wrapper-->"+
											"<div class='project-keywords is-hidden' data-translatable>"+FBZ.model.noBrain.Projects.elements[i].Keywords+"<span></span></div>"+
										"</div><!--end project card-->");
				}
			}
			// to activate accordeon.
			FBZ.control.activateProjectsAccordeon();
		},

		populateCourses :  function () { 
	
 			FBZ.model.totalAmountOfCourses  = FBZ.model.noBrain.Courses.elements.length;
// 			 /// ,this is an injection of content coming from the no brain 
		//	console.log(FBZ.model.noBrain.Courses.elements.length, FBZ.view.$coursesContainers);
			for ( var i = 0 ; i < FBZ.model.noBrain.Courses.elements.length ; i ++ ) { 
			//	console.log("container : ", FBZ.view.$coursesContainers[i]);
				if(FBZ.model.noBrain.Courses.elements[i].Privacy != "PRIVATE") {  
						
			//	$coursesContainers

				 $(FBZ.view.$coursesContainers[i]).append(

						"<div class='course-card'>"+ 


									"<div class='course-image'>"+
											FBZ.model.noBrain.Courses.elements[i].CoursePic+
									"</div>"+
									"<div class='course-box'>"+
										"<h3 data-translatable class='course-name'>"+FBZ.model.noBrain.Courses.elements[i].CourseName +"</h3>"+
										"<h4 data-translatable class='course-start-date'>comienza el "+FBZ.model.noBrain.Courses.elements[i].LessonDates.split(",")[0] +"</h3>"+
										"<p data-translatable class='course-students'>"+FBZ.model.noBrain.Courses.elements[i].StudentDescription+"</p>"+
										"<button data-translatable class='course-CTACopy'>"+FBZ.model.noBrain.Courses.elements[i].CTACopy+"</button>"+

										"<p data-translatable class='course-teacher'>by "+FBZ.model.noBrain.Courses.elements[i].TeacherName +"</p>"+
										"<div class='course-details is-hidden'>"+
											"<p data-translatable class='course-description'>"+FBZ.model.noBrain.Courses.elements[i].CourseDescription+"</p>"+
											"<p data-translatable class='course-lessonDates'>"+FBZ.model.noBrain.Courses.elements[i].LessonDates+"</p>"+
											"<p data-translatable class='course-lessonHours'>"+FBZ.model.noBrain.Courses.elements[i].LessonHours+"</p>"+
											"<p data-translatable class='course-time'>"+FBZ.model.noBrain.Courses.elements[i].Time+"</p>"+
											"<p data-translatable class='course-venue'>"+FBZ.model.noBrain.Courses.elements[i].venue+"</p>"+

	
											"<div class='teacher-card'>"+
												"<div class='teacher-image'>"+
													FBZ.model.noBrain.Courses.elements[i].TeacherPic+"</div>"+
												"</div>"+
												"<p data-translatable class='teacher-name>"+FBZ.model.noBrain.Courses.elements[i].TeacherName +"</p>"+
												"<p data-translatable class='teacher-description'>"+FBZ.model.noBrain.Courses.elements[i].TeacherDescription+"</p>"+			
										"</div>"+
									"</div>"+
								"</div><!--end course card-->"
						);
				}
			}

			FBZ.control.activateCoursesExpansion();
		},


// 	TeacherName .
// CourseName .
// TeacherDescription .
// Cost	.
// CourseDescription .
// StudentDescription .
// LessonDates	.
// LessonHours .
// CoursePic .
// TeacherPic .
// Privacy .
// URL . 
// CTACopy. 
// Venue.
// Time		.												
		activateCoursesExpansion : function () {

				//onClickOpenProjectCard
				FBZ.model.$courseCard = $('.course-card');
				FBZ.model.$courseCard.on('click',FBZ.control.collapseOrExpandCourseSelector);
		}, 

		collapseOrExpandCourseSelector : function (e) {

		//	console.log($(this), $(e.currentTarget).hasClass( "active"));
			if ( $(this).hasClass( "active") )  { 

				FBZ.control.onClickCollapseCourseCard(e); 
				$(this).removeClass('active');

			//	console.log ("has active :", !$(this).hasClass( "active") ); 
			//	console.log("this does have active so .. collapse");

			}else { 

				$(this).addClass('active');
				FBZ.control.onClickOpenCourseCard(e);
			//	console.log("this doesnt have active so .. expand");

			}
		},

		onClickOpenCourseCard : function (e) {

				//console.log("expand course");
				var $this = $(e.currentTarget);

				$this.css({ width : "100vw"});


				if($this.parent().hasClass( "course-container-right"))  {

					console.log("right",$this.parent());

					//	FBZ.control.fadeHide($($this.parent().parent().firstChild().hide()));
				} else {

					console.log("left",$this.parent());
					//$this.parent().parent().css({ left : "-50vw"});
				}
				
				$.each( e.currentTarget.children, function( index, value ){
				//	console.log(index, value);
				if (!$(this).hasClass( "project-name") )  {

						FBZ.control.fadeShow($(value));
					}
				});

		},

		onClickCollapseCourseCard : function (e) {
				
				//console.log("collapse course");
				var $this = $(e.currentTarget);
				$this.css({ width : "50vw"});
				 $.each(  e.currentTarget.children, function( index, value ){
					//console.log(index, value);
					if (!$(this).hasClass( "project-name") )  {
						FBZ.control.fadeHide($(value));
					}
				});
		},


		////// end courses bit 


		populatePeople : function () { 

			FBZ.model.totalAmountOfPeople = FBZ.model.noBrain.People.elements.length;

			FBZ.model.peoplePicBaseURL = "assets/img/people/";
			for ( var i = 0 ; i < FBZ.model.noBrain.People.elements.length ; i ++ ) { 
			//	console.log(FBZ.model.noBrain.People.elements[i]);
				
				var peopleCard = "<div class='people person-card "+FBZ.model.noBrain.People.elements[i].Rank+"'>"+ 
									"<div class='person-img-decoration'><img src='assets/img/circle_people.svg'/></div>"+

										"<div class='person-img'>"+
											"<picture>"+
												"<source srcset='"+FBZ.model.peoplePicBaseURL+FBZ.model.noBrain.People.elements[i].Pic+"_small.jpg' media='(max-width: 320px)'/>"+
												"<source srcset='"+FBZ.model.peoplePicBaseURL+FBZ.model.noBrain.People.elements[i].Pic+"_med.jpg' media='(max-width: 650px)'/>"+
												"<source srcset='"+FBZ.model.peoplePicBaseURL+FBZ.model.noBrain.People.elements[i].Pic+"_big.jpg' media='(max-width: 900px)'/>"+
												"<img srcset='"+FBZ.model.peoplePicBaseURL+FBZ.model.noBrain.People.elements[i].Pic+"_med.jpg' alt='"+FBZ.model.noBrain.People.elements[i].Name+" "+FBZ.model.noBrain.People.elements[i].LastName+"'/>"+
											"</picture>"+
										"</div>"+
											"<h3>"+FBZ.model.noBrain.People.elements[i].Name+" "+FBZ.model.noBrain.People.elements[i].LastName+"</h3>"+
											"<h4 data-translatable>"+FBZ.model.noBrain.People.elements[i].Role+"</h4>"+
									"</div><!-- end person-->";

				if (FBZ.model.noBrain.People.elements[i].Rank == "staff") {

					FBZ.view.$staffContainer.append(peopleCard);
				//	console.log("staff");
				}else { 
					FBZ.view.$collabContainer.append(peopleCard);
				}
			
			}
		},

		populateProjects :  function () { 
		//	console.log("populateProjects");

			FBZ.model.totalAmountOfProjects  = FBZ.model.noBrain.Projects.elements.length;
			 /// ,this is an injection of content coming from the no brain 
//			console.log(FBZ.model.noBrain.Projects.elements.length);
			for ( var i = 0 ; i < FBZ.model.noBrain.Projects.elements.length ; i ++ ) { 
//				console.log(FBZ.model.noBrain.Projects.elements[i]);
				if(FBZ.model.noBrain.Projects.elements[i].Privacy != "PRIVATE") {  

				FBZ.view.$projectsCardHolder.append(

						"<div class='project-card'>"+ 

											"<h3 data-translatable class='project-name'>"+FBZ.model.noBrain.Projects.elements[i].Name +"</h3>"+
											"<div class='project-image is-hidden'>"+
											FBZ.model.noBrain.Projects.elements[i].Image+"</div>"+
											// "<div class='project-text-wrapper is-hidden'>"+
										"<h3 data-translatable class='project-client is-hidden'>"+FBZ.model.noBrain.Projects.elements[i].Client +"</h3>"+
											"<p class='project-date is-hidden'>"+ FBZ.model.noBrain.Projects.elements[i].StartDate+"</p>"+
											"<p class='project-description is-hidden' data-translatable>"+FBZ.model.noBrain.Projects.elements[i].Description+"</p>"+
											// "</div><!--end project text-wrapper-->"+
											"<div class='project-keywords is-hidden' data-translatable>"+FBZ.model.noBrain.Projects.elements[i].Keywords+"<span></span></div>"+
										"</div><!--end project card-->");
				}
			}
			// to activate accordeon.
			FBZ.control.activateProjectsAccordeon();

		},


		activateProjectsAccordeon : function () {

			FBZ.model.visibleScrollProjects 			= FBZ.view.$projectScroller.height();
			FBZ.model.totalScrollProjects 				= FBZ.view.$projectsCardHolder.height();
			FBZ.model.overFlowProjects 					= FBZ.model.totalScrollProjects - FBZ.model.visibleScrollProjects;
			FBZ.model.proyectsHeight 					= $('.project-card').height();
			FBZ.model.currentProjectIndex				= Math.floor( FBZ.model.visibleScrollProjects / FBZ.model.proyectsHeight);
			FBZ.model.initialProjectIndex 				= FBZ.model.currentProjectIndex;

			FBZ.view.$projectScroller.css({ height : FBZ.model.proyectsHeight*FBZ.model.initialProjectIndex});

	//		console.log(FBZ.model.proyectsHeight,FBZ.model.currentProjectIndex, FBZ.model.totalAmountOfProjects );

			// on click car
			/// arrows nav
			FBZ.view.$projectArrowUp.on('click hover', function () {

				if (FBZ.model.currentProjectIndex >  FBZ.model.initialProjectIndex ) {
					FBZ.model.currentProjectIndex --;
				}

				FBZ.control.moveToProjectIndex(); 
			});

			FBZ.view.$projectArrowDown.on('click hover', function () {


				if (FBZ.model.totalAmountOfProjects-1 >  FBZ.model.currentProjectIndex ) {
					FBZ.model.currentProjectIndex ++;
				}

					FBZ.control.moveToProjectIndex(); 
			});
			//onClickOpenProjectCard
				FBZ.model.$projectCard 	 = $('.project-card');
				FBZ.model.$projectCard.on('click',FBZ.control.collapseOrExpandProjectSelector);

		},

		moveToProjectIndex : function () { 
				var posy =  FBZ.view.$projectScroller.height() - FBZ.model.proyectsHeight* FBZ.model.currentProjectIndex;
					FBZ.view.$projectsCardHolder.css({top: posy } );
			//		console.log(posy,FBZ.model.currentProjectIndex );
		},

{'fraction_non_alphanumeric': 0.18261133194098228, 'fraction_numerical': 0.004143367243818635, 'mean_word_length': 3.1913031201468303, 'pattern_counts': {'":': 0, '<': 203, '<?xml version=': 0, '>': 195, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2722940', 'n_tokens_mistral': 12927, 'n_tokens_neox': 10304, 'n_words': 1363}