var defaultSearchText = "Type in the name of the agent you have in mind";

$('document').ready(function(){
	$('#next_step').click(function(){
		
		$('.wordbubble').fadeOut("slow");
		$('#search_1').slideUp('slow').ready(function(){
			$('#search_2').slideDown('slow');
		});
	});
	
	$('.province').click(function(){
		$('#city_div').slideDown('slow');
	});
	
	if($(":input[name='term'][type='text']").val() == ""){
		$(":input[name='term'][type='text']").css("color", "#CCCCCC");
		$(":input[name='term'][type='text']").val(defaultSearchText);
	}
	
	$(":input[name='term'][type='text']").focus(function(){
		if($(":input[name='term'][type='text']").val() == defaultSearchText){
			$(":input[name='term'][type='text']").css("color", "#000000");
			$(":input[name='term'][type='text']").val("");
		}
	});
	
	$(":input[name='term'][type='text']").blur(function(){
		if($(":input[name='term'][type='text']").val() == ""){
			$(":input[name='term'][type='text']").css("color", "#CCCCCC");
			$(":input[name='term'][type='text']").val(defaultSearchText);
		}
	});
	
	
	$(":input[name='term'][type='text']").click(function(){
		if($(":input[name='term'][type='text']").val() == defaultSearchText){
			$(":input[name='term'][type='text']").css("color", "#000000");
			$(":input[name='term'][type='text']").val("");
		}
	});
	
	$(":input[name='term'][type='text']").keydown(function(){
		if($(":input[name='term'][type='text']").val() == defaultSearchText){
			$(":input[name='term'][type='text']").css("color", "#000000");
			$(":input[name='term'][type='text']").val("");
		}
	});
});