$(document).ready(function(){
    
    $('#event-calendar .event-inactive').click(function(){
        $(this).removeClass('event-inactive').addClass('event-active');
        $('.event-active .event-info-long').show();
        
        //ugly hack for gray bg to extend full div height
        $('.event-active .calendar-event-time').height($('.event-active').height());
        
        event.stopPropagation();
        
    });
    
    $('a.close').click(function(event){
        event.stopPropagation();
        $(this).parent().parent().parent().parent().removeClass('event-active').addClass('event-inactive');
        $(this).parent().parent().hide();
        
        //ugly hack for gray bg to extend full div height
        $('.event-inactive .calendar-event-time').height($('.event-inactive').height());
    });
    
});
