$(document).ready(function() {
	$( 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 ).toggleClass( 'dock-active' );
		$(this).children('span').css("display","block");
		$('.latest').css("display","none");
		//$( this ).children( 'span' ).fadeIn( 200 );
	}).bind( "mouseleave", function() {		
		//$( this ).removeClass( 'dock-active' );	
		$(this).children('span').css("display","none");
		$('.latest').css("display","block");
	} );
			
	//$( '#dock' ).bind( "mouseleave", function() {
		//$( '.latest' ).fadeIn( 1000 );
	//} );
} );
});

// jquery smooth scroll for scrolling window

$(function(){
 
    $('a[href*=#]').click(function() {
 
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') 
        && location.hostname == this.hostname) {
 
            var $target = $(this.hash);
 
            $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
 
            if ($target.length) {
 
                var targetOffset = $target.offset().top;
 
                $('html,body').animate({scrollTop: targetOffset}, 1000);
 
                return false;
 
            }
 
        }
 
    });
 
});

function equalHeight(group) {
	tallest = 0;
	group.each(function() {
		thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}
$(document).ready(function() {
	equalHeight($(".firstTwo .post-meta h3.post-title"));
	equalHeight($(".firstTwo .post-box .post-content"));
	equalHeight($(".lastTwo .post-meta h3.post-title"));
	equalHeight($(".lastTwo .post-box .post-content"));
});