$(document).ready(function() {

  /***** START effets de hover sur les collections *****/
  $('#masse .defLeft').css('marginLeft', '680px');
  $('#scandinave .defLeft').css('marginLeft', '680px');
  $('#foyer .defLeft').css('marginLeft', '680px');
  $('#masse').hover(function(){
    $('#masseTitle').stop(true, true).fadeOut(150);
    $('#masse .defLeft').stop(true, true).animate({
      opacity: 'show',
      marginLeft: '320px'
    }, 500);
  },function(){
    $('#masse .defLeft').stop(true, true).animate({
      opacity: 'hide',
      marginLeft: '680px'
    }, 300);
    $('#masseTitle').stop(true, true).fadeIn(800);
  });
  $('#scandinave').hover(function(){
    $('#scandinaveTitle').stop(true, true).fadeOut(150);
    $('#scandinave .defLeft').stop(true, true).animate({
      opacity: 'show',
      marginLeft: '320px'
    }, 500);
  },function(){
    $('#scandinave .defLeft').stop(true, true).animate({
      opacity: 'hide',
      marginLeft: '680px'
    }, 300);
    $('#scandinaveTitle').stop(true, true).fadeIn(800);
  });
  $('#foyer').hover(function(){
    $('#foyerTitle').stop(true, true).fadeOut(150);
    $('#foyer .defLeft').stop(true, true).animate({
      opacity: 'show',
      marginLeft: '320px'
    }, 500);
  },function(){
    $('#foyer .defLeft').stop(true, true).animate({
      opacity: 'hide',
      marginLeft: '680px'
    }, 300);
    $('#foyerTitle').stop(true, true).fadeIn(800);
  });
  /***** END effets de hover sur les collections *****/

  /***** START effets de hover sur les produits *****/
  $('.thumbProd').hover(function(){
    $(this).stop(true, true)
  },function(){
    $(this).stop(true, true)
  });
  $('.infoProd').hover(function(){
    $(this).stop().animate({
      opacity: 1,
      height: '95px',
      marginTop: '100px'
    }, 500);
  },function(){
    $(this).stop().animate({
      opacity: 0.6,
      height: '10px',
      marginTop: '147px'
    }, 300);
  });
  /***** END effets de hover sur les produits *****/

  /***** START effets photos produits *****/
  $('#imagesProduit li').hover(function(){
    var path = $(this).html();
    path = path.replace('/thumb', '');
    $('.cropImgNews').stop(true, true).animate({opacity: 'hide'}, 500);
    $('.cropImgNews').html("<a href='#'>"+path.replace(">", " class='imgNews' />")+"</a>");
    $('.cropImgNews').stop(true, true).animate({opacity: 'show'}, 500);
  },function(){});
  /***** END effets photos produits *****/

  /***** START effets menu catégories *****
  $('#menuCatInte li').hover(function(){
    $(this).stop(true, true).animate({opacity : 0.2}, 400, function(){ $(this).css('background', 'url(http://linux/gehin/web/images/fle_droite.png) no-repeat 4px -44px #dfdfdf');});
    $(this).stop(true, true).animate({opacity : 1}, 400);
  },function(){
    $(this).stop(true, true).animate({opacity : 0.2}, 400, function(){ $(this).css('background', 'url(http://linux/gehin/web/images/fle_droite.png) no-repeat 4px 4px');});
    $(this).stop(true, true).animate({opacity : 1}, 400);
  });
  ***** END effets illumine catégories *****/
});
