$(document).ready(function() {
	$('.more-button a').click(function() {
		var more = $(this).parent().parent().find('ul.more-values:eq(0)');
		if(more.is(':hidden')) {
			more.slideDown(100);
			$(this).attr({ 'innerHTML': 'less' });
			// this.innerHTML = 'less'; // works just as well...
		}
		else {
			more.slideUp(100);
			$(this).attr({ 'innerHTML': 'more' });
			// this.innerHTML = 'more'; // works just as well...
		}
		return false;
	});
	
	$('.open-button a').click(function() {
		var parent = $(this).parent();
		var all = parent.parent().find('div.all-values:eq(0)');
		if(all.is(':hidden')) {
			all.slideDown(100);
			parent.css('background', 'url(/images/arrow-open.gif) no-repeat 0 4px');
		}
		else {
			all.slideUp(100);
			parent.css('background', 'url(/images/arrow-closed.gif) no-repeat 0 4px');
		}
		return false;
	});
	
	
	$('.text-box')
		.focus(function(){
			if ($(this).attr('value') == $(this).attr('title')) {
				$(this).attr('value', '');
				$(this).toggleClass('text-box-blur');
			}
		})
		.blur(function(){
			if ($(this).attr('value') == '') {
				$(this).attr('value', $(this).attr('title'))
				$(this).toggleClass('text-box-blur');
			}
		});
	
});