/* js/barre_outils.js */
function accordeon(titreElt){titreElt.toggleClass('ouvert').toggleClass('ferme');
   titreElt.siblings('div.detail').slideToggle('fast');
  titreElt.parent('li').siblings('li').children('div.detail:visible').hide();
   titreElt.siblings('li a.ouvert').toggleClass('ouvert').toggleClass('ferme');
    if(titreElt.hasClass('ouvert')){
     titreElt.parents('ul.liste_outils').addClass('deplie', 1000);
     titreElt.parent('li').siblings('li').children('a').removeClass('ouvert').addClass('ferme');
  }
  else{
     titreElt.parents('ul.liste_outils').removeClass('deplie', 1000);
  }
}


function init_barre_outils() {
	  $('ul.liste_outils li a.ferme').click(function(event) {
		accordeon($(this));  
		event.preventDefault();
	  });
	   $('ul.liste_outils li a.ouvert').click(function(event) {
		accordeon($(this));
		event.preventDefault();
	  });
        $('div.combo a.ferme').click(function(event) {
		combo($(this));
		event.preventDefault();
	  });
	   $('div.combo a.ouvert').click(function(event) {
		combo($(this));
		event.preventDefault();
	  });
     $(".toollink").tooltip();

     $('.outils .submit').click(function() {
        formulaire = $(this).parent();
        return verifier_formulaire(formulaire);
     });
}

function combo(titreElt){
   titreElt.toggleClass('ouvert').toggleClass('ferme');
   titreElt.parent('li').siblings('li').toggle('fast');
}

$(document).ready(function() {
   // copie la barre cachÃ© dans les emplacements
   var i = 1;
   var barre_html = $('#outils_code').html();
   nbr_pos = $(".outils_position").length;
   if(nbr_pos == 2)
   {
      var nom_pos = new Array("Top", "Bottom");      
   }
   if(nbr_pos == 1)
   {
      var nom_pos = new Array("Top");
   }
   $(".outils_position").each(function() {
     var outils_position = this;
     var nom_pos_actuel = nom_pos[i - 1];
     $(this).html(barre_html);
     if(i == 2)
     {
        $(this).find('.abonnez-vous-haut').css('display', 'none');
     }

     $(this).find(".abonnez-vous-haut").each(function() {      
        $(this).click(function() {
           xt_click(this,'C',LMD.Layout.X.Click.getNiveau2(),LMD.Layout.X.Click.renderClickTag('Outil_' + nom_pos_actuel + '_AbonnezVous'),'N');
         });
      });
      $(this).find(".comment-ancre").each(function() {
        $(this).click(function() {
           xt_click(this,'C',LMD.Layout.X.Click.getNiveau2(),LMD.Layout.X.Click.renderClickTag('Outil_' + nom_pos_actuel + '_Comment'),'N');
         });
       });

      $(this).find(".classez").each(function() {
        $(this).click(function() {
           xt_click(this,'C',LMD.Layout.X.Click.getNiveau2(),LMD.Layout.X.Click.renderClickTag('Outil_' + nom_pos_actuel + '_Classez'),'N');
           return false;
         });
       });

      $(this).find(".imprimez").each(function() {
        $(this).click(function() {
           xt_click(this,'C',LMD.Layout.X.Click.getNiveau2(),LMD.Layout.X.Click.renderClickTag('Outil_' + nom_pos_actuel + '_Imprimez'),'N');
         });
       });

      $(this).find(".envoyez").each(function() {
        $(this).click(function() {
           xt_click(this,'C',LMD.Layout.X.Click.getNiveau2(),LMD.Layout.X.Click.renderClickTag('Outil_' + nom_pos_actuel + '_Email'),'N');
         });
       });
      $(this).find(".recommandez").each(function() {
        $(this).click(function() {
           xt_click(this,'C',LMD.Layout.X.Click.getNiveau2(),LMD.Layout.X.Click.renderClickTag('Outil_' + nom_pos_actuel + '_Recommandez'),'N');
           return false;
         });
       });
      $(this).find(".facebook").each(function() {
        $(this).click(function() {
           xt_click(this,'C',LMD.Layout.X.Click.getNiveau2(),LMD.Layout.X.Click.renderClickTag('Outil_' + nom_pos_actuel + '_Facebook'),'N');
         });
       });
      $(this).find(".scoopeo").each(function() {
        $(this).click(function() {
           xt_click(this,'C',LMD.Layout.X.Click.getNiveau2(),LMD.Layout.X.Click.renderClickTag('Outil_' + nom_pos_actuel + '_Scoopeo'),'N');
         });
       });
      $(this).find(".delicious").each(function() {
        $(this).click(function() {
           xt_click(this,'C',LMD.Layout.X.Click.getNiveau2(),LMD.Layout.X.Click.renderClickTag('Outil_' + nom_pos_actuel + '_Delicious'),'N');
         });
       });
      $(this).find(".blogmarks").each(function() {
        $(this).click(function() {
           xt_click(this,'C',LMD.Layout.X.Click.getNiveau2(),LMD.Layout.X.Click.renderClickTag('Outil_' + nom_pos_actuel + '_Blogmarks'),'N');
         });
       });

      $(this).find(".wikio").each(function() {
        $(this).click(function() {
           xt_click(this,'C',LMD.Layout.X.Click.getNiveau2(),LMD.Layout.X.Click.renderClickTag('Outil_' + nom_pos_actuel + '_Wikio'),'N');
         });
       });
      $(this).find(".viadeo").each(function() {
        $(this).click(function() {
           xt_click(this,'C',LMD.Layout.X.Click.getNiveau2(),LMD.Layout.X.Click.renderClickTag('Outil_' + nom_pos_actuel + '_Viadeo'),'N');
         });
       });

      $(this).find(".twitter").each(function() {
        $(this).click(function() {
           xt_click(this,'C',LMD.Layout.X.Click.getNiveau2(),LMD.Layout.X.Click.renderClickTag('Outil_' + nom_pos_actuel + '_Twitter'),'N');
         });
       });

      $(this).find(".buzzer").each(function() {
        $(this).click(function() {
           xt_click(this,'C',LMD.Layout.X.Click.getNiveau2(),LMD.Layout.X.Click.renderClickTag('Outil_' + nom_pos_actuel + '_YahooBuzz'),'N');
         });
       });

     $(this).toggleClass("position_"+i, true);
     i++;
   });   
   // copie les pubs au bon endroit
   i = 1;   
   $(".position_pub").each(function() {      
      $('#position_pub_hidden_' + i + ' script').remove();
      pub = $('#position_pub_hidden_' + i).html();
      if(pub)
      {
         $(this).before("<div id='" + 'Position' + i + "' class='pub_barre_outils'></div>");
         $('#Position' + i).html(pub);
         if ( MIA.Pub.OAS.testPub('Position' + i) )
         {
            sponso = $(this).closest('.outils_position').find('.sponsorise_par');
            sponso.css('display', 'none');
         }
      }
      i++;
   });

   // initialise le code js des barres
   init_barre_outils();
});

