$(document).ready(function(){
	/* clear and restore search fields */
	 $('#search input#search_term').val('Search');
	 $('input#newsletter_submit').wrap('<p id="nls_wrap"></p>');
	 $('#search_term').removeClass('clearClick').addClass('clickClear');
	 $('#newsletter_text').removeClass('clearClick').addClass('clickClear');
	 $('input.clickClear').focus(function() {
	    startText = $(this).val();
	    $(this).val('').addClass('focus');
	 });
	 $('input.clickClear').blur(function() {
	    blurText = $(this).val();
	    if (blurText == '') {
	       $(this).val(startText).removeClass('focus');
	    };
	 });
	
	  
	
	var current = $("#nav li.current").attr("id");      
	// color box launch
	$('#login .thickbox, #comments .thickbox').colorbox({iframe:true,width:400, height:250});
	$('#footer .thickbox').colorbox();
	$('#content #text .slideshow').colorbox({
		slideshow:true,
		photo:true,
		preloading:true,
		slideshowSpeed:5000
		});
	$('.rsvp .thickbox').colorbox({iframe:true,width:450, height:570});
	$('#options .thickbox,.section .thickbox').colorbox({iframe:true,width:500, height:570});  
	//@end
	

$("#campuses").find('li').mouseenter(function(e){
  $("#campuses .overlay:visible").fadeOut("fast",function(){
      $(this).addClass("hidden").parent().removeClass("selected");;
      
  });
  $(this).addClass('selected');
  $(this).find(".overlay").show().removeClass("hidden").mouseleave(function(){
    $(this).fadeOut("fast",function(){
        $(this).addClass("hidden");
    });
    $(this).parent().removeClass("selected");
  });
});	


  $('#campuses .marker').colorbox({href:"http://www.parkcommunitychurch.org/directions.php",iframe:true,width:640,height:700});

if($("#sidebar").outerHeight() > $("#content").outerHeight()){
  var sh = $("#sidebar").outerHeight() + "px";
  $("#content #text").css({'height':sh});
}
});  //@end
