// JavaScript Document
jQuery(document).ready(function(){
	
	$('.footer-col-list li:last-child').addClass('last-child');
	$('.posts-list li:last-child').css('border','none');
	$('.songs li:last-child').css('border','none');
	$('.latest-news ul li:last-child').css('border','none');
	
	
	// highlights page navigation code	
	var highlightSlider = function()
					{
						$('#highlighted-pages').cycle({
							fx: 'fade',
							pause: 'true',
							speed: '3000',
							autostop: false,
							pager: '#highlights-nav'
						});
					}
	
	setTimeout(highlightSlider,1000);
	
	//this function attached focus and blur events with input elements
	var addFocusAndBlur = function($input, $val){
		
		$input.focus(function(){
			if (this.value == $val) {this.value = '';}
		});
		
		$input.blur(function(){
			if (this.value == '') {this.value = $val;}
		});
	}

	// example code to attach the events
	addFocusAndBlur(jQuery('#s'),'search this site');
	addFocusAndBlur(jQuery('.email-bar'),'E-mail address');
	addFocusAndBlur(jQuery('.message-box'),'Message');	
});