if ( 'undefined' == typeof MIA) MIA = {};
if ( 'undefined' == typeof MIA.Partage) MIA.Partage = {
toggled: false,
toggleSharing:function(){if(!MIA.Partage.toggled){document.getElementById('shareTools').style.display='block';MIA.Partage.toggled=true}else{document.getElementById('shareTools').style.display='none';MIA.Partage.toggled=false}},
ouvrirPopup:function(url,titre,parametres){
var expression = /[^*]width=([0-9]*)[^*]/;
expression.exec(parametres);
var popup_width=RegExp.$1;
expression=/[^*]height=([0-9]*)[^*]/;
expression.exec(parametres);
var popup_height=RegExp.$1;
var left=(screen.width-popup_width)/2;
var top=(screen.height-popup_height)/2;
var params=parametres+',top='+top + ',left='+left;
var win=window.open(url,titre,params)}
};
/* js/lmd/init.js */
/**
 * Le Monde
 * Initialise le namespace du projet lemonde
 * @author berge
 */

if(typeof LMD == "undefined" || !LMD){
    /**
     * Le namespace du projet lemonde
     * @namespace Le namespace du projet lemonde
     */
    var LMD = {};
};/* js/lmd/connection.js */
/**
 * Le Monde
 * GÃ¨re la connexion des utilisateurs au monde.fr
 * @author berge
 */

/**
 * Connection
 * @class Connection
 */
LMD.Connection = Class.extend(
{
   /**
    * @scope LMD.Connection
    */
   
   /**
    * Constructeur
    */
   init : function()
   {
   
   }
});

/**
 * Nom du cookie de connexion
 * @static
 * @type string
 */
LMD.Connection.COOKIE_CONNECTION = 'tdb_user_abo';

/**
 * Nom du cookie d'informations utilisateur
 * @static
 * @type string
 */
LMD.Connection.COOKIE_USER_INFO = 'info_user_web';

/**
 * Nom du cookie wordpress
 * @static
 * @type string
 */
LMD.Connection.COOKIE_WORDPRESS = 'wordpressuser';

/**
 * Nom du cookie utilisateur partagÃ©
 * @static
 * @type string
 */
LMD.Connection.COOKIE_SHARED_USER = 'shared_user';

/**
 * Url de destination abonnÃ©
 * @type string
 */
LMD.Connection.urlDestAbo = "";

/**
 * Url de destination visiteur
 * @type string
 */
LMD.Connection.urlDestPub = "";

/**
 * Teste si l'utilisateur est connectÃ© ou non
 * @static
 * @returns {boolean}
 */
LMD.Connection.isConnected = function()
{
   return $.cookie(LMD.Connection.COOKIE_CONNECTION) != null;
};

/**
 * Teste si l'utilisateur est un utilisateur partagÃ©
 * @static
 * @returns {boolean}
 */
LMD.Connection.isSharedUser = function()
{
   return LMD.Connection.isConnected() && $.cookie(LMD.Connection.COOKIE_SHARED_USER) != null;
};

/**
 * Teste si l'utilisateur possÃ¨de un blog
 * @static
 * @returns {boolean}
 */
LMD.Connection.hasBlog = function()
{
   return $.cookie(LMD.Connection.COOKIE_WORDPRESS) != null;
};


/**
 * RÃ©cupÃ¨re l'utilisateur blog
 * @static
 * @returns {string}
 */
LMD.Connection.getBlogUser = function()
{
   return $.cookie(LMD.Connection.COOKIE_WORDPRESS);
};

/**
 * Retourne le cookie d'information utilisateur
 * @static
 * @returns {object}
 */
LMD.Connection.getUserInfos = function()
{
   var cookie = $.cookie(LMD.Connection.COOKIE_USER_INFO);
   var jsonData = {};
   
   if(cookie != null && cookie != '')
   {
      jsonData = $.parseJSON(cookie);
   }
   
   return jsonData;
};

/**
 * Teste si l'utilisateur a des informations
 * @static
 * @returns {boolean}
 */
LMD.Connection.hasUserInfos = function()
{
   var userInfos = LMD.Connection.getUserInfos();
   
   return (typeof userInfos.info_user != "undefined" && userInfos.info_user);
};/* js/lmd/layout/menu.js */
/**
 * Menu
 * GÃ¨re le menu principal du site
 * @author berge
 */

if(typeof LMD.Layout == "undefined" || !LMD.Layout){
    /**
     * Le namespace du layout
     * @namespace Le namespace du layout
     */
    LMD.Layout = {};
};

LMD.Layout.X = {};

LMD.Layout.X.Click = {
   niveau2: "",
   chapitre: "",
   clickTag: "",
   setNiveau2: function(level2){LMD.Layout.X.Click.niveau2=level2;},
   setChapitre: function(chap){LMD.Layout.X.Click.chapitre=chap;},
   setClickTag: function(c){LMD.Layout.X.ClickTag=c;},
   getChapitreF: function(){return (LMD.Layout.X.Click.chapitre?LMD.Layout.X.Click.chapitre+"::":"");},
   getNiveau2: function(l2_def){l2_def||(l2_def=""); return (LMD.Layout.X.Click.niveau2 ? LMD.Layout.X.Click.niveau2 : l2_def);},
   renderClickTag: function(c){return LMD.Layout.X.Click.getChapitreF()+c;}
};

/**
 * Le Menu
 * @class Menu
 */
