$(document).ready(function(){
  $('#no-script').remove();
});

$(document).ready(function(){
  // hide all the content panes when the page loads
  $( '#middle > div' ).hide();
  // uncomment the next line if you'd like the first pane to be visible by default
  // $('#middle > div:first').show();
  $('#middle p').click(function() {
    $(this).next().animate( 
	    {'height':'toggle'}, 'slow', 'easeOutBounce'
    );
  });
});

$ (document).ready(function() {
  $('<input type="button" value="Read More" id="petersonpointshowButton">')
    .insertAfter('#petersonpoint');
  $('#petersonpoint').hide();
  $('#petersonpointshowButton').click(function(){
    $('#petersonpoint').show();
	$('#petersonpointshowButton').fadeOut();
  });
  
  $('<input type="button" value="Read More" id="nationalsshowButton">')
    .insertAfter('#nationals');
  $('#nationals').hide();
  $('#nationalsshowButton').click(function(){
    $('#nationals').show();
	$('#nationalsshowButton').fadeOut();
  });
  
  $('<input type="button" value="Read More" id="cityshowButton">')
    .insertAfter('#city');
  $('#city').hide();
  $('#cityshowButton').click(function(){
    $('#city').show();
	$('#cityshowButton').fadeOut();
  });
  
  $('<input type="button" value="Read More" id="bowlingfamilyshowButton">')
    .insertAfter('#bowlingfamily');
  $('#bowlingfamily').hide();
  $('#bowlingfamilyshowButton').click(function(){
    $('#bowlingfamily').show();
	$('#bowlingfamilyshowButton').fadeOut();
  });
});

$('a.lightbox').click(function(e) {
 // hide scrollbars!
 $('body').css('overflow-y', 'hidden'); 
$('<div id="overlay"></div>')
 .css('top', $(document).scrollTop())
 .css('opacity', '0')
 .animate({'opacity': '0.5'}, 'slow')
 .appendTo('body');
 $('<div id="lightbox"></div>')
 .hide()
 .appendTo('body');
 $('<img />')
 .attr('src', $(this).attr('href'))
 .load(function() {
 positionLightboxImage();
 })
 .click(function() {
 removeLightbox();
 })

 .appendTo('#lightbox');
 return false;
});

function positionLightboxImage() {
 var top = ($(window).height() - $('#lightbox').height()) / 2;
 var left = ($(window).width() - $('#lightbox').width()) / 2;
 $('#lightbox')
 .css({
 'top': top + $(document).scrollTop(),
 'left': left
 })
 .fadeIn();
}

function removeLightbox() {
 $('#overlay, #lightbox')
 .fadeOut('slow', function() {
 $(this).remove();
 $('body').css('overflow-y', 'auto'); // show scrollbars!
 });

}

$(document).ready(function(){
$('a[rel=celeb]').colorbox();

});


