$(document).ready(function() {
	$('a.close').click(function() {
		 $("#featured").fadeOut("slow");
		 return false;
	  });
	  
	  $('a.close-comment').click(function() {
		 $('#read-comments').toggle("slow");
		 return false;
	  });
	  
	 	var jump=function(e)
			{
			       //prevent the "normal" behaviour which would be a "hard" jump
			       e.preventDefault();
			       //Get the target
			       var target = $(this).attr("href");
			       //perform animated scrolling
			       $('html,body').animate(
			       {
			               //get top-position of target-element and set it as scroll target
			               scrollTop: $(target).offset().top
			       //scrolldelay: 2 seconds
			       },2000,function()
			       {
			               //attach the hash (#jumptarget) to the pageurl
			               location.hash = target;
			       });
			
			}

	$(function() {
	$('a[href=#]').bind("click", jump);
	return false;
	});	
	
	$('nav#main li').hover(
		function () {
			//show its submenu
			$('ul', this).fadeIn(1000);
			$('ul', this).parent().addClass("dropdown");
		}, 
		function () {
			//hide its submenu
			$('ul', this).fadeOut(400);		
			$('ul', this).parent().removeClass("dropdown");	
		}
	);



});


