jQuery( function($) {
	$( '.category' ).click( function() {
		$( this ).toggleClass( 'active' )
		$( this ).siblings( '.dropdown' ).toggle();
		$( this ).find( '.indicator' ).toggleClass( 'indicator-active' );
		return false;
	} );

	$( '#dock > li' ).hover( function() {
		$( '.latest' ).fadeOut( 'fast' );
		$( this ).addClass( 'dock-active' );
		$( this ).children( 'span' ).fadeIn( 200 );
	}).bind( "mouseleave", function() {
		$( this ).removeClass( 'dock-active' );
		$( this ).children( 'span' ).fadeOut( 200 );
	} );

	$( '#dock' ).bind( "mouseleave", function() {
		$( '.latest' ).fadeIn( 1000 );
	} );

	$('.single').each(function() {
		var cur = $(this);
		var next = cur.next('.single.last').eq(0);
		if (!next.length) return;
		var y1 = cur.find('h3').height();
		var y2 = next.find('h3').height();
		if (y1 < y2) {
			cur.find('h3').height(y2);
		} else {
			next.find('h3').height(y1);
		}

		y1 = cur.find('.post-content').height();
		y2 = next.find('.post-content').height();
		if (y1 < y2) {
			cur.find('.post-content').height(y2);
		} else {
			next.find('.post-content').height(y1);
		}
	});
} );