function clearText(field) {
  if (field.defaultValue == field.value) field.value = '';
  else if (field.value == '') field.value = field.defaultValue;
}
$(function(){
	//$('tbody tr:even').addClass('alt');
	
	$('.item').hover(function(){
		$('.itemDescription', this).animate({bottom:0}, 'fast');
	}, function(){
   		$('.itemDescription', this).animate({bottom:-60}, 'fast');
	});
	
	if($('#homePage').length) {
		$('#slideshow').jshowoff({ speed:5000, animatePause:false });
	} else {
		$('#slideshow').jshowoff({ speed:5000, animatePause:false, links: false });
	}

	// commented out until there is a twitter account to wire this into
  // $(".tweet").tweet({
  //         username: "",
  //         join_text: "auto",
  //         avatar_size: 0,
  //         count: 2,
  //         auto_join_text_default: "",
  //         auto_join_text_ed: "",
  //         auto_join_text_ing: "",
  //         auto_join_text_reply: "",
  //         auto_join_text_url: "",
  //      loading_text: "loading tweets..."
  // });
	
	$('#newsletterTrigger').toggle(function(){
		$('#newsletterBox').css({display:'block'});
	}, function(){
		$('#newsletterBox').css({display:'none'});
	});
	
	VideoJS.setupAllWhenReady();
	
	$('.accordion dd').hide();
	$('.accordion dt').toggle(function(){
		$(this).next('dd').slideDown();
		$('span', this).addClass('expanded');
	}, function(){
		$(this).next('dd').slideUp();
		$('span', this).removeClass('expanded');
	});

});

