jQuery(document).ready(function() {
  var modules = ['md-block'];
  var header = ['h3','h2','h1'];
  GantryBuildSpans(modules, header);
 });
InputsExclusion.push('.content_vote','#md-popup','#md-popuplogin','#vmMainPage','#community-wrap')window.addEvent("domready", function() {
  new ScrollModules('md-content-top', {duration: 600, transition: Fx.Transitions.Expo.easeInOut, autoplay: 0, delay: 5000});
new ScrollModules('md-content-bottom', {duration: 600, transition: Fx.Transitions.Expo.easeInOut, autoplay: 0, delay: 5000});
 });window.addEvent("domready", function(){ new SmoothScroll(); });            jQuery(document).ready(function() {
             window.fusionmenu = new Fusion('ul.menutop', {
                  pill: 0,
                  effect: 'slide and fade',
                  opacity:  1,
                  hideDelay:  500,
                  centered:  0,
                  tweakInitial: {'x': -10, 'y': -9},
                  tweakSubsequent: {'x':  1, 'y':  -6},
                  tweakSizes: {'width': 20, 'height': 20},
                  menuFx: {duration:  300, transition: Fx.Transitions.Circ.easeOut},
                  pillFx: {duration:  400, transition: Fx.Transitions.Back.easeOut}
              });
          });
        

      jQuery(document).ready(function() {
          var string_html = base64_decode(String('PGRpdiBjbGFzcz0idHdlZXRhbmRsaWtlIj48ZGl2IGNsYXNzPSJsZWZ0IiBzdHlsZT0id2lkdGg6NzBweDsiPjxnOnBsdXNvbmUgc2l6ZT0ibWVkaXVtIj48L2c6cGx1c29uZT48L2Rpdj48ZGl2IGNsYXNzPSJsZWZ0Ij48aWZyYW1lIGFsbG93dHJhbnNwYXJlbmN5PSJ0cnVlIiBmcmFtZWJvcmRlcj0iMCIgc2Nyb2xsaW5nPSJubyIgY2xhc3M9InR3aXR0ZXItc2hhcmUtYnV0dG9uIHR3aXR0ZXItY291bnQtaG9yaXpvbnRhbCIgc3JjPSJodHRwOi8vcGxhdGZvcm0wLnR3aXR0ZXIuY29tL3dpZGdldHMvdHdlZXRfYnV0dG9uLmh0bWw/Y291bnQ9aG9yaXpvbnRhbCZhbXA7bGFuZz1lbiZhbXA7dGV4dD1UZWFtIE1lcm1pbGxvZCBUcmlhdGhsb24mYW1wO3VybD1odHRwOi8vd3d3LnRtdC10cmlhdGhsb24uY29tIiBzdHlsZT0id2lkdGg6IDkwcHg7IGhlaWdodDogMjBweDsgIiB0aXRsZT0iVHdpdHRlciBGb3IgV2Vic2l0ZXM6IFR3ZWV0IEJ1dHRvbiI+PC9pZnJhbWU+PHNjcmlwdCB0eXBlPSJ0ZXh0L2phdmFzY3JpcHQiIHNyYz0iaHR0cDovL3BsYXRmb3JtLnR3aXR0ZXIuY29tL3dpZGdldHMuanMiPjwvc2NyaXB0PjwvZGl2PjxkaXYgY2xhc3M9ImxlZnQiPjxpZnJhbWUgc3JjPSJodHRwOi8vd3d3LmZhY2Vib29rLmNvbS9wbHVnaW5zL2xpa2UucGhwP2hyZWY9aHR0cDovL3d3dy50bXQtdHJpYXRobG9uLmNvbSZhbXA7c2VuZD1mYWxzZSZhbXA7bGF5b3V0PWJ1dHRvbl9jb3VudCZhbXA7c2hvd19mYWNlcz1mYWxzZSZhbXA7YWN0aW9uPWxpa2UmYW1wO2NvbG9yc2NoZW1lPWxpZ2h0JmFtcDt3aWR0aD0xNjAiIHNjcm9sbGluZz0ibm8iIGZyYW1lYm9yZGVyPSIwIiBzdHlsZT0iYm9yZGVyOm5vbmU7IG92ZXJmbG93OmhpZGRlbjsgd2lkdGg6MTYwcHg7aGVpZ2h0OjI1cHg7IiBhbGxvd3RyYW5zcGFyZW5jeT0idHJ1ZSI+PC9pZnJhbWU+PC9kaXY+PGRpdiBjbGFzcz0iY2xlYXIiPjwvZGl2PjwvZGl2Pg=='));
          jQuery('#web4sharemodule').html(string_html);
      });
  
  jQuery(document).ready(function () {
      jQuery('#slideshowHoldergallery').jqFancyTransitions({
          effect: 'wave',
          width: 670,
          height: 235,
          strips: 10,
          delay: 3000,
          stripDelay: 50,
          titleOpacity: '0.5',
          titleSpeed: '1000',
          position: 'curtain',
          direction:'random',
          navigation: 0,
          links: 0        });
  });

  // get the pop type
  var pop_typesd_slidehtml = 'fade_in';
  // get the depop type
  var depop_typesd_slidehtml = 'slide_down';
  // get the animation stype
  var animation_stylesd_slidehtml = 'linear';
  // store the number of slides
  var slide_numbersd_slidehtml = 2;
  // initialize the first slide to be shown
  var slide_idsd_slidehtml = 0;
  var previous_slidesd_slidehtml = -1;
  jQuery ("#sd_slidehtml").css('list-style-type', 'none');
  // Initialize the height of the box
  jQuery ("#sd_slidehtml").css('height', '75');
  jQuery ("#sd_slidehtml > div").css('height', '75');
  jQuery ("#sd_slidehtml").css('width', '660');
  jQuery ("#sd_slidehtml > div").css('width', '660');
  // sets the position as absolute to avoid display trouble
  jQuery ("#sd_slidehtml > div").css('position', 'absolute');
  // initialize
        
  switch (pop_typesd_slidehtml){
      case 'fade_in':
          jQuery("#sd_slidehtml > div")
          .hide()
          .css('margin-top', '0')
          .css('margin-left', '0')
          .css('z-index', '2000');
          break;
      case 'slide_up':
          jQuery("#sd_slidehtml > div")
          .show()
          .css('margin-top', '+75px')
          .css('margin-left', '0')
          .css('z-index', '2000');
          break;
      case 'slide_down':
          jQuery("#sd_slidehtml > div")
          .show()
          .css('margin-top', '-75px')
          .css('margin-left', '0')
          .css('z-index', '2000');
          break;
      case 'slide_left':
          jQuery("#sd_slidehtml > div")
          .show()
          .css('margin-top', '0')
          .css('margin-left', '660px')
          .css('z-index', '2000');
          break;
      case 'slide_right':
          jQuery("#sd_slidehtml > div")
          .show()
          .css('margin-top', '0')
          .css('margin-left', '-660px')
          .css('z-index', '2000');
          break;
      }
  // hides all the slides
  //    jQuery ("#sd_slidehtml > div" ).hide();
  // calls the finction to display the first slide at loading
  sma_slidehtmlsd_slidehtml();
  // calls the display function after 'slide_duration' ms in a loop
  jQuery.doTimeout('sma_slidehtmlsd_slidehtml',4000,function(){
      sma_slidehtmlsd_slidehtml();
      //   alert(slide_idsd_slidehtml + '\n/\n' + slide_numbersd_slidehtml);
      return true;
  });
 
  // Stops the animation on mouse over
    
 
 
      /**
       * sma_slidehtml
       */
      function sma_slidehtmlsd_slidehtml(){
    
          if (slide_idsd_slidehtml >= slide_numbersd_slidehtml){
              slide_idsd_slidehtml = 0;
          }
        
          switch (pop_typesd_slidehtml){
              case 'fade_in':
                  jQuery(jQuery("#sd_slidehtml > div").get(slide_idsd_slidehtml))
                  .hide()
                  .css('margin-top', '0')
                  .css('margin-left', '0')
                  .css('z-index', '2001');
                  jQuery(jQuery("#sd_slidehtml > div").get(slide_idsd_slidehtml))
                  .removeClass('hidden').addClass('displayed');
                  jQuery(jQuery("#sd_slidehtml > div").get(slide_idsd_slidehtml))
                  .stop(true, true).fadeIn(2000,
                  animation_stylesd_slidehtml, null);
                  break;
              case 'slide_up':
                  jQuery(jQuery("#sd_slidehtml > div").get(slide_idsd_slidehtml))
                  .show()
                  .css('margin-top', '+75px')
                  .css('margin-left', '0')
                  .css('z-index', '2001');
                  jQuery(jQuery("#sd_slidehtml > div").get(slide_idsd_slidehtml))
                  .removeClass('hidden').addClass('displayed');
                  jQuery(jQuery("#sd_slidehtml > div").get(slide_idsd_slidehtml)).stop(true, true)
                  .animate({
                      'margin-top': '-=75'
                  }, 2000,
                  animation_stylesd_slidehtml, null);
                  break;
              case 'slide_down':
                  jQuery(jQuery("#sd_slidehtml > div").get(slide_idsd_slidehtml))
                  .show()
                  .css('margin-top', '-75px')
                  .css('margin-left', '0')
                  .css('z-index', '2001');
                  jQuery(jQuery("#sd_slidehtml > div").get(slide_idsd_slidehtml))
                  .removeClass('hidden').addClass('displayed');
                  jQuery(jQuery("#sd_slidehtml > div").get(slide_idsd_slidehtml)).stop(true, true)
                  .animate({
                      'margin-top': '+=75'
                  }, 2000,
                  animation_stylesd_slidehtml, null);
                  break;
              case 'slide_left':
                  jQuery(jQuery("#sd_slidehtml > div").get(slide_idsd_slidehtml))
                  .show()
                  .css('margin-top', '0')
                  .css('margin-left', '660px')
                  .css('z-index', '2001');
                  jQuery(jQuery("#sd_slidehtml > div").get(slide_idsd_slidehtml))
                  .removeClass('hidden').addClass('displayed');
                  jQuery(jQuery("#sd_slidehtml > div").get(slide_idsd_slidehtml)).stop(true, true)
                  .animate({
                      'margin-left': '-=660'
                  }, 2000,
                  animation_stylesd_slidehtml, null);
                  break;
              case 'slide_right':
                  jQuery(jQuery("#sd_slidehtml > div").get(slide_idsd_slidehtml))
                  .show()
                  .css('margin-top', '0')
                  .css('margin-left', '-660px')
                  .css('z-index', '2001');
                  jQuery(jQuery("#sd_slidehtml > div").get(slide_idsd_slidehtml))
                  .removeClass('hidden').addClass('displayed');
                  jQuery(jQuery("#sd_slidehtml > div").get(slide_idsd_slidehtml)).stop(true, true)
                  .animate({
                      'margin-left': '+=660'
                  }, 2000,
                  animation_stylesd_slidehtml, null);
                  break;
              }
              if(previous_slidesd_slidehtml!= -1){
                  switch (depop_typesd_slidehtml){
                      case 'fade_out':
                          jQuery(jQuery ("#sd_slidehtml > div").get(previous_slidesd_slidehtml))
                          .css('z-index', '2000')
                          .removeClass('displayed').addClass('hidden');
                          jQuery(jQuery ("#sd_slidehtml > div").get(previous_slidesd_slidehtml))
                          .stop(true, true).fadeOut(2000,
                          animation_stylesd_slidehtml, null);
                          break;
                    
                      case 'slide_up':
                          jQuery(jQuery("#sd_slidehtml > div").get(previous_slidesd_slidehtml))
                          .css('z-index', '2000')
                          .removeClass('hidden').addClass('displayed');
                          jQuery(jQuery("#sd_slidehtml > div").get(previous_slidesd_slidehtml))
                          .animate({
                              'margin-top': '-=75'
                          }, 2000,
                          animation_stylesd_slidehtml, null);
                          break;
                    
                      case 'slide_down':
                          jQuery(jQuery("#sd_slidehtml > div").get(previous_slidesd_slidehtml))
                          .css('z-index', '2000')
                          .removeClass('hidden').addClass('displayed');
                          jQuery(jQuery("#sd_slidehtml > div").get(previous_slidesd_slidehtml))
                          .animate({
                              'margin-top': '+=75'
                          }, 2000,
                          animation_stylesd_slidehtml, null);
                          break;
                    
                      case 'slide_left':
                          jQuery(jQuery("#sd_slidehtml > div").get(previous_slidesd_slidehtml))
                          .css('z-index', '2000')
                          .removeClass('hidden').addClass('displayed');
                          jQuery(jQuery("#sd_slidehtml > div").get(previous_slidesd_slidehtml))
                          .animate({
                              'margin-left': '-=660'
                          }, 2000,
                          animation_stylesd_slidehtml, null);
                          break;
                    
                      case 'slide_right':
                          jQuery(jQuery("#sd_slidehtml > div").get(previous_slidesd_slidehtml))
                          .css('z-index', '2000')
                          .removeClass('hidden').addClass('displayed');
                          jQuery(jQuery("#sd_slidehtml > div").get(previous_slidesd_slidehtml))
                          .animate({
                              'margin-left': '+=660'
                          }, 2000,
                          animation_stylesd_slidehtml, null);
                          break;
                      }
                  }
                  previous_slidesd_slidehtml = slide_idsd_slidehtml;
                  slide_idsd_slidehtml++;
              }

  jQuery(document).ready(function() {
      jQuery('.sexy-bookmarks a.external').attr("target", "_blank");
      var sexyBaseHeight=jQuery('.sexy-bookmarks').height();
      var sexyFullHeight=jQuery('.sexy-bookmarks ul.socials').height();
      if (sexyFullHeight>sexyBaseHeight) {
          jQuery('.sexy-bookmarks-expand').hover(
          function() {
              jQuery(this).animate({
                  height: sexyFullHeight+'px'
              }, {duration: 400, queue: false});
          },
          function() {
              jQuery(this).animate({
                  height: sexyBaseHeight+'px'
              }, {duration: 400, queue: false});
          }
      );
      }
      if (jQuery('.sexy-bookmarks-center')) {
          var sexyFullWidth=jQuery('.sexy-bookmarks').width();
          var sexyBookmarkWidth=jQuery('.sexy-bookmarks:first ul.socials li').width();
          var sexyBookmarkCount=jQuery('.sexy-bookmarks:first ul.socials li').length;
          var numPerRow=Math.floor(sexyFullWidth/sexyBookmarkWidth);
          var sexyRowWidth=Math.min(numPerRow, sexyBookmarkCount)*sexyBookmarkWidth;
          var sexyLeftMargin=(sexyFullWidth-sexyRowWidth)/2;
          jQuery('.sexy-bookmarks-center').css('margin-left', sexyLeftMargin+'px');
      }
  });

    
      function googleTranslateElementInit() {
          new google.translate.TranslateElement({ pageLanguage: 'fr' },'google_translate_element');
          jQuery('#google_translate_element select').change(function(){
              jQuery('.Jtips').unbind('onmouseover');
              jQuery('.Jtips').unbind('onmouseout');
              jQuery('.Jtips').unbind('mouseover');
              jQuery('.Jtips').unbind('mouseout');
          });
      }
    
      document.write('<' + 'script src="' + 'http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit' + '"' +' type="text/javascript"><' + '/script>');
  
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-22194719-29']);
_gaq.push(['_trackPageview']);
(function() {
  var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
