$(document).ready(function(){
	checkSiteMenu();
	var moodular = $('#header-images ul').moodular({
		auto: false,
		api: true
	});
	
	$('#button-images-next').click(function(){
		hideNaviPages();
		moodular.next(); return false;
	});
	
	$('#button-images-prev').click(function(){
		hideNaviPages();
		moodular.prev(); return false;
	});
	
	$('a[rel="lightbox"]').lightBox({
		imageLoading:			'/images/lightbox-ico-loading.gif',		// (string) Path and the name of the loading icon
		imageBtnPrev:			'/images/lightbox-btn-prev.gif',			// (string) Path and the name of the prev button image
		imageBtnNext:			'/images/lightbox-btn-next.gif',			// (string) Path and the name of the next button image
		imageBtnClose:			'/images/lightbox-btn-close.gif',		// (string) Path and the name of the close btn
		imageBlank:				'/images/lightbox-blank.gif',
		txtImage:				'Bild',	// (string) Specify text "Image"
		txtOf:					'von',		// (string) Specify text "of"
		overlayBgColor: '#ffffff'
	});
	
/*	$('#sidenotes-action-tabs-contact').click(function(){
		$('#sidenotes-action-tabs-booking').removeClass('active');
		$(this).addClass('active');
		$('#sidenotes-action-content-booking').removeClass('active');
		$('#sidenotes-action-content-contact').addClass('active');
		return false;
	});
	
	$('#sidenotes-action-tabs-booking').click(function(){
		$('#sidenotes-action-tabs-contact').removeClass('active');
		$(this).addClass('active');
		$('#sidenotes-action-content-contact').removeClass('active');
		$('#sidenotes-action-content-booking').addClass('active');
		return false;
	}),*/
	
	$('#menuwrapper').mouseover(function(){
		showNaviPages();
	})
})


function checkSiteMenu() {
	var siteMenu = $('#navi-pages ul');
	var siteContent = siteMenu.html();
	if (siteContent == null) {
		$('#navi-pages').css('left', "0px");
	}
}

function hideNaviPages() {
	var iShowMax = "0px";
	if ($('#navi-pages').css('left') != iShowMax) {
		$('#navi-pages').animate({
			left: iShowMax
		}, 500);
	}
}

function showNaviPages() {
	var sContent = $('#navi-pages').html();
	sContent = jQuery.trim(sContent);
	if (sContent != '') {
		var iShowMax = "262px";
		if ($('#navi-pages').css('left') != iShowMax) {
			$('#navi-pages').animate({
				left: iShowMax
			}, 500);
		}
	}
}
