var animationHome;



$(document).ready( function(){

        var url = document.location.href;
          var startDeel = url.indexOf('index.php');
          url = url.slice(startDeel);

          $('div#menu a').each(function(){

              if($(this).attr("href") == url){
                 $(this).addClass("active");
              }
          });

        if(animationHome == true){
            $('div#logoContainer a').css("position","relative").css("left","-2000px").css("top","0px");
            $('div#topRightImage').css("margin-left","977px");
            $('div#rightImage').css("margin-left","700px");


            $('div#logoContainer a').animate({left:0 }, 1500, "swing", function(){
                $(this).animate({opacity:100 }, 300, "swing", function(){});

                $('div#topRightImage').animate({ marginLeft:465 }, 400, "linear", function(){ } );
                $('div#rightImage').animate({ marginLeft:0 }, 700, "linear", function(){ } );


            } );


        }
        else{

            $('div#topRightImage').css("margin-left","977px");
            $('div#rightImage').css("margin-left","700px");

          $('div#topRightImage').animate({ marginLeft:465 }, 400, "linear", function(){ } );
                $('div#rightImage').animate({ marginLeft:0 }, 700, "linear", function(){

                   // $('div.openklap:first').slideDown("slow", function(){ $(this).removeClass("openklap"); $('div.openklap:first').slideDown("slow");  });



                    //$('div.openklap').each(function(){
                    //    $(this).slideDown("slow", function(){ alert('');  });
                   // });



                 } );
        }


        if ($('a.merk').length > 0){
          $(document).mousemove(function(e){

             var hoeVer = $('div#dbContainer').position().left + 470;
             var leftSpace = e.pageX + 10;
             var topSpace = e.pageY + 10;

             if(leftSpace > hoeVer)
              leftSpace = e.pageX - 400;


             $('div#toolTip').css("top", topSpace);
             $('div#toolTip').css("left", leftSpace);
          });
        }



         //$("a.openlink").click(function(){

         //   $("a.openlink").show();
          //  $(this).hide();

         //   $("div.inhoud span").each( function(){
         //       if( $(this).attr("class") != "rozelijn")
          //          $(this).hide();

          //  } );


          //  $(this).next("span").show();
          //  });



    });

function RequiredNames()
    {

    voornaam = document.form1.voornaam.value;
    achternaam = document.form1.achternaam.value;
    adres = document.form1.adres.value;
    woonplaats = document.form1.woonplaats.value;
    telnummer = document.form1.telnummer.value;
    emailadres = document.form1.emailadres.value;
	opmerking = document.form1.opmerking.value;
    laatste = document.form1.laatste.value;

	if (voornaam == '')
		{
		alert("U bent vergeten uw voornaam in te vullen.");
		return false;
        }
    if (achternaam == '')
		{
		alert("U bent vergeten uw achternaam in te vullen.");
		return false;
    }
    if (adres == '')
		{
		alert("U bent vergeten uw adres in te vullen.");
		return false;
    }
    if (woonplaats == '')
		{
		alert("U bent vergeten uw woonplaats in te vullen.");
		return false;
    }
    if (telnummer == '')
		{
		alert("U bent vergeten uw telefoonnummer in te vullen.");
		return false;
    }
	if (emailadres == '')
		{
		alert("U bent vergeten uw emailadres in te vullen.");
		return false;
		}
   if (opmerking == '')
		{
		alert("U bent vergeten uw vraag in te vullen.");
		return false;
		}
   if (laatste != '')
		{
		return false;
		}
   document.forms.form1.submit();
}


function showToolTip(msg,evt, element){
      if (evt) {
          var url = evt.target;
      }
      else {
          evt = window.event;
          var url = evt.srcElement;
      }
      //xPos = $(element).position().left;
      //yPos = $(element).position().top - 69;

      //xPos = evt.clientX + 10;
     // yPos = evt.clientY;


      //if(xPos > 340){
       // xPos -= 343;
     // }

     var toolTip = document.getElementById("toolTip");
     toolTip.innerHTML = "<p>"+msg+"</p>";



     //toolTip.style.top = parseInt(yPos) + "px";
     //toolTip.style.left = parseInt(xPos) + "px";
     toolTip.style.visibility = "visible";

   }

  function hideToolTip(){
     var toolTip = document.getElementById("toolTip");
     toolTip.style.visibility = "hidden";
  }

