//This replaces the long month name with it's abbreviation for display purposes. It will be applied to all Upcoming Events blocks on that page.

$(document).ready(function () {

    if ($('div.ews_ue_event_monthday span.ews_month').length) {
        $("div.ews_ue_event_monthday span.ews_month:contains('January')").html('Jan');
        $("div.ews_ue_event_monthday span.ews_month:contains('February')").html('Feb');
        $("div.ews_ue_event_monthday span.ews_month:contains('March')").html('Mar');
        $("div.ews_ue_event_monthday span.ews_month:contains('April')").html('Apr');
        $("div.ews_ue_event_monthday span.ews_month:contains('May')").html('May');
        $("div.ews_ue_event_monthday span.ews_month:contains('June')").html('Jun');
        $("div.ews_ue_event_monthday span.ews_month:contains('July')").html('Jul');
        $("div.ews_ue_event_monthday span.ews_month:contains('August')").html('Aug');
        $("div.ews_ue_event_monthday span.ews_month:contains('September')").html('Sep');
        $("div.ews_ue_event_monthday span.ews_month:contains('October')").html('Oct');
        $("div.ews_ue_event_monthday span.ews_month:contains('November')").html('Nov');
        $("div.ews_ue_event_monthday span.ews_month:contains('December')").html('Dec');
    }
    $('#ewsmenu_utilities li:first').addClass('first');

    $("ul#ewsmenu_main").superfish({
        pathClass: 'selected'
    });

    $('#ewsmenu_submenu li:has(ul)>a').click(function () {
        $(this).next().toggle('slow');
        return false;
    }).next().hide();


    $('#ewsmenu li:has(ul)>a').click(function () {
        $(this).next().toggle('slow');
        return false;
    }).next().hide();

    //for mini calendar view
    $('.ews_cal_grid_box_normal:has(nobr)').addClass('hasevents');

});
