var newEventWindow="false";
var v;



$(function(){
	
	$(".showchildren").mouseover(function(){
	});
	
	$(".button2:contains('Add an Event')").click(function(){
		if(newEventWindow=="false") {
			$("#newEvent").slideDown();
			newEventWindow="true";
		} else {
			$("#newEvent").slideUp();
			newEventWindow="false"; 
		}
		return false;
	});
	
	$("#showlogin").click(function(){
		$("#loginbox").slideToggle(200);
		return false;
	});
	
	/*********************************************
			Image Tab Functions
	*********************************************/
	$('#tab').click(function(){
		if(tabstate=="no") {
			$('#editorImages').animate({top:"0px"});
			tabstate="yes";
		} else {
			$('#editorImages').animate({top:"-125px"});
			tabstate="no";
		}
	}); 
	
});
	
$(document).ready(function() {
	
	$('li.navItem').bind("mouseenter", function(e){
		var w=$(this).width();
		var h=$(this).height();
		w=w+20;
		
		var $menu=$(this).children('div');
		$('li.navItem').not(this).children('div').hide(0);
		$menu.slideDown(150).css({ marginLeft : '-'+w+'px', top :  h+"px" });
	});
	
	$('li.navItem > div').bind("mouseleave", function(e){
        $(this).hide();
    });

	
	$("#fanetworkmid").hide();
	
});

$(document).click(function() {
	$('li.navItem > div').hide();
});
