jQuery(document).ready(function() {
  adjustPusher()
  $(window).resize(adjustPusher)
})

// setup the image rotation
jQuery(window).load(function(){
  jQuery(".banner div").nivoSlider({
    effect:"fade",
    slices:1,
    animSpeed:800,
    pauseTime:6000,
    captionOpacity:1,
    directionNav:false,
    controlNav:false,
    keyboardNav:false,
    pauseOnHover:false
  })
  
  adjustPusher()
})

// 
function adjustPusher() {
  var pusher        = $("#pusher"),
      canvas_height = $("body").height() - pusher.height(),
      pusher_height = $(window).height() - canvas_height - ($('html').hasClass('ie') ? 3 : 6)
  if (pusher_height < 0) pusher_height = 0
  pusher.height(pusher_height)
}
