<!--//--><![CDATA[//><!--

var highlightMenu = true;
var textResizing = true;

$(document).ready(function(){
    // <li> Hover for IE6 and below
	$("#nav li").hover(function() {
	    $(this).addClass("hover");
	}, function(){
	    $(this).removeClass("hover");
	});
	
	// For each link in the menu
	$("#nav a").each(function(){
        // Add active class to current page link in the menu
        if (highlightMenu) {
            if (location.href.indexOf(this.href) != -1) {       
                $(this).parent().addClass("active");
            }
        }
        
        // Expand lists when the user tabs through menu items
        $(this).focus(function() {
            $(this).parents('li').addClass('hover');
        });
        // Collapse lists again when the link loses focus
        $(this).blur(function() {
            $(this).parents('#nav li').removeClass('hover');
        });
    });
    
    // Text resizing
    if(textResizing){
        changeTextSize(readCookie('style'));
        $('#widgets a').click(function(event){
            event.preventDefault();
            changeTextSize(this.id);
        });
    }
});