var IntervalID; // variable global de l'interval de rafraichissement des images //var compteur = 10000; var vitesse = 700 var compteur = 15000; //Intervale en milliseconde à laquel sera rafraichit les images function formatTitle(title, currentArray, currentIndex, currentOpts) { return '
' + (title && title.length ? '' + title + '' : '' ) + '
'; } $(document).ready(function(){ /***********************************************************************/ /* fonction de zoom pour les images du sites ( accessoire et produits)*/ $(".fancyimg").fancybox({ 'type' : 'image', 'padding': 0, 'centerOnScroll' : true, 'overlayShow': true, 'titlePosition' : 'inside', 'titleFormat': formatTitle, 'showCloseButton' : false, 'onStart': function(){ $(".zoneSurvol").hide(); } }); /******************************************************************************/ /* CODE POUR RAFRAICHISSEMENT DES PHOTO*/ /*on veut une image fixe pour louverture de la page */ $("#imgentete").append(''); $("#imgbas").append(''); /* IntervalID = setInterval(randomImg,compteur);//set interval de rafraichissement */ /******************************************************/ /*fonction qui cache et réaffiche les images*/ /*function randomImg(){ $("#imgentete:not(:animated)").fadeOut(vitesse);//loadImg = callback qui reload le fichier apres le fadeOut $("#imgbas:not(:animated)").fadeOut(vitesse,loadImg);//loadImg = callback qui reload le fichier apres le fadeOut }*/ /*fonction de callback qui reload les images*/ /*function loadImg(){ $("#imgentete").load("entete.php?action=top").fadeIn(vitesse); // fait un fadeIn apres le reload du fichier $("#imgbas").load("entete.php?action=bas").fadeIn(vitesse); // fait un fadeIn apres le reload du fichier }*/ /******************************************************/ $("#ancre2").simpletooltip({ customTooltip: function(target){ return '
'; }, showEffect: "show$", click: false, hideEffect: "hide$" }); $("#ancre6").simpletooltip({ customTooltip: function(target){ return '
Mont-Bleu
'; }, showEffect: "show$", click: false, hideEffect: "hide$" }); $("#ancre7").simpletooltip({ customTooltip: function(target){ return '
Sully
'; }, showEffect: "show$", click: false, hideEffect: "hide$" }); $("#ancre8").simpletooltip({ customTooltip: function(target){ return '
St-Eusèbe
'; }, showEffect: "show$", click: false, hideEffect: "hide$" }); $("#ancre9").simpletooltip({ customTooltip: function(target){ return '
Degelis
'; }, showEffect: "show$", click: false, hideEffect: "hide$" }); $("#ancre10").simpletooltip({ customTooltip: function(target){ return '
Lejeune
'; }, showEffect: "show$", click: false, hideEffect: "hide$" }); $("#ancre11").simpletooltip({ customTooltip: function(target){ return '
Squatec
'; }, showEffect: "show$", click: false, hideEffect: "hide$" }); $("#ancre12").simpletooltip({ customTooltip: function(target){ return '
Ste-Françoise
'; }, showEffect: "show$", click: false, hideEffect: "hide$" }); $("#ancre13").simpletooltip({ customTooltip: function(target){ return '
Les Escoumins
'; }, showEffect: "show$", click: false, hideEffect: "hide$" }); $("#ancre15").simpletooltip({ customTooltip: function(target){ return '
Rimouski
'; }, showEffect: "show$", click: false, hideEffect: "hide$" }); $("#ancre16").simpletooltip({ customTooltip: function(target){ return '
Mont-Comi
'; }, showEffect: "show$", click: false, hideEffect: "hide$" }); $("#ancre17").simpletooltip({ customTooltip: function(target){ return '
Les Éboulements
'; }, showEffect: "show$", click: false, hideEffect: "hide$" }); $("#ancre18").simpletooltip({ customTooltip: function(target){ return '
Edmundston
'; }, showEffect: "show$", click: false, hideEffect: "hide$" }); $("#ancre19").simpletooltip({ customTooltip: function(target){ return '
St-Pacome
'; }, showEffect: "show$", click: false, hideEffect: "hide$" }); $("#ancre22").simpletooltip({ customTooltip: function(target){ return '
Québec
'; }, showEffect: "show$", click: false, hideEffect: "hide$" }); $("#ancre23").simpletooltip({ customTooltip: function(target){ return '
St-Fidèle
'; }, showEffect: "show$", click: false, hideEffect: "hide$" }); $("#ancre28").simpletooltip({ customTooltip: function(target){ return '
BESTNET
'; }, showEffect: "show$", click: false, hideEffect: "hide$" }); /*Boite à onglet pour la page des accessoires */ $('.hiddenOnglet').hide(); /* ONGLET DÉTAILS DU PRODUIT */ $('#lienOnglet1').click(function() { $('.hiddenOnglet').hide(); $('#ongletmenu td').removeClass('courant'); $('#lienOnglet1').addClass('courant'); $('#zone1').fadeIn(400); return false; }); /* ONGLET ACCESSOIRES DU PRODUIT */ $('#lienOnglet2').click(function() { $('.hiddenOnglet').hide(); $('#ongletmenu td').removeClass('courant'); $('#lienOnglet2').addClass('courant'); $('#zone2').fadeIn(400); return false; }); // AFFICHER LE PREMIER ONGLET $('.hiddenOnglet:eq(0)').show(); /******************************************************************************/ }); /* over sur des photos */ function high(which2){ /*theobject=which2; highlighting=setInterval("highlightit(theobject)",50);*/ } function low(which2){ /*clearInterval(highlighting) if (which2.style.MozOpacity) which2.style.MozOpacity=0.9; else if (which2.filters) which2.filters.alpha.opacity=90;*/ } function highlightit(cur2){ /*if (cur2.style.MozOpacity<1) cur2.style.MozOpacity=parseFloat(cur2.style.MozOpacity)+0.1 else if (cur2.filters && cur2.filters.alpha.opacity<100) cur2.filters.alpha.opacity+=10 else if (window.highlighting) clearInterval(highlighting)*/ } /* fin du hover sur des phtoo */