$(document).ready(function() {

	//'search' in the search field in the header
	if( $('#SearchText').length ) {
		var s = $('#SearchText');
		s.click( function() {
			if( this.value == 'Search' )
				this.value = '';
		});

		s.blur( function() {
			if( this.value == '' )
				this.value = 'Search';
		});
	}

	//animate scrolling news and upcoming courses on homepage
	if( $('#HomePage').length ) {
		$('.upcomingcourses .frame').cycle({
			fx: 'scrollUp',
			pause: 1,
			speed: 1000,
			timeout: 5000,
			fit: 1
		 });	
		
		$('.latestnews .frame').cycle({
			fx: 'scrollUp',
			pause: 1,
			speed: 1000,
			timeout: 5000,
			delay: 2500,
			fit: 1
		 });	
	} //end if we're on the home page


	//give images rounded corners
	if( $('.roundedcorners') ) {
		$('.roundedcorners').corner("cc:#fff keep");
	}


	//animate the multi-image slideshow
	if( $('#ImageFrame') ) {
		$('#ImageFrame').cycle();
	} //end if slideshow

});
