if (document.location.hostname == "mundi01") {
	var basepath = "http://mundi01/viagora/";
} else {
	var basepath = "http://www.viagora.com.br/";
}


function passadorFoto(){
	
	featuredcontentglider.init({
		gliderid: "canadaprovinces", //ID of main glider container
		contentclass: "glidecontent", //Shared CSS class name of each glider content
		togglerid: "p-select", //ID of toggler container
		remotecontent: "", //Get gliding contents from external file on server? "filename" or "" to disable
		selected: 0, //Default selected content index (0=1st)
		persiststate: false, //Remember last content shown within browser session (true/false)?
		speed: 500, //Glide animation duration (in milliseconds)
		direction: "rightleft", //set direction of glide: "updown", "downup", "leftright", or "rightleft"
		autorotate: true, //Auto rotate contents (true/false)?
		autorotateconfig: [3000, 2] //if auto rotate enabled, set [milliseconds_btw_rotations, cycles_before_stopping]
	})
}

function getCity(){	
	jQuery("#cidade").html("<option value=\"0\">carregando...</option>");
	jQuery.get(basepath+"ajax/getCity.asp",		  
		{ufcod:jQuery("#estado").val()},		  
		function(resultado){
			$("#cidade").removeAttr("disabled");
			$("#cidade").html(resultado);
		}
	);
}

function alternarBusca(tipo){
	
	tipo = parseInt(tipo);
	
	if (tipo == 1) {
		
		jQuery('#cse-search-box').attr('action', basepath+'pesquisa.asp');
		
	} else {
		
		jQuery('#cse-search-box').attr('action', 'http://www.google.com.br/cse');
		jQuery('#cse-search-box').attr('target', '_blank');
		
	}
}
