﻿/// <reference path="jquery-1.4.1.min-vsdoc.js" />
/// <reference path="jquery.corner.js" />
$(document).ready(function() {
    if($.browser.msie == null) { //The corner plug-in doesn't seem to like IE...
        $("#menu ul li a").corner("round");
    }
    
    UpdateSelectedMenuButton();
});

function UpdateSelectedMenuButton() {
    var pathName = String(window.location.pathname);
    var match = false;
    
    $("#menu ul li a").each(function() {
        if(pathName.indexOf($(this).text()) > -1) {
            $(this).css("background","#E8E8E8");
            
            match = true;
        }
    });
    
    if(match == false) {
        $("#menuItemHome").css("background","#E8E8E8");
    }
}