// fade in background image
jQuery(window).load(function () {
	jQuery("#bg-logo ").fadeIn(600);
});

jQuery(document).ready(function(){
	
	jQuery('div#col1 span.vvqbox:first').each(function() {
		jQuery(this).css('margin-top', '0px');
	});
	
	pageHeight();
	
	jQuery(window).resize(function(){
		pageHeight();
	});
	
	//jQuery('h1#logo, p#blog-link').hover(function() {
	//	jQuery(this).find('span:hidden').fadeIn('fast');
	//}, function() {
	//	jQuery(this).find('span:visible').fadeOut('slow');
	//});

	jQuery('ul#menu-main-navigation li:not(.current-menu-item, .current-post-ancestor)').hover( function() {
		jQuery(this).find('span').animate({
		    top: '0px'
		}, 100);
		jQuery(this).find('a').css('background-position', 'bottom center');
	}, function() {
		jQuery(this).find('span').animate({
		    top: '16px'
		}, 100);
		jQuery(this).find('a').css('background-position', 'top center');
	});
	
	jQuery('div#social a').hover(function() {
	  jQuery(this).find('span').animate({
		    left: '0px'
		}, 300);
	}, function() {
	  jQuery(this).find('span').animate({
		    left: '63px'
		}, 300);
	});

	
	// show more posts
	jQuery('p#more').click(function(){
		jQuery('div.post:hidden').fadeIn(600);
		jQuery(this).hide();
		jQuery('p#less').fadeIn(600);
	});
		
	jQuery('p#less').click(function(){
		jQuery('div.post:gt(5)').fadeOut(600);
		jQuery(this).hide();
		jQuery('p#more').fadeIn(600);
	});
	
	jQuery('img.tail').css({ 'opacity' : 0.7 });
});

// set the height of the containing div so background image doesnt cause scroll
pageHeight = function() {
	var viewerHeight = jQuery(window).height();
	//alert(viewerHeight);
	
	if (viewerHeight < 800) {
		jQuery("#bg-logo ").css('top', 400);
	} else {
		jQuery("#bg-logo ").css('top', '50%');
	}
}



