$(document).ready(function() {
	$('input[@type=text]').focus(function(){
		var currentVal = $(this).val();										// Read initial field value
		$(this).val('');														// Clear initial value

		$(this).blur(function(){
			var getNewVal = $(this).val();										// Read new input value
			if ( getNewVal == '' || getNewVal == ' ' ) {
				$(this).val(currentVal);										// Switch to initial value
			}
		});
	});

	// handle more text on homepage
	if ( $('a.less').length ) { $('a.less').hide(); }
	$('a.more').click(function(){
		$(this).hide().next().slideToggle();
		$(this).next().children('a.less').toggle();
		return false;
	});
	$('a.less').click(function(){
		$(this).hide().parent('div').slideToggle();
		$(this).parent('div').prev().toggle();
		return false;
	});
});