LMD.Layout.Menu = Class.extend(
{
   /**
    * @scope LMD.Layout.Menu
    */
   
   /**
    * Url de debrief
    * @type string
    */
   debriefUrl : "",
   
   /**
    * Url de page perso
    * @type string
    */
   pagePersoUrl : "",
   
   /**
    * Constructeur
    * @param {string} debriefUrl Url du debrief
    * @param {string} pagePersoUrl Url de la page perso
    * @param {string} menuContent Contenu du menu
    */
   init : function(debriefUrl, pagePersoUrl, menuContent)
   {
      this.debriefUrl = debriefUrl;
      this.pagePersoUrl = pagePersoUrl;
      
      if(menuContent)
      {
         $('#menuBar').append(MIA.Util.base64_decode(menuContent));
      }
   
      for(var i=0,il=$("#menu-l1-container li").length; i < il; i++)
      {
         $("#menu-l1-container #menu-l1-" + i +" a").hover($.proxy(this.onHoverLink, this), function(){});
      }
      
      $("#menu-l1-container .abo-page").hover(function(){$(this).addClass("gold-active"); }, function(){$(this).removeClass("gold-active"); });
      
      $("#menuBar li.debrief").click($.proxy(function(){xt_med('C','16','picto_debrief','N'); this.toggleDebrief(); return false;}, this));
      
      //Affichage de la partie abonnÃ©
      if(LMD.Connection.isConnected())
      {
         if(!LMD.Connection.hasUserInfos())
         {
            MIA.ServicesAbonnes.ajouterFonctionMaj($.proxy(this.updateName, this));
         }
         else
         {
            this.updateName();
         }
         
         
         //Affichage du debrief
         if(this.isOpenSync() || $.cookie(LMD.Layout.Menu.COOKIE_DEBRIEF_CLOSE) == null)
         {
            this.showDebrief();
         }
         
         this.removeOpenSync();
         this.addCloseCookie();
      }
      
      $("#menu-l2-6 li.lien_debrief").click($.proxy(function(){this.toggleDebrief(); return false;}, this));
      
      //Changement des images pour la version iPhone
      if(typeof headerMobile != "undefined" && headerMobile)
      {
         if(headerMobile.appleDevice)
         {
            headerMobile.switchSrcSvg('#menuBar #img_grise');
            headerMobile.switchSrcSvg('#menuBar #img_blanche');
         }
      }
   },
   
   /**
    * Mise Ã  jour du nom et prÃ©nom
    */
   updateName : function()
   {
      var userInfos = LMD.Connection.getUserInfos();
      
      var name = "";
      var firstname = "";
      var urlPagePerso = "";
      
      if(typeof userInfos.info_user != "undefined" && userInfos.info_user && typeof userInfos.info_user.nom != "undefined" && userInfos.info_user.nom)
      {
         name = userInfos.info_user.nom;
      }
      
      if(typeof userInfos.info_user != "undefined" && userInfos.info_user && typeof userInfos.info_user.prenom != "undefined" && userInfos.info_user.prenom)
      {
         firstname = userInfos.info_user.prenom;
      }
      
      if(typeof userInfos.page_perso != "undefined" && userInfos.page_perso && typeof userInfos.page_perso.url != "undefined" && userInfos.page_perso.url)
      {
         urlPagePerso = userInfos.page_perso.url + "admin/";
      }
      else
      {
         urlPagePerso = this.pagePersoUrl;
      }
      
      var ident = firstname + " " + name;
      ident = ident.length > 30 ? firstname.substr(0, 1) + ". " + name : ident;
      ident = ident.length > 30 ? ident.substr(0, 28) + "..." : ident;
      
      $("#perso-link-menu a").attr("href", urlPagePerso);
      $("#perso-link-menu a span").html(ident);
   },
   
   /**
    * PossÃ¨de le cookie d'ouverture synchronisÃ©
    * @returns {boolean}
    */
   isOpenSync : function()
   {
      return $.cookie(LMD.Layout.Menu.COOKIE_DEBRIEF_OPEN) != null;
   },
   
   /**
    * Ajoute le cookie d'ouverture synchronisÃ©e
    */
   addOpenSync : function()
   {
      $.cookie(LMD.Layout.Menu.COOKIE_DEBRIEF_OPEN, "1");
   },
   
   /**
    * Supprime l'ouverture synchronisÃ©e
    */
   removeOpenSync : function()
   {
      $.cookie(LMD.Layout.Menu.COOKIE_DEBRIEF_OPEN, null);
   },
   
   /**
    * Au rollOver sur un lien
    * @event
    * @param {object} e EvÃ¨nement
    */
   onHoverLink : function(e)
   {
      var idAr = $(e.currentTarget).parent().attr("id").split('-');
      var id = Number(idAr[idAr.length - 1]);
      this.show(id);
   },
   
   
   /**
    * Affichage d'un onglet
    * @param {int} id Id de l'onglet
    */
   show : function(id)
   {
      this.hideDebrief();
      
      $("#menu-l1-container li").removeClass('active').removeClass('gold-active');
      
      if($("#menu-l1-container #menu-l1-" + id).hasClass('abonnes'))
      {
         $("#menu-l1-container #menu-l1-" + id).addClass('gold-active');
      }
      else
      {
         $("#menu-l1-container #menu-l1-" + id).addClass('active');
      }
      
      $("#menu-l2-container ul").hide();
      $("#menu-l2-" + id).show();
   },
   
   /**
    * Affichage du debrief
    * @returns {boolean}
    */
   showDebrief : function()
   {
      //Pas d'affichage sur les pages persos en Ã©dition
      if (  document.location.href.indexOf('/admin/', 0) >= 0 ||
            document.location.href.indexOf('/contre_enquete/', 0) >= 0 ||
            document.location.href.indexOf('/thematique/', 0) >= 0 ||
            document.location.href.indexOf('/collection/', 0) >= 0 )
      {
         return 0;
      }
      
      if($("#debrief-container").html() == "")
      {
         $.get(this.debriefUrl, null, $.proxy(this.getDebriefCallBack, this));
      }
      else
      {
         $("#debrief-container").slideDown();
      }
   },
   
   /**
    * A la rÃ©ception des donnÃ©es
    * @param {object} data DonnÃ©es
    * @param {string} textStatus Status
    */
   getDebriefCallBack : function(data, textStatus)
   {
      $("#debrief-container").html(data).addClass("level3").slideDown();
   },
   
   /**
    * Masquer le debrief
    */
   hideDebrief : function()
   {
      $("#debrief-container").slideUp();
   },
   
   /**
    * Ajout du cookie de fermeture
    */
   addCloseCookie : function()
   {
      $.cookie(LMD.Layout.Menu.COOKIE_DEBRIEF_CLOSE, '1', {expires: 3});
   },
   
   toggleDebrief : function()
   {
      if($("#debrief-container:hidden").length)
      {
         this.showDebrief();
      }
      else
      {
         this.hideDebrief();
      }
   }
});

/**
 * Nom du cookie de debrief
 * @type string
 */
LMD.Layout.Menu.COOKIE_DEBRIEF_OPEN = 'cqjl_open';

/**
 * Debrief fermÃ©
 * @type string
 */
