$(document).ready(function() {

$("a.imgZoom").fancybox({
		'zoomOpacity' : true,
		'overlayShow' : true,
		'zoomSpeedIn' : 'fast',
		'zoomSpeedOut' : 'fast',
		'transitionIn': 'elastic',
		'transitionOut': 'elastic'
	});

});

var nn4 = (document.layers) ? true : false;

var ie4 = (document.all) ? true : false;

var dom = (document.createTextNode)? true : false;


function popupWindow(fileUrl, winW, winH, winN, scrollB) {

	var winWidth = (winW)? winW : 740;

	var winHeight = (winH)? winH : 520;

	var winName = (winN)? winN : 'popupWin';

	winWidth = parseInt(winWidth) + 18;
	winHeight = parseInt(winHeight) + 27;

	var scrollBars = (scrollB)? scrollB : 'auto';

	if (nn4 || ie4 || dom) {

		if (screen.width < winWidth + 50) { winWidth = screen.width - 50; scrollbars = 'yes'; }

		if (screen.height < winHeight + 100) { winHeight = screen.height - 100; scrollbars = 'yes'; }

		posX = Math.round((screen.width - winWidth) / 2);

		posY = Math.round((screen.height - winHeight) / 2);

		posCode = (nn4)? "screenX="+posX+",screenY="+posY : "left="+posX+",top="+posY;

	} else {

		posCode = "";

	}

	var popupWin = window.open(fileUrl, winName,"menubar=no,toolbar=no,scrollbars=" + scrollBars + ",status=yes,resizable=yes,width=" + winWidth + ",height=" + winHeight + "," + posCode);

	if (popupWin) popupWin.focus();

}

function toggleParagraph(ptable){
		var obj = document.getElementById('p' + ptable);
		obj.className = obj.className == 'none' ? 'pVisible' : 'none';
	}

function mosMap(punktId, status){
	var punkt = document.getElementById( punktId );

	if(status)
		punkt.className = 'punkt';
	else
		punkt.className = 'none';
}
