// ###########################  OBJETO DE CONFIGURACION #################################

configForm = {
	productsOffered 		:	'|H|F|HF|',
	defautlProduct			:	'HF',
	selectedProduct			:	'HF',
	autocompleteOrigenMode	:	'airport',
	autocompleteDestinoMode	:	'city',
	missingFieldMessage		:	'Los campos marcados con rojo son requeridos:\n\n',
	defaultflightType		:	'redondo',
	ajaxURL					: 	location.href.split("/")[0]+"//"+location.href.split("/")[2] + '/globogo/hierarchylocationsearch.do',
	myLocation				: 	location.href.split("/")[0]+"//"+location.href.split("/")[2] + '/globogo/common/landing.jsp',
	spinerURL				:	location.href.split("/")[0]+"//"+location.href.split("/")[2] + '/theme/images/common/spinner/loader.swf',
	inputDestinoHiden		:	'destinoHidden',
	inputOrigenHiden		:	'origenHidden',
	HotelChildMaxAge		:	'11',
	HotelInfantMaxAge		:	'1',
	PackageChildMaxAge		:	'11',
	PackageInfantMaxAge		:	'1',
	AirChildMaxAge			:	'11',
	AirInfantMaxAge			: 	'1',
	GoogleAnalyticsAccount	:	'',
	siteTitle				:   'globoGO',
	tipoNavegador			:	'',
	versionNavegador		:	''
};

//-----------------------------------------------------------------------------------------

$(function(){
	configForm.siteTitle= $('#siteTitle').get(0).value;
	document.title = configForm.siteTitle;
	configForm.productsOffered = $('#productTypesOffered').get(0).value;
	configForm.defautlProduct = $('#defaultProductType').get(0).value;
	configForm.selectedProduct = $('#defaultProductType').get(0).value;
	configForm.HotelChildMaxAge= $('#HotelChildMaxAge').get(0).value;
	configForm.HotelInfantMaxAge= $('#HotelInfantMaxAge').get(0).value;
	configForm.PackageChildMaxAge= $('#PackageChildMaxAge').get(0).value;
	configForm.PackageInfantMaxAge= $('#PackageInfantMaxAge').get(0).value;
	configForm.AirChildMaxAge= $('#AirChildMaxAge').get(0).value;
	configForm.AirInfantMaxAge= $('#AirInfantMaxAge').get(0).value;
	configForm.GoogleAnalyticsAccount= $('#GoogleAnalyticsAccount').get(0).value;
	initialize();
});


// ###################	 INICIALIZACION AUTOCOMPLETADO DE LOCALIDADES ###########################

$(function (){
	autocomplete_origen();
	autocomplete_destino();
	calendarios();
});




$.fn.jSuggest.defaults = {
		minchar: 3,
		opacity: 1.0,
		zindex: 20000,
		delay: 0,
		loadingImg: location.href.split("/")[0]+"//"+location.href.split("/")[2] + '/theme/html/site/ctp/images/ajax-loader.gif',
		loadingText: 'Cargando...',
		autoChange: true,
		url: "",
		type: "GET",
		data: ""
	};

//--------------------------------------------------------------------------------------------------

