$.safeDocumentReady.add(function () {
	var doError = function(){
		document.getElementById('you-might-also-like').style.display = "none";
		document.getElementById('mightAlsoCrisisModeTout').style.display = "block";
	}
	if(!showCrisisModeTouts){
		$.ajax({
			type: "GET",
			url: "/controllers/view_you-might-also-like?alias=" + theAttractionAlias,
			success: function(response){
				document.getElementById('you-might-also-like-loading-content').style.display = 'none';
				$("#you-might-also-like-inner").append(response);
			},
			error: doError
		});
	}else{
		doError();
	}
});

/**
 * Pops up a balloon asking the user to first choose a city,
 * and sets the redirectParam var in the page so that clicking
 * a city will go to the given path, with the city filled in.
 */
function requestCityForRedirect(catName, catAlias, regionAlias, path) {
	if (regionAlias != '') {
		return true;
	}
	redirectParam = path;
	displayCityChoiceRequest(catName, catAlias);
	return false;
}
