	// Get all li elements of top navigation
	var $ulContainer = $('#cs_topNavigation li').children();

	// Set subpage to false
	var $subPage = "";
	var $subsubPage = "";
	var $editPage = "";
	var $languagePage ="";
	var $subPageLink ="";
	
	// Get the current language
	var $url = "";
	$url = window.location.href;

	if($url.indexOf('_layouts') > 0 || $url.indexOf('_catalogs') > 0 ) {
		$editPage = "true";
	}

	
	if($url.indexOf('/de/') > 0){
		$languagePage = "/de/";
	}
	if($url.indexOf('/en/') > 0){
		$languagePage = "/en/";
	}
	if($url.indexOf('/fr/') > 0){
		$languagePage = "/fr/";
	}

	var $countSlash = $url.split("/").length - 1;

	// If more than 6  / in url -> is subsubPage
	if($countSlash > 6) {
		$subsubPage = 1;	
	}

	var $langDir = "1033";

	for ( i= 0; i < $ulContainer.size(); i++){
		// Add a new class -> makes it possible to use CSS file
		$('#cs_topNavigation li:nth-child(' + i + ')').addClass('headerNavigation');
		
		// Get navigation item and text
		var $navItem = $('#cs_topNavigation li').find('.menu-item-text')[i];
		var $navItemText = $navItem.innerHTML;

		// Remove text
		$navItem.innerHTML = "";
		
		// Set background image
		var $imgURL = "/_layouts/1033/images/CS/navigation/top_" + $navItemText + ".gif";
		
		if($('#cs_topNavigation li').find('.additional-background')[i].childNodes[1]) {
			$imgURL = "/_layouts/1033/images/CS/navigation/top_" + $navItemText + "_selected.gif";
			$subPage = $navItemText;
		}
		
		//Currently selected
		$ulContainer[i].style.backgroundImage = "url(" + $imgURL + ")";
		$ulContainer[i].style.backgroundRepeat = "no-repeat";
		$ulContainer[i].style.width = "100px";
		$ulContainer[i].style.height = "41px";	
	}
	// Workaround for last element (loop +1 not possible)
	$('#cs_topNavigation li:nth-child(' + $ulContainer.size() + ')').addClass('headerNavigation');

	/* Search Button
		 Remove the original search button and replace it with the CS custom one
	*/
	if($editPage) {
		$('#searchbox').remove();
	} else {
		$('.srch-gosearchimg').remove();
		// Add new search button image
		if(window.location.href.indexOf("/de/") >0) {
			$('#ctl00_PlaceHolderSearchArea_SmallSearchBox_S9EB3F2A5_go').append('<img src="/_layouts/1033/images/CS/buttons/suchen.gif" width="52px" height="16px" style="margin-left:2px;" alt="Suchen">');	
		} else if (window.location.href.indexOf("/en/")>0){
			$('#ctl00_PlaceHolderSearchArea_SmallSearchBox_S9EB3F2A5_go').append('<img src="/_layouts/1033/images/CS/buttons/search.gif" width="50px" height="16px" style="margin-left:2px;" alt="Search">');
		} else if (window.location.href.indexOf("/fr/")>0){
			$('#ctl00_PlaceHolderSearchArea_SmallSearchBox_S9EB3F2A5_go').append('<img src="/_layouts/1033/images/CS/buttons/chercher.gif" width="61px" height="16px" style="margin-left:2px;" alt="Chercher">');
		}
	}

	$subPageLink = $subPage;	
	if($url.indexOf('carriere') > 0 ||$url.indexOf('Carriere') > 0 ) {
		$subPageLink = "carriere";
	}
	if($url.indexOf('competence') > 0 || $url.indexOf('Competence') > 0) {
		$subPageLink = "competences";
	}
	

	/* Claim*/
	if($subPage && !$editPage) {
		$('.claim').height(150);
		var img = "<a href='"+ $languagePage + $subPageLink  + "'>" + "<img src='/_layouts/1033/images/CS/menu/naviHeader_" + $subPage + ".gif' border='0' width='200px' height='22px' alt='Header Navigation'></a>";
		$('.QuickLaunch_header')[0].innerHTML = img;	
	}

	if($subsubPage == 1) {
		$('.claim').height(120);
	}

	/*
		Administrative area does not need claim image... thus remove completely
	*/
	if($editPage) {
		$('#ctl00_CSEyecatcherImage_Image1').remove();
		$('.claim').height(30);
	}

