jQuery(document).ready(function() {	
//start with
jQuery('#header').fadeTo('slow',0.7);	
jQuery('.meta').fadeTo('slow',0.7);
//hover header full opacity dim page
	jQuery('#header').hover(function(){
		jQuery('#header').animate({opacity : 1},500);
		jQuery('#page-wrap').stop().animate({opacity : 0.7},200);
		
		}, function() {
		jQuery('#header').animate({opacity : 0.7},500);
		jQuery('#page-wrap').stop().animate({opacity : 1},200);
	});
//hover meta full opacity dim page
	jQuery('#single-posts_wrap .meta').hover(function(){
		jQuery('.meta').animate({opacity : 1},100).find('.meta-dark').css({'borderLeft': '1px solid #333','backgroundColor' : '#fff'});
		jQuery('.entry').stop().animate({opacity : 0.7},200);
		
		}, function() {
		jQuery('.meta').animate({opacity : 0.7},700).find('.meta-dark').css({'border': '1px solid #fff','backgroundColor' : '#DAE1D3'});
		jQuery('.entry').stop().animate({opacity : 1},200);
	});
// featured image hover
var featText;
jQuery('#feat li').hover(function(){
jQuery(this).find('img').animate({top : '-=10px',width : '80px',height : '80px'},100);
jQuery(this).animate({opacity: 1},500);
	jQuery('#index-posts_wrap').animate({opacity: 0.3},300);
	jQuery(this).css({'z-index' : '11'});
	 

	 featText = jQuery(this).find('a').attr('title');

	jQuery('.feat-info').animate({top : '110px',opacity : 1}, 300).animate({top : '-=20px'}, 100).html(featText);

}, function() {
jQuery('.feat-info').stop().animate({top : '+=20px'}, 250).animate({opacity : 0.0}, 100);
jQuery(this).css({'z-index' : '0'});
jQuery(this).find('img').animate({top : '+=10px',width : '80px',height : '80px'},100);
 

jQuery('#index-posts_wrap').animate({opacity: 1},100);
});

// latestimage hover
var lateText;
jQuery('#latest li').hover(function(){
jQuery(this).find('img').animate({top : '-=15px',width : '50px',height : '50px'},100);
jQuery(this).animate({opacity: 1},500,function(){
	//jQuery('#index-posts_wrap').animate({opacity: 0.3},300);
	jQuery(this).css({'z-index' : '11'});
	 

	 featText = jQuery(this).find('a').attr('title');

	jQuery('.latest-info').html(featText);
});
}, function() {
jQuery(this).css({'z-index' : '0'});
jQuery(this).find('img').animate({top : '+=15px',width : '50px',height : '50px'},100);
 
jQuery('.latest-info').html('<br>Recent Posts');
//jQuery('#index-posts_wrap').animate({opacity: 1},100);
});

//index post hover show meta
jQuery('.index-post .meta').animate({opacity : 0.3},50);
jQuery('.index-post').hover(function(){
		jQuery('.index-post').find('.entry').show('fast');
		jQuery('.index-post').find('.postmetadata').hide('fast');
	jQuery(this).animate({opacity: 1},500,function(){
		
		
		jQuery(this).find('.entry').slideUp(550);
		jQuery(this).find('.postmetadata').slideDown(550);
		
	});

}, function() {
		jQuery(this).find('.postmetadata').slideUp(150);
		jQuery(this).find('.entry').slideDown(150);
		
	
});
//menu
	var menuTitle;
	jQuery("#main-nav li a.main-link").hover(function(){
		menuTitle = jQuery(this).attr('title');
		jQuery('#menutool').fadeIn('slow').text(menuTitle);
	});
	jQuery("#main-nav li a.show-info").hover(function(){
		menuTitle = jQuery(this).attr('title');
		jQuery('#menutool').fadeIn('slow').text(menuTitle);
	});
	jQuery("#main-nav li a.show-find").hover(function(){
		menuTitle = jQuery(this).attr('title');
		jQuery('#menutool').fadeIn('slow').text(menuTitle);
	});
	jQuery("#main-nav li a.show-fav").hover(function(){
		menuTitle = jQuery(this).attr('title');
		jQuery('#menutool').fadeIn('slow').text(menuTitle);
	});
	jQuery("#main-nav li a.main-link").click(function(){
		jQuery("#main-nav li a.close").fadeIn();
		jQuery("#main-nav li a.main-link").removeClass("active");												 
		jQuery(this).addClass("active");										 
		jQuery("#sub-link-bar").animate({height: "0px"},500,function(){
			jQuery("#sub-link-bar").animate({height: "30px"},50);

		});
		jQuery(".sub-links").hide();
		jQuery(this).siblings(".sub-links").fadeIn().animate({top: "10px"});
	});
	jQuery("#main-nav li a.close").click(function(){
		jQuery('#menutool').hide();
		jQuery("#main-nav li a.main-link").removeClass("active");												 									 
		jQuery(".sub-links").fadeOut();
		jQuery("#sub-link-bar").animate({
			height: "0px"					   
		});		
		jQuery("#main-nav li a.close").fadeOut();
	});
//show info bar	
	jQuery('.show-info').toggle(function(){
		
		jQuery('#info').slideDown('slow');
		
	}, function(){
		
		jQuery('#info').slideUp('slow');
		
	});
//show find bar	
	jQuery('.show-find').toggle(function(){
		
		jQuery('#find').slideDown('slow');
		
	}, function(){
		
		jQuery('#find').slideUp('slow');
		
	});
//show info bar	
	jQuery('.show-fav').toggle(function(){
		
		jQuery('#fav').slideDown('slow');
		
	}, function(){
		
		jQuery('#fav').slideUp('slow');
		
	});
		
//comment hover
	jQuery('ol.commentlist li').hover(function() {

		jQuery(this).find('.vcard').animate({opacity : 1},50);
		jQuery(this).find('.com-num').animate({opacity : 1},50);
		jQuery(this).find('.reply').animate({opacity : 1},50);
		jQuery(this).find('p').animate({opacity : 1},50);
	}, function() {
		
		jQuery(this).find('.vcard').animate({opacity : 0.5},50);
		jQuery(this).find('.com-num').animate({opacity : 0.5},50);
		jQuery(this).find('.reply').animate({opacity : 0.5},50);
		jQuery(this).find('p').animate({opacity : 0.5},50);
	});

});