/******************************************* Fonctions Jquery *******************************************/

var j = jQuery.noConflict();
j(document).ready(function(){

    MENU_Gestion("horizontal");
    FAQ_Gestion();
    
    // Affichage des recrutements
    j('div.item').hide();
    var langue = j('html[lang]');
 	if(langue=="en") {
 		var lireAnnonce = "Read";
    }else {
 		var lireAnnonce = "Lire l'annonce";
    }
    var i = 0;
    j('.poste .titrePoste').each( function () {
    	j(this).append(' - <a href="#poste'+i+'" title="'+lireAnnonce + j(this).text()+'" class="poste'+i+'">'+lireAnnonce+'</a>');
    	i++;
	});
	
	j('.poste .titrePoste a').click(function () {
	    if (j('div#'+this.className).is(':hidden')) {
	        j('div#'+this.className).slideDown('normal');
	    } else {
	        j('div#'+this.className).slideUp('normal');
	        return false;
	    }
	});
	
	/**
	* gestion de l'affichage des heures de rappel
	*/
	if(j('#tableHeureRappel').length) {
		j('#tableHeureRappel').hide(); // a l'affichage de la page
		j('#heuresRappelSamedi').hide(); // a l'affichage de la page
		j('#typeDemandeCallBack #type_demande').change(function () {
		 if (j(this).val() != '')
		 {
			 j('#tableHeureRappel').show();
			 if (j('#typeDemandeCallBack #type_demande').val() == 'information/réservation/devis particuliers' || j(this).val() == 'information/réservation/devis fret')
			 {
			  j('#heuresRappelSamedi').show();
			 }
			 else
			 {
			  j('#heuresRappelSamedi').hide();
			 }
			}
			else
			{
			 j('#tableHeureRappel').hide();
			 j('#heuresRappelSamedi').hide();
			}
		});
	}
	
	j('input#typeVoyageAllerRetour').click(function(){ check() });
    
    j('#contenu .carteInt #photosMin a').mouseover(function(){
        
        j('#contenu .carteInt #photoMax').html(j(this).find('span').html());
        //j('#contenu .carteInt #photoMax img').css('margin', '0px');

    }).click(function() {
        this.blur();
        return false;
    });
	
			
	    if(j('.nyroModal').length) {

			j('.nyroModal').click(function(e) {
			e.preventDefault();
			
			j.fn.nyroModalManual({
			  width: null, // Largeur par défaut Si null, sera calculé automatiquement
			  height: null, // Hauteur par défaut Si null, sera calculé automatiquement
			  minWidth: 843, // Largeur minimale
			  minHeight: 671
			});
			
				return false;
			});
		};
});


 