
jQuery(document).ready(function() {

  if(habillage) bodyclick();  
  
  // bugfix addthis window et habillage
  jQuery("#addthis_items a.addthis_button_email").click(function() {
    setTimeout("bodyclick()",500);
  });

});

// habillage
function bodyclick() {
  if (!document.getElementsByTagName) return;
  var bool = true;
  var page = jQuery("#page");
  page.css('cursor','default');
  page.click(function() { bool = false; });
  
  var footer = jQuery("#overall_footer");
  footer.css('cursor','default');
  footer.click(function() { bool = false; });
  
  var addthis = jQuery("#at20mc");
  addthis.css('cursor','default');
  addthis.click(function() { bool = false; return false; });
  
  var fenetre = jQuery(document.body);
  fenetre.css('cursor','pointer');
  fenetre.click(function() { if(bool == true) window.open(habillage); });
  fenetre.mouseover(function() { bool = true; });
}
