jQuery(document).ready(function($) {

	/**
	 * Unmark blog in header nav when calendar is selected + mark calendar as selected
	 */
	if ($("body.events-archive").length > 0 || $("body.events-single").length > 0){
		
		$("#headerNavWrap ul li").each(function(){
			$(this).removeClass("current_page_parent");
			var tmpClasses = $(this).attr("class").split(" ");
			var i;
			for(i=0; i<=tmpClasses.length; i++){
				if (tmpClasses[i] == "menu-item-type-custom"){				
					$(this).addClass("current_page_item");
				}
			}		
			
		});
		
	}
	
	/**
	 * Header nav animation
	 */
	$("#headerNavWrap li").hover(
		function(){
			$(this).find('ul:first').hide().slideDown(200); 
		},
		function(){ 
			$(this).find('ul:first').slideUp(100); 
		}
	);
    
    /**
	 * Fancybox
	 */
	/* This is basic - uses default settings */	
	/*
	$("a.fancybox").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	false,
		'hideOnContentClick'	: 	true,
		'titlePosition'			: 	'inside',
		'autoScale'				: 	true,
		'opacity'				: 	true
	});
	*/
    
});
