$(document).ready(function(){
    $('.SchemaTable tr').hover(function() {
        $(this).addClass('Hover');
    }, function() {
        $(this).removeClass('Hover');
    });

    $('.SpecialTable tr').hover(function() {
        $(this).addClass('Hover');
    }, function() {
        $(this).removeClass('Hover');
    });

    $('.OverviewTable tr').hover(function() {
        $(this).addClass('Hover');
    }, function() {
        $(this).removeClass('Hover');
    });

    $('.SearchHolderTable td').hover(function() {
        $(this).addClass('Hover');
    }, function() {
        $(this).removeClass('Hover');
    });
    $('.SearchHolderTable td h3').click(function() {
        document.location.href='Content.aspx';
    });
    $('.SearchHolderTable td h3').hover(function() {
        $(this).css('cursor','pointer')
    }, function() {
        $(this).css('cursor','default')
    });
    
    $('.Spotlight').hover(function() {
        $(this).css('cursor','pointer')
    }, function() {
        $(this).css('cursor','default')
    });
    $('.Spotlight').click(function() {
        if ($(this).attr('link')) {
            var link = $(this).attr('link');
            document.location.href=link;
        } else {
            document.location.href='Dossier.aspx';
        }
    });
        
    $("#TopMenu ul li a").each(function() {
        if (location.pathname.indexOf(this.href) > -1) {
            $(this).addClass("Selected");
        }
    });
    $("#TopMenu ul li .Arrow").each(function() {
        if ($(this).parent().attr("class") != "Current") {
            $(this).hide();
        } else {
            $(this).show();
        }
    });
    $("#TopMenu ul li").hover(function() {
        if ($(this).attr("class") != "Current") {
            $(this).children(".Arrow").show();
            $(this).children("a").addClass("Selected");
        }
    }, function() {
        if ($(this).attr("class") != "Current") {
            $(this).children(".Arrow").hide();
            $(this).children("a").removeClass("Selected");
        }
    });
});
