jQuery(document).ready(function() {
	
	//REMOVE BORDERS FROM LAST NAV LI
	
	jQuery('.nav li:last-child').each(function() {
	
		jQuery(this).css('border-bottom','none');
	
	});
	
	jQuery('#controls .search').click(function() {
	
		jQuery('#controls form input').toggle();
	
	});
	
	//CHAT POST LI STYLING
		
	jQuery('.post.chat .media ul li:odd').css('background-color','#e0dcc4').css('text-align','right');
	jQuery('.post.chat .media ul li:odd .name').css('padding','0 0 0 10px');
	jQuery('.post.chat .media ul li:even .name').css('padding','0 10px 0 0');
	
	//DOCUMENT HEIGHT FOR SHORTER PAGES
	/*
	var docheight = jQuery(window).height();
	var wrapheight = jQuery('#wrapper').height();
	
	if(docheight > wrapheight){ jQuery('#wrapper').height(docheight - 73) };
	*/
	
	//COMMENTFORM
	
	var author = jQuery('#commentform #author').val();
	var email = jQuery('#commentform #email').val();
	var url = jQuery('#commentform #url').val();
	
	if (author == '') { jQuery('#commentform #author').val('Your Name') };
	if (email == '') { jQuery('#commentform #email').val('Your Email') };
	if (url == '') { jQuery('#commentform #url').val('Your URL') };
	
	jQuery('#commentform #author').focus(function() {
	
		var val = jQuery(this).val();
	
		if(val == 'Your Name'){	jQuery(this).val(''); }
	
	});
	
	jQuery('#commentform #author').blur(function() {
	
		var val = jQuery(this).val();
	
		if(val == ''){	jQuery(this).val('Your Name'); }
	
	});
	
	jQuery('#commentform #email').focus(function() {
	
		var val = jQuery(this).val();	
		if(val == 'Your Email'){ jQuery(this).val(''); }
	
	});
	
	jQuery('#commentform #email').blur(function() {
	
		var val = jQuery(this).val();	
		if(val == ''){ jQuery(this).val('Your Email'); }
	
	});
	
	jQuery('#commentform #url').focus(function() {
	
		var val = jQuery(this).val();	
		if(val == 'Your URL'){ jQuery(this).val(''); }
	
	});
	
	jQuery('#commentform #url').blur(function() {
	
		var val = jQuery(this).val();	
		if(val == ''){ jQuery(this).val('Your URL'); }
	
	});
	

});