$(document).ready(function(){


  
// JavaScript Document

//$(function() { alert('Ready to do your bidding!'); });
//$(function() { alert($('#rightSidebar ul ul li a:odd').length + ' elements!'); });
//$('div').addClass('class_name');

// ==== RIGHT SIDEBAR ====
// Adding label to tell user they can click to show/hide
/*$(function() {
	$('<span>Click to show/hide</span>')
		.addClass('msg')
		.appendTo('#rightSidebar h2');
})*/
// Handle hiding of right sidebar sections
$(function() {$('#rightSidebar h2').click(function() {
	$(this).next().animate(
		{'height':'toggle'}, 'fast', 'easeInOutSine');
	});
})
// Handle formatting of alternating rows of posts listed
$(function() {$('#rightSidebar ul ul li:odd').addClass('altRow');})
$(function() {$('#rightSidebar ul ul li a:odd').addClass('altRow');})

// ==== Main Content section ====
// Show or hide post details based on click of post title
$(function() {$('.blogPostContent').hide();})
$(function() {$('.blogPostTitle').click(function() {
	$(this)
		.next().next()
			.animate({'height':'toggle','opacity': 'toggle'}, 'normal', 'easeInOutSine');
	});
})
// Highlight the blog post title
$(function() {$('.blogPostTitle').hover(
	function() {$(this)
		.toggleClass('blogPostTitleHighlight');
		}
	);
})
// Indent the blog post title
$(function() {$('.blogPostTitle').hover(
	function() {$(this)
		.stop(true, true)
		.animate({paddingLeft: '+=10px'}, 300, 'easeInOutSine');
		}
	,function() {$(this)
		.stop(true, true)
		.animate({paddingLeft: '-=10px'}, 150, 'easeInOutSine');
		}
);})

});
