$(document).ready(function(){
	/* parish finder */
	var parishFinderStrings = {
		parish_finder_address: "Home Address",
		parish_finder_city: "City & State -or- Zip code"
	};
	function nameReplace(str) {
		return str.split('-').join('_');
	}
	$("#parish-finder-address, #parish-finder-city").focus(function() {
		$(this).addClass('parish-finder-focus');
		if ($(this).val() == parishFinderStrings[nameReplace($(this).attr('id'))]) {
			$(this).removeClass('parish-finder-blur');
			$(this).val('');
		}
	});
	$("#parish-finder-address, #parish-finder-city").blur(function() {
		$(this).removeClass('parish-finder-focus');
		if ($(this).val() == parishFinderStrings[nameReplace($(this).attr('id'))] || ($(this).val() == '')) {
			$(this).addClass('parish-finder-blur');
			$(this).val(parishFinderStrings[nameReplace($(this).attr('id'))]);
		}
	});
	$("#parish-finder-form").submit(function() {
		if ($("#parish-finder-address").val() == '' || $("#parish-finder-address").val() == parishFinderStrings['parish_finder_address']) {
			return false;
		}
	});
	
});
