$(document).ready(function(){

 $('a.colorbox').colorbox({
  opacity: '.5'
 });

 $('#thumbnails li a').click(function(){
  $('#thumbnails li a').removeClass('highlight');
  $(this).addClass('highlight');
  $('#main-slide').attr('src', $(this).attr('href'));
//  console.log($(this).attr('href'));
  var navHeight = $('#content-bottom nav').height();
  var sectionHeight = $('#content-bottom section').height();

  if(navHeight > sectionHeight){
   $('#content-bottom section').css('height',navHeight);
  } else {
   $('#content-bottom nav').css('height',sectionHeight);
  }
  return false;
 });
 $($('#thumbnails li a')[0]).click();


 // The following JS makes the bottom sections equal heights

  $('div.caption li').click(function() {
    $('div.container').toggle();
  });
});

