jquery ui datepicker and tooltip problem

jquery ui datepicker and tooltip problem

Hi,

Im trying to make jquery ui datepicker (show as calendar) working with ui tooltip. Everything is working fine, tooltip is showing until I change the month in calendar. Then tooltip stop to work. I dont know how to solve this problem and I will appreciate any help. Below is my code (I was using this script).
Thanks!
  1. $(function() {


    var specialDays = {
     
    '2011': {
       
    '3': {
         
    '10': {tooltip: "Some event", className: "holiday"}
       
    },
       
    '4': {
         
    '15': {tooltip: "Some another event", className: "holiday"}
       
    }
     
    }
    };

    $

    ('#datepicker').datepicker({beforeShowDay: function(date) {
     
    var d = date.getDate(),
        m
    = date.getMonth()+1,
        y
    = date.getFullYear();

     

    if (specialDays[y] && specialDays[y][m] && specialDays[y][m][d]) {
       
    var s = specialDays[y][m][d];
       
    return [true, s.className, s.tooltip]; // selectable
     
    }
     
    return [false,'']; // non-selectable
    }});


    /* tooltip*/
    $
    (".ui-datepicker-calendar tbody").tooltip();

    });