// Google Analytics //

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-19800450-1']);
_gaq.push(['_setDomainName', '.l33.fr']);
_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);
})();
                         
// Get the window size //

function getWindowHeight() {
  var windowHeight=0;
  if (typeof(window.innerHeight)=='number') {
    windowHeight=window.innerHeight;
  }
  else {
    if (document.documentElement&&
    document.documentElement.clientHeight) {
      windowHeight = document.documentElement.clientHeight;
    }
    else {
      if (document.body&&document.body.clientHeight) {
        windowHeight=document.body.clientHeight;
      }
    }
  }
  return windowHeight;
}

// Set the Fucking Footer //

function setFooter() {
  if (document.getElementById) {
    var windowHeight=getWindowHeight();
    if (windowHeight>0) {
      var contentHeight=
      document.getElementById('container').offsetHeight;
      var footerElement=document.getElementById('footer');
      var footerHeight=footerElement.offsetHeight;
      if (windowHeight-(contentHeight+footerHeight)>=0) {
        footerElement.style.position='relative';
        footerElement.style.top=
        (windowHeight-(contentHeight+footerHeight))+'px';
      }
      else {
        footerElement.style.position='static';
      }
    }
  }
}

// Back To Top //

$(window).ready(function(){
  $('#backtotop').click(function(e){
    e.preventDefault();
    $('html, body').animate({scrollTop:0}, 'slow');
  });
});

// Expand Div //

$(document).ready(function() {
  $(".toexp").hide();
  $(".expand").click(function() {
    $(this).next(".toexp").slideToggle(260);
  });
});


