$(document).ready(function(){
	$(document.body).addClass('js');

	if ($('.home').length) { // implies *not* zero
		$(".home #sidebar").accessibleTabs({
			tabhead:'h2',
			fx:"fadeIn",
			wrapperClass: 'tabContent'
		});
		
		$('#slider').nivoSlider({
			effect: 'fade',
			animSpeed: 1000,
			directionNav:true,
			controlNav:false, 
			controlNavThumbs:false
		});	
		
		//hide quotes but show one at random
		var quotes = $('div.thequote').length;
		var randomNum = Math.floor(Math.random()*quotes);
		$('div.thequote:eq(' + randomNum + ')').css("display", "block");
		
		//move the cite inside the quote div so it displays properly (easier for Wordpress this way)
		$("div.thequote").each(function(i) { 
			var cite = $(this).find("cite");
			var theQuote = $(this).find("div");
			$(cite).appendTo(theQuote);
		});
	}
	
	$(".home #sidebar").append('<span></span>');
	$("#sidebar ul.twitter").append('<span></span>');
	
	if ( $('#menu-main_nav li.current_page_item').children().size() > 1 ) {
		$('#menu-main_nav').css('height', '6em');
	}
	if ( $('#menu-main_nav li.current-page-parent').children().size() > 1 ) {
		$('#menu-main_nav').css('height', '6em');
	}

});

$(window).load(function() {

	
});
