/************
*  Fichier Javascript commun
*
*
*****************/

//*************************************************************MENU*******************************************************//
//************************************************************************************************************************//

$(document).ready(function() { 

$('#menu_site dl').hover(function() {									if ($(this).find('ul').length) {										$(this).find('dd').stop(true, true).animate({					height: 'show'				}, {					queue: false,					duration: 250,					easing: 'easeInQuad'				});								$("#menu_site li").mouseover(function(){					$(this).addClass("indicateur");				});								$("#menu_site li").mouseout(function(){					$(this).removeClass("indicateur");				});							}									});				$('#menu_site dl').mouseleave(function() {						$(this).find('dd').stop(true, true).hide()					});

//******************************************* SLICE : FAQ ************************************************//
//**********************************************************************************************************************//


    $(".declenche").hide(); 
	$(".actif").show(); 
	$(".declencheur").mouseover(function(){$(this).css("text-decoration", "underline");});
	$(".declencheur").mouseout(function(){$(this).css("text-decoration", "none");});
    $(".declencheur").click(function() { 
		if ($(this).next().is(":visible") == false) {
			$(this).next().slideDown();
			$(this).addClass("deploie");
		}else{
			/*$(this).next().slideUp();*/
			$(this).next().hide(); 
			$(this).removeClass("deploie");
		};
    }); 
	
	
	
	
	
	$(".declenche_conso").hide(); 
	$(".actif").show(); 
	$(".declencheur_conso.deploie > .clic_contrat").css("display", "none");
	$(".declencheur_conso > h3").mouseover(function(){$(this).css("text-decoration", "underline");});
	$(".declencheur_conso > h3").mouseout(function(){$(this).css("text-decoration", "none");});
	$(".declencheur_conso > p").mouseover(function(){$(this).css("text-decoration", "none");});
	$(".declencheur_conso > p").mouseout(function(){$(this).css("text-decoration", "none");});

	
    $(".declencheur_conso").click(function() { 
		if ($(this).next().is(":visible") == false) {
			$(this).next().slideDown();
			$(this).addClass("deploie");
			$(".declencheur_conso.deploie > .clic_contrat").css("display", "none");
		}else{
			/*$(this).next().slideUp();*/
			$(this).next().hide(); 
			$(".declencheur_conso.deploie > .clic_contrat").css("display", "block");
			$(this).removeClass("deploie");
		};
    }); 


	
	
/****************************************************************************************************************************/
	
	/* Connection auto */
	


$('#texte_connexion_automatique2').click(function(){
                                              if ($('#get_connexion_automatique').is(':checked')){
                                                 $('span#explication_connexion_automatique2').slideDown('fast');
                                              }else{
                                                  $('span#explication_connexion_automatique2').slideUp('fast');
                                              }

  });




	$('#bouton_connexion_automatique').mouseover(function(){$('#explication_connexion_automatique').slideDown('fast');}	);
	$('#bouton_connexion_automatique').mouseout(function(){$('#explication_connexion_automatique').slideUp('fast');});

	
/****************************************************************************************************************************/	
	

	
	/***************************************/
	
	/* Survol zone choixBP selection Bouton */
	
	
	$('#choix_bp > ul > li').hover(function() {
                     $(this).css('background-color', '#ccc');
                     }, function() {

                     $(this).css('background-color', '#fff');
	});
	
	
	
	/* flashs autopromos */
	
	var path_flash='../../../gestionContenu/ShowBinary/BEA%20Repository/Racine%20Gaz%20de%20France/medias/flash/autopromo/index.html';
	
	/*$('#pousser_arbre').flash({src: path_flash+'arbre_pousse', width:217, height:192});*/
	$('#boutique_lieusaint').flash({src: path_flash+'boutique_lieusaint', width:217, height:192});
	$('#boutique_lyon').flash({src: path_flash+'boutique_lyon', width:217, height:192});
	$('#carnet_avantages').flash({src: path_flash+'carnet_avantages', width:217, height:192});		
	$('#chaudiere').flash({src: path_flash+'chaudiere', width:217, height:192});
	$('#demenagement').flash({src: path_flash+'demenagement', width:217, height:192});
	$('#creer_cel').flash({src: path_flash+'creer_cel', width:217, height:192});	
	$('#MFL').flash({src: path_flash+'MFL', width:217, height:192});
	$('#maison_bbc').flash({src: path_flash+'maison_bbc', width:217, height:192});		
	$('#zenbox').flash({src: path_flash+'zenbox', width:217, height:192});
	$('#salon_planete').flash({src: path_flash+'salon2010', width:217, height:192});
	$('#tchat_economies_home_cel').flash({src: path_flash+'tchat_economies_home_cel', width:217, height:192});		$('#tchat_economies_prive').flash({src: path_flash+'tchat_economies_prive', width:217, height:192});		$('#tchat_economies_public').flash({src: path_flash+'tchat_economies_public', width:217, height:192});		$('#tchat_economies_home').flash({src: path_flash+'tchat_economies_home', width:217, height:192});		$('#ecohabitants_public').flash({src: path_flash+'ecohabitants_public', width:217, height:192});		$('#ecohabitants_prive').flash({src: path_flash+'ecohabitants_prive', width:217, height:192});
	/* flash de la home */	

	$('#flash_bandeau').flash({src: '/gestionContenu/ShowBinary/BEA%20Repository/Racine%20Gaz%20de%20France/medias/flash/home', width:949, height:204});
	
		/***************************/
	
	/* Cycle actus */ 
	
	$('#actualites').cycle({ 
					    fx:      'scrollDown', 
						speed:    1000, 
						timeout:  8000,
						pager:      '#nav',
						pagerEvent: 'click',
						pauseOnPagerHover: true
	});
	
	
});





/****************************************************************************************************************************/

 /******************************************************************************************
* Fonctions MOA
 **********************************************************************************************************/

/*
if (document.getElementById && document.createTextNode) {
	window.onload = demarrage;
}


function demarrage(){
	bulle_job('bulle_MDP');
	bulle_job('bulle_Nom');
	bulle_job('bulle_refClient');
	bulle_job('telephone');
        bulle_job('bulle_CP')
        bulle_job('bulle_consommation')
        bulle_job('bulle_puissance')
        bulle_job('bulle_comptage')
        bulle_job('bulle_ref_client')
        bulle_job('bulle_prelevement_auto')
        bulle_job('bulle_mensualisation')
        bulle_job('bulle_facture_ligne')
        bulle_job('bulle_assurance_facture')
        bulle_job('bulle_pass_multi_services')
        bulle_job('bulle_diagnostic_securite')
        bulle_job('bulle_diagnostic_eco_nrj')
}
 
function bulle_job(id){
	
	if (document.getElementById(id)){
		var vid = document.getElementById(id);
		var vtitle = vid.getAttribute('title');
		document.getElementById(id).onmouseover=function(){Tip('<div class=\'gc_tooltips_cel\'>'+vtitle+'</div>')};
		document.getElementById(id).onmouseout=function(){UnTip()};
	}

}

*/
