$(document).ready(function(){
	$('.zblyteboxlink').attr({onclick: ''});
	initLytebox();
});

$(document).ready(function(){
	if ($('#contentzone').height()<$('#menuzone').height()) {
				bigger();
	}
});

function bigger() {
	$('#contentzone').height($('#menuzone').height()-1);
};

function openLytebox(title,url) {
  var el=document.createElement('a');
  
  el.title=title
  el.rel="lytebox"
  el.href=url;
  
  myLytebox.start(el);
}

function bpopenwindow(url,name,features){ 
  if (url.match("bimgdirect.asp"))
  {
    url=url.replace(/bimgdirect/,"img").replace(/html/,"jpg");
    openLytebox("Vergroting",url);
    
  }
  else
  {
    window.open(url,name,features);
  }
}

function resizetoright(afb,br,ho) {
 if ((afb.width>br)||(afb.height>ho))
 {
  if (afb.width>afb.height)
  {
    afb.height=(afb.height/afb.width)*ho;
    afb.width=br;
  } else{
    afb.width=(afb.width/afb.height)*br;
    afb.height=ho;  
  }
 }
}

function geellink(id) {
	$('#fotolink'+id).css('background', '#ededed');
}

function witlink(id) {
	$('#fotolink'+id).css('background', '');
}