LMD.Layout.Menu.COOKIE_DEBRIEF_CLOSE = 'cqjl_close';/* js/lmd/layout/colright.js */
/**
 * ColRight
 * Tout ce qui concerne la colonne de droite, 
 * ainsi que certains scripts appelÃ©s pour certains blocs (Ã  externaliser)
 * @author berge
 */

if(typeof LMD.Layout == "undefined" || !LMD.Layout){
    /**
     * Le namespace du layout
     * @namespace Le namespace du layout
     */
    LMD.Layout = {};
};

if(typeof LMD.Layout.ColRight != "undefined" || !LMD.Layout.ColRight){
   /**
   * Fonctions d'assemblage de la nouvelle colonne de droite
   * Mise en place sur les pages :
   * - Elements
   * 
   * @class ColRight
   */
   LMD.Layout.ColRight = Class.extend(
   {
      /**
      * @scope LMD.Layout.ColRight
      */
      
      /**
      * Url du flux dÃ©finissant la coldte
      * @type string
      */
      uri : null,
      
      /**
      * Tableau de tags de contexte
      * @type array
      */
      tags : [],
      
      /**
      * Nombre unique liÃ© Ã  la pub
      * @type int
      */
      pubUniqueNumber : 0,
      
      /**
      * Le descripteur
      * @type object
      */
      descriptor : null,
      
      /**
      * Types de blocs
      * @type array
      */
      typeBlocIds : null,
      
      /**
      * Taille de la colonne de droite visible
      * @type int
      */
      maxVisibleHeight : 0,
      
      /**
      * RequÃ¨te en cours
      * @type boolean
      */
      inRequest : false,
      
      /**
      * Chargement complet
      * @type boolean
      */
      completeLoad : false,
      
      /**
      * Activation du lazyload
      * @type boolean
      */
      lazyloadOn : false,
      
      /**
      * Debug actif ou pas
      * @type boolean
      */
      debugOn : false,
      
      /**
      * Optimisation blocs inline
      * @type boolean
      */
      optimiserInlines : true,
      
      /**
      * Constructeur
      * @param {string}   uri   Url du flux dÃ©finissant la coldte
      * @param {array}    tags  Tableau de tags de contexte
      */
      init : function(uri, tags)
      {
         if(uri !== null){ this.uri = uri; }
         if(tags !== null){ this.tags = tags; }
         
         this.typeBlocIds = this.getBlocTypes();
         
         this.activeLazyload();
         this.activeOptimInlineBlocs();
         this.checkUrlParams();
         
         MIA.log('[INIT]');
      },
      
      /**
      * Activation du lazyload selon le navigateur
      * le lazyload est activÃ© par dÃ©faut si on ne se trouve pas sur IE
      */
      activeLazyload : function()
      {
         if(!$.browser.msie)
         {
            this.lazyload();
         }
      },

      /**
      * Activation de l'optimisation sur browser webkit/gecko
      * on cherche le contenu dans la page.
      * sous IE : pb d'aliasings lors du deplacement de blocs.
      */
      activeOptimInlineBlocs : function ()
      {
         if ($.browser.msie)
            this.optimiserInlines = false;
      },

      /**
      * Regarde les paramÃ¨tres dans l'url pour mettre le lazyload ou le debug
      * - ?debug=true pour le mode debug
      * - ?lazyload=true pour le chargement lazyload
      */
      checkUrlParams : function()
      {
         var $_GET = MIA.Util.getQueryParams();
         
         if($_GET['lazyload'] == "true")
         {
            this.lazyload();
         }
         
         if($_GET['debug'] == "true")
         {
            this.debug();
         }
      },
      
      /**
      * Fonction de dÃ©marrage
      * @returns {LMD.Layout.ColRight}
      */
      start : function()
      {
         $.get(this.uri, null, $.proxy(this.getDescriptorCallBack, this), 'json');
         
         return this;
      },
      
      /**
      * Suivant le tag de niveau 0, cette fonction va chercher en conf
      * les types de blocs affichable dans la col droite.
      * 
      * @param      tags     tableau des tags liÃ©s Ã  l'Ã©lÃ©ment
      * @returns    {array}  array[id, id, ..., id] id des types de blocs.
      */
      getBlocTypes : function()
      {
         var typeTagIdN0 = LMD.Conf.Layout.ColRight.tagTypeLibelleToId['niveau_0'];
         var tagN0 = this.tags.filter(function (tag) { return tag['S_typeTagId'] == typeTagIdN0; }).pop();
         var tagN0UrlFriendly = (tagN0) ? tagN0['S_urlFriendly'] : 'unknown';

         switch (tagN0UrlFriendly) {
            case 'sport' :
            case 'idees' :
            case 'voyage':
               return LMD.Conf.Layout.ColRight.typeBlocByTagUrlFriendly[tagN0UrlFriendly];
               break;
            default :
               return LMD.Conf.Layout.ColRight.typeBlocByTagUrlFriendly['*'];
               break;
         }
         
         return ;
      },
      
      /**
      * AppelÃ© lors de la rÃ©ception du descripteur
      * @param {object} data DonnÃ©es retournÃ©es
      * @param {string} textStatus Status
      */
      getDescriptorCallBack : function(data, textStatus)
      {
         MIA.log('> getDescriptorCallBack');
         
         if(data && textStatus == "success")
         {
            this.descriptor = data;
            
            //On cache les blocs inline pour crÃ©er une nouvelle colonne
            this.hideInlineBlocks();
            
            //Premier rendu de la colonne
            this.render();
            
            //EvÃ¨nement sur scroll
            $(window).scroll($.proxy(this.onWindowScrolling, this));
         }
      },
      
      /**
      * Permet de cacher les blocs inline
      */
      hideInlineBlocks : function()
      {
         this.descriptor.blocks.forEach(function (bloc)
         {
            if (bloc.metadata.resource == 'inline')
            {
               $("#colDroite > div").each(function (index)
               {
                  if ($(this).attr('uri') == bloc.metadata.uri)
                  {
                     $(this).hide();
                     //$(this).css('opacity', 0);
                  }
               });
            }
         });
      },
      
      /**
      * Au scroll sur l'objet window
      * @param {object} e EvÃ¨nement
      */
      onWindowScrolling : function(e)
      {
         this.render();
      },
      
      /**
      * Moteur de rendu de la colonne de droite
      */
      render : function()
      {
         MIA.log('[RENDER]');
         
         if(!this.inRequest && !this.completeLoad)
         {
            if(!this.lazyloadOn || (this.getVisibleHeight() > this.getInsertedBlocksHeight()))
            {
               this.getNextBlock();
            }
         }
      },
      
      /**
      * Renvoit la taille de la colonne visible
      * @returns {int}
      */ 
      getVisibleHeight : function()
      {
         $window = $(window);
         var visibleHeight = $window.scrollTop() + $window.height() - $("#colDroite").offset().top;
         
         if(this.maxVisibleHeight < visibleHeight)
         {
            this.maxVisibleHeight = visibleHeight;
         }
         
         return this.maxVisibleHeight + LMD.Conf.Layout.ColRight.adjustLazyLoad;
      },
      
      /**
      * Renvoit la taille de tous les blocs insÃ©rÃ©s
      * @returns {int}
      */
      getInsertedBlocksHeight : function()
      {
         var totalHeight = 0;
         
         var processedBlocks = $("#colDroite *[processed=true]");
         for(var i=0,il=processedBlocks.length,h;i<il;i++)
         {
            var b = processedBlocks.eq(i);
            if (b.attr("cached_height"))
            {
               h = parseInt(b.attr("cached_height"), 10);
            }
            else
            {
               h = b.outerHeight(true);
               if (h)
                  b.attr("cached_height", h);
            }
            totalHeight += h + 15; // marge moyenne.
         }
         
         return totalHeight;
      },
      
      /**
      * RÃ©cupÃ©ration du bloc suivant
      */
      getNextBlock : function()
      {
         this.inRequest = true;
         
         MIA.log('[GET BLOCK] : ');
         MIA.log(this.typeBlocIds);
         

         if(this.typeBlocIds.length == 0)
         {
            MIA.log('[EMPTY ORDER]');
            
            for(var i=0,il=this.descriptor.blocks.length;i<il;i++)
            { 
               block = this.descriptor.blocks[i];
               
               if(typeof block.status == "undefined")
               {
                  MIA.log('[UNINSERTED BLOCK REQUEST]');
                  
                  this.requestBlock(block);
                  return ;
               }
            }
            
            this.finish();
            return ;
         }
         
         var nextBlockTypeId = this.typeBlocIds.shift();
         var block;
         
         if(nextBlockTypeId == 1)
         {
            this.insertPub();
            
            this.inRequest = false;
            
            this.render();
            
            return ;
         }
         else
         {         
            for(var i=0,il=this.descriptor.blocks.length;i<il;i++)
            { 
               block = this.descriptor.blocks[i];
               
               if(block.metadata.type == LMD.Conf.Layout.ColRight.typeBlocIdToName[nextBlockTypeId] && typeof block.status == "undefined")
               {
                  this.requestBlock(block);
                  return ;
               }
            }
            
            this.getNextBlock();
         }
      },
      
      /**
       * Retourne un bloc dans le bloc alÃ©atoire
       * @param {array} block Le bloc
       * @returns {array} Le bloc choisit alÃ©atoirement
       */
      getRandomBlock : function(block)
      {
         var fill_tmp_array, weight_sum = 0, random_block_tmp_array = [], random_block_tmp, d = new Date();
         
         for(var i=0,il=block['metadata']['randomBlocks'].length;i<il;i++)
         {
            random_block_tmp = block['metadata']['randomBlocks'][i];
            
            fill_tmp_array = [];
            for(var j=Number(random_block_tmp['metadata']['weight']);j>0;j--)
            {
               fill_tmp_array.push(i);
            }
            
            random_block_tmp_array = random_block_tmp_array.concat(fill_tmp_array);
            weight_sum += Number(random_block_tmp['metadata']['weight']);
         }
         
         return block['metadata']['randomBlocks'][random_block_tmp_array[d.getTime() % weight_sum]];
      },
      
      /**
      * Appel d'un bloc
      * @param {object} bloc L'objet bloc Ã  appeler
      */
      requestBlock : function(bloc)
      {
         bloc.status = 'requested';
         
         //Gestion des blocs randoms
         if(bloc.metadata.random == '1')
         {
            bloc = this.getRandomBlock(bloc);
         }
         
         if (bloc.metadata.resource == 'distant')
         {
            MIA.log('[REQUEST] remote >' + bloc.metadata.uri);
            
            $.ajax({
               url: bloc.metadata.uri,
               data: null,
               dataType: 'html',
               timeout: LMD.Conf.Layout.ColRight.remoteTimeout,
               success: $.proxy(function (data)
               {
                  this.processBlock(bloc, data); 
               }, this),
               error : $.proxy(function (XMLHttpRequest, textStatus, errorThrown)
               {
                  this.processBlock(bloc, '<!'+ '-- error XHR : ' + textStatus + '-' + '->');
               }, this)
            });
         }
         else if (bloc.metadata.resource == 'inline')
         {
            MIA.log('[REQUEST] inline > ' + bloc.metadata.uri);
            
            var pthis = this;
            var inline = false;
            $("#colDroite > div").each(function (index)
            {
               if ($(this).attr('uri') == bloc.metadata.uri)
               {
                  inline = true;
                  pthis.processBlock(bloc, this);
               }
            });
            // gestion de l'erreur : decoordination entre HTML et JS flux.
            if (!inline) {
               MIA.log('[ERROR] inline bloc ' + bloc.metadata.uri + ' does not exist. check /api/.. uri Vs inline uri.');
               bloc.status = 'received';
               this.render();
            }
         }
      },

      /**
      * Fonction appelÃ©e aprÃ¨s la rÃ©ception d'un bloc
      * @param {objet} bloc Le bloc
      * @param {string} value Html du bloc
      */
      processBlock : function(bloc, value)
      {
         MIA.log('[BLOCK RECEIVED] : ' + bloc.metadata.uri + ' (' + bloc.metadata.type +')');
         
         //Stockage du HTML du bloc
         bloc.value = value;
         bloc.status = 'received';
         
         try {
            this.insertBlock(bloc);
         } catch (e) {
            bloc.status = 'inserted'; // failover.
         }
         
         this.inRequest = false;
         
         this.render();
      },
      
      /**
      * Insertion d'un bloc ou dÃ©placement (inline)
      * Bloc marketing ou editorial
      * L'insertion est dÃ©pendante de la taille de .col_gauche et .col_droite
      * 
      * @param {object}   bloc  Bloc Ã  insÃ©rer
      */
      insertBlock : function(bloc)
      {
         bloc.status = 'inserted';
         
         if (this.isThereAnySpaceLeft())
         {
            if (bloc.metadata.resource == 'inline')
            {
               MIA.log('[BLOCK INSERT] : moving inline bloc ' + bloc.metadata.type);
               var $inline_bloc = $(bloc.value);
               
               if (this.optimiserInlines)
               {
                  //$(bloc.value).css('opacity', 1).moveIn("#colDroite"); 
                  $(bloc.value).show().moveIn("#colDroite");
                  $inline_bloc.attr('processed', 'true');
               }
               else
               {
                  var s = $inline_bloc.html();
                  $inline_bloc.remove();
                  $("#colDroite").append('<div processed="true" uri="'+bloc.metadata.uri+'">'+s+'</div>');
               }
            }
            else
            {
               MIA.log('[BLOCK INSERT] : appending distant bloc ' + bloc.metadata.type);
               
               $("#colDroite").append('<div processed="true" uri="'+bloc.metadata.uri+'">'+bloc.value+'</div>');
            }

            this.putUnprocessedToEnd();
         }
         else
         {
            MIA.log('[BLOCK INSERT] : cannot insert');
            //this.finish();
         }
      },
      
      /**
      * Insertion d'une publicitÃ©
      * les publicites sont encadrees par des descripteurs : <div class="pub" processed="..." container="...">
      * processed = true/false => publicite deja utilisee dans la colonne
      * container = iframe => publicite a charger dynamiquement.
      */
      insertPub : function()
      {
         MIA.log('[BLOCK INSERT] : pub');
         
         var pub = $('#colDroite > .pub[processed!=true]').first();
         
         if (pub)
         {
            pub.moveIn("#colDroite");
            //pub.css('opacity', 1);
            pub.attr('processed', 'true');
         }
      },

      /**
      * Place les publicitÃ©s non gÃ©rÃ©s Ã  la fin de la colonne
      */
      putUnprocessedToEnd : function()
      {
         MIA.log("[PUB TO END]");
         
         $('#colDroite > [processed!=true]').each(function()
         {
            $(this).moveIn("#colDroite");
         });
      },
      
      /**
      * MÃ©thode appelÃ©e en fin de chargement
      */
      finish : function()
      {
         MIA.log('[FINISH]');
         
         while($('#colDroite > .pub[processed!=true]').length != 0)
         {
            this.insertPub();
         }
         
         $('#colDroite > [processed!=true]').hide();
         
         this.completeLoad = true;
         $(window).unbind('scroll', $.proxy(this.onWindowScrolling, this));
      },
      
      /**
      * Activation du lazyload
      * @param {boolean} val Valeur
      * @returns {LMD.Layout.ColRight}
      */
      lazyload : function(val)
      {
         if(typeof val == "undefined"){ val = true; }
         this.lazyloadOn = val;
         
         return this;
      },
      
      /**
      * Activation ou dÃ©sactivation du debug
      * @param {boolean} val Valeur
      * @returns {LMD.Layout.ColRight}
      */
      debug : function(val)
      {
         if(typeof val == "undefined"){ val = true; }
         this.debugOn = val;
         MIA.debug = val;
         
         return this;
      },
      
      /**
      * Teste la longueur de l'article pour savoir s'il reste de la place
      * pour afficher la colonne de droite
      * @returns boolean
      */
      isThereAnySpaceLeft : function()
      {
         var $col_gauche, $col_droite;
         
         if ($(".col_gauche").length)
            $col_gauche = $(".col_gauche");
         else
            $col_gauche = $("#LM_content");
         
         $col_droite = $("#colDroite");
         
         var maxHeight = ($col_gauche.length && $col_droite.length) ? $col_gauche.outerHeight() : "unlimited";
         
         var blocs_height = $col_droite.outerHeight();
         
         MIA.log('isThereAnySpaceLeft : ' + blocs_height + ' < ' + maxHeight + ' ?');
         
         return maxHeight == "unlimited" || blocs_height < maxHeight;
      }
   });
}

