﻿/// <reference path="jquery.js" />

$(function () {
    $(".topMenu_item").hover(siteMenuItem_mouseOver, siteMenuItem_mouseOut);
    $(".topMenu_item").click(siteMenuItem_click);
});

function siteMenuItem_mouseOver(e) {
    var width = $(e.target).outerWidth();
    var height = $(e.target).height();
    var top = $(e.target).offset().top;
    var left = $(e.target).offset().left;

    $("#topMenu_underscore_parent").width(width + 2);
    $("#topMenu_underscore").css({ "left": (left - 1) + "px", "top": (top + height + 1) + "px" });
    $("#topMenu_underscore").show();

}

function siteMenuItem_mouseOut(e) {
    $("#topMenu_underscore").hide();
}

function siteMenuItem_click(e) {
    window.location = $(e.target).find("a")[0].href;
}

function tech_learnMoreClick(sectioName) {
    var headerText;
    
    if (sectioName == "tech_ccc") {
        headerText = "Clinical Charge Capture";   
    }
    else if (sectioName == "tech_bill") {
        headerText = "Billing Solution";
    }
    else if (sectioName == "tech_sp") {
        headerText = "Automated Self Pay System";
    }

    $("#subDetailHeader").html(headerText);
    $(".content_contentRightBody").hide();
    $("#" + sectioName).fadeIn(500);
}

function svc_learnMoreClick(sectioName) {
    var headerText;

    if (sectioName == "svc_1") {
        headerText = "Operational, Technical and Financial Consulting";
    }
    else if (sectioName == "svc_2") {
        headerText = "Medical Practice Turnaround Initiatives";
    }
    else if (sectioName == "svc_3") {
        headerText = "Comprehensive Management Services";
    }
    else if (sectioName == "svc_4") {
        headerText = "Certified Coding and Auditing";
    }
    else if (sectioName == "svc_5") {
        headerText = "Interim Management Resources";
    }

    $("#subDetailHeader").html(headerText);
    $(".content_contentRightBody").hide();
    $("#" + sectioName).fadeIn(500);
}

function bio_learnMoreClick(sectioName) {
    var headerText;

    if (sectioName == "bio_1") {
        headerText = "Jon Hernandez, President/CEO";
    }
    else if (sectioName == "bio_2") {
        headerText = "David Hirsch, Executive Vice President - Operations";
    }
    else if (sectioName == "bio_3") {
        headerText = "Carlos Escobar, Executive Vice President";
    }
    else if (sectioName == "bio_4") {
        headerText = "Deb Carlson, Vice President - Client Services";
    }
    else if (sectioName == "bio_5") {
        headerText = "Jeremy Roebuck, Vice President – IT";
    }

    $("#subDetailHeader").html(headerText);
    $(".content_contentRightBody").hide();
    $("#" + sectioName).fadeIn(500);
}

function contact_learnMoreClick(sectioName) {
    var headerText;

    if (sectioName == "con_1") {
        headerText = "Aegis Main";
    }
    else if (sectioName == "con_2") {
        headerText = "Aegis Sales";
    }
    else if (sectioName == "con_3") {
        headerText = "Aegis Support";
    }
    else if (sectioName == "con_4") {
        headerText = "Aegis Business Office";
    }

    $("#subDetailHeader").html(headerText);
    $(".content_contentRightBody").hide();
    $("#" + sectioName).fadeIn(500);
}

