$(function() {
	// Defaults
	if($('input[name="type"]').val() == 'zakelijk') {
		$('tr.company_name').show();
		$('tbody.from').hide();
		$('tbody.to').hide();
		$('tbody.from_bedrooms').hide();
		$('tr.misc_info_descr_default').hide();
		$('tr.misc_info_descr_zakelijk').show();
		// modal 2 is now empty, open modal 3
		//$('a.modal-openform2').removeClass('modal-openform2').addClass('modal-openform3 changed');
	} else {
		$('tr.company_name').hide();
		$('tbody.from').show();
		$('tbody.to').show();
		$('tbody.from_bedrooms').show();
		$('tr.misc_info_descr_default').show();
		$('tr.misc_info_descr_zakelijk').hide();
		// modal 2 is now not empty anymore
		//$('a.modal-openform3.changed').removeClass('modal-openform3 changed').addClass('modal-openform2');
	}
	
	if($('input[name="type"]').val() == 'internationaal') {
		$('tr.to_country').show();
	} else {
		$('tr.to_country').hide();
	}
	
	// Change 'type'
	$('input[name="type"]').live('change', function() {
		if($(this).val() == 'zakelijk') {
			$('tr.company_name').show();
			$('tbody.from').hide();
			$('tbody.to').hide();
			$('tbody.from_bedrooms').hide();
			$('tr.misc_info_descr_default').hide();
			$('tr.misc_info_descr_zakelijk').show();
			// modal 2 is now empty, open modal 3
			//$('a.modal-openform2').removeClass('modal-openform2').addClass('modal-openform3 changed');
		} else {
			$('tr.company_name').hide();
			$('tbody.from').show();
			$('tbody.to').show();
			$('tbody.from_bedrooms').show();
			$('tr.misc_info_descr_default').show();
			$('tr.misc_info_descr_zakelijk').hide();
			// modal 2 is now not empty anymore
			//$('a.modal-openform3.changed').removeClass('modal-openform3 changed').addClass('modal-openform2');
		}
		if($(this).val() == 'internationaal') {
			$('tr.to_country').show();
		} else {
			$('tr.to_country').hide();
		}
	});

});
