﻿// JScript File
$(document).ready(function()
{
    $(".Answer").hide();
    $("#frameHelper").attr("src", "FAQHelper.aspx");
    $(".QuestionList").parents(".SpanBox").css("margin-bottom", "-7px");
    $("#Middle .SpanBox:first").children().css("padding-top", "25px");
    $("#Middle .SpanBox:last").children().css("padding-bottom", "25px");
    $("#Middle .subTitle").css("margin-top", "-28px");
    if($(".SpanBox").next("#Middle img").css("display") == "block")
    {
        $(".SpanBox").next("#Middle img").css("margin-top", "10px");
        $(".Answer").show();
        $("#Menu_Content ul li ul li ul").show();
    }
    $(".QuestionList .Question").click(function()
    {
        if($(this).next().css("display") != "block")
        {
            $("#frameHelper").attr("src", "/FAQHelper.aspx?val=" + $(this).text() + "&group=" + $("#Middle h1").text());
            $(".Answer").slideUp(250);
            $(".QuestionList .Question").css("font-weight", "normal");
            var currentClicked = $(this);
            $(this).next().slideToggle(250, function()
            {
                if($(currentClicked).next().css("display") == "block")
                {
                    $(currentClicked).css("font-weight", "bold");
                }else
                {
                    $(currentClicked).css("font-weight", "normal");
                }
            });
        }else
        {
            $(".Answer").slideUp(250);
            $(".QuestionList .Question").css("font-weight", "normal");
            $("#frameHelper").attr("src", "FAQHelper.aspx");
        }
        
    });
});

