$(document).ready(function(){
	
// start global search tweaks 
	$("ul#bscrumb input.text").focus(function(){
		var searchValue = $(this).val();
		if (searchValue == "Search the site..."){
			$(this).attr('value', '');
			$(this).css("color","#333333");
		}
	}); // checks the site search box on click and removes the default value.
	
	$("ul#bscrumb input.text").blur(function(){
		var searchValue = $(this).val();
		if (searchValue == ""){
			$(this).attr('value', 'Search the site...');
			$(this).css("color","#c9c9c9");
		}
	}); // checks the site search box when user clicks away and adds the default value back if they left it empty.
// end global search tweaks


// start calendar tweaks
	// these replace the calendar table heading text on the homepage with a short name.
	$("th.day_of_week.Monday").text('mon');
	$("th.day_of_week.Tuesday").text('tue');
	$("th.day_of_week.Wednesday").text('wed');
	$("th.day_of_week.Thursday").text('thu');
	$("th.day_of_week.Friday").text('fri');
	$("th.day_of_week.Saturday").text('sat');
	$("th.day_of_week.Sunday").text('sun');
			
	$('td.day_cell a.kicker').each(function() { 
		$(this).parents('td.day_cell').addClass('has-event');  
	}); // checks each calendar cell to see if it has an event link inside it (kicker - see inception) and if it does adds a class to the parent td
// end calendar tweaks


// start event box homepage fade
	$('ul.event.cycle').cycle({
		fx: 'scrollUp', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		timeout: 8000  // milliseconds between slide transitions (0 to disable auto advance) 
	});
// end event box homepage fade

});
