var currentLanguage = "EN";

function customSiteMap() {
	$("#siteMap a").each(function(){	
		// We drop the link and the "hand cursor" for needed link
		if ($(this).attr("id")=="sitemapitem767" || $(this).attr("id")=="sitemapitem766" || $(this).attr("id")=="sitemapitem763") {
			$(this).attr("href",'javascript:void(0);');				
			$(this).attr('style','cursor: default');

		}
	});
}

function buildMenuBar() {
	$("#nav li").each(function(){	
		// We drop the link and the "hand cursor" on all the first level navigation item having sub navigation
		if ($(this).children(".subNavigation").children("li").length > 0) {
			// Add the top box (just to get round corners)
			$(this).children(".subNavigation").prepend('<li id="menuTop">&nbsp;</li>');	
			if($(this).attr("id")!="li762"){
				$(this).children("a").attr("href",'javascript:void(0);');				
				$(this).children("a").attr('style','cursor: default');
			}
			// Add the bottom box (just to get round corners)
			$(this).children(".subNavigation").append('<li id="menuBottom">&nbsp;</li>');
		}
	});

	$('ul.sf-menu').superfish({
		hoverClass : 'sfHover',
 		pathClass : 'current',
 		pathLevels : 1,
 		delay : 300,
 		animation : {opacity:'show'},
 		speed : 0,
		autoArrows : true,
		dropShadows : false,
		disableHI : false
	});

	$('ul.sf-menu > li > a .sf-sub-indicator').remove();  
	$('.sf-sub-indicator').html("");

	// For each menu we provide an "hover" behaviour
	$("#nav li").each(function(){
		$(this).mouseover(function(){
			// If the nenu own a submenu
			$(this).attr("class",'itemOver');						
			$(this).prev().attr("class",'item');
			$(this).siblings().attr("class",'item');

		});
	
	});

	$("#subNavigationItem845").remove();
}

function cargoNewsClickHandler(id){
	$('#cargoNewsOverviewSection'+id).toggleClass('cargoNewsOverviewSectionSelected');
	$('#cargoNewsBullet'+id).toggleClass('cargoNewsBulletSelected');
	$('#cargoNewsDate'+id).toggleClass('cargoNewsDateSelected');
	$('#cargoNewsTitle'+id).toggleClass('cargoNewsTitleSelected');
	$('#cargoNewsContent'+id).toggle();	
	$('#cargoNewsTitleImage'+id).toggle();	
	$('#cargoNewsImage'+id).toggle();
}

function cargoNewsOverHandler(id){
	if(!$('#cargoNewsOverviewSection'+id).hasClass('cargoNewsOverviewSectionSelected')){
		$('#cargoNewsIndicator'+id).addClass('cargoNewsIndicatorOver');
	}
}

function cargoNewsOutHandler(id){
	$('#cargoNewsIndicator'+id).removeClass('cargoNewsIndicatorOver');
}
