document.observe('dom:loaded', function() {


	// Lawyer Pics

	var pics = $$('div.dropDownContainer ul li div img');
	
	pics.each(function(pic) {

		var pic_container = pic.up();
		var nav_container = pic_container.up();
	
		Event.observe(nav_container,'mouseenter', function() {
			pic_container.setStyle({display:"block",position:"absolute",top:"35px",left:"23px"});
			//pic_container.show();
		});

		
		Event.observe(nav_container,'mouseleave', function() {
			pic_container.hide();
		});
		

	});


	// Drop Down Menu

	var dropDownMenus = $$('.dropDownContainer');
	
	dropDownMenus.each(function(menu) {

		if(menu.up().hasClassName('dropDownParent')) {
			
			var menuParent = menu.up();
			var rollOverContainer = menuParent.firstDescendant();

			if(Wigzy.currentPage=="home") {
				menu.setStyle({zIndex: "100"});
			} else {
				menu.hide();
			}
			
			Event.observe(menuParent,'mouseenter', function() {
				if(Wigzy.currentPage=="home") {
					menu.setStyle({zIndex: "200"});
				} else {
					menu.show();
				}
				$(rollOverContainer.id+"-off").hide();			
				$(rollOverContainer.id+"-on").show(); 
			});
			
			Event.observe(menuParent,'mouseleave', function() {
				if(Wigzy.currentPage=="home") {
					menu.setStyle({zIndex: "100"});
					dropDownMenus.first().setStyle({zIndex:"150"});
				} else {
					menu.hide();
				}
				$(rollOverContainer.id+"-off").show();			
				$(rollOverContainer.id+"-on").hide(); 
			});
		}

	}); // END EACH dropDownMenus

	if(Wigzy.currentPage=="home") {
		dropDownMenus.first().setStyle({zIndex:"150"});
	}


}); //END OBSERVE DOM:load
