  $(document).ready(function(){
    $(".page_item span").text("");
	
	$(".page_item span").hover(function() {	
	$(this).addClass("hover").stop() /* Add class of "hover", then stop animation queue buildup*/
		.animate({
			opacity: '0'
		}, 250); /* this value of "500" is the speed of how fast/slow this hover animates */

	} , function() {
	$(this).removeClass("hover").stop()  /* Remove the "hover" class , then stop animation queue buildup*/
		.animate({
			opacity: '1'
		}, 250);
	});
	
	
	$("#social_icons ul li").css( {backgroundPosition: "50% 100%"} )

		$("#social_icons ul li").hover(function() {	
	$(this).addClass("hover").stop() /* Add class of "hover", then stop animation queue buildup*/
		.animate({
			backgroundPosition: "(50% 0%)"
		}, 250); /* this value of "500" is the speed of how fast/slow this hover animates */

	} , function() {
	$(this).removeClass("hover").stop()  /* Remove the "hover" class , then stop animation queue buildup*/
		.animate({
			backgroundPosition: "(50% 100%)"
		}, 250);
	});
	

	
	$("#fb_click").click(function() {
		window.open( $(this).attr('href') );
        return false;
	});
	
	
	
/*   ------------  Sidebar Search form  -------- */
	$("#show_search").click(function() {	
	$("#sb_topline").hide(300); /*   Hides the top line of the sidebar   */
	$("#sb_searchform").show(300); /*   Shows the sidebar search form   */
	});

	
	
	/*   ------------  Show Inflight Archives  -------- */
	$("#show_IA").click(function() {	
	$("#first_post").hide(300); /*   Hides the top line of the sidebar   */
	$("#inflight_archive").show(300); /*   Shows the sidebar search form   */
	});
	
	/*   ------------  Show Inflight First Post  -------- */
	$("#show_FP").click(function() {	
	$("#first_post").show(300); /*   Hides the top line of the sidebar   */
	$("#inflight_archive").hide(300); /*   Shows the sidebar search form   */
	});
	
	
	
	
		/*   ------------  Show Event List View  -------- */
	$("#show_EL").click(function() {	
	$("#CV_wrap").hide(300); /*   Hides the top line of the sidebar   */
	$("#EL_wrap").show(300); /*   Shows the sidebar search form   */

		$("#E_wrap").hide(300); /*   Shows the sidebar search form   */
	});
	
			/*   ------------  Show Event  -------- */
	$("#show_E").click(function() {	
	$("#CV_wrap").hide(300); /*   Hides the top line of the sidebar   */
	$("#EL_wrap").hide(300); /*   Shows the sidebar search form   */
		$("#E_wrap").show(300); /*   Shows the sidebar search form   */
	});


		/*   ------------  Show Calendar View  -------- */
	$("#show_CV").click(function() {	
	$("#CV_wrap").show(300); /*   Hides the top line of the sidebar   */
	$("#EL_wrap").hide(300); /*   Shows the sidebar search form   */

		$("#E_wrap").hide(300); /*   Shows the sidebar search form   */

	});
	

	if (($("body").hasClass('category-inflight-stories')))
		{	
		$('.page-item-5 span').css('opacity', 0);
		$('.page-item-5').css('background-image', 'url(http://whitneygreer.com/wp-content/themes/wgreer/images/ifs_3.gif)');
			}
	else if (($("body").hasClass('category-calendar')))
		{	
		$('.page-item-9 span').css('opacity', 0);
		$('.page-item-9').css('background-image', 'url(http://whitneygreer.com/wp-content/themes/wgreer/images/cal_3.gif)');
			}


/* The powered by... button   */


	$("#footer a").hover(function() {	
	$(this).addClass("hover").stop()
		.animate({
			opacity: '0'
		}, 500); 

	} , function() {
	$(this).removeClass("hover").stop()
		.animate({
			opacity: '1'
		}, 500);
	});

	
  });