jQuery().ready(function(){
	/****** Slide de la barre de selection *******/
	var new_pos_accueil;
	var new_pos_nos_offres;
	var new_pos_sommes_nous;
	var new_pos_contact;
	
	var width_accueil;
	var width_nos_offres;
	var width_sommes_nous;
	var width_contact;
	var langue  =  $('#langue').text();
	
	if (langue == "English")
	{
		$('#menu').css({'width':'526px', 'margin':'0 100px 0 100px'});
		width_accueil = 35;
		width_nos_offres = 61;
		width_sommes_nous = 55;
		width_contact = 48;
		new_pos_accueil = 0;
		if ($.browser.msie  && parseInt($.browser.version) == 7)
		{
			new_pos_nos_offres = 109;
			new_pos_sommes_nous= 254;
			new_pos_contact = 380;
		}
		else
		{
			new_pos_nos_offres = 106;
			new_pos_sommes_nous= 250;
			new_pos_contact = 375;
		}
	}
	else if (langue == "France")
	{
		width_accueil = 44;
		width_nos_offres = 61;
		width_sommes_nous = 126;
		width_contact = 45;
		new_pos_accueil = 0;
		if ($.browser.msie  && parseInt($.browser.version) == 7)
		{
			new_pos_nos_offres = 116;
			new_pos_sommes_nous= 262;
			new_pos_contact = 464;
		}
		else
		{
			new_pos_nos_offres = 113;
			new_pos_sommes_nous= 259;
			new_pos_contact = 457;
		}

	}
	$('#barre_selection').each(function(){
		var exp = new RegExp("(index|nosoffres|offressolutions|mentions|offresdeploiement|offresdata|offresamoa|quisommesnous|contact)", "gi");
		var tab = exp.exec(window.top.location.href);
		if (tab[0] == "index" || tab[0] == "mentions")
			$('#barre_selection').css({"width": width_accueil+"px", "left" : new_pos_accueil+"px"});
		else if (tab[0] == "nosoffres" || tab[0] == "offresSolutions" || tab[0] == "offresDeploiement" || tab[0] == "offresData" || tab[0] == "offresAmoa")
			$('#barre_selection').css({"width":  width_nos_offres+"px" , "left" : new_pos_nos_offres+"px"});
		else if (tab[0] == "quisommesnous")
			$('#barre_selection').css({"width":width_sommes_nous+"px" , "left" : new_pos_sommes_nous+"px"});
		else if (tab[0] == "contact")
			$('#barre_selection').css({"width":width_contact+"px" , "left" : new_pos_contact+'px' });
	});
		
    $('#menu').each(function(){
		var pos_barre = $('#barre_selection').position().left;
		var	sauv_width_barre = $('#barre_selection').width();
		$('#menu').hover(function(){
			$('.link_accueil img').each(function(){
				$('.link_accueil img').hover(function(){
					$('#barre_selection').clearQueue();
					$('#barre_selection').stop().animate({left:new_pos_accueil +'px', width:width_accueil+'px'});
				});
			});
			$('.link_nos_offres img').each(function(){
				$('.link_nos_offres img').hover(function(){
					$('#barre_selection').clearQueue();
					$('#barre_selection').stop().animate({left:new_pos_nos_offres+'px', width:width_nos_offres+'px'});
				});
			});
			$('.link_sommes_nous img').each(function(){
				$('.link_sommes_nous img').hover(function(){
					$('#barre_selection').clearQueue();
					$('#barre_selection').stop().animate({left:new_pos_sommes_nous+'px', width:width_sommes_nous+'px'});
				});
			});
			$('.link_contact img').each(function(){
				$('.link_contact img').hover(function(){
				$('#barre_selection').clearQueue();
					$('#barre_selection').stop().animate({left:new_pos_contact+'px', width:width_contact+'px'});
				});
			});
		}, function(){
			$('#barre_selection').clearQueue();
			$('#barre_selection').stop().animate({left:pos_barre+'px', width:sauv_width_barre+'px'});
		});
	});
    
	/********************/
    
    /***** effet sur les images *****/
    $('#first_photo').hover(function(){
        $('#first_photo img').animate({top:'10px'}, 100);
        $('#first_photo img').animate({top:'0px'}, 100);
        $('#first_photo img').animate({top:'5px'}, 100);
        $('#first_photo img').animate({top:'0px'}, 100);
    }, function(){
    });
    
     $('#second_photo').hover(function(){
        $('#second_photo img').animate({top:'10px'}, 100);
        $('#second_photo img').animate({top:'0px'}, 100);
        $('#second_photo img').animate({top:'5px'}, 100);
        $('#second_photo img').animate({top:'0px'}, 100);
    }, function(){
    });
    
     $('#third_photo').hover(function(){
        $('#third_photo img').animate({top:'10px'}, 100);
        $('#third_photo img').animate({top:'0px'}, 100);
        $('#third_photo img').animate({top:'5px'}, 100);
        $('#third_photo img').animate({top:'0px'}, 100);
    }, function(){
    });
    /********************/
	
	$('.img_rer').hover(function() {
		$('.img_rer').animate({left:'50px'}, 150);
	}, function(){
			$('.img_rer').animate({left:'70px'}, 150);
	});
	
	$('.img_meeting').hover(function() {
		$('.img_meeting').animate({top:'50px'}, 150);
	}, function(){
		$('.img_meeting').animate({top:'55px'}, 150);
	});
	
	$('.img_building').hover(function() {
		$('.img_building').animate({left:'25px'}, 150);
	}, function(){
		$('.img_building').animate({left:'0px'}, 150);
	});

});
