




jQuery.noConflict();

jQuery(function() {
  jQuery("#menu3 a[href*='c_6312']").click(function() {
    javascript:xt_med('C','90','Home-devisauto','N');
  });
  jQuery("#menu3 a[href*='c_7099']").click(function() {
    javascript:xt_med('C','90','Home-devissante','N');
  });
    jQuery("#menu3 a[href*='c_7123']").click(function() {
    javascript:xt_med('C','90','Home-devishabitation','N');
  });
      jQuery("#menu3 a[href*='destination=CONTRATS']").click(function() {
    javascript:xt_med('C','90','Home-consulterModifierContrats','N');
  });
      jQuery("#menu3 a[href*='c_14400']").click(function() {
    javascript:xt_med('C','90','Home-declarerSinistre','N');
  });
      jQuery("#menu3 a[href*='destination=SUIVREINDEMNISATIONSANTE']").click(function() {
    javascript:xt_med('C','90','Home-remboursementSante','N');
  });
      jQuery("#menu3 a[href*='d_16103']").click(function() {
    javascript:xt_med('C','90','Home-MAAFVIE','N');
  });
       jQuery("#menu3 a[href*='c_5008']").click(function() {
    javascript:xt_med('C','90','Home-trouverAgence','N');
  });
  
  //Gestion des actualités
  majIHM();
  jQuery("#boutonPrec").click(function() {
    if(premierChargement) {
        premierChargement=false;
        xt_home(jQuery(".anim" + posAnim).attr("id")+"::flecheGauche","");
    }
    posAnim--;
    if(posAnim==-1) posAnim=2;
    majIHM();
  });
  jQuery("#boutonSuiv").click(function() {
    if(premierChargement) {
        premierChargement=false;
        xt_home(jQuery(".anim" + posAnim).attr("id")+"::flecheDroite","");
    }
    posAnim++;
    if(posAnim==3) posAnim=0;
    majIHM();
  });
  
  //Ajout du logo raleur
  jQuery(".bloc2:eq(1)").css("margin-bottom", "0px");
  jQuery("#menu3").append("<img src=\"/assurances/home/20100730-AssuScoRaleur/images/raleurs.jpg\" alt=\"championnat_raleur\"/>");
  jQuery("#menu3 img[src*='raleurs']").css("cursor", "pointer").click(function () {
	xt_homeFenetre("logoChampionnatRaleur", "http://www.youtube.com/championnatraleurs");
  });
});

function xt_home(page, url) {
    if (url=="") {
        xt_med('C','90','Home20100730-AssuScoRaleur::' + page,'N');
    } else {
        xt_med('C','90','Home20100730-AssuScoRaleur::' + page,'N', url)
    }
}

function xt_homeFenetre(page, url) {

	if (url=="") {
		xt_med('C','90','Home20100730-AssuScoRaleur::' + page,'N');
	} else {
		xt_med('C','90','Home20100730-AssuScoRaleur::' + page,'N', url,1)
	}
}

function popup(url, titre, largeur, hauteur, tb, sb) {
	window.open(url,titre,'width='+ largeur +',height=' + hauteur + ',top=5,left=5,toolbar=' + tb + ',location=no, directories=no,status=no,scrollbars=' + sb + ',resizable=1');
}

//Actualité aléatoire au 1er chargement de la page
var premierChargement = true;
var posAnim = Math.floor(Math.random()*3);

function majIHM() {
  jQuery(".anim").hide();
  jQuery(".anim" + posAnim).show();
}
