// JavaScript Document
$(document).ready(function(){
	
	//EXPANDABLE ELEMENTS
	$('.expandable .title').click(function(){
		$(this).parent().prevAll('.expandable').children('.container').slideUp(200);
		$(this).parent().nextAll('.expandable').children('.container').slideUp(200);
		$(this).nextAll('.container').slideToggle(200);	
	});
	$('.expandable .close').click(function(){
		$(this).parent().slideUp(200);	
	});
	
	//LABELED ELEMENTS
	$('.labeled').each(function() {
		var default_value = this.value;
		$(this).focus(function() {
			if(this.value == default_value){
			this.value = '';
			$(this).addClass('filled');
			}
		});
		$(this).blur(function() {
			if(this.value == ''){
			this.value = default_value;
			$(this).removeClass('filled');
			}
		});
	});
});
