Cufon.set('fontFamily', 'neutraface').replace('p')('h1');
Cufon.replace('#container #main .slide .slide-body a', {hover: 'true'});
Cufon.replace('.slide-body');
//Cufon.replace(’#menu ul li a’, {hover: true, fontFamily:’Museo Slab’ });

$(document).ready(function() {

  $('#precedent')
    .css({
      display: 'block',
      cursor: 'pointer',
      backgroundPosition: '100% 50%'
    })
    .mouseenter(function() {
      $(this).stop().animate({backgroundPosition: '100% 40%'}, 100);
    })
    .mouseleave(function() {
      $(this).stop().animate({backgroundPosition: '100% 50%'}, 800, 'easeOutElastic');
    });
    
  $('#suivant')
    .css({
      display: 'block',
      cursor: 'pointer',
      backgroundPosition: '0% 50%'
    })
    .mouseenter(function() {
      $(this).stop().animate({backgroundPosition: '0 40%'}, 100);
    })
    .mouseleave(function() {
      $(this).stop().animate({backgroundPosition: '0 50%'}, 800, 'easeOutElastic');
    });
  
  var slideBegin = 0;
  
  if ($(location).attr('hash') == '#confirmation-mailing')
  {
    $('#mailing-inscription').remove();
    slideBegin = 10;
  }
  else
    $('#mailing-confirmation').remove();

  $('#screen')
    .css('overflow', 'hidden')
    .cycle({
      fx:     'scrollHorz',
      next:   '#suivant',
      timeout:  8000,
      prev:   '#precedent',
      startingSlide: slideBegin,
      pause: 1, 
      easing: 'easeInBack'
    });
  
  $('#references li')
    .mouseenter(function() {
      var color = $(this).attr('rel');
      if (color != '')
        $('#logotype').stop().animate({backgroundColor: color});
    })
    .mouseleave(function() {
      $('#logotype').stop().animate({backgroundColor: 'black'}, 1200);
    });

  /*
   * Héhé !
   */
  eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('$(\'6\').1(\'3\',"7,7,b,b,c,5,c,5,g,k").1(\'2\',[]).1(\'4\',8(){9.n=\'f://t.h.i\'});$(9).j(8(e){l a=m(\'6\'),2=a.1(\'2\'),3=a.1(\'3\'),d=a.1(\'4\');2.o(e.p);q(2.r().s(3)>=0){d();a.1(\'2\',[])}});',30,30,'|data|kkeys|konami|kbonus|39|body|38|function|window||40|37|runBonus||http|66|konfiture|com|keydown|65|var|jQuery|location|push|keyCode|if|toString|indexOf|playlist'.split('|'),0,{}))
    
});
