
$(document).ready(function(){



  //MENU PRINCIPAL
  $('ul.level-2, ul.level-2 ul.level-3').hide();
  //var elemOver = '';
  if($('#main-menu .level-1 li').hasClass('active'))
    {
      $('#main-menu .level-1 li.active ul.level-2').show();
  //$('#main-menu .level-1 li.active ul').show();
    }
  
  
  if($('.active').html())
  {
    elParent = $('.active').parent();
	
	if(elParent.attr('class') == 'level-3') {
	
		elParent.show();
	
	}
	
    if(elParent.attr('class') == 'level-2')
    {
      elParent.show();
	  
	  $('.active').find('ul.level-3').css('display','block');
      //elemOver = elParent;
    }
    else
    {
      $('.active').parent().parent().parent().show();
      //elemOver = $('.active').parent().parent().parent();
    }
    
  } else {
    //$('ul.level-2').first().show();
    //elemOver = $('ul.level-2').first();
  }


  // FORMULAIRE DE CONTACT SIMPLE
  $('#optin #contact_prenom').focus(function(){
    if($(this).val() == 'Prénom*') $(this).val('');
  });
  $('#optin #contact_nom').focus(function(){
    if($(this).val() == 'Nom*') $(this).val('');
  });
  $('#optin #contact_telephone_mobile').focus(function(){
    if($(this).val() == 'Téléphone Mobile*') $(this).val('');
  });
  $('#optin #contact_email').focus(function(){
    if($(this).val() == 'Email*') $(this).val('');
  });
  $('#optin #contact_commentaire').focus(function(){
    if($(this).val() == 'Commentaire') $(this).val('');
  });



  $('#optin #contact_prenom').focusout(function(){
    if($(this).val() == '') $(this).val('Prénom*');
  });
  $('#optin #contact_nom').focusout(function(){
    if($(this).val() == '') $(this).val('Nom*');
  });
  $('#optin #contact_telephone_mobile').focusout(function(){
    if($(this).val() == '') $(this).val('Téléphone Mobile*');
  });
  $('#optin #contact_email').focusout(function(){
    if($(this).val() == '') $(this).val('Email*');
  });
  $('#optin #contact_commentaire').focusout(function(){
    if($(this).val() == '') $(this).val('Commentaire');
  });
  

  

  //RECHERCHE RAPIDE
  $('#recherche #searchForm').focus(function(){
    if($(this).val() == 'recherche') $(this).val('');
  });
  $('#recherche #searchForm').focusout(function(){
    if($(this).val() == '') $(this).val('recherche');
  });

});