if(typeof LMD.Layout.ColRight.LesPlus == "undefined" || !LMD.Layout.ColRight.LesPlus){
   /**
   * Les Plus
   * @class LesPlus
   */
   LMD.Layout.ColRight.LesPlus = Class.extend(
   {
      /**
      * @scope LMD.Layout.ColRight.LesPlus
      */
      
      /**
      * Constructeur
      */
      init : function()
      {
         //Initialisation des onglets
         new MIA.Ui.Tab("lesPlusBlock", "lesplus");
         
         $("#lesPlusBlock .since-links a").click(function(){ return false; });
         
         var configHi = {    
                  over: $.proxy(this.onHoverSince, this), // function = onMouseOver callback (REQUIRED)    
                  timeout: 500, // number = milliseconds delay before onMouseOut    
                  out: function(){} // function = onMouseOut callback (REQUIRED)    
            };
         
         $("#lesPlusBlock .since-links a").hoverIntent(configHi);
      },
      
      /**
      * Au click sur la section depuis
      * @event
      * @param {object} event EvÃ¨nement
      */
      onHoverSince : function(event)
      {
         $(event.target).parent().find('a').removeClass('active');
         $(event.target).addClass('active');
         $(event.target).parent().parent().find(".since-content").hide();
         
         $(event.target.hash).show();
      }
      
   });
}

