$(document).ready(function(){
	
if ($("#loginContainer")){
	
	populateNavigation();
	
	/*****************************************
	Setting default values sifr
	*****************************************/

	$.sifr({
		path: 'sites/TalentePack/scripts/resources/',
		save: true,
		textTransform:'uppercase'
	});
	
							
	/*****************************************
	Clearing start button value
	*****************************************/
	
	$("#btnStartFilters").attr("value", ""); 
	
		
	leerjaarItems = $('.FilterListbox')


        leerjaarArr = leerjaarItems[0];
        
	if (leerjaarItems.length > 1){
          nivoArr = leerjaarItems[1];
  
          jQuery.each(leerjaarArr, function() {	
  
                  if (this.selected){
                          //alert(selectBox + this.text)
                          $(".nivoJaar h1").append(this.text+" ");
                  }
          })
          jQuery.each(nivoArr, function() {	
                  if (this.selected){
                          //alert(selectBox + this.text)
                          $(".nivoJaar h1").append(this.text);			
                  }
          })
        }
  
	
	

	
	
	/*****************************************
	Setting login value in the right order
	based on copyig the innerHTml to another div
	*****************************************/
	
	$(".userTypeIndicator h1").html($("#userType span span").html()) 							
	$(".loggedInDiv").html($("#loggedinInfo").html()) 
	$(".changeDiv").html($("#changeAccount").html()) 
	$(".activationDiv").html($("#activationCode").html()) 
	$(".logoutDiv").html($("#logOut").html()) 
	
	
	/*****************************************
	Setting sifr for userIndicator 
	eg Docent, Leerling
	*****************************************/						
	
	$('.userTypeIndicator h1').sifr({font: 'frutiger87ExCond',  color:'#FFFFFF', fontSize:'30px'}); 
	
	/*****************************************
	Checking if an image is set int the content and 
	if so placing the image, if not it shows a sifr 
	Chapter Title
	*****************************************/	
	
	if ($('.chapterTitle').length > 0){
		if ($('.chapterImage img').length > 0){
			$('.chapterImage').removeClass("hidden");	
			$('.chapterTitle').addClass("hidden");
		}else{
			$('.chapterTitle').removeClass("hidden");
			$('.chapterImage').addClass("hidden");
			$('.chapterTitle h1').sifr({font: 'frutiger87ExCond',  color:'#2e3092', fontSize:'22px'}); 								
		}
	}
}
});	








/*****************************************
Setting an li hover
*****************************************/	

function populateNavigation()
{					    
	$("#navmenu li").mouseover(function() { 
		$(this).addClass("over"); 
	});						
	$("#navmenu li").mouseout(function() { 
		$(this).removeClass("over"); 
	});   

	$(".navmenu li").mouseover(function() { 
		$(this).addClass("over"); 
	});
	
	$(".navmenu li").mouseout(function() { 
		$(this).removeClass("over"); 
	});    

}
