// $(document).ready(function() {
//   var lightbox_options = {fitToScreen: true,
//    fileLoadingImage : '/wp-content/themes/huffpuff/images/lightbox/loading.gif',
//    fileBottomNavCloseImage : '/wp-content/themes/huffpuff/images/lightbox/closelabel.gif'};
//   $(".entry a[href$='.jpg'], .wp-caption a[href$='.jpg'], .entry a[href$='.gif'], .wp-caption a[href$='.gif']").lightbox(lightbox_options);
// });
// 
// window.onload = function(){
//   $('#right-bar').height($('#footer-right').offset().top - $('#menu').offset().top - $('#menu').height());
//   $('#left-column').height($('#container').height() - $('#footer').height())
//   var containers = $(".make-equal");
//   containers.each(function(){
//     var max_height = 0;
//     $(".hp-post", this).each(function(){
//       if ($(this).height() > max_height) max_height = $(this).height();
//     }).each(function(){
//       $(this).height(max_height);
//     });
//   });
// };
jQuery(function($) {

$(document).ready(function() {
    $("#map").gMap({ markers: [{ latitude: 52.490501,
                                  longitude: -1.90603 }], zoom: 15 });
  $("#sidebar li a.alignright").prepend('<span class="bgl"></span><span class="bgr"></span>');
  $(".template-home .entry").cycle({
    timeout: 8000
  });
});

window.onload = function(){
  level_height("#hp-features", "p");
  var contheight = $('#content').height();
  var sideheight = $('#sidebar').height();
  if ((sideheight + 22) < contheight) {
    $('#sidebar').append('<li class="entry" style="height:'+(contheight-sideheight-22)+'px;margin-top:6px;"></li>');
  }
};

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);
    });
  });
}
});