function defaultValueBox(collection) {
	return collection.each(function(){
		var input = jQuery(this);
		input.val(input.closest('form').find('label[for='+input.attr('id')+']').hide().text().replace(/\s*:\s*$/, '')).addClass('empty').attr('defaultvalue', input.val());
	}).bind('focus blur', function(){
		var input = jQuery(this);
		var defaultValue = input.attr('defaultvalue');
		var value = input.val();
		var isEmpty = input.hasClass('empty');
		if (isEmpty && value == defaultValue) {
			input.removeClass('empty').val('');
		} else if (!isEmpty && !value) {
			input.addClass('empty').val(defaultValue);
		}
	});
}

jQuery(function(){
	defaultValueBox(jQuery('#registration-form').children('input[type=text]'));
});

// function expandSignupBox() {
	// jQuery('#expanded-signup-box').fadeIn(300);
// }