if(typeof LMD.Layout.ColRight.Sondage == "undefined" || !LMD.Layout.ColRight.Sondage){
   /**
   * Sondage
   * @class Sondage
   */
   LMD.Layout.ColRight.Sondage = Class.extend(
   {
      /**
      * @scope LMD.Layout.ColRight.Sondage
      */
      
      /**
      * Sondage terminÃ© ou non
      * @public
      * @type int
      */
      endSondage : 0,
      
      /**
      * Nom du cookie
      * @public
      * @type string
      */
      cookieName : "",
      
      /**
      * Contenu si l'utilisateur n'a pas votÃ©
      * @public
      * @type string
      */
      noVoteContent : "",
      
      /**
      * Contenu si l'utilisateur a votÃ©
      * @public
      * @type string
      */
      voteContent : "",
      
      /**
      * Constructeur
      */
      init : function()
      {  
         
      },
      
      /**
      * GÃ©nÃ©ration du bloc
      */
      generate : function()
      {
         if(!this.endSondage && $.cookie(this.cookieName) != "1")
         {
            $("#sondage-block-container").html(this.noVoteContent);
         }
         else
         {
            $("#sondage-block-container").html(this.voteContent);
         }
         
         //EvÃ¨nement sur le submit
         $("#sondage-block-container form").submit($.proxy(this.validForm, this));
      },
      
      /**
      * Permet de contrÃ´ler si la personne a choisit au moins une rÃ©ponse
      * @event
      * @parem {object} e EvÃ¨nement
      * @returns {boolean}
      */
      validForm : function(e)
      {
         if($("#sondage-block-container form input[type=radio]:checked").length > 0)
         {
            $.cookie(this.cookieName, 1, {expires: 7, domain: 'lemonde.fr'});
            xt_med("C", $("#sondage-block-container .click-level").html(), $("#sondage-block-container .click-marquer").html(), "N");
            return true;
         }
         else
         {
            alert(MIA.Util.utf8_decode("Veuillez sÃ©lectionner une rÃ©ponse."));
         }
         
         return false;
      }
   });
}

