/*
	Whd site jQuery - http://www.whdlaw.com
	
	Copyright (c) 2011 Whyte Hirschboeck Dudek SC
	
	Requirements:
	-  jQuery 1.6 ... available via  http://www.jquery.com
	- CSS included in index.html
*/

$(document).ready(function () {
    ////////////////////////////////////////////////
    //NAV: set current tab to 'selected' class (highlight the tab)
    ////////////////////////////////////////////////
    var fullPath = window.location.pathname.toLowerCase();
    var sPage = fullPath.substring(fullPath.lastIndexOf('/') + 1);
    if (sPage == "") { sPage = "index.aspx"; } // k accounts for IIS default page
    //alert(sPage);
    $('#topNavigation a[href*="' + sPage + '"]').parentsUntil('#topNavigation > ul').addClass('selected');
    ////////////////////////////////////////////////

});


////IE fix for People dropdown in menu (nightmare!)
////////////////////////////////////////////////////////////////
//$(document).ready(function () {
//    $('#topNavigation a').mouseover(function () {
//        $('.ourPeopleDropDown').hide();
//        $(this).parent().find('.ourPeopleDropDown').show();
//    });
//    $('#topNavigation a').mouseout(function () {
//        $(this).parent().find('.ourPeopleDropDown').show();
//        $(this).parent().find('.ourPeopleDropDown').hide();
//    });

//    $('.ourPeopleDropDown').mouseover(function () {
//        $(this).show();
//    });
//    $('.ourPeopleDropDown').mouseout(function (e) {
//        // Do not close if going over to a select element             
//        if (e.target.tagName.toLowerCase() == 'text') $(this).show(); $(this).hide();
//    });

//});  
