﻿function topmenu() {
    $(" #topmenu ul ").css({ display: "none" }); // Opera Fix
    $(" #topmenu li").hover(function() {
        $(this).find('ul:first').css({ visibility: "visible", display: "none" }).show();
    }, function() {
        $(this).find('ul:first').css({ visibility: "hidden" });
    });
}
$(document).ready(function() {
    topmenu();
    $(".showEmbed").click(function() {
        if ($("#divEmbed").is(":hidden")) {
            var EmbedContent = $(".EmbedContent").val();
            var iframeHeight = $(".frameContent").height() + 30;
            EmbedContent = EmbedContent.replace("auto", iframeHeight + "px");
            $(".EmbedContent").val(EmbedContent);
            $("#divEmbed").slideDown("fast");
        }
        else $("#divEmbed").slideUp("fast");
    });

    $("#closeEmbed").click(function() {
        $("#divEmbed").slideUp("fast");
    });

    if ($("#MarginSheets").val() == 'true') {
        $("td:contains('Jun')").html('<a name="jan-june" id="jan-june-target" style="text-decoration:none;color:#fff;font-weight:bold;">Jun</a>');
        $("td:contains('Dec')").html('<a name="jul–dec" id="jul–dec-target" style="text-decoration:none;color:#fff;font-weight:bold;">Dec</a>');
    }
    $('.jan-june').click(function() {
        $.scrollTo('#jan-june-target', 10);
    });
    $('.jul–dec').click(function() {
        $.scrollTo('#jul–dec-target', 10);
    });
    if ($('#release')) {
        startTime();
    }
    if ($('#btnPlashPageSumit')) {
        $('#btnPlashPageSumit').click(function() {
            splashPageInfuSionSubmit();
        });
    }
});