jQuery(function($) {
$(document).ready(function() {

//  $('#animation').pan({fps: 30, speed: 2, dir: 'left'});
  $('#clouds').pan({fps: 30, speed: 0.7, dir: 'left', depth: 10});
  $('#background').pan({fps: 30, speed: 2, dir: 'left', depth: 30});
  $('#middleground').pan({fps: 30, speed: 2.5, dir: 'left', depth: 40});
  $('#foreground').pan({fps: 30, speed: 2.6, dir: 'left', depth: 60});
  $('#foreground, #middleground, #clouds').spRelSpeed(8);
  $('#van').spritely({fps:10, no_of_frames:2}).spRandom({top: 73, bottom: 73, left: 20, right: 707});

  var lightbox_options = {fitToScreen: true,
		fileLoadingImage : '/wp-content/themes/jtype/images/lightbox/loading.gif',
		fileBottomNavCloseImage : '/wp-content/themes/jtype/images/lightbox/closelabel.gif'};
  $(".entry a[href$='.jpg'], .wp-caption a[href$='.jpg'], .entry a[href$='.gif'], .wp-caption a[href$='.gif'], .gallery-icon a").lightbox(lightbox_options);

});

window.onload = function(){
};


function level_height(containers, inner) {
  containers = $(containers);
  containers.each(function(){
    var max_height = 0;
    $(inner, this).each(function(){
      if ($(this).height() > max_height) max_height = $(this).height();
    }).each(function(){
      $(this).height(max_height);
    });
  });
}
});