if(typeof LMD.Layout.ColRight.Blogs == "undefined" || !LMD.Layout.ColRight.Blogs){
   /**
   * Sondage
   * @class Sondage
   */
   LMD.Layout.ColRight.Blogs = Class.extend(
   {
      /**
      * @scope LMD.Layout.ColRight.Blogs
      */
      
      /**
      * DonnÃ©es des objets
      * @type object
      */
      dataObjects : null,
      
      /**
      * DonnÃ©es des id
      * @type object
      */
      dataId : null,
      
      /**
      * Hauteur des blocs images
      * @type int
      */
      blockHeight : null,
      
      /**
      * Constructeur
      * @param {string} data DonnÃ©es brutes
      * @param {int} height Hauteur
      */
      init : function(data, height)
      {
         $('#blogContentId').ready($.proxy(function()
         {
            this.dataObjects = $.parseJSON(data);
            this.dataId = this.dataObjects.map(function(obj){return obj.id;});
            this.blockHeight = Number(height);
            this.generate();
            
            $('#blogContentId').scroll($.proxy(this.generate, this));
            
         }, this));
      },
      
      /**
      * GÃ©nÃ©ration des images
      */
      generate : function()
      {
         var blogContent = $('#blogContentId');
         var minHeight = $('#blogContentId').scrollTop();
         var maxHeight = minHeight + $('#blogContentId').height();
         
         var nodeMinHeight, nodeMaxHeight;
         var sumClientHeight = 0;
         
         var displayObjects = this.dataObjects.filter($.proxy(function(obj)
         {
            
            var index = this.dataId.indexOf(obj.id);
            if (index <= 4)
               return true;
            nodeMinHeight = index * this.blockHeight;
            sumClientHeight = sumClientHeight + this.blockHeight;
            nodeMaxHeight = nodeMinHeight + this.blockHeight;
            
            return ( (nodeMinHeight >= minHeight && nodeMinHeight < maxHeight) || (nodeMaxHeight > minHeight && nodeMaxHeight < maxHeight) );
         }, this));
         
         displayObjects.forEach(function(obj)
         {
            $("<img />").bind("load", function () {
               $("#" + obj.id).attr("src", obj.src).show();
               $("#" + obj.id + "Throbber").hide();
            }).attr("src", obj.src);
         });
         
         this.dataObjects = this.dataObjects.notIn(displayObjects);
      }
   });
}

if(typeof LMD.Layout.ColRight.MoreInfoSingleton == "undefined" || !LMD.Layout.ColRight.MoreInfoSingleton){
   /**
   * Singleton les + d'infos
   */
   LMD.Layout.ColRight.MoreInfoSingleton = {
         
      /**
      * @scope LMD.Layout.ColRight.MoreInfoSingleton
      */
         
      /**
      * Instance de MoreInfo
      * @type LMD.Layout.ColRight.MoreInfo
      */
      instance: null,
      
      /**
      * ChargÃ© ou non
      * @type boolean
      */
      loaded: false,
      
      /**
      * RÃ©cupÃ¨re l'instance du singleton
      */
      getInstance: function()
      {
         if(null == LMD.Layout.ColRight.MoreInfoSingleton.instance){
            LMD.Layout.ColRight.MoreInfoSingleton.instance = new LMD.Layout.ColRight.MoreInfo();
         }
         return LMD.Layout.ColRight.MoreInfoSingleton.instance;
      }
   };
}

if(typeof LMD.Layout.ColRight.MoreInfo == "undefined" || !LMD.Layout.ColRight.MoreInfo){
   /**
   * Les + d'infos
   * @class MoreInfo
   */
   LMD.Layout.ColRight.MoreInfo = Class.extend(
   {
      /**
      * @scope LMD.Layout.ColRight.MoreInfo
      */
      
      isReady: false,
      idsOn: new Array(),
      dispatcher: null,
      clickTag: 'Right_Plusdinfos_Tag',
      go: function(id_elem, over_n){
      
      if(LMD.Layout.ColRight.MoreInfoSingleton.loaded) return;
      
         var idx=jQuery.inArray(id_elem, this.idsOn);
         if(-1 != idx)
         {
            if(idx<over_n){
               for(n=idx;n<over_n;n++){
                  var now=$("#blockRightCallTagItem_"+this.idsOn[n]);
                  var nxt=$("#blockRightCallTagItem_"+this.idsOn[(n+1)]);
                  
                  if((now.children("div.vignette"))){
                     now.children("div.vignette").empty().append(nxt.children("div.vignette").html());
                     if(now.children("div.vignette").children().children(".vignettePhoto").html() == "") {
                        now.children("div.vignette").addClass("vignetteTextOnly");
                     } else {
                        now.children("div.vignette").removeClass("vignetteTextOnly");
                     }
                  }
               }
            }
         }      
         for(n=over_n;n<this.idsOn.length;n++){
            $("#blockRightCallTagItem_"+this.idsOn[n]).parent().css('display','none');
         }
         $('#blockRightCallTag_Id').css('display','block');
         
         LMD.Layout.ColRight.MoreInfoSingleton.loaded=true;
      },
      load: function(arr){
         this.idsOn=arr;
         this.isReady=true;
      },
      init: function() {
         this.dispatcher = new LMD.Layout.ColRight.MoreInfoEventDispatcher;      
      }
   });
}

if(typeof LMD.Layout.ColRight.MoreInfoEvent == "undefined" || !LMD.Layout.ColRight.MoreInfoEvent){
   /**
   * EvÃ©nement sur le bloc plus d'infos
   * @class Classe PaginatorEvent
   * @extends MIA.Event
   */
   LMD.Layout.ColRight.MoreInfoEvent = MIA.Event.extend(
   {
      /**
      * @scope LMD.Layout.ColRight.MoreInfoEvent
      */
      
      /**
      * Constructeur
      * @param {string} type Type d'Ã©vÃ¨nement
      * @param {int} data Data si nÃ©cessaire
      */
      init : function(type, data)
      {
         this._super(type);
         /**
            * Page
            * @type int
            */
         this.data = data;
      }
   });
   
   /**
   * Chargement du bloc
   * @public
   * @static
   * @type string
   */
   LMD.Layout.ColRight.MoreInfoEvent.LOADED = "loaded";
   LMD.Layout.ColRight.MoreInfoEventDispatcher = MIA.EventDispatcher.extend({});
}/* js/lmd/layout/header.js */
/**
 * Header
 * Tous les scripts qui concernent le header
 * @author berge
 */

