$(function() {
	var website_nav = $('.primary_nav .utility');

	website_nav.removeClass('hide');
	website_nav.mouseover(function(){
		$(this).css('height', 'auto');
	});
	website_nav.mouseout(function(){
		$(this).css('height', '1.6em');
	});

	$('.comment .administration a.confirm').click(function(e){
		var c = $(this).data('clicks');
		if (c) {
			return true;
		}
		e.preventDefault();
		$(this).data('clicks', 1);
		$(this).before('Are you sure? ');
		$(this).html('YES');
		$(this).after(' <a href="" class="no">no</a>');
	});

	$('.tagcloud a').tagcloud({
		size: {start: 10, end: 15, unit: "px"},
		color: {start: '#666', end: '#222'}
	});
	
	$('.tagcloud').children('a').each(function() {
		var startOpacity = ".75";
		$(this).css('opacity', startOpacity);
		$(this).mouseover(function() {
			$(this).animate({ 
 			   opacity: 1
 			 }, 250 );
		}).mouseout(function(){
			$(this).animate({ 
 			   opacity: startOpacity
 			 }, 250 );
		});
	});
	
	$('.primary_nav .nav_link').each(function() {
		$(this).children('span').hide();
		$(this).hover(
			function(){
				$(this).children('span').fadeIn('fast');
			}
			,function() {
				$(this).children('span').fadeOut('fast');
			}
		);
	});
});


