$(document).ready(function() {

	var windowHeight;
	if (self.innerHeight) {
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) {
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) {
		windowHeight = document.body.clientHeight;
	}
	window.status = "Height: "+windowHeight+"px"

	if(windowHeight<700) {
		$("#header").css({ paddingBottom: 15 });
	}

	var nImg  = 1;
	var nImgs = 0;

//	var lang = $("#lang");
//	var foot = $("#foot");
//	lang.css({
//		position: "absolute"
//	});
//	foot.css({
//		position: "absolute"
//	});

	$("#images .img").each(function (iter, obj) {
		nImgs++;
		if(nImgs==1) $(obj).css("display", "block");
	});

	$("#btnPrev").click(function () {
		if(--nImg<1    ) nImg = nImgs;
		$("#images .img").css("display", "none");
		$("#img"+nImg).css("display", "block");
		return false;
	});

	$("#btnNext").click(function () {
		if(++nImg>nImgs) nImg = 1;
		$("#images .img").css("display", "none");
		$("#img"+nImg).css("display", "block");
		return false;
	});

	if(nImgs==0) $("#btns").css("display", "none");

});
