$(document).ready(function() {
	var budgetnot = true;
	
	$(".hl-input").focus(function() {
		$('label[for=' + this.id + ']').addClass("active");
	});
	
	$(".hl-input").blur(function() {
		if (this.id == 'client-name') {
			var name = $("#" + this.id).val();
			if (name.length > 0) {
				$(".gen-client-name").text(name);
			}
		}
		$('label[for=' + this.id + ']').removeClass("active");
	});
	
	if ($("#client-name").attr('value').length > 0) {
		$(".gen-client-name").text($("#client-name").attr('value'));
	}
	
	$("#client-budgetnot").change(function() {
		var value = $("#client-budgetnot option:selected").val();
		if (value == 'Yes') {
			if (budgetnot == false) {
				$("#budget-select").slideDown("slow");
				budgetnot = true;
			}
		} else if (value == 'No') {
			if (budgetnot == true) {
				$("#budget-select").slideUp("slow");
				budgetnot = false;
			}
		}
	});
});

function switchBackground(color) {
	$('body').css({'background-color' : color});
}
