var zmax = 0 ;
 
function buildZMax() {
	$('*').each(function() {
		var cur = parseInt($(this).css('zIndex'));
		zmax = cur > zmax ? $(this).css('zIndex') : zmax;
	});
}

function goFancy() {
	buildZMax();
	$('.fancy_wrap').each(function() {
		zmax = zmax + 1 ;
		$(this).css("z-index", zmax);
		$(this).children("div#fancy_overlay").each(function() {
			zmax = zmax + 1 ;
			$(this).css("z-index", zmax);
		});

		zmax = zmax + 1 ;
		$(this).children("div#fancy_outer").each(function() {
			zmax = zmax + 1 ;
			$(this).css("z-index", zmax);
		});
	});
};

$(document).ready(function() {
	$("a.fancy").fancybox({
		'overlayShow'			: false,
		'zoomSpeedIn'			: 600,
		'zoomSpeedOut'		: 500,
		'easingIn'				: 'easeOutBack',
		'easingOut'				: 'easeInBack',
		'autoDimensions'	: true,
		'hideOnContentClick': false,   
		'frameWidth'			: 690,
		'frameHeight'			: 550
	});

	$("a.fancygroup").fancybox({
		'zoomSpeedIn'				: 600,
		'zoomSpeedOut'			: 500,
		'hideOnContentClick': false
	});
	
	$("a.fancypdf").fancybox({
		'overlayShow'			: true,
		'zoomSpeedIn'			: 600,
		'zoomSpeedOut'		: 500,
		
		'autoDimensions'	: false,
		'frameWidth'			: 415,
		'frameHeight'			: 155,
		'hideOnContentClick': false   
	});
	
	goFancy() ;
});

$(function() {
	$('#voorraadTT a').tooltip({
		track: true,
		delay: 0,
		showURL: false,
		showBody: " - ",
		fade: 250
	});
});

$(function() {
	$('#lijst3TT a').tooltip({
		track: true,
		delay: 0,
		showURL: false,
		showBody: " - ",
		fade: 250
	});
});

function checkPr(Ty){
	if(Ty==1) {
		if(document.getElementById('prijsex').checked==true) {
			document.getElementById('prijsinc').checked=false;
		} 
	}
	if(Ty==2) {
		if(document.getElementById('prijsinc').checked==true) {
			document.getElementById('prijsex').checked=false;
		} 
	}
}
