// Template

$(document).ready(function(){
  
  // bio slideshow

	$(function() {
		$('.bio-slideshow img:first-child').css({"z-index" : "1"},0)
		$('.bio-slideshow img:first-child').animate({opacity: "1"}, 0).animate({opacity: "1"}, 2000).animate({opacity: "0"}, 1000);
	});
	  
  
  //animate bubbles
  $('.bub-tl img').animate({ height: "0" }, 0).animate({ height: "300px" }, 2000).animate({ height: "500px" }, 20000);
  
  setInterval(function() {  $('.bub-tl img').animate({ height: "0" }, 0).animate({ height: "300px" }, 2000).animate({ height: "500px" }, 20000);

  },20000);
  
  $('.bub-tl img').click(function(){
	  $(this).remove();
  });

  // hide all the content panes when the page loads
  $('ul#nav_890261 li.selected a').next().show();
  
  $('.search-results').animate({ height: "hide" }, 0);
  $('.search-results').animate({ height: "show" }, 1000, 'easeOutBounce');
  
  $('.bg-container').animate({ opacity: ".5" }, 0);
  
  setInterval(function() {
  $('.bg-container').animate({ opacity: ".4" }, 5000);
  $('.bg-container').animate({ opacity: "1" }, 5000, 'easeOutBounce');
  }, 100);
  $('.search-results').click(function()
  	{
	$(this).hide();
	});
  
  
  $('ul#nav_890261 li.parent a').click(function() {
    $(this).next().animate( 
	    {'height':'toggle'}, 'slow', 'easeOutBounce'
    );
  });
});
