//---------------------------------------------------------------------------------
$(document).ready(function(){//----------------------------------------------------
//---------------------------------------------------------------------------------
//---------------------------------------------------------------------------------

//---------------------------------------------------------------------------------
});//------------------------------------------------------------------------------
//---------------------------------------------------------------------------------

//---------------------------------------------------------------------------------
// наведение мышки на страну в левой колонке
function mouseOverCountry(country_id)
{
	$('#popup_country_' + country_id).prev('a').css('color', '#fff');
	if ($('#popup_country_' + country_id + ' ul > li').length)
	{
		if (navigator.appName == 'Microsoft Internet Explorer')
		{
			if (parseInt(getClientWidth()) > 980)
				minus_left = (parseInt(getClientWidth()) - 980) / 2;
			else
				minus_left = 0;
			var popup_top = parseInt(getElementPosition($('#popup_country_' + country_id).prev('a').get(0)).top) + 5 - 120;
			var popup_left = parseInt(getElementPosition($('#popup_country_' + country_id).prev('a').get(0)).left) + 140 - minus_left;
		}
		else
		{
			var popup_top = parseInt(getElementPosition($('#popup_country_' + country_id).prev('a').get(0)).top) + 5;
			var popup_left = parseInt(getElementPosition($('#popup_country_' + country_id).prev('a').get(0)).left) + 140;
		}
		
		$('#popup_country_' + country_id).css('top', popup_top + 'px').css('left', popup_left + 'px').show();
	}
}
//---------------------------------------------------------------------------------
// увод мышки со страны в левой колонке
function mouseOutCountry(country_id)
{
	if (!$('#popup_country_' + country_id).prev('a').hasClass('sel'))
		$('#popup_country_' + country_id).prev('a').css('color', '#330');
	$('#popup_country_' + country_id).hide();
}
//---------------------------------------------------------------------------------
// клик мышки на городе в списке отелей
function clickHotelsCity(city_id)
{
	$('#hotels_city_' + city_id).toggle();
	$('#hotels_city_' + city_id).prev('h3').children('a').toggleClass('open');
}
//---------------------------------------------------------------------------------
// клик мыши на "читать далее" или "свенуть" в отзывах
function commentCountryClick(comment_id)
{
	$('#country_comment_' + comment_id).prev('span').toggleClass('hide');
	$('#country_comment_' + comment_id).html($('#country_comment_' + comment_id).html() == '(свернуть)' ? '...&nbsp;читать далее&nbsp;...' : '(свернуть)');
}
