﻿// JScript File
// voor het openhouden van het menu

$(document).ready(function() {

//  sUrl = "" + window.location;
//  sUrl = sUrl.toLowerCase();

  aIds = $('#ids').val().split(",")
  
  for (var i in aIds) {
    $("#m" + aIds[i]).show();
  }
  if(document.all)
  {
    FixFooter();
  }
  
//  $('#dsMenu li').each(function(){

//    // Controleer of de categorie in een van de LI's voorkomt.
//    if (this.getElementsByTagName("a")[0] != null) {
//        //alert (this.getElementsByTagName("a")[0].innerHTML.toLowerCase());
//        //console.log(this.getElementsByTagName("a")[0].getAttribute('title') + ' UNDJETZT ' +  sUrl);
//      if (sUrl.indexOf(this.getElementsByTagName("a")[0].getAttribute('title')) != -1) {
//        // Klap deze UL open, die gematched is.
//        
//        
//        // Vervolgens dienen alle parents geopend te worden, die te maken hebben met de gematchte LI.
//        var oCurrentNode = this.parentNode;
//        
//        while(oCurrentNode.id != 'dsMenu') {
//          if (oCurrentNode.tagName == 'UL') {
//            $(oCurrentNode).show("fast");
//          }
//          oCurrentNode = oCurrentNode.parentNode;
//        }
//        console.log(this.getElementsByTagName("a")[0].getAttribute('title') + ' en ' + sUrl);
//        $(this.getElementsByTagName("ul")[0]).show("fast");
//      }
//    }
//  });
  
  $("#shopcartMenu").click(function(){
   location.href = '/winkelwagen.aspx';
  });

  $('#dsMenu a').hover(function() {
    $(this).addClass('hover');
  }, function() {
    $(this).removeClass('hover');
  });
  
});



