
// fonction resize hauteur max bloc

// use : $(".view-astuces-et-conseils").equalizeHeight(".views-row");

jQuery.fn.equalizeHeight = function(selector) {
  var max = 0;
  this.find(selector).each(function(){
    height = $(this).height();
    if (height > max) max = height;
  });
  this.find(selector).height(max);
};



$(document).ready(function() {
  

  // caroufledsel
    
  $("#foo").carouFredSel({
      items       : 1,
      scroll      : {
          fx      : "crossfade",
          duration : 2000
      }
  });
  
  $("#foo").show();   


  // Cufont

  Cufon.replace('.pave .titre', {
    fontFamily: 'Helvetica Cond Bold'
  });

  Cufon.replace('h2', {
    fontFamily: 'Helvetica Cond Bold'
  });

  Cufon.replace('#primary-nav > ul > li > a', {
    fontFamily: 'Helvetica-light',
    hover: true
  });

  Cufon.replace('#primary-nav > ul > li > span', {
    fontFamily: 'Helvetica-light',
    hover: true
  });

  screenshotPreview(); //active les tooltip lien avec preview
  


});
