function ExplorerFix() 
	{ 
	for (a in document.links) document.links[a].onfocus = document.links[a].blur; 
	}

var tnavtimer;

function tnavover (id)
	{
	img = eval('document.tnavimg'+id);
	img.className='activeimage';
	/*
	img = eval('shadow1'+id);
	img.className='opacity25';
	img = eval('shadow2'+id);
	img.className='opacity25';
	*/
	overh('tnavimg'+id,'t'+id);
	}

function tnavout (id)
	{
	img = eval('document.tnavimg'+id);
	img.className='disabledimage';
	/*
	img = eval('shadow1'+id);
	img.className='opacity0';
	img = eval('shadow2'+id);
	img.className='opacity0';
	*/
	outh('tnavimg'+id,'t'+id);
	}

function pnavover (id)
	{
	img = eval('document.tnavimg'+id);
	img.className='activeimage';
	/* obsolete
	img = eval('shadow1'+id);
	img.className='opacity25';
	img = eval('shadow2'+id);
	img.className='opacity25';
	*/
	}

function pnavout (id)
	{
	img = eval('document.tnavimg'+id);
	img.className='disabledimage';
	/* obsolete
	img = eval('shadow1'+id);
	img.className='opacity0';
	img = eval('shadow2'+id);
	img.className='opacity0';
	*/
	
	}

function bgon(id, sub)
	{
	if (id != 'navsub0')
		{
		//whichlayer = eval(id);
		//whichlayer.show();
		//document.all[id].style.backgroundImage = 'url(img/bg_knopselected.gif)';
		}
	}

function bgoff(id)
	{
		if (id != 'navsub0')
		{
		//whichlayer = eval(id);
		//whichlayer.hide();
		//document.all[id].style.backgroundImage = '';
		}
	}

function knopon(id)
	{
	document.all[id].style.backgroundImage = 'url(img/bg_knopselected.gif)';
	}

function knopoff(id)
	{
	document.all[id].style.backgroundImage = '';
	}

function over(id, filename)
	{
	img = eval('document.'+id);
	if (filename != '')
		id = filename;
	img.src = 'img/'+id+'_over.gif';
	}

function out(id, filename)
	{
	img = eval('document.'+id);
	if (filename != '')
		id = filename;
	img.src = 'img/'+id+'.gif';
	}

function overh(id, filename)
	{
	img = eval('document.'+id);
	if (filename != '')
		id = filename;
	img.src = 'img/thumbs_home/'+id+'_over.jpg';
	}

function outh(id, filename)
	{
	img = eval('document.'+id);
	if (filename != '')
		id = filename;
	img.src = 'img/thumbs_home/'+id+'.jpg';
	}

function navOver(id)
	{
	document.all['navlink'+id].style.color = '#09857F';
	}

function navOut(id)
	{
	document.all['navlink'+id].style.color = '#414042';
	}

function go(url)
	{
	document.location = url;
	}


function popUp(url,width,height,name) 
	{
	OpenWin=window.open(url, name, "width="+width+",height="+height+",toolbar=no,focus=yes,menubar=no,location=no,scrollbars=yes,resizable=no,status");
	OpenWin.focus();
	}


function vergroting(id, w, h, base)
	{
	if (document.all)
		{
		
		var theimg = document.images["productimage"]; 
		
		sX = window.screenLeft;
		sY = window.screenTop;
		
		var l = theimg.offsetLeft + sX - 115; 
		var t = theimg.offsetTop + sY - 192; 
		}
	else
		{
		var l = 200;
		var t = 200;
		}
	vergrotingwin=window.open(base+'producten?s=vergroting&id='+id, 'VergrotingBalance', "width="+w+",top="+t+",left="+l+",height="+h+",toolbar=no,focus=yes,menubar=no,location=no,scrollbars=no,resizable=no");
	}

/**
* IMAGE TOOLTIP
*/
function imagePreview(){	
	/* CONFIG */
		
		xOffset = 10;
		yOffset = 30;
		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result
		
	/* END CONFIG */

		
	$("a.preview").unbind("hover");
	$("a.preview_product").unbind("hover");
	$("a.preview_category").unbind("hover");
	
	$("a.preview").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		$("#galleryimg").css('display','none');
		$(".gallery").append("<div id='boxgallery'><img src='/serieimg/" + this.t +"_271.jpg' /></div>").fadeIn(1000);								 
		$("#boxgallery")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");						
   },
	function(){
		this.title = this.t;
		
		$("#boxgallery").remove();
		//$("#galleryimg").fadeIn(1000);
		$("#galleryimg").css('display','block');
   });	

	$("a.preview_product").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		$("#galleryimg").css('display','none');
		$(".gallery").append("<div id='boxgallery'><img src='/productenimg/" + this.t +"_271.jpg' border='0' /></div>").fadeIn(1000);								 
		$("#boxgallery")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");						
   },
	function(){
		this.title = this.t;
		
		$("#boxgallery").remove();
		//$("#galleryimg").fadeIn(1000);
		$("#galleryimg").css('display','block');
   });	

	$("a.preview_category").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		$("#galleryimg").css('display','none');
		$(".gallery").append("<div id='boxgallery'><img src='/serieimg/" + this.t +"_0_271.jpg' border='0' /></div>").fadeIn(1000);								 
		$("#boxgallery")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");						
   },
	function(){
		this.title = this.t;
		
		$("#boxgallery").remove();
		//$("#galleryimg").fadeIn(1000);
		$("#galleryimg").css('display','block');
   });	
	
	

};

$(document).ready(
		function(){
			$('.gallery').lightBox();
			$('.lightb').lightBox();
		}
		
);
$(document).ready(function() {
	
	imagePreview();
	
});