$(function () {

	//navigation dropdown menu
	$('#navigation ul li:has(ul)').hover(
		function () {
			var nav_H = $(this).find('ul').outerHeight() + 40;
			$('#navigation').height(nav_H);
			$(this).find('ul').show();
		},
		function () {
			$(this).find('ul').hide();
			$('#navigation').height(33);
		}
	);


	//index bottom nav
	$('.bot-nav').each(function () {
		if ($(this).outerHeight() > 30) {
			$(this).css('bottom', (-$(this).outerHeight() + 30) + 'px');
		}
	});

	$('.bot-nav:first').animate({ bottom: 0 }, 500, "swing", function () {
		$(this).animate({ bottom: (-$(this).outerHeight() + 30) + 'px' }, 500, "swing");
	});

	//local-nav full height
	$('#local-nav').height($('.content-wrap').height() - 80);

	//local-nav level one
	$('#roomlist').click(function () {
		if ($('#local-nav ul.slide').is(':hidden')) {
			$('#local-nav ul.slide').slideDown('slow');
			return false;
		}
		else {
			$('#local-nav ul.slide').slideUp('slow');
			return false;
		}
	});

	$('#meeting3 tr td:last-child').addClass('remark');

	//sitemap level one
	var cssObj = {
		'font-size': '15px',
		'font-weight': 'bold'
	}
	$('#sitemap ul li ul li:first-child').css(cssObj).find('a').css('background', 'none');

	//quick booking
	var b = $('#booking').click(function () { $('#bookform').toggle(); });
	$('#bookform').datepicker({
		onSelect: function (dateText, inst) {
			window.open('http://wrs.lhoteldechine.com/wep4wrs/web_cth/hotel/showProductRoomList2.action?where=1&brandCod=03&hotelCod=19&select_year=' + inst.selectedYear + '&select_month=' + (inst.selectedMonth + 1) + '&select_day=' + inst.selectedDay);
			b.click();
		},
		changeMonth: !0, changeYear: !0, minDate: 'new Date().getFullYear()', maxDate: '+1Y', dateFormat: 'yy/mm/dd'
	});

});
