jQuery.fn.extend({
  scrollTo : function(speed, easing) {
    return this.each(function() {
      var targetOffset = $(this).offset().top;
      $('html,body').animate({scrollTop: targetOffset}, speed, easing);
    });
  }
});

$(function() {
	if (typeof window.XMLHttpRequest == "undefined") {
		/* test for ie6, and add class to make up for lack of li:hover */
		$("#nav li").hover(
			function() {$(this).addClass("hover");},
			function() {$(this).removeClass("hover");}
		);
	}
	
	/* enhance drop-down menus */
	$("#nav li ul").hide();
	
	$("#nav>li").hover(
		function() {$(this).children("ul").fadeIn("slow");},
		function() {$(this).children("ul").hide();}
	);
	
});