(function($) {
    $.fn.InitActiveStates = function() {
	    // Ordinarily, best practices indicate detecting supported (or unsupported)
	    // features, not specific browsers.  However, there is no simple way to check
	    // for CSS pseudoclass support, so we fall back to the old-fashioned method.
	    if ($.browser.msie && $.browser.version.substr(0,1)<7) {
	        
	        // Reproduce functionality for navigation-type buttons
		    $("div.navigation a").mousedown(function() {
		        $(this).css("background-position", "0 0");
		      })
		      .mouseup(function() {
		        $(this).css("background-position", "0 -34px");
		      })
		      .mouseover(function() {
		        $(this).css("background-position", "0 -34px");
		      })
		      .mouseout(function() {
		        $(this).css("background-position", "0 -68px");
		    });
		    
		    // Reproduce functionality for small-rectangle type buttons
		    $("div.small-rectangle a").mousedown(function() {
		        $(this).css("background-position", "0 0");
		      })
		      .mouseup(function() {
		        $(this).css("background-position", "0 -23px");
		      })
		      .mouseover(function() {
		        $(this).css("background-position", "0 -23px");
		      })
		      .mouseout(function() {
		        $(this).css("background-position", "0 -46px");
		    });
		    
		    // Reproduce functionality for large-rectangle type buttons
		    $("div.large-rectangle a").mousedown(function() {
		        $(this).css("background-position", "0 0");
		      })
		      .mouseup(function() {
		        $(this).css("background-position", "0 -26px");
		      })
		      .mouseover(function() {
		        $(this).css("background-position", "0 -26px");
		      })
		      .mouseout(function() {
		        $(this).css("background-position", "0 -52px");
		    });
	    }
    };

})(jQuery);
