$(document).ready(function(){

	$("ul.links > li").hover(
	  function () {
	  	$(this).find("a").addClass('hover');
		$(this).find("ul").show();
	  }, 
	  function () {
	    var t = $(this);
	 	t.removeClass('hover');
	 	setTimeout(function() {
	 		t.find("ul").fadeOut();
	  	}, 400);
	  }
	);

    $('#projects_link').bind('click', function(event){ event.preventDefault(); });
    $('#projects_link').bind('mouseover', function(event){ $(event.target).css('cursor','default'); });

    $('#news_link').bind('click', function(event){ event.preventDefault(); });
    $('#news_link').bind('mouseover', function(event){ $(event.target).css('cursor','default'); });

    $('#music_link').bind('click', function(event){ event.preventDefault(); });
    $('#music_link').bind('mouseover', function(event){ $(event.target).css('cursor','default'); });


//extra-wide divs
	   var longest = 0;
	   
   $("div.extra-wide").each(function(){

	   var width = 0;

	   
	   $(this).find(".wide_list_item").each(function(){
		   width += $(this).outerWidth();
		   width += parseInt($(this).css("margin-right"));
		   width += parseInt($(this).css("margin-left"));
		   console.log(width,$(this));
		});

		if(width > longest) longest = width;

		   //console.log(longest);
		
		$("div.extra-wide").css("width", (longest + 250) +  "px");
	});

});




function showHide(id,vis) {
	 document.getElementById(id).style.display=vis;
	}
	
//in Safari, develop >> show error console to get console output
