
function attachMenuAnimation(){
$(" #bottomNavBar #bottomNavLeft ul li ul").css({display: "none"}); // Opera Fix
$(" #bottomNavBar #bottomNavRight ul li ul").css({display: "none"}); // Opera Fix

$(" #bottomNavBar #bottomNavLeft ul li").hover(function(){
		// mouseover effect for top-level li elements
		$(this).find('ul:first').css({visibility: "hidden"});
		$(this).find('ul li ul').css({visibility: "hidden"});

		$(this).find('ul:first li').css({ 
		        opacity: 0,
				top: 4,
				lineHeight:0
		      });
		$(this).find('ul:first > li').css({visibility: "visible", display:"block"});
		$(this).find('ul:first:hidden').css({visibility: "visible",display: "block"}).show(400);
		$(this).find('ul:first > li').animate({"opacity": "1", "top":"0", "lineHeight":"1.4em"}, "slow");

	},function(){
		// mouseout effect for top-level li elements	
/*		$(this).find('ul:first').css({visibility: "hidden"});
		$(this).find('ul:first li').css({ 
		        opacity: 0.1,
				top: -10
		      });
		});*/
		//$(this).find('ul:first').css({visibility: "hidden"});
		$(this).find('ul:first li').animate({ 
		        opacity: .1,
				top: 10
		      },300, function(){$(this).css({visibility: "hidden", display:"none"})});

		});
		
$(" #bottomNavBar #bottomNavRight ul li").hover(function(){
		// mouseover effect for top-level li elements
		$(this).find('ul:first li').css({ 
		        opacity: 0.1,
				top: -10
		      });
		$(this).find('ul:first:hidden').css({visibility: "visible",display: "none"}).show(400);
		$(this).find('ul:first li').animate({"opacity": "1", "top":"0"}, "slow");

	},function(){
		// mouseout effect for top-level li elements	
		$(this).find('ul:first').css({visibility: "hidden"});
		$(this).find('ul:first li').css({ 
		        opacity: 0.1,
				top: -10
		      });
		});
}

 $(document).ready(function(){
	attachMenuAnimation();
	
	$('#popup_right a.container-close-outside').click(function(){
		showPopupToggle();
	})

	$('li.sobelieve').click(function(){
		showPopupToggle();
	})

});




function showPopupToggle () {
	if ($("#popup_right").css("display")=="block") {
		$("#popup_right").hide();		
	}
	else {
		$("#popup_right").show();	
	}
}

