﻿
$(document).ready(function(){

    $(".InfoDiv").hover(
          function (e) {

              $(this).data("mouseenter", true)

              if (!$(this).data("FsTitle")) {

                  var $this = $(this);

                  $.ajax({
                      type: "POST",
                      url: "/Modules/UitslagenEnStanden/Front/Programma/ProgrammaControl.asmx/VerkrijgTooltipHtml",
                      data: "{Wid:'" + $($this).attr("Wid") + "'}",
                      contentType: "application/json; charset=utf-8",
                      dataType: "json",
                      success: function (msg) {
                          if (msg.d != null && msg.d.length > 0 && $($this).data("mouseenter") === true) {
                              $($this).attr("title", msg.d);
                              $($this).FsTooltip();
                              $.fn.FsTooltip.mouseover(e, $this);
                          }
                      }

                  })

              }

          },
          function () {
              $(this).data("mouseenter", false)
          }
        );


//        $(".InfoDiv").live({ mouseenter: function () {
//            alert(true)
//        }, mouseleave: function () {
//            alert(false)
//        }})

})
