
$(document).ready(function() {
	initFrmRent();
	observeParkinglotDescSEO();
	observeFormRequestSent();
});

function initFrmRent() {

	if ($('#frmRent')) {

		if ($('.frmRentType')) {
			$('.frmRentType').change(function() {
				selType();
			});
			selType();
        }
	}
}

function selType() {

	if ($('.frmRentType:checked').attr('id') == 'selPrivate') {
		$('.private').css('display', 'block');
		$('.company').css('display', 'none');
		selSingleTotalPrice();
	}
	else if ($('.frmRentType:checked').attr('id') == 'selCompany') {
		$('.company').css('display', 'block');
		$('.private').css('display', 'none');
		formCalcPriceTotal();
	}

}


function observeFormRequestSent() {

	if ($('#apcoaParkingThankYouForSendingRequest').length > 0) {
		$('.SINGLE_VIEW_LEFT, .SINGLE_VIEW_RIGHT').remove();
	}
}


function observeParkinglotDescSEO() {

	if ($('.SINGLE_VIEW_DESC').length > 0) {
		$('.SINGLE_VIEW_GOOGLE_MAP').after($('.SINGLE_VIEW_DESC'));
		$('.SINGLE_VIEW_DESC').css('display', 'block');
	}
}
