function mainmenu(){
$("ul#nav ul ").css({display: "none"}); // Opera Fix
$("ul#nav li").hover(function(){
$(this).find('ul:first').css({visibility: "visible",display: "none"}).fadeIn(300);
$(this).addClass('active');
},function(){
$(this).find('ul:first').css({visibility: "hidden"});
$(this).removeClass('active');
});
}

$(function() {
	$('ul#nav li:last').css({margin:"0px"});
	$('.sponsors a:last img').css({"marginBottom":"0px"});
	$('.widgets .widget:last').css({"marginRight":"0px"});
	mainmenu();
	
	
	$('ul#nav li').addClass('onhover');
	$('ul#nav li.current-cat').removeClass('onhover');

	$('ul#nav li.onhover a').hover(function() {
	 $('ul#nav li.onhover a').css( { backgroundColor: '#e8e5e5' });
	 $(this).animate( { backgroundColor: '#fe92d9' });
	}, function() {
	 $(this).animate( { backgroundColor: '#e8e5e5' });
	});
	
	
	$('#contentarea a, #twitter_update_list a').hover(function() {
	
		if($(this).parent('p').attr("class") == "meta") {
			 $(this).animate( { color: '#595959' });
		} else {
			 $('#contentarea a, #twitter_update_list a, #subfooter a').css( { color: '#595959' });
			 $('#contentarea p.meta a').css( { color: '#fe92d9' });
			 $(this).animate( { color: '#fe92d9' });
		}
	 
	}, function() {
	
		if($(this).parent('p').attr("class") == "meta") {
			 $(this).animate( { color: '#fe92d9' });
		} else {
			 $('#contentarea a, #twitter_update_list a, #subfooter a').css( { color: '#595959' });
			 $('#contentarea p.meta a').css( { color: '#fe92d9' });
			 $(this).animate( { color: '#595959' });
		}
	
	 
	});
	
	
	$('#subfooter a').hover(function() {
			 $('#subfooter a').css( { color: '#262626' });
			 $(this).animate( { color: '#fe92d9' });
	}, function() {
			 $(this).animate( { color: '#262626' });	 
	});
	
	
	$('a.blocklink').hover(function() {
	 $('a.blocklink').css( { backgroundColor: '#e8e5e5' });
	 $(this).animate( { backgroundColor: '#fe92d9' });
	}, function() {
	 $(this).animate( { backgroundColor: '#e8e5e5' });
	});
	
	
	$('.your-name input').focus(function() {
		if($(this).attr("value") == "Your Name (required)") { $(this).attr("value",""); }
	});
	$('.your-name input').blur(function() {
		if($(this).attr("value") == "") { $(this).attr("value","Your Name (required)"); }
	});
	
	$('.your-email input').focus(function() {
		if($(this).attr("value") == "Your Email (required)") { $(this).attr("value",""); }
	});
	$('.your-email input').blur(function() {
		if($(this).attr("value") == "") { $(this).attr("value","Your Email (required)"); }
	});
	
	$('.your-address textarea').focus(function() {
		if($(this).attr("value") == "Your Address") { $(this).attr("value",""); }
	});
	$('.your-address textarea').blur(function() {
		if($(this).attr("value") == "") { $(this).attr("value","Your Address"); }
	});
	
	$('.your-comments textarea').focus(function() {
		if($(this).attr("value") == "Your Comments") { $(this).attr("value",""); }
	});
	$('.your-comments textarea').blur(function() {
		if($(this).attr("value") == "") { $(this).attr("value","Your Comments"); }
	});
	
	$('#author').focus(function() {
		if($(this).attr("value") == "Name") { $(this).attr("value",""); }
	});
	$('#author').blur(function() {
		if($(this).attr("value") == "") { $(this).attr("value","Name"); }
	});
	
	$('#email').focus(function() {
		if($(this).attr("value") == "Email (will not be published)") { $(this).attr("value",""); }
	});
	$('#email').blur(function() {
		if($(this).attr("value") == "") { $(this).attr("value","Email (will not be published)"); }
	});
	
	$('#url').focus(function() {
		if($(this).attr("value") == "Website") { $(this).attr("value",""); }
	});
	$('#url').blur(function() {
		if($(this).attr("value") == "") { $(this).attr("value","Website"); }
	});
	
	$('#comment').focus(function() {
		if($(this).attr("value") == "Comments") { $(this).attr("value",""); }
	});
	$('#comment').blur(function() {
		if($(this).attr("value") == "") { $(this).attr("value","Comments"); }
	});
	
});
