$(document).ready(function () {
	// top menu fades
	$('div#account_nav li a').animate( { opacity : 0.6 } , 0 );
	$('div#account_nav li a').hover(function () {
		$(this).animate( { opacity : 1 } , 'fast' );
	}, function () {
		$(this).animate( { opacity : 0.6 } , 'fast' );
	});
	
	// top menu
	$('div#navigation li').hover(function () {
		var children = $(this).children('ul.children');
		
		if (children.length > 0) {
			children.slideDown(50);
		}
	}, function () {
		var children = $(this).children('ul.children');
		
		if (children.length > 0) {
			children.slideUp(50);
		}
	});
	
	// convert # links to nothing
	$('a[href="#"], a[href="http://www.heroframework.com/#"]').removeAttr('href');
	
	// submit button
	$('input.button').hover(function () {
		$(this).toggleClass('hover');
	});
	
	$('input.text, textarea.text').focus(function () {
		$(this).addClass('focus');
	});
	
	$('input.text, textarea.text').blur(function () {
		$(this).removeClass('focus');
	});
	
	// developer tag
	$('a.developer_tag').hide().animate({ width: 'toggle'});
});
