// JavaScript Document
$(document).ready(
  function()
    {
      Cufon.set("fontFamily", "Geogrotesque SmBd");
      Cufon.replace('#topmenu li a',{hover: true});
      Cufon.set("fontFamily", "Geogrotesque Rg");
      Cufon.replace('.article_horizontal_list .article.catalog a',{hover: true});
      Cufon.replace('.product_title span, .related_products h2');
      Cufon.replace('.product_title span, #products_overview h2');
      Cufon.replace('.article_horizontal_list .article.newsletter .title');
      
      $('.subfolder:not(".alone")').hover(
        function()
          {
            $(this).find('.folder_name a').animate(
              {
                'color': '#FF7900'
              },500);
            $(this).find('div.default_image').fadeOut('500');
            $(this).find('div.active_image').fadeIn('500');
          },
        function()
          {
            $(this).find('.folder_name a').animate(
              {
                'color': '#8AA8B6'
              },500);
            $(this).find('div.active_image').fadeOut('500');
            $(this).find('div.default_image').fadeIn('500');
          });

      $('.product_left .color:not(".active,.camera")').live('click',
        function()
          {
              var classes = this.className;
              var arr = classes.split(' ');
              var image_block = $(this).parent().parent().parent().find('.product_images .image.'+arr[1]);
              $(image_block).parent().parent().find('.image.active').fadeOut(function()
                {
                  $(image_block).fadeIn();
                }
                );
              $(this).parent().parent().find('.active').removeClass('active');
              $(image_block).addClass('active');
              $(this).addClass('active');
          });
    }
);