if(typeof LMD.Layout == "undefined" || !LMD.Layout){
    /**
     * Le namespace du layout
     * @namespace Le namespace du layout
     */
    LMD.Layout = {};
};

if(typeof LMD.Layout.Header == "undefined" || !LMD.Layout.Header){
    /**
     * Le namespace du header
     * @namespace Le namespace du header
     */
    LMD.Layout.Header = {};
};


/**
 * Classe qui gÃ¨re la pop-up d'invitation Ã  visiter un site mobile
 * @class Mobile
 */
LMD.Layout.Header.Mobile = Class.extend(
{
   /**
    * @scope LMD.Layout.Header.Mobile
    */
   
   /**
    * Sur un device apple
    * @param {boolean}
    */
   appleDevice : false,
   
   /**
    * Constructeur
    * @param {string} mobileBaseUrl Url de base mobile
    */
   init : function(mobileBaseUrl)
   {
      var userAgent = navigator.userAgent;
      
      if(typeof mobileBaseUrl == "undefined" || !mobileBaseUrl){ mobileBaseUrl = 'http://www.tenharleystreet.co.uk/10hs_mobile/'; }
   
      var mobileUrl = mobileBaseUrl + document.location.pathname;
      var contentHtml1 = "Visit our mobile version on ";
      var contentHtml2 = ' <a href="'+mobileUrl+'">here</a>';
   
      // Liste des supports mobiles
      var devices = new Array(
                     "Android",
                     "Blackberry",
                     "Blazer",
                     "Handspring",
                     "iPhone",
                     "iPod",
                     "iPad",
                     "Kyocera",
                     "LG",
                     "Motorola",
                     "Nokia",
                     "Palm",
                     "PlayStation Portable",
                     "Samsung",
                     "Smartphone",
                     "SonyEricsson",
                     "Symbian",
                     "WAP",
                     "Windows CE"
                   );
      
      var phoneHtml;
   
      for(i=0,il=devices.length; i<il; i++)
      {
         if(userAgent.indexOf(devices[i]) != -1)
         {
            switch(devices[i])
            {
               case "iPhone":
                  phoneHtml = "Iphone";
               break;
               case "iPod":
                  phoneHtml = "iPod Touch";
               break;
               case "Android":
                  phoneHtml = "Android";
               break;
               case "iPad":
               break;
               default:
                  document.location = mobileUrl;
               break;
            }
            
            if(phoneHtml)
            {
               $("#annonce_site_mobile").html(contentHtml1 + phoneHtml + contentHtml2).show();
            }
            
            //Device apple
            if(devices[i] == "iPhone" || devices[i] == "iPad" || devices[i] == "iPod")
            {
               this.appleDevice = true;
               this.switchSrcSvg('#header_logo img#logo_une');
               $('body').addClass('apple_mobile');
            }
         }
      }
   },
   
   /**
    * Passage de l'image en SVG
    * @param {string} selector SÃ©lecteur jQuery
    */
   switchSrcSvg : function(selector)
   {
      if($(selector).length)
      {
         var prevSrc = $(selector).attr("src");
         prevSrc = prevSrc.substr(0, prevSrc.length - 3);
         var srcSvg = prevSrc + 'svg';
         
         $(selector).attr("src", srcSvg);
      }
   },
   
   /**
    * Passage de l'image en SVG pour les background
    * @param {string} selector SÃ©lecteur jQuery
    */
   switchBgSvg : function(selector)
   {
      if($(selector).length)
      {
         var prevSrc = $(selector).css("background-image");
         prevSrc = prevSrc.substr(0, prevSrc.length - 5);
         var srcSvg = prevSrc + 'svg");';
         console.log(srcSvg);
         $(selector).css("background-image", srcSvg);
      }
   }
});/* js/lmd/conf/layout/colright.js */
/**
 * Configuration de la colonne de droite
 * @author berge
 */

if(typeof LMD.Conf == "undefined" || !LMD.Conf){
   /**
    * Le namespace de la config
    * @namespace Le namespace de la config
    */
   LMD.Conf = {};
};

if(typeof LMD.Conf.Layout == "undefined" || !LMD.Conf.Layout){
   /**
    * Le namespace de la config du layout
    * @namespace Le namespace de la config du layout
    */
   LMD.Conf.Layout = {};
};

if(typeof LMD.Conf.Layout.ColRight == "undefined" || !LMD.Conf.Layout.ColRight){
   /**
    * Le namespace de la config de la colonne de droite
    * @namespace Le namespace de la config de la colonne de droite
    */
   LMD.Conf.Layout.ColRight = {};
};

/**
 * Mappage des types de blocs
 * @public
 * @static
 * @type array
 */
LMD.Conf.Layout.ColRight.typeBlocIdToName = [ null, 'pub', 'editorial', 'EA', 'marketing' ];

/**
 * Ordre d'affichage des blocs
 * @public
 * @static
 * @type object
 */
LMD.Conf.Layout.ColRight.typeBlocByTagUrlFriendly = {
      'sport' : [1, 2, 1, 2, 2, 2, 2, 4, 1, 4, 4, 1],
      'idees' : [1, 2, 1, 2, 3, 2, 4, 3, 2, 1, 2, 4, 1],
      'voyage' : [1, 2, 1, 3, 4, 2, 4, 4, 1, 2, 4, 4, 1],
      '*' : [1, 2, 1, 3, 4, 3, 2, 1, 4, 2, 2, 1]
   };

/**
 * Mappage des tags
 * @public
 * @static
 * @type object
 */
LMD.Conf.Layout.ColRight.tagTypeLibelleToId = {
   'niveau_0' : 5,
   'format' : 4,
   'categorie' : 2,
   'evenement' : 1,
   'topic' : 3
};

/**
 * Timeout pour le chargement des blocs en remote
 * @public
 * @static
 * @type int
 */
LMD.Conf.Layout.ColRight.remoteTimeout = 5000;

/**
 * Ajustement du lazyload en pixel
 * a 0 le lazyload est basÃ© sur la vision de l'utilisateur
 * on anticipe de 300 pixels sa vision
 * @public
 * @static
 * @type int
 */
LMD.Conf.Layout.ColRight.adjustLazyLoad = 300;
