$(document).ready(function(){
	$('div#icons').hover(
	 function() {
	  $("div#oneliner")
	  .show()
	  .animate({"top": "0px"}, "fast");
	 },
	 function() {
	  //$("div#oneliner").animate({"top": "-=50px"}, "slow");
	  $("div#oneliner")
	  .hide()
	 }
	);
	
	$('div#icons a').hover(
	 function() {
	  //$(this).children("img").attr({ src: $(this).children("img").attr("rel") });
	  $(this).children("img:first").removeClass("on off");
	  $(this).children("img:last").removeClass("on off");
	  $(this).children("img:first").addClass("off");
	  $(this).children("img:last").addClass("on");
	  $("div#oneliner").html($(this).children("span:first").html());
	 },
	 function() {
	  //$(this).children("img").attr({ src: $(this).children("img").attr("src") });
	  $(this).children("img:first").removeClass("on off");
	  $(this).children("img:last").removeClass("on off");
	  $(this).children("img:first").addClass("on");
	  $(this).children("img:last").addClass("off");
	 }
	);

  $('a[href*=#]').click(function() {
	if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
	&& location.hostname == this.hostname) {
	  var $target = $(this.hash);
	  $target = $target.length && $target
	  || $('[name=' + this.hash.slice(1) +']');
	  if ($target.length) {
		var targetOffset = $target.offset().top;
		$('html,body')
		.animate({scrollTop: targetOffset}, 1000);
	   return false;
	  }
	}
  });
});

function controleerLogin() {
  var fouttext = "U bent onderstaande velden vergeten in te vullen:\n\n";
  var isfout = false;

  if (document.getElementById('formLogin').gebruikersnaam.value == "") {
    isfout = true;
	fouttext = fouttext + " - gebruikersnaam\n";
  }
  if (document.getElementById('formLogin').wachtwoord.value == "") {
    isfout = true;
	fouttext = fouttext + " - wachtwoord\n";
  }

  if (isfout == true) {
    alert(fouttext);
	return false;
  }
  else
  {
	document.getElementById('formLogin').submit();
  }
}
