﻿jQuery(document).ready(function(){
	jQuery("#carousel").featureCarousel(
			{
			autoPlay:1,
			carouselSpeed:2000
			}
		);
		
	jQuery("a.fancy").fancybox();
	
	/* cas particuliers */
	var text = '';
	
	switch(location.pathname)
	{
		case '/fr/Pages/Groupe/10-bureaux-d’etudes-en-France.aspx':
			text = '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img src="/_layouts/images/fgimg.png" style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;"></span>&nbsp;<span>Groupe</span>&nbsp;<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img src="/_layouts/images/fgimg.png" style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;"></span>&nbsp;<a href="/fr/Pages/Groupe/Implantations.aspx">Implantations</a>&nbsp;';
			text += '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;" src="/_layouts/images/fgimg.png" /></span>&nbsp;<span>10 centres d\'ingénierie en France</span>';
			break;
		case '/fr/Pages/Groupe/Filiales-internationales-et-partenariats-LCC.aspx':
			text = '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img src="/_layouts/images/fgimg.png" style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;"></span>&nbsp;<span>Groupe</span>&nbsp;<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img src="/_layouts/images/fgimg.png" style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;"></span>&nbsp;<a href="/fr/Pages/Groupe/Implantations.aspx">Implantations</a>&nbsp;';
			text += '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;" src="/_layouts/images/fgimg.png" /></span>&nbsp;<span>Filiales internationales et partenariats LCC</span>';
			break;
		case '/fr/Pages/Ingenerie-produit-process.aspx':
			text = '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img src="/_layouts/images/fgimg.png" style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;"></span>&nbsp;<span>Activités</span>&nbsp;<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img src="/_layouts/images/fgimg.png" style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;"></span>&nbsp;<a href="/fr/Pages/Activites/Branche-Projets-Produit-Process.aspx">Branche Projets Produit Process</a>&nbsp;';
			text += '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;" src="/_layouts/images/fgimg.png" /></span>&nbsp;<span>Ingénierie produit process</span>';
			break;
		case '/fr/Pages/Ingenerie-documentaire-support.aspx':
			text = '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img src="/_layouts/images/fgimg.png" style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;"></span>&nbsp;<span>Activités</span>&nbsp;<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img src="/_layouts/images/fgimg.png" style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;"></span>&nbsp;<a href="/fr/Pages/Activites/Branche-Projets-Produit-Process.aspx">Branche Projets Produit Process</a>&nbsp;';
			text += '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;" src="/_layouts/images/fgimg.png" /></span>&nbsp;<span>Ingénierie documentaire et support</span>';
			break;
		case '/fr/Pages/Groupe/Adresses.aspx':
			text = '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;" src="/_layouts/images/fgimg.png" /></span>&nbsp;<span>Contacts</span>';
			break;
		case '/fr/Pages/Mentions-legales.aspx':
			text = '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;" src="/_layouts/images/fgimg.png" /></span>&nbsp;<span>Mentions légales</span>';
			break;
		case '/fr/Pages/Plan-du-site.aspx':
			text = '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;" src="/_layouts/images/fgimg.png" /></span>&nbsp;<span>Plan du site</span>';
			break;
			
		case '/en/Pages/Group/10-engineering-centres-in-France.aspx':
			text = '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img src="/_layouts/images/fgimg.png" style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;"></span>&nbsp;<span>Group</span>&nbsp;<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img src="/_layouts/images/fgimg.png" style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;"></span>&nbsp;<a href="/en/Pages/Group/Locations.aspx">Locations</a>&nbsp;';
			text += '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;" src="/_layouts/images/fgimg.png" /></span>&nbsp;<span>10 engineering centres in France</span>';
			break;
		case '/en/Pages/Group/International-subsidiaries-and-LCC-partnerships.aspx':
			text = '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img src="/_layouts/images/fgimg.png" style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;"></span>&nbsp;<span>Group</span>&nbsp;<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img src="/_layouts/images/fgimg.png" style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;"></span>&nbsp;<a href="/en/Pages/Group/Locations.aspx">Locations</a>&nbsp;';
			text += '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;" src="/_layouts/images/fgimg.png" /></span>&nbsp;<span>International subsidiaries and LCC partnerships</span>';
			break;
		case '/en/Pages/Product-Process-Engineering.aspx':
			text = '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img src="/_layouts/images/fgimg.png" style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;"></span>&nbsp;<span>Activities</span>&nbsp;<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img src="/_layouts/images/fgimg.png" style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;"></span>&nbsp;<a href="/en/Pages/Activities/Product-Process-Project-Branch.aspx">Product Process Projects Branch</a>&nbsp;';
			text += '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;" src="/_layouts/images/fgimg.png" /></span>&nbsp;<span>Product Process Engineering</span>';
			break;
		case '/en/Pages/Documentation-engineering-and-support.aspx':
			text = '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img src="/_layouts/images/fgimg.png" style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;"></span>&nbsp;<span>Activities</span>&nbsp;<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img src="/_layouts/images/fgimg.png" style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;"></span>&nbsp;<a href="/en/Pages/Activities/Product-Process-Project-Branch.aspx">Product Process Projects Branch</a>&nbsp;';
			text += '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;" src="/_layouts/images/fgimg.png" /></span>&nbsp;<span>Documentation engineering and support</span>';
			break;
		case '/en/Pages/Group/Addresses.aspx':
			text = '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;" src="/_layouts/images/fgimg.png" /></span>&nbsp;<span>Contacts</span>';
			break;
		case '/en/Pages/Legal-info.aspx':
			text = '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;" src="/_layouts/images/fgimg.png" /></span>&nbsp;<span>Legal info</span>';
			break;
		case '/en/Pages/Site-map.aspx':
			text = '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;" src="/_layouts/images/fgimg.png" /></span>&nbsp;<span>Site map</span>';
			break;
			
		default:
			var lien = jQuery(".menu a[href="+location.pathname+"]");
			var text = '';
			
			if (lien.is(".dynamic"))
			{
				var parentText = lien.parent().parent().parent().find(".static").text();
				text = '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;" src="/_layouts/images/fgimg.png" /></span>&nbsp;<span>'+parentText+'</span>&nbsp;';
			}
			
			var lienText = lien.text().replace('Currently selected', '');
			var lienText = lienText.replace('Actuellement sélectionné', '');
			
			if (lienText == 'fr')
			{
				lienText = 'Accueil';
			}
			if (lienText == 'en')
			{
				lienText = 'Home';
			}
			
			text += '<span style="height: 11px; width: 11px; position: relative; display: inline-block; overflow: hidden;"><img style="border-width: 0px; position: absolute; left: 0px ! important; top: -584px ! important;" src="/_layouts/images/fgimg.png" /></span>&nbsp;<span>'+lienText+'</span>';

			break;
	}

	jQuery("#breadcrumb").html(text);

});



