$(document).ready(function() {

if ($('#wrpT .wrpTi .top .gallery table a').length>0){
$('#wrpT .wrpTi .top .gallery table a').lightBox({
    imageLoading: '/template/img/loading.gif',
	imageBtnClose: '/template/img/closelabel.gif',
	imageBtnPrev: '/template/img/prevlabel.gif',
	imageBtnNext: '/template/img/nextlabel.gif',
	containerResizeSpeed: 350,
	txtImage: 'Afbeelding',
	txtOf: 'van'
  });

  $('#wrpT .wrpTi .top .gallery').click(function(){
	//scroll(0,0);								
  });
}

if($("#achtergrond").length>0){
$(function() {
  var $target = $("#achtergrond.bg1");
  var classes = ['bg1', 'bg2', 'bg3', 'bg4', 'bg5'];
  var current = 0;

  setInterval(function() {
    $target.removeClass(classes[current]);
    current = (current+1)%classes.length;
    $target.addClass(classes[current]);
	}, 4000); // 1500 ms loop
});
}

if($("#hidr").length>0){
$("#sub").hide();	

$("#hidr").click(function() {
  $("#sub").fadeToggle("fast", "linear");
});
}


});


