(function($) {
	$(function() {
		$inputs = $('#BusinessParks ul li input:checkbox');
		$inputs.click(function() {
			$('#BusinessParkBuildings ul').load(
				'search/updatebuildings',
				$inputs.serialize()
			);
		});
		$('#Form_PropertySearchForm_Type').change(function() {
			if($(this).val() == "Built-to-suit") {
				$('#MinSquareFootage').hide();
				$('#MaxSquareFootage').hide();
				$('#MaxAcres').show();
				$('#MinAcres').show();
			}
			else {
				$('#MinSquareFootage').show();
				$('#MaxSquareFootage').show();
				$('#MaxAcres').hide();
				$('#MinAcres').hide();			
			}
		});
		$('#Form_PropertySearchForm_Type').change();
		
		/*// ensure that when any checkbox is checked, the "All" checkbox gets unchecked
		$('ul#Form_PropertySearchForm_BusinessParks li input:checkbox:not("#Form_PropertySearchForm_BusinessParks_All")').click(function () {
			if (this.checked) {
				$('#Form_PropertySearchForm_BusinessParks_All').attr('checked',false);
			}
		});
		
		// ensure that when the "All" checkbox is checked, all other checkboxes get unchecked
		$('#Form_PropertySearchForm_BusinessParks_All').click(function() {
			if (this.checked) {
				$('ul#Form_PropertySearchForm_BusinessParks li input:checkbox').attr('checked',false);
				$(this).attr('checked',true);
			}
		});
		
		$('#Form_PropertySearchForm_BusinessParks_All').trigger('click');*/
		
	});
})(jQuery);