//On resize van window de breedte van de footer opnieuw zetten.
var resizeTimer = null;
$(window).bind('resize', function(){
  if (resizeTimer)
    clearTimeout(resizeTimer);
	resizeTimer = setTimeout(determineWrapperHeight, 0);
  	resizeTimer = setTimeout(determineFooterWidth, 0);
  
});
$(window).bind('load', function(){
  if (resizeTimer)
    clearTimeout(resizeTimer);
	resizeTimer = setTimeout(determineWrapperHeight, 0);
  	resizeTimer = setTimeout(determineFooterWidth, 0);
  
});


function determineWrapperHeight() {
  var height = $(window).height();
  
	if (height > 800 ) { 
		$('#wrapper').css('padding-bottom', '140px');
	
	} else {
		$('#wrapper').css('padding-bottom', '160px');
	}
}

function determineFooterWidth()
{
  var width = $(window).width();
  if ( width <= 1280 ) {
    $('#footer').attr('class', 'footer1280');
  } else if ( width <= 1440 ) {
    $('#footer').attr('class', 'footer1440');
  } else {
    $('#footer').attr('class', 'footer1920');
   } 
  //supersleight.init();
  //alert('footer class: '+$('#footer').attr('class'));
}

