/**
 * ___startup____
 *  
 * @author ciskavriezenga
 */


if(IT == undefined){
	var IT = new function(){};
}



/*================================================================================ */
/*___________________________________ START UP ___________________________________ */
/*================================================================================ */


//set intouch object to false -> using singleton pattern 
//Intouch.object = false;
//sSTIL CHECK -> undefined instead of manually put it on false -> because then you won't st it to false when file is loaded again!!!

var DEBUG = 4;


$(window).load(function () {
	
	//check if intouch section page is loaded
	if(($(location).attr('href')).indexOf( "pg/groups/36531/intouch/") != -1){
		//set intouch menu item to selected
		$("#intouchMenuItem").toggleClass("selected", true);
		IT.Log.debug("!!!!!!!!!!!!!!!! inside first menu item: INTOUCH");
		new IT.IntouchPage();
	}
	
	//check if solutions section page is loaded
	if(($(location).attr('href')).indexOf( "pg/groups/36571/solutions/") != -1){
		//set solutions menu item to selected
		$("#solutionMenuItem").toggleClass("selected", true);
		IT.Log.debug("!!!!!!!!!!!!!!!! inside first menu item: SOLUTION");
		IT.SolutionsPage();
	}
	
	//check if landing section page is loaded
	if(($(location).attr('href')).indexOf( "pg/groups/36691/landing/") != -1){
		//add buttons with Javascript 
		new IT.LandingPage();
		
	}
	
	//get selected menu item!
	/*
	var menu = $(".topbutton_rc");
	var selectedMenuItem = $(".topbutton_rc.selected");
	
	var selectedMenuItemIndex =  menu.index(selectedMenuItem);
	IT.Log.debug("the selected menu Item Index is: " + selectedMenuItemIndex);
	
	switch(selectedMenuItemIndex)
	{
		case 0:
  			IT.Log.debug("!!!!!!!!!!!!!!!! inside first menu item: INTOUCH");
			new IT.IntouchPage();
			
  		break;
		case 1:
			IT.Log.debug("!!!!!!!!!!!!!!!! inside first menu item: SOLUTION");
			IT.SolutionsPage();
  		break;
		default:
			//no actions needed over here
  	}*/

	



	

	//onclick="function(){ console.debug('^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^clicked on INTOUCH MENU')}"
	
//	}
	//$(".shaded").append("<div class='roots'/div>");
});

