$(document).ready(function() {
	// Homepage gallery
	$("#galerie-content").nivoSlider({
		effect: 'sliceDown',
		directionNav: false
	});
	
	

	
	// Unfoldable menu
	$('ul.main-nav li.topmenu:not(.nofold)').each(function() {
		$(this).mouseover(function(e) {
			e.preventDefault();
			var currentLi = $(this);
			var subnav = $('.subnav', this);
			var container = $(this).parent();
			subnav.css('display', 'block');
			// subnav.show();
			// container.css('height', '270px');
			/*
			subnav.show(0, function() {
				container.stop().animate({height: '270px'}, 200);
			});
			*/
			// container.stop().animate({height: '270px'});
		}).mouseleave(function(e){
			e.preventDefault();
			var currentLi = $(this);
			var subnav = $('.subnav', this);
			var container = $(this).parent();
			subnav.css('display', 'none');
			// subnav.hide();
			// container.css('height', '45px');
			/*
			container.stop().animate({height: '45px'}, 200, function() {
				subnav.hide();
			});
			*/
		});
	});
	$('#hotel_carousel').carousel({
		loop: true,
		autoSlide: true,
		autoSlideInterval: 5000,
		nextBtn: null,
		prevBtn: null
	});
	$('#room_main_carousel').carousel({
		loop: true,
		autoSlide: true,
		autoSlideInterval: 5000,
		nextBtn: null,
		prevBtn: null
	});
	$('#room_vertical_carousel').carousel({
		// Configuration goes here
		direction: "vertical",
		pagination: false,
		loop: true,
		autoSlide: true,
		autoSlideInterval: 4000,
		nextBtn: null,
		prevBtn: null
	});
	$('a#develop-rooms').click(function(e) {
		e.preventDefault();
		if ($(this).parent('li').hasClass('developed')) {
			$(this).next('ul').hide().parent('li').removeClass('developed');
		} else {
			$(this).next('ul').show().parent('li').addClass('developed');
		}
	});
	$('a.develop-menus').click(function(e) {
		e.preventDefault();
		if ($(this).parent('li').hasClass('developed')) {
			$(this).next('ul').hide().parent('li').removeClass('developed');
		} else {
			$(this).next('ul').show().parent('li').addClass('developed');
		}
	});
	/*
	projekktor( '#html5Player', {
		playerFlashMP4: 'http://www.sanglier-des-ardennes.be/js/jarisplayer.swf',
		playerFlashMP3: 'http://www.sanglier-des-ardennes.be/js/jarisplayer.swf',
		volume: 0.8,
		width: 960,
		height: 450,
		platformPriority:	['flash', 'native'],
		loop: false
	});
	*/
});


