$(document).ready(function () {
    $('#mod22 a[href$="/Breakfast-with-Santa.aspx"]').parent().replaceWith('<li class="first"><a href="/Breakfast-with-Santa.aspx">Breakfast with Santa</a></li>\n<li><a href="/fitness-challenge.aspx">Fitness Challenge</a></li>');
    $('#mod22 a[href$="/Zoobilation.aspx"]').parent().replaceWith('<li><a href="/night-at-the-zoo.aspx">Night at the Zoo</a></li><li><a href="/Zoobilation.aspx">Zoobilation</a></li>');
    var nav = window.location.pathname;
    if (nav) {
        $('.eventsNavigationItem li a[href$="' + nav + '"] ').css({ color: "yellow" });

        $('.eventsNavigationItem li a[href$="' + nav.substring(1, nav.length) + '"] ').css({ color: "yellow" });
        if (nav.indexOf("docent-event") != -1 || nav.indexOf("brew") != -1 || nav.indexOf("brrrew") != -1) {

            if (nav.indexOf("docent-event") != -1)
                $('.eventsNavigationItem li a[href$="/docent-events.aspx"] ').css({ color: "yellow" });

            if (nav.indexOf("ZooBrew") != -1)
                $('ul.eventsNavigationItem li ul li a[href$="/ZooBrew.aspx"] ').css({ textDecoration: "underline" });

            var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');

            $('ul.eventsNavigationItem li a[href$="' + nav + '"] ').css({ color: "yellow" });
            $('ul.eventsNavigationItem li a[href$="' + nav.substring(1, nav.length) + '"] ').not(':gt(0)').css({ color: "yellow" });
            $('ul.eventsNavigationItem li ul li a[href$="' + nav + '"] ').css({ color: "#251F7E", textDecoration: "underline" });
            $('ul.eventsNavigationItem li ul li a[href$="' + nav.substring(1, nav.length) + "?" + hashes[0] + '"] ').css({ color: "#251F7E", textDecoration: "underline" });
            $('ul.eventsNavigationItem li ul li a[href$="' + nav + '"] ').parent().parent().parent().find("a").not(':gt(0)').css({ color: "yellow" });
            $('ul.eventsNavigationItem li ul li ul li a[href$="' + nav + "?" + hashes[0] + '"] ').css({ textDecoration: "underline" });
            $('ul.eventsNavigationItem li ul li ul li a[href$="' + nav + "?" + hashes[0] + '"] ').parent().parent().parent().find("a").not(':gt(0)').css({ textDecoration: "underline" });
            $('ul.eventsNavigationItem li a#birthdayParties').click(function () {
                $('ul.eventsNavigationItem li ul#subParty').css('display', 'block');
            });
        }
    }

});


