﻿
$(function() {
    $("[navIndex]").each(function() {
        var idx = $(this).attr("navIndex");
        $("#siteBranding ul li").eq(idx).children("a").addClass("selected");

        if (idx == "3") {
            $(".colTwo ol li:first").hide();
        }
    });

    $('[href="suggestedSectors.html"]').click(function() {
        window.open(this.href, 'suggsectors', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=600,left = 100,top = 100');
        return false;
    });

    $("[id*=OutsideInvestmentDDL]").change(function() {
        var val = $(this).val();
        var li = $(this).parent().next("li");

        if (val == "No" || val == "") {
            li.find("textarea").val("n/a");
            li.hide();
            li.find("textarea").focus();
        } else {
            li.find("textarea").val("");
            li.show();
            li.find("textarea").focus();
        }
    });

    $(".inputDate").datePicker({ startDate: '01/01/1990', endDate: new Date().asString() });
    $(".inputDate").bind("click", function() {
        $(this).next(".dp-choose-date").click();
    });
});

